@pixerate/editor 0.146.0 → 0.148.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 (132) hide show
  1. package/README.md +3 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/agent/index.cjs +36 -34
  4. package/dist/agent/index.js +7 -5
  5. package/dist/animation/index.cjs +5 -3
  6. package/dist/animation/index.js +4 -2
  7. package/dist/animation-editor/index.cjs +62 -60
  8. package/dist/animation-editor/index.js +6 -4
  9. package/dist/canvas/index.cjs +36 -34
  10. package/dist/canvas/index.js +19 -17
  11. package/dist/chart/index.cjs +88 -86
  12. package/dist/chart/index.js +7 -5
  13. package/dist/{chunk-WBJ6BG4R.js → chunk-2AQL4JHM.js} +6 -6
  14. package/dist/{chunk-HLMF3E53.cjs → chunk-2WDZI6QD.cjs} +15 -15
  15. package/dist/{chunk-ZNHB5RG6.js → chunk-37RLSNQ3.js} +2 -2
  16. package/dist/{chunk-5WOY52O6.cjs → chunk-4YQKRHMI.cjs} +8 -8
  17. package/dist/chunk-6ONMQ6WF.js +113 -0
  18. package/dist/{chunk-L434J57V.cjs → chunk-6QTON3VW.cjs} +16 -16
  19. package/dist/chunk-AA34BA7G.js +1913 -0
  20. package/dist/{chunk-QX25HWFL.js → chunk-AY65VQSU.js} +1 -1
  21. package/dist/{chunk-ONZJD2OD.cjs → chunk-BROJYMWU.cjs} +57 -153
  22. package/dist/{chunk-YM75DN54.js → chunk-DSZCDNTM.js} +1 -1
  23. package/dist/{chunk-PUR6BZFA.cjs → chunk-DVLMW3GB.cjs} +53 -53
  24. package/dist/{chunk-ALUWD3FG.js → chunk-EIUTJPEL.js} +1 -1
  25. package/dist/{chunk-X65C4DWV.js → chunk-EQ4SF4X4.js} +1 -1
  26. package/dist/{chunk-77SG47WT.js → chunk-FLOGD3QB.js} +1 -1
  27. package/dist/{chunk-AJSW5GMP.js → chunk-HVQVHUTV.js} +19 -115
  28. package/dist/{chunk-UR37VCIR.cjs → chunk-I4AHLP7F.cjs} +16 -35
  29. package/dist/chunk-IPJ3TEYR.cjs +113 -0
  30. package/dist/chunk-KY3FYKP3.js +52 -0
  31. package/dist/chunk-LEUZ4FRC.cjs +52 -0
  32. package/dist/{chunk-H6FX45CP.cjs → chunk-LIXLD433.cjs} +37 -37
  33. package/dist/{chunk-6GAYGQDC.js → chunk-O5ML2I6O.js} +3 -3
  34. package/dist/{chunk-KI2VBONS.js → chunk-OET45HIR.js} +2 -2
  35. package/dist/{chunk-XNZWATSB.cjs → chunk-QCEQIRJQ.cjs} +85 -85
  36. package/dist/{chunk-HRI3ZMDM.cjs → chunk-RHXW4TA5.cjs} +3 -3
  37. package/dist/{chunk-UUTTJK77.cjs → chunk-SUF6WRXR.cjs} +2 -2
  38. package/dist/{chunk-RN767PO6.js → chunk-SUVZJ2CP.js} +15 -34
  39. package/dist/{chunk-FLUTRPLY.cjs → chunk-TLMRGLQQ.cjs} +16 -16
  40. package/dist/{chunk-DAS7M4RY.js → chunk-UILRJQFD.js} +2 -2
  41. package/dist/chunk-UKCJ43YL.cjs +1913 -0
  42. package/dist/{chunk-XQ33O5BC.cjs → chunk-X35BV5YT.cjs} +44 -44
  43. package/dist/{chunk-6HMEHNWW.cjs → chunk-XTU6QO2W.cjs} +26 -26
  44. package/dist/{chunk-VM6JYWXQ.js → chunk-ZQUANEK4.js} +2 -2
  45. package/dist/cms/index.cjs +5 -3
  46. package/dist/cms/index.js +18 -16
  47. package/dist/color/contrast.d.cts +14 -0
  48. package/dist/color/contrast.d.ts +14 -0
  49. package/dist/color/convert.d.cts +30 -0
  50. package/dist/color/convert.d.ts +30 -0
  51. package/dist/color/dual.d.cts +98 -0
  52. package/dist/color/dual.d.ts +98 -0
  53. package/dist/color/format.d.cts +12 -0
  54. package/dist/color/format.d.ts +12 -0
  55. package/dist/color/gamut.d.cts +12 -0
  56. package/dist/color/gamut.d.ts +12 -0
  57. package/dist/color/harmony.d.cts +22 -0
  58. package/dist/color/harmony.d.ts +22 -0
  59. package/dist/color/index.cjs +115 -0
  60. package/dist/color/index.d.cts +18 -0
  61. package/dist/color/index.d.ts +18 -0
  62. package/dist/color/index.js +115 -0
  63. package/dist/color/mix.d.cts +11 -0
  64. package/dist/color/mix.d.ts +11 -0
  65. package/dist/color/named.d.cts +5 -0
  66. package/dist/color/named.d.ts +5 -0
  67. package/dist/color/parse.d.cts +11 -0
  68. package/dist/color/parse.d.ts +11 -0
  69. package/dist/color/picker.d.cts +52 -0
  70. package/dist/color/picker.d.ts +52 -0
  71. package/dist/color/recent.d.cts +8 -0
  72. package/dist/color/recent.d.ts +8 -0
  73. package/dist/color/tools.d.cts +15 -0
  74. package/dist/color/tools.d.ts +15 -0
  75. package/dist/color/types.d.cts +41 -0
  76. package/dist/color/types.d.ts +41 -0
  77. package/dist/color/vision.d.cts +36 -0
  78. package/dist/color/vision.d.ts +36 -0
  79. package/dist/effects/authoring-session.d.cts +25 -0
  80. package/dist/effects/authoring-session.d.ts +25 -0
  81. package/dist/effects/authoring-tools.d.cts +31 -0
  82. package/dist/effects/authoring-tools.d.ts +31 -0
  83. package/dist/effects/authoring.d.cts +152 -0
  84. package/dist/effects/authoring.d.ts +152 -0
  85. package/dist/effects/conformance.d.cts +2 -0
  86. package/dist/effects/conformance.d.ts +2 -0
  87. package/dist/effects/fake.d.cts +2 -0
  88. package/dist/effects/fake.d.ts +2 -0
  89. package/dist/effects/index.cjs +1216 -9
  90. package/dist/effects/index.d.cts +3 -0
  91. package/dist/effects/index.d.ts +3 -0
  92. package/dist/effects/index.js +1210 -3
  93. package/dist/effects/types.d.cts +9 -2
  94. package/dist/effects/types.d.ts +9 -2
  95. package/dist/effects/ui.d.cts +8 -0
  96. package/dist/effects/ui.d.ts +8 -0
  97. package/dist/export/index.cjs +6 -4
  98. package/dist/export/index.js +5 -3
  99. package/dist/extensions/index.cjs +10 -8
  100. package/dist/extensions/index.js +9 -7
  101. package/dist/gradient/controller.d.cts +109 -0
  102. package/dist/gradient/controller.d.ts +109 -0
  103. package/dist/gradient/editor.d.cts +38 -0
  104. package/dist/gradient/editor.d.ts +38 -0
  105. package/dist/gradient/index.cjs +1549 -0
  106. package/dist/gradient/index.d.cts +5 -0
  107. package/dist/gradient/index.d.ts +5 -0
  108. package/dist/gradient/index.js +1549 -0
  109. package/dist/gradient/model.d.cts +94 -0
  110. package/dist/gradient/model.d.ts +94 -0
  111. package/dist/gradient/tools.d.cts +11 -0
  112. package/dist/gradient/tools.d.ts +11 -0
  113. package/dist/gradient/types.d.cts +44 -0
  114. package/dist/gradient/types.d.ts +44 -0
  115. package/dist/image-editor/index.cjs +649 -647
  116. package/dist/image-editor/index.js +6 -4
  117. package/dist/index.cjs +19 -17
  118. package/dist/index.js +16 -14
  119. package/dist/paint-editor/color.d.cts +3 -13
  120. package/dist/paint-editor/color.d.ts +3 -13
  121. package/dist/paint-editor/index.cjs +23 -68
  122. package/dist/paint-editor/index.js +15 -60
  123. package/dist/vector/index.cjs +950 -948
  124. package/dist/vector/index.js +5 -3
  125. package/dist/video-editor/index.cjs +5 -3
  126. package/dist/video-editor/index.js +4 -2
  127. package/package.json +21 -1
  128. package/skills/README.md +2 -0
  129. package/skills/pixerate-color/SKILL.md +69 -0
  130. package/skills/pixerate-effect-authoring/SKILL.md +80 -0
  131. package/dist/chunk-45VRG4RB.js +0 -65
  132. package/dist/chunk-5FXOR7F2.cjs +0 -65
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunk6HMEHNWWcjs = require('./chunk-6HMEHNWW.cjs');
10
+ var _chunkXTU6QO2Wcjs = require('./chunk-XTU6QO2W.cjs');
11
11
 
