@pixerate/editor 0.27.0 → 0.29.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.
Files changed (112) hide show
  1. package/README.md +44 -2
  2. package/dist/HistoryManager-DWSLd6Tf.d.ts +150 -0
  3. package/dist/HistoryManager-DeQQMBCj.d.cts +150 -0
  4. package/dist/agent/index.cjs +20 -427
  5. package/dist/agent/index.cjs.map +1 -1
  6. package/dist/agent/index.d.cts +4 -342
  7. package/dist/agent/index.d.ts +4 -342
  8. package/dist/agent/index.js +14 -421
  9. package/dist/agent/index.js.map +1 -1
  10. package/dist/animation/index.cjs +62 -0
  11. package/dist/animation/index.cjs.map +1 -0
  12. package/dist/animation/index.d.cts +226 -0
  13. package/dist/animation/index.d.ts +226 -0
  14. package/dist/animation/index.js +62 -0
  15. package/dist/animation/index.js.map +1 -0
  16. package/dist/{builtins-nMXh9sT3.d.cts → builtins-DxC3aUR2.d.cts} +2 -2
  17. package/dist/{builtins-haN82vjT.d.ts → builtins-NGxNxQfJ.d.ts} +2 -2
  18. package/dist/canvas/index.cjs +177 -743
  19. package/dist/canvas/index.cjs.map +1 -1
  20. package/dist/canvas/index.d.cts +6 -289
  21. package/dist/canvas/index.d.ts +6 -289
  22. package/dist/canvas/index.js +49 -615
  23. package/dist/canvas/index.js.map +1 -1
  24. package/dist/chunk-36BLROHV.js +438 -0
  25. package/dist/chunk-36BLROHV.js.map +1 -0
  26. package/dist/{chunk-JT7AXQTE.js → chunk-3RPOW4CS.js} +7 -7
  27. package/dist/{chunk-AGR7EVRW.cjs → chunk-6MDQKHRH.cjs} +6 -6
  28. package/dist/{chunk-AGR7EVRW.cjs.map → chunk-6MDQKHRH.cjs.map} +1 -1
  29. package/dist/chunk-A6PHCAGX.cjs +87 -0
  30. package/dist/chunk-A6PHCAGX.cjs.map +1 -0
  31. package/dist/{chunk-HRMEDT2L.js → chunk-D6AVOTSD.js} +6 -85
  32. package/dist/chunk-D6AVOTSD.js.map +1 -0
  33. package/dist/{chunk-ARRTP33I.js → chunk-D6S5M7HV.js} +2 -2
  34. package/dist/{chunk-ARRTP33I.js.map → chunk-D6S5M7HV.js.map} +1 -1
  35. package/dist/{chunk-6IO7WUSU.js → chunk-DDADOHJW.js} +17 -17
  36. package/dist/{chunk-CPOKFNBG.cjs → chunk-I6BZB5ZH.cjs} +2 -2
  37. package/dist/{chunk-CPOKFNBG.cjs.map → chunk-I6BZB5ZH.cjs.map} +1 -1
  38. package/dist/{chunk-4BVP64JJ.cjs → chunk-K2UYKJ6M.cjs} +24 -103
  39. package/dist/chunk-K2UYKJ6M.cjs.map +1 -0
  40. package/dist/chunk-PIIAZV3L.cjs +244 -0
  41. package/dist/chunk-PIIAZV3L.cjs.map +1 -0
  42. package/dist/chunk-PWJARCI4.js +637 -0
  43. package/dist/chunk-PWJARCI4.js.map +1 -0
  44. package/dist/{chunk-G2I4QJOT.cjs → chunk-QKLRAA4T.cjs} +3 -244
  45. package/dist/chunk-QKLRAA4T.cjs.map +1 -0
  46. package/dist/{chunk-2H7ZHPEJ.js → chunk-QVZZGT4X.js} +1 -242
  47. package/dist/chunk-QVZZGT4X.js.map +1 -0
  48. package/dist/chunk-TGD52FEZ.js +87 -0
  49. package/dist/chunk-TGD52FEZ.js.map +1 -0
  50. package/dist/chunk-TTYCN6ZH.cjs +637 -0
  51. package/dist/chunk-TTYCN6ZH.cjs.map +1 -0
  52. package/dist/{chunk-YK5TATOF.cjs → chunk-U7VGDSNY.cjs} +3 -3
  53. package/dist/{chunk-YK5TATOF.cjs.map → chunk-U7VGDSNY.cjs.map} +1 -1
  54. package/dist/chunk-V7CC7RZ6.cjs +438 -0
  55. package/dist/chunk-V7CC7RZ6.cjs.map +1 -0
  56. package/dist/chunk-YK57D7PW.js +244 -0
  57. package/dist/chunk-YK57D7PW.js.map +1 -0
  58. package/dist/commands/index.cjs +2 -2
  59. package/dist/commands/index.cjs.map +1 -1
  60. package/dist/commands/index.d.cts +2 -2
  61. package/dist/commands/index.d.ts +2 -2
  62. package/dist/commands/index.js +1 -1
  63. package/dist/commands/index.js.map +1 -1
  64. package/dist/easing-B6iAnJHk.d.cts +74 -0
  65. package/dist/easing-B6iAnJHk.d.ts +74 -0
  66. package/dist/extensions/index.cjs +5 -5
  67. package/dist/extensions/index.cjs.map +1 -1
  68. package/dist/extensions/index.js +4 -4
  69. package/dist/generation/index.cjs +4 -4
  70. package/dist/generation/index.cjs.map +1 -1
  71. package/dist/generation/index.js +3 -3
  72. package/dist/generation/index.js.map +1 -1
  73. package/dist/history/index.cjs +4 -2
  74. package/dist/history/index.cjs.map +1 -1
  75. package/dist/history/index.d.cts +3 -149
  76. package/dist/history/index.d.ts +3 -149
  77. package/dist/history/index.js +5 -3
  78. package/dist/image-editor/index.cjs.map +1 -1
  79. package/dist/image-editor/index.js.map +1 -1
  80. package/dist/index.cjs +24 -22
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.cts +3 -2
  83. package/dist/index.d.ts +3 -2
  84. package/dist/index.js +112 -110
  85. package/dist/index.js.map +1 -1
  86. package/dist/parameters/index.cjs +1283 -0
  87. package/dist/parameters/index.cjs.map +1 -0
  88. package/dist/parameters/index.d.cts +595 -0
  89. package/dist/parameters/index.d.ts +595 -0
  90. package/dist/parameters/index.js +1283 -0
  91. package/dist/parameters/index.js.map +1 -0
  92. package/dist/spreadsheet/index.cjs +4 -4
  93. package/dist/spreadsheet/index.cjs.map +1 -1
  94. package/dist/spreadsheet/index.js +8 -8
  95. package/dist/tokens/index.cjs +4 -2
  96. package/dist/tokens/index.cjs.map +1 -1
  97. package/dist/tokens/index.js +6 -4
  98. package/dist/tools/index.cjs +31 -0
  99. package/dist/tools/index.cjs.map +1 -0
  100. package/dist/tools/index.d.cts +343 -0
  101. package/dist/tools/index.d.ts +343 -0
  102. package/dist/tools/index.js +31 -0
  103. package/dist/tools/index.js.map +1 -0
  104. package/dist/{types-GT5a5YAX.d.cts → types-DsiXGmjo.d.cts} +1 -1
  105. package/dist/{types-GT5a5YAX.d.ts → types-DsiXGmjo.d.ts} +1 -1
  106. package/package.json +16 -1
  107. package/dist/chunk-2H7ZHPEJ.js.map +0 -1
  108. package/dist/chunk-4BVP64JJ.cjs.map +0 -1
  109. package/dist/chunk-G2I4QJOT.cjs.map +0 -1
  110. package/dist/chunk-HRMEDT2L.js.map +0 -1
  111. /package/dist/{chunk-JT7AXQTE.js.map → chunk-3RPOW4CS.js.map} +0 -0
  112. /package/dist/{chunk-6IO7WUSU.js.map → chunk-DDADOHJW.js.map} +0 -0
