@pixerate/editor 0.92.0 → 0.94.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 (37) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -0
  2. package/dist/{chunk-PDCITYBT.cjs → chunk-4F3YDIWW.cjs} +367 -2
  3. package/dist/chunk-4F3YDIWW.cjs.map +1 -0
  4. package/dist/chunk-73L6TROJ.cjs +3685 -0
  5. package/dist/chunk-73L6TROJ.cjs.map +1 -0
  6. package/dist/chunk-747CGOT2.js +3685 -0
  7. package/dist/chunk-747CGOT2.js.map +1 -0
  8. package/dist/{chunk-YLB2WVNA.js → chunk-ISDCJHTO.js} +367 -2
  9. package/dist/chunk-ISDCJHTO.js.map +1 -0
  10. package/dist/image-editor/index.cjs +787 -302
  11. package/dist/image-editor/index.cjs.map +1 -1
  12. package/dist/image-editor/index.d.cts +84 -18
  13. package/dist/image-editor/index.d.ts +84 -18
  14. package/dist/image-editor/index.js +560 -75
  15. package/dist/image-editor/index.js.map +1 -1
  16. package/dist/paint/index.cjs +26 -2
  17. package/dist/paint/index.cjs.map +1 -1
  18. package/dist/paint/index.d.cts +96 -2
  19. package/dist/paint/index.d.ts +96 -2
  20. package/dist/paint/index.js +25 -1
  21. package/dist/raster/index.cjs +78 -2
  22. package/dist/raster/index.cjs.map +1 -1
  23. package/dist/raster/index.d.cts +99 -348
  24. package/dist/raster/index.d.ts +99 -348
  25. package/dist/raster/index.js +78 -2
  26. package/dist/{surface-fJhkmNQn.d.cts → surface-CuBg2c6k.d.cts} +1 -1
  27. package/dist/{surface-fJhkmNQn.d.ts → surface-CuBg2c6k.d.ts} +1 -1
  28. package/dist/zlib-BJ6U7LuB.d.cts +795 -0
  29. package/dist/zlib-BjQkpMFi.d.ts +795 -0
  30. package/package.json +3 -3
  31. package/skills/pixerate-image-editor/SKILL.md +63 -4
  32. package/dist/chunk-H543GD6T.cjs +0 -1696
  33. package/dist/chunk-H543GD6T.cjs.map +0 -1
  34. package/dist/chunk-P5TPUNBZ.js +0 -1696
  35. package/dist/chunk-P5TPUNBZ.js.map +0 -1
  36. package/dist/chunk-PDCITYBT.cjs.map +0 -1
  37. package/dist/chunk-YLB2WVNA.js.map +0 -1
@@ -15,7 +15,19 @@
15
15
 
16
16
 
17
17
 
18
- var _chunkPDCITYBTcjs = require('../chunk-PDCITYBT.cjs');
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ var _chunk4F3YDIWWcjs = require('../chunk-4F3YDIWW.cjs');
19
31
  require('../chunk-ZOOEX3WT.cjs');
20
32
 
21
33
 
@@ -34,5 +46,17 @@ require('../chunk-ZOOEX3WT.cjs');
34
46
 
35
47
 
36
48
 
