@pixerate/editor 0.252.0 → 0.254.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 (73) hide show
  1. package/dist/animation-editor/index.cjs +53 -53
  2. package/dist/animation-editor/index.js +2 -2
  3. package/dist/brushes/index.cjs +229 -2014
  4. package/dist/brushes/index.d.cts +5 -1
  5. package/dist/brushes/index.d.ts +5 -1
  6. package/dist/brushes/index.js +236 -2021
  7. package/dist/brushes/patch.d.cts +23 -0
  8. package/dist/brushes/patch.d.ts +23 -0
  9. package/dist/brushes/ui.d.cts +105 -0
  10. package/dist/brushes/ui.d.ts +105 -0
  11. package/dist/canvas/index.cjs +7 -7
  12. package/dist/canvas/index.js +1 -1
  13. package/dist/{chunk-QKXO6JPP.cjs → chunk-2OQGPEHH.cjs} +14 -14
  14. package/dist/chunk-34KLWUH4.cjs +2284 -0
  15. package/dist/{chunk-Z3BRH4JK.cjs → chunk-557BDWKO.cjs} +6 -6
  16. package/dist/{chunk-ZBCT5MEA.cjs → chunk-CBVNCWJM.cjs} +7 -7
  17. package/dist/{chunk-226QDRO3.js → chunk-DHQPRKXF.js} +1 -1
  18. package/dist/{chunk-ABL7IWFZ.js → chunk-GBEF2D4P.js} +1 -1
  19. package/dist/{chunk-ISIO63Q5.cjs → chunk-L2JTLW6B.cjs} +150 -25
  20. package/dist/{chunk-JA57JIT5.js → chunk-MV7CYFMJ.js} +133 -8
  21. package/dist/{chunk-5E2Q7ZHI.js → chunk-MWUZCEFT.js} +1 -1
  22. package/dist/chunk-QPHNVZHO.js +2284 -0
  23. package/dist/effects/conformance.d.cts +1 -0
  24. package/dist/effects/conformance.d.ts +1 -0
  25. package/dist/effects/fake.d.cts +7 -1
  26. package/dist/effects/fake.d.ts +7 -1
  27. package/dist/effects/helpers.d.cts +36 -4
  28. package/dist/effects/helpers.d.ts +36 -4
  29. package/dist/effects/index.cjs +331 -102
  30. package/dist/effects/index.js +238 -9
  31. package/dist/effects/types.d.cts +84 -5
  32. package/dist/effects/types.d.ts +84 -5
  33. package/dist/image-editor/index.cjs +15 -15
  34. package/dist/image-editor/index.js +1 -1
  35. package/dist/paint-editor/brush-controls.d.cts +57 -0
  36. package/dist/paint-editor/brush-controls.d.ts +57 -0
  37. package/dist/paint-editor/brush-library-tools.d.cts +15 -0
  38. package/dist/paint-editor/brush-library-tools.d.ts +15 -0
  39. package/dist/paint-editor/brush-library.d.cts +29 -0
  40. package/dist/paint-editor/brush-library.d.ts +29 -0
  41. package/dist/paint-editor/controller.d.cts +76 -17
  42. package/dist/paint-editor/controller.d.ts +76 -17
  43. package/dist/paint-editor/index.cjs +543 -858
  44. package/dist/paint-editor/index.d.cts +1 -0
  45. package/dist/paint-editor/index.d.ts +1 -0
  46. package/dist/paint-editor/index.js +329 -644
  47. package/dist/paint-editor/serialize.d.cts +7 -4
  48. package/dist/paint-editor/serialize.d.ts +7 -4
  49. package/dist/paint-editor/sticker-tools.d.cts +1 -1
  50. package/dist/paint-editor/sticker-tools.d.ts +1 -1
  51. package/dist/paint-editor/strokes.d.cts +10 -1
  52. package/dist/paint-editor/strokes.d.ts +10 -1
  53. package/dist/paint-editor/tools.d.cts +1 -1
  54. package/dist/paint-editor/tools.d.ts +1 -1
  55. package/dist/paint-editor/ui.d.cts +3 -51
  56. package/dist/paint-editor/ui.d.ts +3 -51
  57. package/dist/paint-editor/wet-tools.d.cts +1 -1
  58. package/dist/paint-editor/wet-tools.d.ts +1 -1
  59. package/dist/vector/index.cjs +6 -6
  60. package/dist/vector/index.js +1 -1
  61. package/dist/video-editor/index.cjs +344 -344
  62. package/dist/video-editor/index.js +4 -4
  63. package/package.json +1 -1
  64. package/skills/pixerate-brushes/SKILL.md +5 -3
  65. package/skills/pixerate-paint-editor/SKILL.md +26 -24
  66. package/skills/pixerate-paint-editor/references/brush-facets.md +30 -0
  67. package/skills/pixerate-paint-editor/references/gradient-paint.md +1 -1
  68. package/skills/pixerate-paint-editor/references/light-paint.md +2 -2
  69. package/skills/pixerate-paint-editor/references/oils.md +1 -1
  70. package/skills/pixerate-paint-editor/references/particle-brushes.md +8 -5
  71. package/skills/pixerate-paint-oil-impasto/SKILL.md +1 -1
  72. package/skills/pixerate-stickers/SKILL.md +1 -1
  73. package/skills/pixerate-video-editor/SKILL.md +1 -1
