@pixerate/editor 0.270.0 → 0.272.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 (77) hide show
  1. package/dist/animation-editor/index.cjs +62 -62
  2. package/dist/animation-editor/index.js +5 -5
  3. package/dist/brushes/index.cjs +69 -66
  4. package/dist/brushes/index.js +6 -3
  5. package/dist/brushes/patch.d.cts +1 -1
  6. package/dist/brushes/patch.d.ts +1 -1
  7. package/dist/brushes/schema.d.cts +1 -0
  8. package/dist/brushes/schema.d.ts +1 -0
  9. package/dist/brushes/types.d.cts +8 -0
  10. package/dist/brushes/types.d.ts +8 -0
  11. package/dist/{brushstrokeRender-WR2N5HHY.cjs → brushstrokeRender-5YBCLFDQ.cjs} +15 -15
  12. package/dist/{brushstrokeRender-A727TTNQ.js → brushstrokeRender-DZGFU3J4.js} +3 -3
  13. package/dist/canvas/index.cjs +15 -15
  14. package/dist/canvas/index.js +2 -2
  15. package/dist/{chunk-THBJHPUL.js → chunk-2F3YDXCN.js} +1 -1
  16. package/dist/{chunk-4CPOKP27.js → chunk-2XDNF73E.js} +1 -1
  17. package/dist/{chunk-3KNQ2W6X.cjs → chunk-3JKCREEU.cjs} +59 -53
  18. package/dist/{chunk-4YSPQGZW.js → chunk-5HP2VSAS.js} +1 -1
  19. package/dist/{chunk-BPJSI4NT.cjs → chunk-7W2EQQBP.cjs} +2 -2
  20. package/dist/{chunk-LETF75CA.js → chunk-CLB2I2FU.js} +1 -1
  21. package/dist/{chunk-BAZMCFVL.js → chunk-DZVRH63Y.js} +1 -1
  22. package/dist/{chunk-PY4GWSE2.cjs → chunk-EBFPMSJO.cjs} +27 -5
  23. package/dist/{chunk-VBRHE4AM.cjs → chunk-FXVCB6YG.cjs} +35 -35
  24. package/dist/{chunk-EU2ZZA6L.cjs → chunk-GHGBIAWQ.cjs} +126 -39
  25. package/dist/{chunk-CBVNCWJM.cjs → chunk-LBDC5434.cjs} +2 -2
  26. package/dist/{chunk-2WOGXEDX.cjs → chunk-M3RZOF3G.cjs} +1 -1
  27. package/dist/{chunk-GSTSZPSR.js → chunk-N3SKPQEH.js} +225 -18
  28. package/dist/{chunk-J5VQYK7T.cjs → chunk-N5IMDAHM.cjs} +251 -44
  29. package/dist/{chunk-ININNHLM.js → chunk-NAHJV3O6.js} +11 -5
  30. package/dist/{chunk-MWUZCEFT.js → chunk-S2XPXA47.js} +1 -1
  31. package/dist/{chunk-56RHCIJV.cjs → chunk-SNAFFCAX.cjs} +296 -203
  32. package/dist/{chunk-EHLOCVWB.js → chunk-T2URHAJX.js} +27 -5
  33. package/dist/{chunk-BENSE3VX.cjs → chunk-TNLKFW7D.cjs} +23 -23
  34. package/dist/{chunk-KZI3YWKW.js → chunk-UXYCY3HP.js} +93 -6
  35. package/dist/{chunk-4NMPUJUK.cjs → chunk-YJANF2BL.cjs} +86 -86
  36. package/dist/{chunk-FUDP5QBB.js → chunk-ZEI7ZEA4.js} +101 -8
  37. package/dist/effects/index.cjs +5 -2
  38. package/dist/effects/index.js +4 -1
  39. package/dist/effects/pool.d.cts +9 -0
  40. package/dist/effects/pool.d.ts +9 -0
  41. package/dist/effects/types.d.cts +2 -0
  42. package/dist/effects/types.d.ts +2 -0
  43. package/dist/image-editor/index.cjs +791 -791
  44. package/dist/image-editor/index.js +6 -6
  45. package/dist/paint/index.cjs +2 -2
  46. package/dist/paint/index.js +1 -1
  47. package/dist/paint/wet/world.d.cts +37 -1
  48. package/dist/paint/wet/world.d.ts +37 -1
  49. package/dist/paint-editor/brush-controls.d.cts +2 -0
  50. package/dist/paint-editor/brush-controls.d.ts +2 -0
  51. package/dist/paint-editor/brush-model.d.cts +14 -1
  52. package/dist/paint-editor/brush-model.d.ts +14 -1
  53. package/dist/paint-editor/controller.d.cts +75 -4
  54. package/dist/paint-editor/controller.d.ts +75 -4
  55. package/dist/paint-editor/effect-paint.d.cts +33 -8
  56. package/dist/paint-editor/effect-paint.d.ts +33 -8
  57. package/dist/paint-editor/effects.d.cts +4 -0
  58. package/dist/paint-editor/effects.d.ts +4 -0
  59. package/dist/paint-editor/index.cjs +814 -483
  60. package/dist/paint-editor/index.js +408 -77
  61. package/dist/paint-editor/stroke.d.cts +13 -5
  62. package/dist/paint-editor/stroke.d.ts +13 -5
  63. package/dist/paint-editor/ui.d.cts +1 -1
  64. package/dist/paint-editor/ui.d.ts +1 -1
  65. package/dist/paint-editor/wet.d.cts +8 -1
  66. package/dist/paint-editor/wet.d.ts +8 -1
  67. package/dist/vector/index.cjs +999 -999
  68. package/dist/vector/index.js +5 -5
  69. package/dist/video-editor/index.cjs +317 -317
  70. package/dist/video-editor/index.js +2 -2
  71. package/package.json +1 -1
  72. package/skills/pixerate-brushes/SKILL.md +1 -0
  73. package/skills/pixerate-paint-editor/SKILL.md +6 -13
  74. package/skills/pixerate-paint-editor/references/brush-facets.md +1 -0
  75. package/skills/pixerate-paint-editor/references/effect-paint.md +28 -6
  76. package/skills/pixerate-paint-editor/references/ghost.md +47 -0
  77. package/skills/pixerate-paint-watercolour/SKILL.md +1 -0
