@pixerate/editor 0.113.0 → 0.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/THIRD_PARTY_NOTICES.md +8 -0
  2. package/dist/animation-editor/index.cjs +60 -54
  3. package/dist/animation-editor/index.cjs.map +1 -1
  4. package/dist/animation-editor/index.d.cts +3 -3
  5. package/dist/animation-editor/index.d.ts +3 -3
  6. package/dist/animation-editor/index.js +14 -8
  7. package/dist/animation-editor/index.js.map +1 -1
  8. package/dist/builtin-CY97ppKM.d.cts +354 -0
  9. package/dist/builtin-CY97ppKM.d.ts +354 -0
  10. package/dist/canvas/index.cjs +3 -3
  11. package/dist/canvas/index.cjs.map +1 -1
  12. package/dist/canvas/index.js +9 -9
  13. package/dist/chunk-26PGXHY7.cjs +753 -0
  14. package/dist/chunk-26PGXHY7.cjs.map +1 -0
  15. package/dist/chunk-2OJACTPR.cjs +929 -0
  16. package/dist/chunk-2OJACTPR.cjs.map +1 -0
  17. package/dist/chunk-3UFGNHSP.js +929 -0
  18. package/dist/chunk-3UFGNHSP.js.map +1 -0
  19. package/dist/chunk-643B2HKC.cjs +534 -0
  20. package/dist/chunk-643B2HKC.cjs.map +1 -0
  21. package/dist/chunk-6FCKOS2B.js +534 -0
  22. package/dist/chunk-6FCKOS2B.js.map +1 -0
  23. package/dist/chunk-BRLYOPLT.js +2574 -0
  24. package/dist/chunk-BRLYOPLT.js.map +1 -0
  25. package/dist/{chunk-LQEEDHOP.js → chunk-C6C5PDKU.js} +759 -761
  26. package/dist/chunk-C6C5PDKU.js.map +1 -0
  27. package/dist/{chunk-4KLT7ZYS.cjs → chunk-DFQEX3AM.cjs} +29 -29
  28. package/dist/{chunk-4KLT7ZYS.cjs.map → chunk-DFQEX3AM.cjs.map} +1 -1
  29. package/dist/chunk-G5NMLUVF.cjs +2574 -0
  30. package/dist/chunk-G5NMLUVF.cjs.map +1 -0
  31. package/dist/{chunk-YGIMK4NX.cjs → chunk-I7FQBWMQ.cjs} +813 -842
  32. package/dist/chunk-I7FQBWMQ.cjs.map +1 -0
  33. package/dist/{chunk-LPYOIVLA.js → chunk-LKCYANMW.js} +3 -3
  34. package/dist/{chunk-W3GXSUSQ.cjs → chunk-LPLCWZTM.cjs} +5087 -1283
  35. package/dist/chunk-LPLCWZTM.cjs.map +1 -0
  36. package/dist/chunk-MMVHBKMM.js +753 -0
  37. package/dist/chunk-MMVHBKMM.js.map +1 -0
  38. package/dist/{chunk-POGBUYWE.cjs → chunk-ST7E3NEE.cjs} +857 -859
  39. package/dist/chunk-ST7E3NEE.cjs.map +1 -0
  40. package/dist/{chunk-7VOHOPLW.cjs → chunk-TCKIXI46.cjs} +59 -59
  41. package/dist/{chunk-7VOHOPLW.cjs.map → chunk-TCKIXI46.cjs.map} +1 -1
  42. package/dist/{chunk-XIOMMGPD.cjs → chunk-TFOPHZ3U.cjs} +1 -1
  43. package/dist/chunk-TFOPHZ3U.cjs.map +1 -0
  44. package/dist/{chunk-Z4BC6M74.js → chunk-UBIXVXPR.js} +2 -2
  45. package/dist/{chunk-BLWCAQCW.js → chunk-VXR7XWMF.js} +4574 -770
  46. package/dist/chunk-VXR7XWMF.js.map +1 -0
  47. package/dist/{chunk-CZOXTEMN.js → chunk-XICA4PVO.js} +392 -421
  48. package/dist/chunk-XICA4PVO.js.map +1 -0
  49. package/dist/{chunk-HNS7UHCM.js → chunk-XK5LZKBD.js} +1 -1
  50. package/dist/chunk-XK5LZKBD.js.map +1 -0
  51. package/dist/cms/index.cjs +146 -0
  52. package/dist/cms/index.cjs.map +1 -0
  53. package/dist/cms/index.d.cts +51 -0
  54. package/dist/cms/index.d.ts +51 -0
  55. package/dist/cms/index.js +146 -0
  56. package/dist/cms/index.js.map +1 -0
  57. package/dist/{export-CEXEzqBf.d.cts → export-BJE8T0YA.d.cts} +279 -191
  58. package/dist/{export-DIkoK8-r.d.ts → export-Con3UKkm.d.ts} +279 -191
  59. package/dist/image-editor/index.cjs +1848 -1218
  60. package/dist/image-editor/index.cjs.map +1 -1
  61. package/dist/image-editor/index.d.cts +85 -93
  62. package/dist/image-editor/index.d.ts +85 -93
  63. package/dist/image-editor/index.js +871 -241
  64. package/dist/image-editor/index.js.map +1 -1
  65. package/dist/opentype-BZEOSOX3.d.ts +188 -0
  66. package/dist/opentype-Dpe75vL5.d.cts +188 -0
  67. package/dist/paint/index.cjs +4 -4
  68. package/dist/paint/index.d.cts +2 -2
  69. package/dist/paint/index.d.ts +2 -2
  70. package/dist/paint/index.js +3 -3
  71. package/dist/paint-editor/index.cjs +147 -145
  72. package/dist/paint-editor/index.cjs.map +1 -1
  73. package/dist/paint-editor/index.d.cts +9 -8
  74. package/dist/paint-editor/index.d.ts +9 -8
  75. package/dist/paint-editor/index.js +7 -5
  76. package/dist/paint-editor/index.js.map +1 -1
  77. package/dist/raster/index.cjs +53 -3
  78. package/dist/raster/index.cjs.map +1 -1
  79. package/dist/raster/index.d.cts +62 -91
  80. package/dist/raster/index.d.ts +62 -91
  81. package/dist/raster/index.js +59 -9
  82. package/dist/{render-BEriFuqK.d.cts → render-B1K_OoLy.d.cts} +87 -2
  83. package/dist/{render-tjzKaik-.d.ts → render-CrmHOgpo.d.ts} +87 -2
  84. package/dist/{retouch-CEIKR22W.d.cts → retouch-Bxkuc0KH.d.cts} +1 -1
  85. package/dist/{retouch-BXmeSCaB.d.ts → retouch-Do6tBs2H.d.ts} +1 -1
  86. package/dist/{surface-C8RRg_Bh.d.cts → surface-Cn30xIV6.d.cts} +6 -1
  87. package/dist/{surface-C8RRg_Bh.d.ts → surface-Cn30xIV6.d.ts} +6 -1
  88. package/dist/{svg-D_cfkhlB.d.cts → svg-BnRj0q8i.d.cts} +16 -4
  89. package/dist/{svg-wIaKLrU0.d.ts → svg-CmmBFfGT.d.ts} +16 -4
  90. package/dist/{types-DtL_qLFz.d.ts → types-1SUQKDAw.d.ts} +273 -4
  91. package/dist/{types-DyQq-WPY.d.cts → types-yINF17Ta.d.cts} +273 -4
  92. package/dist/vector/index.cjs +12170 -7343
  93. package/dist/vector/index.cjs.map +1 -1
  94. package/dist/vector/index.d.cts +1579 -16
  95. package/dist/vector/index.d.ts +1579 -16
  96. package/dist/vector/index.js +6303 -1476
  97. package/dist/vector/index.js.map +1 -1
  98. package/dist/warp-B39VsOtd.d.cts +348 -0
  99. package/dist/warp-DMN30aY6.d.ts +348 -0
  100. package/dist/zlib-dxQdgHyN.d.cts +95 -0
  101. package/dist/zlib-dxQdgHyN.d.ts +95 -0
  102. package/package.json +9 -2
  103. package/skills/pixerate-image-editor/SKILL.md +13 -36
  104. package/skills/pixerate-image-editor/references/color-management.md +42 -0
  105. package/skills/pixerate-image-editor/references/photoshop-files.md +41 -0
  106. package/skills/pixerate-paint-editor/SKILL.md +136 -4
  107. package/skills/pixerate-vector/SKILL.md +72 -2
  108. package/dist/chunk-BLWCAQCW.js.map +0 -1
  109. package/dist/chunk-CZOXTEMN.js.map +0 -1
  110. package/dist/chunk-HNS7UHCM.js.map +0 -1
  111. package/dist/chunk-JLYX4V57.cjs +0 -2001
  112. package/dist/chunk-JLYX4V57.cjs.map +0 -1
  113. package/dist/chunk-KB2YBCVS.js +0 -2001
  114. package/dist/chunk-KB2YBCVS.js.map +0 -1
  115. package/dist/chunk-LQEEDHOP.js.map +0 -1
  116. package/dist/chunk-POGBUYWE.cjs.map +0 -1
  117. package/dist/chunk-W3GXSUSQ.cjs.map +0 -1
  118. package/dist/chunk-XIOMMGPD.cjs.map +0 -1
  119. package/dist/chunk-YGIMK4NX.cjs.map +0 -1
  120. package/dist/homography-CZ-tFjay.d.cts +0 -50
  121. package/dist/homography-Ctfjoc1b.d.ts +0 -50
  122. package/dist/warp-CWHZzE3x.d.ts +0 -118
  123. package/dist/warp-D5jz_tN7.d.cts +0 -118
  124. /package/dist/{chunk-LPYOIVLA.js.map → chunk-LKCYANMW.js.map} +0 -0
  125. /package/dist/{chunk-Z4BC6M74.js.map → chunk-UBIXVXPR.js.map} +0 -0