@@ -9,11 +9,14 @@
9
9
  * as new assets keyed by layer id without breaking older readers (see `PaintDocumentExtensions`).
10
10
  */
11
11
  import { type ImageEditorAssetStore, type SerializedLayer } from '../image-editor/layers/serialize.cjs';
12
- import { type RecordedStroke } from './strokes.cjs';
12
+ import { strokeToJSON } from './strokes.cjs';
13
13
  import { type PaintDocumentState } from './document.cjs';
14
14
  import { type PaperSettings } from './paper.cjs';
15
15
  export declare const PAINT_FORMAT: "pixerate-paint";
16
- export declare const PAINT_SCHEMA_VERSION: 1;
16
+ /** 2: recorded strokes keep facet brushes (version 1 documents, with flat engine brushes, still load). */
17
+ export declare const PAINT_SCHEMA_VERSION: 2;
18
+ /** A recorded stroke as a document stores it (`strokeToJSON`). */
19
+ export type SerializedStroke = ReturnType<typeof strokeToJSON>;
17
20
  /** Where a host keeps layer PNGs outside the JSON (the image editor's asset store contract). */
18
21
  export type PaintAssetStore = ImageEditorAssetStore;
19
22
  /**
@@ -34,8 +37,8 @@ export interface SerializedPaintDocument {
34
37
  /** Asset id → PNG data URL (or an external reference). */
35
38
  assets: Record<string, string>;
36
39
  activeLayerId: string | null;
37
- /** Recorded strokes (strokes are data), oldest first; missing when saved without them. */
38
- strokes?: RecordedStroke[];
40
+ /** Recorded strokes (strokes are data), oldest first, each brush a facet `Brush`; missing when saved without them. */
41
+ strokes?: SerializedStroke[];
39
42
  /** Everything else (document-level state of later phases), written back as read. */
40
43
  [extension: string]: unknown;
41
44
  }
@@ -9,11 +9,14 @@
9
9
  * as new assets keyed by layer id without breaking older readers (see `PaintDocumentExtensions`).
10
10
  */
11
11
  import { type ImageEditorAssetStore, type SerializedLayer } from '../image-editor/layers/serialize.js';
12
- import { type RecordedStroke } from './strokes.js';
12
+ import { strokeToJSON } from './strokes.js';
13
13
  import { type PaintDocumentState } from './document.js';
14
14
  import { type PaperSettings } from './paper.js';
15
15
  export declare const PAINT_FORMAT: "pixerate-paint";
16
- export declare const PAINT_SCHEMA_VERSION: 1;
16
+ /** 2: recorded strokes keep facet brushes (version 1 documents, with flat engine brushes, still load). */
17
+ export declare const PAINT_SCHEMA_VERSION: 2;
18
+ /** A recorded stroke as a document stores it (`strokeToJSON`). */
19
+ export type SerializedStroke = ReturnType<typeof strokeToJSON>;
17
20
  /** Where a host keeps layer PNGs outside the JSON (the image editor's asset store contract). */
