tldraw/packages/tlschema/src
alex da35f2bd75
Bindings (#3326)
First draft of the new bindings API. We'll follow this up with some API
refinements, tests, documentation, and examples.

Bindings are a new record type for establishing relationships between
two shapes so they can update at the same time.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `feature` — New feature

### Release Notes

#### Breaking changes
- The `start` and `end` properties on `TLArrowShape` no longer have
`type: point | binding`. Instead, they're always a point, which may be
out of date if a binding exists. To check for & retrieve arrow bindings,
use `getArrowBindings(editor, shape)` instead.
- `getArrowTerminalsInArrowSpace` must be passed a `TLArrowBindings` as
a third argument: `getArrowTerminalsInArrowSpace(editor, shape,
getArrowBindings(editor, shape))`
- The following types have been renamed:
    - `ShapeProps` -> `RecordProps`
    - `ShapePropsType` -> `RecordPropsType`
    - `TLShapePropsMigrations` -> `TLPropsMigrations`
    - `SchemaShapeInfo` -> `SchemaPropsInfo`

---------

Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com>
2024-05-08 12:37:31 +00:00
..
__tests__ Bindings (#3326) 2024-05-08 12:37:31 +00:00
assets Expose migrations, validators, and versions from tlschema (#3613) 2024-04-25 14:31:26 +00:00
bindings Bindings (#3326) 2024-05-08 12:37:31 +00:00
misc Expose migrations, validators, and versions from tlschema (#3613) 2024-04-25 14:31:26 +00:00
records Bindings (#3326) 2024-05-08 12:37:31 +00:00
shapes Bindings (#3326) 2024-05-08 12:37:31 +00:00
styles Separate text-align property for shapes (#3627) 2024-04-29 10:58:15 +00:00
translations Lokalise: Translations update (#3649) 2024-04-30 10:23:23 +00:00
createPresenceStateDerivation.ts New migrations again (#3220) 2024-04-15 12:53:42 +00:00
createTLSchema.ts Bindings (#3326) 2024-05-08 12:37:31 +00:00
index.ts Bindings (#3326) 2024-05-08 12:37:31 +00:00
migrations.test.ts Bindings (#3326) 2024-05-08 12:37:31 +00:00
recordsWithProps.ts Bindings (#3326) 2024-05-08 12:37:31 +00:00
store-migrations.ts New migrations again (#3220) 2024-04-15 12:53:42 +00:00
TLStore.ts [Snapping 1/5] Validation & strict types for fractional indexes (#2827) 2024-02-14 17:53:30 +00:00
util-types.ts hoist opacity out of props (#1526) 2023-06-06 16:15:12 +00:00