@mocanvas/mocanvas · function
declare function buildDefaultActionItems(editor: Editor): TLUiActionsContextTypeBuild the default action list for an editor.
Every menu, toolbar and shortcut in the default chrome renders from this
list rather than calling the editor directly, which is what makes
TLUiOverrides.actions a real override point: relabel an entry, rebind its
key or delete it and it changes — or disappears — everywhere at once.
## Why nothing here reads the editor
The list is built once per editor, not once per frame, so anything read
while building it would be frozen at that moment — an item marked
disabled because nothing was selected when the chrome mounted would stay
disabled forever. Availability is therefore *not* baked in: it is resolved
where it is rendered, by useActionState, which reads the editor
reactively. Everything below is either a constant or a closure.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.