@pixerate/editor 0.120.0 → 0.122.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 (64) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/{chunk-HTAFDTNR.cjs → chunk-4PUPGALM.cjs} +251 -156
  3. package/dist/chunk-4PUPGALM.cjs.map +1 -0
  4. package/dist/{chunk-N3467VD6.js → chunk-7QN76ESJ.js} +1 -179
  5. package/dist/chunk-7QN76ESJ.js.map +1 -0
  6. package/dist/{chunk-UMVW2Q66.js → chunk-CLTTLLWA.js} +1090 -982
  7. package/dist/chunk-CLTTLLWA.js.map +1 -0
  8. package/dist/{chunk-EJVDBITD.cjs → chunk-DCLJNVZS.cjs} +2 -180
  9. package/dist/chunk-DCLJNVZS.cjs.map +1 -0
  10. package/dist/{chunk-WMRIG4XQ.cjs → chunk-DFFBJV3U.cjs} +1855 -1747
  11. package/dist/chunk-DFFBJV3U.cjs.map +1 -0
  12. package/dist/chunk-GX332W2C.js +181 -0
  13. package/dist/chunk-GX332W2C.js.map +1 -0
  14. package/dist/{chunk-BOWUU4LJ.js → chunk-IX3YKUVK.js} +105 -10
  15. package/dist/chunk-IX3YKUVK.js.map +1 -0
  16. package/dist/{chunk-TS5IEUW6.cjs → chunk-K7V27T72.cjs} +178 -3
  17. package/dist/chunk-K7V27T72.cjs.map +1 -0
  18. package/dist/chunk-MUUXNRU4.cjs +181 -0
  19. package/dist/chunk-MUUXNRU4.cjs.map +1 -0
  20. package/dist/{chunk-YHW26LS2.js → chunk-ZZPGTNXJ.js} +177 -2
  21. package/dist/chunk-ZZPGTNXJ.js.map +1 -0
  22. package/dist/{render-B05K68_h.d.ts → deep-DLwKZDFr.d.ts} +143 -134
  23. package/dist/{render-DnAbIKcs.d.cts → deep-QS3ppbMX.d.cts} +143 -134
  24. package/dist/{export-D2D8hb_u.d.ts → export-VmTofKIk.d.ts} +11 -4
  25. package/dist/{export-fP2hZYjm.d.cts → export-jKKj8Fg8.d.cts} +11 -4
  26. package/dist/image-editor/index.cjs +760 -734
  27. package/dist/image-editor/index.cjs.map +1 -1
  28. package/dist/image-editor/index.d.cts +18 -6
  29. package/dist/image-editor/index.d.ts +18 -6
  30. package/dist/image-editor/index.js +37 -11
  31. package/dist/image-editor/index.js.map +1 -1
  32. package/dist/paint/index.cjs +22 -2
  33. package/dist/paint/index.cjs.map +1 -1
  34. package/dist/paint/index.d.cts +159 -1
  35. package/dist/paint/index.d.ts +159 -1
  36. package/dist/paint/index.js +21 -1
  37. package/dist/paint-editor/index.cjs +95 -94
  38. package/dist/paint-editor/index.cjs.map +1 -1
  39. package/dist/paint-editor/index.d.cts +2 -2
  40. package/dist/paint-editor/index.d.ts +2 -2
  41. package/dist/paint-editor/index.js +12 -11
  42. package/dist/paint-editor/index.js.map +1 -1
  43. package/dist/raster/index.cjs +5 -4
  44. package/dist/raster/index.cjs.map +1 -1
  45. package/dist/raster/index.d.cts +29 -7
  46. package/dist/raster/index.d.ts +29 -7
  47. package/dist/raster/index.js +11 -10
  48. package/dist/vector/index.cjs +14 -12
  49. package/dist/vector/index.cjs.map +1 -1
  50. package/dist/vector/index.js +7 -5
  51. package/dist/vector/index.js.map +1 -1
  52. package/package.json +1 -1
  53. package/skills/pixerate-canvas/SKILL.md +23 -1
  54. package/skills/pixerate-image-editor/SKILL.md +7 -1
  55. package/skills/pixerate-image-editor/references/photoshop-files.md +4 -3
  56. package/skills/pixerate-paint-editor/SKILL.md +32 -7
  57. package/dist/chunk-BOWUU4LJ.js.map +0 -1
  58. package/dist/chunk-EJVDBITD.cjs.map +0 -1
  59. package/dist/chunk-HTAFDTNR.cjs.map +0 -1
  60. package/dist/chunk-N3467VD6.js.map +0 -1
  61. package/dist/chunk-TS5IEUW6.cjs.map +0 -1
  62. package/dist/chunk-UMVW2Q66.js.map +0 -1
  63. package/dist/chunk-WMRIG4XQ.cjs.map +0 -1
  64. package/dist/chunk-YHW26LS2.js.map +0 -1
@@ -32,7 +32,16 @@
32
32
 
33
33
 
34
34
 
35
- var _chunkTS5IEUW6cjs = require('../chunk-TS5IEUW6.cjs');
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+ var _chunkK7V27T72cjs = require('../chunk-K7V27T72.cjs');
36
45
 
37
46
 
38
47
 
@@ -166,6 +175,17 @@ var _chunkL3PXFMOFcjs = require('../chunk-L3PXFMOF.cjs');
166
175
 
167
176
 
168
177
  var _chunk7ISPWEJAcjs = require('../chunk-7ISPWEJA.cjs');
178
+ require('../chunk-DCLJNVZS.cjs');
179
+ require('../chunk-643B2HKC.cjs');
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
169
189
 
170
190
 
171
191
 
@@ -329,5 +349,5 @@ var _chunk7ISPWEJAcjs = require('../chunk-7ISPWEJA.cjs');
329
349
 
330
350
 
331
351
 
