@pixerate/editor 0.171.0 → 0.174.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 (63) hide show
  1. package/README.md +4 -0
  2. package/dist/agent/index.cjs +28 -28
  3. package/dist/agent/index.js +3 -3
  4. package/dist/animation-editor/index.cjs +9 -9
  5. package/dist/animation-editor/index.js +1 -1
  6. package/dist/canvas/index.cjs +10 -10
  7. package/dist/canvas/index.js +2 -2
  8. package/dist/chart/index.cjs +156 -68
  9. package/dist/chart/index.d.cts +1 -0
  10. package/dist/chart/index.d.ts +1 -0
  11. package/dist/chart/index.js +91 -3
  12. package/dist/chart/layout-shared.d.cts +2 -1
  13. package/dist/chart/layout-shared.d.ts +2 -1
  14. package/dist/chart/layout.d.cts +5 -0
  15. package/dist/chart/layout.d.ts +5 -0
  16. package/dist/chart/tooltip.d.cts +53 -0
  17. package/dist/chart/tooltip.d.ts +53 -0
  18. package/dist/chart/types.d.cts +14 -0
  19. package/dist/chart/types.d.ts +14 -0
  20. package/dist/{chunk-CYKWYP6D.cjs → chunk-6DUEV36F.cjs} +14 -14
  21. package/dist/{chunk-7KWJEYIK.js → chunk-6G2NLMVK.js} +36 -4
  22. package/dist/{chunk-RUZQMYXH.cjs → chunk-A3A5TI6R.cjs} +43 -11
  23. package/dist/{chunk-SBAPXFPB.cjs → chunk-FHNGNL3V.cjs} +44 -44
  24. package/dist/{chunk-2F4GAZL5.cjs → chunk-GXEC4FS6.cjs} +16 -16
  25. package/dist/{chunk-T62BRXMS.js → chunk-IMHRN4ZZ.js} +1 -1
  26. package/dist/{chunk-N3ACT6VJ.js → chunk-KPWG3PSW.js} +1 -1
  27. package/dist/chunk-NZ3CTY7K.js +260 -0
  28. package/dist/{chunk-M52UCHVZ.js → chunk-OJQVKJYD.js} +12 -1
  29. package/dist/{chunk-YN4AYYBJ.js → chunk-OZSA5YEJ.js} +1 -1
  30. package/dist/{chunk-ZUPP4NKM.js → chunk-R2VHVQVY.js} +2 -2
  31. package/dist/{chunk-GD34ICEX.cjs → chunk-RLOIEDA3.cjs} +10 -10
  32. package/dist/{chunk-WOIXNDHV.cjs → chunk-TUXKLM5W.cjs} +13 -2
  33. package/dist/chunk-VCL7CB56.cjs +260 -0
  34. package/dist/{chunk-HCC2LBCW.js → chunk-WMVEYSOA.js} +1 -1
  35. package/dist/{chunk-3OSXHLIT.cjs → chunk-Z64NRDEH.cjs} +7 -7
  36. package/dist/commands/format.d.cts +43 -0
  37. package/dist/commands/format.d.ts +43 -0
  38. package/dist/commands/index.cjs +7 -1
  39. package/dist/commands/index.d.cts +1 -0
  40. package/dist/commands/index.d.ts +1 -0
  41. package/dist/commands/index.js +6 -0
  42. package/dist/effects/helpers.d.cts +11 -2
  43. package/dist/effects/helpers.d.ts +11 -2
  44. package/dist/effects/index.cjs +40 -34
  45. package/dist/effects/index.js +8 -2
  46. package/dist/effects/types.d.cts +2 -0
  47. package/dist/effects/types.d.ts +2 -0
  48. package/dist/extensions/index.cjs +5 -5
  49. package/dist/extensions/index.js +4 -4
  50. package/dist/image-editor/index.cjs +13 -13
  51. package/dist/image-editor/index.js +1 -1
  52. package/dist/index.cjs +16 -10
  53. package/dist/index.d.cts +1 -0
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +10 -4
  56. package/dist/paint-editor/index.cjs +7 -7
  57. package/dist/paint-editor/index.js +2 -2
  58. package/dist/vector/index.cjs +6 -6
  59. package/dist/vector/index.js +1 -1
  60. package/dist/video-editor/index.cjs +309 -309
  61. package/dist/video-editor/index.js +3 -3
  62. package/package.json +114 -11
  63. package/skills/pixerate-chart/SKILL.md +1 -0
@@ -68,7 +68,20 @@ function resolveEffectValues(description, values) {
68
68
  if (errors.length) throw new EffectControlError(description.id, errors);
69
69
  return { ...description.defaults, ..._nullishCoalesce(values, () => ( {})) };
70
70
  }
