@pixerate/editor 0.105.0 → 0.107.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 (49) hide show
  1. package/dist/{chunk-DS7KDKPX.js → chunk-3PHA3UKI.js} +2 -2
  2. package/dist/{chunk-ZID226ZG.cjs → chunk-FRD3FUXI.cjs} +172 -172
  3. package/dist/{chunk-ZID226ZG.cjs.map → chunk-FRD3FUXI.cjs.map} +1 -1
  4. package/dist/{chunk-67FRIOPZ.js → chunk-G4BIYE6R.js} +2 -2
  5. package/dist/{chunk-PV42JITT.cjs → chunk-HUFQD4CB.cjs} +44 -44
  6. package/dist/{chunk-PV42JITT.cjs.map → chunk-HUFQD4CB.cjs.map} +1 -1
  7. package/dist/{chunk-4X5MIVCE.js → chunk-SOROZ2BF.js} +3 -3
  8. package/dist/{chunk-CRMAXIUV.cjs → chunk-SZ6KMZNM.cjs} +157 -8
  9. package/dist/chunk-SZ6KMZNM.cjs.map +1 -0
  10. package/dist/{chunk-WSTEXEKD.cjs → chunk-T3QZ6S47.cjs} +92 -92
  11. package/dist/{chunk-WSTEXEKD.cjs.map → chunk-T3QZ6S47.cjs.map} +1 -1
  12. package/dist/{chunk-HEW6KDNI.js → chunk-WMBIJCHA.js} +155 -6
  13. package/dist/chunk-WMBIJCHA.js.map +1 -0
  14. package/dist/{compositor-Bc3PNP3C.d.cts → compositor-D92URMlm.d.cts} +1 -1
  15. package/dist/{compositor-BsYYllvR.d.ts → compositor-Kt_M4ruo.d.ts} +1 -1
  16. package/dist/{export-_m3Es4ru.d.cts → export-JGWQEPJn.d.cts} +3 -3
  17. package/dist/{export-iMrop3Jm.d.ts → export-a9bnF7Cl.d.ts} +3 -3
  18. package/dist/image-editor/index.cjs +831 -632
  19. package/dist/image-editor/index.cjs.map +1 -1
  20. package/dist/image-editor/index.d.cts +42 -9
  21. package/dist/image-editor/index.d.ts +42 -9
  22. package/dist/image-editor/index.js +203 -4
  23. package/dist/image-editor/index.js.map +1 -1
  24. package/dist/{mixer-C1M1Nua_.d.cts → mixer-5ziHU8OS.d.cts} +1 -1
  25. package/dist/{mixer-Cu5a9Bzd.d.ts → mixer-DNqiYXYQ.d.ts} +1 -1
  26. package/dist/paint/index.cjs +3 -3
  27. package/dist/paint/index.d.cts +2 -2
  28. package/dist/paint/index.d.ts +2 -2
  29. package/dist/paint/index.js +2 -2
  30. package/dist/paint-editor/index.cjs +175 -127
  31. package/dist/paint-editor/index.cjs.map +1 -1
  32. package/dist/paint-editor/index.d.cts +18 -7
  33. package/dist/paint-editor/index.d.ts +18 -7
  34. package/dist/paint-editor/index.js +59 -11
  35. package/dist/paint-editor/index.js.map +1 -1
  36. package/dist/raster/index.cjs +11 -3
  37. package/dist/raster/index.cjs.map +1 -1
  38. package/dist/raster/index.d.cts +4 -4
  39. package/dist/raster/index.d.ts +4 -4
  40. package/dist/raster/index.js +10 -2
  41. package/dist/{surface-BBJN9wxg.d.ts → surface-CkKOHGPm.d.cts} +20 -2
  42. package/dist/{surface-BBJN9wxg.d.cts → surface-CkKOHGPm.d.ts} +20 -2
  43. package/package.json +1 -1
  44. package/skills/pixerate-paint-editor/SKILL.md +21 -1
  45. package/dist/chunk-CRMAXIUV.cjs.map +0 -1
  46. package/dist/chunk-HEW6KDNI.js.map +0 -1
  47. /package/dist/{chunk-DS7KDKPX.js.map → chunk-3PHA3UKI.js.map} +0 -0
  48. /package/dist/{chunk-67FRIOPZ.js.map → chunk-G4BIYE6R.js.map} +0 -0
  49. /package/dist/{chunk-4X5MIVCE.js.map → chunk-SOROZ2BF.js.map} +0 -0
