@pixerate/editor 0.31.0 → 0.32.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,8 +1,12 @@
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
- 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';
1
+ import { R as Rect, C as CanvasNode, X as XYPosition, b as CanvasEdge, I as IncrementalLayoutOptions, S as Side, c as CanvasLayoutOptions, d as PlaceBesideOptions, T as TrajectoryFunction, F as FanOutTrajectoryOptions, N as NodeTransition, a as CanvasNodeStyle, e as ReflowDisplacementOptions, D as DirectionalDisplacementOptions, f as CanvasClipboardPayload, g as Position, P as Point } from '../types-BFkYA4eF.js';
2
+ export { h as CanvasDockingCallbacks, i as CollapseNodeOptions, j as DisplacementDirection, k as DockStrategy, E as ExplodeNodeOptions, l as ExplosionSnapshot, G as GraphDifferences, m as TrajectoryPoint } from '../types-BFkYA4eF.js';
3
3
  import { Clock, AnimationValueType, AnimationValue, AnimationTrack, AnimationLoopMode, AnimationPlayerState, AnimationPlayer } from '../animation/index.js';
4
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 { b as CanvasNodeUpdate, N as NodeRectOptions, A as AlignEdge, c as AlignNodesOptions, D as DistributeAxis, a as DistributeMode, d as DistributeNodesOptions, S as SizeDimension, M as MatchSizeOptions, Z as ZOrderOperation, C as CanvasArrangeAction } from '../arrange-BPAXGdMm.js';
6
+ export { e as ArrangeShortcutBinding, f as DEFAULT_ARRANGE_SHORTCUTS, L as LOCKED_DATA_KEY, g as LOCKED_PREVIOUS_FLAGS_KEY, h as alignNodes, i as applyNodeUpdates, j as createNodeLookup, k as distributeNodes, l as getAbsolutePosition, m as getNodeRect, n as getNodeSize, o as invertNodeUpdates, p as isLocked, q as lockNodes, r as matchArrangeShortcut, s as matchSize, t as readStyleSize, u as reorderNodes, v as toggleLockNodes, w as unlockNodes, x as withStyleSize } from '../arrange-BPAXGdMm.js';
5
7
  import { C as Command, M as MergedExecutionOptions } from '../types-DsiXGmjo.js';
8
+ import { a as BezierPath, P as PolygonBooleanOperation, B as BezierPathInput, b as PolygonFillRule, c as BezierContour, d as ShapeDescription, e as PolygonRing, f as ShapeSize, C as CanvasGradientDef } from '../bezier-DJPYiVbA.js';
9
+ export { A as AffineMatrix, g as BezierCommand, h as BezierPathToSvgOptions, i as BezierSegment, j as CANVAS_GRADIENT_PRESETS, k as CanvasLinearGradient, l as CanvasRadialGradient, E as EllipseShape, F as FlattenOptions, G as GetShapeRenderDataOptions, m as GradientStop, M as MultiPolygon, n as PathCommand, o as PathPointAtLength, p as PathShape, q as PolygonBooleanOptions, r as PolygonInput, s as PolygonOperand, t as PolygonPiece, u as PolygonToPathOptions, v as PolygonWithHoles, R as RectShape, w as RegularPolygonShape, x as SHAPE_KINDS, y as ShapeKind, z as ShapePaint, D as ShapeRenderData, H as StarShape, S as SvgGradientDef, I as SvgGradientStop, J as angleToSvgLinearCoords, K as arcToCubics, L as bezierPathBounds, N as bezierPathLength, O as bezierPathPointAtLength, Q as bezierPathSignedArea, T as bezierPathToSvg, U as closeContour, V as contourSignedArea, W as contoursToPath, X as countPathSegments, Y as distanceToBezierPath, Z as dividePolygons, _ as flattenSvgPath, $ as formatNumber, a0 as getShapeRenderData, a1 as getShapeSvg, a2 as gradientToSvgDef, a3 as intersectPolygons, a4 as isCanvasGradient, a5 as isShapeDescription, a6 as multiPolygonArea, a7 as multiPolygonBounds, a8 as parseCssGradient, a9 as parseSvgPath, aa as pathToContours, ab as pointInBezierPath, ac as pointInMultiPolygon, ad as pointInRings, ae as polygonArea, af as polygonBoolean, ag as polygonToSvgPath, ah as resolveCanvasGradient, ai as ringSignedArea, aj as segmentBounds, ak as segmentCurvature, al as segmentDerivative, am as segmentExtrema, an as segmentLength, ao as segmentNearest, ap as segmentParamAtLength, aq as segmentPoint, ar as segmentTangent, as as shapeToPolygon, at as simplifyRing, au as splitSegment, av as subSegment, aw as subtractPolygons, ax as toBezierPath, ay as transformBezierPath, az as trimSegments, aA as unionPolygons, aB as windingNumber, aC as xorPolygons } from '../bezier-DJPYiVbA.js';
6
10
  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
