@pixerate/editor 0.112.0 → 0.114.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 (129) hide show
  1. package/THIRD_PARTY_NOTICES.md +11 -0
  2. package/dist/animation-editor/index.cjs +60 -54
  3. package/dist/animation-editor/index.cjs.map +1 -1
  4. package/dist/animation-editor/index.d.cts +3 -3
  5. package/dist/animation-editor/index.d.ts +3 -3
  6. package/dist/animation-editor/index.js +14 -8
  7. package/dist/animation-editor/index.js.map +1 -1
  8. package/dist/builtin-CY97ppKM.d.cts +354 -0
  9. package/dist/builtin-CY97ppKM.d.ts +354 -0
  10. package/dist/canvas/index.cjs +3 -3
  11. package/dist/canvas/index.cjs.map +1 -1
  12. package/dist/canvas/index.js +9 -9
  13. package/dist/chunk-26PGXHY7.cjs +753 -0
  14. package/dist/chunk-26PGXHY7.cjs.map +1 -0
  15. package/dist/chunk-2OJACTPR.cjs +929 -0
  16. package/dist/chunk-2OJACTPR.cjs.map +1 -0
  17. package/dist/chunk-3UFGNHSP.js +929 -0
  18. package/dist/chunk-3UFGNHSP.js.map +1 -0
  19. package/dist/{chunk-YGIMK4NX.cjs → chunk-5OVJHMZQ.cjs} +757 -825
  20. package/dist/chunk-5OVJHMZQ.cjs.map +1 -0
  21. package/dist/chunk-643B2HKC.cjs +534 -0
  22. package/dist/chunk-643B2HKC.cjs.map +1 -0
  23. package/dist/chunk-6FCKOS2B.js +534 -0
  24. package/dist/chunk-6FCKOS2B.js.map +1 -0
  25. package/dist/chunk-BRLYOPLT.js +2574 -0
  26. package/dist/chunk-BRLYOPLT.js.map +1 -0
  27. package/dist/{chunk-LQEEDHOP.js → chunk-C6C5PDKU.js} +759 -761
  28. package/dist/chunk-C6C5PDKU.js.map +1 -0
  29. package/dist/chunk-DFQEX3AM.cjs +781 -0
  30. package/dist/chunk-DFQEX3AM.cjs.map +1 -0
  31. package/dist/{chunk-CZOXTEMN.js → chunk-EUVSQ25B.js} +336 -404
  32. package/dist/chunk-EUVSQ25B.js.map +1 -0
  33. package/dist/chunk-G5NMLUVF.cjs +2574 -0
  34. package/dist/chunk-G5NMLUVF.cjs.map +1 -0
  35. package/dist/chunk-LKCYANMW.js +781 -0
  36. package/dist/chunk-LKCYANMW.js.map +1 -0
  37. package/dist/{chunk-W3GXSUSQ.cjs → chunk-LPLCWZTM.cjs} +5087 -1283
  38. package/dist/chunk-LPLCWZTM.cjs.map +1 -0
  39. package/dist/chunk-MMVHBKMM.js +753 -0
  40. package/dist/chunk-MMVHBKMM.js.map +1 -0
  41. package/dist/{chunk-POGBUYWE.cjs → chunk-ST7E3NEE.cjs} +857 -859
  42. package/dist/chunk-ST7E3NEE.cjs.map +1 -0
  43. package/dist/{chunk-7VOHOPLW.cjs → chunk-TCKIXI46.cjs} +59 -59
  44. package/dist/{chunk-7VOHOPLW.cjs.map → chunk-TCKIXI46.cjs.map} +1 -1
  45. package/dist/{chunk-XIOMMGPD.cjs → chunk-TFOPHZ3U.cjs} +1 -1
  46. package/dist/chunk-TFOPHZ3U.cjs.map +1 -0
  47. package/dist/{chunk-Z4BC6M74.js → chunk-UBIXVXPR.js} +2 -2
  48. package/dist/{chunk-BLWCAQCW.js → chunk-VXR7XWMF.js} +4574 -770
  49. package/dist/chunk-VXR7XWMF.js.map +1 -0
  50. package/dist/{chunk-HNS7UHCM.js → chunk-XK5LZKBD.js} +1 -1
  51. package/dist/chunk-XK5LZKBD.js.map +1 -0
  52. package/dist/cms/index.cjs +146 -0
  53. package/dist/cms/index.cjs.map +1 -0
  54. package/dist/cms/index.d.cts +51 -0
  55. package/dist/cms/index.d.ts +51 -0
  56. package/dist/cms/index.js +146 -0
  57. package/dist/{export-DNu_Jr8p.d.ts → export-_1dUKwpF.d.ts} +326 -195
  58. package/dist/{export-DBba-buV.d.cts → export-b6NjCZ5-.d.cts} +326 -195
  59. package/dist/image-editor/index.cjs +2377 -1291
  60. package/dist/image-editor/index.cjs.map +1 -1
  61. package/dist/image-editor/index.d.cts +149 -97
  62. package/dist/image-editor/index.d.ts +149 -97
  63. package/dist/image-editor/index.js +1343 -257
  64. package/dist/image-editor/index.js.map +1 -1
  65. package/dist/opentype-BZEOSOX3.d.ts +188 -0
  66. package/dist/opentype-Dpe75vL5.d.cts +188 -0
  67. package/dist/paint/index.cjs +63 -4
  68. package/dist/paint/index.cjs.map +1 -1
  69. package/dist/paint/index.d.cts +30 -3
  70. package/dist/paint/index.d.ts +30 -3
  71. package/dist/paint/index.js +62 -3
  72. package/dist/paint-editor/index.cjs +146 -145
  73. package/dist/paint-editor/index.cjs.map +1 -1
  74. package/dist/paint-editor/index.d.cts +9 -8
  75. package/dist/paint-editor/index.d.ts +9 -8
  76. package/dist/paint-editor/index.js +6 -5
  77. package/dist/paint-editor/index.js.map +1 -1
  78. package/dist/raster/index.cjs +53 -3
  79. package/dist/raster/index.cjs.map +1 -1
  80. package/dist/raster/index.d.cts +62 -91
  81. package/dist/raster/index.d.ts +62 -91
  82. package/dist/raster/index.js +59 -9
  83. package/dist/{render-BEriFuqK.d.cts → render-B1K_OoLy.d.cts} +87 -2
  84. package/dist/{render-tjzKaik-.d.ts → render-CrmHOgpo.d.ts} +87 -2
  85. package/dist/{blending-aOE6Y3UE.d.cts → retouch-Bxkuc0KH.d.cts} +219 -2
  86. package/dist/{blending-DXl06NSx.d.ts → retouch-Do6tBs2H.d.ts} +219 -2
  87. package/dist/{surface-C8RRg_Bh.d.ts → surface-Cn30xIV6.d.cts} +6 -1
  88. package/dist/{surface-C8RRg_Bh.d.cts → surface-Cn30xIV6.d.ts} +6 -1
  89. package/dist/{svg-D_cfkhlB.d.cts → svg-BnRj0q8i.d.cts} +16 -4
  90. package/dist/{svg-wIaKLrU0.d.ts → svg-CmmBFfGT.d.ts} +16 -4
  91. package/dist/{types-DtL_qLFz.d.ts → types-1SUQKDAw.d.ts} +273 -4
  92. package/dist/{types-DyQq-WPY.d.cts → types-yINF17Ta.d.cts} +273 -4
  93. package/dist/vector/index.cjs +12170 -7343
  94. package/dist/vector/index.cjs.map +1 -1
  95. package/dist/vector/index.d.cts +1579 -16
  96. package/dist/vector/index.d.ts +1579 -16
  97. package/dist/vector/index.js +6303 -1476
  98. package/dist/vector/index.js.map +1 -1
  99. package/dist/warp-B39VsOtd.d.cts +348 -0
  100. package/dist/warp-DMN30aY6.d.ts +348 -0
  101. package/dist/zlib-dxQdgHyN.d.cts +95 -0
  102. package/dist/zlib-dxQdgHyN.d.ts +95 -0
  103. package/package.json +6 -1
  104. package/skills/pixerate-image-editor/SKILL.md +34 -34
  105. package/skills/pixerate-image-editor/references/color-management.md +37 -0
  106. package/skills/pixerate-image-editor/references/photoshop-files.md +39 -0
  107. package/skills/pixerate-image-editor/references/retouching.md +36 -0
  108. package/skills/pixerate-vector/SKILL.md +154 -5
  109. package/dist/chunk-BLWCAQCW.js.map +0 -1
  110. package/dist/chunk-CZOXTEMN.js.map +0 -1
  111. package/dist/chunk-FTBZPI77.cjs +0 -1
  112. package/dist/chunk-FTBZPI77.cjs.map +0 -1
  113. package/dist/chunk-HNS7UHCM.js.map +0 -1
  114. package/dist/chunk-JLYX4V57.cjs +0 -2001
  115. package/dist/chunk-JLYX4V57.cjs.map +0 -1
  116. package/dist/chunk-KB2YBCVS.js +0 -2001
  117. package/dist/chunk-KB2YBCVS.js.map +0 -1
  118. package/dist/chunk-LQEEDHOP.js.map +0 -1
  119. package/dist/chunk-POGBUYWE.cjs.map +0 -1
  120. package/dist/chunk-VKK5VS2T.js +0 -1
  121. package/dist/chunk-W3GXSUSQ.cjs.map +0 -1
  122. package/dist/chunk-XIOMMGPD.cjs.map +0 -1
  123. package/dist/chunk-YGIMK4NX.cjs.map +0 -1
  124. package/dist/homography-CZ-tFjay.d.cts +0 -50
  125. package/dist/homography-Ctfjoc1b.d.ts +0 -50
  126. package/dist/warp-CWHZzE3x.d.ts +0 -118
  127. package/dist/warp-D5jz_tN7.d.cts +0 -118
  128. /package/dist/{chunk-Z4BC6M74.js.map → chunk-UBIXVXPR.js.map} +0 -0
  129. /package/dist/{chunk-VKK5VS2T.js.map → cms/index.js.map} +0 -0
