Nesting & Pipeline
Nesting & safety
Components can use other components. The composer resolves recursively up to 8 levels deep, baking scoped data at each level.
- Where a
useresolves — first among your own workspace's components, then in the platform's published catalog. A component of yours with the samemetadata.nametakes precedence over the catalog's, and ausenever reaches another workspace. - Circular detection — the composer tracks visited handles and rejects cycles (
A → B → A). - One name, several components — when more than one of your components carries the same
metadata.name, a pinnedversionpicks the one with that version; without a pin, the highest version wins, and between equal versions the most recently saved. Give each component its own name unless it is a new version of the same one.
Composition pipeline
1. The document loads
2. Every `use` resolves (recursively, depth-limited) — configuration merges,
per-use data is baked in, section styles are stamped, content assembles
3. Remaining $data / $item tokens resolve with the caller's data
4. Globals ($global.PAGE, …) resolve and the final PDF / DOCX renders
Composition runs before the global data pass, so components can carry $data references that resolve with the caller's data.