Expand description
Where the editor is looking: the chain of blocks descended into, the scope that chain resolves to, and what that scope holds.
Structs§
- Block
Path - The blocks descended into, outermost first. The scope being edited is the last segment; an empty path is the document root, which is a scope like any other.
Enums§
- Resolved
- What a scope reference resolves to.
Absent— a block id the document no longer holds live — is a third answer, and the compiler makes every caller say which of the three it means. - Scope
- A scope holds shapes: either the document root, or a block. The root has
no entity — it is never locked, never deleted, never renamed — so it is a
variant, not a sentinel id (
docs/type-level-invariants.md). - Structure
- Whether a block holds blocks of its own — the fact the navigator hangs a disclosure triangle on, the PDF cuts a page for, and the canvas draws a second, inset border for.
Functions§
- child_
blocks - The blocks
scopeholds, in the document’s one draw order. The single definition of “a scope’s children, ordered”: the drawing surface, the navigator tree, and the command palette all read it here, so a scope cannot present its contents in two orders. - resolve
- Resolve
scopeagainst the document: the one definition of “is this the root, a live block, or nothing”. - structure
- The single definition of “does this block open a scope”, so those three cannot answer it differently. One index probe and no allocation — every drawn block and every visible navigator row asks it each frame.
- tree_
root - The scope the document hangs from — its designated top block, or the document root while there is none (the root is a scope like any other, and a fresh boot has no top block). The navigator’s tree, the PDF’s first page and the canvas’s outermost frame all start here.