@pixerate/editor 0.155.0 → 0.157.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 (73) hide show
  1. package/dist/agent/index.cjs +34 -34
  2. package/dist/agent/index.js +5 -5
  3. package/dist/animation-editor/index.cjs +58 -58
  4. package/dist/animation-editor/index.js +4 -4
  5. package/dist/{brushstrokeRender-YAZVQUXY.cjs → brushstrokeRender-5WANQIG4.cjs} +10 -10
  6. package/dist/{brushstrokeRender-EUDQTDYS.js → brushstrokeRender-Q4LI22QV.js} +3 -3
  7. package/dist/canvas/index.cjs +14 -14
  8. package/dist/canvas/index.js +3 -3
  9. package/dist/chart/index.cjs +90 -88
  10. package/dist/chart/index.js +9 -7
  11. package/dist/chart/spec.d.cts +2 -1
  12. package/dist/chart/spec.d.ts +2 -1
  13. package/dist/chart/types.d.cts +5 -0
  14. package/dist/chart/types.d.ts +5 -0
  15. package/dist/{chunk-AGZ47XY2.js → chunk-2N2QPO3H.js} +6 -2
  16. package/dist/{chunk-NMXPOKF3.js → chunk-45XXVHVG.js} +1 -1
  17. package/dist/{chunk-2WDZI6QD.cjs → chunk-4T44CJ5K.cjs} +15 -15
  18. package/dist/{chunk-XTU6QO2W.cjs → chunk-4YWAEV4W.cjs} +36 -27
  19. package/dist/{chunk-4YQKRHMI.cjs → chunk-57JLBGJ5.cjs} +8 -8
  20. package/dist/{chunk-SVINJIGK.js → chunk-5QBRAIVK.js} +3 -3
  21. package/dist/{chunk-R3PECGTQ.cjs → chunk-6LUYFHHN.cjs} +51 -51
  22. package/dist/{chunk-FLOGD3QB.js → chunk-6UPGM3JB.js} +2 -2
  23. package/dist/{chunk-6FUAHCVI.cjs → chunk-7NW46N7I.cjs} +16 -16
  24. package/dist/{chunk-ORDXMBD4.js → chunk-A5UCR2TO.js} +10 -3
  25. package/dist/{chunk-ML2II3Y3.cjs → chunk-AKDWAWSY.cjs} +58 -46
  26. package/dist/{chunk-PI45JMP7.cjs → chunk-CD7PLU77.cjs} +81 -81
  27. package/dist/{chunk-EQ4SF4X4.js → chunk-DBIVICAO.js} +1 -1
  28. package/dist/{chunk-LRRCMRSL.cjs → chunk-EBDCRTZI.cjs} +20 -16
  29. package/dist/{chunk-OLCYQLFE.js → chunk-EL5PAHNP.js} +1 -1
  30. package/dist/{chunk-PUC43JPT.cjs → chunk-EYVVIZJ3.cjs} +1 -1
  31. package/dist/{chunk-SUVZJ2CP.js → chunk-H5XX4KHB.js} +11 -1
  32. package/dist/{chunk-BXMIBMVG.cjs → chunk-JGKCC5OF.cjs} +65 -58
  33. package/dist/{chunk-LIXLD433.cjs → chunk-MHEXLG3M.cjs} +35 -35
  34. package/dist/{chunk-37RLSNQ3.js → chunk-Q6PA362P.js} +2 -2
  35. package/dist/{chunk-RHXW4TA5.cjs → chunk-QMI5HZWA.cjs} +7 -7
  36. package/dist/{chunk-DSZCDNTM.js → chunk-R3QY7PPL.js} +11 -2
  37. package/dist/{chunk-4RF2H3N3.js → chunk-SSCL7QQ4.js} +15 -3
  38. package/dist/{chunk-TLMRGLQQ.cjs → chunk-TVO6W2Q6.cjs} +20 -17
  39. package/dist/{chunk-EIUTJPEL.js → chunk-UM3RPYC5.js} +5 -2
  40. package/dist/{chunk-UILRJQFD.js → chunk-WNAAWLZ5.js} +1 -1
  41. package/dist/{chunk-I4AHLP7F.cjs → chunk-WPPJH6X4.cjs} +12 -2
  42. package/dist/{chunk-RZJCYJWO.cjs → chunk-XNQ5EFB4.cjs} +16 -16
  43. package/dist/{chunk-R6HNWN7B.js → chunk-YABNLNY7.js} +3 -3
  44. package/dist/{chunk-Y64YPIFT.js → chunk-ZQWLWDZI.js} +1 -1
  45. package/dist/export/index.cjs +4 -4
  46. package/dist/export/index.js +3 -3
  47. package/dist/extensions/index.cjs +7 -7
  48. package/dist/extensions/index.js +6 -6
  49. package/dist/image-editor/index.cjs +686 -686
  50. package/dist/image-editor/index.js +5 -5
  51. package/dist/index.cjs +13 -13
  52. package/dist/index.js +7 -7
  53. package/dist/paint/grain.d.cts +7 -0
  54. package/dist/paint/grain.d.ts +7 -0
  55. package/dist/paint/index.cjs +3 -3
  56. package/dist/paint/index.js +2 -2
  57. package/dist/paint-editor/controller.d.cts +30 -0
  58. package/dist/paint-editor/controller.d.ts +30 -0
  59. package/dist/paint-editor/document.d.cts +8 -0
  60. package/dist/paint-editor/document.d.ts +8 -0
  61. package/dist/paint-editor/index.cjs +403 -256
  62. package/dist/paint-editor/index.js +158 -11
  63. package/dist/paint-editor/paper.d.cts +8 -0
  64. package/dist/paint-editor/paper.d.ts +8 -0
  65. package/dist/paint-editor/stencils.d.cts +2 -0
  66. package/dist/paint-editor/stencils.d.ts +2 -0
  67. package/dist/paint-editor/wet.d.cts +1 -0
  68. package/dist/paint-editor/wet.d.ts +1 -0
  69. package/dist/vector/index.cjs +950 -950
  70. package/dist/vector/index.js +4 -4
  71. package/package.json +1 -1
  72. package/skills/pixerate-chart/SKILL.md +4 -1
  73. 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.157.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -109,7 +109,7 @@ it changed.