18
21
  export type PaintAssetStore = ImageEditorAssetStore;
19
22
  /**
@@ -34,8 +37,8 @@ export interface SerializedPaintDocument {
34
37
  /** Asset id → PNG data URL (or an external reference). */
35
38
  assets: Record<string, string>;
36
39
  activeLayerId: string | null;
37
- /** Recorded strokes (strokes are data), oldest first; missing when saved without them. */
38
- strokes?: RecordedStroke[];
40
+ /** Recorded strokes (strokes are data), oldest first, each brush a facet `Brush`; missing when saved without them. */
41
+ strokes?: SerializedStroke[];
39
42
  /** Everything else (document-level state of later phases), written back as read. */
40
43
  [extension: string]: unknown;
41
44
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brushes
2
+ * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brush_presets
3
3
  * category sticker) stay objects on their layer, which these tools list, move, turn, resize,
4
4
  * recolour, reorder and delete, find by point (`sticker_at`), and places new ones exactly (`add_stickers`). Each change is one undo step and redraws the layer.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brushes
2
+ * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brush_presets
3
3
  * category sticker) stay objects on their layer, which these tools list, move, turn, resize,
4
4
  * recolour, reorder and delete, find by point (`sticker_at`), and places new ones exactly (`add_stickers`). Each change is one undo step and redraws the layer.
5
5
  */
@@ -2,8 +2,13 @@
2
2
  * Strokes as data. Every committed stroke is recorded with the brush, colour, raw pen samples,
3
3
  * jitter seed and symmetry copies it was painted with, so it replays to the same pixels, and can
4
4
  * be replayed moved, scaled, rotated, recoloured or with another brush (`replay_strokes`).
5
+ *
6
+ * In memory a stroke keeps its brush as the engine painted it. Saved, the brush is a facet brush
7
+ * (`strokeToJSON`, documents of version 2); strokes saved with the flat engine brush (version 1)
8
+ * still read, and both replay to the same pixels.
5
9
  */
6
10
  import { type PaintBrush } from './brushes.cjs';
11
+ import type { Brush } from '../brushes/types.cjs';
7
12
  import type { PenPoint, StrokeCopy } from './engine.cjs';
8
13
  import type { MixerLoad } from '../paint/exchange.cjs';
9
14
  import { type Stencil } from './stencils.cjs';
@@ -46,7 +51,11 @@ export declare function invertAffine(m: Affine): Affine;
46
51
  export declare function mapPenPoint(m: Affine, p: PenPoint): PenPoint;
47
52
  /** An affine copy as the engine's `StrokeCopy`. */
48
53
  export declare function affineCopy(m: Affine): StrokeCopy;
49
- /** A recorded stroke read from JSON, or `null` when it is not one. */
54
+ /** A recorded stroke as saved: plain JSON with its brush as a facet brush. */
55
+ export declare function strokeToJSON(stroke: RecordedStroke): Omit<RecordedStroke, 'brush'> & {
56
+ brush: Brush;
57
+ };
58
+ /** A recorded stroke read from JSON (its brush version 1 or 2), or `null` when it is not one. */
50
59
  export declare function normalizeBrushStroke(raw: unknown): RecordedStroke | null;
51
60
  /** The bounding box of a stroke's points. */