@@ -1,9 +1,9 @@
1
- import { R as RasterLayer, a as RasterGroupLayer, b as RasterPixelLayer, C as CompositorLayer, c as RasterCompositor, d as RasterSources, L as LayerLocks } from '../compositor-Bc3PNP3C.cjs';
2
- import { B as BrushSettings, M as MixerSettings, C as CoverageMap, D as Dab, S as StrokePoint, a as MixerLoad } from '../mixer-C1M1Nua_.cjs';
3
- export { b as MAX_BRUSH_SIZE } from '../mixer-C1M1Nua_.cjs';
4
- import { R as RasterRect, a as TiledSurface, B as BlendMode } from '../surface-BBJN9wxg.cjs';
5
- export { b as BLEND_MODES, c as Tile, i as isBlendMode } from '../surface-BBJN9wxg.cjs';
6
- import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-_m3Es4ru.cjs';
1
+ import { R as RasterLayer, a as RasterGroupLayer, b as RasterPixelLayer, C as CompositorLayer, c as RasterCompositor, d as RasterSources, L as LayerLocks } from '../compositor-D92URMlm.cjs';
2
+ import { B as BrushSettings, M as MixerSettings, C as CoverageMap, D as Dab, S as StrokePoint, a as MixerLoad } from '../mixer-5ziHU8OS.cjs';
3
+ export { b as MAX_BRUSH_SIZE } from '../mixer-5ziHU8OS.cjs';
4
+ import { R as RasterRect, a as TiledSurface, B as BlendMode, b as BlendModeInfo } from '../surface-CkKOHGPm.cjs';
5
+ export { c as BLEND_MODES, d as PAINTERLY_BLEND_MODES, e as Tile, i as isBlendMode, f as isPainterlyBlendMode, s as standardBlendMode } from '../surface-CkKOHGPm.cjs';
6
+ import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-JGWQEPJn.cjs';
7
7
  import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
8
8
  import '../types-CwMPoRMU.cjs';
9
9
  import '../warp-D5jz_tN7.cjs';
@@ -1676,5 +1676,16 @@ declare function renderColorWheel(size: number, wheel: ColorWheel, inner?: numbe
1676
1676
  };
1677
1677
  /** The colour for a click on the wheel ring at (dx, dy) from its centre, keeping `color`'s saturation and value. */
1678
1678
  declare function wheelPick(dx: number, dy: number, wheel: ColorWheel, color: string): string;
1679
+ /** A group of the blend menu: the Photoshop modes, then pigment and the painterly modes. */
1680
+ interface BlendMenuGroup {
1681
+ label: string;
1682
+ modes: readonly BlendModeInfo[];
1683
+ }
1684
+ /**
1685
+ * The layer and brush blend menus as groups: the 26 standard modes, then the paint modes
1686
+ * (`pigment` and the painterly `watercolor`, `tint`, `highlight`, `shadow`), each with its
1687
+ * description as a tooltip. Both bindings render this as `<optgroup>`s.
1688
+ */
1689
+ declare const BLEND_MENU_GROUPS: readonly BlendMenuGroup[];
1679
1690
 