37
- exports.CoverageMap = _chunkPDCITYBTcjs.CoverageMap; exports.DEFAULT_BRUSH = _chunkPDCITYBTcjs.DEFAULT_BRUSH; exports.DabWalker = _chunkPDCITYBTcjs.DabWalker; exports.MAX_BRUSH_SIZE = _chunkPDCITYBTcjs.MAX_BRUSH_SIZE; exports.StrokeCoverage = _chunkPDCITYBTcjs.StrokeCoverage; exports.applyStrokeToTile = _chunkPDCITYBTcjs.applyStrokeToTile; exports.coverageTileCoord = _chunkPDCITYBTcjs.coverageTileCoord; exports.dabCoverage = _chunkPDCITYBTcjs.dabCoverage; exports.dabRect = _chunkPDCITYBTcjs.dabRect; exports.normalizeBrush = _chunkPDCITYBTcjs.normalizeBrush; exports.rasterizeDab = _chunkPDCITYBTcjs.rasterizeDab; exports.smoothPoints = _chunkPDCITYBTcjs.smoothPoints; exports.tipFalloff = _chunkPDCITYBTcjs.tipFalloff; exports.tipReach = _chunkPDCITYBTcjs.tipReach; exports.tipShape = _chunkPDCITYBTcjs.tipShape; exports.walkDabs = _chunkPDCITYBTcjs.walkDabs;
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ exports.CoverageMap = _chunk4F3YDIWWcjs.CoverageMap; exports.DEFAULT_BRUSH = _chunk4F3YDIWWcjs.DEFAULT_BRUSH; exports.DabWalker = _chunk4F3YDIWWcjs.DabWalker; exports.MAX_BRUSH_SIZE = _chunk4F3YDIWWcjs.MAX_BRUSH_SIZE; exports.PIGMENT_BANDS = _chunk4F3YDIWWcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunk4F3YDIWWcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunk4F3YDIWWcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunk4F3YDIWWcjs.PIGMENT_WAVELENGTHS; exports.StrokeCoverage = _chunk4F3YDIWWcjs.StrokeCoverage; exports.applyStrokeToTile = _chunk4F3YDIWWcjs.applyStrokeToTile; exports.coverageTileCoord = _chunk4F3YDIWWcjs.coverageTileCoord; exports.createPigment = _chunk4F3YDIWWcjs.createPigment; exports.createPigmentTools = _chunk4F3YDIWWcjs.createPigmentTools; exports.dabCoverage = _chunk4F3YDIWWcjs.dabCoverage; exports.dabRect = _chunk4F3YDIWWcjs.dabRect; exports.lerpPigment = _chunk4F3YDIWWcjs.lerpPigment; exports.lerpPigmentInto = _chunk4F3YDIWWcjs.lerpPigmentInto; exports.mixPigments = _chunk4F3YDIWWcjs.mixPigments; exports.normalizeBrush = _chunk4F3YDIWWcjs.normalizeBrush; exports.rasterizeDab = _chunk4F3YDIWWcjs.rasterizeDab; exports.reflectanceToRgb = _chunk4F3YDIWWcjs.reflectanceToRgb; exports.rgbToReflectance = _chunk4F3YDIWWcjs.rgbToReflectance; exports.setPigmentColor = _chunk4F3YDIWWcjs.setPigmentColor; exports.smoothPoints = _chunk4F3YDIWWcjs.smoothPoints; exports.tipFalloff = _chunk4F3YDIWWcjs.tipFalloff; exports.tipReach = _chunk4F3YDIWWcjs.tipReach; exports.tipShape = _chunk4F3YDIWWcjs.tipShape; exports.walkDabs = _chunk4F3YDIWWcjs.walkDabs;
38
62
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/paint/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,i2BAAC","file":"/home/runner/work/editor/editor/packages/core/dist/paint/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/paint/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,qkDAAC","file":"/home/runner/work/editor/editor/packages/core/dist/paint/index.cjs"}
@@ -1,4 +1,6 @@
1
- import { B as BlendMode, R as RasterRect, h as TileKey } from '../surface-fJhkmNQn.cjs';
1
+ import { B as BlendMode, R as RasterRect, g as TileKey } from '../surface-CuBg2c6k.cjs';
2
+ import { A as AgentTool } from '../registry-BqA1AZt0.cjs';
3
+ import '../schema-Di0CS6Pe.cjs';
2
4
 
