@pixerate/editor 0.254.1 → 0.256.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 (81) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.js +1 -1
  3. package/dist/animation-editor/index.cjs +59 -59
  4. package/dist/animation-editor/index.js +3 -3
  5. package/dist/brushes/index.cjs +31 -29
  6. package/dist/brushes/index.d.cts +1 -1
  7. package/dist/brushes/index.d.ts +1 -1
  8. package/dist/brushes/index.js +27 -25
  9. package/dist/brushes/library.d.cts +17 -0
  10. package/dist/brushes/library.d.ts +17 -0
  11. package/dist/{brushstrokeRender-5PYSKZIJ.js → brushstrokeRender-HCOQUSWW.js} +53 -18
  12. package/dist/{brushstrokeRender-7FLLSQEC.cjs → brushstrokeRender-ZZOXI5O5.cjs} +55 -20
  13. package/dist/canvas/brushTypes.d.cts +22 -3
  14. package/dist/canvas/brushTypes.d.ts +22 -3
  15. package/dist/canvas/brushstroke.d.cts +34 -12
  16. package/dist/canvas/brushstroke.d.ts +34 -12
  17. package/dist/canvas/brushstrokeRender.d.cts +14 -8
  18. package/dist/canvas/brushstrokeRender.d.ts +14 -8
  19. package/dist/canvas/drawController.d.cts +11 -3
  20. package/dist/canvas/drawController.d.ts +11 -3
  21. package/dist/canvas/freehand.d.cts +6 -1
  22. package/dist/canvas/freehand.d.ts +6 -1
  23. package/dist/canvas/index.cjs +114 -102
  24. package/dist/canvas/index.js +16 -4
  25. package/dist/{chunk-XVIK73LS.js → chunk-5P4JEOIV.js} +4 -4
  26. package/dist/{chunk-JPEHXIB5.cjs → chunk-5YWWQ36H.cjs} +66 -21
  27. package/dist/{chunk-CHAWTXBE.cjs → chunk-6WCQ35GI.cjs} +4 -4
  28. package/dist/{chunk-GYMMNCFT.js → chunk-AF23QK5F.js} +56 -11
  29. package/dist/{chunk-JFHBXNR2.cjs → chunk-B7V34GIH.cjs} +86 -86
  30. package/dist/{chunk-QC3OXRE4.js → chunk-DMTEQ6SH.js} +1 -1
  31. package/dist/{chunk-TLOGFIIV.cjs → chunk-GCTUOTCW.cjs} +35 -35
  32. package/dist/{chunk-34KLWUH4.cjs → chunk-HIMGBZAM.cjs} +1133 -597
  33. package/dist/{chunk-7P6VF3FG.js → chunk-HYWRU5VX.js} +1 -1
  34. package/dist/{chunk-QPHNVZHO.js → chunk-JVRLGV3C.js} +1118 -582
  35. package/dist/{chunk-LFMKWGFL.cjs → chunk-LRNUZKWV.cjs} +22 -8
  36. package/dist/chunk-PGPFWC35.cjs +517 -0
  37. package/dist/{chunk-QLSGTCYT.cjs → chunk-TBAVCLEQ.cjs} +23 -23
  38. package/dist/{chunk-2ZJ4DT3M.js → chunk-VUKUTT2W.js} +1 -1
  39. package/dist/{chunk-5JNA6LLY.js → chunk-WYGSR3IJ.js} +22 -8
  40. package/dist/chunk-YHUMGBZD.js +517 -0
  41. package/dist/commands/builtins.d.cts +1 -1
  42. package/dist/commands/builtins.d.ts +1 -1
  43. package/dist/commands/index.cjs +2 -2
  44. package/dist/commands/index.js +1 -1
  45. package/dist/image-editor/brush-presets.d.cts +32 -0
  46. package/dist/image-editor/brush-presets.d.ts +32 -0
  47. package/dist/image-editor/controller.d.cts +15 -0
  48. package/dist/image-editor/controller.d.ts +15 -0
  49. package/dist/image-editor/index.cjs +848 -775
  50. package/dist/image-editor/index.d.cts +1 -0
  51. package/dist/image-editor/index.d.ts +1 -0
  52. package/dist/image-editor/index.js +81 -8
  53. package/dist/image-editor/types.d.cts +7 -0
  54. package/dist/image-editor/types.d.ts +7 -0
  55. package/dist/paint-editor/collaboration-tools.d.cts +19 -0
  56. package/dist/paint-editor/collaboration-tools.d.ts +19 -0
  57. package/dist/paint-editor/collaboration.d.cts +180 -0
  58. package/dist/paint-editor/collaboration.d.ts +180 -0
  59. package/dist/paint-editor/controller.d.cts +54 -0
  60. package/dist/paint-editor/controller.d.ts +54 -0
  61. package/dist/paint-editor/index.cjs +816 -283
  62. package/dist/paint-editor/index.d.cts +2 -0
  63. package/dist/paint-editor/index.d.ts +2 -0
  64. package/dist/paint-editor/index.js +567 -34
  65. package/dist/vector/brushstroke.d.cts +21 -5
  66. package/dist/vector/brushstroke.d.ts +21 -5
  67. package/dist/vector/controller.d.cts +14 -1
  68. package/dist/vector/controller.d.ts +14 -1
  69. package/dist/vector/index.cjs +1220 -1199
  70. package/dist/vector/index.js +34 -13
  71. package/dist/vector/types.d.cts +7 -0
  72. package/dist/vector/types.d.ts +7 -0
  73. package/package.json +1 -1
  74. package/skills/pixerate-brushes/SKILL.md +9 -3
  75. package/skills/pixerate-canvas/SKILL.md +10 -5
  76. package/skills/pixerate-image-editor/SKILL.md +2 -1
  77. package/skills/pixerate-paint-editor/SKILL.md +31 -46
  78. package/skills/pixerate-paint-editor/references/painting-alongside.md +19 -0
  79. package/skills/pixerate-vector/SKILL.md +1 -1
  80. package/dist/chunk-HS6QDWDF.cjs +0 -1029
  81. package/dist/chunk-MTKY6K3Q.js +0 -1029
