CanvasLayout
A scene's canvas split into its environments, its blank-canvas content and the split's arrangement.
@internote/canvas-sdk/hostOn this page
import { CanvasLayout } from '@internote/canvas-sdk/host';#Fields
blankThe blank-canvas content: every detail element outside the canvas nodes, in source order.
CompiledNode[]directionThe split's arrangement as declared, meaningful only with two environments. Pass it through
resolveSplitDirection for the concrete axis, since auto is not an axis.autohorizontalverticalenvironmentsThe environments in primacy order: none, one or two.
CompiledNode[]gridWhere the environments came from a
grid node: how many panes it holds and the columns: it wrote, if any — the columns themselves are settled at render, against the canvas's shape (gridColumns). Null for a scene that writes none, whose environments are a split.{ count: number; declared: unknown } | nullitemsEvery detail element in source order, tagged with its kind: what a render host draws from. The two lists below are the same nodes sorted into their kinds; only this list remembers that the author wrote a table above the graph rather than below it.
CanvasLayoutItem[]ratioThe first environment's share over the second's. 1 when the scene declares none.
numberDeclared in packages/canvas-sdk/src/host/layout.ts:62.