@@ -30,6 +30,12 @@ interface VectorCorner {
30
30
  radius: number;
31
31
  /** Default `round`. */
32
32
  kind?: VectorCornerKind;
33
+ /**
34
+ * Corner smoothing (squircle, as in Figma and iOS), 0–1, round corners between straight sides
35
+ * only: the cut reaches (1 + smoothing) times as far along each side and eases into a shorter arc,
36
+ * so curvature builds up gradually. Default 0 (a circular arc).
37
+ */
38
+ smoothing?: number;
33
39
  }
34
40
  /**
35
41
  * One anchor of a subpath. Handles are absolute document positions; a missing (or `null`)
@@ -46,6 +52,12 @@ interface VectorAnchor {
46
52
  type?: VectorAnchorType;
47
53
  /** Live corner radius. Ignored on smooth / symmetric anchors and the ends of open subpaths. */
48
54
  corner?: VectorCorner | null;
55
+ /**
56
+ * A stable id, unique within its path, given when a constraint refers to the anchor (see
57
+ * `VectorConstraint`). Edits that move or restyle the anchor keep it; edits that rebuild a path
58
+ * drop it, and constraints on a dropped anchor are removed.
59
+ */
60
+ id?: string;
49
61
  }
50
62
  /** A chain of anchors joined by line or cubic Bézier segments. */