109
109
 
110
110
  | Tool | Use it to |
111
111
  | --- | --- |
112
- | `update_chart` | Change presentation in one all-or-nothing call: `type`, `title`, `subtitle`, `xAxis` / `yAxis` / `yAxis2` (show, title, min, max, step, gridlines, format, kind `"date"`, scale `"log"`, logBase, reverse), `legend` (show, position top / bottom / left / right), `stacking` (none / stacked / percent), `orientation`, `curve`, `points`, `dataLabels`, `labelPosition`, `palette`, `innerRadius` (donut hole, 0-0.9), `gapWidth`, `overlap`, `bins`, `showTotal`. Invalid values change nothing and come back as sentences. Returns the spec. |
112
+ | `update_chart` | Change presentation in one all-or-nothing call: `type`, `title`, `subtitle`, `xAxis` / `yAxis` / `yAxis2` (show, title, min, max, step, gridlines, format, kind `"date"`, scale `"log"`, logBase, reverse), `legend` (show, position top / bottom / left / right), `stacking` (none / stacked / percent), `orientation`, `curve`, `points`, `dataLabels`, `labelPosition`, `palette`, `innerRadius` (donut hole, 0-0.9), `gapWidth`, `overlap`, `bins`, `showTotal`, `radarTicks` (radar ring count 1-50, null for round numbers), `radarGraticule` (radar rings as `polygon` or `circle`). Invalid values change nothing and come back as sentences. Returns the spec. |
113
113
  | `set_chart_data` | Replace `categories` and / or all `series` (each with `name`, `values` and optional settings). Values are padded with gaps to the categories. Use for whole tables and for re-sorting. Returns the table and series ids. |
114
114
  | `set_chart_values` | Set individual `cells` (`series`, `category`, `value`) all-or-nothing. Values may be numbers, numeric text (`"1,200"`, `"12%"`, `"$40"`, `"(3)"`) or `null` for a gap. Returns the stored values. Acted out with a cursor when the host has a director. |
115
115
  | `add_chart_series` | Add a series (`name` required; `values`, `color`, `type` for a combo, `axis: "secondary"`, `x` / `sizes` for scatter and bubble, marker, format, error bars, `id`, `at`). Selects it and returns its id. |
@@ -190,6 +190,9 @@ several charts may register them with another prefix.
190
190
  - Percent-stacked charts, pies and gaps cannot be dragged; use `set_chart_values`.
191
191
  - Radar needs at least three categories (it draws as a line chart until then); trendlines
192
192
  are refused on stacked charts, pies and the other single-series families.
193
+ - Radar `radarTicks` and `radarGraticule` are Mermaid's `ticks` and `graticule`. A
194
+ `radar-beta` block with no `graticule` line imports as `circle`, because that is what
195
+ Mermaid draws; set `radarGraticule: "polygon"` if the user wants the editor's default look.
193
196
  - `transpose_chart` and `load_file_chart` drop or replace styling; restyle and re-check
194
197
  colours afterwards.
195
198
  - A `%% @pixerate` comment is what makes Mermaid round-trip exactly. Keep it when the text
@@ -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. |