@pixerate/editor 0.108.0 → 0.109.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 (74) hide show
  1. package/dist/animation/index.cjs +5 -5
  2. package/dist/animation/index.cjs.map +1 -1
  3. package/dist/animation/index.js +9 -9
  4. package/dist/animation-editor/index.cjs +59 -59
  5. package/dist/animation-editor/index.cjs.map +1 -1
  6. package/dist/animation-editor/index.d.cts +2 -1
  7. package/dist/animation-editor/index.d.ts +2 -1
  8. package/dist/animation-editor/index.js +29 -29
  9. package/dist/canvas/index.cjs +27 -27
  10. package/dist/canvas/index.cjs.map +1 -1
  11. package/dist/canvas/index.js +11 -11
  12. package/dist/{chunk-2FGRTYJN.cjs → chunk-477UVMNR.cjs} +3 -3
  13. package/dist/{chunk-2FGRTYJN.cjs.map → chunk-477UVMNR.cjs.map} +1 -1
  14. package/dist/{chunk-T3QZ6S47.cjs → chunk-AZTZRLDI.cjs} +40 -2
  15. package/dist/chunk-AZTZRLDI.cjs.map +1 -0
  16. package/dist/{chunk-HUQ7EHVI.js → chunk-BLWCAQCW.js} +723 -1975
  17. package/dist/chunk-BLWCAQCW.js.map +1 -0
  18. package/dist/{chunk-G4BIYE6R.js → chunk-CFMWALBM.js} +39 -1
  19. package/dist/chunk-CFMWALBM.js.map +1 -0
  20. package/dist/{chunk-FRD3FUXI.cjs → chunk-D37BX2ZA.cjs} +2081 -460
  21. package/dist/chunk-D37BX2ZA.cjs.map +1 -0
  22. package/dist/chunk-JLYX4V57.cjs +2001 -0
  23. package/dist/chunk-JLYX4V57.cjs.map +1 -0
  24. package/dist/chunk-KB2YBCVS.js +2001 -0
  25. package/dist/chunk-KB2YBCVS.js.map +1 -0
  26. package/dist/{chunk-SOROZ2BF.js → chunk-RE77QYUF.js} +1938 -317
  27. package/dist/chunk-RE77QYUF.js.map +1 -0
  28. package/dist/{chunk-UTEVPQTS.cjs → chunk-W3GXSUSQ.cjs} +746 -1998
  29. package/dist/chunk-W3GXSUSQ.cjs.map +1 -0
  30. package/dist/{chunk-JK6M6V7G.js → chunk-Z3YWVUWT.js} +4 -4
  31. package/dist/{export-a9bnF7Cl.d.ts → export-BLPLaE6Z.d.ts} +417 -16
  32. package/dist/{export-JGWQEPJn.d.cts → export-DSUc4fQD.d.cts} +417 -16
  33. package/dist/image-editor/index.cjs +1527 -1001
  34. package/dist/image-editor/index.cjs.map +1 -1
  35. package/dist/image-editor/index.d.cts +73 -9
  36. package/dist/image-editor/index.d.ts +73 -9
  37. package/dist/image-editor/index.js +814 -288
  38. package/dist/image-editor/index.js.map +1 -1
  39. package/dist/paint-editor/index.cjs +56 -53
  40. package/dist/paint-editor/index.cjs.map +1 -1
  41. package/dist/paint-editor/index.d.cts +5 -2
  42. package/dist/paint-editor/index.d.ts +5 -2
  43. package/dist/paint-editor/index.js +6 -3
  44. package/dist/paint-editor/index.js.map +1 -1
  45. package/dist/raster/index.cjs +4 -2
  46. package/dist/raster/index.cjs.map +1 -1
  47. package/dist/raster/index.d.cts +3 -129
  48. package/dist/raster/index.d.ts +3 -129
  49. package/dist/raster/index.js +3 -1
  50. package/dist/{compositor-D92URMlm.d.cts → render-C-fO_mes.d.cts} +135 -1
  51. package/dist/{compositor-Kt_M4ruo.d.ts → render-OLIMk_v0.d.ts} +135 -1
  52. package/dist/{svg-SseJTIrA.d.ts → svg-D_cfkhlB.d.cts} +3 -629
  53. package/dist/{svg-ClVIG4T7.d.cts → svg-wIaKLrU0.d.ts} +3 -629
  54. package/dist/types-DtL_qLFz.d.ts +630 -0
  55. package/dist/types-DyQq-WPY.d.cts +630 -0
  56. package/dist/vector/index.cjs +563 -563
  57. package/dist/vector/index.cjs.map +1 -1
  58. package/dist/vector/index.d.cts +4 -2
  59. package/dist/vector/index.d.ts +4 -2
  60. package/dist/vector/index.js +69 -69
  61. package/dist/video-editor/index.cjs +3 -3
  62. package/dist/video-editor/index.js +2 -2
  63. package/package.json +1 -1
  64. package/dist/chunk-DWGZUSES.cjs +0 -694
  65. package/dist/chunk-DWGZUSES.cjs.map +0 -1
  66. package/dist/chunk-FRD3FUXI.cjs.map +0 -1
  67. package/dist/chunk-G4BIYE6R.js.map +0 -1
  68. package/dist/chunk-HUQ7EHVI.js.map +0 -1
  69. package/dist/chunk-KKREERP2.js +0 -694
  70. package/dist/chunk-KKREERP2.js.map +0 -1
  71. package/dist/chunk-SOROZ2BF.js.map +0 -1
  72. package/dist/chunk-T3QZ6S47.cjs.map +0 -1
  73. package/dist/chunk-UTEVPQTS.cjs.map +0 -1
  74. /package/dist/{chunk-JK6M6V7G.js.map → chunk-Z3YWVUWT.js.map} +0 -0
@@ -1,7 +1,9 @@
1
- import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, g as GlobalLight, E as EffectPattern, I as Interpolation, h as LayerLocation$1, L as LayerLocks, i as LayerEffect, j as LayerEffects, d as RasterSources, c as RasterCompositor, k as CompositorOptions, l as LayerEffectKind } from './compositor-D92URMlm.cjs';
1
+ import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, E as EffectFill, g as GlobalLight, h as EffectPattern, I as Interpolation, i as LayerLocation$1, L as LayerLocks, j as LayerEffect, k as LayerEffects, d as RasterSources, c as RasterCompositor, l as CompositorOptions, m as LayerEffectKind, n as EffectContext } from './render-C-fO_mes.cjs';
2
2
  import { P as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-CkKOHGPm.cjs';
3
- import { Q as Quad, a as WarpMesh, V as Vec2, A as AffineMatrix, H as Homography } from './types-CwMPoRMU.cjs';
3
+ import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2$1, H as Homography } from './types-CwMPoRMU.cjs';
4
+ import { v as VectorSubpath, n as Vec2 } from './types-DyQq-WPY.cjs';
4
5
  import { B as BrushSettings, M as MixerSettings, a as MixerLoad, c as StrokeCoverage, d as MixerTarget, e as MixerStroke, f as StrokeApply, S as StrokePoint } from './mixer-5ziHU8OS.cjs';
6
+ import { B as BezierPath } from './bezier-BfwIbVTl.cjs';
5
7
  import { W as WarpPreset } from './warp-D5jz_tN7.cjs';
6
8
 