51
63
  interface VectorSubpath {
@@ -285,11 +297,76 @@ interface VectorNodeBase {
285
297
  * booleans ignore them.
286
298
  */
287
299
  filters?: VectorFilter[] | null;
300
+ /**
301
+ * How the node follows its frame when the frame is resized (`VectorGroupNode.frame`): per
302
+ * axis, pinned to the start (default `left` / `top`), the end, both (it stretches), the centre,
303
+ * or scaled with the frame. Ignored outside frames.
304
+ */
305
+ resizing?: VectorResizing | null;
306
+ }
307
+ /** Horizontal resizing constraint of a frame's child (see `VectorNodeBase.resizing`). */
308
+ type VectorHorizontalResizing = 'left' | 'right' | 'leftRight' | 'center' | 'scale';
309
+ /** Vertical resizing constraint of a frame's child (see `VectorNodeBase.resizing`). */
310
+ type VectorVerticalResizing = 'top' | 'bottom' | 'topBottom' | 'center' | 'scale';
311
+ declare const VECTOR_HORIZONTAL_RESIZING: readonly VectorHorizontalResizing[];
312
+ declare const VECTOR_VERTICAL_RESIZING: readonly VectorVerticalResizing[];
313
+ /** A frame child's resizing constraints (Figma's "constraints"). */
314
+ interface VectorResizing {
315
+ /** Default `left`. */
316
+ horizontal?: VectorHorizontalResizing;
317
+ /** Default `top`. */
318
+ vertical?: VectorVerticalResizing;
319
+ }
320
+ /**
321
+ * Makes a group a frame (an artboard when top-level): a rectangle in the group's own space with an
322
+ * optional fill drawn below the children, which by default it clips. Resizing the frame moves and
323
+ * resizes its children by their `resizing` constraints instead of scaling them.
324
+ */
325
+ interface VectorFrame {
326
+ x: number;
327
+ y: number;
328
+ width: number;
329
+ height: number;
330
+ /** The frame's background, drawn below its children (default none). */
331
+ fill?: VectorPaint;
332
+ /** Clip the children to the frame (default true). */
333
+ clip?: boolean;
288
334
  }
289
335
  /** A shape made of one or more subpaths (holes and compound shapes included). */
290
336
  interface VectorPathNode extends VectorNodeBase, VectorStyle {
291
337
  type: 'path';
292
338
  subpaths: VectorSubpath[];
339
+ /**
340
+ * Makes the path a connector: an open line whose ends may be glued to other objects'
341
+ * connection sites. Its geometry is routed again after every edit, so it follows them.
342
+ */
343
+ connector?: VectorConnector | null;
344
+ }
345
+ /**
346
+ * Where a connector end meets an object: the middle of a side of the object's own (unrotated)
347
+ * bounds, its centre, or `auto` (the side facing the connector's other end, chosen on every route).
348
+ */
349
+ type VectorConnectorSide = 'top' | 'right' | 'bottom' | 'left' | 'center' | 'auto';
350
+ declare const VECTOR_CONNECTOR_SIDES: readonly VectorConnectorSide[];
351
+ /** How a connector runs between its ends: a straight line, right-angled elbows or an S-curve. */
352
+ type VectorConnectorRoute = 'straight' | 'elbow' | 'curved';
353
+ declare const VECTOR_CONNECTOR_ROUTES: readonly VectorConnectorRoute[];
354
+ /** A glued connector end. */
355
+ interface VectorConnectorEnd {
356
+ nodeId: string;
357
+ /** Default `auto`. */
358
+ side?: VectorConnectorSide;
359
+ }
360
+ /** A connector's settings (`VectorPathNode.connector`). An end that is not glued stays where it is. */
361
+ interface VectorConnector {
362
+ start?: VectorConnectorEnd | null;
363
+ end?: VectorConnectorEnd | null;
364
+ /** Default `straight`. */
365
+ route?: VectorConnectorRoute;
366
+ /** Corner radius of an elbow route's bends (document units, default 0). */
367
+ radius?: number;
368
+ /** How far an elbow or curve leaves a glued end straight out of its side before turning (document units, default 16). */
369
+ gap?: number;
293
370
  }
294
371
  /**
295
372
  * How a blend spaces its in-betweens: a number of `steps` between each pair of keys, a fixed
@@ -358,8 +435,145 @@ interface VectorGroupNode extends VectorNodeBase {
358
435
  * path effects to the contents (not the mask). Ignored on blends and live booleans.
359
436
  */
360
437
  mask?: VectorMask | null;
438
+ /**
439
+ * Makes the group a frame (see `VectorFrame`): it draws its fill below the children, clips them,
440
+ * selects and snaps by its rectangle, and lays its children out by their `resizing` constraints
441
+ * when resized. Ignored on blends, live booleans and mask groups.
442
+ */
443
+ frame?: VectorFrame | null;
444
+ }
445
+ /**
446
+ * The character style of text (a font and how it is set). Sizes are document units; `tracking` is in
447
+ * 1/1000 em. Paint comes from the node's fills and strokes (and a run's own `fill`).
448
+ */
449
+ interface VectorCharacterStyle {
450
+ /** Family name ("Inter"); a family the shaper lacks draws in a fallback and is listed as missing. */
451
+ fontFamily: string;
452
+ /** CSS weight, 1–1000 (400 regular, 700 bold). */
453
+ fontWeight: number;
454
+ /** Default false. */
455
+ italic?: boolean;
456
+ fontSize: number;
457
+ /** Letter spacing in 1/1000 em (default 0). */
458
+ tracking?: number;
459
+ /** Baseline-to-baseline distance; absent: auto (`autoLeading` × size). */
460
+ leading?: number;
461
+ /** Raises (positive) or lowers the text (default 0). */
462
+ baselineShift?: number;
463
+ underline?: boolean;
464
+ strikethrough?: boolean;
465
+ }
466
+ /** Character style fields a run can set over the node's own style, plus its own fill. */
467
+ type VectorTextRunStyle = Partial<VectorCharacterStyle> & {
468
+ /** The run's fill: replaces the paint of the node's top fill for these characters. */
469
+ fill?: VectorPaint;
470
+ };
471
+ /** A style over `length` UTF-16 code units of the text, in order. */
472
+ interface VectorTextRun {
473
+ length: number;
474
+ style: VectorTextRunStyle;
475
+ }
476
+ type VectorTextAlign = 'left' | 'center' | 'right' | 'justify';
477
+ declare const VECTOR_TEXT_ALIGNS: readonly VectorTextAlign[];
478
+ /** Paragraph settings of a text node (all its paragraphs). Lengths in document units. */
479
+ interface VectorParagraphStyle {
480
+ /** Default `left`. `justify` stretches every line of area text but a paragraph's last; on a path it spreads the text over the path. */
481
+ align?: VectorTextAlign;
482
+ /** Auto leading as a multiple of the font size (default 1.2). */
483
+ autoLeading?: number;
484
+ firstLineIndent?: number;
485
+ startIndent?: number;
486
+ endIndent?: number;
487
+ spaceBefore?: number;
488
+ spaceAfter?: number;
489
+ }
490
+ /** Where text on a path sits across the path: its baseline, ascender, descender or centre on the line. */
491
+ type VectorPathTextBaseline = 'baseline' | 'ascender' | 'descender' | 'center';
492
+ declare const VECTOR_PATH_TEXT_BASELINES: readonly VectorPathTextBaseline[];
493
+ /**
494
+ * Where a text node's text goes, in the node's own space:
495
+ * - `point`: one line per paragraph, the first baseline starting at (`x`, `y`);
496
+ * - `area`: lines wrapped inside the box at (`x`, `y`) of `width` × `height` (lines that do not fit
497
+ * are hidden: the text overflows);
498
+ * - `path`: one line set along `path` (paragraph breaks become spaces), from `start` to `end`
499
+ * (distances from the path's ends), turned with the path (`orientation: 'rotate'`) or upright.
500
+ * `flip` runs the text the other way, on the other side.
501
+ */
502
+ type VectorTextFrame = {
503
+ kind: 'point';
504
+ x: number;
505
+ y: number;
506
+ } | {
507
+ kind: 'area';
508
+ x: number;
509
+ y: number;
510
+ width: number;
511
+ height: number;
512
+ } | {
513
+ kind: 'path';
514
+ path: VectorSubpath;
515
+ /** Margin from the path's start (default 0). */
516
+ start?: number;
517
+ /** Margin from the path's end (default 0). */
518
+ end?: number;
519
+ flip?: boolean;
520
+ /** Default `rotate`. */
521
+ orientation?: 'rotate' | 'upright';
522
+ /** Default `baseline`. */
523
+ baseline?: VectorPathTextBaseline;
524
+ };
525
+ /**
526
+ * Text: a string with a character style, optional styled runs and a paragraph style, set in a
527
+ * frame. It paints with the node's fills and strokes like a path. Layout and glyphs come from the
528
+ * editor's text shaper (`setVectorTextShaper`); with an outline shaper the text draws as glyph
529
+ * outlines (so path effects, envelopes, booleans and Create Outlines work), otherwise as SVG text.
530
+ */
531
+ interface VectorTextNode extends VectorNodeBase, VectorStyle {
532
+ type: 'text';
533
+ text: string;
534
+ /** The base character style. */
535
+ font: VectorCharacterStyle;
536
+ /** Runs over the text, each overriding some fields of `font` (absent: one style throughout). */
537
+ runs?: VectorTextRun[] | null;
538
+ paragraph?: VectorParagraphStyle | null;
539
+ frame: VectorTextFrame;
540
+ }
541
+ /**
542
+ * Per-instance changes to a symbol's art: every fill and / or stroke of the art painted with one
543
+ * paint (a tint), and art nodes (by their id in the symbol) hidden.
544
+ */
545
+ interface VectorInstanceOverrides {
546
+ fill?: VectorPaint;
547
+ stroke?: VectorPaint;
548
+ /** Ids of nodes of the symbol's art (top-level or nested) not drawn in this instance. */
549
+ hidden?: string[];
550
+ }
551
+ /**
552
+ * A placed copy of a symbol (`VectorDocument.symbols`): it draws the symbol's art through its
553
+ * `transform`, which, unlike other nodes', may scale and skew. Editing the symbol changes every
554
+ * instance.
555
+ */
556
+ interface VectorInstanceNode extends VectorNodeBase {
557
+ type: 'instance';
558
+ symbolId: string;
559
+ /** Strokes (and other lengths of the art's paint) scale with the instance (default true, as in Illustrator). */
560
+ scaleStrokes?: boolean;
561
+ overrides?: VectorInstanceOverrides | null;
562
+ /**
563
+ * The symbol's art, resolved by the editor (the same array as the symbol's `nodes`). Not part of
564
+ * the stored document: `VectorEditorController.toJSON` and SVG export leave it out, and loading
565
+ * resolves it again (`resolveVectorSymbols`).
566
+ */
567
+ art?: VectorNode[];
568
+ }
569
+ type VectorNode = VectorPathNode | VectorGroupNode | VectorTextNode | VectorInstanceNode;
570
+ /** A symbol: reusable art its instances draw. */
571
+ interface VectorSymbol {
572
+ id: string;
573
+ name: string;
574
+ /** The art, bottom to top, in the symbol's own space (its origin is the registration point instances are placed by). */
575
+ nodes: VectorNode[];
361
576
  }