71
- var matchesFilters = (e, o) => (!o.kind || e.kind === o.kind) && (!o.category || e.category === o.category) && (!o.use || e.uses.includes(o.use));
71
+ function normaliseEffectTag(tag) {
72
+ return tag.trim().toLowerCase().replace(/[\s_-]+/g, "-");
73
+ }
74
+ function hasEffectTags(e, tags) {
75
+ if (!_optionalChain([tags, 'optionalAccess', _ => _.length])) return true;
76
+ const own = new Set((_nullishCoalesce(e.tags, () => ( []))).map(normaliseEffectTag));
77
+ return tags.every((t) => own.has(normaliseEffectTag(t)));
78
+ }
79
+ function countEffectTags(effects) {
80
+ const counts = /* @__PURE__ */ new Map();
81
+ for (const e of effects) for (const tag of new Set((_nullishCoalesce(e.tags, () => ( []))).map(normaliseEffectTag))) if (tag) counts.set(tag, (_nullishCoalesce(counts.get(tag), () => ( 0))) + 1);
82
+ return [...counts].map(([tag, count]) => ({ tag, count })).sort((a, b) => b.count - a.count || a.tag.localeCompare(b.tag));
83
+ }
84
+ var matchesFilters = (e, o) => (!o.kind || e.kind === o.kind) && (!o.category || e.category === o.category) && (!o.use || e.uses.includes(o.use)) && hasEffectTags(e, o.tags);
72
85
  function searchEffectSummaries(catalog, query = "", options = {}) {
73
86
  const words = query.toLowerCase().split(/\s+/).filter(Boolean);
74
87
  const scored = [];
@@ -174,6 +187,12 @@ var object = (properties, required = []) => ({
174
187
  additionalProperties: false
175
188
  });
176
189
  var ENUM_LIMIT = 60;
190
+ var TAG_LIMIT = 40;
191
+ function nearestTags(tag, known) {
192
+ const t = normaliseEffectTag(tag);
193
+ const stem = t.slice(0, 4);
194
+ return known.filter((k) => k.tag.includes(t) || t.includes(k.tag) || stem.length === 4 && k.tag.startsWith(stem)).slice(0, 5).map((k) => k.tag);
195
+ }
177
196
  var summaryOut = (e) => ({
178
197
  id: e.id,
179
198
  name: e.name,
@@ -181,6 +200,7 @@ var summaryOut = (e) => ({
181
200
  category: e.category,
182
201
  uses: e.uses,
183
202
  ...e.description ? { description: e.description } : {},
203
+ ..._optionalChain([e, 'access', _2 => _2.tags, 'optionalAccess', _3 => _3.length]) ? { tags: e.tags } : {},
184
204
  transparent: e.transparent,
185
205
  loop: e.loop,
186
206
  ...e.duration !== void 0 ? { duration: e.duration } : {}
@@ -191,7 +211,7 @@ function createEffectToolProvider(host) {
191
211
  const notify = () => listeners.forEach((l) => l());
192
212
  const catalogFor = (provider) => {
193
213
  if (!provider) return null;
194
- if (_optionalChain([catalog, 'optionalAccess', _ => _.provider]) !== provider) {
214
+ if (_optionalChain([catalog, 'optionalAccess', _4 => _4.provider]) !== provider) {
195
215
  const entry = { provider, effects: null };
196
216
  catalog = entry;
197
217
  Promise.resolve().then(() => provider.list()).then((effects) => {
@@ -227,7 +247,7 @@ function createEffectToolProvider(host) {
227
247
  description: `${what}: control name \u2192 value, as listed by describe_effect (its "controls" schema: types, ranges, units and defaults). Only the given controls change; colours are "#rrggbb".${keyframes ? " A number control may instead be keyframes { keys: [{ t: ms from the start, v, ease }] }." : ""} Unknown controls and out-of-range values are refused with the valid ones.`
228
248
  });
229
249
  const effectIdSchema = (uses) => {
230
- const effects = _optionalChain([catalogFor, 'call', _2 => _2(host.provider()), 'optionalAccess', _3 => _3.filter, 'call', _4 => _4((e) => (e.kind !== "motion" || uses.includes("motion")) && e.uses.some((u) => uses.includes(u)))]);
250
+ const effects = _optionalChain([catalogFor, 'call', _5 => _5(host.provider()), 'optionalAccess', _6 => _6.filter, 'call', _7 => _7((e) => (e.kind !== "motion" || uses.includes("motion")) && e.uses.some((u) => uses.includes(u)))]);
231
251
  const base = `An effect id from search_effects (use ${uses.map((u) => `"${u}"`).join(" or ")}).`;
232
252
  return effects && effects.length && effects.length <= ENUM_LIMIT ? { type: "string", enum: effects.map((e) => e.id), description: `${base} One of: ${effects.map((e) => `${e.id} (${e.name})`).join(", ")}.` } : { type: "string", minLength: 1, description: base };
233
253
  };
@@ -241,21 +261,30 @@ function createEffectToolProvider(host) {
241
261
  {
242
262
  name: "search_effects",
243
263
  title: "Search effects",
244
- description: `Searches the effects provider's catalog. Every word of query must appear in an effect's id, name, category, tags or description; filter by kind (shader, vector, motion), category or use (${EFFECT_USES.join(", ")}). For this editor, apply_effect takes uses ${host.applyUses.join(" or ")}. Returns { provider, effects: [{ id, name, kind, category, uses, description, transparent, loop, duration (ms) }], total }. With no provider registered it returns available: false and the reason. Call describe_effect next for an effect's controls.`,
264
+ description: `Searches the effects provider's catalog. Every word of query must appear in an effect's id, name, category, tags or description; filter by kind (shader, vector, motion), category, use (${EFFECT_USES.join(", ")}) or tags (effects carrying every one). For this editor, apply_effect takes uses ${host.applyUses.join(" or ")}. Returns { provider, effects: [{ id, name, kind, category, uses, description, tags, transparent, loop, duration (ms) }], total, tags: [{ tag, count }] }: tags lists the tags of every match, the most used first, so a broad search (or none) shows the tags to narrow by. A tag the catalog does not have comes back in unknownTags with the nearest ones. With no provider registered it returns available: false and the reason. Call describe_effect next for an effect's controls.`,
245
265
  inputSchema: object({
246
266
  query: { type: "string", description: "Words to match (default: every effect)." },
247
267
  kind: { type: "string", enum: [...EFFECT_KINDS], description: "shader (pixels), vector (animated SVG) or motion (animates vector art)." },
248
268
  category: { type: "string", minLength: 1, description: `The provider's category, e.g. "gradient", "light", "transition".` },
249
269
  use: { type: "string", enum: [...EFFECT_USES], description: "What the effect is for: filter changes a picture, transition blends two, generator draws a background, overlay draws over content, title draws a title, motion animates vector art, interactive reacts to input." },
270
+ tags: { type: "array", items: { type: "string", minLength: 1 }, description: "Only effects carrying every one of these tags, as search_effects lists them (any case; spaces count as hyphens)." },
250
271
  limit: { type: "integer", minimum: 1, maximum: 200, description: "Most effects to return (default 20)." }
251
272
  }),
252
273
  annotations: { title: "Search effects", ...ANNOTATIONS.read },
253
274
  handler: async (args) => {
254
275
  const p = host.provider();
255
276
  if (!p) return { available: false, reason: NO_PROVIDER, effects: [], total: 0 };
256
- const found = await explain(async () => p.search(_nullishCoalesce(args.query, () => ( "")), { kind: args.kind, category: args.category, use: args.use }));
277
+ const tags = args.tags;
278
+ const found = (await explain(async () => p.search(_nullishCoalesce(args.query, () => ( "")), { kind: args.kind, category: args.category, use: args.use, tags }))).filter((e) => hasEffectTags(e, tags));
257
279
  const limit = _nullishCoalesce(args.limit, () => ( 20));
258
- return { available: true, provider: { id: p.id, name: p.name, capabilities: p.capabilities }, effects: found.slice(0, limit).map(summaryOut), total: found.length };
280
+ const out = { available: true, provider: { id: p.id, name: p.name, capabilities: p.capabilities }, effects: found.slice(0, limit).map(summaryOut), total: found.length, tags: countEffectTags(found).slice(0, TAG_LIMIT) };
281
+ if (_optionalChain([tags, 'optionalAccess', _8 => _8.length]) && !found.length) {
282
+ const known = countEffectTags(await explain(async () => p.list()));
283
+ const have = new Set(known.map((k) => k.tag));
284
+ const unknown = tags.filter((t) => !have.has(normaliseEffectTag(t)));
285
+ if (unknown.length) out.unknownTags = unknown.map((tag) => ({ tag, nearest: nearestTags(tag, known) }));
286
+ }
287
+ return out;
259
288
  }
260
289
  },
261
290
  {
@@ -348,16 +377,16 @@ function createEffectToolProvider(host) {
348
377
  ...host.description ? { description: host.description } : {},
349
378
  ...host.skill ? { skill: host.skill } : {},
350
379
  tools: () => {
351
- const extra = _nullishCoalesce(_optionalChain([host, 'access', _5 => _5.extraTools, 'optionalCall', _6 => _6(context)]), () => ( []));
352
- if (host.readOnlyReason()) return [...readTools(), ...extra.filter((t) => _optionalChain([t, 'access', _7 => _7.annotations, 'optionalAccess', _8 => _8.readOnlyHint]))];
380
+ const extra = _nullishCoalesce(_optionalChain([host, 'access', _9 => _9.extraTools, 'optionalCall', _10 => _10(context)]), () => ( []));
381
+ if (host.readOnlyReason()) return [...readTools(), ...extra.filter((t) => _optionalChain([t, 'access', _11 => _11.annotations, 'optionalAccess', _12 => _12.readOnlyHint]))];
353
382
  return [...readTools(), ...writeTools(), ...extra];
354
383
  },
355
384
  subscribe: (l) => {
356
385
  listeners.add(l);
357
- const off = _optionalChain([host, 'access', _9 => _9.subscribe, 'optionalCall', _10 => _10(l)]);
386
+ const off = _optionalChain([host, 'access', _13 => _13.subscribe, 'optionalCall', _14 => _14(l)]);
358
387
  return () => {
359
388
  listeners.delete(l);
360
- _optionalChain([off, 'optionalCall', _11 => _11()]);
389
+ _optionalChain([off, 'optionalCall', _15 => _15()]);
361
390
  };
362
391
  }
363
392
  };
@@ -385,4 +414,7 @@ function createEffectToolProvider(host) {
385
414
 
386
415
 
387
416
 
388
- exports.EFFECT_ERROR_CODES = EFFECT_ERROR_CODES; exports.EffectError = EffectError; exports.UnknownEffectError = UnknownEffectError; exports.EffectControlError = EffectControlError; exports.EffectUnsupportedError = EffectUnsupportedError; exports.EffectDisposedError = EffectDisposedError; exports.NoEffectsProviderError = NoEffectsProviderError; exports.isEffectError = isEffectError; exports.effectValueErrors = effectValueErrors; exports.resolveEffectValues = resolveEffectValues; exports.searchEffectSummaries = searchEffectSummaries; exports.createEffectPixels = createEffectPixels; exports.isEffectPixels = isEffectPixels; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.encodeEffectFloat = encodeEffectFloat; exports.applyEffectMask = applyEffectMask; exports.EffectsSlot = EffectsSlot; exports.EFFECT_KINDS = EFFECT_KINDS; exports.EFFECT_USES = EFFECT_USES; exports.createEffectToolProvider = createEffectToolProvider;
417
+
418
+
419
+
420
+ exports.EFFECT_ERROR_CODES = EFFECT_ERROR_CODES; exports.EffectError = EffectError; exports.UnknownEffectError = UnknownEffectError; exports.EffectControlError = EffectControlError; exports.EffectUnsupportedError = EffectUnsupportedError; exports.EffectDisposedError = EffectDisposedError; exports.NoEffectsProviderError = NoEffectsProviderError; exports.isEffectError = isEffectError; exports.effectValueErrors = effectValueErrors; exports.resolveEffectValues = resolveEffectValues; exports.normaliseEffectTag = normaliseEffectTag; exports.hasEffectTags = hasEffectTags; exports.countEffectTags = countEffectTags; exports.searchEffectSummaries = searchEffectSummaries; exports.createEffectPixels = createEffectPixels; exports.isEffectPixels = isEffectPixels; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.encodeEffectFloat = encodeEffectFloat; exports.applyEffectMask = applyEffectMask; exports.EffectsSlot = EffectsSlot; exports.EFFECT_KINDS = EFFECT_KINDS; exports.EFFECT_USES = EFFECT_USES; exports.createEffectToolProvider = createEffectToolProvider;
@@ -34,7 +34,7 @@ var _chunkHMGWFXECcjs = require('./chunk-HMGWFXEC.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunkGD34ICEXcjs = require('./chunk-GD34ICEX.cjs');
37
+ var _chunkRLOIEDA3cjs = require('./chunk-RLOIEDA3.cjs');
38
38
 
39
39
 
40
40
  var _chunkOUO3DSRTcjs = require('./chunk-OUO3DSRT.cjs');
@@ -3643,9 +3643,9 @@ function insertImportedDocument(target, content, options = {}) {
3643
3643
  if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
3644
3644
  from = to = _state.Selection.near(state.doc.resolve(from)).from;
3645
3645
  }
3646
- if (htmlSlice && _chunkGD34ICEXcjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkGD34ICEXcjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
3646
+ if (htmlSlice && _chunkRLOIEDA3cjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkRLOIEDA3cjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
3647
3647
  const tr2 = state.tr;
3648
- const end2 = _chunkGD34ICEXcjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
3648
+ const end2 = _chunkRLOIEDA3cjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
3649
3649
  if (end2 !== null) {
3650
3650
  if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
3651
3651
  view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
@@ -3822,7 +3822,7 @@ var RichClipboard = _core.Extension.create({
3822
3822
  const slice = _chunk3AJMR7EGcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
3823
3823
  if (!slice) return false;
3824
3824
  event.preventDefault();
3825
- if (_chunkGD34ICEXcjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
3825
+ if (_chunkRLOIEDA3cjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
3826
3826
  view.dispatch(
3827
3827
  view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
3828
3828
  );
@@ -4223,7 +4223,7 @@ function createOutlineStore(editor) {
4223
4223
  if (!editor || editor.isDestroyed) return EMPTY_SNAPSHOT;
4224
4224
  const headings = getOutline(editor);
4225
4225
  const activeId = _nullishCoalesce(_optionalChain([getActiveHeading, 'call', _161 => _161(editor, headings), 'optionalAccess', _162 => _162.id]), () => ( null));
4226
- const sameStructure = _chunkGD34ICEXcjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
4226
+ const sameStructure = _chunkRLOIEDA3cjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
4227
4227
  if (sameStructure && snapshot.activeId === activeId) return snapshot;
4228
4228
  return {
4229
4229
  headings: sameStructure ? snapshot.headings : headings,
@@ -4271,7 +4271,7 @@ function navigateToHeading(editor, heading, options = {}) {
4271
4271
  editor.view.dispatch(tr);
4272
4272
  editor.view.focus();
4273
4273
  }
4274
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
4274
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
4275
4275
  return true;
4276
4276
  }
4277
4277
  function assignHeadingIds(state, types, generateId) {
@@ -4296,11 +4296,11 @@ function assignHeadingIds(state, types, generateId) {
4296
4296
  }
4297
4297
  var Outline = _core.Extension.create({
4298
4298
  name: "outline",
4299
- priority: _chunkGD34ICEXcjs.STRUCTURE_PRIORITY,
4299
+ priority: _chunkRLOIEDA3cjs.STRUCTURE_PRIORITY,
4300
4300
  addOptions() {
4301
4301
  return {
4302
4302
  types: ["heading"],
4303
- generateId: () => _chunkGD34ICEXcjs.generateStructureId.call(void 0, "h"),
4303
+ generateId: () => _chunkRLOIEDA3cjs.generateStructureId.call(void 0, "h"),
4304
4304
  onUpdate: void 0
4305
4305
  };
4306
4306
  },
@@ -4333,14 +4333,14 @@ var Outline = _core.Extension.create({
4333
4333
  tr.scrollIntoView();
4334
4334
  _optionalChain([view, 'optionalAccess', _169 => _169.focus, 'optionalCall', _170 => _170()]);
4335
4335
  }
4336
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4336
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4337
4337
  }
4338
4338
  return true;
4339
4339
  },
4340
4340
  scrollToHeading: (id, options = {}) => ({ state, dispatch, view }) => {
4341
4341
  const heading = findHeading(state, id);
4342
4342
  if (!heading) return false;
4343
- if (dispatch) _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4343
+ if (dispatch) _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4344
4344
  return true;
4345
4345
  }
4346
4346
  };
@@ -4361,7 +4361,7 @@ var Outline = _core.Extension.create({
4361
4361
  apply: (tr, prev, _oldState, newState) => {
4362
4362
  if (!tr.docChanged) return prev;
4363
4363
  const next = computeOutline(newState.doc, types);
4364
- if (_chunkGD34ICEXcjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
4364
+ if (_chunkRLOIEDA3cjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
4365
4365
  storage.headings = next;
4366
4366
  _optionalChain([onUpdate, 'call', _171 => _171(), 'optionalCall', _172 => _172(next)]);
4367
4367
  return next;
@@ -4379,7 +4379,7 @@ var Outline = _core.Extension.create({
4379
4379
  },
4380
4380
  onBeforeCreate() {
4381
4381
  const { types, generateId } = this.options;
4382
- _chunkGD34ICEXcjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
4382
+ _chunkRLOIEDA3cjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
4383
4383
  }
4384
4384
  });
4385
4385
 
@@ -4549,7 +4549,7 @@ function syncTableOfContents(state, headingTypes) {
4549
4549
  node.attrs.minLevel,
4550
4550
  node.attrs.maxLevel
4551
4551
  );
4552
- if (!_chunkGD34ICEXcjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
4552
+ if (!_chunkRLOIEDA3cjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
4553
4553
  tr = _nullishCoalesce(tr, () => ( state.tr));
4554
4554
  tr.setNodeMarkup(pos, void 0, { ...node.attrs, entries });
4555
4555
  }
@@ -4561,7 +4561,7 @@ function syncTableOfContents(state, headingTypes) {
4561
4561
  }
4562
4562
  var TableOfContents = _core.Node.create({
4563
4563
  name: "tableOfContents",
4564
- priority: _chunkGD34ICEXcjs.STRUCTURE_PRIORITY - 5,
4564
+ priority: _chunkRLOIEDA3cjs.STRUCTURE_PRIORITY - 5,
4565
4565
  group: "block",
4566
4566
  atom: true,
4567
4567
  selectable: true,
@@ -4672,7 +4672,7 @@ var TableOfContents = _core.Node.create({
4672
4672
  return [
4673
4673
  new (0, _state.Plugin)({
4674
4674
  key: tableOfContentsPluginKey,
4675
- state: _chunkGD34ICEXcjs.presenceStateSpec.call(void 0, [this.name]),
4675
+ state: _chunkRLOIEDA3cjs.presenceStateSpec.call(void 0, [this.name]),
4676
4676
  appendTransaction: (transactions, _oldState, newState) => {
4677
4677
  if (!transactions.some((tr) => tr.docChanged)) return null;
4678
4678
  if (!tableOfContentsPluginKey.getState(newState)) return null;
@@ -4696,7 +4696,7 @@ var TableOfContents = _core.Node.create({
4696
4696
  );
4697
4697
  view.focus();
4698
4698
  }
4699
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, heading.pos);
4699
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, heading.pos);
4700
4700
  return true;
4701
4701
  }
4702
4702
  }
@@ -4706,7 +4706,7 @@ var TableOfContents = _core.Node.create({
4706
4706
  },
4707
4707
  onBeforeCreate() {
4708
4708
  const { headingTypes } = this.options;
4709
- _chunkGD34ICEXcjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
4709
+ _chunkRLOIEDA3cjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
4710
4710
  }
4711
4711
  });
4712
4712
 
@@ -4764,7 +4764,7 @@ function syncFootnotes(tr, options = {}) {
4764
4764
  const listType = schema.nodes[LIST];
4765
4765
  const itemType = schema.nodes[ITEM];
4766
4766
  if (!listType || !itemType) return false;
4767
- const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkGD34ICEXcjs.generateStructureId.call(void 0, "fn"))));
4767
+ const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkRLOIEDA3cjs.generateStructureId.call(void 0, "fn"))));
4768
4768
  const refs = [];
4769
4769
  const lists = [];
4770
4770
  const existing = /* @__PURE__ */ new Map();
@@ -4848,7 +4848,7 @@ function findReferences(doc, id) {
4848
4848
  }
4849
4849
  var FootnoteReference = _core.Node.create({
4850
4850
  name: REFERENCE,
4851
- priority: _chunkGD34ICEXcjs.STRUCTURE_PRIORITY - 5,
4851
+ priority: _chunkRLOIEDA3cjs.STRUCTURE_PRIORITY - 5,
4852
4852
  group: "inline",
4853
4853
  inline: true,
4854
4854
  atom: true,
@@ -4856,7 +4856,7 @@ var FootnoteReference = _core.Node.create({
4856
4856
  addOptions() {
4857
4857
  return {
4858
4858
  HTMLAttributes: {},
4859
- generateId: () => _chunkGD34ICEXcjs.generateStructureId.call(void 0, "fn")
4859
+ generateId: () => _chunkRLOIEDA3cjs.generateStructureId.call(void 0, "fn")
4860
4860
  };
4861
4861
  },
4862
4862
  addAttributes() {
@@ -4967,7 +4967,7 @@ var FootnoteReference = _core.Node.create({
4967
4967
  _state.TextSelection.create(tr.doc, footnote.pos + footnote.node.nodeSize - 2)
4968
4968
  );
4969
4969
  tr.scrollIntoView();
4970
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, footnote.pos);
4970
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, footnote.pos);
4971
4971
  }
4972
4972
  return true;
4973
4973
  },
@@ -4977,7 +4977,7 @@ var FootnoteReference = _core.Node.create({
4977
4977
  if (dispatch) {
4978
4978
  tr.setSelection(_state.NodeSelection.create(tr.doc, ref.pos));
4979
4979
  tr.scrollIntoView();
4980
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, ref.pos);
4980
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, ref.pos);
4981
4981
  }
4982
4982
  return true;
4983
4983
  }
@@ -4989,7 +4989,7 @@ var FootnoteReference = _core.Node.create({
4989
4989
  return [
4990
4990
  new (0, _state.Plugin)({
4991
4991
  key: footnotesPluginKey,
4992
- state: _chunkGD34ICEXcjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
4992
+ state: _chunkRLOIEDA3cjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
4993
4993
  appendTransaction: (transactions, _oldState, newState) => {
4994
4994
  if (!transactions.some((tr2) => tr2.docChanged)) return null;
4995
4995
  if (!footnotesPluginKey.getState(newState)) return null;
@@ -5010,7 +5010,7 @@ var FootnoteReference = _core.Node.create({
5010
5010
  },
5011
5011
  onBeforeCreate() {
5012
5012
  const { generateId } = this.options;
5013
- _chunkGD34ICEXcjs.syncInitialContent.call(void 0, this.editor, (state) => {
5013
+ _chunkRLOIEDA3cjs.syncInitialContent.call(void 0, this.editor, (state) => {
5014
5014
  const tr = state.tr;
5015
5015
  return syncFootnotes(tr, { generateId }) ? tr : null;
5016
5016
  });
@@ -5150,7 +5150,7 @@ var Bookmark = _core.Mark.create({
5150
5150
  addOptions() {
5151
5151
  return {
5152
5152
  HTMLAttributes: {},
5153
- generateId: () => _chunkGD34ICEXcjs.generateStructureId.call(void 0, "bm")
5153
+ generateId: () => _chunkRLOIEDA3cjs.generateStructureId.call(void 0, "bm")
5154
5154
  };
5155
5155
  },
5156
5156
  addAttributes() {
@@ -5235,7 +5235,7 @@ var Bookmark = _core.Mark.create({
5235
5235
  tr.setSelection(_state.TextSelection.create(tr.doc, bookmark.from, bookmark.to));
5236
5236
  tr.scrollIntoView();
5237
5237
  const domPos = state.doc.resolve(bookmark.from);
5238
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
5238
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
5239
5239
  }
5240
5240
  return true;
5241
5241
  }
@@ -5300,7 +5300,7 @@ function syncCrossReferences(state, headingTypes) {
5300
5300
  }
5301
5301
  var CrossReference = _core.Node.create({
5302
5302
  name: NAME,
5303
- priority: _chunkGD34ICEXcjs.STRUCTURE_PRIORITY - 5,
5303
+ priority: _chunkRLOIEDA3cjs.STRUCTURE_PRIORITY - 5,
5304
5304
  group: "inline",
5305
5305
  inline: true,
5306
5306
  atom: true,
@@ -5402,7 +5402,7 @@ var CrossReference = _core.Node.create({
5402
5402
  if (dispatch) {
5403
5403
  tr.setSelection(_state.TextSelection.create(tr.doc, range.from, range.to));
5404
5404
  tr.scrollIntoView();
5405
- _chunkGD34ICEXcjs.scrollDomAtPos.call(void 0, view, range.blockPos);
5405
+ _chunkRLOIEDA3cjs.scrollDomAtPos.call(void 0, view, range.blockPos);
5406
5406
  }
5407
5407
  return true;
5408
5408
  }
@@ -5414,7 +5414,7 @@ var CrossReference = _core.Node.create({
5414
5414
  return [
5415
5415
  new (0, _state.Plugin)({
5416
5416
  key: crossReferencePluginKey,
5417
- state: _chunkGD34ICEXcjs.presenceStateSpec.call(void 0, [NAME]),
5417
+ state: _chunkRLOIEDA3cjs.presenceStateSpec.call(void 0, [NAME]),
5418
5418
  appendTransaction: (transactions, _oldState, newState) => {
5419
5419
  if (!transactions.some((tr) => tr.docChanged)) return null;
5420
5420
  if (!crossReferencePluginKey.getState(newState)) return null;
@@ -5433,7 +5433,7 @@ var CrossReference = _core.Node.create({
5433
5433
  },
5434
5434
  onBeforeCreate() {
5435
5435
  const { headingTypes } = this.options;
5436
- _chunkGD34ICEXcjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
5436
+ _chunkRLOIEDA3cjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
5437
5437
  }
5438
5438
  });
5439
5439
 
@@ -5688,7 +5688,7 @@ var FindReplace = _core.Extension.create({
5688
5688
  if (!s || !s.active || s.currentIndex < 0 || !s.matches[s.currentIndex]) return false;
5689
5689
  if (dispatch) {
5690
5690
  _history.closeHistory.call(void 0, tr);
5691
- const [end] = _chunkGD34ICEXcjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
5691
+ const [end] = _chunkRLOIEDA3cjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
5692
5692
  tr.setSelection(_state.TextSelection.create(tr.doc, end)).scrollIntoView();
5693
5693
  meta(tr, { type: "replaced", anchor: end, count: 1 });
5694
5694
  }
@@ -5699,7 +5699,7 @@ var FindReplace = _core.Extension.create({
5699
5699
  if (!s || !s.active || !s.matches.length) return false;
5700
5700
  if (dispatch) {
5701
5701
  _history.closeHistory.call(void 0, tr);
5702
- const ends = _chunkGD34ICEXcjs.applyReplacements.call(void 0, tr, s.matches);
5702
+ const ends = _chunkRLOIEDA3cjs.applyReplacements.call(void 0, tr, s.matches);
5703
5703
  meta(tr, { type: "replaced", anchor: ends[ends.length - 1], count: s.matches.length });
5704
5704
  }
5705
5705
  return true;
@@ -5731,7 +5731,7 @@ var FindReplace = _core.Extension.create({
5731
5731
  if (!s.active || !s.query) {
5732
5732
  return { ...s, matches: [], currentIndex: -1, error: null, truncated: false };
5733
5733
  }
5734
- const result = _chunkGD34ICEXcjs.searchDocument.call(void 0, doc, s.query, s.options, {
5734
+ const result = _chunkRLOIEDA3cjs.searchDocument.call(void 0, doc, s.query, s.options, {
5735
5735
  replacement: s.replacement,
5736
5736
  clipboardText: safeClipboard(options.getClipboardText),
5737
5737
  timeLimitMs: options.timeLimitMs,
@@ -6318,7 +6318,7 @@ function createRichTextPreset(options = {}) {
6318
6318
  })
6319
6319
  ];
6320
6320
  if (options.table !== false) {
6321
- extensions2.push(..._chunkGD34ICEXcjs.createTableExtensions.call(void 0, optionObject(options.table)));
6321
+ extensions2.push(..._chunkRLOIEDA3cjs.createTableExtensions.call(void 0, optionObject(options.table)));
6322
6322
  }
6323
6323
  if (characterLimit) {
6324
6324
  extensions2.push(
@@ -6425,8 +6425,8 @@ function createRichTextPreset(options = {}) {
6425
6425
  }
6426
6426
  if (options.chart) {
6427
6427
  const { sparkline = true, ...chartOptions } = optionObject(options.chart);
6428
- extensions2.push(_chunkGD34ICEXcjs.Chart.configure(chartOptions));
6429
- if (sparkline) extensions2.push(_chunkGD34ICEXcjs.Sparkline.configure(optionObject(sparkline)));
6428
+ extensions2.push(_chunkRLOIEDA3cjs.Chart.configure(chartOptions));
6429
+ if (sparkline) extensions2.push(_chunkRLOIEDA3cjs.Sparkline.configure(optionObject(sparkline)));
6430
6430
  }
6431
6431
  if (options.paragraphStyles) {
6432
6432
  extensions2.push(ParagraphStyles.configure(optionObject(options.paragraphStyles)));
@@ -6567,7 +6567,7 @@ function createFindReplaceCommands(editor, options = {}) {
6567
6567
  ];
6568
6568
  }
6569
6569
  function validateFindPattern(query, options = {}) {
6570
- const result = _chunkGD34ICEXcjs.compileFindPattern.call(void 0, query, options);
6570
+ const result = _chunkRLOIEDA3cjs.compileFindPattern.call(void 0, query, options);
6571
6571
  return result.ok ? null : result.error;
6572
6572
  }
6573
6573
 
@@ -6576,8 +6576,8 @@ var PARAMS = {
6576
6576
  insertTable: {
6577
6577
  type: "object",
6578
6578
  properties: {
6579
- rows: { type: "integer", minimum: 1, maximum: _chunkGD34ICEXcjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
6580
- cols: { type: "integer", minimum: 1, maximum: _chunkGD34ICEXcjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
6579
+ rows: { type: "integer", minimum: 1, maximum: _chunkRLOIEDA3cjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
6580
+ cols: { type: "integer", minimum: 1, maximum: _chunkRLOIEDA3cjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
6581
6581
  withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
6582
6582
  },
6583
6583
  additionalProperties: false
@@ -6608,7 +6608,7 @@ function createTableCommands(editor, options = {}) {
6608
6608
  const group = _nullishCoalesce(options.group, () => ( "Table"));
6609
6609
  const scope = options.scope ? { scope: options.scope } : {};
6610
6610
  const focus = _nullishCoalesce(options.focus, () => ( true));
6611
- return _chunkGD34ICEXcjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
6611
+ return _chunkRLOIEDA3cjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
6612
6612
  const params = PARAMS[action];
6613
6613
  return {
6614
6614
  id: `${prefix}${action}`,
@@ -6618,13 +6618,13 @@ function createTableCommands(editor, options = {}) {
6618
6618
  description,
6619
6619
  ...params ? { params } : {},
6620
6620
  ...scope,
6621
- enabled: (_ctx, p) => _chunkGD34ICEXcjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
6621
+ enabled: (_ctx, p) => _chunkRLOIEDA3cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
6622
6622
  run: (_ctx, p) => {
6623
- if (!_chunkGD34ICEXcjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
6624
- const reason = _chunkGD34ICEXcjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
6623
+ if (!_chunkRLOIEDA3cjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
6624
+ const reason = _chunkRLOIEDA3cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
6625
6625
  throw new Error(reason === true ? `${label} did not change the document.` : reason);
6626
6626
  }
6627
- const state = _chunkGD34ICEXcjs.getTableState.call(void 0, editor);
6627
+ const state = _chunkRLOIEDA3cjs.getTableState.call(void 0, editor);
6628
6628
  return {
6629
6629
  done: true,
6630
6630
  table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null
@@ -14,7 +14,7 @@ var _chunkTTCJPX4Ucjs = require('./chunk-TTCJPX4U.cjs');
14
14
 
15
15
 
16
16
 
17
- var _chunkWOIXNDHVcjs = require('./chunk-WOIXNDHV.cjs');
17
+ var _chunkTUXKLM5Wcjs = require('./chunk-TUXKLM5W.cjs');
18
18
 
19
19
 
20
20
 
@@ -512,9 +512,9 @@ function findMermaidCharts(text) {
512
512
  }
513
513
 
514
514
  // src/chart/summary.ts
515
- function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, spec, { ...size, selection: null })) {
515
+ function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunkTUXKLM5Wcjs.layoutChart.call(void 0, spec, { ...size, selection: null })) {
516
516
  const visible = spec.series.filter((s) => !s.hidden);
517
- const series = visible.map((s) => _chunkWOIXNDHVcjs.summarizeChartSeries.call(void 0, s, spec.categories));
517
+ const series = visible.map((s) => _chunkTUXKLM5Wcjs.summarizeChartSeries.call(void 0, s, spec.categories));
518
518
  const colors = _chunkOUO3DSRTcjs.chartSpecColorsByCategory.call(void 0, spec) ? spec.categories.map((_, i) => _optionalChain([visible, 'access', _24 => _24[0], 'optionalAccess', _25 => _25.pointColors, 'optionalAccess', _26 => _26[i]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, spec, i)) : visible.map((s) => _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s)));
519
519
  const check = _chunkOUO3DSRTcjs.checkChartColors.call(void 0, colors, { surface: scene.theme.surface.startsWith("var(") ? "#ffffff" : scene.theme.surface });
520
520
  const axis = (s, a) => s ? { min: s.domain[0], max: s.domain[1], ticks: [...s.ticks], ...s.logBase ? { logBase: s.logBase } : {}, ...a.reverse ? { reversed: true } : {} } : void 0;
@@ -531,12 +531,12 @@ function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunk
531
531
  description: describeChart(spec, series)
532
532
  };
533
533
  }
534
- function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((s) => _chunkWOIXNDHVcjs.summarizeChartSeries.call(void 0, s, spec.categories))) {
534
+ function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((s) => _chunkTUXKLM5Wcjs.summarizeChartSeries.call(void 0, s, spec.categories))) {
535
535
  const kind = _chunkOUO3DSRTcjs.CHART_TYPE_LABELS[spec.type].toLowerCase();
536
536
  const parts = [];
537
537
  const family = _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec);
538
538
  const format = spec.yAxis.format;
539
- const fmt = (v) => v === null ? "blank" : _chunkWOIXNDHVcjs.formatChartNumber.call(void 0, v, format);
539
+ const fmt = (v) => v === null ? "blank" : _chunkTUXKLM5Wcjs.formatChartNumber.call(void 0, v, format);
540
540
  const head = spec.title ? `${spec.title}: a ${kind} chart` : `A ${kind} chart`;
541
541
  if (!series.length || series.every((s) => s.count === 0)) return `${head} with no data.`;
542
542
  if (family === "pie" || family === "funnel" || family === "treemap" || family === "sunburst") {
@@ -554,8 +554,8 @@ function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((
554
554
  }
555
555
  if (family === "choropleth") {
556
556
  const s = spec.series.find((x) => !x.hidden);
557
- const map = _chunkWOIXNDHVcjs.getChartMap.call(void 0, spec.map);
558
- const matches = map ? _chunkWOIXNDHVcjs.matchChartMapRegions.call(void 0, map, spec.categories) : spec.categories.map(() => null);
557
+ const map = _chunkTUXKLM5Wcjs.getChartMap.call(void 0, spec.map);
558
+ const matches = map ? _chunkTUXKLM5Wcjs.matchChartMapRegions.call(void 0, map, spec.categories) : spec.categories.map(() => null);
559
559
  const rows = spec.categories.flatMap((c, i) => matches[i] && s.values[i] !== null ? [{ name: matches[i].name, v: s.values[i] }] : []).sort((a, b) => b.v - a.v);
560
560
  const missing = spec.categories.filter((_, i) => !matches[i]).length;
561
561
  if (!rows.length) return `${head} of ${_nullishCoalesce(_optionalChain([map, 'optionalAccess', _27 => _27.name]), () => ( spec.map))} with no regions matched.`;
@@ -563,8 +563,8 @@ function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((
563
563
  }
564
564
  if (family === "barrace") {
565
565
  const n = spec.categories.length;
566
- const first = _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, spec, 0)[0];
567
- const last = _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, spec, n - 1)[0];
566
+ const first = _chunkTUXKLM5Wcjs.chartRaceRanking.call(void 0, spec, 0)[0];
567
+ const last = _chunkTUXKLM5Wcjs.chartRaceRanking.call(void 0, spec, n - 1)[0];
568
568
  const lead = (e, at) => e ? `${e.name} leads at ${at} with ${fmt(e.value)}` : "";
569
569
  return `${head} of ${series.length} names over ${n} time points (${spec.categories[0]} to ${spec.categories[n - 1]}), showing the top ${Math.min(spec.raceTopN, series.length)}. ${lead(first, spec.categories[0])}; ${lead(last, spec.categories[n - 1])}.`;
570
570
  }
@@ -709,7 +709,7 @@ function chartSceneToSvg(scene, options = {}) {
709
709
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${scene.width}" height="${scene.height}" viewBox="0 0 ${scene.width} ${scene.height}" role="img"${label ? ` aria-label="${escape(label)}"` : ""}${labelled ? ` aria-labelledby="${labelled}"` : ""}>${head}${body}</svg>`;
710
710
  }
711
711
  function chartToSvg(spec, options) {
712
- const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, spec, { ...options, selection: null });
712
+ const scene = _chunkTUXKLM5Wcjs.layoutChart.call(void 0, spec, { ...options, selection: null });
713
713
  return chartSceneToSvg(scene, { ...options, ariaLabel: _nullishCoalesce(options.ariaLabel, () => ( (spec.title || void 0))), description: _nullishCoalesce(options.description, () => ( describeChart(spec))) });
714
714
  }
715
715
  var SVG_NS = "http://www.w3.org/2000/svg";
@@ -933,7 +933,7 @@ var ChartController = (_class = class {
933
933
  const hadIssues = this.issues.length > 0;
934
934
  this.issues = [];
935
935
  if (sameChartJson(before, next)) {
936
- const reselect = select !== void 0 && !_chunkWOIXNDHVcjs.sameChartSelection.call(void 0, this.selection, select) && !(select === null && this.selection === null);
936
+ const reselect = select !== void 0 && !_chunkTUXKLM5Wcjs.sameChartSelection.call(void 0, this.selection, select) && !(select === null && this.selection === null);
937
937
  if (reselect) this.selection = select;
938
938
  if (reselect || hadIssues) this.notify(false);
939
939
  return;
@@ -1591,7 +1591,7 @@ var ChartController = (_class = class {
1591
1591
  addTrendline(seriesId, input) {
1592
1592
  const series = this.getSeries(seriesId);
1593
1593
  if (!series) return this.unknownSeries(seriesId);
1594
- if (!_chunkWOIXNDHVcjs.chartSupportsTrendlines.call(void 0, this.spec.type, this.spec.stacking))
1594
+ if (!_chunkTUXKLM5Wcjs.chartSupportsTrendlines.call(void 0, this.spec.type, this.spec.stacking))
1595
1595
  return this.reject(`Trendlines need an unstacked bar, line, area, scatter or bubble chart; this is a ${this.spec.stacking !== "none" ? `${this.spec.stacking} ` : ""}${this.spec.type} chart.`);
1596
1596
  const issues = [];
1597
1597
  const line = _chunkOUO3DSRTcjs.normalizeChartTrendline.call(void 0, input, "trendline", issues);
@@ -1653,13 +1653,13 @@ var ChartController = (_class = class {
1653
1653
  trendlineFit(seriesId, index) {
1654
1654
  const line = _optionalChain([this, 'access', _81 => _81.getSeries, 'call', _82 => _82(seriesId), 'optionalAccess', _83 => _83.trendlines, 'optionalAccess', _84 => _84[index]]);
1655
1655
  if (!line) return null;
1656
- return _chunkWOIXNDHVcjs.fitChartTrendline.call(void 0, line, this.trendlinePoints(seriesId));
1656
+ return _chunkTUXKLM5Wcjs.fitChartTrendline.call(void 0, line, this.trendlinePoints(seriesId));
1657
1657
  }
1658
1658
  /** The moving-average points of a trendline (empty for other kinds). */
1659
1659
  trendlineMovingAverage(seriesId, index) {
1660
1660
  const line = _optionalChain([this, 'access', _85 => _85.getSeries, 'call', _86 => _86(seriesId), 'optionalAccess', _87 => _87.trendlines, 'optionalAccess', _88 => _88[index]]);
1661
1661
  if (!line || line.type !== "moving-average") return [];
1662
- return _chunkWOIXNDHVcjs.chartMovingAverage.call(void 0, this.trendlinePoints(seriesId), _nullishCoalesce(line.period, () => ( 2)));
1662
+ return _chunkTUXKLM5Wcjs.chartMovingAverage.call(void 0, this.trendlinePoints(seriesId), _nullishCoalesce(line.period, () => ( 2)));
1663
1663
  }
1664
1664
  // -------------------------------------------------------------------------
1665
1665
  // Reshaping
@@ -1739,7 +1739,7 @@ var ChartController = (_class = class {
1739
1739
  /** Selects a chart element (view state; not an undo step). */
1740
1740
  select(selection) {
1741
1741
  const next = this.validSelection(selection, this.spec);
1742
- if (_chunkWOIXNDHVcjs.sameChartSelection.call(void 0, next, this.selection) || next === null && this.selection === null) return;
1742
+ if (_chunkTUXKLM5Wcjs.sameChartSelection.call(void 0, next, this.selection) || next === null && this.selection === null) return;
1743
1743
  this.selection = next;
1744
1744
  this.notify(false);
1745
1745
  }
@@ -1958,7 +1958,7 @@ function layoutSparkline(values, options) {
1958
1958
  const flush = () => {
1959
1959
  if (run.length >= 2) {
1960
1960
  const pts = run.length > 4e3 ? run.filter((_, i) => i % (Math.floor(run.length / 2e3) + 1) === 0) : run;
1961
- d += pts.map(([x, y], i) => `${i ? "L" : "M"}${_chunkWOIXNDHVcjs.r2.call(void 0, x)},${_chunkWOIXNDHVcjs.r2.call(void 0, y)}`).join("");
1961
+ d += pts.map(([x, y], i) => `${i ? "L" : "M"}${_chunkTUXKLM5Wcjs.r2.call(void 0, x)},${_chunkTUXKLM5Wcjs.r2.call(void 0, y)}`).join("");
1962
1962
  }
1963
1963
  run = [];
1964
1964
  };
@@ -34,7 +34,7 @@ import {
34
34
  searchDocument,
35
35
  sliceContainsTable,
36
36
  syncInitialContent
37
- } from "./chunk-ZUPP4NKM.js";
37
+ } from "./chunk-R2VHVQVY.js";
38
38
  import {
39
39
  chartDataToTable
40
40
  } from "./chunk-ORZF4JOO.js";
@@ -14,7 +14,7 @@ import {
14
14
  r2,
15
15
  sameChartSelection,
16
16
  summarizeChartSeries
17
- } from "./chunk-M52UCHVZ.js";
17
+ } from "./chunk-OJQVKJYD.js";
18
18
  import {
19
19
  CHART_TYPE_LABELS,
20
20
  DEFAULT_CHART_PALETTE,