tldraw/apps/docs/scripts/functions
alex 3593799d9e
side effects reference docs & examples (#3258)
Adds reference docs, guide in the "Editor" article, and examples for the
side effects manager.

There are 4 new examples:
1. Before create/update shape - constrains shapes to be places within a
circle
2. Before delete shape - prevent red shapes from being deleted
3. After create/update shape - make sure there's only ever one red shape
on the page at a time
4. After delete shape - delete frames after their last child is deleted

As these examples all require fairly specific configurations of shapes
(or are hard to understand without some visual hinting in the case of
placing shapes within a circle), I've included a `createDemoShapes`
function in each of these which makes sure the examples start with
shapes that will quickly show you the side effects in action. I've kept
these separate from the main code (in a function at the bottom), so
hopefully that won't be a source of confusion to anyone working from
these examples.


### Change Type
- [x] `docs` — Changes to the documentation, examples, or templates.
- [x] `improvement` — Improving existing features
2024-03-26 18:38:19 +00:00
..
checkBrokenLinks.ts [docs] design shuffle (#2951) 2024-02-29 16:28:45 +00:00
connect.ts docs: rework docs site to have different sections (#2686) 2024-01-30 14:19:25 +00:00
createApiMarkdown.ts docs: fix missing API entries (#3111) 2024-03-12 13:36:24 +00:00
fetchApiSource.ts fix docs build (#3201) 2024-03-18 15:59:29 +00:00
fetchReleases.ts fix docs build (#3201) 2024-03-18 15:59:29 +00:00
generateApiContent.ts docs: rework docs site to have different sections (#2686) 2024-01-30 14:19:25 +00:00
generateContent.ts docs: rework docs site to have different sections (#2686) 2024-01-30 14:19:25 +00:00
generateExamplesContent.ts Add image annotator example (#3147) 2024-03-19 11:41:25 +00:00
generateSection.ts side effects reference docs & examples (#3258) 2024-03-26 18:38:19 +00:00
getApiMarkdown.ts [docs] design shuffle (#2951) 2024-02-29 16:28:45 +00:00
getVectorDbStats.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
package-list.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
refreshContent.ts docs: add full-text search (#2735) 2024-02-06 09:49:31 +00:00