@pixerate/editor 0.96.0 → 0.98.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 (52) hide show
  1. package/THIRD_PARTY_NOTICES.md +4 -2
  2. package/dist/animation-editor/index.cjs +55 -53
  3. package/dist/animation-editor/index.cjs.map +1 -1
  4. package/dist/animation-editor/index.d.cts +3 -2
  5. package/dist/animation-editor/index.d.ts +3 -2
  6. package/dist/animation-editor/index.js +11 -9
  7. package/dist/animation-editor/index.js.map +1 -1
  8. package/dist/chunk-DWGZUSES.cjs +694 -0
  9. package/dist/chunk-DWGZUSES.cjs.map +1 -0
  10. package/dist/chunk-GX332W2C.js +181 -0
  11. package/dist/chunk-GX332W2C.js.map +1 -0
  12. package/dist/{chunk-7MD7C6XQ.cjs → chunk-JF5PXN7W.cjs} +96 -744
  13. package/dist/chunk-JF5PXN7W.cjs.map +1 -0
  14. package/dist/chunk-KKREERP2.js +694 -0
  15. package/dist/chunk-KKREERP2.js.map +1 -0
  16. package/dist/chunk-MUUXNRU4.cjs +181 -0
  17. package/dist/chunk-MUUXNRU4.cjs.map +1 -0
  18. package/dist/{chunk-KFTQ2PKP.js → chunk-WIR377F6.js} +1001 -61
  19. package/dist/chunk-WIR377F6.js.map +1 -0
  20. package/dist/{chunk-T422YCHR.cjs → chunk-WT6ZAWJP.cjs} +1023 -83
  21. package/dist/chunk-WT6ZAWJP.cjs.map +1 -0
  22. package/dist/{chunk-4JLB2USO.js → chunk-YGZNGDIT.js} +45 -693
  23. package/dist/chunk-YGZNGDIT.js.map +1 -0
  24. package/dist/image-editor/index.cjs +1519 -360
  25. package/dist/image-editor/index.cjs.map +1 -1
  26. package/dist/image-editor/index.d.cts +378 -5
  27. package/dist/image-editor/index.d.ts +378 -5
  28. package/dist/image-editor/index.js +1244 -85
  29. package/dist/image-editor/index.js.map +1 -1
  30. package/dist/raster/index.cjs +25 -2
  31. package/dist/raster/index.cjs.map +1 -1
  32. package/dist/raster/index.d.cts +143 -4
  33. package/dist/raster/index.d.ts +143 -4
  34. package/dist/raster/index.js +25 -2
  35. package/dist/{svg-ymShkNtu.d.cts → svg-C9r284x8.d.cts} +6 -9
  36. package/dist/{svg-Dh17jCyA.d.ts → svg-MVKBqwD4.d.ts} +6 -9
  37. package/dist/types-CwMPoRMU.d.cts +40 -0
  38. package/dist/types-CwMPoRMU.d.ts +40 -0
  39. package/dist/vector/index.cjs +490 -554
  40. package/dist/vector/index.cjs.map +1 -1
  41. package/dist/vector/index.d.cts +154 -292
  42. package/dist/vector/index.d.ts +154 -292
  43. package/dist/vector/index.js +91 -155
  44. package/dist/vector/index.js.map +1 -1
  45. package/dist/warp-B8rAguzs.d.ts +165 -0
  46. package/dist/warp-nYs2DPrx.d.cts +165 -0
  47. package/package.json +1 -1
  48. package/skills/pixerate-image-editor/SKILL.md +49 -3
  49. package/dist/chunk-4JLB2USO.js.map +0 -1
  50. package/dist/chunk-7MD7C6XQ.cjs.map +0 -1
  51. package/dist/chunk-KFTQ2PKP.js.map +0 -1
  52. package/dist/chunk-T422YCHR.cjs.map +0 -1
