@pixerate/editor 0.233.0 → 0.234.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,19 @@
1
1
  import type { HistoryManager } from '../history/HistoryManager.cjs';
2
+ import type { EditorAssetRegistry } from '../persistence/assets.cjs';
2
3
  import { type EditorDocument } from '../persistence/editorDocument.cjs';
3
- import type { CanvasScene, CanvasScenesStore } from './scenes.cjs';
4
+ import type { CanvasScene, CanvasScenesStore, CanvasViewport } from './scenes.cjs';
4
5
  import type { CanvasEdge, CanvasNode } from './types.cjs';
5
6
  /** What the document needs of an edge (React Flow's and Svelte Flow's edges fit). */
6
7
  export type CanvasEdgeLike = Pick<CanvasEdge, 'id' | 'source' | 'target'> & {
7
8
  selected?: boolean;
8
9
  };
9
- /** A canvas as it is saved: its nodes, edges and (with a scenes store) scenes. */
10
+ /** A canvas as it is saved: its nodes, edges, (with a scenes store) scenes and (with `getViewport`) the view. */
10
11
  export interface CanvasEditorDocument<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
11
12
  nodes: TNode[];
12
13
  edges: TEdge[];
13
14
  scenes?: CanvasScene[];
15
+ /** Where the canvas was looking when it was saved. */
16
+ viewport?: CanvasViewport;
14
17
  }
15
18
  export interface CanvasEditorDocumentOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
16
19
  getNodes: () => TNode[];
@@ -28,12 +31,54 @@ export interface CanvasEditorDocumentOptions<TNode extends CanvasNode = CanvasNo
28
31
  subscribe?: (listener: () => void) => () => void;
29
32
  /** Why the canvas cannot be changed (a sentence), or `false`. */
30
33
  readOnly?: () => string | false;
34
+ /**
35
+ * The view saved with the document and restored on load. Panning and zooming are not
36
+ * document changes: they do not bump the revision, so they alone do not trigger a save.
37
+ */
38
+ getViewport?: () => CanvasViewport;
39
+ setViewport?: (viewport: CanvasViewport) => void;
40
+ /** Node fields left out of the document, besides `selected`, `dragging`, `measured` and `resizing`. */
41
+ omitNodeKeys?: readonly string[];
42
+ /** Edge fields left out of the document, besides `selected`. */
43
+ omitEdgeKeys?: readonly string[];
44
+ /**
45
+ * Checks a node of a document being loaded, after the built-in checks. Return what is wrong
46
+ * (a sentence) to refuse the whole load, or nothing to accept the node.
47
+ */
48
+ validateNode?: (node: TNode, index: number) => string | void;
49
+ /**
50
+ * Turns any document handed to `loadDocument` (a raw one or a migrated file) into the current
51
+ * shape before it is checked, e.g. an older layout the host stored without a file envelope.
52
+ */
53
+ normalize?: (document: unknown) => unknown;
54
+ /** The host's format version of the document (default 1); files with an older one are migrated. */
55
+ formatVersion?: number;
56
+ /** `migrations[v]` turns a version `v` file's document into version `v + 1`. Only files carry a version. */
57
+ migrations?: Record<number, (document: unknown) => unknown>;
58
+ /**
59
+ * Keeps inline binary data in node and edge data (image data URLs, long base64) out of the
60
+ * document as asset references; autosave and the document store save the bytes with it.
61
+ */
62
+ assets?: EditorAssetRegistry;
63
+ }
64
+ /** What to leave out of canvas nodes and edges: the runtime fields plus the host's own. */
65
+ export interface CanvasDocumentOmitOptions {
66
+ omitNodeKeys?: readonly string[];
67
+ omitEdgeKeys?: readonly string[];
31
68
  }
69
+ /**
70
+ * A string that changes only when the saved part of the nodes or edges changes (not selection,
71
+ * measuring or the omitted fields). The React and Svelte document bindings compare it to count
72
+ * changes the history does not see.
73
+ */
74
+ export declare function canvasDocumentContentKey(nodes: readonly CanvasNode[], edges: readonly CanvasEdgeLike[], options?: CanvasDocumentOmitOptions): string;
32
75
  /**
33
76
  * The save / load / undo contract for a canvas whose nodes and edges live in the host (React
34
77
  * Flow or Svelte Flow state), kind `canvas`. The document is the nodes and edges without
35
- * selection or measurement, plus the scenes when a store is given. Recorded loads are one
36
- * undo step in the shared `history`; opening (`history: "reset"`) clears it.
78
+ * selection, measurement or `omitNodeKeys` / `omitEdgeKeys`, plus the scenes when a store is
79
+ * given and the viewport with `getViewport`. Loads are normalized, then checked (built-in
80
+ * checks, then `validateNode`) before anything changes. Recorded loads are one undo step in the
81
+ * shared `history`; opening (`history: "reset"`) clears it.
37
82
  */
38
83
  export declare function createCanvasEditorDocument<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: CanvasEditorDocumentOptions<TNode, TEdge>): EditorDocument<CanvasEditorDocument<TNode, TEdge>>;
39
84
  export interface CanvasGestureRecorderOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
@@ -1,16 +1,19 @@
1
1
  import type { HistoryManager } from '../history/HistoryManager.js';
2
+ import type { EditorAssetRegistry } from '../persistence/assets.js';
2
3
  import { type EditorDocument } from '../persistence/editorDocument.js';
3
- import type { CanvasScene, CanvasScenesStore } from './scenes.js';
4
+ import type { CanvasScene, CanvasScenesStore, CanvasViewport } from './scenes.js';
4
5
  import type { CanvasEdge, CanvasNode } from './types.js';
