Components
ModelJson.components. An ordinary keyed node lane: each entry is a ComponentNode, createComponent carrying a whole document inline or loadComponent naming a platform id the host resolves lazily.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Argument } from "./Argument.js";
import type { ComponentMethod } from "./ComponentMethod.js";
/**
* A `components[]` entry: a keyed lane node whose value is a whole
* `ModelJson` placed by `placeComponent(key)`. That document's own
* `components` lane is its private scope.
*/
export type ComponentNode = {
/**
* identity — unique in the document's one key namespace, every lane; `placeComponent.component` names it.
*/
key: string,
/**
* intent — editor-chrome display name, printed verbatim.
*/
label?: string,
/**
* intent — `createComponent` (arg `data`) or `loadComponent` (arg `id`).
*/
method: ComponentMethod,
/**
* intent — `data` (the document) or `id` (a platform model id).
*/
args?: Array<Argument>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* The two components-lane methods, a closed pair: `createComponent` holds
* the component document inline (`data`), `loadComponent` names a
* platform model the host resolves (`id`). Both evaluate to a `ModelJson`.
*/
export type ComponentMethod = "createComponent" | "loadComponent";// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* What a document is, read off which lanes it fills
* (`ModelJson::document_type`) — never stored.
*/
export type DocumentType = "component" | "material" | "pattern";DocumentType is never stored: ModelJson::document_type reads it off the lanes a document fills (only materials → material, only patterns → pattern, anything else → component), and a library cannot be placed.
Evaluating either method yields the same thing, a whole ModelJson document — exactly like mesh(data) returns its Mesh. placeComponent/clone place one, as chain producer steps whose own context is curve/mesh/block (crates/model/src/catalog/instance.rs) — grouped under those data-kind sections on Nodes, not duplicated here. objects inside a placed component's document follow the same NODE LAW as a root object; its own components lane is its private lexical scope, never hoisted into the host's (COMPONENT LAW).