12
12
 
13
13
 
@@ -27,7 +27,7 @@ var _chunk6HMEHNWWcjs = require('./chunk-6HMEHNWW.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkUR37VCIRcjs = require('./chunk-UR37VCIR.cjs');
30
+ var _chunkI4AHLP7Fcjs = require('./chunk-I4AHLP7F.cjs');
31
31
 
32
32
 
33
33
 
@@ -63,7 +63,7 @@ function splitOutside(text, sep) {
63
63
  return out;
64
64
  }
65
65
  function chartMermaidFamily(spec) {
66
- const family = _chunkUR37VCIRcjs.chartFamily.call(void 0, spec);
66
+ const family = _chunkI4AHLP7Fcjs.chartFamily.call(void 0, spec);
67
67
  if (family === "pie" || family === "funnel" || family === "treemap") return "pie";
68
68
  if (family === "radar") return "radar";
69
69
  return "xychart";
@@ -225,8 +225,8 @@ function chartFromMermaid(text, options = {}) {
225
225
  let title = _nullishCoalesce(frontTitle, () => ( ""));
226
226
  const categories = [];
227
227
  const series = [];
228
- const xAxis = _chunkUR37VCIRcjs.defaultChartAxis.call(void 0, false);
229
- const yAxis = _chunkUR37VCIRcjs.defaultChartAxis.call(void 0, true);
228
+ const xAxis = _chunkI4AHLP7Fcjs.defaultChartAxis.call(void 0, false);
229
+ const yAxis = _chunkI4AHLP7Fcjs.defaultChartAxis.call(void 0, true);
230
230
  const radarAxes = [];
231
231
  const pieSlices = [];
232
232
  let legendShow = true;
@@ -378,7 +378,7 @@ function chartFromMermaid(text, options = {}) {
378
378
  input.series = metaSeries.map((extra, i) => ({ ..._nullishCoalesce(base[i], () => ( {})), ..._nullishCoalesce(extra, () => ( {})) }));
379
379
  }
380
380
  }
381
- const { spec, issues: specIssues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, input);
381
+ const { spec, issues: specIssues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, input);
382
382
  if (!family && !partial && !issues.length) issues.push({ path: "header", message: "The text is empty: expected a chart header (xychart-beta, pie or radar-beta)." });
383
383
  return { spec, issues: [...issues, ...specIssues], family, hasMeta: !!meta };
384
384
  }
@@ -417,11 +417,11 @@ function findMermaidCharts(text) {
417
417
  }
418
418
 
419
419
  // src/chart/summary.ts
420
- function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunk6HMEHNWWcjs.layoutChart.call(void 0, spec, { ...size, selection: null })) {
420
+ function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunkXTU6QO2Wcjs.layoutChart.call(void 0, spec, { ...size, selection: null })) {
421
421
  const visible = spec.series.filter((s) => !s.hidden);
422
- const series = visible.map((s) => _chunk6HMEHNWWcjs.summarizeChartSeries.call(void 0, s, spec.categories));
423
- const colors = _chunkUR37VCIRcjs.chartColorsByCategory.call(void 0, spec.type) ? spec.categories.map((_, i) => _optionalChain([visible, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.pointColors, 'optionalAccess', _12 => _12[i]]) || _chunkUR37VCIRcjs.chartSliceColor.call(void 0, spec, i)) : visible.map((s) => _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s)));
424
- const check = _chunkUR37VCIRcjs.checkChartColors.call(void 0, colors, { surface: scene.theme.surface.startsWith("var(") ? "#ffffff" : scene.theme.surface });
422
+ const series = visible.map((s) => _chunkXTU6QO2Wcjs.summarizeChartSeries.call(void 0, s, spec.categories));
423
+ const colors = _chunkI4AHLP7Fcjs.chartColorsByCategory.call(void 0, spec.type) ? spec.categories.map((_, i) => _optionalChain([visible, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.pointColors, 'optionalAccess', _12 => _12[i]]) || _chunkI4AHLP7Fcjs.chartSliceColor.call(void 0, spec, i)) : visible.map((s) => _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s)));
424
+ const check = _chunkI4AHLP7Fcjs.checkChartColors.call(void 0, colors, { surface: scene.theme.surface.startsWith("var(") ? "#ffffff" : scene.theme.surface });
425
425
  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;
426
426
  return {
427
427
  type: spec.type,
@@ -436,12 +436,12 @@ function summarizeChart(spec, size = { width: 640, height: 400 }, scene = _chunk
436
436
  description: describeChart(spec, series)
437
437
  };
438
438
  }
