@pixerate/editor 0.113.0 → 0.115.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 (125) hide show
  1. package/THIRD_PARTY_NOTICES.md +8 -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-643B2HKC.cjs +534 -0
  20. package/dist/chunk-643B2HKC.cjs.map +1 -0
  21. package/dist/chunk-6FCKOS2B.js +534 -0
  22. package/dist/chunk-6FCKOS2B.js.map +1 -0
  23. package/dist/chunk-BRLYOPLT.js +2574 -0
  24. package/dist/chunk-BRLYOPLT.js.map +1 -0
  25. package/dist/{chunk-LQEEDHOP.js → chunk-C6C5PDKU.js} +759 -761
  26. package/dist/chunk-C6C5PDKU.js.map +1 -0
  27. package/dist/{chunk-4KLT7ZYS.cjs → chunk-DFQEX3AM.cjs} +29 -29
  28. package/dist/{chunk-4KLT7ZYS.cjs.map → chunk-DFQEX3AM.cjs.map} +1 -1
  29. package/dist/chunk-G5NMLUVF.cjs +2574 -0
  30. package/dist/chunk-G5NMLUVF.cjs.map +1 -0
  31. package/dist/{chunk-YGIMK4NX.cjs → chunk-I7FQBWMQ.cjs} +813 -842
  32. package/dist/chunk-I7FQBWMQ.cjs.map +1 -0
  33. package/dist/{chunk-LPYOIVLA.js → chunk-LKCYANMW.js} +3 -3
  34. package/dist/{chunk-W3GXSUSQ.cjs → chunk-LPLCWZTM.cjs} +5087 -1283
  35. package/dist/chunk-LPLCWZTM.cjs.map +1 -0
  36. package/dist/chunk-MMVHBKMM.js +753 -0
  37. package/dist/chunk-MMVHBKMM.js.map +1 -0
  38. package/dist/{chunk-POGBUYWE.cjs → chunk-ST7E3NEE.cjs} +857 -859
  39. package/dist/chunk-ST7E3NEE.cjs.map +1 -0
  40. package/dist/{chunk-7VOHOPLW.cjs → chunk-TCKIXI46.cjs} +59 -59
  41. package/dist/{chunk-7VOHOPLW.cjs.map → chunk-TCKIXI46.cjs.map} +1 -1
  42. package/dist/{chunk-XIOMMGPD.cjs → chunk-TFOPHZ3U.cjs} +1 -1
  43. package/dist/chunk-TFOPHZ3U.cjs.map +1 -0
  44. package/dist/{chunk-Z4BC6M74.js → chunk-UBIXVXPR.js} +2 -2
  45. package/dist/{chunk-BLWCAQCW.js → chunk-VXR7XWMF.js} +4574 -770
  46. package/dist/chunk-VXR7XWMF.js.map +1 -0
  47. package/dist/{chunk-CZOXTEMN.js → chunk-XICA4PVO.js} +392 -421
  48. package/dist/chunk-XICA4PVO.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-CEXEzqBf.d.cts → export-BJE8T0YA.d.cts} +279 -191
  58. package/dist/{export-DIkoK8-r.d.ts → export-Con3UKkm.d.ts} +279 -191
  59. package/dist/image-editor/index.cjs +1848 -1218
  60. package/dist/image-editor/index.cjs.map +1 -1
  61. package/dist/image-editor/index.d.cts +85 -93
  62. package/dist/image-editor/index.d.ts +85 -93
  63. package/dist/image-editor/index.js +871 -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 +147 -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 +7 -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 +9 -2
  103. package/skills/pixerate-image-editor/SKILL.md +13 -36
  104. package/skills/pixerate-image-editor/references/color-management.md +42 -0
  105. package/skills/pixerate-image-editor/references/photoshop-files.md +41 -0
  106. package/skills/pixerate-paint-editor/SKILL.md +136 -4
  107. package/skills/pixerate-vector/SKILL.md +72 -2
  108. package/dist/chunk-BLWCAQCW.js.map +0 -1
  109. package/dist/chunk-CZOXTEMN.js.map +0 -1
  110. package/dist/chunk-HNS7UHCM.js.map +0 -1
  111. package/dist/chunk-JLYX4V57.cjs +0 -2001
  112. package/dist/chunk-JLYX4V57.cjs.map +0 -1
  113. package/dist/chunk-KB2YBCVS.js +0 -2001
  114. package/dist/chunk-KB2YBCVS.js.map +0 -1
  115. package/dist/chunk-LQEEDHOP.js.map +0 -1
  116. package/dist/chunk-POGBUYWE.cjs.map +0 -1
  117. package/dist/chunk-W3GXSUSQ.cjs.map +0 -1
  118. package/dist/chunk-XIOMMGPD.cjs.map +0 -1
  119. package/dist/chunk-YGIMK4NX.cjs.map +0 -1
  120. package/dist/homography-CZ-tFjay.d.cts +0 -50
  121. package/dist/homography-Ctfjoc1b.d.ts +0 -50
  122. package/dist/warp-CWHZzE3x.d.ts +0 -118
  123. package/dist/warp-D5jz_tN7.d.cts +0 -118
  124. /package/dist/{chunk-LPYOIVLA.js.map → chunk-LKCYANMW.js.map} +0 -0
  125. /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-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 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-CEIKR22W.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,105 @@ 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