7
9
  /**
@@ -93,7 +95,8 @@ declare function deserializeSelection(value: unknown): SelectionMask;
93
95
  declare function hashMaskContent(content: string | Uint8Array): string;
94
96
 
95
97
  /**
96
- * The image editor's layer stack: pixel, adjustment, group and annotation layers in one ordered
98
+ * The image editor's layer stack: pixel, adjustment, group, shape, smart object and annotation
99
+ * layers in one ordered
97
100
  * tree (bottom to top), all in document space (natural pixels of the document).
98
101
  *
99
102
  * Layer objects are immutable. Every change builds new objects along the path from the root to
@@ -167,6 +170,157 @@ interface AnnotationLayer extends LayerBase {
167
170
  type: 'annotation';
168
171
  annotation: Annotation;
169
172
  }
173
+ /**
174
+ * How a shape component combines with the result of the components below it (Photoshop's path
175
+ * operations): `combine` (union), `subtract` (front minus), `intersect` and `exclude` (xor). The
176
+ * first component always combines, whatever it says.
177
+ */
178
+ type ShapeOperation = 'combine' | 'subtract' | 'intersect' | 'exclude';
179
+ declare const SHAPE_OPERATIONS: readonly ShapeOperation[];
180
+ /** Winding rule a component's subpaths are filled with. */
181
+ type ShapeFillRule = 'nonzero' | 'evenodd';
182
+ /**
183
+ * What a shape's fill or stroke paints with: a solid colour, a gradient or a pattern (the fills of
184
+ * layer effects; gradients aligned with the layer use the shape's bounds), at `opacity` (0..1,
185
+ * missing = 1).
186
+ */
187
+ type ShapePaint = EffectFill & {
188
+ opacity?: number;
189
+ };
190
+ type ShapeStrokeAlign = 'inside' | 'center' | 'outside';
191
+ type ShapeLineCap = 'butt' | 'round' | 'square';
192
+ type ShapeLineJoin = 'miter' | 'round' | 'bevel';
193
+ /** A shape's stroke (Photoshop's shape Stroke options, not the layer-style stroke). */
194
+ interface ShapeStroke {
195
+ /** Width in document pixels. */
196
+ width: number;
197
+ paint: ShapePaint;
198
+ /** Where the stroke sits on the outline (default `center`; open paths always stroke centred). */
199
+ align?: ShapeStrokeAlign;
200
+ /** Default `butt`. */
201
+ cap?: ShapeLineCap;
202
+ /** Default `miter`. */
203
+ join?: ShapeLineJoin;
204
+ /** Miter length over width above which a miter is bevelled (default 100, as Photoshop). */
205
+ miterLimit?: number;
206
+ /** Dash and gap lengths in multiples of the width (Photoshop's convention); missing or empty = solid. */
207
+ dashes?: number[];
208
+ /** Distance into the dash pattern at the start, in multiples of the width. */
209
+ dashOffset?: number;
210
+ }
211
+ /** An arrowhead of a live line: a triangle (notched by `concavity`) whose tip is the line's end. */
212
+ interface ShapeArrowhead {
213
+ /** Width across the base, document pixels. */
214
+ width: number;
215
+ /** Length from the base to the tip, document pixels. */
216
+ length: number;
217
+ /** Notch of the base towards the tip as a fraction of `length` (-0.5..0.5, default 0). */
218
+ concavity?: number;
219
+ }
220
+ interface LiveShapeBase {
221
+ /**
222
+ * Where the shape's own frame lands in the document (an affine map, missing = identity): live
223
+ * shapes keep their parameters through moves, rotations and scales.
224
+ */
225
+ transform?: AffineMatrix;
226
+ }
227
+ /**
228
+ * A parametric ("live") shape a component was drawn as, kept so it stays editable as that shape
229
+ * (Photoshop's live shape properties). The component's subpaths are always the shape it
230
+ * describes; editing the subpaths directly drops it.
231
+ */
232
+ type LiveShape = (LiveShapeBase & {
233
+ kind: 'rect';
234
+ x: number;
235
+ y: number;
236
+ width: number;
237
+ height: number;
238
+ /** Corner radii in pixels: top-left, top-right, bottom-right, bottom-left (missing = square). */
239
+ radii?: [number, number, number, number];
240
+ }) | (LiveShapeBase & {
241
+ kind: 'ellipse';
242
+ x: number;
243
+ y: number;
244
+ width: number;
245
+ height: number;
246
+ }) | (LiveShapeBase & {
247
+ kind: 'polygon';
248
+ x: number;
249
+ y: number;
250
+ width: number;
251
+ height: number;
252
+ sides: number;
253
+ }) | (LiveShapeBase & {
254
+ kind: 'star';
255
+ x: number;
256
+ y: number;
257
+ width: number;
258
+ height: number;
259
+ points: number;
260
+ /** Inner radius over outer radius, 0..1. */
261
+ innerRatio: number;
262
+ }) | (LiveShapeBase & {
263
+ kind: 'line';
264
+ x1: number;
265
+ y1: number;
266
+ x2: number;
267
+ y2: number;
268
+ /** Thickness of the bar in pixels (a line shape is a filled bar, as in Photoshop). */
269
+ weight: number;
270
+ startArrow?: ShapeArrowhead | null;
271
+ endArrow?: ShapeArrowhead | null;
272
+ });
273
+ type LiveShapeKind = LiveShape['kind'];
274
+ declare const LIVE_SHAPE_KINDS: readonly LiveShapeKind[];
275
+ /** One shape component: subpaths filled together (with the layer's fill rule), combined by `op`. */
276
+ interface ShapeComponent {
277
+ op: ShapeOperation;
278
+ /** Document pixels; handles are absolute positions (the vector editor's anchors). */
279
+ subpaths: VectorSubpath[];
280
+ live?: LiveShape;
281
+ }
282
+ /** PSD data of a shape layer kept for round trips (see the PSD module). */
283
+ interface ShapePsdData {
284
+ /** Additional-info blocks we do not model, by key, as read. */
285
+ blocks?: Array<{
286
+ key: string;
287
+ data: Uint8Array;
288
+ }>;
289
+ }
290
+ /**
291
+ * A shape layer: vector components with a fill and a stroke. `surface` is the rendered result in
292
+ * document space (offset 0), rebuilt from the components by every change, so it never degrades
293
+ * however often the shape is moved or transformed; the compositor draws it like a pixel layer's
294
+ * pixels, and masks, effects, clipping and blend apply on top. Never paint into it: rasterize the
295
+ * layer first.
296
+ */
297
+ interface ShapeLayer extends LayerBase {
298
+ type: 'shape';
299
+ /** Bottom (first) to top. */
300
+ components: ShapeComponent[];
301
+ /** Default `nonzero`. */
302
+ fillRule?: ShapeFillRule;
303
+ /** `null`: no fill. */
304
+ fill: ShapePaint | null;
305
+ /** `null`: no stroke. */
306
+ stroke: ShapeStroke | null;
307
+ /** The rendered pixels (a cache of the components, fill and stroke), document space. */
308
+ surface: PixelSurface;
309
+ /** Always (0, 0): a shape moves through its geometry. */
310
+ offset: {
311
+ x: number;
312
+ y: number;
313
+ };
314
+ /** 0..1, PSD "Fill" (missing = 1). */
315
+ fillOpacity?: number;
316
+ /**
317
+ * The annotation this layer was migrated from (pen, rectangle, ellipse, line, arrow), while the
318
+ * shape is still exactly that annotation: the `annotations` compatibility view and
319
+ * `updateAnnotation` read and edit it. Shape edits drop it.
320
+ */
321
+ annotation?: Annotation;
322
+ psd?: ShapePsdData;
323
+ }
170
324
  /** A nested layer document: the contents of a smart object made from layers (or an embedded PSD). */
