@pixerate/editor 0.266.2 → 0.267.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 (111) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.js +1 -1
  3. package/dist/animation-editor/controller.d.cts +8 -0
  4. package/dist/animation-editor/controller.d.ts +8 -0
  5. package/dist/animation-editor/effect-tools.d.cts +1 -1
  6. package/dist/animation-editor/effect-tools.d.ts +1 -1
  7. package/dist/animation-editor/index.cjs +172 -105
  8. package/dist/animation-editor/index.js +91 -24
  9. package/dist/brushes/index.cjs +59 -59
  10. package/dist/brushes/index.js +5 -5
  11. package/dist/brushes/profiles.d.cts +6 -1
  12. package/dist/brushes/profiles.d.ts +6 -1
  13. package/dist/{brushstrokeRender-FSUWXUZY.cjs → brushstrokeRender-L7JYRR2R.cjs} +16 -16
  14. package/dist/{brushstrokeRender-KD453OBX.js → brushstrokeRender-NLFPEBGI.js} +4 -4
  15. package/dist/canvas/brushTypes.d.cts +12 -0
  16. package/dist/canvas/brushTypes.d.ts +12 -0
  17. package/dist/canvas/brushstroke.d.cts +1 -1
  18. package/dist/canvas/brushstroke.d.ts +1 -1
  19. package/dist/canvas/drawController.d.cts +19 -4
  20. package/dist/canvas/drawController.d.ts +19 -4
  21. package/dist/canvas/index.cjs +144 -105
  22. package/dist/canvas/index.js +46 -7
  23. package/dist/{chunk-XORJ7UZO.cjs → chunk-3VHH6V67.cjs} +13 -12
  24. package/dist/{chunk-T2LDTEXK.js → chunk-4IDUYB45.js} +2217 -56
  25. package/dist/chunk-7UKFXXWL.js +802 -0
  26. package/dist/chunk-ADMRNWR7.js +340 -0
  27. package/dist/{chunk-CIJBSUM5.js → chunk-AGNUD5BI.js} +2 -2
  28. package/dist/{chunk-WLUVZKVD.cjs → chunk-DT4YQUGT.cjs} +32 -32
  29. package/dist/{chunk-DXYHQ2VN.js → chunk-EF7LZAXQ.js} +1 -1
  30. package/dist/chunk-EXB2EGBE.cjs +802 -0
  31. package/dist/{chunk-4ODRXQRW.js → chunk-EYSHTYLG.js} +1 -1
  32. package/dist/{chunk-R44Y3EFS.js → chunk-FGJHJIMN.js} +8 -336
  33. package/dist/{chunk-AQZQWXEU.cjs → chunk-G7NHE2VD.cjs} +35 -35
  34. package/dist/{chunk-XC6DPRYI.js → chunk-GSTSZPSR.js} +154 -949
  35. package/dist/{chunk-VRK322ZC.cjs → chunk-HIO6E7LC.cjs} +2 -2
  36. package/dist/{chunk-TOID45I2.cjs → chunk-J2TNIZ55.cjs} +1 -1
  37. package/dist/{chunk-YHDHFJUC.cjs → chunk-J5VQYK7T.cjs} +217 -1012
  38. package/dist/{chunk-3C33YTNN.js → chunk-JGWVZPT6.js} +2 -2
  39. package/dist/{chunk-ACFSFUQH.js → chunk-JL6YH5WD.js} +4 -0
  40. package/dist/{chunk-3SBLVGOM.cjs → chunk-LA5Y4ETA.cjs} +23 -23
  41. package/dist/{chunk-MVUQSK5J.cjs → chunk-LHPEG5AU.cjs} +107 -435
  42. package/dist/{chunk-DOZ6F2K2.js → chunk-NSETJI74.js} +3 -2
  43. package/dist/{chunk-XRXFVRGY.cjs → chunk-OKHKA43L.cjs} +2364 -203
  44. package/dist/{chunk-LK4SXL3V.js → chunk-OSEXT7JL.js} +1 -1
  45. package/dist/{chunk-PE6YJMQT.cjs → chunk-PFHJS4HE.cjs} +20 -19
  46. package/dist/{chunk-7KNW3WXZ.cjs → chunk-QEVLRLUN.cjs} +63 -0
  47. package/dist/{chunk-OTN6VB5S.cjs → chunk-RDFHWAHL.cjs} +5 -1
  48. package/dist/{chunk-6JL2D5SG.js → chunk-VE6UKYQ2.js} +3 -2
  49. package/dist/{chunk-RFJZGTHA.cjs → chunk-XVOP3CGQ.cjs} +9 -9
  50. package/dist/{chunk-EZOJBP4D.js → chunk-YIC6MAJ2.js} +1 -1
  51. package/dist/chunk-YZWM6ZIP.cjs +340 -0
  52. package/dist/{chunk-472INMWH.js → chunk-ZA7L5YJB.js} +63 -0
  53. package/dist/commands/builtins.d.cts +12 -1
  54. package/dist/commands/builtins.d.ts +12 -1
  55. package/dist/commands/index.cjs +2 -2
  56. package/dist/commands/index.js +1 -1
  57. package/dist/image-editor/controller.d.cts +1 -1
  58. package/dist/image-editor/controller.d.ts +1 -1
  59. package/dist/image-editor/index.cjs +837 -833
  60. package/dist/image-editor/index.js +105 -101
  61. package/dist/paint/index.cjs +5 -3
  62. package/dist/paint/index.js +46 -44
  63. package/dist/paint-editor/controller.d.cts +5 -3
  64. package/dist/paint-editor/controller.d.ts +5 -3
  65. package/dist/paint-editor/index.cjs +832 -2295
  66. package/dist/paint-editor/index.js +285 -1748
  67. package/dist/paint-editor/path-samples.d.cts +2 -0
  68. package/dist/paint-editor/path-samples.d.ts +2 -0
  69. package/dist/paint-editor/presence.d.cts +20 -1
  70. package/dist/paint-editor/presence.d.ts +20 -1
  71. package/dist/stickers/helpers.d.cts +2 -0
  72. package/dist/stickers/helpers.d.ts +2 -0
  73. package/dist/stickers/index.cjs +41 -35
  74. package/dist/stickers/index.js +22 -16
  75. package/dist/stickers/types.d.cts +4 -2
  76. package/dist/stickers/types.d.ts +4 -2
  77. package/dist/vector/backdrop.d.cts +13 -0
  78. package/dist/vector/backdrop.d.ts +13 -0
  79. package/dist/vector/brushstroke.d.cts +54 -7
  80. package/dist/vector/brushstroke.d.ts +54 -7
  81. package/dist/vector/brushstrokeMedia.d.cts +96 -0
  82. package/dist/vector/brushstrokeMedia.d.ts +96 -0
  83. package/dist/vector/controller.d.cts +17 -3
  84. package/dist/vector/controller.d.ts +17 -3
  85. package/dist/vector/index.cjs +1846 -1386
  86. package/dist/vector/index.d.cts +2 -0
  87. package/dist/vector/index.d.ts +2 -0
  88. package/dist/vector/index.js +517 -57
  89. package/dist/vector/render.d.cts +6 -0
  90. package/dist/vector/render.d.ts +6 -0
  91. package/dist/vector/types.d.cts +14 -0
  92. package/dist/vector/types.d.ts +14 -0
  93. package/package.json +1 -1
  94. package/skills/pixerate-animation-editor/SKILL.md +1 -0
  95. package/skills/pixerate-brushes/SKILL.md +2 -2
  96. package/skills/pixerate-brushes-design/SKILL.md +7 -4
  97. package/skills/pixerate-brushes-design/evals/port-to-vector.json +8 -8
  98. package/skills/pixerate-canvas/SKILL.md +11 -1
  99. package/skills/pixerate-image-editor/SKILL.md +19 -64
  100. package/skills/pixerate-image-editor/references/color-management.md +2 -1
  101. package/skills/pixerate-image-editor/references/free-transform.md +12 -0
  102. package/skills/pixerate-image-editor/references/layer-effects.md +10 -0
  103. package/skills/pixerate-image-editor/references/painting.md +17 -0
  104. package/skills/pixerate-image-editor/references/photoshop-files.md +1 -1
  105. package/skills/pixerate-image-editor/references/shapes-and-type.md +14 -0
  106. package/skills/pixerate-image-editor/references/smart-objects.md +10 -0
  107. package/skills/pixerate-paint-editor/SKILL.md +8 -4
  108. package/skills/pixerate-paint-editor/references/wet-media.md +9 -0
  109. package/skills/pixerate-vector/SKILL.md +16 -6
  110. package/skills/pixerate-vector/references/best-practices.md +1 -0
  111. package/skills/pixerate-vector/references/commands.md +19 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixerate-vector