@@ -2,13 +2,16 @@ import {
2
2
  CURVE_LUT_SIZE,
3
3
  DEFAULT_GLOBAL_LIGHT,
4
4
  DIRECT_GAUSSIAN_MAX_SIGMA,
5
+ INTERPOLATIONS,
5
6
  LAYER_EFFECT_KINDS,
6
7
  LayerEffectError,
7
8
  MAX_EFFECT_REACH,
9
+ MAX_TRANSFORM_PIXELS,
8
10
  PatternPlacement,
9
11
  PatternTile,
10
12
  RasterCompositor,
11
13
  STROKE_CHAMFER_MAX,
14
+ TransformTooLargeError,
12
15
  ZlibError,
13
16
  activeEffectItems,
14
17
  adler32,
@@ -20,6 +23,7 @@ import {
20
23
  bytesToBase64,
21
24
  changedTiles,
22
25
  compositeLayerEffects,
26
+ compositeSurfaceOver,
23
27
  contourLut,
24
28
  curveLut,
25
29
  decodePng,
@@ -43,9 +47,11 @@ import {
43
47
  inflate,
44
48
  inflateRaw,
45
49
  insertLayer,
50
+ isInterpolation,
46
51
  isLayerEffectKind,
47
52
  isLayerLocked,
48
53
  isPng,
54
+ keysWeight,
49
55
  layerEffectFields,
50
56
  layerEffectLabel,
51
57
  mapLayer,
@@ -54,13 +60,19 @@ import {
54
60
  normalizeLayerEffects,
55
61
  parseDataUrl,
56
62
  parseEffectColor,
63
+ patchEffectMaps,
57
64
  pngDataUrl,
65
+ reduceSurface,
58
66
  renderLayerEffects,
59
67
  scaleLayerEffect,
68
+ transformSurface,
69
+ transformedBounds,
60
70
  validateEffectGradient,
61
71
  validateLayerEffect,
62
- validateLayerEffects
63
- } from "../chunk-KFTQ2PKP.js";
72
+ validateLayerEffects,
73
+ warpSurface
74
+ } from "../chunk-WIR377F6.js";
75
+ import "../chunk-GX332W2C.js";
64
76
  import {
65
77
  BLEND_MODES,
66
78
  SurfaceDraft,
@@ -104,9 +116,11 @@ export {
104
116
  CURVE_LUT_SIZE,
105
117
  DEFAULT_GLOBAL_LIGHT,
106
118
  DIRECT_GAUSSIAN_MAX_SIGMA,
119
+ INTERPOLATIONS,
107
120
  LAYER_EFFECT_KINDS,
108
121
  LayerEffectError,
109
122
  MAX_EFFECT_REACH,
123
+ MAX_TRANSFORM_PIXELS,
110
124
  PatternPlacement,
111
125
  PatternTile,
112
126
  RasterCompositor,
@@ -115,6 +129,7 @@ export {
115
129
  TILE,
116
130
  TILE_SHIFT,
117
131
  TiledSurface,
132
+ TransformTooLargeError,
118
133
  ZlibError,
119
134
  activeEffectItems,
120
135
  adler32,
@@ -133,6 +148,7 @@ export {
133
148
  changedTiles,
134
149
  collectTiles,
135
150
  compositeLayerEffects,
151
+ compositeSurfaceOver,
136
152
  contentBounds,
137
153
  contourLut,
138
154
  curveLut,
@@ -161,10 +177,12 @@ export {
161
177
  inflateRaw,
162
178
  insertLayer,
163
179
  isBlendMode,
180
+ isInterpolation,
164
181
  isLayerEffectKind,
165
182
  isLayerLocked,
166
183
  isPng,
167
184
  isSeparableBlendMode,
185
+ keysWeight,
168
186
  layerEffectFields,
169
187
  layerEffectLabel,
170
188
  mapLayer,
@@ -177,9 +195,11 @@ export {
177
195
  packRgba,
178
196
  parseDataUrl,
179
197
  parseEffectColor,
198
+ patchEffectMaps,
180
199
  pngDataUrl,
181
200
  readPixel,
182
201
  readRegion,
202
+ reduceSurface,
183
203
  renderLayerEffects,
184
204
  scaleLayerEffect,
185
205
  setLum,
@@ -191,11 +211,14 @@ export {
191
211
  tileKey,
192
212
  tileRect,
193
213
  tilesInRect,
214
+ transformSurface,
215
+ transformedBounds,
194
216
  translateSurface,
195
217
  uniformTile,
196
218
  validateEffectGradient,
197
219
  validateLayerEffect,
198
220
  validateLayerEffects,
221
+ warpSurface,
199
222
  writeRegion
200
223
  };
201
224
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,5 @@
1
1
  import { C as CanvasGradientDef, S as SvgGradientDef, A as AffineMatrix } from './bezier-BfwIbVTl.cjs';
2
+ import { W as WarpStyle, a as WarpMesh } from './types-CwMPoRMU.cjs';
2
3
 
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). */
4
5
  type VectorMatrix = readonly [number, number, number, number, number, number];
@@ -369,20 +370,16 @@ type VectorAverageAxis = 'horizontal' | 'vertical' | 'both';
369
370
  */
370
371
  type VectorEffectType = 'trim' | 'roundCorners' | 'puckerBloat' | 'twist' | 'zigzag' | 'wiggle' | 'offset' | 'merge' | 'repeater' | 'envelope';
371
372
  declare const VECTOR_EFFECT_TYPES: readonly VectorEffectType[];
372
- /** Warp presets (Photoshop's fifteen, in menu order). */
373
- type VectorWarpStyle = 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist';
373
+ /** Warp presets (Photoshop's fifteen, in menu order); shared with the image editor (`src/geom`). */
374
+ type VectorWarpStyle = WarpStyle;
374
375
  /**
375
376
  * A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
376
377
  * boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
377
378
  * `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the node's own
378
379
  * space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
379
- * of 3, handles where one is.
380
+ * of 3, handles where one is. Shared with the image editor (`src/geom`).
380
381
  */
381
- interface VectorWarpMesh {
382
- us: number[];
383
- vs: number[];
384
- points: Vec2[];
385
- }
382
+ type VectorWarpMesh = WarpMesh;
386
383
  /** Merge Paths modes: a compound path (no boolean), union, the first minus the others, intersection or exclusion. */
387
384
  type VectorMergeMode = 'merge' | 'add' | 'subtract' | 'intersect' | 'exclude';
388
385
  declare const VECTOR_MERGE_MODES: readonly VectorMergeMode[];
@@ -865,4 +862,4 @@ declare function parseSvgTransform(value: string | undefined): AffineMatrix;
865
862
  /** Parses SVG markup into a vector document. Throws when there is no `<svg>` element. */
866
863
  declare function parseVectorSvg(svg: string, options?: VectorSvgImportOptions): VectorDocument;
867
864
 
868
- export { VECTOR_BLEND_SPACINGS as $, type VectorDefaults as A, type VectorStyle as B, type VectorHandleRef as C, type VectorSegmentRef as D, type VectorBlendOptions as E, type VectorModifiers as F, type VectorGradientPatch as G, type VectorAlign as H, type VectorDistribute as I, type VectorArrange as J, type VectorAverageAxis as K, type VectorArrowhead as L, type VectorBlendSpacing as M, type VectorGradientInterpolation as N, type VectorGradientSpread as O, type VectorGradientType as P, type VectorStrokeAlign as Q, type VectorStrokeGradientMode as R, type VectorRenderStrokeParts as S, type VectorPaintDef as T, type VectorArrowAlign as U, type VectorDocument as V, type VectorBlend as W, type VectorMergeMode as X, type VectorLineJoin as Y, type VectorWarpStyle as Z, VECTOR_ARROWHEADS as _, type VectorNode as a, vectorGradientAspect as a$, VECTOR_CORNER_KINDS as a0, VECTOR_EFFECT_TYPES as a1, VECTOR_GRADIENT_INTERPOLATIONS as a2, VECTOR_GRADIENT_MAX_PERIODS as a3, VECTOR_GRADIENT_MIN_STOPS as a4, VECTOR_GRADIENT_SPREADS as a5, VECTOR_GRADIENT_TYPES as a6, VECTOR_MERGE_MODES as a7, VECTOR_PATHFINDER_OPERATIONS as a8, VECTOR_STROKE_GRADIENT_MODES as a9, isVectorGradient as aA, mapVectorGradient as aB, mapVectorPaint as aC, moveVectorGradientHandle as aD, moveVectorGradientStop as aE, parseSvgTransform as aF, parseVectorColor as aG, parseVectorSvg as aH, patternAttrs as aI, periodicVectorGradientStops as aJ, pinVectorGradient as aK, removeVectorGradientStop as aL, reverseVectorGradient as aM, samplePlainStops as aN, sampleVectorGradient as aO, sampleVectorGradientAt as aP, sampleVectorPaintDefAt as aQ, sanitizeVectorGradient as aR, setVectorGradientVector as aS, sortedVectorGradientStops as aT, spanVectorGradientStops as aU, transformVectorGradient as aV, transformVectorPaint as aW, vectorBoxMatrix as aX, vectorCornersAttribute as aY, vectorDocumentToSvg as aZ, vectorGradientArea as a_, VECTOR_TOOLS as aa, VECTOR_TRANSFORM_HANDLES as ab, type VectorCorner as ac, type VectorGradientPoints as ad, type VectorGradientRamp as ae, type VectorGradientSvgOptions as af, type VectorGradientUnits as ag, type VectorLineCap as ah, type VectorMatrix as ai, type VectorPaintSvgOptions as aj, type VectorRgba as ak, type VectorSvgImportOptions as al, type VectorSvgPatternDef as am, type VectorSvgWrapper as an, applyVectorCornersAttribute as ao, applyVectorGradientPatch as ap, applyVectorGradientSpread as aq, convertVectorGradient as ar, defaultVectorGradient as as, expandVectorGradientSpread as at, expandVectorGradientStops as au, explicitVectorGradient as av, gradientMidpointRemap as aw, hasExplicitGradientGeometry as ax, insertVectorGradientStop as ay, isCentredVectorGradient as az, type VectorBounds as b, vectorGradientFocalParam as b0, vectorGradientHandles as b1, vectorGradientMatrix as b2, vectorGradientMidpointFromPosition as b3, vectorGradientMidpointPosition as b4, vectorGradientNeedsExpansion as b5, vectorGradientParam as b6, vectorGradientPoints as b7, vectorGradientRamp as b8, vectorGradientSvgDefs as b9, vectorGradientTAt as ba, vectorGradientUnitsMatrix as bb, vectorPaintToSvg as bc, vectorPathLocalBounds as bd, vectorStrokeSvgParts as be, widthProfileFromAttribute as bf, widthProfileToAttribute as bg, type VectorSvgExportOptions as c, type Vec2 as d, type VectorSubpath as e, type VectorAnchor as f, type VectorPathNode as g, type VectorAnchorType as h, type VectorPaint as i, type VectorGroupNode as j, type VectorCornerKind as k, type VectorWidthPoint as l, type VectorGradientHandle as m, type VectorGradient as n, type VectorGradientStop as o, type VectorViewport as p, type VectorEffectType as q, type VectorEffectParamsMap as r, type VectorFillRule as s, type VectorBooleanOperation as t, type VectorEffect as u, type VectorWarpMesh as v, type VectorTransformHandle as w, type VectorAnchorRef as x, type VectorPathfinderOperation as y, type VectorTool as z };
865
+ export { VECTOR_CORNER_KINDS as $, type VectorDefaults as A, type VectorStyle as B, type VectorHandleRef as C, type VectorSegmentRef as D, type VectorBlendOptions as E, type VectorModifiers as F, type VectorGradientPatch as G, type VectorAlign as H, type VectorDistribute as I, type VectorArrange as J, type VectorAverageAxis as K, type VectorArrowhead as L, type VectorBlendSpacing as M, type VectorGradientInterpolation as N, type VectorGradientSpread as O, type VectorGradientType as P, type VectorStrokeAlign as Q, type VectorStrokeGradientMode as R, type VectorRenderStrokeParts as S, type VectorPaintDef as T, type VectorArrowAlign as U, type VectorDocument as V, type VectorBlend as W, type VectorMergeMode as X, type VectorLineJoin as Y, VECTOR_ARROWHEADS as Z, VECTOR_BLEND_SPACINGS as _, type VectorNode as a, vectorGradientAspect as a$, VECTOR_EFFECT_TYPES as a0, VECTOR_GRADIENT_INTERPOLATIONS as a1, VECTOR_GRADIENT_MAX_PERIODS as a2, VECTOR_GRADIENT_MIN_STOPS as a3, VECTOR_GRADIENT_SPREADS as a4, VECTOR_GRADIENT_TYPES as a5, VECTOR_MERGE_MODES as a6, VECTOR_PATHFINDER_OPERATIONS as a7, VECTOR_STROKE_GRADIENT_MODES as a8, VECTOR_TOOLS as a9, isVectorGradient as aA, mapVectorGradient as aB, mapVectorPaint as aC, moveVectorGradientHandle as aD, moveVectorGradientStop as aE, parseSvgTransform as aF, parseVectorColor as aG, parseVectorSvg as aH, patternAttrs as aI, periodicVectorGradientStops as aJ, pinVectorGradient as aK, removeVectorGradientStop as aL, reverseVectorGradient as aM, samplePlainStops as aN, sampleVectorGradient as aO, sampleVectorGradientAt as aP, sampleVectorPaintDefAt as aQ, sanitizeVectorGradient as aR, setVectorGradientVector as aS, sortedVectorGradientStops as aT, spanVectorGradientStops as aU, transformVectorGradient as aV, transformVectorPaint as aW, vectorBoxMatrix as aX, vectorCornersAttribute as aY, vectorDocumentToSvg as aZ, vectorGradientArea as a_, VECTOR_TRANSFORM_HANDLES as aa, type VectorCorner as ab, type VectorGradientPoints as ac, type VectorGradientRamp as ad, type VectorGradientSvgOptions as ae, type VectorGradientUnits as af, type VectorLineCap as ag, type VectorMatrix as ah, type VectorPaintSvgOptions as ai, type VectorRgba as aj, type VectorSvgImportOptions as ak, type VectorSvgPatternDef as al, type VectorSvgWrapper as am, type VectorWarpStyle as an, applyVectorCornersAttribute as ao, applyVectorGradientPatch as ap, applyVectorGradientSpread as aq, convertVectorGradient as ar, defaultVectorGradient as as, expandVectorGradientSpread as at, expandVectorGradientStops as au, explicitVectorGradient as av, gradientMidpointRemap as aw, hasExplicitGradientGeometry as ax, insertVectorGradientStop as ay, isCentredVectorGradient as az, type VectorBounds as b, vectorGradientFocalParam as b0, vectorGradientHandles as b1, vectorGradientMatrix as b2, vectorGradientMidpointFromPosition as b3, vectorGradientMidpointPosition as b4, vectorGradientNeedsExpansion as b5, vectorGradientParam as b6, vectorGradientPoints as b7, vectorGradientRamp as b8, vectorGradientSvgDefs as b9, vectorGradientTAt as ba, vectorGradientUnitsMatrix as bb, vectorPaintToSvg as bc, vectorPathLocalBounds as bd, vectorStrokeSvgParts as be, widthProfileFromAttribute as bf, widthProfileToAttribute as bg, type VectorSvgExportOptions as c, type Vec2 as d, type VectorSubpath as e, type VectorAnchor as f, type VectorPathNode as g, type VectorAnchorType as h, type VectorPaint as i, type VectorGroupNode as j, type VectorCornerKind as k, type VectorWidthPoint as l, type VectorGradientHandle as m, type VectorGradient as n, type VectorGradientStop as o, type VectorViewport as p, type VectorEffectType as q, type VectorEffectParamsMap as r, type VectorFillRule as s, type VectorBooleanOperation as t, type VectorEffect as u, type VectorWarpMesh as v, type VectorTransformHandle as w, type VectorAnchorRef as x, type VectorPathfinderOperation as y, type VectorTool as z };
@@ -1,4 +1,5 @@
1
1
  import { C as CanvasGradientDef, S as SvgGradientDef, A as AffineMatrix } from './bezier-DYBvLgUH.js';
2
+ import { W as WarpStyle, a as WarpMesh } from './types-CwMPoRMU.js';
2
3
 
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). */
4
5
  type VectorMatrix = readonly [number, number, number, number, number, number];
@@ -369,20 +370,16 @@ type VectorAverageAxis = 'horizontal' | 'vertical' | 'both';
369
370
  */
370
371
  type VectorEffectType = 'trim' | 'roundCorners' | 'puckerBloat' | 'twist' | 'zigzag' | 'wiggle' | 'offset' | 'merge' | 'repeater' | 'envelope';
371
372
  declare const VECTOR_EFFECT_TYPES: readonly VectorEffectType[];
372
- /** Warp presets (Photoshop's fifteen, in menu order). */
373
- type VectorWarpStyle = 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist';
373
+ /** Warp presets (Photoshop's fifteen, in menu order); shared with the image editor (`src/geom`). */
374
+ type VectorWarpStyle = WarpStyle;
374
375
  /**
375
376
  * A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
376
377
  * boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
377
378
  * `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the node's own
378
379
  * space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
379
- * of 3, handles where one is.
380
+ * of 3, handles where one is. Shared with the image editor (`src/geom`).
380
381
  */
381
- interface VectorWarpMesh {
382
- us: number[];
383
- vs: number[];
384
- points: Vec2[];
385
- }
382
+ type VectorWarpMesh = WarpMesh;
386
383
  /** Merge Paths modes: a compound path (no boolean), union, the first minus the others, intersection or exclusion. */
387
384
  type VectorMergeMode = 'merge' | 'add' | 'subtract' | 'intersect' | 'exclude';
388
385
  declare const VECTOR_MERGE_MODES: readonly VectorMergeMode[];
@@ -865,4 +862,4 @@ declare function parseSvgTransform(value: string | undefined): AffineMatrix;
865
862
  /** Parses SVG markup into a vector document. Throws when there is no `<svg>` element. */
866
863
  declare function parseVectorSvg(svg: string, options?: VectorSvgImportOptions): VectorDocument;
867
864
 
868
- export { VECTOR_BLEND_SPACINGS as $, type VectorDefaults as A, type VectorStyle as B, type VectorHandleRef as C, type VectorSegmentRef as D, type VectorBlendOptions as E, type VectorModifiers as F, type VectorGradientPatch as G, type VectorAlign as H, type VectorDistribute as I, type VectorArrange as J, type VectorAverageAxis as K, type VectorArrowhead as L, type VectorBlendSpacing as M, type VectorGradientInterpolation as N, type VectorGradientSpread as O, type VectorGradientType as P, type VectorStrokeAlign as Q, type VectorStrokeGradientMode as R, type VectorRenderStrokeParts as S, type VectorPaintDef as T, type VectorArrowAlign as U, type VectorDocument as V, type VectorBlend as W, type VectorMergeMode as X, type VectorLineJoin as Y, type VectorWarpStyle as Z, VECTOR_ARROWHEADS as _, type VectorNode as a, vectorGradientAspect as a$, VECTOR_CORNER_KINDS as a0, VECTOR_EFFECT_TYPES as a1, VECTOR_GRADIENT_INTERPOLATIONS as a2, VECTOR_GRADIENT_MAX_PERIODS as a3, VECTOR_GRADIENT_MIN_STOPS as a4, VECTOR_GRADIENT_SPREADS as a5, VECTOR_GRADIENT_TYPES as a6, VECTOR_MERGE_MODES as a7, VECTOR_PATHFINDER_OPERATIONS as a8, VECTOR_STROKE_GRADIENT_MODES as a9, isVectorGradient as aA, mapVectorGradient as aB, mapVectorPaint as aC, moveVectorGradientHandle as aD, moveVectorGradientStop as aE, parseSvgTransform as aF, parseVectorColor as aG, parseVectorSvg as aH, patternAttrs as aI, periodicVectorGradientStops as aJ, pinVectorGradient as aK, removeVectorGradientStop as aL, reverseVectorGradient as aM, samplePlainStops as aN, sampleVectorGradient as aO, sampleVectorGradientAt as aP, sampleVectorPaintDefAt as aQ, sanitizeVectorGradient as aR, setVectorGradientVector as aS, sortedVectorGradientStops as aT, spanVectorGradientStops as aU, transformVectorGradient as aV, transformVectorPaint as aW, vectorBoxMatrix as aX, vectorCornersAttribute as aY, vectorDocumentToSvg as aZ, vectorGradientArea as a_, VECTOR_TOOLS as aa, VECTOR_TRANSFORM_HANDLES as ab, type VectorCorner as ac, type VectorGradientPoints as ad, type VectorGradientRamp as ae, type VectorGradientSvgOptions as af, type VectorGradientUnits as ag, type VectorLineCap as ah, type VectorMatrix as ai, type VectorPaintSvgOptions as aj, type VectorRgba as ak, type VectorSvgImportOptions as al, type VectorSvgPatternDef as am, type VectorSvgWrapper as an, applyVectorCornersAttribute as ao, applyVectorGradientPatch as ap, applyVectorGradientSpread as aq, convertVectorGradient as ar, defaultVectorGradient as as, expandVectorGradientSpread as at, expandVectorGradientStops as au, explicitVectorGradient as av, gradientMidpointRemap as aw, hasExplicitGradientGeometry as ax, insertVectorGradientStop as ay, isCentredVectorGradient as az, type VectorBounds as b, vectorGradientFocalParam as b0, vectorGradientHandles as b1, vectorGradientMatrix as b2, vectorGradientMidpointFromPosition as b3, vectorGradientMidpointPosition as b4, vectorGradientNeedsExpansion as b5, vectorGradientParam as b6, vectorGradientPoints as b7, vectorGradientRamp as b8, vectorGradientSvgDefs as b9, vectorGradientTAt as ba, vectorGradientUnitsMatrix as bb, vectorPaintToSvg as bc, vectorPathLocalBounds as bd, vectorStrokeSvgParts as be, widthProfileFromAttribute as bf, widthProfileToAttribute as bg, type VectorSvgExportOptions as c, type Vec2 as d, type VectorSubpath as e, type VectorAnchor as f, type VectorPathNode as g, type VectorAnchorType as h, type VectorPaint as i, type VectorGroupNode as j, type VectorCornerKind as k, type VectorWidthPoint as l, type VectorGradientHandle as m, type VectorGradient as n, type VectorGradientStop as o, type VectorViewport as p, type VectorEffectType as q, type VectorEffectParamsMap as r, type VectorFillRule as s, type VectorBooleanOperation as t, type VectorEffect as u, type VectorWarpMesh as v, type VectorTransformHandle as w, type VectorAnchorRef as x, type VectorPathfinderOperation as y, type VectorTool as z };
865
+ export { VECTOR_CORNER_KINDS as $, type VectorDefaults as A, type VectorStyle as B, type VectorHandleRef as C, type VectorSegmentRef as D, type VectorBlendOptions as E, type VectorModifiers as F, type VectorGradientPatch as G, type VectorAlign as H, type VectorDistribute as I, type VectorArrange as J, type VectorAverageAxis as K, type VectorArrowhead as L, type VectorBlendSpacing as M, type VectorGradientInterpolation as N, type VectorGradientSpread as O, type VectorGradientType as P, type VectorStrokeAlign as Q, type VectorStrokeGradientMode as R, type VectorRenderStrokeParts as S, type VectorPaintDef as T, type VectorArrowAlign as U, type VectorDocument as V, type VectorBlend as W, type VectorMergeMode as X, type VectorLineJoin as Y, VECTOR_ARROWHEADS as Z, VECTOR_BLEND_SPACINGS as _, type VectorNode as a, vectorGradientAspect as a$, VECTOR_EFFECT_TYPES as a0, VECTOR_GRADIENT_INTERPOLATIONS as a1, VECTOR_GRADIENT_MAX_PERIODS as a2, VECTOR_GRADIENT_MIN_STOPS as a3, VECTOR_GRADIENT_SPREADS as a4, VECTOR_GRADIENT_TYPES as a5, VECTOR_MERGE_MODES as a6, VECTOR_PATHFINDER_OPERATIONS as a7, VECTOR_STROKE_GRADIENT_MODES as a8, VECTOR_TOOLS as a9, isVectorGradient as aA, mapVectorGradient as aB, mapVectorPaint as aC, moveVectorGradientHandle as aD, moveVectorGradientStop as aE, parseSvgTransform as aF, parseVectorColor as aG, parseVectorSvg as aH, patternAttrs as aI, periodicVectorGradientStops as aJ, pinVectorGradient as aK, removeVectorGradientStop as aL, reverseVectorGradient as aM, samplePlainStops as aN, sampleVectorGradient as aO, sampleVectorGradientAt as aP, sampleVectorPaintDefAt as aQ, sanitizeVectorGradient as aR, setVectorGradientVector as aS, sortedVectorGradientStops as aT, spanVectorGradientStops as aU, transformVectorGradient as aV, transformVectorPaint as aW, vectorBoxMatrix as aX, vectorCornersAttribute as aY, vectorDocumentToSvg as aZ, vectorGradientArea as a_, VECTOR_TRANSFORM_HANDLES as aa, type VectorCorner as ab, type VectorGradientPoints as ac, type VectorGradientRamp as ad, type VectorGradientSvgOptions as ae, type VectorGradientUnits as af, type VectorLineCap as ag, type VectorMatrix as ah, type VectorPaintSvgOptions as ai, type VectorRgba as aj, type VectorSvgImportOptions as ak, type VectorSvgPatternDef as al, type VectorSvgWrapper as am, type VectorWarpStyle as an, applyVectorCornersAttribute as ao, applyVectorGradientPatch as ap, applyVectorGradientSpread as aq, convertVectorGradient as ar, defaultVectorGradient as as, expandVectorGradientSpread as at, expandVectorGradientStops as au, explicitVectorGradient as av, gradientMidpointRemap as aw, hasExplicitGradientGeometry as ax, insertVectorGradientStop as ay, isCentredVectorGradient as az, type VectorBounds as b, vectorGradientFocalParam as b0, vectorGradientHandles as b1, vectorGradientMatrix as b2, vectorGradientMidpointFromPosition as b3, vectorGradientMidpointPosition as b4, vectorGradientNeedsExpansion as b5, vectorGradientParam as b6, vectorGradientPoints as b7, vectorGradientRamp as b8, vectorGradientSvgDefs as b9, vectorGradientTAt as ba, vectorGradientUnitsMatrix as bb, vectorPaintToSvg as bc, vectorPathLocalBounds as bd, vectorStrokeSvgParts as be, widthProfileFromAttribute as bf, widthProfileToAttribute as bg, type VectorSvgExportOptions as c, type Vec2 as d, type VectorSubpath as e, type VectorAnchor as f, type VectorPathNode as g, type VectorAnchorType as h, type VectorPaint as i, type VectorGroupNode as j, type VectorCornerKind as k, type VectorWidthPoint as l, type VectorGradientHandle as m, type VectorGradient as n, type VectorGradientStop as o, type VectorViewport as p, type VectorEffectType as q, type VectorEffectParamsMap as r, type VectorFillRule as s, type VectorBooleanOperation as t, type VectorEffect as u, type VectorWarpMesh as v, type VectorTransformHandle as w, type VectorAnchorRef as x, type VectorPathfinderOperation as y, type VectorTool as z };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Plain geometry types shared by the vector and image editors. No DOM, no editor types.
3
+ */
4
+ /** A point (or a vector) in some 2D space. */
5
+ interface Vec2 {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ /** An axis-aligned box: top-left corner, width and height. */
10
+ interface Box {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ }
16
+ /** An affine matrix `[a, b, c, d, e, f]`: `x' = a·x + c·y + e`, `y' = b·x + d·y + f` (SVG order). */
17
+ type AffineMatrix = readonly [number, number, number, number, number, number];
18
+ /**
19
+ * A 3×3 projective map, row-major: `[x', y', w'] = H · [x, y, 1]`, so `x' = (h0 x + h1 y + h2) / w'`
20
+ * and `y' = (h3 x + h4 y + h5) / w'` with `w' = h6 x + h7 y + h8`.
21
+ */
22
+ type Homography = readonly [number, number, number, number, number, number, number, number, number];
23
+ /** A quadrilateral's corners clockwise on screen (y down) from the top left: TL, TR, BR, BL. */
24
+ type Quad = readonly [Vec2, Vec2, Vec2, Vec2];
25
+ /** Warp presets (Photoshop's fifteen, in menu order). */
26
+ type WarpStyle = 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist';
27
+ /**
28
+ * A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
29
+ * boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
30
+ * `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the output
31
+ * space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
32
+ * of 3, handles where one is.
33
+ */
34
+ interface WarpMesh {
35
+ us: number[];
36
+ vs: number[];
37
+ points: Vec2[];
38
+ }
39
+
40
+ export type { AffineMatrix as A, Box as B, Homography as H, Quad as Q, Vec2 as V, WarpStyle as W, WarpMesh as a };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Plain geometry types shared by the vector and image editors. No DOM, no editor types.
3
+ */
4
+ /** A point (or a vector) in some 2D space. */
5
+ interface Vec2 {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ /** An axis-aligned box: top-left corner, width and height. */
10
+ interface Box {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ }
16
+ /** An affine matrix `[a, b, c, d, e, f]`: `x' = a·x + c·y + e`, `y' = b·x + d·y + f` (SVG order). */
17
+ type AffineMatrix = readonly [number, number, number, number, number, number];
18
+ /**
19
+ * A 3×3 projective map, row-major: `[x', y', w'] = H · [x, y, 1]`, so `x' = (h0 x + h1 y + h2) / w'`
20
+ * and `y' = (h3 x + h4 y + h5) / w'` with `w' = h6 x + h7 y + h8`.
21
+ */
22
+ type Homography = readonly [number, number, number, number, number, number, number, number, number];
23
+ /** A quadrilateral's corners clockwise on screen (y down) from the top left: TL, TR, BR, BL. */
24
+ type Quad = readonly [Vec2, Vec2, Vec2, Vec2];
25
+ /** Warp presets (Photoshop's fifteen, in menu order). */
26
+ type WarpStyle = 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist';
27
+ /**
28
+ * A grid of bicubic Bézier patches mapping a source box onto the plane. `us` / `vs` are the patch
29
+ * boundaries as fractions of the box (increasing, first 0, last 1); `points` is the
30
+ * `(3·(us.length − 1) + 1) × (3·(vs.length − 1) + 1)` control grid, row by row, in the output
31
+ * space. Neighbouring patches share their edge row: anchors sit where both indices are multiples
32
+ * of 3, handles where one is.
33
+ */
34
+ interface WarpMesh {
35
+ us: number[];
36
+ vs: number[];
37
+ points: Vec2[];
38
+ }
39
+
40
+ export type { AffineMatrix as A, Box as B, Homography as H, Quad as Q, Vec2 as V, WarpStyle as W, WarpMesh as a };