439
- function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((s) => _chunk6HMEHNWWcjs.summarizeChartSeries.call(void 0, s, spec.categories))) {
440
- const kind = _chunkUR37VCIRcjs.CHART_TYPE_LABELS[spec.type].toLowerCase();
439
+ function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((s) => _chunkXTU6QO2Wcjs.summarizeChartSeries.call(void 0, s, spec.categories))) {
440
+ const kind = _chunkI4AHLP7Fcjs.CHART_TYPE_LABELS[spec.type].toLowerCase();
441
441
  const parts = [];
442
- const family = _chunkUR37VCIRcjs.chartFamily.call(void 0, spec);
442
+ const family = _chunkI4AHLP7Fcjs.chartFamily.call(void 0, spec);
443
443
  const format = spec.yAxis.format;
444
- const fmt = (v) => v === null ? "blank" : _chunk6HMEHNWWcjs.formatChartNumber.call(void 0, v, format);
444
+ const fmt = (v) => v === null ? "blank" : _chunkXTU6QO2Wcjs.formatChartNumber.call(void 0, v, format);
445
445
  const head = spec.title ? `${spec.title}: a ${kind} chart` : `A ${kind} chart`;
446
446
  if (!series.length || series.every((s) => s.count === 0)) return `${head} with no data.`;
447
447
  if (family === "pie" || family === "funnel" || family === "treemap") {
@@ -489,7 +489,7 @@ function describeChart(spec, series = spec.series.filter((s) => !s.hidden).map((
489
489
  }
490
490
  parts.push(...axes);
491
491
  for (const s of spec.series.filter((x) => !x.hidden && (x.errorBars || x.xErrorBars)).slice(0, 8)) {
492
- const bars = [s.errorBars ? _chunkUR37VCIRcjs.describeChartErrorBars.call(void 0, s.errorBars) : "", s.xErrorBars ? `x ${_chunkUR37VCIRcjs.describeChartErrorBars.call(void 0, s.xErrorBars)}` : ""].filter(Boolean).join(" and ");
492
+ const bars = [s.errorBars ? _chunkI4AHLP7Fcjs.describeChartErrorBars.call(void 0, s.errorBars) : "", s.xErrorBars ? `x ${_chunkI4AHLP7Fcjs.describeChartErrorBars.call(void 0, s.xErrorBars)}` : ""].filter(Boolean).join(" and ");
493
493
  parts.push(`${s.name} has ${bars}.`);
494
494
  }
495
495
  return parts.join(" ");
@@ -554,7 +554,7 @@ function chartSceneToSvg(scene, options = {}) {
554
554
  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>`;
555
555
  }
556
556
  function chartToSvg(spec, options) {
557
- const scene = _chunk6HMEHNWWcjs.layoutChart.call(void 0, spec, { ...options, selection: null });
557
+ const scene = _chunkXTU6QO2Wcjs.layoutChart.call(void 0, spec, { ...options, selection: null });
558
558
  return chartSceneToSvg(scene, { ...options, ariaLabel: _nullishCoalesce(options.ariaLabel, () => ( (spec.title || void 0))), description: _nullishCoalesce(options.description, () => ( describeChart(spec))) });
559
559
  }
560
560
  var SVG_NS = "http://www.w3.org/2000/svg";
@@ -592,10 +592,10 @@ var CHART_LAYOUT_PRESETS = [
592
592
  ];
593
593
  function monochromeChartPalette(base, count = 6) {
594
594
  const steps = count <= 1 ? [0] : Array.from({ length: count }, (_, i) => -0.45 + 1.05 * i / (count - 1));
595
- return steps.map((t) => _chunkUR37VCIRcjs.shadeChartColor.call(void 0, base, t));
595
+ return steps.map((t) => _chunkI4AHLP7Fcjs.shadeChartColor.call(void 0, base, t));
596
596
  }
597
597
  var CHART_COLOR_SCHEMES = [
598
- { id: "default", label: "Default", description: "Ten distinct colours, readable on light and dark backgrounds.", palette: _chunkUR37VCIRcjs.DEFAULT_CHART_PALETTE },
598
+ { id: "default", label: "Default", description: "Ten distinct colours, readable on light and dark backgrounds.", palette: _chunkI4AHLP7Fcjs.DEFAULT_CHART_PALETTE },
599
599
  { id: "okabe-ito", label: "Okabe\u2013Ito", description: "Eight colours chosen to stay distinct with colour-blindness.", palette: ["#e69f00", "#56b4e9", "#009e73", "#f0e442", "#0072b2", "#d55e00", "#cc79a7", "#000000"] },
600
600
  { id: "office", label: "Office", description: "The six accent colours of the default Office theme.", palette: ["#4472c4", "#ed7d31", "#a5a5a5", "#ffc000", "#5b9bd5", "#70ad47"] },
601
601
  { id: "warm", label: "Warm", description: "Reds, oranges and yellows.", palette: ["#b2182b", "#d6604d", "#f4a582", "#e08214", "#fdb863", "#8c510a"] },
@@ -654,7 +654,7 @@ var ChartController = (_class = class {
654
654
  constructor(options = {}) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);
655
655
  this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkFJ2MSI43cjs.HistoryManager)()));
656
656
  this.onChange = options.onChange;
657
- const { spec, issues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, _nullishCoalesce(options.spec, () => ( {})));
657
+ const { spec, issues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, _nullishCoalesce(options.spec, () => ( {})));
658
658
  this.spec = spec;
659
659
  this.issues = issues;
660
660
  this.state = this.computeState();
@@ -757,7 +757,7 @@ var ChartController = (_class = class {
757
757
  const hadIssues = this.issues.length > 0;
758
758
  this.issues = [];
759
759
  if (sameChartJson(before, next)) {
760
- const reselect = select !== void 0 && !_chunk6HMEHNWWcjs.sameChartSelection.call(void 0, this.selection, select) && !(select === null && this.selection === null);
760
+ const reselect = select !== void 0 && !_chunkXTU6QO2Wcjs.sameChartSelection.call(void 0, this.selection, select) && !(select === null && this.selection === null);
761
761
  if (reselect) this.selection = select;
762
762
  if (reselect || hadIssues) this.notify(false);
763
763
  return;
@@ -780,7 +780,7 @@ var ChartController = (_class = class {
780
780
  }
781
781
  /** A copy of the spec with `edit` applied (series and categories copied as needed). */
782
782
  edited(edit) {
783
- const draft = _chunkUR37VCIRcjs.cloneChartSpec.call(void 0, this.spec);
783
+ const draft = _chunkI4AHLP7Fcjs.cloneChartSpec.call(void 0, this.spec);
784
784
  edit(draft);
785
785
  return draft;
786
786
  }
@@ -810,7 +810,7 @@ var ChartController = (_class = class {
810
810
  legend: patch.legend ? { ...s.legend, ...patch.legend } : s.legend,
811
811
  version: 1
812
812
  };
813
- const { spec, issues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, merged);
813
+ const { spec, issues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, merged);
814
814
  if (issues.length) return this.reject(issues.map((i) => i.message).join(" "), issues);
815
815
  if (JSON.stringify(spec) === JSON.stringify(s)) return { ok: true };
816
816
  this.commit(_nullishCoalesce(options.label, () => ( updateLabel(patch))), spec);
@@ -861,7 +861,7 @@ var ChartController = (_class = class {
861
861
  const series = this.getSeries(seriesId);
862
862
  if (!series) return this.unknownSeries(seriesId);
863
863
  if (!Number.isInteger(index) || index < 0 || index >= this.spec.categories.length) return this.badIndex(index);
864
- const parsed = _chunkUR37VCIRcjs.parseChartValue.call(void 0, value);
864
+ const parsed = _chunkI4AHLP7Fcjs.parseChartValue.call(void 0, value);
865
865
  if (parsed === void 0) return this.reject(`"${String(value)}" is not a number; enter a number or leave the cell blank.`, [{ path: `${seriesId}[${index}]`, message: `"${String(value)}" is not a number.` }]);
866
866
  if (series.values[index] === parsed) {
867
867
  if (this.issues.length) {
@@ -884,7 +884,7 @@ var ChartController = (_class = class {
884
884
  if (!this.getSeries(cell.seriesId)) issues.push({ path: cell.seriesId, message: this.unknownSeries(cell.seriesId).message });
885
885
  else if (!Number.isInteger(cell.index) || cell.index < 0 || cell.index >= this.spec.categories.length) issues.push({ path: `${cell.seriesId}[${cell.index}]`, message: this.badIndex(cell.index).message });
886
886
  else {
887
- const value = _chunkUR37VCIRcjs.parseChartValue.call(void 0, cell.value);
887
+ const value = _chunkI4AHLP7Fcjs.parseChartValue.call(void 0, cell.value);
888
888
  if (value === void 0) issues.push({ path: `${cell.seriesId}[${cell.index}]`, message: `"${String(cell.value)}" is not a number.` });
889
889
  else parsed.push({ seriesId: cell.seriesId, index: cell.index, value });
890
890
  }
@@ -898,12 +898,12 @@ var ChartController = (_class = class {
898
898
  }
899
899
  /** Adds a series (values padded to the categories) and selects it. Returns its id. */
900
900
  addSeries(input = {}, options = {}) {
901
- const id = input.id && !this.getSeries(input.id) ? input.id : _chunkUR37VCIRcjs.uniqueChartSeriesId.call(void 0, this.spec.series);
901
+ const id = input.id && !this.getSeries(input.id) ? input.id : _chunkI4AHLP7Fcjs.uniqueChartSeriesId.call(void 0, this.spec.series);
902
902
  const name = _nullishCoalesce(input.name, () => ( `Series ${this.spec.series.length + 1}`));
903
903
  const at = Math.max(0, Math.min(this.spec.series.length, _nullishCoalesce(options.at, () => ( this.spec.series.length))));
904
904
  const series = [...this.spec.series];
905
905
  series.splice(at, 0, { ...input, id, name, values: _nullishCoalesce(input.values, () => ( [])) });
906
- const { spec, issues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, { ...this.spec, series });
906
+ const { spec, issues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, { ...this.spec, series });
907
907
  if (issues.length) return this.reject(issues.map((i) => i.message).join(" "), issues);
908
908
  this.commit(`Add series "${name}"`, spec, { kind: "series", seriesId: id });
909
909
  return { ok: true, id };
@@ -922,7 +922,7 @@ var ChartController = (_class = class {
922
922
  updateSeries(id, patch) {
923
923
  const series = this.getSeries(id);
924
924
  if (!series) return this.unknownSeries(id);
925
- const next = _chunkUR37VCIRcjs.cloneChartSeries.call(void 0, series);
925
+ const next = _chunkI4AHLP7Fcjs.cloneChartSeries.call(void 0, series);
926
926
  if (patch.name !== void 0) next.name = String(patch.name);
927
927
  if (patch.color === null || patch.color === "") delete next.color;
928
928
  else if (patch.color !== void 0) next.color = patch.color;
@@ -940,7 +940,7 @@ var ChartController = (_class = class {
940
940
  }
941
941
  if (next.axis === "primary") delete next.axis;
942
942
  const series2 = this.spec.series.map((s) => s.id === id ? next : s);
943
- const { spec, issues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, { ...this.spec, series: series2 });
943
+ const { spec, issues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, { ...this.spec, series: series2 });
944
944
  if (issues.length) return this.reject(issues.map((i) => i.message).join(" "), issues);
945
945
  if (JSON.stringify(spec.series) === JSON.stringify(this.spec.series)) return { ok: true };
946
946
  const label = patch.hidden !== void 0 && Object.keys(patch).length === 1 ? `${patch.hidden ? "Hide" : "Show"} "${series.name}"` : patch.name !== void 0 && Object.keys(patch).length === 1 ? "Rename series" : `Change series "${series.name}"`;
@@ -1033,7 +1033,7 @@ var ChartController = (_class = class {
1033
1033
  const width = Math.max(...rows.map((r) => r.length));
1034
1034
  const lastSeries = column + width - 1;
1035
1035
  while (d.series.length <= lastSeries) {
1036
- const id = _chunkUR37VCIRcjs.uniqueChartSeriesId.call(void 0, d.series);
1036
+ const id = _chunkI4AHLP7Fcjs.uniqueChartSeriesId.call(void 0, d.series);
1037
1037
  d.series.push({ id, name: `Series ${d.series.length + 1}`, values: d.categories.map(() => null) });
1038
1038
  }
1039
1039
  const lastRow = row + rows.length - 1;
@@ -1047,7 +1047,7 @@ var ChartController = (_class = class {
1047
1047
  const index = row + r;
1048
1048
  if (col < 0) d.categories[index] = cell === null || cell === void 0 ? "" : String(cell).trim();
1049
1049
  else {
1050
- const parsed = _chunkUR37VCIRcjs.parseChartValue.call(void 0, cell);
1050
+ const parsed = _chunkI4AHLP7Fcjs.parseChartValue.call(void 0, cell);
1051
1051
  if (parsed === void 0) issues.push({ path: `${d.series[col].id}[${index}]`, message: `"${String(cell)}" is not a number; it was left blank.` });
1052
1052
  d.series[col].values[index] = _nullishCoalesce(parsed, () => ( null));
1053
1053
  }
@@ -1066,14 +1066,14 @@ var ChartController = (_class = class {
1066
1066
  * colours and types are kept by name.
1067
1067
  */
1068
1068
  importTable(rows, options = {}) {
1069
- const data = _chunkUR37VCIRcjs.chartDataFromTable.call(void 0, rows, options);
1069
+ const data = _chunkI4AHLP7Fcjs.chartDataFromTable.call(void 0, rows, options);
1070
1070
  if (!data.categories.length || !data.series.length) return this.reject("There is no data to import: expected a header row and at least one row of values.");
1071
1071
  const byName = new Map(this.spec.series.map((s) => [s.name, s]));
1072
1072
  const series = data.series.map((s) => {
1073
1073
  const old = byName.get(s.name);
1074
1074
  return { ...s, ..._optionalChain([old, 'optionalAccess', _27 => _27.color]) ? { color: old.color } : {}, ..._optionalChain([old, 'optionalAccess', _28 => _28.type]) ? { type: old.type } : {}, ...old ? { id: old.id } : {} };
1075
1075
  });
1076
- const { spec } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, { ...this.spec, categories: data.categories, series });
1076
+ const { spec } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, { ...this.spec, categories: data.categories, series });
1077
1077
  this.commit("Import data", spec);
1078
1078
  if (data.issues.length) {
1079
1079
  this.issues = data.issues;
@@ -1094,10 +1094,10 @@ var ChartController = (_class = class {
1094
1094
  addTrendline(seriesId, input) {
1095
1095
  const series = this.getSeries(seriesId);
1096
1096
  if (!series) return this.unknownSeries(seriesId);
1097
- if (!_chunk6HMEHNWWcjs.chartSupportsTrendlines.call(void 0, this.spec.type, this.spec.stacking))
1097
+ if (!_chunkXTU6QO2Wcjs.chartSupportsTrendlines.call(void 0, this.spec.type, this.spec.stacking))
1098
1098
  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.`);
1099
1099
  const issues = [];
1100
- const line = _chunkUR37VCIRcjs.normalizeChartTrendline.call(void 0, input, "trendline", issues);
1100
+ const line = _chunkI4AHLP7Fcjs.normalizeChartTrendline.call(void 0, input, "trendline", issues);
1101
1101
  if (!line || issues.length) return this.reject(issues.map((i) => i.message).join(" ") || "The trendline is not valid.", issues);
1102
1102
  const index = _nullishCoalesce(_optionalChain([series, 'access', _29 => _29.trendlines, 'optionalAccess', _30 => _30.length]), () => ( 0));
1103
1103
  const next = this.edited((d) => {
@@ -1116,7 +1116,7 @@ var ChartController = (_class = class {
1116
1116
  const issues = [];
1117
1117
  const merged = { ...current, ...patch };
1118
1118
  for (const [k, v] of Object.entries(patch)) if (v === null) delete merged[k];
1119
- const line = _chunkUR37VCIRcjs.normalizeChartTrendline.call(void 0, merged, "trendline", issues);
1119
+ const line = _chunkI4AHLP7Fcjs.normalizeChartTrendline.call(void 0, merged, "trendline", issues);
1120
1120
  if (!line || issues.length) return this.reject(issues.map((i) => i.message).join(" "), issues);
1121
1121
  this.commit(
1122
1122
  "Change trendline",
@@ -1144,7 +1144,7 @@ var ChartController = (_class = class {
1144
1144
  trendlinePoints(seriesId) {
1145
1145
  const series = this.getSeries(seriesId);
1146
1146
  if (!series) return [];
1147
- const xy = _chunkUR37VCIRcjs.chartFamily.call(void 0, this.spec) === "xy";
1147
+ const xy = _chunkI4AHLP7Fcjs.chartFamily.call(void 0, this.spec) === "xy";
1148
1148
  const out = [];
1149
1149
  series.values.forEach((v, i) => {
1150
1150
  const x = xy ? _nullishCoalesce(_optionalChain([series, 'access', _37 => _37.x, 'optionalAccess', _38 => _38[i]]), () => ( (this.spec.type === "bubble" ? i + 1 : null))) : i + 1;
@@ -1156,13 +1156,13 @@ var ChartController = (_class = class {
1156
1156
  trendlineFit(seriesId, index) {
1157
1157
  const line = _optionalChain([this, 'access', _39 => _39.getSeries, 'call', _40 => _40(seriesId), 'optionalAccess', _41 => _41.trendlines, 'optionalAccess', _42 => _42[index]]);
1158
1158
  if (!line) return null;
1159
- return _chunk6HMEHNWWcjs.fitChartTrendline.call(void 0, line, this.trendlinePoints(seriesId));
1159
+ return _chunkXTU6QO2Wcjs.fitChartTrendline.call(void 0, line, this.trendlinePoints(seriesId));
1160
1160
  }
1161
1161
  /** The moving-average points of a trendline (empty for other kinds). */
1162
1162
  trendlineMovingAverage(seriesId, index) {
1163
1163
  const line = _optionalChain([this, 'access', _43 => _43.getSeries, 'call', _44 => _44(seriesId), 'optionalAccess', _45 => _45.trendlines, 'optionalAccess', _46 => _46[index]]);
1164
1164
  if (!line || line.type !== "moving-average") return [];
1165
- return _chunk6HMEHNWWcjs.chartMovingAverage.call(void 0, this.trendlinePoints(seriesId), _nullishCoalesce(line.period, () => ( 2)));
1165
+ return _chunkXTU6QO2Wcjs.chartMovingAverage.call(void 0, this.trendlinePoints(seriesId), _nullishCoalesce(line.period, () => ( 2)));
1166
1166
  }
1167
1167
  // -------------------------------------------------------------------------
1168
1168
  // Reshaping
@@ -1181,7 +1181,7 @@ var ChartController = (_class = class {
1181
1181
  used.add(id);
1182
1182
  return { id, name, values: s.series.map((x) => _nullishCoalesce(x.values[i], () => ( null))) };
1183
1183
  });
1184
- const { spec } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, { ...s, categories: s.series.map((x) => x.name), series });
1184
+ const { spec } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, { ...s, categories: s.series.map((x) => x.name), series });
1185
1185
  this.commit("Switch rows and columns", spec, null);
1186
1186
  return { ok: true };
1187
1187
  }
@@ -1191,7 +1191,7 @@ var ChartController = (_class = class {
1191
1191
  /** Selects a chart element (view state; not an undo step). */
1192
1192
  select(selection) {
1193
1193
  const next = this.validSelection(selection, this.spec);
1194
- if (_chunk6HMEHNWWcjs.sameChartSelection.call(void 0, next, this.selection) || next === null && this.selection === null) return;
1194
+ if (_chunkXTU6QO2Wcjs.sameChartSelection.call(void 0, next, this.selection) || next === null && this.selection === null) return;
1195
1195
  this.selection = next;
1196
1196
  this.notify(false);
1197
1197
  }
@@ -1266,14 +1266,14 @@ var ChartController = (_class = class {
1266
1266
  // -------------------------------------------------------------------------
1267
1267
  /** The spec, for saving (a copy). */
1268
1268
  toJSON() {
1269
- return _chunkUR37VCIRcjs.cloneChartSpec.call(void 0, this.spec);
1269
+ return _chunkI4AHLP7Fcjs.cloneChartSpec.call(void 0, this.spec);
1270
1270
  }
1271
1271
  /**
1272
1272
  * Replaces the chart without an undo step (e.g. when opening a document). Problems are
1273
1273
  * fixed with defaults and reported in `state.issues` (and returned).
1274
1274
  */
1275
1275
  load(input, options = {}) {
1276
- const { spec, issues } = _chunkUR37VCIRcjs.normalizeChartSpec.call(void 0, input);
1276
+ const { spec, issues } = _chunkI4AHLP7Fcjs.normalizeChartSpec.call(void 0, input);
1277
1277
  this.spec = spec;
1278
1278
  this.issues = issues;
1279
1279
  this.selection = this.validSelection(this.selection, spec);
@@ -1343,7 +1343,7 @@ function layoutSparkline(values, options) {
1343
1343
  const h = Number.isFinite(options.height) ? Math.max(1, options.height) : 1;
1344
1344
  const color = _nullishCoalesce(options.color, () => ( "#4269d0"));
1345
1345
  const negative = _nullishCoalesce(options.negativeColor, () => ( "#e5484d"));
1346
- const theme = { ..._chunkUR37VCIRcjs.DEFAULT_CHART_THEME, background: "transparent" };
1346
+ const theme = { ..._chunkI4AHLP7Fcjs.DEFAULT_CHART_THEME, background: "transparent" };
1347
1347
  const marks = [];
1348
1348
  const scene = { width: w, height: h, plot: { x: 0, y: 0, width: w, height: h }, marks, percent: false, theme, warnings: [] };
1349
1349
  const vals = values.slice(0, MAX_POINTS).map((v) => v !== null && Number.isFinite(v) ? Math.max(-1e300, Math.min(1e300, v)) : null);
@@ -1376,7 +1376,7 @@ function layoutSparkline(values, options) {
1376
1376
  const flush = () => {
1377
1377
  if (run.length >= 2) {
1378
1378
  const pts = run.length > 4e3 ? run.filter((_, i) => i % (Math.floor(run.length / 2e3) + 1) === 0) : run;
1379
- d += pts.map(([x, y], i) => `${i ? "L" : "M"}${_chunk6HMEHNWWcjs.r2.call(void 0, x)},${_chunk6HMEHNWWcjs.r2.call(void 0, y)}`).join("");
1379
+ d += pts.map(([x, y], i) => `${i ? "L" : "M"}${_chunkXTU6QO2Wcjs.r2.call(void 0, x)},${_chunkXTU6QO2Wcjs.r2.call(void 0, y)}`).join("");
1380
1380
  }
1381
1381
  run = [];
1382
1382
  };
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkUR37VCIRcjs = require('./chunk-UR37VCIR.cjs');
10
+ var _chunkI4AHLP7Fcjs = require('./chunk-I4AHLP7F.cjs');
11
11
 
12
12
 
13
13
  var _chunk55AKPTLMcjs = require('./chunk-55AKPTLM.cjs');
@@ -1074,7 +1074,7 @@ function layoutCartesian(ctx, area, visible) {
1074
1074
  const { spec, theme, marks, measure, fs } = ctx;
1075
1075
  const horizontal = spec.orientation === "horizontal";
1076
1076
  const n = spec.categories.length;
1077
- const types = new Map(visible.map((s) => [s.id, _chunkUR37VCIRcjs.chartSeriesType.call(void 0, spec, s)]));
1077
+ const types = new Map(visible.map((s) => [s.id, _chunkI4AHLP7Fcjs.chartSeriesType.call(void 0, spec, s)]));
1078
1078
  const stacked = spec.stacking !== "none";
1079
1079
  const percent = spec.stacking === "percent";
1080
1080
  const onSecondary = (s) => s.axis === "secondary";
@@ -1111,7 +1111,7 @@ function layoutCartesian(ctx, area, visible) {
1111
1111
  const stack = stacks.get(s.id);
1112
1112
  errors.set(
1113
1113
  s.id,
1114
- _chunkUR37VCIRcjs.chartErrorAmounts.call(void 0, s.errorBars, s.values).map((e, i) => {
1114
+ _chunkI4AHLP7Fcjs.chartErrorAmounts.call(void 0, s.errorBars, s.values).map((e, i) => {
1115
1115
  const raw = s.values[i];
1116
1116
  const seg = _optionalChain([stack, 'optionalAccess', _8 => _8.segments, 'access', _9 => _9[i]]);
1117
1117
  if (!e || raw === null || stack && !seg) return null;
@@ -1178,7 +1178,7 @@ function layoutCartesian(ctx, area, visible) {
1178
1178
  const drawOrder = [...visible].sort((a, b) => order(types.get(a.id)) - order(types.get(b.id)));
1179
1179
  for (const s of drawOrder) {
1180
1180
  const si = spec.series.indexOf(s);
1181
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, si);
1181
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, si);
1182
1182
  const type = types.get(s.id);
1183
1183
  const stack = stacks.get(s.id);
1184
1184
  const selSeries = ctx.seriesSelected(s.id);
@@ -1204,7 +1204,7 @@ function layoutCartesian(ctx, area, visible) {
1204
1204
  const selected = ctx.isSelected(target);
1205
1205
  const [x, y] = map({ c: c0, v: Math.min(a, b) });
1206
1206
  const rect = horizontal ? { x: Math.min(a, b), y: c0, width: Math.abs(b - a), height: cw } : { x, y, width: cw, height: Math.abs(b - a) };
1207
- const fill = _chunkUR37VCIRcjs.chartPointColor.call(void 0, spec, si, i);
1207
+ const fill = _chunkI4AHLP7Fcjs.chartPointColor.call(void 0, spec, si, i);
1208
1208
  marks.push({
1209
1209
  kind: "rect",
1210
1210
  key: `bar-${s.id}-${i}`,
@@ -1283,7 +1283,7 @@ function layoutCartesian(ctx, area, visible) {
1283
1283
  const target = { kind: "point", seriesId: s.id, index: i };
1284
1284
  const selected = ctx.isSelected(target);
1285
1285
  const r = type === "scatter" ? 4.5 : 3.5;
1286
- const pointColor = _chunkUR37VCIRcjs.chartPointColor.call(void 0, spec, si, i);
1286
+ const pointColor = _chunkI4AHLP7Fcjs.chartPointColor.call(void 0, spec, si, i);
1287
1287
  const fill = showDots ? type === "scatter" ? pointColor : theme.surface : "transparent";
1288
1288
  marks.push(
1289
1289
  pointMark({ key: `point-${s.id}-${i}`, target, selected: selected || selSeries, opacity: type === "scatter" ? 0.85 : void 0 }, showDots ? marker : "hit", cx, cy, showDots ? r : 6, fill, showDots ? pointColor : void 0, 2)
@@ -1355,8 +1355,8 @@ function layoutXy(ctx, area, visible) {
1355
1355
  const yErrors = /* @__PURE__ */ new Map();
1356
1356
  const xErrors = /* @__PURE__ */ new Map();
1357
1357
  for (const { s } of all) {
1358
- if (s.errorBars) yErrors.set(s.id, _chunkUR37VCIRcjs.chartErrorAmounts.call(void 0, s.errorBars, s.values));
1359
- if (s.xErrorBars) xErrors.set(s.id, _chunkUR37VCIRcjs.chartErrorAmounts.call(void 0, s.xErrorBars, s.values.map((_, i) => _nullishCoalesce(_optionalChain([s, 'access', _26 => _26.x, 'optionalAccess', _27 => _27[i]]), () => ( (bubble || !s.x ? i + 1 : null))))));
1358
+ if (s.errorBars) yErrors.set(s.id, _chunkI4AHLP7Fcjs.chartErrorAmounts.call(void 0, s.errorBars, s.values));
1359
+ if (s.xErrorBars) xErrors.set(s.id, _chunkI4AHLP7Fcjs.chartErrorAmounts.call(void 0, s.xErrorBars, s.values.map((_, i) => _nullishCoalesce(_optionalChain([s, 'access', _26 => _26.x, 'optionalAccess', _27 => _27[i]]), () => ( (bubble || !s.x ? i + 1 : null))))));
1360
1360
  }
1361
1361
  let xlo = Infinity;
1362
1362
  let xhi = -Infinity;
@@ -1435,8 +1435,8 @@ function layoutXy(ctx, area, visible) {
1435
1435
  const trendLabels = [];
1436
1436
  for (const { s, pts } of all) {
1437
1437
  const si = spec.series.indexOf(s);
1438
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, si);
1439
- const type = _chunkUR37VCIRcjs.chartSeriesType.call(void 0, spec, s);
1438
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, si);
1439
+ const type = _chunkI4AHLP7Fcjs.chartSeriesType.call(void 0, spec, s);
1440
1440
  const selSeries = ctx.seriesSelected(s.id);
1441
1441
  const seriesTarget = { kind: "series", seriesId: s.id };
1442
1442
  if (type === "line" || type === "area") {
@@ -1461,7 +1461,7 @@ function layoutXy(ctx, area, visible) {
1461
1461
  }
1462
1462
  const target = { kind: "point", seriesId: s.id, index: p.i };
1463
1463
  const selected = ctx.isSelected(target);
1464
- const pointColor = _chunkUR37VCIRcjs.chartPointColor.call(void 0, spec, si, p.i);
1464
+ const pointColor = _chunkI4AHLP7Fcjs.chartPointColor.call(void 0, spec, si, p.i);
1465
1465
  const r = bubble ? maxSize > 0 && p.size !== null && p.size > 0 ? Math.max(2, Math.sqrt(p.size / maxSize) * maxR) : 2 : 4.5;
1466
1466
  if (bubble) marks.push({ kind: "circle", key: `point-${s.id}-${p.i}`, role: "point", cx, cy, r, fill: pointColor, stroke: pointColor, strokeWidth: 1, opacity: 0.6, target, selected: selected || selSeries });
1467
1467
  else marks.push(pointMark({ key: `point-${s.id}-${p.i}`, target, selected: selected || selSeries, opacity: 0.85 }, marker === "none" ? "hit" : marker, cx, cy, marker === "none" ? 6 : r, marker === "none" ? "transparent" : pointColor, marker === "none" ? void 0 : pointColor, 2));
@@ -1504,7 +1504,7 @@ function trendlineLegendItems(spec, color) {
1504
1504
  }
1505
1505
 
1506
1506
  // src/chart/layout-families.ts
1507
- var sliceColor = (ctx, series, i) => _optionalChain([series, 'access', _42 => _42.pointColors, 'optionalAccess', _43 => _43[i]]) || _chunkUR37VCIRcjs.chartSliceColor.call(void 0, ctx.spec, i);
1507
+ var sliceColor = (ctx, series, i) => _optionalChain([series, 'access', _42 => _42.pointColors, 'optionalAccess', _43 => _43[i]]) || _chunkI4AHLP7Fcjs.chartSliceColor.call(void 0, ctx.spec, i);
1508
1508
  function layoutPie(ctx, area, series) {
1509
1509
  const { spec, theme, marks, fs, selection } = ctx;
1510
1510
  const values = spec.categories.map((_, i) => {
@@ -1611,7 +1611,7 @@ function layoutRadar(ctx, area, visible) {
1611
1611
  });
1612
1612
  for (const s of visible) {
1613
1613
  const si = spec.series.indexOf(s);
1614
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, si);
1614
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, si);
1615
1615
  const selSeries = ctx.seriesSelected(s.id);
1616
1616
  const pts = s.values.map((v, i) => v !== null && Number.isFinite(v) ? at(i, rOf(v)) : null);
1617
1617
  const present = pts.filter((p) => p !== null);
@@ -1661,7 +1661,7 @@ function layoutWaterfall(ctx, area, series) {
1661
1661
  });
1662
1662
  const { band, catCenter, map, value } = frame;
1663
1663
  const w = band * (1 - spec.gapWidth);
1664
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(series));
1664
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(series));
1665
1665
  const format = _nullishCoalesce(series.format, () => ( spec.yAxis.format));
1666
1666
  const labelsOn = _nullishCoalesce(series.dataLabels, () => ( spec.dataLabels));
1667
1667
  let prevEnd = null;
@@ -1720,7 +1720,7 @@ function layoutHistogram(ctx, area, visible) {
1720
1720
  const gap = k > 1 ? band * spec.gapWidth * 0.5 : 0;
1721
1721
  const w = (band - gap) / k;
1722
1722
  visible.forEach((s, si) => {
1723
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s));
1723
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s));
1724
1724
  const target = { kind: "series", seriesId: s.id };
1725
1725
  const selected = ctx.seriesSelected(s.id);
1726
1726
  counts[si].forEach((c, b) => {
@@ -1751,7 +1751,7 @@ function layoutBox(ctx, area, visible) {
1751
1751
  visible.forEach((s, i) => {
1752
1752
  const st = stats[i];
1753
1753
  if (!st) return;
1754
- const color = _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s));
1754
+ const color = _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(s));
1755
1755
  const target = { kind: "series", seriesId: s.id };
1756
1756
  const selected = ctx.seriesSelected(s.id);
1757
1757
  const c = catCenter(i);
@@ -1837,13 +1837,13 @@ function layoutTreemap(ctx, area, series) {
1837
1837
 
1838
1838
  // src/chart/layout.ts
1839
1839
  function legendItems(spec, ctx) {
1840
- const family = _chunkUR37VCIRcjs.chartFamily.call(void 0, spec);
1840
+ const family = _chunkI4AHLP7Fcjs.chartFamily.call(void 0, spec);
1841
1841
  if (spec.type === "funnel") return [];
1842
- if (_chunkUR37VCIRcjs.chartColorsByCategory.call(void 0, spec.type)) {
1842
+ if (_chunkI4AHLP7Fcjs.chartColorsByCategory.call(void 0, spec.type)) {
1843
1843
  const first = spec.series.find((s) => !s.hidden);
1844
1844
  return spec.categories.map((c, i) => ({
1845
1845
  label: c,
1846
- color: _optionalChain([first, 'optionalAccess', _45 => _45.pointColors, 'optionalAccess', _46 => _46[i]]) || _chunkUR37VCIRcjs.chartSliceColor.call(void 0, spec, i),
1846
+ color: _optionalChain([first, 'optionalAccess', _45 => _45.pointColors, 'optionalAccess', _46 => _46[i]]) || _chunkI4AHLP7Fcjs.chartSliceColor.call(void 0, spec, i),
1847
1847
  target: { kind: "category", index: i },
1848
1848
  faded: false,
1849
1849
  selected: ctx.isSelected({ kind: "category", index: i }),
@@ -1857,17 +1857,17 @@ function legendItems(spec, ctx) {
1857
1857
  return [
1858
1858
  { label: "Increase", color: ctx.theme.positive, target, faded: false, selected: false, shape: "square" },
1859
1859
  { label: "Decrease", color: ctx.theme.negative, target, faded: false, selected: false, shape: "square" },
1860
- { label: "Total", color: _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(first)), target, faded: false, selected: false, shape: "square" }
1860
+ { label: "Total", color: _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, spec.series.indexOf(first)), target, faded: false, selected: false, shape: "square" }
1861
1861
  ];
1862
1862
  }
1863
1863
  if (family === "box") return [];
1864
- const trends = trendlineLegendItems(spec, (i) => _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, i));
1864
+ const trends = trendlineLegendItems(spec, (i) => _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, i));
1865
1865
  const items = [];
1866
1866
  spec.series.forEach((s, i) => {
1867
- const type = _chunkUR37VCIRcjs.chartSeriesType.call(void 0, spec, s);
1867
+ const type = _chunkI4AHLP7Fcjs.chartSeriesType.call(void 0, spec, s);
1868
1868
  items.push({
1869
1869
  label: s.name,
1870
- color: _chunkUR37VCIRcjs.chartSeriesColor.call(void 0, spec, i),
1870
+ color: _chunkI4AHLP7Fcjs.chartSeriesColor.call(void 0, spec, i),
1871
1871
  target: { kind: "series", seriesId: s.id },
1872
1872
  faded: !!s.hidden,
1873
1873
  selected: ctx.seriesSelected(s.id),
@@ -1880,7 +1880,7 @@ function legendItems(spec, ctx) {
1880
1880
  function layoutChart(spec, options) {
1881
1881
  const width = Math.max(1, Number.isFinite(options.width) ? options.width : 1);
1882
1882
  const height = Math.max(1, Number.isFinite(options.height) ? options.height : 1);
1883
- const theme = { ..._chunkUR37VCIRcjs.DEFAULT_CHART_THEME, ...options.theme };
1883
+ const theme = { ..._chunkI4AHLP7Fcjs.DEFAULT_CHART_THEME, ...options.theme };
1884
1884
  const selection = _nullishCoalesce(options.selection, () => ( null));
1885
1885
  const marks = [];
1886
1886
  const warnings = [];
@@ -1919,7 +1919,7 @@ function layoutChart(spec, options) {
1919
1919
  if (spec.title) titleMark("title", spec.title, theme.titleSize, 600, theme.text);
1920
1920
  if (spec.subtitle) titleMark("subtitle", spec.subtitle, fs + 1, 400, theme.mutedText);
1921
1921
  if (spec.title || spec.subtitle) top += 6;
1922
- const family = _chunkUR37VCIRcjs.chartFamily.call(void 0, spec);
1922
+ const family = _chunkI4AHLP7Fcjs.chartFamily.call(void 0, spec);
1923
1923
  const visible = spec.series.filter((s) => !s.hidden);
1924
1924
  const items = legendItems(spec, ctx);
1925
1925
  let area = { x: pad, y: top, width: width - pad * 2, height: height - top - pad };
@@ -2068,7 +2068,7 @@ function addReadout(ctx, readout, plot) {
2068
2068
  } else return;
2069
2069
  const axis = series.axis === "secondary" ? spec.yAxis2 : spec.yAxis;
2070
2070
  const x = _optionalChain([series, 'access', _52 => _52.x, 'optionalAccess', _53 => _53[readout.index]]);
2071
- const text = x !== null && x !== void 0 && _chunkUR37VCIRcjs.chartFamily.call(void 0, spec) === "xy" ? `${formatChartNumber(x, spec.xAxis.format)}, ${formatChartNumber(value, axis.format)}` : `${_nullishCoalesce(spec.categories[readout.index], () => ( ""))}: ${formatChartNumber(value, _nullishCoalesce(series.format, () => ( axis.format)))}`;
2071
+ const text = x !== null && x !== void 0 && _chunkI4AHLP7Fcjs.chartFamily.call(void 0, spec) === "xy" ? `${formatChartNumber(x, spec.xAxis.format)}, ${formatChartNumber(value, axis.format)}` : `${_nullishCoalesce(spec.categories[readout.index], () => ( ""))}: ${formatChartNumber(value, _nullishCoalesce(series.format, () => ( axis.format)))}`;
2072
2072
  const w = measure(text, fs, 600) + 10;
2073
2073
  const h = fs + 8;
2074
2074
  const bx = Math.max(plot.x, Math.min(plot.x + plot.width - w, ax - w / 2));
@@ -53,7 +53,7 @@ import {
53
53
  builtinProfile,
54
54
  parseProfile,
55
55
  srgbProfile
56
- } from "./chunk-AJSW5GMP.js";
56
+ } from "./chunk-HVQVHUTV.js";
57
57
  import {
58
58
  DEFAULT_AUTO_LEADING,
59
59
  DEFAULT_TEXT_STYLE,
@@ -89,7 +89,7 @@ import {
89
89
  textRectPath,
90
90
  translateMatrix,
91
91
  warpPresetMesh
92
- } from "./chunk-77SG47WT.js";
92
+ } from "./chunk-FLOGD3QB.js";
93
93
  import {
94
94
  bezierPathBounds,
95
95
  outlineStroke,
@@ -54,6 +54,8 @@
54
54
 
55
55
 
56
56
 
57
+ var _chunkBROJYMWUcjs = require('../chunk-BROJYMWU.cjs');
58
+ require('../chunk-XFM3OCHU.cjs');
57
59
 
58
60
 
59
61
 
@@ -69,8 +71,8 @@
69
71
 
70
72
 
71
73
 
72
- var _chunkONZJD2ODcjs = require('../chunk-ONZJD2OD.cjs');
73
- require('../chunk-XFM3OCHU.cjs');
74
+
75
+ var _chunkIPJ3TEYRcjs = require('../chunk-IPJ3TEYR.cjs');
74
76
 
75
77
 
76
78
 
@@ -142,4 +144,4 @@ require('../chunk-XFM3OCHU.cjs');
142
144
 
143
145
 
144
146
 
145
- exports.BUILTIN_COPYRIGHT = _chunkONZJD2ODcjs.BUILTIN_COPYRIGHT; exports.BUILTIN_PROFILES = _chunkONZJD2ODcjs.BUILTIN_PROFILES; exports.COATED_CMYK_DESCRIPTION = _chunkONZJD2ODcjs.COATED_CMYK_DESCRIPTION; exports.Clut = _chunkONZJD2ODcjs.Clut; exports.CmsError = _chunkONZJD2ODcjs.CmsError; exports.CmykModel = _chunkONZJD2ODcjs.CmykModel; exports.D50 = _chunkONZJD2ODcjs.D50; exports.D65_XY = _chunkONZJD2ODcjs.D65_XY; exports.DEFAULT_CMYK_PARAMS = _chunkONZJD2ODcjs.DEFAULT_CMYK_PARAMS; exports.DEFAULT_TRANSFORM_OPTIONS = _chunkONZJD2ODcjs.DEFAULT_TRANSFORM_OPTIONS; exports.GamutCheck = _chunkONZJD2ODcjs.GamutCheck; exports.IDENTITY = _chunkONZJD2ODcjs.IDENTITY; exports.IDENTITY_CURVE = _chunkONZJD2ODcjs.IDENTITY_CURVE; exports.INTENTS = _chunkONZJD2ODcjs.INTENTS; exports.Lut3d = _chunkONZJD2ODcjs.Lut3d; exports.MAX_CHANNELS = _chunkONZJD2ODcjs.MAX_CHANNELS; exports.MAX_PIPE = _chunkONZJD2ODcjs.MAX_PIPE; exports.Pipeline = _chunkONZJD2ODcjs.Pipeline; exports.SAME_COLORS_MAX_DELTA_E = _chunkONZJD2ODcjs.SAME_COLORS_MAX_DELTA_E; exports.Transform = _chunkONZJD2ODcjs.Transform; exports.apply = _chunkONZJD2ODcjs.apply; exports.blackPoint = _chunkONZJD2ODcjs.blackPoint; exports.bradford = _chunkONZJD2ODcjs.bradford; exports.builtinProfile = _chunkONZJD2ODcjs.builtinProfile; exports.builtinProfileId = _chunkONZJD2ODcjs.builtinProfileId; exports.cachedTransform = _chunkONZJD2ODcjs.cachedTransform; exports.canBeDestination = _chunkONZJD2ODcjs.canBeDestination; exports.classSig = _chunkONZJD2ODcjs.classSig; exports.cmykProfile = _chunkONZJD2ODcjs.cmykProfile; exports.d50Quantized = _chunkONZJD2ODcjs.d50Quantized; exports.defaultProfileFor = _chunkONZJD2ODcjs.defaultProfileFor; exports.deltaE76 = _chunkONZJD2ODcjs.deltaE76; exports.det = _chunkONZJD2ODcjs.det; exports.deviceToPcs = _chunkONZJD2ODcjs.deviceToPcs; exports.encodeProfile = _chunkONZJD2ODcjs.encodeProfile; exports.evalCurve = _chunkONZJD2ODcjs.evalCurve; exports.evalCurveInverse = _chunkONZJD2ODcjs.evalCurveInverse; exports.gammaCurve = _chunkONZJD2ODcjs.gammaCurve; exports.grayAsRgb = _chunkONZJD2ODcjs.grayAsRgb; exports.intentCode = _chunkONZJD2ODcjs.intentCode; exports.intentFromCode = _chunkONZJD2ODcjs.intentFromCode; exports.invert = _chunkONZJD2ODcjs.invert; exports.isIdentityCurve = _chunkONZJD2ODcjs.isIdentityCurve; exports.isMatrixShaper = _chunkONZJD2ODcjs.isMatrixShaper; exports.labToXyz = _chunkONZJD2ODcjs.labToXyz; exports.linkStages = _chunkONZJD2ODcjs.linkStages; exports.matrix3 = _chunkONZJD2ODcjs.matrix3; exports.mediaWhite = _chunkONZJD2ODcjs.mediaWhite; exports.mul = _chunkONZJD2ODcjs.mul; exports.paramCount = _chunkONZJD2ODcjs.paramCount; exports.parseProfile = _chunkONZJD2ODcjs.parseProfile; exports.pcsToDevice = _chunkONZJD2ODcjs.pcsToDevice; exports.profileChannels = _chunkONZJD2ODcjs.profileChannels; exports.readJpegIcc = _chunkONZJD2ODcjs.readJpegIcc; exports.readPngIcc = _chunkONZJD2ODcjs.readPngIcc; exports.rgbToXyzMatrix = _chunkONZJD2ODcjs.rgbToXyzMatrix; exports.s15f16Round = _chunkONZJD2ODcjs.s15f16Round; exports.sameColors = _chunkONZJD2ODcjs.sameColors; exports.sampleCurve = _chunkONZJD2ODcjs.sampleCurve; exports.separate = _chunkONZJD2ODcjs.separate; exports.spaceChannels = _chunkONZJD2ODcjs.spaceChannels; exports.spaceSig = _chunkONZJD2ODcjs.spaceSig; exports.srgbProfile = _chunkONZJD2ODcjs.srgbProfile; exports.srgbTrc = _chunkONZJD2ODcjs.srgbTrc; exports.stageOutputs = _chunkONZJD2ODcjs.stageOutputs; exports.supportsIntent = _chunkONZJD2ODcjs.supportsIntent; exports.writeJpegIcc = _chunkONZJD2ODcjs.writeJpegIcc; exports.writePngIcc = _chunkONZJD2ODcjs.writePngIcc; exports.xyToXyz = _chunkONZJD2ODcjs.xyToXyz; exports.xyzToLab = _chunkONZJD2ODcjs.xyzToLab;
147
+ exports.BUILTIN_COPYRIGHT = _chunkBROJYMWUcjs.BUILTIN_COPYRIGHT; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.COATED_CMYK_DESCRIPTION = _chunkBROJYMWUcjs.COATED_CMYK_DESCRIPTION; exports.Clut = _chunkBROJYMWUcjs.Clut; exports.CmsError = _chunkBROJYMWUcjs.CmsError; exports.CmykModel = _chunkBROJYMWUcjs.CmykModel; exports.D50 = _chunkIPJ3TEYRcjs.D50; exports.D65_XY = _chunkIPJ3TEYRcjs.D65_XY; exports.DEFAULT_CMYK_PARAMS = _chunkBROJYMWUcjs.DEFAULT_CMYK_PARAMS; exports.DEFAULT_TRANSFORM_OPTIONS = _chunkBROJYMWUcjs.DEFAULT_TRANSFORM_OPTIONS; exports.GamutCheck = _chunkBROJYMWUcjs.GamutCheck; exports.IDENTITY = _chunkIPJ3TEYRcjs.IDENTITY; exports.IDENTITY_CURVE = _chunkBROJYMWUcjs.IDENTITY_CURVE; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.Lut3d = _chunkBROJYMWUcjs.Lut3d; exports.MAX_CHANNELS = _chunkBROJYMWUcjs.MAX_CHANNELS; exports.MAX_PIPE = _chunkBROJYMWUcjs.MAX_PIPE; exports.Pipeline = _chunkBROJYMWUcjs.Pipeline; exports.SAME_COLORS_MAX_DELTA_E = _chunkBROJYMWUcjs.SAME_COLORS_MAX_DELTA_E; exports.Transform = _chunkBROJYMWUcjs.Transform; exports.apply = _chunkIPJ3TEYRcjs.apply; exports.blackPoint = _chunkBROJYMWUcjs.blackPoint; exports.bradford = _chunkIPJ3TEYRcjs.bradford; exports.builtinProfile = _chunkBROJYMWUcjs.builtinProfile; exports.builtinProfileId = _chunkBROJYMWUcjs.builtinProfileId; exports.cachedTransform = _chunkBROJYMWUcjs.cachedTransform; exports.canBeDestination = _chunkBROJYMWUcjs.canBeDestination; exports.classSig = _chunkBROJYMWUcjs.classSig; exports.cmykProfile = _chunkBROJYMWUcjs.cmykProfile; exports.d50Quantized = _chunkIPJ3TEYRcjs.d50Quantized; exports.defaultProfileFor = _chunkBROJYMWUcjs.defaultProfileFor; exports.deltaE76 = _chunkIPJ3TEYRcjs.deltaE76; exports.det = _chunkIPJ3TEYRcjs.det; exports.deviceToPcs = _chunkBROJYMWUcjs.deviceToPcs; exports.encodeProfile = _chunkBROJYMWUcjs.encodeProfile; exports.evalCurve = _chunkBROJYMWUcjs.evalCurve; exports.evalCurveInverse = _chunkBROJYMWUcjs.evalCurveInverse; exports.gammaCurve = _chunkBROJYMWUcjs.gammaCurve; exports.grayAsRgb = _chunkBROJYMWUcjs.grayAsRgb; exports.intentCode = _chunkBROJYMWUcjs.intentCode; exports.intentFromCode = _chunkBROJYMWUcjs.intentFromCode; exports.invert = _chunkIPJ3TEYRcjs.invert; exports.isIdentityCurve = _chunkBROJYMWUcjs.isIdentityCurve; exports.isMatrixShaper = _chunkBROJYMWUcjs.isMatrixShaper; exports.labToXyz = _chunkIPJ3TEYRcjs.labToXyz; exports.linkStages = _chunkBROJYMWUcjs.linkStages; exports.matrix3 = _chunkBROJYMWUcjs.matrix3; exports.mediaWhite = _chunkBROJYMWUcjs.mediaWhite; exports.mul = _chunkIPJ3TEYRcjs.mul; exports.paramCount = _chunkBROJYMWUcjs.paramCount; exports.parseProfile = _chunkBROJYMWUcjs.parseProfile; exports.pcsToDevice = _chunkBROJYMWUcjs.pcsToDevice; exports.profileChannels = _chunkBROJYMWUcjs.profileChannels; exports.readJpegIcc = _chunkBROJYMWUcjs.readJpegIcc; exports.readPngIcc = _chunkBROJYMWUcjs.readPngIcc; exports.rgbToXyzMatrix = _chunkIPJ3TEYRcjs.rgbToXyzMatrix; exports.s15f16Round = _chunkIPJ3TEYRcjs.s15f16Round; exports.sameColors = _chunkBROJYMWUcjs.sameColors; exports.sampleCurve = _chunkBROJYMWUcjs.sampleCurve; exports.separate = _chunkBROJYMWUcjs.separate; exports.spaceChannels = _chunkBROJYMWUcjs.spaceChannels; exports.spaceSig = _chunkBROJYMWUcjs.spaceSig; exports.srgbProfile = _chunkBROJYMWUcjs.srgbProfile; exports.srgbTrc = _chunkBROJYMWUcjs.srgbTrc; exports.stageOutputs = _chunkBROJYMWUcjs.stageOutputs; exports.supportsIntent = _chunkBROJYMWUcjs.supportsIntent; exports.writeJpegIcc = _chunkBROJYMWUcjs.writeJpegIcc; exports.writePngIcc = _chunkBROJYMWUcjs.writePngIcc; exports.xyToXyz = _chunkIPJ3TEYRcjs.xyToXyz; exports.xyzToLab = _chunkIPJ3TEYRcjs.xyzToLab;