Canvas SDK reference

Every export of @internote/canvas-sdk, as the package declares it: the signature, what it is for, and the file it is written in. Generated from the declarations themselves, so a name here exists and a name that has changed says so.

@internote/canvas-sdk403 exports5 entry points

Build Internote canvas environments — the canvas.graph, canvas.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, the EnvironmentRegistry, 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 validate hook 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 LiveValueStore a 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.

#By area

An export is documented once, on the page for the job it does.

#Entry points

What an import from each one gets. 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
packages/canvas-sdk/src/index.ts
339
@internote/canvas-sdk/compile
packages/canvas-sdk/src/compile/index.ts
Documented under Compiling.
3
@internote/canvas-sdk/host
packages/canvas-sdk/src/host/index.ts
Documented under Host.
22
@internote/canvas-sdk/react
packages/canvas-sdk/src/react/index.ts
Documented under Drawing.
66
@internote/canvas-sdk/testing
packages/canvas-sdk/src/testing/index.ts
Documented under Testing.
13

#Passed on from Chalk

The root re-exports 27 names from @internote/chalk, so an environment reads a document’s tree without a second dependency. They are Chalk’s, documented with the language rather than here: chalkBindingOf, inlineItemsOf, isInlineContent, validateComplexExpression, validateParametrisedExpression, CHALK_BINDING_KEY, SYMBOL_NAMES, AttrSpec, CaseSpec, ChalkBinding, ChalkDataset, ChalkLibrary, ClassSpec, ComplexExpression, MicronodeSpec, NodeSpec, SwitchSpec, ChalkAttribute, ChalkDocument, ChalkElement, InlineItem, InlinePolicySpec, NodeContent, PolicySpec, SymbolName, TypeRefSpec, TypeSpec.

Last updated