@pixerate/editor 0.102.0 → 0.104.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 (59) hide show
  1. package/THIRD_PARTY_NOTICES.md +3 -0
  2. package/dist/agent/index.cjs +7 -7
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.js +7 -7
  5. package/dist/canvas/index.cjs +3 -3
  6. package/dist/canvas/index.cjs.map +1 -1
  7. package/dist/canvas/index.js +4 -4
  8. package/dist/chunk-6BU5WU4R.cjs +1 -0
  9. package/dist/chunk-6BU5WU4R.cjs.map +1 -0
  10. package/dist/{chunk-IB53LVGV.js → chunk-DS7KDKPX.js} +1 -1
  11. package/dist/chunk-NQLQ2JOI.js +7176 -0
  12. package/dist/chunk-NQLQ2JOI.js.map +1 -0
  13. package/dist/{chunk-ZZOTHJ4K.cjs → chunk-PV42JITT.cjs} +1 -1
  14. package/dist/{chunk-ZZOTHJ4K.cjs.map → chunk-PV42JITT.cjs.map} +1 -1
  15. package/dist/chunk-VSMM7B3P.cjs +7176 -0
  16. package/dist/chunk-VSMM7B3P.cjs.map +1 -0
  17. package/dist/chunk-XYBJKUAU.js +1 -0
  18. package/dist/chunk-XYBJKUAU.js.map +1 -0
  19. package/dist/compositor-B1ZrKR89.d.ts +835 -0
  20. package/dist/compositor-CTMU-B1t.d.cts +835 -0
  21. package/dist/export-BLpMyCYg.d.ts +3139 -0
  22. package/dist/export-X9rY79p0.d.cts +3139 -0
  23. package/dist/homography-CZ-tFjay.d.cts +50 -0
  24. package/dist/homography-Ctfjoc1b.d.ts +50 -0
  25. package/dist/image-editor/index.cjs +2846 -9407
  26. package/dist/image-editor/index.cjs.map +1 -1
  27. package/dist/image-editor/index.d.cts +24 -3151
  28. package/dist/image-editor/index.d.ts +24 -3151
  29. package/dist/image-editor/index.js +2508 -9069
  30. package/dist/image-editor/index.js.map +1 -1
  31. package/dist/mixer-DG_9Yu2W.d.ts +282 -0
  32. package/dist/mixer-DGcH6HLu.d.cts +282 -0
  33. package/dist/paint/index.cjs +4 -3
  34. package/dist/paint/index.cjs.map +1 -1
  35. package/dist/paint/index.d.cts +3 -281
  36. package/dist/paint/index.d.ts +3 -281
  37. package/dist/paint/index.js +2 -1
  38. package/dist/paint-editor/index.cjs +4417 -0
  39. package/dist/paint-editor/index.cjs.map +1 -0
  40. package/dist/paint-editor/index.d.cts +1539 -0
  41. package/dist/paint-editor/index.d.ts +1539 -0
  42. package/dist/paint-editor/index.js +4417 -0
  43. package/dist/paint-editor/index.js.map +1 -0
  44. package/dist/raster/index.d.cts +6 -835
  45. package/dist/raster/index.d.ts +6 -835
  46. package/dist/{surface-DIA-XatS.d.cts → surface-AfHCH7BR.d.cts} +1 -1
  47. package/dist/{surface-DIA-XatS.d.ts → surface-AfHCH7BR.d.ts} +1 -1
  48. package/dist/tools/index.cjs +3 -3
  49. package/dist/tools/index.cjs.map +1 -1
  50. package/dist/tools/index.js +3 -3
  51. package/dist/vector/index.d.cts +2 -1
  52. package/dist/vector/index.d.ts +2 -1
  53. package/dist/{warp-B8rAguzs.d.ts → warp-CWHZzE3x.d.ts} +2 -49
  54. package/dist/{warp-nYs2DPrx.d.cts → warp-D5jz_tN7.d.cts} +2 -49
  55. package/package.json +6 -1
  56. package/skills/README.md +1 -0
  57. package/skills/pixerate-image-editor/SKILL.md +14 -5
  58. package/skills/pixerate-paint-editor/SKILL.md +203 -0
  59. /package/dist/{chunk-IB53LVGV.js.map → chunk-DS7KDKPX.js.map} +0 -0
