tldraw/apps
alex 87e3d60c90
rework canBind callback (#3797)
This PR reworks the `canBind` callback to work with customizable
bindings. It now accepts an object with a the shape, the other shape
(optional - it may not exist yet), the direction, and the type of the
binding. Devs can use this to create shapes that only participate in
certain binding types, can have bindings from but not to them, etc.

If you're implementing a binding, you can see if binding two shapes is
allowed using `editor.canBindShapes(fromShape, toShape, 'my binding
type')`

### Change Type

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

### Release Notes

#### Breaking changes
The `canBind` flag now accepts an options object instead of just the
shape in question. If you're relying on its arguments, you need to
change from `canBind(shape) {}` to `canBind({shape}) {}`.
2024-05-23 13:32:02 +00:00
..
apps-script google meet: add hardware whiteboard integration (#3765) 2024-05-20 14:52:05 +00:00
docs Fix markdown list rendering on docs site (#3813) 2024-05-23 13:00:22 +00:00
dotcom Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
dotcom-asset-upload Bump the npm_and_yarn group group with 7 updates (#2982) 2024-03-04 12:20:23 +00:00
dotcom-bookmark-extractor bump typescript / api-extractor (#2949) 2024-02-25 11:43:17 +00:00
dotcom-worker Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
examples rework canBind callback (#3797) 2024-05-23 13:32:02 +00:00
health-worker Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
huppy Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
vscode Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00