@@ -122,14 +122,14 @@ export declare class PaintStrokeSession {
122
122
  /** The raw input so far (what a replay feeds back in). */
123
123
  readonly points: PenPoint[];
124
124
  private readonly base;
125
- private readonly live;
125
+ private live;
126
126
  private readonly touched;
127
127
  private readonly fresh;
128
- private readonly dry;
129
- private readonly wet;
128
+ private dry;
129
+ private wet;
130
130
  private readonly wetDriver;
131
- private readonly thickDriver;
132
- private readonly stickerSpray;
131
+ private thickDriver;
132
+ private stickerSpray;
133
133
  /** Light paint: the stroke's twin over the light channel, and what it left there. */
134
134
  private readonly lightTwin;
135
135
  private lightResult;
@@ -144,6 +144,14 @@ export declare class PaintStrokeSession {
144
144
  /** The mask stencils this stroke was painted with when they are not the editor's (replays). */
145
145
  maskStencils: readonly import('./stencils.cjs').Stencil[] | null;
146
146
  constructor(host: StrokeSessionHost, init: StrokeSessionInit);
147
+ /** Sets up the marks' engine (every kind but wet, which the wet layer paints), sampling `effect` for effect paint. */
148
+ private build;
149
+ /**
150
+ * Paints the stroke so far again, sampling new effect pixels: a path-mapped effect rendered
151
+ * along the path drawn so far (`map: { by: 'path' }`). Only the live preview changes; the stroke
152
+ * keeps recording its own paint. Nothing for wet strokes or once the stroke has ended.
153
+ */
154
+ repaintEffect(pixels: EffectPaintPixels): void;
147
155
  /** The stroke's twin over the light channel: the same marks in grey at the brush's light amount (see `light.ts`). */
148
156
  private makeLightTwin;
149
157
  /** Light paint: the layer's light channel after the stroke, or `null` when the stroke has no twin or left it unchanged. */
@@ -122,14 +122,14 @@ export declare class PaintStrokeSession {
122
122
  /** The raw input so far (what a replay feeds back in). */
123
123
  readonly points: PenPoint[];
124
124
  private readonly base;
125
- private readonly live;
125
+ private live;
126
126
  private readonly touched;
127
127
  private readonly fresh;
128
- private readonly dry;
129
- private readonly wet;
128
+ private dry;
129
+ private wet;
130
130
  private readonly wetDriver;
131
- private readonly thickDriver;
132
- private readonly stickerSpray;
131
+ private thickDriver;
132
+ private stickerSpray;
133
133
  /** Light paint: the stroke's twin over the light channel, and what it left there. */
134
134
  private readonly lightTwin;
135
135
  private lightResult;
@@ -144,6 +144,14 @@ export declare class PaintStrokeSession {
144
144
  /** The mask stencils this stroke was painted with when they are not the editor's (replays). */
145
145
  maskStencils: readonly import('./stencils.js').Stencil[] | null;
146
146
  constructor(host: StrokeSessionHost, init: StrokeSessionInit);
147
+ /** Sets up the marks' engine (every kind but wet, which the wet layer paints), sampling `effect` for effect paint. */
148
+ private build;
149
+ /**
150
+ * Paints the stroke so far again, sampling new effect pixels: a path-mapped effect rendered
151
+ * along the path drawn so far (`map: { by: 'path' }`). Only the live preview changes; the stroke
152
+ * keeps recording its own paint. Nothing for wet strokes or once the stroke has ended.
153
+ */
154
+ repaintEffect(pixels: EffectPaintPixels): void;
147
155
  /** The stroke's twin over the light channel: the same marks in grey at the brush's light amount (see `light.ts`). */
148
156
  private makeLightTwin;
149
157
  /** Light paint: the layer's light channel after the stroke, or `null` when the stroke has no twin or left it unchanged. */
@@ -153,7 +153,7 @@ export declare function guideOverlay(controller: PaintEditorController, drag?: {
153
153
  to: Point2;
154
154
  kind: GuideOverlayKind;
155
155
  }>;
156
- export { BRUSH_SLIDERS, brushEngineControls, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.cjs';
156
+ export { BRUSH_SLIDERS, brushEngineControls, GHOST_SLIDERS, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.cjs';
157
157
  import type { SliderControl } from './brush-controls.cjs';
158
158
  export declare const PAPER_SLIDERS: readonly SliderControl[];
159
159
  /** Reads `a.b` from an object. */
@@ -153,7 +153,7 @@ export declare function guideOverlay(controller: PaintEditorController, drag?: {
153
153
  to: Point2;
154
154
  kind: GuideOverlayKind;
155
155
  }>;
156
- export { BRUSH_SLIDERS, brushEngineControls, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.js';
156
+ export { BRUSH_SLIDERS, brushEngineControls, GHOST_SLIDERS, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.js';
157
157
  import type { SliderControl } from './brush-controls.js';
158
158
  export declare const PAPER_SLIDERS: readonly SliderControl[];
159
159
  /** Reads `a.b` from an object. */
@@ -27,7 +27,7 @@ import { type PaintGradientSource } from '../paint/gradient-paint.cjs';
27
27
  import { type EffectPaintPixels } from './effect-paint.cjs';
28
28
  import { type WetParams, type WetTilt } from '../paint/wet/model.cjs';
29
29
  import { type WetGpuProvider } from '../paint/wet/gpu.cjs';
30
- import { WetWorld, type WetBackendInfo, type WetPaperInput, type WetSnapshot, type WetWorldOptions } from '../paint/wet/world.cjs';
30
+ import { WetWorld, type WetBackendInfo, type WetGhostState, type WetPaperInput, type WetSnapshot, type WetWorldOptions } from '../paint/wet/world.cjs';
31
31
  import { TiledSurface, type RasterRect } from '../raster/surface.cjs';
32
32
  import type { PaintBrush, WetMediumKind } from './brushes.cjs';
33
33
  import { type PenPoint, type StrokeCopy } from './engine.cjs';
@@ -60,6 +60,8 @@ export interface WetStrokeInit {
60
60
  * the water like any pigment.
61
61
  */
62
62
  effect?: EffectPaintPixels | null;
63
+ /** Simulation steps per second (for ghost fade countdown). */
64
+ speed?: number;
63
65
  }
64
66
  /**
65
67
  * One wet-brush stroke: pen samples → dabs → wet tool edits. Points are applied only while the
@@ -110,6 +112,7 @@ export declare const WET_MEDIUM_PARAMS: Readonly<Record<WetMediumKind, Partial<W
110
112
  export interface WetLayerSettings {
111
113
  params: WetParams;
112
114
  flow: WetFlowSpec;
115
+ ghost?: WetGhostState | null;
113
116
  }
114
117
  /** One wet layer as tools describe it. */
115
118
  export interface WetLayerInfo {
@@ -124,6 +127,10 @@ export interface WetLayerInfo {
124
127
  activeTiles: number;
125
128
  params: WetParams;
126
129
  flow: WetFlowSpec;
130
+ /** Active ghost fade on the layer (`remaining` seconds of simulated time), when one is fading. */
131
+ ghost?: {
132
+ remaining: number;
133
+ };
127
134
  }
128
135
  /** An event recorded with the clock it happened at (strokes are recorded separately), for replays. */
129
136
  export interface WetEvent {
@@ -27,7 +27,7 @@ import { type PaintGradientSource } from '../paint/gradient-paint.js';
27
27
  import { type EffectPaintPixels } from './effect-paint.js';
28
28
  import { type WetParams, type WetTilt } from '../paint/wet/model.js';
29
29
  import { type WetGpuProvider } from '../paint/wet/gpu.js';
30
- import { WetWorld, type WetBackendInfo, type WetPaperInput, type WetSnapshot, type WetWorldOptions } from '../paint/wet/world.js';
30
+ import { WetWorld, type WetBackendInfo, type WetGhostState, type WetPaperInput, type WetSnapshot, type WetWorldOptions } from '../paint/wet/world.js';
31
31
  import { TiledSurface, type RasterRect } from '../raster/surface.js';
32
32
  import type { PaintBrush, WetMediumKind } from './brushes.js';
33
33
  import { type PenPoint, type StrokeCopy } from './engine.js';
@@ -60,6 +60,8 @@ export interface WetStrokeInit {
60
60
  * the water like any pigment.
61
61
  */
62
62
  effect?: EffectPaintPixels | null;
63
+ /** Simulation steps per second (for ghost fade countdown). */
64
+ speed?: number;
63
65
  }
64
66
  /**
65
67
  * One wet-brush stroke: pen samples → dabs → wet tool edits. Points are applied only while the
@@ -110,6 +112,7 @@ export declare const WET_MEDIUM_PARAMS: Readonly<Record<WetMediumKind, Partial<W
110
112
  export interface WetLayerSettings {
111
113
  params: WetParams;
112
114
  flow: WetFlowSpec;
115
+ ghost?: WetGhostState | null;
113
116
  }
114
117
  /** One wet layer as tools describe it. */
115
118
  export interface WetLayerInfo {
@@ -124,6 +127,10 @@ export interface WetLayerInfo {
124
127
  activeTiles: number;
125
128
  params: WetParams;
126
129
  flow: WetFlowSpec;
130
+ /** Active ghost fade on the layer (`remaining` seconds of simulated time), when one is fading. */
131
+ ghost?: {
132
+ remaining: number;
133
+ };
127
134
  }
128
135
  /** An event recorded with the clock it happened at (strokes are recorded separately), for replays. */
129
136
  export interface WetEvent {