@@ -1,10 +1,11 @@
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-BEriFuqK.cjs';
2
- import { b as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-C8RRg_Bh.cjs';
1
+ import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as GroupBlendMode, r as EffectFill, G as GlobalLight, u as EffectPattern, M as Interpolation, T as LayerLocation$1, U as LayerLocks, O as LayerEffect, S as LayerEffects, R as RasterSources, a as RasterCompositor, l as CompositorOptions, Q as LayerEffectKind, p as EffectContext, h as BitDepth } from './render-B1K_OoLy.cjs';
2
+ import { c as PixelSurface, a as BlendMode, j as TiledSurface, R as RasterRect } from './surface-Cn30xIV6.cjs';
3
+ import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.cjs';
3
4
  import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2$1, H as Homography } from './types-CwMPoRMU.cjs';
4
5
  import { B as BezierPath } from './bezier-BfwIbVTl.cjs';
5
- import { v as VectorSubpath, n as Vec2 } from './types-DyQq-WPY.cjs';
6
- import { B as BrushSettings, M as MixerSettings, d as MixerLoad, f as StrokeCoverage, g as MixerTarget, h as MixerStroke, i as StrokeApply, c as StrokePoint } from './blending-aOE6Y3UE.cjs';
7
- import { W as WarpPreset } from './warp-D5jz_tN7.cjs';
6
+ import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-B39VsOtd.cjs';
7
+ import { w as VectorSubpath, o as Vec2 } from './types-yINF17Ta.cjs';
8
+ import { B as BrushSettings, M as MixerSettings, d as MixerLoad, f as RetouchSettings, g as StrokeCoverage, h as MixerTarget, i as MixerStroke, j as RetouchApply, c as StrokePoint, k as RetouchPaint, C as CoverageMap, P as PaintTileTarget, l as StrokeApply } from './retouch-Bxkuc0KH.cjs';
8
9
 
9
10
  /**
10
11
  * A selection: one 8-bit coverage value per image pixel (0 = not selected, 255 = fully
@@ -325,58 +326,7 @@ interface ShapeLayer extends LayerBase {
325
326
  annotation?: Annotation;
326
327
  psd?: ShapePsdData;
327
328
  }
328
- /**
329
- * The character style of a run of text (Photoshop's Character panel). Sizes are document pixels;
330
- * tracking is in 1/1000 em.
331
- */
332
- interface TextStyle {
333
- /** Family name ("Inter"); fonts the system lacks fall back to a generic family, with a warning. */
334
- fontFamily: string;
335
- /** CSS weight, 100..900 (default 400). */
336
- fontWeight: number;
337
- /** Default false. */
338
- italic?: boolean;
339
- /** Font size in pixels. */
340
- fontSize: number;
341
- /** `#rrggbb`. */
342
- color: string;
343
- /** 0..1 (missing = 1). */
344
- opacity?: number;
345
- /** Letter spacing in 1/1000 em (missing = 0). */
346
- tracking?: number;
347
- /** Baseline-to-baseline distance in pixels; missing = auto (the paragraph's `autoLeading` × size). */
348
- leading?: number;
349
- /** Pixels; positive raises the text (missing = 0). */
350
- baselineShift?: number;
351
- underline?: boolean;
352
- strikethrough?: boolean;
353
- /** PostScript name from a PSD (`ArialMT`), kept so the exact face can be found and written back. */
354
- postScriptName?: string;
355
- }
356
- /** A character style over `length` UTF-16 code units of the text, in order. */
357
- interface TextRun {
358
- length: number;
359
- style: TextStyle;
360
- }
361
- type TextAlign = 'left' | 'center' | 'right' | 'justify';
362
- declare const TEXT_ALIGNS: readonly TextAlign[];
363
- /** Paragraph style (Photoshop's Paragraph panel); lengths in pixels. */
364
- interface ParagraphStyle {
365
- /** Default `left`. `justify` stretches every line of a paragraph box but the last. */
366
- align?: TextAlign;
367
- /** Auto leading as a multiple of the font size (default 1.2). */
368
- autoLeading?: number;
369
- firstLineIndent?: number;
370
- startIndent?: number;
371
- endIndent?: number;
372
- spaceBefore?: number;
373
- spaceAfter?: number;
374
- }
375
- /** A paragraph style over `length` UTF-16 code units (whole paragraphs, line break included). */
376
- interface ParagraphRun {
377
- length: number;
378
- style: ParagraphStyle;
379
- }
329
+
380
330
  /** PSD data of a type layer kept for round trips (see the PSD module). */