1680
- export { type Affine, BRUSH_ID, BRUSH_ROTATIONS, BRUSH_SLIDERS, BUILTIN_BRUSHES, BlendMode, type BrushDynamics, type BrushLibraryFile, type BrushRotation, type BrushThumbnail, type ColorWheel, DEFAULT_BRUSH_ID, DEFAULT_DPI, DEFAULT_DYNAMICS, DEFAULT_PAPER, DEFAULT_SWATCHES, DEFAULT_VIEW, DryStroke, type DryStrokeOptions, type FillLayerOptions, GRAIN_PATTERNS, GRAIN_TILE, type GrainPattern, type GrainTuning, HARMONY_KINDS, type Hand, type HarmonyColor, type HarmonyKind, IDENTITY_AFFINE, IDENTITY_COPY, type ImageEncoder, type ImageFormat, type ImageNode, type LayerUpdate, type Linear2, type LoadedPaintDocument, MAX_CANVAS_SIDE, MAX_COORDINATE, MAX_IMAGE_SIDE, MAX_ZOOM, MIN_CANVAS_SIDE, MIN_ZOOM, MIXING_PAD_HEIGHT, MIXING_PAD_WIDTH, MixingPad, type MixingPadTool, PAINT_BRUSH_CATEGORIES, PAINT_BRUSH_ENGINES, PAINT_FORMAT, PAINT_SCHEMA_VERSION, PAINT_TOOLS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_NODE_ID, PAPER_SLIDERS, type Paint2DContext, type PaintAssetStore, type PaintBrush, type PaintBrushCategory, type PaintBrushEngine, type PaintBrushInput, type PaintCanvas, PaintCanvasPresenter, PaintDocumentError, type PaintDocumentExtensions, type PaintDocumentState, PaintEditorController, PaintEditorError, type PaintEditorOptions, type PaintEditorState, type PaintEditorToolProviderOptions, PaintGesture, type PaintGroupLayer, type PaintGuides, type PaintLayer, type PaintLayerInfo, type PaintPixelLayer, type PaintPointerEvent, type PaintStrokeInit, type PaintStrokeResult, PaintStrokeSession, type PaintTool, type PaintView, type PaperFamily, PaperGrain, type PaperNode, type PaperSettings, type PaperTiling, type PenDab, PenDabWalker, type PenPoint, PenSmoother, type PerspectiveGuide, PerspectiveSnapper, type PixelImage, type Point2, type PointerSample, type RecordedStroke, type ReferenceImage, type RenderOptions, type ReplayOptions, type Rgb255, SNAP_DECIDE_DISTANCE, SYMMETRY_MODES, type SerializeOptions, type SerializedPaintDocument, type SliderControl, type StrokeCopy, type StrokeSessionHost, type StrokeSessionInit, type StrokeVariation, type Swatch, type SymmetryGuide, type SymmetryMode, TRACING_NODE_ID, TileableNoise, type TracingImage, type ViewLayer, type ViewportBox, affineCopy, applyAffine, brushToJSON, clonePaper, colorHarmony, composeAffine, createPaintCompositor, createPaintDocument, createPaintEditorToolProvider, createPaintLayer, decodeImageBlob, defaultGuides, defaultImageEncoder, deserializePaintDocument, deserializePaintDocumentAsync, documentExtensions, documentToScreen, downloadBytes, downsampleRgba, fitZoom, grainCatch, grainHeights, guideOverlay, handlePaintShortcut, hash2, hexToRgb8, hslToRgb, hsvToRgb, hueToWheel, invertAffine, isPalmTouch, mapPenPoint, mix32, mixerLoadForStroke, mixerTip, newPaintLayerId, normalizeBrushStroke, normalizeCanvas, normalizeDynamics, normalizePaintBrush, normalizePaper, normalizePerspective, normalizeRotation, normalizeSymmetry, normalizeView, paperGrain, paperKey, paperNode, paperPreset, parseBrushLibrary, parseHexColor, patchPath, penOrientation, perspectiveDirections, perspectiveGuideLines, pointerToPenPoint, rand01, randSigned, readPath, renderBrushThumbnail, renderColorWheel, renderPaper, rgbToHexColor, rgbToHsl, rgbToHsv, samplePressure, screenToDocument, seedFromString, serializePaintDocument, serializePaintDocumentExternal, strokeBounds, symmetryAxisAngles, symmetryAxisSegments, symmetryCopies, thumbnailStroke, tiltToOrientation, toStrokePoint, variationAffine, varyStroke, viewCssTransform, viewMatrix, viewPenToDocument, wheelAngle, wheelPick, wheelPoint, wheelToHue };
1691
+ export { type Affine, BLEND_MENU_GROUPS, BRUSH_ID, BRUSH_ROTATIONS, BRUSH_SLIDERS, BUILTIN_BRUSHES, type BlendMenuGroup, BlendMode, BlendModeInfo, type BrushDynamics, type BrushLibraryFile, type BrushRotation, type BrushThumbnail, type ColorWheel, DEFAULT_BRUSH_ID, DEFAULT_DPI, DEFAULT_DYNAMICS, DEFAULT_PAPER, DEFAULT_SWATCHES, DEFAULT_VIEW, DryStroke, type DryStrokeOptions, type FillLayerOptions, GRAIN_PATTERNS, GRAIN_TILE, type GrainPattern, type GrainTuning, HARMONY_KINDS, type Hand, type HarmonyColor, type HarmonyKind, IDENTITY_AFFINE, IDENTITY_COPY, type ImageEncoder, type ImageFormat, type ImageNode, type LayerUpdate, type Linear2, type LoadedPaintDocument, MAX_CANVAS_SIDE, MAX_COORDINATE, MAX_IMAGE_SIDE, MAX_ZOOM, MIN_CANVAS_SIDE, MIN_ZOOM, MIXING_PAD_HEIGHT, MIXING_PAD_WIDTH, MixingPad, type MixingPadTool, PAINT_BRUSH_CATEGORIES, PAINT_BRUSH_ENGINES, PAINT_FORMAT, PAINT_SCHEMA_VERSION, PAINT_TOOLS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_NODE_ID, PAPER_SLIDERS, type Paint2DContext, type PaintAssetStore, type PaintBrush, type PaintBrushCategory, type PaintBrushEngine, type PaintBrushInput, type PaintCanvas, PaintCanvasPresenter, PaintDocumentError, type PaintDocumentExtensions, type PaintDocumentState, PaintEditorController, PaintEditorError, type PaintEditorOptions, type PaintEditorState, type PaintEditorToolProviderOptions, PaintGesture, type PaintGroupLayer, type PaintGuides, type PaintLayer, type PaintLayerInfo, type PaintPixelLayer, type PaintPointerEvent, type PaintStrokeInit, type PaintStrokeResult, PaintStrokeSession, type PaintTool, type PaintView, type PaperFamily, PaperGrain, type PaperNode, type PaperSettings, type PaperTiling, type PenDab, PenDabWalker, type PenPoint, PenSmoother, type PerspectiveGuide, PerspectiveSnapper, type PixelImage, type Point2, type PointerSample, type RecordedStroke, type ReferenceImage, type RenderOptions, type ReplayOptions, type Rgb255, SNAP_DECIDE_DISTANCE, SYMMETRY_MODES, type SerializeOptions, type SerializedPaintDocument, type SliderControl, type StrokeCopy, type StrokeSessionHost, type StrokeSessionInit, type StrokeVariation, type Swatch, type SymmetryGuide, type SymmetryMode, TRACING_NODE_ID, TileableNoise, type TracingImage, type ViewLayer, type ViewportBox, affineCopy, applyAffine, brushToJSON, clonePaper, colorHarmony, composeAffine, createPaintCompositor, createPaintDocument, createPaintEditorToolProvider, createPaintLayer, decodeImageBlob, defaultGuides, defaultImageEncoder, deserializePaintDocument, deserializePaintDocumentAsync, documentExtensions, documentToScreen, downloadBytes, downsampleRgba, fitZoom, grainCatch, grainHeights, guideOverlay, handlePaintShortcut, hash2, hexToRgb8, hslToRgb, hsvToRgb, hueToWheel, invertAffine, isPalmTouch, mapPenPoint, mix32, mixerLoadForStroke, mixerTip, newPaintLayerId, normalizeBrushStroke, normalizeCanvas, normalizeDynamics, normalizePaintBrush, normalizePaper, normalizePerspective, normalizeRotation, normalizeSymmetry, normalizeView, paperGrain, paperKey, paperNode, paperPreset, parseBrushLibrary, parseHexColor, patchPath, penOrientation, perspectiveDirections, perspectiveGuideLines, pointerToPenPoint, rand01, randSigned, readPath, renderBrushThumbnail, renderColorWheel, renderPaper, rgbToHexColor, rgbToHsl, rgbToHsv, samplePressure, screenToDocument, seedFromString, serializePaintDocument, serializePaintDocumentExternal, strokeBounds, symmetryAxisAngles, symmetryAxisSegments, symmetryCopies, thumbnailStroke, tiltToOrientation, toStrokePoint, variationAffine, varyStroke, viewCssTransform, viewMatrix, viewPenToDocument, wheelAngle, wheelPick, wheelPoint, wheelToHue };
@@ -1,9 +1,9 @@
1
- import { R as RasterLayer, a as RasterGroupLayer, b as RasterPixelLayer, C as CompositorLayer, c as RasterCompositor, d as RasterSources, L as LayerLocks } from '../compositor-BsYYllvR.js';
2
- import { B as BrushSettings, M as MixerSettings, C as CoverageMap, D as Dab, S as StrokePoint, a as MixerLoad } from '../mixer-Cu5a9Bzd.js';
3
- export { b as MAX_BRUSH_SIZE } from '../mixer-Cu5a9Bzd.js';
4
- import { R as RasterRect, a as TiledSurface, B as BlendMode } from '../surface-BBJN9wxg.js';
5
- export { b as BLEND_MODES, c as Tile, i as isBlendMode } from '../surface-BBJN9wxg.js';
6
- import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-iMrop3Jm.js';
1
+ import { R as RasterLayer, a as RasterGroupLayer, b as RasterPixelLayer, C as CompositorLayer, c as RasterCompositor, d as RasterSources, L as LayerLocks } from '../compositor-Kt_M4ruo.js';
2
+ import { B as BrushSettings, M as MixerSettings, C as CoverageMap, D as Dab, S as StrokePoint, a as MixerLoad } from '../mixer-DNqiYXYQ.js';
3
+ export { b as MAX_BRUSH_SIZE } from '../mixer-DNqiYXYQ.js';
4
+ import { R as RasterRect, a as TiledSurface, B as BlendMode, b as BlendModeInfo } from '../surface-CkKOHGPm.js';
5
+ export { c as BLEND_MODES, d as PAINTERLY_BLEND_MODES, e as Tile, i as isBlendMode, f as isPainterlyBlendMode, s as standardBlendMode } from '../surface-CkKOHGPm.js';
6
+ import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-a9bnF7Cl.js';
7
7
  import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
