@pixerate/editor 0.113.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 (124) hide show
  1. package/THIRD_PARTY_NOTICES.md +5 -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-4KLT7ZYS.cjs → chunk-DFQEX3AM.cjs} +29 -29
  30. package/dist/{chunk-4KLT7ZYS.cjs.map → chunk-DFQEX3AM.cjs.map} +1 -1
  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-LPYOIVLA.js → chunk-LKCYANMW.js} +3 -3
  36. package/dist/{chunk-W3GXSUSQ.cjs → chunk-LPLCWZTM.cjs} +5087 -1283
  37. package/dist/chunk-LPLCWZTM.cjs.map +1 -0
  38. package/dist/chunk-MMVHBKMM.js +753 -0
  39. package/dist/chunk-MMVHBKMM.js.map +1 -0
  40. package/dist/{chunk-POGBUYWE.cjs → chunk-ST7E3NEE.cjs} +857 -859
  41. package/dist/chunk-ST7E3NEE.cjs.map +1 -0
  42. package/dist/{chunk-7VOHOPLW.cjs → chunk-TCKIXI46.cjs} +59 -59
  43. package/dist/{chunk-7VOHOPLW.cjs.map → chunk-TCKIXI46.cjs.map} +1 -1
  44. package/dist/{chunk-XIOMMGPD.cjs → chunk-TFOPHZ3U.cjs} +1 -1
  45. package/dist/chunk-TFOPHZ3U.cjs.map +1 -0
  46. package/dist/{chunk-Z4BC6M74.js → chunk-UBIXVXPR.js} +2 -2
  47. package/dist/{chunk-BLWCAQCW.js → chunk-VXR7XWMF.js} +4574 -770
  48. package/dist/chunk-VXR7XWMF.js.map +1 -0
  49. package/dist/{chunk-HNS7UHCM.js → chunk-XK5LZKBD.js} +1 -1
  50. package/dist/chunk-XK5LZKBD.js.map +1 -0
  51. package/dist/cms/index.cjs +146 -0
  52. package/dist/cms/index.cjs.map +1 -0
  53. package/dist/cms/index.d.cts +51 -0
  54. package/dist/cms/index.d.ts +51 -0
  55. package/dist/cms/index.js +146 -0
  56. package/dist/cms/index.js.map +1 -0
  57. package/dist/{export-DIkoK8-r.d.ts → export-_1dUKwpF.d.ts} +217 -191
  58. package/dist/{export-CEXEzqBf.d.cts → export-b6NjCZ5-.d.cts} +217 -191
  59. package/dist/image-editor/index.cjs +1779 -1280
  60. package/dist/image-editor/index.cjs.map +1 -1
  61. package/dist/image-editor/index.d.cts +77 -93
  62. package/dist/image-editor/index.d.ts +77 -93
  63. package/dist/image-editor/index.js +740 -241
  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 +4 -4
  68. package/dist/paint/index.d.cts +2 -2
  69. package/dist/paint/index.d.ts +2 -2
  70. package/dist/paint/index.js +3 -3
  71. package/dist/paint-editor/index.cjs +146 -145
  72. package/dist/paint-editor/index.cjs.map +1 -1
  73. package/dist/paint-editor/index.d.cts +9 -8
  74. package/dist/paint-editor/index.d.ts +9 -8
  75. package/dist/paint-editor/index.js +6 -5
  76. package/dist/paint-editor/index.js.map +1 -1
  77. package/dist/raster/index.cjs +53 -3
  78. package/dist/raster/index.cjs.map +1 -1
  79. package/dist/raster/index.d.cts +62 -91
  80. package/dist/raster/index.d.ts +62 -91
  81. package/dist/raster/index.js +59 -9
  82. package/dist/{render-BEriFuqK.d.cts → render-B1K_OoLy.d.cts} +87 -2
  83. package/dist/{render-tjzKaik-.d.ts → render-CrmHOgpo.d.ts} +87 -2
  84. package/dist/{retouch-CEIKR22W.d.cts → retouch-Bxkuc0KH.d.cts} +1 -1
  85. package/dist/{retouch-BXmeSCaB.d.ts → retouch-Do6tBs2H.d.ts} +1 -1
  86. package/dist/{surface-C8RRg_Bh.d.cts → surface-Cn30xIV6.d.cts} +6 -1
  87. package/dist/{surface-C8RRg_Bh.d.ts → surface-Cn30xIV6.d.ts} +6 -1
  88. package/dist/{svg-D_cfkhlB.d.cts → svg-BnRj0q8i.d.cts} +16 -4
  89. package/dist/{svg-wIaKLrU0.d.ts → svg-CmmBFfGT.d.ts} +16 -4
  90. package/dist/{types-DtL_qLFz.d.ts → types-1SUQKDAw.d.ts} +273 -4
  91. package/dist/{types-DyQq-WPY.d.cts → types-yINF17Ta.d.cts} +273 -4
  92. package/dist/vector/index.cjs +12170 -7343
  93. package/dist/vector/index.cjs.map +1 -1
  94. package/dist/vector/index.d.cts +1579 -16
  95. package/dist/vector/index.d.ts +1579 -16
  96. package/dist/vector/index.js +6303 -1476
  97. package/dist/vector/index.js.map +1 -1
  98. package/dist/warp-B39VsOtd.d.cts +348 -0
  99. package/dist/warp-DMN30aY6.d.ts +348 -0
  100. package/dist/zlib-dxQdgHyN.d.cts +95 -0
  101. package/dist/zlib-dxQdgHyN.d.ts +95 -0
  102. package/package.json +6 -1
  103. package/skills/pixerate-image-editor/SKILL.md +12 -36
  104. package/skills/pixerate-image-editor/references/color-management.md +37 -0
  105. package/skills/pixerate-image-editor/references/photoshop-files.md +39 -0
  106. package/skills/pixerate-vector/SKILL.md +54 -2
  107. package/dist/chunk-BLWCAQCW.js.map +0 -1
  108. package/dist/chunk-CZOXTEMN.js.map +0 -1
  109. package/dist/chunk-HNS7UHCM.js.map +0 -1
  110. package/dist/chunk-JLYX4V57.cjs +0 -2001
  111. package/dist/chunk-JLYX4V57.cjs.map +0 -1
  112. package/dist/chunk-KB2YBCVS.js +0 -2001
  113. package/dist/chunk-KB2YBCVS.js.map +0 -1
  114. package/dist/chunk-LQEEDHOP.js.map +0 -1
  115. package/dist/chunk-POGBUYWE.cjs.map +0 -1
  116. package/dist/chunk-W3GXSUSQ.cjs.map +0 -1
  117. package/dist/chunk-XIOMMGPD.cjs.map +0 -1
  118. package/dist/chunk-YGIMK4NX.cjs.map +0 -1
  119. package/dist/homography-CZ-tFjay.d.cts +0 -50
  120. package/dist/homography-Ctfjoc1b.d.ts +0 -50
  121. package/dist/warp-CWHZzE3x.d.ts +0 -118
  122. package/dist/warp-D5jz_tN7.d.cts +0 -118
  123. /package/dist/{chunk-LPYOIVLA.js.map → chunk-LKCYANMW.js.map} +0 -0
  124. /package/dist/{chunk-Z4BC6M74.js.map → chunk-UBIXVXPR.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-tjzKaik-.js';
2
- import { b as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-C8RRg_Bh.js';
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-CrmHOgpo.js';
2
+ import { c as PixelSurface, a as BlendMode, j as TiledSurface, R as RasterRect } from './surface-Cn30xIV6.js';
3
+ import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.js';
3
4
  import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2$1, H as Homography } from './types-CwMPoRMU.js';
4
5
  import { B as BezierPath } from './bezier-DYBvLgUH.js';
5
- import { v as VectorSubpath, n as Vec2 } from './types-DtL_qLFz.js';
6
- 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-BXmeSCaB.js';
7
- import { W as WarpPreset } from './warp-CWHZzE3x.js';
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-DMN30aY6.js';
7
+ import { w as VectorSubpath, o as Vec2 } from './types-1SUQKDAw.js';
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-Do6tBs2H.js';
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>`). */
@@ -2866,6 +2794,9 @@ declare class ImageEditorController {
2866
2794
  */
2867
2795
  private pendingDirty;
2868
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;
2869
2800
  /** Recomputes the compatibility views (`adjustments`, `depthMask`, `annotations`) when the stack changed. */
2870
2801
  private syncViews;
2871
2802
  private stack;
@@ -3240,6 +3171,17 @@ declare class ImageEditorController {
3240
3171
  setGlobalLight(light: Partial<GlobalLight>, commitToHistory?: boolean): GlobalLight;
3241
3172
  /** Composites `layers` (in isolation) over `rect` into a surface, loading depth maps first. */
3242
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
+ };
3243
3185
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
3244
3186
  private paintBounds;
3245
3187
  /**
@@ -3529,6 +3471,8 @@ declare class ImageEditorController {
3529
3471
  includeAnnotations?: boolean;
3530
3472
  }): Promise<HTMLCanvasElement | null>;
3531
3473
  toDataURL(options?: ExportOptions): Promise<string>;
3474
+ /** PNG or JPEG bytes with the document's ICC profile embedded (other formats unchanged). */
3475
+ private withEmbeddedProfile;
3532
3476
  toBlob(options?: ExportOptions): Promise<Blob>;
3533
3477
  renderMask(options?: {
3534
3478
  useAnnotations?: boolean;
@@ -3689,6 +3633,71 @@ declare class ImageEditorController {
3689
3633
  * step. Returns the layer id.
3690
3634
  */
3691
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
+ };
3692
3701
  /** Pixels per inch of the last opened PSD (written back by `toPsd`). */
3693
3702
  private psdResolution;
3694
3703
  /**
@@ -3710,7 +3719,7 @@ declare class ImageEditorController {
3710
3719
  */
3711
3720
  private checkPsdFonts;
3712
3721
  /**
3713
- * 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
3714
3723
  * layers and masks, in the source frame. Layer filters and parametric (depth) masks are baked
3715
3724
  * into pixels and masks, annotation layers are rasterized (in a browser; elsewhere they are left
3716
3725
  * out), and the merged image is our composite. `warnings` lists every such change.
@@ -4031,6 +4040,7 @@ type ImageEditorTool = 'select' | 'crop' | 'pen' | 'rect' | 'circle' | 'arrow' |
4031
4040
  /** Live type layers, edited on the canvas (see `TypeToolGesture`). */
4032
4041
  | 'type';
4033
4042
  type ImageEditorFit = 'contain' | 'margin';
4043
+
4034
4044
  interface ImageEditorState {
4035
4045
  sourceUrl: string | null;
4036
4046
  /** Canvas (document) size in pixels: the source image's natural size. */
@@ -4098,6 +4108,16 @@ interface ImageEditorState {
4098
4108
  layerId: string;
4099
4109
  name: string;
4100
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;
4101
4121
  }
4102
4122
  /**
4103
4123
  * A stored editor state in the document-level schema (versions 1 and 2). Documents whose layer
@@ -4181,6 +4201,12 @@ interface PsdExportInput {
4181
4201
  patterns?: readonly EffectPattern[];
4182
4202
  /** Written as image resources 1037 and 1049. */
4183
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;
4184
4210
  }
4185
4211
  interface PsdExportResult {
4186
4212
  bytes: Uint8Array;
@@ -4193,4 +4219,4 @@ interface PsdExportResult {
4193
4219
  /** Writes the prepared stack as PSD (or PSB) bytes. */
4194
4220
  declare function exportPsd(input: PsdExportInput): PsdExportResult;
4195
4221
 
4196
- 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 LaidLine 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 FillOptions as aA, type FreeTransformContent as aB, type FreeTransformHost as aC, type FreeTransformPreview as aD, GUIDED_FILTER_EPS as aE, type GroupLayer as aF, HISTOGRAM_BINS as aG, type HistogramChannel as aH, type HistoryEntryHandle as aI, type HueSaturationParams as aJ, IMAGE_EDITOR_SCHEMA_VERSION as aK, type ImageAnnotation as aL, type ImageDimensions as aM, type ImageEditorAIHooks as aN, type ImageEditorFit as aO, type ImageEditorOptions as aP, ImageEditorRenderer as aQ, type ImageEditorState as aR, type ImageEditorTool as aS, type ImageLayerType as aT, type InpaintHook as aU, type InpaintOptions as aV, type InvertParams as aW, LAYERED_SCHEMA_VERSION as aX, LIVE_SHAPE_KINDS as aY, type LaidChar as aZ, type LaidFragment as a_, type AspectRatio as aa, type BaseAnnotation as ab, type BlackWhiteParams as ac, type BlurFilter as ad, type CircleAnnotation as ae, type CloneSource as af, type ColorBalanceParams as ag, type ColorBalanceTone as ah, type ColorRangeOptions as ai, type ColorRangeSample as aj, type CreateAnnotationPayload as ak, type CropHandle as al, type CurvesParams as am, DEFAULT_ADJUSTMENTS as an, DEFAULT_AUTO_LEADING as ao, DEFAULT_DEPTH_MASK as ap, DEFAULT_MITER_LIMIT as aq, DEFAULT_REFINE_EDGE_PARAMS as ar, DEFAULT_TEXT_STYLE as as, DEFAULT_TRANSFORM as at, type DeserializeContext as au, type DevelopSettings as av, EMPTY_DISTANCE as aw, type ExportOptions as ax, FREE_TRANSFORM_CONTENTS as ay, FREE_TRANSFORM_MODES as az, type SerializedImageEditorState as b, type SerializedRasterMask as b$, type LayerBase as b0, type LayerBlendMode as b1, type LayerFilterKind as b2, type LayerLocation as b3, type LayerMaskProps as b4, LayerOperationError as b5, type LayerProperties as b6, type LayerSourcesHost as b7, type LayerTarget as b8, type LegacySerializedImageEditorState as b9, type PsdResource as bA, type PsdSmartFilter as bB, type PsdTaggedBlock as bC, type PsdTreeNode as bD, RETOUCH_TOOLS as bE, type RectAnnotation as bF, type RemoveBackgroundHook as bG, type RemoveBackgroundOptions as bH, type RenderOptions as bI, type RetouchStrokeInit as bJ, type RetouchTool as bK, SELECTION_MODES as bL, SELECTION_MODIFY_OPS as bM, SHAPE_OPERATIONS as bN, SHAPE_RENDER_MARGIN as bO, type SampleOptions as bP, type SelectionChannel as bQ, type SelectionCommandOptions as bR, type SelectionModifyOp as bS, type SerializeContext as bT, type SerializedAdjustmentLayer as bU, type SerializedAnnotationLayer as bV, type SerializedGroupLayer as bW, type SerializedLayerEffects as bX, type SerializedLayeredImageEditorState as bY, type SerializedPattern as bZ, type SerializedPixelLayer as b_, type LevelsParams as ba, type LineAnnotation as bb, type LiveShape as bc, type MagicWandOptions as bd, type MixerStrokeInit as be, PARAGRAPH_STYLE_FIELDS as bf, PSD_BLEND_KEYS as bg, type PaintOptions as bh, type PaintStrokeResult as bi, PaintStrokeSession as bj, type ParagraphRun as bk, type PenAnnotation as bl, type PhotoFilterParams as bm, type PixelBuffer as bn, type PixelLayerInit as bo, type PosterizeParams as bp, type PsdChannel as bq, type PsdExportInput as br, type PsdFile as bs, type PsdHeader as bt, type PsdImportOptions as bu, type PsdImportResult as bv, type PsdLayerMask as bw, type PsdLayerRecord as bx, type PsdLayerSummary as by, type PsdRect as bz, type AdjustmentLayer as c, colorRange as c$, type SerializedSelection as c0, type SerializedShapeLayer as c1, type SerializedSmartContents as c2, type SerializedSmartFilter as c3, type SerializedSmartObjectLayer as c4, type SerializedTypeLayer as c5, type ShapeArrowhead as c6, type ShapeComponent as c7, type ShapeEnv as c8, type ShapeFillRule as c9, type TextRun as cA, type ThresholdParams as cB, type ToneRangePreset as cC, type TransformParams as cD, type TransformReadout as cE, type TypeLayerData as cF, type TypePsdData as cG, type VibranceParams as cH, type ViewportMetrics as cI, addLayerEffect as cJ, addLayerFilter as cK, adjustmentNodeAsLayer as cL, anchorPoint as cM, annotationBlend as cN, annotationOfShape as cO, annotationOfType as cP, applyImageProjectionToContext as cQ, applyParams as cR, blurFilter as cS, borderCoverage as cT, boxMean as cU, boxPointOf as cV, buildLayerMaskPlanes as cW, calculateCropDrag as cX, canvasToImagePoint as cY, caretAt as cZ, clampCropToImage as c_, type ShapeGeometryInput as ca, type ShapeLayerData as cb, type ShapeLayerInfo as cc, type ShapeLayerInit as cd, type ShapeLineCap as ce, type ShapeLineJoin as cf, type ShapeOperation as cg, type ShapePaint as ch, type ShapePsdData as ci, type ShapeSelectionOptions as cj, type ShapeStroke as ck, type ShapeStrokeAlign as cl, type ShapeStrokeInput as cm, type SmartFilterKind as cn, type SmartObjectInfo as co, type SmartPsdData as cp, type StrokeInit as cq, type StrokeTool as cr, TEXT_ALIGNS as cs, TEXT_RENDER_MARGIN as ct, TEXT_STYLE_FIELDS as cu, TONE_RANGE_PRESETS as cv, TRANSFORM_ANCHORS as cw, type TextAnnotation as cx, type TextLayerInit as cy, type TextLayout as cz, type AdjustmentParamsMap as d, isIdentityTransform as d$, combineSelections as d0, componentPath as d1, computeHistogram as d2, computeSelectionBounds as d3, contractCoverage as d4, cornersFromMatrix as d5, coverageToByte as d6, createSelectionMask as d7, createShapeLayer as d8, createTypeLayer as d9, fitRuns as dA, flipCorners as dB, fontOf as dC, fullSelection as dD, geometryHomography as dE, getAnnotationBounds as dF, getCropCursor as dG, getRotatedSize as dH, getViewportMetrics as dI, getViewportProjection as dJ, globalImageCache as dK, greyMorphology as dL, groupLayers as dM, guidePlanes as dN, guidedFilterColor as dO, hasSurface as dP, hasWarp as dQ, hashMaskContent as dR, histogramPath as dS, hitTestAnnotation as dT, hitTestCrop as dU, hueRange as dV, identityTransform as dW, imageToCanvasPoint as dX, importPsd as dY, invertSelection as dZ, isActiveFilter as d_, decodeLayerChannel as da, decodeLayerMask as db, decodeMergedImage as dc, decodePngDataUrl as dd, decodeSelectionRle as de, defaultShapeName as df, depthMaskAlpha as dg, describeTransform as dh, deserializeEffects as di, deserializeLayer as dj, deserializeLayers as dk, deserializePatterns as dl, deserializeSelection as dm, developFilter as dn, distanceTransform as dp, duplicateLayer as dq, edgeWidth as dr, ellipsePoints as ds, ellipseSelection as dt, encodeSelectionRle as du, encodeSurface as dv, expandCoverage as dw, exportPsd as dx, featherCoverage as dy, fitParagraphRuns as dz, type AdjustmentLayerMask as e, refineEdgeHalo as e$, isQuarterTurnSwapped as e0, isRenderedLayer as e1, isRetouchTool as e2, isSelectionEmpty as e3, isSelectionMode as e4, isSpatialFilter as e5, isTransformAnchor as e6, isValidWarp as e7, layerEffectsOf as e8, layerMaskCoverage as e9, normalizeShapeStroke as eA, normalizeStoredAdjustments as eB, normalizeSubpaths as eC, normalizeText as eD, offsetLayer as eE, offsetShape as eF, paragraphRanges as eG, parseBlend as eH, parseColor as eI, parseSelectionMode as eJ, patchParagraphStyle as eK, patchTextStyle as eL, pixelLayerBounds as eM, pixelLayers as eN, placeLayer as eO, polygonCoverage as eP, polygonSelection as eQ, presetWarp as eR, previewStep as eS, projectImagePoint as eT, projectImageRect as eU, projectMaskCoverage as eV, psdToLayers as eW, readPsd as eX, rectSelection as eY, referencePoint as eZ, refineCoverage as e_, layerMaskFromSelection as ea, layerMaskKey as eb, layerName as ec, layerTree as ed, layerTypeLabel as ee, layoutText as ef, liveComponent as eg, liveShapeSubpaths as eh, magicWand as ei, mapCropHandle as ej, mapSubpaths as ek, matrixFromCorners as el, matrixFromParams as em, mergeShapeComponents as en, migrateSerializedImageEditorState as eo, migrateToLayeredState as ep, modifySelection as eq, moveLayer as er, newLayerId as es, normalizeAngle as et, normalizeFilter as eu, normalizeLayerMask as ev, normalizeLiveShape as ew, normalizeRect as ex, normalizeRefineEdgeParams as ey, normalizeShapePaint as ez, type AdjustmentLayerOf as f, typeFrame as f$, refineSelection as f0, removeLayer as f1, removeLayerEffect as f2, removeLayerFilter as f3, renderShape as f4, renderShapeRect as f5, renderText as f6, replaceTextRange as f7, requireLayer as f8, requireOperation as f9, setLayerProperties as fA, shapeAsPixelLayer as fB, shapeFromAnnotation as fC, shapeGeometryBounds as fD, shapeLayers as fE, shapeOutline as fF, shapeRenderClip as fG, shiftCoverage as fH, smartObjectLayers as fI, smoothCoverage as fJ, spliceRuns as fK, srgb8ToLab as fL, styleAt as fM, textIndexAt as fN, textMatrix as fO, textOutlines as fP, textRange as fQ, toHex as fR, toTextSpace as fS, toneRange as fT, transformHomography as fU, transformMap as fV, transformShapeComponents as fW, transformTypeLayer as fX, transformedBox as fY, transformedPoint as fZ, typeAsPixelLayer as f_, requireShapeLayer as fa, requireTypeLayer as fb, requireUnlocked as fc, rerenderShape as fd, rerenderText as fe, resizePixels as ff, resizeSelection as fg, resolveExternalAssets as fh, restyleRange as fi, runLayerFilters as fj, selectionArea as fk, selectionFromCoverage as fl, selectionFromPixels as fm, selectionToCoverage as fn, selectionToPixels as fo, selectionValueAt as fp, serializeContents as fq, serializeEffects as fr, serializeLayer as fs, serializeLayers as ft, serializeLayersExternal as fu, serializePatterns as fv, serializeSelection as fw, setLayerEffects as fx, setLayerEffectsEnabled as fy, setLayerMask as fz, ImageEditorController as g, typeFromAnnotation as g0, typeLayerName as g1, ungroupLayer as g2, unionRect as g3, unprojectCanvasPoint as g4, updateLayerEffect as g5, updateLayerFilter as g6, updateLayerMaskProps as g7, updateShapeLayer as g8, updateTypeLayer as g9, withNewIds as ga, writePsd as gb, 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 };