ViewerUpdate
Defined in: src/types/index.ts:868
Diagram content a running interactive viewer can swap in, without rebuilding the
surrounding document. Produced by generateViewerUpdate, and matches the shape
ViewerHandle.setContent (in sfn-diagram/renderers) expects.
Properties
Section titled “Properties”contentHtml
Section titled “contentHtml”contentHtml: string;Defined in: src/types/index.ts:870
Markup for the viewer’s data-sfn="content" node, from buildViewerContent.
edgeData
Section titled “edgeData”edgeData: Record<string, ViewerEdge>;Defined in: src/types/index.ts:873
Viewer-facing detail for each edge, keyed by edge id.
hasCollapsedView
Section titled “hasCollapsedView”hasCollapsedView: boolean;Defined in: src/types/index.ts:876
Whether contentHtml embeds a second, collapsed view behind a toggle.
metadata
Section titled “metadata”metadata: object;Defined in: src/types/index.ts:879
Metadata about the rendered diagram (the expanded view’s, when both are shipped).
edgeCount
Section titled “edgeCount”edgeCount: number;Number of edges (transitions) in the diagram
nodeCount
Section titled “nodeCount”nodeCount: number;Number of state nodes in the diagram
relayoutModel?
Section titled “relayoutModel?”optional relayoutModel?: RelayoutModel;Defined in: src/types/index.ts:886
The model for per-container collapse, present when rendered with
relayout: true and the diagram has something to collapse. Pass it to
ViewerHandle.setContent alongside contentHtml.
stateData
Section titled “stateData”stateData: Record<string, AslState>;Defined in: src/types/index.ts:889
Raw ASL for each state, keyed by state name.