@@ -1,7 +1,11 @@
1
1
  import { R as Rect, b as CanvasNode, X as XYPosition, c as CanvasEdge, I as IncrementalLayoutOptions, S as Side, d as CanvasLayoutOptions, P as PlaceBesideOptions, T as TrajectoryFunction, F as FanOutTrajectoryOptions, N as NodeTransition, e as CanvasNodeStyle, f as ReflowDisplacementOptions, g as DirectionalDisplacementOptions, h as CanvasClipboardPayload, i as CanvasNodeUpdate, j as NodeRectOptions, k as Position, l as Point, A as AlignEdge, m as AlignNodesOptions, D as DistributeAxis, a as DistributeMode, n as DistributeNodesOptions, o as SizeDimension, M as MatchSizeOptions, Z as ZOrderOperation, C as CanvasArrangeAction } from '../arrange-BICutYPk.js';
2
2
  export { p as ArrangeShortcutBinding, q as CanvasDockingCallbacks, r as CollapseNodeOptions, s as DEFAULT_ARRANGE_SHORTCUTS, t as DisplacementDirection, u as DockStrategy, E as ExplodeNodeOptions, v as ExplosionSnapshot, G as GraphDifferences, L as LOCKED_DATA_KEY, w as LOCKED_PREVIOUS_FLAGS_KEY, x as TrajectoryPoint, y as alignNodes, z as applyNodeUpdates, B as createNodeLookup, H as distributeNodes, J as getAbsolutePosition, K as getNodeRect, O as getNodeSize, Q as invertNodeUpdates, U as isLocked, V as lockNodes, W as matchArrangeShortcut, Y as matchSize, _ as readStyleSize, $ as reorderNodes, a0 as toggleLockNodes, a1 as unlockNodes, a2 as withStyleSize } from '../arrange-BICutYPk.js';
3
- import { C as Command, M as MergedExecutionOptions } from '../types-GT5a5YAX.js';
3
+ import { Clock, AnimationValueType, AnimationValue, AnimationTrack, AnimationLoopMode, AnimationPlayerState, AnimationPlayer } from '../animation/index.js';
4
+ export { ANIMATION_TIME_EPSILON, AnimationKeyframe, AnimationPlayerOptions, ManualClock, OklabColor, createAnimationPlayer, evaluateTrack, formatOklab, interpolateAnimationValue, isAnimationKeyframe, mixColorsOklab, normalizeKeyframes, oklabToRgb, pageHidden, parseOklab, realClock, rgbToOklab, wrapAnimationTime } from '../animation/index.js';
5
+ import { C as Command, M as MergedExecutionOptions } from '../types-DsiXGmjo.js';
4
6
  import { d as TokenModeContext, r as TokenType, o as TokenScope, f as TokenLiteral, c as TokenVariable, e as TokenResolution, T as TokenState } from '../model-C1zApQM8.js';
7
+ import { A as AnimationEasing } from '../easing-B6iAnJHk.js';
8
+ export { a as ANIMATION_EASING_LABELS, b as ANIMATION_EASING_PRESETS, c as AnimationEasingPreset, C as CUBIC_BEZIER_PRESETS, d as CubicBezierEasing, S as SpringEasing, e as cubicBezierAt, f as easingFromInfluence, g as easingLabel, h as easingToCss, i as evaluateEasing, j as isAnimationEasing, p as parseCssEasing, r as resolveEasing, s as springAt } from '../easing-B6iAnJHk.js';
5
9
 
6
10
  declare const DEFAULT_NODE_WIDTH = 200;
7
11
  declare const DEFAULT_NODE_HEIGHT = 60;
@@ -63,54 +67,6 @@ declare function placeBeside(rects: Record<string, Rect>, size: {
63
67
  height: number;
64
68
  }, side: Side, nearNodeId?: string, options?: PlaceBesideOptions): XYPosition;
65
69
 