+ /**
573
+ * Image › Mode beyond RGB. The document is still edited as RGB in its working space; the mode is
574
+ * what it is for: the viewport soft-proofs through the CMYK profile (unless Proof Setup says
575
+ * otherwise) and PSD export writes CMYK or Lab channels.
576
+ */
577
+ type DocumentColorMode = {
578
+ mode: 'cmyk';
579
+ profile: DocumentColorProfile;
580
+ intent: Intent;
581
+ } | {
582
+ mode: 'lab';
583
+ };
584
+ interface SerializedColorMode {
585
+ mode: 'cmyk' | 'lab';
586
+ profile?: SerializedColorProfile;
587
+ intent?: Intent;
588
+ }
589
+ declare function serializeColorMode(m: DocumentColorMode): SerializedColorMode;
590
+ declare function deserializeColorMode(raw: unknown, problems: string[]): DocumentColorMode | null;
591
+ /** The proof the viewport shows: Proof Setup, else a CMYK document's own profile. */
592
+ declare function effectiveProof(proof: ProofSetup | null | undefined, mode: DocumentColorMode | null | undefined): ProofSetup | null;
593
+ /**
594
+ * RGBA pixels (in the document profile `doc`) as the channel planes of `mode`, for a PSD:
595
+ * CMYK as Photoshop stores it (255 = no ink), Lab with L 0..255 for 0..100 and a, b offset by 128.
596
+ */
597
+ declare function colorModePlanes(doc: DocumentColorProfile | null | undefined, mode: DocumentColorMode): (rgba: Uint8ClampedArray, n: number) => Uint8Array[];
598
+ /** The profile a document profile names (sRGB when missing). Throws `CmsError` for unreadable ICC bytes. */
599
+ declare function resolveProfile(doc: DocumentColorProfile | null | undefined): Profile;
600
+ /** The ICC bytes to embed for a document profile. */
601
+ declare function profileBytes(doc: DocumentColorProfile | null | undefined): Uint8Array;
602
+ /**
603
+ * A document profile from what a user or agent gives: a built-in id or alias ("srgb",
604
+ * "display-p3", "Adobe RGB (1998)", "coated-cmyk", …) or ICC bytes. Throws with the choices.
605
+ */
606
+ declare function documentProfile(input: string | Uint8Array): DocumentColorProfile;
607
+ /** Whether a document profile means sRGB (so the display needs no conversion). */
608
+ declare function isSrgb(doc: DocumentColorProfile | null | undefined): boolean;
609
+ /** JSON form of a document profile. */
610
+ interface SerializedColorProfile {
611
+ builtin?: BuiltinProfileId;
612
+ name: string;
613
+ /** ICC bytes, base64. */
614
+ icc?: string;
615
+ }
616
+ declare function serializeColorProfile(doc: DocumentColorProfile): SerializedColorProfile;
617
+ /** A document profile from JSON, or `null` (with a problem noted) when it cannot be read. */
618
+ declare function deserializeColorProfile(raw: unknown, problems: string[]): DocumentColorProfile | null;
619
+ /** Applies a colour transform to 8-bit RGBA in place (alpha kept). */
620
+ type PixelTransform = (rgba: Uint8ClampedArray) => void;
621
+ /**
622
+ * What the viewport applies to the composite before showing it on an sRGB display: nothing for
623
+ * an sRGB document without proofing; the document → sRGB conversion; or the proof chain
624
+ * document → proof → sRGB, with out-of-gamut colours greyed when asked.
625
+ */
626
+ declare function displayTransform(doc: DocumentColorProfile | null | undefined, proof: ProofSetup | null | undefined): PixelTransform | null;
627
+ /** A `#rrggbb` colour converted between two profiles. */
628
+ declare function convertHex(hex: string, from: Profile, to: Profile, intent?: Intent, bpc?: boolean): string;
629
+ /**
630
+ * A layer surface with every pixel's colour converted through `t` (an RGB → RGB transform):
631
+ * 8-bit tiles through its tables, 16-bit tiles at 16 bits, 32-bit (linear) tiles through the
632
+ * float path. Alpha is kept.
633
+ */
634
+ declare function convertSurfaceColors(surface: TiledSurface, t: Transform): TiledSurface;
635
+
587
636
  /**
588
637
  * Type layers: styled runs of text laid out as point or paragraph text and drawn into the layer's
589
638
  * `surface` by a text shaper.
@@ -597,43 +646,6 @@ declare function smartObjectLayers(layers: readonly ImageLayer[]): SmartObjectLa
597
646
  * and refuse edits that would need drawing them again.
598
647
  */
