Wykres commitów

37 Commity (02404227d641f12733de94bbff17b46d69944cb0)

Autor SHA1 Wiadomość Data
alex a0628f9cb2
tldraw_final_v6_final(old version).docx.pdf (#2998)
Rename `@tldraw/tldraw` to just `tldraw`! `@tldraw/tldraw` still exists
as an alias to `tldraw` for folks who are still using that.

### Test Plan

- [x] Unit Tests
- [ ] End to end tests

### Release Notes

- The `@tldraw/tldraw` package has been renamed to `tldraw`. You can
keep using the old version if you want though!
2024-02-29 16:06:19 +00:00
Steve Ruiz b7d9c8684c
tldraw zero - package shuffle (#1710)
This PR moves code between our packages so that:
- @tldraw/editor is a “core” library with the engine and canvas but no
shapes, tools, or other things
- @tldraw/tldraw contains everything particular to the experience we’ve
built for tldraw

At first look, this might seem like a step away from customization and
configuration, however I believe it greatly increases the configuration
potential of the @tldraw/editor while also providing a more accurate
reflection of what configuration options actually exist for
@tldraw/tldraw.

## Library changes

@tldraw/editor re-exports its dependencies and @tldraw/tldraw re-exports
@tldraw/editor.

- users of @tldraw/editor WITHOUT @tldraw/tldraw should almost always
only import things from @tldraw/editor.
- users of @tldraw/tldraw should almost always only import things from
@tldraw/tldraw.

- @tldraw/polyfills is merged into @tldraw/editor
- @tldraw/indices is merged into @tldraw/editor
- @tldraw/primitives is merged mostly into @tldraw/editor, partially
into @tldraw/tldraw
- @tldraw/file-format is merged into @tldraw/tldraw
- @tldraw/ui is merged into @tldraw/tldraw

Many (many) utils and other code is moved from the editor to tldraw. For
example, embeds now are entirely an feature of @tldraw/tldraw. The only
big chunk of code left in core is related to arrow handling.

## API Changes

The editor can now be used without tldraw's assets. We load them in
@tldraw/tldraw instead, so feel free to use whatever fonts or images or
whatever that you like with the editor.

All tools and shapes (except for the `Group` shape) are moved to
@tldraw/tldraw. This includes the `select` tool.

You should use the editor with at least one tool, however, so you now
also need to send in an `initialState` prop to the Editor /
<TldrawEditor> component indicating which state the editor should begin
in.

The `components` prop now also accepts `SelectionForeground`.

The complex selection component that we use for tldraw is moved to
@tldraw/tldraw. The default component is quite basic but can easily be
replaced via the `components` prop. We pass down our tldraw-flavored
SelectionFg via `components`.

Likewise with the `Scribble` component: the `DefaultScribble` no longer
uses our freehand tech and is a simple path instead. We pass down the
tldraw-flavored scribble via `components`.

The `ExternalContentManager` (`Editor.externalContentManager`) is
removed and replaced with a mapping of types to handlers.

- Register new content handlers with
`Editor.registerExternalContentHandler`.
- Register new asset creation handlers (for files and URLs) with
`Editor.registerExternalAssetHandler`

### Change Type

- [x] `major` — Breaking change

### Test Plan

- [x] Unit Tests
- [x] End to end tests

### Release Notes

- [@tldraw/editor] lots, wip
- [@tldraw/ui] gone, merged to tldraw/tldraw
- [@tldraw/polyfills] gone, merged to tldraw/editor
- [@tldraw/primitives] gone, merged to tldraw/editor / tldraw/tldraw
- [@tldraw/indices] gone, merged to tldraw/editor
- [@tldraw/file-format] gone, merged to tldraw/tldraw

---------

Co-authored-by: alex <alex@dytry.ch>
2023-07-17 21:22:34 +00:00
Steve Ruiz 4dfc59e5cb
tldraw.css (#1607)
This PR introduces `@tldraw/tldraw/tldraw.css`, an exported CSS file
that replaces the `editor.css` and `ui.css` that were previously copied
from the editor and ui packages. Instead, these files are combined into
the `tldraw.css` file, simplifying the import story when using
`@tldraw/tldraw`.

### Change Type

- [x] `major` — Breaking change

### Release Notes

- [tldraw] Removes `editor.css` and `ui.css` exports, replaces with
`tldraw.css`
2023-06-17 22:33:21 +00:00
alex 29ed921c67 transfer-out: transfer out 2023-04-25 12:01:25 +01:00
Steve Ruiz e1fb9a8250
[improvement] Improve monorepo (lask + turbo) (#566)
* add lask for packages

* Add turbo

* remove custom scripts

* update turbo scripts

* Improve scripts, update changelogs

* update action to use turbo

* Update .gitignore

* Update main.yml

* Update main.yml

* Update main.yml

* Add docs

* add clean
2022-02-08 11:05:56 +00:00
Steve Ruiz 89c1c4a4f4 add node env to packages in build script 2022-02-03 11:14:26 +00:00
Jason Laster 0ff6f0628f
Add sourcemap-loader to build step (#535)
* Add sourcemap-loader to build step

* .
2022-01-25 09:57:24 +00:00
Steve Ruiz 7c2777966f
[improvement] Multiplayer + cursors (#457)
* bump versions, improve cursors

* Spline cursors
2021-12-22 00:14:38 +00:00
Steve Ruiz 5b8d4fe1fa no minify 2021-12-12 21:14:58 +00:00
Noah Shipley 98cc0d4cac
Feature/mobx - adds mobx support to @tldraw/core (#383)
* Initial commit with mobx

* Convert more to mobx

* Make useCameraCss reactive (autorun)

* Move more items to mobx

* Fix more invalid components and layout hooks that needed to be reactive

* Add autorun to css layout effect

* Remove centric specific yarn.lock changes

* mild cleanup

* update from main

* add tests, example

* cleanup

* minor tweak to advanced example

* Update app.tsx

* Optimizations around events not being memoized

* Support className property on SVGContainer

* Add data-type to shape container to aid with external styling

* Fix classnames

* Fixes bug on text shapes / shapes with refs

* v1.1.9-beta.1

* v1.1.9-beta.2

* Drop mobx as a dependency for core

* v1.1.9-beta.3

* rename

* Revert "Drop mobx as a dependency for core"

This reverts commit 2d93f84a87.

* remove unused code from utils, move curve to separate package

* v1.1.9-beta.4

* Add pretty-quick

* Update package.json

* Renamings

Co-authored-by: Noah Shipley <nshipley@centricsoftware.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-28 10:05:40 +00:00
Steve Ruiz d13e25b5b0 Remove copy-files 2021-11-12 22:22:39 +00:00
Steve Ruiz 84a91ccc70 updates docs / readmes / adds contributor guide 2021-11-11 12:11:21 +00:00
Steve Ruiz a70cb145be don't minify 2021-11-06 16:09:38 +00:00
Steve Ruiz ec3dae085c
[improvement] repo, scripts (#220)
* Fix menu, cleanup package.json

* update changelog
2021-11-05 20:31:20 +00:00
Steve Ruiz fb77323ef2
[feature] filesystem + readonly (#218)
* Fix escape key for menu

* Adds filesystem support, readonly mode

* Move file system events to external hook

* Adds onSignIn callback, prevent event by default
2021-11-05 14:13:14 +00:00
Steve Ruiz 92e076fb3f update tracked, scripts 2021-11-04 13:16:26 +00:00
Steve Ruiz 0e477676c7 Update dependencies, mark external 2021-11-04 13:00:51 +00:00
Steve Ruiz e2369003c6
[improvement] UI (#215)
* move folders out of packages

* Remove custom yarn stuff, remove duplicate readme

* Remove stitches config

* Add README script.

* bump deps

* Fix script

* Update package.json

* rehauls UI

* further rehauls UI

* UI polish

* Update ToolButton.tsx

* Update ToolButton.tsx

* Bump license

* move tldraw to root

* Remove SW
2021-11-03 16:46:33 +00:00
Steve Ruiz b68a4681e1
[improvement] repo shuffle (#214)
* move folders out of packages

* Remove custom yarn stuff, remove duplicate readme

* Remove stitches config

* Add README script.

* bump deps

* Fix script

* Update package.json
2021-11-02 11:46:25 +00:00
Steve Ruiz 0cfc68b004
[feature] snapping (#168)
* defer cloning

* basic snapping

* Improves algorithm for snap points, rendering

* Improves snapping, snaplines

* Enables a clone to snap to its parent

* Adds overlay

* Fix overlay, zoom scaling for distance and speed
2021-10-18 14:30:42 +01:00
Steve Ruiz 826ed9a185
Fixes cleanup for new shapes on undo (#150)
* Fixes cleanup for new shapes on undo

* Fix streamline
2021-10-15 10:33:48 +01:00
Steve Ruiz 7808d6b75e Adds package sizes to build scripts 2021-09-12 14:05:13 +01:00
Steve Ruiz 7f0cfd2c5a Splits vectors and intersections into new packages
esbuild isn't currently tree shaking intersections, but that's a file where we could save some room
2021-09-12 13:21:44 +01:00
Steve Ruiz 183f9cd798 Write tests, slight tweaks to build / packages 2021-09-06 13:04:12 +01:00
Steve Ruiz f8c1b9ff4e manual bumps while I debug lerna 2021-09-05 12:19:08 +01:00
Steve Ruiz a1a213f9b4 Starts on groups, fixes duplicate bugs with bindings 2021-09-02 13:51:39 +01:00
Steve Ruiz 3e3c6d31e7 Fix scripts 2021-08-31 19:20:07 +01:00
Steve Ruiz 38114cde37 bumps canvas 2021-08-31 19:13:24 +01:00
Steve Ruiz f2ed16ff7e Fix build 2021-08-31 13:37:06 +01:00
Steve Ruiz 596762cec9 Update pre-dev.js 2021-08-30 21:20:41 +01:00
Steve Ruiz 8fe83ef6c3 Adds text again 2021-08-30 21:17:04 +01:00
Steve Ruiz c619ef0ec1 cleans up package.json, scripts 2021-08-30 19:10:30 +01:00
Steve Ruiz c35f82bdcf Fixes a few last points 2021-08-29 14:46:58 +01:00
Steve Ruiz 9e8e99cb6f Move state to rko 2021-08-29 14:33:43 +01:00
Steve Ruiz c3e6c55a68 Bumps perfect-freehand 2021-08-27 10:53:01 +01:00
Steve Ruiz b8f410b752 Adds react tests, build tsconfigs 2021-08-14 16:46:21 +01:00
Steve Ruiz 5998879e24 Replace 2021-08-10 17:12:55 +01:00