@pixerate/editor 0.155.0 → 0.156.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 (42) hide show
  1. package/dist/animation-editor/index.cjs +58 -58
  2. package/dist/animation-editor/index.js +4 -4
  3. package/dist/{brushstrokeRender-YAZVQUXY.cjs → brushstrokeRender-5WANQIG4.cjs} +10 -10
  4. package/dist/{brushstrokeRender-EUDQTDYS.js → brushstrokeRender-Q4LI22QV.js} +3 -3
  5. package/dist/canvas/index.cjs +8 -8
  6. package/dist/canvas/index.js +1 -1
  7. package/dist/{chunk-AGZ47XY2.js → chunk-2N2QPO3H.js} +6 -2
  8. package/dist/{chunk-NMXPOKF3.js → chunk-45XXVHVG.js} +1 -1
  9. package/dist/{chunk-FLOGD3QB.js → chunk-6UPGM3JB.js} +2 -2
  10. package/dist/{chunk-6FUAHCVI.cjs → chunk-7NW46N7I.cjs} +16 -16
  11. package/dist/{chunk-ORDXMBD4.js → chunk-A5UCR2TO.js} +10 -3
  12. package/dist/{chunk-PI45JMP7.cjs → chunk-CD7PLU77.cjs} +81 -81
  13. package/dist/{chunk-LRRCMRSL.cjs → chunk-EBDCRTZI.cjs} +20 -16
  14. package/dist/{chunk-OLCYQLFE.js → chunk-EL5PAHNP.js} +1 -1
  15. package/dist/{chunk-PUC43JPT.cjs → chunk-EYVVIZJ3.cjs} +1 -1
  16. package/dist/{chunk-BXMIBMVG.cjs → chunk-JGKCC5OF.cjs} +65 -58
  17. package/dist/{chunk-LIXLD433.cjs → chunk-MHEXLG3M.cjs} +35 -35
  18. package/dist/{chunk-RHXW4TA5.cjs → chunk-QMI5HZWA.cjs} +7 -7
  19. package/dist/{chunk-UILRJQFD.js → chunk-WNAAWLZ5.js} +1 -1
  20. package/dist/{chunk-Y64YPIFT.js → chunk-ZQWLWDZI.js} +1 -1
  21. package/dist/image-editor/index.cjs +686 -686
  22. package/dist/image-editor/index.js +5 -5
  23. package/dist/paint/grain.d.cts +7 -0
  24. package/dist/paint/grain.d.ts +7 -0
  25. package/dist/paint/index.cjs +3 -3
  26. package/dist/paint/index.js +2 -2
  27. package/dist/paint-editor/controller.d.cts +30 -0
  28. package/dist/paint-editor/controller.d.ts +30 -0
  29. package/dist/paint-editor/document.d.cts +8 -0
  30. package/dist/paint-editor/document.d.ts +8 -0
  31. package/dist/paint-editor/index.cjs +403 -256
  32. package/dist/paint-editor/index.js +158 -11
  33. package/dist/paint-editor/paper.d.cts +8 -0
  34. package/dist/paint-editor/paper.d.ts +8 -0
  35. package/dist/paint-editor/stencils.d.cts +2 -0
  36. package/dist/paint-editor/stencils.d.ts +2 -0
  37. package/dist/paint-editor/wet.d.cts +1 -0
  38. package/dist/paint-editor/wet.d.ts +1 -0
  39. package/dist/vector/index.cjs +950 -950
  40. package/dist/vector/index.js +4 -4
  41. package/package.json +1 -1
  42. package/skills/pixerate-paint-editor/SKILL.md +9 -1
@@ -38,7 +38,7 @@ import {
38
38
  reverseMorphContour,
39
39
  subpathToMorphContour,
40
40
  turnMorphContour
41
- } from "../chunk-UILRJQFD.js";
41
+ } from "../chunk-WNAAWLZ5.js";
42
42
  import {
43
43
  DEFAULT_VECTOR_FONT,
44
44
  IDENTITY_MATRIX,
@@ -507,8 +507,8 @@ import {
507
507
  withVectorStrokes,
508
508
  withVectorTargetPaint,
509
509
  zigzagPaths
510
- } from "../chunk-FLOGD3QB.js";
511
- import "../chunk-ORDXMBD4.js";
510
+ } from "../chunk-6UPGM3JB.js";
511
+ import "../chunk-A5UCR2TO.js";
512
512
  import {
513
513
  createProvenance
514
514
  } from "../chunk-M6DNZNVY.js";