8
8
  import '../types-CwMPoRMU.js';
9
9
  import '../warp-CWHZzE3x.js';
@@ -1676,5 +1676,16 @@ declare function renderColorWheel(size: number, wheel: ColorWheel, inner?: numbe
1676
1676
  };
1677
1677
  /** The colour for a click on the wheel ring at (dx, dy) from its centre, keeping `color`'s saturation and value. */
1678
1678
  declare function wheelPick(dx: number, dy: number, wheel: ColorWheel, color: string): string;
1679
+ /** A group of the blend menu: the Photoshop modes, then pigment and the painterly modes. */
1680
+ interface BlendMenuGroup {
1681
+ label: string;
1682
+ modes: readonly BlendModeInfo[];
1683
+ }
1684
+ /**
1685
+ * The layer and brush blend menus as groups: the 26 standard modes, then the paint modes
1686
+ * (`pigment` and the painterly `watercolor`, `tint`, `highlight`, `shadow`), each with its
1687
+ * description as a tooltip. Both bindings render this as `<optgroup>`s.
1688
+ */
1689
+ declare const BLEND_MENU_GROUPS: readonly BlendMenuGroup[];
1679
1690
 
1680
- export { type Affine, BRUSH_ID, BRUSH_ROTATIONS, BRUSH_SLIDERS, BUILTIN_BRUSHES, BlendMode, type BrushDynamics, type BrushLibraryFile, type BrushRotation, type BrushThumbnail, type ColorWheel, DEFAULT_BRUSH_ID, DEFAULT_DPI, DEFAULT_DYNAMICS, DEFAULT_PAPER, DEFAULT_SWATCHES, DEFAULT_VIEW, DryStroke, type DryStrokeOptions, type FillLayerOptions, GRAIN_PATTERNS, GRAIN_TILE, type GrainPattern, type GrainTuning, HARMONY_KINDS, type Hand, type HarmonyColor, type HarmonyKind, IDENTITY_AFFINE, IDENTITY_COPY, type ImageEncoder, type ImageFormat, type ImageNode, type LayerUpdate, type Linear2, type LoadedPaintDocument, MAX_CANVAS_SIDE, MAX_COORDINATE, MAX_IMAGE_SIDE, MAX_ZOOM, MIN_CANVAS_SIDE, MIN_ZOOM, MIXING_PAD_HEIGHT, MIXING_PAD_WIDTH, MixingPad, type MixingPadTool, PAINT_BRUSH_CATEGORIES, PAINT_BRUSH_ENGINES, PAINT_FORMAT, PAINT_SCHEMA_VERSION, PAINT_TOOLS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_NODE_ID, PAPER_SLIDERS, type Paint2DContext, type PaintAssetStore, type PaintBrush, type PaintBrushCategory, type PaintBrushEngine, type PaintBrushInput, type PaintCanvas, PaintCanvasPresenter, PaintDocumentError, type PaintDocumentExtensions, type PaintDocumentState, PaintEditorController, PaintEditorError, type PaintEditorOptions, type PaintEditorState, type PaintEditorToolProviderOptions, PaintGesture, type PaintGroupLayer, type PaintGuides, type PaintLayer, type PaintLayerInfo, type PaintPixelLayer, type PaintPointerEvent, type PaintStrokeInit, type PaintStrokeResult, PaintStrokeSession, type PaintTool, type PaintView, type PaperFamily, PaperGrain, type PaperNode, type PaperSettings, type PaperTiling, type PenDab, PenDabWalker, type PenPoint, PenSmoother, type PerspectiveGuide, PerspectiveSnapper, type PixelImage, type Point2, type PointerSample, type RecordedStroke, type ReferenceImage, type RenderOptions, type ReplayOptions, type Rgb255, SNAP_DECIDE_DISTANCE, SYMMETRY_MODES, type SerializeOptions, type SerializedPaintDocument, type SliderControl, type StrokeCopy, type StrokeSessionHost, type StrokeSessionInit, type StrokeVariation, type Swatch, type SymmetryGuide, type SymmetryMode, TRACING_NODE_ID, TileableNoise, type TracingImage, type ViewLayer, type ViewportBox, affineCopy, applyAffine, brushToJSON, clonePaper, colorHarmony, composeAffine, createPaintCompositor, createPaintDocument, createPaintEditorToolProvider, createPaintLayer, decodeImageBlob, defaultGuides, defaultImageEncoder, deserializePaintDocument, deserializePaintDocumentAsync, documentExtensions, documentToScreen, downloadBytes, downsampleRgba, fitZoom, grainCatch, grainHeights, guideOverlay, handlePaintShortcut, hash2, hexToRgb8, hslToRgb, hsvToRgb, hueToWheel, invertAffine, isPalmTouch, mapPenPoint, mix32, mixerLoadForStroke, mixerTip, newPaintLayerId, normalizeBrushStroke, normalizeCanvas, normalizeDynamics, normalizePaintBrush, normalizePaper, normalizePerspective, normalizeRotation, normalizeSymmetry, normalizeView, paperGrain, paperKey, paperNode, paperPreset, parseBrushLibrary, parseHexColor, patchPath, penOrientation, perspectiveDirections, perspectiveGuideLines, pointerToPenPoint, rand01, randSigned, readPath, renderBrushThumbnail, renderColorWheel, renderPaper, rgbToHexColor, rgbToHsl, rgbToHsv, samplePressure, screenToDocument, seedFromString, serializePaintDocument, serializePaintDocumentExternal, strokeBounds, symmetryAxisAngles, symmetryAxisSegments, symmetryCopies, thumbnailStroke, tiltToOrientation, toStrokePoint, variationAffine, varyStroke, viewCssTransform, viewMatrix, viewPenToDocument, wheelAngle, wheelPick, wheelPoint, wheelToHue };
1691
+ export { type Affine, BLEND_MENU_GROUPS, BRUSH_ID, BRUSH_ROTATIONS, BRUSH_SLIDERS, BUILTIN_BRUSHES, type BlendMenuGroup, BlendMode, BlendModeInfo, type BrushDynamics, type BrushLibraryFile, type BrushRotation, type BrushThumbnail, type ColorWheel, DEFAULT_BRUSH_ID, DEFAULT_DPI, DEFAULT_DYNAMICS, DEFAULT_PAPER, DEFAULT_SWATCHES, DEFAULT_VIEW, DryStroke, type DryStrokeOptions, type FillLayerOptions, GRAIN_PATTERNS, GRAIN_TILE, type GrainPattern, type GrainTuning, HARMONY_KINDS, type Hand, type HarmonyColor, type HarmonyKind, IDENTITY_AFFINE, IDENTITY_COPY, type ImageEncoder, type ImageFormat, type ImageNode, type LayerUpdate, type Linear2, type LoadedPaintDocument, MAX_CANVAS_SIDE, MAX_COORDINATE, MAX_IMAGE_SIDE, MAX_ZOOM, MIN_CANVAS_SIDE, MIN_ZOOM, MIXING_PAD_HEIGHT, MIXING_PAD_WIDTH, MixingPad, type MixingPadTool, PAINT_BRUSH_CATEGORIES, PAINT_BRUSH_ENGINES, PAINT_FORMAT, PAINT_SCHEMA_VERSION, PAINT_TOOLS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_NODE_ID, PAPER_SLIDERS, type Paint2DContext, type PaintAssetStore, type PaintBrush, type PaintBrushCategory, type PaintBrushEngine, type PaintBrushInput, type PaintCanvas, PaintCanvasPresenter, PaintDocumentError, type PaintDocumentExtensions, type PaintDocumentState, PaintEditorController, PaintEditorError, type PaintEditorOptions, type PaintEditorState, type PaintEditorToolProviderOptions, PaintGesture, type PaintGroupLayer, type PaintGuides, type PaintLayer, type PaintLayerInfo, type PaintPixelLayer, type PaintPointerEvent, type PaintStrokeInit, type PaintStrokeResult, PaintStrokeSession, type PaintTool, type PaintView, type PaperFamily, PaperGrain, type PaperNode, type PaperSettings, type PaperTiling, type PenDab, PenDabWalker, type PenPoint, PenSmoother, type PerspectiveGuide, PerspectiveSnapper, type PixelImage, type Point2, type PointerSample, type RecordedStroke, type ReferenceImage, type RenderOptions, type ReplayOptions, type Rgb255, SNAP_DECIDE_DISTANCE, SYMMETRY_MODES, type SerializeOptions, type SerializedPaintDocument, type SliderControl, type StrokeCopy, type StrokeSessionHost, type StrokeSessionInit, type StrokeVariation, type Swatch, type SymmetryGuide, type SymmetryMode, TRACING_NODE_ID, TileableNoise, type TracingImage, type ViewLayer, type ViewportBox, affineCopy, applyAffine, brushToJSON, clonePaper, colorHarmony, composeAffine, createPaintCompositor, createPaintDocument, createPaintEditorToolProvider, createPaintLayer, decodeImageBlob, defaultGuides, defaultImageEncoder, deserializePaintDocument, deserializePaintDocumentAsync, documentExtensions, documentToScreen, downloadBytes, downsampleRgba, fitZoom, grainCatch, grainHeights, guideOverlay, handlePaintShortcut, hash2, hexToRgb8, hslToRgb, hsvToRgb, hueToWheel, invertAffine, isPalmTouch, mapPenPoint, mix32, mixerLoadForStroke, mixerTip, newPaintLayerId, normalizeBrushStroke, normalizeCanvas, normalizeDynamics, normalizePaintBrush, normalizePaper, normalizePerspective, normalizeRotation, normalizeSymmetry, normalizeView, paperGrain, paperKey, paperNode, paperPreset, parseBrushLibrary, parseHexColor, patchPath, penOrientation, perspectiveDirections, perspectiveGuideLines, pointerToPenPoint, rand01, randSigned, readPath, renderBrushThumbnail, renderColorWheel, renderPaper, rgbToHexColor, rgbToHsl, rgbToHsv, samplePressure, screenToDocument, seedFromString, serializePaintDocument, serializePaintDocumentExternal, strokeBounds, symmetryAxisAngles, symmetryAxisSegments, symmetryCopies, thumbnailStroke, tiltToOrientation, toStrokePoint, variationAffine, varyStroke, viewCssTransform, viewMatrix, viewPenToDocument, wheelAngle, wheelPick, wheelPoint, wheelToHue };
@@ -4,7 +4,7 @@ import {
4
4
  resolveExternalAssets,
5
5
  serializeLayers,
6
6
  serializeLayersExternal
7
- } from "../chunk-4X5MIVCE.js";
7
+ } from "../chunk-SOROZ2BF.js";
8
8
  import {
9
9
  RasterCompositor,
10
10
  bytesToBase64,
@@ -17,7 +17,7 @@ import {
17
17
  mapLayer,
18
18
  parseDataUrl,
19
19
  pngDataUrl
20
- } from "../chunk-67FRIOPZ.js";
20
+ } from "../chunk-G4BIYE6R.js";
21
21
  import "../chunk-GX332W2C.js";
