CanvasNodeSpec
A child element in an environment's vocabulary: the compiler's node spec, with attributes that may declare animatability.
@internote/canvas-sdkimport { CanvasNodeSpec } from '@internote/canvas-sdk';#Fields
aliasesOther identifiers source may write the node under.
string[]attributesThe element's attributes, keyed by canonical name.
Record<string, CanvasAttrSpec>bodyThe content policy of the node's body.
PolicySpecDefault
allclassesThe document classes the node may appear in; every class when omitted.
string[]delimiterFixed line-start delimiter (D11), e.g.
---.stringderivedRead-only computed attributes, keyed by name (§4).
Record<string, DerivedSpec>detailThe content policy of the node's detail.
PolicySpecDefault
nonedynamicPer-instance switches (D38).
SwitchSpec[]implicitThe attribute the head
:value slot supplies (D37) — a canonical name or an alias, stored canonical. WITHOUT it the construct has no : slot and image:photo.jpg is a parse error naming the (href: …) spelling. It must name a settable, non-derived attribute that no dynamic case withdraws. On a merge the tag is kept unless restated; null removes a primitive's.string | nullintroducesThe variable each instance introduces into its body (D68);
null withdraws a primitive's.IntroducesSpec | null#Example
vocabulary: {
point: { body: 'none', attributes: { x: { type: 'float' }, y: { type: 'float' } } },
}Declared in packages/canvas-sdk/src/environment/compile-spec.ts:47.