@pixerate/editor 0.41.0 → 0.43.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,4 +1,4 @@
1
- import { C as CanvasGradientDef, A as AffineMatrix, B as BezierPathInput, a as BezierPath, S as SvgGradientDef, b as StrokeJoin, c as StrokeCap, d as BezierSegment, P as PlanarMap, e as PathfinderOperation, f as PathfinderShape, G as GradientStop } from '../pathfinder-D7hXenzu.js';
1
+ import { C as CanvasGradientDef, A as AffineMatrix, B as BezierPathInput, a as BezierPath, S as SvgGradientDef, b as StrokeJoin, c as StrokeCap, d as BezierSegment, P as PlanarMap, e as PathfinderOperation, f as PathfinderShape } from '../pathfinder-D98S2lV5.js';
2
2
  import { P as Point } from '../types-BFkYA4eF.js';
3
3
  import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
4
4
  import { C as CommandSpec } from '../registry-DhVUZioj.js';
@@ -58,8 +58,93 @@ interface VectorSubpath {
58
58
  /** Joins the last anchor back to the first. */
59
59
  closed: boolean;
60
60
  }
61
+ /**
62
+ * Gradient styles: `linear` (start → end), `radial` (centred on the start, reaching the end;
63
+ * focal point and aspect), `conic` (an angle sweep around the start, from the end's direction
64
+ * towards the aspect handle's: clockwise on screen), `reflected` (linear mirrored about the
65
+ * start) and `diamond` (`|u| + |v|` in the gradient's frame: a rhombus through the end and the
66
+ * aspect handle).
67
+ */
68
+ type VectorGradientType = 'linear' | 'radial' | 'conic' | 'reflected' | 'diamond';
69
+ declare const VECTOR_GRADIENT_TYPES: readonly VectorGradientType[];
70
+ /** What a gradient paints past its ends: the end colours, mirrored periods or repeated periods. */
71
+ type VectorGradientSpread = 'pad' | 'reflect' | 'repeat';
72
+ declare const VECTOR_GRADIENT_SPREADS: readonly VectorGradientSpread[];
73
+ /** Where colours mix between stops: sRGB (SVG's own), linear light or Oklab. */
74
+ type VectorGradientInterpolation = 'srgb' | 'linear' | 'oklab';
75
+ declare const VECTOR_GRADIENT_INTERPOLATIONS: readonly VectorGradientInterpolation[];
76
+ /**
77
+ * The space a gradient's points are in: fractions of the shape's bounding box (SVG's
78
+ * `objectBoundingBox`, the default) or the node's own coordinates (`userSpaceOnUse`).
79
+ */
80
+ type VectorGradientUnits = 'objectBoundingBox' | 'userSpaceOnUse';
81
+ /**
82
+ * How a gradient lies on a stroke: `within` (laid over the stroke's area like a fill), `along`
83
+ * (t runs from 0 at the start of each subpath to 1 at its end) or `across` (from the stroke's
84
+ * left edge to its right edge, looking along the path).
85
+ */
86
+ type VectorStrokeGradientMode = 'within' | 'along' | 'across';
87
+ declare const VECTOR_STROKE_GRADIENT_MODES: readonly VectorStrokeGradientMode[];
88
+ /** A colour stop. `opacity` multiplies the colour's own alpha. */
89
+ interface VectorGradientStop {
90
+ /** 0–1. */
91
+ offset: number;
92
+ color: string;
93
+ /** 0–1, default 1. */
94
+ opacity?: number;
95
+ /**
96
+ * Where, between this stop and the next (0–1 of the way), the colour is half-way between
97
+ * them. Default 0.5 (an even mix).
98
+ */
99
+ midpoint?: number;
100
+ }
101
+ /**
102
+ * A gradient paint. `CanvasGradientDef` (the canvas package's linear `angle` / radial
103
+ * `cx, cy, r` gradients) is a valid value: those fields are the shorthand form. Explicit
104
+ * geometry (`start` / `end`, in `units`) wins over the shorthand.
105
+ */
106
+ interface VectorGradient {
107
+ type: VectorGradientType;
108
+ stops: VectorGradientStop[];
109
+ /**
110
+ * Shorthand direction in degrees, CSS style (0 points up, clockwise): a linear or reflected
111
+ * gradient's direction across the box (default 180), a conic gradient's start angle or a
112
+ * diamond's turn (default 90).
113
+ */
114
+ angle?: number;
115
+ /** Shorthand centre and radius of radial, conic and diamond gradients (fractions of the box, default 0.5). */
116
+ cx?: number;
117
+ cy?: number;
118
+ r?: number;
119
+ /** Where t = 0: a linear gradient's start, the centre of the other styles. */
120
+ start?: Vec2;
121
+ /** Where t = 1 along the gradient's main axis (a radial gradient's radius). */
122
+ end?: Vec2;
123
+ /**
124
+ * The end of the secondary axis (radial, conic and diamond): its distance from `start` over
125
+ * the main axis' length is the aspect ratio. Absent: square to the main axis, as long.
126
+ */
127
+ width?: Vec2 | null;
128
+ /** A radial gradient's focal point (where t = 0); absent: the centre. */
129
+ focal?: Vec2 | null;
130
+ /** Radius of the focal circle as a fraction of the radius (SVG `fr`, default 0). */
131
+ focalRadius?: number;
132
+ /** Space of `start`, `end`, `width` and `focal` (default `objectBoundingBox`). */
133
+ units?: VectorGradientUnits;
134
+ /** Default `pad`. */
135
+ spread?: VectorGradientSpread;
136
+ /** Default `srgb`. */
137
+ interpolation?: VectorGradientInterpolation;
138
+ /**
139
+ * 0–1: how far the colours follow a smooth spline through the stops instead of straight
140
+ * lines (Photoshop's Smoothness). Default 0.
141
+ */
142
+ smoothness?: number;
143
+ /** On a stroke: how the gradient lies on it (default `within`). Ignored on fills. */
144
+ strokeMode?: VectorStrokeGradientMode;
145
+ }
61
146
  /** A fill or stroke: any CSS colour, a gradient, or `null` / `'none'` for no paint. */
62
- type VectorPaint = string | CanvasGradientDef | null;
147
+ type VectorPaint = string | VectorGradient | CanvasGradientDef | null;
63
148
  type VectorFillRule = 'nonzero' | 'evenodd';
64
149
  type VectorLineCap = 'butt' | 'round' | 'square';
65
150
  type VectorLineJoin = 'miter' | 'round' | 'bevel';
@@ -138,6 +223,17 @@ interface VectorNodeBase {
138
223
  * the blend options change, and are locked (clicks select the blend group).
139
224
  */
140
225
  blendStep?: boolean;
226
+ /**
227
+ * Live path effects, applied top to bottom: each acts on every path above it (the node's own
228
+ * outline, or a group's children, then the result of the effects before it), and effects after a
229
+ * repeater act on its copies. The stored anchors and children never change.
230
+ */
231
+ effects?: VectorEffect[] | null;
232
+ /**
233
+ * As an operand of a live boolean group: how it combines with the result of the operands below
234
+ * it. Absent: the group's `liveBoolean` operation.
235
+ */
236
+ booleanOperation?: VectorBooleanOperation | null;
141
237
  }
142
238
  /** A shape made of one or more subpaths (holes and compound shapes included). */