3
5
  /**
4
6
  * The brush engine (a subset of photocraft's `crates/paint`): a computed round tip with size,
@@ -164,4 +166,96 @@ declare function coverageTileCoord(key: TileKey): {
164
166
  ty: number;
165
167
  };
166
168
 
167
- export { type BrushSettings, CoverageMap, DEFAULT_BRUSH, type Dab, DabWalker, MAX_BRUSH_SIZE, type StrokeApply, StrokeCoverage, type StrokePoint, applyStrokeToTile, coverageTileCoord, dabCoverage, dabRect, normalizeBrush, rasterizeDab, smoothPoints, tipFalloff, tipReach, tipShape, walkDabs };
169
+ /**
170
+ * Pigment-like colour mixing: blue and yellow make green, red and white make pink, as paint does.
171
+ *
172
+ * Each sRGB colour is lifted to a smooth reflectance spectrum, the spectra are mixed with the
173
+ * Kubelka-Munk two-flux model, and the mixed spectrum is turned back into sRGB. Written from the
174
+ * published literature; no third-party code or data:
175
+ *
176
+ * 1. **Spectral uplift.** A colour's reflectance is a sigmoid of a quadratic in wavelength,
177
+ * `R(λ) = s(c₀λ² + c₁λ + c₂)` with `s(z) = ½ + z / 2√(1 + z²)` (Jakob & Hanika, "A
178
+ * Low-Dimensional Function Space for Efficient Spectral Upsampling", Eurographics 2019). The
179
+ * three coefficients are solved per colour with Newton's method so the spectrum reproduces the
180
+ * colour. Spectra are precomputed lazily on a 17³ lattice over sRGB and interpolated
181
+ * trilinearly in *linear* RGB: colour is linear in reflectance, so an interpolated spectrum
182
+ * still reproduces its colour exactly while staying smooth and inside 0..1.
183
+ * 2. **Mixing.** Each spectrum becomes `K/S = (1 − R)² / 2R` per band. Colours mix with the
184
+ * two-constant form `K/S = Σ cᵢSᵢ(K/S)ᵢ / Σ cᵢSᵢ`, where `cᵢ` is the weight times the colour's
185
+ * tinting strength and `Sᵢ` its scattering, taken from its luminance (light paints such as
186
+ * titanium white scatter strongly, dark ones barely). Back to reflectance with
187
+ * `R = 1 + K/S − √((K/S)² + 2·K/S)`.
188
+ * 3. **Back to sRGB.** The spectrum is weighted by the CIE 1931 2° colour-matching functions
189
+ * (the analytic multi-lobe fit of Wyman, Sloan & Shirley, JCGT 2013) under a 6504 K Planckian
190
+ * illuminant, converted to linear sRGB and normalised so a perfect white reflector is exactly
191
+ * white. Analytic curves keep the CIE's own (CC BY-SA) tables out of the package.
192
+ *
193
+ * Everything is plain TypeScript on typed arrays with no DOM: it runs in Node and Workers and is
194
+ * deterministic. Colours are straight sRGB triples in 0..1, as in `@pixerate/editor/raster`.
195
+ */
196
+ /** An sRGB colour, each channel 0..1 (gamma-encoded, as in CSS). */
197
+ type PigmentRgb = readonly [number, number, number];
198
+ /** Number of spectral bands. */
199
+ declare const PIGMENT_BANDS = 36;
200
+ /** First band's wavelength in nm; bands are 10 nm apart (380..730 nm). */
201
+ declare const PIGMENT_LAMBDA_MIN = 380;
202
+ declare const PIGMENT_LAMBDA_STEP = 10;
203
+ /** Band centre wavelengths in nm. */
204
+ declare const PIGMENT_WAVELENGTHS: Float32Array;
205
+ /**
206
+ * The smooth reflectance spectrum (0..1 per band, `PIGMENT_BANDS` bands from 380 nm in 10 nm
207
+ * steps) of an sRGB colour. `reflectanceToRgb` of the result gives the colour back.
208
+ */
209
+ declare function rgbToReflectance(r: number, g: number, b: number, out?: Float32Array): Float32Array;
210
+ /** The sRGB colour (0..1, clipped to the gamut) of a reflectance spectrum. */
211
+ declare function reflectanceToRgb(reflectance: ArrayLike<number>, out?: number[]): number[];
212
+ /**
213
+ * A colour prepared for mixing: its K/S spectrum and its weight in a mix. Make one per brush or
214
+ * palette colour with `createPigment` and reuse it (`setPigmentColor`) on hot paths.
215
+ */
216
+ interface Pigment {
217
+ /** The sRGB colour it was made from (0..1). */
218
+ readonly rgb: [number, number, number];
219
+ /** Tinting strength (default 1): how strongly it colours a mix, relative to its weight. */
220
+ strength: number;
221
+ /** K/S per band. */
222
+ readonly ks: Float32Array;
223
+ /** Scattering from the colour's luminance (floored), before strength. */
224
+ scatter: number;
225
+ }
226
+ interface PigmentOptions {
227
+ /**
228
+ * Tinting strength, > 0 (default 1). A strength of 4 counts each part as four, so a little of
229
+ * a strong dark pigment tints a lot of white. A colour mixed only with itself is unchanged
230
+ * whatever its strength.
231
+ */
232
+ strength?: number;
233
+ }
234
+ /** Prepares a colour for mixing. */
235
+ declare function createPigment(color: PigmentRgb, options?: PigmentOptions): Pigment;
236
+ /** Re-targets a pigment to another colour without allocating (the per-pixel fast path). */
237
+ declare function setPigmentColor(pigment: Pigment, r: number, g: number, b: number, strength?: number): Pigment;
238
+ /**
239
+ * Mixes colours like paint. `weights` are parts by amount (any non-negative scale; at least one
240
+ * positive). Colours may be sRGB triples (0..1) or prepared pigments (which carry a tinting
241
+ * strength). Returns the mixed sRGB colour (0..1).
242
+ */
243
+ declare function mixPigments(colors: readonly (PigmentRgb | Pigment)[], weights: readonly number[]): [number, number, number];
244
+ /** Mixes `a` towards `b` like paint: `t = 0` is `a`, `t = 1` is `b`. */
245
+ declare function lerpPigment(a: PigmentRgb | Pigment, b: PigmentRgb | Pigment, t: number): [number, number, number];
246
+ /**
247
+ * The per-dab fast path: mixes two prepared pigments (`t` of `b` into `a`) and writes the sRGB
248
+ * result to `out[offset..offset + 2]`, without allocating. Pair it with `setPigmentColor` for the
249
+ * colour under the brush.
250
+ */
251
+ declare function lerpPigmentInto(a: Pigment, b: Pigment, t: number, out: {
252
+ [i: number]: number;
253
+ }, offset?: number): void;
254
+
255
+ /**
256
+ * Agent tools for pigment mixing (`@pixerate/editor/paint`). `mix_colors` is read-only: it
257
+ * predicts what paints mixed in given amounts look like, for choosing a brush or fill colour.
258
+ */
259
+ declare function createPigmentTools(): AgentTool[];
260
+
261
+ export { type BrushSettings, CoverageMap, DEFAULT_BRUSH, type Dab, DabWalker, MAX_BRUSH_SIZE, PIGMENT_BANDS, PIGMENT_LAMBDA_MIN, PIGMENT_LAMBDA_STEP, PIGMENT_WAVELENGTHS, type Pigment, type PigmentOptions, type PigmentRgb, type StrokeApply, StrokeCoverage, type StrokePoint, applyStrokeToTile, coverageTileCoord, createPigment, createPigmentTools, dabCoverage, dabRect, lerpPigment, lerpPigmentInto, mixPigments, normalizeBrush, rasterizeDab, reflectanceToRgb, rgbToReflectance, setPigmentColor, smoothPoints, tipFalloff, tipReach, tipShape, walkDabs };
@@ -1,4 +1,6 @@
1
- import { B as BlendMode, R as RasterRect, h as TileKey } from '../surface-fJhkmNQn.js';
1
+ import { B as BlendMode, R as RasterRect, g as TileKey } from '../surface-CuBg2c6k.js';
2
+ import { A as AgentTool } from '../registry-D-4fit9C.js';
3
+ import '../schema-Di0CS6Pe.js';
2
4
 
