Canvas SDK
@internote/canvas-sdk is how an environment is written — the environments (graph, code, …) a scene’s canvas is built from. One definition covers both sides: the attributes and child vocabulary the compiler validates, and the surface, animation and chrome the reader sees.
@internote/canvas-sdkOn this page
Build Internote canvas environments — the graph, code, … a scene's canvas holds — and declare how the compiler reads them.
This is the package root, and it is React-free: everything here runs in a browser, on a server, in a build script or under node --test. It holds both halves of an environment that are not drawing:
- Defining and registering —
defineEnvironment,EnvironmentDefinition, theEnvironmentRegistry, and the declarations a definition carries: toolbar items, footer, storage tiers, plugin manifest. - The compile side — attribute and value types, the library builder, the refiner kit for parsing your own value types, and the semantic pass a
validatehook is written with. - Reading content — compiled documents, the node tree (
flatNodes,nodesOf,attrOf…), expressions, data columns, colours, text measurement, parameters, the reader's view. - Time — steps, cues, keyframe tracks and the per-environment
EnvironmentAnimationRuntime. - Live values — the
LiveValueStorea surface publishes computed numbers into and prose reads them from.
The other entry points:
@internote/canvas-sdk/react— what a surface is drawn with: the hooks, labels, maths, footer controls and chrome components.@internote/canvas-sdk/host— for an application embedding the canvas: the document host, the scene view and the adapters it is given.@internote/canvas-sdk/compile— the compile pipeline. Server only.@internote/canvas-sdk/testing— a headless host and a worked example.@internote/canvas-sdk/styles— the stylesheet, imported once.
The package depends on @internote/chalk, the language, for the compiled document's shapes, the expression grammar and the base vocabulary, and on React and KaTeX for the React entry points.
#By area
#Entry points
The root is React-free; @internote/canvas-sdk/react is the half that draws. @internote/canvas-sdk/styles is the stylesheet, imported once by the application, and exports nothing.
@internote/canvas-sdk@internote/canvas-sdk/compile@internote/canvas-sdk/host@internote/canvas-sdk/react@internote/canvas-sdk/testing