CanvasNodeSpec

A child element in an environment's vocabulary: the compiler's node spec, with attributes that may declare animatability.

@internote/canvas-sdkInterface
On this page
import { CanvasNodeSpec } from '@internote/canvas-sdk';

#Fields

aliases
Other identifiers source may write the node under.
string[]
attributes
The element's attributes, keyed by canonical name.
Record<string, CanvasAttrSpec>
body
The content policy of the node's body.
PolicySpec
Defaultall
classes
The document classes the node may appear in; every class when omitted.
string[]
delimiter
Fixed line-start delimiter (D11), e.g. ---.
string
derived
Read-only computed attributes, keyed by name (§4).
Record<string, DerivedSpec>
detail
The content policy of the node's detail.
PolicySpec
Defaultnone
dynamic
Per-instance switches (D38).
SwitchSpec[]
implicit
The 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 | null
introduces
The 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.

Last updated