@pixerate/editor 0.225.0 → 0.227.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/dist/animation-editor/index.cjs +66 -66
  2. package/dist/animation-editor/index.js +4 -4
  3. package/dist/{brushstrokeRender-C3UU6GVC.js → brushstrokeRender-MAHOXL7K.js} +2 -2
  4. package/dist/{brushstrokeRender-EAJNE6WP.cjs → brushstrokeRender-WDTKD54B.cjs} +5 -5
  5. package/dist/canvas/index.cjs +15 -15
  6. package/dist/canvas/index.js +2 -2
  7. package/dist/{chunk-WA4IS2EY.js → chunk-4MDWEX44.js} +1 -1
  8. package/dist/{chunk-7AAS3JO6.cjs → chunk-4PA6YS6W.cjs} +14 -14
  9. package/dist/{chunk-RDTCG5MS.js → chunk-56RFHF7O.js} +1 -1
  10. package/dist/{chunk-HKPLKISO.js → chunk-7DZ55AIE.js} +10 -5
  11. package/dist/{chunk-NTWR5TQB.cjs → chunk-ABQ2VGUB.cjs} +10 -5
  12. package/dist/{chunk-LCCMOWR7.cjs → chunk-ATKKG76G.cjs} +23 -23
  13. package/dist/{chunk-QAUIZPYI.cjs → chunk-BQE3Y6ZO.cjs} +2 -2
  14. package/dist/{chunk-MDNYYOBZ.cjs → chunk-C6CMQXMI.cjs} +7 -7
  15. package/dist/{chunk-G4E6RUPC.js → chunk-CDP2AKMA.js} +1 -1
  16. package/dist/{chunk-NDMXB4PR.js → chunk-CU6ANS5L.js} +1 -1
  17. package/dist/{chunk-ROVK6AXX.cjs → chunk-GNZI3KYK.cjs} +95 -23
  18. package/dist/{chunk-I7G3RSUJ.cjs → chunk-GXLZZVR5.cjs} +35 -35
  19. package/dist/{chunk-S6KKLFZO.js → chunk-KN3Y3FRY.js} +19 -4
  20. package/dist/{chunk-R35YOUP2.cjs → chunk-MXJP77K4.cjs} +104 -89
  21. package/dist/{chunk-F7YA3MMC.js → chunk-TQOL6CF7.js} +76 -4
  22. package/dist/{chunk-ZMHPQ6HP.cjs → chunk-V3L7U63N.cjs} +1 -1
  23. package/dist/{chunk-DJBYJOHM.js → chunk-XSVUNSDJ.js} +1 -1
  24. package/dist/{chunk-BGOCAUXH.js → chunk-YMREOA67.js} +1 -1
  25. package/dist/effects/index.cjs +44 -44
  26. package/dist/effects/index.js +2 -2
  27. package/dist/effects/tools.d.cts +6 -0
  28. package/dist/effects/tools.d.ts +6 -0
  29. package/dist/image-editor/controller.d.cts +12 -4
  30. package/dist/image-editor/controller.d.ts +12 -4
  31. package/dist/image-editor/index.cjs +944 -922
  32. package/dist/image-editor/index.js +49 -27
  33. package/dist/image-editor/layers/model.d.cts +6 -0
  34. package/dist/image-editor/layers/model.d.ts +6 -0
  35. package/dist/paint-editor/controller.d.cts +54 -3
  36. package/dist/paint-editor/controller.d.ts +54 -3
  37. package/dist/paint-editor/dab-stroke.d.cts +3 -0
  38. package/dist/paint-editor/dab-stroke.d.ts +3 -0
  39. package/dist/paint-editor/effect-paint.d.cts +47 -0
  40. package/dist/paint-editor/effect-paint.d.ts +47 -0
  41. package/dist/paint-editor/effect-tools.d.cts +4 -2
  42. package/dist/paint-editor/effect-tools.d.ts +4 -2
  43. package/dist/paint-editor/effects.d.cts +3 -0
  44. package/dist/paint-editor/effects.d.ts +3 -0
  45. package/dist/paint-editor/engine.d.cts +4 -0
  46. package/dist/paint-editor/engine.d.ts +4 -0
  47. package/dist/paint-editor/index.cjs +542 -315
  48. package/dist/paint-editor/index.d.cts +1 -0
  49. package/dist/paint-editor/index.d.ts +1 -0
  50. package/dist/paint-editor/index.js +252 -25
  51. package/dist/paint-editor/procedural.d.cts +4 -0
  52. package/dist/paint-editor/procedural.d.ts +4 -0
  53. package/dist/paint-editor/stroke.d.cts +9 -0
  54. package/dist/paint-editor/stroke.d.ts +9 -0
  55. package/dist/paint-editor/strokes.d.cts +6 -2
  56. package/dist/paint-editor/strokes.d.ts +6 -2
  57. package/dist/vector/index.cjs +968 -968
  58. package/dist/vector/index.js +5 -5
  59. package/dist/video-editor/index.cjs +309 -309
  60. package/dist/video-editor/index.js +3 -3
  61. package/package.json +1 -1
  62. package/skills/pixerate-canvas/SKILL.md +2 -1
  63. package/skills/pixerate-paint-editor/SKILL.md +42 -6
  64. package/skills/pixerate-paint-sketch-to-finish/SKILL.md +7 -0
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Agent tools for provider effects in the paint editor: the shared effect tools, where
3
3
  * `apply_effect` runs a filter (light, glow, grade) on a layer's dried paint and bakes it in, and
