HeadlessHostOptions

What createHeadlessCanvasHost mounts and the services it hands each environment.

@internote/canvas-sdk/hostInterface
On this page
import { HeadlessHostOptions } from '@internote/canvas-sdk/host';

#Fields

assets
The document's uploaded image assets, file name to public URL, or null while the manifest is still arriving. Handed to each environment as ctx.assets.
Record<string, string> | null
authoring
Whether the document is open in its author's editor. A scene then says in words what it is waiting for; a reader gets a quieter sign.
boolean
clock
The clock the step controllers read, in milliseconds. A test passes a manual one.
() => number
continues
The host this one replaces for the SAME document, rebuilt because a file or asset manifest arrived. Each scene carries on its old step timeline rather than starting a fresh one, so the reader's animation goes on where it was. Absent, every timeline starts at its creation.
HeadlessCanvasHost | null
dataFetchedAt
When each URL dataset's response in files was fetched, by URL (D74), so a footer can say the data is a fixed copy and how old it is.
Record<string, string> | null
dataPending
The URLs whose responses are on their way, so a scene drawing one can say it is waiting.
readonly string[] | null
db
The durable store for environments declaring session+db. A store that keeps nothing when absent.
KeyValueStorage
documentRequired
The compiled and refined document. data holds the @data datasets: an inline dataset arrives with its columns and rows, an attached one with only a src file name, since the compiler does not inline an attachment's rows.
{ body?: unknown; data?: Record<string, ChalkDataset> }
environments
The environments to register before mounting. Registering the same definition object again is a no-op.
EnvironmentDefinition[]
files
The document's uploaded text files by name, where an attached dataset's CSV and a boundary .geojson are both found. Attached CSVs are folded into the datasets here; other files reach each environment as ctx.files.
Record<string, string> | null
internoteId
The document's id, the first part of every environment's session key.
string
Default'headless'
interpolations
How keyframed values blend. The shared built-in registry when absent; every environment's own interpolators are registered into it.
InterpolationRegistry
runner
The code execution service for environments that run programs. Running is unavailable when absent.
CodeRunner
seed
Session state to start from: another host's SessionStore.snapshot of the same document. Every environment and scene begins where it stood there — a switch thrown, a parameter moved — rather than at rest.
Readonly<Record<string, unknown>> | null
source
The chalk source, when available, which sharpens semantic diagnostics.
string
still
Draw a still picture: every environment's context says so, and nothing plays on its own. For an exported figure.
boolean

Declared in packages/canvas-sdk/src/host/headless.ts:51.

Last updated