Components
ModelJson.components.
// 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; absent falls
* back to `key` (`RecordView.ts`: "header = label (or key)").
*/
label?: string,
/**
* intent — `createComponent` (arg `data`) or `loadComponent` (arg `url`).
*/
method: ComponentMethod,
/**
* intent — `data` (the document) or `url` (an absolute https model document address).
*/
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
* model document the host resolves (`url`). 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, never stored
* (`ModelJson::document_type`): only `materials` filled → `Material`, only
* `patterns` filled → `Pattern` (a built-in-only `parameters` lane, e.g.
* `sizeX`, does not disqualify either), anything else → `Component`.
* A library is still a legal `components[]` entry — placing it yields an
* empty block, and its own records join the host
* (`graph::model::component_records`).
*/
export type DocumentType = "component" | "material" | "pattern";placeComponent/clone place a component, as chain producer steps grouped under the curve/mesh/block sections on Nodes.
📖 1 min read