@pixerate/editor 0.258.0 → 0.260.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 (78) 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 +61 -59
  4. package/dist/animation-editor/index.js +5 -3
  5. package/dist/brushes/contract.d.cts +24 -0
  6. package/dist/brushes/contract.d.ts +24 -0
  7. package/dist/brushes/index.cjs +146 -31
  8. package/dist/brushes/index.d.cts +1 -0
  9. package/dist/brushes/index.d.ts +1 -0
  10. package/dist/brushes/index.js +121 -6
  11. package/dist/{brushstrokeRender-JI4W6F2G.js → brushstrokeRender-25Q5BEY6.js} +17 -7
  12. package/dist/{brushstrokeRender-MQ6PSDM5.cjs → brushstrokeRender-N6UPZSQS.cjs} +31 -21
  13. package/dist/canvas/brushTypes.d.cts +5 -0
  14. package/dist/canvas/brushTypes.d.ts +5 -0
  15. package/dist/canvas/drawController.d.cts +15 -1
  16. package/dist/canvas/drawController.d.ts +15 -1
  17. package/dist/canvas/index.cjs +136 -102
  18. package/dist/canvas/index.js +35 -1
  19. package/dist/{chunk-3PPJRMIG.js → chunk-3O47TPGX.js} +197 -18
  20. package/dist/{chunk-5Q5MLXAD.cjs → chunk-3TQW5MPW.cjs} +23 -23
  21. package/dist/{chunk-JBBJE76O.cjs → chunk-3ZRNK3RO.cjs} +1138 -85
  22. package/dist/{chunk-YSGW7VV4.cjs → chunk-43NT242D.cjs} +1401 -228
  23. package/dist/{chunk-SMTUQWGY.js → chunk-5IW65VQ6.js} +1 -1
  24. package/dist/{chunk-YQ4PQTBB.js → chunk-6NZL24W4.js} +9 -1
  25. package/dist/{chunk-O3ZVZSNJ.cjs → chunk-7AUQ2UJ3.cjs} +137 -129
  26. package/dist/{chunk-4M4E3N6X.js → chunk-CQVTGBQI.js} +1 -1
  27. package/dist/{chunk-SSFMWJDK.js → chunk-D4TE5JNW.js} +1192 -19
  28. package/dist/{chunk-AORZ5M5C.js → chunk-EHALWBBD.js} +1 -1
  29. package/dist/{chunk-6WCQ35GI.cjs → chunk-NHA26O5X.cjs} +2 -2
  30. package/dist/{chunk-DPYAO5U6.cjs → chunk-PVJMTLPJ.cjs} +197 -18
  31. package/dist/{chunk-MQGQTKVW.cjs → chunk-PYTJBVW5.cjs} +29 -29
  32. package/dist/{chunk-IXQZHCOF.js → chunk-QAR2N7HZ.js} +1 -1
  33. package/dist/{chunk-5P4JEOIV.js → chunk-TMDDMJCR.js} +2 -2
  34. package/dist/{chunk-RSIKDWOP.cjs → chunk-TZOX7KWV.cjs} +15 -15
  35. package/dist/{chunk-IPUTIUGQ.cjs → chunk-UVZ7RQOE.cjs} +1 -1
  36. package/dist/{chunk-A7GJ6BXI.js → chunk-WJ4WQJCC.js} +1062 -9
  37. package/dist/{chunk-ICTPLVSR.js → chunk-X2EXYY4J.js} +1 -1
  38. package/dist/{chunk-WQCNC4DK.js → chunk-XC6DPRYI.js} +695 -4
  39. package/dist/{chunk-KBYB7OWB.cjs → chunk-YHDHFJUC.cjs} +776 -85
  40. package/dist/{chunk-P3PZ63M3.cjs → chunk-YLUIFXSL.cjs} +35 -35
  41. package/dist/commands/index.cjs +2 -2
  42. package/dist/commands/index.js +1 -1
  43. package/dist/image-editor/index.cjs +1385 -2484
  44. package/dist/image-editor/index.js +139 -1238
  45. package/dist/image-editor/selection-worker.cjs +3 -4
  46. package/dist/image-editor/selection-worker.js +1 -2
  47. package/dist/paint/index.cjs +3 -5
  48. package/dist/paint/index.js +40 -42
  49. package/dist/paint-editor/contract.d.cts +29 -0
  50. package/dist/paint-editor/contract.d.ts +29 -0
  51. package/dist/paint-editor/dab-stroke.d.cts +5 -0
  52. package/dist/paint-editor/dab-stroke.d.ts +5 -0
  53. package/dist/paint-editor/index.cjs +402 -258
  54. package/dist/paint-editor/index.d.cts +1 -0
  55. package/dist/paint-editor/index.d.ts +1 -0
  56. package/dist/paint-editor/index.js +197 -53
  57. package/dist/paint-editor/stamp-tip.d.cts +17 -0
  58. package/dist/paint-editor/stamp-tip.d.ts +17 -0
  59. package/dist/paint-editor/ui.d.cts +21 -1
  60. package/dist/paint-editor/ui.d.ts +21 -1
  61. package/dist/raster/index.cjs +2 -4
  62. package/dist/raster/index.js +6 -8
  63. package/dist/vector/brushstroke.d.cts +6 -0
  64. package/dist/vector/brushstroke.d.ts +6 -0
  65. package/dist/vector/controller.d.cts +11 -2
  66. package/dist/vector/controller.d.ts +11 -2
  67. package/dist/vector/index.cjs +990 -973
  68. package/dist/vector/index.js +28 -11
  69. package/package.json +1 -1
  70. package/skills/pixerate-brushes/SKILL.md +1 -1
  71. package/skills/pixerate-canvas/SKILL.md +3 -1
  72. package/skills/pixerate-vector/SKILL.md +2 -2
  73. package/dist/chunk-2VJAVXLI.js +0 -192
  74. package/dist/chunk-62Z5WLRA.js +0 -700
  75. package/dist/chunk-BOHDJJ2O.cjs +0 -192
  76. package/dist/chunk-NKGB64CW.cjs +0 -700
  77. package/dist/chunk-SS53NNZO.cjs +0 -1066
  78. package/dist/chunk-ZNA3IQZF.js +0 -1066
