Model - Nodes registry
API reference for src/schema/nodesRegistry on @huukhanhnguyen/model, reachable from ./nodes.
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
Fn
type
type Fn
// = (...args: unknown[]) => unknownNodeArgEntry
type
THE authored arg definition — one arg of a vocabulary/catalog method entry, with its display metadata as TYPED fields. This is the single shape the lane vocabularies (vocabulary/laneMethods.ts, vocabulary/cameras.ts) and the hand-written catalog entries (nodesRegistry/catalog.ts barrel) declare args with. Deliberately NOT the runtime contract: the registry's ArgDef (schema/registry.ts) carries display metadata in an opaque attributes bag instead — wiring.toArgDef packs label/tooltip/options/description into it, so the two layers can never drift.
type NodeArgEntry
// = {
key: string;
/** A TYPE_REGISTRY name (list suffix allowed, e.g. "string[]"). A union
* form (`color | vector`) reads "either shape is accepted". */
type: string;
default?: string;
min?: string;
max?: string;
step?: string;
label?: string;
tooltip?: string;
options?: string[];
description?: string;
/** Texture lane only: the text compiles PER PIXEL as `(u, v, t, k)`. */
formula?: true;
}NodeRegistryEntry
type
type NodeRegistryEntry
// = {
nodeType: "parameter" | "generator" | "modifier" | "document" | "camera" | "layer" | "material" | "style" | "textStyle" | "annotationStyle" | "view" | "skeleton" | "animation" | "table" | "texture";
namespace?: string;
method?: string;
/** Declared return type, when the wiring cannot infer it. A PRODUCER's
* return is the type of what it CREATES (its own tail), not the stream
* after it — see registry/contract.ts. Absent = wiring derives it
* (`entity[]` for transforms, the compute's own domain for producers). */
return?: string;
/** Friendly short identifier base for auto-generated node keys ("arc" for
* every arc generator, "array" for every array*) — the key a new
* node gets is `defaultKey` + a model-wide-unique increment. The full
* human name stays in `label`. */
defaultKey?: string;
label?: string;
/** Icon lookup key (packages/ui's NodeIcons.ts svg tables) when it differs
* from `method` — e.g. a renamed method reusing an old icon. Absent =
* UI falls back to `method` itself as the key. */
icon?: string;
shape?: "map" | "multiply" | "reduce" | "structural";
role?: "transform" | "prop";
tooltip?: string;
args?: NodeArgEntry[];
}