@@ -1,837 +1,8 @@
1
- import { B as BlendMode, R as RasterRect, T as TiledSurface, M as MaskSurface, P as PixelSurface, h as TileKey } from '../surface-DIA-XatS.js';
2
- export { a as BLEND_MODES, b as BlendModeInfo, c as Rgb, d as Rgba, S as SurfaceDraft, e as TILE, f as TILE_SHIFT, g as Tile, i as blendChannel, j as blendImageData, k as blendLum, l as blendPixel, m as blendRgb, n as canvasCompositeOperation, o as collectTiles, p as contentBounds, q as emptySurface, r as fillRect, s as finishTile, t as isBlendMode, u as isSeparableBlendMode, v as mixPigment8, w as mixPigmentRgb, x as normalizeBlendMode, y as packRgba, z as readPixel, A as readRegion, C as setLum, D as solidSurface, E as surfaceBytes, F as surfaceFromPixels, G as surfacesEqual, H as tileCoord, I as tileKey, J as tileRect, K as tilesInRect, L as translateSurface, N as uniformTile, O as writeRegion } from '../surface-DIA-XatS.js';
3
- import { H as Homography, V as Vec2 } from '../types-CwMPoRMU.js';
4
-
5
- /**
6
- * Layer effects (Photoshop's layer styles) as data: drop and inner shadows, outer and inner
7
- * glows, bevel & emboss, satin, colour / gradient / pattern overlays and strokes. Rendering lives
8
- * in `./render`, PSD mapping in the image editor's PSD module.
9
- *
10
- * Angles are in degrees, counter-clockwise from 3 o'clock, and give the direction the light
11
- * comes *from* (Photoshop's convention). Sizes and distances are in pixels, opacities and
12
- * percentages in 0..1, colours are `#rrggbb`.
13
- */
14
-
15
- /** One point of a contour curve (input → output, both 0..1). */
16
- interface ContourPoint {
17
- input: number;
18
- output: number;
19
- /** The curve bends sharply here instead of passing smoothly through (Photoshop's corner point). */
20
- corner?: boolean;
21
- }
22
- /** A transfer curve applied to an effect's coverage. Missing on an effect = linear. */
23
- interface EffectContour {
24
- name: string;
25
- points: ContourPoint[];
26
- }
27
- type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond';
28
- interface GradientColorStop {
29
- /** 0..1 along the gradient. */
30
- position: number;
31
- color: string;
32
- }
33
- interface GradientOpacityStop {
34
- position: number;
35
- /** 0..1 */
36
- opacity: number;
37
- }
38
- /** A gradient as overlays, gradient strokes and gradient glows paint it. */
39
- interface EffectGradient {
40
- stops: GradientColorStop[];
41
- /** Missing or empty: opaque. */
42
- opacityStops?: GradientOpacityStop[];
43
- style: GradientStyle;
44
- /** Degrees (90 = bottom to top). */
45
- angle: number;
46
- /** 1 = 100 %. */
47
- scale: number;
48
- reverse: boolean;
49
- /** Align with the layer's bounds (else the canvas). */
50
- align: boolean;
51
- /** Centre offset as a fraction of the bounds. */
52
- offset: {
53
- x: number;
54
- y: number;
55
- };
56
- }
57
- /** A pattern reference: the id of a document or built-in pattern (see `builtinPatternIds`). */
58
- interface EffectPatternRef {
59
- patternId: string;
60
- /** Display name (PSD keeps it beside the id). */
61
- name?: string;
62
- /** 1 = 100 %. */
63
- scale: number;
64
- /** Rotation in degrees (counter-clockwise). */
65
- angle?: number;
66
- /** Tile from the layer's top-left ("Link with Layer", default) instead of the canvas origin. */
67
- link?: boolean;
68
- /** Origin offset in pixels. */
69
- phase?: {
70
- x: number;
71
- y: number;
72
- };
73
- }
74
- /** What a stroke or glow paints with. */
75
- type EffectFill = {
76
- type: 'color';
77
- color: string;
78
- } | {
79
- type: 'gradient';
80
- gradient: EffectGradient;
81
- } | ({
82
- type: 'pattern';
83
- } & EffectPatternRef);
84
- interface EffectBase {
85
- /** Unique within the layer. */
86
- id: string;
87
- enabled: boolean;
88
- }
89
- interface Blended {
90
- blend: BlendMode;
91
- /** 0..1 */
92
- opacity: number;
93
- }
94
- interface DropShadowEffect extends EffectBase, Blended {
95
- kind: 'drop-shadow';
96
- color: string;
97
- angle: number;
98
- useGlobalLight: boolean;
99
- distance: number;
100
- /** 0..1 of the size grown solid before the blur. */
101
- spread: number;
102
- size: number;
103
- contour?: EffectContour;
104
- antiAlias: boolean;
105
- /** 0..1 */
106
- noise: number;
107
- /** The layer hides the shadow beneath its see-through fill ("Layer Knocks Out Drop Shadow"). */
108
- knocksOut: boolean;
109
- }
110
- interface InnerShadowEffect extends EffectBase, Blended {
111
- kind: 'inner-shadow';
112
- color: string;
113
- angle: number;
114
- useGlobalLight: boolean;
115
- distance: number;
116
- /** 0..1 of the size shrunk solid before the blur. */
117
- choke: number;
118
- size: number;
119
- contour?: EffectContour;
120
- antiAlias: boolean;
121
- noise: number;
122
- }
123
- type GlowTechnique = 'softer' | 'precise';
124
- interface OuterGlowEffect extends EffectBase, Blended {
125
- kind: 'outer-glow';
126
- /** Colour or gradient. */
127
- fill: Extract<EffectFill, {
128
- type: 'color' | 'gradient';
129
- }>;
130
- technique: GlowTechnique;
131
- spread: number;
132
- size: number;
133
- contour?: EffectContour;
134
- antiAlias: boolean;
135
- /** 0..1 (default 0.5): the part of the glow the contour spans. */
136
- range: number;
137
- /** 0..1, varies a gradient glow's colours. Stored only (not rendered). */
138
- jitter: number;
139
- noise: number;
140
- }
141
- interface InnerGlowEffect extends EffectBase, Blended {
142
- kind: 'inner-glow';
143
- fill: Extract<EffectFill, {
144
- type: 'color' | 'gradient';
145
- }>;
146
- technique: GlowTechnique;
147
- choke: number;
148
- size: number;
149
- contour?: EffectContour;
150
- antiAlias: boolean;
151
- range: number;
152
- jitter: number;
153
- noise: number;
154
- /** Glow from the edge inwards (default) or from the centre outwards. */
155
- source: 'edge' | 'center';
156
- }
157
- type BevelStyle = 'inner-bevel' | 'outer-bevel' | 'emboss' | 'pillow-emboss' | 'stroke-emboss';
158
- type BevelTechnique = 'smooth' | 'chisel-hard' | 'chisel-soft';
159
- /** The Contour element of Bevel & Emboss: shapes the bevel's height profile. */
160
- interface BevelContour {
161
- contour: EffectContour;
162
- /** 0..1 (default 0.5). Stored only. */
163
- range: number;
164
- antiAlias: boolean;
165
- }
166
- /** The Texture element of Bevel & Emboss: a pattern's luminance added to the height. */
167
- interface BevelTexture extends EffectPatternRef {
168
- /** -10..10 (1 = +100 %); negative carves the pattern in. */
169
- depth: number;
170
- invert: boolean;
171
- }
172
- interface BevelEmbossEffect extends EffectBase {
173
- kind: 'bevel-emboss';
174
- style: BevelStyle;
175
- technique: BevelTechnique;
176
- /** 0..10 (1 = 100 %). */
177
- depth: number;
178
- direction: 'up' | 'down';
179
- size: number;
180
- soften: number;
181
- angle: number;
182
- /** Light altitude in degrees (0..90). */
183
- altitude: number;
184
- useGlobalLight: boolean;
185
- glossContour?: EffectContour;
186
- highlightColor: string;
187
- highlightBlend: BlendMode;
188
- highlightOpacity: number;
189
- shadowColor: string;
190
- shadowBlend: BlendMode;
191
- shadowOpacity: number;
192
- /** Contour element (shapes the bevel's height profile), or missing when off. */
193
- contourElement?: BevelContour;
194
- /** Texture element, or missing when off. */
195
- texture?: BevelTexture;
196
- }
197
- interface SatinEffect extends EffectBase, Blended {
198
- kind: 'satin';
199
- color: string;
200
- angle: number;
201
- distance: number;
202
- size: number;
203
- contour?: EffectContour;
204
- antiAlias: boolean;
205
- invert: boolean;
206
- }
207
- interface ColorOverlayEffect extends EffectBase, Blended {
208
- kind: 'color-overlay';
209
- color: string;
210
- }
211
- interface GradientOverlayEffect extends EffectBase, Blended {
212
- kind: 'gradient-overlay';
213
- gradient: EffectGradient;
214
- dither: boolean;
215
- }
216
- interface PatternOverlayEffect extends EffectBase, Blended, EffectPatternRef {
217
- kind: 'pattern-overlay';
218
- }
219
- type StrokePosition = 'outside' | 'inside' | 'center';
220
- interface StrokeEffect extends EffectBase, Blended {
221
- kind: 'stroke';
222
- size: number;
223
- position: StrokePosition;
224
- fill: EffectFill;
225
- }
226
- /** One layer effect. Several of the same kind are allowed; the first listed of a kind is on top. */
227
- type LayerEffect = DropShadowEffect | InnerShadowEffect | OuterGlowEffect | InnerGlowEffect | BevelEmbossEffect | SatinEffect | ColorOverlayEffect | GradientOverlayEffect | PatternOverlayEffect | StrokeEffect;
228
- type LayerEffectKind = LayerEffect['kind'];
229
- /** A layer's effects: the master switch, Layer Style › Scale Effects and the effect list. */
230
- interface LayerEffects {
231
- /** The master switch ("effects on"); `false` keeps the effects but renders none. */
232
- enabled: boolean;
233
- /** Scale Effects: multiplies every size, distance and pattern scale (1 = 100 %; missing = 1). */
234
- scale?: number;
235
- items: LayerEffect[];
236
- /**
237
- * The PSD block the effects were read from (`lfx2`, `lfxs` or `lmfx`), kept so export writes it
238
- * back verbatim while the effects still map to the same values. Export regenerates it otherwise.
239
- */
240
- psd?: {
241
- key: string;
242
- data: Uint8Array;
243
- };
244
- }
245
- /** The document-wide light that effects with `useGlobalLight` use. */
246
- interface GlobalLight {
247
- /** Degrees. */
248
- angle: number;
249
- /** Degrees. */
250
- altitude: number;
251
- }
252
- declare const DEFAULT_GLOBAL_LIGHT: GlobalLight;
253
- /** Every effect kind, in the order the Layer Style dialog lists them. */
254
- declare const LAYER_EFFECT_KINDS: readonly LayerEffectKind[];
255
- declare function layerEffectLabel(kind: LayerEffectKind): string;
256
- declare function isLayerEffectKind(value: unknown): value is LayerEffectKind;
257
- /** Photoshop's default black-to-white linear gradient. */
258
- declare function defaultEffectGradient(): EffectGradient;
259
- /** A fresh effect id. */
260
- declare function newEffectId(): string;
261
- /** An effect of `kind` with Photoshop's default settings. */
262
- declare function defaultLayerEffect(kind: LayerEffectKind, id?: string): LayerEffect;
263
- /** True when the master switch is on and at least one effect is enabled. */
264
- declare function hasActiveEffects(effects: LayerEffects | undefined | null): effects is LayerEffects;
265
- /** Maximum distance (px) an effect is rendered from the layer's shape. */
266
- declare const MAX_EFFECT_REACH = 512;
267
- /** How far (px, before Scale Effects) one effect paints beyond or into the layer's shape. */
268
- declare function effectReach(e: LayerEffect): number;
269
- /**
270
- * Pixels an effect stack can reach beyond the layer's shape (its enabled effects, scaled), plus
271
- * a little slack. 0 when no effect is active. Dirty areas and tile signatures grow by this.
272
- */
273
- declare function effectsMargin(effects: LayerEffects | undefined | null): number;
274
- /** Scale Effects as a usable factor (missing or invalid = 1). */
275
- declare function effectsScale(effects: Pick<LayerEffects, 'scale'>): number;
276
- /** `effect` with its sizes, distances and pattern scales multiplied by `s` (Scale Effects). */
277
- declare function scaleLayerEffect<E extends LayerEffect>(e: E, s: number): E;
278
- /** `#rrggbb` (or `#rgb`, `rrggbb`) as 0..1 RGB, or `null`. */
279
- declare function parseEffectColor(value: unknown): [number, number, number] | null;
280
- /** 0..1 RGB as `#rrggbb`. */
281
- declare function effectColorHex(rgb: readonly number[]): string;
282
- declare class LayerEffectError extends Error {
283
- constructor(message: string);
284
- }
285
- declare function validateEffectGradient(v: unknown, path: string): void;
286
- /** Every field an effect of `kind` has (required and optional), including `id` and `kind`. */
287
- declare function layerEffectFields(kind: LayerEffectKind): string[];
288
- /**
289
- * Checks a complete effect (every field of its kind present and in range). Throws a
290
- * {@link LayerEffectError} naming the first wrong field and how to fix it.
291
- */
292
- declare function validateLayerEffect(v: unknown, path?: string): asserts v is LayerEffect;
293
- /**
294
- * Applies `changes` to `effect` and validates the result. `kind` and `id` cannot change. Nested
295
- * objects (`fill`, `gradient`, `contour`, `texture`, `phase`, `offset`) are replaced whole; `null`
296
- * removes an optional one (`contour`, `glossContour`, bevel `contour` / `texture`).
297
- */
298
- declare function mergeLayerEffect(effect: LayerEffect, changes: Record<string, unknown>): LayerEffect;
299
- /** A layer's effects with `items` validated; throws on the first bad effect. */
300
- declare function validateLayerEffects(v: unknown): asserts v is LayerEffects;
301
- /**
302
- * Reads effects from JSON leniently: invalid effects are dropped (so one bad entry does not lose
303
- * a document), and missing optional fields take their defaults. `null` when nothing usable.
304
- */
305
- declare function normalizeLayerEffects(raw: unknown): LayerEffects | undefined;
306
- /** Effects without ids or the PSD block, for comparing what two effect stacks render. */
307
- declare function effectsFingerprint(effects: LayerEffects | undefined | null): string;
308
-
309
- /**
310
- * Pattern paint for pattern overlays, pattern strokes and bevel textures: a tile repeated over
311
- * the plane from an origin (the layer's top-left when linked, else the canvas origin, plus the
312
- * phase), scaled and rotated about it. Samples are bilinear and wrap around, on premultiplied
313
- * colour, so whole-pixel placements at 100 % reproduce the tile exactly.
314
- *
315
- * Patterns come from the document (PSD pattern resources) or from the built-in set below, so a
316
- * pattern effect always has something to paint even in a document without patterns.
317
- */
318
- /** A pattern tile: straight-alpha RGBA. */
319
- interface EffectPattern {
320
- id: string;
321
- name: string;
322
- width: number;
323
- height: number;
324
- data: Uint8ClampedArray;
325
- }
326
- /** A pattern converted once for sampling (premultiplied 0..1). */
327
- declare class PatternTile {
328
- readonly w: number;
329
- readonly h: number;
330
- private readonly px;
331
- constructor(p: Pick<EffectPattern, 'width' | 'height' | 'data'>);
332
- /** Bilinear wrapping sample at tile coordinates (pixel centres at `i + 0.5`), straight alpha into `out`. */
333
- sample(u: number, v: number, out: Float32Array | number[]): void;
334
- }
335
- /** Where a pattern sits: maps a document point to tile coordinates. */
336
- declare class PatternPlacement {
337
- private readonly ox;
338
- private readonly oy;
339
- private readonly c;
340
- private readonly s;
341
- private readonly inv;
342
- /** `anchor`: the layer's top-left (used when `link`); `phase` in px; `scale` a fraction; `angle` degrees counter-clockwise. */
343
- constructor(anchor: {
344
- x: number;
345
- y: number;
346
- }, link: boolean, phase: {
347
- x: number;
348
- y: number;
349
- }, scale: number, angle: number);
350
- /** Tile coordinates of the document point `(x, y)` into `out[0..1]`. */
351
- map(x: number, y: number, out: number[]): void;
352
- }
353
- /** Ids of the built-in patterns (`checker`, `stripes`, `dots`, `grid`, `noise`). */
354
- declare function builtinPatternIds(): string[];
355
- /** A built-in pattern by id, or `null`. */
356
- declare function builtinPattern(id: string): EffectPattern | null;
357
- /**
358
- * Deterministic per-pixel value in 0..1 hashed from document coordinates, so effect noise is
359
- * stable across renders and tiles (photocraft's `hash_noise`).
360
- */
361
- declare function hashNoise(x: number, y: number): number;
362
-
363
- /**
364
- * Resampling tiled surfaces through geometric maps: Free Transform (scale, rotate, skew, distort,
365
- * perspective: one projective map) and Warp (any forward map, such as a Bézier mesh).
366
- *
367
- * - Inverse mapping per destination tile: each destination tile reads only the source window its
368
- * pixels map into, so memory stays bounded by one tile's footprint, and the result is a new
369
- * copy-on-write surface (an identity or a whole-pixel move returns the source, or shares its
370
- * tiles).
371
- * - Nearest, bilinear and Photoshop's Bicubic (the Keys cubic at a = −0.75). Colour is sampled
372
- * premultiplied by alpha, so partially transparent edges don't pick up the colour of the
373
- * transparent pixels around them; outside the source everything is transparent.
374
- * - Large reductions with Bicubic are pre-filtered: the source is box-averaged by whole factors
375
- * first and the cubic widened by the rest, so shrinking a layer doesn't alias. Bilinear and
376
- * nearest sample the source directly, as Photoshop's do.
377
- * - Masks (one channel) are warped as "value + inside": outside the source and outside the warped
378
- * area they read as the surface's default value, so a reveal-all mask stays white around a
379
- * transformed hole.
380
- * - A Distort dragged past the horizon draws only the side of the horizon most of the source maps
381
- * to (no mirrored copy wrapped round infinity).
382
- *
383
- * No DOM: runs in Node, tests and workers.
384
- */
385
-
386
- /** Resampling of a transform (Photoshop's interpolation menu). */
387
- type Interpolation = 'nearest' | 'bilinear' | 'bicubic';
388
- declare const INTERPOLATIONS: readonly Interpolation[];
389
- declare function isInterpolation(value: unknown): value is Interpolation;
390
- /**
391
- * The largest result (pixels) one resample may build: about 11 600 × 11 600. Only the size of the
392
- * result counts, not where it lands. A scale past it is refused rather than clipped.
393
- */
394
- declare const MAX_TRANSFORM_PIXELS: number;
395
- /** A transform whose result would be too large; the message gives the size and the limit. */
396
- declare class TransformTooLargeError extends Error {
397
- constructor(message: string);
398
- }
399
- interface ResampleOptions {
400
- /** Default `bicubic`. */
401
- interpolation?: Interpolation;
402
- /** The source region to transform (default: the surface's content bounds). Pixels outside it are not moved. */
403
- source?: RasterRect;
404
- /** Keep only destination pixels inside this rectangle (a preview of the visible area). */
405
- clip?: RasterRect;
406
- /**
407
- * Preview speed-up: sample once per `step × step` block of destination pixels and fill the
408
- * block (a power of two, 1..64; default 1, every pixel).
409
- */
410
- step?: number;
411
- }
412
- /**
413
- * Photoshop's Bicubic: the Keys cubic at a = −0.75 (Catmull-Rom is −0.5). Measured on Photoshop
414
- * 27.11's Free Transform by photocraft: a 200 % step edge matches within 0.5 levels.
415
- */
416
- declare function keysWeight(x: number): number;
417
- /**
418
- * The surface box-averaged by `factor` (a whole number ≥ 1) in both directions: reduced pixel
419
- * (i, j) covers pixels [i·factor, (i+1)·factor) of each axis. For previews: transform the reduced
420
- * surface through the map composed with a scale by `factor`, so a preview at a low zoom reads a
421
- * fraction of the pixels.
422
- */
423
- declare function reduceSurface(src: TiledSurface, factor: number): TiledSurface;
424
- /** The destination rectangle `transformSurface` fills for `source` under `h`, or `null` when it is empty or unbounded. */
425
- declare function transformedBounds(source: RasterRect, h: Homography): RasterRect | null;
426
- /**
427
- * The surface's content inside `options.source` (default: all of it) warped by `h` (source →
428
- * destination, both in the surface's pixel space). Pixels outside the warped area are the default
429
- * (transparent for layers). Throws `TransformTooLargeError` past `MAX_TRANSFORM_PIXELS`.
430
- */
431
- declare function transformSurface(src: TiledSurface, h: Homography, options?: ResampleOptions): TiledSurface;
432
- /**
433
- * The surface's content inside `options.source` (default: all of it) warped through the forward
434
- * map `f` (source → destination pixel space; `null` where it is undefined).
435
- *
436
- * The source rectangle is subdivided into a fine grid whose vertices are mapped forward; each
437
- * cell's two triangles are rasterized in destination space with the source position interpolated
438
- * barycentrically, then the source is sampled there. Cells are a few source pixels across, so the
439
- * piecewise-affine inverse is within a small fraction of a pixel of the true one; affine maps (the
440
- * identity included) are reproduced exactly. Where the warp shrinks the source, each pixel instead
441
- * averages a grid of bilinear subsamples over its source footprint, so thin lines don't alias.
442
- * Where the warp folds over itself the later (lower-right) cell wins.
443
- */
444
- declare function warpSurface(src: TiledSurface, f: (p: Vec2) => Vec2 | null, options?: ResampleOptions): TiledSurface;
445
- /**
446
- * `top` (RGBA, straight alpha) composited over `base` with the Normal blend. A one-channel `base`
447
- * (a mask) takes `top`'s red channel as the value, weighted by its alpha: that is how a moved part
448
- * of a mask travels (value and coverage) and lands. Only tiles `top` stores are touched, so every
449
- * other tile of `base` stays shared.
450
- */
451
- declare function compositeSurfaceOver(base: TiledSurface, top: TiledSurface): TiledSurface;
452
-
453
- /**
454
- * A layer stack that is not specific to any editor: pixel layers on tiled surfaces, groups (with
455
- * pass-through), raster masks with density and feather, clipping, locks, opacity, fill and blend
456
- * modes, plus pure tree helpers. Editors extend these types with their own layer kinds (the image
457
- * editor adds adjustment and annotation layers, filters and parametric masks).
458
- *
459
- * Layer objects are immutable: every change builds new objects along the path from the root to
460
- * the changed layer and shares everything else.
461
- */
462
-
463
- /** Blend modes of a layer; groups also accept `pass-through`. */
464
- type GroupBlendMode = BlendMode | 'pass-through';
465
- interface LayerLocks {
466
- /** Painting and filling are refused. */
467
- pixels?: boolean;
468
- /** Painting keeps each pixel's alpha. */
469
- transparency?: boolean;
470
- /** Moving (offset) is refused. */
471
- position?: boolean;
472
- /** Everything above, plus property changes and deletion. */
473
- all?: boolean;
474
- }
475
- /**
476
- * A layer mask: 8-bit coverage (255 reveals, 0 hides) on a tiled surface, plus non-destructive
477
- * density and feather. `source` is an editor-defined parametric mask (generated instead of
478
- * painted; the compositor asks its profile for the coverage, and the surface is unused).
479
- */
480
- interface RasterMask<Source = unknown> {
481
- surface: MaskSurface;
482
- /** Value outside the painted tiles (PSD's default colour); equals `surface.defaultValue`. */
483
- defaultValue: 0 | 255;
484
- /** 0..1 (missing = 1): at 0.5 hidden areas still show half. */
485
- density?: number;
486
- /** Gaussian σ in pixels (missing = 0). */
487
- feather?: number;
488
- /** `false` keeps the mask but ignores it. */
489
- enabled?: boolean;
490
- /**
491
- * `false` unlinks the mask from its layer (Photoshop's chain icon): moving or transforming the
492
- * layer's pixels leaves the mask where it is. Missing = linked.
493
- */
494
- linked?: boolean;
495
- source?: Source;
496
- }
497
- interface RasterLayerBase {
498
- id: string;
499
- name: string;
500
- visible: boolean;
501
- /** 0..1 */
502
- opacity: number;
503
- blend: BlendMode;
504
- /** Clip to the nearest unclipped layer below (Photoshop's clipping mask). */
505
- clipped?: boolean;
506
- mask?: RasterMask;
507
- locks?: LayerLocks;
508
- /** Live layer effects (drop shadow, stroke, …), rendered between the content and its blend. */
509
- effects?: LayerEffects;
510
- }
511
- interface RasterPixelLayer extends RasterLayerBase {
512
- type: 'pixel';
513
- /** Pixels in layer space; document position = layer position + `offset`. A linked mask moves with it. */
514
- surface: PixelSurface;
515
- /** Integer move without re-tiling. */
516
- offset: {
517
- x: number;
518
- y: number;
519
- };
520
- /** 0..1, PSD "Fill" (missing = 1). */
521
- fillOpacity?: number;
522
- }
523
- interface RasterGroupLayer<L = RasterLayer> extends Omit<RasterLayerBase, 'blend'> {
524
- type: 'group';
525
- blend: GroupBlendMode;
526
- /** Bottom to top. */
527
- children: L[];
528
- /** UI only. */
529
- collapsed?: boolean;
530
- }
531
- /** The plain stack: pixel layers and groups. */
532
- type RasterLayer = RasterPixelLayer | RasterGroupLayer<RasterLayer>;
533
- /** What the tree helpers need of a layer: an id, a type, and `children` on groups. */
534
- interface RasterNode {
535
- id: string;
536
- type: string;
537
- }
538
- /** The group members of a layer union. */
539
- type GroupIn<T> = Extract<T, {
540
- type: 'group';
541
- }>;
542
- interface LayerLocation<T extends RasterNode = RasterLayer> {
543
- layer: T;
544
- /** The containing group, or `null` at the top level. */
545
- parent: GroupIn<T> | null;
546
- /** Index within the parent's children (or the top-level list). */
547
- index: number;
548
- /** Ancestors from the top level down to the parent. */
549
- path: GroupIn<T>[];
550
- }
551
- /** Every layer, depth first, bottom to top (a group comes before its children). */
552
- declare function flattenLayers<T extends RasterNode>(layers: readonly T[]): T[];
553
- declare function findLayer<T extends RasterNode>(layers: readonly T[], id: string): LayerLocation<T> | null;
554
- /** Replaces the layer with `id` by `fn(layer)` (or removes it when `fn` returns `null`). */
555
- declare function mapLayer<T extends RasterNode>(layers: readonly T[], id: string, fn: (layer: T) => T | null): T[];
556
- /** Inserts `layer` into `parentId`'s children (or the top level) at `index` (default: top). */
557
- declare function insertLayer<T extends RasterNode>(layers: readonly T[], layer: T, parentId: string | null, index?: number): T[];
558
- declare function isLayerLocked(layer: {
559
- locks?: LayerLocks;
560
- }, what: keyof LayerLocks): boolean;
561
-
562
- /**
563
- * The per-tile layer compositor engine. Composites a layer stack (pixel layers and groups with
564
- * masks, clipping, blend modes, opacity, fill and pass-through) tile by tile in document space,
565
- * in pure TypeScript, so results are deterministic and testable in Node and Workers.
566
- *
567
- * Editors add their own layer kinds through a {@link CompositorProfile}: layers that filter
568
- * what is below them (adjustment layers), content layers drawn by the editor (annotations),
569
- * per-layer pixel filters, and parametric mask sources.
570
- *
571
- * Caches:
572
- * - Each top-level *step* (a content layer and the layers clipped to it, a run of filter layers,
573
- * a group) has a per-tile *signature*: its properties plus the identity of every surface tile
574
- * it reads. A tile whose signatures are unchanged returns the cached result (same buffer
575
- * object, so callers can skip uploading it).
576
- * - A prefix cache keeps the accumulator *before* the step that changed last time (and, when the
577
- * caller names it, before the active layer). Dragging a slider on layer k, or a stroke on layer
578
- * k, recomposites from step k upwards only; `dirty` rectangles limit that to where it changed.
579
- * - Spatial filters and feathered or parametric masks are computed once over the canvas and
580
- * cached by the identity of their inputs.
581
- * - Layer effects: a layer's effect maps (shadow, glow, bevel, stroke distance fields) are built
582
- * once over the layer's region (its bounds grown by the effects' margin, within the canvas grown
583
- * the same) and cached by the identity of every surface tile the shape reads; tiles crop them.
584
- * When only some of those tiles changed and every effect is local, the maps are rebuilt only
585
- * within the margin of the change (narrowed by `dirty` when it covers the change) and patched in.
586
- * A tile's signature then reads the layer within the margin around it (or the whole region when
587
- * an effect is laid out over the layer's bounds), and `dirty` rectangles grow by the margin.
588
- */
589
-
590
- /** What the compositor needs from its host besides the layers. */
591
- interface RasterSources {
592
- /** Canvas (document) size: spatial filters and mask feathering clamp at this rect. */
593
- width: number;
594
- height: number;
595
- /** The pixels of a pixel layer (lets a host resolve layers whose pixels live elsewhere). */
596
- surfaceOf?(layer: CompositorLayer): PixelSurface;
597
- /** Changes whenever one of the host's callbacks would return something new for the same layers. */
598
- version?: number | string;
599
- /** The document's global light for effects that use it (default angle 120°, altitude 30°). */
600
- globalLight?: GlobalLight;
601
- /** A document pattern by id for pattern effects (built-in patterns are found without it). */
602
- pattern?(id: string): EffectPattern | null;
603
- }
604
- /** The fields the engine reads; editor layer types are wider. */
605
- interface CompositorLayer extends RasterNode {
606
- visible: boolean;
607
- opacity: number;
608
- blend: string;
609
- clipped?: boolean;
610
- mask?: RasterMask;
611
- /** Pixel layers. */
612
- surface?: PixelSurface;
613
- offset?: {
614
- x: number;
615
- y: number;
616
- };
617
- fillOpacity?: number;
618
- /** Layer effects. */
619
- effects?: LayerEffects;
620
- /** Groups. */
621
- children?: readonly CompositorLayer[];
622
- }
623
- /** A pixel layer's filters as the engine runs them. */
624
- interface PixelFilterSpec {
625
- /** Identifies the settings (part of the cache key). */
626
- key: string;
627
- /** Needs neighbouring pixels: runs once over the canvas instead of per tile. */
628
- spatial: boolean;
629
- /** Filters RGBA `data` (`width × height`) in place. */
630
- apply(data: Uint8ClampedArray, width: number, height: number): void;
631
- }
632
- /** How an editor's own layer kinds composite. Every hook is optional. */
633
- interface CompositorProfile<L extends CompositorLayer, S extends RasterSources> {
634
- /** Layers that change what is below them; adjacent ones run as one step. */
635
- isFilterLayer?(layer: L): boolean;
636
- /** Applies a run of visible filter layers to `acc` (RGBA over `r`); `coverage` holds masked ones by id. */
637
- applyFilterRun?(layers: L[], acc: Uint8ClampedArray, r: RasterRect, coverage: Map<string, Float32Array> | undefined, sources: S): void;
638
- /** RGBA of a content layer that is neither a pixel layer nor a group, over `r`, or `null`. */
639
- contentTile?(layer: L, r: RasterRect, sources: S): Uint8ClampedArray | null;
640
- /** The blend mode a content layer draws with (default `layer.blend`). */
641
- contentBlend?(layer: L): BlendMode;
642
- /** Properties of a layer beyond the generic ones that change its pixels (part of its signature). */
643
- layerKey?(layer: L): unknown;
644
- /** Active filters of a pixel layer, or `null`. */
645
- pixelFilters?(layer: L): PixelFilterSpec | null;
646
- /** Canvas coverage (0..1, `width × height`) of a parametric mask source, or `null` to reveal all. */
647
- maskSourcePlane?(source: unknown, width: number, height: number, sources: S): Float32Array | null;
648
- /**
649
- * Layer kinds besides `pixel` that composite exactly like pixel layers, from their `surface`,
650
- * `offset` and `fillOpacity` (a smart object's rendered pixels). Their tile signatures, effect
651
- * regions and `dirty` handling are a pixel layer's.
652
- */
653
- isPixelLike?(layer: L): boolean;
654
- }
655
- interface CompositorOptions {
656
- /** Upper bound for cached tile buffers (default 256 MiB). */
657
- maxCacheBytes?: number;
658
- }
659
- interface CompositeCallOptions {
660
- /**
661
- * The layer about to be edited (the active layer): every tile composited in this call keeps a
662
- * checkpoint below its step, so strokes and slider drags on it start there.
663
- */
664
- checkpointLayerId?: string | null;
665
- /**
666
- * Where the layers changed since the previous call, when the caller knows (a stroke's dabs).
667
- * Changed tiles are then recomposited only inside these rectangles (grown by the effects' reach),
668
- * tiles they miss keep their pixels, and effect maps are rebuilt only around them. Changes outside
669
- * them would be missed, so pass nothing when unsure.
670
- */
671
- dirty?: RasterRect[];
672
- }
673
- /**
674
- * Blends straight-alpha `src` over `dst` (both RGBA) in place with `mode`, scaling the source
675
- * alpha by `alpha` and, per pixel, by `coverage`. Same maths as `blendPixel` (including the
676
- * `pigment` paint mix, which caches each 8-bit colour's spectrum).
677
- */
678
- declare function blendTile(dst: Uint8ClampedArray, src: ArrayLike<number>, mode: BlendMode, alpha: number, coverage: ArrayLike<number> | null): void;
679
- /** Statistics of the last `composite` call (for benchmarks and tests). */
680
- interface CompositeStats {
681
- tiles: number;
682
- /** Tiles returned straight from the cache. */
683
- cached: number;
684
- /** Steps actually run, summed over tiles. */
685
- stepsRun: number;
686
- /** Layers whose effect maps were built over their whole region. */
687
- effectsBuilt: number;
688
- /** Layers whose effect maps were rebuilt only around a change and patched in. */
689
- effectsPatched: number;
690
- }
691
- declare class RasterCompositor<L extends CompositorLayer = CompositorLayer, S extends RasterSources = RasterSources> {
692
- private readonly profile;
693
- private readonly tiles;
694
- private readonly maxCacheBytes;
695
- private cacheBytes;
696
- private stamp;
697
- private sources;
698
- private sourcesVersion;
699
- private filteredCache;
700
- private planeCache;
701
- private planeIds;
702
- private nextPlaneId;
703
- private contentCache;
704
- private readonly stepsCache;
705
- private readonly propsKeyCache;
706
- /** Effect maps by layer id (see the module comment), least recently used first. */
707
- private effectCache;
708
- /** Effect maps already validated in this call, by layer object. */
709
- private effectMemo;
710
- private readonly patternTiles;
711
- private readonly reachCache;
712
- private fxContext;
713
- lastStats: CompositeStats;
714
- private hint;
715
- /** The `dirty` rectangles of the current call, as passed. */
716
- private callDirty;
717
- private callStats;
718
- constructor(profile?: CompositorProfile<L, S>, options?: CompositorOptions);
719
- /** Drops every cached tile and plane. */
720
- clear(): void;
721
- private setSources;
722
- /** The composite of `layers` over `rect` as `rect.width × rect.height` RGBA (straight alpha). */
723
- composite(layers: readonly L[], rect: RasterRect, sources: S, options?: CompositeCallOptions): Uint8ClampedArray;
724
- /**
725
- * Composites every tile intersecting `rect` and calls `onTile` with each tile's RGBA buffer
726
- * (TILE × TILE). A tile whose inputs did not change since the last call returns the same buffer
727
- * object; never mutate it.
728
- */
729
- compositeTiles(layers: readonly L[], rect: RasterRect, sources: S, onTile: (tx: number, ty: number, data: Uint8ClampedArray, changed: boolean) => void, options?: CompositeCallOptions): void;
730
- /** The composite of one tile (cached; do not mutate the result). */
731
- tile(layers: readonly L[], tx: number, ty: number, sources: S): Uint8ClampedArray;
732
- /**
733
- * A layer's effective mask coverage (0..1, after density, feather or parametric evaluation)
734
- * over `r` in document space, or `null` when it reveals all of `r`.
735
- */
736
- maskCoverage(layer: L, r: RasterRect, sources: S): Float32Array | null;
737
- /** Pixel layers, and the layer kinds the profile composites like them. */
738
- private isPixel;
739
- private isFilter;
740
- /**
741
- * Groups a layer list into compositing steps: clipped layers join the nearest unclipped
742
- * content or group layer below; consecutive unclipped filter layers form one run.
743
- */
744
- private buildSteps;
745
- /** The index of the top-level step that holds layer `id` (searching groups and clipped layers), or -1. */
746
- private stepIndexOf;
747
- /** Properties of a layer that change pixels, minus its surfaces (memoised per object). */
748
- private propsKey;
749
- private compositeTile;
750
- /**
751
- * Whether a tile with no part in this call's (grown) `dirty` rectangles changed only in what local
752
- * effects read beyond it: every changed step is a pixel layer with local effects whose changes stay
753
- * inside `dirty` (and so are farther than its margin), which leaves the tile's pixels as they were.
754
- */
755
- private changedOnlyNearby;
756
- private entryBytes;
757
- private evict;
758
- private stepSig;
759
- private layerSig;
760
- private groupSig;
761
- private plainGroupSig;
762
- private contentSig;
763
- private plainContentSig;
764
- private hasEffects;
765
- /** The largest effects margin of any visible layer in the stack (memoised per root). */
766
- private effectsReach;
767
- private effectContext;
768
- /**
769
- * Where a layer's effect maps are built: its bounds (pixel layers; the canvas otherwise) grown by
770
- * the effects' margin, within the canvas grown the same.
771
- */
772
- private effectRegion;
773
- /** The signature of a layer's shape (its surface tiles and mask refs) per tile of `region`. */
774
- private shapeSigs;
775
- /** The surface tiles (and mask refs) a layer's shape reads over `region`. */
776
- private shapeRefs;
777
- private lightKey;
778
- /**
779
- * The signature of a layer with effects for tile (tx, ty): its properties and the tiles its shape
780
- * reads within the effects' margin around the tile, or over its whole region when an effect is
781
- * laid out over the layer's bounds.
782
- */
783
- private effectSig;
784
- /** A layer's effect maps over its region (cached; see the module comment). */
785
- private effectMapsOf;
786
- /**
787
- * Where a layer's shape may differ from the one `prev` was built from: the tiles whose signature
788
- * changed (a tile new to the region that reads nothing did not), narrowed to this call's `dirty`
789
- * rectangles when `prev` is from the previous call and they cover every change of the shape.
790
- */
791
- private shapeChanges;
792
- /**
793
- * Whether a change to a layer stays inside the `dirty` rectangles that name it: a pixel layer
794
- * without filters or a feathered or parametric mask (those spread a change beyond it).
795
- */
796
- private dirtyCoversShape;
797
- /** A layer's alpha over `r` after its mask (0..1, quantised to bytes as tiles see it). */
798
- private layerShape;
799
- /** A content or group layer's own pixels over `r` with its mask applied to alpha, or `null` when empty. */
800
- private ownPixels;
801
- /**
802
- * The part of `r` a layer with effects can change: its shape's bounds grown by the effects'
803
- * margin. Beyond it the layer and every effect are transparent, so the backdrop stays as it is.
804
- */
805
- private effectArea;
806
- /**
807
- * Composites `layer`'s pixels (with `clipped` applied) and its effects onto `acc` (RGBA over `r`),
808
- * only where they can reach. `keepAlpha`: clipped layers keep the base's alpha.
809
- */
810
- private compositeEffects;
811
- /** Composites a layer with active effects onto `acc` over `r`; returns whether `acc` is still empty. */
812
- private runEffectStep;
813
- private maskRefs;
814
- /**
815
- * A pixel layer's pixels after spatial filters: the surface and the offset to apply. Layers
816
- * with a spatial filter are filtered once over the canvas (in document space, offset 0).
817
- */
818
- private layerPixels;
819
- /** RGBA of a content layer over `r` (document space, inside one tile), or `null` when it has nothing there. */
820
- private contentTile;
821
- private planeKey;
822
- /** Canvas-sized coverage of a feathered or parametric mask (cached). */
823
- private planeFor;
824
- private maskTile;
825
- /** Runs one step onto `acc`; returns whether `acc` is still empty. */
826
- private runStep;
827
- private runSteps;
828
- private contentBlend;
829
- private blendOnto;
830
- private applyClipped;
831
- private applyFilterRun;
832
- }
833
- /** Tiles that differ between two surfaces (by tile identity), as tile keys. */
834
- declare function changedTiles(a: TiledSurface, b: TiledSurface): TileKey[];
1
+ import { B as BlendMode } from '../surface-AfHCH7BR.js';
2
+ export { c as BLEND_MODES, d as BlendModeInfo, M as MaskSurface, P as PixelSurface, R as RasterRect, e as Rgb, f as Rgba, S as SurfaceDraft, g as TILE, h as TILE_SHIFT, b as Tile, T as TileKey, a as TiledSurface, i as blendChannel, j as blendImageData, k as blendLum, l as blendPixel, m as blendRgb, n as canvasCompositeOperation, o as collectTiles, p as contentBounds, q as emptySurface, r as fillRect, s as finishTile, t as isBlendMode, u as isSeparableBlendMode, v as mixPigment8, w as mixPigmentRgb, x as normalizeBlendMode, y as packRgba, z as readPixel, A as readRegion, C as setLum, D as solidSurface, E as surfaceBytes, F as surfaceFromPixels, G as surfacesEqual, H as tileCoord, I as tileKey, J as tileRect, K as tilesInRect, L as translateSurface, N as uniformTile, O as writeRegion } from '../surface-AfHCH7BR.js';
3
+ import { j as LayerEffects, g as GlobalLight, W as PatternTile, i as LayerEffect, v as EffectContour, J as GradientStyle } from '../compositor-B1ZrKR89.js';
4
+ export { B as BevelContour, m as BevelEmbossEffect, n as BevelStyle, o as BevelTechnique, p as BevelTexture, q as ColorOverlayEffect, r as CompositeCallOptions, s as CompositeStats, C as CompositorLayer, k as CompositorOptions, aA as CompositorProfile, t as ContourPoint, D as DEFAULT_GLOBAL_LIGHT, u as DropShadowEffect, w as EffectFill, x as EffectGradient, E as EffectPattern, y as EffectPatternRef, z as GlowTechnique, A as GradientColorStop, F as GradientOpacityStop, H as GradientOverlayEffect, G as GroupBlendMode, aB as GroupIn, K as INTERPOLATIONS, M as InnerGlowEffect, N as InnerShadowEffect, I as Interpolation, O as LAYER_EFFECT_KINDS, P as LayerEffectError, l as LayerEffectKind, h as LayerLocation, L as LayerLocks, Q as MAX_EFFECT_REACH, S as MAX_TRANSFORM_PIXELS, T as OuterGlowEffect, U as PatternOverlayEffect, V as PatternPlacement, aC as PixelFilterSpec, c as RasterCompositor, a as RasterGroupLayer, R as RasterLayer, e as RasterLayerBase, f as RasterMask, aD as RasterNode, b as RasterPixelLayer, d as RasterSources, X as ResampleOptions, Y as SatinEffect, Z as StrokeEffect, _ as StrokePosition, $ as TransformTooLargeError, a0 as blendTile, a1 as builtinPattern, a2 as builtinPatternIds, a3 as changedTiles, a4 as compositeSurfaceOver, a5 as defaultEffectGradient, a6 as defaultLayerEffect, a7 as effectColorHex, a8 as effectReach, a9 as effectsFingerprint, aa as effectsMargin, ab as effectsScale, ac as findLayer, ad as flattenLayers, ae as hasActiveEffects, af as hashNoise, ag as insertLayer, ah as isInterpolation, ai as isLayerEffectKind, aj as isLayerLocked, ak as keysWeight, al as layerEffectFields, am as layerEffectLabel, an as mapLayer, ao as mergeLayerEffect, ap as newEffectId, aq as normalizeLayerEffects, ar as parseEffectColor, as as reduceSurface, at as scaleLayerEffect, au as transformSurface, av as transformedBounds, aw as validateEffectGradient, ax as validateLayerEffect, ay as validateLayerEffects, az as warpSurface } from '../compositor-B1ZrKR89.js';
5
+ import '../types-CwMPoRMU.js';
835
6
 