@@ -45,6 +45,8 @@ import { type BuiltinProfileId, type ColorSpace, type Intent } from '../cms/inde
45
45
  import { type ProofSetup } from './color-management.cjs';
46
46
  import type { EffectPattern } from '../raster/effects/patterns.cjs';
47
47
  import { type GlobalLight, type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.cjs';
48
+ import { type BrushLibrary, type BrushLibraryEntry } from '../brushes/library.cjs';
49
+ import { type ImageBrushPreset } from './brush-presets.cjs';
48
50
  /** What `getSmartObject` reports. */
49
51
  export interface SmartObjectInfo {
50
52
  layerId: string;
@@ -268,6 +270,8 @@ export interface PaintOptions {
268
270
  cloneSource: CloneSource | null;
269
271
  /** Clone Source panel: how cloned pixels are scaled, flipped and rotated (identity by default). */
270
272
  cloneTransform: CloneTransform;
273
+ /** The brush preset the brush settings came from (`setBrushPreset`), until they are changed by hand; `null` for none. */
274
+ brushPreset?: string | null;
271
275
  }
272
276
  /** Where the Clone Stamp and Healing Brush sample from. */
273
277
  export interface CloneSource {
@@ -1569,6 +1573,17 @@ export declare class ImageEditorController {
1569
1573
  maxSide?: number;
1570
1574
  mask?: boolean;
1571
1575
  }): string | null;
1576
+ /** The brush library the brush presets come from (shared with other editors when the host passes one). */
1577
+ readonly brushLibrary: BrushLibrary;
1578
+ /** The brushes this editor can paint with (`IMAGE_PROFILE`): built-in presets, then saved brushes. */
1579
+ listBrushPresets(): Promise<BrushLibraryEntry[]>;
1580
+ /**
1581
+ * Paints with a brush from the brush library: sets the paint tool it needs (brush, Mixer Brush
1582
+ * or eraser), its brush and mixer settings and, for a brush with its own gradient, the paint.
1583
+ * View state, no undo. Throws for an unknown id (with the closest ones) or a brush the image
1584
+ * editor can't paint (wet, thick, particles, stickers, light), saying why.
1585
+ */
1586
+ setBrushPreset(id: string): Promise<ImageBrushPreset>;
1572
1587
  /** Brush settings, colours and tool options of the paint tools (view state, no undo). */
1573
1588
  setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad' | 'retouch' | 'cloneSource' | 'cloneTransform'>> & {
1574
1589
  brush?: Partial<BrushSettings>;
@@ -45,6 +45,8 @@ import { type BuiltinProfileId, type ColorSpace, type Intent } from '../cms/inde
45
45
  import { type ProofSetup } from './color-management.js';
46
46
  import type { EffectPattern } from '../raster/effects/patterns.js';
47
47
  import { type GlobalLight, type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.js';
48
+ import { type BrushLibrary, type BrushLibraryEntry } from '../brushes/library.js';
49
+ import { type ImageBrushPreset } from './brush-presets.js';
48
50
  /** What `getSmartObject` reports. */
49
51
  export interface SmartObjectInfo {
50
52
  layerId: string;
@@ -268,6 +270,8 @@ export interface PaintOptions {
268
270
  cloneSource: CloneSource | null;
269
271
  /** Clone Source panel: how cloned pixels are scaled, flipped and rotated (identity by default). */
270
272
  cloneTransform: CloneTransform;
273
+ /** The brush preset the brush settings came from (`setBrushPreset`), until they are changed by hand; `null` for none. */
274
+ brushPreset?: string | null;
271
275
  }
272
276
  /** Where the Clone Stamp and Healing Brush sample from. */
273
277
  export interface CloneSource {
@@ -1569,6 +1573,17 @@ export declare class ImageEditorController {
1569
1573
  maxSide?: number;
1570
1574
  mask?: boolean;
1571
1575
  }): string | null;
1576
+ /** The brush library the brush presets come from (shared with other editors when the host passes one). */
1577
+ readonly brushLibrary: BrushLibrary;
1578
+ /** The brushes this editor can paint with (`IMAGE_PROFILE`): built-in presets, then saved brushes. */
1579
+ listBrushPresets(): Promise<BrushLibraryEntry[]>;
1580
+ /**
1581
+ * Paints with a brush from the brush library: sets the paint tool it needs (brush, Mixer Brush
1582
+ * or eraser), its brush and mixer settings and, for a brush with its own gradient, the paint.
1583
+ * View state, no undo. Throws for an unknown id (with the closest ones) or a brush the image
1584
+ * editor can't paint (wet, thick, particles, stickers, light), saying why.
1585
+ */
1586
+ setBrushPreset(id: string): Promise<ImageBrushPreset>;
1572
1587
  /** Brush settings, colours and tool options of the paint tools (view state, no undo). */
1573
1588
  setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad' | 'retouch' | 'cloneSource' | 'cloneTransform'>> & {
1574
1589
  brush?: Partial<BrushSettings>;