Giter Club home page Giter Club logo

make-real-starter's Introduction

tldraw

Welcome to the public monorepo for tldraw. tldraw is a library for creating infinite canvas experiences in React. It's the software behind the digital whiteboard tldraw.com.

Installation

npm i tldraw

Usage

import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'

export default function App() {
	return (
		<div style={{ position: 'fixed', inset: 0 }}>
			<Tldraw />
		</div>
	)
}

Learn more at tldraw.dev.

Local development

The local development server will run our examples app. The basic example will show any changes you've made to the codebase.

To run the local development server, first clone this repo.

Install dependencies:

yarn

Start the local development server:

yarn dev

Open the example project at localhost:5420.

License

tldraw's source code and distributed packages are provided under the non-commercial tldraw license.

This license does not permit commercial use. If you wish to use tldraw in a commercial product or enterprise, you will need to purchase a commercial license. To obtain a commercial license, please contact us at [email protected].

To learn more, see our license page.

Trademarks

The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.

Community

Have questions, comments or feedback? Join our discord or start a discussion.

Contribution

Please see our contributing guide. Found a bug? Please submit an issue.

Contributors

Star History

Star History Chart

Contact

Find us on Twitter at @tldraw or email [email protected]. You can also join our discord for quick help and support.

make-real-starter's People

Contributors

lordidiot avatar somehats avatar steveruizok avatar taha-hassan-git avatar todepond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

make-real-starter's Issues

Request: Import HTML (into the main make-real) + Select, Edit, Re-Make & Share Online

Hi there
Love tldraw and make-real ❤️ it's a lot of fun to prototype,
iterate over the base of site, and especially the fact that I can share a working link of the site to anyone!
it's super awesome.

But I've noticed that sometimes, i just want to do manual edits to the code locally, which i can do by copying the html
but after doing the code changes i want to return it back to makereal, so i need a way to import the html back
Then I could continue using makereal, selecting my imported html, to make further visual or text instructions, and redo make-real

image

I've tried forking the make-real repo (to submit a PR), but could not get it to run.
I hoped make-real-starter would include the web-sharing, not just copy html, and have it surved locally, similar to a tldraw.link/site just localhost:3000/site (PLEASE INCLUDE IT ASWELL)

I think this will bump up makereal's effectiveness tremendously
please let me know if you can make this possible
Thanks a lot and all the best! (& Happy Holydays)

meet the error when install

Failed to compile
./app/components/MakeRealButton.tsx:3:0
Module not found: Can't resolve '../makeReal'
1 | import { useEditor, useToasts } from '@tldraw/tldraw'
2 | import { useCallback } from 'react'

3 | import { makeReal } from '../makeReal'
4 |
5 | export function MakeRealButton() {
6 | const editor = useEditor()

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./app/page.tsx
This error occurred during the build process and can only be dismissed by fixing the error.

Getting error with makeEmptyResponseShape

Steps:

  1. Cloned the repo,
  2. Inserted the GPT-4 API key (with a valid subscription)
  3. yarn install
  4. yarn run dev

Error:
assert<@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/utils/src/lib/control.ts:17:13
wrappedFn@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/utils/src/lib/function.ts:16:14
getShapeUtil@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/Editor.ts:545:11
do@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/Editor.ts:5034:29
createCommand/exec/<@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:40:16
@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:102:44
transact@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/state/src/lib/core/transactions.ts:120:12
ignoringUpdates@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:102:27
exec@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:39:12
createCommand/exec/<@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:31:30
batch/<@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:79:11
transaction@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/state/src/lib/core/transactions.ts:104:22
transact@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/state/src/lib/core/transactions.ts:122:10
batch@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:77:17
exec@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:31:14
createShape@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/Editor.ts:4936:10
makeEmptyResponseShape@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/tldraw/src/lib/ui/makeReal.tsx?t=1705134476101:105:10
makeReal@http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/tldraw/src/lib/ui/makeReal.tsx?t=1705134476101:38:49

Versions:
ubuntu@ubuntu-2204:~/source/tldraw$ node -v && npm -v && yarn -v
v21.5.0
10.2.4
6.5.0

OS:
ubuntu@ubuntu-2204:~/source/tldraw$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

Screenshot:
image

With Chrome debugging got this error:
Error: No shape util found for type "response"
at Editor.getShapeUtil (/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/Editor.ts:763:3)
at Object.do (/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/Editor.ts:6610:24)
at /home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:68:12
at /home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:151:40
at transact (/home/ubuntu/source/tldraw/packages/state/src/lib/core/transactions.ts:248:10)
at HistoryManager.ignoringUpdates (/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:151:25)
at exec (/home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:67:9)
at /home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:55:22
at /home/ubuntu/source/tldraw/packages/editor/src/lib/editor/managers/HistoryManager.ts:121:6
at transaction (http://localhost:5420/@fs/home/ubuntu/source/tldraw/packages/state/src/lib/core/transactions.ts:104:20) {stack: 'Error: No shape util found for type "response…es/state/src/lib/core/transactions.ts:104:20)', message: 'No shape util found for type "response"'}

Please let me know how to solve this issue.

I got this error when following the install steps:

C:\Users\antdx\make-real-starter>npm run dev

[email protected] dev
next dev

▲ Next.js 14.0.3

✓ Ready in 2.1s
○ Compiling / ...
⨯ ./app/components/MakeRealButton.tsx:3:0
Module not found: Can't resolve '../makeReal'
1 | import { useEditor, useToasts } from '@tldraw/tldraw'
2 | import { useCallback } from 'react'

3 | import { makeReal } from '../makeReal'
4 |
5 | export function MakeRealButton() {
6 | const editor = useEditor()

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./app/page.tsx
⨯ ./app/components/MakeRealButton.tsx:3:0
Module not found: Can't resolve '../makeReal'
1 | import { useEditor, useToasts } from '@tldraw/tldraw'
2 | import { useCallback } from 'react'

3 | import { makeReal } from '../makeReal'
4 |
5 | export function MakeRealButton() {
6 | const editor = useEditor()

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./app/page.tsx
⨯ ./app/components/MakeRealButton.tsx:3:0
Module not found: Can't resolve '../makeReal'
1 | import { useEditor, useToasts } from '@tldraw/tldraw'
2 | import { useCallback } from 'react'

3 | import { makeReal } from '../makeReal'
4 |
5 | export function MakeRealButton() {
6 | const editor = useEditor()

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./app/page.tsx

getSelectedShapes is not a function + other strange behavior

This happened with the original tldraw/draw-a-ui repository too, but the error was tldraw/tldraw.css not found.

If you are experiencing strange behavior like this, I've had to update the dependency from:

"@tldraw/tldraw": "^2.0.0-canary.ba4091c59418",
to
"@tldraw/tldraw": "2.0.0-canary.ba4091c59418",

(remove ^)

I'm not sure why this fixes it or what the issue is. There may be some inconsistency with how the package is being released.

Running on Mac OS Ventura, using node v21.1.0 (npm v10.2.0).

Please add a license to this repo

First, thank you for sharing this project with us!

Could you please add an explicit LICENSE file to the repo so that it's clear under what terms the content is provided, and under what terms user contributions are licensed?

Per GitHub docs on licensing:

[...] without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you're creating an open source project, we strongly encourage you to include an open source license. The Open Source Guide provides additional guidance on choosing the correct license for your project.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.