tldraw/packages
alex 91903c9761
Move arrow helpers from editor to tldraw (#3721)
With the new work on bindings, we no longer need to keep any arrows
stuff hard-coded in `editor`, so let's move it to `tldraw` with the rest
of the shapes.

Couple other changes as part of this:
- We had two different types of `WeakMap` backed cache, but we now only
have one
- There's a new free-standing version of `createComputedCache` that
doesn't need access to the editor/store in order to create the cache.
instead, it returns a `{get(editor, id)}` object and instantiates the
cache on a per-editor basis for each call.
- Fixed a bug in `createSelectedComputedCache` where the selector
derivation would get re-created on every call to `get`

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Release Notes

#### Breaking changes
- `editor.getArrowInfo(shape)` has been replaced with
`getArrowInfo(editor, shape)`
- `editor.getArrowsBoundTo(shape)` has been removed. Instead, use
`editor.getBindingsToShape(shape, 'arrow')` and follow the `fromId` of
each binding to the corresponding arrow shape
- These types have moved from `@tldraw/editor` to `tldraw`:
    - `TLArcInfo`
    - `TLArrowInfo`
    - `TLArrowPoint`
- `WeakMapCache` has been removed
2024-05-09 09:48:01 +00:00
..
assets Fix missing icons (#3654) 2024-04-30 10:39:53 +00:00
dotcom-shared Move storing of snapshots to R2 (#3693) 2024-05-08 09:06:02 +00:00
editor Move arrow helpers from editor to tldraw (#3721) 2024-05-09 09:48:01 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state [signia] perf thing again (#3645) 2024-04-30 13:44:52 +00:00
store Move arrow helpers from editor to tldraw (#3721) 2024-05-09 09:48:01 +00:00
tldraw Move arrow helpers from editor to tldraw (#3721) 2024-05-09 09:48:01 +00:00
tlschema Bindings (#3326) 2024-05-08 12:37:31 +00:00
tlsync Bindings (#3326) 2024-05-08 12:37:31 +00:00
utils Move arrow helpers from editor to tldraw (#3721) 2024-05-09 09:48:01 +00:00
validate Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00