@pixerate/editor 0.264.1 → 0.265.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 (44) hide show
  1. package/dist/animation-editor/index.cjs +60 -61
  2. package/dist/animation-editor/index.js +4 -5
  3. package/dist/brushes/index.cjs +73 -60
  4. package/dist/brushes/index.d.cts +1 -0
  5. package/dist/brushes/index.d.ts +1 -0
  6. package/dist/brushes/index.js +17 -4
  7. package/dist/brushes/preview.d.cts +59 -0
  8. package/dist/brushes/preview.d.ts +59 -0
  9. package/dist/brushes/tools.d.cts +12 -5
  10. package/dist/brushes/tools.d.ts +12 -5
  11. package/dist/{brushstrokeRender-3MOI7PH4.js → brushstrokeRender-4UB6NRJW.js} +11 -4
  12. package/dist/{brushstrokeRender-SMMPIJF2.cjs → brushstrokeRender-JQ2XQRUD.cjs} +22 -15
  13. package/dist/canvas/brushstroke.d.cts +6 -1
  14. package/dist/canvas/brushstroke.d.ts +6 -1
  15. package/dist/canvas/index.cjs +16 -17
  16. package/dist/canvas/index.js +2 -3
  17. package/dist/{chunk-F3KKR6DD.cjs → chunk-5OE4ZZ6V.cjs} +30 -30
  18. package/dist/{chunk-BY5EBP26.cjs → chunk-677777GH.cjs} +3 -3
  19. package/dist/{chunk-G5ADO47G.cjs → chunk-7NQOGWLM.cjs} +3 -2
  20. package/dist/{chunk-WWI6FLH2.js → chunk-7PW6VCNW.js} +2 -2
  21. package/dist/{chunk-CECCP2V7.js → chunk-BLR4KWYQ.js} +1 -1
  22. package/dist/chunk-DEBIFWY6.cjs +77 -0
  23. package/dist/{chunk-KXNZNOEF.cjs → chunk-DGXTEPCU.cjs} +94 -94
  24. package/dist/{chunk-3CI7FRMK.js → chunk-DVPQFMH6.js} +13 -1
  25. package/dist/{chunk-EE7SAYBF.js → chunk-J4SGJCPW.js} +3 -3
  26. package/dist/{chunk-A2IS7EHE.cjs → chunk-JBZRVLXV.cjs} +14 -2
  27. package/dist/{chunk-V7MJ4HIN.cjs → chunk-NOP4Y5AB.cjs} +23 -23
  28. package/dist/{chunk-FQC5TDB6.cjs → chunk-O53MOGXG.cjs} +35 -35
  29. package/dist/{chunk-4OJC4MCD.js → chunk-Q6RVVJW6.js} +1 -1
  30. package/dist/{chunk-HAUDEVMC.js → chunk-WY23AUCA.js} +2 -2
  31. package/dist/{chunk-JEML4FSA.js → chunk-XDNWQMHY.js} +3 -2
  32. package/dist/{chunk-ROBSFJ6F.js → chunk-Z2Z2OHRM.js} +1 -1
  33. package/dist/{chunk-USJX5SW4.cjs → chunk-ZHRVCW3M.cjs} +12 -12
  34. package/dist/chunk-ZS7LB2MV.js +77 -0
  35. package/dist/image-editor/index.cjs +788 -790
  36. package/dist/image-editor/index.js +6 -8
  37. package/dist/paint-editor/index.cjs +88 -84
  38. package/dist/paint-editor/index.js +12 -8
  39. package/dist/vector/index.cjs +970 -971
  40. package/dist/vector/index.js +5 -6
  41. package/package.json +1 -1
  42. package/skills/pixerate-brushes/SKILL.md +7 -2
  43. package/dist/chunk-FJBQTZS4.js +0 -17
  44. package/dist/chunk-LRTR4ASZ.cjs +0 -17
@@ -11,11 +11,15 @@ import {
11
11
  mergeBrushPatch,
12
12
  multiColorSliders,
13
13
  patchBrushValue
14
- } from "../chunk-4OJC4MCD.js";
14
+ } from "../chunk-Q6RVVJW6.js";
15
15
  import {
16
16
  createStickerTools,
17
17
  describeStickerRef
18
18
  } from "../chunk-6JL2D5SG.js";