5
6
  /** What the document needs of an edge (React Flow's and Svelte Flow's edges fit). */
6
7
  export type CanvasEdgeLike = Pick<CanvasEdge, 'id' | 'source' | 'target'> & {
7
8
  selected?: boolean;
8
9
  };
9
- /** A canvas as it is saved: its nodes, edges and (with a scenes store) scenes. */
10
+ /** A canvas as it is saved: its nodes, edges, (with a scenes store) scenes and (with `getViewport`) the view. */
10
11
  export interface CanvasEditorDocument<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
11
12
  nodes: TNode[];
12
13
  edges: TEdge[];
13
14
  scenes?: CanvasScene[];
15
+ /** Where the canvas was looking when it was saved. */
16
+ viewport?: CanvasViewport;
14
17
  }
15
18
  export interface CanvasEditorDocumentOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
16
19
  getNodes: () => TNode[];
@@ -28,12 +31,54 @@ export interface CanvasEditorDocumentOptions<TNode extends CanvasNode = CanvasNo
28
31
  subscribe?: (listener: () => void) => () => void;
29
32
  /** Why the canvas cannot be changed (a sentence), or `false`. */
30
33
  readOnly?: () => string | false;
34
+ /**
35
+ * The view saved with the document and restored on load. Panning and zooming are not
36
+ * document changes: they do not bump the revision, so they alone do not trigger a save.
37
+ */
38
+ getViewport?: () => CanvasViewport;
39
+ setViewport?: (viewport: CanvasViewport) => void;
40
+ /** Node fields left out of the document, besides `selected`, `dragging`, `measured` and `resizing`. */
41
+ omitNodeKeys?: readonly string[];
42
+ /** Edge fields left out of the document, besides `selected`. */
43
+ omitEdgeKeys?: readonly string[];
44
+ /**
45
+ * Checks a node of a document being loaded, after the built-in checks. Return what is wrong
46
+ * (a sentence) to refuse the whole load, or nothing to accept the node.
47
+ */
48
+ validateNode?: (node: TNode, index: number) => string | void;
49
+ /**
50
+ * Turns any document handed to `loadDocument` (a raw one or a migrated file) into the current
51
+ * shape before it is checked, e.g. an older layout the host stored without a file envelope.
52
+ */
53
+ normalize?: (document: unknown) => unknown;
54
+ /** The host's format version of the document (default 1); files with an older one are migrated. */
55
+ formatVersion?: number;
56
+ /** `migrations[v]` turns a version `v` file's document into version `v + 1`. Only files carry a version. */
57
+ migrations?: Record<number, (document: unknown) => unknown>;
58
+ /**
59
+ * Keeps inline binary data in node and edge data (image data URLs, long base64) out of the
60
+ * document as asset references; autosave and the document store save the bytes with it.
61
+ */
62
+ assets?: EditorAssetRegistry;
63
+ }
64
+ /** What to leave out of canvas nodes and edges: the runtime fields plus the host's own. */
65
+ export interface CanvasDocumentOmitOptions {
66
+ omitNodeKeys?: readonly string[];
67
+ omitEdgeKeys?: readonly string[];
31
68
  }
69
+ /**
70
+ * A string that changes only when the saved part of the nodes or edges changes (not selection,
71
+ * measuring or the omitted fields). The React and Svelte document bindings compare it to count
72
+ * changes the history does not see.
73
+ */
74
+ export declare function canvasDocumentContentKey(nodes: readonly CanvasNode[], edges: readonly CanvasEdgeLike[], options?: CanvasDocumentOmitOptions): string;
32
75
  /**
33
76
  * The save / load / undo contract for a canvas whose nodes and edges live in the host (React
34
77
  * Flow or Svelte Flow state), kind `canvas`. The document is the nodes and edges without
35
- * selection or measurement, plus the scenes when a store is given. Recorded loads are one
36
- * undo step in the shared `history`; opening (`history: "reset"`) clears it.
78
+ * selection, measurement or `omitNodeKeys` / `omitEdgeKeys`, plus the scenes when a store is
79
+ * given and the viewport with `getViewport`. Loads are normalized, then checked (built-in
80
+ * checks, then `validateNode`) before anything changes. Recorded loads are one undo step in the
81
+ * shared `history`; opening (`history: "reset"`) clears it.
37
82
  */
38
83
  export declare function createCanvasEditorDocument<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: CanvasEditorDocumentOptions<TNode, TEdge>): EditorDocument<CanvasEditorDocument<TNode, TEdge>>;
39
84
  export interface CanvasGestureRecorderOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
@@ -11786,17 +11786,26 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
11786
11786
 
11787
11787
  // src/canvas/editorDocument.ts
11788
11788
  var RUNTIME_NODE_KEYS = ["selected", "dragging", "measured", "resizing"];