66
- /**
67
- * The time source that canvas animations and agent performances play on.
68
- *
69
- * Defaults to `realClock` (requestAnimationFrame and setTimeout).
70
- * A `ManualClock` moves only when told to via `advance(ms)` or `tick(fps)`,
71
- * enabling deterministic frame-by-frame stepping for testing, video generation,
72
- * or headless server environments.
73
- */
74
- interface Clock {
75
- /** Current time in milliseconds. */
76
- now(): number;
77
- /** Resolves on the next animation frame. */
78
- frame(): Promise<void>;
79
- /** Resolves after `ms` milliseconds of this clock's time. */
80
- sleep(ms: number): Promise<void>;
81
- /**
82
- * Whether the clock follows wall time. Live clocks stop or degrade when the
83
- * tab is in the background (browsers pause animation frames), so transitions
84
- * can commit immediately rather than leaving operations hanging.
85
- */
86
- readonly live: boolean;
87
- }
88
- /** Whether the browser tab is hidden (where RAF pauses). */
89
- declare const pageHidden: () => boolean;
90
- /** Real-time clock using requestAnimationFrame and setTimeout. */
91
- declare const realClock: Clock;
92
- /**
93
- * A deterministic clock that only moves forward when `advance` or `tick` is called.
94
- * Allows step-by-step frame testing and video rendering without waiting for real time.
95
- */
96
- declare class ManualClock implements Clock {
97
- readonly live = false;
98
- private time;
99
- private frames;
100
- private sleepers;
101
- private seq;
102
- constructor(start?: number);
103
- now(): number;
104
- frame(): Promise<void>;
105
- sleep(ms: number): Promise<void>;
106
- /** Whether any frames or sleep timers are currently pending. */
107
- get pending(): boolean;
108
- /** Advances time by `ms`, resolving due sleep timers in order, followed by queued frames. */
109
- advance(ms: number): Promise<void>;
110
- /** Convenience method to advance by 1 frame at a given fps (default: 60fps = 16.67ms). */
111
- tick(fps?: number): Promise<void>;
112
- }
113
-
114
70
  /**
115
71
  * Standard cubic ease-out function (pure math, framework-agnostic).
116
72
  */
