Skip to main content

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 use resolves — first among your own workspace's components, then in the platform's published catalog. A component of yours with the same metadata.name takes precedence over the catalog's, and a use never 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 pinned version picks 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.