11789
- var stripNode = (node) => {
11790
- const copy = { ...node };
11791
- for (const key of RUNTIME_NODE_KEYS) delete copy[key];
11789
+ var RUNTIME_EDGE_KEYS = ["selected"];
11790
+ var omit = (value, keys) => {
11791
+ const copy = { ...value };
11792
+ for (const key of keys) delete copy[key];
11792
11793
  return copy;
11793
11794
  };
11794
- var stripEdge = (edge) => {
11795
- const { selected: _selected, ...rest } = edge;
11796
- return rest;
11795
+ var omitKeys = (options = {}) => ({
11796
+ node: [...RUNTIME_NODE_KEYS, ..._nullishCoalesce(options.omitNodeKeys, () => ( []))],
11797
+ edge: [...RUNTIME_EDGE_KEYS, ..._nullishCoalesce(options.omitEdgeKeys, () => ( []))]
11798
+ });
11799
+ function canvasDocumentContentKey(nodes, edges, options) {
11800
+ const keys = omitKeys(options);
11801
+ return JSON.stringify([nodes.map((n3) => omit(n3, keys.node)), edges.map((e) => omit(e, keys.edge))]);
11802
+ }
11803
+ var isViewport = (value) => {
11804
+ const v = value;
11805
+ return !!v && typeof v === "object" && [v.x, v.y, v.zoom].every((n3) => typeof n3 === "number" && Number.isFinite(n3)) && v.zoom > 0;
11797
11806
  };
11798
11807
  function checkCanvasDocument(document2) {
11799
- const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes? } as get_canvas_document returns it.";
11808
+ const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes?, viewport? } as get_canvas_document returns it.";
11800
11809
  const value = document2;
11801
11810
  if (!value || typeof value !== "object" || !Array.isArray(value.nodes)) throw new Error(`nodes must be an array. ${hint}`);
11802
11811
  if (!Array.isArray(value.edges)) throw new Error(`edges must be an array. ${hint}`);
@@ -11819,25 +11828,42 @@ function checkCanvasDocument(document2) {
11819
11828
  }
11820
11829
  });
11821
11830
  if (value.scenes !== void 0 && !Array.isArray(value.scenes)) throw new Error(`scenes must be an array. ${hint}`);
11831
+ if (value.viewport !== void 0 && !isViewport(value.viewport)) throw new Error(`viewport must be { x, y, zoom } with finite numbers and a zoom above 0. ${hint}`);
11822
11832
  }