362
- type VectorNode = VectorPathNode | VectorGroupNode;
363
577
  /** A vector drawing: an artboard and its nodes, bottom to top. */
364
578
  interface VectorDocument {
365
579
  width: number;
@@ -367,6 +581,58 @@ interface VectorDocument {
367
581
  /** Artboard colour (default: transparent). */
368
582
  background?: string;
369
583
  nodes: VectorNode[];
584
+ /** Symbols the document's instances draw (see `VectorInstanceNode`). */
585
+ symbols?: VectorSymbol[];
586
+ /** Constraints between anchors, segments and circles, solved after every edit. */
587
+ constraints?: VectorConstraint[];
588
+ /** Named values the constraints' expressions use. */
589
+ parameters?: VectorParameter[];
590
+ }
591
+ /**
592
+ * Constraint kinds (CAD-style parametric drawing). Geometric: `coincident` (two points, a point on
593
+ * a segment's line, or a point on a circle), `collinear` (two segments on one line), `concentric`
594
+ * (two circles, or a circle's centre on a point), `fix`, `parallel`, `perpendicular`, `horizontal`
595
+ * / `vertical` (a segment, or two points level), `tangent` (a segment and a circle, two circles, or
596
+ * G1 at an anchor: its handles in line), `smooth` (G2 at an anchor: G1 and equal curvature),
597
+ * `symmetric` (two points about a segment's line) and `equal` (segment lengths or radii).
598
+ * Dimensional (with a `value`): `distance`, `angle` (degrees), `radius` and `diameter`.
599
+ */
600
+ type VectorConstraintKind = 'coincident' | 'collinear' | 'concentric' | 'fix' | 'parallel' | 'perpendicular' | 'horizontal' | 'vertical' | 'tangent' | 'smooth' | 'symmetric' | 'equal' | 'distance' | 'angle' | 'radius' | 'diameter';
601
+ declare const VECTOR_CONSTRAINT_KINDS: readonly VectorConstraintKind[];
602
+ /**
603
+ * What a constraint refers to: an anchor of a path (by its stable `id`), one of the anchor's
604
+ * handles, the segment from the anchor to the next one, or (no `anchor`) a whole path as a circle
605
+ * (its centre and radius, for closed round paths).
606
+ */
607
+ interface VectorGeomRef {
608
+ nodeId: string;
609
+ /** The anchor's `id` (see `VectorAnchor.id`). */
610
+ anchor?: string;
611
+ /** With `anchor`: the handle instead of the anchor point. */
612
+ handle?: 'in' | 'out';
613
+ /** With `anchor`: the segment from it to the next anchor. */
614
+ segment?: boolean;
615
+ /** Without `anchor`: the path as a circle. */
616
+ circle?: boolean;
617
+ }
618
+ /** A constraint kept by the document and solved after every edit. */
619
+ interface VectorConstraint {
620
+ id: string;
621
+ kind: VectorConstraintKind;
622
+ refs: VectorGeomRef[];
623
+ /** Dimensional constraints: the value as an expression (document units, degrees for angles), e.g. `"40"` or `"w / 2"`. */
624
+ value?: string;
625
+ /** Dimensional constraints: a name other expressions can use (`d1`, `ang2`). */
626
+ name?: string;
627
+ /** `distance`: measured along the line between (default), or only horizontally or vertically. */
628
+ axis?: 'aligned' | 'horizontal' | 'vertical';
629
+ }
630
+ /** A named value constraints' expressions can use. */
631
+ interface VectorParameter {
632
+ name: string;
633
+ /** An expression (numbers, other names, `+ - * /`, parentheses, `pi`). */
634
+ value: string;
635
+ description?: string;
370
636
  }
371
637
  /** An axis-aligned rectangle. */
372
638
  interface VectorBounds {
@@ -393,9 +659,12 @@ interface VectorHandleRef extends VectorAnchorRef {
393
659
  * fills the region the visible outlines enclose around a click with a new shape. `blend`
394
660
  * blends the shape clicked first into the one clicked next (clicking an anchor of a closed path
395
661
  * starts the blend there). `envelope` edits the mesh of the selection's envelope: drag its
396
- * anchors and handles, or inside a patch to pull the surface.
662
+ * anchors and handles, or inside a patch to pull the surface. `type` adds point text (click) or
663
+ * area text (drag) and edits text it clicks; `typePath` sets text along the path it clicks. `frame`
664
+ * drags out a frame (`VectorGroupNode.frame`), taking in the top-level objects it fully encloses.
665
+ * `connector` drags a connector between objects, gluing each end to the side it starts or ends on.
397
666
  */
398
- type VectorTool = 'select' | 'direct' | 'pen' | 'pencil' | 'rect' | 'ellipse' | 'polygon' | 'star' | 'line' | 'scissors' | 'knife' | 'eraser' | 'width' | 'shapeBuilder' | 'paintBucket' | 'blend' | 'gradient' | 'envelope';
667
+ type VectorTool = 'select' | 'direct' | 'pen' | 'pencil' | 'rect' | 'ellipse' | 'polygon' | 'star' | 'line' | 'scissors' | 'knife' | 'eraser' | 'width' | 'shapeBuilder' | 'paintBucket' | 'blend' | 'gradient' | 'envelope' | 'type' | 'typePath' | 'frame' | 'connector';
399
668
  declare const VECTOR_TOOLS: readonly VectorTool[];
400
669
  /** Keyboard modifiers held during a pointer event. */
401
670
  interface VectorModifiers {
@@ -627,4 +896,4 @@ type VectorFilter = {
627
896
  };
628
897
  }[VectorFilterType];
629
898
 
630
- export { type VectorBlend as $, type VectorCornerKind as A, type VectorViewport as B, type VectorTransformHandle as C, type VectorAnchorRef as D, type VectorPathfinderOperation as E, type VectorTool as F, type VectorDefaults as G, type VectorStyle as H, type VectorHandleRef as I, type VectorSegmentRef as J, type VectorBlendOptions as K, type VectorModifiers as L, type VectorBlendMode as M, type VectorAlign as N, type VectorDistribute as O, type VectorArrange as P, type VectorMaskType as Q, type VectorMask as R, type VectorAverageAxis as S, type VectorArrowhead as T, type VectorBlendSpacing as U, type VectorEffectType as V, type VectorGradientInterpolation as W, type VectorStrokeGradientMode as X, type VectorArrowAlign as Y, type VectorPaintLayer as Z, type VectorStrokeLayer as _, type VectorEffectParamsMap as a, type VectorMergeMode as a0, type VectorLineJoin as a1, type VectorStrokeSettings as a2, VECTOR_ARROWHEADS as a3, VECTOR_BLEND_MODES as a4, VECTOR_BLEND_SPACINGS as a5, VECTOR_CORNER_KINDS as a6, VECTOR_EFFECT_TYPES as a7, VECTOR_FILTER_TYPES as a8, VECTOR_GRADIENT_INTERPOLATIONS as a9, VECTOR_GRADIENT_SPREADS as aa, VECTOR_GRADIENT_TYPES as ab, VECTOR_MASK_TYPES as ac, VECTOR_MERGE_MODES as ad, VECTOR_PATHFINDER_OPERATIONS as ae, VECTOR_STROKE_GRADIENT_MODES as af, VECTOR_TOOLS as ag, VECTOR_TRANSFORM_HANDLES as ah, type VectorCorner as ai, type VectorLineCap as aj, type VectorStrokeLayerKind as ak, type VectorWarpStyle as al, type VectorPathNode as b, type VectorFillRule as c, type VectorBooleanOperation as d, type VectorNode as e, type VectorEffect as f, type VectorGroupNode as g, type VectorBounds as h, type VectorWarpMesh as i, type VectorFilterType as j, type VectorFilterParamsMap as k, type VectorFilter as l, type VectorGradient as m, type Vec2 as n, type VectorGradientUnits as o, type VectorGradientSpread as p, type VectorGradientType as q, type VectorPaint as r, type VectorMatrix as s, type VectorGradientStop as t, type VectorStrokeAlign as u, type VectorSubpath as v, type VectorDocument as w, type VectorWidthPoint as x, type VectorAnchor as y, type VectorAnchorType as z };
899
+ export { type VectorAlign as $, type VectorTextNode as A, type VectorAnchorType as B, type VectorCornerKind as C, type VectorViewport as D, type VectorConnectorRoute as E, type VectorConnectorSide as F, type VectorConnectorEnd as G, type VectorConnector as H, type VectorConstraintKind as I, type VectorConstraint as J, type VectorCharacterStyle as K, type VectorTextRun as L, type VectorParagraphStyle as M, type VectorTextFrame as N, type VectorTransformHandle as O, type VectorAnchorRef as P, type VectorPathfinderOperation as Q, type VectorTool as R, type VectorDefaults as S, type VectorTextAlign as T, type VectorStyle as U, type VectorEffectType as V, type VectorHandleRef as W, type VectorSegmentRef as X, type VectorBlendOptions as Y, type VectorModifiers as Z, type VectorBlendMode as _, type VectorEffectParamsMap as a, type VectorDistribute as a0, type VectorArrange as a1, type VectorMaskType as a2, type VectorArrowhead as a3, type VectorResizing as a4, type VectorFrame as a5, type VectorHorizontalResizing as a6, type VectorVerticalResizing as a7, type VectorMask as a8, type VectorAverageAxis as a9, VECTOR_MASK_TYPES as aA, VECTOR_MERGE_MODES as aB, VECTOR_PATHFINDER_OPERATIONS as aC, VECTOR_PATH_TEXT_BASELINES as aD, VECTOR_STROKE_GRADIENT_MODES as aE, VECTOR_TEXT_ALIGNS as aF, VECTOR_TOOLS as aG, VECTOR_TRANSFORM_HANDLES as aH, VECTOR_VERTICAL_RESIZING as aI, type VectorCorner as aJ, type VectorGeomRef as aK, type VectorLineCap as aL, type VectorPathTextBaseline as aM, type VectorStrokeLayerKind as aN, type VectorTextRunStyle as aO, type VectorWarpStyle as aP, type VectorSymbol as aa, type VectorParameter as ab, type VectorBlendSpacing as ac, type VectorGradientInterpolation as ad, type VectorStrokeGradientMode as ae, type VectorArrowAlign as af, type VectorPaintLayer as ag, type VectorStrokeLayer as ah, type VectorBlend as ai, type VectorMergeMode as aj, type VectorLineJoin as ak, type VectorStrokeSettings as al, type VectorInstanceOverrides as am, VECTOR_ARROWHEADS as an, VECTOR_BLEND_MODES as ao, VECTOR_BLEND_SPACINGS as ap, VECTOR_CONNECTOR_ROUTES as aq, VECTOR_CONNECTOR_SIDES as ar, VECTOR_CONSTRAINT_KINDS as as, VECTOR_CORNER_KINDS as at, VECTOR_EFFECT_TYPES as au, VECTOR_FILTER_TYPES as av, VECTOR_GRADIENT_INTERPOLATIONS as aw, VECTOR_GRADIENT_SPREADS as ax, VECTOR_GRADIENT_TYPES as ay, VECTOR_HORIZONTAL_RESIZING as az, type VectorPathNode as b, type VectorFillRule as c, type VectorBooleanOperation as d, type VectorNode as e, type VectorEffect as f, type VectorGroupNode as g, type VectorBounds as h, type VectorWarpMesh as i, type VectorInstanceNode as j, type VectorFilterType as k, type VectorFilterParamsMap as l, type VectorFilter as m, type VectorGradient as n, type Vec2 as o, type VectorGradientUnits as p, type VectorGradientSpread as q, type VectorGradientType as r, type VectorPaint as s, type VectorMatrix as t, type VectorGradientStop as u, type VectorStrokeAlign as v, type VectorSubpath as w, type VectorDocument as x, type VectorWidthPoint as y, type VectorAnchor as z };