143
239
  interface VectorPathNode extends VectorNodeBase, VectorStyle {
@@ -183,6 +279,12 @@ interface VectorGroupNode extends VectorNodeBase {
183
279
  * stacking order, and the steps between them are regenerated whenever a key changes.
184
280
  */
185
281
  blend?: VectorBlend | null;
282
+ /**
283
+ * Makes the group a live boolean: its children stay editable operands, folded bottom to top
284
+ * (each by its own `booleanOperation` or this one), and the group draws as the result in the
285
+ * bottom operand's style.
286
+ */
287
+ liveBoolean?: VectorBooleanOperation | null;
186
288
  }
187
289
  type VectorNode = VectorPathNode | VectorGroupNode;
188
290
  /** A vector drawing: an artboard and its nodes, bottom to top. */
@@ -219,7 +321,7 @@ interface VectorHandleRef extends VectorAnchorRef {
219
321
  * blends the shape clicked first into the one clicked next (clicking an anchor of a closed path
220
322
  * starts the blend there).
221
323
  */
222
- type VectorTool = 'select' | 'direct' | 'pen' | 'pencil' | 'rect' | 'ellipse' | 'polygon' | 'star' | 'line' | 'scissors' | 'knife' | 'eraser' | 'width' | 'shapeBuilder' | 'paintBucket' | 'blend';
324
+ type VectorTool = 'select' | 'direct' | 'pen' | 'pencil' | 'rect' | 'ellipse' | 'polygon' | 'star' | 'line' | 'scissors' | 'knife' | 'eraser' | 'width' | 'shapeBuilder' | 'paintBucket' | 'blend' | 'gradient';
223
325
  declare const VECTOR_TOOLS: readonly VectorTool[];
224
326
  /** Keyboard modifiers held during a pointer event. */
225
327
  interface VectorModifiers {
@@ -265,6 +367,109 @@ declare const VECTOR_PATHFINDER_OPERATIONS: readonly VectorPathfinderOperation[]
265
367
  type VectorArrange = 'front' | 'forward' | 'backward' | 'back';
266
368
  /** Average: line anchors up on a horizontal line (same y), a vertical one (same x), or both. */
267
369
  type VectorAverageAxis = 'horizontal' | 'vertical' | 'both';
370
+ /**
371
+ * Live path effects (After Effects' path operators): `trim` (Trim Paths), `roundCorners`,
372
+ * `puckerBloat`, `twist`, `zigzag`, `wiggle` (Wiggle Paths), `offset` (Offset Paths), `merge`
373
+ * (Merge Paths) and `repeater`.
374
+ */
375
+ type VectorEffectType = 'trim' | 'roundCorners' | 'puckerBloat' | 'twist' | 'zigzag' | 'wiggle' | 'offset' | 'merge' | 'repeater';
376
+ declare const VECTOR_EFFECT_TYPES: readonly VectorEffectType[];
377
+ /** Merge Paths modes: a compound path (no boolean), union, the first minus the others, intersection or exclusion. */
378
+ type VectorMergeMode = 'merge' | 'add' | 'subtract' | 'intersect' | 'exclude';
379
+ declare const VECTOR_MERGE_MODES: readonly VectorMergeMode[];
380
+ /** Parameters of each effect type. Lengths are in the node's own units, angles in degrees, percentages 0–100. */
381
+ interface VectorEffectParamsMap {
382
+ trim: {
383
+ /** Start and end of the kept part, percent of the length (swapped when start > end). */
384
+ start: number;
385
+ end: number;
386
+ /** Shifts both, in degrees (360° = once round). */
387
+ offset: number;
388
+ /**
389
+ * `simultaneous`: every path trimmed by the same fractions of its own length;
390
+ * `individual`: the paths laid end to end in stacking order and trimmed as one length.
391
+ */
392
+ mode: 'simultaneous' | 'individual';
393
+ };
394
+ roundCorners: {
395
+ radius: number;
396
+ };
397
+ /** Percent, −100 (pucker: spiky) to 100 (bloat: bulging). */
398
+ puckerBloat: {
399
+ amount: number;
400
+ };
401
+ twist: {
402
+ /** Turn at the farthest point from the centre (none at the centre). */
403
+ angle: number;
404
+ /** The centre as an offset from the middle of the paths' bounds. */
405
+ center: Vec2;
406
+ };
407
+ zigzag: {
408
+ /** How far the points move to either side. */
409
+ size: number;
410
+ /** Ridges per segment. */
411
+ ridges: number;
412
+ /** Rounded waves instead of sharp zig zags. */
413
+ smooth: boolean;
414
+ };
415
+ wiggle: {
416
+ /** Largest displacement. */
417
+ size: number;
418
+ /** Points added per segment. */
419
+ detail: number;
420
+ smooth: boolean;
421
+ /** Wiggles per second. */
422
+ speed: number;
423
+ /** Percent: how much neighbouring points move together. */
424
+ correlation: number;
425
+ /** Degrees (360° = one wiggle). */
426
+ phase: number;
427
+ /** The same seed (and time) always gives the same wiggle. */
428
+ seed: number;
429
+ /** Seconds: where along the wiggle's motion it is drawn. */
430
+ time: number;
431
+ };
432
+ offset: {
433
+ /** Grows (positive) or shrinks (negative) the shapes. */
434
+ amount: number;
435
+ join: VectorLineJoin;
436
+ miterLimit: number;
437
+ /** Copies, copy i offset by `amount · (i + 1 + copyOffset)`. */
438
+ copies: number;
439
+ copyOffset: number;
440
+ };
441
+ merge: {
442
+ mode: VectorMergeMode;
443
+ };
444
+ repeater: {
445
+ /** Copies, the original included; a fraction fades the last copy. */
446
+ copies: number;
447
+ /** Shifts the copies along: copy i is transformed `i + offset` times. */
448
+ offset: number;
449
+ /** Each step: move, about `anchor` turn by `rotation` and scale by `scale` percent. */
450
+ position: Vec2;
451
+ /** Offset from the middle of the paths' bounds. */
452
+ anchor: Vec2;
453
+ rotation: number;
454
+ scale: Vec2;
455
+ /** Percent opacity of the first and last copies (in between interpolated). */
456
+ startOpacity: number;
457
+ endOpacity: number;
458
+ /** `below`: each copy draws under the one before it; `above`: over it. */
459
+ composite: 'below' | 'above';
460
+ };
461
+ }
462
+ /** One entry of an effect stack. */
463
+ type VectorEffect = {
464
+ [K in VectorEffectType]: {
465
+ /** Unique within the node. */
466
+ id: string;
467
+ type: K;
468
+ /** Disabled effects are skipped. Default true. */
469
+ enabled?: boolean;
470
+ params: VectorEffectParamsMap[K];
471
+ };
472
+ }[VectorEffectType];
268
473
  /** Identifies one segment of a path node: from anchor `segment` to the next. */
269
474
  interface VectorSegmentRef {
270
475
  nodeId: string;
@@ -272,11 +477,6 @@ interface VectorSegmentRef {
272
477
  segment: number;
273
478
  }
274
479
 
275
- /**
276
- * Vector path geometry: anchors and handles to Bézier paths and back, bounds, hit-testing,
277
- * affine transforms, segment splitting, anchor-type conversion and shape factories.
278
- */
279
-
280
480
  declare const cloneAnchor: (a: VectorAnchor) => VectorAnchor;
281
481
  declare const cloneSubpath: (s: VectorSubpath) => VectorSubpath;
282
482
  /** A deep copy of a node (ids kept). */
@@ -295,7 +495,7 @@ declare function subpathSegment(sp: VectorSubpath, i: number): Point[];
295
495
  declare function subpathsToBezier(subpaths: readonly VectorSubpath[], options?: {
296
496
  corners?: boolean;
297
497
  }): BezierPath;
298
- /** The node's outline as Bézier commands. Groups have none. */
498
+ /** The node's outline as Bézier commands, as drawn (path effects applied). Groups have none. */
299
499
  declare function vectorNodeToBezier(node: VectorNode): BezierPath;
300
500
  /** SVG path data (`d`) of a path node or subpaths. */
301
501
  declare function vectorPathData(input: VectorPathNode | readonly VectorSubpath[], precision?: number): string;
@@ -321,8 +521,13 @@ declare function locateVectorNode(nodes: VectorNode[], id: string): {
321
521
  declare function collectPathNodes(node: VectorNode): VectorPathNode[];
322
522
  /** The node's local → parent matrix (identity when it has no `transform`). */
323
523
  declare function nodeMatrix(node: VectorNode): AffineMatrix;
324
- /** A path node's outline in the space `parent` maps to (default: its parent's space). */
325
- declare function vectorPathWorldBezier(node: VectorPathNode, parent?: AffineMatrix): BezierPath;
524
+ /**
525
+ * A path node's outline in the space `parent` maps to (default: its parent's space), as drawn:
526
+ * live corners cut and path effects applied (`{ effects: false }`: the stored path only).
527
+ */
528
+ declare function vectorPathWorldBezier(node: VectorPathNode, parent?: AffineMatrix, options?: {
529
+ effects?: boolean;
530
+ }): BezierPath;
326
531
  /**
327
532
  * Geometric bounds of a node (stroke width not included) in the space `parent` maps to —
328
533
  * by default the node's parent space, which for top-level nodes is the document. Null when
@@ -335,19 +540,27 @@ declare function unionBounds(list: readonly (VectorBounds | null | undefined)[])
335
540
  declare function boundsIntersect(a: VectorBounds, b: VectorBounds): boolean;
336
541
  /** A box from two corners in any order. */
337
542
  declare function boundsFromPoints(a: Vec2, b: Vec2): VectorBounds;
543
+ /** Options of `hitTestVectorNode`. */
544
+ interface VectorHitTestOptions {
545
+ /**
546
+ * Live groups (live booleans or groups with effects) hit by their children as stored rather
547
+ * than by what they draw: the groups being edited.
548
+ */
549
+ entered?: ReadonlySet<string>;
550
+ }
338
551
  /**
339
- * Whether `p` hits a node: inside its fill (when it has one), on its stroke as drawn (its
340
- * alignment and arrowheads respected) or within `tolerance` of either. A group is hit when
341
- * any visible child is.
552
+ * Whether `p` hits a node as drawn (path effects and live booleans applied): inside its fill
553
+ * (when it has one), on its stroke (its alignment and arrowheads respected) or within
554
+ * `tolerance` of either. A group is hit when any visible child is.
342
555
  */
343
- declare function hitTestVectorNode(node: VectorNode, p: Vec2, tolerance?: number, parent?: AffineMatrix): boolean;
556
+ declare function hitTestVectorNode(node: VectorNode, p: Vec2, tolerance?: number, parent?: AffineMatrix, options?: VectorHitTestOptions): boolean;
344
557
  /**
345
558
  * The area a path node's stroke paints (alignment, caps, joins, dashes and arrowheads
346
559
  * included), as a filled path in the space `parent` maps to. Empty without a stroke.
347
560
  */
348
561
  declare function vectorStrokeOutline(node: VectorPathNode, parent?: AffineMatrix): BezierPath;
349
562
  /** The topmost node hit by `p` (skipping hidden and locked ones), or null. */
350
- declare function hitTestVectorNodes(nodes: readonly VectorNode[], p: Vec2, tolerance?: number): VectorNode | null;
563
+ declare function hitTestVectorNodes(nodes: readonly VectorNode[], p: Vec2, tolerance?: number, options?: VectorHitTestOptions): VectorNode | null;
351
564
  interface NearestSegment {
352
565
  subpath: number;
353
566
  segment: number;
@@ -444,6 +657,257 @@ declare function lineSubpath(a: Vec2, b: Vec2): VectorSubpath;
444
657
  /** Rounds every coordinate to `precision` decimals (stable JSON and SVG output). */
445
658
  declare function roundSubpaths(subpaths: readonly VectorSubpath[], precision?: number): VectorSubpath[];
446
659
 
660
+ /** True when `paint` is a gradient (any style). */
661
+ declare function isVectorGradient(paint: VectorPaint | undefined): paint is VectorGradient;
662
+ /** Straight-alpha sRGB channels, 0–1. */
663
+ type VectorRgba = [number, number, number, number];
664
+ /** A CSS colour as 0–1 channels (hex, `rgb()`, `transparent`, `black`, `white`), or null. */
665
+ declare function parseVectorColor(color: string): VectorRgba | null;
666
+ /** Fewest stops a gradient keeps when one is removed. */
667
+ declare const VECTOR_GRADIENT_MIN_STOPS = 2;
668
+ /**
669
+ * Where relative position `u` of a segment lands once its midpoint is `m` (0.5 = unchanged): the
670
+ * colour is half-way at `m`, linear on either side (photocraft `midpoint_remap`).
671
+ */
672
+ declare function gradientMidpointRemap(u: number, m: number): number;
673
+ /** The stops sorted by offset (stable), offsets clamped to 0–1, unreadable offsets dropped. */
674
+ declare function sortedVectorGradientStops(g: Pick<VectorGradient, 'stops'>): VectorGradientStop[];
675
+ /** Does the gradient need extra stops to look the same in SVG (midpoints, smoothness or a non-sRGB space)? */
676
+ declare function vectorGradientNeedsExpansion(g: VectorGradient): boolean;
677
+ /** A gradient's colour ramp, prepared for sampling. */
678
+ interface VectorGradientRamp {
679
+ /** Straight-alpha sRGB at `t` (clamped to 0–1). */
680
+ sample(t: number): VectorRgba;
681
+ }
682
+ /**
683
+ * The colour ramp of a gradient (midpoints, smoothness and interpolation space applied), or null
684
+ * when a stop colour is not one `parseVectorColor` reads.
685
+ */
686
+ declare function vectorGradientRamp(g: Pick<VectorGradient, 'stops' | 'interpolation' | 'smoothness'>): VectorGradientRamp | null;
687
+ /** What the gradient paints at `t` (0–1 along its stops): `#rrggbb` and opacity. */
688
+ declare function sampleVectorGradient(g: VectorGradient, t: number): {
689
+ color: string;
690
+ opacity: number;
691
+ };
692
+ /**
693
+ * Plain stops (no midpoints) that SVG's sRGB interpolation turns into the gradient's colours:
694
+ * the stops as they are when nothing needs expanding; one extra stop per off-centre midpoint for
695
+ * sRGB without smoothness (exact: the midpoint makes each half linear); otherwise stops placed
696
+ * adaptively until linear interpolation between them is within `tolerance` (0–1 per channel,
697
+ * default half a level) of the true curve everywhere they were checked.
698
+ */
699
+ declare function expandVectorGradientStops(g: VectorGradient, options?: {
700
+ tolerance?: number;
701
+ }): VectorGradientStop[];
702
+ /** Linear interpolation between plain stops (what SVG draws from them), straight alpha. */
703
+ declare function samplePlainStops(stops: readonly VectorGradientStop[], t: number): VectorRgba;
704
+ /** The gradient with its stops reversed, each midpoint measured from the other side (vectorcraft `reverse`). */
705
+ declare function reverseVectorGradient<T extends Pick<VectorGradient, 'stops'>>(g: T): T;
706
+ /** A stop added at `offset` painting what the gradient paints there; returns the stops and its index. */
707
+ declare function insertVectorGradientStop(g: VectorGradient, offset: number): {
708
+ stops: VectorGradientStop[];
709
+ index: number;
710
+ };
711
+ /** Stop `index` moved to `offset` (re-sorted); returns the stops and its new index. */
712
+ declare function moveVectorGradientStop(stops: readonly VectorGradientStop[], index: number, offset: number): {
713
+ stops: VectorGradientStop[];
714
+ index: number;
715
+ };
716
+ /** The stops without stop `index`, or null when that would leave fewer than two. */
717
+ declare function removeVectorGradientStop(stops: readonly VectorGradientStop[], index: number): VectorGradientStop[] | null;
718
+ /** Where (0–1 along the gradient) the midpoint after stop `index` sits, or null for the last stop. */
719
+ declare function vectorGradientMidpointPosition(stops: readonly VectorGradientStop[], index: number): number | null;
720
+ /** The midpoint of stop `index` that puts it at position `pos` (clamped to 0.05–0.95), or null. */
721
+ declare function vectorGradientMidpointFromPosition(stops: readonly VectorGradientStop[], index: number, pos: number): number | null;
722
+ /**
723
+ * The part of the gradient from `from` to `to` (0–1, either order) as plain stops over 0–1
724
+ * (vectorcraft `span`): the colours at both ends plus the expanded stops between them.
725
+ */
726
+ declare function spanVectorGradientStops(g: VectorGradient, from: number, to: number, expanded?: VectorGradientStop[]): VectorGradientStop[];
727
+ /** A gradient's frame points, in its units (see `VectorGradient`). */
728
+ interface VectorGradientPoints {
729
+ start: Vec2;
730
+ end: Vec2;
731
+ width: Vec2;
732
+ focal: Vec2 | null;
733
+ focalRadius: number;
734
+ units: VectorGradientUnits;
735
+ }
736
+ /** Whether the gradient carries its own points (rather than the angle / centre shorthand). */
737
+ declare const hasExplicitGradientGeometry: (g: VectorGradient) => boolean;
738
+ /** The gradient's frame points in its units, the shorthand resolved (it is always in the box). */
739
+ declare function vectorGradientPoints(g: VectorGradient): VectorGradientPoints;
740
+ /**
741
+ * The unit box → `bounds` matrix of `objectBoundingBox` gradients. A side with no extent (a
742
+ * horizontal or vertical line) takes the other side's, centred, so the gradient still paints
743
+ * (SVG paints nothing there).
744
+ */
745
+ declare function vectorBoxMatrix(bounds: VectorBounds | null | undefined): VectorMatrix;
746
+ /** The gradient's units → node space (the box matrix for `objectBoundingBox`, else the identity). */
747
+ declare function vectorGradientUnitsMatrix(g: VectorGradient, bounds: VectorBounds | null | undefined): VectorMatrix;
748
+ /** The gradient's unit frame → node space: u = 1 at the end, v = 1 at the width point. */
749
+ declare function vectorGradientMatrix(g: VectorGradient, bounds: VectorBounds | null | undefined): VectorMatrix;
750
+ /**
751
+ * t of a radial gradient at unit-frame point `q` with the focal circle centred on `f` with radius
752
+ * `fr` and the end circle the unit circle (SVG's two-point conical gradient). With `fr = 0` this
753
+ * is the focal ray: t is the distance from the focal point to `q` over the distance from it to
754
+ * the circle along the same ray (effectcraft `GradientRamp::t`, vectorcraft `param_at`).
755
+ */
756
+ declare function vectorGradientFocalParam(q: Vec2, f?: Vec2, fr?: number): number;
757
+ /**
758
+ * The raw gradient parameter (before the spread) of a style at unit-frame point `q`: linear `u`,
759
+ * reflected `|u|`, diamond `|u| + |v|`, conic the turn from the u axis towards the v axis (0–1),
760
+ * radial the distance through the focal circle (photocraft `gradient_t`).
761
+ */
762
+ declare function vectorGradientParam(type: VectorGradientType, q: Vec2, focal?: {
763
+ f: Vec2;
764
+ fr: number;
765
+ } | null): number;
766
+ /** `t` folded into 0–1 by a spread mode. */
767
+ declare function applyVectorGradientSpread(t: number, spread?: VectorGradientSpread): number;
768
+ /** The gradient's t (spread applied) at node-space point `p` of a shape with box `bounds`. */
769
+ declare function vectorGradientTAt(g: VectorGradient, bounds: VectorBounds | null | undefined, p: Vec2): number;
770
+ /** What the gradient paints at node-space point `p` (straight-alpha sRGB, 0–1). */
771
+ declare function sampleVectorGradientAt(g: VectorGradient, bounds: VectorBounds | null | undefined, p: Vec2): VectorRgba;
772
+ /** The main axis length over the secondary's: |width − start| / |end − start| (signed by side). */
773
+ declare function vectorGradientAspect(g: VectorGradient): number;
774
+ /** The gradient with explicit points (in its units) replacing the shorthand. */
775
+ declare function explicitVectorGradient(g: VectorGradient): VectorGradient;
776
+ /**
777
+ * The gradient in the node's own space (`userSpaceOnUse`), painting what it paints on a shape
778
+ * with box `bounds` (vectorcraft `GradientPaint::pin`): its points mapped through the box.
779
+ */
780
+ declare function pinVectorGradient(g: VectorGradient, bounds: VectorBounds | null | undefined): VectorGradient;
781
+ /**
782
+ * The gradient after the node's geometry is mapped by `m`: a `userSpaceOnUse` gradient's points
783
+ * are mapped too (any affine map keeps every style's t, since t is measured in the frame the
784
+ * three points span); a box gradient follows the box and is unchanged.
785
+ */
786
+ declare function transformVectorGradient(g: VectorGradient, m: VectorMatrix): VectorGradient;
787
+ /** A paint after its node's geometry is mapped by `m` (colours unchanged). */
788
+ declare function transformVectorPaint<T extends VectorPaint | undefined>(paint: T, m: VectorMatrix): T;
789
+ /**
790
+ * An on-canvas handle of a gradient: `start` (a radial, conic or diamond gradient's centre),
791
+ * `end` (a linear or reflected gradient's end), `radius` (the end of the others), `aspect` (the
792
+ * secondary axis' end) and `focal` (radial).
793
+ */
794
+ type VectorGradientHandle = 'start' | 'end' | 'radius' | 'aspect' | 'focal';
795
+ /** Whether the style has a centre with a radius (rather than a start and an end). */
796
+ declare const isCentredVectorGradient: (type: VectorGradientType) => type is "radial" | "conic" | "diamond";
797
+ /** The handles of a gradient in the space `toWorld` maps the node's space to (the document, the screen). */
798
+ declare function vectorGradientHandles(g: VectorGradient, bounds: VectorBounds | null | undefined, toWorld?: VectorMatrix): {
799
+ start: Vec2;
800
+ end: Vec2;
801
+ aspect: Vec2 | null;
802
+ focal: Vec2 | null;
803
+ };
804
+ /**
805
+ * The gradient (pinned to the node's space) with a handle dragged to node-space point `to`.
806
+ * `start` moves the whole gradient by `to − from`; `end` / `radius` move the end, the secondary
807
+ * axis and focal point following; `aspect` sets the secondary axis' length square to the main
808
+ * one; `focal` sets the focal point (pulled inside the circle; null centres it).
809
+ */
810
+ declare function moveVectorGradientHandle(g: VectorGradient, bounds: VectorBounds | null | undefined, handle: VectorGradientHandle, to: Vec2, from?: Vec2): VectorGradient;
811
+ /** The gradient set to run from `start` to `end` (node space), its secondary axis square to it with its aspect kept. */
812
+ declare function setVectorGradientVector(g: VectorGradient, bounds: VectorBounds | null | undefined, start: Vec2, end: Vec2): VectorGradient;
813
+ /** Most periods a spread is expanded to (vectorcraft `MAX_PERIODS`). */
814
+ declare const VECTOR_GRADIENT_MAX_PERIODS = 64;
815
+ /**
816
+ * Stops repeating the gradient's plain stops over periods `lo` … `hi` (integers, at most
817
+ * `VECTOR_GRADIENT_MAX_PERIODS`), period `k` mirrored when `mirrored(k)`; offsets over 0–1 span
818
+ * the whole range (vectorcraft `spread::expand`, which emulates `reflect` and `repeat` this way).
819
+ */
820
+ declare function periodicVectorGradientStops(stops: readonly VectorGradientStop[], lo: number, hi: number, mirrored: (k: number) => boolean): VectorGradientStop[];
821
+ /**
822
+ * A linear or reflected gradient's spread as stop periods over `area` (node space), for
823
+ * renderers (and combinations) without the spread mode: vectorcraft's SVG import emulates
824
+ * `reflect` and `repeat` this way. Returns where the periods start and end and their stops, or
825
+ * null when a linear gradient pads (nothing to repeat). Reflected gradients always get at least
826
+ * the period either side of the start (the one before it mirrored). `from` / `to` are the
827
+ * periods' ends along the frame's u axis (`matrix` maps the frame to node space).
828
+ */
829
+ declare function expandVectorGradientSpread(g: VectorGradient, bounds: VectorBounds | null | undefined, area: VectorBounds): {
830
+ start: Vec2;
831
+ end: Vec2;
832
+ from: number;
833
+ to: number;
834
+ matrix: VectorMatrix;
835
+ stops: VectorGradientStop[];
836
+ capped: boolean;
837
+ } | null;
838
+ /**
839
+ * A `<pattern>` paint server in user space: draw `gradients` (inside it or in `<defs>`) and then
840
+ * each tile (`d` filled with `fill`) in order, all in the painted element's user space (the
841
+ * `viewBox` in `attrs` matches the tile, so keep it). Conic and diamond gradients, and gradients along
842
+ * or across a stroke, take this form.
843
+ */
844
+ interface VectorSvgPatternDef {
845
+ id: string;
846
+ type: 'pattern';
847
+ /** `x`, `y`, `width`, `height`, `patternUnits="userSpaceOnUse"` and the matching `viewBox`. */
848
+ attrs: Record<string, string | number>;
849
+ gradients: SvgGradientDef[];
850
+ tiles: {
851
+ d: string;
852
+ fill: string;
853
+ }[];
854
+ }
855
+ /** A paint server for `fill` / `stroke`: a gradient element or a pattern of gradient tiles. */
856
+ type VectorPaintDef = SvgGradientDef | VectorSvgPatternDef;
857
+ interface VectorGradientSvgOptions {
858
+ /** The shape's box in its own space (for `objectBoundingBox` gradients). */
859
+ bounds?: VectorBounds | null;
860
+ /** The area the paint must cover (pattern tiles, spread periods); default `bounds` padded by 1. */
861
+ area?: VectorBounds | null;
862
+ /** Wedges of a conic gradient (default 72: 5° each). */
863
+ wedges?: number;
864
+ precision?: number;
865
+ }
866
+ /** The area a gradient on a shape with box `bounds` paints (the box padded by 1). */
867
+ declare const vectorGradientArea: (bounds: VectorBounds | null | undefined) => VectorBounds;
868
+ /**
869
+ * A user-space pattern tile over `area`. Without a `viewBox` SVG puts the content's origin at the
870
+ * tile's corner; the matching `viewBox` keeps the content in the painted element's user space.
871
+ */
872
+ declare function patternAttrs(area: VectorBounds): Record<string, string>;
873
+ /**
874
+ * The SVG paint servers of a gradient on a shape: the first def's id is `id` (reference it as
875
+ * `url(#id)`), any others are what it uses. All are in the user space of the element painted
876
+ * (the node's own space).
877
+ */
878
+ declare function vectorGradientSvgDefs(g: VectorGradient, id: string, options?: VectorGradientSvgOptions): VectorPaintDef[];
879
+ /**
880
+ * What a `userSpaceOnUse` paint server from `vectorGradientSvgDefs` paints at point `p` (straight
881
+ * alpha, 0–1) the way an SVG renderer would: a gradient's stops interpolated in sRGB, a pattern's
882
+ * topmost tile containing `p`. Null for a point no tile covers.
883
+ */
884
+ declare function sampleVectorPaintDefAt(defs: readonly VectorPaintDef[], id: string, p: Vec2): VectorRgba | null;
885
+ /**
886
+ * A gradient from untrusted input (agent commands, SVG data attributes), or null when it is not
887
+ * one: unknown fields dropped, numbers clamped, at least one stop.
888
+ */
889
+ declare function sanitizeVectorGradient(input: unknown): VectorGradient | null;
890
+ /**
891
+ * A gradient changed to style `type`, keeping its stops, colour settings and placement: explicit
892
+ * points stay where they are (a linear end becomes a radius), shorthand is redone for the style.
893
+ */
894
+ declare function convertVectorGradient(g: VectorGradient, type: VectorGradientType): VectorGradient;
895
+ /** A default gradient for a paint that was a colour (or nothing): the colour fading to white. */
896
+ declare function defaultVectorGradient(type?: VectorGradientType, from?: VectorPaint): VectorGradient;
897
+ /**
898
+ * Changes to a gradient (`vector.setGradient`, the gradient editor): any gradient field, plus
899
+ * `aspect` (the secondary axis' length over the main one, square to it) and `reverse`. `focal` or
900
+ * `width` set to null removes them.
901
+ */
902
+ interface VectorGradientPatch extends Partial<Omit<VectorGradient, 'focal' | 'width'>> {
903
+ focal?: Vec2 | null;
904
+ width?: Vec2 | null;
905
+ aspect?: number;
906
+ reverse?: boolean;
907
+ }
908
+ /** `g` with `patch` applied (a style change converts it first), or null when the result is not a gradient. */
909
+ declare function applyVectorGradientPatch(g: VectorGradient, patch: VectorGradientPatch): VectorGradient | null;
910
+
447
911
  interface VectorSvgExportOptions {
448
912
  /** Decimal places for coordinates (default 3). */
449
913
  precision?: number;
@@ -466,10 +930,23 @@ interface VectorSvgExportOptions {
466
930
  declare function vectorCornersAttribute(subpaths: readonly VectorSubpath[], precision?: number): string;
467
931
  /** Puts `data-vector-corners` back on subpaths (malformed entries are ignored). */
468
932
  declare function applyVectorCornersAttribute(subpaths: VectorSubpath[], value: string): VectorSubpath[];
469
- /** A paint as an SVG attribute value plus the gradient def it needs (if any). */
470
- declare function vectorPaintToSvg(paint: VectorPaint | undefined, gradientId: string): {
933
+ /** Where a paint goes: what `vectorPaintToSvg` needs to place a gradient on a shape. */
934
+ interface VectorPaintSvgOptions {
935
+ /** The path painted (its box places `objectBoundingBox` gradients; strokes need its geometry). */
936
+ node?: VectorPathNode;
937
+ /** `stroke` lays `along` / `across` gradients on the stroke and covers its reach (default `fill`). */
938
+ role?: 'fill' | 'stroke';
939
+ precision?: number;
940
+ }
941
+ /** The box of a path's drawn outline in its own space (null when it has no points). */
942
+ declare function vectorPathLocalBounds(node: VectorPathNode): VectorBounds | null;
943
+ /**
944
+ * A paint as an SVG attribute value plus the paint servers it needs (`url(#id)` refers to the
945
+ * first). Gradients sit in the painted element's user space (the node's own space).
946
+ */
947
+ declare function vectorPaintToSvg(paint: VectorPaint | undefined, gradientId: string, options?: VectorPaintSvgOptions): {
471
948
  value: string;
472
- gradient: SvgGradientDef | null;
949
+ defs: VectorPaintDef[];
473
950
  };
474
951
  /** The parts of an aligned or arrowed stroke (see `VectorRenderPath.strokeParts`). */
475
952
  interface VectorRenderStrokeParts {
@@ -700,6 +1177,85 @@ declare function pressureWidthProfile(samples: readonly {
700
1177
  tolerance?: number;
701
1178
  }): VectorWidthPoint[];
702
1179
 
1180
+ /**
1181
+ * The Gradient tool's on-canvas annotator: a bar from the start (or centre) handle to the end (or
1182
+ * radius) handle with the colour stops under it and midpoint diamonds above it, plus a radial,
1183
+ * conic or diamond gradient's extent outline, aspect handle and (radial) focal point. All in
1184
+ * screen pixels, for hit-testing and the overlay.
1185
+ *
1186
+ * After vectorcraft `crates/tools/src/xform/gradient.rs` (`Annotator`: stop chips below the bar,
1187
+ * midpoints above it, a stop dragged off the bar is removed, a click on the bar adds one), ArtCraft,
1188
+ * MIT OR Apache-2.0 — see THIRD_PARTY_NOTICES.md.
1189
+ */
1190
+
1191
+ /** Which paint of the selection the Gradient tool and the gradient editor work on. */
1192
+ type VectorGradientTarget = 'fill' | 'stroke';
1193
+ /** A part of the annotator under the pointer. */
1194
+ type VectorGradientPart = {
1195
+ kind: 'handle';
1196
+ handle: VectorGradientHandle;
1197
+ } | {
1198
+ kind: 'stop';
1199
+ index: number;
1200
+ } | {
1201
+ kind: 'midpoint';
1202
+ index: number;
1203
+ }
1204
+ /** The bar at `offset` (0–1): a click adds a stop there, a drag moves the gradient. */
1205
+ | {
1206
+ kind: 'bar';
1207
+ offset: number;
1208
+ };
1209
+ /** Distance of the stop chips below the bar, the midpoint diamonds above it (screen pixels). */
1210
+ declare const VECTOR_GRADIENT_STOP_GAP = 12;
1211
+ declare const VECTOR_GRADIENT_MIDPOINT_GAP = 9;
1212
+ /** How far off the bar a dragged stop goes before it is removed (screen pixels). */
1213
+ declare const VECTOR_GRADIENT_OFF_BAR = 24;
1214
+ interface VectorGradientAnnotator {
1215
+ nodeId: string;
1216
+ target: VectorGradientTarget;
1217
+ gradient: VectorGradient;
1218
+ /** The path's box in its own space. */
1219
+ bounds: VectorBounds | null;
1220
+ /** The path's own space → document. */
1221
+ world: AffineMatrix;
1222
+ /** Screen positions of the handles. */
1223
+ start: Vec2;
1224
+ end: Vec2;
1225
+ /** Radial, conic and diamond gradients. */
1226
+ aspect: Vec2 | null;
1227
+ /** Radial gradients. */
1228
+ focal: Vec2 | null;
1229
+ /** Unit normal to the bar towards the stop chips (screen). */
1230
+ normal: Vec2;
1231
+ /** Stops (sorted, as the gradient stores them) with their chips' screen positions. */
1232
+ stops: (VectorGradientStop & {
1233
+ index: number;
1234
+ x: number;
1235
+ y: number;
1236
+ })[];
1237
+ /** The midpoint diamond after each stop but the last (screen). */
1238
+ midpoints: {
1239
+ index: number;
1240
+ x: number;
1241
+ y: number;
1242
+ midpoint: number;
1243
+ }[];
1244
+ /** Screen path of the extent: an ellipse (radial, conic) or a rhombus (diamond). */
1245
+ extent: string | null;
1246
+ }
1247
+ /** The path whose `target` paint the annotator shows: the first path of the selection with a gradient there. */
1248
+ declare function vectorGradientTargetPath(doc: VectorDocument, selection: readonly string[], target: VectorGradientTarget): VectorPathNode | null;
1249
+ /** The annotator of the selection's gradient (`target` paint), in screen pixels, or null when it has none. */
1250
+ declare function getVectorGradientAnnotator(doc: VectorDocument, selection: readonly string[], viewport: VectorViewport, target: VectorGradientTarget): VectorGradientAnnotator | null;
1251
+ /** Where `p` lies relative to the bar: offset along it (0 at the start, 1 at the end) and distance towards the stop chips. */
1252
+ declare function vectorGradientBarPosition(a: Pick<VectorGradientAnnotator, 'start' | 'end' | 'normal'>, p: Vec2): {
1253
+ offset: number;
1254
+ across: number;
1255
+ };
1256
+ /** The annotator part under screen point `p`: stops, then midpoints, the handles and the bar. */
1257
+ declare function hitVectorGradientAnnotator(a: VectorGradientAnnotator, p: Vec2): VectorGradientPart | null;
1258
+
703
1259
  /**
704
1260
  * What a guide line shows: `align` lines run from a target through the snapped point or box,
705
1261
  * `construction` lines from where a drawn point leaves, `spacing` marks equal gaps and `size`
@@ -1037,6 +1593,8 @@ interface VectorHover {
1037
1593
  };
1038
1594
  /** A spot on a stroke away from its width points (width tool). */
1039
1595
  strokeSpot?: VectorStrokeSpot;
1596
+ /** A part of the gradient annotator (gradient tool). */
1597
+ gradient?: VectorGradientPart;
1040
1598
  }
1041
1599
  /** The drag in progress, for overlays and status text. */
1042
1600
  type VectorInteraction = {
@@ -1091,6 +1649,13 @@ type VectorInteraction = {
1091
1649
  } | {
1092
1650
  type: 'pen';
1093
1651
  nodeId: string;
1652
+ }
1653
+ /** A gradient tool drag: drawing a new vector, or a handle, stop, midpoint or the bar (`removing`: a stop dragged off the bar). */
1654
+ | {
1655
+ type: 'gradient';
1656
+ part: 'create' | VectorGradientPart['kind'];
1657
+ handle?: VectorGradientHandle;
1658
+ removing?: boolean;
1094
1659
  } | {
1095
1660
  type: 'pan';
1096
1661
  };
@@ -1136,6 +1701,11 @@ interface VectorEditorState {
1136
1701
  blendStart: VectorBlendStart | null;
1137
1702
  /** Options new blends get. */
1138
1703
  blendDefaults: VectorBlendOptions;
1704
+ /** The paint the gradient tool and gradient editor work on, and the selected stop (index into the sorted stops). */
1705
+ gradientEdit: {
1706
+ target: VectorGradientTarget;
1707
+ stop: number | null;
1708
+ };
1139
1709
  canUndo: boolean;
1140
1710
  canRedo: boolean;
1141
1711
  undoLabel: string;
@@ -1391,6 +1961,7 @@ declare class VectorEditorController {
1391
1961
  private blendStart;
1392
1962
  /** Options new blends get (the toolbars edit them along with the selected blend's). */
1393
1963
  private blendDefaults;
1964
+ private gradientEdit;
1394
1965
  /** What the highlight shows, to skip notifying when the pointer stays over the same face. */
1395
1966
  private builderHoverKey;
1396
1967
  private readonly createId;
@@ -1403,7 +1974,13 @@ declare class VectorEditorController {
1403
1974
  private revision;
1404
1975
  private state;
1405
1976
  constructor(options?: VectorEditorOptions);
1406
- /** Stops listening to the history. */
1977
+ /** Listens to the history (once; again after `destroy`). */
1978
+ private connect;
1979
+ private historyDiffers;
1980
+ /**
1981
+ * Stops listening to the history and drops all listeners. A later `subscribe` reconnects, so a
1982
+ * controller torn down by React StrictMode's double effect keeps working when it is reused.
1983
+ */
1407
1984
  destroy(): void;
1408
1985
  /** The current snapshot (stable until the next change). */
1409
1986
  getState: () => VectorEditorState;
@@ -1424,10 +2001,15 @@ declare class VectorEditorController {
1424
2001
  private cursorFor;
1425
2002
  private snapshot;
1426
2003
  private restore;
1427
- /** Records the change from `before` to the current state as one undo step. */
2004
+ /**
2005
+ * Records the change from `before` to the current state as one undo step. Consecutive
2006
+ * changes with the same `merge` key (a slider drag) fold into one step.
2007
+ */
1428
2008
  private commit;
1429
- /** Runs `fn` (which updates fields) and records it as one undo step. */
2009
+ /** Runs `fn` (which updates fields) and records it as one undo step (merged by `merge` key). */
1430
2010
  private change;
2011
+ /** Ends a merged edit (a slider released): the next change starts a new undo step. */
2012
+ endMergedEdit(): void;
1431
2013
  private setDoc;
1432
2014
  private replaceNode;
1433
2015
  private freshIds;
@@ -1520,6 +2102,47 @@ declare class VectorEditorController {
1520
2102
  } | null, options?: {
1521
2103
  ids?: readonly string[];
1522
2104
  }): VectorActionResult;
2105
+ /** Which paint (fill or stroke) the gradient tool and editor work on. */
2106
+ setGradientTarget(target: VectorGradientTarget): void;
2107
+ /** Selects a stop of the gradient being edited (index into its sorted stops), or none. */
2108
+ selectGradientStop(index: number | null): void;
2109
+ /** The gradient tool's annotator for the selection (screen pixels), or null when its paint is not a gradient. */
2110
+ getGradientAnnotator(): VectorGradientAnnotator | null;
2111
+ /** Unlocked paths of `ids` (default: the selection). */
2112
+ private gradientPaths;
2113
+ /**
2114
+ * Edits the gradient of the `target` paint (default: the editor's) of the selected (or given)
2115
+ * paths with `patch`: a colour or no paint becomes a gradient (`patch.type`, default linear,
2116
+ * from the colour to white). Consecutive edits with the same `merge` key are one undo step.
2117
+ */
2118
+ setGradient(patch: VectorGradientPatch, options?: {
2119
+ ids?: readonly string[];
2120
+ target?: VectorGradientTarget;
2121
+ label?: string;
2122
+ merge?: string;
2123
+ }): VectorActionResult;
2124
+ /** Applies `fn` to every target gradient of the selection (paths whose paint is not a gradient are skipped). */
2125
+ private editGradients;
2126
+ /** Changes stop `index` (colour, opacity, offset or midpoint) of the selection's gradients; selects it. */
2127
+ setGradientStop(index: number, patch: {
2128
+ color?: string;
2129
+ opacity?: number;
2130
+ offset?: number;
2131
+ midpoint?: number;
2132
+ }, options?: {
2133
+ merge?: string;
2134
+ }): VectorActionResult;
2135
+ /** Adds a stop at `offset` (painting what the gradient paints there) to the selection's gradients and selects it. */
2136
+ addGradientStop(offset: number): VectorActionResult;
2137
+ /** Removes stop `index` of the selection's gradients (never below two stops). */
2138
+ removeGradientStop(index: number): VectorActionResult;
2139
+ /** Reverses the selection's gradients (stops and midpoints). */
2140
+ reverseGradient(): VectorActionResult;
2141
+ /** `doc` with path `id`'s `target` paint replaced. */
2142
+ private withGradient;
2143
+ private downGradient;
2144
+ private moveGradient;
2145
+ private upGradient;
1523
2146
  /** Removes one width point of a path's profile. */
1524
2147
  removeWidthPoint(ref: Pick<VectorWidthPointRef, 'nodeId' | 'index'>): VectorActionResult;
1525
2148
  /** Removes width points (default: the selected ones — the width tool's Delete), as one undo step. */
@@ -1588,6 +2211,43 @@ declare class VectorEditorController {
1588
2211
  outlineStroke(options?: {
1589
2212
  ids?: readonly string[];
1590
2213
  }): string[];
2214
+ /** Selected (or given) nodes that can carry effects: the roots of the selection. */
2215
+ private effectTargets;
2216
+ /**
2217
+ * Adds an effect of `type` to the selected (or given) nodes, at the bottom of each stack (or
2218
+ * at `index`), with default parameters merged with `params`. A repeater's copies start one
2219
+ * shape width apart. One undo step; returns the new effect ids (one per node, in order).
2220
+ */
2221
+ addEffect(type: VectorEffectType, options?: {
2222
+ ids?: readonly string[];
2223
+ params?: Record<string, unknown>;
2224
+ index?: number;
2225
+ }): string[];
2226
+ private editEffects;
2227
+ /**
2228
+ * Turns an effect on or off and changes its parameters (unknown or invalid values are
2229
+ * ignored). With `merge` (true, or a key of your own), consecutive updates of the same effect
2230
+ * fold into one undo step, as a slider drag should; call `endMergedEdit` when it ends.
2231
+ */
2232
+ updateEffect(nodeId: string, effectId: string, patch: {
2233
+ enabled?: boolean;
2234
+ params?: Record<string, unknown>;
2235
+ }, options?: {
2236
+ merge?: boolean | string;
2237
+ }): VectorActionResult;
2238
+ /** Removes an effect from a node's stack. */
2239
+ removeEffect(nodeId: string, effectId: string): VectorActionResult;
2240
+ /** Moves an effect to position `index` of its stack (0 is applied first). */
2241
+ moveEffect(nodeId: string, effectId: string, index: number): VectorActionResult;
2242
+ /**
2243
+ * Expand Appearance: bakes the path effects and live booleans of the selected (or given)
2244
+ * nodes, and of everything inside them, into plain paths. A node keeps its id (a group when
2245
+ * it draws as several shapes); the shapes it made get new ids. Returns the ids of the expanded
2246
+ * nodes (empty when none was live).
2247
+ */
2248
+ expandAppearance(options?: {
2249
+ ids?: readonly string[];
2250
+ }): string[];
1591
2251
  rename(id: string, name: string): VectorActionResult;
1592
2252
  setVisible(id: string, visible: boolean): VectorActionResult;
1593
2253
  setLocked(id: string, locked: boolean): VectorActionResult;
@@ -1675,11 +2335,20 @@ declare class VectorEditorController {
1675
2335
  /**
1676
2336
  * Combines the selected paths (two or more) into one with a boolean operation. `subtract`
1677
2337
  * removes the upper shapes from the lowest one. The result takes the lowest shape's style
1678
- * and place.
2338
+ * and place. Shapes take part as drawn (path effects and live booleans applied).
2339
+ *
2340
+ * With `live`, the operands stay editable instead: a lone live boolean group gets the
2341
+ * operation (its operands follow it again), operands of live boolean groups get it as their
2342
+ * own, and anything else (two or more nodes with one parent) is wrapped in a new live boolean
2343
+ * group. Returns the result's (or the live group's) id, or null.
1679
2344
  */
1680
2345
  booleanOp(op: VectorBooleanOperation, options?: {
1681
2346
  ids?: readonly string[];
2347
+ live?: boolean;
1682
2348
  }): string | null;
2349
+ /** Whether stored node `rootId` holds `id` as drawn (`id` may be an expanded path inside it). */
2350
+ private holds;
2351
+ private liveBooleanOp;
1683
2352
  /** Joins the selected paths into one compound path (subpaths kept, lowest style). */
1684
2353
  combine(options?: {
1685
2354
  ids?: readonly string[];
@@ -1922,6 +2591,8 @@ declare class VectorEditorController {
1922
2591
  private hitCornerWidget;
1923
2592
  private hitAnchor;
1924
2593
  /** Deepest unlocked visible path under `p`. */
2594
+ /** Live groups being edited (selected, or holding the selection or the edited path): their children are hit as stored. */
2595
+ private enteredGroups;
1925
2596
  private hitPath;
1926
2597
  /** Endpoints of open subpaths of unlocked visible paths (pen tool resumes from them). */
1927
2598
  private openEndpoints;
@@ -1986,6 +2657,153 @@ declare function scaleFor(handle: VectorTransformHandle, b: VectorBounds, p: Vec
1986
2657
  origin: Vec2;
1987
2658
  };
1988
2659
 
2660
+ /**
2661
+ * Live appearance: path effect stacks and live boolean groups, evaluated on demand while the
2662
+ * stored anchors and children stay editable.
2663
+ *
2664
+ * `expandVectorAppearance` is the one place the effected geometry is made (cached per node
2665
+ * object, so an edit recomputes only the nodes it replaced). Rendering, hit-testing, bounds,
2666
+ * snapping, booleans, the Pathfinder, the Shape Builder and SVG export all read it, the way they
2667
+ * read live corners through `subpathsToBezier`; Expand Appearance stores it.
2668
+ *
2669
+ * Stacking follows After Effects' shape layers (effectcraft `crates/render/src/shapes.rs`): an
2670
+ * effect acts on every path above it — the node's own outline, or for a group every path of its
2671
+ * children (nested groups included, as drawn by their own effects) — in the order of the stack,
2672
+ * and effects placed after a repeater act on its copies. The result paints with the style of the
2673
+ * path each shape came from; Merge Paths and live booleans paint with the bottom one's.
2674
+ *
2675
+ * Live booleans fold their operands bottom to top, each combined with the result below it by its
2676
+ * own operation or the group's, and every prefix of the fold is cached under a rolling hash of the
2677
+ * operands it covers, so editing one operand recombines only the operands from it up; the cache
2678
+ * drops its least recently used half when full. Live groups are hit by their result except while
2679
+ * they are being edited (`vectorEnteredGroups`).
2680
+ *
2681
+ * Ported from ArtCraft (MIT OR Apache-2.0, © ArtCraft Team and contributors; see
2682
+ * THIRD_PARTY_NOTICES.md): the stacking rule of effectcraft `crates/render/src/shapes.rs`
2683
+ * (`collect()`); figcraft `crates/render/src/boolean.rs` (`fold_cached`, `PathCache`) and
2684
+ * `crates/engine/src/booleans.rs` (`operand_op`, `result_outline`); and the live-object model of
2685
+ * vectorcraft `crates/doc/src/live.rs` (`expand_live`, `expanded_group`, `subtree_has_live`).
2686
+ */
2687
+
2688
+ /** One shape of a node's appearance: a path in the node's own space, painted in `source`'s style. */
2689
+ interface VectorAppearanceShape {
2690
+ /** The path whose style paints it. */
2691
+ source: VectorPathNode;
2692
+ path: BezierPath;
2693
+ /** Opacity factor relative to the node (its own opacity not included). */
2694
+ opacity: number;
2695
+ /** Draw-order key (compared element by element). */
2696
+ order: number[];
2697
+ }
2698
+ /** Default parameters of each effect type. */
2699
+ declare const VECTOR_EFFECT_DEFAULTS: {
2700
+ readonly [K in VectorEffectType]: VectorEffectParamsMap[K];
2701
+ };
2702
+ declare const VECTOR_EFFECT_LABELS: Record<VectorEffectType, string>;
2703
+ /** How a panel edits one effect parameter. */
2704
+ type VectorEffectParamSpec = {
2705
+ key: string;
2706
+ label: string;
2707
+ kind: 'number';
2708
+ min?: number;
2709
+ max?: number;
2710
+ step: number;
2711
+ slider?: boolean;
2712
+ } | {
2713
+ key: string;
2714
+ label: string;
2715
+ kind: 'vec2';
2716
+ step: number;
2717
+ } | {
2718
+ key: string;
2719
+ label: string;
2720
+ kind: 'boolean';
2721
+ } | {
2722
+ key: string;
2723
+ label: string;
2724
+ kind: 'select';
2725
+ options: {
2726
+ value: string;
2727
+ label: string;
2728
+ }[];
2729
+ };
2730
+ /** The editable parameters of each effect type, in panel order. */
2731
+ declare const VECTOR_EFFECT_PARAM_SPECS: Record<VectorEffectType, VectorEffectParamSpec[]>;
2732
+ /**
2733
+ * Effect parameters with defaults filled in and invalid values dropped (unknown keys go too).
2734
+ * Returns null for an unknown type.
2735
+ */
2736
+ declare function normalizeVectorEffectParams<K extends VectorEffectType>(type: K, params: Record<string, unknown> | null | undefined, base?: VectorEffectParamsMap[K]): VectorEffectParamsMap[K] | null;
2737
+ /** A new effect of `type` (defaults merged with `params`), or null for an unknown type. */
2738
+ declare function createVectorEffect<K extends VectorEffectType>(type: K, id: string, params?: Partial<VectorEffectParamsMap[K]> | Record<string, unknown>): Extract<VectorEffect, {
2739
+ type: K;
2740
+ }> | null;
2741
+ /** The node's effects that take part (enabled, of a known type). */
2742
+ declare function activeVectorEffects(node: VectorNode): VectorEffect[];
2743
+ /** Whether the node itself draws differently from its stored geometry (effects or a live boolean). */
2744
+ declare function hasOwnVectorAppearance(node: VectorNode): boolean;
2745
+ /** Whether the node or anything inside it has a live appearance. */
2746
+ declare function hasVectorAppearance(node: VectorNode): boolean;
2747
+ /** A live boolean group (its children are operands). */
2748
+ declare function isVectorLiveBoolean(node: VectorNode | null | undefined): node is VectorGroupNode & {
2749
+ liveBoolean: VectorBooleanOperation;
2750
+ };
2751
+ /** How operand `child` of a live boolean group combines with the operands below it. */
2752
+ declare function vectorOperandOperation(group: VectorGroupNode, child: VectorNode): VectorBooleanOperation;
2753
+ /** How many boolean steps (one operand combined with the result below it) live booleans have computed: what a cache miss costs. */
2754
+ declare function vectorLiveBooleanSteps(): number;
2755
+ /** Empties the live boolean prefix cache. */
2756
+ declare function clearVectorLiveBooleanCache(): void;
2757
+ /** One operand of a live boolean: its outline (group space), fill rule and operation (unused for the bottom one). */
2758
+ interface VectorBooleanOperand {
2759
+ path: BezierPath;
2760
+ fillRule: VectorFillRule;
2761
+ operation: VectorBooleanOperation;
2762
+ }
2763
+ /**
2764
+ * The result of folding `operands` bottom to top, reusing the longest cached prefix: only the
2765
+ * operands above it are combined. Invalid geometry gives an empty path.
2766
+ */
2767
+ declare function foldVectorBooleanOperands(operands: readonly VectorBooleanOperand[]): BezierPath;
2768
+ /** Applies an effect stack to shapes, top to bottom (disabled effects skipped). */
2769
+ declare function applyVectorEffects(shapes: readonly VectorAppearanceShape[], effects: readonly VectorEffect[] | null | undefined): VectorAppearanceShape[];
2770
+ /**
2771
+ * What a node draws as: shapes in its own space (its `transform` and opacity not applied),
2772
+ * bottom to top, with its effects and those of everything inside it applied. Cached per node
2773
+ * object.
2774
+ */
2775
+ declare function vectorAppearanceShapes(node: VectorNode): VectorAppearanceShape[];
2776
+ /** Everything a node draws as one path in its own space (live corners cut, effects applied). */
2777
+ declare function vectorAppearanceOutline(node: VectorNode): BezierPath;
2778
+ /** What a node draws as, one plain path per shape (ids `<id>~fx<n>`, opacity relative to the node). */
2779
+ declare function vectorAppearanceNodes(node: VectorNode): VectorPathNode[];
2780
+ /**
2781
+ * The node as plain geometry: path effects and live booleans evaluated into paths (the node
2782
+ * itself when nothing inside it is live). A path keeps its id when it draws as one shape;
2783
+ * otherwise, like any live group, it becomes a group with that id holding one path per shape
2784
+ * (ids `<id>~fx<n>`). Groups without effects of their own keep their structure. Cached per node.
2785
+ */
2786
+ declare function expandVectorAppearance(node: VectorNode): VectorNode;
2787
+ /** Every node of a list expanded (the same array when nothing in it is live). */
2788
+ declare function expandVectorAppearances(nodes: readonly VectorNode[]): VectorNode[];
2789
+ /**
2790
+ * Reads effects from untrusted data (JSON, agent input): unknown types and malformed entries are
2791
+ * dropped, parameters normalized, ids made unique.
2792
+ */
2793
+ declare function sanitizeVectorEffects(value: unknown): VectorEffect[];
2794
+ /**
2795
+ * Effect parameters carried through a linear map baked into a node's geometry (scaling or
2796
+ * flipping it): offsets and positions move with it, angles turn the other way when it mirrors.
2797
+ * Lengths such as sizes and radii are kept, like stroke widths.
2798
+ */
2799
+ declare function transformVectorEffects(effects: readonly VectorEffect[], m: AffineMatrix): VectorEffect[];
2800
+ /**
2801
+ * The live groups (live booleans and groups with effects) being edited: those in `ids` and those
2802
+ * holding a node in `ids`. Their children are hit and outlined as stored instead of as drawn, so
2803
+ * each operand can be picked (figcraft `crates/engine/src/booleans.rs`, `result_outline`).
2804
+ */
2805
+ declare function vectorEnteredGroups(nodes: readonly VectorNode[], ids: readonly string[]): Set<string>;
2806
+
1989
2807
  interface VectorRenderPath {
1990
2808
  kind: 'path';
1991
2809
  id: string;
@@ -2024,8 +2842,12 @@ interface VectorSceneRenderData {
2024
2842
  width: number;
2025
2843
  height: number;
2026
2844
  background?: string;
2027
- /** Gradients referenced by `fill` / `stroke` values. */
2028
- defs: SvgGradientDef[];
2845
+ /**
2846
+ * Paint servers referenced by `fill` / `stroke` values: `<linearGradient>` /
2847
+ * `<radialGradient>` descriptors and `pattern`s (conic, diamond and stroke-mode gradients:
2848
+ * draw each of `gradients`, then each tile filled, inside a `<pattern>`).
2849
+ */
2850
+ defs: VectorPaintDef[];
2029
2851
  /** Visible nodes, bottom to top. */
2030
2852
  nodes: VectorRenderNode[];
2031
2853
  }
@@ -2195,9 +3017,62 @@ interface VectorOverlayRenderData {
2195
3017
  hovered: boolean;
2196
3018
  }[];
2197
3019
  };
3020
+ /** The gradient tool's annotator over the selection's gradient (screen space), or null. */
3021
+ gradient: VectorRenderGradientAnnotator | null;
2198
3022
  /** A short status, e.g. "W 120 × H 80" or "45°". */
2199
3023
  status: string | null;
2200
3024
  }
3025
+ /**
3026
+ * The gradient annotator in screen pixels: draw the `extent` outline (dashed), the bar from
3027
+ * `start` to `end`, the handles, each stop's chip (a swatch at `x, y` with a tick to `barX, barY`;
3028
+ * `removing`: the dragged stop is off the bar and will be deleted, draw it faded) and the
3029
+ * midpoint diamonds.
3030
+ */
3031
+ interface VectorRenderGradientAnnotator {
3032
+ nodeId: string;
3033
+ type: VectorGradientType;
3034
+ start: {
3035
+ x: number;
3036
+ y: number;
3037
+ hovered: boolean;
3038
+ };
3039
+ /** `radius` for radial, conic and diamond gradients. */
3040
+ end: {
3041
+ x: number;
3042
+ y: number;
3043
+ hovered: boolean;
3044
+ handle: 'end' | 'radius';
3045
+ };
3046
+ aspect: {
3047
+ x: number;
3048
+ y: number;
3049
+ hovered: boolean;
3050
+ } | null;
3051
+ focal: {
3052
+ x: number;
3053
+ y: number;
3054
+ hovered: boolean;
3055
+ } | null;
3056
+ stops: {
3057
+ index: number;
3058
+ x: number;
3059
+ y: number;
3060
+ barX: number;
3061
+ barY: number;
3062
+ color: string;
3063
+ opacity: number;
3064
+ selected: boolean;
3065
+ hovered: boolean;
3066
+ }[];
3067
+ midpoints: {
3068
+ index: number;
3069
+ x: number;
3070
+ y: number;
3071
+ hovered: boolean;
3072
+ }[];
3073
+ extent: string | null;
3074
+ removing: boolean;
3075
+ }
2201
3076
  /** Distance between the Shape Builder's hatch lines over a face (screen pixels). */
2202
3077
  declare const VECTOR_BUILDER_HATCH_GAP = 6;
2203
3078
  /**
@@ -2207,6 +3082,8 @@ declare const VECTOR_BUILDER_HATCH_GAP = 6;
2207
3082
  declare function getVectorSceneRenderData(state: Pick<VectorEditorState, 'document' | 'viewport'>, options?: {
2208
3083
  idPrefix?: string;
2209
3084
  }): VectorSceneRenderData;
3085
+ /** Live groups being edited in `state` (see `vectorEnteredGroups`). */
3086
+ declare function getVectorEnteredGroups(state: Pick<VectorEditorState, 'document' | 'selection' | 'editingId'>): Set<string>;
2210
3087
  /** The editing overlay in screen pixels. Render it on top of the scene, untransformed. */
2211
3088
  declare function getVectorOverlayRenderData(state: VectorEditorState): VectorOverlayRenderData;
2212
3089
  /** What the Blend controls of a toolbar or style panel show. */
@@ -2345,6 +3222,38 @@ declare const VECTOR_CORNER_KIND_LABELS: Readonly<Record<VectorCornerKind, strin
2345
3222
  declare const VECTOR_ARROWHEAD_LABELS: Readonly<Record<VectorArrowhead, string>>;
2346
3223
  /** A paint as `#rrggbb` for `<input type="color">`, or null for none, gradients and other CSS colours. */
2347
3224
  declare function vectorPaintToHex(paint: VectorPaint | undefined): string | null;
3225
+ declare const VECTOR_GRADIENT_TYPE_LABELS: Readonly<Record<VectorGradientType, string>>;
3226
+ declare const VECTOR_GRADIENT_SPREAD_LABELS: Readonly<Record<VectorGradientSpread, string>>;
3227
+ declare const VECTOR_GRADIENT_INTERPOLATION_LABELS: Readonly<Record<VectorGradientInterpolation, string>>;
3228
+ declare const VECTOR_STROKE_GRADIENT_MODE_LABELS: Readonly<Record<VectorStrokeGradientMode, string>>;
3229
+ /** What a gradient editor shows for the selection's `target` paint (see `getVectorGradientEditor`). */
3230
+ interface VectorGradientEditorData {
3231
+ target: 'fill' | 'stroke';
3232
+ /** The first selected path's paint is a gradient. */
3233
+ gradient: VectorGradient | null;
3234
+ /** The paint as a `#rrggbb` colour when it is one (what a new gradient starts from). */
3235
+ color: string | null;
3236
+ /** Sorted stops; `index` is what `setGradientStop` takes. */
3237
+ stops: (VectorGradientStop & {
3238
+ index: number;
3239
+ selected: boolean;
3240
+ })[];
3241
+ selected: (VectorGradientStop & {
3242
+ index: number;
3243
+ last: boolean;
3244
+ }) | null;
3245
+ /** A CSS `linear-gradient(to right, …)` of the ramp (midpoints and colour space expanded). */
3246
+ preview: string | null;
3247
+ type: VectorGradientType | null;
3248
+ spread: VectorGradientSpread;
3249
+ interpolation: VectorGradientInterpolation;
3250
+ smoothness: number;
3251
+ strokeMode: VectorStrokeGradientMode;
3252
+ /** The selected paths' gradients differ. */
3253
+ mixed: boolean;
3254
+ }
3255
+ /** The gradient editor of the selection's fill or stroke (`state.gradientEdit.target`), or null with nothing selected. */
3256
+ declare function getVectorGradientEditor(state: Pick<VectorEditorState, 'document' | 'selection' | 'gradientEdit'>): VectorGradientEditorData | null;
2348
3257
  /** A path-editing button of the bundled toolbars. */
2349
3258
  interface VectorPathAction {
2350
3259
  id: 'join' | 'average' | 'cut' | 'clean' | 'smooth' | 'outline';
@@ -2374,6 +3283,33 @@ declare const VECTOR_EDIT_TOGGLES: readonly {
2374
3283
  label: string;
2375
3284
  title: string;
2376
3285
  }[];
3286
+ /** One effect of the listed stack, with what a panel needs to edit it. */
3287
+ interface VectorEffectsPanelItem {
3288
+ id: string;
3289
+ type: VectorEffectType;
3290
+ label: string;
3291
+ enabled: boolean;
3292
+ params: Record<string, unknown>;
3293
+ specs: readonly VectorEffectParamSpec[];
3294
+ }
3295
+ /** What an Effects panel shows for the selection. */
3296
+ interface VectorEffectsPanelData {
3297
+ /** The node whose stack is listed (when one node is selected), else null. */
3298
+ nodeId: string | null;
3299
+ /** Selected nodes an added effect goes to. */
3300
+ count: number;
3301
+ /** The listed stack, applied top to bottom. */
3302
+ effects: VectorEffectsPanelItem[];
3303
+ /** Something selected is live (Expand Appearance applies). */
3304
+ expandable: boolean;
3305
+ }
3306
+ /** Effect types in menu order, with their names. */
3307
+ declare const VECTOR_EFFECT_MENU: readonly {
3308
+ type: VectorEffectType;
3309
+ label: string;
3310
+ }[];
3311
+ /** The Effects panel of the selection, or null when nothing that takes effects is selected. */
3312
+ declare function getVectorEffectsPanel(state: Pick<VectorEditorState, 'document' | 'selection'>): VectorEffectsPanelData | null;
2377
3313
 
2378
3314
  interface VectorCommandOptions {
2379
3315
  /** Id prefix (default `vector.`); use one per editor when several are registered. */
@@ -2419,6 +3355,12 @@ interface VectorNodeListing {
2419
3355
  };
2420
3356
  /** An in-between generated by a blend (locked; changes come from its keys). */
2421
3357
  blendStep?: boolean;
3358
+ /** The node's live path effects, applied in order. */
3359
+ effects?: VectorEffect[];
3360
+ /** A live boolean group's operation (its children are the operands). */
3361
+ liveBoolean?: VectorBooleanOperation;
3362
+ /** An operand's own operation in a live boolean group. */
3363
+ booleanOperation?: VectorBooleanOperation;
2422
3364
  }
2423
3365
  /**
2424
3366
  * Palette and agent commands for a vector editor: list, select, add shapes and paths, style,
@@ -2756,10 +3698,13 @@ interface VectorPathEntry {
2756
3698
  }
2757
3699
  /**
2758
3700
  * The path nodes inside `roots` (or every node when `roots` is null), bottom to top, with their
2759
- * parent matrices. Hidden nodes are skipped, and locked ones unless `locked` is true.
3701
+ * parent matrices. Hidden nodes are skipped, and locked ones unless `locked` is true. Live nodes
3702
+ * (path effects, live booleans) take part as drawn (`expandVectorAppearance`: their entries are
3703
+ * the expanded paths, whose ids may not be in the document) unless `expand` is false.
2760
3704
  */
2761
3705
  declare function vectorPathEntries(doc: VectorDocument, roots: readonly string[] | null, options?: {
2762
3706
  locked?: boolean;
3707
+ expand?: boolean;
2763
3708
  }): VectorPathEntry[];
2764
3709
  /** Whether a subpath, closed, encloses an area (rather than retracing itself). */
2765
3710
  declare function subpathEnclosesArea(sp: VectorSubpath): boolean;
@@ -2896,7 +3841,7 @@ declare function vectorFillMap(doc: VectorDocument, gap?: number): PlanarMap | n
2896
3841
  * pair turns the same way), so a nonzero fill keeps its holes.
2897
3842
  * - **In-betweens** follow the shapes' best-fit rotation and scale (Procrustes), with the
2898
3843
  * leftover difference blended in linearly, so a turning shape turns instead of collapsing.
2899
- * - **Paint**: colours mix in OKLab, gradients of one kind resample their stops to a common
3844
+ * - **Paint**: colours mix in OKLab, gradients of one style resample their stops to a common
2900
3845
  * set, a missing paint fades from transparent; stroke width, opacity, dashes, arrowhead
2901
3846
  * scales and width profiles interpolate, and the rest switches halfway.
2902
3847
  * - **Transforms**: both shapes are blended in their parent's space; the in-between's rigid
@@ -2997,8 +3942,11 @@ declare function interpolateMorphContours(a: readonly VectorMorphContour[], b: r
2997
3942
  declare function interpolateRigidMatrix(a: AffineMatrix, b: AffineMatrix, t: number): AffineMatrix;
2998
3943
  /** Two colours mixed in OKLab (premultiplied alpha); unreadable colours switch halfway. */
2999
3944
  declare function interpolateVectorColor(a: string, b: string, t: number): string;
3000
- /** A gradient's stops resampled at `offsets`, each painting what the gradient paints there. */
3001
- declare function resampleGradientStops(g: CanvasGradientDef, offsets: readonly number[]): GradientStop[];
3945
+ /**
3946
+ * A gradient's stops resampled at `offsets`, each painting what the gradient paints there (its
3947
+ * midpoints, smoothness and interpolation space included).
3948
+ */
3949
+ declare function resampleGradientStops(g: VectorGradient, offsets: readonly number[]): VectorGradientStop[];
3002
3950
  /**
3003
3951
  * Interpolates paints: colours in OKLab, gradients of one kind with their stops resampled to a
3004
3952
  * common set, a colour and a gradient through a gradient of that colour, and a missing paint
@@ -3115,4 +4063,90 @@ declare function expandVectorBlend(group: VectorGroupNode, newId: () => string):
3115
4063
  */
3116
4064
  declare function releaseVectorBlend(group: VectorGroupNode, newId: () => string): VectorNode[];
3117
4065
 
3118
- export { type AddVectorNodeOptions, AffineMatrix, DEFAULT_VECTOR_BLEND_DISTANCE, DEFAULT_VECTOR_BLEND_STEPS, DEFAULT_VECTOR_PATH_EDIT, DEFAULT_VECTOR_SNAP, IDENTITY_MATRIX, KAPPA, LazyMouse, type NearestSegment, type RecognizeInkOptions, SvgGradientDef, VECTOR_ARROWHEADS, VECTOR_ARROWHEAD_LABELS, VECTOR_BLEND_MAX_SMOOTH_STEPS, VECTOR_BLEND_MAX_STEPS, VECTOR_BLEND_SPACINGS, VECTOR_BLEND_SPACING_LABELS, VECTOR_BUILDER_HATCH_GAP, VECTOR_CLIPBOARD_TYPE, VECTOR_CONSTRUCTION_ANGLES, VECTOR_CORNER_KINDS, VECTOR_CORNER_KIND_LABELS, VECTOR_CORNER_WIDGET_INSET, VECTOR_EDIT_TOGGLES, VECTOR_FILL_GAP, VECTOR_INK_MAX_CORNERS, VECTOR_OVERLAY_THEME, VECTOR_PATHFINDER_ACTIONS, VECTOR_PATHFINDER_LABELS, VECTOR_PATHFINDER_OPERATIONS, VECTOR_PATH_ACTIONS, VECTOR_PENCIL_STRING_PX, VECTOR_PRESSURE_NOMINAL, VECTOR_ROTATE_HANDLE_OFFSET, VECTOR_STROKE_ALIGN_LABELS, VECTOR_STYLE_KEYS, VECTOR_TOOLS, VECTOR_TOOL_GLYPHS, VECTOR_TOOL_SHORTCUTS, VECTOR_TRANSFORM_HANDLES, VECTOR_WIDTH_PRESETS, VECTOR_WIDTH_PRESET_IDS, VECTOR_WIDTH_PROFILE_MAX_POINTS, VECTOR_WIDTH_PROFILE_MAX_SCALE, VECTOR_WIDTH_SAME_T, type VariableStrokeOptions, type Vec2, type VectorActionResult, type VectorAlign, type VectorAnchor, type VectorAnchorRef, type VectorAnchorType, type VectorArrange, type VectorArrowAlign, type VectorArrowhead, type VectorArrowheadShape, type VectorAverageAxis, type VectorBlend, type VectorBlendControls, type VectorBlendInput, type VectorBlendOptions, type VectorBlendRail, type VectorBlendSpacing, type VectorBlendStart, type VectorBooleanOperation, type VectorBounds, type VectorBuilderHit, type VectorBuilderLinePiece, type VectorBuilderPreview, type VectorBuilderReplacement, type VectorBuilderTouched, type VectorCommandOptions, type VectorCorner, type VectorCornerInfo, type VectorCornerKind, type VectorCornerWidget, type VectorDefaults, type VectorDistribute, type VectorDocument, VectorEditorController, type VectorEditorOptions, type VectorEditorState, type VectorFillRule, type VectorGroupNode, type VectorGuideKind, type VectorGuideLabel, type VectorGuideLine, type VectorHandleRef, type VectorHover, type VectorInkShape, type VectorInteraction, type VectorKeyInput, type VectorLineCap, type VectorLineJoin, type VectorMatrix, type VectorModifiers, type VectorMorph, type VectorMorphContour, type VectorMorphCorrespondence, type VectorMorphOptions, type VectorNode, type VectorNodeListing, type VectorOverlayRenderData, type VectorPaint, type VectorPathAction, type VectorPathEditOptions, type VectorPathEntry, type VectorPathKeyframe, type VectorPathNode, type VectorPathfinderAction, type VectorPathfinderOperation, type VectorPathfinderPaint, type VectorPointSnap, type VectorPointerInput, type VectorRectSnap, type VectorRenderAnchor, type VectorRenderCornerWidget, type VectorRenderGroup, type VectorRenderGuideLabel, type VectorRenderGuideLine, type VectorRenderHandle, type VectorRenderNode, type VectorRenderPath, type VectorRenderStrokeParts, type VectorRenderWidthPoint, type VectorScaleSnap, type VectorSceneRenderData, type VectorSegmentRef, type VectorSelectionBoxGeometry, type VectorSelectionFrame, type VectorSelectionStyle, type VectorShapeBuilderFace, type VectorShapeBuilderMap, type VectorShapeBuilderPlan, type VectorShapeBuilderResult, type VectorShapeInput, type VectorSnapGuides, type VectorSnapKind, type VectorSnapLeave, type VectorSnapOptions, VectorSnapTargets, type VectorStrokeAlign, type VectorStrokeParts, type VectorStrokeSpot, type VectorStyle, type VectorSubpath, type VectorSvgExportOptions, type VectorSvgImportOptions, type VectorTaperOptions, type VectorTool, type VectorTransformHandle, type VectorViewport, type VectorWaveOptions, type VectorWidthHandle, type VectorWidthPoint, type VectorWidthPointEdit, type VectorWidthPointRef, type VectorWidthPreset, type VectorWidthPresetInfo, addBuilderHit, applyMatrix, applyMatrixLinear, applyVectorBlendOptions, applyVectorCornersAttribute, arrowheadInset, arrowheadPath, arrowheadWeight, bendSegment, bezierToSubpaths, boundsFromPoints, boundsIntersect, cloneAnchor, cloneSubpath, cloneVectorDocument, cloneVectorNode, collectPathNodes, constrainToLeave, convertAnchor, cornerBisectorPoint, cornerRadiusChange, cornerSetback, correspondMorphContours, createVectorCommands, createVectorMorph, curvatureMoveAnchor, cutSubpathAt, dashIntervals, decomposeRigid, effectiveStrokeAlign, ellipseSubpath, eraseFromFill, eraseFromOutline, eraserRegion, evaluateVectorPathKeyframes, expandVectorBlend, expandVectorCorners, expandVectorCornersOf, findVectorNode, fitCornerRadius, generateVectorBlendChildren, generateWidthProfile, getAnchor, getAnchorWorld, getEditablePathIds, getTransformHandlePositions, getVectorBlendControls, getVectorCornerWidgets, getVectorOverlayRenderData, getVectorSceneRenderData, getVectorSelectionBoxGeometry, getVectorSelectionFrame, getVectorSelectionStyle, getVectorWidthHandles, getVisibleAnchors, getVisibleHandles, hasPaint, hasStrokeExtras, hasVectorCorners, hitTestVectorNode, hitTestVectorNodes, hitTestVectorStroke, inferAnchorType, insertAnchor, insertWidthPoint, interpolateMorphContours, interpolateRigidMatrix, interpolateVectorColor, interpolateVectorPaint, interpolateVectorPaths, interpolateVectorStyle, interpolateWidthProfiles, invertMatrix, isClosedBezierShape, isIdentityMatrix, isUniformWidthProfile, isVectorBlendGroup, isVectorTextTarget, joinSubpaths, knifePath, lineSubpath, locateVectorNode, matrixRotation, mirrorWidthProfile, morphContourToSubpath, morphPathsCross, moveAnchorHandle, multiplyMatrices, nearestSegment, nearestStrokePosition, nextVectorCornerKind, nodeMatrix, parseSvgTransform, parseVectorSvg, planShapeBuilder, polygonSubpath, polylineBounds, pressureWidthProfile, recognizeInkShape, rectSubpath, refineMorphContour, refreshVectorBlends, releaseVectorBlend, removeAnchorKeepingShape, removeAnchors, removeAnchorsKeepingShape, removeRedundantPoints, removeWidthPoints, resampleGradientStops, resolveVectorBlendOptions, reverseMorphContour, reverseSubpath, reverseWidthProfile, rotateMatrix, roundSubpaths, samplePolyline, sanitizeWidthProfile, scaleFor, scaleMatrix, setAnchorCorner, setSubpathCorners, setWidthPoint, simplifyPolyline, smoothSubpath, splitIntoFaces, splitSubpathAt, starSubpath, strokePositionPoint, strokeWidthProfileOf, subpathEnclosesArea, subpathPointAt, subpathSegment, subpathSegmentCount, subpathToMorphContour, subpathsToBezier, taperWaveFactor, toVectorKeyInput, toVectorModifiers, toVectorPointerInput, transformVectorNode, translateAnchor, translateMatrix, turnMorphContour, unionBounds, variableStrokeOutline, variableStrokeRings, vectorBlendColorDistance, vectorBlendKeyTargets, vectorBlendKeys, vectorBlendRail, vectorBlendRailAt, vectorBlendSpine, vectorBlendStepCount, vectorBuilderErasedEdges, vectorCornerAt, vectorCorners, vectorCornersAttribute, vectorDiamondPath, vectorDocumentToSvg, vectorFillMap, vectorInkShapeName, vectorNodeBounds, vectorNodeRotation, vectorNodeToBezier, vectorPaintToHex, vectorPaintToSvg, vectorParentMatrix, vectorPathData, vectorPathEntries, vectorPathWorldBezier, vectorPathfinderShape, vectorResizeCursor, vectorResultStyle, vectorShapeBuilderHit, vectorShapeBuilderMap, vectorStrokeLineArea, vectorStrokeOutline, vectorStrokeOutlinePath, vectorStrokeParts, vectorStrokeReach, vectorStrokeSvgParts, vectorStrokeWidthGeometry, vectorToolLabel, vectorWorldMatrix, walkVectorNodes, widthProfileAt, widthProfileFromAttribute, widthProfileMaxScale, widthProfilePreset, widthProfilePresetId, widthProfileToAttribute };
4066
+ /** Total arc length of a path (closing lines included). */
4067
+ declare function effectPathLength(path: BezierPath): number;
4068
+ /** Number of on-curve points of a path (a closed subpath's start counted once). */
4069
+ declare function effectPathVertexCount(path: BezierPath): number;
4070
+ /** The fractions of the length a trim keeps, or null when it keeps everything. */
4071
+ declare function trimIntervals(start: number, end: number, offsetDegrees: number): [number, number][] | null;
4072
+ /**
4073
+ * Trim Paths, simultaneously: every path is trimmed by the same fractions of its own length.
4074
+ * `start` / `end` in percent, `offset` in degrees. Paths trimmed away entirely come back empty.
4075
+ */
4076
+ declare function trimPaths(paths: readonly BezierPath[], start: number, end: number, offsetDegrees?: number): BezierPath[];
4077
+ /**
4078
+ * Trim Paths, individually: the paths are laid end to end in stacking order and trimmed as one
4079
+ * length, so they draw on one after another.
4080
+ */
4081
+ declare function trimPathsIndividually(paths: readonly BezierPath[], start: number, end: number, offsetDegrees?: number): BezierPath[];
4082
+ /**
4083
+ * Pucker & Bloat (`amount` in percent, −100 to 100). Positive (bloat) moves the points towards
4084
+ * the mean of a path's points and pushes the handles away from it, so the segments bulge
4085
+ * outwards; negative (pucker) does the opposite, giving spiky shapes.
4086
+ */
4087
+ declare function puckerBloatPaths(paths: readonly BezierPath[], amount: number): BezierPath[];
4088
+ /**
4089
+ * Round Corners: every corner (where the direction jumps) gets a circular arc of `radius`,
4090
+ * shrunk to fit where the sides are short. Smooth points and the ends of open paths are kept.
4091
+ */
4092
+ declare function roundCornerPaths(paths: readonly BezierPath[], radius: number): BezierPath[];
4093
+ /**
4094
+ * Offset Paths: grows (positive `amount`) or shrinks (negative) every path with the given join.
4095
+ * `copies` copies are made, copy i offset by `amount · (i + 1 + copyOffset)`, all in one path.
4096
+ */
4097
+ declare function offsetPaths(paths: readonly BezierPath[], amount: number, join?: VectorLineJoin, miterLimit?: number, copies?: number, copyOffset?: number): BezierPath[];
4098
+ /**
4099
+ * Twist: turns the paths about `center` by an angle growing with the distance from it, from 0
4100
+ * at the centre to `angle` degrees at the farthest point. Segments are subdivided and their
4101
+ * handles mapped through the warp's derivative, which keeps the result smooth.
4102
+ */
4103
+ declare function twistPaths(paths: readonly BezierPath[], angle: number, center: Vec2): BezierPath[];
4104
+ /**
4105
+ * Zig Zag: every segment gets `ridges` ridges: it is split into `ridges + 1` equal pieces and the
4106
+ * points (original ones included) are pushed alternately `size` to either side of the path.
4107
+ * `smooth` makes rounded waves. A closed path of n segments ends up with `n · (ridges + 1)` points
4108
+ * (an open one, one more).
4109
+ */
4110
+ declare function zigzagPaths(paths: readonly BezierPath[], size: number, ridges: number, smooth?: boolean): BezierPath[];
4111
+ /**
4112
+ * Wiggle Paths: subdivides the paths (`detail` points per segment) and moves every point by
4113
+ * smooth noise of up to `size` that evolves over `time` seconds at `speed` wiggles per second.
4114
+ * The same parameters always give the same result.
4115
+ */
4116
+ declare function wigglePaths(paths: readonly BezierPath[], w: VectorEffectParamsMap['wiggle']): BezierPath[];
4117
+ /** Merge Paths: the paths (in stacking order, each filled non-zero) combined into one path. */
4118
+ declare function mergePaths(paths: readonly BezierPath[], mode?: VectorMergeMode): BezierPath;
4119
+ /** One copy a repeater makes: its transform (node space) and opacity factor. */
4120
+ interface VectorRepeaterCopy {
4121
+ /** Copy number (0 is the original). */
4122
+ index: number;
4123
+ matrix: AffineMatrix;
4124
+ opacity: number;
4125
+ }
4126
+ /**
4127
+ * The copies of a repeater around `pivot` (the anchor point in node space), in copy order.
4128
+ * Copy i is moved by `translate(position·k) · rotate(rotation·k) · scale^k` about the pivot with
4129
+ * `k = i + offset`; opacity runs from the start to the end opacity across the copies, and a
4130
+ * fractional copy count fades the last copy by its fraction.
4131
+ */
4132
+ declare function vectorRepeaterCopies(r: VectorEffectParamsMap['repeater'], pivot: Vec2): VectorRepeaterCopy[];
4133
+ /** Each path repeated by `vectorRepeaterCopies` (copy order, the original first). */
4134
+ declare function repeatPaths(paths: readonly BezierPath[], r: VectorEffectParamsMap['repeater'], pivot: Vec2): {
4135
+ copy: VectorRepeaterCopy;
4136
+ paths: BezierPath[];
4137
+ }[];
4138
+ /** The middle of the paths' bounds (the origin when they are empty). */
4139
+ declare function pathsCenter(paths: readonly BezierPath[]): Vec2;
4140
+
4141
+ /**
4142
+ * The paint server of a gradient along or across the stroke of `node` (in its own space): a
4143
+ * pattern whose first def id is `id`. `area` defaults to the path's box padded by the stroke's
4144
+ * reach.
4145
+ */
4146
+ declare function vectorStrokeGradientDefs(g: VectorGradient, id: string, node: VectorPathNode, options?: {
4147
+ bounds?: VectorBounds | null;
4148
+ area?: VectorBounds | null;
4149
+ precision?: number;
4150
+ }): VectorPaintDef[];
4151
+
4152
+ export { type AddVectorNodeOptions, AffineMatrix, DEFAULT_VECTOR_BLEND_DISTANCE, DEFAULT_VECTOR_BLEND_STEPS, DEFAULT_VECTOR_PATH_EDIT, DEFAULT_VECTOR_SNAP, IDENTITY_MATRIX, KAPPA, LazyMouse, type NearestSegment, type RecognizeInkOptions, SvgGradientDef, VECTOR_ARROWHEADS, VECTOR_ARROWHEAD_LABELS, VECTOR_BLEND_MAX_SMOOTH_STEPS, VECTOR_BLEND_MAX_STEPS, VECTOR_BLEND_SPACINGS, VECTOR_BLEND_SPACING_LABELS, VECTOR_BUILDER_HATCH_GAP, VECTOR_CLIPBOARD_TYPE, VECTOR_CONSTRUCTION_ANGLES, VECTOR_CORNER_KINDS, VECTOR_CORNER_KIND_LABELS, VECTOR_CORNER_WIDGET_INSET, VECTOR_EDIT_TOGGLES, VECTOR_EFFECT_DEFAULTS, VECTOR_EFFECT_LABELS, VECTOR_EFFECT_MENU, VECTOR_EFFECT_PARAM_SPECS, VECTOR_EFFECT_TYPES, VECTOR_FILL_GAP, VECTOR_GRADIENT_INTERPOLATIONS, VECTOR_GRADIENT_INTERPOLATION_LABELS, VECTOR_GRADIENT_MAX_PERIODS, VECTOR_GRADIENT_MIDPOINT_GAP, VECTOR_GRADIENT_MIN_STOPS, VECTOR_GRADIENT_OFF_BAR, VECTOR_GRADIENT_SPREADS, VECTOR_GRADIENT_SPREAD_LABELS, VECTOR_GRADIENT_STOP_GAP, VECTOR_GRADIENT_TYPES, VECTOR_GRADIENT_TYPE_LABELS, VECTOR_INK_MAX_CORNERS, VECTOR_MERGE_MODES, VECTOR_OVERLAY_THEME, VECTOR_PATHFINDER_ACTIONS, VECTOR_PATHFINDER_LABELS, VECTOR_PATHFINDER_OPERATIONS, VECTOR_PATH_ACTIONS, VECTOR_PENCIL_STRING_PX, VECTOR_PRESSURE_NOMINAL, VECTOR_ROTATE_HANDLE_OFFSET, VECTOR_STROKE_ALIGN_LABELS, VECTOR_STROKE_GRADIENT_MODES, VECTOR_STROKE_GRADIENT_MODE_LABELS, VECTOR_STYLE_KEYS, VECTOR_TOOLS, VECTOR_TOOL_GLYPHS, VECTOR_TOOL_SHORTCUTS, VECTOR_TRANSFORM_HANDLES, VECTOR_WIDTH_PRESETS, VECTOR_WIDTH_PRESET_IDS, VECTOR_WIDTH_PROFILE_MAX_POINTS, VECTOR_WIDTH_PROFILE_MAX_SCALE, VECTOR_WIDTH_SAME_T, type VariableStrokeOptions, type Vec2, type VectorActionResult, type VectorAlign, type VectorAnchor, type VectorAnchorRef, type VectorAnchorType, type VectorAppearanceShape, type VectorArrange, type VectorArrowAlign, type VectorArrowhead, type VectorArrowheadShape, type VectorAverageAxis, type VectorBlend, type VectorBlendControls, type VectorBlendInput, type VectorBlendOptions, type VectorBlendRail, type VectorBlendSpacing, type VectorBlendStart, type VectorBooleanOperand, type VectorBooleanOperation, type VectorBounds, type VectorBuilderHit, type VectorBuilderLinePiece, type VectorBuilderPreview, type VectorBuilderReplacement, type VectorBuilderTouched, type VectorCommandOptions, type VectorCorner, type VectorCornerInfo, type VectorCornerKind, type VectorCornerWidget, type VectorDefaults, type VectorDistribute, type VectorDocument, VectorEditorController, type VectorEditorOptions, type VectorEditorState, type VectorEffect, type VectorEffectParamSpec, type VectorEffectParamsMap, type VectorEffectType, type VectorEffectsPanelData, type VectorEffectsPanelItem, type VectorFillRule, type VectorGradient, type VectorGradientAnnotator, type VectorGradientEditorData, type VectorGradientHandle, type VectorGradientInterpolation, type VectorGradientPart, type VectorGradientPatch, type VectorGradientPoints, type VectorGradientRamp, type VectorGradientSpread, type VectorGradientStop, type VectorGradientSvgOptions, type VectorGradientTarget, type VectorGradientType, type VectorGradientUnits, type VectorGroupNode, type VectorGuideKind, type VectorGuideLabel, type VectorGuideLine, type VectorHandleRef, type VectorHitTestOptions, type VectorHover, type VectorInkShape, type VectorInteraction, type VectorKeyInput, type VectorLineCap, type VectorLineJoin, type VectorMatrix, type VectorMergeMode, type VectorModifiers, type VectorMorph, type VectorMorphContour, type VectorMorphCorrespondence, type VectorMorphOptions, type VectorNode, type VectorNodeListing, type VectorOverlayRenderData, type VectorPaint, type VectorPaintDef, type VectorPaintSvgOptions, type VectorPathAction, type VectorPathEditOptions, type VectorPathEntry, type VectorPathKeyframe, type VectorPathNode, type VectorPathfinderAction, type VectorPathfinderOperation, type VectorPathfinderPaint, type VectorPointSnap, type VectorPointerInput, type VectorRectSnap, type VectorRenderAnchor, type VectorRenderCornerWidget, type VectorRenderGradientAnnotator, type VectorRenderGroup, type VectorRenderGuideLabel, type VectorRenderGuideLine, type VectorRenderHandle, type VectorRenderNode, type VectorRenderPath, type VectorRenderStrokeParts, type VectorRenderWidthPoint, type VectorRepeaterCopy, type VectorRgba, type VectorScaleSnap, type VectorSceneRenderData, type VectorSegmentRef, type VectorSelectionBoxGeometry, type VectorSelectionFrame, type VectorSelectionStyle, type VectorShapeBuilderFace, type VectorShapeBuilderMap, type VectorShapeBuilderPlan, type VectorShapeBuilderResult, type VectorShapeInput, type VectorSnapGuides, type VectorSnapKind, type VectorSnapLeave, type VectorSnapOptions, VectorSnapTargets, type VectorStrokeAlign, type VectorStrokeGradientMode, type VectorStrokeParts, type VectorStrokeSpot, type VectorStyle, type VectorSubpath, type VectorSvgExportOptions, type VectorSvgImportOptions, type VectorSvgPatternDef, type VectorTaperOptions, type VectorTool, type VectorTransformHandle, type VectorViewport, type VectorWaveOptions, type VectorWidthHandle, type VectorWidthPoint, type VectorWidthPointEdit, type VectorWidthPointRef, type VectorWidthPreset, type VectorWidthPresetInfo, activeVectorEffects, addBuilderHit, applyMatrix, applyMatrixLinear, applyVectorBlendOptions, applyVectorCornersAttribute, applyVectorEffects, applyVectorGradientPatch, applyVectorGradientSpread, arrowheadInset, arrowheadPath, arrowheadWeight, bendSegment, bezierToSubpaths, boundsFromPoints, boundsIntersect, clearVectorLiveBooleanCache, cloneAnchor, cloneSubpath, cloneVectorDocument, cloneVectorNode, collectPathNodes, constrainToLeave, convertAnchor, convertVectorGradient, cornerBisectorPoint, cornerRadiusChange, cornerSetback, correspondMorphContours, createVectorCommands, createVectorEffect, createVectorMorph, curvatureMoveAnchor, cutSubpathAt, dashIntervals, decomposeRigid, defaultVectorGradient, effectPathLength, effectPathVertexCount, effectiveStrokeAlign, ellipseSubpath, eraseFromFill, eraseFromOutline, eraserRegion, evaluateVectorPathKeyframes, expandVectorAppearance, expandVectorAppearances, expandVectorBlend, expandVectorCorners, expandVectorCornersOf, expandVectorGradientSpread, expandVectorGradientStops, explicitVectorGradient, findVectorNode, fitCornerRadius, foldVectorBooleanOperands, generateVectorBlendChildren, generateWidthProfile, getAnchor, getAnchorWorld, getEditablePathIds, getTransformHandlePositions, getVectorBlendControls, getVectorCornerWidgets, getVectorEffectsPanel, getVectorEnteredGroups, getVectorGradientAnnotator, getVectorGradientEditor, getVectorOverlayRenderData, getVectorSceneRenderData, getVectorSelectionBoxGeometry, getVectorSelectionFrame, getVectorSelectionStyle, getVectorWidthHandles, getVisibleAnchors, getVisibleHandles, gradientMidpointRemap, hasExplicitGradientGeometry, hasOwnVectorAppearance, hasPaint, hasStrokeExtras, hasVectorAppearance, hasVectorCorners, hitTestVectorNode, hitTestVectorNodes, hitTestVectorStroke, hitVectorGradientAnnotator, inferAnchorType, insertAnchor, insertVectorGradientStop, insertWidthPoint, interpolateMorphContours, interpolateRigidMatrix, interpolateVectorColor, interpolateVectorPaint, interpolateVectorPaths, interpolateVectorStyle, interpolateWidthProfiles, invertMatrix, isCentredVectorGradient, isClosedBezierShape, isIdentityMatrix, isUniformWidthProfile, isVectorBlendGroup, isVectorGradient, isVectorLiveBoolean, isVectorTextTarget, joinSubpaths, knifePath, lineSubpath, locateVectorNode, matrixRotation, mergePaths, mirrorWidthProfile, morphContourToSubpath, morphPathsCross, moveAnchorHandle, moveVectorGradientHandle, moveVectorGradientStop, multiplyMatrices, nearestSegment, nearestStrokePosition, nextVectorCornerKind, nodeMatrix, normalizeVectorEffectParams, offsetPaths, parseSvgTransform, parseVectorColor, parseVectorSvg, pathsCenter, patternAttrs, periodicVectorGradientStops, pinVectorGradient, planShapeBuilder, polygonSubpath, polylineBounds, pressureWidthProfile, puckerBloatPaths, recognizeInkShape, rectSubpath, refineMorphContour, refreshVectorBlends, releaseVectorBlend, removeAnchorKeepingShape, removeAnchors, removeAnchorsKeepingShape, removeRedundantPoints, removeVectorGradientStop, removeWidthPoints, repeatPaths, resampleGradientStops, resolveVectorBlendOptions, reverseMorphContour, reverseSubpath, reverseVectorGradient, reverseWidthProfile, rotateMatrix, roundCornerPaths, roundSubpaths, samplePlainStops, samplePolyline, sampleVectorGradient, sampleVectorGradientAt, sampleVectorPaintDefAt, sanitizeVectorEffects, sanitizeVectorGradient, sanitizeWidthProfile, scaleFor, scaleMatrix, setAnchorCorner, setSubpathCorners, setVectorGradientVector, setWidthPoint, simplifyPolyline, smoothSubpath, sortedVectorGradientStops, spanVectorGradientStops, splitIntoFaces, splitSubpathAt, starSubpath, strokePositionPoint, strokeWidthProfileOf, subpathEnclosesArea, subpathPointAt, subpathSegment, subpathSegmentCount, subpathToMorphContour, subpathsToBezier, taperWaveFactor, toVectorKeyInput, toVectorModifiers, toVectorPointerInput, transformVectorEffects, transformVectorGradient, transformVectorNode, transformVectorPaint, translateAnchor, translateMatrix, trimIntervals, trimPaths, trimPathsIndividually, turnMorphContour, twistPaths, unionBounds, variableStrokeOutline, variableStrokeRings, vectorAppearanceNodes, vectorAppearanceOutline, vectorAppearanceShapes, vectorBlendColorDistance, vectorBlendKeyTargets, vectorBlendKeys, vectorBlendRail, vectorBlendRailAt, vectorBlendSpine, vectorBlendStepCount, vectorBoxMatrix, vectorBuilderErasedEdges, vectorCornerAt, vectorCorners, vectorCornersAttribute, vectorDiamondPath, vectorDocumentToSvg, vectorEnteredGroups, vectorFillMap, vectorGradientArea, vectorGradientAspect, vectorGradientBarPosition, vectorGradientFocalParam, vectorGradientHandles, vectorGradientMatrix, vectorGradientMidpointFromPosition, vectorGradientMidpointPosition, vectorGradientNeedsExpansion, vectorGradientParam, vectorGradientPoints, vectorGradientRamp, vectorGradientSvgDefs, vectorGradientTAt, vectorGradientTargetPath, vectorGradientUnitsMatrix, vectorInkShapeName, vectorLiveBooleanSteps, vectorNodeBounds, vectorNodeRotation, vectorNodeToBezier, vectorOperandOperation, vectorPaintToHex, vectorPaintToSvg, vectorParentMatrix, vectorPathData, vectorPathEntries, vectorPathLocalBounds, vectorPathWorldBezier, vectorPathfinderShape, vectorRepeaterCopies, vectorResizeCursor, vectorResultStyle, vectorShapeBuilderHit, vectorShapeBuilderMap, vectorStrokeGradientDefs, vectorStrokeLineArea, vectorStrokeOutline, vectorStrokeOutlinePath, vectorStrokeParts, vectorStrokeReach, vectorStrokeSvgParts, vectorStrokeWidthGeometry, vectorToolLabel, vectorWorldMatrix, walkVectorNodes, widthProfileAt, widthProfileFromAttribute, widthProfileMaxScale, widthProfilePreset, widthProfilePresetId, widthProfileToAttribute, wigglePaths, zigzagPaths };