@pixerate/editor 0.237.0 → 0.239.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 (94) hide show
  1. package/dist/agent/index.cjs +40 -39
  2. package/dist/agent/index.js +9 -8
  3. package/dist/animation/index.cjs +7 -6
  4. package/dist/animation/index.js +6 -5
  5. package/dist/animation-editor/index.cjs +66 -65
  6. package/dist/animation-editor/index.js +9 -8
  7. package/dist/{brushstrokeRender-WDTKD54B.cjs → brushstrokeRender-MPOM7BFW.cjs} +7 -5
  8. package/dist/{brushstrokeRender-MAHOXL7K.js → brushstrokeRender-WB67GMUP.js} +4 -2
  9. package/dist/canvas/index.cjs +55 -54
  10. package/dist/canvas/index.js +10 -9
  11. package/dist/chart/index.cjs +159 -158
  12. package/dist/chart/index.js +9 -8
  13. package/dist/{chunk-L6Y7TSQ4.js → chunk-36ZTV7WO.js} +1 -1
  14. package/dist/{chunk-JVNGCS26.js → chunk-3E36VDMJ.js} +1 -1
  15. package/dist/{chunk-WRZ6C4TU.cjs → chunk-3R5P3DVY.cjs} +6 -6
  16. package/dist/{chunk-RUONPPMC.cjs → chunk-44BMJJVA.cjs} +8 -8
  17. package/dist/{chunk-YBAPT7NL.js → chunk-6ADHGQ73.js} +4 -2
  18. package/dist/chunk-7AHBW2CQ.cjs +200 -0
  19. package/dist/{chunk-EUIDTZNQ.cjs → chunk-7PT4RJL5.cjs} +113 -111
  20. package/dist/{chunk-CU6ANS5L.js → chunk-7YGBSFC6.js} +2 -2
  21. package/dist/{chunk-ATKKG76G.cjs → chunk-AD7GA3TL.cjs} +23 -23
  22. package/dist/{chunk-FSLKBQU7.js → chunk-AIS56JOO.js} +3 -3
  23. package/dist/{chunk-5VQXSS2S.cjs → chunk-BBUE3UJL.cjs} +86 -86
  24. package/dist/{chunk-7272D3K2.js → chunk-BP6KSGVD.js} +6 -4
  25. package/dist/{chunk-F6R67I3A.js → chunk-CXXXAZ7H.js} +1 -1
  26. package/dist/{chunk-5DQPDXOM.cjs → chunk-D2SGV525.cjs} +76 -76
  27. package/dist/chunk-F67XMVDI.js +200 -0
  28. package/dist/{chunk-JVSX5QTS.js → chunk-FQVVO5YA.js} +3 -3
  29. package/dist/{chunk-UXETV2NC.cjs → chunk-GA4EU4P3.cjs} +4 -4
  30. package/dist/{chunk-UFEDHACQ.js → chunk-GXAK6Q5J.js} +2 -2
  31. package/dist/{chunk-MHLU6GRJ.js → chunk-JEGJP4OW.js} +7 -196
  32. package/dist/chunk-KMPM5JM5.js +936 -0
  33. package/dist/{chunk-GOBOCZZI.js → chunk-LEQKZGQI.js} +1 -1
  34. package/dist/{chunk-M5GLQQWG.cjs → chunk-LJZRHVZV.cjs} +2 -2
  35. package/dist/{chunk-N76AMOKE.cjs → chunk-MOW3JMNG.cjs} +42 -42
  36. package/dist/{chunk-WKMUBATU.js → chunk-N4DFDI73.js} +1 -1
  37. package/dist/{chunk-GNZI3KYK.cjs → chunk-NKTNLJUJ.cjs} +49 -9
  38. package/dist/{chunk-TQOL6CF7.js → chunk-PJYG6FCF.js} +49 -9
  39. package/dist/{chunk-V3L7U63N.cjs → chunk-PP6BXVRL.cjs} +1 -1
  40. package/dist/{chunk-TFF2GTGN.cjs → chunk-PPFJHTW5.cjs} +24 -22
  41. package/dist/{chunk-6ZZKRH7R.js → chunk-QARCM66V.js} +3 -3
  42. package/dist/{chunk-5UEFBM2M.cjs → chunk-RD7RX52G.cjs} +18 -207
  43. package/dist/{chunk-CDP2AKMA.js → chunk-RV5DKZHU.js} +1 -1
  44. package/dist/chunk-S6OT6CTS.cjs +936 -0
  45. package/dist/{chunk-HUAISCUX.cjs → chunk-T7KQEMAE.cjs} +18 -18
  46. package/dist/{chunk-BQE3Y6ZO.cjs → chunk-THXFU3JB.cjs} +5 -5
  47. package/dist/{chunk-4ZC5QJE2.cjs → chunk-UTI5IITZ.cjs} +3 -3
  48. package/dist/{chunk-XSVUNSDJ.js → chunk-UUBO6RB5.js} +1 -1
  49. package/dist/{chunk-CZWUDFR3.cjs → chunk-UZU6DIZA.cjs} +52 -52
  50. package/dist/{chunk-M2TPMYJE.js → chunk-V6DT2CDH.js} +1 -1
  51. package/dist/{chunk-WV5WTOC6.cjs → chunk-W7GRGGBH.cjs} +16 -16
  52. package/dist/{chunk-23E5GI2U.js → chunk-WGN7AUKB.js} +2 -2
  53. package/dist/{chunk-YMREOA67.js → chunk-XK4SST43.js} +2 -2
  54. package/dist/{chunk-SOSBOS5T.cjs → chunk-XWOLPNBW.cjs} +22 -22
  55. package/dist/{chunk-ILP77UD6.js → chunk-YGQVCQTG.js} +1 -1
  56. package/dist/{chunk-GXLZZVR5.cjs → chunk-ZXNO3ZOX.cjs} +37 -37
  57. package/dist/color/index.cjs +6 -4
  58. package/dist/color/index.js +9 -7
  59. package/dist/export/index.cjs +8 -7
  60. package/dist/export/index.js +7 -6
  61. package/dist/extensions/index.cjs +11 -10
  62. package/dist/extensions/index.js +10 -9
  63. package/dist/gradient/index.cjs +104 -813
  64. package/dist/gradient/index.d.cts +1 -0
  65. package/dist/gradient/index.d.ts +1 -0
  66. package/dist/gradient/index.js +87 -796
  67. package/dist/gradient/sample.d.cts +69 -0
  68. package/dist/gradient/sample.d.ts +69 -0
  69. package/dist/image-editor/index.cjs +826 -778
  70. package/dist/image-editor/index.js +57 -9
  71. package/dist/index.cjs +17 -16
  72. package/dist/index.js +11 -10
  73. package/dist/paint-editor/controller.d.cts +31 -1
  74. package/dist/paint-editor/controller.d.ts +31 -1
  75. package/dist/paint-editor/index.cjs +403 -195
  76. package/dist/paint-editor/index.js +231 -23
  77. package/dist/paint-editor/sticker-tools.d.cts +1 -1
  78. package/dist/paint-editor/sticker-tools.d.ts +1 -1
  79. package/dist/paint-editor/stickers.d.cts +10 -3
  80. package/dist/paint-editor/stickers.d.ts +10 -3
  81. package/dist/paint-editor/ui.d.cts +10 -3
  82. package/dist/paint-editor/ui.d.ts +10 -3
  83. package/dist/tokens/index.cjs +4 -3
  84. package/dist/tokens/index.js +3 -2
  85. package/dist/typography/index.cjs +8 -7
  86. package/dist/typography/index.js +3 -2
  87. package/dist/vector/index.cjs +967 -966
  88. package/dist/vector/index.js +9 -8
  89. package/dist/video-editor/index.cjs +7 -6
  90. package/dist/video-editor/index.js +6 -5
  91. package/package.json +1 -1
  92. package/skills/pixerate-color/SKILL.md +3 -0
  93. package/skills/pixerate-image-editor/SKILL.md +1 -0
  94. package/skills/pixerate-paint-editor/SKILL.md +6 -2
