This PR adds a `meta` property to shapes and other records.
It adds it to:
- asset
- camera
- document
- instance
- instancePageState
- instancePresence
- page
- pointer
- rootShape
## Setting meta
This data can generally be added wherever you would normally update the
corresponding record.
An exception exists for shapes, which can be updated using a partial of
the `meta` in the same way that we update shapes with a partial of
`props`.
```ts
this.updateShapes([{
id: myShape.id,
type: "geo",
meta: {
nemesis: "steve",
special: true
}
])
```
## `Editor.getInitialMetaForShape`
The `Editor.getInitialMetaForShape` method is kind of a hack to set the
initial meta property for newly created shapes. You can set it
externally. Escape hatch!
### Change Type
- [x] `minor` — New feature
### Test Plan
todo
- [ ] Unit Tests (todo)
### Release Notes
- todo
This PR fixes some links to the API in the docs.
It's part 2 of two PRs related to simplifying the paths of our API
reference.
This first one is https://github.com/tldraw/brivate/pull/2128
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Test Plan
1. On the docs site...
2. Go to the Editor page...
3. Click on the links to the Editor API reference.
4. Make sure they take you to the right place.
- [ ] Unit Tests
- [ ] End to end tests
### Release Notes
- Documentation: Simplified links to the API reference.
This PR restores some changes that were lost during the docs move from
bublic to brivate.
This is part 1 of two PRs. The second one is
https://github.com/tldraw/brivate/pull/2124
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- None (Docs internals)
This PR removes the skeleton Embeds page.
While we're here, do we also want to remove the skeleton Persistence
page (would it fit somewhere else? or nah?)
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Test Plan
1. On the docs site...
2. Make sure that there's no 'Embeds' page in the menu.
- [ ] Unit Tests
- [ ] End to end tests
### Release Notes
- Documentation: Removed unused Embeds page.
This PR adds a table of contents to the Editor docs page.
The Editor page is quite long, with different sections. I think that
some contents at the top will make it slightly more approachable &
usable for now.
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- Documentation: Added a table of contents to the Editor page.
---------
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>