22
22
  import {
23
23
  CoverageMap,
@@ -35,9 +35,10 @@ import {
35
35
  normalizeBrush,
36
36
  normalizeMixer,
37
37
  rasterizeDab
38
- } from "../chunk-DS7KDKPX.js";
38
+ } from "../chunk-3PHA3UKI.js";
39
39
  import {
40
40
  BLEND_MODES,
41
+ PAINTERLY_BLEND_MODES,
41
42
  TILE,
42
43
  TiledSurface,
43
44
  contentBounds,
@@ -45,12 +46,14 @@ import {
45
46
  fillRect,
46
47
  finishTile,
47
48
  isBlendMode,
49
+ isPainterlyBlendMode,
48
50
  readPixel,
49
51
  readRegion,
52
+ standardBlendMode,
50
53
  surfaceFromPixels,
51
54
  tileKey,
52
55
  tilesInRect
53
- } from "../chunk-HEW6KDNI.js";
56
+ } from "../chunk-WMBIJCHA.js";
54
57
  import "../chunk-KKREERP2.js";
55
58
 
56
59
  // src/paint-editor/noise.ts
@@ -2936,9 +2939,22 @@ var PaintEditorController = class {
2936
2939
  offset: { x: 0, y: 0 }
2937
2940
  };
2938
2941
  const merged = this.compositePixels({ paper: true }).data;