3
- description: How to draw and edit vector artwork in the Pixerate vector editor through its vector.* commands - adding shapes and SVG paths, text (point, area, on a path, styles, Create Outlines), symbols and instances, CAD constraints, artboards and frames with resizing constraints, connectors, fills, strokes, stacked fills and strokes with blend modes, drop shadows, glows and blurs, clipping and opacity masks, gradients (linear, radial, conic, mesh, freeform), stroke alignment, arrowheads, variable-width and tapered strokes, live corner radii, boolean operations and Pathfinder (unite, subtract, divide, trim), Shape Builder, paint bucket, path effects (trim, repeater, zig zag, offset), envelope warps and free distort, blends and morphing, anchor editing (join, smooth, simplify, knife, eraser), align, distribute, group, and SVG import and export. Use when creating an icon, logo, illustration, glyph, badge or any Bezier path artwork, or editing an SVG in a Pixerate vector editor.
3
+ description: How to draw and edit vector artwork in the Pixerate vector editor through its vector.* commands - adding shapes and SVG paths, text (point, area, on a path, styles, Create Outlines), symbols and instances, CAD constraints, artboards and frames with resizing constraints, connectors, stacked fills and strokes with blend modes, brushstrokes with brush character and paper grain, drop shadows, glows and blurs, clipping and opacity masks, gradients (linear, radial, conic, mesh, freeform), stroke alignment, arrowheads, variable-width and tapered strokes, live corner radii, boolean operations and Pathfinder (unite, subtract, divide, trim), Shape Builder, paint bucket, path effects (trim, repeater, zig zag, offset), envelope warps and free distort, blends and morphing, anchor editing (join, smooth, simplify, knife, eraser), align, distribute, group, and SVG import and export. Use when creating an icon, logo, illustration, glyph, badge or Bezier path artwork, or editing an SVG in a Pixerate vector editor.
4
4
  ---