@@ -7,7 +7,7 @@ import {
7
7
  resolveExternalAssets,
8
8
  serializeLayers,
9
9
  serializeLayersExternal
10
- } from "../chunk-JVNGCS26.js";
10
+ } from "../chunk-3E36VDMJ.js";
11
11
  import "../chunk-3CI7FRMK.js";
12
12
  import "../chunk-ZNA3IQZF.js";
13
13
  import {
@@ -55,7 +55,7 @@ import {
55
55
  realPresenceClock,
56
56
  tweenPresenceCursor
57
57
  } from "../chunk-IVSWRVB4.js";
58
- import "../chunk-CU6ANS5L.js";
58
+ import "../chunk-7YGBSFC6.js";
59
59
  import {
60
60
  BRUSH_ID,
61
61
  BRUSH_ROTATIONS,
@@ -120,12 +120,13 @@ import {
120
120
  sampleEffectAt,
121
121
  sampleEffectField,
122
122
  stampCoverage,
123
+ stickerAt,
123
124
  stickerRect,
124
125
  stickerSurface,
125
126
  tiltToOrientation,
126
127
  toStrokePoint,
127
128
  usesPaintExchange
128
- } from "../chunk-TQOL6CF7.js";
129
+ } from "../chunk-PJYG6FCF.js";
129
130
  import "../chunk-M6DNZNVY.js";
130
131
  import "../chunk-WEIK3UYB.js";
131
132
  import "../chunk-PWBZH3FK.js";
@@ -240,16 +241,17 @@ import {
240
241
  defineEditorDocument
241
242
  } from "../chunk-XBQX76CT.js";
242
243
  import "../chunk-HF5QZS7Z.js";
243
- import "../chunk-M2TPMYJE.js";
244
+ import "../chunk-V6DT2CDH.js";
244
245
  import "../chunk-2WPNAGHI.js";
245
246
  import {
246
247
  HARMONY_KINDS,
247
248
  colorHarmony,
248
249
  hueToWheel,
249
250
  wheelToHue
250
- } from "../chunk-7272D3K2.js";
251
- import "../chunk-YBAPT7NL.js";
252
- import "../chunk-MHLU6GRJ.js";
251
+ } from "../chunk-BP6KSGVD.js";
252
+ import "../chunk-6ADHGQ73.js";
253
+ import "../chunk-JEGJP4OW.js";
254
+ import "../chunk-F67XMVDI.js";
253
255
  import "../chunk-6ONMQ6WF.js";
254
256
 
255
257
  // src/paint-editor/document.ts
@@ -3404,6 +3406,7 @@ var PaintEditorError = class extends Error {
3404
3406
  }
3405
3407
  };
3406
3408
  var HEX2 = /^#[0-9a-f]{6}$/i;
