collaboration Drawing app
 
 
 
Go to file
Mitja Bezenšek 79196e9f2b
Avoid importing `editor.css` twice (#2373)
This PR prevents importing `editor.css` twice. Looks like we currently
import all the css files for all the routes in the examples app. This
means that we were importing both `tldraw.css` (which includes
`editor.css`) as well as `editor.css` directly (this last one we
imported from `OnlyEditor.tsx`).

This caused all the classes to be defined twice and it made it harder to
debug things - you might have disabled the styles in one of the
definitions but you didn't see any changes because the other definitions
still applied.


![image](https://github.com/tldraw/tldraw/assets/2523721/8d84a145-bfc6-49c1-af44-7f456510b884)

I don't think importing `editor.css` is needed as we do import the full
`tldraw.css` anyway.


![image](https://github.com/tldraw/tldraw/assets/2523721/ccc22af5-1c3a-4ac4-b24e-ee3959c99d3c)


### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Prevent importing `editor.css` twice which should help when debugging
the styles via developer console.
2023-12-22 13:26:30 +00:00
.github Revert "zoom to affected shapes after undo/redo" (#2310) 2023-12-12 11:36:52 +00:00
.husky Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
.yarn Styles API (#1580) 2023-06-16 10:33:47 +00:00
apps Avoid importing `editor.css` twice (#2373) 2023-12-22 13:26:30 +00:00
assets Use custom font (#2343) 2023-12-19 14:17:45 +00:00
config Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
packages Another typo fix. (#2366) 2023-12-20 16:46:51 +00:00
scripts Use custom font (#2343) 2023-12-19 14:17:45 +00:00
.eslintignore untrack generated files (#1646) 2023-06-24 08:22:42 +00:00
.eslintplugin.js transfer-out: transfer out 2023-04-25 12:01:25 +01:00
.eslintrc.js no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
.gitignore Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
.ignore untrack generated files (#1646) 2023-06-24 08:22:42 +00:00
.prettierignore untrack generated files (#1646) 2023-06-24 08:22:42 +00:00
.prettierrc Revert "Update dependencies (#1613)" (#1617) 2023-06-19 09:49:44 +00:00
.yarnrc.yml lite: tweak lockfile name 2023-04-25 12:01:38 +01:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2023-12-20 15:27:34 +00:00
CLA.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
CODE_OF_CONDUCT.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
CONTRIBUTING.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
LICENSE.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
README.md Fix license language. (#2365) 2023-12-20 16:08:50 +00:00
TRADEMARKS.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
lazy.config.ts untrack generated files (#1646) 2023-06-24 08:22:42 +00:00
lerna.json Update CHANGELOG.md [skip ci] 2023-12-20 15:27:34 +00:00
package.json Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
public-yarn.lock fix vite HMR issue (#2279) 2023-12-01 16:48:30 +00:00
vercel.json Update readme (#2027) 2023-10-06 12:10:33 +00:00

README.md

tldraw

tldraw

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

👉 Read the docs and learn more at tldraw.dev.

Local development

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 hello@tldraw.com.

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.

Contact

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