@@ -1692,7 +1692,7 @@ function normalizeBrushSpec(raw, problems = []) {
1692
1692
  }
1693
1693
  if (brush.marks?.kind === "scatter") {
1694
1694
  const surface = brush.behaviour?.surface;
1695
- const why = brush.tip.shape === "bristle" ? "bristle tips lay their own marks" : surface === "wet" || surface === "thick" ? `${surface} paint is not sprayed` : brush.behaviour?.exchange ? "a spray does not pick paint up" : null;
1695
+ const why = brush.tip.shape === "bristle" ? "bristle tips lay their own marks" : surface === "wet" || surface === "thick" ? `${surface} paint is not sprayed` : brush.behaviour?.exchange?.reservoir ? "the Mixer Brush is not sprayed" : null;
1696
1696
  if (why) {
1697
1697
  drop("marks", why);
1698
1698
  delete brush.marks;
@@ -7,7 +7,7 @@ import {
7
7
  listPresets,
8
8
  normalizeBrushSpec,
9
9
  resolveBrush
10
- } from "./chunk-SMTUQWGY.js";
10
+ } from "./chunk-5IW65VQ6.js";
11
11
  import {
12
12
  parseProvenance
13
13
  } from "./chunk-M6DNZNVY.js";
@@ -49,6 +49,9 @@ import {
49
49
  formatNumber,
50
50
  isStraightCubic
51
51
  } from "./chunk-PWBZH3FK.js";
52
+ import {
53
+ brushColourHex
54
+ } from "./chunk-FJBQTZS4.js";
52
55
  import {
53
56
  BrushstrokeCache,
54
57
  GRAIN_PATTERNS,
@@ -2570,6 +2573,10 @@ function vectorBrushstrokeBrushError(id, user = []) {
2570
2573
  if (preset) return `Brush "${id}" (${preset.name}) can't paint a brushstroke: ${reasons(preset)} Use one of: ${ids.join(", ")}.`;
2571
2574
  return `Unknown brush "${id}". ${closest(id, ids)}Use one of: ${ids.join(", ")} (vector.listBrushes lists them).`;
2572
2575
  }
2576
+ function vectorBrushstrokeDefaultColour(id, user = [], scheme = "light") {
2577
+ const brush = BRUSH_PRESETS.find((b) => b.id === id) ?? user.find((b) => b.id === id);
2578
+ return brush ? brushColourHex(brush.colour?.default, scheme) : null;
2579
+ }
2573
2580
  function sanitizeVectorBrushstroke(value, user = []) {
2574
2581
  if (!value || typeof value !== "object") return null;
2575
2582
  const r = value;
@@ -10841,6 +10848,7 @@ export {
10841
10848
  vectorBrushstrokeBrush,
10842
10849
  vectorBrushstrokeBrushOf,
10843
10850
  vectorBrushstrokeBrushError,
10851
+ vectorBrushstrokeDefaultColour,
10844
10852
  sanitizeVectorBrushstroke,
10845
10853
  VECTOR_BRUSHSTROKE_MAX_SEED,
10846
10854
  sanitizeVectorBrushstrokePaper,