332
- exports.BODY_SCATTER = _chunkL3PXFMOFcjs.BODY_SCATTER; exports.CoverageMap = _chunkL3PXFMOFcjs.CoverageMap; exports.DEFAULT_BLENDER = _chunkL3PXFMOFcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkL3PXFMOFcjs.DEFAULT_BRUSH; exports.DEFAULT_FLOW = _chunkL3PXFMOFcjs.DEFAULT_FLOW; exports.DEFAULT_MIXER = _chunkL3PXFMOFcjs.DEFAULT_MIXER; exports.DEFAULT_RETOUCH = _chunkTS5IEUW6cjs.DEFAULT_RETOUCH; exports.DEFAULT_SMUDGE = _chunkL3PXFMOFcjs.DEFAULT_SMUDGE; exports.DEFAULT_WET_PAPER = _chunkL3PXFMOFcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkL3PXFMOFcjs.DEFAULT_WET_PARAMS; exports.DRY_EPS = _chunkL3PXFMOFcjs.DRY_EPS; exports.DabWalker = _chunkL3PXFMOFcjs.DabWalker; exports.EMPTY_MIXER_LOAD = _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkL3PXFMOFcjs.EX; exports.EY = _chunkL3PXFMOFcjs.EY; exports.FLAG_ALIVE = _chunkL3PXFMOFcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkL3PXFMOFcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkL3PXFMOFcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkL3PXFMOFcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkL3PXFMOFcjs.FLAG_TOP; exports.FLAG_WET = _chunkL3PXFMOFcjs.FLAG_WET; exports.FLAT = _chunkL3PXFMOFcjs.FLAT; exports.FREE_INTERVAL = _chunkL3PXFMOFcjs.FREE_INTERVAL; exports.HIDE = _chunkL3PXFMOFcjs.HIDE; exports.MAX_BATCH = _chunkL3PXFMOFcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkL3PXFMOFcjs.MAX_BRUSH_SIZE; exports.MAX_TILT_ACCEL = _chunkL3PXFMOFcjs.MAX_TILT_ACCEL; exports.MAX_WET_LANES = _chunkL3PXFMOFcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkL3PXFMOFcjs.MAX_WET_SLOTS; exports.MIXER_DRAIN = _chunkL3PXFMOFcjs.MIXER_DRAIN; exports.MIXER_PICKUP_RATE = _chunkL3PXFMOFcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkL3PXFMOFcjs.MIXING_MODELS; exports.MixerStroke = _chunkL3PXFMOFcjs.MixerStroke; exports.OPP = _chunkL3PXFMOFcjs.OPP; exports.PAPER_CAPACITY = _chunkL3PXFMOFcjs.PAPER_CAPACITY; exports.PARAM = _chunkL3PXFMOFcjs.PARAM; exports.PARAM_FLOATS = _chunkL3PXFMOFcjs.PARAM_FLOATS; exports.PIGMENT_BANDS = _chunk7ISPWEJAcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkL3PXFMOFcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunk7ISPWEJAcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunk7ISPWEJAcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkL3PXFMOFcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunk7ISPWEJAcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkL3PXFMOFcjs.PLANE; exports.PLANE_BYTES = _chunkL3PXFMOFcjs.PLANE_BYTES; exports.P_D0 = _chunkL3PXFMOFcjs.P_D0; exports.P_EDGE = _chunkL3PXFMOFcjs.P_EDGE; exports.P_FX = _chunkL3PXFMOFcjs.P_FX; exports.P_FY = _chunkL3PXFMOFcjs.P_FY; exports.P_H = _chunkL3PXFMOFcjs.P_H; exports.P_P0 = _chunkL3PXFMOFcjs.P_P0; exports.P_RHO = _chunkL3PXFMOFcjs.P_RHO; exports.P_SW = _chunkL3PXFMOFcjs.P_SW; exports.P_UX = _chunkL3PXFMOFcjs.P_UX; exports.P_UY = _chunkL3PXFMOFcjs.P_UY; exports.PaintExchange = _chunkL3PXFMOFcjs.PaintExchange; exports.RETOUCH_SAMPLES = _chunkTS5IEUW6cjs.RETOUCH_SAMPLES; exports.RegionPixelSource = _chunkTS5IEUW6cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkTS5IEUW6cjs.RetouchDabStroke; exports.SET_PLANES = _chunkL3PXFMOFcjs.SET_PLANES; exports.SLOT_BYTES = _chunkL3PXFMOFcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkL3PXFMOFcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkL3PXFMOFcjs.SLOT_SIDE; exports.SPOT_HEAL_TYPES = _chunkTS5IEUW6cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkL3PXFMOFcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkL3PXFMOFcjs.STRIP; exports.SmudgeTip = _chunkL3PXFMOFcjs.SmudgeTip; exports.StrokeCoverage = _chunkL3PXFMOFcjs.StrokeCoverage; exports.TONE_RANGES = _chunkTS5IEUW6cjs.TONE_RANGES; exports.TileMedium = _chunkL3PXFMOFcjs.TileMedium; exports.TilePixelSource = _chunkTS5IEUW6cjs.TilePixelSource; exports.U_MAX = _chunkL3PXFMOFcjs.U_MAX; exports.W9 = _chunkL3PXFMOFcjs.W9; exports.WET_FLOW_KINDS = _chunkL3PXFMOFcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkL3PXFMOFcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkL3PXFMOFcjs.WET_TILE; exports.WetMedium = _chunkL3PXFMOFcjs.WetMedium; exports.WetWorkerPool = _chunkL3PXFMOFcjs.WetWorkerPool; exports.WetWorld = _chunkL3PXFMOFcjs.WetWorld; exports.WetWorldError = _chunkL3PXFMOFcjs.WetWorldError; exports.applyRetouchToTile = _chunkTS5IEUW6cjs.applyRetouchToTile; exports.applyStrokeToDeepTile = _chunkL3PXFMOFcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkL3PXFMOFcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkTS5IEUW6cjs.applyToneToDeepTile; exports.bestOffset = _chunkTS5IEUW6cjs.bestOffset; exports.blendRadius = _chunkL3PXFMOFcjs.blendRadius; exports.blenderDab = _chunkL3PXFMOFcjs.blenderDab; exports.canShareMemory = _chunkL3PXFMOFcjs.canShareMemory; exports.cleanMixer = _chunkL3PXFMOFcjs.cleanMixer; exports.coverageTileCoord = _chunkL3PXFMOFcjs.coverageTileCoord; exports.createBlenderScratch = _chunkL3PXFMOFcjs.createBlenderScratch; exports.createPigment = _chunk7ISPWEJAcjs.createPigment; exports.createPigmentTools = _chunkL3PXFMOFcjs.createPigmentTools; exports.dabCoverage = _chunkL3PXFMOFcjs.dabCoverage; exports.dabRect = _chunkL3PXFMOFcjs.dabRect; exports.dexp = _chunkL3PXFMOFcjs.dexp; exports.dilateMask = _chunkTS5IEUW6cjs.dilateMask; exports.dlog = _chunkL3PXFMOFcjs.dlog; exports.dodgeBurn = _chunkTS5IEUW6cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkTS5IEUW6cjs.dodgeBurnCurve; exports.dpow = _chunkL3PXFMOFcjs.dpow; exports.dsincos = _chunkL3PXFMOFcjs.dsincos; exports.edgeBits = _chunkL3PXFMOFcjs.edgeBits; exports.exchangeRates = _chunkL3PXFMOFcjs.exchangeRates; exports.expNeg = _chunkL3PXFMOFcjs.expNeg; exports.filmPixel = _chunkL3PXFMOFcjs.filmPixel; exports.filmReflectance = _chunkL3PXFMOFcjs.filmReflectance; exports.flowField = _chunkL3PXFMOFcjs.flowField; exports.healPixels = _chunkTS5IEUW6cjs.healPixels; exports.latticeViscosity = _chunkL3PXFMOFcjs.latticeViscosity; exports.lerpPigment = _chunk7ISPWEJAcjs.lerpPigment; exports.lerpPigmentInto = _chunk7ISPWEJAcjs.lerpPigmentInto; exports.linearToSrgb8 = _chunkL3PXFMOFcjs.linearToSrgb8; exports.loadMixer = _chunkL3PXFMOFcjs.loadMixer; exports.loadWetKernel = _chunkL3PXFMOFcjs.loadWetKernel; exports.luma = _chunkTS5IEUW6cjs.luma; exports.maskBounds = _chunkTS5IEUW6cjs.maskBounds; exports.membraneFill = _chunkTS5IEUW6cjs.membraneFill; exports.mixPigments = _chunk7ISPWEJAcjs.mixPigments; exports.mixerRates = _chunkL3PXFMOFcjs.mixerRates; exports.normalizeBlender = _chunkL3PXFMOFcjs.normalizeBlender; exports.normalizeBrush = _chunkL3PXFMOFcjs.normalizeBrush; exports.normalizeFlow = _chunkL3PXFMOFcjs.normalizeFlow; exports.normalizeMixer = _chunkL3PXFMOFcjs.normalizeMixer; exports.normalizeRetouch = _chunkTS5IEUW6cjs.normalizeRetouch; exports.normalizeSmudge = _chunkL3PXFMOFcjs.normalizeSmudge; exports.normalizeTilt = _chunkL3PXFMOFcjs.normalizeTilt; exports.normalizeWetParams = _chunkL3PXFMOFcjs.normalizeWetParams; exports.packWetParams = _chunkL3PXFMOFcjs.packWetParams; exports.paintPathStroke = _chunkTS5IEUW6cjs.paintPathStroke; exports.pathStrokeCoverage = _chunkTS5IEUW6cjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkTS5IEUW6cjs.pathStrokeDabs; exports.perDabStrength = _chunkTS5IEUW6cjs.perDabStrength; exports.pigmentColor = _chunkL3PXFMOFcjs.pigmentColor; exports.pigmentOf = _chunkL3PXFMOFcjs.pigmentOf; exports.pixelPigment = _chunkL3PXFMOFcjs.pixelPigment; exports.put255 = _chunkL3PXFMOFcjs.put255; exports.rasterizeDab = _chunkL3PXFMOFcjs.rasterizeDab; exports.readSourceRegion = _chunkTS5IEUW6cjs.readSourceRegion; exports.reflectanceToRgb = _chunk7ISPWEJAcjs.reflectanceToRgb; exports.rgbToReflectance = _chunk7ISPWEJAcjs.rgbToReflectance; exports.rgbaViewOfGrey = _chunkTS5IEUW6cjs.rgbaViewOfGrey; exports.saturationOf = _chunkTS5IEUW6cjs.saturationOf; exports.seamlessClone = _chunkTS5IEUW6cjs.seamlessClone; exports.setPigmentColor = _chunk7ISPWEJAcjs.setPigmentColor; exports.shadeTile = _chunkL3PXFMOFcjs.shadeTile; exports.smoothPoints = _chunkL3PXFMOFcjs.smoothPoints; exports.smudgeEffect = _chunkTS5IEUW6cjs.smudgeEffect; exports.solveMembrane = _chunkTS5IEUW6cjs.solveMembrane; exports.sponge = _chunkTS5IEUW6cjs.sponge; exports.spongeEffect = _chunkTS5IEUW6cjs.spongeEffect; exports.spotHealPixels = _chunkTS5IEUW6cjs.spotHealPixels; exports.spotHealWindow = _chunkTS5IEUW6cjs.spotHealWindow; exports.srgbByteToLinear = _chunkL3PXFMOFcjs.srgbByteToLinear; exports.stepSlotTs = _chunkL3PXFMOFcjs.stepSlotTs; exports.tipFalloff = _chunkL3PXFMOFcjs.tipFalloff; exports.tipReach = _chunkL3PXFMOFcjs.tipReach; exports.tipShape = _chunkL3PXFMOFcjs.tipShape; exports.toneOf = _chunkTS5IEUW6cjs.toneOf; exports.walkDabs = _chunkL3PXFMOFcjs.walkDabs; exports.wetSimdSupported = _chunkL3PXFMOFcjs.wetSimdSupported; exports.wetSupport = _chunkL3PXFMOFcjs.wetSupport;
352
+ exports.BODY_SCATTER = _chunkL3PXFMOFcjs.BODY_SCATTER; exports.BrushstrokeCache = _chunkK7V27T72cjs.BrushstrokeCache; exports.CoverageMap = _chunkL3PXFMOFcjs.CoverageMap; exports.DEFAULT_BLENDER = _chunkL3PXFMOFcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkL3PXFMOFcjs.DEFAULT_BRUSH; exports.DEFAULT_FLOW = _chunkL3PXFMOFcjs.DEFAULT_FLOW; exports.DEFAULT_MIXER = _chunkL3PXFMOFcjs.DEFAULT_MIXER; exports.DEFAULT_RETOUCH = _chunkK7V27T72cjs.DEFAULT_RETOUCH; exports.DEFAULT_SMUDGE = _chunkL3PXFMOFcjs.DEFAULT_SMUDGE; exports.DEFAULT_WET_PAPER = _chunkL3PXFMOFcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkL3PXFMOFcjs.DEFAULT_WET_PARAMS; exports.DRY_EPS = _chunkL3PXFMOFcjs.DRY_EPS; exports.DabWalker = _chunkL3PXFMOFcjs.DabWalker; exports.EMPTY_MIXER_LOAD = _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkL3PXFMOFcjs.EX; exports.EY = _chunkL3PXFMOFcjs.EY; exports.FLAG_ALIVE = _chunkL3PXFMOFcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkL3PXFMOFcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkL3PXFMOFcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkL3PXFMOFcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkL3PXFMOFcjs.FLAG_TOP; exports.FLAG_WET = _chunkL3PXFMOFcjs.FLAG_WET; exports.FLAT = _chunkL3PXFMOFcjs.FLAT; exports.FREE_INTERVAL = _chunkL3PXFMOFcjs.FREE_INTERVAL; exports.HIDE = _chunkL3PXFMOFcjs.HIDE; exports.MAX_BATCH = _chunkL3PXFMOFcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkL3PXFMOFcjs.MAX_BRUSH_SIZE; exports.MAX_TILT_ACCEL = _chunkL3PXFMOFcjs.MAX_TILT_ACCEL; exports.MAX_WET_LANES = _chunkL3PXFMOFcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkL3PXFMOFcjs.MAX_WET_SLOTS; exports.MIXER_DRAIN = _chunkL3PXFMOFcjs.MIXER_DRAIN; exports.MIXER_PICKUP_RATE = _chunkL3PXFMOFcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkL3PXFMOFcjs.MIXING_MODELS; exports.MixerStroke = _chunkL3PXFMOFcjs.MixerStroke; exports.OPP = _chunkL3PXFMOFcjs.OPP; exports.PAPER_CAPACITY = _chunkL3PXFMOFcjs.PAPER_CAPACITY; exports.PARAM = _chunkL3PXFMOFcjs.PARAM; exports.PARAM_FLOATS = _chunkL3PXFMOFcjs.PARAM_FLOATS; exports.PIGMENT_BANDS = _chunk7ISPWEJAcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkL3PXFMOFcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunk7ISPWEJAcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunk7ISPWEJAcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkL3PXFMOFcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunk7ISPWEJAcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkL3PXFMOFcjs.PLANE; exports.PLANE_BYTES = _chunkL3PXFMOFcjs.PLANE_BYTES; exports.P_D0 = _chunkL3PXFMOFcjs.P_D0; exports.P_EDGE = _chunkL3PXFMOFcjs.P_EDGE; exports.P_FX = _chunkL3PXFMOFcjs.P_FX; exports.P_FY = _chunkL3PXFMOFcjs.P_FY; exports.P_H = _chunkL3PXFMOFcjs.P_H; exports.P_P0 = _chunkL3PXFMOFcjs.P_P0; exports.P_RHO = _chunkL3PXFMOFcjs.P_RHO; exports.P_SW = _chunkL3PXFMOFcjs.P_SW; exports.P_UX = _chunkL3PXFMOFcjs.P_UX; exports.P_UY = _chunkL3PXFMOFcjs.P_UY; exports.PaintExchange = _chunkL3PXFMOFcjs.PaintExchange; exports.RETOUCH_SAMPLES = _chunkK7V27T72cjs.RETOUCH_SAMPLES; exports.RegionPixelSource = _chunkK7V27T72cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkK7V27T72cjs.RetouchDabStroke; exports.SET_PLANES = _chunkL3PXFMOFcjs.SET_PLANES; exports.SLOT_BYTES = _chunkL3PXFMOFcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkL3PXFMOFcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkL3PXFMOFcjs.SLOT_SIDE; exports.SPOT_HEAL_TYPES = _chunkK7V27T72cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkL3PXFMOFcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkL3PXFMOFcjs.STRIP; exports.SmudgeTip = _chunkL3PXFMOFcjs.SmudgeTip; exports.StrokeCoverage = _chunkL3PXFMOFcjs.StrokeCoverage; exports.TONE_RANGES = _chunkK7V27T72cjs.TONE_RANGES; exports.TileMedium = _chunkL3PXFMOFcjs.TileMedium; exports.TilePixelSource = _chunkK7V27T72cjs.TilePixelSource; exports.U_MAX = _chunkL3PXFMOFcjs.U_MAX; exports.W9 = _chunkL3PXFMOFcjs.W9; exports.WET_FLOW_KINDS = _chunkL3PXFMOFcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkL3PXFMOFcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkL3PXFMOFcjs.WET_TILE; exports.WetMedium = _chunkL3PXFMOFcjs.WetMedium; exports.WetWorkerPool = _chunkL3PXFMOFcjs.WetWorkerPool; exports.WetWorld = _chunkL3PXFMOFcjs.WetWorld; exports.WetWorldError = _chunkL3PXFMOFcjs.WetWorldError; exports.applyRetouchToTile = _chunkK7V27T72cjs.applyRetouchToTile; exports.applyStrokeToDeepTile = _chunkL3PXFMOFcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkL3PXFMOFcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkK7V27T72cjs.applyToneToDeepTile; exports.bestOffset = _chunkK7V27T72cjs.bestOffset; exports.blendRadius = _chunkL3PXFMOFcjs.blendRadius; exports.blenderDab = _chunkL3PXFMOFcjs.blenderDab; exports.brushstrokeDataUrl = _chunkK7V27T72cjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkK7V27T72cjs.brushstrokeKey; exports.brushstrokeSamples = _chunkK7V27T72cjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkK7V27T72cjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkK7V27T72cjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkK7V27T72cjs.brushstrokeToCanvas; exports.canShareMemory = _chunkL3PXFMOFcjs.canShareMemory; exports.cleanMixer = _chunkL3PXFMOFcjs.cleanMixer; exports.coverageTileCoord = _chunkL3PXFMOFcjs.coverageTileCoord; exports.createBlenderScratch = _chunkL3PXFMOFcjs.createBlenderScratch; exports.createPigment = _chunk7ISPWEJAcjs.createPigment; exports.createPigmentTools = _chunkL3PXFMOFcjs.createPigmentTools; exports.dabCoverage = _chunkL3PXFMOFcjs.dabCoverage; exports.dabRect = _chunkL3PXFMOFcjs.dabRect; exports.dexp = _chunkL3PXFMOFcjs.dexp; exports.dilateMask = _chunkK7V27T72cjs.dilateMask; exports.dlog = _chunkL3PXFMOFcjs.dlog; exports.dodgeBurn = _chunkK7V27T72cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkK7V27T72cjs.dodgeBurnCurve; exports.dpow = _chunkL3PXFMOFcjs.dpow; exports.dsincos = _chunkL3PXFMOFcjs.dsincos; exports.edgeBits = _chunkL3PXFMOFcjs.edgeBits; exports.exchangeRates = _chunkL3PXFMOFcjs.exchangeRates; exports.expNeg = _chunkL3PXFMOFcjs.expNeg; exports.filmPixel = _chunkL3PXFMOFcjs.filmPixel; exports.filmReflectance = _chunkL3PXFMOFcjs.filmReflectance; exports.flowField = _chunkL3PXFMOFcjs.flowField; exports.healPixels = _chunkK7V27T72cjs.healPixels; exports.isBrushstrokeBrush = _chunkK7V27T72cjs.isBrushstrokeBrush; exports.latticeViscosity = _chunkL3PXFMOFcjs.latticeViscosity; exports.lerpPigment = _chunk7ISPWEJAcjs.lerpPigment; exports.lerpPigmentInto = _chunk7ISPWEJAcjs.lerpPigmentInto; exports.linearToSrgb8 = _chunkL3PXFMOFcjs.linearToSrgb8; exports.loadMixer = _chunkL3PXFMOFcjs.loadMixer; exports.loadWetKernel = _chunkL3PXFMOFcjs.loadWetKernel; exports.luma = _chunkK7V27T72cjs.luma; exports.maskBounds = _chunkK7V27T72cjs.maskBounds; exports.membraneFill = _chunkK7V27T72cjs.membraneFill; exports.mixPigments = _chunk7ISPWEJAcjs.mixPigments; exports.mixerRates = _chunkL3PXFMOFcjs.mixerRates; exports.normalizeBlender = _chunkL3PXFMOFcjs.normalizeBlender; exports.normalizeBrush = _chunkL3PXFMOFcjs.normalizeBrush; exports.normalizeFlow = _chunkL3PXFMOFcjs.normalizeFlow; exports.normalizeMixer = _chunkL3PXFMOFcjs.normalizeMixer; exports.normalizeRetouch = _chunkK7V27T72cjs.normalizeRetouch; exports.normalizeSmudge = _chunkL3PXFMOFcjs.normalizeSmudge; exports.normalizeTilt = _chunkL3PXFMOFcjs.normalizeTilt; exports.normalizeWetParams = _chunkL3PXFMOFcjs.normalizeWetParams; exports.packWetParams = _chunkL3PXFMOFcjs.packWetParams; exports.paintPathStroke = _chunkK7V27T72cjs.paintPathStroke; exports.pathStrokeCoverage = _chunkK7V27T72cjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkK7V27T72cjs.pathStrokeDabs; exports.perDabStrength = _chunkK7V27T72cjs.perDabStrength; exports.pigmentColor = _chunkL3PXFMOFcjs.pigmentColor; exports.pigmentOf = _chunkL3PXFMOFcjs.pigmentOf; exports.pixelPigment = _chunkL3PXFMOFcjs.pixelPigment; exports.put255 = _chunkL3PXFMOFcjs.put255; exports.rasterizeDab = _chunkL3PXFMOFcjs.rasterizeDab; exports.readSourceRegion = _chunkK7V27T72cjs.readSourceRegion; exports.reflectanceToRgb = _chunk7ISPWEJAcjs.reflectanceToRgb; exports.renderBrushstroke = _chunkK7V27T72cjs.renderBrushstroke; exports.rgbToReflectance = _chunk7ISPWEJAcjs.rgbToReflectance; exports.rgbaViewOfGrey = _chunkK7V27T72cjs.rgbaViewOfGrey; exports.saturationOf = _chunkK7V27T72cjs.saturationOf; exports.seamlessClone = _chunkK7V27T72cjs.seamlessClone; exports.setPigmentColor = _chunk7ISPWEJAcjs.setPigmentColor; exports.shadeTile = _chunkL3PXFMOFcjs.shadeTile; exports.smoothPoints = _chunkL3PXFMOFcjs.smoothPoints; exports.smudgeEffect = _chunkK7V27T72cjs.smudgeEffect; exports.solveMembrane = _chunkK7V27T72cjs.solveMembrane; exports.sponge = _chunkK7V27T72cjs.sponge; exports.spongeEffect = _chunkK7V27T72cjs.spongeEffect; exports.spotHealPixels = _chunkK7V27T72cjs.spotHealPixels; exports.spotHealWindow = _chunkK7V27T72cjs.spotHealWindow; exports.srgbByteToLinear = _chunkL3PXFMOFcjs.srgbByteToLinear; exports.stepSlotTs = _chunkL3PXFMOFcjs.stepSlotTs; exports.tipFalloff = _chunkL3PXFMOFcjs.tipFalloff; exports.tipReach = _chunkL3PXFMOFcjs.tipReach; exports.tipShape = _chunkL3PXFMOFcjs.tipShape; exports.toneOf = _chunkK7V27T72cjs.toneOf; exports.walkDabs = _chunkL3PXFMOFcjs.walkDabs; exports.wetSimdSupported = _chunkL3PXFMOFcjs.wetSimdSupported; exports.wetSupport = _chunkL3PXFMOFcjs.wetSupport;
333
353
  //# 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;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;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;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;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,u+QAAC","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;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;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;AACF,yDAA8B;AAC9B,iCAA8B;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;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;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,0kSAAC","file":"/home/runner/work/editor/editor/packages/core/dist/paint/index.cjs"}
