@pixerate/editor 0.108.0 → 0.110.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.
- package/dist/animation/index.cjs +5 -5
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.js +9 -9
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +2 -1
- package/dist/animation-editor/index.d.ts +2 -1
- package/dist/animation-editor/index.js +29 -29
- package/dist/blending-DXl06NSx.d.ts +486 -0
- package/dist/blending-aOE6Y3UE.d.cts +486 -0
- package/dist/canvas/index.cjs +27 -27
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.js +11 -11
- package/dist/{chunk-2FGRTYJN.cjs → chunk-477UVMNR.cjs} +3 -3
- package/dist/{chunk-2FGRTYJN.cjs.map → chunk-477UVMNR.cjs.map} +1 -1
- package/dist/chunk-7VOHOPLW.cjs +1136 -0
- package/dist/chunk-7VOHOPLW.cjs.map +1 -0
- package/dist/{chunk-HUQ7EHVI.js → chunk-BLWCAQCW.js} +723 -1975
- package/dist/chunk-BLWCAQCW.js.map +1 -0
- package/dist/{chunk-SOROZ2BF.js → chunk-DMRSJBJF.js} +1939 -318
- package/dist/chunk-DMRSJBJF.js.map +1 -0
- package/dist/chunk-FTBZPI77.cjs +1 -0
- package/dist/chunk-FTBZPI77.cjs.map +1 -0
- package/dist/{chunk-WMBIJCHA.js → chunk-HNS7UHCM.js} +5 -1
- package/dist/{chunk-WMBIJCHA.js.map → chunk-HNS7UHCM.js.map} +1 -1
- package/dist/chunk-JLYX4V57.cjs +2001 -0
- package/dist/chunk-JLYX4V57.cjs.map +1 -0
- package/dist/chunk-KB2YBCVS.js +2001 -0
- package/dist/chunk-KB2YBCVS.js.map +1 -0
- package/dist/{chunk-G4BIYE6R.js → chunk-LQEEDHOP.js} +40 -2
- package/dist/chunk-LQEEDHOP.js.map +1 -0
- package/dist/{chunk-FRD3FUXI.cjs → chunk-MGL4U5WA.cjs} +2144 -523
- package/dist/chunk-MGL4U5WA.cjs.map +1 -0
- package/dist/{chunk-T3QZ6S47.cjs → chunk-POGBUYWE.cjs} +131 -93
- package/dist/chunk-POGBUYWE.cjs.map +1 -0
- package/dist/chunk-VKK5VS2T.js +1 -0
- package/dist/{chunk-UTEVPQTS.cjs → chunk-W3GXSUSQ.cjs} +746 -1998
- package/dist/chunk-W3GXSUSQ.cjs.map +1 -0
- package/dist/{chunk-SZ6KMZNM.cjs → chunk-XIOMMGPD.cjs} +6 -2
- package/dist/chunk-XIOMMGPD.cjs.map +1 -0
- package/dist/{chunk-JK6M6V7G.js → chunk-Z3YWVUWT.js} +4 -4
- package/dist/{chunk-3PHA3UKI.js → chunk-Z4BC6M74.js} +523 -121
- package/dist/chunk-Z4BC6M74.js.map +1 -0
- package/dist/{export-a9bnF7Cl.d.ts → export-CO2ryu3I.d.ts} +419 -18
- package/dist/{export-JGWQEPJn.d.cts → export-DRiLzP_j.d.cts} +419 -18
- package/dist/image-editor/index.cjs +1665 -1113
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +78 -14
- package/dist/image-editor/index.d.ts +78 -14
- package/dist/image-editor/index.js +843 -291
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint/index.cjs +28 -4
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +3 -89
- package/dist/paint/index.d.ts +3 -89
- package/dist/paint/index.js +27 -3
- package/dist/paint-editor/index.cjs +1056 -287
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +304 -22
- package/dist/paint-editor/index.d.ts +304 -22
- package/dist/paint-editor/index.js +852 -83
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +7 -3
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.d.cts +3 -129
- package/dist/raster/index.d.ts +3 -129
- package/dist/raster/index.js +6 -2
- package/dist/{compositor-D92URMlm.d.cts → render-BEriFuqK.d.cts} +136 -2
- package/dist/{compositor-Kt_M4ruo.d.ts → render-tjzKaik-.d.ts} +136 -2
- package/dist/{surface-CkKOHGPm.d.cts → surface-C8RRg_Bh.d.cts} +109 -1
- package/dist/{surface-CkKOHGPm.d.ts → surface-C8RRg_Bh.d.ts} +109 -1
- package/dist/{svg-SseJTIrA.d.ts → svg-D_cfkhlB.d.cts} +3 -629
- package/dist/{svg-ClVIG4T7.d.cts → svg-wIaKLrU0.d.ts} +3 -629
- package/dist/types-DtL_qLFz.d.ts +630 -0
- package/dist/types-DyQq-WPY.d.cts +630 -0
- package/dist/vector/index.cjs +563 -563
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +4 -2
- package/dist/vector/index.d.ts +4 -2
- package/dist/vector/index.js +69 -69
- package/dist/video-editor/index.cjs +3 -3
- package/dist/video-editor/index.js +2 -2
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +49 -13
- package/dist/chunk-3PHA3UKI.js.map +0 -1
- package/dist/chunk-6BU5WU4R.cjs +0 -1
- package/dist/chunk-6BU5WU4R.cjs.map +0 -1
- package/dist/chunk-DWGZUSES.cjs +0 -694
- package/dist/chunk-DWGZUSES.cjs.map +0 -1
- package/dist/chunk-FRD3FUXI.cjs.map +0 -1
- package/dist/chunk-G4BIYE6R.js.map +0 -1
- package/dist/chunk-HUFQD4CB.cjs +0 -734
- package/dist/chunk-HUFQD4CB.cjs.map +0 -1
- package/dist/chunk-HUQ7EHVI.js.map +0 -1
- package/dist/chunk-KKREERP2.js +0 -694
- package/dist/chunk-KKREERP2.js.map +0 -1
- package/dist/chunk-SOROZ2BF.js.map +0 -1
- package/dist/chunk-SZ6KMZNM.cjs.map +0 -1
- package/dist/chunk-T3QZ6S47.cjs.map +0 -1
- package/dist/chunk-UTEVPQTS.cjs.map +0 -1
- package/dist/chunk-XYBJKUAU.js +0 -1
- package/dist/mixer-5ziHU8OS.d.cts +0 -282
- package/dist/mixer-DNqiYXYQ.d.ts +0 -282
- /package/dist/{chunk-XYBJKUAU.js.map → chunk-VKK5VS2T.js.map} +0 -0
- /package/dist/{chunk-JK6M6V7G.js.map → chunk-Z3YWVUWT.js.map} +0 -0
|
@@ -1,631 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
/** An affine matrix `[a, b, c, d, e, f]`: `x' = a·x + c·y + e`, `y' = b·x + d·y + f` (SVG order). */
|
|
5
|
-
type VectorMatrix = readonly [number, number, number, number, number, number];
|
|
6
|
-
/** A point in document coordinates. */
|
|
7
|
-
interface Vec2 {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* How an anchor's handles relate:
|
|
13
|
-
* - `corner`: handles move independently (or are absent).
|
|
14
|
-
* - `smooth`: handles stay on one line through the anchor, lengths independent.
|
|
15
|
-
* - `symmetric`: handles stay on one line with equal lengths.
|
|
16
|
-
*/
|
|
17
|
-
type VectorAnchorType = 'corner' | 'smooth' | 'symmetric';
|
|
18
|
-
/**
|
|
19
|
-
* Live corner shapes: `round` (an arc tangent to both sides), `inverted` (an arc centred on
|
|
20
|
-
* the corner, cut into the shape) and `chamfer` (a straight bevel).
|
|
21
|
-
*/
|
|
22
|
-
type VectorCornerKind = 'round' | 'inverted' | 'chamfer';
|
|
23
|
-
declare const VECTOR_CORNER_KINDS: readonly VectorCornerKind[];
|
|
24
|
-
/**
|
|
25
|
-
* A live corner: drawn rounded (or cut) at render, hit-test, bounds, boolean, outline and export
|
|
26
|
-
* time while the stored anchor stays sharp. The radius shrinks to fit when the sides are short:
|
|
27
|
-
* the cut reaches at most halfway along each side.
|
|
28
|
-
*/
|
|
29
|
-
interface VectorCorner {
|
|
30
|
-
radius: number;
|
|
31
|
-
/** Default `round`. */
|
|
32
|
-
kind?: VectorCornerKind;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* One anchor of a subpath. Handles are absolute document positions; a missing (or `null`)
|
|
36
|
-
* handle sits on the anchor, so a segment with no handles at either end is a straight line.
|
|
37
|
-
*/
|
|
38
|
-
interface VectorAnchor {
|
|
39
|
-
x: number;
|
|
40
|
-
y: number;
|
|
41
|
-
/** Control point of the segment arriving at this anchor. */
|
|
42
|
-
in?: Vec2 | null;
|
|
43
|
-
/** Control point of the segment leaving this anchor. */
|
|
44
|
-
out?: Vec2 | null;
|
|
45
|
-
/** Default `corner`. */
|
|
46
|
-
type?: VectorAnchorType;
|
|
47
|
-
/** Live corner radius. Ignored on smooth / symmetric anchors and the ends of open subpaths. */
|
|
48
|
-
corner?: VectorCorner | null;
|
|
49
|
-
}
|
|
50
|
-
/** A chain of anchors joined by line or cubic Bézier segments. */
|
|
51
|
-
interface VectorSubpath {
|
|
52
|
-
anchors: VectorAnchor[];
|
|
53
|
-
/** Joins the last anchor back to the first. */
|
|
54
|
-
closed: boolean;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Gradient styles: `linear` (start → end), `radial` (centred on the start, reaching the end;
|
|
58
|
-
* focal point and aspect), `conic` (an angle sweep around the start, from the end's direction
|
|
59
|
-
* towards the aspect handle's: clockwise on screen), `reflected` (linear mirrored about the
|
|
60
|
-
* start) and `diamond` (`|u| + |v|` in the gradient's frame: a rhombus through the end and the
|
|
61
|
-
* aspect handle).
|
|
62
|
-
*/
|
|
63
|
-
type VectorGradientType = 'linear' | 'radial' | 'conic' | 'reflected' | 'diamond';
|
|
64
|
-
declare const VECTOR_GRADIENT_TYPES: readonly VectorGradientType[];
|
|
65
|
-
/** What a gradient paints past its ends: the end colours, mirrored periods or repeated periods. */
|
|
66
|
-
type VectorGradientSpread = 'pad' | 'reflect' | 'repeat';
|
|
67
|
-
declare const VECTOR_GRADIENT_SPREADS: readonly VectorGradientSpread[];
|
|
68
|
-
/** Where colours mix between stops: sRGB (SVG's own), linear light or Oklab. */
|
|
69
|
-
type VectorGradientInterpolation = 'srgb' | 'linear' | 'oklab';
|
|
70
|
-
declare const VECTOR_GRADIENT_INTERPOLATIONS: readonly VectorGradientInterpolation[];
|
|
71
|
-
/**
|
|
72
|
-
* The space a gradient's points are in: fractions of the shape's bounding box (SVG's
|
|
73
|
-
* `objectBoundingBox`, the default) or the node's own coordinates (`userSpaceOnUse`).
|
|
74
|
-
*/
|
|
75
|
-
type VectorGradientUnits = 'objectBoundingBox' | 'userSpaceOnUse';
|
|
76
|
-
/**
|
|
77
|
-
* How a gradient lies on a stroke: `within` (laid over the stroke's area like a fill), `along`
|
|
78
|
-
* (t runs from 0 at the start of each subpath to 1 at its end) or `across` (from the stroke's
|
|
79
|
-
* left edge to its right edge, looking along the path).
|
|
80
|
-
*/
|
|
81
|
-
type VectorStrokeGradientMode = 'within' | 'along' | 'across';
|
|
82
|
-
declare const VECTOR_STROKE_GRADIENT_MODES: readonly VectorStrokeGradientMode[];
|
|
83
|
-
/** A colour stop. `opacity` multiplies the colour's own alpha. */
|
|
84
|
-
interface VectorGradientStop {
|
|
85
|
-
/** 0–1. */
|
|
86
|
-
offset: number;
|
|
87
|
-
color: string;
|
|
88
|
-
/** 0–1, default 1. */
|
|
89
|
-
opacity?: number;
|
|
90
|
-
/**
|
|
91
|
-
* Where, between this stop and the next (0–1 of the way), the colour is half-way between
|
|
92
|
-
* them. Default 0.5 (an even mix).
|
|
93
|
-
*/
|
|
94
|
-
midpoint?: number;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* A gradient paint. `CanvasGradientDef` (the canvas package's linear `angle` / radial
|
|
98
|
-
* `cx, cy, r` gradients) is a valid value: those fields are the shorthand form. Explicit
|
|
99
|
-
* geometry (`start` / `end`, in `units`) wins over the shorthand.
|
|
100
|
-
*/
|
|
101
|
-
interface VectorGradient {
|
|
102
|
-
type: VectorGradientType;
|
|
103
|
-
stops: VectorGradientStop[];
|
|
104
|
-
/**
|
|
105
|
-
* Shorthand direction in degrees, CSS style (0 points up, clockwise): a linear or reflected
|
|
106
|
-
* gradient's direction across the box (default 180), a conic gradient's start angle or a
|
|
107
|
-
* diamond's turn (default 90).
|
|
108
|
-
*/
|
|
109
|
-
angle?: number;
|
|
110
|
-
/** Shorthand centre and radius of radial, conic and diamond gradients (fractions of the box, default 0.5). */
|
|
111
|
-
cx?: number;
|
|
112
|
-
cy?: number;
|
|
113
|
-
r?: number;
|
|
114
|
-
/** Where t = 0: a linear gradient's start, the centre of the other styles. */
|
|
115
|
-
start?: Vec2;
|
|
116
|
-
/** Where t = 1 along the gradient's main axis (a radial gradient's radius). */
|
|
117
|
-
end?: Vec2;
|
|
118
|
-
/**
|
|
119
|
-
* The end of the secondary axis (radial, conic and diamond): its distance from `start` over
|
|
120
|
-
* the main axis' length is the aspect ratio. Absent: square to the main axis, as long.
|
|
121
|
-
*/
|
|
122
|
-
width?: Vec2 | null;
|
|
123
|
-
/** A radial gradient's focal point (where t = 0); absent: the centre. */
|
|
124
|
-
focal?: Vec2 | null;
|
|
125
|
-
/** Radius of the focal circle as a fraction of the radius (SVG `fr`, default 0). */
|
|
126
|
-
focalRadius?: number;
|
|
127
|
-
/** Space of `start`, `end`, `width` and `focal` (default `objectBoundingBox`). */
|
|
128
|
-
units?: VectorGradientUnits;
|
|
129
|
-
/** Default `pad`. */
|
|
130
|
-
spread?: VectorGradientSpread;
|
|
131
|
-
/** Default `srgb`. */
|
|
132
|
-
interpolation?: VectorGradientInterpolation;
|
|
133
|
-
/**
|
|
134
|
-
* 0–1: how far the colours follow a smooth spline through the stops instead of straight
|
|
135
|
-
* lines (Photoshop's Smoothness). Default 0.
|
|
136
|
-
*/
|
|
137
|
-
smoothness?: number;
|
|
138
|
-
/** On a stroke: how the gradient lies on it (default `within`). Ignored on fills. */
|
|
139
|
-
strokeMode?: VectorStrokeGradientMode;
|
|
140
|
-
}
|
|
141
|
-
/** A fill or stroke: any CSS colour, a gradient, or `null` / `'none'` for no paint. */
|
|
142
|
-
type VectorPaint = string | VectorGradient | CanvasGradientDef | null;
|
|
143
|
-
type VectorFillRule = 'nonzero' | 'evenodd';
|
|
144
|
-
type VectorLineCap = 'butt' | 'round' | 'square';
|
|
145
|
-
type VectorLineJoin = 'miter' | 'round' | 'bevel';
|
|
146
|
-
/**
|
|
147
|
-
* Where the stroke sits on the outline: centred on it, inside the shape or outside it. Only
|
|
148
|
-
* shapes whose subpaths are all closed have an inside; open paths always stroke centred.
|
|
149
|
-
*/
|
|
150
|
-
type VectorStrokeAlign = 'center' | 'inside' | 'outside';
|
|
151
|
-
/** Arrowheads and end markers for the ends of open paths. */
|
|
152
|
-
type VectorArrowhead = 'triangle' | 'arrow' | 'open' | 'circle' | 'square' | 'bar';
|
|
153
|
-
declare const VECTOR_ARROWHEADS: readonly VectorArrowhead[];
|
|
154
|
-
/**
|
|
155
|
-
* `extend`: the head's tip sits past the end point and the path keeps its length; `tip`: the
|
|
156
|
-
* tip sits on the end point and the stroke is shortened under the head.
|
|
157
|
-
*/
|
|
158
|
-
type VectorArrowAlign = 'extend' | 'tip';
|
|
159
|
-
/**
|
|
160
|
-
* One point of a variable-width stroke profile. `t` is the position along the subpath by
|
|
161
|
-
* length (0 at its start, 1 at its end); `left` and `right` are how far the stroke reaches on
|
|
162
|
-
* each side, as multiples of half the stroke width (looking along the path on screen, y down).
|
|
163
|
-
* A uniform stroke has 1 on both sides. Two points at the same `t` make a step.
|
|
164
|
-
*/
|
|
165
|
-
interface VectorWidthPoint {
|
|
166
|
-
t: number;
|
|
167
|
-
left: number;
|
|
168
|
-
right: number;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Blend modes of paint layers and nodes: the set SVG and CSS `mix-blend-mode` draw, named as the
|
|
172
|
-
* image editor names them (`@pixerate/editor/image-editor` `BlendMode`). `linear-dodge` draws as
|
|
173
|
-
* CSS `plus-lighter`. The image editor's other modes (linear burn, vivid light, pigment, …) have
|
|
174
|
-
* no SVG equivalent and are not offered.
|
|
175
|
-
*/
|
|
176
|
-
type VectorBlendMode = 'normal' | 'darken' | 'multiply' | 'color-burn' | 'lighten' | 'screen' | 'color-dodge' | 'linear-dodge' | 'overlay' | 'soft-light' | 'hard-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
177
|
-
/** Every vector blend mode, in the image editor's (Photoshop's) menu order. */
|
|
178
|
-
declare const VECTOR_BLEND_MODES: readonly VectorBlendMode[];
|
|
179
|
-
/** One fill of a path's fill stack (`VectorStyle.fills`). */
|
|
180
|
-
interface VectorPaintLayer {
|
|
181
|
-
/** A colour, a gradient, or `null` for none. */
|
|
182
|
-
paint: VectorPaint;
|
|
183
|
-
/** 0–1, default 1. Multiplies the paint's own alpha. */
|
|
184
|
-
opacity?: number;
|
|
185
|
-
/** How the layer mixes with what is under it (the layers below, then the backdrop). Default `normal`. */
|
|
186
|
-
blendMode?: VectorBlendMode;
|
|
187
|
-
/** Hidden layers are kept but not drawn or hit. Default true. */
|
|
188
|
-
visible?: boolean;
|
|
189
|
-
}
|
|
190
|
-
/** The settings each stroke layer has of its own (the stroke shorthand fields of `VectorStyle`). */
|
|
191
|
-
type VectorStrokeSettings = Pick<VectorStyle, 'strokeWidth' | 'strokeLinecap' | 'strokeLinejoin' | 'strokeDasharray' | 'strokeAlign' | 'startArrow' | 'endArrow' | 'arrowAlign' | 'startArrowScale' | 'endArrowScale' | 'strokeWidthProfile'>;
|
|
192
|
-
/**
|
|
193
|
-
* What a stroke layer draws. Only `paint` (a paint along the outline, the default) exists today.
|
|
194
|
-
* Other kinds are the extension point for strokes drawn some other way, such as a raster
|
|
195
|
-
* brushstroke from `@pixerate/editor/paint` laid along the path: a layer with an unknown kind is
|
|
196
|
-
* kept through edits, load and SVG round trips, listed to agents, and skipped when drawing and
|
|
197
|
-
* hit-testing.
|
|
198
|
-
*/
|
|
199
|
-
type VectorStrokeLayerKind = 'paint';
|
|
200
|
-
/** One stroke of a path's stroke stack (`VectorStyle.strokes`): a paint plus its own stroke settings. */
|
|
201
|
-
interface VectorStrokeLayer extends VectorPaintLayer, VectorStrokeSettings {
|
|
202
|
-
/** Default `paint`. See `VectorStrokeLayerKind`. */
|
|
203
|
-
kind?: VectorStrokeLayerKind;
|
|
204
|
-
}
|
|
205
|
-
/** Paint and stroke settings of a path. */
|
|
206
|
-
interface VectorStyle {
|
|
207
|
-
fill?: VectorPaint;
|
|
208
|
-
stroke?: VectorPaint;
|
|
209
|
-
/** Default 1. */
|
|
210
|
-
strokeWidth?: number;
|
|
211
|
-
strokeLinecap?: VectorLineCap;
|
|
212
|
-
strokeLinejoin?: VectorLineJoin;
|
|
213
|
-
strokeDasharray?: number[];
|
|
214
|
-
/** Default `nonzero`. */
|
|
215
|
-
fillRule?: VectorFillRule;
|
|
216
|
-
/** Default `center`. */
|
|
217
|
-
strokeAlign?: VectorStrokeAlign;
|
|
218
|
-
/** Head at the start of the first subpath when it is open, or none. */
|
|
219
|
-
startArrow?: VectorArrowhead | null;
|
|
220
|
-
/** Head at the end of the last subpath when it is open, or none. */
|
|
221
|
-
endArrow?: VectorArrowhead | null;
|
|
222
|
-
/** Default `extend`. */
|
|
223
|
-
arrowAlign?: VectorArrowAlign;
|
|
224
|
-
/** Size of the start head as a multiple of the stroke width (default 1: a head 4 widths long). */
|
|
225
|
-
startArrowScale?: number;
|
|
226
|
-
/** Size of the end head (default 1). */
|
|
227
|
-
endArrowScale?: number;
|
|
228
|
-
/**
|
|
229
|
-
* Variable width: side scales along each subpath, interpolated with a monotone cubic (see
|
|
230
|
-
* `widthProfileAt`). Absent, empty or `null` strokes at a uniform width. A profiled stroke is
|
|
231
|
-
* drawn as its filled outline.
|
|
232
|
-
*/
|
|
233
|
-
strokeWidthProfile?: VectorWidthPoint[] | null;
|
|
234
|
-
/**
|
|
235
|
-
* The fill stack, bottom to top. Absent: `fill` alone is the stack (one layer, or none without
|
|
236
|
-
* a paint). Present: it is the truth, and `fill` mirrors its top layer's paint. The shorthand
|
|
237
|
-
* stays writable: setting `fill` to a paint repaints the top layer, `null` clears the stack.
|
|
238
|
-
* Stacks of one plain layer (full opacity, `normal`, visible) are stored as the shorthand.
|
|
239
|
-
*/
|
|
240
|
-
fills?: VectorPaintLayer[] | null;
|
|
241
|
-
/**
|
|
242
|
-
* The stroke stack, bottom to top, drawn over every fill. Like `fills`: absent, `stroke` and the
|
|
243
|
-
* stroke settings above are the one stroke; present, they mirror its top layer, and writing them
|
|
244
|
-
* edits that layer (`stroke: null` clears the stack).
|
|
245
|
-
*/
|
|
246
|
-
strokes?: VectorStrokeLayer[] | null;
|
|
247
|
-
}
|
|
248
|
-
interface VectorNodeBase {
|
|
249
|
-
id: string;
|
|
250
|
-
name?: string;
|
|
251
|
-
/** Default true. */
|
|
252
|
-
visible?: boolean;
|
|
253
|
-
/** Locked nodes are drawn but cannot be picked or edited on the canvas. */
|
|
254
|
-
locked?: boolean;
|
|
255
|
-
/** 0–1, default 1. */
|
|
256
|
-
opacity?: number;
|
|
257
|
-
/**
|
|
258
|
-
* Placement in the parent's space: a rigid matrix (rotation + translation). Anchors and
|
|
259
|
-
* children are in the node's own space. Omitted for unrotated nodes, whose positions are
|
|
260
|
-
* stored directly. Scale and skew are never stored here — `transformVectorNode` bakes
|
|
261
|
-
* them into the geometry, so stroke widths and the rotated selection box stay exact.
|
|
262
|
-
*/
|
|
263
|
-
transform?: VectorMatrix;
|
|
264
|
-
/**
|
|
265
|
-
* An in-between a blend group generated from its keys. Steps are rebuilt whenever a key or
|
|
266
|
-
* the blend options change, and are locked (clicks select the blend group).
|
|
267
|
-
*/
|
|
268
|
-
blendStep?: boolean;
|
|
269
|
-
/**
|
|
270
|
-
* Live path effects, applied top to bottom: each acts on every path above it (the node's own
|
|
271
|
-
* outline, or a group's children, then the result of the effects before it), and effects after a
|
|
272
|
-
* repeater act on its copies. The stored anchors and children never change.
|
|
273
|
-
*/
|
|
274
|
-
effects?: VectorEffect[] | null;
|
|
275
|
-
/**
|
|
276
|
-
* As an operand of a live boolean group: how it combines with the result of the operands below
|
|
277
|
-
* it. Absent: the group's `liveBoolean` operation.
|
|
278
|
-
*/
|
|
279
|
-
booleanOperation?: VectorBooleanOperation | null;
|
|
280
|
-
/** How the whole node (all its paint, filters included) mixes with what is under it. Default `normal`. */
|
|
281
|
-
blendMode?: VectorBlendMode;
|
|
282
|
-
/**
|
|
283
|
-
* Visual filters (drop and inner shadows, glows, blurs, feather), applied to everything the
|
|
284
|
-
* node draws. Unlike path `effects` they never change geometry: bounds, hit-testing and
|
|
285
|
-
* booleans ignore them.
|
|
286
|
-
*/
|
|
287
|
-
filters?: VectorFilter[] | null;
|
|
288
|
-
}
|
|
289
|
-
/** A shape made of one or more subpaths (holes and compound shapes included). */
|
|
290
|
-
interface VectorPathNode extends VectorNodeBase, VectorStyle {
|
|
291
|
-
type: 'path';
|
|
292
|
-
subpaths: VectorSubpath[];
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* How a blend spaces its in-betweens: a number of `steps` between each pair of keys, a fixed
|
|
296
|
-
* `distance` between steps along the spine, or `smoothColor` (as many steps as the colours
|
|
297
|
-
* need for a smooth ramp; by distance when the colours match).
|
|
298
|
-
*/
|
|
299
|
-
type VectorBlendSpacing = 'steps' | 'distance' | 'smoothColor';
|
|
300
|
-
declare const VECTOR_BLEND_SPACINGS: readonly VectorBlendSpacing[];
|
|
301
|
-
/** Settings of a blend. */
|
|
302
|
-
interface VectorBlendOptions {
|
|
303
|
-
/** Default `steps`. */
|
|
304
|
-
spacing?: VectorBlendSpacing;
|
|
305
|
-
/** Steps between each pair of keys with `steps` spacing (default 5). */
|
|
306
|
-
steps?: number;
|
|
307
|
-
/** Distance between steps along the spine with `distance` spacing (default 20). */
|
|
308
|
-
distance?: number;
|
|
309
|
-
/** Turn the steps with the spine's direction (default `false`: they keep the keys' orientation). */
|
|
310
|
-
orientToSpine?: boolean;
|
|
311
|
-
/** Move anchors in straight lines instead of the rotation-aware morph (default `false`). */
|
|
312
|
-
linear?: boolean;
|
|
313
|
-
}
|
|
314
|
-
/** A live blend: the group's keys plus how the in-betweens are made and laid out. */
|
|
315
|
-
interface VectorBlend extends VectorBlendOptions {
|
|
316
|
-
/**
|
|
317
|
-
* A replaced spine in the group's space: the steps follow it instead of the straight lines
|
|
318
|
-
* between the keys' centres (the keys sit along it, spread evenly by arc length).
|
|
319
|
-
*/
|
|
320
|
-
spine?: VectorSubpath | null;
|
|
321
|
-
/** The anchor of each key's first subpath its blend starts from, by key id (the Blend tool's clicks). */
|
|
322
|
-
starts?: Record<string, number>;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* How a mask group's mask (its first, bottom child) hides the rest: `clip` (a clipping mask: the
|
|
326
|
-
* mask's outline, fully opaque; its paint is not drawn), `alpha` (an opacity mask by the mask's
|
|
327
|
-
* drawn alpha: soft edges, gradients and opacity count) or `luminance` (by its brightness times
|
|
328
|
-
* its alpha: white shows, black hides).
|
|
329
|
-
*/
|
|
330
|
-
type VectorMaskType = 'clip' | 'alpha' | 'luminance';
|
|
331
|
-
declare const VECTOR_MASK_TYPES: readonly VectorMaskType[];
|
|
332
|
-
/** A group's mask settings (`VectorGroupNode.mask`). */
|
|
333
|
-
interface VectorMask {
|
|
334
|
-
type: VectorMaskType;
|
|
335
|
-
/** Show the contents where the mask hides them and hide them where it shows them. Default false. */
|
|
336
|
-
invert?: boolean;
|
|
337
|
-
}
|
|
338
|
-
/** A group of nodes that select and transform together. */
|
|
339
|
-
interface VectorGroupNode extends VectorNodeBase {
|
|
340
|
-
type: 'group';
|
|
341
|
-
children: VectorNode[];
|
|
342
|
-
/**
|
|
343
|
-
* Makes the group a live blend: its children that are not `blendStep`s are the keys, in
|
|
344
|
-
* stacking order, and the steps between them are regenerated whenever a key changes.
|
|
345
|
-
*/
|
|
346
|
-
blend?: VectorBlend | null;
|
|
347
|
-
/**
|
|
348
|
-
* Makes the group a live boolean: its children stay editable operands, folded bottom to top
|
|
349
|
-
* (each by its own `booleanOperation` or this one), and the group draws as the result in the
|
|
350
|
-
* bottom operand's style.
|
|
351
|
-
*/
|
|
352
|
-
liveBoolean?: VectorBooleanOperation | null;
|
|
353
|
-
/**
|
|
354
|
-
* Makes the group a mask group: its first (bottom) child is the mask and the children above it
|
|
355
|
-
* show only where the mask lets them (see `VectorMaskType`). Hit-testing, bounds, snapping and
|
|
356
|
-
* booleans use the masked result. A hidden mask child turns the mask off (the contents draw
|
|
357
|
-
* whole). The group's own opacity, blend mode and filters apply to the masked result, and its
|
|
358
|
-
* path effects to the contents (not the mask). Ignored on blends and live booleans.
|
|
359
|
-
*/
|
|
360
|
-
mask?: VectorMask | null;
|
|
361
|
-
}
|
|
362
|
-
type VectorNode = VectorPathNode | VectorGroupNode;
|
|
363
|
-
/** A vector drawing: an artboard and its nodes, bottom to top. */
|
|
364
|
-
interface VectorDocument {
|
|
365
|
-
width: number;
|
|
366
|
-
height: number;
|
|
367
|
-
/** Artboard colour (default: transparent). */
|
|
368
|
-
background?: string;
|
|
369
|
-
nodes: VectorNode[];
|
|
370
|
-
}
|
|
371
|
-
/** An axis-aligned rectangle. */
|
|
372
|
-
interface VectorBounds {
|
|
373
|
-
x: number;
|
|
374
|
-
y: number;
|
|
375
|
-
width: number;
|
|
376
|
-
height: number;
|
|
377
|
-
}
|
|
378
|
-
/** Identifies one anchor of a path node. */
|
|
379
|
-
interface VectorAnchorRef {
|
|
380
|
-
nodeId: string;
|
|
381
|
-
subpath: number;
|
|
382
|
-
index: number;
|
|
383
|
-
}
|
|
384
|
-
/** Identifies one handle of an anchor. */
|
|
385
|
-
interface VectorHandleRef extends VectorAnchorRef {
|
|
386
|
-
handle: 'in' | 'out';
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Canvas tools. `direct` edits anchors, handles and segments; the shape tools drag out a new
|
|
390
|
-
* shape; `scissors` cuts a path at a point, `knife` cuts filled shapes along a freehand stroke,
|
|
391
|
-
* `eraser` rubs out the area under one and `width` drags a stroke's width at a point.
|
|
392
|
-
* `shapeBuilder` merges (Alt: deletes) the faces the selected shapes make, and `paintBucket`
|
|
393
|
-
* fills the region the visible outlines enclose around a click with a new shape. `blend`
|
|
394
|
-
* blends the shape clicked first into the one clicked next (clicking an anchor of a closed path
|
|
395
|
-
* 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.
|
|
397
|
-
*/
|
|
398
|
-
type VectorTool = 'select' | 'direct' | 'pen' | 'pencil' | 'rect' | 'ellipse' | 'polygon' | 'star' | 'line' | 'scissors' | 'knife' | 'eraser' | 'width' | 'shapeBuilder' | 'paintBucket' | 'blend' | 'gradient' | 'envelope';
|
|
399
|
-
declare const VECTOR_TOOLS: readonly VectorTool[];
|
|
400
|
-
/** Keyboard modifiers held during a pointer event. */
|
|
401
|
-
interface VectorModifiers {
|
|
402
|
-
shift?: boolean;
|
|
403
|
-
alt?: boolean;
|
|
404
|
-
/** Cmd on macOS, Ctrl elsewhere. */
|
|
405
|
-
mod?: boolean;
|
|
406
|
-
}
|
|
407
|
-
/** The eight resize handles of a selection box and the rotation handle. */
|
|
408
|
-
type VectorTransformHandle = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'rotate';
|
|
409
|
-
declare const VECTOR_TRANSFORM_HANDLES: readonly VectorTransformHandle[];
|
|
410
|
-
/** Pan and zoom of the canvas: `screen = document × zoom + (x, y)`. */
|
|
411
|
-
interface VectorViewport {
|
|
412
|
-
/** Screen position of the document origin, in screen pixels. */
|
|
413
|
-
x: number;
|
|
414
|
-
y: number;
|
|
415
|
-
zoom: number;
|
|
416
|
-
}
|
|
417
|
-
/** What the next shape and pen path are drawn with. */
|
|
418
|
-
interface VectorDefaults extends VectorStyle {
|
|
419
|
-
/** Sides of the polygon tool (default 6). */
|
|
420
|
-
polygonSides?: number;
|
|
421
|
-
/** Points of the star tool (default 5). */
|
|
422
|
-
starPoints?: number;
|
|
423
|
-
/** Inner radius of the star tool as a fraction of the outer one (default 0.5). */
|
|
424
|
-
starInnerRatio?: number;
|
|
425
|
-
/** Live corner radius the rectangle, polygon and star tools give their corners (default 0). */
|
|
426
|
-
cornerRadius?: number;
|
|
427
|
-
/** Corner kind of those tools (default `round`). */
|
|
428
|
-
cornerKind?: VectorCornerKind;
|
|
429
|
-
}
|
|
430
|
-
type VectorAlign = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
|
|
431
|
-
type VectorDistribute = 'horizontal' | 'vertical';
|
|
432
|
-
type VectorBooleanOperation = 'union' | 'subtract' | 'intersect' | 'exclude';
|
|
433
|
-
/**
|
|
434
|
-
* Pathfinder operations: `divide` (every face its own shape), `trim` (hidden parts removed),
|
|
435
|
-
* `merge` (Trim, then touching parts of one fill joined), `crop` (the top shape crops the others),
|
|
436
|
-
* `outline` (outlines cut into open strokes where they meet) and `minusBack` (the top shape minus
|
|
437
|
-
* everything below it).
|
|
438
|
-
*/
|
|
439
|
-
type VectorPathfinderOperation = 'divide' | 'trim' | 'merge' | 'crop' | 'outline' | 'minusBack';
|
|
440
|
-
declare const VECTOR_PATHFINDER_OPERATIONS: readonly VectorPathfinderOperation[];
|
|
441
|
-
type VectorArrange = 'front' | 'forward' | 'backward' | 'back';
|
|
442
|
-
/** Average: line anchors up on a horizontal line (same y), a vertical one (same x), or both. */
|
|
443
|
-
type VectorAverageAxis = 'horizontal' | 'vertical' | 'both';
|
|
444
|
-
/**
|
|
445
|
-
* Live path effects (After Effects' path operators): `trim` (Trim Paths), `roundCorners`,
|
|
446
|
-
* `puckerBloat`, `twist`, `zigzag`, `wiggle` (Wiggle Paths), `offset` (Offset Paths), `merge`
|
|
447
|
-
* (Merge Paths), `repeater` and `envelope` (an envelope distortion: a warp preset or a mesh).
|
|
448
|
-
*/
|
|
449
|
-
type VectorEffectType = 'trim' | 'roundCorners' | 'puckerBloat' | 'twist' | 'zigzag' | 'wiggle' | 'offset' | 'merge' | 'repeater' | 'envelope';
|
|
450
|
-
declare const VECTOR_EFFECT_TYPES: readonly VectorEffectType[];
|
|
451
|
-
/** Warp presets (Photoshop's fifteen, in menu order); shared with the image editor (`src/geom`). */
|
|
452
|
-
type VectorWarpStyle = WarpStyle;
|
|
453
|
-
/**
|
|
454
|
-
* A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
|
|
455
|
-
* boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
|
|
456
|
-
* `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the node's own
|
|
457
|
-
* space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
|
|
458
|
-
* of 3, handles where one is. Shared with the image editor (`src/geom`).
|
|
459
|
-
*/
|
|
460
|
-
type VectorWarpMesh = WarpMesh;
|
|
461
|
-
/** Merge Paths modes: a compound path (no boolean), union, the first minus the others, intersection or exclusion. */
|
|
462
|
-
type VectorMergeMode = 'merge' | 'add' | 'subtract' | 'intersect' | 'exclude';
|
|
463
|
-
declare const VECTOR_MERGE_MODES: readonly VectorMergeMode[];
|
|
464
|
-
/** Parameters of each effect type. Lengths are in the node's own units, angles in degrees, percentages 0–100. */
|
|
465
|
-
interface VectorEffectParamsMap {
|
|
466
|
-
trim: {
|
|
467
|
-
/** Start and end of the kept part, percent of the length (swapped when start > end). */
|
|
468
|
-
start: number;
|
|
469
|
-
end: number;
|
|
470
|
-
/** Shifts both, in degrees (360° = once round). */
|
|
471
|
-
offset: number;
|
|
472
|
-
/**
|
|
473
|
-
* `simultaneous`: every path trimmed by the same fractions of its own length;
|
|
474
|
-
* `individual`: the paths laid end to end in stacking order and trimmed as one length.
|
|
475
|
-
*/
|
|
476
|
-
mode: 'simultaneous' | 'individual';
|
|
477
|
-
};
|
|
478
|
-
roundCorners: {
|
|
479
|
-
radius: number;
|
|
480
|
-
};
|
|
481
|
-
/** Percent, −100 (pucker: spiky) to 100 (bloat: bulging). */
|
|
482
|
-
puckerBloat: {
|
|
483
|
-
amount: number;
|
|
484
|
-
};
|
|
485
|
-
twist: {
|
|
486
|
-
/** Turn at the farthest point from the centre (none at the centre). */
|
|
487
|
-
angle: number;
|
|
488
|
-
/** The centre as an offset from the middle of the paths' bounds. */
|
|
489
|
-
center: Vec2;
|
|
490
|
-
};
|
|
491
|
-
zigzag: {
|
|
492
|
-
/** How far the points move to either side. */
|
|
493
|
-
size: number;
|
|
494
|
-
/** Ridges per segment. */
|
|
495
|
-
ridges: number;
|
|
496
|
-
/** Rounded waves instead of sharp zig zags. */
|
|
497
|
-
smooth: boolean;
|
|
498
|
-
};
|
|
499
|
-
wiggle: {
|
|
500
|
-
/** Largest displacement. */
|
|
501
|
-
size: number;
|
|
502
|
-
/** Points added per segment. */
|
|
503
|
-
detail: number;
|
|
504
|
-
smooth: boolean;
|
|
505
|
-
/** Wiggles per second. */
|
|
506
|
-
speed: number;
|
|
507
|
-
/** Percent: how much neighbouring points move together. */
|
|
508
|
-
correlation: number;
|
|
509
|
-
/** Degrees (360° = one wiggle). */
|
|
510
|
-
phase: number;
|
|
511
|
-
/** The same seed (and time) always gives the same wiggle. */
|
|
512
|
-
seed: number;
|
|
513
|
-
/** Seconds: where along the wiggle's motion it is drawn. */
|
|
514
|
-
time: number;
|
|
515
|
-
};
|
|
516
|
-
offset: {
|
|
517
|
-
/** Grows (positive) or shrinks (negative) the shapes. */
|
|
518
|
-
amount: number;
|
|
519
|
-
join: VectorLineJoin;
|
|
520
|
-
miterLimit: number;
|
|
521
|
-
/** Copies, copy i offset by `amount · (i + 1 + copyOffset)`. */
|
|
522
|
-
copies: number;
|
|
523
|
-
copyOffset: number;
|
|
524
|
-
};
|
|
525
|
-
merge: {
|
|
526
|
-
mode: VectorMergeMode;
|
|
527
|
-
};
|
|
528
|
-
repeater: {
|
|
529
|
-
/** Copies, the original included; a fraction fades the last copy. */
|
|
530
|
-
copies: number;
|
|
531
|
-
/** Shifts the copies along: copy i is transformed `i + offset` times. */
|
|
532
|
-
offset: number;
|
|
533
|
-
/** Each step: move, about `anchor` turn by `rotation` and scale by `scale` percent. */
|
|
534
|
-
position: Vec2;
|
|
535
|
-
/** Offset from the middle of the paths' bounds. */
|
|
536
|
-
anchor: Vec2;
|
|
537
|
-
rotation: number;
|
|
538
|
-
scale: Vec2;
|
|
539
|
-
/** Percent opacity of the first and last copies (in between interpolated). */
|
|
540
|
-
startOpacity: number;
|
|
541
|
-
endOpacity: number;
|
|
542
|
-
/** `below`: each copy draws under the one before it; `above`: over it. */
|
|
543
|
-
composite: 'below' | 'above';
|
|
544
|
-
};
|
|
545
|
-
/**
|
|
546
|
-
* Envelope distortion: the paths above it are mapped from their combined bounds through a warp
|
|
547
|
-
* preset (bend and horizontal / vertical distortion in percent) or, with style `mesh`, through
|
|
548
|
-
* `mesh` (null: the flat mesh of `columns × rows` patches over the bounds). The bounds are
|
|
549
|
-
* taken afresh each time, so editing the contents keeps the envelope.
|
|
550
|
-
*/
|
|
551
|
-
envelope: {
|
|
552
|
-
style: VectorWarpStyle | 'mesh';
|
|
553
|
-
bend: number;
|
|
554
|
-
horizontal: number;
|
|
555
|
-
vertical: number;
|
|
556
|
-
orientation: 'horizontal' | 'vertical';
|
|
557
|
-
/** Patches of the mesh (a preset turns into a mesh of this size when it is edited). */
|
|
558
|
-
rows: number;
|
|
559
|
-
columns: number;
|
|
560
|
-
mesh: VectorWarpMesh | null;
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
/** One entry of an effect stack. */
|
|
564
|
-
type VectorEffect = {
|
|
565
|
-
[K in VectorEffectType]: {
|
|
566
|
-
/** Unique within the node. */
|
|
567
|
-
id: string;
|
|
568
|
-
type: K;
|
|
569
|
-
/** Disabled effects are skipped. Default true. */
|
|
570
|
-
enabled?: boolean;
|
|
571
|
-
params: VectorEffectParamsMap[K];
|
|
572
|
-
};
|
|
573
|
-
}[VectorEffectType];
|
|
574
|
-
/** Identifies one segment of a path node: from anchor `segment` to the next. */
|
|
575
|
-
interface VectorSegmentRef {
|
|
576
|
-
nodeId: string;
|
|
577
|
-
subpath: number;
|
|
578
|
-
segment: number;
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* Visual filters: `dropShadow` (the node's silhouette, offset and blurred, under it),
|
|
582
|
-
* `innerShadow` (a shadow cast inside the edges), `outerGlow` / `innerGlow` (an unoffset glow
|
|
583
|
-
* outside or inside the edges), `layerBlur` (the whole node blurred) and `feather` (edges faded
|
|
584
|
-
* to transparent).
|
|
585
|
-
*/
|
|
586
|
-
type VectorFilterType = 'dropShadow' | 'innerShadow' | 'outerGlow' | 'innerGlow' | 'layerBlur' | 'feather';
|
|
587
|
-
declare const VECTOR_FILTER_TYPES: readonly VectorFilterType[];
|
|
588
|
-
/** A shadow or glow: colour, offset, blur and spread in the node's own units. */
|
|
589
|
-
interface VectorShadowParams {
|
|
590
|
-
color: string;
|
|
591
|
-
/** 0–1: multiplies the colour's own alpha. */
|
|
592
|
-
opacity: number;
|
|
593
|
-
/** Blur radius (the SVG / CSS standard deviation is half of it). */
|
|
594
|
-
blur: number;
|
|
595
|
-
/** Grows the silhouette before blurring (inner effects: chokes it inwards). */
|
|
596
|
-
spread: number;
|
|
597
|
-
}
|
|
598
|
-
/** Parameters of each filter type. Lengths are in the node's own units. */
|
|
599
|
-
interface VectorFilterParamsMap {
|
|
600
|
-
dropShadow: VectorShadowParams & {
|
|
601
|
-
offsetX: number;
|
|
602
|
-
offsetY: number;
|
|
603
|
-
};
|
|
604
|
-
innerShadow: VectorShadowParams & {
|
|
605
|
-
offsetX: number;
|
|
606
|
-
offsetY: number;
|
|
607
|
-
};
|
|
608
|
-
outerGlow: VectorShadowParams;
|
|
609
|
-
innerGlow: VectorShadowParams;
|
|
610
|
-
layerBlur: {
|
|
611
|
-
radius: number;
|
|
612
|
-
};
|
|
613
|
-
/** Fades the edges over `radius` inwards. */
|
|
614
|
-
feather: {
|
|
615
|
-
radius: number;
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
/** One entry of a node's filter stack. */
|
|
619
|
-
type VectorFilter = {
|
|
620
|
-
[K in VectorFilterType]: {
|
|
621
|
-
/** Unique within the node. */
|
|
622
|
-
id: string;
|
|
623
|
-
type: K;
|
|
624
|
-
/** Disabled filters are skipped. Default true. */
|
|
625
|
-
enabled?: boolean;
|
|
626
|
-
params: VectorFilterParamsMap[K];
|
|
627
|
-
};
|
|
628
|
-
}[VectorFilterType];
|
|
1
|
+
import { B as BezierPath, A as AffineMatrix, S as SvgGradientDef } from './bezier-BfwIbVTl.cjs';
|
|
2
|
+
import { V as VectorEffectType, a as VectorEffectParamsMap, b as VectorPathNode, c as VectorFillRule, d as VectorBooleanOperation, e as VectorNode, f as VectorEffect, g as VectorGroupNode, h as VectorBounds, i as VectorWarpMesh, j as VectorFilterType, k as VectorFilterParamsMap, l as VectorFilter, m as VectorGradient, n as Vec2, o as VectorGradientUnits, p as VectorGradientSpread, q as VectorGradientType, r as VectorPaint, s as VectorMatrix, t as VectorGradientStop, u as VectorStrokeAlign, v as VectorSubpath, w as VectorDocument, x as VectorWidthPoint } from './types-DyQq-WPY.cjs';
|
|
629
3
|
|
|
630
4
|
/**
|
|
631
5
|
* Live appearance: path effect stacks and live boolean groups, evaluated on demand while the
|
|
@@ -1279,4 +653,4 @@ declare function parseSvgTransform(value: string | undefined): AffineMatrix;
|
|
|
1279
653
|
/** Parses SVG markup into a vector document. Throws when there is no `<svg>` element. */
|
|
1280
654
|
declare function parseVectorSvg(svg: string, options?: VectorSvgImportOptions): VectorDocument;
|
|
1281
655
|
|
|
1282
|
-
export {
|
|
656
|
+
export { isVectorGradient as $, type VectorSvgPatternDef as A, type VectorSvgWrapper as B, activeVectorEffects as C, activeVectorFilters as D, applyVectorCornersAttribute as E, applyVectorEffects as F, applyVectorGradientPatch as G, applyVectorGradientSpread as H, clearVectorLiveBooleanCache as I, convertVectorGradient as J, createVectorEffect as K, createVectorFilter as L, defaultVectorGradient as M, expandVectorAppearance as N, expandVectorAppearances as O, expandVectorGradientSpread as P, expandVectorGradientStops as Q, explicitVectorGradient as R, foldVectorBooleanOperands as S, gradientMidpointRemap as T, hasExplicitGradientGeometry as U, type VectorSvgExportOptions as V, hasOwnVectorAppearance as W, hasVectorAppearance as X, insertVectorGradientStop as Y, isCentredVectorGradient as Z, isVectorFilterType as _, type VectorGradientHandle as a, vectorOperandOperation as a$, isVectorLiveBoolean as a0, mapVectorGradient as a1, mapVectorPaint as a2, moveVectorGradientHandle as a3, moveVectorGradientStop as a4, normalizeVectorEffectParams as a5, normalizeVectorFilterParams as a6, parseSvgTransform as a7, parseVectorColor as a8, parseVectorSvg as a9, vectorEffectInputPaths as aA, vectorEnteredGroups as aB, vectorEnvelopeFrame as aC, vectorEnvelopeMap as aD, vectorEnvelopeMesh as aE, vectorFilterMarkup as aF, vectorFilterParamKeys as aG, vectorFilterReach as aH, vectorFilterSvg as aI, vectorGradientArea as aJ, vectorGradientAspect as aK, vectorGradientFocalParam as aL, vectorGradientHandles as aM, vectorGradientMatrix as aN, vectorGradientMidpointFromPosition as aO, vectorGradientMidpointPosition as aP, vectorGradientNeedsExpansion as aQ, vectorGradientParam as aR, vectorGradientPoints as aS, vectorGradientRamp as aT, vectorGradientSvgDefs as aU, vectorGradientTAt as aV, vectorGradientUnitsMatrix as aW, vectorLiveBooleanSteps as aX, vectorNodeEnvelope as aY, vectorNodeFilterSvg as aZ, vectorNodeLocalPaintBounds as a_, patternAttrs as aa, periodicVectorGradientStops as ab, pinVectorGradient as ac, removeVectorGradientStop as ad, reverseVectorGradient as ae, samplePlainStops as af, sampleVectorGradient as ag, sampleVectorGradientAt as ah, sampleVectorPaintDefAt as ai, sanitizeVectorEffects as aj, sanitizeVectorFilters as ak, sanitizeVectorGradient as al, setVectorGradientVector as am, sortedVectorGradientStops as an, spanVectorGradientStops as ao, transformVectorEffects as ap, transformVectorGradient as aq, transformVectorPaint as ar, vectorAppearanceNodes as as, vectorAppearanceOutline as at, vectorAppearanceShapes as au, vectorBoxMatrix as av, vectorChildAppearanceShapes as aw, vectorCornersAttribute as ax, vectorDocumentToSvg as ay, vectorEffectInputBounds as az, type VectorGradientPatch as b, vectorPaintToSvg as b0, vectorPathLocalBounds as b1, vectorStrokeSvgParts as b2, widthProfileFromAttribute as b3, widthProfileToAttribute as b4, type VectorEnvelopeParams as c, type VectorRenderFilter as d, type VectorAppearanceShape as e, type VectorFilterParamSpec as f, type VectorEffectParamSpec as g, type VectorRenderStrokeParts as h, type VectorPaintDef as i, VECTOR_EFFECT_DEFAULTS as j, VECTOR_EFFECT_LABELS as k, VECTOR_EFFECT_PARAM_SPECS as l, VECTOR_FILTER_DEFAULTS as m, VECTOR_FILTER_LABELS as n, VECTOR_FILTER_MENU as o, VECTOR_FILTER_PARAM_SPECS as p, VECTOR_GRADIENT_MAX_PERIODS as q, VECTOR_GRADIENT_MIN_STOPS as r, type VectorBooleanOperand as s, type VectorFilterPrimitive as t, type VectorGradientPoints as u, type VectorGradientRamp as v, type VectorGradientSvgOptions as w, type VectorPaintSvgOptions as x, type VectorRgba as y, type VectorSvgImportOptions as z };
|