381
331
  interface TypePsdData {
382
332
  /** The `TySh` block as read: written back while the layer is unchanged, else patched. */
@@ -584,6 +534,79 @@ declare function shapeLayers(layers: readonly ImageLayer[]): ShapeLayer[];
584
534
  /** Every smart object in the stack (nested contents not included). */
585
535
  declare function smartObjectLayers(layers: readonly ImageLayer[]): SmartObjectLayer[];
586
536
 
537
+ /**
538
+ * Colour management for the image editor, on `@pixerate/editor/cms`:
539
+ *
540
+ * - The document has a colour profile (its working space): the colours its RGB pixels mean.
541
+ * Missing means sRGB. Assign Profile changes that meaning and keeps the numbers; Convert to
542
+ * Profile changes the numbers so the colours stay (with a rendering intent and black point
543
+ * compensation).
544
+ * - The viewport assumes an sRGB display: a document in another space is converted for display,
545
+ * and Proof Setup shows it as it would print or display through another profile (soft
546
+ * proofing), optionally with a gamut warning.
547
+ * - Profiles travel with files: PSD image resource 1039, PNG `iCCP`, JPEG APP2.
548
+ */
549
+
550
+ /** A document's colour profile: a built-in one by id, or embedded ICC bytes. */
551
+ interface DocumentColorProfile {
552
+ /** A built-in profile (see `BUILTIN_PROFILES`). */
553
+ builtin?: BuiltinProfileId;
554
+ /** The profile's description. */
555
+ name: string;
556
+ /** ICC bytes of a profile that is not built in. */
557
+ icc?: Uint8Array;
558
+ }
559
+ /** View › Proof Setup (view state). */
560
+ interface ProofSetup {
561
+ profile: DocumentColorProfile;
562
+ /** Rendering intent from the document to the proof profile (default relative). */
563
+ intent: Intent;
564
+ /** Black point compensation (default true). */
565
+ bpc: boolean;
566
+ /** Show the proof's paper white and ink black (absolute colorimetric to the display). */
567
+ simulatePaper: boolean;
568
+ /** Grey out colours the proof profile cannot reproduce (Gamut Warning). */
569
+ gamutWarning: boolean;
570
+ }
571
+ declare const DEFAULT_PROOF: Omit<ProofSetup, 'profile'>;
572
+ /** The profile a document profile names (sRGB when missing). Throws `CmsError` for unreadable ICC bytes. */
573
+ declare function resolveProfile(doc: DocumentColorProfile | null | undefined): Profile;
574
+ /** The ICC bytes to embed for a document profile. */
575
+ declare function profileBytes(doc: DocumentColorProfile | null | undefined): Uint8Array;
576
+ /**
577
+ * A document profile from what a user or agent gives: a built-in id or alias ("srgb",
578
+ * "display-p3", "Adobe RGB (1998)", "coated-cmyk", …) or ICC bytes. Throws with the choices.
579
+ */
580
+ declare function documentProfile(input: string | Uint8Array): DocumentColorProfile;
581
+ /** Whether a document profile means sRGB (so the display needs no conversion). */
582
+ declare function isSrgb(doc: DocumentColorProfile | null | undefined): boolean;
583
+ /** JSON form of a document profile. */
584
+ interface SerializedColorProfile {
585
+ builtin?: BuiltinProfileId;
586
+ name: string;
587
+ /** ICC bytes, base64. */
588
+ icc?: string;
589
+ }
590
+ declare function serializeColorProfile(doc: DocumentColorProfile): SerializedColorProfile;
591
+ /** A document profile from JSON, or `null` (with a problem noted) when it cannot be read. */
592
+ declare function deserializeColorProfile(raw: unknown, problems: string[]): DocumentColorProfile | null;
593
+ /** Applies a colour transform to 8-bit RGBA in place (alpha kept). */
594
+ type PixelTransform = (rgba: Uint8ClampedArray) => void;
595
+ /**
596
+ * What the viewport applies to the composite before showing it on an sRGB display: nothing for
597
+ * an sRGB document without proofing; the document → sRGB conversion; or the proof chain
598
+ * document → proof → sRGB, with out-of-gamut colours greyed when asked.
599
+ */
600
+ declare function displayTransform(doc: DocumentColorProfile | null | undefined, proof: ProofSetup | null | undefined): PixelTransform | null;
601
+ /** A `#rrggbb` colour converted between two profiles. */
602
+ declare function convertHex(hex: string, from: Profile, to: Profile, intent?: Intent, bpc?: boolean): string;
603
+ /**
604
+ * A layer surface with every pixel's colour converted through `t` (an RGB → RGB transform):
605
+ * 8-bit tiles through its tables, 16-bit tiles at 16 bits, 32-bit (linear) tiles through the
606
+ * float path. Alpha is kept.
607
+ */
608
+ declare function convertSurfaceColors(surface: TiledSurface, t: Transform): TiledSurface;
609
+
587
610
  /**
588
611
  * Type layers: styled runs of text laid out as point or paragraph text and drawn into the layer's
589
612
  * `surface` by a text shaper.
@@ -597,43 +620,6 @@ declare function smartObjectLayers(layers: readonly ImageLayer[]): SmartObjectLa
597
620
  * and refuse edits that would need drawing them again.
598
621
  */
599
622
 
600
- /** A font as a shaper is asked for it (sizes in pixels). */
601
- interface TextFont {
602
- family: string;
603
- weight: number;
604
- italic: boolean;
605
- size: number;
606
- postScriptName?: string;
607
- }
608
- /**
609
- * What layout and rendering need from fonts. Implement `outline` (glyph outlines, pure) or `draw`
610
- * (onto a 2D canvas), or both.
611
- */
612
- interface TextShaper {
613
- /** Identifies the shaper (part of the render cache key). */
614
- readonly id: string;
615
- /** The family that draws `font`: the family itself when available, else a fallback (`available: false`). */
616
- resolve(font: TextFont): {
617
- family: string;
618
- available: boolean;
619
- };
620
- /** Ascent and descent (both positive, pixels) of the resolved font at `font.size`. */
621
- metrics(font: TextFont): {
622
- ascent: number;
623
- descent: number;
624
- };
625
- /**
626
- * Caret positions of `text` set in `font`: `text.length + 1` x offsets in pixels from the start
627
- * (kerning included, tracking not).
628
- */
629
- measure(text: string, font: TextFont): ArrayLike<number>;
630
- /** Glyph outlines of `text` with its start on the baseline at (`x`, `y`), pixels, y down. */
631
- outline?(text: string, font: TextFont, x: number, y: number): BezierPath;
632
- /** Draws `text` with its start on the baseline at (`x`, `y`) in the context's current transform, fill style and alpha. */
633
- draw?(ctx: CanvasRenderingContext2D, text: string, font: TextFont, x: number, y: number): void;
634
- /** Families this shaper can draw (for font pickers and agents), when it can tell. */
635
- families?(): string[];
636
- }
637
623
  /** What rendering a type layer needs besides the layer. */
638
624
  interface TextEnv {
639
625
  width: number;
@@ -643,101 +629,6 @@ interface TextEnv {
643
629
  /** A 2D canvas for shapers that `draw` (the editor's renderer provides one). */
644
630
  createCanvas?(width: number, height: number): HTMLCanvasElement | OffscreenCanvas;
645
631
  }
646
- declare const DEFAULT_TEXT_STYLE: TextStyle;
647
- declare const DEFAULT_AUTO_LEADING = 1.2;
648
- /** Runs fitted to a text of `length` (the last run stretches or is cut), never empty while there is text. */
649
- declare function fitRuns<R extends {
650
- length: number;
651
- style: object;
652
- }>(runs: readonly R[], length: number, fallback: R['style']): R[];
653
- /** The style of the run holding code unit `index` (the last run past the end). */
654
- declare function styleAt<S extends object>(runs: ReadonlyArray<{
655
- length: number;
656
- style: S;
657
- }>, index: number, fallback: S): S;
658
- /** Runs with `patch(style)` applied over [start, end). */
659
- declare function restyleRange<S extends object>(runs: ReadonlyArray<{
660
- length: number;
661
- style: S;
662
- }>, start: number, end: number, patch: (s: S) => S): Array<{
663
- length: number;
664
- style: S;
665
- }>;
666
- /** Runs after replacing [start, end) of the text with `inserted` code units styled `style`. */
667
- declare function spliceRuns<S extends object>(runs: ReadonlyArray<{
668
- length: number;
669
- style: S;
670
- }>, start: number, end: number, inserted: number, style: S): Array<{
671
- length: number;
672
- style: S;
673
- }>;
674
- /** Paragraph ranges [start, end) of the text, the line break included in the paragraph it ends. */
675
- declare function paragraphRanges(text: string): Array<{
676
- start: number;
677
- end: number;
678
- content: number;
679
- }>;
680
- /** Paragraph runs snapped to whole paragraphs: each paragraph takes the style at its start. */
681
- declare function fitParagraphRuns(runs: readonly ParagraphRun[], text: string): ParagraphRun[];
682
- /** One laid-out character. */
683
- interface LaidChar {
684
- /** Index in the text (UTF-16 code unit). */
685
- index: number;
686
- /** Text-space x of its start and its advance (tracking and justification included). */
687
- x: number;
688
- advance: number;
689
- }
690
- /** A run of characters on one line in one style. */
691
- interface LaidFragment {
692
- start: number;
693
- end: number;
694
- style: TextStyle;
695
- font: TextFont;
696
- /** The family the shaper draws it with. */
697
- family: string;
698
- x: number;
699
- /** Baseline in text space (baseline shift applied). */
700
- y: number;
701
- /** Per-character x positions relative to `x` (`end − start + 1` entries). */
702
- carets: number[];
703
- /** Whether characters are placed one by one (tracking or justification). */
704
- spaced: boolean;
705
- }
706
- interface LaidLine {
707
- start: number;
708
- /** End of the line's characters (line break and trailing spaces excluded from `width`). */
709
- end: number;
710
- baseline: number;
711
- ascent: number;
712
- descent: number;
713
- x: number;
714
- width: number;
715
- chars: LaidChar[];
716
- fragments: LaidFragment[];
717
- }
718
- /** A laid-out type layer in text space. */
719
- interface TextLayout {
720
- lines: LaidLine[];
721
- /** Bounds of the lines (ascent to descent), text space; the box for paragraph text. */
722
- bounds: CropBox;
723
- /** Families replaced by a fallback. */
724
- missingFonts: string[];
725
- }
726
- declare function fontOf(style: TextStyle): TextFont;
727
- /** Lays out a type layer with `shaper` (memoised per layer object and shaper). */
728
- declare function layoutText(layer: Pick<TypeLayer, 'text' | 'runs' | 'paragraphs' | 'frame'>, shaper: TextShaper): TextLayout;
729
- /** The text index nearest a text-space point (for clicks): the line under it, then the closest caret. */
730
- declare function textIndexAt(layout: TextLayout, p: {
731
- x: number;
732
- y: number;
733
- }): number;
734
- /** The caret at text index `index`: its x and the line's top and bottom, text space. */
735
- declare function caretAt(layout: TextLayout, index: number): {
736
- x: number;
737
- top: number;
738
- bottom: number;
739
- line: number;
740
- };
741
632
  /** How far beyond the canvas type renders (as shapes). */
742
633
  declare const TEXT_RENDER_MARGIN = 512;
743
634
  /** Text space → document of a layer. */
@@ -869,6 +760,20 @@ interface SerializedPixelLayer extends SerializedLayerBase {
869
760
  filters?: LayerFilter[];
870
761
  /** `'document'`: the pixels are the document's source image (no asset is stored). */
871
762
  source?: 'document';
763
+ /** 16- or 32-bit samples of the pixels (the PNG asset is their 8-bit rendering), see `raster/deep`. */
764
+ deep?: SerializedDeepPixels;
765
+ }
766
+ /**
767
+ * High bit depth pixels: `width × height` interleaved RGBA samples at (`x`, `y`) in layer space,
768
+ * little-endian (`Uint16` for 16-bit, `Float32` linear light for 32-bit), deflated and base64.
769
+ */
770
+ interface SerializedDeepPixels {
771
+ depth: 16 | 32;
772
+ x: number;
773
+ y: number;
774
+ width: number;
775
+ height: number;
776
+ data: string;
872
777
  }
873
778
  interface SerializedAdjustmentLayer extends SerializedLayerBase {
874
779
  type: 'adjustment';
@@ -1014,6 +919,10 @@ interface SerializedLayeredImageEditorState {
1014
919
  patterns?: SerializedPattern[];
1015
920
  /** Contents of the smart objects (nested ones included), each stored once. */
1016
921
  smartContents?: SerializedSmartContents[];
922
+ /** The document's colour profile (missing = sRGB). */
923
+ colorProfile?: SerializedColorProfile;
924
+ /** Bits per channel (missing = 8). */
925
+ bitDepth?: 16 | 32;
1017
926
  }
1018
927
  interface SerializedPattern {
1019
928
  id: string;
@@ -1030,6 +939,10 @@ interface EncodedSurface {
1030
939
  }
1031
940
  /** The surface's content (non-default pixels) as a PNG data URL and its position, or `null`. */
1032
941
  declare function encodeSurface(surface: TiledSurface): EncodedSurface | null;
942
+ /** A surface's deep samples over its content, or `null` when it holds only 8-bit tiles. */
943
+ declare function encodeDeepSurface(surface: TiledSurface): SerializedDeepPixels | null;
944
+ /** Puts serialized deep samples into `surface` (the 8-bit rendering read from the PNG); unreadable data leaves it 8-bit. */
945
+ declare function decodeDeepSurface(surface: TiledSurface, raw: unknown, problems: string[], label: string): TiledSurface;
1033
946
  interface SerializeContext {
1034
947
  /** Adds an asset and returns its id. */
1035
948
  addAsset(url: string, hint: string): string;
@@ -1186,6 +1099,12 @@ declare function runLayerFilters(data: Uint8ClampedArray, width: number, height:
1186
1099
  declare class LayerCompositor extends RasterCompositor<ImageLayer, CompositorSources> {
1187
1100
  constructor(options?: CompositorOptions);
1188
1101
  }
1102
+ /**
1103
+ * The composite of an image editor stack at 16 or 32 bits (see `raster/deep-compositor`): float
1104
+ * RGBA over `rect`, sRGB-encoded 0..1 at 16 bits, linear light at 32. Adjustment layers run in
1105
+ * float; layers with effects or filters and annotation layers are drawn at 8 bits.
1106
+ */
1107
+ declare function compositeDeep(layers: readonly ImageLayer[], rect: RasterRect, sources: CompositorSources, depth: 16 | 32): Float32Array;
1189
1108
 
1190
1109
  interface RenderOptions {
1191
1110
  viewportWidth?: number;
@@ -1286,6 +1205,11 @@ declare class ImageEditorRenderer {
1286
1205
  /** Which path the last base render took. */
1287
1206
  lastBaseRoute: 'legacy' | 'layers' | null;
1288
1207
  private comp;
1208
+ /** Colour transform from the document to the display (see `color-management`), or none. */
1209
+ private display;
1210
+ private displayKey;
1211
+ /** Sets the viewport's display transform (document profile → sRGB, or a soft proof); `null` for none. */
1212
+ setDisplayTransform(t: PixelTransform | null): void;
1289
1213
  private depthMaps;
1290
1214
  private assetVersion;
1291
1215
  private scratch;
@@ -1960,6 +1884,10 @@ interface PsdImportResult {
1960
1884
  colorMode: string;
1961
1885
  channels: number;
1962
1886
  };
1887
+ /** The embedded ICC profile (image resource 1039), raw bytes, when the file has one. */
1888
+ iccProfile?: Uint8Array;
1889
+ /** The bits per channel the layers keep: 16 or 32 for such files (not indexed or bitmap), else 8. */
1890
+ bitDepth: 8 | 16 | 32;
1963
1891
  }
1964
1892
  interface PsdImportOptions {
1965
1893
  /** Makes layer ids (defaults to `psd-<n>`). */
@@ -2501,6 +2429,21 @@ interface PaintOptions {
2501
2429
  mixer: MixerSettings;
2502
2430
  /** What the Mixer Brush carries now: its reservoir, how much is left and the picked-up colour. */
2503
2431
  mixerLoad: MixerLoad;
2432
+ /** The retouching tools' options (aligned, sample, spot healing type, tone range, exposure, sponge mode, smudge strength). */
2433
+ retouch: RetouchSettings;
2434
+ /** The Clone Stamp and Healing Brush source point (Alt-click), or `null` when none is set. */
2435
+ cloneSource: CloneSource | null;
2436
+ }
2437
+ /** Where the Clone Stamp and Healing Brush sample from. */
2438
+ interface CloneSource {
2439
+ /** The source point, document pixels. */
2440
+ x: number;
2441
+ y: number;
2442
+ /** With Aligned on: the offset (source − stroke start) the first stroke fixed, kept for the next strokes; `null` until a stroke has used the point. */
2443
+ offset: {
2444
+ x: number;
2445
+ y: number;
2446
+ } | null;
2504
2447
  }
2505
2448
  /**
2506
2449
  * The geometry of one shape component: a live shape (`{ kind: 'rect' | 'ellipse' | 'polygon' |
@@ -2610,8 +2553,12 @@ interface TypeLayerInfo {
2610
2553
  rendering: 'live' | 'stored';
2611
2554
  annotationId?: string;
2612
2555
  }
2556
+ /** The retouching tools (see `@pixerate/editor/paint`'s retouch module). */
2557
+ type RetouchTool = 'clone' | 'heal' | 'spot-heal' | 'smudge' | 'dodge' | 'burn' | 'sponge';
2558
+ declare const RETOUCH_TOOLS: readonly RetouchTool[];
2559
+ declare const isRetouchTool: (tool: unknown) => tool is RetouchTool;
2613
2560
  /** Paint tools a stroke can use. */
2614
- type StrokeTool = 'brush' | 'eraser' | 'mixer';
2561
+ type StrokeTool = 'brush' | 'eraser' | 'mixer' | RetouchTool;
2615
2562
  /** A stroke: tool, target (default the active layer and target) and brush / colour overrides. */
2616
2563
  interface StrokeInit {
2617
2564
  tool?: StrokeTool;
@@ -2628,6 +2575,16 @@ interface StrokeInit {
2628
2575
  mixer?: Partial<MixerSettings>;
2629
2576
  /** Eraser colour on locked transparency / masks (default the background). */
2630
2577
  background?: string | number[];
2578
+ /** Overrides of the paint options' retouch settings (the retouching tools). */
2579
+ retouch?: Partial<RetouchSettings>;
2580
+ /**
2581
+ * Clone Stamp / Healing Brush: the source point for this stroke (document pixels). Given, it
2582
+ * becomes the clone source (as an Alt-click), so the stroke starts its offset afresh.
2583
+ */
2584
+ source?: {
2585
+ x: number;
2586
+ y: number;
2587
+ };
2631
2588
  /** Kept with the stroke for replays (v1 brushes have no jitter). */
2632
2589
  seed?: number;
2633
2590
  }
@@ -2651,6 +2608,28 @@ interface PaintStrokeResult {
2651
2608
  dabs: number;
2652
2609
  /** The Mixer Brush's load after the stroke (tool `mixer` only). */
2653
2610
  mixerLoad?: MixerLoad;
2611
+ /**
2612
+ * Clone Stamp / Healing Brush: the offset used (source − first stroke point, whole pixels) and
2613
+ * where the stroke's first point sampled.
2614
+ */
2615
+ clone?: {
2616
+ offset: {
2617
+ x: number;
2618
+ y: number;
2619
+ };
2620
+ source: {
2621
+ x: number;
2622
+ y: number;
2623
+ };
2624
+ aligned: boolean;
2625
+ };
2626
+ /** Spot Healing: the offset of the patch it copied, or `null` when it filled smoothly. */
2627
+ spotHeal?: {
2628
+ offset: {
2629
+ x: number;
2630
+ y: number;
2631
+ } | null;
2632
+ };
2654
2633
  }
2655
2634
  /** An opaque pre-stroke history snapshot. */
2656
2635
  type HistoryEntryHandle = {
@@ -2663,11 +2642,42 @@ interface MixerStrokeInit {
2663
2642
  /** Stores the brush load when the stroke ends and returns it (after any clean). */
2664
2643
  end(load: MixerLoad): MixerLoad;
2665
2644
  }
2645
+ /** A stroke that paints dab by dab into live pixels (Mixer Brush, Smudge, Sponge). */
2646
+ interface LiveDabStroke {
2647
+ push(points: readonly StrokePoint[]): CropBox[];
2648
+ finish(last?: StrokePoint): CropBox[];
2649
+ readonly bounds: CropBox | null;
2650
+ readonly dabCount: number;
2651
+ }
2652
+ /**
2653
+ * How a retouching stroke starts (see `PaintStrokeSession`): either coverage-based (Clone Stamp,
2654
+ * Healing Brush, Spot Healing, Dodge, Burn: `coverage` composited with `paint()` over the
2655
+ * pre-stroke pixels, optionally replaced by `finalPaint` when the stroke ends) or sequential
2656
+ * (`create`: dabs over live pixels, Smudge and Sponge).
2657
+ */
2658
+ type RetouchStrokeInit = {
2659
+ kind: 'coverage';
2660
+ coverage: StrokeCoverage;
2661
+ apply: RetouchApply;
2662
+ /** Called with the first point before any dab is shown (the clone offset is fixed here). */
2663
+ start(first: StrokePoint): void;
2664
+ /** What the coverage lays while the stroke is drawn. */
2665
+ paint(): RetouchPaint;
2666
+ /** What it lays once the stroke ends, from the whole coverage (healing); `null` keeps `paint()`. */
2667
+ finalPaint?(coverage: CoverageMap): RetouchPaint | null;
2668
+ /** Extra result fields. */
2669
+ result?(): Partial<PaintStrokeResult>;
2670
+ } | {
2671
+ kind: 'dabs';
2672
+ /** Makes the stroke over the session's live pixels (RGBA, or an RGBA view of a mask). */
2673
+ create(pixels: PaintTileTarget): LiveDabStroke;
2674
+ result?(): Partial<PaintStrokeResult>;
2675
+ };
2666
2676
  /**
2667
2677
  * A stroke in progress (see `beginStroke`): `push` input points as they arrive, then `end` (one
2668
2678
  * undo step) or `cancel`. Brush and eraser strokes build up a coverage map composited over the
2669
2679
  * pre-stroke pixels; Mixer Brush strokes paint dab by dab into the live pixels, so each dab picks
2670
- * up what the dabs before it laid down.
2680
+ * up what the dabs before it laid down. Retouching strokes take one of the two shapes.
2671
2681
  */
2672
2682
  declare class PaintStrokeSession {
2673
2683
  private readonly controller;
@@ -2684,6 +2694,10 @@ declare class PaintStrokeSession {
2684
2694
  private readonly stroke;
2685
2695
  private readonly mixer;
2686
2696
  private readonly mixerInit;
2697
+ private readonly retouch;
2698
+ /** Writes a mask's RGBA view back (sequential retouching on a mask). */
2699
+ private readonly flushView;
2700
+ private started;
2687
2701
  /** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
2688
2702
  private readonly fresh;
2689
2703
  private last;
@@ -2692,7 +2706,9 @@ declare class PaintStrokeSession {
2692
2706
  id: string;
2693
2707
  channel: LayerTarget;
2694
2708
  surface: TiledSurface;
2695
- }, stroke: StrokeCoverage | MixerStrokeInit, apply: StrokeApply);
2709
+ }, stroke: StrokeCoverage | MixerStrokeInit | RetouchStrokeInit, apply: StrokeApply);
2710
+ /** The new tile of a coverage stroke over the pre-stroke tile `src`. */
2711
+ private compositeTile;
2696
2712
  /** The live pixels a mixer stroke reads and writes; base tiles are copied on first write. */
2697
2713
  private mixerPixels;
2698
2714
  get layerId(): string;
@@ -2778,6 +2794,9 @@ declare class ImageEditorController {
2778
2794
  */
2779
2795
  private pendingDirty;
2780
2796
  private notify;
2797
+ private displayFor;
2798
+ /** Keeps the renderer's display transform in step with the document profile and Proof Setup. */
2799
+ private syncDisplay;
2781
2800
  /** Recomputes the compatibility views (`adjustments`, `depthMask`, `annotations`) when the stack changed. */
2782
2801
  private syncViews;
2783
2802
  private stack;
@@ -3152,6 +3171,17 @@ declare class ImageEditorController {
3152
3171
  setGlobalLight(light: Partial<GlobalLight>, commitToHistory?: boolean): GlobalLight;
3153
3172
  /** Composites `layers` (in isolation) over `rect` into a surface, loading depth maps first. */
3154
3173
  private compositeToSurface;
3174
+ /**
3175
+ * The composite of the layer stack at the document's bit depth (as `compositePixels`, no
3176
+ * canvas): 16-bit sRGB samples, or 32-bit linear float, over `rect` (default the canvas). At 8
3177
+ * bits, the 8-bit composite widened to 16 bits.
3178
+ */
3179
+ compositeDeepPixels(rect?: CropBox): {
3180
+ width: number;
3181
+ height: number;
3182
+ depth: 16 | 32;
3183
+ data: Uint16Array | Float32Array;
3184
+ };
3155
3185
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
3156
3186
  private paintBounds;
3157
3187
  /**
@@ -3185,9 +3215,10 @@ declare class ImageEditorController {
3185
3215
  mask?: boolean;
3186
3216
  }): string | null;
3187
3217
  /** Brush settings, colours and tool options of the paint tools (view state, no undo). */
3188
- setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad'>> & {
3218
+ setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad' | 'retouch' | 'cloneSource'>> & {
3189
3219
  brush?: Partial<BrushSettings>;
3190
3220
  mixer?: Partial<MixerSettings>;
3221
+ retouch?: Partial<RetouchSettings>;
3191
3222
  }): PaintOptions;
3192
3223
  /**
3193
3224
  * Loads the Mixer Brush's reservoir full with `color` (default the foreground); the picked-up
@@ -3198,6 +3229,14 @@ declare class ImageEditorController {
3198
3229
  cleanMixerBrush(): MixerLoad;
3199
3230
  /** Empties the Mixer Brush entirely (no reservoir, nothing picked up). Returns the brush load. */
3200
3231
  emptyMixerBrush(): MixerLoad;
3232
+ /**
3233
+ * Sets (Alt-click) or clears the Clone Stamp and Healing Brush source point, in document
3234
+ * pixels. The next stroke fixes the offset from its first point. View state, no undo.
3235
+ */
3236
+ setCloneSource(point: {
3237
+ x: number;
3238
+ y: number;
3239
+ } | null): CloneSource | null;
3201
3240
  /** D: black foreground, white background. */
3202
3241
  resetPaintColors(): void;
3203
3242
  /** X: swaps the foreground and background colours. */
@@ -3213,6 +3252,12 @@ declare class ImageEditorController {
3213
3252
  * without recording history.
3214
3253
  */
3215
3254
  beginStroke(init?: StrokeInit): PaintStrokeSession;
3255
+ /** A retouching stroke's start: its settings, what it samples and how it composites. */
3256
+ private retouchStroke;
3257
+ /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
3258
+ private surfaceSource;
3259
+ /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
3260
+ private compositeSource;
3216
3261
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
3217
3262
  private mixerStroke;
3218
3263
  /** @internal Shows a stroke's live surface (no history). */
@@ -3426,6 +3471,8 @@ declare class ImageEditorController {
3426
3471
  includeAnnotations?: boolean;
3427
3472
  }): Promise<HTMLCanvasElement | null>;
3428
3473
  toDataURL(options?: ExportOptions): Promise<string>;
3474
+ /** PNG or JPEG bytes with the document's ICC profile embedded (other formats unchanged). */
3475
+ private withEmbeddedProfile;
3429
3476
  toBlob(options?: ExportOptions): Promise<Blob>;
3430
3477
  renderMask(options?: {
3431
3478
  useAnnotations?: boolean;
@@ -3586,6 +3633,71 @@ declare class ImageEditorController {
3586
3633
  * step. Returns the layer id.
3587
3634
  */
3588
3635
  rasterizeLayer(id: string): Promise<string>;
3636
+ /** The document's colour profile: its name, built-in id (or `null` for an embedded profile) and colour space. */
3637
+ getColorProfile(): {
3638
+ name: string;
3639
+ builtin: BuiltinProfileId | null;
3640
+ colorSpace: ColorSpace;
3641
+ srgb: boolean;
3642
+ };
3643
+ /** Resolves a profile argument (built-in id or alias, or ICC bytes) as an RGB document profile. */
3644
+ private rgbProfileArg;
3645
+ /**
3646
+ * Edit › Assign Profile (one undo step): the document's numbers now mean colours in
3647
+ * `profile` (a built-in id such as `display-p3`, or ICC bytes); no pixel changes, so colours
3648
+ * look different unless the profiles match. Returns the new profile.
3649
+ */
3650
+ assignProfile(profile: string | Uint8Array): ReturnType<ImageEditorController['getColorProfile']>;
3651
+ /**
3652
+ * Edit › Convert to Profile (one undo step): every pixel layer's numbers are converted so its
3653
+ * colours stay the same in `profile` (with `intent` and black point compensation), and
3654
+ * `profile` becomes the document's. Shape and type layers, layer effects and adjustment layers
3655
+ * keep their numbers (they are listed in `unconvertedLayerIds`). Returns the profile and the
3656
+ * layers changed.
3657
+ */
3658
+ convertToProfile(profile: string | Uint8Array, options?: {
3659
+ intent?: Intent;
3660
+ bpc?: boolean;
3661
+ }): {
3662
+ profile: ReturnType<ImageEditorController['getColorProfile']>;
3663
+ convertedLayerIds: string[];
3664
+ unconvertedLayerIds: string[];
3665
+ };
3666
+ /**
3667
+ * View › Proof Setup (view state, not an undo step): shows the document as `profile` would
3668
+ * reproduce it, or turns proofing off with `null`. Returns the setup.
3669
+ */
3670
+ setProofSetup(setup: (Partial<Omit<ProofSetup, 'profile'>> & {
3671
+ profile: string | Uint8Array;
3672
+ }) | null): ProofSetup | null;
3673
+ /**
3674
+ * Converts colours (`#rrggbb`) from one profile to another (default from the document's), with
3675
+ * `intent`. For RGB targets returns hex; for others the channel values 0..1 (CMYK, grey, Lab
3676
+ * encoded as L/100, (a+128)/255, (b+128)/255) and, for Lab, L*a*b*.
3677
+ */
3678
+ convertColors(colors: string[], to: string | Uint8Array, options?: {
3679
+ from?: string | Uint8Array;
3680
+ intent?: Intent;
3681
+ bpc?: boolean;
3682
+ }): Array<{
3683
+ input: string;
3684
+ values: number[];
3685
+ hex?: string;
3686
+ lab: [number, number, number];
3687
+ }>;
3688
+ /** The document's bits per channel (8 unless set to 16 or 32). */
3689
+ get bitDepth(): BitDepth;
3690
+ /**
3691
+ * Image › Mode › 8 / 16 / 32 Bits/Channel (one undo step). Going up costs nothing: layers keep
3692
+ * their pixels and read them at the new depth, and edits that understand depth keep the extra
3693
+ * precision from then on. Going down rounds every pixel layer's deep samples to the new depth
3694
+ * (8 bits: their 8-bit rendering; 32 → 16: colour above 1 is clipped). Returns the depth and
3695
+ * the ids of the layers whose pixels changed.
3696
+ */
3697
+ setBitDepth(depth: BitDepth): {
3698
+ bitDepth: BitDepth;
3699
+ changedLayerIds: string[];
3700
+ };
3589
3701
  /** Pixels per inch of the last opened PSD (written back by `toPsd`). */
3590
3702
  private psdResolution;
3591
3703
  /**
@@ -3607,7 +3719,7 @@ declare class ImageEditorController {
3607
3719
  */
3608
3720
  private checkPsdFonts;
3609
3721
  /**
3610
- * The document as an 8-bit RGB PSD (PSB above 30 000 px) with real layers, groups, adjustment
3722
+ * The document as an RGB PSD at its bit depth (8, 16 or 32) (PSB above 30 000 px) with real layers, groups, adjustment
3611
3723
  * layers and masks, in the source frame. Layer filters and parametric (depth) masks are baked
3612
3724
  * into pixels and masks, annotation layers are rasterized (in a browser; elsewhere they are left
3613
3725
  * out), and the merged image is our composite. `warnings` lists every such change.
@@ -3921,11 +4033,14 @@ interface ImageAnnotation extends BaseAnnotation {
3921
4033
  type Annotation = PenAnnotation | RectAnnotation | CircleAnnotation | ArrowAnnotation | LineAnnotation | TextAnnotation | ImageAnnotation;
3922
4034
  type CreateAnnotationPayload = Omit<PenAnnotation, 'id'> | Omit<RectAnnotation, 'id'> | Omit<CircleAnnotation, 'id'> | Omit<ArrowAnnotation, 'id'> | Omit<LineAnnotation, 'id'> | Omit<TextAnnotation, 'id'> | Omit<ImageAnnotation, 'id'>;
3923
4035
  type ImageEditorTool = 'select' | 'crop' | 'pen' | 'rect' | 'circle' | 'arrow' | 'line' | 'text' | 'watermark' | 'move' | 'brush' | 'eraser' | 'mixer'
4036
+ /** Retouching (see `RetouchTool`): Clone Stamp, Healing Brush, Spot Healing, Smudge, Dodge, Burn, Sponge. */
4037
+ | 'clone' | 'heal' | 'spot-heal' | 'smudge' | 'dodge' | 'burn' | 'sponge'
3924
4038
  /** Live shape layers (see `ShapeDrawGesture`). */
3925
4039
  | 'shape'
3926
4040
  /** Live type layers, edited on the canvas (see `TypeToolGesture`). */
3927
4041
  | 'type';
3928
4042
  type ImageEditorFit = 'contain' | 'margin';
4043
+
3929
4044
  interface ImageEditorState {
3930
4045
  sourceUrl: string | null;
3931
4046
  /** Canvas (document) size in pixels: the source image's natural size. */
@@ -3993,6 +4108,16 @@ interface ImageEditorState {
3993
4108
  layerId: string;
3994
4109
  name: string;
3995
4110
  }>;
4111
+ /** The document's colour profile (working space); missing means sRGB. Recorded in history and saved. */
4112
+ colorProfile?: DocumentColorProfile;
4113
+ /** View › Proof Setup (view state): soft-proof the viewport through another profile, or `null`. */
4114
+ proofSetup?: ProofSetup | null;
4115
+ /**
4116
+ * Bits per channel of the document (Image › Mode): 8 (missing), 16 or 32 (linear float).
4117
+ * Pixel layers keep 16- or 32-bit samples where they have them (see `raster/deep`); the
4118
+ * viewport shows their 8-bit rendering. Recorded in undo history and saved in `toJSON()`.
4119
+ */
4120
+ bitDepth?: BitDepth;
3996
4121
  }
3997
4122
  /**
3998
4123
  * A stored editor state in the document-level schema (versions 1 and 2). Documents whose layer
@@ -4076,6 +4201,12 @@ interface PsdExportInput {
4076
4201
  patterns?: readonly EffectPattern[];
4077
4202
  /** Written as image resources 1037 and 1049. */
4078
4203
  globalLight?: GlobalLight;
4204
+ /** The document's ICC profile, written as image resource 1039. */
4205
+ iccProfile?: Uint8Array;
4206
+ /** Bits per channel to write (default 8): 16 and 32 write the layers' deep samples (see `raster/deep`). */
4207
+ depth?: 8 | 16 | 32;
4208
+ /** The composite at `depth` (RGBA samples: 16-bit sRGB or 32-bit linear), written instead of `merged`. */
4209
+ mergedDeep?: Uint16Array | Float32Array;
4079
4210
  }
4080
4211
  interface PsdExportResult {
4081
4212
  bytes: Uint8Array;
@@ -4088,4 +4219,4 @@ interface PsdExportResult {
4088
4219
  /** Writes the prepared stack as PSD (or PSB) bytes. */
4089
4220
  declare function exportPsd(input: PsdExportInput): PsdExportResult;
4090
4221
 
4091
- export { type FreeTransformResult as $, type AdjustmentKind as A, LayerCompositor as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartFilterStack as E, type SmartFilter as F, type SmartObjectLayer as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartContents as J, type SmartDocument as K, type LevelsChannel as L, type SmartPlacement as M, type FreeTransformGeometry as N, type TextShaper as O, type PsdExportResult as P, type TextFont as Q, type RefineEdgeParams as R, type SerializedLayer as S, type TextEnv as T, type LiveShapeKind as U, type TextAlign as V, type TextStyle as W, type ParagraphStyle as X, type TypeLayerInfo as Y, type LayerPlacement as Z, type FreeTransformMode as _, type ImageAdjustments as a, type LayerBase as a$, FreeTransformSession as a0, type FreeTransformInit as a1, type TransformAnchor as a2, type AIResultOptions as a3, type AdjustmentLayerBase as a4, type AdjustmentLayerInit as a5, type AdjustmentLayerUpdate as a6, type AnnotationPlacement as a7, type AnnotationType as a8, type ArrowAnnotation as a9, type FreeTransformContent as aA, type FreeTransformHost as aB, type FreeTransformPreview as aC, GUIDED_FILTER_EPS as aD, type GroupLayer as aE, HISTOGRAM_BINS as aF, type HistogramChannel as aG, type HistoryEntryHandle as aH, type HueSaturationParams as aI, IMAGE_EDITOR_SCHEMA_VERSION as aJ, type ImageAnnotation as aK, type ImageDimensions as aL, type ImageEditorAIHooks as aM, type ImageEditorFit as aN, type ImageEditorOptions as aO, ImageEditorRenderer as aP, type ImageEditorState as aQ, type ImageEditorTool as aR, type ImageLayerType as aS, type InpaintHook as aT, type InpaintOptions as aU, type InvertParams as aV, LAYERED_SCHEMA_VERSION as aW, LIVE_SHAPE_KINDS as aX, type LaidChar as aY, type LaidFragment as aZ, type LaidLine as a_, type AspectRatio as aa, type BaseAnnotation as ab, type BlackWhiteParams as ac, type BlurFilter as ad, type CircleAnnotation as ae, type ColorBalanceParams as af, type ColorBalanceTone as ag, type ColorRangeOptions as ah, type ColorRangeSample as ai, type CreateAnnotationPayload as aj, type CropHandle as ak, type CurvesParams as al, DEFAULT_ADJUSTMENTS as am, DEFAULT_AUTO_LEADING as an, DEFAULT_DEPTH_MASK as ao, DEFAULT_MITER_LIMIT as ap, DEFAULT_REFINE_EDGE_PARAMS as aq, DEFAULT_TEXT_STYLE as ar, DEFAULT_TRANSFORM as as, type DeserializeContext as at, type DevelopSettings as au, EMPTY_DISTANCE as av, type ExportOptions as aw, FREE_TRANSFORM_CONTENTS as ax, FREE_TRANSFORM_MODES as ay, type FillOptions as az, type SerializedImageEditorState as b, type SerializedSmartFilter as b$, type LayerBlendMode as b0, type LayerFilterKind as b1, type LayerLocation as b2, type LayerMaskProps as b3, LayerOperationError as b4, type LayerProperties as b5, type LayerSourcesHost as b6, type LayerTarget as b7, type LegacySerializedImageEditorState as b8, type LevelsParams as b9, type PsdSmartFilter as bA, type PsdTaggedBlock as bB, type PsdTreeNode as bC, type RectAnnotation as bD, type RemoveBackgroundHook as bE, type RemoveBackgroundOptions as bF, type RenderOptions as bG, SELECTION_MODES as bH, SELECTION_MODIFY_OPS as bI, SHAPE_OPERATIONS as bJ, SHAPE_RENDER_MARGIN as bK, type SampleOptions as bL, type SelectionChannel as bM, type SelectionCommandOptions as bN, type SelectionModifyOp as bO, type SerializeContext as bP, type SerializedAdjustmentLayer as bQ, type SerializedAnnotationLayer as bR, type SerializedGroupLayer as bS, type SerializedLayerEffects as bT, type SerializedLayeredImageEditorState as bU, type SerializedPattern as bV, type SerializedPixelLayer as bW, type SerializedRasterMask as bX, type SerializedSelection as bY, type SerializedShapeLayer as bZ, type SerializedSmartContents as b_, type LineAnnotation as ba, type LiveShape as bb, type MagicWandOptions as bc, type MixerStrokeInit as bd, PARAGRAPH_STYLE_FIELDS as be, PSD_BLEND_KEYS as bf, type PaintOptions as bg, type PaintStrokeResult as bh, PaintStrokeSession as bi, type ParagraphRun as bj, type PenAnnotation as bk, type PhotoFilterParams as bl, type PixelBuffer as bm, type PixelLayerInit as bn, type PosterizeParams as bo, type PsdChannel as bp, type PsdExportInput as bq, type PsdFile as br, type PsdHeader as bs, type PsdImportOptions as bt, type PsdImportResult as bu, type PsdLayerMask as bv, type PsdLayerRecord as bw, type PsdLayerSummary as bx, type PsdRect as by, type PsdResource as bz, type AdjustmentLayer as c, computeSelectionBounds as c$, type SerializedSmartObjectLayer as c0, type SerializedTypeLayer as c1, type ShapeArrowhead as c2, type ShapeComponent as c3, type ShapeEnv as c4, type ShapeFillRule as c5, type ShapeGeometryInput as c6, type ShapeLayerData as c7, type ShapeLayerInfo as c8, type ShapeLayerInit as c9, type TransformReadout as cA, type TypeLayerData as cB, type TypePsdData as cC, type VibranceParams as cD, type ViewportMetrics as cE, addLayerEffect as cF, addLayerFilter as cG, adjustmentNodeAsLayer as cH, anchorPoint as cI, annotationBlend as cJ, annotationOfShape as cK, annotationOfType 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, caretAt as cV, clampCropToImage as cW, colorRange as cX, combineSelections as cY, componentPath as cZ, computeHistogram as c_, type ShapeLineCap as ca, type ShapeLineJoin as cb, type ShapeOperation as cc, type ShapePaint as cd, type ShapePsdData as ce, type ShapeSelectionOptions as cf, type ShapeStroke as cg, type ShapeStrokeAlign as ch, type ShapeStrokeInput as ci, type SmartFilterKind as cj, type SmartObjectInfo as ck, type SmartPsdData as cl, type StrokeInit as cm, type StrokeTool as cn, TEXT_ALIGNS as co, TEXT_RENDER_MARGIN as cp, TEXT_STYLE_FIELDS as cq, TONE_RANGE_PRESETS as cr, TRANSFORM_ANCHORS as cs, type TextAnnotation as ct, type TextLayerInit as cu, type TextLayout as cv, type TextRun as cw, type ThresholdParams as cx, type ToneRangePreset as cy, type TransformParams as cz, type AdjustmentParamsMap as d, isSelectionMode as d$, contractCoverage as d0, cornersFromMatrix as d1, coverageToByte as d2, createSelectionMask as d3, createShapeLayer as d4, createTypeLayer as d5, decodeLayerChannel as d6, decodeLayerMask as d7, decodeMergedImage as d8, decodePngDataUrl as d9, geometryHomography as dA, getAnnotationBounds as dB, getCropCursor as dC, getRotatedSize as dD, getViewportMetrics as dE, getViewportProjection as dF, globalImageCache as dG, greyMorphology as dH, groupLayers as dI, guidePlanes as dJ, guidedFilterColor as dK, hasSurface as dL, hasWarp as dM, hashMaskContent as dN, histogramPath as dO, hitTestAnnotation as dP, hitTestCrop as dQ, hueRange as dR, identityTransform as dS, imageToCanvasPoint as dT, importPsd as dU, invertSelection as dV, isActiveFilter as dW, isIdentityTransform as dX, isQuarterTurnSwapped as dY, isRenderedLayer as dZ, isSelectionEmpty as d_, decodeSelectionRle as da, defaultShapeName as db, depthMaskAlpha as dc, describeTransform as dd, deserializeEffects as de, deserializeLayer as df, deserializeLayers as dg, deserializePatterns as dh, deserializeSelection as di, developFilter as dj, distanceTransform as dk, duplicateLayer as dl, edgeWidth as dm, ellipsePoints as dn, ellipseSelection as dp, encodeSelectionRle as dq, encodeSurface as dr, expandCoverage as ds, exportPsd as dt, featherCoverage as du, fitParagraphRuns as dv, fitRuns as dw, flipCorners as dx, fontOf as dy, fullSelection as dz, type AdjustmentLayerMask as e, renderShape as e$, isSpatialFilter as e0, isTransformAnchor as e1, isValidWarp as e2, layerEffectsOf as e3, layerMaskCoverage as e4, layerMaskFromSelection as e5, layerMaskKey as e6, layerName as e7, layerTree as e8, layerTypeLabel as e9, offsetShape as eA, paragraphRanges as eB, parseBlend as eC, parseColor as eD, parseSelectionMode as eE, patchParagraphStyle as eF, patchTextStyle as eG, pixelLayerBounds as eH, pixelLayers as eI, placeLayer as eJ, polygonCoverage as eK, polygonSelection as eL, presetWarp as eM, previewStep as eN, projectImagePoint as eO, projectImageRect as eP, projectMaskCoverage as eQ, psdToLayers as eR, readPsd as eS, rectSelection as eT, referencePoint as eU, refineCoverage as eV, refineEdgeHalo as eW, refineSelection as eX, removeLayer as eY, removeLayerEffect as eZ, removeLayerFilter as e_, layoutText as ea, liveComponent as eb, liveShapeSubpaths as ec, magicWand as ed, mapCropHandle as ee, mapSubpaths as ef, matrixFromCorners as eg, matrixFromParams as eh, mergeShapeComponents as ei, migrateSerializedImageEditorState as ej, migrateToLayeredState as ek, modifySelection as el, moveLayer as em, newLayerId as en, normalizeAngle as eo, normalizeFilter as ep, normalizeLayerMask as eq, normalizeLiveShape as er, normalizeRect as es, normalizeRefineEdgeParams as et, normalizeShapePaint as eu, normalizeShapeStroke as ev, normalizeStoredAdjustments as ew, normalizeSubpaths as ex, normalizeText as ey, offsetLayer as ez, type AdjustmentLayerOf as f, unprojectCanvasPoint as f$, renderShapeRect as f0, renderText as f1, replaceTextRange as f2, requireLayer as f3, requireOperation as f4, requireShapeLayer as f5, requireTypeLayer as f6, requireUnlocked as f7, rerenderShape as f8, rerenderText as f9, shapeOutline as fA, shapeRenderClip as fB, shiftCoverage as fC, smartObjectLayers as fD, smoothCoverage as fE, spliceRuns as fF, srgb8ToLab as fG, styleAt as fH, textIndexAt as fI, textMatrix as fJ, textOutlines as fK, textRange as fL, toHex as fM, toTextSpace as fN, toneRange as fO, transformHomography as fP, transformMap as fQ, transformShapeComponents as fR, transformTypeLayer as fS, transformedBox as fT, transformedPoint as fU, typeAsPixelLayer as fV, typeFrame as fW, typeFromAnnotation as fX, typeLayerName as fY, ungroupLayer as fZ, unionRect as f_, resizePixels as fa, resizeSelection as fb, resolveExternalAssets as fc, restyleRange as fd, runLayerFilters as fe, selectionArea as ff, selectionFromCoverage as fg, selectionFromPixels as fh, selectionToCoverage as fi, selectionToPixels as fj, selectionValueAt as fk, serializeContents as fl, serializeEffects as fm, serializeLayer as fn, serializeLayers as fo, serializeLayersExternal as fp, serializePatterns as fq, serializeSelection as fr, setLayerEffects as fs, setLayerEffectsEnabled as ft, setLayerMask as fu, setLayerProperties as fv, shapeAsPixelLayer as fw, shapeFromAnnotation as fx, shapeGeometryBounds as fy, shapeLayers as fz, ImageEditorController as g, updateLayerEffect as g0, updateLayerFilter as g1, updateLayerMaskProps as g2, updateShapeLayer as g3, updateTypeLayer as g4, withNewIds as g5, writePsd as g6, 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 TypeLayer as s, type LayerFilter as t, type PixelLayer as u, type DevelopFilter as v, type ImageTransform as w, type ImageHistogram as x, type ImageProjection as y, type CompositorSources as z };
4222
+ export { type AdjustmentLayerBase as $, type AdjustmentKind as A, LayerCompositor as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartFilterStack as E, type SmartFilter as F, type SmartObjectLayer as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartContents as J, type SmartDocument as K, type LevelsChannel as L, type SmartPlacement as M, type FreeTransformGeometry as N, type LiveShapeKind as O, type PsdExportResult as P, type TypeLayerInfo as Q, type RefineEdgeParams as R, type SerializedLayer as S, type TextEnv as T, type LayerPlacement as U, type FreeTransformMode as V, type FreeTransformResult as W, FreeTransformSession as X, type FreeTransformInit as Y, type TransformAnchor as Z, type AIResultOptions as _, type ImageAdjustments as a, type LayerSourcesHost as a$, type AdjustmentLayerInit as a0, type AdjustmentLayerUpdate as a1, type AnnotationPlacement as a2, type AnnotationType as a3, type ArrowAnnotation as a4, type AspectRatio as a5, type BaseAnnotation as a6, type BlackWhiteParams as a7, type BlurFilter as a8, type CircleAnnotation as a9, type GroupLayer as aA, HISTOGRAM_BINS as aB, type HistogramChannel as aC, type HistoryEntryHandle as aD, type HueSaturationParams as aE, IMAGE_EDITOR_SCHEMA_VERSION as aF, type ImageAnnotation as aG, type ImageDimensions as aH, type ImageEditorAIHooks as aI, type ImageEditorFit as aJ, type ImageEditorOptions as aK, ImageEditorRenderer as aL, type ImageEditorState as aM, type ImageEditorTool as aN, type ImageLayerType as aO, type InpaintHook as aP, type InpaintOptions as aQ, type InvertParams as aR, LAYERED_SCHEMA_VERSION as aS, LIVE_SHAPE_KINDS as aT, type LayerBase as aU, type LayerBlendMode as aV, type LayerFilterKind as aW, type LayerLocation as aX, type LayerMaskProps as aY, LayerOperationError as aZ, type LayerProperties as a_, type CloneSource as aa, type ColorBalanceParams as ab, type ColorBalanceTone as ac, type ColorRangeOptions as ad, type ColorRangeSample as ae, type CreateAnnotationPayload as af, type CropHandle as ag, type CurvesParams as ah, DEFAULT_ADJUSTMENTS as ai, DEFAULT_DEPTH_MASK as aj, DEFAULT_MITER_LIMIT as ak, DEFAULT_PROOF as al, DEFAULT_REFINE_EDGE_PARAMS as am, DEFAULT_TRANSFORM as an, type DeserializeContext as ao, type DevelopSettings as ap, type DocumentColorProfile as aq, EMPTY_DISTANCE as ar, type ExportOptions as as, FREE_TRANSFORM_CONTENTS as at, FREE_TRANSFORM_MODES as au, type FillOptions as av, type FreeTransformContent as aw, type FreeTransformHost as ax, type FreeTransformPreview as ay, GUIDED_FILTER_EPS as az, type SerializedImageEditorState as b, type SerializedSmartObjectLayer as b$, type LayerTarget as b0, type LegacySerializedImageEditorState as b1, type LevelsParams as b2, type LineAnnotation as b3, type LiveShape as b4, type MagicWandOptions as b5, type MixerStrokeInit as b6, PARAGRAPH_STYLE_FIELDS as b7, PSD_BLEND_KEYS as b8, type PaintOptions as b9, type RemoveBackgroundOptions as bA, type RenderOptions as bB, type RetouchStrokeInit as bC, type RetouchTool as bD, SELECTION_MODES as bE, SELECTION_MODIFY_OPS as bF, SHAPE_OPERATIONS as bG, SHAPE_RENDER_MARGIN as bH, type SampleOptions as bI, type SelectionChannel as bJ, type SelectionCommandOptions as bK, type SelectionModifyOp as bL, type SerializeContext as bM, type SerializedAdjustmentLayer as bN, type SerializedAnnotationLayer as bO, type SerializedColorProfile as bP, type SerializedDeepPixels as bQ, type SerializedGroupLayer as bR, type SerializedLayerEffects as bS, type SerializedLayeredImageEditorState as bT, type SerializedPattern as bU, type SerializedPixelLayer as bV, type SerializedRasterMask as bW, type SerializedSelection as bX, type SerializedShapeLayer as bY, type SerializedSmartContents as bZ, type SerializedSmartFilter as b_, type PaintStrokeResult as ba, PaintStrokeSession as bb, type PenAnnotation as bc, type PhotoFilterParams as bd, type PixelBuffer as be, type PixelLayerInit as bf, type PixelTransform as bg, type PosterizeParams as bh, type ProofSetup as bi, type PsdChannel as bj, type PsdExportInput as bk, type PsdFile as bl, type PsdHeader as bm, type PsdImportOptions as bn, type PsdImportResult as bo, type PsdLayerMask as bp, type PsdLayerRecord as bq, type PsdLayerSummary as br, type PsdRect as bs, type PsdResource as bt, type PsdSmartFilter as bu, type PsdTaggedBlock as bv, type PsdTreeNode as bw, RETOUCH_TOOLS as bx, type RectAnnotation as by, type RemoveBackgroundHook as bz, type AdjustmentLayer as c, cornersFromMatrix as c$, type SerializedTypeLayer as c0, type ShapeArrowhead as c1, type ShapeComponent as c2, type ShapeEnv as c3, type ShapeFillRule as c4, type ShapeGeometryInput as c5, type ShapeLayerData as c6, type ShapeLayerInfo as c7, type ShapeLayerInit as c8, type ShapeLineCap as c9, type ViewportMetrics as cA, addLayerEffect as cB, addLayerFilter as cC, adjustmentNodeAsLayer as cD, anchorPoint as cE, annotationBlend as cF, annotationOfShape as cG, annotationOfType as cH, applyImageProjectionToContext as cI, applyParams as cJ, blurFilter as cK, borderCoverage as cL, boxMean as cM, boxPointOf as cN, buildLayerMaskPlanes as cO, calculateCropDrag as cP, canvasToImagePoint as cQ, clampCropToImage as cR, colorRange as cS, combineSelections as cT, componentPath as cU, compositeDeep as cV, computeHistogram as cW, computeSelectionBounds as cX, contractCoverage as cY, convertHex as cZ, convertSurfaceColors as c_, type ShapeLineJoin as ca, type ShapeOperation as cb, type ShapePaint as cc, type ShapePsdData as cd, type ShapeSelectionOptions as ce, type ShapeStroke as cf, type ShapeStrokeAlign as cg, type ShapeStrokeInput as ch, type SmartFilterKind as ci, type SmartObjectInfo as cj, type SmartPsdData as ck, type StrokeInit as cl, type StrokeTool as cm, TEXT_RENDER_MARGIN as cn, TEXT_STYLE_FIELDS as co, TONE_RANGE_PRESETS as cp, TRANSFORM_ANCHORS as cq, type TextAnnotation as cr, type TextLayerInit as cs, type ThresholdParams as ct, type ToneRangePreset as cu, type TransformParams as cv, type TransformReadout as cw, type TypeLayerData as cx, type TypePsdData as cy, type VibranceParams as cz, type AdjustmentParamsMap as d, isSelectionEmpty as d$, coverageToByte as d0, createSelectionMask as d1, createShapeLayer as d2, createTypeLayer as d3, decodeDeepSurface as d4, decodeLayerChannel as d5, decodeLayerMask as d6, decodeMergedImage as d7, decodePngDataUrl as d8, decodeSelectionRle as d9, geometryHomography as dA, getAnnotationBounds as dB, getCropCursor as dC, getRotatedSize as dD, getViewportMetrics as dE, getViewportProjection as dF, globalImageCache as dG, greyMorphology as dH, groupLayers as dI, guidePlanes as dJ, guidedFilterColor as dK, hasSurface as dL, hasWarp as dM, hashMaskContent as dN, histogramPath as dO, hitTestAnnotation as dP, hitTestCrop as dQ, hueRange as dR, identityTransform as dS, imageToCanvasPoint as dT, importPsd as dU, invertSelection as dV, isActiveFilter as dW, isIdentityTransform as dX, isQuarterTurnSwapped as dY, isRenderedLayer as dZ, isRetouchTool as d_, defaultShapeName as da, depthMaskAlpha as db, describeTransform as dc, deserializeColorProfile as dd, deserializeEffects as de, deserializeLayer as df, deserializeLayers as dg, deserializePatterns as dh, deserializeSelection as di, developFilter as dj, displayTransform as dk, distanceTransform as dl, documentProfile as dm, duplicateLayer as dn, edgeWidth as dp, ellipsePoints as dq, ellipseSelection as dr, encodeDeepSurface as ds, encodeSelectionRle as dt, encodeSurface as du, expandCoverage as dv, exportPsd as dw, featherCoverage as dx, flipCorners as dy, fullSelection as dz, type AdjustmentLayerMask as e, removeLayerFilter as e$, isSelectionMode as e0, isSpatialFilter as e1, isSrgb as e2, isTransformAnchor as e3, isValidWarp as e4, layerEffectsOf as e5, layerMaskCoverage as e6, layerMaskFromSelection as e7, layerMaskKey as e8, layerName as e9, offsetLayer as eA, offsetShape as eB, parseBlend as eC, parseColor as eD, parseSelectionMode as eE, patchParagraphStyle as eF, patchTextStyle as eG, pixelLayerBounds as eH, pixelLayers as eI, placeLayer as eJ, polygonCoverage as eK, polygonSelection as eL, presetWarp as eM, previewStep as eN, profileBytes as eO, projectImagePoint as eP, projectImageRect as eQ, projectMaskCoverage as eR, psdToLayers as eS, readPsd as eT, rectSelection as eU, referencePoint as eV, refineCoverage as eW, refineEdgeHalo as eX, refineSelection as eY, removeLayer as eZ, removeLayerEffect as e_, layerTree as ea, layerTypeLabel as eb, liveComponent as ec, liveShapeSubpaths as ed, magicWand as ee, mapCropHandle as ef, mapSubpaths as eg, matrixFromCorners as eh, matrixFromParams as ei, mergeShapeComponents as ej, migrateSerializedImageEditorState as ek, migrateToLayeredState as el, modifySelection as em, moveLayer as en, newLayerId as eo, normalizeAngle as ep, normalizeFilter as eq, normalizeLayerMask as er, normalizeLiveShape as es, normalizeRect as et, normalizeRefineEdgeParams as eu, normalizeShapePaint as ev, normalizeShapeStroke as ew, normalizeStoredAdjustments as ex, normalizeSubpaths as ey, normalizeText as ez, type AdjustmentLayerOf as f, updateLayerEffect as f$, renderShape as f0, renderShapeRect as f1, renderText as f2, replaceTextRange as f3, requireLayer as f4, requireOperation as f5, requireShapeLayer as f6, requireTypeLayer as f7, requireUnlocked as f8, rerenderShape as f9, shapeGeometryBounds as fA, shapeLayers as fB, shapeOutline as fC, shapeRenderClip as fD, shiftCoverage as fE, smartObjectLayers as fF, smoothCoverage as fG, srgb8ToLab as fH, textMatrix as fI, textOutlines as fJ, textRange as fK, toHex as fL, toTextSpace as fM, toneRange as fN, transformHomography as fO, transformMap as fP, transformShapeComponents as fQ, transformTypeLayer as fR, transformedBox as fS, transformedPoint as fT, typeAsPixelLayer as fU, typeFrame as fV, typeFromAnnotation as fW, typeLayerName as fX, ungroupLayer as fY, unionRect as fZ, unprojectCanvasPoint as f_, rerenderText as fa, resizePixels as fb, resizeSelection as fc, resolveExternalAssets as fd, resolveProfile as fe, runLayerFilters as ff, selectionArea as fg, selectionFromCoverage as fh, selectionFromPixels as fi, selectionToCoverage as fj, selectionToPixels as fk, selectionValueAt as fl, serializeColorProfile as fm, serializeContents as fn, serializeEffects as fo, serializeLayer as fp, serializeLayers as fq, serializeLayersExternal as fr, serializePatterns as fs, serializeSelection as ft, setLayerEffects as fu, setLayerEffectsEnabled as fv, setLayerMask as fw, setLayerProperties as fx, shapeAsPixelLayer as fy, shapeFromAnnotation as fz, ImageEditorController as g, updateLayerFilter as g0, updateLayerMaskProps as g1, updateShapeLayer as g2, updateTypeLayer as g3, withNewIds as g4, writePsd as g5, 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 TypeLayer as s, type LayerFilter as t, type PixelLayer as u, type DevelopFilter as v, type ImageTransform as w, type ImageHistogram as x, type ImageProjection as y, type CompositorSources as z };