@@ -258,4 +258,162 @@ declare function paintPathStroke(surface: TiledSurface, samples: readonly PathSa
258
258
  dabs: number;
259
259
  };
260
260
 
261
- export { BODY_SCATTER, BrushSettings, CoverageMap, Dab, HIDE, PIGMENT_UNIT, PaintMedium, type PaintPathOptions, PaintSample, type PathSample, type PathStrokeOptions, Pigment, RgbTriple, SRGB_TO_LINEAR, WetMedium, type WetMediumOptions, WetWorld, bestOffset, createPigmentTools, dexp, dilateMask, dlog, dpow, expNeg, filmPixel, filmReflectance, linearToSrgb8, maskBounds, membraneFill, paintPathStroke, pathStrokeCoverage, pathStrokeDabs, pigmentColor, pigmentOf, pixelPigment, seamlessClone, shadeTile, solveMembrane, srgbByteToLinear, stepSlotTs };
261
+ /**
262
+ * A brushstroke rendered on its own: a path (polyline samples with pressure, tilt and time, or
263
+ * points plus pressure / tilt profiles along the length) and a dry brush in, an RGBA image and its
264
+ * bounds out. The canvas renders brushed freehand strokes with it, and the vector editor
265
+ * brushstrokes on vector paths; both keep the path as the data and the pixels as a cache.
266
+ *
267
+ * - Built on {@link paintPathStroke}: the same dabs, coverage and build-up as everywhere else.
268
+ * - Rendered at `scale` image pixels per path unit (both the samples and the brush size scale), so
269
+ * a stroke looks the same at any zoom with more or fewer pixels. Snap zooms to
270
+ * {@link brushstrokeScaleBucket} so panning and small zoom changes reuse the same image.
271
+ * - Dry media only. A wet brush needs an area to flow in (the paint editor's wet layer); mixer,
272
+ * blender and smudge brushes need paint under them. Those are refused with an error.
273
+ * - Deterministic and DOM-free: the image is plain RGBA bytes. Turn it into a PNG data URL with
274
+ * {@link brushstrokeDataUrl}, or into a canvas through an injected factory
275
+ * ({@link brushstrokeToCanvas}).
276
+ */
277
+
278
+ /** One sample of a brushstroke: a {@link PathSample} plus an optional time stamp (milliseconds). */
279
+ interface BrushstrokeSample extends PathSample {
280
+ t?: number;
281
+ }
282
+ /**
283
+ * A path plus pen profiles along it. Each profile is a list of values spread evenly over the
284
+ * path's length (first at the start, last at the end) and interpolated in between; one value is
285
+ * constant. Missing profiles leave the samples upright at full pressure.
286
+ */
287
+ interface BrushstrokeProfilePath {
288
+ points: ReadonlyArray<{
289
+ x: number;
290
+ y: number;
291
+ }>;
292
+ /** Pressure 0..1 along the length. */
293
+ pressure?: readonly number[];
294
+ /** Pointer Events tilt in degrees (−90..90) along the length. */
295
+ tiltX?: readonly number[];
296
+ tiltY?: readonly number[];
297
+ }
298
+ type BrushstrokeInput = readonly BrushstrokeSample[] | BrushstrokeProfilePath;
299
+ /**
300
+ * A brush for a brushstroke: plain tip settings, or a paint-editor brush (`PaintBrush` matches this
301
+ * shape structurally). Only dab-engine brushes render; `rotation: 'stroke'` turns the tip with the
302
+ * path, and `dynamics` give the size at zero pressure and how tilt shapes the tip. Grain, jitter and
303
+ * velocity dynamics are not applied (there is no paper, and the result must be deterministic).
304
+ */
305
+ type BrushstrokeBrush = Partial<BrushSettings> | {
306
+ id?: string;
307
+ name?: string;
308
+ engine?: string;
309
+ tip: Partial<BrushSettings>;
310
+ rotation?: string;
311
+ dynamics?: {
312
+ minSize?: number;
313
+ tiltSize?: number;
314
+ tiltRoundness?: number;
315
+ };
316
+ };
317
+ /**
318
+ * What the stroke is painted with. A solid RGBA colour today; when the paint editor's gradient
319
+ * paint (`PaintSource`) lands it is accepted here too, so callers already pass `paint` rather than a
320
+ * bare colour.
321
+ */
322
+ type BrushstrokePaint = {
323
+ color: readonly [number, number, number, number];
324
+ };
325
+ interface BrushstrokeOptions {
326
+ /** Image pixels per path unit (default 1). Use {@link brushstrokeScaleBucket} for a zoom. */
327
+ scale?: number;
328
+ /** RGBA 0..255 (default opaque black). Shorthand for `paint: { color }`. */
329
+ color?: readonly [number, number, number, number];
330
+ /** What to paint with (wins over `color`). */
331
+ paint?: BrushstrokePaint;
332
+ /** Join the last sample back to the first. */
333
+ closed?: boolean;
334
+ /**
335
+ * The largest image to render, in pixels (default 16 777 216, 4096²). A stroke that would be
336
+ * bigger at `scale` renders at a lower scale instead; the result's `scale` says which.
337
+ */
338
+ maxPixels?: number;
339
+ }
340
+ /** A rendered brushstroke. */
341
+ interface BrushstrokeImage {
342
+ /** Straight-alpha RGBA bytes, `width × height × 4` (the same layout as `ImageData`). */
343
+ image: {
344
+ width: number;
345
+ height: number;
346
+ data: Uint8ClampedArray;
347
+ };
348
+ /** Where the image goes, in path units: draw `image` stretched over this rectangle. Null for an empty stroke. */
349
+ bounds: {
350
+ x: number;
351
+ y: number;
352
+ width: number;
353
+ height: number;
354
+ } | null;
355
+ /** Image pixels per path unit it was rendered at. */
356
+ scale: number;
357
+ /** How many dabs the stroke laid down. */
358
+ dabs: number;
359
+ }
360
+ /** The samples of a brushstroke input: profile paths are sampled at their points by arc length. */
361
+ declare function brushstrokeSamples(input: BrushstrokeInput): BrushstrokeSample[];
362
+ /**
363
+ * The tip settings and path-stroke options of a brushstroke brush. Throws for brushes that are not
364
+ * dry dab brushes (wet, mixer, blender, smudge, eraser, impasto and the procedural engines).
365
+ */
366
+ declare function brushstrokeStrokeOptions(brush: BrushstrokeBrush): PathStrokeOptions;
367
+ /** Whether a brush renders as a brushstroke (a dry dab brush, or plain tip settings). */
368
+ declare function isBrushstrokeBrush(brush: BrushstrokeBrush): boolean;
369
+ /**
370
+ * The scale to render at for a zoom (and device pixel ratio): the smallest power of √2 at or above
371
+ * it, clamped to 1/16..16. Every zoom in a bucket shares one cached image and never draws it
372
+ * enlarged by more than √2.
373
+ */
374
+ declare function brushstrokeScaleBucket(zoom: number, devicePixelRatio?: number): number;
375
+ /**
376
+ * Renders a dry brushstroke along `input` with `brush` to an RGBA image. The same input, brush and
377
+ * options always give the same bytes. Throws for a wet (or other non-dry) brush and for samples
378
+ * that are not finite.
379
+ */
380
+ declare function renderBrushstroke(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): BrushstrokeImage;
381
+ /** A rendered brushstroke as a PNG data URL (for an SVG `<image>`, an `<img>` or an export). Empty strokes give ''. */
382
+ declare function brushstrokeDataUrl(stroke: BrushstrokeImage): string;
383
+ /** The 2D-canvas surface {@link brushstrokeToCanvas} draws on (an `HTMLCanvasElement` or `OffscreenCanvas`). */
384
+ interface BrushstrokeCanvasLike {
385
+ getContext(type: '2d'): {
386
+ createImageData(w: number, h: number): {
387
+ data: Uint8ClampedArray;
388
+ };
389
+ putImageData(img: never, x: number, y: number): void;
390
+ } | null;
391
+ }
392
+ /**
393
+ * A rendered brushstroke on a canvas made by `createCanvas(width, height)` (injected, so this
394
+ * module stays DOM-free). Returns null for an empty stroke or a canvas without a 2D context.
395
+ */
396
+ declare function brushstrokeToCanvas<C extends BrushstrokeCanvasLike>(stroke: BrushstrokeImage, createCanvas: (width: number, height: number) => C): C | null;
397
+ /**
398
+ * A key for a brushstroke: the path (samples or profiles), the brush, the colour and the scale.
399
+ * Two calls with equal arguments give equal keys; any change to them changes the key.
400
+ */
401
+ declare function brushstrokeKey(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): string;
402
+ /**
403
+ * A small least-recently-used cache of rendered brushstrokes keyed by {@link brushstrokeKey}: path,
404
+ * brush, colour and scale. Pass a bucketed scale ({@link brushstrokeScaleBucket}) so zooming inside
405
+ * a bucket hits the cache, and a changed path, brush or bucket re-renders.
406
+ */
407
+ declare class BrushstrokeCache {
408
+ readonly capacity: number;
409
+ private readonly entries;
410
+ /** Renders that missed the cache (for tests and stats). */
411
+ misses: number;
412
+ constructor(capacity?: number);
413
+ get size(): number;
414
+ /** The cached stroke for these arguments, rendering (and caching) it on a miss. */
415
+ render(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): BrushstrokeImage;
416
+ clear(): void;
417
+ }
418
+
419
+ export { BODY_SCATTER, BrushSettings, type BrushstrokeBrush, BrushstrokeCache, type BrushstrokeCanvasLike, type BrushstrokeImage, type BrushstrokeInput, type BrushstrokeOptions, type BrushstrokePaint, type BrushstrokeProfilePath, type BrushstrokeSample, CoverageMap, Dab, HIDE, PIGMENT_UNIT, PaintMedium, type PaintPathOptions, PaintSample, type PathSample, type PathStrokeOptions, Pigment, RgbTriple, SRGB_TO_LINEAR, WetMedium, type WetMediumOptions, WetWorld, bestOffset, brushstrokeDataUrl, brushstrokeKey, brushstrokeSamples, brushstrokeScaleBucket, brushstrokeStrokeOptions, brushstrokeToCanvas, createPigmentTools, dexp, dilateMask, dlog, dpow, expNeg, filmPixel, filmReflectance, isBrushstrokeBrush, linearToSrgb8, maskBounds, membraneFill, paintPathStroke, pathStrokeCoverage, pathStrokeDabs, pigmentColor, pigmentOf, pixelPigment, renderBrushstroke, seamlessClone, shadeTile, solveMembrane, srgbByteToLinear, stepSlotTs };
@@ -258,4 +258,162 @@ declare function paintPathStroke(surface: TiledSurface, samples: readonly PathSa
258
258
  dabs: number;
259
259
  };