52
61
  export declare function strokeBounds(points: readonly PenPoint[]): {
@@ -2,8 +2,13 @@
2
2
  * Strokes as data. Every committed stroke is recorded with the brush, colour, raw pen samples,
3
3
  * jitter seed and symmetry copies it was painted with, so it replays to the same pixels, and can
4
4
  * be replayed moved, scaled, rotated, recoloured or with another brush (`replay_strokes`).
5
+ *
6
+ * In memory a stroke keeps its brush as the engine painted it. Saved, the brush is a facet brush
7
+ * (`strokeToJSON`, documents of version 2); strokes saved with the flat engine brush (version 1)
8
+ * still read, and both replay to the same pixels.
5
9
  */
6
10
  import { type PaintBrush } from './brushes.js';
11
+ import type { Brush } from '../brushes/types.js';
7
12
  import type { PenPoint, StrokeCopy } from './engine.js';
8
13
  import type { MixerLoad } from '../paint/exchange.js';
9
14
  import { type Stencil } from './stencils.js';
@@ -46,7 +51,11 @@ export declare function invertAffine(m: Affine): Affine;
46
51
  export declare function mapPenPoint(m: Affine, p: PenPoint): PenPoint;
47
52
  /** An affine copy as the engine's `StrokeCopy`. */
48
53
  export declare function affineCopy(m: Affine): StrokeCopy;
49
- /** A recorded stroke read from JSON, or `null` when it is not one. */
54
+ /** A recorded stroke as saved: plain JSON with its brush as a facet brush. */
55
+ export declare function strokeToJSON(stroke: RecordedStroke): Omit<RecordedStroke, 'brush'> & {
56
+ brush: Brush;
57
+ };
58
+ /** A recorded stroke read from JSON (its brush version 1 or 2), or `null` when it is not one. */
50
59
  export declare function normalizeBrushStroke(raw: unknown): RecordedStroke | null;
51
60
  /** The bounding box of a stroke's points. */
52
61
  export declare function strokeBounds(points: readonly PenPoint[]): {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent tools for the paint editor (`createPaintEditorToolProvider`). Strict schemas, every
3
3
  * argument described, all four annotations. Each write is one undo step (or editor state, said so)
4
- * and returns what it changed; ids come from the read tools (`list_layers`, `list_brushes`,
4
+ * and returns what it changed; ids come from the read tools (`list_layers`, the brush library's `list_brush_presets`,
5
5
  * `list_papers`, `list_strokes`).
6
6
  */
7
7
  import type { AgentToolProvider } from '../tools/registry.cjs';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent tools for the paint editor (`createPaintEditorToolProvider`). Strict schemas, every
3
3
  * argument described, all four annotations. Each write is one undo step (or editor state, said so)
4
- * and returns what it changed; ids come from the read tools (`list_layers`, `list_brushes`,
4
+ * and returns what it changed; ids come from the read tools (`list_layers`, the brush library's `list_brush_presets`,
5
5
  * `list_papers`, `list_strokes`).
6
6
  */
7
7
  import type { AgentToolProvider } from '../tools/registry.js';
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import type { MixerLoad } from '../paint/exchange.cjs';
12
12
  import { type BlendModeInfo } from '../raster/blend.cjs';
13
- import type { ImpastoTool, PaintBrush, PaintBrushInput, WetMediumKind, WetTool } from './brushes.cjs';
13
+ import type { ImpastoTool, WetMediumKind, WetTool } from './brushes.cjs';
14
14
  import type { PaintEditorController } from './controller.cjs';
15
15
  import type { PenPoint } from './engine.cjs';
16
16
  import { type Point2 } from './guides.cjs';
@@ -133,15 +133,8 @@ export declare function guideOverlay(controller: PaintEditorController, drag?: {
133
133
  to: Point2;
134
134
  kind: GuideOverlayKind;
135
135
  }>;
136
- /** One slider of a panel: a path into the brush (or paper) settings. */
137
- export interface SliderControl {
138
- path: string;
139
- label: string;
140
- min: number;
141
- max: number;
142
- step: number;
143
- }
144
- export declare const BRUSH_SLIDERS: readonly SliderControl[];
136
+ export { BRUSH_SLIDERS, brushEngineControls, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.cjs';
137
+ import type { SliderControl } from './brush-controls.cjs';
145
138
  export declare const PAPER_SLIDERS: readonly SliderControl[];
146
139
  /** Reads `a.b` from an object. */
147
140
  export declare function readPath(obj: unknown, path: string): number;
@@ -174,47 +167,6 @@ export interface BlendMenuGroup {
174
167
  */
175
168
  export declare const BLEND_MENU_GROUPS: readonly BlendMenuGroup[];
176
169
  /** The engine-specific part of the brush panel: which sliders and toggles the active brush has. */
177
- export interface BrushEngineControls {
178
- /** Section heading. */
179
- title: string;
180
- sliders: readonly SliderControl[];
181
- /** Where the RGB / pigment choice is stored, or `null` when the engine has none. */
182
- mixingPath: 'behavior.mixing' | 'blender.mixing' | 'smudge.mixing' | null;
183
- /** The dirty-brush toggle (`behavior.dirty`). */
184
- dirty: boolean;
185
- /** The multi-colour controls (`behavior.multicolor`; the panels show the brush gradient, `brush.paint`, instead). */
186
- multicolor: boolean;
187
- /** Load / Clean buttons and a swatch of what the brush carries. */
188
- load: boolean;
189
- /** The wet tool menu (`wet.tool`, `WET_TOOLS`) and medium menu (`wet.medium`, `WET_MEDIA`). */
190
- wetTool?: boolean;
191
- /** The impasto tool menu (`impasto.tool`, `IMPASTO_TOOLS`). */
192
- impastoTool?: boolean;
193
- /**
194
- * The particle menus: kind and render (`particle.kind`, `particle.render`), ribbon pairs
195
- * (`particle.ribbonPairs`), and the textured-dot stamps, order and rotation
196
- * (`particle.dotTextures` up to `MAX_DOT_TEXTURES` of `STAMP_KINDS`, `dotTextureOrder`, `dotRotation`).
197
- */
198
- particleMenus?: boolean;
199
- /** The sticker picker for the brush's stickers (`sticker.stamps`, refs from the sticker library; `toggleStickerRef`). */
200
- stickerStamps?: boolean;
201
- /** Light paint: the "light follows pressure" toggle (`light.pressure`); the Light slider is in `sliders`. */
202
- light?: boolean;
203
- }
204
- /**
205
- * The controls the active brush's engine adds to the brush panel (`null` for the eraser):
206
- * blender strength and blend distance; smudge strength and length; the Mixer Brush's pick-up,
207
- * mix and load; a dab brush's pick-up and mix ratios. Every engine but the eraser has an RGB /
208
- * pigment choice; dab and mixer brushes also have the dirty and multi-colour controls. Pick-up
209
- * and mix always go through `behavior`, which keeps a Mixer Brush's `mixer` block in sync.
210
- */
211
- export declare function brushEngineControls(brush: Pick<PaintBrush, 'engine'> & {
212
- wet?: PaintBrush['wet'];
213
- }): BrushEngineControls | null;
214
- /** The multi-colour sliders for a mode: softness, and dabs per colour in `dab` mode. */
215
- export declare function multiColorSliders(mode: string): readonly SliderControl[];
216
- /** A brush change setting `path` (e.g. `smudge.mixing`, `behavior.dirty`) to any value, keeping the rest of its block. */
217
- export declare function patchBrushValue(brush: PaintBrush, path: string, value: unknown): PaintBrushInput;
218
170
  /** What the brush carries (picked-up paint, else loaded paint) as #rrggbb, or `null` when it is clean and empty. */
219
171
  export declare function brushLoadColor(load: MixerLoad): string | null;
220
172
  /** Sample sizes (square, in pad pixels) for picking from the mixing pad. */
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import type { MixerLoad } from '../paint/exchange.js';
12
12
  import { type BlendModeInfo } from '../raster/blend.js';
13
- import type { ImpastoTool, PaintBrush, PaintBrushInput, WetMediumKind, WetTool } from './brushes.js';
13
+ import type { ImpastoTool, WetMediumKind, WetTool } from './brushes.js';
14
14
  import type { PaintEditorController } from './controller.js';
15
15
  import type { PenPoint } from './engine.js';
16
16
  import { type Point2 } from './guides.js';
@@ -133,15 +133,8 @@ export declare function guideOverlay(controller: PaintEditorController, drag?: {
133
133
  to: Point2;
134
134
  kind: GuideOverlayKind;
135
135
  }>;
136
- /** One slider of a panel: a path into the brush (or paper) settings. */
137
- export interface SliderControl {
138
- path: string;
139
- label: string;
140
- min: number;
141
- max: number;
142
- step: number;
143
- }
144
- export declare const BRUSH_SLIDERS: readonly SliderControl[];
136
+ export { BRUSH_SLIDERS, brushEngineControls, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.js';
137
+ import type { SliderControl } from './brush-controls.js';
145
138
  export declare const PAPER_SLIDERS: readonly SliderControl[];
146
139
  /** Reads `a.b` from an object. */
147
140
  export declare function readPath(obj: unknown, path: string): number;
@@ -174,47 +167,6 @@ export interface BlendMenuGroup {
174
167
  */
175
168
  export declare const BLEND_MENU_GROUPS: readonly BlendMenuGroup[];
176
169
  /** The engine-specific part of the brush panel: which sliders and toggles the active brush has. */
177
- export interface BrushEngineControls {
178
- /** Section heading. */
179
- title: string;
180
- sliders: readonly SliderControl[];
181
- /** Where the RGB / pigment choice is stored, or `null` when the engine has none. */
182
- mixingPath: 'behavior.mixing' | 'blender.mixing' | 'smudge.mixing' | null;
183
- /** The dirty-brush toggle (`behavior.dirty`). */
184
- dirty: boolean;
185
- /** The multi-colour controls (`behavior.multicolor`; the panels show the brush gradient, `brush.paint`, instead). */
186
- multicolor: boolean;
187
- /** Load / Clean buttons and a swatch of what the brush carries. */
188
- load: boolean;
189
- /** The wet tool menu (`wet.tool`, `WET_TOOLS`) and medium menu (`wet.medium`, `WET_MEDIA`). */
190
- wetTool?: boolean;
191
- /** The impasto tool menu (`impasto.tool`, `IMPASTO_TOOLS`). */
192
- impastoTool?: boolean;
193
- /**
194
- * The particle menus: kind and render (`particle.kind`, `particle.render`), ribbon pairs
195
- * (`particle.ribbonPairs`), and the textured-dot stamps, order and rotation
196
- * (`particle.dotTextures` up to `MAX_DOT_TEXTURES` of `STAMP_KINDS`, `dotTextureOrder`, `dotRotation`).
197
- */
198
- particleMenus?: boolean;
199
- /** The sticker picker for the brush's stickers (`sticker.stamps`, refs from the sticker library; `toggleStickerRef`). */
200
- stickerStamps?: boolean;
201
- /** Light paint: the "light follows pressure" toggle (`light.pressure`); the Light slider is in `sliders`. */
202
- light?: boolean;
203
- }
204
- /**
205
- * The controls the active brush's engine adds to the brush panel (`null` for the eraser):
206
- * blender strength and blend distance; smudge strength and length; the Mixer Brush's pick-up,
207
- * mix and load; a dab brush's pick-up and mix ratios. Every engine but the eraser has an RGB /
208
- * pigment choice; dab and mixer brushes also have the dirty and multi-colour controls. Pick-up
209
- * and mix always go through `behavior`, which keeps a Mixer Brush's `mixer` block in sync.
210
- */
211
- export declare function brushEngineControls(brush: Pick<PaintBrush, 'engine'> & {
212
- wet?: PaintBrush['wet'];
213
- }): BrushEngineControls | null;
214
- /** The multi-colour sliders for a mode: softness, and dabs per colour in `dab` mode. */
215
- export declare function multiColorSliders(mode: string): readonly SliderControl[];
216
- /** A brush change setting `path` (e.g. `smudge.mixing`, `behavior.dirty`) to any value, keeping the rest of its block. */
217
- export declare function patchBrushValue(brush: PaintBrush, path: string, value: unknown): PaintBrushInput;
218
170
  /** What the brush carries (picked-up paint, else loaded paint) as #rrggbb, or `null` when it is clean and empty. */
219
171
  export declare function brushLoadColor(load: MixerLoad): string | null;
220
172
  /** Sample sizes (square, in pad pixels) for picking from the mixing pad. */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Agent tools for wet media (watercolour and gouache on a simulated wet layer). Wet strokes are
3
- * painted with `paint_stroke` and a wet brush (`list_brushes` category `watercolor` or
3
+ * painted with `paint_stroke` and a wet brush (`list_brush_presets` variety `watercolor` or
4
4
  * `wet-tool`); these tools read and steer the wet paint. Every result says whether paint is still
5
5
  * wet. Settings (wet parameters, flow maps, tilt) are saved with the document but are not undo
6
6
  * steps; drying and wetting the paper are.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Agent tools for wet media (watercolour and gouache on a simulated wet layer). Wet strokes are
3
- * painted with `paint_stroke` and a wet brush (`list_brushes` category `watercolor` or
3
+ * painted with `paint_stroke` and a wet brush (`list_brush_presets` variety `watercolor` or
4
4
  * `wet-tool`); these tools read and steer the wet paint. Every result says whether paint is still
5
5
  * wet. Settings (wet parameters, flow maps, tilt) are saved with the document but are not undo
6
6
  * steps; drying and wetting the paper are.
@@ -562,7 +562,7 @@ var _chunkU67EN7GGcjs = require('../chunk-U67EN7GG.cjs');
562
562
 
563
563
 
564
564
 
565
- var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
565
+ var _chunkL2JTLW6Bcjs = require('../chunk-L2JTLW6B.cjs');
566
566
  require('../chunk-WOFXZ3XU.cjs');
567
567
 
568
568
 
@@ -7335,7 +7335,7 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7335
7335
  }
7336
7336
  // --- Provider effects ---
7337
7337
  /** The effects provider slot (see `setEffectsProvider`). */
7338
- __init59() {this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)()}
7338
+ __init59() {this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)()}
7339
7339
  /** The registered effects provider, or `null`. */
7340
7340
  get effectsProvider() {
7341
7341
  return this.effects.provider;
@@ -7359,10 +7359,10 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7359
7359
  /** The effect's picture as group children, scaled into `box` (an affine fit). */
7360
7360
  async vectorEffectPicture(effect, values) {
7361
7361
  const provider = this.effects.require();
7362
- if (!provider.applyVectorEffect) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7362
+ if (!provider.applyVectorEffect) throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7363
7363
  const d = await provider.describe(effect);
7364
- if (d.kind !== "vector") throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7365
- const resolved = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, values);
7364
+ if (d.kind !== "vector") throw new (0, _chunkL2JTLW6Bcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7365
+ const resolved = _chunkL2JTLW6Bcjs.resolveEffectValues.call(void 0, d, values);
7366
7366
  const motion = await provider.applyVectorEffect(d.id, this.toSvg(), resolved);
7367
7367
  const parsed = _chunkJPEHXIB5cjs.parseVectorSvg.call(void 0, motion.svg);
7368
7368
  if (!parsed.nodes.length) throw new Error(`"${d.name}" drew no shapes the editor can read.`);
@@ -18179,7 +18179,7 @@ function createVectorEffectsToolProvider(controller, options = {}) {
18179
18179
  const effects = _optionalChain([g, 'optionalAccess', _765 => _765.providerEffect]) ? [info(g)] : [];
18180
18180
  return { target: id, effect: _nullishCoalesce(removed, () => ( effects[0])), effects };
18181
18181
  };
18182
- return _chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
18182
+ return _chunkL2JTLW6Bcjs.createEffectToolProvider.call(void 0, {
18183
18183
  id: _nullishCoalesce(options.id, () => ( "vector-effects")),
18184
18184
  namespace: options.namespace,
18185
18185
  title: "Vector effects",
@@ -562,7 +562,7 @@ import {
562
562
  EffectsSlot,
563
563
  createEffectToolProvider,
564
564
  resolveEffectValues
565
- } from "../chunk-JA57JIT5.js";
565
+ } from "../chunk-MV7CYFMJ.js";
566
566
  import "../chunk-V2ZCJRDM.js";
567
567
  import {
568
568
  GRAIN_PATTERNS