5
5
 
6
6
  # Pixerate vector editor
@@ -20,7 +20,9 @@ carry a live effect stack. Every command is a `vector.*` command run with `run_c
20
20
  `{ type, stops: [{ offset, color, opacity?, midpoint? }], ... }`.
21
21
  - **Appearance**: a path can stack several fills and several strokes (bottom to top; all fills
22
22
  draw under all strokes), each with its own paint, `opacity`, `blendMode` and `visible`, and
23
- each stroke with its own width, alignment, dashes, caps, joins, arrowheads and profile. Layers
23
+ each stroke with its own width, alignment, dashes, caps, joins, arrowheads and profile, or a
24
+ **brushstroke** (`vector.addBrushstroke`, `vector.setBrushstroke`, `vector.listBrushes`) painted
25
+ along the outline with a dry or wet brush, a Mixer Brush, smudge or blender, gradient paint, seeded jitter and paper grain. Layers
24
26
  are addressed by `index` in their stack, 0 at the bottom. `fill` / `stroke` and the stroke
25
27
  settings of `vector.setStyle` are shorthands for the **top** layer; `null` clears the stack.
26
28
  Any node can also have a `blendMode` and `filters` (drop / inner shadow, outer / inner glow,
@@ -101,7 +103,7 @@ the pitfalls, and uses the commands below.
101
103
  than splitting text into separate nodes, so it still edits as one paragraph. Create Outlines
102
104
  only for final artwork or logos that must not depend on fonts; keep a copy as text if it may
103
105
  change.
104
- - **Paths, strokes, booleans, gradients, stacks, masks, shadows, connectors, constraints and
106
+ - **Paths, strokes, brushstrokes, booleans, gradients, stacks, masks, shadows, connectors, constraints and
105
107
  vertical text:** read [references/best-practices.md](references/best-practices.md) first.
106
108
  - **Non-destructive first.** Live booleans (`vector.boolean` with `live: true`), path effects
107
109
  and envelopes keep the operands editable. A destructive boolean or Pathfinder replaces its
@@ -373,12 +375,20 @@ contents whole while you work, without losing the mask.
373
375
 
374
376
  | Command | Use it to |
375
377
  | --- | --- |
376
- | `vector.listBrushes` | List the brushes a brushstroke can use: the dry presets (pencils, pastels, charcoal, crayon, chalk, markers, inks, ballpoint, gel pen, fineliner), then saved brushes from the brush library the vector profile admits, with their sizes and `builtin`. Brushes it refuses (wet, thick, particles, stickers, tools) are refused by `vector.addBrushstroke` with the reason. A saved brush is kept in the layer, so the document renders without the library. |
377
- | `vector.addBrushstroke` | Paint paths with a brush along their outline (`brushId`, `size`, `pressure` profile such as [0.2, 1, 0.2] for a taper, `color`, default the brush's default colour (ballpoint blue, chalk), else the path's stroke; `keepColour` keeps the path's colour): sketchy, hand-drawn or inked lines that stay editable. Pass a `seed` (any integer) so the brush gets its character, the seeded jitter and paper grain that make pencil, pastel and charcoal look real; `paper` picks the grain (`{ pattern, seed, scale, depth }`) or `null` turns it off. Returns the stroke stacks. |
378
- | `vector.setBrushstroke` | Change brushstroke layer `index` of path `id`: brush (another brush without `color` takes its default colour, unless `keepColour`; giving the same `brushId` again takes that saved brush as the library has it now), size, pressure, colour, opacity, `seed` (a new seed is a new take on the same stroke; null: plain dabs) and `paper` (replaced whole; null: no grain; {}: the default sanded paper). Remove it with `vector.removeStroke`. |
378
+ | `vector.listBrushes` | List the brushes a brushstroke can use: the dry presets (pencils, pastels, charcoal, crayon, chalk, markers, inks, ballpoint, gel pen, fineliner, gradient and multi-colour brushes), wet paint (watercolour, gouache, wet oils), the Mixer Brush, smudge and blender, then saved brushes from the brush library the vector profile admits, with their sizes and `builtin`, plus the editor's `colorScheme` and `colorLocked`. Brushes it refuses (thick paint, particles, stickers, erasers, the wet tools) are refused by `vector.addBrushstroke` with the reason. A saved brush is kept in the layer, so the document renders without the library. |
379
+ | `vector.addBrushstroke` | Paint paths with a brush along their outline (`brushId`, `size`, `pressure` profile such as [0.2, 1, 0.2] for a taper, `color`, default the brush's default colour (ballpoint blue, chalk), else the path's stroke; `keepColour`, or a lock from `vector.setColorLocked`, keeps the path's colour): sketchy, hand-drawn or inked lines that stay editable. Pass a `seed` (any integer) so the brush gets its character, the seeded jitter and paper grain that make pencil, pastel and charcoal look real; `paper` picks the grain (`{ pattern, seed, scale, depth }`) or `null` turns it off. `paint` is gradient paint sampled dab by dab along the path (`{ type: 'gradient', stops, map: { by: 'distance', length, repeat } }`, lengths in document units; also pressure, direction, across-tip, random; not velocity or time). Returns the stroke stacks. |
380
+ | `vector.setBrushstroke` | Change brushstroke layer `index` of path `id`: brush (another brush without `color` takes its default colour, unless `keepColour` or the colour is locked; giving the same `brushId` again takes that saved brush as the library has it now), size, pressure, colour, opacity, `seed` (a new seed is a new take on the same stroke; null: plain dabs), `paper` (replaced whole; null: no grain; {}: the default sanded paper) and `paint` (gradient paint, replaced whole; null: the colour again). Remove it with `vector.removeStroke`. |
381
+ | `vector.setColorLocked` | Lock (`locked: true`) or unlock brushstroke colours ("Keep my colour"): while locked, `vector.addBrushstroke` and `vector.setBrushstroke` with another brush keep the path's or layer's colour instead of the brush's default; an explicit `color` still applies. Strokes already made are unchanged. Respect a lock the person set. Editor state, not an undo step. Returns `{ colorScheme, colorLocked }`. |
382
+ | `vector.setColorScheme` | Set `scheme` `light` or `dark`: the side of light / dark default colours (chalk) that brushstrokes made from now on take. Existing strokes keep their colour. Usually the host's job. Returns `{ colorScheme, colorLocked }`. |
379
383
 
380
384
  Give brushstrokes a `seed` unless you want flat, even dabs: without one a charcoal or pastel line looks like a felt pen. Use different seeds on neighbouring strokes so they do not repeat each other, and `paper: null` for clean ink or marker lines that should not catch grain. The grain is laid in each path's own space, so it moves with the path.
381
385
 
386
+ **Colour along the stroke.** For colour that changes along the path, give the brushstroke `paint` (`by: 'distance'` with `length` about the path's length and `repeat: 'clamp'` runs the gradient once from start to end; `across-tip` loads the brush with several colours side by side; `pressure` follows the pressure profile). A gradient as the layer colour also works: its `strokeMode` `along` runs it from each subpath's start to its end, `across` lays it across the tip, and `within` (the default) lays it over the path's box. Gradient and multi-colour presets (`gradient-round`, `rainbow-marker`) paint their own gradient; their `paint` stops take the layer colour.
387
+
388
+ **Wet paint** (`watercolor-round`, `watercolor-wash`, `gouache`, `oil-round`) bleeds, blooms and granulates in its own small wet area, then dries. That takes a few seconds per stroke, so the canvas shows the paint as laid first and swaps in the settled stroke when it is ready; SVG and PDF exports always wait for it. Prefer a handful of wet strokes to dozens of short ones.
389
+
390
+ **Mixer Brush, smudge and blender** act on what lies beneath the stroke: the shapes below it in the document and the path's own fills and lower strokes. Put the path above the art it should work on (`vector.arrange`), give it no visible stroke of its own if only the effect should show, and draw it after the shapes are final: the stroke re-renders whenever something beneath it changes. They pick up fills (solid and gradient), plain strokes and other brushstrokes; not text, placed images, filters or masks. The result is drawn over the art, so a smudge can drag colour out onto bare paper but can't wipe the art away. The Mixer Brush paints from its reservoir (the layer colour) even with nothing beneath it; a smudge or blender over nothing draws nothing.
391
+
382
392
  ### Editor settings
383
393
 
384
394
  | Command | Use it to |
@@ -19,6 +19,7 @@ Detail for `SKILL.md`'s best practices, by topic.
19
19
  `outside` for outlines around artwork; open paths always stroke centred. Use round caps and
20
20
  joins for friendly line icons, miter for geometric ones. Keep one stroke width across an icon
21
21
  set (for example 1.5 or 2 units on a 24-unit grid).
22
+ - **Brushstrokes and brush character.** Use `vector.addBrushstroke` (after `vector.listBrushes`) when a path should look hand-drawn (pencil, charcoal, pastel, chalk, marker, ink) while staying an editable Bezier path. Pass a `seed` for pencil, pastel, charcoal and chalk (without one the brush paints plain, even dabs with no jitter or grain), and a different seed on neighbouring paths so their strokes do not repeat. Use a `pressure` taper such as `[0.2, 1, 0.2]` for strokes that start and end lightly. For clean ink or marker lines leave out the seed, or pass `paper: null` to keep the jitter without grain. Remove a brushstroke layer with `vector.removeStroke`.
22
23
  - **Icon grid.** Use a square artboard (24, 32 or 48 units), keep a padding margin, place
23
24
  coordinates on whole or half units so strokes render crisp, and align optical centres.
24
25
  - **Gradients.** Two to four stops are usually enough. Use `interpolation: "oklab"` for
@@ -180,3 +180,22 @@ inside the intended face.
180
180
  | transparency | 0–100 % see-through (50) | – | The lens's own fill, see-through. |
181
181
 
182
182
  The lens shows what is drawn before it (below it), follows edits there, and keeps its own bounds. Move it with `vector.transform` like any path. Remove it with `vector.removeLens`.
183
+
184
+ ## Brushstrokes (`vector.listBrushes`, `vector.addBrushstroke`, `vector.setBrushstroke`)
185
+
186
+ A brushstroke is a stroke layer (kind brushstroke) in a path's appearance stack that paints a dry
187
+ brush along the path's outline; the path stays editable and the stroke follows it.
188
+
189
+ | Parameter | Meaning |
190
+ | --- | --- |
191
+ | `ids` / `id` | `vector.addBrushstroke`: paths or groups (`ids`, default the selection; a group paints every path inside). `vector.setBrushstroke`: one path `id` plus the stroke layer `index` (from `vector.getAppearance`, 0 the bottom). |
192
+ | `brushId` | Required on add. A preset or saved brush id from `vector.listBrushes` (dry brushes only: pencils, pastels, charcoal, crayon, chalk, markers, inks, ballpoint, gel pen, fineliner). Wet, thick, particle, sticker and tool brushes are refused. |
193
+ | `size` | Brush diameter in document units, up to 500 (default the brush's own; `null` on set restores it). |
194
+ | `pressure` | Pressure profile 0–1 spread evenly from start to end (`[0.2, 1, 0.2]` tapers both ends; default full pressure; `null` on set). |
195
+ | `color` | CSS colour. Default: the brush's own default colour (e.g. the ballpoint's blue) unless `keepColour`, else the path's stroke colour, else black. |
196
+ | `keepColour` | Use the path's (or, on set with another `brushId`, the layer's) colour instead of the brush's default colour. |
197
+ | `opacity` | Layer opacity 0–1 (default 1). `index` on add places the layer in the stroke stack (default on top). |
198
+ | `seed` | Integer 0–2147483647 that turns on the brush's character: seeded size, angle, opacity and scatter jitter plus paper grain. The same seed renders the same stroke. Without a seed (or `null` on set) the brush paints plain, even dabs. |
199
+ | `paper` | Applies with a `seed`: `{ pattern?, seed?, scale?, depth? }` for the grain (pattern `sanded` by default, `rough`, `cold-pressed`, `canvas`, `linen`; `scale` 0.25–8; `depth` 0–1, default 0.5). Omitted: the sanded paper; `null`: jitter without grain. On set it is replaced whole and `{}` is the default paper. |
200
+
201
+ Remove a brushstroke with `vector.removeStroke`, like any stroke layer.