260
260
 
261
- export { BODY_SCATTER, BrushSettings, CoverageMap, Dab, HIDE, PIGMENT_UNIT, PaintMedium, type PaintPathOptions, PaintSample, type PathSample, type PathStrokeOptions, Pigment, RgbTriple, SRGB_TO_LINEAR, WetMedium, type WetMediumOptions, WetWorld, bestOffset, createPigmentTools, dexp, dilateMask, dlog, dpow, expNeg, filmPixel, filmReflectance, linearToSrgb8, maskBounds, membraneFill, paintPathStroke, pathStrokeCoverage, pathStrokeDabs, pigmentColor, pigmentOf, pixelPigment, seamlessClone, shadeTile, solveMembrane, srgbByteToLinear, stepSlotTs };
261
+ /**
262
+ * A brushstroke rendered on its own: a path (polyline samples with pressure, tilt and time, or
263
+ * points plus pressure / tilt profiles along the length) and a dry brush in, an RGBA image and its
264
+ * bounds out. The canvas renders brushed freehand strokes with it, and the vector editor
265
+ * brushstrokes on vector paths; both keep the path as the data and the pixels as a cache.
266
+ *
267
+ * - Built on {@link paintPathStroke}: the same dabs, coverage and build-up as everywhere else.
268
+ * - Rendered at `scale` image pixels per path unit (both the samples and the brush size scale), so
269
+ * a stroke looks the same at any zoom with more or fewer pixels. Snap zooms to
270
+ * {@link brushstrokeScaleBucket} so panning and small zoom changes reuse the same image.
271
+ * - Dry media only. A wet brush needs an area to flow in (the paint editor's wet layer); mixer,
272
+ * blender and smudge brushes need paint under them. Those are refused with an error.
273
+ * - Deterministic and DOM-free: the image is plain RGBA bytes. Turn it into a PNG data URL with
274
+ * {@link brushstrokeDataUrl}, or into a canvas through an injected factory
275
+ * ({@link brushstrokeToCanvas}).
276
+ */
277
+
278
+ /** One sample of a brushstroke: a {@link PathSample} plus an optional time stamp (milliseconds). */
279
+ interface BrushstrokeSample extends PathSample {
280
+ t?: number;
281
+ }
282
+ /**
283
+ * A path plus pen profiles along it. Each profile is a list of values spread evenly over the
284
+ * path's length (first at the start, last at the end) and interpolated in between; one value is
285
+ * constant. Missing profiles leave the samples upright at full pressure.
286
+ */
287
+ interface BrushstrokeProfilePath {
288
+ points: ReadonlyArray<{
289
+ x: number;
290
+ y: number;
291
+ }>;
292
+ /** Pressure 0..1 along the length. */
293
+ pressure?: readonly number[];
294
+ /** Pointer Events tilt in degrees (−90..90) along the length. */
295
+ tiltX?: readonly number[];
296
+ tiltY?: readonly number[];
297
+ }
298
+ type BrushstrokeInput = readonly BrushstrokeSample[] | BrushstrokeProfilePath;
299
+ /**
300
+ * A brush for a brushstroke: plain tip settings, or a paint-editor brush (`PaintBrush` matches this
301
+ * shape structurally). Only dab-engine brushes render; `rotation: 'stroke'` turns the tip with the
302
+ * path, and `dynamics` give the size at zero pressure and how tilt shapes the tip. Grain, jitter and
303
+ * velocity dynamics are not applied (there is no paper, and the result must be deterministic).
304
+ */
305
+ type BrushstrokeBrush = Partial<BrushSettings> | {
306
+ id?: string;
307
+ name?: string;
308
+ engine?: string;
309
+ tip: Partial<BrushSettings>;
310
+ rotation?: string;
311
+ dynamics?: {
312
+ minSize?: number;
313
+ tiltSize?: number;
314
+ tiltRoundness?: number;
315
+ };
316
+ };
317
+ /**
318
+ * What the stroke is painted with. A solid RGBA colour today; when the paint editor's gradient
319
+ * paint (`PaintSource`) lands it is accepted here too, so callers already pass `paint` rather than a
320
+ * bare colour.
321
+ */
322
+ type BrushstrokePaint = {
323
+ color: readonly [number, number, number, number];
324
+ };
325
+ interface BrushstrokeOptions {
326
+ /** Image pixels per path unit (default 1). Use {@link brushstrokeScaleBucket} for a zoom. */
327
+ scale?: number;
328
+ /** RGBA 0..255 (default opaque black). Shorthand for `paint: { color }`. */
329
+ color?: readonly [number, number, number, number];
330
+ /** What to paint with (wins over `color`). */
331
+ paint?: BrushstrokePaint;
332
+ /** Join the last sample back to the first. */
333
+ closed?: boolean;
334
+ /**
335
+ * The largest image to render, in pixels (default 16 777 216, 4096²). A stroke that would be
336
+ * bigger at `scale` renders at a lower scale instead; the result's `scale` says which.
337
+ */
338
+ maxPixels?: number;
339
+ }
340
+ /** A rendered brushstroke. */
341
+ interface BrushstrokeImage {
342
+ /** Straight-alpha RGBA bytes, `width × height × 4` (the same layout as `ImageData`). */
343
+ image: {
344
+ width: number;
345
+ height: number;
346
+ data: Uint8ClampedArray;
347
+ };
348
+ /** Where the image goes, in path units: draw `image` stretched over this rectangle. Null for an empty stroke. */
349
+ bounds: {
350
+ x: number;
351
+ y: number;
352
+ width: number;
353
+ height: number;
354
+ } | null;
355
+ /** Image pixels per path unit it was rendered at. */
356
+ scale: number;
357
+ /** How many dabs the stroke laid down. */
358
+ dabs: number;
359
+ }
360
+ /** The samples of a brushstroke input: profile paths are sampled at their points by arc length. */
361
+ declare function brushstrokeSamples(input: BrushstrokeInput): BrushstrokeSample[];
362
+ /**
363
+ * The tip settings and path-stroke options of a brushstroke brush. Throws for brushes that are not
364
+ * dry dab brushes (wet, mixer, blender, smudge, eraser, impasto and the procedural engines).
365
+ */
366
+ declare function brushstrokeStrokeOptions(brush: BrushstrokeBrush): PathStrokeOptions;
367
+ /** Whether a brush renders as a brushstroke (a dry dab brush, or plain tip settings). */
368
+ declare function isBrushstrokeBrush(brush: BrushstrokeBrush): boolean;
369
+ /**
370
+ * The scale to render at for a zoom (and device pixel ratio): the smallest power of √2 at or above
371
+ * it, clamped to 1/16..16. Every zoom in a bucket shares one cached image and never draws it
372
+ * enlarged by more than √2.
373
+ */
374
+ declare function brushstrokeScaleBucket(zoom: number, devicePixelRatio?: number): number;
375
+ /**
376
+ * Renders a dry brushstroke along `input` with `brush` to an RGBA image. The same input, brush and
377
+ * options always give the same bytes. Throws for a wet (or other non-dry) brush and for samples
378
+ * that are not finite.
379
+ */
380
+ declare function renderBrushstroke(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): BrushstrokeImage;
381
+ /** A rendered brushstroke as a PNG data URL (for an SVG `<image>`, an `<img>` or an export). Empty strokes give ''. */
382
+ declare function brushstrokeDataUrl(stroke: BrushstrokeImage): string;
383
+ /** The 2D-canvas surface {@link brushstrokeToCanvas} draws on (an `HTMLCanvasElement` or `OffscreenCanvas`). */
384
+ interface BrushstrokeCanvasLike {
385
+ getContext(type: '2d'): {
386
+ createImageData(w: number, h: number): {
387
+ data: Uint8ClampedArray;
388
+ };
389
+ putImageData(img: never, x: number, y: number): void;
390
+ } | null;
391
+ }
392
+ /**
393
+ * A rendered brushstroke on a canvas made by `createCanvas(width, height)` (injected, so this
394
+ * module stays DOM-free). Returns null for an empty stroke or a canvas without a 2D context.
395
+ */
396
+ declare function brushstrokeToCanvas<C extends BrushstrokeCanvasLike>(stroke: BrushstrokeImage, createCanvas: (width: number, height: number) => C): C | null;
397
+ /**
398
+ * A key for a brushstroke: the path (samples or profiles), the brush, the colour and the scale.
399
+ * Two calls with equal arguments give equal keys; any change to them changes the key.
400
+ */
401
+ declare function brushstrokeKey(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): string;
402
+ /**
403
+ * A small least-recently-used cache of rendered brushstrokes keyed by {@link brushstrokeKey}: path,
404
+ * brush, colour and scale. Pass a bucketed scale ({@link brushstrokeScaleBucket}) so zooming inside
405
+ * a bucket hits the cache, and a changed path, brush or bucket re-renders.
406
+ */
407
+ declare class BrushstrokeCache {
408
+ readonly capacity: number;
409
+ private readonly entries;
410
+ /** Renders that missed the cache (for tests and stats). */
411
+ misses: number;
412
+ constructor(capacity?: number);
413
+ get size(): number;
414
+ /** The cached stroke for these arguments, rendering (and caching) it on a miss. */
415
+ render(input: BrushstrokeInput, brush: BrushstrokeBrush, options?: BrushstrokeOptions): BrushstrokeImage;
416
+ clear(): void;
417
+ }
418
+
419
+ export { BODY_SCATTER, BrushSettings, type BrushstrokeBrush, BrushstrokeCache, type BrushstrokeCanvasLike, type BrushstrokeImage, type BrushstrokeInput, type BrushstrokeOptions, type BrushstrokePaint, type BrushstrokeProfilePath, type BrushstrokeSample, CoverageMap, Dab, HIDE, PIGMENT_UNIT, PaintMedium, type PaintPathOptions, PaintSample, type PathSample, type PathStrokeOptions, Pigment, RgbTriple, SRGB_TO_LINEAR, WetMedium, type WetMediumOptions, WetWorld, bestOffset, brushstrokeDataUrl, brushstrokeKey, brushstrokeSamples, brushstrokeScaleBucket, brushstrokeStrokeOptions, brushstrokeToCanvas, createPigmentTools, dexp, dilateMask, dlog, dpow, expNeg, filmPixel, filmReflectance, isBrushstrokeBrush, linearToSrgb8, maskBounds, membraneFill, paintPathStroke, pathStrokeCoverage, pathStrokeDabs, pigmentColor, pigmentOf, pixelPigment, renderBrushstroke, seamlessClone, shadeTile, solveMembrane, srgbByteToLinear, stepSlotTs };
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BrushstrokeCache,
2
3
  DEFAULT_RETOUCH,
