@pixerate/editor 0.22.0 → 0.24.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.
- package/README.md +175 -2
- package/THIRD_PARTY_NOTICES.md +139 -0
- package/dist/agent/index.cjs +87 -111
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +70 -211
- package/dist/agent/index.d.ts +70 -211
- package/dist/agent/index.js +78 -102
- package/dist/agent/index.js.map +1 -1
- package/dist/arrangeShortcuts-B8O3f8-P.d.cts +184 -0
- package/dist/arrangeShortcuts-sLlD2rSX.d.ts +184 -0
- package/dist/canvas/index.cjs +2075 -86
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +608 -186
- package/dist/canvas/index.d.ts +608 -186
- package/dist/canvas/index.js +2060 -71
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-26BVFKHU.cjs +453 -0
- package/dist/chunk-26BVFKHU.cjs.map +1 -0
- package/dist/chunk-2H7ZHPEJ.js +762 -0
- package/dist/chunk-2H7ZHPEJ.js.map +1 -0
- package/dist/{chunk-DENSCKFC.js → chunk-3CN2WD3X.js} +1730 -189
- package/dist/chunk-3CN2WD3X.js.map +1 -0
- package/dist/{chunk-JJDLPEWL.js → chunk-3LV6RRPH.js} +2 -2
- package/dist/{chunk-MJZBNWG7.js → chunk-5S3Z4PPF.js} +78 -557
- package/dist/chunk-5S3Z4PPF.js.map +1 -0
- package/dist/chunk-664LQYFJ.js +115 -0
- package/dist/chunk-664LQYFJ.js.map +1 -0
- package/dist/chunk-7DWMJCAT.js +453 -0
- package/dist/chunk-7DWMJCAT.js.map +1 -0
- package/dist/chunk-ARRTP33I.js +101 -0
- package/dist/chunk-ARRTP33I.js.map +1 -0
- package/dist/chunk-CPOKFNBG.cjs +101 -0
- package/dist/chunk-CPOKFNBG.cjs.map +1 -0
- package/dist/{chunk-AA4ZEVCC.cjs → chunk-D27YFC46.cjs} +101 -580
- package/dist/chunk-D27YFC46.cjs.map +1 -0
- package/dist/chunk-D6FH2YAX.cjs +131 -0
- package/dist/chunk-D6FH2YAX.cjs.map +1 -0
- package/dist/{chunk-4SUNJZWB.cjs → chunk-FD4LPFAE.cjs} +48 -200
- package/dist/chunk-FD4LPFAE.cjs.map +1 -0
- package/dist/chunk-FODNLX5N.js +749 -0
- package/dist/chunk-FODNLX5N.js.map +1 -0
- package/dist/{chunk-OYXSKQFR.js → chunk-FPENXAEJ.js} +35 -187
- package/dist/chunk-FPENXAEJ.js.map +1 -0
- package/dist/chunk-G2I4QJOT.cjs +762 -0
- package/dist/chunk-G2I4QJOT.cjs.map +1 -0
- package/dist/chunk-HLIMTC6N.js +1 -0
- package/dist/chunk-HLIMTC6N.js.map +1 -0
- package/dist/{chunk-QGHGJ56O.js → chunk-ITBSKI26.js} +1483 -19
- package/dist/chunk-ITBSKI26.js.map +1 -0
- package/dist/{chunk-6M3BCTBD.cjs → chunk-MA2F5KHF.cjs} +470 -242
- package/dist/chunk-MA2F5KHF.cjs.map +1 -0
- package/dist/{chunk-SAZRENEZ.cjs → chunk-MCSJFWAO.cjs} +1733 -192
- package/dist/chunk-MCSJFWAO.cjs.map +1 -0
- package/dist/chunk-MKA3AHLV.cjs +256 -0
- package/dist/chunk-MKA3AHLV.cjs.map +1 -0
- package/dist/chunk-OLZJXL4R.cjs +749 -0
- package/dist/chunk-OLZJXL4R.cjs.map +1 -0
- package/dist/chunk-OXSV64JX.js +689 -0
- package/dist/chunk-OXSV64JX.js.map +1 -0
- package/dist/chunk-P3RQ5UJE.cjs +689 -0
- package/dist/chunk-P3RQ5UJE.cjs.map +1 -0
- package/dist/chunk-P6ODPZ4W.js +256 -0
- package/dist/chunk-P6ODPZ4W.js.map +1 -0
- package/dist/chunk-PGNZKFQS.js +685 -0
- package/dist/chunk-PGNZKFQS.js.map +1 -0
- package/dist/chunk-PL4JB3BF.cjs +1 -0
- package/dist/chunk-PL4JB3BF.cjs.map +1 -0
- package/dist/{chunk-GVSMRPHB.cjs → chunk-SBCZ6RN5.cjs} +1568 -104
- package/dist/chunk-SBCZ6RN5.cjs.map +1 -0
- package/dist/{chunk-CL37JGFW.cjs → chunk-SML64VJG.cjs} +4 -4
- package/dist/{chunk-CL37JGFW.cjs.map → chunk-SML64VJG.cjs.map} +1 -1
- package/dist/chunk-TNNJXF46.cjs +115 -0
- package/dist/chunk-TNNJXF46.cjs.map +1 -0
- package/dist/chunk-U5HZSFCS.js +131 -0
- package/dist/chunk-U5HZSFCS.js.map +1 -0
- package/dist/{chunk-RU52I7QO.js → chunk-U5KWZU4X.js} +388 -160
- package/dist/chunk-U5KWZU4X.js.map +1 -0
- package/dist/chunk-XNORY7M6.cjs +685 -0
- package/dist/chunk-XNORY7M6.cjs.map +1 -0
- package/dist/commands/index.cjs +860 -0
- package/dist/commands/index.cjs.map +1 -0
- package/dist/commands/index.d.cts +244 -0
- package/dist/commands/index.d.ts +244 -0
- package/dist/commands/index.js +860 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/comment-store-BEMgVlAA.d.cts +135 -0
- package/dist/comment-store-BEMgVlAA.d.ts +135 -0
- package/dist/compare/index.cjs +15 -0
- package/dist/compare/index.cjs.map +1 -0
- package/dist/compare/index.d.cts +58 -0
- package/dist/compare/index.d.ts +58 -0
- package/dist/compare/index.js +15 -0
- package/dist/compare/index.js.map +1 -0
- package/dist/{controller-B7GIybc4.d.cts → controller-BhLLAoi8.d.cts} +119 -5
- package/dist/{controller-B7GIybc4.d.ts → controller-BhLLAoi8.d.ts} +119 -5
- package/dist/documents-BQjzJNe2.d.ts +76 -0
- package/dist/documents-KRTPhvst.d.cts +76 -0
- package/dist/extensions/index.cjs +53 -5
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +7 -3
- package/dist/extensions/index.d.ts +7 -3
- package/dist/extensions/index.js +52 -4
- package/dist/generation/index.cjs +1373 -0
- package/dist/generation/index.cjs.map +1 -0
- package/dist/generation/index.d.cts +554 -0
- package/dist/generation/index.d.ts +554 -0
- package/dist/generation/index.js +1373 -0
- package/dist/generation/index.js.map +1 -0
- package/dist/grammar/index.cjs +48 -3
- package/dist/grammar/index.cjs.map +1 -1
- package/dist/grammar/index.d.cts +322 -100
- package/dist/grammar/index.d.ts +322 -100
- package/dist/grammar/index.js +54 -9
- package/dist/history/index.cjs +12 -2
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +211 -7
- package/dist/history/index.d.ts +211 -7
- package/dist/history/index.js +13 -3
- package/dist/image-editor/index.cjs +2244 -38
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +742 -4
- package/dist/image-editor/index.d.ts +742 -4
- package/dist/image-editor/index.js +2222 -16
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{index-CCr_z9kF.d.cts → index-BhJBSm2d.d.cts} +370 -4
- package/dist/{index-Ck6ajwXh.d.ts → index-fJrlkJCd.d.ts} +370 -4
- package/dist/index.cjs +193 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -48
- package/dist/index.d.ts +17 -48
- package/dist/index.js +198 -103
- package/dist/index.js.map +1 -1
- package/dist/migrate-iTlm3a8h.d.cts +112 -0
- package/dist/migrate-iTlm3a8h.d.ts +112 -0
- package/dist/persistence/index.cjs +676 -0
- package/dist/persistence/index.cjs.map +1 -0
- package/dist/persistence/index.d.cts +347 -0
- package/dist/persistence/index.d.ts +347 -0
- package/dist/persistence/index.js +676 -0
- package/dist/persistence/index.js.map +1 -0
- package/dist/registry-BDe-vlv3.d.ts +171 -0
- package/dist/registry-D32LpIc4.d.cts +354 -0
- package/dist/registry-DnzpgY27.d.cts +171 -0
- package/dist/registry-evKTP4ls.d.ts +354 -0
- package/dist/schema-DYDGdYL9.d.cts +41 -0
- package/dist/schema-DYDGdYL9.d.ts +41 -0
- package/dist/serializers/index.cjs +4 -3
- package/dist/serializers/index.cjs.map +1 -1
- package/dist/serializers/index.d.cts +2 -1
- package/dist/serializers/index.d.ts +2 -1
- package/dist/serializers/index.js +3 -2
- package/dist/sourcemap-C8AH3MBQ.d.cts +91 -0
- package/dist/sourcemap-DA1Evhrv.d.ts +91 -0
- package/dist/spreadsheet/index.cjs +53 -3
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +247 -18
- package/dist/spreadsheet/index.d.ts +247 -18
- package/dist/spreadsheet/index.js +58 -8
- package/dist/{tokens-CyLZmIei.d.cts → tokens-D7yXvUU6.d.cts} +15 -2
- package/dist/{tokens-CyLZmIei.d.ts → tokens-D7yXvUU6.d.ts} +15 -2
- package/dist/{track-changes-BSF58RK0.d.cts → track-changes-BK5sVf4_.d.cts} +18 -136
- package/dist/{track-changes-BSF58RK0.d.ts → track-changes-CDjCrwKe.d.ts} +18 -136
- package/dist/{types-CJ4U-HHI.d.ts → types-DX4Mh4SL.d.cts} +1 -1
- package/dist/{types-CJ4U-HHI.d.cts → types-DX4Mh4SL.d.ts} +1 -1
- package/dist/types-GT5a5YAX.d.cts +86 -0
- package/dist/types-GT5a5YAX.d.ts +86 -0
- package/package.json +23 -2
- package/dist/chunk-2TWGLC5K.cjs +0 -262
- package/dist/chunk-2TWGLC5K.cjs.map +0 -1
- package/dist/chunk-4SUNJZWB.cjs.map +0 -1
- package/dist/chunk-6M3BCTBD.cjs.map +0 -1
- package/dist/chunk-AA4ZEVCC.cjs.map +0 -1
- package/dist/chunk-AXV2ZW34.cjs +0 -118
- package/dist/chunk-AXV2ZW34.cjs.map +0 -1
- package/dist/chunk-B2ZRLN4S.js +0 -118
- package/dist/chunk-B2ZRLN4S.js.map +0 -1
- package/dist/chunk-DENSCKFC.js.map +0 -1
- package/dist/chunk-GVSMRPHB.cjs.map +0 -1
- package/dist/chunk-KAADNAPF.js +0 -262
- package/dist/chunk-KAADNAPF.js.map +0 -1
- package/dist/chunk-MJZBNWG7.js.map +0 -1
- package/dist/chunk-OYXSKQFR.js.map +0 -1
- package/dist/chunk-QGHGJ56O.js.map +0 -1
- package/dist/chunk-RU52I7QO.js.map +0 -1
- package/dist/chunk-SAZRENEZ.cjs.map +0 -1
- package/dist/types-BZgcDsC5.d.cts +0 -42
- package/dist/types-BZgcDsC5.d.ts +0 -42
- /package/dist/{chunk-JJDLPEWL.js.map → chunk-3LV6RRPH.js.map} +0 -0
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
import { b as LoadReport, J as JsonObject, f as MigrationStep } from '../migrate-iTlm3a8h.cjs';
|
|
2
|
+
import { A as AgentToolProvider } from '../registry-DnzpgY27.cjs';
|
|
3
|
+
import '../schema-DYDGdYL9.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Photoshop blend modes on straight (non-premultiplied) 0..1 colours.
|
|
7
|
+
*
|
|
8
|
+
* Formulas follow the W3C Compositing / ISO 32000 definitions, with Photoshop's variants where
|
|
9
|
+
* they differ (Soft Light, Vivid / Linear / Pin Light, Hard Mix, Linear Burn / Dodge, Subtract,
|
|
10
|
+
* Divide, Darker / Lighter Color), and the hardened `ClipColor` for the non-separable modes.
|
|
11
|
+
*/
|
|
12
|
+
type BlendMode = 'normal' | 'darken' | 'multiply' | 'color-burn' | 'linear-burn' | 'darker-color' | 'lighten' | 'screen' | 'color-dodge' | 'linear-dodge' | 'lighter-color' | 'overlay' | 'soft-light' | 'hard-light' | 'vivid-light' | 'linear-light' | 'pin-light' | 'hard-mix' | 'difference' | 'exclusion' | 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
13
|
+
interface BlendModeInfo {
|
|
14
|
+
id: BlendMode;
|
|
15
|
+
label: string;
|
|
16
|
+
/** Canvas `globalCompositeOperation` with the same maths, when there is one. */
|
|
17
|
+
canvas: GlobalCompositeOperation | null;
|
|
18
|
+
}
|
|
19
|
+
/** Every blend mode, in Photoshop's menu order. */
|
|
20
|
+
declare const BLEND_MODES: readonly BlendModeInfo[];
|
|
21
|
+
declare function isBlendMode(value: unknown): value is BlendMode;
|
|
22
|
+
/** A stored blend mode, or `normal` for a missing / unknown value. */
|
|
23
|
+
declare function normalizeBlendMode(value: unknown): BlendMode;
|
|
24
|
+
/**
|
|
25
|
+
* The canvas composite operation that implements `mode` exactly, or `null` when the canvas has
|
|
26
|
+
* none (draw through {@link blendImageData} instead).
|
|
27
|
+
*/
|
|
28
|
+
declare function canvasCompositeOperation(mode: BlendMode | undefined): GlobalCompositeOperation | null;
|
|
29
|
+
/** Whether a mode works on whole colours (hue, saturation, colour, luminosity, darker / lighter colour). */
|
|
30
|
+
declare function isSeparableBlendMode(mode: BlendMode): boolean;
|
|
31
|
+
/** Separable blend function `B(cb, cs)` of one channel. Non-separable modes return `cs`. */
|
|
32
|
+
declare function blendChannel(mode: BlendMode, cb: number, cs: number): number;
|
|
33
|
+
type Rgb$1 = [number, number, number];
|
|
34
|
+
type Rgba = [number, number, number, number];
|
|
35
|
+
/** Luminosity of the non-separable modes (W3C / ISO 32000 weights). */
|
|
36
|
+
declare function blendLum(c: readonly number[]): number;
|
|
37
|
+
/** `c` with its luminosity moved to `l`, clipped back into gamut towards grey (SetLum + ClipColor). */
|
|
38
|
+
declare function setLum(c: readonly number[], l: number): Rgb$1;
|
|
39
|
+
/** `B(Cb, Cs)` of a whole colour, including the non-separable modes. */
|
|
40
|
+
declare function blendRgb(mode: BlendMode, cb: readonly number[], cs: readonly number[]): Rgb$1;
|
|
41
|
+
/**
|
|
42
|
+
* Composites a straight-alpha `source` over a straight-alpha `backdrop` (both RGBA in 0..1) with a
|
|
43
|
+
* blend mode and an extra `alpha` (opacity), using the W3C general formula:
|
|
44
|
+
* `αo = αs + αb(1 − αs)`, `αo·Co = (1 − αs)·αb·Cb + (1 − αb)·αs·Cs + αs·αb·B(Cb, Cs)`.
|
|
45
|
+
*/
|
|
46
|
+
declare function blendPixel(mode: BlendMode, backdrop: readonly number[], source: readonly number[], alpha?: number): Rgba;
|
|
47
|
+
/**
|
|
48
|
+
* Blends `source` into `backdrop` in place (8-bit straight RGBA of the same size) with
|
|
49
|
+
* {@link blendPixel}. The scalar fallback for modes the canvas cannot composite.
|
|
50
|
+
*/
|
|
51
|
+
declare function blendImageData(backdrop: ImageData, source: ImageData, mode: BlendMode, alpha?: number): void;
|
|
52
|
+
|
|
1
53
|
interface ImageDimensions {
|
|
2
54
|
width: number;
|
|
3
55
|
height: number;
|
|
@@ -24,9 +76,150 @@ interface ImageAdjustments {
|
|
|
24
76
|
saturation: number;
|
|
25
77
|
exposure: number;
|
|
26
78
|
temperature: number;
|
|
79
|
+
/**
|
|
80
|
+
* -100 (green) to 100 (magenta), 0 is default. White-balance tint correction in Duv × 3000
|
|
81
|
+
* (process 2 only; the legacy process ignores it).
|
|
82
|
+
*/
|
|
83
|
+
tint?: number;
|
|
27
84
|
blur: number;
|
|
28
85
|
opacity: number;
|
|
86
|
+
/**
|
|
87
|
+
* Rendering process the values are interpreted by. `2` (the latest; new edits and Reset get
|
|
88
|
+
* it): linear-light exposure, Bradford white balance, LUT tone curve without intermediate
|
|
89
|
+
* clipping. `1` or missing: the legacy 8-bit rendering, so edits saved before process
|
|
90
|
+
* versions existed look exactly as they did. See `normalizeProcessVersion`.
|
|
91
|
+
*/
|
|
92
|
+
process?: 1 | 2;
|
|
93
|
+
/**
|
|
94
|
+
* Non-destructive adjustment layers, evaluated bottom (first) to top (last) after the base
|
|
95
|
+
* adjustments above, on the encoded sRGB result. Missing or empty: no layers (edits saved
|
|
96
|
+
* before layers existed render exactly as before).
|
|
97
|
+
*/
|
|
98
|
+
layers?: AdjustmentLayer[];
|
|
99
|
+
}
|
|
100
|
+
type AdjustmentKind = 'curves' | 'levels' | 'hueSaturation' | 'vibrance' | 'colorBalance' | 'blackWhite' | 'invert' | 'posterize' | 'threshold' | 'photoFilter';
|
|
101
|
+
/** A Curves point; `input` and `output` are levels, 0..255. */
|
|
102
|
+
interface CurvePoint {
|
|
103
|
+
input: number;
|
|
104
|
+
output: number;
|
|
105
|
+
}
|
|
106
|
+
/** Curves: each channel's curve first, then the master (composite) curve, as in Photoshop. */
|
|
107
|
+
interface CurvesParams {
|
|
108
|
+
master: CurvePoint[];
|
|
109
|
+
red: CurvePoint[];
|
|
110
|
+
green: CurvePoint[];
|
|
111
|
+
blue: CurvePoint[];
|
|
112
|
+
}
|
|
113
|
+
/** One Levels record. Black / white points are levels (0..255); `gamma` is the midtone slider (0.1..9.99). */
|
|
114
|
+
interface LevelsChannel {
|
|
115
|
+
inBlack: number;
|
|
116
|
+
inWhite: number;
|
|
117
|
+
gamma: number;
|
|
118
|
+
outBlack: number;
|
|
119
|
+
outWhite: number;
|
|
120
|
+
}
|
|
121
|
+
/** Levels: each channel's record first, then the master record, as in Photoshop. */
|
|
122
|
+
interface LevelsParams {
|
|
123
|
+
master: LevelsChannel;
|
|
124
|
+
red: LevelsChannel;
|
|
125
|
+
green: LevelsChannel;
|
|
126
|
+
blue: LevelsChannel;
|
|
127
|
+
}
|
|
128
|
+
/** One of Hue/Saturation's six colour ranges (reds, yellows, greens, cyans, blues, magentas). */
|
|
129
|
+
interface HueRange {
|
|
130
|
+
/** Hue shift in degrees (-180..180). */
|
|
131
|
+
hue: number;
|
|
132
|
+
/** Saturation change in percent (-100..100). */
|
|
133
|
+
saturation: number;
|
|
134
|
+
/** Lightness change in percent (-100..100). */
|
|
135
|
+
lightness: number;
|
|
136
|
+
/** Hue degrees where the range starts fading in, is fully on, starts fading out and ends (may wrap). */
|
|
137
|
+
bounds: [number, number, number, number];
|
|
138
|
+
}
|
|
139
|
+
interface HueSaturationParams {
|
|
140
|
+
/** Master hue shift in degrees (-180..180), or the hue when colorizing (0..360). */
|
|
141
|
+
hue: number;
|
|
142
|
+
/** Percent, -100..100 (0..100 when colorizing). */
|
|
143
|
+
saturation: number;
|
|
144
|
+
/** Percent, -100..100. */
|
|
145
|
+
lightness: number;
|
|
146
|
+
colorize: boolean;
|
|
147
|
+
/** Six ranges: reds, yellows, greens, cyans, blues, magentas. */
|
|
148
|
+
ranges: HueRange[];
|
|
149
|
+
}
|
|
150
|
+
interface VibranceParams {
|
|
151
|
+
/** -100..100 */
|
|
152
|
+
vibrance: number;
|
|
153
|
+
/** -100..100 */
|
|
154
|
+
saturation: number;
|
|
155
|
+
}
|
|
156
|
+
/** Cyan–red, magenta–green, yellow–blue sliders, -100..100 each. */
|
|
157
|
+
type ColorBalanceTone = [number, number, number];
|
|
158
|
+
interface ColorBalanceParams {
|
|
159
|
+
shadows: ColorBalanceTone;
|
|
160
|
+
midtones: ColorBalanceTone;
|
|
161
|
+
highlights: ColorBalanceTone;
|
|
162
|
+
preserveLuminosity: boolean;
|
|
163
|
+
}
|
|
164
|
+
/** Black & White: percent weights of the six colours (Photoshop defaults 40 60 40 60 20 80). */
|
|
165
|
+
interface BlackWhiteParams {
|
|
166
|
+
reds: number;
|
|
167
|
+
yellows: number;
|
|
168
|
+
greens: number;
|
|
169
|
+
cyans: number;
|
|
170
|
+
blues: number;
|
|
171
|
+
magentas: number;
|
|
172
|
+
/** Tint colour (`#rrggbb`), applied like the Color blend mode, or `null` for none. */
|
|
173
|
+
tint: string | null;
|
|
174
|
+
}
|
|
175
|
+
interface PhotoFilterParams {
|
|
176
|
+
/** Filter colour, `#rrggbb`. */
|
|
177
|
+
color: string;
|
|
178
|
+
/** Percent, 0..100. */
|
|
179
|
+
density: number;
|
|
180
|
+
preserveLuminosity: boolean;
|
|
181
|
+
}
|
|
182
|
+
interface PosterizeParams {
|
|
183
|
+
/** 2..255 */
|
|
184
|
+
levels: number;
|
|
185
|
+
}
|
|
186
|
+
interface ThresholdParams {
|
|
187
|
+
/** 1..255: luma at or above it becomes white. */
|
|
188
|
+
level: number;
|
|
189
|
+
}
|
|
190
|
+
type InvertParams = Record<string, never>;
|
|
191
|
+
interface AdjustmentParamsMap {
|
|
192
|
+
curves: CurvesParams;
|
|
193
|
+
levels: LevelsParams;
|
|
194
|
+
hueSaturation: HueSaturationParams;
|
|
195
|
+
vibrance: VibranceParams;
|
|
196
|
+
colorBalance: ColorBalanceParams;
|
|
197
|
+
blackWhite: BlackWhiteParams;
|
|
198
|
+
invert: InvertParams;
|
|
199
|
+
posterize: PosterizeParams;
|
|
200
|
+
threshold: ThresholdParams;
|
|
201
|
+
photoFilter: PhotoFilterParams;
|
|
202
|
+
}
|
|
203
|
+
interface AdjustmentLayerBase {
|
|
204
|
+
id: string;
|
|
205
|
+
/** Optional display name. */
|
|
206
|
+
name?: string;
|
|
207
|
+
enabled: boolean;
|
|
208
|
+
/** 0..1 */
|
|
209
|
+
opacity: number;
|
|
210
|
+
/** How the adjusted colour is blended over the layers below. */
|
|
211
|
+
blend: BlendMode;
|
|
29
212
|
}
|
|
213
|
+
/** A non-destructive adjustment layer (Photoshop's Layer › New Adjustment Layer). */
|
|
214
|
+
type AdjustmentLayer = {
|
|
215
|
+
[K in AdjustmentKind]: AdjustmentLayerBase & {
|
|
216
|
+
kind: K;
|
|
217
|
+
params: AdjustmentParamsMap[K];
|
|
218
|
+
};
|
|
219
|
+
}[AdjustmentKind];
|
|
220
|
+
type AdjustmentLayerOf<K extends AdjustmentKind> = Extract<AdjustmentLayer, {
|
|
221
|
+
kind: K;
|
|
222
|
+
}>;
|
|
30
223
|
interface DepthMaskOptions {
|
|
31
224
|
enabled: boolean;
|
|
32
225
|
maskSource: string | null;
|
|
@@ -43,6 +236,8 @@ interface BaseAnnotation {
|
|
|
43
236
|
y: number;
|
|
44
237
|
rotation?: number;
|
|
45
238
|
opacity?: number;
|
|
239
|
+
/** Blend mode the annotation is drawn with (default `normal`). */
|
|
240
|
+
blend?: BlendMode;
|
|
46
241
|
}
|
|
47
242
|
interface PenAnnotation extends BaseAnnotation {
|
|
48
243
|
type: 'pen';
|
|
@@ -113,7 +308,11 @@ interface ImageEditorState {
|
|
|
113
308
|
isOriginalCompared: boolean;
|
|
114
309
|
}
|
|
115
310
|
interface SerializedImageEditorState {
|
|
116
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Schema version. `2` adds `adjustments.layers`; states without layers are still written as
|
|
313
|
+
* `1` so they round-trip unchanged. See `migrateSerializedImageEditorState`.
|
|
314
|
+
*/
|
|
315
|
+
version: 1 | 2;
|
|
117
316
|
crop: CropBox | null;
|
|
118
317
|
transform: ImageTransform;
|
|
119
318
|
adjustments: ImageAdjustments;
|
|
@@ -150,10 +349,27 @@ interface ImageEditorAIHooks {
|
|
|
150
349
|
}
|
|
151
350
|
|
|
152
351
|
/**
|
|
153
|
-
* Applies color and tone adjustments (brightness, contrast, saturation, exposure, temperature,
|
|
154
|
-
* directly to the pixel data of an ImageData buffer.
|
|
352
|
+
* Applies color and tone adjustments (brightness, contrast, saturation, exposure, temperature, tint,
|
|
353
|
+
* opacity, then any adjustment `layers`, then blur) directly to the pixel data of an ImageData buffer.
|
|
354
|
+
*
|
|
355
|
+
* `adjustments.process` selects the rendering: `2` is the linear-light pipeline
|
|
356
|
+
* ({@link applyProcess2Adjustments}); anything else (including a missing value, as in edits saved
|
|
357
|
+
* before process versions existed) is the frozen legacy rendering ({@link applyLegacyAdjustments}).
|
|
155
358
|
*/
|
|
156
359
|
declare function applyAdjustments(imageData: ImageData, adjustments: ImageAdjustments): void;
|
|
360
|
+
/**
|
|
361
|
+
* Process 1: the original 8-bit gamma-space rendering, clamping after every step. Frozen so
|
|
362
|
+
* that edits saved without a `process` look exactly as they always have. `tint` is ignored.
|
|
363
|
+
*/
|
|
364
|
+
declare function applyLegacyAdjustments(imageData: ImageData, adjustments: ImageAdjustments): void;
|
|
365
|
+
/**
|
|
366
|
+
* Process 2: decode sRGB to linear float once; apply exposure (gain) and white balance (a
|
|
367
|
+
* Bradford matrix relative to as-shot) in linear light; a per-channel tone LUT for the
|
|
368
|
+
* highlight shoulder, contrast and brightness; luminance-preserving saturation in linear light;
|
|
369
|
+
* then encode back to sRGB through a LUT. Nothing is clamped between stages, only at the final
|
|
370
|
+
* encode. Neutral settings are the identity.
|
|
371
|
+
*/
|
|
372
|
+
declare function applyProcess2Adjustments(imageData: ImageData, adjustments: ImageAdjustments): void;
|
|
157
373
|
/**
|
|
158
374
|
* Blends a depth/alpha mask into the main image data based on Gleamforge depth masking.
|
|
159
375
|
* Supports threshold range with softness gradation, brightness mode, and optional inversion.
|
|
@@ -165,6 +381,157 @@ declare function applyDepthMask(mainImageData: ImageData, maskImageData: ImageDa
|
|
|
165
381
|
*/
|
|
166
382
|
declare function removeAlpha(imageData: ImageData): void;
|
|
167
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Colour science for the image editor's process 2 rendering: sRGB transfer functions,
|
|
386
|
+
* correlated colour temperature / tint (Kim et al. Planckian locus, tint as Duv), Bradford
|
|
387
|
+
* white-balance adaptation relative to "as shot", and the display-referred tone curve.
|
|
388
|
+
*/
|
|
389
|
+
/** A CIE 1931 chromaticity. */
|
|
390
|
+
interface Chromaticity {
|
|
391
|
+
x: number;
|
|
392
|
+
y: number;
|
|
393
|
+
}
|
|
394
|
+
/** A row-major 3×3 matrix (`[m00, m01, m02, m10, …, m22]`). */
|
|
395
|
+
type Matrix3 = [number, number, number, number, number, number, number, number, number];
|
|
396
|
+
/** The rendering of adjustments from before process versions existed. Frozen. */
|
|
397
|
+
declare const LEGACY_PROCESS_VERSION: 1;
|
|
398
|
+
/** The process new edits and Reset get. */
|
|
399
|
+
declare const LATEST_PROCESS_VERSION: 2;
|
|
400
|
+
type ImageProcessVersion = 1 | 2;
|
|
401
|
+
/**
|
|
402
|
+
* Reads a stored process number leniently: a missing or damaged value (not a whole number) is
|
|
403
|
+
* the legacy process, so a saved edit from before process versions renders exactly as it did. A
|
|
404
|
+
* whole number newer than this build knows renders with the latest process.
|
|
405
|
+
*/
|
|
406
|
+
declare function normalizeProcessVersion(value: unknown): ImageProcessVersion;
|
|
407
|
+
declare function srgbToLinear(v: number): number;
|
|
408
|
+
declare function linearToSrgb(v: number): number;
|
|
409
|
+
/** Rec.709 / sRGB luminance weights (linear light). */
|
|
410
|
+
declare const LUMA_709: readonly [number, number, number];
|
|
411
|
+
declare const IDENTITY_MATRIX3: Matrix3;
|
|
412
|
+
declare function mulMatrix3(a: Matrix3, b: Matrix3): Matrix3;
|
|
413
|
+
declare function applyMatrix3(m: Matrix3, v: readonly [number, number, number]): [number, number, number];
|
|
414
|
+
declare function invertMatrix3(m: Matrix3): Matrix3 | null;
|
|
415
|
+
declare const D65: Chromaticity;
|
|
416
|
+
/** Bradford chromatic adaptation (XYZ → XYZ) from white `src` to white `dst`. */
|
|
417
|
+
declare function bradfordAdaptation(src: Chromaticity, dst: Chromaticity): Matrix3;
|
|
418
|
+
/**
|
|
419
|
+
* Matrix (linear sRGB → linear sRGB) that white-balances a scene lit by `src` so that it
|
|
420
|
+
* renders as if lit by D65.
|
|
421
|
+
*/
|
|
422
|
+
declare function wbMatrix(src: Chromaticity): Matrix3;
|
|
423
|
+
/** The chromaticity of a linear sRGB colour. */
|
|
424
|
+
declare function linearSrgbToXy(rgb: readonly [number, number, number]): Chromaticity;
|
|
425
|
+
/** Tint units per unit of Duv. */
|
|
426
|
+
declare const TINT_SCALE = 3000;
|
|
427
|
+
declare const MIN_KELVIN = 1667;
|
|
428
|
+
declare const MAX_KELVIN = 25000;
|
|
429
|
+
/** CIE 1931 xy → CIE 1960 uv. */
|
|
430
|
+
declare function xyToUv(p: Chromaticity): [number, number];
|
|
431
|
+
/** CIE 1960 uv → CIE 1931 xy. */
|
|
432
|
+
declare function uvToXy(u: number, v: number): Chromaticity;
|
|
433
|
+
/**
|
|
434
|
+
* Source illuminant chromaticity for temperature `kelvin` and correction `tint`.
|
|
435
|
+
* Positive tint means a green source white, whose correction adds magenta to the image.
|
|
436
|
+
*/
|
|
437
|
+
declare function tempTintToXy(kelvin: number, tint: number): Chromaticity;
|
|
438
|
+
/** Inverse of {@link tempTintToXy}: nearest locus temperature (searched in mired space) and tint. */
|
|
439
|
+
declare function xyToTempTint(p: Chromaticity): {
|
|
440
|
+
kelvin: number;
|
|
441
|
+
tint: number;
|
|
442
|
+
};
|
|
443
|
+
/** Rendered images carry no as-shot white: "as shot" is 6500 K / tint 0 and maps to the identity. */
|
|
444
|
+
declare const AS_SHOT_KELVIN = 6500;
|
|
445
|
+
/** Mireds per unit of the `temperature` slider (−100…100). */
|
|
446
|
+
declare const MIRED_PER_TEMPERATURE_UNIT = 1;
|
|
447
|
+
/**
|
|
448
|
+
* Maps the `temperature` slider (−100 cool … +100 warm) to the Kelvin white-balance setting:
|
|
449
|
+
* one mired per unit around 6500 K, so 0 → 6500 K, +100 → ~18 570 K (a strong warming
|
|
450
|
+
* correction), −100 → ~3 940 K (a strong cooling correction). Mireds are perceptually even,
|
|
451
|
+
* so equal slider steps look like equal changes.
|
|
452
|
+
*/
|
|
453
|
+
declare function temperatureToKelvin(temperature: number): number;
|
|
454
|
+
/** Inverse of {@link temperatureToKelvin}. */
|
|
455
|
+
declare function kelvinToTemperature(kelvin: number): number;
|
|
456
|
+
/**
|
|
457
|
+
* White-balance matrix (linear sRGB) for the `temperature` / `tint` sliders, relative to
|
|
458
|
+
* "as shot": the identity at 0 / 0. Normalised so neutral luminance is preserved (white
|
|
459
|
+
* balance doesn't change exposure).
|
|
460
|
+
*/
|
|
461
|
+
declare function whiteBalanceMatrix(temperature: number, tint?: number): Matrix3;
|
|
462
|
+
/**
|
|
463
|
+
* Neutral-point eyedropper: the `temperature` / `tint` that render the sampled sRGB colour
|
|
464
|
+
* (0–255 per channel, as it appears in the unadjusted image) neutral. Results are clamped to
|
|
465
|
+
* the slider range −100…100.
|
|
466
|
+
*/
|
|
467
|
+
declare function whiteBalanceFromSample(rgb: readonly [number, number, number] | {
|
|
468
|
+
r: number;
|
|
469
|
+
g: number;
|
|
470
|
+
b: number;
|
|
471
|
+
}): {
|
|
472
|
+
temperature: number;
|
|
473
|
+
tint: number;
|
|
474
|
+
};
|
|
475
|
+
/** Number of intervals in a tone LUT (the table has `TONE_LUT_SIZE + 1` entries). */
|
|
476
|
+
declare const TONE_LUT_SIZE = 4096;
|
|
477
|
+
/**
|
|
478
|
+
* The process 2 tone curve for one linear input value in `[0, headroom]`:
|
|
479
|
+
*
|
|
480
|
+
* 1. A highlight shoulder (extended Reinhard with white point `headroom`) above a knee of 0.6
|
|
481
|
+
* rolls values above 1 (after exposure / white balance) back into range instead of clipping.
|
|
482
|
+
* With no headroom (`headroom = 1`) it is exactly the identity.
|
|
483
|
+
* 2. In a gamma-2.2 perceptual domain, contrast is an S-curve anchored at 0, middle grey and 1
|
|
484
|
+
* (as `ToneMap::display`), and brightness a midtone lift anchored at 0 and 1.
|
|
485
|
+
*
|
|
486
|
+
* `contrast` and `brightness` are −100…100; both 0 with `headroom = 1` is the identity.
|
|
487
|
+
*/
|
|
488
|
+
declare function toneCurve(y: number, contrast: number, brightness: number, headroom?: number): number;
|
|
489
|
+
/** Tabulates {@link toneCurve} over `[0, headroom]` in {@link TONE_LUT_SIZE} steps. */
|
|
490
|
+
declare function buildToneLut(contrast: number, brightness: number, headroom?: number): Float32Array;
|
|
491
|
+
/** Linearly interpolated lookup into a LUT from {@link buildToneLut}. */
|
|
492
|
+
declare function sampleToneLut(lut: Float32Array, headroom: number, y: number): number;
|
|
493
|
+
|
|
494
|
+
/** Display bins of a histogram. */
|
|
495
|
+
declare const HISTOGRAM_BINS = 256;
|
|
496
|
+
interface ImageHistogram {
|
|
497
|
+
/** 256-bin counts per channel. */
|
|
498
|
+
red: Uint32Array;
|
|
499
|
+
green: Uint32Array;
|
|
500
|
+
blue: Uint32Array;
|
|
501
|
+
/** 256-bin counts of Rec.709 luma `round(0.2126 R + 0.7152 G + 0.0722 B)` of the encoded values. */
|
|
502
|
+
luminance: Uint32Array;
|
|
503
|
+
/** Visible pixels counted (alpha > 0). Each counts once, partially transparent ones included. */
|
|
504
|
+
samples: number;
|
|
505
|
+
/** Fully transparent pixels, excluded from every bin. */
|
|
506
|
+
transparent: number;
|
|
507
|
+
/** Per channel (R, G, B): visible pixels at exactly 0. */
|
|
508
|
+
shadows: [number, number, number];
|
|
509
|
+
/** Per channel (R, G, B): visible pixels at exactly 255. */
|
|
510
|
+
highlights: [number, number, number];
|
|
511
|
+
/** Largest bin count over R, G, B and luminance (for scaling a plot). */
|
|
512
|
+
max: number;
|
|
513
|
+
}
|
|
514
|
+
interface PixelSource {
|
|
515
|
+
data: ArrayLike<number>;
|
|
516
|
+
width?: number;
|
|
517
|
+
height?: number;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Per-channel and luminance histograms of straight 8-bit RGBA pixels (an `ImageData` or anything
|
|
521
|
+
* with `data`), with clipping counts at the exact endpoints. Transparent pixels cannot add
|
|
522
|
+
* phantom peaks: they are counted separately and excluded.
|
|
523
|
+
*/
|
|
524
|
+
declare function computeHistogram(imageData: PixelSource): ImageHistogram;
|
|
525
|
+
type HistogramChannel = 'red' | 'green' | 'blue' | 'luminance';
|
|
526
|
+
/**
|
|
527
|
+
* An SVG path (`M … Z`) of one channel scaled into a `width` × `height` box, bins left to right,
|
|
528
|
+
* counts up from the bottom. `scale: 'sqrt'` (default) keeps small populations visible.
|
|
529
|
+
*/
|
|
530
|
+
declare function histogramPath(histogram: ImageHistogram, channel: HistogramChannel, width: number, height: number, options?: {
|
|
531
|
+
scale?: 'linear' | 'sqrt';
|
|
532
|
+
max?: number;
|
|
533
|
+
}): string;
|
|
534
|
+
|
|
168
535
|
interface RenderOptions {
|
|
169
536
|
viewportWidth?: number;
|
|
170
537
|
viewportHeight?: number;
|
|
@@ -192,6 +559,13 @@ declare class ImageEditorRenderer {
|
|
|
192
559
|
imageCache: ImageCache;
|
|
193
560
|
private cachedBaseCanvas;
|
|
194
561
|
private cachedBaseKey;
|
|
562
|
+
/**
|
|
563
|
+
* Histogram of the last viewport base render (after adjustments and layers, before
|
|
564
|
+
* annotations); `null` until a render with pixel access has happened.
|
|
565
|
+
*/
|
|
566
|
+
previewHistogram: ImageHistogram | null;
|
|
567
|
+
/** Called whenever the viewport base image is re-rendered with the new histogram. */
|
|
568
|
+
onPreviewHistogram?: (histogram: ImageHistogram | null) => void;
|
|
195
569
|
private sourceIds;
|
|
196
570
|
private nextSourceId;
|
|
197
571
|
/**
|
|
@@ -212,6 +586,14 @@ declare class ImageEditorRenderer {
|
|
|
212
586
|
* Draws an individual annotation onto the canvas.
|
|
213
587
|
*/
|
|
214
588
|
drawAnnotation(ctx: CanvasRenderingContext2D, ann: Annotation): Promise<void>;
|
|
589
|
+
/**
|
|
590
|
+
* Scalar fallback for blend modes the canvas cannot composite (Photoshop soft light, linear /
|
|
591
|
+
* vivid / pin light, hard mix, subtract, divide, darker / lighter colour, linear burn / dodge):
|
|
592
|
+
* draws the annotation on a same-size layer with the same transform, blends it into a copy of
|
|
593
|
+
* the target's pixels with `blendImageData`, and copies the result back inside the current clip.
|
|
594
|
+
*/
|
|
595
|
+
private drawAnnotationBlended;
|
|
596
|
+
private drawAnnotationContent;
|
|
215
597
|
/**
|
|
216
598
|
* Draws selection box around active annotation.
|
|
217
599
|
*/
|
|
@@ -245,7 +627,35 @@ declare class ImageEditorRenderer {
|
|
|
245
627
|
private drawAnnotationMask;
|
|
246
628
|
}
|
|
247
629
|
|
|
630
|
+
/** Latest serialized schema version (`2`: adjustment layers). */
|
|
631
|
+
declare const IMAGE_EDITOR_SCHEMA_VERSION: 2;
|
|
632
|
+
/** Changes to an adjustment layer; `params` is merged into the current parameters. */
|
|
633
|
+
interface AdjustmentLayerUpdate<K extends AdjustmentKind = AdjustmentKind> {
|
|
634
|
+
params?: Partial<AdjustmentParamsMap[K]>;
|
|
635
|
+
enabled?: boolean;
|
|
636
|
+
opacity?: number;
|
|
637
|
+
blend?: BlendMode;
|
|
638
|
+
name?: string;
|
|
639
|
+
}
|
|
640
|
+
/** A new adjustment layer: its kind plus optional initial values. */
|
|
641
|
+
interface AdjustmentLayerInit<K extends AdjustmentKind = AdjustmentKind> extends AdjustmentLayerUpdate<K> {
|
|
642
|
+
kind: K;
|
|
643
|
+
id?: string;
|
|
644
|
+
}
|
|
248
645
|
declare const DEFAULT_ADJUSTMENTS: ImageAdjustments;
|
|
646
|
+
/**
|
|
647
|
+
* Fills in defaults for stored adjustments. A stored object without `process` was saved before
|
|
648
|
+
* process versions existed and keeps the legacy rendering.
|
|
649
|
+
*/
|
|
650
|
+
declare function normalizeStoredAdjustments(stored: Partial<ImageAdjustments> | undefined | null): ImageAdjustments;
|
|
651
|
+
/**
|
|
652
|
+
* Brings a stored editor state of any schema version to the current shape. Version 1 (and a
|
|
653
|
+
* missing version) has no adjustment layers; everything else is unchanged, so old states load
|
|
654
|
+
* and render exactly as before.
|
|
655
|
+
*/
|
|
656
|
+
declare function migrateSerializedImageEditorState(data: Partial<SerializedImageEditorState> & {
|
|
657
|
+
version?: number;
|
|
658
|
+
}): SerializedImageEditorState;
|
|
249
659
|
declare const DEFAULT_TRANSFORM: ImageTransform;
|
|
250
660
|
declare const DEFAULT_DEPTH_MASK: DepthMaskOptions;
|
|
251
661
|
/**
|
|
@@ -257,6 +667,7 @@ declare class ImageEditorController {
|
|
|
257
667
|
private renderer;
|
|
258
668
|
private imageElement;
|
|
259
669
|
private listeners;
|
|
670
|
+
private histogramListeners;
|
|
260
671
|
private onStateChange?;
|
|
261
672
|
private undoStack;
|
|
262
673
|
private redoStack;
|
|
@@ -292,7 +703,45 @@ declare class ImageEditorController {
|
|
|
292
703
|
flipHorizontal(): void;
|
|
293
704
|
flipVertical(): void;
|
|
294
705
|
setAdjustments(partial: Partial<ImageAdjustments>, commitToHistory?: boolean): void;
|
|
706
|
+
/** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
|
|
707
|
+
get isProcessOutdated(): boolean;
|
|
708
|
+
/**
|
|
709
|
+
* Update to Current Process: re-interprets the current adjustment values with the latest
|
|
710
|
+
* rendering process (one undo step). Returns false when already current.
|
|
711
|
+
*/
|
|
712
|
+
upgradeProcess(): boolean;
|
|
713
|
+
/** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
|
|
295
714
|
resetAdjustments(): void;
|
|
715
|
+
/** The adjustment layers, bottom (first) to top (last). */
|
|
716
|
+
getAdjustmentLayers(): AdjustmentLayer[];
|
|
717
|
+
getAdjustmentLayer(id: string): AdjustmentLayer | undefined;
|
|
718
|
+
private setLayers;
|
|
719
|
+
/**
|
|
720
|
+
* Adds an adjustment layer on top (or at `index`, 0 = bottom) as one undo step and returns
|
|
721
|
+
* its id. `kind` alone gives neutral parameters.
|
|
722
|
+
*/
|
|
723
|
+
addAdjustmentLayer<K extends AdjustmentKind>(init: K | AdjustmentLayerInit<K>, index?: number): string;
|
|
724
|
+
/**
|
|
725
|
+
* Updates a layer (`params` merged into the current ones, then normalised). Pass
|
|
726
|
+
* `commitToHistory = false` for the moves of a drag after recording its start once.
|
|
727
|
+
* Returns false for an unknown id.
|
|
728
|
+
*/
|
|
729
|
+
updateAdjustmentLayer(id: string, update: AdjustmentLayerUpdate, commitToHistory?: boolean): boolean;
|
|
730
|
+
/** Removes a layer as one undo step. Returns false for an unknown id. */
|
|
731
|
+
removeAdjustmentLayer(id: string): boolean;
|
|
732
|
+
/** Moves a layer to `toIndex` (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
733
|
+
moveAdjustmentLayer(id: string, toIndex: number): boolean;
|
|
734
|
+
/** Shows or hides a layer (flips it without `enabled`) as one undo step. */
|
|
735
|
+
toggleAdjustmentLayer(id: string, enabled?: boolean): boolean;
|
|
736
|
+
/** Removes every adjustment layer as one undo step. */
|
|
737
|
+
clearAdjustmentLayers(): void;
|
|
738
|
+
/**
|
|
739
|
+
* Histogram of the last rendered preview (after adjustments and layers, before annotations),
|
|
740
|
+
* or `null` before the first render or without canvas pixel access.
|
|
741
|
+
*/
|
|
742
|
+
getHistogram(): ImageHistogram | null;
|
|
743
|
+
/** Calls `listener` now and whenever a render produces a new preview histogram. */
|
|
744
|
+
subscribeHistogram(listener: (histogram: ImageHistogram | null) => void): () => void;
|
|
296
745
|
setDepthMask(partial: Partial<DepthMaskOptions>): void;
|
|
297
746
|
resetDepthMask(): void;
|
|
298
747
|
addAnnotation(annotation: CreateAnnotationPayload): string;
|
|
@@ -465,4 +914,293 @@ declare function getAnnotationBounds(ann: Annotation): {
|
|
|
465
914
|
*/
|
|
466
915
|
declare function hitTestAnnotation(imgPt: ImagePoint, ann: Annotation, padding?: number): boolean;
|
|
467
916
|
|
|
468
|
-
|
|
917
|
+
/** The `version` that `ImageEditorController.toJSON()` writes. */
|
|
918
|
+
declare const IMAGE_EDITOR_STATE_VERSION = 1;
|
|
919
|
+
/**
|
|
920
|
+
* Migration steps for `SerializedImageEditorState`, keyed by the version they
|
|
921
|
+
* start from. Empty while only version 1 exists.
|
|
922
|
+
*/
|
|
923
|
+
declare const imageEditorStateMigrations: Record<number, MigrationStep>;
|
|
924
|
+
interface ImageEditorDocumentLoad {
|
|
925
|
+
/** State to pass to `loadJSON` / `initialState`. */
|
|
926
|
+
state: SerializedImageEditorState;
|
|
927
|
+
report: LoadReport;
|
|
928
|
+
/** Top-level keys this build does not know; spread them into the saved JSON to keep them. */
|
|
929
|
+
unknown: JsonObject;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Loads stored image editor state (a JSON string or object) with a `LoadReport`:
|
|
933
|
+
*
|
|
934
|
+
* - Runs `imageEditorStateMigrations` up to `IMAGE_EDITOR_STATE_VERSION`; a missing
|
|
935
|
+
* `version` is taken as current.
|
|
936
|
+
* - A newer `version` is still loaded but reported `readOnly`: do not save over it.
|
|
937
|
+
* - Each section (`crop`, `transform`, `adjustments`, `depthMask`, `annotations`)
|
|
938
|
+
* falls back to its default on its own; invalid annotations are dropped one by one.
|
|
939
|
+
* - Unknown top-level keys are returned in `unknown`.
|
|
940
|
+
*
|
|
941
|
+
* Valid state from `toJSON()` comes back unchanged, so `loadJSON(state)` behaves
|
|
942
|
+
* exactly as with the raw object.
|
|
943
|
+
*/
|
|
944
|
+
declare function loadImageEditorDocument(input: unknown): ImageEditorDocumentLoad;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Adjustment layers: Photoshop-matching evaluation on encoded sRGB colours in 0..1.
|
|
948
|
+
*
|
|
949
|
+
* Every layer is compiled once per parameter change into a per-pixel function (per-channel kinds
|
|
950
|
+
* into three 4096-entry LUTs); {@link applyAdjustmentLayers} runs the stack on an ImageData.
|
|
951
|
+
*/
|
|
952
|
+
type Rgb = [number, number, number];
|
|
953
|
+
/** Entries in a tone LUT (curves, levels, colour balance). */
|
|
954
|
+
declare const ADJUSTMENT_LUT_SIZE = 4096;
|
|
955
|
+
/** Linear interpolation into a 0..1-domain LUT. */
|
|
956
|
+
declare function sampleLut(table: ArrayLike<number>, v: number): number;
|
|
957
|
+
interface AdjustmentKindInfo {
|
|
958
|
+
kind: AdjustmentKind;
|
|
959
|
+
label: string;
|
|
960
|
+
}
|
|
961
|
+
declare const ADJUSTMENT_KINDS: readonly AdjustmentKindInfo[];
|
|
962
|
+
declare function isAdjustmentKind(value: unknown): value is AdjustmentKind;
|
|
963
|
+
declare function adjustmentKindLabel(kind: AdjustmentKind): string;
|
|
964
|
+
declare const HUE_RANGE_LABELS: readonly ["Reds", "Yellows", "Greens", "Cyans", "Blues", "Magentas"];
|
|
965
|
+
/** The neutral range `i` (0 reds … 5 magentas): fully on for 30° around its centre, fading over 30° each side. */
|
|
966
|
+
declare function neutralHueRange(i: number): HueRange;
|
|
967
|
+
declare const identityCurve: () => CurvePoint[];
|
|
968
|
+
declare const identityLevels: () => LevelsChannel;
|
|
969
|
+
/** Neutral parameters of every kind (fresh objects on every call). */
|
|
970
|
+
declare function defaultAdjustmentParams<K extends AdjustmentKind>(kind: K): AdjustmentParamsMap[K];
|
|
971
|
+
/** A new layer of `kind` with neutral (or the given) parameters, enabled, opacity 1, normal blend. */
|
|
972
|
+
declare function createAdjustmentLayer<K extends AdjustmentKind>(kind: K, options?: {
|
|
973
|
+
id?: string;
|
|
974
|
+
name?: string;
|
|
975
|
+
params?: Partial<AdjustmentParamsMap[K]>;
|
|
976
|
+
enabled?: boolean;
|
|
977
|
+
opacity?: number;
|
|
978
|
+
blend?: BlendMode;
|
|
979
|
+
}): AdjustmentLayerOf<K>;
|
|
980
|
+
/**
|
|
981
|
+
* A clean, deep-copied layer from stored or hand-written data: missing fields get neutral
|
|
982
|
+
* defaults, numbers are clamped to their ranges. `null` for an unknown kind.
|
|
983
|
+
*/
|
|
984
|
+
declare function normalizeAdjustmentLayer(raw: unknown): AdjustmentLayer | null;
|
|
985
|
+
/** Normalises a stored layer list (drops unknown kinds, de-duplicates ids). */
|
|
986
|
+
declare function normalizeAdjustmentLayers(raw: unknown): AdjustmentLayer[];
|
|
987
|
+
/**
|
|
988
|
+
* Photoshop curve: a natural cubic spline through the points (0..1 in and out; it may overshoot
|
|
989
|
+
* between points, as Photoshop's does), constant outside the first / last point, clamped to
|
|
990
|
+
* 0..1, sampled into a LUT. Fewer than two distinct points: the identity.
|
|
991
|
+
*/
|
|
992
|
+
declare function curveLut(points: ReadonlyArray<{
|
|
993
|
+
input: number;
|
|
994
|
+
output: number;
|
|
995
|
+
}>, size?: number): Float32Array;
|
|
996
|
+
/** {@link curveLut} for Curves points in levels (0..255). */
|
|
997
|
+
declare function curveLutFromLevels(points: readonly CurvePoint[]): Float32Array;
|
|
998
|
+
/** A Levels record with values in 0..1 (as `levelsValue` takes them). */
|
|
999
|
+
interface UnitLevels {
|
|
1000
|
+
inBlack: number;
|
|
1001
|
+
inWhite: number;
|
|
1002
|
+
gamma: number;
|
|
1003
|
+
outBlack: number;
|
|
1004
|
+
outWhite: number;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* One Levels record on `v` (0..1). With `quantum` (8-bit: 255) Photoshop works on whole levels:
|
|
1008
|
+
* the input is a level and the stretch is rounded (half up) before the gamma. A gamma above 1 has
|
|
1009
|
+
* Photoshop's soft shadow toe: a p-norm soft-min of the power curve and a line of slope ≈ 2^gamma.
|
|
1010
|
+
*/
|
|
1011
|
+
declare function levelsValue(ch: UnitLevels, v: number, quantum?: number): number;
|
|
1012
|
+
/** RGB (0..1) → HSL with hue in turns (0..1). */
|
|
1013
|
+
declare function rgbToHsl(c: readonly number[]): [number, number, number];
|
|
1014
|
+
declare function hslToRgb(h: number, s: number, l: number): Rgb;
|
|
1015
|
+
/** How much a pixel of hue `deg` belongs to `range` (0..1): a trapezoid that may wrap past 0/360. */
|
|
1016
|
+
declare function hueRangeWeight(range: Pick<HueRange, 'bounds'>, deg: number): number;
|
|
1017
|
+
/** Range edits as three hue-indexed tables (hue shift in degrees, saturation and lightness as fractions). */
|
|
1018
|
+
declare function hueRangeTables(ranges: readonly HueRange[]): [Float32Array, Float32Array, Float32Array];
|
|
1019
|
+
/**
|
|
1020
|
+
* One Hue/Saturation evaluation: hue shift in degrees, saturation and lightness in -1..1.
|
|
1021
|
+
* Lightness first, then hue and saturation (raising divides by 1 − s, lowering multiplies by
|
|
1022
|
+
* 1 + s). Colorize sets hue and saturation at the lightened lightness.
|
|
1023
|
+
*/
|
|
1024
|
+
declare function hueSaturation(c: readonly number[], hue: number, s: number, l: number, colorize: boolean): Rgb;
|
|
1025
|
+
/** A colour range's Lightness: towards the brightest channel when raised, the darkest when lowered. */
|
|
1026
|
+
declare function rangeLightness(c: readonly number[], l: number): Rgb;
|
|
1027
|
+
/** Grey Vibrance › Saturation desaturates to (linear light; blue has no weight). */
|
|
1028
|
+
declare const VIBRANCE_GREY: readonly [number, number];
|
|
1029
|
+
/** The Vibrance slider (`v` in -1..1) on a linear-light pixel: an HSV change that keeps the hue. */
|
|
1030
|
+
declare function vibranceLinear(c: Rgb, v: number): Rgb;
|
|
1031
|
+
/** Photoshop's Vibrance on one encoded sRGB pixel (`v`, `s`: the sliders / 100). */
|
|
1032
|
+
declare function vibrancePixel(c: readonly number[], v: number, s: number): Rgb;
|
|
1033
|
+
/**
|
|
1034
|
+
* Color Balance on channel `ch` (0 red, 1 green, 2 blue) of `v` (0..1); `tones` are the
|
|
1035
|
+
* shadows, midtones and highlights slider triples (-100..100). Highlights, shadows, then midtones.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function colorBalanceChannel(tones: readonly [readonly number[], readonly number[], readonly number[]], preserveLuminosity: boolean, ch: number, v: number): number;
|
|
1038
|
+
/**
|
|
1039
|
+
* Black & White grey: the smallest channel, plus the secondary part (middle − smallest) and the
|
|
1040
|
+
* primary part (largest − middle) weighted by the sliders (percent: reds, yellows, greens, cyans,
|
|
1041
|
+
* blues, magentas).
|
|
1042
|
+
*/
|
|
1043
|
+
declare function blackWhiteGray(c: readonly number[], weights: readonly number[]): number;
|
|
1044
|
+
/**
|
|
1045
|
+
* Photo Filter's linear-light RGB matrix (row-major 3×3): the pixel's D50 XYZ, relative to white,
|
|
1046
|
+
* multiplied by the filter colour's mixed in by `density` (0..1). `normalizeY` keeps luminance Y.
|
|
1047
|
+
*/
|
|
1048
|
+
declare function photoFilterMatrix(color: readonly number[], density: number, normalizeY?: boolean): number[][];
|
|
1049
|
+
/** Photoshop posterize: `levels` equal input bins over 0..255, outputs `floor(k·255 / (levels − 1))`. */
|
|
1050
|
+
declare function posterizeValue(v: number, levels: number): number;
|
|
1051
|
+
/** Rec.601 luma (Photoshop's grey for Threshold). */
|
|
1052
|
+
declare const rgbToGray: (c: readonly number[]) => number;
|
|
1053
|
+
/** `#rrggbb` → 0..1 RGB (black for anything else). */
|
|
1054
|
+
declare function hexToRgb(hex: string): Rgb;
|
|
1055
|
+
/** Mutates an encoded sRGB colour (0..1) in place. */
|
|
1056
|
+
type PixelOp = (c: Rgb) => void;
|
|
1057
|
+
/**
|
|
1058
|
+
* Per-channel LUTs of a Curves or Levels layer: each channel's record first, then the master.
|
|
1059
|
+
* `null` for any other kind.
|
|
1060
|
+
*/
|
|
1061
|
+
declare function toneLuts(layer: AdjustmentLayer): [Float32Array, Float32Array, Float32Array] | null;
|
|
1062
|
+
/**
|
|
1063
|
+
* Compiles a layer into a pixel function, or `null` when it is the identity (neutral parameters).
|
|
1064
|
+
* Pure: depends on `kind` and `params` only.
|
|
1065
|
+
*/
|
|
1066
|
+
declare function compileAdjustmentLayer(layer: AdjustmentLayer): PixelOp | null;
|
|
1067
|
+
/** Layers that change pixels: enabled, visible, not the identity. */
|
|
1068
|
+
declare function activeAdjustmentLayers(layers: readonly AdjustmentLayer[] | undefined): AdjustmentLayer[];
|
|
1069
|
+
/**
|
|
1070
|
+
* Evaluates one colour (encoded sRGB, 0..1) through a layer stack: each layer adjusts the result
|
|
1071
|
+
* of the layers below and is blended over it with its blend mode and opacity (an opaque
|
|
1072
|
+
* backdrop, so `(1 − α)·Cb + α·B(Cb, Cs)`).
|
|
1073
|
+
*/
|
|
1074
|
+
declare function evaluateAdjustmentLayers(color: readonly number[], layers: readonly AdjustmentLayer[]): Rgb;
|
|
1075
|
+
/**
|
|
1076
|
+
* Applies an adjustment-layer stack to 8-bit straight RGBA pixels in place. Each pixel is
|
|
1077
|
+
* decoded once, run through every layer in float, and encoded once. Transparent pixels are
|
|
1078
|
+
* left alone; alpha is never changed.
|
|
1079
|
+
*/
|
|
1080
|
+
declare function applyAdjustmentLayers(imageData: ImageData, layers: readonly AdjustmentLayer[] | undefined): void;
|
|
1081
|
+
/** Stable cache key of a layer stack's pixel effect (for renderer caches). */
|
|
1082
|
+
declare function adjustmentLayersKey(layers: readonly AdjustmentLayer[] | undefined): string;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Control specs: one table describes every numeric adjustment slider (id, label, section, range,
|
|
1086
|
+
* default, step, display precision and track style). The React and Svelte panels render from it,
|
|
1087
|
+
* the agent tools expose it as a schema, and values are addressed by id.
|
|
1088
|
+
*/
|
|
1089
|
+
type ControlSection = 'light' | 'color' | 'effects' | 'layer';
|
|
1090
|
+
/** How a slider track is drawn. */
|
|
1091
|
+
type ControlTrack =
|
|
1092
|
+
/** Plain track, fill from the minimum. */
|
|
1093
|
+
{
|
|
1094
|
+
kind: 'plain';
|
|
1095
|
+
}
|
|
1096
|
+
/** Zero in the middle. */
|
|
1097
|
+
| {
|
|
1098
|
+
kind: 'centered';
|
|
1099
|
+
}
|
|
1100
|
+
/** Blue → yellow (white-balance temperature). */
|
|
1101
|
+
| {
|
|
1102
|
+
kind: 'temp';
|
|
1103
|
+
}
|
|
1104
|
+
/** Green → magenta (tint). */
|
|
1105
|
+
| {
|
|
1106
|
+
kind: 'tint';
|
|
1107
|
+
}
|
|
1108
|
+
/** A two-colour gradient. */
|
|
1109
|
+
| {
|
|
1110
|
+
kind: 'gradient';
|
|
1111
|
+
from: string;
|
|
1112
|
+
to: string;
|
|
1113
|
+
}
|
|
1114
|
+
/** Full hue rainbow. */
|
|
1115
|
+
| {
|
|
1116
|
+
kind: 'rainbow';
|
|
1117
|
+
};
|
|
1118
|
+
interface ControlSpec {
|
|
1119
|
+
/** Dotted path of the value (`exposure`; inside a layer's params: `midtones.0`, `ranges.4.hue`). */
|
|
1120
|
+
id: string;
|
|
1121
|
+
label: string;
|
|
1122
|
+
section: ControlSection;
|
|
1123
|
+
min: number;
|
|
1124
|
+
max: number;
|
|
1125
|
+
step: number;
|
|
1126
|
+
default: number;
|
|
1127
|
+
/** Decimal places shown (after `displayScale`). */
|
|
1128
|
+
decimals: number;
|
|
1129
|
+
track: ControlTrack;
|
|
1130
|
+
/** Multiplier for display (opacity 0..1 shows as 0..100 %). */
|
|
1131
|
+
displayScale?: number;
|
|
1132
|
+
/** Unit suffix for display (`px`, `%`, `°`). */
|
|
1133
|
+
unit?: string;
|
|
1134
|
+
/** The rendering process the control needs (tint: process 2). */
|
|
1135
|
+
requiresProcess?: 1 | 2;
|
|
1136
|
+
}
|
|
1137
|
+
/** Every numeric base adjustment, in panel order. */
|
|
1138
|
+
declare const IMAGE_ADJUSTMENT_CONTROLS: readonly ControlSpec[];
|
|
1139
|
+
/**
|
|
1140
|
+
* Numeric parameters of each adjustment-layer kind, addressed inside `layer.params`. Curves points
|
|
1141
|
+
* and booleans / colours (colorize, preserve luminosity, tint, filter colour) are edited by the
|
|
1142
|
+
* dedicated controls, not sliders.
|
|
1143
|
+
*/
|
|
1144
|
+
declare const ADJUSTMENT_LAYER_CONTROLS: Readonly<Record<AdjustmentKind, readonly ControlSpec[]>>;
|
|
1145
|
+
/** Opacity of any adjustment layer (0..1, shown as %). */
|
|
1146
|
+
declare const ADJUSTMENT_LAYER_OPACITY_CONTROL: ControlSpec;
|
|
1147
|
+
/** The base-adjustment control with this id. */
|
|
1148
|
+
declare function findAdjustmentControl(id: string): ControlSpec | undefined;
|
|
1149
|
+
/** The control of a layer parameter (`opacity` included). */
|
|
1150
|
+
declare function findLayerControl(kind: AdjustmentKind, id: string): ControlSpec | undefined;
|
|
1151
|
+
/** `v` clamped to the control's range and snapped to its step; non-finite values give the default. */
|
|
1152
|
+
declare function clampControlValue(spec: ControlSpec, v: unknown): number;
|
|
1153
|
+
/** A value as the slider shows it (`+12`, `35%`, `4px`). */
|
|
1154
|
+
declare function formatControlValue(spec: ControlSpec, v: number): string;
|
|
1155
|
+
/** Where `v` sits on the track, 0 (left) to 1 (right). */
|
|
1156
|
+
declare function controlPosition(spec: ControlSpec, v: number): number;
|
|
1157
|
+
/** CSS background for a control's track. */
|
|
1158
|
+
declare function controlTrackBackground(spec: ControlSpec): string | undefined;
|
|
1159
|
+
/** Reads a dotted path (`ranges.2.hue`) from an object. */
|
|
1160
|
+
declare function getControlPath(obj: unknown, path: string): unknown;
|
|
1161
|
+
/** A copy of `obj` with the dotted path set (arrays and objects along the path are cloned). */
|
|
1162
|
+
declare function setControlPath<T>(obj: T, path: string, value: unknown): T;
|
|
1163
|
+
/** The base adjustment values the control table describes. */
|
|
1164
|
+
declare function readAdjustmentControls(adjustments: ImageAdjustments): Record<string, number>;
|
|
1165
|
+
|
|
1166
|
+
interface ImageEditorToolProviderOptions {
|
|
1167
|
+
/** Provider id (unique per registry). Default `image-editor`. */
|
|
1168
|
+
id?: string;
|
|
1169
|
+
/** Always prefix tool names with `<namespace>__`. */
|
|
1170
|
+
namespace?: string;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Agent tools for an image editor, for a `ToolRegistry`:
|
|
1174
|
+
*
|
|
1175
|
+
* - `get_adjustments`: base slider values (by control id), process version and adjustment layers.
|
|
1176
|
+
* - `list_controls`: the control table (ids, ranges, defaults, steps), layer kinds and blend modes.
|
|
1177
|
+
* - `set_adjustments {values, label}`: sets base controls (`exposure`) and layer parameters
|
|
1178
|
+
* (`layers.<id>.vibrance`, `layers.<id>.opacity`) in one undo step; values are clamped to the
|
|
1179
|
+
* control ranges and the applied values are echoed.
|
|
1180
|
+
* - `add_adjustment_layer {kind, params?, opacity?, blend?, name?}`.
|
|
1181
|
+
* - `render_preview {maxSide}`: the rendered image as a PNG, longest side at most `maxSide`.
|
|
1182
|
+
*/
|
|
1183
|
+
declare function createImageEditorToolProvider(controller: ImageEditorController, options?: ImageEditorToolProviderOptions): AgentToolProvider;
|
|
1184
|
+
|
|
1185
|
+
/** Box coordinates of a curve point. */
|
|
1186
|
+
declare function curvePointToBox(p: CurvePoint, width: number, height: number): {
|
|
1187
|
+
x: number;
|
|
1188
|
+
y: number;
|
|
1189
|
+
};
|
|
1190
|
+
/** The curve point (whole levels, clamped) under box coordinates. */
|
|
1191
|
+
declare function boxToCurvePoint(x: number, y: number, width: number, height: number): CurvePoint;
|
|
1192
|
+
/** An SVG polyline path of the evaluated curve (spline, clamped, constant beyond the end points). */
|
|
1193
|
+
declare function curveSvgPath(points: readonly CurvePoint[], width: number, height: number, samples?: number): string;
|
|
1194
|
+
/** Index of the point within `radius` box units of (x, y), nearest first; -1 for none. */
|
|
1195
|
+
declare function hitTestCurvePoint(points: readonly CurvePoint[], x: number, y: number, width: number, height: number, radius?: number): number;
|
|
1196
|
+
/** Inserts a point in input order (replacing one at the same input). Returns the new list and its index. */
|
|
1197
|
+
declare function insertCurvePoint(points: readonly CurvePoint[], p: CurvePoint): {
|
|
1198
|
+
points: CurvePoint[];
|
|
1199
|
+
index: number;
|
|
1200
|
+
};
|
|
1201
|
+
/** Moves point `index`, keeping its input strictly between its neighbours'. */
|
|
1202
|
+
declare function moveCurvePoint(points: readonly CurvePoint[], index: number, p: CurvePoint): CurvePoint[];
|
|
1203
|
+
/** Removes point `index`; a curve keeps at least two points. */
|
|
1204
|
+
declare function removeCurvePoint(points: readonly CurvePoint[], index: number): CurvePoint[];
|
|
1205
|
+
|
|
1206
|
+
export { ADJUSTMENT_KINDS, ADJUSTMENT_LAYER_CONTROLS, ADJUSTMENT_LAYER_OPACITY_CONTROL, ADJUSTMENT_LUT_SIZE, AS_SHOT_KELVIN, type AdjustmentKind, type AdjustmentKindInfo, type AdjustmentLayer, type AdjustmentLayerBase, type AdjustmentLayerInit, type AdjustmentLayerOf, type AdjustmentLayerUpdate, type AdjustmentParamsMap, type Annotation, type AnnotationType, type ArrowAnnotation, type AspectRatio, BLEND_MODES, type BaseAnnotation, type BlackWhiteParams, type BlendMode, type BlendModeInfo, type Chromaticity, type CircleAnnotation, type ColorBalanceParams, type ColorBalanceTone, type ControlSection, type ControlSpec, type ControlTrack, type CreateAnnotationPayload, type CropBox, type CropHandle, type CurvePoint, type CurvesParams, D65, DEFAULT_ADJUSTMENTS, DEFAULT_DEPTH_MASK, DEFAULT_TRANSFORM, type DepthMaskOptions, type ExportOptions, HISTOGRAM_BINS, HUE_RANGE_LABELS, type HistogramChannel, type HueRange, type HueSaturationParams, IDENTITY_MATRIX3, IMAGE_ADJUSTMENT_CONTROLS, IMAGE_EDITOR_SCHEMA_VERSION, IMAGE_EDITOR_STATE_VERSION, type ImageAdjustments, type ImageAnnotation, type ImageDimensions, type ImageEditorAIHooks, ImageEditorController, type ImageEditorDocumentLoad, type ImageEditorOptions, ImageEditorRenderer, type ImageEditorState, type ImageEditorTool, type ImageEditorToolProviderOptions, type ImageHistogram, type ImagePoint, type ImageProcessVersion, type ImageProjection, type ImageTransform, type InpaintHook, type InpaintOptions, type InvertParams, LATEST_PROCESS_VERSION, LEGACY_PROCESS_VERSION, LUMA_709, type LevelsChannel, type LevelsParams, type LineAnnotation, MAX_KELVIN, MIN_KELVIN, MIRED_PER_TEMPERATURE_UNIT, type Matrix3, type PenAnnotation, type PhotoFilterParams, type PixelOp, type PosterizeParams, type RectAnnotation, type RemoveBackgroundHook, type RemoveBackgroundOptions, type RenderOptions, type Rgb$1 as Rgb, type Rgba, type SerializedImageEditorState, TINT_SCALE, TONE_LUT_SIZE, type TextAnnotation, type ThresholdParams, type UnitLevels, VIBRANCE_GREY, type VibranceParams, type ViewportMetrics, activeAdjustmentLayers, adjustmentKindLabel, adjustmentLayersKey, applyAdjustmentLayers, applyAdjustments, applyDepthMask, applyImageProjectionToContext, applyLegacyAdjustments, applyMatrix3, applyProcess2Adjustments, blackWhiteGray, blendChannel, blendImageData, blendLum, blendPixel, blendRgb, boxToCurvePoint, bradfordAdaptation, buildToneLut, calculateCropDrag, canvasCompositeOperation, canvasToImagePoint, clampControlValue, clampCropToImage, colorBalanceChannel, compileAdjustmentLayer, computeHistogram, controlPosition, controlTrackBackground, createAdjustmentLayer, createImageEditorToolProvider, curveLut, curveLutFromLevels, curvePointToBox, curveSvgPath, defaultAdjustmentParams, evaluateAdjustmentLayers, findAdjustmentControl, findLayerControl, formatControlValue, getAnnotationBounds, getControlPath, getCropCursor, getRotatedSize, getViewportMetrics, getViewportProjection, globalImageCache, hexToRgb, histogramPath, hitTestAnnotation, hitTestCrop, hitTestCurvePoint, hslToRgb, hueRangeTables, hueRangeWeight, hueSaturation, identityCurve, identityLevels, imageEditorStateMigrations, imageToCanvasPoint, insertCurvePoint, invertMatrix3, isAdjustmentKind, isBlendMode, isQuarterTurnSwapped, isSeparableBlendMode, kelvinToTemperature, levelsValue, linearSrgbToXy, linearToSrgb, loadImageEditorDocument, mapCropHandle, migrateSerializedImageEditorState, moveCurvePoint, mulMatrix3, neutralHueRange, normalizeAdjustmentLayer, normalizeAdjustmentLayers, normalizeAngle, normalizeBlendMode, normalizeProcessVersion, normalizeStoredAdjustments, photoFilterMatrix, posterizeValue, projectImagePoint, projectImageRect, rangeLightness, readAdjustmentControls, removeAlpha, removeCurvePoint, rgbToGray, rgbToHsl, sampleLut, sampleToneLut, setControlPath, setLum, srgbToLinear, tempTintToXy, temperatureToKelvin, toneCurve, toneLuts, unprojectCanvasPoint, uvToXy, vibranceLinear, vibrancePixel, wbMatrix, whiteBalanceFromSample, whiteBalanceMatrix, xyToTempTint, xyToUv };
|