3
5
  /**
4
6
  * The brush engine (a subset of photocraft's `crates/paint`): a computed round tip with size,
@@ -164,4 +166,96 @@ declare function coverageTileCoord(key: TileKey): {
164
166
  ty: number;
165
167
  };
166
168
 
167
- export { type BrushSettings, CoverageMap, DEFAULT_BRUSH, type Dab, DabWalker, MAX_BRUSH_SIZE, type StrokeApply, StrokeCoverage, type StrokePoint, applyStrokeToTile, coverageTileCoord, dabCoverage, dabRect, normalizeBrush, rasterizeDab, smoothPoints, tipFalloff, tipReach, tipShape, walkDabs };
169
+ /**
170
+ * Pigment-like colour mixing: blue and yellow make green, red and white make pink, as paint does.
171
+ *
172
+ * Each sRGB colour is lifted to a smooth reflectance spectrum, the spectra are mixed with the
173
+ * Kubelka-Munk two-flux model, and the mixed spectrum is turned back into sRGB. Written from the
174
+ * published literature; no third-party code or data:
175
+ *
176
+ * 1. **Spectral uplift.** A colour's reflectance is a sigmoid of a quadratic in wavelength,
177
+ * `R(λ) = s(c₀λ² + c₁λ + c₂)` with `s(z) = ½ + z / 2√(1 + z²)` (Jakob & Hanika, "A
178
+ * Low-Dimensional Function Space for Efficient Spectral Upsampling", Eurographics 2019). The
179
+ * three coefficients are solved per colour with Newton's method so the spectrum reproduces the
180
+ * colour. Spectra are precomputed lazily on a 17³ lattice over sRGB and interpolated
181
+ * trilinearly in *linear* RGB: colour is linear in reflectance, so an interpolated spectrum
182
+ * still reproduces its colour exactly while staying smooth and inside 0..1.
183
+ * 2. **Mixing.** Each spectrum becomes `K/S = (1 − R)² / 2R` per band. Colours mix with the
184
+ * two-constant form `K/S = Σ cᵢSᵢ(K/S)ᵢ / Σ cᵢSᵢ`, where `cᵢ` is the weight times the colour's
185
+ * tinting strength and `Sᵢ` its scattering, taken from its luminance (light paints such as
186
+ * titanium white scatter strongly, dark ones barely). Back to reflectance with
187
+ * `R = 1 + K/S − √((K/S)² + 2·K/S)`.
188
+ * 3. **Back to sRGB.** The spectrum is weighted by the CIE 1931 2° colour-matching functions
189
+ * (the analytic multi-lobe fit of Wyman, Sloan & Shirley, JCGT 2013) under a 6504 K Planckian
190
+ * illuminant, converted to linear sRGB and normalised so a perfect white reflector is exactly
191
+ * white. Analytic curves keep the CIE's own (CC BY-SA) tables out of the package.
192
+ *
193
+ * Everything is plain TypeScript on typed arrays with no DOM: it runs in Node and Workers and is
194
+ * deterministic. Colours are straight sRGB triples in 0..1, as in `@pixerate/editor/raster`.
195
+ */
196
+ /** An sRGB colour, each channel 0..1 (gamma-encoded, as in CSS). */
197
+ type PigmentRgb = readonly [number, number, number];
198
+ /** Number of spectral bands. */
199
+ declare const PIGMENT_BANDS = 36;
200
+ /** First band's wavelength in nm; bands are 10 nm apart (380..730 nm). */
201
+ declare const PIGMENT_LAMBDA_MIN = 380;
202
+ declare const PIGMENT_LAMBDA_STEP = 10;
203
+ /** Band centre wavelengths in nm. */
204
+ declare const PIGMENT_WAVELENGTHS: Float32Array;
205
+ /**
206
+ * The smooth reflectance spectrum (0..1 per band, `PIGMENT_BANDS` bands from 380 nm in 10 nm
207
+ * steps) of an sRGB colour. `reflectanceToRgb` of the result gives the colour back.
208
+ */
209
+ declare function rgbToReflectance(r: number, g: number, b: number, out?: Float32Array): Float32Array;
210
+ /** The sRGB colour (0..1, clipped to the gamut) of a reflectance spectrum. */
211
+ declare function reflectanceToRgb(reflectance: ArrayLike<number>, out?: number[]): number[];
212
+ /**
213
+ * A colour prepared for mixing: its K/S spectrum and its weight in a mix. Make one per brush or
214
+ * palette colour with `createPigment` and reuse it (`setPigmentColor`) on hot paths.
215
+ */
216
+ interface Pigment {
217
+ /** The sRGB colour it was made from (0..1). */
218
+ readonly rgb: [number, number, number];
219
+ /** Tinting strength (default 1): how strongly it colours a mix, relative to its weight. */
220
+ strength: number;
221
+ /** K/S per band. */
222
+ readonly ks: Float32Array;
223
+ /** Scattering from the colour's luminance (floored), before strength. */
224
+ scatter: number;
225
+ }
226
+ interface PigmentOptions {
227
+ /**
228
+ * Tinting strength, > 0 (default 1). A strength of 4 counts each part as four, so a little of
229
+ * a strong dark pigment tints a lot of white. A colour mixed only with itself is unchanged
230
+ * whatever its strength.
231
+ */
232
+ strength?: number;
233
+ }
234
+ /** Prepares a colour for mixing. */
235
+ declare function createPigment(color: PigmentRgb, options?: PigmentOptions): Pigment;
236
+ /** Re-targets a pigment to another colour without allocating (the per-pixel fast path). */
237
+ declare function setPigmentColor(pigment: Pigment, r: number, g: number, b: number, strength?: number): Pigment;
238
+ /**
239
+ * Mixes colours like paint. `weights` are parts by amount (any non-negative scale; at least one
240
+ * positive). Colours may be sRGB triples (0..1) or prepared pigments (which carry a tinting
241
+ * strength). Returns the mixed sRGB colour (0..1).
242
+ */
243
+ declare function mixPigments(colors: readonly (PigmentRgb | Pigment)[], weights: readonly number[]): [number, number, number];
244
+ /** Mixes `a` towards `b` like paint: `t = 0` is `a`, `t = 1` is `b`. */
245
+ declare function lerpPigment(a: PigmentRgb | Pigment, b: PigmentRgb | Pigment, t: number): [number, number, number];
246
+ /**
247
+ * The per-dab fast path: mixes two prepared pigments (`t` of `b` into `a`) and writes the sRGB
248
+ * result to `out[offset..offset + 2]`, without allocating. Pair it with `setPigmentColor` for the
249
+ * colour under the brush.
250
+ */
251
+ declare function lerpPigmentInto(a: Pigment, b: Pigment, t: number, out: {
252
+ [i: number]: number;
253
+ }, offset?: number): void;
254
+
255
+ /**
256
+ * Agent tools for pigment mixing (`@pixerate/editor/paint`). `mix_colors` is read-only: it
257
+ * predicts what paints mixed in given amounts look like, for choosing a brush or fill colour.
258
+ */
259
+ declare function createPigmentTools(): AgentTool[];
260
+
261
+ export { type BrushSettings, CoverageMap, DEFAULT_BRUSH, type Dab, DabWalker, MAX_BRUSH_SIZE, PIGMENT_BANDS, PIGMENT_LAMBDA_MIN, PIGMENT_LAMBDA_STEP, PIGMENT_WAVELENGTHS, type Pigment, type PigmentOptions, type PigmentRgb, type StrokeApply, StrokeCoverage, type StrokePoint, applyStrokeToTile, coverageTileCoord, createPigment, createPigmentTools, dabCoverage, dabRect, lerpPigment, lerpPigmentInto, mixPigments, normalizeBrush, rasterizeDab, reflectanceToRgb, rgbToReflectance, setPigmentColor, smoothPoints, tipFalloff, tipReach, tipShape, walkDabs };
@@ -3,32 +3,56 @@ import {
3
3
  DEFAULT_BRUSH,
4
4
  DabWalker,
5
5
  MAX_BRUSH_SIZE,
6
+ PIGMENT_BANDS,
7
+ PIGMENT_LAMBDA_MIN,
8
+ PIGMENT_LAMBDA_STEP,
9
+ PIGMENT_WAVELENGTHS,
6
10
  StrokeCoverage,
7
11
  applyStrokeToTile,
8
12
  coverageTileCoord,
13
+ createPigment,
14
+ createPigmentTools,
9
15
  dabCoverage,
10
16
  dabRect,
17
+ lerpPigment,
18
+ lerpPigmentInto,
19
+ mixPigments,
11
20
  normalizeBrush,
12
21
  rasterizeDab,
22
+ reflectanceToRgb,
23
+ rgbToReflectance,
24
+ setPigmentColor,
13
25
  smoothPoints,
14
26
  tipFalloff,
15
27
  tipReach,
16
28
  tipShape,
17
29
  walkDabs
18
- } from "../chunk-YLB2WVNA.js";
30
+ } from "../chunk-ISDCJHTO.js";
19
31
  import "../chunk-D4ZCU72J.js";