2939
- const result = exportPsd({ width, height, layers: [paperLayer, ...this.doc.layers], merged, resolution: dpi });
2940
- const pigment = flattenLayers(this.doc.layers).filter((l) => l.blend === "pigment");
2941
- if (pigment.length) result.warnings.push(`Pigment blending has no PSD equivalent; ${pigment.map((l) => `"${l.name}"`).join(", ")} ${pigment.length === 1 ? "was" : "were"} written as Normal, so ${pigment.length === 1 ? "it looks" : "they look"} different in Photoshop.`);
2942
+ const changed = /* @__PURE__ */ new Map();
2943
+ const toStandard = (layers2) => layers2.map((l) => {
2944
+ const blend = l.blend === "pass-through" ? l.blend : standardBlendMode(l.blend);
2945
+ if (blend !== l.blend) changed.set(l.blend, [...changed.get(l.blend) ?? [], l.name]);
2946
+ const next = blend === l.blend ? l : { ...l, blend };
2947
+ return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
2948
+ });
2949
+ const layers = toStandard(this.doc.layers);
2950
+ const result = exportPsd({ width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
2951
+ for (const [mode, names] of changed) {
2952
+ const label = BLEND_MODES.find((m) => m.id === mode)?.label ?? mode;
2953
+ const std = BLEND_MODES.find((m) => m.id === standardBlendMode(mode))?.label ?? standardBlendMode(mode);
2954
+ const list = names.map((n) => `"${n}"`).join(", ");
2955
+ const one = names.length === 1;
2956
+ result.warnings.push(`${label} blending has no PSD equivalent; ${list} ${one ? "was" : "were"} written as ${std}, the nearest Photoshop mode, so ${one ? "it looks" : "they look"} different in Photoshop (the merged image is exact).`);
2957
+ }
2942
2958
  return result;
2943
2959
  }
2944
2960
  /** `render_preview` as a base64 PNG. */
@@ -3585,7 +3601,11 @@ var TIP = {
3585
3601
  smoothing: { type: "number", minimum: 0, maximum: 0.95, description: "Position smoothing of the input, 0..0.95." },
3586
3602
  pressureSize: { type: "boolean", description: "Pressure scales the size (down to dynamics.minSize)." },
3587
3603
  pressureOpacity: { type: "boolean", description: "Pressure scales the opacity." },
3588
- blend: { type: "string", enum: BLEND_MODES.map((m) => m.id), description: "How paint combines with the layer. pigment mixes it in like real paint (blue into yellow gives green); multiply darkens like marker ink." }
3604
+ blend: {
3605
+ type: "string",
3606
+ enum: BLEND_MODES.map((m) => m.id),
3607
+ description: "How paint combines with the layer. pigment mixes it in like real paint (blue into yellow gives green); multiply darkens like marker ink; watercolor glazes like a transparent wash; tint, highlight and shadow recolour, light and shade (see list_blend_modes)."
3608
+ }
3589
3609
  },
3590
3610
  additionalProperties: false
3591
3611
  };