@@ -545,7 +545,7 @@ import {
545
545
  import "../chunk-V2ZCJRDM.js";
546
546
  import {
547
547
  GRAIN_PATTERNS
548
- } from "../chunk-AGZ47XY2.js";
548
+ } from "../chunk-2N2QPO3H.js";
549
549
  import "../chunk-ODBT55Q7.js";
550
550
  import {
551
551
  bytesToBase64,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.155.0",
3
+ "version": "0.156.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -133,6 +133,13 @@ is never part of a layer. Coordinates are document pixels, (0, 0) top-left, y do
133
133
 
134
134
  PSD has none of them: `export_psd` writes the nearest standard mode (watercolor and shadow
135
135
  as Multiply, tint as Color, highlight as Screen) and warns; the merged image stays exact.
136
+ - **Grow the canvas instead of starting big**: when the picture needs more room, call
137
+ `extend_canvas` with the pixels to add on each side (nothing painted moves relative to
138
+ anything else). Adding on the `left` or `top` shifts every coordinate you hold (stroke points,
139
+ guide and stencil positions, layer bounds) by (+left, +top); re-read with `list_layers` or use
140
+ the returned `rect` (the new canvas in the old coordinates). Wet paint dries first, so finish
141
+ or dry a wash (`dry_paint`) before extending. `set_canvas` only crops or grows at the
142
+ bottom-right and never moves the picture.
136
143
  - **Save brushes you build** (`set_brush` then `save_brush`), and share them with
137
144
  `export_brushes` / `import_brushes`.
138
145
 
@@ -264,9 +271,10 @@ for the controls and presets.
264
271
 
265
272
  | Tool | Use |
266
273
  | --- | --- |
267
- | `get_canvas_info` | Read the canvas size and dpi, paper (preset, colour, depth), active layer, layer count, active brush id, colours, view, hand, number of recorded strokes, undo / redo labels and the blend modes. Call first. |
274
+ | `get_canvas_info` | Read the canvas size and dpi, its `origin` (moved by `extend_canvas`), paper (preset, colour, depth), active layer, layer count, active brush id, colours, view, hand, number of recorded strokes, undo / redo labels and the blend modes. Call first. |
268
275
  | `new_canvas` | Start over with a blank canvas: one empty layer over the paper. `width`, `height` (1..16384 px), `dpi`, `paper` preset id; missing ones keep the current values. Undo brings the old painting back. Returns the size, paper and layer id. |
269
276
  | `set_canvas` | Resize the canvas (pixels stay put, anchored top-left) or change its `dpi`. Returns the canvas. |
277
+ | `extend_canvas` | Add pixels on any side (`left`, `top`, `right`, `bottom`, default 0) keeping everything painted, the paper grain and the guides in place relative to each other. `left` / `top` move all document coordinates by that much. Wet paint dries first; one undo step. Returns `canvas`, `rect` (the new canvas in the previous coordinates) and `origin` (also in `get_canvas_info`). |
270
278
  | `list_papers` | Read the paper library: id, name, family, grain pattern, colour, depth and the wet-media properties (absorption, permeability, roughness, stored for later wet media). Call before `set_paper`. |
271
279
  | `get_paper` | Read every setting of the current paper (pattern, seed, scale, tiling, depth, shading, dry and wet tuning). |
272
280
  | `set_paper` | Change the paper: `preset`, then any of `color`, `depth` (0..1), `scale` (0.25..8), `seed` (another sheet), `pattern`, `tiling`, `shading`, `dry` / `wet` tuning (`contrast` 0..3, `invert`). Affects new strokes' grain and how the paper shows; strokes already painted keep their pixels. Returns the paper. |