11823
11833
  function createCanvasEditorDocument(options) {
11824
11834
  const { history, scenes: scenes2 } = options;
11835
+ const keys = omitKeys(options);
11825
11836
  const snapshot = () => ({
11826
- nodes: options.getNodes().map(stripNode),
11827
- edges: options.getEdges().map(stripEdge),
11828
- ...scenes2 ? { scenes: scenes2.toJSON().scenes } : {}
11837
+ nodes: options.getNodes().map((n3) => omit(n3, keys.node)),
11838
+ edges: options.getEdges().map((e) => omit(e, keys.edge)),
11839
+ ...scenes2 ? { scenes: scenes2.toJSON().scenes } : {},
11840
+ ...options.getViewport ? { viewport: { ...options.getViewport() } } : {}
11829
11841
  });
11830
11842
  const apply = (doc) => {
11831
11843
  options.setNodes(doc.nodes.map((n3) => ({ ...n3 })));
11832
11844
  options.setEdges(doc.edges.map((e) => ({ ...e })));
11833
11845
  if (scenes2) scenes2.load(_nullishCoalesce(doc.scenes, () => ( [])));
11846
+ if (doc.viewport) _optionalChain([options, 'access', _508 => _508.setViewport, 'optionalCall', _509 => _509({ ...doc.viewport })]);
11847
+ };
11848
+ const check = (document2) => {
11849
+ checkCanvasDocument(document2);
11850
+ const next = document2;
11851
+ if (options.validateNode) {
11852
+ next.nodes.forEach((node, i) => {
11853
+ const problem = options.validateNode(node, i);
11854
+ if (problem) throw new Error(`Node "${node.id}" (nodes[${i}]): ${problem}`);
11855
+ });
11856
+ }
11857
+ return next;
11834
11858
  };
11835
11859
  return _chunkSJ2CPTQCcjs.defineEditorDocument.call(void 0, {
11836
11860
  kind: "canvas",
11861
+ formatVersion: options.formatVersion,
11862
+ migrations: options.migrations,
11863
+ assets: options.assets,
11837
11864
  get: snapshot,
11838
11865
  load: (document2, { history: mode }) => {
11839
- checkCanvasDocument(document2);
11840
- const next = document2;
11866
+ const next = check(options.normalize ? options.normalize(document2) : document2);
11841
11867
  if (mode === "record") {
11842
11868
  const before = snapshot();
11843
11869
  history.execute({ name: "Load canvas", execute: () => apply(next), undo: () => apply(before) });
@@ -11862,8 +11888,8 @@ function createCanvasEditorDocument(options) {
11862
11888
  }
11863
11889
  function createCanvasGestureRecorder(options) {
11864
11890
  let before = null;
11865
- const take = () => ({ nodes: options.getNodes(), edges: _optionalChain([options, 'access', _508 => _508.getEdges, 'optionalCall', _509 => _509()]) });
11866
- const key = (s) => JSON.stringify([s.nodes.map(stripNode), _optionalChain([s, 'access', _510 => _510.edges, 'optionalAccess', _511 => _511.map, 'call', _512 => _512(stripEdge)])]);
11891
+ const take = () => ({ nodes: options.getNodes(), edges: _optionalChain([options, 'access', _510 => _510.getEdges, 'optionalCall', _511 => _511()]) });
11892
+ const key = (s) => canvasDocumentContentKey(s.nodes, _nullishCoalesce(s.edges, () => ( [])));
11867
11893
  const restore = (s) => {
11868
11894
  options.setNodes(s.nodes);
11869
11895
  if (s.edges && options.setEdges) options.setEdges(s.edges);
@@ -11995,8 +12021,8 @@ function createCanvasExplosionStateController(options = {}) {
11995
12021
  clearTimer();
11996
12022
  const previous = snapshot.activeId;
11997
12023
  set({ activeId: nodeId, collapsingId: null });
11998
- if (previous !== null) _optionalChain([options, 'access', _513 => _513.onCollapse, 'optionalCall', _514 => _514(previous)]);
11999
- _optionalChain([options, 'access', _515 => _515.onExplode, 'optionalCall', _516 => _516(nodeId)]);
12024
+ if (previous !== null) _optionalChain([options, 'access', _512 => _512.onCollapse, 'optionalCall', _513 => _513(previous)]);
12025
+ _optionalChain([options, 'access', _514 => _514.onExplode, 'optionalCall', _515 => _515(nodeId)]);
12000
12026
  return true;
12001
12027
  };
12002
12028
  const collapse = (nodeId) => {
@@ -12005,7 +12031,7 @@ function createCanvasExplosionStateController(options = {}) {
12005
12031
  if (active === null || nodeId !== void 0 && nodeId !== active) return false;
12006
12032
  clearTimer();
12007
12033
  set({ activeId: null, collapsingId: active });
12008
- _optionalChain([options, 'access', _517 => _517.onCollapse, 'optionalCall', _518 => _518(active)]);
12034
+ _optionalChain([options, 'access', _516 => _516.onCollapse, 'optionalCall', _517 => _517(active)]);
12009
12035
  if (duration === 0) finishCollapse();
12010
12036
  else timer = setTimeout(() => {
12011
12037
  timer = null;
@@ -12066,7 +12092,7 @@ function canvasExplosionToolTarget(state, options) {
12066
12092
  var READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
12067
12093
  var WRITE_IDEMPOTENT = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
12068
12094
  var labelOf = (node) => {
12069
- const label = _nullishCoalesce(_optionalChain([node, 'access', _519 => _519.data, 'optionalAccess', _520 => _520.label]), () => ( _optionalChain([node, 'access', _521 => _521.data, 'optionalAccess', _522 => _522.name])));
12095
+ const label = _nullishCoalesce(_optionalChain([node, 'access', _518 => _518.data, 'optionalAccess', _519 => _519.label]), () => ( _optionalChain([node, 'access', _520 => _520.data, 'optionalAccess', _521 => _521.name])));
12070
12096
  return typeof label === "string" && label !== "" ? label : void 0;
12071
12097
  };
12072
12098
  function createCanvasExplosionToolProvider(target, options = {}) {
@@ -12079,7 +12105,7 @@ function createCanvasExplosionToolProvider(target, options = {}) {
12079
12105
  if (ok === true) return null;
12080
12106
  return typeof ok === "string" && ok ? ok : `Node "${node.id}" has nothing to explode into.`;
12081
12107
  };
12082
- const state = () => ({ exploded: [...target.exploded()], collapsing: [..._nullishCoalesce(_optionalChain([target, 'access', _523 => _523.collapsing, 'optionalCall', _524 => _524()]), () => ( []))] });
12108
+ const state = () => ({ exploded: [...target.exploded()], collapsing: [..._nullishCoalesce(_optionalChain([target, 'access', _522 => _522.collapsing, 'optionalCall', _523 => _523()]), () => ( []))] });
12083
12109
  const findNode = (id) => {
12084
12110
  const node = target.getNodes().find((n3) => n3.id === id);
12085
12111
  if (!node) throw new Error(`No node "${id}" on the canvas. Call list_explodable_nodes for node ids.`);
@@ -12692,4 +12718,5 @@ function createCanvasExplosionToolProvider(target, options = {}) {
12692
12718
 
12693
12719
 
12694
12720
 
12695
- exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkM5GLQQWGcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkM5GLQQWGcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_MISSING_PATTERN = CANVAS_EFFECT_MISSING_PATTERN; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunkT7QSEKDYcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkEL4PSKFTcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkEL4PSKFTcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkEL4PSKFTcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = _chunkEL4PSKFTcjs.LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = _chunkEL4PSKFTcjs.LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkM5GLQQWGcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = _chunkEL4PSKFTcjs.alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = _chunkEL4PSKFTcjs.applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.arrowGesture = _chunkT7QSEKDYcjs.arrowGesture; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkEL4PSKFTcjs.boundsOf; exports.bracketGesture = _chunkT7QSEKDYcjs.bracketGesture; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkV3L7U63Ncjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.calculateReflowDisplacement = calculateReflowDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasEffectErrorReason = canvasEffectErrorReason; exports.canvasEffectStatus = canvasEffectStatus; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasExplosionToolTarget = canvasExplosionToolTarget; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkEL4PSKFTcjs.centerNodes; exports.centre = _chunkEL4PSKFTcjs.centre; exports.checkGesture = _chunkT7QSEKDYcjs.checkGesture; exports.circleGesture = _chunkT7QSEKDYcjs.circleGesture; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeCanvasExplosionLayout = computeCanvasExplosionLayout; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkM5GLQQWGcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEditorDocument = createCanvasEditorDocument; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasExplosionStateController = createCanvasExplosionStateController; exports.createCanvasExplosionToolProvider = createCanvasExplosionToolProvider; exports.createCanvasGestureRecorder = createCanvasGestureRecorder; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasPlaybackLocator = createCanvasPlaybackLocator; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = _chunkEL4PSKFTcjs.createNodeLookup; exports.crossGesture = _chunkT7QSEKDYcjs.crossGesture; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = _chunkEL4PSKFTcjs.distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkEL4PSKFTcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkEL4PSKFTcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkM5GLQQWGcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.explosionEdgeId = explosionEdgeId; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkEL4PSKFTcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk4ZC5QJE2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.gestureEdgePoint = _chunkT7QSEKDYcjs.gestureEdgePoint; exports.gestureRandom = _chunkT7QSEKDYcjs.gestureRandom; exports.gestureSeed = _chunkT7QSEKDYcjs.gestureSeed; exports.gestureUnion = _chunkT7QSEKDYcjs.gestureUnion; exports.getAbsolutePosition = _chunkEL4PSKFTcjs.getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getBrushedShapeSvg = _chunkV3L7U63Ncjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkEL4PSKFTcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkEL4PSKFTcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = _chunkEL4PSKFTcjs.getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = _chunkEL4PSKFTcjs.getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkM5GLQQWGcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = _chunkEL4PSKFTcjs.invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkM5GLQQWGcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkV3L7U63Ncjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = _chunkEL4PSKFTcjs.isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkV3L7U63Ncjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkV3L7U63Ncjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = _chunkEL4PSKFTcjs.lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunkT7QSEKDYcjs.matchArrangeShortcut; exports.matchSize = _chunkEL4PSKFTcjs.matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk4ZC5QJE2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.nodeSizeOf = nodeSizeOf; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkM5GLQQWGcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk4ZC5QJE2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkEL4PSKFTcjs.overlaps; exports.pageHidden = _chunkM5GLQQWGcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk4ZC5QJE2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkV3L7U63Ncjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkEL4PSKFTcjs.placeBeside; exports.placeInView = _chunkEL4PSKFTcjs.placeInView; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkV3L7U63Ncjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = _chunkEL4PSKFTcjs.readStyleSize; exports.realClock = _chunkM5GLQQWGcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkV3L7U63Ncjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkV3L7U63Ncjs.renderShapeBrushstroke; exports.reorderNodes = _chunkEL4PSKFTcjs.reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk4ZC5QJE2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strikeGesture = _chunkT7QSEKDYcjs.strikeGesture; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = _chunkEL4PSKFTcjs.toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.underlineGesture = _chunkT7QSEKDYcjs.underlineGesture; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = _chunkEL4PSKFTcjs.unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkV3L7U63Ncjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkV3L7U63Ncjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = _chunkEL4PSKFTcjs.withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkM5GLQQWGcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
12721
+
12722
+ exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkM5GLQQWGcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkM5GLQQWGcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_MISSING_PATTERN = CANVAS_EFFECT_MISSING_PATTERN; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunkT7QSEKDYcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkEL4PSKFTcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkEL4PSKFTcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkEL4PSKFTcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = _chunkEL4PSKFTcjs.LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = _chunkEL4PSKFTcjs.LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkM5GLQQWGcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = _chunkEL4PSKFTcjs.alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = _chunkEL4PSKFTcjs.applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.arrowGesture = _chunkT7QSEKDYcjs.arrowGesture; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkEL4PSKFTcjs.boundsOf; exports.bracketGesture = _chunkT7QSEKDYcjs.bracketGesture; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkV3L7U63Ncjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.calculateReflowDisplacement = calculateReflowDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasDocumentContentKey = canvasDocumentContentKey; exports.canvasEffectErrorReason = canvasEffectErrorReason; exports.canvasEffectStatus = canvasEffectStatus; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasExplosionToolTarget = canvasExplosionToolTarget; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkEL4PSKFTcjs.centerNodes; exports.centre = _chunkEL4PSKFTcjs.centre; exports.checkGesture = _chunkT7QSEKDYcjs.checkGesture; exports.circleGesture = _chunkT7QSEKDYcjs.circleGesture; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeCanvasExplosionLayout = computeCanvasExplosionLayout; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkM5GLQQWGcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEditorDocument = createCanvasEditorDocument; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasExplosionStateController = createCanvasExplosionStateController; exports.createCanvasExplosionToolProvider = createCanvasExplosionToolProvider; exports.createCanvasGestureRecorder = createCanvasGestureRecorder; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasPlaybackLocator = createCanvasPlaybackLocator; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = _chunkEL4PSKFTcjs.createNodeLookup; exports.crossGesture = _chunkT7QSEKDYcjs.crossGesture; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = _chunkEL4PSKFTcjs.distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkEL4PSKFTcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkEL4PSKFTcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkM5GLQQWGcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.explosionEdgeId = explosionEdgeId; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkEL4PSKFTcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk4ZC5QJE2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.gestureEdgePoint = _chunkT7QSEKDYcjs.gestureEdgePoint; exports.gestureRandom = _chunkT7QSEKDYcjs.gestureRandom; exports.gestureSeed = _chunkT7QSEKDYcjs.gestureSeed; exports.gestureUnion = _chunkT7QSEKDYcjs.gestureUnion; exports.getAbsolutePosition = _chunkEL4PSKFTcjs.getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getBrushedShapeSvg = _chunkV3L7U63Ncjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkEL4PSKFTcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkEL4PSKFTcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = _chunkEL4PSKFTcjs.getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = _chunkEL4PSKFTcjs.getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkM5GLQQWGcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = _chunkEL4PSKFTcjs.invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkM5GLQQWGcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkV3L7U63Ncjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = _chunkEL4PSKFTcjs.isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkV3L7U63Ncjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkV3L7U63Ncjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = _chunkEL4PSKFTcjs.lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunkT7QSEKDYcjs.matchArrangeShortcut; exports.matchSize = _chunkEL4PSKFTcjs.matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk4ZC5QJE2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.nodeSizeOf = nodeSizeOf; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkM5GLQQWGcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk4ZC5QJE2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkEL4PSKFTcjs.overlaps; exports.pageHidden = _chunkM5GLQQWGcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk4ZC5QJE2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkV3L7U63Ncjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkEL4PSKFTcjs.placeBeside; exports.placeInView = _chunkEL4PSKFTcjs.placeInView; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkV3L7U63Ncjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = _chunkEL4PSKFTcjs.readStyleSize; exports.realClock = _chunkM5GLQQWGcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkV3L7U63Ncjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkV3L7U63Ncjs.renderShapeBrushstroke; exports.reorderNodes = _chunkEL4PSKFTcjs.reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk4ZC5QJE2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strikeGesture = _chunkT7QSEKDYcjs.strikeGesture; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = _chunkEL4PSKFTcjs.toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.underlineGesture = _chunkT7QSEKDYcjs.underlineGesture; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = _chunkEL4PSKFTcjs.unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkV3L7U63Ncjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkV3L7U63Ncjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = _chunkEL4PSKFTcjs.withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkM5GLQQWGcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
@@ -11786,17 +11786,26 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
11786
11786
 
11787
11787
  // src/canvas/editorDocument.ts
11788
11788
  var RUNTIME_NODE_KEYS = ["selected", "dragging", "measured", "resizing"];
11789
- var stripNode = (node) => {
11790
- const copy = { ...node };
11791
- for (const key of RUNTIME_NODE_KEYS) delete copy[key];
11789
+ var RUNTIME_EDGE_KEYS = ["selected"];
11790
+ var omit = (value, keys) => {
11791
+ const copy = { ...value };
11792
+ for (const key of keys) delete copy[key];
11792
11793
  return copy;
11793
11794
  };
11794
- var stripEdge = (edge) => {
11795
- const { selected: _selected, ...rest } = edge;
11796
- return rest;
11795
+ var omitKeys = (options = {}) => ({
11796
+ node: [...RUNTIME_NODE_KEYS, ...options.omitNodeKeys ?? []],
11797
+ edge: [...RUNTIME_EDGE_KEYS, ...options.omitEdgeKeys ?? []]
11798
+ });
11799
+ function canvasDocumentContentKey(nodes, edges, options) {
11800
+ const keys = omitKeys(options);
11801
+ return JSON.stringify([nodes.map((n3) => omit(n3, keys.node)), edges.map((e) => omit(e, keys.edge))]);
11802
+ }
11803
+ var isViewport = (value) => {
11804
+ const v = value;
11805
+ return !!v && typeof v === "object" && [v.x, v.y, v.zoom].every((n3) => typeof n3 === "number" && Number.isFinite(n3)) && v.zoom > 0;
11797
11806
  };
11798
11807
  function checkCanvasDocument(document2) {
11799
- const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes? } as get_canvas_document returns it.";
11808
+ const hint = "A canvas document is { nodes: [{ id, position: { x, y }, data }], edges: [{ id, source, target }], scenes?, viewport? } as get_canvas_document returns it.";
11800
11809
  const value = document2;
11801
11810
  if (!value || typeof value !== "object" || !Array.isArray(value.nodes)) throw new Error(`nodes must be an array. ${hint}`);
11802
11811
  if (!Array.isArray(value.edges)) throw new Error(`edges must be an array. ${hint}`);
@@ -11819,25 +11828,42 @@ function checkCanvasDocument(document2) {
11819
11828
  }
11820
11829
  });
11821
11830
  if (value.scenes !== void 0 && !Array.isArray(value.scenes)) throw new Error(`scenes must be an array. ${hint}`);
11831
+ if (value.viewport !== void 0 && !isViewport(value.viewport)) throw new Error(`viewport must be { x, y, zoom } with finite numbers and a zoom above 0. ${hint}`);
11822
11832
  }
11823
11833
  function createCanvasEditorDocument(options) {
11824
11834
  const { history, scenes: scenes2 } = options;
11835
+ const keys = omitKeys(options);
11825
11836
  const snapshot = () => ({
11826
- nodes: options.getNodes().map(stripNode),
11827
- edges: options.getEdges().map(stripEdge),
11828
- ...scenes2 ? { scenes: scenes2.toJSON().scenes } : {}
11837
+ nodes: options.getNodes().map((n3) => omit(n3, keys.node)),
11838
+ edges: options.getEdges().map((e) => omit(e, keys.edge)),
11839
+ ...scenes2 ? { scenes: scenes2.toJSON().scenes } : {},
11840
+ ...options.getViewport ? { viewport: { ...options.getViewport() } } : {}
11829
11841
  });
11830
11842
  const apply = (doc) => {
11831
11843
  options.setNodes(doc.nodes.map((n3) => ({ ...n3 })));
11832
11844
  options.setEdges(doc.edges.map((e) => ({ ...e })));
11833
11845
  if (scenes2) scenes2.load(doc.scenes ?? []);
11846
+ if (doc.viewport) options.setViewport?.({ ...doc.viewport });
11847
+ };
11848
+ const check = (document2) => {
11849
+ checkCanvasDocument(document2);
11850
+ const next = document2;
11851
+ if (options.validateNode) {
11852
+ next.nodes.forEach((node, i) => {
11853
+ const problem = options.validateNode(node, i);
11854
+ if (problem) throw new Error(`Node "${node.id}" (nodes[${i}]): ${problem}`);
11855
+ });
11856
+ }
11857
+ return next;
11834
11858
  };
11835
11859
  return defineEditorDocument({
11836
11860
  kind: "canvas",
11861
+ formatVersion: options.formatVersion,
11862
+ migrations: options.migrations,
11863
+ assets: options.assets,
11837
11864
  get: snapshot,
11838
11865
  load: (document2, { history: mode }) => {
11839
- checkCanvasDocument(document2);
11840
- const next = document2;
11866
+ const next = check(options.normalize ? options.normalize(document2) : document2);
11841
11867
  if (mode === "record") {
11842
11868
  const before = snapshot();
11843
11869
  history.execute({ name: "Load canvas", execute: () => apply(next), undo: () => apply(before) });
@@ -11863,7 +11889,7 @@ function createCanvasEditorDocument(options) {
11863
11889
  function createCanvasGestureRecorder(options) {
11864
11890
  let before = null;
11865
11891
  const take = () => ({ nodes: options.getNodes(), edges: options.getEdges?.() });
11866
- const key = (s) => JSON.stringify([s.nodes.map(stripNode), s.edges?.map(stripEdge)]);
11892
+ const key = (s) => canvasDocumentContentKey(s.nodes, s.edges ?? []);
11867
11893
  const restore = (s) => {
11868
11894
  options.setNodes(s.nodes);
11869
11895
  if (s.edges && options.setEdges) options.setEdges(s.edges);
@@ -12273,6 +12299,7 @@ export {
12273
12299
  canCombineShapeNodes,
12274
12300
  canOffsetShapeNodes,
12275
12301
  canOutlineShapeNodeStrokes,
12302
+ canvasDocumentContentKey,
12276
12303
  canvasEffectErrorReason,
12277
12304
  canvasEffectStatus,
12278
12305
  canvasEffectsPool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.233.0",
3
+ "version": "0.234.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -172,6 +172,9 @@ refuse.
172
172
  | `remove_shot_layer` | Remove a layer. |
173
173
  | `set_shot_transition` | Set the transition into a shot from the one before (a provider effect with use `transition`, its `ms`, `preset`, `values`). Not on the first shot. Returns the transition with `start` / `end`. |
174
174
  | `clear_shot_transition` | Remove a shot's transition, so it cuts (or the camera eases) again. |
175
+ | `list_templates` | List the provider's sequence templates (`query`, `tags`): ids, names, shot counts, lengths. Returns `available: false` without templates. Call before `describe_template`. |
176
+ | `describe_template` | Read a template's slots (type, label, default, limits), its `valuesSchema` and `exampleValues`. Call before `fill_template`. |
177
+ | `fill_template` | Fill a template (`template`, `values`, `name`, `mode` replace or append) and load its shots as one undo step. Every value that does not fit is refused at once. Returns the new `shots`, `layers`, `openSlots` and `notes`. |
175
178
 
176
179
  ### Save and open
177
180
 
@@ -228,6 +231,13 @@ Flair's scenes do:
228
231
  `layer-not-drawn` and `transition-not-played` (no provider: effect layers are left out and
229
232
  transitions crossfade).
230
233
 
234
+ A provider's **sequence templates** are whole scenes of such shots with slots to fill (a
235
+ product reveal, before and after, a stat countdown): `list_templates`, `describe_template`, then
236
+ `fill_template` with `values` (start from `exampleValues`). `mode` replace (default) makes a new
237
+ scene the size of the template's stage; append adds its shots after yours, scaled to the
238
+ artwork. Titles and captions become overlay word layers. Fill the `openSlots` it reports with
239
+ `update_shot_layer` (`subject`), then animate artwork over the shots as usual.
240
+
231
241
  Layers are pixels: the Flair `SvgMotion` export leaves them out. Use them for backgrounds, looks
232
242
  and titles, and keep what should animate node by node in the artwork.
233
243
 
@@ -68,6 +68,8 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
68
68
  | A set length | `fit_animation` with `seconds`, `keep` for fixed shots |
69
69
  | The camera travels to the next part | `update_shot` camera `frame`, then `set_shot_camera_move` role `transition` (a glide; a whip pan for energy) |
70
70
  | A slow push while a shot holds | `set_shot_camera_move` role `hold` (a Ken Burns drift), with a longer `hold` |
71
+ | A background, look or title behind or over a shot | `add_shot_layer` (a generator for a background, an overlay or title over it); `set_shot_transition` between shots |
72
+ | A whole ready-made sequence (a reveal, a countdown) | `list_templates`, `describe_template`, `fill_template` (mode append keeps your shots), then animate artwork over it |
71
73
 
72
74
  ## Recipes
73
75
 
@@ -98,6 +100,8 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
98
100
  - `edit_animation`: several edits as one undo step
99
101
  - `fit_animation`, `set_animation_settings`, `get_timing_grid`: length, settings and cues
100
102
  - `list_camera_moves`, `set_shot_camera_move`: provider camera moves into and during a shot
103
+ - `add_shot_layer`, `set_shot_transition`: provider effect layers and transitions on shots
104
+ - `list_templates`, `describe_template`, `fill_template`: a provider's sequence template as shots
101
105
  - `check_animation`, `get_motion_path`, `render_animation_frame`: check and look
102
106
  - `export_lottie`, `export_flair_motion`: deliver
103
107
  - `undo_animation`: take back a step
@@ -168,12 +168,12 @@ the reason (for example a variant combination that already exists, or a cycle).
168
168
 
169
169
  ### Save and open
170
170
 
171
- The host may add the shared document tools (see `pixerate-agent-tools`). A canvas document is `{ nodes, edges, scenes }`: every node (`id`, `position`, `data`, `type`, `parentId`...) and edge without selection or measurement, plus the saved scenes.
171
+ The host may add the shared document tools (see `pixerate-agent-tools`). A canvas document is `{ nodes, edges, scenes, viewport }`: every node (`id`, `position`, `data`, `type`, `parentId`...) and edge without selection, measurement or the fields the host leaves out, plus the saved scenes and, when the host saves it, the `viewport` (`{ x, y, zoom }`) the canvas was looking at. Large inline images in node data may come back as `pixerate-asset:` references: pass them back unchanged, they are only valid in this session.
172
172
 
173
173
  | Tool | Use |
174
174
  | --- | --- |
175
175
  | `get_canvas_document` | Take a copy of the whole canvas as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the canvas, use `get_editor_state`: it is smaller and says more. Refuses very large canvases. |
176
- | `load_canvas_document` | Put back a copy from `get_canvas_document` (its `document`, or the whole result). Checked first: duplicate ids, edges to missing nodes and parents that do not exist are refused and nothing changes. One undo step (`undo_canvas` brings the previous canvas back). To add or change a few nodes use `canvas_add_node` / `canvas_update_node`. |
176
+ | `load_canvas_document` | Put back a copy from `get_canvas_document` (its `document`, or the whole result). Checked first: duplicate ids, edges to missing nodes, parents that do not exist, a bad `viewport` and anything the host's own node check rejects (the error names the node and says why) are refused and nothing changes. A `viewport` in the document moves the view; leave it out to keep the current view. One undo step (`undo_canvas` brings the previous canvas back). To add or change a few nodes use `canvas_add_node` / `canvas_update_node`. |
177
177
  | `undo_canvas` | Undo the last canvas change (one tool call, command or user gesture such as a drag). Returns `undone` (the step's name) and whether more can be undone. Fails with "Nothing to undo." when there is nothing. |
178
178
  | `redo_canvas` | Redo the last undone canvas change. |
179
179
  | `save_canvas_document` | Save the canvas under a `name` in the host's storage (the same name replaces that copy). Returns the `key`. Only listed when the host has storage. Save when the user asks, not after every edit. |
@@ -89,6 +89,14 @@ the pitfalls, and uses the tools below.
89
89
  plays across the rest of the clip at `framing` (a Ken Burns drift on a still). The moves are
90
90
  baked into the clip's x, y, scale and rotation keys at the project's fps, two keys at a cut,
91
91
  so the preview and exports play them without the provider. Check with `get_video_frame`.
92
+ 13. **Sequence templates** (a provider with templates): for a ready-made opening, reveal or
93
+ countdown, `list_templates`, then `describe_template` for its slots, then `fill_template`
94
+ with `values` (start from its `exampleValues`) and `at`. It lands on new tracks above the
95
+ others as one undo step: each shot's bottom layer on a base track carrying the shot's
96
+ transition, other layers as effect, picture and text clips by role. Open slots come back as
97
+ grey placeholder clips (`placeholders`); put the real picture over one with
98
+ `add_video_asset` and `add_video_clip` in `overwrite` mode. Camera moves are not carried
99
+ over: add them with `set_clip_camera_move`.
92
100
 
93
101
  ## Best practices
94
102
 
@@ -302,6 +310,9 @@ and every write tool is refused with the reason.
302
310
  | `list_video_camera_moves` | List the provider's camera moves for a `role` (`transition` into a clip, `hold` across it) with `durationMs` and `cut`. Returns `available: false` without camera moves. Call before `set_clip_camera_move`. |
303
311
  | `set_clip_camera_move` | Play a camera move on a clip's picture (`clip`, `role`, `move`, `ms` for a transition, `preset`, `values`, `from` and `framing` as `{ zoom, x, y }`): baked into its transform keys, one per frame, two at a cut. Returns the camera, key counts, `cuts`, `windows` and `notes` (tilt, turn and blur cannot be baked). Refuses a clip keyed by hand. |
304
312
  | `clear_clip_camera_move` | Remove a clip's move for a `role` and re-bake the other; with none left the transform goes back to what it was. |
313
+ | `list_templates` | List the provider's sequence templates (`query`, `tags`): ids, names, shot counts, lengths. Returns `available: false` without templates. Call before `describe_template`. |
314
+ | `describe_template` | Read a template's slots (type, label, default, limits), its `valuesSchema` and `exampleValues`. Call before `fill_template`. |
315
+ | `fill_template` | Fill a template (`template`, `values`, `name`, `at` ms) and put it on new tracks at `at` as one undo step. Every value that does not fit is refused at once. Returns the new `tracks`, `clips`, `assets`, `start`, `end`, `placeholders` by open slot, and `notes`. |
305
316
 
306
317
  ### Save and open
307
318
 
@@ -66,6 +66,7 @@ music track and cutting to them, see `pixerate-bgm-alignment`.
66
66
  | A section change | Dip to black or a held shot, then a new rhythm |
67
67
  | Continuity of motion | Cut on action (`roll_video_edit` onto the movement) |
68
68
  | Photos in a slideshow | Image assets, a slow push-in: with a provider that has camera moves, `set_clip_camera_move` role `hold` (a Ken Burns drift) on each photo; otherwise `set_video_keyframes` scale 1 to 1.08 |
69
+ | An opening or closing sequence the provider has as a template | `list_templates`, `describe_template`, then `fill_template` with `at` the start; put the real pictures over its placeholders |
69
70
 
70
71
  ## Recipes
71
72
 
@@ -97,4 +98,5 @@ start: 0, duration: <sequence>, fadeOut: 2000 }`; `update_video_clip` on the las
97
98
  - `set_video_transition`: crossfades and dips
98
99
  - `update_video_clip`, `set_video_keyframes`: fades, volume and push-ins
99
100
  - `list_video_camera_moves`, `set_clip_camera_move`: provider camera moves (a drift across a photo)
101
+ - `list_templates`, `describe_template`, `fill_template`: a provider's sequence template as clips on new tracks
100
102
  - `undo_video`: take back a step