diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..a0ece19 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "trailingComma": "es5", + "singleQuote": true, + "semi": false, + "printWidth": 100, + "tabWidth": 2, + "useTabs": true +} diff --git a/README.md b/README.md index d4dc5ef..7e3c8b0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ +**Try it out at [makereal.tldraw.com](https://makereal.tldraw.com/).** + +\*\*To use your own API key, you need to have access to usage tier 1. Check out your current tier, and how to increase it [in the OpenAI settings](http://platform.openai.com/account/limits). + > This is an experimental fork of Sawyer Hood's [draw a ui](https://github.com/SawyerHood/draw-a-ui). > Hopefully some of these changes can make it upstream! +> > - Changes the preview to an embedded shape that appears on the canvas. > - Only selected shapes are used when generating html. > - One embedded preview can be given back to GPT, with annotations. @@ -21,8 +26,8 @@ This is a Next.js app. To get started run the following commands in the root dir ```bash echo "OPENAI_API_KEY=sk-your-key" > .env.local -npm install -npm run dev +yarn +yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. diff --git a/app/PreviewShape/PreviewShape.tsx b/app/PreviewShape/PreviewShape.tsx index 7608ad3..20ac179 100644 --- a/app/PreviewShape/PreviewShape.tsx +++ b/app/PreviewShape/PreviewShape.tsx @@ -5,8 +5,6 @@ import { useIsEditing, HTMLContainer, toDomPrecision, - SvgExportContext, - TLFrameShape, Icon, useToasts, stopEventPropagation, diff --git a/app/components/APIKeyInput.tsx b/app/components/APIKeyInput.tsx index 6e6d611..60068ac 100644 --- a/app/components/APIKeyInput.tsx +++ b/app/components/APIKeyInput.tsx @@ -1,13 +1,9 @@ -import { Input, useBreakpoint } from '@tldraw/tldraw' +import { useBreakpoint } from '@tldraw/tldraw' export function APIKeyInput() { const breakpoint = useBreakpoint() return ( -