599
648
 
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
649
  /** What rendering a type layer needs besides the layer. */
638
650
  interface TextEnv {
639
651
  width: number;
@@ -643,101 +655,6 @@ interface TextEnv {
643
655
  /** A 2D canvas for shapers that `draw` (the editor's renderer provides one). */
644
656
  createCanvas?(width: number, height: number): HTMLCanvasElement | OffscreenCanvas;
645
657
  }
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
658
  /** How far beyond the canvas type renders (as shapes). */
742
659
  declare const TEXT_RENDER_MARGIN = 512;
743
660
  /** Text space → document of a layer. */
@@ -869,6 +786,20 @@ interface SerializedPixelLayer extends SerializedLayerBase {
869
786
  filters?: LayerFilter[];
870
787
  /** `'document'`: the pixels are the document's source image (no asset is stored). */
871
788
  source?: 'document';
789
+ /** 16- or 32-bit samples of the pixels (the PNG asset is their 8-bit rendering), see `raster/deep`. */
790
+ deep?: SerializedDeepPixels;
791
+ }
792
+ /**
793
+ * High bit depth pixels: `width × height` interleaved RGBA samples at (`x`, `y`) in layer space,
794
+ * little-endian (`Uint16` for 16-bit, `Float32` linear light for 32-bit), deflated and base64.
795
+ */
796
+ interface SerializedDeepPixels {
797
+ depth: 16 | 32;
798
+ x: number;
799
+ y: number;
800
+ width: number;
801
+ height: number;
802
+ data: string;
872
803
  }
873
804
  interface SerializedAdjustmentLayer extends SerializedLayerBase {
874
805
  type: 'adjustment';
@@ -1014,6 +945,12 @@ interface SerializedLayeredImageEditorState {
1014
945
  patterns?: SerializedPattern[];
1015
946
  /** Contents of the smart objects (nested ones included), each stored once. */
1016
947
  smartContents?: SerializedSmartContents[];
948
+ /** The document's colour profile (missing = sRGB). */
949
+ colorProfile?: SerializedColorProfile;
950
+ /** Image › Mode CMYK or Lab (missing = RGB). */
951
+ colorMode?: SerializedColorMode;
952
+ /** Bits per channel (missing = 8). */
953
+ bitDepth?: 16 | 32;
1017
954
  }
1018
955
  interface SerializedPattern {
1019
956
  id: string;
@@ -1030,6 +967,10 @@ interface EncodedSurface {
1030
967
  }
1031
968
  /** The surface's content (non-default pixels) as a PNG data URL and its position, or `null`. */
1032
969
  declare function encodeSurface(surface: TiledSurface): EncodedSurface | null;
970
+ /** A surface's deep samples over its content, or `null` when it holds only 8-bit tiles. */
971
+ declare function encodeDeepSurface(surface: TiledSurface): SerializedDeepPixels | null;
972
+ /** Puts serialized deep samples into `surface` (the 8-bit rendering read from the PNG); unreadable data leaves it 8-bit. */
973
+ declare function decodeDeepSurface(surface: TiledSurface, raw: unknown, problems: string[], label: string): TiledSurface;
1033
974
  interface SerializeContext {
1034
975
  /** Adds an asset and returns its id. */
1035
976
  addAsset(url: string, hint: string): string;
@@ -1186,6 +1127,12 @@ declare function runLayerFilters(data: Uint8ClampedArray, width: number, height:
1186
1127
  declare class LayerCompositor extends RasterCompositor<ImageLayer, CompositorSources> {
1187
1128
  constructor(options?: CompositorOptions);
1188
1129
  }
1130
+ /**
1131
+ * The composite of an image editor stack at 16 or 32 bits (see `raster/deep-compositor`): float
1132
+ * RGBA over `rect`, sRGB-encoded 0..1 at 16 bits, linear light at 32. Adjustment layers run in
1133
+ * float; layers with effects or filters and annotation layers are drawn at 8 bits.
1134
+ */
1135
+ declare function compositeDeep(layers: readonly ImageLayer[], rect: RasterRect, sources: CompositorSources, depth: 16 | 32): Float32Array;
1189
1136
 
1190
1137
  interface RenderOptions {
1191
1138
  viewportWidth?: number;
@@ -1286,6 +1233,11 @@ declare class ImageEditorRenderer {
1286
1233
  /** Which path the last base render took. */
1287
1234
  lastBaseRoute: 'legacy' | 'layers' | null;
1288
1235
  private comp;
1236
+ /** Colour transform from the document to the display (see `color-management`), or none. */
1237
+ private display;
1238
+ private displayKey;
1239
+ /** Sets the viewport's display transform (document profile → sRGB, or a soft proof); `null` for none. */
1240
+ setDisplayTransform(t: PixelTransform | null): void;
1289
1241
  private depthMaps;
1290
1242
  private assetVersion;
1291
1243
  private scratch;
@@ -1960,6 +1912,17 @@ interface PsdImportResult {
1960
1912
  colorMode: string;
1961
1913
  channels: number;
1962
1914
  };
1915
+ /** The embedded ICC profile (image resource 1039), raw bytes, when the file has one. */
1916
+ iccProfile?: Uint8Array;
1917
+ /** CMYK and Lab files: the mode (and CMYK profile) their pixels were converted from, to write them back. */
1918
+ sourceMode?: {
1919
+ mode: 'cmyk';
1920
+ profile: DocumentColorProfile;
1921
+ } | {
1922
+ mode: 'lab';
1923
+ };
1924
+ /** The bits per channel the layers keep: 16 or 32 for such files (not indexed or bitmap), else 8. */
1925
+ bitDepth: 8 | 16 | 32;
1963
1926
  }
1964
1927
  interface PsdImportOptions {
1965
1928
  /** Makes layer ids (defaults to `psd-<n>`). */
@@ -2866,6 +2829,9 @@ declare class ImageEditorController {
2866
2829
  */
2867
2830
  private pendingDirty;
2868
2831
  private notify;
2832
+ private displayFor;
2833
+ /** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
2834
+ private syncDisplay;
2869
2835
  /** Recomputes the compatibility views (`adjustments`, `depthMask`, `annotations`) when the stack changed. */
2870
2836
  private syncViews;
2871
2837
  private stack;
@@ -3240,6 +3206,17 @@ declare class ImageEditorController {
3240
3206
  setGlobalLight(light: Partial<GlobalLight>, commitToHistory?: boolean): GlobalLight;
3241
3207
  /** Composites `layers` (in isolation) over `rect` into a surface, loading depth maps first. */
3242
3208
  private compositeToSurface;
3209
+ /**
3210
+ * The composite of the layer stack at the document's bit depth (as `compositePixels`, no
3211
+ * canvas): 16-bit sRGB samples, or 32-bit linear float, over `rect` (default the canvas). At 8
3212
+ * bits, the 8-bit composite widened to 16 bits.
3213
+ */
3214
+ compositeDeepPixels(rect?: CropBox): {
3215
+ width: number;
3216
+ height: number;
3217
+ depth: 16 | 32;
3218
+ data: Uint16Array | Float32Array;
3219
+ };
3243
3220
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
3244
3221
  private paintBounds;
3245
3222
  /**
@@ -3529,6 +3506,8 @@ declare class ImageEditorController {
3529
3506
  includeAnnotations?: boolean;
3530
3507
  }): Promise<HTMLCanvasElement | null>;
3531
3508
  toDataURL(options?: ExportOptions): Promise<string>;
3509
+ /** PNG or JPEG bytes with the document's ICC profile embedded (other formats unchanged). */
3510
+ private withEmbeddedProfile;
3532
3511
  toBlob(options?: ExportOptions): Promise<Blob>;
3533
3512
  renderMask(options?: {
3534
3513
  useAnnotations?: boolean;
@@ -3689,6 +3668,89 @@ declare class ImageEditorController {
3689
3668
  * step. Returns the layer id.
3690
3669
  */
3691
3670
  rasterizeLayer(id: string): Promise<string>;
3671
+ /** The document's colour profile: its name, built-in id (or `null` for an embedded profile), colour space, and Image › Mode. */
3672
+ getColorProfile(): {
3673
+ name: string;
3674
+ builtin: BuiltinProfileId | null;
3675
+ colorSpace: ColorSpace;
3676
+ srgb: boolean;
3677
+ mode: 'rgb' | 'cmyk' | 'lab';
3678
+ cmykProfile?: {
3679
+ name: string;
3680
+ builtin: BuiltinProfileId | null;
3681
+ intent: Intent;
3682
+ };
3683
+ };
3684
+ /**
3685
+ * Image › Mode (one undo step): `rgb`, `cmyk` (with a CMYK `profile`, default the coated
3686
+ * CMYK, and the `intent` RGB is separated with) or `lab`. The pixels stay RGB in the working
3687
+ * space; a CMYK document is soft-proofed through its profile in the viewport, and PSD export
3688
+ * writes CMYK or Lab channels. Returns the profile summary.
3689
+ */
3690
+ setColorMode(mode: 'rgb' | 'cmyk' | 'lab', options?: {
3691
+ profile?: string | Uint8Array;
3692
+ intent?: Intent;
3693
+ }): ReturnType<ImageEditorController['getColorProfile']>;
3694
+ /** Resolves a profile argument (built-in id or alias, or ICC bytes) as an RGB document profile. */
3695
+ private rgbProfileArg;
3696
+ /**
3697
+ * Edit › Assign Profile (one undo step): the document's numbers now mean colours in
3698
+ * `profile` (a built-in id such as `display-p3`, or ICC bytes); no pixel changes, so colours
3699
+ * look different unless the profiles match. Returns the new profile.
3700
+ */
3701
+ assignProfile(profile: string | Uint8Array): ReturnType<ImageEditorController['getColorProfile']>;
3702
+ /**
3703
+ * Edit › Convert to Profile (one undo step): every pixel layer's numbers are converted so its
3704
+ * colours stay the same in `profile` (with `intent` and black point compensation), and
3705
+ * `profile` becomes the document's. Shape and type layers, layer effects and adjustment layers
3706
+ * keep their numbers (they are listed in `unconvertedLayerIds`). Returns the profile and the
3707
+ * layers changed.
3708
+ */
3709
+ convertToProfile(profile: string | Uint8Array, options?: {
3710
+ intent?: Intent;
3711
+ bpc?: boolean;
3712
+ }): {
3713
+ profile: ReturnType<ImageEditorController['getColorProfile']>;
3714
+ convertedLayerIds: string[];
3715
+ unconvertedLayerIds: string[];
3716
+ };
3717
+ /**
3718
+ * View › Proof Setup (view state, not an undo step): shows the document as `profile` would
3719
+ * reproduce it, or turns proofing off with `null`. Returns the setup.
3720
+ */
3721
+ setProofSetup(setup: (Partial<Omit<ProofSetup, 'profile'>> & {
3722
+ profile: string | Uint8Array;
3723
+ }) | null): ProofSetup | null;
3724
+ /**
3725
+ * Converts colours (`#rrggbb`) from one profile to another (default from the document's), with
3726
+ * `intent`. For RGB targets returns hex; for others the channel values 0..1 (CMYK, grey, Lab
3727
+ * encoded as L/100, (a+128)/255, (b+128)/255) and, for Lab, L*a*b*.
3728
+ */
3729
+ convertColors(colors: string[], to: string | Uint8Array, options?: {
3730
+ from?: string | Uint8Array;
3731
+ intent?: Intent;
3732
+ bpc?: boolean;
3733
+ }): Array<{
3734
+ input: string;
3735
+ values: number[];
3736
+ hex?: string;
3737
+ lab: [number, number, number];
3738
+ }>;
3739
+ /** The document's bits per channel (8 unless set to 16 or 32). */
3740
+ get bitDepth(): BitDepth;
3741
+ /**
3742
+ * Image › Mode › 8 / 16 / 32 Bits/Channel (one undo step). Going up costs nothing: layers keep
3743
+ * their pixels and read them at the new depth, and edits that understand depth keep the extra
3744
+ * precision from then on. Going down rounds every pixel layer's deep samples to the new depth
3745
+ * (8 bits: their 8-bit rendering; 32 → 16: colour above 1 is clipped). Returns the depth and
3746
+ * the ids of the layers whose pixels changed.
3747
+ */
3748
+ setBitDepth(depth: BitDepth): {
3749
+ bitDepth: BitDepth;
3750
+ changedLayerIds: string[];
3751
+ };
3752
+ /** How `toPsd` writes colour: RGB with the working space, or CMYK / Lab channels for those modes. */
3753
+ private psdColorOptions;
3692
3754
  /** Pixels per inch of the last opened PSD (written back by `toPsd`). */
3693
3755
  private psdResolution;
3694
3756
  /**
@@ -3710,7 +3772,7 @@ declare class ImageEditorController {
3710
3772
  */
3711
3773
  private checkPsdFonts;
3712
3774
  /**
3713
- * The document as an 8-bit RGB PSD (PSB above 30 000 px) with real layers, groups, adjustment
3775
+ * 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
3776
  * layers and masks, in the source frame. Layer filters and parametric (depth) masks are baked
3715
3777
  * into pixels and masks, annotation layers are rasterized (in a browser; elsewhere they are left
3716
3778
  * out), and the merged image is our composite. `warnings` lists every such change.
@@ -4031,6 +4093,7 @@ type ImageEditorTool = 'select' | 'crop' | 'pen' | 'rect' | 'circle' | 'arrow' |
4031
4093
  /** Live type layers, edited on the canvas (see `TypeToolGesture`). */
4032
4094
  | 'type';
4033
4095
  type ImageEditorFit = 'contain' | 'margin';
4096
+
4034
4097
  interface ImageEditorState {
4035
4098
  sourceUrl: string | null;
4036
4099
  /** Canvas (document) size in pixels: the source image's natural size. */
@@ -4098,6 +4161,18 @@ interface ImageEditorState {
4098
4161
  layerId: string;
4099
4162
  name: string;
4100
4163
  }>;
4164
+ /** The document's colour profile (working space); missing means sRGB. Recorded in history and saved. */
4165
+ colorProfile?: DocumentColorProfile;
4166
+ /** View › Proof Setup (view state): soft-proof the viewport through another profile, or `null`. */
4167
+ proofSetup?: ProofSetup | null;
4168
+ /** Image › Mode CMYK or Lab (missing: RGB): what the document is for (see `DocumentColorMode`). Recorded in history and saved. */
4169
+ colorMode?: DocumentColorMode;
4170
+ /**
4171
+ * Bits per channel of the document (Image › Mode): 8 (missing), 16 or 32 (linear float).
4172
+ * Pixel layers keep 16- or 32-bit samples where they have them (see `raster/deep`); the
4173
+ * viewport shows their 8-bit rendering. Recorded in undo history and saved in `toJSON()`.
4174
+ */
4175
+ bitDepth?: BitDepth;
4101
4176
  }
4102
4177
  /**
4103
4178
  * A stored editor state in the document-level schema (versions 1 and 2). Documents whose layer
@@ -4181,6 +4256,19 @@ interface PsdExportInput {
4181
4256
  patterns?: readonly EffectPattern[];
4182
4257
  /** Written as image resources 1037 and 1049. */
4183
4258
  globalLight?: GlobalLight;
4259
+ /**
4260
+ * The file's colour mode (default rgb). For cmyk and lab, `colorPlanes` turns RGBA pixels into
4261
+ * the mode's channel planes (CMYK as Photoshop stores it: 255 is no ink; Lab: L 0..255 for
4262
+ * 0..100, a and b offset by 128).
4263
+ */
4264
+ colorMode?: 'rgb' | 'cmyk' | 'lab';
4265
+ colorPlanes?: (rgba: Uint8ClampedArray, n: number) => Uint8Array[];
4266
+ /** The document's ICC profile, written as image resource 1039. */
4267
+ iccProfile?: Uint8Array;
4268
+ /** Bits per channel to write (default 8): 16 and 32 write the layers' deep samples (see `raster/deep`). */
4269
+ depth?: 8 | 16 | 32;
4270
+ /** The composite at `depth` (RGBA samples: 16-bit sRGB or 32-bit linear), written instead of `merged`. */
4271
+ mergedDeep?: Uint16Array | Float32Array;
4184
4272
  }
4185
4273
  interface PsdExportResult {
4186
4274
  bytes: Uint8Array;
@@ -4193,4 +4281,4 @@ interface PsdExportResult {
4193
4281
  /** Writes the prepared stack as PSD (or PSB) bytes. */
4194
4282
  declare function exportPsd(input: PsdExportInput): PsdExportResult;
4195
4283
 
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 };
4284
+ 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 LayerProperties 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, GUIDED_FILTER_EPS as aA, type GroupLayer as aB, HISTOGRAM_BINS as aC, type HistogramChannel as aD, type HistoryEntryHandle as aE, type HueSaturationParams as aF, IMAGE_EDITOR_SCHEMA_VERSION as aG, type ImageAnnotation as aH, type ImageDimensions as aI, type ImageEditorAIHooks as aJ, type ImageEditorFit as aK, type ImageEditorOptions as aL, ImageEditorRenderer as aM, type ImageEditorState as aN, type ImageEditorTool as aO, type ImageLayerType as aP, type InpaintHook as aQ, type InpaintOptions as aR, type InvertParams as aS, LAYERED_SCHEMA_VERSION as aT, LIVE_SHAPE_KINDS as aU, type LayerBase as aV, type LayerBlendMode as aW, type LayerFilterKind as aX, type LayerLocation as aY, type LayerMaskProps as aZ, LayerOperationError 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 DocumentColorMode as aq, type DocumentColorProfile as ar, EMPTY_DISTANCE as as, type ExportOptions as at, FREE_TRANSFORM_CONTENTS as au, FREE_TRANSFORM_MODES as av, type FillOptions as aw, type FreeTransformContent as ax, type FreeTransformHost as ay, type FreeTransformPreview as az, type SerializedImageEditorState as b, type SerializedSmartContents as b$, type LayerSourcesHost as b0, type LayerTarget as b1, type LegacySerializedImageEditorState as b2, type LevelsParams as b3, type LineAnnotation as b4, type LiveShape as b5, type MagicWandOptions as b6, type MixerStrokeInit as b7, PARAGRAPH_STYLE_FIELDS as b8, PSD_BLEND_KEYS as b9, type RemoveBackgroundHook as bA, type RemoveBackgroundOptions as bB, type RenderOptions as bC, type RetouchStrokeInit as bD, type RetouchTool as bE, SELECTION_MODES as bF, SELECTION_MODIFY_OPS as bG, SHAPE_OPERATIONS as bH, SHAPE_RENDER_MARGIN as bI, type SampleOptions as bJ, type SelectionChannel as bK, type SelectionCommandOptions as bL, type SelectionModifyOp as bM, type SerializeContext as bN, type SerializedAdjustmentLayer as bO, type SerializedAnnotationLayer as bP, type SerializedColorMode as bQ, type SerializedColorProfile as bR, type SerializedDeepPixels as bS, type SerializedGroupLayer as bT, type SerializedLayerEffects as bU, type SerializedLayeredImageEditorState as bV, type SerializedPattern as bW, type SerializedPixelLayer as bX, type SerializedRasterMask as bY, type SerializedSelection as bZ, type SerializedShapeLayer as b_, type PaintOptions as ba, type PaintStrokeResult as bb, PaintStrokeSession as bc, type PenAnnotation as bd, type PhotoFilterParams as be, type PixelBuffer as bf, type PixelLayerInit as bg, type PixelTransform as bh, type PosterizeParams as bi, type ProofSetup as bj, type PsdChannel as bk, type PsdExportInput as bl, type PsdFile as bm, type PsdHeader as bn, type PsdImportOptions as bo, type PsdImportResult as bp, type PsdLayerMask as bq, type PsdLayerRecord as br, type PsdLayerSummary as bs, type PsdRect as bt, type PsdResource as bu, type PsdSmartFilter as bv, type PsdTaggedBlock as bw, type PsdTreeNode as bx, RETOUCH_TOOLS as by, type RectAnnotation as bz, type AdjustmentLayer as c, contractCoverage as c$, type SerializedSmartFilter as c0, type SerializedSmartObjectLayer as c1, type SerializedTypeLayer as c2, type ShapeArrowhead as c3, type ShapeComponent as c4, type ShapeEnv as c5, type ShapeFillRule as c6, type ShapeGeometryInput as c7, type ShapeLayerData as c8, type ShapeLayerInfo as c9, type TypePsdData as cA, type VibranceParams as cB, type ViewportMetrics as cC, addLayerEffect as cD, addLayerFilter as cE, adjustmentNodeAsLayer as cF, anchorPoint as cG, annotationBlend as cH, annotationOfShape as cI, annotationOfType as cJ, applyImageProjectionToContext as cK, applyParams as cL, blurFilter as cM, borderCoverage as cN, boxMean as cO, boxPointOf as cP, buildLayerMaskPlanes as cQ, calculateCropDrag as cR, canvasToImagePoint as cS, clampCropToImage as cT, colorModePlanes as cU, colorRange as cV, combineSelections as cW, componentPath as cX, compositeDeep as cY, computeHistogram as cZ, computeSelectionBounds as c_, type ShapeLayerInit as ca, type ShapeLineCap as cb, type ShapeLineJoin as cc, type ShapeOperation as cd, type ShapePaint as ce, type ShapePsdData as cf, type ShapeSelectionOptions as cg, type ShapeStroke as ch, type ShapeStrokeAlign as ci, type ShapeStrokeInput as cj, type SmartFilterKind as ck, type SmartObjectInfo as cl, type SmartPsdData as cm, type StrokeInit as cn, type StrokeTool 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 ThresholdParams as cv, type ToneRangePreset as cw, type TransformParams as cx, type TransformReadout as cy, type TypeLayerData as cz, type AdjustmentParamsMap as d, isActiveFilter as d$, convertHex as d0, convertSurfaceColors as d1, cornersFromMatrix as d2, coverageToByte as d3, createSelectionMask as d4, createShapeLayer as d5, createTypeLayer as d6, decodeDeepSurface as d7, decodeLayerChannel as d8, decodeLayerMask as d9, expandCoverage as dA, exportPsd as dB, featherCoverage as dC, flipCorners as dD, fullSelection as dE, geometryHomography as dF, getAnnotationBounds as dG, getCropCursor as dH, getRotatedSize as dI, getViewportMetrics as dJ, getViewportProjection as dK, globalImageCache as dL, greyMorphology as dM, groupLayers as dN, guidePlanes as dO, guidedFilterColor as dP, hasSurface as dQ, hasWarp as dR, hashMaskContent as dS, histogramPath as dT, hitTestAnnotation as dU, hitTestCrop as dV, hueRange as dW, identityTransform as dX, imageToCanvasPoint as dY, importPsd as dZ, invertSelection as d_, decodeMergedImage as da, decodePngDataUrl as db, decodeSelectionRle as dc, defaultShapeName as dd, depthMaskAlpha as de, describeTransform as df, deserializeColorMode as dg, deserializeColorProfile as dh, deserializeEffects as di, deserializeLayer as dj, deserializeLayers as dk, deserializePatterns as dl, deserializeSelection as dm, developFilter as dn, displayTransform as dp, distanceTransform as dq, documentProfile as dr, duplicateLayer as ds, edgeWidth as dt, effectiveProof as du, ellipsePoints as dv, ellipseSelection as dw, encodeDeepSurface as dx, encodeSelectionRle as dy, encodeSurface as dz, type AdjustmentLayerMask as e, refineCoverage as e$, isIdentityTransform as e0, isQuarterTurnSwapped as e1, isRenderedLayer as e2, isRetouchTool as e3, isSelectionEmpty as e4, isSelectionMode as e5, isSpatialFilter as e6, isSrgb as e7, isTransformAnchor as e8, isValidWarp as e9, normalizeShapePaint as eA, normalizeShapeStroke as eB, normalizeStoredAdjustments as eC, normalizeSubpaths as eD, normalizeText as eE, offsetLayer as eF, offsetShape 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, profileBytes as eT, projectImagePoint as eU, projectImageRect as eV, projectMaskCoverage as eW, psdToLayers as eX, readPsd as eY, rectSelection as eZ, referencePoint as e_, layerEffectsOf as ea, layerMaskCoverage as eb, layerMaskFromSelection as ec, layerMaskKey as ed, layerName as ee, layerTree as ef, layerTypeLabel as eg, liveComponent as eh, liveShapeSubpaths as ei, magicWand as ej, mapCropHandle as ek, mapSubpaths as el, matrixFromCorners as em, matrixFromParams as en, mergeShapeComponents as eo, migrateSerializedImageEditorState as ep, migrateToLayeredState as eq, modifySelection as er, moveLayer as es, newLayerId as et, normalizeAngle as eu, normalizeFilter as ev, normalizeLayerMask as ew, normalizeLiveShape as ex, normalizeRect as ey, normalizeRefineEdgeParams as ez, type AdjustmentLayerOf as f, typeFrame as f$, refineEdgeHalo as f0, refineSelection as f1, removeLayer as f2, removeLayerEffect as f3, removeLayerFilter as f4, renderShape as f5, renderShapeRect as f6, renderText as f7, replaceTextRange as f8, requireLayer as f9, setLayerEffects as fA, setLayerEffectsEnabled as fB, setLayerMask as fC, setLayerProperties as fD, shapeAsPixelLayer as fE, shapeFromAnnotation as fF, shapeGeometryBounds as fG, shapeLayers as fH, shapeOutline as fI, shapeRenderClip as fJ, shiftCoverage as fK, smartObjectLayers as fL, smoothCoverage as fM, srgb8ToLab 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_, requireOperation as fa, requireShapeLayer as fb, requireTypeLayer as fc, requireUnlocked as fd, rerenderShape as fe, rerenderText as ff, resizePixels as fg, resizeSelection as fh, resolveExternalAssets as fi, resolveProfile as fj, runLayerFilters as fk, selectionArea as fl, selectionFromCoverage as fm, selectionFromPixels as fn, selectionToCoverage as fo, selectionToPixels as fp, selectionValueAt as fq, serializeColorMode as fr, serializeColorProfile as fs, serializeContents as ft, serializeEffects as fu, serializeLayer as fv, serializeLayers as fw, serializeLayersExternal as fx, serializePatterns as fy, serializeSelection 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 };