836
7
  /** Above this σ a Gaussian is approximated by three box passes (cost independent of σ). */
837
8
  declare const DIRECT_GAUSSIAN_MAX_SIGMA = 8;
@@ -1051,4 +222,4 @@ declare function deflateRaw(data: Uint8Array, level?: 0 | 1): Uint8Array;
1051
222
  /** zlib stream: header, raw deflate, Adler-32. */
1052
223
  declare function deflate(data: Uint8Array, level?: 0 | 1): Uint8Array;
1053
224
 
1054
- export { type BevelContour, type BevelEmbossEffect, type BevelStyle, type BevelTechnique, type BevelTexture, BlendMode, type BlurEdge, CURVE_LUT_SIZE, type ColorOverlayEffect, type CompositeCallOptions, type CompositeStats, type CompositorLayer, type CompositorOptions, type CompositorProfile, type ContourPoint, DEFAULT_GLOBAL_LIGHT, DIRECT_GAUSSIAN_MAX_SIGMA, type DecodedPng, type DropShadowEffect, type EffectCompositeInput, type EffectContext, type EffectContour, type EffectFill, type EffectGradient, type EffectMaps, type EffectPattern, type EffectPatternRef, type EffectRect, type GlobalLight, type GlowTechnique, type GradientColorStop, type GradientOpacityStop, type GradientOverlayEffect, type GradientStyle, type GroupBlendMode, type GroupIn, INTERPOLATIONS, type InnerGlowEffect, type InnerShadowEffect, type Interpolation, LAYER_EFFECT_KINDS, type LayerEffect, LayerEffectError, type LayerEffectKind, type LayerEffects, type LayerLocation, type LayerLocks, MAX_EFFECT_REACH, MAX_TRANSFORM_PIXELS, MaskSurface, type OuterGlowEffect, type PatternOverlayEffect, PatternPlacement, PatternTile, type PixelFilterSpec, PixelSurface, RasterCompositor, type RasterGroupLayer, type RasterLayer, type RasterLayerBase, type RasterMask, type RasterNode, type RasterPixelLayer, RasterRect, type RasterSources, type ResampleOptions, STROKE_CHAMFER_MAX, type SatinEffect, type StrokeEffect, type StrokePosition, TileKey, TiledSurface, TransformTooLargeError, ZlibError, activeEffectItems, adler32, base64ToBytes, blendTile, buildEffectMaps, builtinPattern, builtinPatternIds, bytesToBase64, changedTiles, compositeLayerEffects, compositeSurfaceOver, contourLut, curveLut, decodePng, defaultEffectGradient, defaultLayerEffect, deflate, deflateRaw, effectColorHex, effectReach, effectsAreLocal, effectsFingerprint, effectsMargin, effectsScale, encodePng, findLayer, flattenLayers, gaussianBlur, gradientT, hasActiveEffects, hashNoise, inflate, inflateRaw, insertLayer, isInterpolation, isLayerEffectKind, isLayerLocked, isPng, keysWeight, layerEffectFields, layerEffectLabel, mapLayer, mergeLayerEffect, newEffectId, normalizeLayerEffects, parseDataUrl, parseEffectColor, patchEffectMaps, pngDataUrl, reduceSurface, renderLayerEffects, scaleLayerEffect, transformSurface, transformedBounds, validateEffectGradient, validateLayerEffect, validateLayerEffects, warpSurface };
225
+ export { BlendMode, type BlurEdge, CURVE_LUT_SIZE, DIRECT_GAUSSIAN_MAX_SIGMA, type DecodedPng, type EffectCompositeInput, type EffectContext, EffectContour, type EffectMaps, type EffectRect, GlobalLight, GradientStyle, LayerEffect, LayerEffects, PatternTile, STROKE_CHAMFER_MAX, ZlibError, activeEffectItems, adler32, base64ToBytes, buildEffectMaps, bytesToBase64, compositeLayerEffects, contourLut, curveLut, decodePng, deflate, deflateRaw, effectsAreLocal, encodePng, gaussianBlur, gradientT, inflate, inflateRaw, isPng, parseDataUrl, patchEffectMaps, pngDataUrl, renderLayerEffects };