171
325
  interface SmartDocument {
172
326
  /** Bottom to top, on a canvas of the contents' `width × height`. */
@@ -282,7 +436,7 @@ interface SmartObjectLayer extends LayerBase {
282
436
  fillOpacity?: number;
283
437
  psd?: SmartPsdData;
284
438
  }
285
- type ImageLayer = PixelLayer | AdjustmentLayerNode | GroupLayer | AnnotationLayer | SmartObjectLayer;
439
+ type ImageLayer = PixelLayer | AdjustmentLayerNode | GroupLayer | AnnotationLayer | SmartObjectLayer | ShapeLayer;
286
440
  type ImageLayerType = ImageLayer['type'];
287
441
  /** Which part of the active layer painting targets (`filter-mask`: a smart object's filter mask). */
288
442
  type LayerTarget = 'pixels' | 'mask' | 'filter-mask';
@@ -303,8 +457,12 @@ declare function isSpatialFilter(f: LayerFilter): boolean;
303
457
  declare function pixelLayerBounds(layer: PixelLayer, surface?: PixelSurface): CropBox | null;
304
458
  /** Human label of a layer kind. */
305
459
  declare function layerTypeLabel(type: ImageLayerType): string;
306
- /** Layers whose pixels are a surface the compositor draws (pixel layers and smart objects). */
307
- declare function hasSurface(layer: ImageLayer): layer is PixelLayer | SmartObjectLayer;
460
+ /** Layers whose pixels are a surface the compositor draws (pixel layers, smart objects, shapes). */
461
+ declare function hasSurface(layer: ImageLayer): layer is PixelLayer | SmartObjectLayer | ShapeLayer;
462
+ /** Layers whose `surface` is a render cache of their own data (smart objects, shapes): never paint into it. */
463
+ declare function isRenderedLayer(layer: ImageLayer): layer is SmartObjectLayer | ShapeLayer;
464
+ /** Every shape layer in the stack. */
465
+ declare function shapeLayers(layers: readonly ImageLayer[]): ShapeLayer[];
308
466
  /** Every smart object in the stack (nested contents not included). */
309
467
  declare function smartObjectLayers(layers: readonly ImageLayer[]): SmartObjectLayer[];
310
468
 
@@ -439,7 +597,25 @@ interface SerializedSmartContents {
439
597
  path: string;
440
598
  };
441
599
  }
442
- type SerializedLayer = SerializedPixelLayer | SerializedAdjustmentLayer | SerializedGroupLayer | SerializedAnnotationLayer | SerializedSmartObjectLayer;
600
+ /** A shape layer: its vector data (the pixels are rendered again on load). */
601
+ interface SerializedShapeLayer extends SerializedLayerBase {
602
+ type: 'shape';
603
+ components: ShapeComponent[];
604
+ fillRule?: 'evenodd';
605
+ fill: ShapePaint | null;
606
+ stroke: ShapeStroke | null;
607
+ fillOpacity?: number;
608
+ /** The annotation the layer was migrated from, while it still is that annotation. */
609
+ annotation?: Annotation;
610
+ /** PSD blocks kept for round trips (base64). */
611
+ psd?: {
612
+ blocks: Array<{
613
+ key: string;
614
+ data: string;
615
+ }>;
616
+ };
617
+ }
618
+ type SerializedLayer = SerializedPixelLayer | SerializedAdjustmentLayer | SerializedGroupLayer | SerializedAnnotationLayer | SerializedSmartObjectLayer | SerializedShapeLayer;
443
619
  /** A version 3 document (layers). */
444
620
  interface SerializedLayeredImageEditorState {
445
621
  version: 3;
@@ -546,6 +722,8 @@ interface DeserializeContext {
546
722
  };
547
723
  /** Problems found while reading (unknown kinds, broken assets); the rest still loads. */
548
724
  problems: string[];
725
+ /** The document's patterns by id, for shapes painted with one. */
726
+ pattern?(id: string): EffectPattern | null;
549
727
  }
550
728
  /** Decodes a PNG data URL into pixels of `channels` bytes each. */