20
32
  export {
21
33
  CoverageMap,
22
34
  DEFAULT_BRUSH,
23
35
  DabWalker,
24
36
  MAX_BRUSH_SIZE,
37
+ PIGMENT_BANDS,
38
+ PIGMENT_LAMBDA_MIN,
39
+ PIGMENT_LAMBDA_STEP,
40
+ PIGMENT_WAVELENGTHS,
25
41
  StrokeCoverage,
26
42
  applyStrokeToTile,
27
43
  coverageTileCoord,
44
+ createPigment,
45
+ createPigmentTools,
28
46
  dabCoverage,
29
47
  dabRect,
48
+ lerpPigment,
49
+ lerpPigmentInto,
50
+ mixPigments,
30
51
  normalizeBrush,
31
52
  rasterizeDab,
53
+ reflectanceToRgb,
54
+ rgbToReflectance,
55
+ setPigmentColor,
32
56
  smoothPoints,
33
57
  tipFalloff,
34
58
  tipReach,
@@ -22,7 +22,45 @@
22
22
 
23
23
 
24
24
 
25
- var _chunkH543GD6Tcjs = require('../chunk-H543GD6T.cjs');
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ var _chunk73L6TROJcjs = require('../chunk-73L6TROJ.cjs');
26
64
 
27
65
 
28
66
 
@@ -117,5 +155,43 @@ var _chunkZOOEX3WTcjs = require('../chunk-ZOOEX3WT.cjs');
117
155
 
118
156
 
119
157
 
120
- exports.BLEND_MODES = _chunkZOOEX3WTcjs.BLEND_MODES; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkH543GD6Tcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.RasterCompositor = _chunkH543GD6Tcjs.RasterCompositor; exports.SurfaceDraft = _chunkZOOEX3WTcjs.SurfaceDraft; exports.TILE = _chunkZOOEX3WTcjs.TILE; exports.TILE_SHIFT = _chunkZOOEX3WTcjs.TILE_SHIFT; exports.TiledSurface = _chunkZOOEX3WTcjs.TiledSurface; exports.ZlibError = _chunkH543GD6Tcjs.ZlibError; exports.adler32 = _chunkH543GD6Tcjs.adler32; exports.base64ToBytes = _chunkH543GD6Tcjs.base64ToBytes; exports.blendChannel = _chunkZOOEX3WTcjs.blendChannel; exports.blendImageData = _chunkZOOEX3WTcjs.blendImageData; exports.blendLum = _chunkZOOEX3WTcjs.blendLum; exports.blendPixel = _chunkZOOEX3WTcjs.blendPixel; exports.blendRgb = _chunkZOOEX3WTcjs.blendRgb; exports.blendTile = _chunkH543GD6Tcjs.blendTile; exports.bytesToBase64 = _chunkH543GD6Tcjs.bytesToBase64; exports.canvasCompositeOperation = _chunkZOOEX3WTcjs.canvasCompositeOperation; exports.changedTiles = _chunkH543GD6Tcjs.changedTiles; exports.collectTiles = _chunkZOOEX3WTcjs.collectTiles; exports.contentBounds = _chunkZOOEX3WTcjs.contentBounds; exports.decodePng = _chunkH543GD6Tcjs.decodePng; exports.deflate = _chunkH543GD6Tcjs.deflate; exports.deflateRaw = _chunkH543GD6Tcjs.deflateRaw; exports.emptySurface = _chunkZOOEX3WTcjs.emptySurface; exports.encodePng = _chunkH543GD6Tcjs.encodePng; exports.fillRect = _chunkZOOEX3WTcjs.fillRect; exports.findLayer = _chunkH543GD6Tcjs.findLayer; exports.finishTile = _chunkZOOEX3WTcjs.finishTile; exports.flattenLayers = _chunkH543GD6Tcjs.flattenLayers; exports.gaussianBlur = _chunkH543GD6Tcjs.gaussianBlur; exports.inflate = _chunkH543GD6Tcjs.inflate; exports.inflateRaw = _chunkH543GD6Tcjs.inflateRaw; exports.insertLayer = _chunkH543GD6Tcjs.insertLayer; exports.isBlendMode = _chunkZOOEX3WTcjs.isBlendMode; exports.isLayerLocked = _chunkH543GD6Tcjs.isLayerLocked; exports.isPng = _chunkH543GD6Tcjs.isPng; exports.isSeparableBlendMode = _chunkZOOEX3WTcjs.isSeparableBlendMode; exports.mapLayer = _chunkH543GD6Tcjs.mapLayer; exports.normalizeBlendMode = _chunkZOOEX3WTcjs.normalizeBlendMode; exports.packRgba = _chunkZOOEX3WTcjs.packRgba; exports.parseDataUrl = _chunkH543GD6Tcjs.parseDataUrl; exports.pngDataUrl = _chunkH543GD6Tcjs.pngDataUrl; exports.readPixel = _chunkZOOEX3WTcjs.readPixel; exports.readRegion = _chunkZOOEX3WTcjs.readRegion; exports.setLum = _chunkZOOEX3WTcjs.setLum; exports.solidSurface = _chunkZOOEX3WTcjs.solidSurface; exports.surfaceBytes = _chunkZOOEX3WTcjs.surfaceBytes; exports.surfaceFromPixels = _chunkZOOEX3WTcjs.surfaceFromPixels; exports.surfacesEqual = _chunkZOOEX3WTcjs.surfacesEqual; exports.tileCoord = _chunkZOOEX3WTcjs.tileCoord; exports.tileKey = _chunkZOOEX3WTcjs.tileKey; exports.tileRect = _chunkZOOEX3WTcjs.tileRect; exports.tilesInRect = _chunkZOOEX3WTcjs.tilesInRect; exports.translateSurface = _chunkZOOEX3WTcjs.translateSurface; exports.uniformTile = _chunkZOOEX3WTcjs.uniformTile; exports.writeRegion = _chunkZOOEX3WTcjs.writeRegion;
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ exports.BLEND_MODES = _chunkZOOEX3WTcjs.BLEND_MODES; exports.CURVE_LUT_SIZE = _chunk73L6TROJcjs.CURVE_LUT_SIZE; exports.DEFAULT_GLOBAL_LIGHT = _chunk73L6TROJcjs.DEFAULT_GLOBAL_LIGHT; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk73L6TROJcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.LAYER_EFFECT_KINDS = _chunk73L6TROJcjs.LAYER_EFFECT_KINDS; exports.LayerEffectError = _chunk73L6TROJcjs.LayerEffectError; exports.MAX_EFFECT_REACH = _chunk73L6TROJcjs.MAX_EFFECT_REACH; exports.PatternPlacement = _chunk73L6TROJcjs.PatternPlacement; exports.PatternTile = _chunk73L6TROJcjs.PatternTile; exports.RasterCompositor = _chunk73L6TROJcjs.RasterCompositor; exports.STROKE_CHAMFER_MAX = _chunk73L6TROJcjs.STROKE_CHAMFER_MAX; exports.SurfaceDraft = _chunkZOOEX3WTcjs.SurfaceDraft; exports.TILE = _chunkZOOEX3WTcjs.TILE; exports.TILE_SHIFT = _chunkZOOEX3WTcjs.TILE_SHIFT; exports.TiledSurface = _chunkZOOEX3WTcjs.TiledSurface; exports.ZlibError = _chunk73L6TROJcjs.ZlibError; exports.activeEffectItems = _chunk73L6TROJcjs.activeEffectItems; exports.adler32 = _chunk73L6TROJcjs.adler32; exports.base64ToBytes = _chunk73L6TROJcjs.base64ToBytes; exports.blendChannel = _chunkZOOEX3WTcjs.blendChannel; exports.blendImageData = _chunkZOOEX3WTcjs.blendImageData; exports.blendLum = _chunkZOOEX3WTcjs.blendLum; exports.blendPixel = _chunkZOOEX3WTcjs.blendPixel; exports.blendRgb = _chunkZOOEX3WTcjs.blendRgb; exports.blendTile = _chunk73L6TROJcjs.blendTile; exports.buildEffectMaps = _chunk73L6TROJcjs.buildEffectMaps; exports.builtinPattern = _chunk73L6TROJcjs.builtinPattern; exports.builtinPatternIds = _chunk73L6TROJcjs.builtinPatternIds; exports.bytesToBase64 = _chunk73L6TROJcjs.bytesToBase64; exports.canvasCompositeOperation = _chunkZOOEX3WTcjs.canvasCompositeOperation; exports.changedTiles = _chunk73L6TROJcjs.changedTiles; exports.collectTiles = _chunkZOOEX3WTcjs.collectTiles; exports.compositeLayerEffects = _chunk73L6TROJcjs.compositeLayerEffects; exports.contentBounds = _chunkZOOEX3WTcjs.contentBounds; exports.contourLut = _chunk73L6TROJcjs.contourLut; exports.curveLut = _chunk73L6TROJcjs.curveLut; exports.decodePng = _chunk73L6TROJcjs.decodePng; exports.defaultEffectGradient = _chunk73L6TROJcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk73L6TROJcjs.defaultLayerEffect; exports.deflate = _chunk73L6TROJcjs.deflate; exports.deflateRaw = _chunk73L6TROJcjs.deflateRaw; exports.effectColorHex = _chunk73L6TROJcjs.effectColorHex; exports.effectReach = _chunk73L6TROJcjs.effectReach; exports.effectsAreLocal = _chunk73L6TROJcjs.effectsAreLocal; exports.effectsFingerprint = _chunk73L6TROJcjs.effectsFingerprint; exports.effectsMargin = _chunk73L6TROJcjs.effectsMargin; exports.effectsScale = _chunk73L6TROJcjs.effectsScale; exports.emptySurface = _chunkZOOEX3WTcjs.emptySurface; exports.encodePng = _chunk73L6TROJcjs.encodePng; exports.fillRect = _chunkZOOEX3WTcjs.fillRect; exports.findLayer = _chunk73L6TROJcjs.findLayer; exports.finishTile = _chunkZOOEX3WTcjs.finishTile; exports.flattenLayers = _chunk73L6TROJcjs.flattenLayers; exports.gaussianBlur = _chunk73L6TROJcjs.gaussianBlur; exports.gradientT = _chunk73L6TROJcjs.gradientT; exports.hasActiveEffects = _chunk73L6TROJcjs.hasActiveEffects; exports.hashNoise = _chunk73L6TROJcjs.hashNoise; exports.inflate = _chunk73L6TROJcjs.inflate; exports.inflateRaw = _chunk73L6TROJcjs.inflateRaw; exports.insertLayer = _chunk73L6TROJcjs.insertLayer; exports.isBlendMode = _chunkZOOEX3WTcjs.isBlendMode; exports.isLayerEffectKind = _chunk73L6TROJcjs.isLayerEffectKind; exports.isLayerLocked = _chunk73L6TROJcjs.isLayerLocked; exports.isPng = _chunk73L6TROJcjs.isPng; exports.isSeparableBlendMode = _chunkZOOEX3WTcjs.isSeparableBlendMode; exports.layerEffectFields = _chunk73L6TROJcjs.layerEffectFields; exports.layerEffectLabel = _chunk73L6TROJcjs.layerEffectLabel; exports.mapLayer = _chunk73L6TROJcjs.mapLayer; exports.mergeLayerEffect = _chunk73L6TROJcjs.mergeLayerEffect; exports.newEffectId = _chunk73L6TROJcjs.newEffectId; exports.normalizeBlendMode = _chunkZOOEX3WTcjs.normalizeBlendMode; exports.normalizeLayerEffects = _chunk73L6TROJcjs.normalizeLayerEffects; exports.packRgba = _chunkZOOEX3WTcjs.packRgba; exports.parseDataUrl = _chunk73L6TROJcjs.parseDataUrl; exports.parseEffectColor = _chunk73L6TROJcjs.parseEffectColor; exports.pngDataUrl = _chunk73L6TROJcjs.pngDataUrl; exports.readPixel = _chunkZOOEX3WTcjs.readPixel; exports.readRegion = _chunkZOOEX3WTcjs.readRegion; exports.renderLayerEffects = _chunk73L6TROJcjs.renderLayerEffects; exports.scaleLayerEffect = _chunk73L6TROJcjs.scaleLayerEffect; exports.setLum = _chunkZOOEX3WTcjs.setLum; exports.solidSurface = _chunkZOOEX3WTcjs.solidSurface; exports.surfaceBytes = _chunkZOOEX3WTcjs.surfaceBytes; exports.surfaceFromPixels = _chunkZOOEX3WTcjs.surfaceFromPixels; exports.surfacesEqual = _chunkZOOEX3WTcjs.surfacesEqual; exports.tileCoord = _chunkZOOEX3WTcjs.tileCoord; exports.tileKey = _chunkZOOEX3WTcjs.tileKey; exports.tileRect = _chunkZOOEX3WTcjs.tileRect; exports.tilesInRect = _chunkZOOEX3WTcjs.tilesInRect; exports.translateSurface = _chunkZOOEX3WTcjs.translateSurface; exports.uniformTile = _chunkZOOEX3WTcjs.uniformTile; exports.validateEffectGradient = _chunk73L6TROJcjs.validateEffectGradient; exports.validateLayerEffect = _chunk73L6TROJcjs.validateLayerEffect; exports.validateLayerEffects = _chunk73L6TROJcjs.validateLayerEffects; exports.writeRegion = _chunkZOOEX3WTcjs.writeRegion;
121
197
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/raster/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,k+FAAC","file":"/home/runner/work/editor/editor/packages/core/dist/raster/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/raster/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,oyKAAC","file":"/home/runner/work/editor/editor/packages/core/dist/raster/index.cjs"}