11
  import { A as AnimationEasing } from '../easing-DTmX99QG.js';
8
12
  export { a as ANIMATION_EASING_LABELS, b as ANIMATION_EASING_PRESETS, c as AnimationEasingPreset, C as CUBIC_BEZIER_PRESETS, d as CubicBezierEasing, E as ElasticEasing, S as SpringEasing, e as cubicBezierAt, f as easingFromInfluence, g as easingLabel, h as easingToCss, i as elasticAt, j as evaluateEasing, k as isAnimationEasing, p as parseCssEasing, r as resolveEasing, s as springAt } from '../easing-DTmX99QG.js';
@@ -561,550 +565,6 @@ declare function fitViewportToNodes(nodes: CanvasNode[], size: {
561
565
  height: number;
562
566
  }, ids?: Iterable<string>, options?: FitViewportOptions & NodeRectOptions): CanvasViewport | null;
563
567
 
564
- /**
565
- * Polygon boolean operations (union, intersection, difference, xor and divide) on
566
- * multi-polygons with holes.
567
- *
568
- * Algorithm (overlay + winding classification):
569
- * 1. Every input edge is collected into one segment set. Vertices are merged through a
570
- * tolerance-aware point pool, so points closer than `epsilon` become one vertex.
571
- * 2. Segments are split at every crossing, T-junction and collinear overlap until no two
572
- * segments cross (a planar arrangement). Splitting is repeated because snapping a new
573
- * vertex can move a segment by up to `epsilon`.
574
- * 3. Coincident segments (shared edges) are merged, keeping for every operand the signed
575
- * number of its edges that run along the segment.
576
- * 4. For every segment the winding number of each operand on its right side is computed
577
- * with a ray cast from the segment midpoint (the segment itself excluded), and the left
578
- * side follows from the signed multiplicities. The fill rule turns windings into
579
- * inside / outside flags and the operation decides whether each side is in the result.
580
- * 5. Segments with the result on exactly one side are kept, oriented with the result on
581
- * their left, and traced into rings (taking the sharpest left turn at shared vertices,
582
- * so rings that touch at a vertex stay separate simple rings). Rings with a positive
583
- * signed area are outer rings; negative ones are holes, assigned to the smallest outer
584
- * ring that contains them.
585
- *
586
- * Handles shared edges, touching vertices, collinear overlaps, holes, nested and disjoint
587
- * inputs and self-intersecting input rings (resolved by the operand's fill rule).
588
- *
589
- * Limits: the overlay is O(n²) in the number of edges (pruned by a sweep on x), which is
590
- * comfortable for canvas shapes (thousands of edges) but not for GIS-scale data. Features
591
- * narrower than `epsilon` collapse. Coordinates must be finite.
592
- */
593
-
594
- /** A closed ring of points. The closing point may be repeated or omitted. */
595
- type PolygonRing = Point[];
596
- /** A polygon: the outer ring followed by its holes. */
597
- type PolygonWithHoles = PolygonRing[];
598
- /** A set of polygons. */
599
- type MultiPolygon = PolygonWithHoles[];
600
- /** SVG fill rule used to decide which areas of a ring set are inside. */
601
- type PolygonFillRule = 'nonzero' | 'evenodd';
602
- /** Boolean operations. `xor` is Freeform's Exclude. */
603
- type PolygonBooleanOperation = 'union' | 'intersection' | 'difference' | 'xor';
604
- /**
605
- * A raw ring set with a fill rule (e.g. flattened SVG path data). Ring orientation is
606
- * significant for `nonzero`.
607
- */
608
- interface PolygonOperand {
609
- rings: PolygonRing[];
610
- fillRule?: PolygonFillRule;
611
- }
612
- type PolygonInput = MultiPolygon | PolygonOperand;
613
- interface PolygonBooleanOptions {
614
- /**
615
- * Distance below which points are treated as equal. Defaults to `1e-9` times the
616
- * largest coordinate magnitude of the inputs (at least `1e-9`).
617
- */
618
- epsilon?: number;
619
- }
620
- /** One region of `dividePolygons`, with the indices of the operands that cover it. */
621
- interface PolygonPiece {
622
- polygon: PolygonWithHoles;
623
- operands: number[];
624
- }
625
- /** Signed shoelace area of a ring (positive when counter-clockwise in a y-up frame). */
626
- declare function ringSignedArea(ring: readonly Point[]): number;
627
- /** Area of a polygon (outer ring minus holes). */
628
- declare function polygonArea(polygon: PolygonWithHoles): number;
629
- /** Total area of a multi-polygon (holes subtracted). */
630
- declare function multiPolygonArea(multi: MultiPolygon): number;
631
- /** Axis-aligned bounds of a multi-polygon (or ring list), or `null` when empty. */
632
- declare function multiPolygonBounds(input: MultiPolygon | PolygonRing[]): {
633
- minX: number;
634
- minY: number;
635
- maxX: number;
636
- maxY: number;
637
- } | null;
638
- /**
639
- * Whether a point is inside a ring set under a fill rule. Points exactly on an edge may
640
- * report either side.
641
- */
642
- declare function pointInRings(point: Point, rings: readonly (readonly Point[])[], fillRule?: PolygonFillRule): boolean;
643
- /** Whether a point is inside a multi-polygon (holes excluded). */
644
- declare function pointInMultiPolygon(point: Point, multi: MultiPolygon): boolean;
645
- /**
646
- * Applies a boolean operation to any number of operands.
647
- * - `union`: covered by any operand.
648
- * - `intersection`: covered by every operand.
649
- * - `difference`: the first operand minus all others.
650
- * - `xor`: covered by an odd number of operands (Exclude).
651
- *
652
- * Returns simple rings: outer rings have a positive signed area, holes a negative one.
653
- * Rings may touch at vertices but never cross.
654
- */
655
- declare function polygonBoolean(operation: PolygonBooleanOperation, operands: PolygonInput[], options?: PolygonBooleanOptions): MultiPolygon;
656
- declare const unionPolygons: (a: PolygonInput, b: PolygonInput, options?: PolygonBooleanOptions) => MultiPolygon;
657
- declare const intersectPolygons: (a: PolygonInput, b: PolygonInput, options?: PolygonBooleanOptions) => MultiPolygon;
658
- declare const subtractPolygons: (a: PolygonInput, b: PolygonInput, options?: PolygonBooleanOptions) => MultiPolygon;
659
- declare const xorPolygons: (a: PolygonInput, b: PolygonInput, options?: PolygonBooleanOptions) => MultiPolygon;
660
- /**
661
- * Splits the overlay of the operands into its distinct regions (Freeform's Divide): every
662
- * connected area covered by the same set of operands becomes one piece. Pieces are ordered
663
- * by their operand set, then by size (largest first).
664
- */
665
- declare function dividePolygons(operands: PolygonInput[], options?: PolygonBooleanOptions): PolygonPiece[];
666
-
667
- /**
668
- * Canvas gradient models, parsing, presets, and SVG defs generation.
669
- * Supports linear and radial gradients for shape fills, strokes, and freehand drawing.
670
- */
671
- interface GradientStop {
672
- offset: number;
673
- color: string;
674
- opacity?: number;
675
- }
676
- interface CanvasLinearGradient {
677
- type: 'linear';
678
- angle?: number;
679
- stops: GradientStop[];
680
- }
681
- interface CanvasRadialGradient {
682
- type: 'radial';
683
- cx?: number;
684
- cy?: number;
685
- r?: number;
686
- stops: GradientStop[];
687
- }
688
- type CanvasGradientDef = CanvasLinearGradient | CanvasRadialGradient;
689
- interface SvgGradientStop {
690
- offset: string;
691
- stopColor: string;
692
- stopOpacity?: number;
693
- }
694
- interface SvgGradientDef {
695
- id: string;
696
- type: 'linear' | 'radial';
697
- attrs: Record<string, string | number>;
698
- stops: SvgGradientStop[];
699
- }
700
- declare const CANVAS_GRADIENT_PRESETS: Record<string, CanvasLinearGradient>;
701
- /** Whether an arbitrary value matches a CanvasGradientDef object. */
702
- declare function isCanvasGradient(value: unknown): value is CanvasGradientDef;
703
- /**
704
- * Parses CSS linear-gradient or radial-gradient strings into CanvasGradientDef.
705
- * Supports forms like:
706
- * - linear-gradient(90deg, #ff0000 0%, #0000ff 100%)
707
- * - linear-gradient(to right, red, blue)
708
- * - radial-gradient(circle, red 0%, blue 100%)
709
- */
710
- declare function parseCssGradient(css: string): CanvasGradientDef | null;
711
- /**
712
- * Resolves a paint value (which could be a CSS color, preset name, CSS gradient string, or CanvasGradientDef)
713
- * into either a CanvasGradientDef (if gradient) or null (if solid color or invalid).
714
- */
715
- declare function resolveCanvasGradient(value: unknown): CanvasGradientDef | null;
716
- /**
717
- * Converts degrees clockwise (CSS angle: 0 = top, 90 = right, 180 = bottom, 270 = left)
718
- * to SVG linearGradient vector coordinates (x1, y1, x2, y2) normalized [0, 1].
719
- */
720
- declare function angleToSvgLinearCoords(angleDeg?: number): {
721
- x1: number;
722
- y1: number;
723
- x2: number;
724
- y2: number;
725
- };
726
- /**
727
- * Converts a CanvasGradientDef to an SvgGradientDef descriptor ready for rendering `<linearGradient>` / `<radialGradient>`.
728
- */
729
- declare function gradientToSvgDef(gradient: CanvasGradientDef, id: string): SvgGradientDef;
730
-
731
- /**
732
- * Shape geometry: shape descriptions (rect, rounded rect, ellipse, regular polygon, star and
733
- * SVG path data) to polygons, SVG path parsing / flattening, and polygons back to path data.
734
- */
735
-
736
- /** Paint shared by every shape kind. Colours are any CSS colour, preset name, or gradient definition. */
737
- interface ShapePaint {
738
- fill?: string | CanvasGradientDef;
739
- stroke?: string | CanvasGradientDef;
740
- strokeWidth?: number;
741
- opacity?: number;
742
- strokeLinecap?: 'round' | 'butt' | 'square';
743
- strokeLinejoin?: 'round' | 'bevel' | 'miter';
744
- fillGradient?: CanvasGradientDef;
745
- strokeGradient?: CanvasGradientDef;
746
- }
747
- interface ShapeBase extends ShapePaint {
748
- /** Clockwise rotation in degrees (on a y-down canvas) about the centre of the node box. */
749
- rotation?: number;
750
- }
751
- /** Rectangle filling the node box, optionally with rounded corners. */
752
- interface RectShape extends ShapeBase {
753
- kind: 'rect';
754
- /** One radius, or `[topLeft, topRight, bottomRight, bottomLeft]`. Clamped to fit. */
755
- cornerRadius?: number | readonly [number, number, number, number];
756
- }
757
- /** Ellipse (circle when the node is square) inscribed in the node box. */
758
- interface EllipseShape extends ShapeBase {
759
- kind: 'ellipse';
760
- }
761
- /** Regular polygon, stretched so its bounding box fills the node box. */
762
- interface RegularPolygonShape extends ShapeBase {
763
- kind: 'polygon';
764
- /** Number of sides (at least 3, default 6). The first vertex points up. */
765
- sides?: number;
766
- }
767
- /** Star, stretched so its bounding box fills the node box. */
768
- interface StarShape extends ShapeBase {
769
- kind: 'star';
770
- /** Number of points (at least 3, default 5). The first point points up. */
771
- points?: number;
772
- /** Inner radius as a fraction of the outer radius (default 0.5). */
773
- innerRadius?: number;
774
- }
775
- /** Arbitrary SVG path data. */
776
- interface PathShape extends ShapeBase {
777
- kind: 'path';
778
- d: string;
779
- /**
780
- * `[minX, minY, width, height]` of the path's coordinate space, scaled to the node box.
781
- * Without it the path coordinates are node-local pixels.
782
- */
783
- viewBox?: readonly [number, number, number, number];
784
- /** Fill rule (default `nonzero`, as in SVG). */
785
- fillRule?: PolygonFillRule;
786
- }
787
- /**
788
- * Shape description stored on a node as `data.shape`. Geometry is relative to the node
789
- * box (`0,0` to `width,height`), so resizing the node resizes the shape.
790
- */
791
- type ShapeDescription = RectShape | EllipseShape | RegularPolygonShape | StarShape | PathShape;
792
- type ShapeKind = ShapeDescription['kind'];
793
- declare const SHAPE_KINDS: readonly ShapeKind[];
794
- /** Whether a value is a supported shape description. */
795
- declare function isShapeDescription(value: unknown): value is ShapeDescription;
796
- interface ShapeSize {
797
- width: number;
798
- height: number;
799
- }
800
- interface FlattenOptions {
801
- /** Maximum distance between a curve and its polyline, in output units (default 0.25). */
802
- tolerance?: number;
803
- /** Upper bound on the segments one curve is split into (default 512). */
804
- maxSegments?: number;
805
- }
806
- /** Normalised absolute path command produced by `parseSvgPath`. */
807
- type PathCommand = {
808
- type: 'M';
809
- x: number;
810
- y: number;
811
- } | {
812
- type: 'L';
813
- x: number;
814
- y: number;
815
- } | {
816
- type: 'C';
817
- x1: number;
818
- y1: number;
819
- x2: number;
820
- y2: number;
821
- x: number;
822
- y: number;
823
- } | {
824
- type: 'Q';
825
- x1: number;
826
- y1: number;
827
- x: number;
828
- y: number;
829
- } | {
830
- type: 'A';
831
- rx: number;
832
- ry: number;
833
- rotation: number;
834
- largeArc: boolean;
835
- sweep: boolean;
836
- x: number;
837
- y: number;
838
- } | {
839
- type: 'Z';
840
- };
841
- /**
842
- * Parses SVG path data into absolute `M`, `L`, `C`, `Q`, `A` and `Z` commands. Relative
843
- * commands, `H` / `V`, smooth curves (`S` / `T`) and implicit repeated commands are
844
- * normalised. Parsing stops at the first malformed command (as browsers do).
845
- */
846
- declare function parseSvgPath(d: string): PathCommand[];
847
- /**
848
- * Flattens SVG path data into closed rings (one per subpath; open subpaths are closed the
849
- * way SVG fills them). Curves are approximated within `tolerance`.
850
- */
851
- declare function flattenSvgPath(d: string | PathCommand[], options?: FlattenOptions): PolygonRing[];
852
- /**
853
- * SVG path data for a shape in node-local pixels (exact curves: arcs for rounded corners
854
- * and ellipses), plus the fill rule and a `transform` for rotation / path view boxes.
855
- * Use it to render a shape; use `shapeToPolygon` for geometry.
856
- */
857
- declare function getShapeSvg(shape: ShapeDescription, size: ShapeSize): {
858
- d: string;
859
- transform?: string;
860
- fillRule: PolygonFillRule;
861
- };
862
- /** Everything a renderer needs to draw a shape as one SVG `<path>`. */
863
- interface ShapeRenderData {
864
- /** SVG `viewBox` (`0 0 width height`): node-local pixels. */
865
- viewBox: string;
866
- width: number;
867
- height: number;
868
- d: string;
869
- transform?: string;
870
- fillRule: PolygonFillRule;
871
- fill: string;
872
- stroke: string;
873
- strokeWidth: number;
874
- opacity?: number;
875
- strokeLinecap?: 'round' | 'butt' | 'square';
876
- strokeLinejoin?: 'round' | 'bevel' | 'miter';
877
- /** Gradient def for the fill, when fill uses a gradient. */
878
- fillGradient?: SvgGradientDef;
879
- /** Gradient def for the stroke, when stroke uses a gradient. */
880
- strokeGradient?: SvgGradientDef;
881
- }
882
- interface GetShapeRenderDataOptions {
883
- /** Unique ID suffix or base ID used when generating SVG gradient IDs (default: auto random). */
884
- id?: string;
885
- }
886
- /**
887
- * Resolves the SVG drawing of a shape for a node size. Without a size, a path's view box
888
- * size (or 100x100) is used. Paint defaults: `fill: currentColor`, `stroke: none`,
889
- * `strokeWidth: 1`. Supports solid colors, CSS gradients, presets, and CanvasGradientDef.
890
- */
891
- declare function getShapeRenderData(shape: ShapeDescription, size?: Partial<ShapeSize>, options?: GetShapeRenderDataOptions): ShapeRenderData;
892
- /**
893
- * Converts a shape to rings in node-local pixels (rotation applied), flattening curves at
894
- * `tolerance`. Returns the rings with the fill rule they must be read with.
895
- */
896
- declare function shapeToPolygon(shape: ShapeDescription, size: ShapeSize, options?: FlattenOptions): {
897
- rings: PolygonRing[];
898
- fillRule: PolygonFillRule;
899
- };
900
- /** Formats a number with at most `precision` decimals, without trailing zeros. */
901
- declare function formatNumber(value: number, precision?: number): string;
902
- /**
903
- * Simplifies a closed ring with Ramer–Douglas–Peucker at `tolerance`. Returns an empty
904
- * ring when fewer than three points survive.
905
- */
906
- declare function simplifyRing(ring: readonly Point[], tolerance: number): Point[];
907
- interface PolygonToPathOptions {
908
- /** Decimal places in the output (default 3). */
909
- precision?: number;
910
- /** Ramer–Douglas–Peucker tolerance; `0` (default) keeps every vertex. */
911
- simplify?: number;
912
- /** Added to every point before formatting (e.g. to make coordinates node-local). */
913
- offset?: {
914
- x: number;
915
- y: number;
916
- };
917
- /**
918
- * `'lines'` (default) writes every ring as `M`/`L`/`Z`. `'fit'` fits cubic Béziers to each
919
- * ring (`fitPathData`), so flattened curves come back as smooth `C` curves while sharp
920
- * corners (turning more than `cornerAngleDeg`) and straight edges stay as they are.
921
- */
922
- curves?: 'lines' | 'fit';
923
- /** Curve-fitting tolerance in path units for `curves: 'fit'` (default 0.25). */
924
- curveTolerance?: number;
925
- /** Corner threshold in degrees for `curves: 'fit'` (default 30). */
926
- cornerAngleDeg?: number;
927
- }
928
- /**
929
- * Converts a multi-polygon (or a list of rings) to SVG path data using `M`/`L`/`Z`. Holes
930
- * keep their opposite orientation, so the path fills correctly with either fill rule.
931
- */
932
- declare function polygonToSvgPath(input: MultiPolygon | PolygonRing[], options?: PolygonToPathOptions): string;
933
-
934
- /**
935
- * Bézier path model shared by the curve-preserving path operations: absolute `M` / `L` /
936
- * `Q` / `C` / `Z` commands, conversion from SVG path data (arcs become cubics), segment
937
- * math (evaluation, splitting, extrema, nearest point), exact areas, winding numbers and
938
- * arc-length utilities.
939
- */
940
-
941
- /** One absolute path command. Every subpath starts with `M`; `Z` closes it. */
942
- type BezierCommand = {
943
- type: 'M';
944
- x: number;
945
- y: number;
946
- } | {
947
- type: 'L';
948
- x: number;
949
- y: number;
950
- } | {
951
- type: 'Q';
952
- x1: number;
953
- y1: number;
954
- x: number;
955
- y: number;
956
- } | {
957
- type: 'C';
958
- x1: number;
959
- y1: number;
960
- x2: number;
961
- y2: number;
962
- x: number;
963
- y: number;
964
- } | {
965
- type: 'Z';
966
- };
967
- /** A path as a list of absolute move / line / quadratic / cubic / close commands. */
968
- type BezierPath = BezierCommand[];
969
- /** Anything the path operations accept as a path: SVG path data, parsed commands or a `BezierPath`. */
970
- type BezierPathInput = string | readonly BezierCommand[] | readonly PathCommand[];
971
- /**
972
- * One segment as its control points: 2 points for a line, 3 for a quadratic and 4 for a
973
- * cubic Bézier.
974
- */
975
- type BezierSegment = readonly Point[];
976
- /** A subpath as a chain of segments (each starts where the previous one ends). */
977
- interface BezierContour {
978
- segments: BezierSegment[];
979
- closed: boolean;
980
- }
981
- /** Point at parameter `t` (de Casteljau, works for any degree). */
982
- declare function segmentPoint(seg: BezierSegment, t: number): Point;
983
- /** First derivative at `t`. */
984
- declare function segmentDerivative(seg: BezierSegment, t: number): Point;
985
- /**
986
- * Unit tangent at `t`. Where the derivative vanishes (a handle on its anchor) the direction
987
- * a hair further along is used, and the chord as the last resort.
988
- */
989
- declare function segmentTangent(seg: BezierSegment, t: number): Point;
990
- /** Signed curvature at `t` (positive when turning counter-clockwise in a y-up frame). */
991
- declare function segmentCurvature(seg: BezierSegment, t: number): number;
992
- /** Splits a segment at `t` (de Casteljau). */
993
- declare function splitSegment(seg: BezierSegment, t: number): [Point[], Point[]];
994
- /** The part of a segment between parameters `t0` and `t1` (reversed when `t1 < t0`). */
995
- declare function subSegment(seg: BezierSegment, t0: number, t1: number): Point[];
996
- /** Parameters in (0, 1) where the segment's `axis` coordinate has a local extremum. */
997
- declare function segmentExtrema(seg: BezierSegment, axis: 0 | 1): number[];
998
- /** Exact axis-aligned bounds of a segment. */
999
- declare function segmentBounds(seg: BezierSegment): {
1000
- minX: number;
1001
- minY: number;
1002
- maxX: number;
1003
- maxY: number;
1004
- };
1005
- /** Arc length of the segment between `t0` and `t1` (default the whole segment). */
1006
- declare function segmentLength(seg: BezierSegment, t0?: number, t1?: number, tolerance?: number): number;
1007
- /** Parameter at arc length `length` from the segment start (clamped to [0, 1]). */
1008
- declare function segmentParamAtLength(seg: BezierSegment, length: number, total?: number): number;
1009
- /**
1010
- * Nearest point of the segment to `p`: the parameter and the distance. Coarse sampling
1011
- * followed by Newton refinement around the best samples.
1012
- */
1013
- declare function segmentNearest(seg: BezierSegment, p: Point): {
1014
- t: number;
1015
- distance: number;
1016
- };
1017
- /** Converts an SVG elliptical arc (SVG 1.1 F.6.5) to cubic segments, at most 90° each. */
1018
- declare function arcToCubics(from: Point, cmd: {
1019
- rx: number;
1020
- ry: number;
1021
- rotation: number;
1022
- largeArc: boolean;
1023
- sweep: boolean;
1024
- x: number;
1025
- y: number;
1026
- }): Point[][];
1027
- /**
1028
- * Converts SVG path data or parsed commands to a `BezierPath` (absolute `M` / `L` / `Q` /
1029
- * `C` / `Z`); elliptical arcs become cubic Béziers (at most 90° each).
1030
- */
1031
- declare function toBezierPath(input: BezierPathInput): BezierPath;
1032
- /** Splits a path into contours of segments. Zero-length segments are dropped. */
1033
- declare function pathToContours(input: BezierPathInput): BezierContour[];
1034
- /** Builds a path from contours (a closed contour's closing line is left to `Z`). */
1035
- declare function contoursToPath(contours: readonly BezierContour[]): BezierPath;
1036
- interface BezierPathToSvgOptions {
1037
- /** Decimal places (default 3). */
1038
- precision?: number;
1039
- /** Added to every point before formatting. */
1040
- offset?: {
1041
- x: number;
1042
- y: number;
1043
- };
1044
- }
1045
- /** Writes a path as compact SVG path data. */
1046
- declare function bezierPathToSvg(input: BezierPathInput, options?: BezierPathToSvgOptions): string;
1047
- /** 2D affine matrix `[a, b, c, d, e, f]` mapping `(x, y)` to `(a x + c y + e, b x + d y + f)`. */
1048
- type AffineMatrix = readonly [number, number, number, number, number, number];
1049
- /** Applies an affine transform to every point (exact for Bézier curves). */
1050
- declare function transformBezierPath(input: BezierPathInput, m: AffineMatrix): BezierPath;
1051
- /** Number of drawing segments (`L` / `Q` / `C`, plus the closing line of `Z` when it has length). */
1052
- declare function countPathSegments(input: BezierPathInput): {
1053
- lines: number;
1054
- quads: number;
1055
- cubics: number;
1056
- };
1057
- /** The contour's segments, with the closing line added when the contour is closed (or filled). */
1058
- declare function closeContour(contour: BezierContour, force?: boolean): BezierSegment[];
1059
- /** Exact bounds of a path, or `null` when it has no points. */
1060
- declare function bezierPathBounds(input: BezierPathInput): {
1061
- minX: number;
1062
- minY: number;
1063
- maxX: number;
1064
- maxY: number;
1065
- } | null;
1066
- /**
1067
- * Signed area of the path as drawn: every subpath closed, contributions summed (positive
1068
- * for counter-clockwise subpaths in a y-up frame). Exact for curves. Overlapping subpaths
1069
- * count with their multiplicity; use `bezierPathArea` for the filled area.
1070
- */
1071
- declare function bezierPathSignedArea(input: BezierPathInput): number;
1072
- /** Signed area of a closed chain of segments. */
1073
- declare function contourSignedArea(segs: readonly BezierSegment[]): number;
1074
- /** Arc length of a path (closing lines of closed subpaths included). */
1075
- declare function bezierPathLength(input: BezierPathInput): number;
1076
- /** Point, unit tangent and angle (radians) at an arc length along the path. */
1077
- interface PathPointAtLength {
1078
- point: Point;
1079
- tangent: Point;
1080
- angle: number;
1081
- /** Subpath index. */
1082
- contour: number;
1083
- /** Segment index within the subpath (closing line last). */
1084
- segment: number;
1085
- /** Parameter within the segment. */
1086
- t: number;
1087
- }
1088
- /**
1089
- * The point at arc length `length` from the start of the path (clamped to the path). Arc
1090
- * lengths run through the subpaths in order, as `bezierPathLength` counts them.
1091
- */
1092
- declare function bezierPathPointAtLength(input: BezierPathInput, length: number): PathPointAtLength | null;
1093
- /**
1094
- * Splits a segment chain by arc length: the part between `from` and `to` (measured from the
1095
- * chain's start) as new segments.
1096
- */
1097
- declare function trimSegments(segs: readonly BezierSegment[], from: number, to: number, lengths?: number[]): Point[][];
1098
- /**
1099
- * Winding number of a set of closed segment chains around `point` (ray to +x, half-open
1100
- * crossing rule). Points exactly on the outline may report either side.
1101
- */
1102
- declare function windingNumber(chains: readonly (readonly BezierSegment[])[], point: Point): number;
1103
- /** Whether `point` is inside the filled path (every subpath closed for filling). */
1104
- declare function pointInBezierPath(input: BezierPathInput, point: Point, fillRule?: PolygonFillRule): boolean;
1105
- /** Distance from `point` to the path outline (closing lines of closed subpaths included). */
1106
- declare function distanceToBezierPath(input: BezierPathInput | readonly BezierContour[], point: Point): number;
1107
-
1108
568
  /** Boolean operations (same names as `polygonBoolean`). `xor` is Exclude. */