551
729
  declare function decodePngDataUrl(url: string, channels: 1 | 4): {
@@ -1411,6 +1589,118 @@ declare function psdToLayers(file: PsdFile, options?: PsdImportOptions): PsdImpo
1411
1589
  /** Parses and maps PSD / PSB bytes. Throws `PsdError` for files that cannot be read at all. */
1412
1590
  declare function importPsd(bytes: Uint8Array, options?: PsdImportOptions): PsdImportResult;
1413
1591
 
1592
+ /**
1593
+ * Shape layers: vector components with a fill and a stroke, rendered without a canvas into the
1594
+ * layer's `surface` (document space) by every change, so the compositor, effects, masks, clipping,
1595
+ * thumbnails and export see them like pixel layers while the vectors stay exact.
1596
+ *
1597
+ * Geometry comes from the vector editor (anchors with absolute handles and live corners, shape
1598
+ * factories) and the curve path operations (booleans, stroke outlines). Following Photoshop, each
1599
+ * component's subpaths are filled together with the layer's fill rule, and the components are
1600
+ * folded in order with their operation (the first one always combines). The stroke follows the
1601
+ * outline of the combined area, centred, inside or outside it.
1602
+ */
1603
+
1604
+ /** How far beyond the canvas a shape is rendered (effects can reach this far into the canvas). */
1605
+ declare const SHAPE_RENDER_MARGIN = 512;
1606
+ /** Photoshop's default miter limit (effectively always mitered). */
1607
+ declare const DEFAULT_MITER_LIMIT = 100;
1608
+ /** What rendering needs besides the layer. */
1609
+ interface ShapeEnv {
1610
+ /** Canvas size: the render covers it grown by `SHAPE_RENDER_MARGIN`. */
1611
+ width: number;
1612
+ height: number;
1613
+ /** A document pattern by id (built-in patterns are found without it). */
1614
+ pattern?(id: string): EffectPattern | null;
1615
+ }
1616
+ /** Subpaths with every anchor and handle mapped by `f` (live corners are cut first, then mapped). */
1617
+ declare function mapSubpaths(subpaths: readonly VectorSubpath[], f: (p: Vec2) => Vec2): VectorSubpath[];
1618
+ /** The subpaths a live shape describes, in document pixels. */
1619
+ declare function liveShapeSubpaths(live: LiveShape): VectorSubpath[];
1620
+ /** A component drawn as a live shape. */
1621
+ declare function liveComponent(live: LiveShape, op?: ShapeOperation): ShapeComponent;
1622
+ /** A component as Bézier commands (live corners cut). */
1623
+ declare function componentPath(c: ShapeComponent): BezierPath;
1624
+ /**
1625
+ * The outline of the combined area (every component folded in with its operation) as one clean
1626
+ * path. A single component comes back as its own path (open subpaths stay open, for stroking).
1627
+ */
1628
+ declare function shapeOutline(components: readonly ShapeComponent[], fillRule?: ShapeFillRule): BezierPath;
1629
+ /** Bounds of the shape's geometry (the combined components, not the stroke), or `null`. */
1630
+ declare function shapeGeometryBounds(layer: Pick<ShapeLayer, 'components'>): {
1631
+ x: number;
1632
+ y: number;
1633
+ width: number;
1634
+ height: number;
1635
+ } | null;
1636
+ /** Where a shape renders: the canvas grown by the margin. */
1637
+ declare function shapeRenderClip(env: Pick<ShapeEnv, 'width' | 'height'>): CropBox;
1638
+ /**
1639
+ * Straight RGBA bytes of the shape over `rect`: the fill (its coverage × paint), then the stroke
1640
+ * over it (centred, or clipped to the inside or outside of the fill area). `null` when empty.
1641
+ */
1642
+ declare function renderShapeRect(layer: ShapeLayer, rect: CropBox, env: ShapeEnv, ctx?: EffectContext): Uint8ClampedArray | null;
1643
+ /**
1644
+ * Renders a shape layer into a document-space surface (offset 0), tile by tile, over the canvas
1645
+ * grown by `SHAPE_RENDER_MARGIN` (or only `clip`, for previews).
1646
+ */
1647
+ declare function renderShape(layer: ShapeLayer, env: ShapeEnv, options?: {
1648
+ clip?: CropBox;
1649
+ }): PixelSurface;
1650
+ /** The layer with its `surface` rendered again from its components. */
1651
+ declare function rerenderShape(layer: ShapeLayer, env: ShapeEnv): ShapeLayer;
1652
+ /**
1653
+ * A paint from loose input: a CSS colour string (`#rrggbb`, `#rrggbbaa`, `rgb()`, a name; its
1654
+ * alpha becomes the opacity), `{ type: 'color', color, opacity? }`, `{ type: 'gradient',
1655
+ * gradient, opacity? }` or `{ type: 'pattern', patternId, scale?, angle?, link?, phase?, opacity? }`.
1656
+ */
1657
+ declare function normalizeShapePaint(v: unknown, path?: string): ShapePaint;
1658
+ /** A stroke from loose input (`width` and `paint` required; the rest default as Photoshop). */
1659
+ declare function normalizeShapeStroke(v: unknown, path?: string, base?: ShapeStroke | null): ShapeStroke;
1660
+ /** A live shape from loose input (`kind` plus its fields), validated. */
1661
+ declare function normalizeLiveShape(v: unknown, path?: string): LiveShape;
1662
+ /** Subpaths from loose input: `[{ anchors: [{ x, y, in?, out? }], closed }]` or SVG path data. */
1663
+ declare function normalizeSubpaths(v: unknown, path?: string): VectorSubpath[];
1664
+ declare function requireOperation(v: unknown, path?: string): ShapeOperation;
1665
+ /** The shape layer with `id`, or an error saying what it is instead. */
1666
+ declare function requireShapeLayer(layers: readonly ImageLayer[], id: string): ShapeLayer;
1667
+ interface ShapeLayerData {
1668
+ name?: string;
1669
+ components: ShapeComponent[];
1670
+ fill?: ShapePaint | null;
1671
+ stroke?: ShapeStroke | null;
1672
+ fillRule?: ShapeFillRule;
1673
+ visible?: boolean;
1674
+ opacity?: number;
1675
+ blend?: BlendMode;
1676
+ }
1677
+ /** A new shape layer, rendered. */
1678
+ declare function createShapeLayer(init: ShapeLayerData, env: ShapeEnv, id?: string): ShapeLayer;
1679
+ /** The default name of a shape layer (Photoshop names them by tool). */
1680
+ declare function defaultShapeName(c: ShapeComponent | undefined): string;
1681
+ /** Replaces a shape layer's data (dropping the migrated annotation) and renders it again. */
1682
+ declare function updateShapeLayer(layers: readonly ImageLayer[], id: string, change: (layer: ShapeLayer) => Partial<ShapeLayer>, env: ShapeEnv, action?: string): {
1683
+ layers: ImageLayer[];
1684
+ layer: ShapeLayer;
1685
+ };
1686
+ /** Moves every component of a shape by `f` (a document-space point map); `affine` keeps live shapes live. */
1687
+ declare function transformShapeComponents(components: readonly ShapeComponent[], f: (p: Vec2) => Vec2, affine?: AffineMatrix): ShapeComponent[];
1688
+ /** A shape moved by (dx, dy), rendered again. */
1689
+ declare function offsetShape(layer: ShapeLayer, dx: number, dy: number, env: ShapeEnv): ShapeLayer;
1690
+ /** Merge Shape Components: the combined area as one `combine` component (live shapes become paths). */
1691
+ declare function mergeShapeComponents(components: readonly ShapeComponent[], fillRule?: ShapeFillRule): ShapeComponent[];
1692
+ /** A shape layer as a pixel layer with what it shows now (same id, name, mask, effects, blend). */
1693
+ declare function shapeAsPixelLayer(layer: ShapeLayer): PixelLayer;
1694
+ /**
1695
+ * The shape an annotation draws (pen, rectangle, ellipse, line, arrow), exactly as the canvas drew
1696
+ * it, or `null` for annotations that are not shapes (text, image) or use a colour we can't read.
1697
+ */
1698
+ declare function shapeFromAnnotation(a: Annotation): Pick<ShapeLayer, 'components' | 'fill' | 'stroke'> | null;
1699
+ /** The blend a migrated layer draws with: the annotation's own unless the layer set one. */
1700
+ declare function annotationBlend(a: Annotation, layerBlend: string): BlendMode;
1701
+ /** The annotation a migrated shape layer still is (its blend read from the layer). */
1702
+ declare function annotationOfShape(layer: ShapeLayer): Annotation | null;
1703
+
1414
1704
  /**
1415
1705
  * Free Transform geometry for the image editor, as pure functions both the UI bindings and the
1416
1706
  * agent tools use: a transform is the frame being transformed (`box`, document pixels), where its
@@ -1457,11 +1747,11 @@ declare function isIdentityTransform(geometry: FreeTransformGeometry): boolean;
1457
1747
  * The forward map of the whole transform (document pixels of the source → document pixels of the
1458
1748
  * result): the warp over the box, then the corner map. `null` where it is undefined.
1459
1749
  */
1460
- declare function transformMap(geometry: FreeTransformGeometry): ((p: Vec2) => Vec2 | null) | null;
1750
+ declare function transformMap(geometry: FreeTransformGeometry): ((p: Vec2$1) => Vec2$1 | null) | null;
1461
1751
  /** A point of the transformed box at box fractions (`fx`, `fy`), warp included. */
1462
- declare function transformedPoint(geometry: FreeTransformGeometry, fx: number, fy: number): Vec2 | null;
1752
+ declare function transformedPoint(geometry: FreeTransformGeometry, fx: number, fy: number): Vec2$1 | null;
1463
1753
  /** Where an anchor of the box is after the corner map (the warp ignored). */
1464
- declare function anchorPoint(geometry: FreeTransformGeometry, anchor: TransformAnchor): Vec2;
1754
+ declare function anchorPoint(geometry: FreeTransformGeometry, anchor: TransformAnchor): Vec2$1;
1465
1755
  /** Bounds of the transformed result's outline (document pixels, not rounded). */
1466
1756
  declare function transformedBox(geometry: FreeTransformGeometry): CropBox | null;
1467
1757
  /** Free Transform as numbers, as Photoshop's options bar shows it. */
@@ -1480,10 +1770,10 @@ interface TransformParams {
1480
1770
  dx?: number;
1481
1771
  dy?: number;
1482
1772
  /** The fixed point of scale, skew and rotation: an anchor of the frame or a document point (default the centre). */
1483
- reference?: TransformAnchor | Vec2;
1773
+ reference?: TransformAnchor | Vec2$1;
1484
1774
  }
1485
1775
  /** The reference point of params over a box (default its centre). */
1486
- declare function referencePoint(box: CropBox, reference: TransformParams['reference']): Vec2;
1776
+ declare function referencePoint(box: CropBox, reference: TransformParams['reference']): Vec2$1;
1487
1777
  /**
1488
1778
  * The affine matrix of `params` over `box`: about the reference point, skew, then scale, then
1489
1779
  * rotate; then the move.
@@ -1521,7 +1811,7 @@ declare function applyParams(geometry: FreeTransformGeometry, params: TransformP
1521
1811
  /** Flip of the corners about the box's centre line (horizontal: left ↔ right). */
1522
1812
  declare function flipCorners(geometry: FreeTransformGeometry, axis: 'horizontal' | 'vertical'): Quad;
1523
1813
  /** Inverse of `matrixFromCorners` (box space → document) for mapping a document point back into the box. */
1524
- declare function boxPointOf(geometry: FreeTransformGeometry, p: Vec2): Vec2 | null;
1814
+ declare function boxPointOf(geometry: FreeTransformGeometry, p: Vec2$1): Vec2$1 | null;
1525
1815
  /** A warp mesh from a preset over the box (null when it changes nothing). */
1526
1816
  declare function presetWarp(box: CropBox, preset: WarpPreset): WarpMesh | null;
1527
1817
  /** Validates a warp mesh for a box: well formed, finite, the right number of points. */
@@ -1595,6 +1885,8 @@ interface FreeTransformHost {
1595
1885
  };
1596
1886
  /** The pixels a pixel layer or smart object composites (the decoded source for the Background). */
1597
1887
  pixelsOf(layer: PixelLayer | SmartObjectLayer): TiledSurface;
1888
+ /** What shape layers render with (canvas size, document patterns). */
1889
+ shapeEnv(): ShapeEnv;
1598
1890
  /** Opaque pre-transform snapshot. */
1599
1891
  capture(): unknown;
1600
1892
  /** Shows a live state (no history). */
@@ -1630,6 +1922,9 @@ declare class FreeTransformSession {
1630
1922
  readonly startGeometry: FreeTransformGeometry;
1631
1923
  /** True when the layer is a smart object (the transform sets its placement). */
1632
1924
  readonly smartObject: boolean;
1925
+ /** True when the layer is a shape layer (the transform maps its paths and renders them again). */
1926
+ readonly shapeLayer: boolean;
1927
+ private readonly shape;
1633
1928
  private geometryValue;
1634
1929
  private readonly smart;
1635
1930
  private readonly smartReduced;
@@ -1661,6 +1956,12 @@ declare class FreeTransformSession {
1661
1956
  }, preview?: FreeTransformPreview | false): FreeTransformGeometry;
1662
1957
  /** Resamples every part for the current geometry and shows it (or returns it, for commit). */
1663
1958
  private resample;
1959
+ /**
1960
+ * A shape with its paths mapped through the current geometry and rendered again (live shapes
1961
+ * stay live under an affine map; perspective and warps turn them into plain paths). Previews
1962
+ * render only the visible part.
1963
+ */
1964
+ private resampleShape;
1664
1965
  /** A smart object re-rendered from its contents for the current geometry (previews leave the smart filters out). */
1665
1966
  private resampleSmart;
1666
1967
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
@@ -1805,6 +2106,55 @@ interface PaintOptions {
1805
2106
  /** What the Mixer Brush carries now: its reservoir, how much is left and the picked-up colour. */
1806
2107
  mixerLoad: MixerLoad;
1807
2108
  }
2109
+ /**
2110
+ * The geometry of one shape component: a live shape (`{ kind: 'rect' | 'ellipse' | 'polygon' |
2111
+ * 'star' | 'line', … }`, see `LiveShape`) or subpaths (`[{ anchors: [{ x, y, in?, out? }],
2112
+ * closed }]` or SVG path data), and how it combines with the components below it.
2113
+ */
2114
+ interface ShapeGeometryInput {
2115
+ shape?: LiveShape | Record<string, unknown>;
2116
+ subpaths?: VectorSubpath[] | string;
2117
+ /** Default `combine`. */
2118
+ op?: ShapeOperation;
2119
+ }
2120
+ /** A new shape layer: its geometry (one component, or `components`), fill and stroke. */
2121
+ interface ShapeLayerInit extends ShapeGeometryInput, LayerPlacement {
2122
+ /** Several components instead of `shape` / `subpaths`, bottom first. */
2123
+ components?: ShapeGeometryInput[];
2124
+ name?: string;
2125
+ /** A colour string or a paint; `null` for none. Default the foreground colour (none for a stroke-only open path). */
2126
+ fill?: ShapePaint | string | null;
2127
+ /** `{ width, paint, align?, cap?, join?, miterLimit?, dashes?, dashOffset? }`, or `null` / missing for none. */
2128
+ stroke?: (Partial<ShapeStroke> & {
2129
+ paint?: ShapePaint | string;
2130
+ color?: string;
2131
+ }) | null;
2132
+ fillRule?: ShapeFillRule;
2133
+ opacity?: number;
2134
+ blend?: BlendMode;
2135
+ }
2136
+ /** A shape layer as tools and panels read it. */
2137
+ interface ShapeLayerInfo {
2138
+ id: string;
2139
+ name: string;
2140
+ /** Bottom to top; `index` is what component edits take. */
2141
+ components: Array<{
2142
+ index: number;
2143
+ op: ShapeOperation;
2144
+ live: LiveShape | null;
2145
+ subpaths: VectorSubpath[];
2146
+ bounds: CropBox | null;
2147
+ }>;
2148
+ fillRule: ShapeFillRule;
2149
+ fill: ShapePaint | null;
2150
+ stroke: ShapeStroke | null;
2151
+ /** Bounds of the paths (document pixels, not rounded), or `null` when empty. */
2152
+ geometryBounds: CropBox | null;
2153
+ /** Bounds of the rendered pixels (stroke and antialiasing included). */
2154
+ bounds: CropBox | null;
2155
+ /** The annotation id while the layer is still the annotation it was migrated from. */
2156
+ annotationId?: string;
2157
+ }
1808
2158
  /** Paint tools a stroke can use. */
1809
2159
  type StrokeTool = 'brush' | 'eraser' | 'mixer';
1810
2160
  /** A stroke: tool, target (default the active layer and target) and brush / colour overrides. */
@@ -2040,7 +2390,7 @@ declare class ImageEditorController {
2040
2390
  private nextSourceId;
2041
2391
  /** Changes whenever the Background's source pixels can have changed. */
2042
2392
  private sourceVersion;
2043
- /** The pixels a pixel layer or smart object composites (the decoded source for the Background). */
2393
+ /** The pixels a pixel layer, smart object or shape composites (the decoded source for the Background). */
2044
2394
  private surfaceOf;
2045
2395
  /**
2046
2396
  * The source image as a surface (cached): host-supplied sample pixels first, then the decoded
@@ -2576,11 +2926,20 @@ declare class ImageEditorController {
2576
2926
  /** Sets the depth mask (a parametric mask on the active pixel layer, or the Background) as one undo step. */
2577
2927
  setDepthMask(partial: Partial<DepthMaskOptions>): void;
2578
2928
  resetDepthMask(): void;
2929
+ /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
2579
2930
  private annotationLayer;
2580
- /** Adds an annotation as its own layer (top of the stack unless `aboveId` is given). */
2931
+ /**
2932
+ * Adds an annotation as its own layer (top of the stack unless `aboveId` is given). Pen,
2933
+ * rectangle, ellipse, line and arrow annotations become shape layers that remember the
2934
+ * annotation (so `annotations` and `updateAnnotation` keep working); text and images stay
2935
+ * annotation layers.
2936
+ */
2581
2937
  addAnnotation(annotation: CreateAnnotationPayload, placement?: AnnotationPlacement): string;
2582
2938
  updateAnnotation(id: string, partial: Partial<Annotation>, commitToHistory?: boolean): void;
2939
+ /** `layer` (an annotation or migrated shape layer) showing `annotation` instead, keeping its other properties. */
2940
+ private layerForAnnotation;
2583
2941
  removeAnnotation(id: string): void;
2942
+ /** Deletes every annotation layer and every shape layer that still is the annotation it was migrated from. */
2584
2943
  clearAnnotations(): void;
2585
2944
  selectAnnotation(id: string | null): void;
2586
2945
  setZoom(zoom: number): void;
@@ -2659,6 +3018,48 @@ declare class ImageEditorController {
2659
3018
  * new image has different dimensions). Resolves to the masked layer's id in mask mode.
2660
3019
  */
2661
3020
  applyBackgroundRemovedImage(newDataUrl: string, options?: AIResultOptions): Promise<string | void>;
3021
+ /** What shape rendering needs: the canvas size and the document's patterns. */
3022
+ private shapeEnv;
3023
+ /** One component from tool or UI input (validated). */
3024
+ private componentFrom;
3025
+ private shapeInfo;
3026
+ /** A shape layer's components, fill, stroke and bounds. */
3027
+ getShapeLayer(id: string): ShapeLayerInfo;
3028
+ /**
3029
+ * Adds a shape layer (one undo step) and makes it active: a live shape or subpaths (or several
3030
+ * `components`), filled with `fill` (default the foreground colour, except for a stroke-only
3031
+ * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
3032
+ */
3033
+ addShapeLayer(init: ShapeLayerInit): string;
3034
+ /**
3035
+ * Sets a shape's fill, stroke or fill rule (one undo step unless `commitToHistory` is false):
3036
+ * `fill` / `stroke` replace them (`null` removes); `stroke` given as a partial object changes
3037
+ * only those settings of the current stroke. Returns the shape.
3038
+ */
3039
+ setShapeStyle(id: string, changes: {
3040
+ fill?: ShapePaint | string | null;
3041
+ stroke?: (Partial<ShapeStroke> & {
3042
+ paint?: ShapePaint | string;
3043
+ color?: string;
3044
+ }) | null;
3045
+ fillRule?: ShapeFillRule;
3046
+ }, commitToHistory?: boolean): ShapeLayerInfo;
3047
+ private componentIndex;
3048
+ /**
3049
+ * Changes one component (one undo step unless `commitToHistory` is false): its live shape
3050
+ * (fields not given keep their values when the kind stays the same), its subpaths (which drops
3051
+ * the live shape) or its operation. Returns the shape.
3052
+ */
3053
+ setShapeComponent(id: string, index: number, change: ShapeGeometryInput, commitToHistory?: boolean): ShapeLayerInfo;
3054
+ /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
3055
+ addShapeComponent(id: string, spec: ShapeGeometryInput, index?: number): ShapeLayerInfo;
3056
+ /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
3057
+ removeShapeComponent(id: string, index: number): ShapeLayerInfo;
3058
+ /**
3059
+ * Merge Shape Components: the area the components combine to becomes one plain component (live
3060
+ * shapes become paths), as one undo step. Returns the shape.
3061
+ */
3062
+ mergeShapeComponents(id: string): ShapeLayerInfo;
2662
3063
  /**
2663
3064
  * Rasterize Layer: an annotation layer becomes a pixel layer with the same id, name and
2664
3065
  * properties (needs a canvas), and a pixel layer's filters are baked into its pixels. One undo
@@ -3151,4 +3552,4 @@ interface PsdExportResult {
3151
3552
  /** Writes the prepared stack as PSD (or PSB) bytes. */
3152
3553
  declare function exportPsd(input: PsdExportInput): PsdExportResult;
3153
3554
 
3154
- export { type ArrowAnnotation as $, type AdjustmentKind as A, type SmartFilter as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartObjectLayer as E, type SmartContents as F, type SmartDocument as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartPlacement as J, type FreeTransformGeometry as K, type LevelsChannel as L, type LayerPlacement as M, type FreeTransformMode as N, type FreeTransformResult as O, type PsdExportResult as P, FreeTransformSession as Q, type RefineEdgeParams as R, type SerializedLayer as S, type FreeTransformInit as T, type TransformAnchor as U, type AIResultOptions as V, type AdjustmentLayerBase as W, type AdjustmentLayerInit as X, type AdjustmentLayerUpdate as Y, type AnnotationPlacement as Z, type AnnotationType as _, type ImageAdjustments as a, PaintStrokeSession as a$, type AspectRatio as a0, type BaseAnnotation as a1, type BlackWhiteParams as a2, type BlurFilter as a3, type CircleAnnotation as a4, type ColorBalanceParams as a5, type ColorBalanceTone as a6, type ColorRangeOptions as a7, type ColorRangeSample as a8, type CreateAnnotationPayload as a9, type ImageEditorFit as aA, type ImageEditorOptions as aB, ImageEditorRenderer as aC, type ImageEditorState as aD, type ImageEditorTool as aE, type ImageLayerType as aF, type InpaintHook as aG, type InpaintOptions as aH, type InvertParams as aI, LAYERED_SCHEMA_VERSION as aJ, type LayerBase as aK, type LayerBlendMode as aL, type LayerFilterKind as aM, type LayerLocation as aN, type LayerMaskProps as aO, LayerOperationError as aP, type LayerProperties as aQ, type LayerSourcesHost as aR, type LayerTarget as aS, type LegacySerializedImageEditorState as aT, type LevelsParams as aU, type LineAnnotation as aV, type MagicWandOptions as aW, type MixerStrokeInit as aX, PSD_BLEND_KEYS as aY, type PaintOptions as aZ, type PaintStrokeResult as a_, type CropHandle as aa, type CurvesParams as ab, DEFAULT_ADJUSTMENTS as ac, DEFAULT_DEPTH_MASK as ad, DEFAULT_REFINE_EDGE_PARAMS as ae, DEFAULT_TRANSFORM as af, type DeserializeContext as ag, type DevelopSettings as ah, EMPTY_DISTANCE as ai, type ExportOptions as aj, FREE_TRANSFORM_CONTENTS as ak, FREE_TRANSFORM_MODES as al, type FillOptions as am, type FreeTransformContent as an, type FreeTransformHost as ao, type FreeTransformPreview as ap, GUIDED_FILTER_EPS as aq, type GroupLayer as ar, HISTOGRAM_BINS as as, type HistogramChannel as at, type HistoryEntryHandle as au, type HueSaturationParams as av, IMAGE_EDITOR_SCHEMA_VERSION as aw, type ImageAnnotation as ax, type ImageDimensions as ay, type ImageEditorAIHooks as az, type SerializedImageEditorState as b, blurFilter as b$, type PenAnnotation as b0, type PhotoFilterParams as b1, type PixelBuffer as b2, type PixelLayerInit as b3, type PosterizeParams as b4, type PsdChannel as b5, type PsdExportInput as b6, type PsdFile as b7, type PsdHeader as b8, type PsdImportOptions as b9, type SerializedPixelLayer as bA, type SerializedRasterMask as bB, type SerializedSelection as bC, type SerializedSmartContents as bD, type SerializedSmartFilter as bE, type SerializedSmartObjectLayer as bF, type ShapeSelectionOptions as bG, type SmartFilterKind as bH, type SmartObjectInfo as bI, type SmartPsdData as bJ, type StrokeInit as bK, type StrokeTool as bL, TONE_RANGE_PRESETS as bM, TRANSFORM_ANCHORS as bN, type TextAnnotation as bO, type ThresholdParams as bP, type ToneRangePreset as bQ, type TransformParams as bR, type TransformReadout as bS, type VibranceParams as bT, type ViewportMetrics as bU, addLayerEffect as bV, addLayerFilter as bW, adjustmentNodeAsLayer as bX, anchorPoint as bY, applyImageProjectionToContext as bZ, applyParams as b_, type PsdImportResult as ba, type PsdLayerMask as bb, type PsdLayerRecord as bc, type PsdLayerSummary as bd, type PsdRect as be, type PsdResource as bf, type PsdSmartFilter as bg, type PsdTaggedBlock as bh, type PsdTreeNode as bi, type RectAnnotation as bj, type RemoveBackgroundHook as bk, type RemoveBackgroundOptions as bl, type RenderOptions as bm, SELECTION_MODES as bn, SELECTION_MODIFY_OPS as bo, type SampleOptions as bp, type SelectionChannel as bq, type SelectionCommandOptions as br, type SelectionModifyOp as bs, type SerializeContext as bt, type SerializedAdjustmentLayer as bu, type SerializedAnnotationLayer as bv, type SerializedGroupLayer as bw, type SerializedLayerEffects as bx, type SerializedLayeredImageEditorState as by, type SerializedPattern as bz, type AdjustmentLayer as c, isIdentityTransform as c$, borderCoverage as c0, boxMean as c1, boxPointOf as c2, buildLayerMaskPlanes as c3, calculateCropDrag as c4, canvasToImagePoint as c5, clampCropToImage as c6, colorRange as c7, combineSelections as c8, computeHistogram as c9, exportPsd as cA, featherCoverage as cB, flipCorners as cC, fullSelection as cD, geometryHomography as cE, getAnnotationBounds as cF, getCropCursor as cG, getRotatedSize as cH, getViewportMetrics as cI, getViewportProjection as cJ, globalImageCache as cK, greyMorphology as cL, groupLayers as cM, guidePlanes as cN, guidedFilterColor as cO, hasSurface as cP, hasWarp as cQ, hashMaskContent as cR, histogramPath as cS, hitTestAnnotation as cT, hitTestCrop as cU, hueRange as cV, identityTransform as cW, imageToCanvasPoint as cX, importPsd as cY, invertSelection as cZ, isActiveFilter as c_, computeSelectionBounds as ca, contractCoverage as cb, cornersFromMatrix as cc, coverageToByte as cd, createSelectionMask as ce, decodeLayerChannel as cf, decodeLayerMask as cg, decodeMergedImage as ch, decodePngDataUrl as ci, decodeSelectionRle as cj, depthMaskAlpha as ck, describeTransform as cl, deserializeEffects as cm, deserializeLayer as cn, deserializeLayers as co, deserializePatterns as cp, deserializeSelection as cq, developFilter as cr, distanceTransform as cs, duplicateLayer as ct, edgeWidth as cu, ellipsePoints as cv, ellipseSelection as cw, encodeSelectionRle as cx, encodeSurface as cy, expandCoverage as cz, type AdjustmentParamsMap as d, selectionToPixels as d$, isQuarterTurnSwapped as d0, isSelectionEmpty as d1, isSelectionMode as d2, isSpatialFilter as d3, isTransformAnchor as d4, isValidWarp as d5, layerEffectsOf as d6, layerMaskCoverage as d7, layerMaskFromSelection as d8, layerMaskKey as d9, polygonCoverage as dA, polygonSelection as dB, presetWarp as dC, previewStep as dD, projectImagePoint as dE, projectImageRect as dF, projectMaskCoverage as dG, psdToLayers as dH, readPsd as dI, rectSelection as dJ, referencePoint as dK, refineCoverage as dL, refineEdgeHalo as dM, refineSelection as dN, removeLayer as dO, removeLayerEffect as dP, removeLayerFilter as dQ, requireLayer as dR, requireUnlocked as dS, resizePixels as dT, resizeSelection as dU, resolveExternalAssets as dV, runLayerFilters as dW, selectionArea as dX, selectionFromCoverage as dY, selectionFromPixels as dZ, selectionToCoverage as d_, layerName as da, layerTree as db, layerTypeLabel as dc, magicWand as dd, mapCropHandle as de, matrixFromCorners as df, matrixFromParams as dg, migrateSerializedImageEditorState as dh, migrateToLayeredState as di, modifySelection as dj, moveLayer as dk, newLayerId as dl, normalizeAngle as dm, normalizeFilter as dn, normalizeLayerMask as dp, normalizeRect as dq, normalizeRefineEdgeParams as dr, normalizeStoredAdjustments as ds, offsetLayer as dt, parseBlend as du, parseColor as dv, parseSelectionMode as dw, pixelLayerBounds as dx, pixelLayers as dy, placeLayer as dz, type AdjustmentLayerMask as e, selectionValueAt as e0, serializeContents as e1, serializeEffects as e2, serializeLayer as e3, serializeLayers as e4, serializeLayersExternal as e5, serializePatterns as e6, serializeSelection as e7, setLayerEffects as e8, setLayerEffectsEnabled as e9, setLayerMask as ea, setLayerProperties as eb, shiftCoverage as ec, smartObjectLayers as ed, smoothCoverage as ee, srgb8ToLab as ef, toHex as eg, toneRange as eh, transformHomography as ei, transformMap as ej, transformedBox as ek, transformedPoint as el, ungroupLayer as em, unionRect as en, unprojectCanvasPoint as eo, updateLayerEffect as ep, updateLayerFilter as eq, updateLayerMaskProps as er, withNewIds as es, writePsd as et, type AdjustmentLayerOf as f, ImageEditorController as g, type SelectionMask as h, type SelectionMode as i, type ColorDistance as j, type ImagePoint as k, type ImageLayer as l, type CropBox as m, type RasterMask as n, type Annotation as o, type AdjustmentLayerNode as p, type AnnotationLayer as q, type LayerFilter as r, type PixelLayer as s, type DevelopFilter as t, type ImageTransform as u, type ImageHistogram as v, type ImageProjection as w, type CompositorSources as x, LayerCompositor as y, type SmartFilterStack as z };
3555
+ export { type AnnotationType as $, type AdjustmentKind as A, type SmartFilterStack as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartFilter as E, type SmartObjectLayer as F, type SmartContents as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartDocument as J, type SmartPlacement as K, type LevelsChannel as L, type FreeTransformGeometry as M, type LayerPlacement as N, type FreeTransformMode as O, type PsdExportResult as P, type FreeTransformResult as Q, type RefineEdgeParams as R, type SerializedLayer as S, FreeTransformSession as T, type FreeTransformInit as U, type TransformAnchor as V, type AIResultOptions as W, type AdjustmentLayerBase as X, type AdjustmentLayerInit as Y, type AdjustmentLayerUpdate as Z, type AnnotationPlacement as _, type ImageAdjustments as a, type MagicWandOptions as a$, type ArrowAnnotation as a0, type AspectRatio as a1, type BaseAnnotation as a2, type BlackWhiteParams as a3, type BlurFilter as a4, type CircleAnnotation as a5, type ColorBalanceParams as a6, type ColorBalanceTone as a7, type ColorRangeOptions as a8, type ColorRangeSample as a9, type ImageDimensions as aA, type ImageEditorAIHooks as aB, type ImageEditorFit as aC, type ImageEditorOptions as aD, ImageEditorRenderer as aE, type ImageEditorState as aF, type ImageEditorTool as aG, type ImageLayerType as aH, type InpaintHook as aI, type InpaintOptions as aJ, type InvertParams as aK, LAYERED_SCHEMA_VERSION as aL, LIVE_SHAPE_KINDS as aM, type LayerBase as aN, type LayerBlendMode as aO, type LayerFilterKind as aP, type LayerLocation as aQ, type LayerMaskProps as aR, LayerOperationError as aS, type LayerProperties as aT, type LayerSourcesHost as aU, type LayerTarget as aV, type LegacySerializedImageEditorState as aW, type LevelsParams as aX, type LineAnnotation as aY, type LiveShape as aZ, type LiveShapeKind as a_, type CreateAnnotationPayload as aa, type CropHandle as ab, type CurvesParams as ac, DEFAULT_ADJUSTMENTS as ad, DEFAULT_DEPTH_MASK as ae, DEFAULT_MITER_LIMIT as af, DEFAULT_REFINE_EDGE_PARAMS as ag, DEFAULT_TRANSFORM as ah, type DeserializeContext as ai, type DevelopSettings as aj, EMPTY_DISTANCE as ak, type ExportOptions as al, FREE_TRANSFORM_CONTENTS as am, FREE_TRANSFORM_MODES as an, type FillOptions as ao, type FreeTransformContent as ap, type FreeTransformHost as aq, type FreeTransformPreview as ar, GUIDED_FILTER_EPS as as, type GroupLayer as at, HISTOGRAM_BINS as au, type HistogramChannel as av, type HistoryEntryHandle as aw, type HueSaturationParams as ax, IMAGE_EDITOR_SCHEMA_VERSION as ay, type ImageAnnotation as az, type SerializedImageEditorState as b, type ShapeSelectionOptions as b$, type MixerStrokeInit as b0, PSD_BLEND_KEYS as b1, type PaintOptions as b2, type PaintStrokeResult as b3, PaintStrokeSession as b4, type PenAnnotation as b5, type PhotoFilterParams as b6, type PixelBuffer as b7, type PixelLayerInit as b8, type PosterizeParams as b9, type SerializeContext as bA, type SerializedAdjustmentLayer as bB, type SerializedAnnotationLayer as bC, type SerializedGroupLayer as bD, type SerializedLayerEffects as bE, type SerializedLayeredImageEditorState as bF, type SerializedPattern as bG, type SerializedPixelLayer as bH, type SerializedRasterMask as bI, type SerializedSelection as bJ, type SerializedShapeLayer as bK, type SerializedSmartContents as bL, type SerializedSmartFilter as bM, type SerializedSmartObjectLayer as bN, type ShapeArrowhead as bO, type ShapeComponent as bP, type ShapeEnv as bQ, type ShapeFillRule as bR, type ShapeGeometryInput as bS, type ShapeLayerData as bT, type ShapeLayerInfo as bU, type ShapeLayerInit as bV, type ShapeLineCap as bW, type ShapeLineJoin as bX, type ShapeOperation as bY, type ShapePaint as bZ, type ShapePsdData as b_, type PsdChannel as ba, type PsdExportInput as bb, type PsdFile as bc, type PsdHeader as bd, type PsdImportOptions as be, type PsdImportResult as bf, type PsdLayerMask as bg, type PsdLayerRecord as bh, type PsdLayerSummary as bi, type PsdRect as bj, type PsdResource as bk, type PsdSmartFilter as bl, type PsdTaggedBlock as bm, type PsdTreeNode as bn, type RectAnnotation as bo, type RemoveBackgroundHook as bp, type RemoveBackgroundOptions as bq, type RenderOptions as br, SELECTION_MODES as bs, SELECTION_MODIFY_OPS as bt, SHAPE_OPERATIONS as bu, SHAPE_RENDER_MARGIN as bv, type SampleOptions as bw, type SelectionChannel as bx, type SelectionCommandOptions as by, type SelectionModifyOp as bz, type AdjustmentLayer as c, expandCoverage as c$, type ShapeStroke as c0, type ShapeStrokeAlign as c1, type SmartFilterKind as c2, type SmartObjectInfo as c3, type SmartPsdData as c4, type StrokeInit as c5, type StrokeTool as c6, TONE_RANGE_PRESETS as c7, TRANSFORM_ANCHORS as c8, type TextAnnotation as c9, computeSelectionBounds as cA, contractCoverage as cB, cornersFromMatrix as cC, coverageToByte as cD, createSelectionMask as cE, createShapeLayer as cF, decodeLayerChannel as cG, decodeLayerMask as cH, decodeMergedImage as cI, decodePngDataUrl as cJ, decodeSelectionRle as cK, defaultShapeName as cL, depthMaskAlpha as cM, describeTransform as cN, deserializeEffects as cO, deserializeLayer as cP, deserializeLayers as cQ, deserializePatterns as cR, deserializeSelection as cS, developFilter as cT, distanceTransform as cU, duplicateLayer as cV, edgeWidth as cW, ellipsePoints as cX, ellipseSelection as cY, encodeSelectionRle as cZ, encodeSurface as c_, type ThresholdParams as ca, type ToneRangePreset as cb, type TransformParams as cc, type TransformReadout as cd, type VibranceParams as ce, type ViewportMetrics as cf, addLayerEffect as cg, addLayerFilter as ch, adjustmentNodeAsLayer as ci, anchorPoint as cj, annotationBlend as ck, annotationOfShape as cl, applyImageProjectionToContext as cm, applyParams as cn, blurFilter as co, borderCoverage as cp, boxMean as cq, boxPointOf as cr, buildLayerMaskPlanes as cs, calculateCropDrag as ct, canvasToImagePoint as cu, clampCropToImage as cv, colorRange as cw, combineSelections as cx, componentPath as cy, computeHistogram as cz, type AdjustmentParamsMap as d, normalizeShapeStroke as d$, exportPsd as d0, featherCoverage as d1, flipCorners as d2, fullSelection as d3, geometryHomography as d4, getAnnotationBounds as d5, getCropCursor as d6, getRotatedSize as d7, getViewportMetrics as d8, getViewportProjection as d9, layerEffectsOf as dA, layerMaskCoverage as dB, layerMaskFromSelection as dC, layerMaskKey as dD, layerName as dE, layerTree as dF, layerTypeLabel as dG, liveComponent as dH, liveShapeSubpaths as dI, magicWand as dJ, mapCropHandle as dK, mapSubpaths as dL, matrixFromCorners as dM, matrixFromParams as dN, mergeShapeComponents as dO, migrateSerializedImageEditorState as dP, migrateToLayeredState as dQ, modifySelection as dR, moveLayer as dS, newLayerId as dT, normalizeAngle as dU, normalizeFilter as dV, normalizeLayerMask as dW, normalizeLiveShape as dX, normalizeRect as dY, normalizeRefineEdgeParams as dZ, normalizeShapePaint as d_, globalImageCache as da, greyMorphology as db, groupLayers as dc, guidePlanes as dd, guidedFilterColor as de, hasSurface as df, hasWarp as dg, hashMaskContent as dh, histogramPath as di, hitTestAnnotation as dj, hitTestCrop as dk, hueRange as dl, identityTransform as dm, imageToCanvasPoint as dn, importPsd as dp, invertSelection as dq, isActiveFilter as dr, isIdentityTransform as ds, isQuarterTurnSwapped as dt, isRenderedLayer as du, isSelectionEmpty as dv, isSelectionMode as dw, isSpatialFilter as dx, isTransformAnchor as dy, isValidWarp as dz, type AdjustmentLayerMask as e, smoothCoverage as e$, normalizeStoredAdjustments as e0, normalizeSubpaths as e1, offsetLayer as e2, offsetShape as e3, parseBlend as e4, parseColor as e5, parseSelectionMode as e6, pixelLayerBounds as e7, pixelLayers as e8, placeLayer as e9, resolveExternalAssets as eA, runLayerFilters as eB, selectionArea as eC, selectionFromCoverage as eD, selectionFromPixels as eE, selectionToCoverage as eF, selectionToPixels as eG, selectionValueAt as eH, serializeContents as eI, serializeEffects as eJ, serializeLayer as eK, serializeLayers as eL, serializeLayersExternal as eM, serializePatterns as eN, serializeSelection as eO, setLayerEffects as eP, setLayerEffectsEnabled as eQ, setLayerMask as eR, setLayerProperties as eS, shapeAsPixelLayer as eT, shapeFromAnnotation as eU, shapeGeometryBounds as eV, shapeLayers as eW, shapeOutline as eX, shapeRenderClip as eY, shiftCoverage as eZ, smartObjectLayers as e_, polygonCoverage as ea, polygonSelection as eb, presetWarp as ec, previewStep as ed, projectImagePoint as ee, projectImageRect as ef, projectMaskCoverage as eg, psdToLayers as eh, readPsd as ei, rectSelection as ej, referencePoint as ek, refineCoverage as el, refineEdgeHalo as em, refineSelection as en, removeLayer as eo, removeLayerEffect as ep, removeLayerFilter as eq, renderShape as er, renderShapeRect as es, requireLayer as et, requireOperation as eu, requireShapeLayer as ev, requireUnlocked as ew, rerenderShape as ex, resizePixels as ey, resizeSelection as ez, type AdjustmentLayerOf as f, srgb8ToLab as f0, toHex as f1, toneRange as f2, transformHomography as f3, transformMap as f4, transformShapeComponents as f5, transformedBox as f6, transformedPoint as f7, ungroupLayer as f8, unionRect as f9, unprojectCanvasPoint as fa, updateLayerEffect as fb, updateLayerFilter as fc, updateLayerMaskProps as fd, updateShapeLayer as fe, withNewIds as ff, writePsd as fg, ImageEditorController as g, type SelectionMask as h, type SelectionMode as i, type ColorDistance as j, type ImagePoint as k, type ImageLayer as l, type CropBox as m, type RasterMask as n, type Annotation as o, type AdjustmentLayerNode as p, type AnnotationLayer as q, type ShapeLayer as r, type LayerFilter as s, type PixelLayer as t, type DevelopFilter as u, type ImageTransform as v, type ImageHistogram as w, type ImageProjection as x, type CompositorSources as y, LayerCompositor as z };