4
- * the target `paper` is the effect paper; plus `set_paper_effect`, `add_effect_layer` and
5
- * `fill_layer_with_effect`.
4
+ * the target `paper` is the effect paper and the target `paint` the effect paint; plus
5
+ * `set_paper_effect`, `add_effect_layer`, `fill_layer_with_effect` and `set_effect_paint`.
6
6
  */
7
7
  import type { AgentToolProvider } from '../tools/registry.js';
8
8
  import type { PaintEditorController } from './controller.js';
@@ -21,5 +21,7 @@ export interface PaintEffectsToolProviderOptions {
21
21
  }
22
22
  /** The target id of the effect paper. */
23
23
  export declare const PAPER_TARGET = "paper";
24
+ /** The target id of the effect paint (what brushes paint with). */
25
+ export declare const PAINT_TARGET = "paint";
24
26
  /** The effect tools for a paint editor (see the module comment). */
25
27
  export declare function createPaintEffectsToolProvider(controller: PaintEditorController, options?: PaintEffectsToolProviderOptions): AgentToolProvider;
@@ -8,6 +8,7 @@
8
8
  * - **Effect fills**: a generator, overlay or title effect composited onto a layer's pixels.
9
9
  * - **Light on dried paint**: a filter effect (light, glow, grade) run on a layer's paint and baked
10
10
  * in. Wet paint is dried first, in the same undo step; thick paint keeps its relief.
11
+ * - **Effect paint**: a generator, overlay or title effect brushes paint with (see `effect-paint.ts`).
11
12
  *
12
13
  * Effects render asynchronously, so each change renders first and commits after (one undo step).
13
14
  */
@@ -22,6 +23,8 @@ export declare const PAINT_EFFECT_PLACES: {
22
23
  readonly fill: readonly ["generator", "overlay", "title"];
23
24
  /** Light (or any filter) on a layer's dried paint. */
24
25
  readonly light: readonly ["filter"];
26
+ /** Effect paint: brushes take each pixel's colour from it. */
27
+ readonly paint: readonly ["generator", "overlay", "title"];
25
28
  };
26
29
  export type PaintEffectPlace = keyof typeof PAINT_EFFECT_PLACES;
27
30
  /** Refuses an effect that cannot go in `place`, saying what to use instead. */
@@ -8,6 +8,7 @@
8
8
  * - **Effect fills**: a generator, overlay or title effect composited onto a layer's pixels.