19
+ import {
20
+ BRUSH_PREVIEW_DARK_PAPER,
21
+ brushPreviewsOnDark
22
+ } from "../chunk-ZS7LB2MV.js";
19
23
  import {
20
24
  toVideoFfmpeg
21
25
  } from "../chunk-MWUZCEFT.js";
@@ -30,7 +34,7 @@ import {
30
34
  resolveExternalAssets,
31
35
  serializeLayers,
32
36
  serializeLayersExternal
33
- } from "../chunk-HAUDEVMC.js";
37
+ } from "../chunk-WY23AUCA.js";
34
38
  import "../chunk-WJ4WQJCC.js";
35
39
  import {
36
40
  LAYER_EFFECT_KINDS,
@@ -88,7 +92,7 @@ import {
88
92
  realPresenceClock,
89
93
  tweenPresenceCursor
90
94
  } from "../chunk-IVSWRVB4.js";
91
- import "../chunk-WWI6FLH2.js";
95
+ import "../chunk-7PW6VCNW.js";
92
96
  import {
93
97
  BRUSH_ID,
94
98
  BRUSH_PRESETS,
@@ -143,7 +147,7 @@ import {
143
147
  parseBrushLibrary,
144
148
  resolveBrush,
145
149
  usesPaintExchange
146
- } from "../chunk-EE7SAYBF.js";
150
+ } from "../chunk-J4SGJCPW.js";
147
151
  import {
148
152
  STAMP_KINDS,
149
153
  StickersSlot,
@@ -162,8 +166,7 @@ import {
162
166
  import "../chunk-PWBZH3FK.js";
163
167
  import {
164
168
  brushColourHex
165
- } from "../chunk-FJBQTZS4.js";
166
- import "../chunk-3CI7FRMK.js";
169
+ } from "../chunk-DVPQFMH6.js";
167
170
  import {
168
171
  StickerError
169
172
  } from "../chunk-SZTI6EER.js";
@@ -4728,7 +4731,7 @@ function renderBrushThumbnail(brush, options) {
4728
4731
  if (b.engine === "wet") surface = paintWetTestStroke(b, options.paper, options.color, width, height);
4729
4732
  else ({ surface, light } = paintTestStroke(surface, b, options.paper, options.color, width, height));
4730
4733
  const layer = { type: "pixel", id: "thumbnail", name: "thumbnail", visible: true, opacity: 1, blend: "normal", surface, offset: { x: 0, y: 0 } };
4731
- const paper = light ? { ...options.paper, color: "#141414" } : options.paper;
4734
+ const paper = light && brushPreviewsOnDark(b) ? { ...options.paper, color: BRUSH_PREVIEW_DARK_PAPER } : options.paper;
4732
4735
  const spill = light ? computeSpill(surface, light, { radius: Math.max(4, height / 6), strength: 1 }) : null;
4733
4736
  const layers = [paperNode(paper), layer];
4734
4737
  if (spill) layers.push({ type: "pixel", id: "thumbnail-light", name: "light", visible: true, opacity: 1, blend: "linear-dodge", surface: spill, offset: { x: 0, y: 0 } });
@@ -12152,10 +12155,11 @@ function strokeSummary(s, withPoints, live) {
12152
12155
 
12153
12156
  // src/paint-editor/brush-library-tools.ts
12154
12157
  function paintBrushPreviewRenderer(paper = () => DEFAULT_PAPER) {
12155
- return (brush, { width, height, color }) => {
12158
+ const render = (brush, { width, height, color }) => {
12156
12159
  const t = renderBrushThumbnail(resolveBrush(brush), { paper: paper(), width, height, color: color.toLowerCase() });
12157
12160
  return { data: bytesToBase64(encodePng(t.width, t.height, t.data)), mimeType: "image/png" };
12158
12161
  };
12162
+ return Object.defineProperty(render, "paper", { get: () => paper().color, enumerable: true });
12159
12163
  }
12160
12164
  function createPaintBrushLibraryToolProvider(controller, options = {}) {
12161
12165
  return createBrushLibraryToolProvider(controller.brushLibrary, {