@@ -3820,7 +3840,11 @@ function createPaintEditorToolProvider(controller, options = {}) {
3820
3840
  name: { type: "string", minLength: 1, description: "New name." },
3821
3841
  visible: { type: "boolean", description: "Show or hide." },
3822
3842
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0..1." },
3823
- blend: { type: "string", enum: [...BLEND_MODES.map((m) => m.id), "pass-through"], description: "Blend mode (pass-through for groups only)." },
3843
+ blend: {
3844
+ type: "string",
3845
+ enum: [...BLEND_MODES.map((m) => m.id), "pass-through"],
3846
+ description: "Blend mode (pass-through for groups only). Painterly modes: watercolor (the layer glazes like a transparent wash), tint (recolours keeping lightness), highlight (adds soft coloured light), shadow (shades with ambient fill); see list_blend_modes."
3847
+ },
3824
3848
  clipped: { type: "boolean", description: "Clip to the layer below (paint only shows where it has paint)." },
3825
3849
  locks: {
3826
3850
  type: "object",
@@ -3840,6 +3864,22 @@ function createPaintEditorToolProvider(controller, options = {}) {
3840
3864
  annotations: { title: "Change a layer", ...SET2 },
3841
3865
  handler: ({ layerId, ...u }) => c.updateLayer(layerId, u)
3842
3866
  });
3867
+ add({
3868
+ name: "list_blend_modes",
3869
+ title: "List blend modes",
3870
+ description: "Lists every layer and brush blend mode: id, label, group (standard Photoshop modes, pigment, or painterly), what the pigment and painterly modes do, and the standard mode PSD export writes in their place. Changes nothing. Read it before choosing a painterly mode for update_layer or a brush tip.",
3871
+ inputSchema: EMPTY2,
3872
+ annotations: { title: "List blend modes", ...READ2 },
3873
+ handler: () => ({
3874
+ modes: BLEND_MODES.map((m) => ({
3875
+ id: m.id,
3876
+ label: m.label,
3877
+ group: m.painterly ? "painterly" : m.id === "pigment" ? "pigment" : "standard",
3878
+ ...m.description ? { description: m.description } : {},
3879
+ psd: standardBlendMode(m.id)
3880
+ }))
3881
+ })
3882
+ });
3843
3883
  add({
3844
3884
  name: "set_active_layer",
3845
3885
  title: "Choose the active layer",
@@ -3904,7 +3944,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
3904
3944
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0..1 (default 1)." },
3905
3945
  grain: { type: "number", minimum: 0, maximum: 1, description: "Paper grain response 0..1 (default 0: flat)." },
3906
3946
  pressure: { type: "number", minimum: 0, maximum: 1, description: "With grain: how far into the valleys, 0..1 (default 0.5)." },
3907
- blend: { type: "string", enum: BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal; pigment mixes like paint)." }
3947
+ blend: { type: "string", enum: BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal; pigment mixes like paint, watercolor glazes; see list_blend_modes)." }
3908
3948
  },
3909
3949
  additionalProperties: false
3910
3950
  },
@@ -4282,7 +4322,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
4282
4322
  add({
4283
4323
  name: "export_psd",
4284
4324
  title: "Export as PSD",
4285
- description: 'Writes the painting as an 8-bit RGB PSD (PSB above 30000 px) through the shared PSD writer: every layer and group with its opacity, blend, mask and locks, the paper as a locked "Paper" pixel layer at the bottom, and the composite as the merged image. Changes nothing. Returns the file as base64, its size, whether it is a PSB, and warnings (pigment blending has no PSD equivalent).',
4325
+ description: 'Writes the painting as an 8-bit RGB PSD (PSB above 30000 px) through the shared PSD writer: every layer and group with its opacity, blend, mask and locks, the paper as a locked "Paper" pixel layer at the bottom, and the composite as the merged image. Changes nothing. Returns the file as base64, its size, whether it is a PSB, and warnings (pigment and painterly blend modes have no PSD equivalent: they are written as the nearest standard mode, see list_blend_modes).',
4286
4326
  inputSchema: EMPTY2,
4287
4327
  annotations: { title: "Export as PSD", ...READ2 },
4288
4328
  handler: () => {
@@ -4591,7 +4631,12 @@ function wheelPick(dx, dy, wheel, color) {
4591
4631
  const [nr, ng, nb] = hsvToRgb(wheelToHue(wheelAngle(dx, dy), wheel), s || 1, v || 1);
4592
4632
  return rgbToHexColor(nr, ng, nb);
4593
4633
  }
4634
+ var BLEND_MENU_GROUPS = [
4635
+ { label: "Standard", modes: BLEND_MODES.filter((m) => !m.painterly && m.id !== "pigment") },
4636
+ { label: "Paint", modes: BLEND_MODES.filter((m) => m.painterly || m.id === "pigment") }
4637
+ ];
4594
4638
  export {
4639
+ BLEND_MENU_GROUPS,
4595
4640
  BLEND_MODES,
4596
4641
  BRUSH_ID,
4597
4642
  BRUSH_ROTATIONS,
@@ -4619,6 +4664,7 @@ export {
4619
4664
  MIXING_PAD_HEIGHT,
4620
4665
  MIXING_PAD_WIDTH,
4621
4666
  MixingPad,
4667
+ PAINTERLY_BLEND_MODES,
4622
4668
  PAINT_BRUSH_CATEGORIES,
4623
4669
  PAINT_BRUSH_ENGINES,
4624
4670
  PAINT_FORMAT,
@@ -4673,6 +4719,7 @@ export {
4673
4719
  hueToWheel,
4674
4720
  invertAffine,
4675
4721
  isBlendMode,
4722
+ isPainterlyBlendMode,
4676
4723
  isPalmTouch,
4677
4724
  mapPenPoint,
4678
4725
  mix32,
@@ -4713,6 +4760,7 @@ export {
4713
4760
  seedFromString,
4714
4761
  serializePaintDocument,
4715
4762
  serializePaintDocumentExternal,
4763
+ standardBlendMode,
4716
4764
  strokeBounds,
4717
4765
  symmetryAxisAngles,
4718
4766
  symmetryAxisSegments,