3
4
  RETOUCH_SAMPLES,
4
5
  RegionPixelSource,
@@ -9,10 +10,17 @@ import {
9
10
  applyRetouchToTile,
10
11
  applyToneToDeepTile,
11
12
  bestOffset,
13
+ brushstrokeDataUrl,
14
+ brushstrokeKey,
15
+ brushstrokeSamples,
16
+ brushstrokeScaleBucket,
17
+ brushstrokeStrokeOptions,
18
+ brushstrokeToCanvas,
12
19
  dilateMask,
13
20
  dodgeBurn,
14
21
  dodgeBurnCurve,
15
22
  healPixels,
23
+ isBrushstrokeBrush,
16
24
  luma,
17
25
  maskBounds,
18
26
  membraneFill,
@@ -22,6 +30,7 @@ import {
22
30
  pathStrokeDabs,
23
31
  perDabStrength,
24
32
  readSourceRegion,
33
+ renderBrushstroke,
25
34
  rgbaViewOfGrey,
26
35
  saturationOf,
27
36
  seamlessClone,
@@ -32,7 +41,7 @@ import {
32
41
  spotHealPixels,
33
42
  spotHealWindow,
34
43
  toneOf
35
- } from "../chunk-YHW26LS2.js";
44
+ } from "../chunk-ZZPGTNXJ.js";
36
45
  import {
37
46
  BODY_SCATTER,
38
47
  CoverageMap,
@@ -166,8 +175,11 @@ import {
166
175
  rgbToReflectance,
167
176
  setPigmentColor
168
177
  } from "../chunk-HKDTM6VC.js";
178
+ import "../chunk-7QN76ESJ.js";
179
+ import "../chunk-6FCKOS2B.js";
169
180
  export {
170
181
  BODY_SCATTER,
182
+ BrushstrokeCache,
171
183
  CoverageMap,
172
184
  DEFAULT_BLENDER,
173
185
  DEFAULT_BRUSH,
@@ -254,6 +266,12 @@ export {
254
266
  bestOffset,
255
267
  blendRadius,
256
268
  blenderDab,
269
+ brushstrokeDataUrl,
270
+ brushstrokeKey,
271
+ brushstrokeSamples,
272
+ brushstrokeScaleBucket,
273
+ brushstrokeStrokeOptions,
274
+ brushstrokeToCanvas,
257
275
  canShareMemory,
258
276
  cleanMixer,
259
277
  coverageTileCoord,
@@ -276,6 +294,7 @@ export {
276
294
  filmReflectance,
277
295
  flowField,
278
296
  healPixels,
297
+ isBrushstrokeBrush,
279
298
  latticeViscosity,
280
299
  lerpPigment,
281
300
  lerpPigmentInto,
@@ -307,6 +326,7 @@ export {
307
326
  rasterizeDab,
308
327
  readSourceRegion,
309
328
  reflectanceToRgb,
329
+ renderBrushstroke,
310
330
  rgbToReflectance,
311
331
  rgbaViewOfGrey,
312
332
  saturationOf,