9
9
  * - **Light on dried paint**: a filter effect (light, glow, grade) run on a layer's paint and baked
10
10
  * in. Wet paint is dried first, in the same undo step; thick paint keeps its relief.
11
+ * - **Effect paint**: a generator, overlay or title effect brushes paint with (see `effect-paint.ts`).
11
12
  *
12
13
  * Effects render asynchronously, so each change renders first and commits after (one undo step).
13
14
  */
@@ -22,6 +23,8 @@ export declare const PAINT_EFFECT_PLACES: {
22
23
  readonly fill: readonly ["generator", "overlay", "title"];
23
24
  /** Light (or any filter) on a layer's dried paint. */
24
25
  readonly light: readonly ["filter"];
26
+ /** Effect paint: brushes take each pixel's colour from it. */
27
+ readonly paint: readonly ["generator", "overlay", "title"];
25
28
  };
26
29
  export type PaintEffectPlace = keyof typeof PAINT_EFFECT_PLACES;
27
30
  /** Refuses an effect that cannot go in `place`, saying what to use instead. */
@@ -17,6 +17,7 @@
17
17
  import { CoverageMap, type BrushSettings, type Dab, type StrokePoint } from '../paint/brush.cjs';
18
18
  import type { RasterRect } from '../raster/surface.cjs';
19
19
  import type { PaintBrush } from './brushes.cjs';
20
+ import { type EffectPaintPixels } from './effect-paint.cjs';
20
21
  import { type PaperGrain } from './paper.cjs';
21
22
  /** One pen sample in document pixels. Every channel but x and y is optional. */
22
23
  export interface PenPoint {
@@ -123,6 +124,8 @@ export interface DryStrokeOptions {
123
124
  seed?: number;
124
125
  /** Copies of the stroke (symmetry); default one identity copy. */
125
126
  copies?: readonly StrokeCopy[];
127
+ /** Effect paint: each pixel takes its colour (and alpha) from these canvas-sized pixels. */
128
+ effect?: EffectPaintPixels | null;
126
129
  }
127
130
  /**
128
131
  * One dab-engine stroke (dab and eraser brushes): smoothing, the dab walk of every copy, grain and
@@ -138,6 +141,7 @@ export declare class DryStroke {
138
141
  private readonly copies;
139
142
  private readonly depth;
140
143
  private buf;
144
+ private field;
141
145
  private lastRaw;
142
146
  private lastFed;
143
147
  constructor(brush: PaintBrush, options: DryStrokeOptions);
@@ -17,6 +17,7 @@
17
17
  import { CoverageMap, type BrushSettings, type Dab, type StrokePoint } from '../paint/brush.js';
18
18
  import type { RasterRect } from '../raster/surface.js';
19
19
  import type { PaintBrush } from './brushes.js';
20
+ import { type EffectPaintPixels } from './effect-paint.js';
20
21
  import { type PaperGrain } from './paper.js';
21
22
  /** One pen sample in document pixels. Every channel but x and y is optional. */
22
23
  export interface PenPoint {
@@ -123,6 +124,8 @@ export interface DryStrokeOptions {
123
124
  seed?: number;
124
125
  /** Copies of the stroke (symmetry); default one identity copy. */
125
126
  copies?: readonly StrokeCopy[];
127
+ /** Effect paint: each pixel takes its colour (and alpha) from these canvas-sized pixels. */
128
+ effect?: EffectPaintPixels | null;
126
129
  }
127
130
  /**
128
131
  * One dab-engine stroke (dab and eraser brushes): smoothing, the dab walk of every copy, grain and
@@ -138,6 +141,7 @@ export declare class DryStroke {
138
141
  private readonly copies;
139
142
  private readonly depth;
140
143
  private buf;
144
+ private field;
141
145
  private lastRaw;
142
146
  private lastFed;
143
147
  constructor(brush: PaintBrush, options: DryStrokeOptions);