@@ -2300,111 +2256,6 @@ declare function detachTokenBindings<TNode extends CanvasNode>(nodes: readonly T
2300
2256
  */
2301
2257
  declare function pruneCanvasTokenModes<TNode extends CanvasNode>(nodes: readonly TNode[], state: TokenState): TNode[];
2302
2258
 
2303
- /**
2304
- * Keyframe easing: the curve a segment follows from one keyframe to the next.
2305
- *
2306
- * - `hold` keeps the first keyframe's value until the next one (a step).
2307
- * - `linear` and the CSS presets (`ease`, `ease-in`, `ease-out`, `ease-in-out`) are
2308
- * CSS-compatible `cubic-bezier()` curves; `{ type: 'cubic-bezier', x1, y1, x2, y2 }` is any
2309
- * such curve (x1 / y1 is the leaving keyframe's out handle, x2 / y2 the next one's in handle).
2310
- * - `spring` is a damped spring settling on the next value (it may overshoot).
2311
- */
2312
- /** Named easing presets. */
2313
- type AnimationEasingPreset = 'linear' | 'hold' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-back' | 'ease-out-back' | 'spring';
2314
- interface CubicBezierEasing {
2315
- type: 'cubic-bezier';
2316
- x1: number;
2317
- y1: number;
2318
- x2: number;
2319
- y2: number;
2320
- }
2321
- interface SpringEasing {
2322
- type: 'spring';
2323
- /** Spring stiffness (default 170). */
2324
- stiffness?: number;
2325
- /** Damping (default 26). */
2326
- damping?: number;
2327
- /** Mass (default 1). */
2328
- mass?: number;
2329
- /** Initial velocity in units of the segment's value change per second (default 0). */
2330
- velocity?: number;
2331
- }
2332
- type AnimationEasing = AnimationEasingPreset | CubicBezierEasing | SpringEasing;
2333
- /** Preset names, in picker order. */
2334
- declare const ANIMATION_EASING_PRESETS: readonly AnimationEasingPreset[];
2335
- /** Picker labels for the presets. */
2336
- declare const ANIMATION_EASING_LABELS: Readonly<Record<AnimationEasingPreset, string>>;
2337
- /** The CSS control points of the bezier presets (CSS Easing Functions Level 1 values for the CSS keywords). */
2338
- declare const CUBIC_BEZIER_PRESETS: Readonly<Record<string, readonly [number, number, number, number]>>;
2339
- /**
2340
- * Solves a CSS `cubic-bezier(x1, y1, x2, y2)` for y at progress x (Newton steps with a
2341
- * bisection fallback). x1 / x2 are clamped to 0–1 as CSS requires.
2342
- */
2343
- declare function cubicBezierAt(x1: number, y1: number, x2: number, y2: number, x: number): number;
2344
- /**
2345
- * Normalised position of a damped spring released from 0 towards 1, `seconds` after release.
2346
- * Closed form for under-, critically and over-damped springs.
2347
- */
2348
- declare function springAt(spring: Omit<SpringEasing, 'type'>, seconds: number): number;
2349
- /** Resolves an easing to a cubic-bezier, spring or hold descriptor (unknown input → linear). */
2350
- declare function resolveEasing(easing: AnimationEasing | string | undefined | null): CubicBezierEasing | Required<SpringEasing> | 'hold';
2351
- /**
2352
- * Eased progress for linear progress `u` (0–1) through a segment lasting `durationMs`
2353
- * (springs depend on real time; other curves ignore it). `hold` returns 0 until `u` reaches 1.
2354
- */
2355
- declare function evaluateEasing(easing: AnimationEasing | string | undefined | null, u: number, durationMs?: number): number;
2356
- /**
2357
- * The easing filmcraft (and Premiere) derive from temporal "influence" handles: flat handles of
2358
- * the given influences (0.01–1, default 1/3) on the leaving and arriving keyframe.
2359
- */
2360
- declare function easingFromInfluence(outInfluence?: number, inInfluence?: number): CubicBezierEasing;
2361
- /**
2362
- * Parses a CSS easing (`linear`, `ease…`, `cubic-bezier(…)`, `steps(1, end)` / `step-end` →
2363
- * hold) or a preset name. Returns `null` for anything else.
2364
- */
2365
- declare function parseCssEasing(text: string): AnimationEasing | null;
2366
- /** Whether a value is a usable easing (preset name, CSS easing string or descriptor). */
2367
- declare function isAnimationEasing(value: unknown): value is AnimationEasing;
2368
- /**
2369
- * The CSS `animation-timing-function` for an easing: a keyword or `cubic-bezier()`,
2370
- * `steps(1, end)` for hold, and a sampled `linear(…)` for springs over `durationMs`.
2371
- */
2372
- declare function easingToCss(easing: AnimationEasing | string | undefined | null, durationMs?: number, samples?: number): string;
2373
- /** Short label for an easing (a preset's label, or `Custom` / `Spring`). */
2374
- declare function easingLabel(easing: AnimationEasing | undefined | null): string;
2375
-
2376
- /**
2377
- * Colour interpolation in OKLab (Björn Ottosson's perceptual space, as CSS Color 4 uses for
2378
- * `color-mix(in oklab, …)`), with premultiplied alpha so a fade to `transparent` does not
2379
- * darken through black.
2380
- */
2381
- interface OklabColor {
2382
- /** Lightness, 0–1. */
2383
- l: number;
2384
- a: number;
2385
- b: number;
2386
- /** Alpha, 0–1. */
2387
- alpha: number;
2388
- }
2389
- /** sRGB channels (0–1) to OKLab. */
2390
- declare function rgbToOklab(r: number, g: number, b: number, alpha?: number): OklabColor;
2391
- /** OKLab to sRGB channels (0–1, clamped into gamut). */
2392
- declare function oklabToRgb(color: OklabColor): {
2393
- r: number;
2394
- g: number;
2395
- b: number;
2396
- a: number;
2397
- };
2398
- /** Parses a CSS colour (hex, `rgb()` / `rgba()`, `transparent`, `black`, `white`) to OKLab, or `null`. */
2399
- declare function parseOklab(input: unknown): OklabColor | null;
2400
- /** Formats OKLab as `#rrggbb` (or `#rrggbbaa` when translucent). */
2401
- declare function formatOklab(color: OklabColor): string;
2402
- /**
2403
- * Mixes two colours at `t` (0 = `from`, 1 = `to`) in OKLab with premultiplied alpha.
2404
- * Returns `null` when either is not a readable colour.
2405
- */
2406
- declare function mixColorsOklab(from: unknown, to: unknown, t: number): string | null;
2407
-
2408
2259
  /**
2409
2260
  * Keyframe animation for canvas nodes.
2410
2261
  *
@@ -2415,22 +2266,6 @@ declare function mixColorsOklab(from: unknown, to: unknown, t: number): string |
2415
2266
  */
2416
2267
  /** Data key holding a node's animation. */
2417
2268
  declare const ANIMATION_DATA_KEY = "animation";
2418
- /** Keyframe times closer than this (ms) are the same time. */
2419
- declare const ANIMATION_TIME_EPSILON = 0.000001;
2420
- /** A keyframe value: a number, or a CSS colour for colour properties. */
2421
- type AnimationValue = number | string;
2422
- interface AnimationKeyframe {
2423
- /** Time in milliseconds from the start of the timeline. */
2424
- time: number;
2425
- value: AnimationValue;
2426
- /** Easing of the segment from this keyframe to the next (default `linear`). */
2427
- easing?: AnimationEasing;
2428
- }
2429
- interface AnimationTrack {
2430
- keyframes: AnimationKeyframe[];
2431
- /** Disabled tracks keep their keyframes but do not animate (default `true`). */
2432
- enabled?: boolean;
2433
- }
2434
2269
  /** A path a node's centre follows, driven by the `motionPath` track (progress 0–1). */
2435
2270
  interface AnimationMotionPath {
2436
2271
  /** SVG path data in flow coordinates (the parent's when the node has a `parentId`). */
@@ -2443,7 +2278,6 @@ interface NodeAnimation {
2443
2278
  tracks: Record<string, AnimationTrack>;
2444
2279
  motionPath?: AnimationMotionPath;
2445
2280
  }
2446
- type AnimationValueType = 'number' | 'color';
2447
2281
  /** A node property keyframes can drive. */
2448
2282
  interface AnimatableProperty {
2449
2283
  key: string;
@@ -2474,15 +2308,6 @@ interface AnimationPropertyOptions {
2474
2308
  declare function getAnimatableProperty(key: string, options?: AnimationPropertyOptions): AnimatableProperty | undefined;
2475
2309
  /** Clamps a value into a property's range (numbers) or returns it unchanged. */
2476
2310
  declare function clampAnimationValue(property: AnimatableProperty | undefined, value: AnimationValue): AnimationValue;
2477
- /** Whether `value` is a well-formed keyframe. */
2478
- declare function isAnimationKeyframe(value: unknown): value is AnimationKeyframe;
2479
- /**
2480
- * Keyframes sorted by time, invalid entries dropped and duplicate times merged (the *later*
2481
- * entry in the array wins, so appending a keyframe replaces one at the same time). Cached per
2482
- * array (revalidated by element identity), so evaluating every frame does not re-sort; treat
2483
- * keyframe objects as immutable.
2484
- */
2485
- declare function normalizeKeyframes(keyframes: readonly AnimationKeyframe[] | undefined | null): AnimationKeyframe[];
2486
2311
  /** The node's animation (tracks with at least one valid keyframe), or `null`. */
2487
2312
  declare function getNodeAnimation(node: CanvasNode | undefined | null): NodeAnimation | null;
2488
2313
  /** The track for `property` on a node, if it has keyframes. */
@@ -2497,32 +2322,14 @@ declare function getAnimatedProperties(node: CanvasNode | undefined | null, opti
2497
2322
  */
2498
2323
  declare function withNodeAnimation<TNode extends CanvasNode>(node: TNode, animation: NodeAnimation | null): TNode;
2499
2324
 
2500
- /** How time past the end of the timeline maps back into it. */
2501
- type AnimationLoopMode = 'none' | 'loop' | 'ping-pong';
2502
2325
  /** Nodes, or a document holding them. */
2503
2326
  type AnimationDocument = readonly CanvasNode[] | {
2504
2327
  readonly nodes: readonly CanvasNode[];
2505
2328
  };
2506
2329
  /** Evaluated values: node id → property key → value. */
2507
2330
  type AnimationOverrides = Record<string, Record<string, AnimationValue>>;
2508
- /**
2509
- * Interpolates between two keyframe values: numbers linearly, colours in OKLab (premultiplied
2510
- * alpha). Mismatched or unreadable values hold `from` until `t` reaches 1.
2511
- */
2512
- declare function interpolateAnimationValue(from: AnimationValue, to: AnimationValue, t: number, type?: AnimationValueType): AnimationValue;
2513
- /**
2514
- * A track's value at `time`. Before the first keyframe it holds the first value, after the
2515
- * last the last value. Keyframes may be unsorted or share times (see `normalizeKeyframes`).
2516
- * Returns `undefined` for a track without valid keyframes.
2517
- */
2518
- declare function evaluateTrack(track: AnimationTrack | readonly AnimationKeyframe[] | undefined | null, time: number, type?: AnimationValueType): AnimationValue | undefined;
2519
2331
  /** The last keyframe time over the enabled tracks of the nodes (0 when nothing is animated). */
2520
2332
  declare function getAnimationDuration(doc: AnimationDocument): number;
2521
- /**
2522
- * Maps a running time onto the timeline `[0, duration]`: clamped (`none`), wrapped (`loop`)
2523
- * or bounced (`ping-pong`).
2524
- */
2525
- declare function wrapAnimationTime(time: number, duration: number, loop?: AnimationLoopMode): number;
2526
2333
  interface EvaluateAnimationOptions extends AnimationPropertyOptions {
2527
2334
  /** Only evaluate these nodes. */
2528
2335
  ids?: Iterable<string>;
@@ -2732,96 +2539,6 @@ declare function animateNode<TNode extends CanvasNode>(nodes: readonly TNode[],
2732
2539
  refs: KeyframeRef[];
2733
2540
  };
2734
2541
 
2735
- interface AnimationPlayerState {
2736
- /** Playhead time in ms, inside `[0, duration]`. */
2737
- time: number;
2738
- playing: boolean;
2739
- /** True between `scrub` and `endScrub`. */
2740
- scrubbing: boolean;
2741
- loop: AnimationLoopMode;
2742
- /** Speed multiplier (negative plays backwards). */
2743
- playbackRate: number;
2744
- duration: number;
2745
- }
2746
- interface AnimationPlayerOptions {
2747
- /** Time source (default `realClock`: requestAnimationFrame). Pass a `ManualClock` in tests or for rendering. */
2748
- clock?: Clock;
2749
- /** Timeline length in ms, or a getter (e.g. the last keyframe time). Default 1000. */
2750
- duration?: number | (() => number);
2751
- loop?: AnimationLoopMode;
2752
- playbackRate?: number;
2753
- /** Initial playhead time (default 0). */
2754
- time?: number;
2755
- /** Called whenever the playhead moves (playback, seek, scrub). */
2756
- onTime?: (time: number) => void;
2757
- /** Called when non-looping playback reaches the end (or the start, playing backwards). */
2758
- onEnd?: () => void;
2759
- }
2760
- /**
2761
- * Plays a timeline on an injectable `Clock`: play / pause / seek / scrub with looping,
2762
- * ping-pong and playback rate. It only asks the clock for frames while playing, so a
2763
- * `ManualClock` steps it deterministically and the real clock's requestAnimationFrame is the
2764
- * only place wall time enters.
2765
- *
2766
- * `getState()` returns a cached snapshot replaced on change (usable with `useSyncExternalStore`).
2767
- */
2768
- declare class AnimationPlayer {
2769
- private readonly clock;
2770
- private durationSource;
2771
- private onTime?;
2772
- private onEnd?;
2773
- private time;
2774
- private playing;
2775
- private scrubbing;
2776
- private resumeAfterScrub;
2777
- private loop;
2778
- private rate;
2779
- /** Unwrapped time at `anchorAt` (keeps the ping-pong direction across frames). */
2780
- private anchorRaw;
2781
- private anchorAt;
2782
- private generation;
2783
- private cached;
2784
- private listeners;
2785
- constructor(options?: AnimationPlayerOptions);
2786
- /** Current timeline length (ms). */
2787
- get duration(): number;
2788
- get currentTime(): number;
2789
- get isPlaying(): boolean;
2790
- getState(): AnimationPlayerState;
2791
- subscribe(listener: (state: AnimationPlayerState) => void): () => void;
2792
- /** Replaces the callbacks (hooks keep them current without recreating the player). */
2793
- setCallbacks(callbacks: {
2794
- onTime?: (time: number) => void;
2795
- onEnd?: () => void;
2796
- }): void;
2797
- setDuration(duration: number | (() => number)): void;
2798
- setLoop(loop: AnimationLoopMode): void;
2799
- setPlaybackRate(rate: number): void;
2800
- /** Starts playing from the playhead (from the start again when a one-shot play had ended). */
2801
- play(): void;
2802
- pause(): void;
2803
- toggle(): void;
2804
- /** Pauses and returns to the start. */
2805
- stop(): void;
2806
- /** Moves the playhead (clamped to the timeline); playback continues from there. */
2807
- seek(time: number): void;
2808
- /** Seeks while dragging the playhead: playback pauses until `endScrub`. */
2809
- scrub(time: number): void;
2810
- /** Ends a scrub, resuming playback if it was playing when the scrub began. */
2811
- endScrub(): void;
2812
- /** Stops scheduling frames and drops listeners. */
2813
- destroy(): void;
2814
- private clamp;
2815
- private reanchor;
2816
- private rawNow;
2817
- private schedule;
2818
- /** Advances the playhead to the clock's time; `notify` emits the change. */
2819
- private tick;
2820
- private snapshot;
2821
- private emit;
2822
- }
2823
- declare function createAnimationPlayer(options?: AnimationPlayerOptions): AnimationPlayer;
2824
-
2825
2542
  interface SampleAnimationOptions extends EvaluateAnimationOptions {
2826
2543
  /** Frames per second (default 30). */
2827
2544
  fps?: number;
@@ -3593,4 +3310,4 @@ declare const CANVAS_COMPONENT_DRAG_TYPE = "application/x-pixerate-component";
3593
3310
  /** Reads the component id a components panel put on a drag (or `undefined`). */
3594
3311
  declare function getCanvasComponentDragId(dataTransfer: Pick<DataTransfer, 'getData'> | null | undefined): string | undefined;
3595
3312
 
3596
- export { ANIMATABLE_PROPERTIES, ANIMATION_DATA_KEY, ANIMATION_EASING_LABELS, ANIMATION_EASING_PRESETS, ANIMATION_TIME_EPSILON, AUTO_LAYOUT_DATA_KEY, type AddCanvasVariantOptions, type AffineMatrix, AlignEdge, AlignNodesOptions, type AnimatableProperty, type AnimateNodeOptions, type AnimationDocument, type AnimationEasing, type AnimationEasingPreset, AnimationEditError, type AnimationEditErrorCode, type AnimationFrame, type AnimationHistoryTarget, type AnimationKeyframe, type AnimationKeyframeClipboard, type AnimationLoopMode, type AnimationMotionPath, type AnimationOverrides, AnimationPlayer, type AnimationPlayerOptions, type AnimationPlayerState, type AnimationPropertyOptions, type AnimationStop, type AnimationTrack, type AnimationValue, type AnimationValueType, type ArrangeHistoryTarget, type AutoLayout, type AutoLayoutAlignContent, type AutoLayoutAlignCross, type AutoLayoutAlignMain, type AutoLayoutCellAlign, type AutoLayoutChild, type AutoLayoutConstraints, type AutoLayoutGrid, type AutoLayoutGridArea, type AutoLayoutGridCell, type AutoLayoutGridGeometry, type AutoLayoutGridTrack, type AutoLayoutHorizontalConstraint, type AutoLayoutInsertTarget, type AutoLayoutMeasure, type AutoLayoutMode, type AutoLayoutOptions, type AutoLayoutPadding, type AutoLayoutSize, type AutoLayoutSizing, type AutoLayoutSizingPair, type AutoLayoutVerticalConstraint, type BezierCommand, type BezierContour, type BezierPath, type BezierPathInput, type BezierPathToSvgOptions, type BezierSegment, CANVAS_COMPONENT_DRAG_TYPE, CANVAS_TOKEN_PROPERTIES, CHILD_LAYOUT_DATA_KEY, COMPONENT_DATA_KEY, COMPONENT_OVERRIDES_DATA_KEY, COMPONENT_PROPERTY_REFS_DATA_KEY, COMPONENT_SET_DATA_KEY, COMPONENT_SOURCE_DATA_KEY, CONNECTION_LINE_TYPES, CSS_ANIMATION_PROPERTIES, CUBIC_BEZIER_PRESETS, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasClipboardPayload, type CanvasComponentData, type CanvasComponentErrorCode, type CanvasComponentInfo, type CanvasComponentPropertyDef, type CanvasComponentPropertyField, type CanvasComponentPropertyType, type CanvasComponentPropertyValue, type CanvasComponentResult, type CanvasComponentSetData, type CanvasComponentSetInfo, type CanvasComponentSyncOptions, type CanvasComponentsController, type CanvasComponentsControllerOptions, type CanvasConnectionLineType, CanvasEdge, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasScene, type CanvasScenesOptions, type CanvasScenesState, CanvasScenesStore, type CanvasTokenBindingInfo, type CanvasTokenOptions, type CanvasTokenProperty, type CanvasViewport, type Clock, type CombineShapeNodesOptions, type CombineShapeNodesRefusal, type CombineShapeNodesResult, type ConnectorSnap, type ConnectorSnapOptions, type ConnectorSnapTarget, type CreateCanvasComponentOptions, type CreateCanvasInstanceOptions, type CssAnimationExport, type CssExportOptions, type CssPropertyAnimation, type CubicBezierEasing, type CubicSegment, DEFAULT_NODE_HEIGHT, DEFAULT_NODE_WIDTH, DEFAULT_PLACEMENT_GAP, type DashedPath, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type DividePathsResult, type EllipseShape, type EvaluateAnimationOptions, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FlattenOptions, type GuideIndex, type GuideLine, INSTANCE_DATA_KEY, IncrementalLayoutOptions, type KeyframeDragState, type KeyframePatch, type KeyframeRangeOptions, type KeyframeRef, type KeyframeSnap, MAX_KEYFRAME_REFS, ManualClock, MatchSizeOptions, type MeasureGuide, type MeasureSelectionOptions, type MeasureSelectionResult, type MoveKeyframesResult, type MultiNodeTransitionOptions, type MultiPolygon, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetPathOptions, type OffsetShapeNodesOptions, type OklabColor, type OutlineShapeStrokesOptions, type OutlineStrokeOptions, type PathBooleanOperation, type PathBooleanResult, type PathCommand, type PathOperand, type PathOperandInput, PathOpsError, type PathOpsOptions, type PathOpsReport, type PathPiece, type PathPointAtLength, type PathShape, PlaceBesideOptions, Point, type PolygonBooleanOperation, type PolygonBooleanOptions, type PolygonFillRule, type PolygonInput, type PolygonOperand, type PolygonPiece, type PolygonRing, type PolygonToPathOptions, type PolygonWithHoles, Position, type PositionChangeLike, RESIZE_HANDLES, type RecordAnimationOptions, Rect, type RectShape, ReflowDisplacementOptions, type RegularPolygonShape, type ResizeHandle, SHAPE_DATA_KEY, SHAPE_KINDS, SHAPE_NODE_TYPE, SHAPE_OPERATIONS, type SampleAnimationOptions, type ScaleKeyframesOptions, type SerializedCanvasScenes, type SetCanvasVariantPropertiesOptions, type SetKeyframeOptions, type ShapeDescription, type ShapeKind, type ShapeNodePolygonOptions, type ShapeOperation, type ShapePaint, type ShapePathEditOperation, type ShapePathEditRefusal, type ShapePathEditResult, type ShapeRenderData, type ShapeSize, Side, SizeDimension, type SnapGuidesOptions, type SnapNodeDragOptions, type SnapNodeDragResult, type SnapNodeResizeOptions, type SnapNodeResizeResult, type SnapResizeOptions, type SnapResizeResult, type SnapResult, type SpringEasing, type StarShape, StreamingLayoutManager, type StreamingLayoutManagerOptions, type StrokeCap, type StrokeJoin, TOKEN_BINDINGS_DATA_KEY, TOKEN_MODES_DATA_KEY, type TimelineKeyframe, type TimelineRow, type TimelineRowsOptions, TrajectoryFunction, type WebAnimationSpec, XYPosition, ZOrderOperation, addCanvasVariant, addKeyframesAtTime, animateNode, applyAnimation, applyAnimationOverrides, applyConstraints, applyShapeCombination, applyShapeReplacement, arcToCubics, bezierPathArea, bezierPathBounds, bezierPathLength, bezierPathPointAtLength, bezierPathSignedArea, bezierPathToSvg, bindCanvasComponentProperty, bindCanvasToken, blendLayout, boundsOf, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, centerNodes, centre, clampAnimationValue, clampLayoutSize, closeContour, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeNodesBoundingBox, computeSnapGuides, connectedOnly, contourSignedArea, contoursToPath, copyKeyframes, countPathSegments, createAnimationPlayer, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasComponent, createCanvasComponentsController, createCanvasInstance, createCanvasScenesStore, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicBezierAt, cubicPointAt, cubicsToPathData, dashContours, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diffOverrideGroups, distanceToBezierPath, dividePaths, dividePolygons, easingFromInfluence, easingLabel, easingToCss, ensureLayout, estimateCanvasHeight, estimateNodeSize, evaluateAnimation, evaluateEasing, evaluateTrack, excludePaths, exportCssAnimation, findConnectorSnap, findVariant, fitCubicRun, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flattenSvgPath, flowSide, formatAnimationTime, formatNumber, formatOklab, formatVariantName, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getDefaultVariant, getEffectiveTokenModes, getFlowChildren, getInstanceData, getInstanceProperties, getInstanceStatus, getKeyframeTimes, getLayerName, getLayoutParent, getLayoutSizing, getLayoutedNodes, getNextVariantValues, getNodeAnimation, getNodeOverrides, getNodeShape, getNodeTokenBindings, getNodeTokenModes, getOwningComponent, getOwningInstance, getResizingNodeRect, getRootInstance, getShapeRenderData, getShapeSvg, getTimelineRows, getTimelineTicks, getTokenPropertyScope, getTokensForProperty, getVariantConflicts, getVariantOptions, getVariantSet, getVariantValues, handlePoint, hasVisibleStroke, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, interpolateAnimationValue, intersectPaths, intersectPolygons, isAnimationEasing, isAnimationKeyframe, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeDescription, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasComponents, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, mixColorsOklab, moveKeyframes, moveLayoutChild, multiPolygonArea, multiPolygonBounds, nearestHandlePositions, normalizeBezierPath, normalizeKeyframes, offsetPath, offsetShapeNodes, oklabToRgb, oppositePosition, outlineShapeNodeStrokes, outlineStroke, overlaps, pageHidden, parseCanvasClipboardData, parseCanvasScenes, parseCssEasing, parseKeyframeClipboard, parseNodeStyleDeclarations, parseOklab, parseSvgPath, parseVariantName, pasteKeyframes, pathBoolean, pathToContours, placeBeside, playWebAnimations, pointInBezierPath, pointInMultiPolygon, pointInRings, polygonArea, polygonBoolean, polygonToSvgPath, positionToSide, pruneCanvasTokenModes, pushCanvasInstanceOverrides, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, realClock, recordAnimationChanges, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolveEasing, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, rgbToOklab, ringSignedArea, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, segmentBounds, segmentCurvature, segmentDerivative, segmentExtrema, segmentLength, segmentNearest, segmentParamAtLength, segmentPoint, segmentTangent, serializeCanvasNodes, setCanvasComponentProperty, setCanvasInstanceProperties, setCanvasTokenMode, setCanvasVariantProperties, setKeyframe, setKeyframeEasing, setMotionPath, setTrackEnabled, shapeNodeToBezierPath, shapeNodeToPolygon, shapeToBezierPath, shapeToPolygon, sideToPosition, simplifyRing, snapKeyframeDelta, snapNodeDrag, snapNodeResize, snapResize, snapTimeToFrame, snapToGrid, splitSegment, springAt, strokeOutlineRings, subSegment, subtractPaths, subtractPolygons, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toBezierPath, toWebAnimations, transformBezierPath, trimSegments, unionPolygons, unitePaths, updateKeyframe, windingNumber, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, wrapAnimationTime, writeNodeStyleProperty, writeOverrideGroup, xToTime, xorPolygons };
3313
+ export { ANIMATABLE_PROPERTIES, ANIMATION_DATA_KEY, AUTO_LAYOUT_DATA_KEY, type AddCanvasVariantOptions, type AffineMatrix, AlignEdge, AlignNodesOptions, type AnimatableProperty, type AnimateNodeOptions, type AnimationDocument, AnimationEasing, AnimationEditError, type AnimationEditErrorCode, type AnimationFrame, type AnimationHistoryTarget, type AnimationKeyframeClipboard, AnimationLoopMode, type AnimationMotionPath, type AnimationOverrides, AnimationPlayer, AnimationPlayerState, type AnimationPropertyOptions, type AnimationStop, AnimationTrack, AnimationValue, AnimationValueType, type ArrangeHistoryTarget, type AutoLayout, type AutoLayoutAlignContent, type AutoLayoutAlignCross, type AutoLayoutAlignMain, type AutoLayoutCellAlign, type AutoLayoutChild, type AutoLayoutConstraints, type AutoLayoutGrid, type AutoLayoutGridArea, type AutoLayoutGridCell, type AutoLayoutGridGeometry, type AutoLayoutGridTrack, type AutoLayoutHorizontalConstraint, type AutoLayoutInsertTarget, type AutoLayoutMeasure, type AutoLayoutMode, type AutoLayoutOptions, type AutoLayoutPadding, type AutoLayoutSize, type AutoLayoutSizing, type AutoLayoutSizingPair, type AutoLayoutVerticalConstraint, type BezierCommand, type BezierContour, type BezierPath, type BezierPathInput, type BezierPathToSvgOptions, type BezierSegment, CANVAS_COMPONENT_DRAG_TYPE, CANVAS_TOKEN_PROPERTIES, CHILD_LAYOUT_DATA_KEY, COMPONENT_DATA_KEY, COMPONENT_OVERRIDES_DATA_KEY, COMPONENT_PROPERTY_REFS_DATA_KEY, COMPONENT_SET_DATA_KEY, COMPONENT_SOURCE_DATA_KEY, CONNECTION_LINE_TYPES, CSS_ANIMATION_PROPERTIES, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasClipboardPayload, type CanvasComponentData, type CanvasComponentErrorCode, type CanvasComponentInfo, type CanvasComponentPropertyDef, type CanvasComponentPropertyField, type CanvasComponentPropertyType, type CanvasComponentPropertyValue, type CanvasComponentResult, type CanvasComponentSetData, type CanvasComponentSetInfo, type CanvasComponentSyncOptions, type CanvasComponentsController, type CanvasComponentsControllerOptions, type CanvasConnectionLineType, CanvasEdge, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasScene, type CanvasScenesOptions, type CanvasScenesState, CanvasScenesStore, type CanvasTokenBindingInfo, type CanvasTokenOptions, type CanvasTokenProperty, type CanvasViewport, Clock, type CombineShapeNodesOptions, type CombineShapeNodesRefusal, type CombineShapeNodesResult, type ConnectorSnap, type ConnectorSnapOptions, type ConnectorSnapTarget, type CreateCanvasComponentOptions, type CreateCanvasInstanceOptions, type CssAnimationExport, type CssExportOptions, type CssPropertyAnimation, type CubicSegment, DEFAULT_NODE_HEIGHT, DEFAULT_NODE_WIDTH, DEFAULT_PLACEMENT_GAP, type DashedPath, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type DividePathsResult, type EllipseShape, type EvaluateAnimationOptions, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FlattenOptions, type GuideIndex, type GuideLine, INSTANCE_DATA_KEY, IncrementalLayoutOptions, type KeyframeDragState, type KeyframePatch, type KeyframeRangeOptions, type KeyframeRef, type KeyframeSnap, MAX_KEYFRAME_REFS, MatchSizeOptions, type MeasureGuide, type MeasureSelectionOptions, type MeasureSelectionResult, type MoveKeyframesResult, type MultiNodeTransitionOptions, type MultiPolygon, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetPathOptions, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, type OutlineStrokeOptions, type PathBooleanOperation, type PathBooleanResult, type PathCommand, type PathOperand, type PathOperandInput, PathOpsError, type PathOpsOptions, type PathOpsReport, type PathPiece, type PathPointAtLength, type PathShape, PlaceBesideOptions, Point, type PolygonBooleanOperation, type PolygonBooleanOptions, type PolygonFillRule, type PolygonInput, type PolygonOperand, type PolygonPiece, type PolygonRing, type PolygonToPathOptions, type PolygonWithHoles, Position, type PositionChangeLike, RESIZE_HANDLES, type RecordAnimationOptions, Rect, type RectShape, ReflowDisplacementOptions, type RegularPolygonShape, type ResizeHandle, SHAPE_DATA_KEY, SHAPE_KINDS, SHAPE_NODE_TYPE, SHAPE_OPERATIONS, type SampleAnimationOptions, type ScaleKeyframesOptions, type SerializedCanvasScenes, type SetCanvasVariantPropertiesOptions, type SetKeyframeOptions, type ShapeDescription, type ShapeKind, type ShapeNodePolygonOptions, type ShapeOperation, type ShapePaint, type ShapePathEditOperation, type ShapePathEditRefusal, type ShapePathEditResult, type ShapeRenderData, type ShapeSize, Side, SizeDimension, type SnapGuidesOptions, type SnapNodeDragOptions, type SnapNodeDragResult, type SnapNodeResizeOptions, type SnapNodeResizeResult, type SnapResizeOptions, type SnapResizeResult, type SnapResult, type StarShape, StreamingLayoutManager, type StreamingLayoutManagerOptions, type StrokeCap, type StrokeJoin, TOKEN_BINDINGS_DATA_KEY, TOKEN_MODES_DATA_KEY, type TimelineKeyframe, type TimelineRow, type TimelineRowsOptions, TrajectoryFunction, type WebAnimationSpec, XYPosition, ZOrderOperation, addCanvasVariant, addKeyframesAtTime, animateNode, applyAnimation, applyAnimationOverrides, applyConstraints, applyShapeCombination, applyShapeReplacement, arcToCubics, bezierPathArea, bezierPathBounds, bezierPathLength, bezierPathPointAtLength, bezierPathSignedArea, bezierPathToSvg, bindCanvasComponentProperty, bindCanvasToken, blendLayout, boundsOf, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, centerNodes, centre, clampAnimationValue, clampLayoutSize, closeContour, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeNodesBoundingBox, computeSnapGuides, connectedOnly, contourSignedArea, contoursToPath, copyKeyframes, countPathSegments, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasComponent, createCanvasComponentsController, createCanvasInstance, createCanvasScenesStore, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, dashContours, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diffOverrideGroups, distanceToBezierPath, dividePaths, dividePolygons, ensureLayout, estimateCanvasHeight, estimateNodeSize, evaluateAnimation, excludePaths, exportCssAnimation, findConnectorSnap, findVariant, fitCubicRun, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flattenSvgPath, flowSide, formatAnimationTime, formatNumber, formatVariantName, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getDefaultVariant, getEffectiveTokenModes, getFlowChildren, getInstanceData, getInstanceProperties, getInstanceStatus, getKeyframeTimes, getLayerName, getLayoutParent, getLayoutSizing, getLayoutedNodes, getNextVariantValues, getNodeAnimation, getNodeOverrides, getNodeShape, getNodeTokenBindings, getNodeTokenModes, getOwningComponent, getOwningInstance, getResizingNodeRect, getRootInstance, getShapeRenderData, getShapeSvg, getTimelineRows, getTimelineTicks, getTokenPropertyScope, getTokensForProperty, getVariantConflicts, getVariantOptions, getVariantSet, getVariantValues, handlePoint, hasVisibleStroke, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, intersectPaths, intersectPolygons, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeDescription, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasComponents, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, moveKeyframes, moveLayoutChild, multiPolygonArea, multiPolygonBounds, nearestHandlePositions, normalizeBezierPath, offsetPath, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, outlineStroke, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseNodeStyleDeclarations, parseSvgPath, parseVariantName, pasteKeyframes, pathBoolean, pathToContours, placeBeside, playWebAnimations, pointInBezierPath, pointInMultiPolygon, pointInRings, polygonArea, polygonBoolean, polygonToSvgPath, positionToSide, pruneCanvasTokenModes, pushCanvasInstanceOverrides, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, ringSignedArea, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, segmentBounds, segmentCurvature, segmentDerivative, segmentExtrema, segmentLength, segmentNearest, segmentParamAtLength, segmentPoint, segmentTangent, serializeCanvasNodes, setCanvasComponentProperty, setCanvasInstanceProperties, setCanvasTokenMode, setCanvasVariantProperties, setKeyframe, setKeyframeEasing, setMotionPath, setTrackEnabled, shapeNodeToBezierPath, shapeNodeToPolygon, shapeToBezierPath, shapeToPolygon, sideToPosition, simplifyRing, snapKeyframeDelta, snapNodeDrag, snapNodeResize, snapResize, snapTimeToFrame, snapToGrid, splitSegment, strokeOutlineRings, subSegment, subtractPaths, subtractPolygons, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toBezierPath, toWebAnimations, transformBezierPath, trimSegments, unionPolygons, unitePaths, updateKeyframe, windingNumber, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime, xorPolygons };