3409
+ var MAX_ADD_STICKERS = 500;
3407
3410
  function parseColor(value, what = "color") {
3408
3411
  if (typeof value !== "string" || !HEX2.test(value.trim())) throw new PaintEditorError(`${what} is ${JSON.stringify(value)}; use #rrggbb, e.g. "#2a4b8d".`);
3409
3412
  return value.trim().toLowerCase();
@@ -3447,6 +3450,9 @@ var PaintEditorController = class _PaintEditorController {
3447
3450
  mixerLoad = EMPTY_MIXER_LOAD;
3448
3451
  view = { ...DEFAULT_VIEW, pan: { ...DEFAULT_VIEW.pan } };
3449
3452
  hand;
3453
+ selectedSticker = null;
3454
+ /** A sticker drag in progress (`previewSticker`): the document before it, so the drop undoes in one step, and the one it showed last. */
3455
+ stickerPreview = null;
3450
3456
  encodeImage;
3451
3457
  listeners = /* @__PURE__ */ new Set();
3452
3458
  version = 0;
@@ -3543,6 +3549,7 @@ var PaintEditorController = class _PaintEditorController {
3543
3549
  mixerLoad: this.mixerLoad,
3544
3550
  view: this.view,
3545
3551
  hand: this.hand,
3552
+ selectedSticker: this.selectedSticker,
3546
3553
  canUndo: this.undoStack.length > 0 && !this.session,
3547
3554
  canRedo: this.redoStack.length > 0 && !this.session,
3548
3555
  undoLabel: last?.label ?? null,
@@ -4802,7 +4809,11 @@ var PaintEditorController = class _PaintEditorController {
4802
4809
  const snapper = init.snapToPerspective && perspective.enabled && perspective.snap ? new PerspectiveSnapper(perspective) : null;
4803
4810
  const useStencils = init.stencils !== false;
4804
4811
  const stencilSnapper = useStencils && this.guides.stencils.some((x) => x.enabled && x.mode === "guide") ? new StencilSnapper(this.guides.stencils) : null;
4805
- const selection = init.maskStencils ? this.stencilSelection(init.maskStencils) : useStencils ? this.stencilSelection() : null;
4812
+ if (brush.engine === "sticker" && !init.maskStencils && useStencils && this.stencilSelection()) {
4813
+ const masks = this.guides.stencils.filter((x) => x.enabled && x.mode === "mask").map((x) => x.id);
4814
+ throw new PaintEditorError(`Stickers can't be clipped by mask stencils (${masks.join(", ")}): they are objects drawn whole. Hide them (update_stencil enabled false) to spray stickers, or erase stickers you don't want (remove_stickers).`);
4815
+ }
4816
+ const selection = brush.engine === "sticker" ? null : init.maskStencils ? this.stencilSelection(init.maskStencils) : useStencils ? this.stencilSelection() : null;
4806
4817
  const inputFilter = snapper || stencilSnapper ? (p) => stencilSnapper ? stencilSnapper.snap(snapper ? snapper.snap(p) : p) : snapper.snap(p) : void 0;
4807
4818
  const rgba = rgbaOf(color);
4808
4819
  const seed = init.seed ?? mix32(this.seedCounter++ * 2654435761 >>> 0) & 2147483647;
@@ -5897,28 +5908,115 @@ var PaintEditorController = class _PaintEditorController {
5897
5908
  this.requireLayer(id);
5898
5909
  return (this.doc.stickers?.[id] ?? []).map((s) => ({ ...s }));
5899
5910
  }
5900
- /** Replaces a layer's stickers and redraws its pixels from them (one undo step). */
5901
- commitStickers(label, layer, stickers) {
5911
+ /**
5912
+ * Replaces a layer's stickers and redraws its pixels from them (one undo step). With `dirty`,
5913
+ * only the tiles under those rects are redrawn.
5914
+ */
5915
+ commitStickers(label, layer, stickers, dirty) {
5902
5916
  if (isLayerLocked(layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
5903
- const surface = stickerSurface(stickers);
5917
+ const before = this.previewBase() ?? this.doc;
5918
+ this.stickerPreview = null;
5919
+ const surface = this.redrawStickers(layer, stickers, dirty);
5904
5920
  const doc = { ...this.doc, layers: mapLayer(this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ...this.doc.stickers ?? {}, [layer.id]: stickers } };
5905
- this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }));
5921
+ this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }), before);
5922
+ }
5923
+ redrawStickers(layer, stickers, dirty) {
5924
+ const partial = dirty && !layer.offset.x && !layer.offset.y;
5925
+ return partial ? stickerSurface(stickers, layer.surface, dirty) : stickerSurface(stickers);
5926
+ }
5927
+ /** The document from before the sticker preview on screen, or `null` when none is (anything else changed the document since). */
5928
+ previewBase() {
5929
+ return this.stickerPreview?.shown === this.doc ? this.stickerPreview.base : null;
5930
+ }
5931
+ readStickerUpdate(update) {
5932
+ try {
5933
+ return normalizeStickerUpdate(update);
5934
+ } catch (e) {
5935
+ throw new PaintEditorError(e.message);
5936
+ }
5937
+ }
5938
+ /** The top-most sticker under a point (document pixels) on a layer (default the active one), or `null`. */
5939
+ stickerAt(layerId, x, y) {
5940
+ if (!Number.isFinite(x) || !Number.isFinite(y)) throw new PaintEditorError("x and y must be numbers of document pixels.");
5941
+ const id = layerId ?? this.doc.activeLayerId;
5942
+ if (!id) return null;
5943
+ this.requireLayer(id);
5944
+ const hit = stickerAt(this.doc.stickers?.[id] ?? [], x, y);
5945
+ return hit ? { ...hit } : null;
5946
+ }
5947
+ /** Picks a sticker for the panel and canvas (`null` for none). Editor state, not an undo step. */
5948
+ selectSticker(id) {
5949
+ if (id === this.selectedSticker) return;
5950
+ this.selectedSticker = id;
5951
+ this.emit([]);
5952
+ }
5953
+ /**
5954
+ * Shows a sticker change without committing it (a drag in progress): only the tiles under its
5955
+ * old and new place are redrawn. `updateSticker` then commits it as one undo step from before
5956
+ * the first preview; `cancelStickerPreview` puts it back.
5957
+ */
5958
+ previewSticker(layerId, id, update) {
5959
+ const { layer, stickers } = this.stickerLayer(layerId);
5960
+ if (isLayerLocked(layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
5961
+ const i = stickers.findIndex((s) => s.id === id);
5962
+ if (i < 0) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
5963
+ const next = { ...stickers[i], ...this.readStickerUpdate(update) };
5964
+ const list = stickers.map((s, j) => j === i ? next : s);
5965
+ const dirty = [stickerRect(stickers[i]), stickerRect(next)];
5966
+ const base = this.previewBase() ?? this.doc;
5967
+ const surface = this.redrawStickers(layer, list, dirty);
5968
+ this.doc = { ...this.doc, layers: mapLayer(this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ...this.doc.stickers ?? {}, [layer.id]: list } };
5969
+ this.stickerPreview = { base, shown: this.doc };
5970
+ this.emit(dirty);
5971
+ return { ...next };
5972
+ }
5973
+ /** Drops a sticker preview, restoring the document from before it. */
5974
+ cancelStickerPreview() {
5975
+ const base = this.previewBase();
5976
+ this.stickerPreview = null;
5977
+ if (!base) return;
5978
+ this.doc = base;
5979
+ this.emit();
5906
5980
  }
5907
5981
  /** Moves, turns, resizes, recolours or restamps one sticker (one undo step). Returns it. */
5908
5982
  updateSticker(layerId, id, update) {
5909
5983
  const { layer, stickers } = this.stickerLayer(layerId);
5910
5984
  const i = stickers.findIndex((s) => s.id === id);
5911
5985
  if (i < 0) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
5912
- let u;
5913
- try {
5914
- u = normalizeStickerUpdate(update);
5915
- } catch (e) {
5916
- throw new PaintEditorError(e.message);
5917
- }
5986
+ const u = this.readStickerUpdate(update);
5918
5987
  const next = { ...stickers[i], ...u };
5919
- this.commitStickers("Edit sticker", layer, stickers.map((s, j) => j === i ? next : s));
5988
+ this.commitStickers("Edit sticker", layer, stickers.map((s, j) => j === i ? next : s), [stickerRect(stickers[i]), stickerRect(next)]);
5920
5989
  return { ...next };
5921
5990
  }
5991
+ /**
5992
+ * Places stickers exactly (one undo step), on top of a sticker layer or onto an empty layer,
5993
+ * which becomes one. Missing fields: size 48 px, rotation 0, the paint colour, opacity 1, a seed
5994
+ * from the new id. Returns the new stickers with their ids.
5995
+ */
5996
+ addStickers(layerId, input) {
5997
+ const layer = this.wetLayer(layerId, "add stickers to");
5998
+ if (!input.length) throw new PaintEditorError("Pass at least one sticker (stamp, x, y).");
5999
+ if (input.length > MAX_ADD_STICKERS) throw new PaintEditorError(`At most ${MAX_ADD_STICKERS} stickers per call; split them over several calls.`);
6000
+ const existing = this.doc.stickers?.[layer.id];
6001
+ if (!existing?.length) {
6002
+ if (this.wet.wetLayerIds().includes(layer.id) || contentBounds(layer.surface)) throw new PaintEditorError(`Layer "${layer.name}" already has paint; add stickers to an empty layer (add_layer) or a sticker layer so they stay editable.`);
6003
+ }
6004
+ let n = this.nextStickerNumber();
6005
+ const added = input.map((raw, i) => {
6006
+ for (const k of ["stamp", "x", "y"]) if (raw[k] === void 0) throw new PaintEditorError(`Sticker ${i} needs ${k}.`);
6007
+ let u;
6008
+ try {
6009
+ u = this.readStickerUpdate(raw);
6010
+ } catch (e) {
6011
+ throw new PaintEditorError(`Sticker ${i}: ${e.message}`);
6012
+ }
6013
+ if (raw.seed !== void 0 && !Number.isInteger(raw.seed)) throw new PaintEditorError(`Sticker ${i}: seed must be a whole number.`);
6014
+ const id = n++;
6015
+ return { id: `st${id}`, size: 48, rotation: 0, color: this.color, opacity: 1, seed: raw.seed ?? mix32(id * 2654435761 >>> 0) & 2147483647, ...u };
6016
+ });
6017
+ this.commitStickers("Add stickers", layer, [...existing ?? [], ...added], existing?.length ? added.map(stickerRect) : void 0);
6018
+ return added.map((s) => ({ ...s }));
6019
+ }
5922
6020
  /** Brings stickers to the top (`front`) or bottom of their layer (one undo step). */
5923
6021
  arrangeStickers(layerId, ids, to) {
5924
6022
  const { layer, stickers } = this.stickerLayer(layerId);
@@ -5926,7 +6024,7 @@ var PaintEditorController = class _PaintEditorController {
5926
6024
  const picked = stickers.filter((s) => ids.includes(s.id));
5927
6025
  const rest = stickers.filter((s) => !ids.includes(s.id));
5928
6026
  const next = to === "front" ? [...rest, ...picked] : [...picked, ...rest];
5929
- this.commitStickers("Arrange stickers", layer, next);
6027
+ this.commitStickers("Arrange stickers", layer, next, picked.map(stickerRect));
5930
6028
  return next.map((s) => s.id);
5931
6029
  }
5932
6030
  /** Deletes stickers (`ids`, or all of them on the layer) (one undo step). Returns the ids removed. */
@@ -5936,7 +6034,7 @@ var PaintEditorController = class _PaintEditorController {
5936
6034
  for (const id of ids) if (!stickers.some((s) => s.id === id)) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
5937
6035
  }
5938
6036
  const removed = ids ? [...ids] : stickers.map((s) => s.id);
5939
- this.commitStickers("Remove stickers", layer, stickers.filter((s) => !removed.includes(s.id)));
6037
+ this.commitStickers("Remove stickers", layer, stickers.filter((s) => !removed.includes(s.id)), ids ? stickers.filter((s) => removed.includes(s.id)).map(stickerRect) : void 0);
5940
6038
  return removed;
5941
6039
  }
5942
6040
  /** Sets a layer's stickers (replays). */
@@ -6512,6 +6610,61 @@ function createPaintStickerTools(c) {
6512
6610
  coordinates: { out: ["stickers[]"] },
6513
6611
  handler: ({ layerId }) => ({ layerId: layerId ?? c.document.activeLayerId, stickers: c.listStickers(layerId) })
6514
6612
  },
6613
+ {
6614
+ name: "sticker_at",
6615
+ title: "Find the sticker at a point",
6616
+ description: "Returns the top-most sticker under a point (document pixels) by its stamp\u2019s shape, or sticker null when none is there, so you can pick one sticker among many similar ones before update_sticker, arrange_stickers or remove_stickers. Changes nothing.",
6617
+ inputSchema: {
6618
+ type: "object",
6619
+ properties: {
6620
+ layerId: LAYER_ID,
6621
+ x: { type: "number", description: "Point x in document pixels." },
6622
+ y: { type: "number", description: "Point y in document pixels." }
6623
+ },
6624
+ required: ["x", "y"],
6625
+ additionalProperties: false
6626
+ },
6627
+ annotations: { title: "Find the sticker at a point", ...READ },
6628
+ coordinates: { in: [""], out: ["sticker"] },
6629
+ handler: ({ layerId, x, y }) => ({ layerId: layerId ?? c.document.activeLayerId, sticker: c.stickerAt(layerId, x, y) })
6630
+ },
6631
+ {
6632
+ name: "add_stickers",
6633
+ title: "Place stickers",
6634
+ description: "Places stickers exactly where you say, on top of a sticker layer or onto an empty layer (which becomes a sticker layer). Use it for deliberate placement; spray with paint_stroke and a sticker brush for a random scatter. One undo step. Returns the new stickers with their ids, for update_sticker, arrange_stickers and remove_stickers.",
6635
+ inputSchema: {
6636
+ type: "object",
6637
+ properties: {
6638
+ layerId: LAYER_ID,
6639
+ stickers: {
6640
+ type: "array",
6641
+ minItems: 1,
6642
+ maxItems: 500,
6643
+ description: "The stickers to place, drawn in this order (later ones on top).",
6644
+ items: {
6645
+ type: "object",
6646
+ properties: {
6647
+ stamp: { type: "string", enum: [...STAMP_KINDS], description: "The stamp." },
6648
+ x: { type: "number", description: "Centre x in document pixels." },
6649
+ y: { type: "number", description: "Centre y in document pixels." },
6650
+ size: { type: "number", minimum: 2, maximum: 2048, description: "Diameter in pixels (default 48)." },
6651
+ rotation: { type: "number", minimum: -3600, maximum: 3600, description: "Degrees clockwise (default 0)." },
6652
+ color: { type: "string", pattern: "^#[0-9a-fA-F]{6}$", description: "Colour #rrggbb (default the paint colour)." },
6653
+ opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0..1 (default 1)." },
6654
+ seed: { type: "integer", minimum: 0, description: "Texture seed (default from the new id); splat and confetti shapes vary with it." }
6655
+ },
6656
+ required: ["stamp", "x", "y"],
6657
+ additionalProperties: false
6658
+ }
6659
+ }
6660
+ },
6661
+ required: ["stickers"],
6662
+ additionalProperties: false
6663
+ },
6664
+ annotations: { title: "Place stickers", ...WRITE },
6665
+ coordinates: { in: ["stickers[]"], out: ["stickers[]"] },
6666
+ handler: ({ layerId, stickers }) => ({ layerId: layerId ?? c.document.activeLayerId, stickers: c.addStickers(layerId, stickers) })
6667
+ },
6515
6668
  {
6516
6669
  name: "update_sticker",
6517
6670
  title: "Change a sticker",
@@ -7508,11 +7661,11 @@ var STICKER_BRUSH = {
7508
7661
  description: "Sticker engine settings: stamps sprayed along the stroke as editable stickers. Missing fields keep their current values.",
7509
7662
  properties: {
7510
7663
  stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [...STAMP_KINDS], description: "A stamp." }, description: "The stamps to spray (one picked at random per sticker)." },
7511
- density: { type: "number", minimum: 0, maximum: 1, description: "Stickers per distance travelled." },
7664
+ density: { type: "number", minimum: 0, maximum: 1, description: "How closely stickers follow each other: about density \xD7 4 stickers per tip diameter of travel (0.25 \u2248 one per diameter, 1 \u2248 four). Default 0.4." },
7512
7665
  sizeJitter: { type: "number", minimum: 0, maximum: 1, description: "Random size change." },
7513
7666
  rotationJitter: { type: "number", minimum: 0, maximum: 1, description: "Random turn as a fraction of \xB1180\xB0." },
7514
7667
  scatter: { type: "number", minimum: 0, maximum: 2, description: "How far from the path stickers land, in tip diameters." },
7515
- colorJitter: { type: "number", minimum: 0, maximum: 1, description: "Random colour change around the paint colour." }
7668
+ colorJitter: { type: "number", minimum: 0, maximum: 1, description: "Random colour change around the paint colour: at 1, up to \xB140\xB0 of hue and \xB10.15 OKLab lightness, kept in gamut. Default 0.2." }
7516
7669
  },
7517
7670
  additionalProperties: false
7518
7671
  };
@@ -8331,6 +8484,7 @@ function hostTool({ coordinates, ...tool }, { origin, onChange }) {
8331
8484
  var PAINT_TOOLS = [
8332
8485
  { id: "brush", label: "Brush", key: "b" },
8333
8486
  { id: "eyedropper", label: "Eyedropper", key: "i" },
8487
+ { id: "sticker", label: "Stickers", key: "s" },
8334
8488
  { id: "pan", label: "Pan", key: "h" },
8335
8489
  { id: "rotate", label: "Rotate view", key: "r" }
8336
8490
  ];
@@ -8383,6 +8537,7 @@ var PaintGesture = class {
8383
8537
  this.pick(e);
8384
8538
  return false;
8385
8539
  }
8540
+ if (tool === "sticker") return this.stickerDown(e);
8386
8541
  try {
8387
8542
  const p = this.pen(e);
8388
8543
  const session = this.controller.beginStroke({ start: p });
@@ -8394,6 +8549,29 @@ var PaintGesture = class {
8394
8549
  return false;
8395
8550
  }
8396
8551
  }
8552
+ /**
8553
+ * The Stickers tool: pressing a sticker picks it and dragging moves it (one undo step at the
8554
+ * drop); pressing anywhere else places the active brush's first stamp there, at its tip size and
8555
+ * the paint colour, and picks it.
8556
+ */
8557
+ stickerDown(e) {
8558
+ const p = this.doc(e);
8559
+ try {
8560
+ const hit = this.controller.stickerAt(void 0, p.x, p.y);
8561
+ if (hit) {
8562
+ this.controller.selectSticker(hit.id);
8563
+ this.mode = { kind: "sticker", pointerId: e.pointerId, id: hit.id, dx: hit.x - p.x, dy: hit.y - p.y, at: null };
8564
+ return true;
8565
+ }
8566
+ const brush = this.controller.getState().brush;
8567
+ const size = Math.min(2048, Math.max(2, Math.round(brush.tip.size)));
8568
+ const [added] = this.controller.addStickers(void 0, [{ stamp: brush.sticker.stamps[0] ?? "star", x: round2(p.x), y: round2(p.y), size }]);
8569
+ this.controller.selectSticker(added.id);
8570
+ } catch (err) {
8571
+ this.error = err instanceof Error ? err.message : String(err);
8572
+ }
8573
+ return false;
8574
+ }
8397
8575
  pick(e) {
8398
8576
  const p = this.doc(e);
8399
8577
  const { width, height } = this.controller.document.canvas;
@@ -8416,6 +8594,16 @@ var PaintGesture = class {
8416
8594
  this.controller.setView({ rotation: r });
8417
8595
  return;
8418
8596
  }
8597
+ if (m.kind === "sticker") {
8598
+ const p = this.doc(e);
8599
+ m.at = { x: round2(p.x + m.dx), y: round2(p.y + m.dy) };
8600
+ try {
8601
+ this.controller.previewSticker(void 0, m.id, m.at);
8602
+ } catch (err) {
8603
+ this.error = err instanceof Error ? err.message : String(err);
8604
+ }
8605
+ return;
8606
+ }
8419
8607
  const session = this.controller.activeStroke;
8420
8608
  if (!session) return;
8421
8609
  const events = typeof e.getCoalescedEvents === "function" ? e.getCoalescedEvents() : [];
@@ -8430,11 +8618,20 @@ var PaintGesture = class {
8430
8618
  this.mode = null;
8431
8619
  this.predicted = [];
8432
8620
  if (m.kind === "stroke") this.controller.activeStroke?.end();
8621
+ if (m.kind === "sticker" && m.at) {
8622
+ try {
8623
+ this.controller.updateSticker(void 0, m.id, m.at);
8624
+ } catch (err) {
8625
+ this.controller.cancelStickerPreview();
8626
+ this.error = err instanceof Error ? err.message : String(err);
8627
+ }
8628
+ }
8433
8629
  }
8434
8630
  cancel() {
8435
8631
  this.penDown = false;
8436
8632
  this.predicted = [];
8437
8633
  if (this.mode?.kind === "stroke") this.controller.activeStroke?.cancel();
8634
+ if (this.mode?.kind === "sticker") this.controller.cancelStickerPreview();
8438
8635
  this.mode = null;
8439
8636
  }
8440
8637
  get active() {
@@ -8455,6 +8652,7 @@ var PaintGesture = class {
8455
8652
  this.controller.setView({ zoom, pan: { x: px - (px - s.view.pan.x) * k, y: py - (py - s.view.pan.y) * k } });
8456
8653
  }
8457
8654
  };
8655
+ var round2 = (v) => Math.round(v * 100) / 100;
8458
8656
  function handlePaintShortcut(controller, gesture, e) {
8459
8657
  const mod = e.ctrlKey || e.metaKey;
8460
8658
  const key = e.key.toLowerCase();
@@ -8532,6 +8730,15 @@ function guideOverlay(controller) {
8532
8730
  const s = controller.getState();
8533
8731
  const size = s.document.canvas;
8534
8732
  const out = [];
8733
+ const layerId = s.document.activeLayerId;
8734
+ const picked = layerId && s.selectedSticker ? s.document.stickers?.[layerId]?.find((x) => x.id === s.selectedSticker) : void 0;
8735
+ if (picked) {
8736
+ const r = picked.size / 2 + 2;
8737
+ const a = picked.rotation * Math.PI / 180;
8738
+ const corner = (u, v) => ({ x: picked.x + (u * Math.cos(a) - v * Math.sin(a)) * r, y: picked.y + (u * Math.sin(a) + v * Math.cos(a)) * r });
8739
+ const box = [corner(-1, -1), corner(1, -1), corner(1, 1), corner(-1, 1)];
8740
+ for (let i = 0; i < 4; i++) out.push({ from: box[i], to: box[(i + 1) % 4], kind: "sticker" });
8741
+ }
8535
8742
  for (const st of s.guides.stencils) {
8536
8743
  if (!st.enabled) continue;
8537
8744
  const line = stencilOutline(st);
@@ -9392,6 +9599,7 @@ export {
9392
9599
  startWetClock,
9393
9600
  stencilMask,
9394
9601
  stencilOutline,
9602
+ stickerAt,
9395
9603
  stickerRect,
9396
9604
  stickerSurface,
9397
9605
  strokeBounds,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brushes
3
3
  * category sticker) stay objects on their layer, which these tools list, move, turn, resize,
4
- * recolour, reorder and delete. Each change is one undo step and redraws the layer.
4
+ * recolour, reorder and delete, find by point (`sticker_at`), and places new ones exactly (`add_stickers`). Each change is one undo step and redraws the layer.
5
5
  */
6
6
  import type { PaintAgentTool } from './hosted.cjs';
7
7
  import type { PaintEditorController } from './controller.cjs';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent tools for stickers: stamps sprayed with a sticker brush (`paint_stroke`, list_brushes
3
3
  * category sticker) stay objects on their layer, which these tools list, move, turn, resize,
4
- * recolour, reorder and delete. Each change is one undo step and redraws the layer.
4
+ * recolour, reorder and delete, find by point (`sticker_at`), and places new ones exactly (`add_stickers`). Each change is one undo step and redraws the layer.
5
5
  */
6
6
  import type { PaintAgentTool } from './hosted.js';
7
7
  import type { PaintEditorController } from './controller.js';
@@ -37,7 +37,7 @@ export interface Sticker {
37
37
  export interface StickerSettings {
38
38
  /** The stamps to spray (picked at random per sticker). */
39
39
  stamps: StampKind[];
40
- /** Stickers per tip diameter of travel. */
40
+ /** How closely stickers follow each other: about `density × 4` per tip diameter of travel (0.25 ≈ one per diameter). */
41
41
  density: number;
42
42
  /** Random size change. */
43
43
  sizeJitter: number;
@@ -98,5 +98,12 @@ export declare class StickerSpray {
98
98
  export declare function renderStickers(stickers: readonly Sticker[], target: PaintTileTarget): void;
99
99
  /** Checks and rounds a sticker change; throws a sentence naming the bad field. */
100
100
  export declare function normalizeStickerUpdate(u: Partial<Omit<Sticker, 'id'>>): Partial<Omit<Sticker, 'id'>>;
101
- /** A sticker layer's pixels: its stickers drawn bottom first over a transparent layer. */
102
- export declare function stickerSurface(stickers: readonly Sticker[]): TiledSurface;
101
+ /**
102
+ * A sticker layer's pixels: its stickers drawn bottom first over a transparent layer. With `base`
103
+ * (the layer's current pixels, at offset 0) and `dirty` rects, only the tiles those rects touch are
104
+ * drawn again, from the stickers that reach them; the rest are kept. The pixels are the same as a
105
+ * full redraw, since a tile depends only on the stickers over it.
106
+ */
107
+ export declare function stickerSurface(stickers: readonly Sticker[], base?: TiledSurface, dirty?: readonly RasterRect[]): TiledSurface;
108
+ /** The top-most sticker under a point (document pixels), by its stamp's shape, or `null`. */
109
+ export declare function stickerAt(stickers: readonly Sticker[], x: number, y: number): Sticker | null;
@@ -37,7 +37,7 @@ export interface Sticker {
37
37
  export interface StickerSettings {
38
38
  /** The stamps to spray (picked at random per sticker). */
39
39
  stamps: StampKind[];
40
- /** Stickers per tip diameter of travel. */
40
+ /** How closely stickers follow each other: about `density × 4` per tip diameter of travel (0.25 ≈ one per diameter). */
41
41
  density: number;
42
42
  /** Random size change. */
43
43
  sizeJitter: number;
@@ -98,5 +98,12 @@ export declare class StickerSpray {
98
98
  export declare function renderStickers(stickers: readonly Sticker[], target: PaintTileTarget): void;
99
99
  /** Checks and rounds a sticker change; throws a sentence naming the bad field. */
100
100
  export declare function normalizeStickerUpdate(u: Partial<Omit<Sticker, 'id'>>): Partial<Omit<Sticker, 'id'>>;
101
- /** A sticker layer's pixels: its stickers drawn bottom first over a transparent layer. */
102
- export declare function stickerSurface(stickers: readonly Sticker[]): TiledSurface;
101
+ /**
102
+ * A sticker layer's pixels: its stickers drawn bottom first over a transparent layer. With `base`
103
+ * (the layer's current pixels, at offset 0) and `dirty` rects, only the tiles those rects touch are
104
+ * drawn again, from the stickers that reach them; the rest are kept. The pixels are the same as a
105
+ * full redraw, since a tile depends only on the stickers over it.
106
+ */
107
+ export declare function stickerSurface(stickers: readonly Sticker[], base?: TiledSurface, dirty?: readonly RasterRect[]): TiledSurface;
108
+ /** The top-most sticker under a point (document pixels), by its stamp's shape, or `null`. */
109
+ export declare function stickerAt(stickers: readonly Sticker[], x: number, y: number): Sticker | null;
@@ -34,7 +34,7 @@ export interface PaintPointerEvent extends PointerSample {
34
34
  getCoalescedEvents?(): PaintPointerEvent[];
35
35
  getPredictedEvents?(): PaintPointerEvent[];
36
36
  }
37
- export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate';
37
+ export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate' | 'sticker';
38
38
  export declare const PAINT_TOOLS: ReadonlyArray<{
39
39
  id: PaintTool;
40
40
  label: string;
@@ -63,6 +63,12 @@ export declare class PaintGesture {
63
63
  private pen;
64
64
  /** Pointer down; returns true when the gesture took the pointer (capture it). */
65
65
  down(e: PaintPointerEvent): boolean;
66
+ /**
67
+ * The Stickers tool: pressing a sticker picks it and dragging moves it (one undo step at the
68
+ * drop); pressing anywhere else places the active brush's first stamp there, at its tip size and
69
+ * the paint colour, and picks it.
70
+ */
71
+ private stickerDown;
66
72
  private pick;
67
73
  move(e: PaintPointerEvent): void;
68
74
  up(e: PaintPointerEvent): void;
@@ -101,11 +107,12 @@ export declare class PaintCanvasPresenter {
101
107
  /** Draws what changed into `ctx` (a canvas the size of the document); returns the tiles drawn. */
102
108
  render(ctx: Paint2DContext): number;
103
109
  }
104
- /** Lines to draw over the canvas for the guides, in document pixels, with a style key. */
110
+ export type GuideOverlayKind = 'symmetry' | 'perspective' | 'snap' | 'stencil' | 'sticker';
111
+ /** Lines to draw over the canvas for the guides and the picked sticker, in document pixels, with a style key. */
105
112
  export declare function guideOverlay(controller: PaintEditorController): Array<{
106
113
  from: Point2;
107
114
  to: Point2;
108
- kind: 'symmetry' | 'perspective' | 'snap' | 'stencil';
115
+ kind: GuideOverlayKind;
109
116
  }>;
110
117
  /** One slider of a panel: a path into the brush (or paper) settings. */
111
118
  export interface SliderControl {
@@ -34,7 +34,7 @@ export interface PaintPointerEvent extends PointerSample {
34
34
  getCoalescedEvents?(): PaintPointerEvent[];
35
35
  getPredictedEvents?(): PaintPointerEvent[];
36
36
  }
37
- export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate';
37
+ export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate' | 'sticker';
38
38
  export declare const PAINT_TOOLS: ReadonlyArray<{
39
39
  id: PaintTool;
40
40
  label: string;
@@ -63,6 +63,12 @@ export declare class PaintGesture {
63
63
  private pen;
64
64
  /** Pointer down; returns true when the gesture took the pointer (capture it). */
65
65
  down(e: PaintPointerEvent): boolean;
66
+ /**
67
+ * The Stickers tool: pressing a sticker picks it and dragging moves it (one undo step at the
68
+ * drop); pressing anywhere else places the active brush's first stamp there, at its tip size and
69
+ * the paint colour, and picks it.
70
+ */
71
+ private stickerDown;
66
72
  private pick;
67
73
  move(e: PaintPointerEvent): void;
68
74
  up(e: PaintPointerEvent): void;
@@ -101,11 +107,12 @@ export declare class PaintCanvasPresenter {
101
107
  /** Draws what changed into `ctx` (a canvas the size of the document); returns the tiles drawn. */
102
108
  render(ctx: Paint2DContext): number;
103
109
  }
104
- /** Lines to draw over the canvas for the guides, in document pixels, with a style key. */
110
+ export type GuideOverlayKind = 'symmetry' | 'perspective' | 'snap' | 'stencil' | 'sticker';
111
+ /** Lines to draw over the canvas for the guides and the picked sticker, in document pixels, with a style key. */
105
112
  export declare function guideOverlay(controller: PaintEditorController): Array<{
106
113
  from: Point2;
107
114
  to: Point2;
108
- kind: 'symmetry' | 'perspective' | 'snap' | 'stencil';
115
+ kind: GuideOverlayKind;
109
116
  }>;
110
117
  /** One slider of a panel: a path into the brush (or paper) settings. */
111
118
  export interface SliderControl {
@@ -55,7 +55,7 @@
55
55
 
56
56
 
57
57
 
58
- var _chunkUXETV2NCcjs = require('../chunk-UXETV2NC.cjs');
58
+ var _chunkGA4EU4P3cjs = require('../chunk-GA4EU4P3.cjs');
59
59
  require('../chunk-SJ2CPTQC.cjs');
60
60
  require('../chunk-2BSBFBOA.cjs');
61
61
 
@@ -63,7 +63,8 @@ require('../chunk-2BSBFBOA.cjs');
63
63
 
64
64
 
65
65
  var _chunkA6QWKBJPcjs = require('../chunk-A6QWKBJP.cjs');
66
- require('../chunk-5UEFBM2M.cjs');
66
+ require('../chunk-RD7RX52G.cjs');
67
+ require('../chunk-7AHBW2CQ.cjs');
67
68
  require('../chunk-IPJ3TEYR.cjs');
68
69
 
69
70
 
@@ -125,4 +126,4 @@ require('../chunk-IPJ3TEYR.cjs');
125
126
 
126
127
 
127
128
 
128
- exports.EMPTY_TOKEN_STATE = _chunkUXETV2NCcjs.EMPTY_TOKEN_STATE; exports.TOKEN_SCOPES_BY_TYPE = _chunkUXETV2NCcjs.TOKEN_SCOPES_BY_TYPE; exports.TOKEN_TYPES = _chunkUXETV2NCcjs.TOKEN_TYPES; exports.TokenError = _chunkUXETV2NCcjs.TokenError; exports.TokenStore = _chunkUXETV2NCcjs.TokenStore; exports.W3C_TOKENS_EXTENSION = _chunkUXETV2NCcjs.W3C_TOKENS_EXTENSION; exports.addTokenMode = _chunkUXETV2NCcjs.addTokenMode; exports.checkTokenAlias = _chunkUXETV2NCcjs.checkTokenAlias; exports.coerceTokenLiteral = _chunkUXETV2NCcjs.coerceTokenLiteral; exports.createTokenCollection = _chunkUXETV2NCcjs.createTokenCollection; exports.createTokenStore = _chunkUXETV2NCcjs.createTokenStore; exports.createTokenStyleSource = _chunkUXETV2NCcjs.createTokenStyleSource; exports.createTokenVariable = _chunkUXETV2NCcjs.createTokenVariable; exports.createTokensEditorDocument = _chunkUXETV2NCcjs.createTokensEditorDocument; exports.createTokensStyleToolProvider = _chunkUXETV2NCcjs.createTokensStyleToolProvider; exports.cssString = _chunkUXETV2NCcjs.cssString; exports.defaultTokenId = _chunkUXETV2NCcjs.defaultTokenId; exports.defaultTokenValue = _chunkUXETV2NCcjs.defaultTokenValue; exports.deleteTokenCollection = _chunkUXETV2NCcjs.deleteTokenCollection; exports.deleteTokenVariables = _chunkUXETV2NCcjs.deleteTokenVariables; exports.exportTokensCss = _chunkUXETV2NCcjs.exportTokensCss; exports.exportW3CTokens = _chunkUXETV2NCcjs.exportW3CTokens; exports.exportW3CTokensJson = _chunkUXETV2NCcjs.exportW3CTokensJson; exports.findTokenCollection = _chunkUXETV2NCcjs.findTokenCollection; exports.findTokenMode = _chunkUXETV2NCcjs.findTokenMode; exports.findTokenVariable = _chunkUXETV2NCcjs.findTokenVariable; exports.formatTokenCssValue = _chunkUXETV2NCcjs.formatTokenCssValue; exports.formatTokenValue = _chunkUXETV2NCcjs.formatTokenValue; exports.getCollectionVariables = _chunkUXETV2NCcjs.getCollectionVariables; exports.getCurrentMode = _chunkUXETV2NCcjs.getCurrentMode; exports.getDefaultMode = _chunkUXETV2NCcjs.getDefaultMode; exports.getTokenCollection = _chunkUXETV2NCcjs.getTokenCollection; exports.getTokenCssName = _chunkUXETV2NCcjs.getTokenCssName; exports.getTokenCssVariables = _chunkUXETV2NCcjs.getTokenCssVariables; exports.getTokenVariable = _chunkUXETV2NCcjs.getTokenVariable; exports.hexToRgba = _chunkA6QWKBJPcjs.hexToRgba; exports.importW3CTokens = _chunkUXETV2NCcjs.importW3CTokens; exports.isTokenAlias = _chunkUXETV2NCcjs.isTokenAlias; exports.isTokenInScope = _chunkUXETV2NCcjs.isTokenInScope; exports.isTokenScopeKnown = _chunkUXETV2NCcjs.isTokenScopeKnown; exports.literalTokenType = _chunkUXETV2NCcjs.literalTokenType; exports.moveTokenMode = _chunkUXETV2NCcjs.moveTokenMode; exports.normalizeTokenColor = _chunkA6QWKBJPcjs.normalizeTokenColor; exports.normalizeTokenName = _chunkUXETV2NCcjs.normalizeTokenName; exports.normalizeTokenScopes = _chunkUXETV2NCcjs.normalizeTokenScopes; exports.parseTokenState = _chunkUXETV2NCcjs.parseTokenState; exports.prepareTokenValue = _chunkUXETV2NCcjs.prepareTokenValue; exports.removeTokenMode = _chunkUXETV2NCcjs.removeTokenMode; exports.renameTokenCollection = _chunkUXETV2NCcjs.renameTokenCollection; exports.renameTokenMode = _chunkUXETV2NCcjs.renameTokenMode; exports.renameTokenVariable = _chunkUXETV2NCcjs.renameTokenVariable; exports.resolveToken = _chunkUXETV2NCcjs.resolveToken; exports.resolveTokenInMode = _chunkUXETV2NCcjs.resolveTokenInMode; exports.resolveTokenValue = _chunkUXETV2NCcjs.resolveTokenValue; exports.rgbaToHex = _chunkA6QWKBJPcjs.rgbaToHex; exports.setTokenValue = _chunkUXETV2NCcjs.setTokenValue; exports.tokenSlug = _chunkUXETV2NCcjs.tokenSlug; exports.tokensStyleDomain = _chunkUXETV2NCcjs.tokensStyleDomain; exports.updateTokenVariable = _chunkUXETV2NCcjs.updateTokenVariable;
129
+ exports.EMPTY_TOKEN_STATE = _chunkGA4EU4P3cjs.EMPTY_TOKEN_STATE; exports.TOKEN_SCOPES_BY_TYPE = _chunkGA4EU4P3cjs.TOKEN_SCOPES_BY_TYPE; exports.TOKEN_TYPES = _chunkGA4EU4P3cjs.TOKEN_TYPES; exports.TokenError = _chunkGA4EU4P3cjs.TokenError; exports.TokenStore = _chunkGA4EU4P3cjs.TokenStore; exports.W3C_TOKENS_EXTENSION = _chunkGA4EU4P3cjs.W3C_TOKENS_EXTENSION; exports.addTokenMode = _chunkGA4EU4P3cjs.addTokenMode; exports.checkTokenAlias = _chunkGA4EU4P3cjs.checkTokenAlias; exports.coerceTokenLiteral = _chunkGA4EU4P3cjs.coerceTokenLiteral; exports.createTokenCollection = _chunkGA4EU4P3cjs.createTokenCollection; exports.createTokenStore = _chunkGA4EU4P3cjs.createTokenStore; exports.createTokenStyleSource = _chunkGA4EU4P3cjs.createTokenStyleSource; exports.createTokenVariable = _chunkGA4EU4P3cjs.createTokenVariable; exports.createTokensEditorDocument = _chunkGA4EU4P3cjs.createTokensEditorDocument; exports.createTokensStyleToolProvider = _chunkGA4EU4P3cjs.createTokensStyleToolProvider; exports.cssString = _chunkGA4EU4P3cjs.cssString; exports.defaultTokenId = _chunkGA4EU4P3cjs.defaultTokenId; exports.defaultTokenValue = _chunkGA4EU4P3cjs.defaultTokenValue; exports.deleteTokenCollection = _chunkGA4EU4P3cjs.deleteTokenCollection; exports.deleteTokenVariables = _chunkGA4EU4P3cjs.deleteTokenVariables; exports.exportTokensCss = _chunkGA4EU4P3cjs.exportTokensCss; exports.exportW3CTokens = _chunkGA4EU4P3cjs.exportW3CTokens; exports.exportW3CTokensJson = _chunkGA4EU4P3cjs.exportW3CTokensJson; exports.findTokenCollection = _chunkGA4EU4P3cjs.findTokenCollection; exports.findTokenMode = _chunkGA4EU4P3cjs.findTokenMode; exports.findTokenVariable = _chunkGA4EU4P3cjs.findTokenVariable; exports.formatTokenCssValue = _chunkGA4EU4P3cjs.formatTokenCssValue; exports.formatTokenValue = _chunkGA4EU4P3cjs.formatTokenValue; exports.getCollectionVariables = _chunkGA4EU4P3cjs.getCollectionVariables; exports.getCurrentMode = _chunkGA4EU4P3cjs.getCurrentMode; exports.getDefaultMode = _chunkGA4EU4P3cjs.getDefaultMode; exports.getTokenCollection = _chunkGA4EU4P3cjs.getTokenCollection; exports.getTokenCssName = _chunkGA4EU4P3cjs.getTokenCssName; exports.getTokenCssVariables = _chunkGA4EU4P3cjs.getTokenCssVariables; exports.getTokenVariable = _chunkGA4EU4P3cjs.getTokenVariable; exports.hexToRgba = _chunkA6QWKBJPcjs.hexToRgba; exports.importW3CTokens = _chunkGA4EU4P3cjs.importW3CTokens; exports.isTokenAlias = _chunkGA4EU4P3cjs.isTokenAlias; exports.isTokenInScope = _chunkGA4EU4P3cjs.isTokenInScope; exports.isTokenScopeKnown = _chunkGA4EU4P3cjs.isTokenScopeKnown; exports.literalTokenType = _chunkGA4EU4P3cjs.literalTokenType; exports.moveTokenMode = _chunkGA4EU4P3cjs.moveTokenMode; exports.normalizeTokenColor = _chunkA6QWKBJPcjs.normalizeTokenColor; exports.normalizeTokenName = _chunkGA4EU4P3cjs.normalizeTokenName; exports.normalizeTokenScopes = _chunkGA4EU4P3cjs.normalizeTokenScopes; exports.parseTokenState = _chunkGA4EU4P3cjs.parseTokenState; exports.prepareTokenValue = _chunkGA4EU4P3cjs.prepareTokenValue; exports.removeTokenMode = _chunkGA4EU4P3cjs.removeTokenMode; exports.renameTokenCollection = _chunkGA4EU4P3cjs.renameTokenCollection; exports.renameTokenMode = _chunkGA4EU4P3cjs.renameTokenMode; exports.renameTokenVariable = _chunkGA4EU4P3cjs.renameTokenVariable; exports.resolveToken = _chunkGA4EU4P3cjs.resolveToken; exports.resolveTokenInMode = _chunkGA4EU4P3cjs.resolveTokenInMode; exports.resolveTokenValue = _chunkGA4EU4P3cjs.resolveTokenValue; exports.rgbaToHex = _chunkA6QWKBJPcjs.rgbaToHex; exports.setTokenValue = _chunkGA4EU4P3cjs.setTokenValue; exports.tokenSlug = _chunkGA4EU4P3cjs.tokenSlug; exports.tokensStyleDomain = _chunkGA4EU4P3cjs.tokensStyleDomain; exports.updateTokenVariable = _chunkGA4EU4P3cjs.updateTokenVariable;
@@ -55,7 +55,7 @@ import {
55
55
  tokenSlug,
56
56
  tokensStyleDomain,
57
57
  updateTokenVariable
58
- } from "../chunk-ILP77UD6.js";
58
+ } from "../chunk-YGQVCQTG.js";
59
59
  import "../chunk-XBQX76CT.js";
60
60
  import "../chunk-HF5QZS7Z.js";
61
61
  import {
@@ -63,7 +63,8 @@ import {
63
63
  normalizeTokenColor,
64
64
  rgbaToHex
65
65
  } from "../chunk-2WPNAGHI.js";
66
- import "../chunk-MHLU6GRJ.js";
66
+ import "../chunk-JEGJP4OW.js";
67
+ import "../chunk-F67XMVDI.js";
67
68
  import "../chunk-6ONMQ6WF.js";
68
69
  export {
69
70
  EMPTY_TOKEN_STATE,