1109
569
  type PathBooleanOperation = PolygonBooleanOperation;
1110
570
  /** A path with the fill rule it is read with (default `nonzero`). */
@@ -3494,4 +2954,4 @@ declare function createCanvasDrawController<TNode extends CanvasNode = CanvasNod
3494
2954
  };
3495
2955
  type CanvasDrawController = ReturnType<typeof createCanvasDrawController>;
3496
2956
 
3497
- 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_GRADIENT_PRESETS, 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, type CanvasDrawController, type CanvasDrawControllerOptions, CanvasEdge, type CanvasGradientDef, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, type CanvasLinearGradient, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasRadialGradient, 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 FreehandDrawOptions, type FreehandStroke, type FreehandStrokeStyle, type FreehandTool, type GetShapeRenderDataOptions, type GradientStop, 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, type StrokeToShapeNodeOptions, type SvgGradientDef, type SvgGradientStop, TOKEN_BINDINGS_DATA_KEY, TOKEN_MODES_DATA_KEY, type TimelineKeyframe, type TimelineRow, type TimelineRowsOptions, TrajectoryFunction, type WebAnimationSpec, XYPosition, ZOrderOperation, addCanvasVariant, addKeyframesAtTime, angleToSvgLinearCoords, 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, createCanvasDrawController, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, dashContours, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diffOverrideGroups, distanceToBezierPath, dividePaths, dividePolygons, ensureLayout, estimateCanvasHeight, estimateNodeSize, evaluateAnimation, excludePaths, exportCssAnimation, findConnectorSnap, findStrokesAtPoint, 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, gradientToSvgDef, handlePoint, hasVisibleStroke, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, intersectPaths, intersectPolygons, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasGradient, 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, parseCssGradient, 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, resolveCanvasGradient, 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, streamlinePoints, strokeBoundingBox, strokeOutlineRings, strokePointsToPathData, strokeToShapeNode, subSegment, subtractPaths, subtractPolygons, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toBezierPath, toWebAnimations, transformBezierPath, trimSegments, unionPolygons, unitePaths, updateKeyframe, windingNumber, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime, xorPolygons };
2957
+ export { ANIMATABLE_PROPERTIES, ANIMATION_DATA_KEY, AUTO_LAYOUT_DATA_KEY, type AddCanvasVariantOptions, 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, BezierContour, BezierPath, BezierPathInput, 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, type CanvasDrawController, type CanvasDrawControllerOptions, CanvasEdge, CanvasGradientDef, 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 EvaluateAnimationOptions, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FreehandDrawOptions, type FreehandStroke, type FreehandStrokeStyle, type FreehandTool, 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 NodeAnimation, NodeRectOptions, NodeTransition, type OffsetPathOptions, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, type OutlineStrokeOptions, type PathBooleanOperation, type PathBooleanResult, type PathOperand, type PathOperandInput, PathOpsError, type PathOpsOptions, type PathOpsReport, type PathPiece, PlaceBesideOptions, Point, PolygonBooleanOperation, PolygonFillRule, PolygonRing, Position, type PositionChangeLike, RESIZE_HANDLES, type RecordAnimationOptions, Rect, ReflowDisplacementOptions, type ResizeHandle, SHAPE_DATA_KEY, SHAPE_NODE_TYPE, SHAPE_OPERATIONS, type SampleAnimationOptions, type ScaleKeyframesOptions, type SerializedCanvasScenes, type SetCanvasVariantPropertiesOptions, type SetKeyframeOptions, ShapeDescription, type ShapeNodePolygonOptions, type ShapeOperation, type ShapePathEditOperation, type ShapePathEditRefusal, type ShapePathEditResult, ShapeSize, Side, SizeDimension, type SnapGuidesOptions, type SnapNodeDragOptions, type SnapNodeDragResult, type SnapNodeResizeOptions, type SnapNodeResizeResult, type SnapResizeOptions, type SnapResizeResult, type SnapResult, StreamingLayoutManager, type StreamingLayoutManagerOptions, type StrokeCap, type StrokeJoin, type StrokeToShapeNodeOptions, 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, bezierPathArea, bindCanvasComponentProperty, bindCanvasToken, blendLayout, boundsOf, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, centerNodes, centre, clampAnimationValue, clampLayoutSize, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeNodesBoundingBox, computeSnapGuides, connectedOnly, copyKeyframes, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasComponent, createCanvasComponentsController, createCanvasDrawController, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, dashContours, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diffOverrideGroups, dividePaths, ensureLayout, estimateCanvasHeight, estimateNodeSize, evaluateAnimation, excludePaths, exportCssAnimation, findConnectorSnap, findStrokesAtPoint, findVariant, fitCubicRun, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flowSide, formatAnimationTime, 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, getTimelineRows, getTimelineTicks, getTokenPropertyScope, getTokensForProperty, getVariantConflicts, getVariantOptions, getVariantSet, getVariantValues, handlePoint, hasVisibleStroke, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, intersectPaths, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasComponents, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, moveKeyframes, moveLayoutChild, nearestHandlePositions, normalizeBezierPath, offsetPath, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, outlineStroke, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseNodeStyleDeclarations, parseVariantName, pasteKeyframes, pathBoolean, placeBeside, playWebAnimations, positionToSide, pruneCanvasTokenModes, pushCanvasInstanceOverrides, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, serializeCanvasNodes, setCanvasComponentProperty, setCanvasInstanceProperties, setCanvasTokenMode, setCanvasVariantProperties, setKeyframe, setKeyframeEasing, setMotionPath, setTrackEnabled, shapeNodeToBezierPath, shapeNodeToPolygon, shapeToBezierPath, sideToPosition, snapKeyframeDelta, snapNodeDrag, snapNodeResize, snapResize, snapTimeToFrame, snapToGrid, streamlinePoints, strokeBoundingBox, strokeOutlineRings, strokePointsToPathData, strokeToShapeNode, subtractPaths, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toWebAnimations, unitePaths, updateKeyframe, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime };