@pixerate/editor 0.55.0 → 0.57.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.
- package/dist/agent/index.cjs +18 -17
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +3 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/animation-editor/index.cjs +25 -7
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +21 -5
- package/dist/animation-editor/index.d.ts +21 -5
- package/dist/animation-editor/index.js +25 -7
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/canvas/index.cjs +2105 -172
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +319 -23
- package/dist/canvas/index.d.ts +319 -23
- package/dist/canvas/index.js +2081 -148
- package/dist/canvas/index.js.map +1 -1
- package/dist/chart/index.cjs +32 -30
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +4 -2
- package/dist/chart/index.d.ts +4 -2
- package/dist/chart/index.js +20 -18
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-C3JHII3M.cjs → chunk-3I6V7PI4.cjs} +45 -45
- package/dist/{chunk-C3JHII3M.cjs.map → chunk-3I6V7PI4.cjs.map} +1 -1
- package/dist/{chunk-P43HUQRX.cjs → chunk-AHCENCU4.cjs} +12 -10
- package/dist/chunk-AHCENCU4.cjs.map +1 -0
- package/dist/chunk-II77MLHN.cjs +11106 -0
- package/dist/chunk-II77MLHN.cjs.map +1 -0
- package/dist/{chunk-OIKYP7XC.js → chunk-LMUDHBWR.js} +2 -2
- package/dist/{chunk-VODBAO32.js → chunk-OEFCLWZ3.js} +4 -1425
- package/dist/chunk-OEFCLWZ3.js.map +1 -0
- package/dist/{chunk-NK3WL5TJ.cjs → chunk-P2CTDJNF.cjs} +27 -1448
- package/dist/chunk-P2CTDJNF.cjs.map +1 -0
- package/dist/chunk-TKPPIVW7.cjs +1443 -0
- package/dist/chunk-TKPPIVW7.cjs.map +1 -0
- package/dist/chunk-WJSCGBJ2.js +11106 -0
- package/dist/chunk-WJSCGBJ2.js.map +1 -0
- package/dist/{chunk-RIXTW3C4.js → chunk-WLVZ235X.js} +5 -3
- package/dist/{chunk-RIXTW3C4.js.map → chunk-WLVZ235X.js.map} +1 -1
- package/dist/chunk-ZOH6X3VR.js +1443 -0
- package/dist/chunk-ZOH6X3VR.js.map +1 -0
- package/dist/{controller-DscWQbjO.d.ts → controller-D2rj5umx.d.ts} +2 -362
- package/dist/{controller-CX0QfSv0.d.cts → controller-R2biKk_E.d.cts} +2 -362
- package/dist/diagram/index.cjs +1457 -47
- package/dist/diagram/index.cjs.map +1 -1
- package/dist/diagram/index.d.cts +1734 -15
- package/dist/diagram/index.d.ts +1734 -15
- package/dist/diagram/index.js +1436 -26
- package/dist/diagram/index.js.map +1 -1
- package/dist/extensions/index.cjs +5 -4
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +4 -3
- package/dist/extensions/index.d.ts +4 -3
- package/dist/extensions/index.js +4 -3
- package/dist/{index-DIWB6xMf.d.cts → index-BcHyG0Wq.d.cts} +2 -1
- package/dist/{index-CALDD35B.d.ts → index-CTCc3m3C.d.ts} +2 -1
- package/dist/index.cjs +10 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/types-BRp-6zkY.d.cts +362 -0
- package/dist/types-BRp-6zkY.d.ts +362 -0
- package/dist/{types-BULrFyuQ.d.cts → types-DYkjhzdz.d.cts} +1 -1
- package/dist/{types-BULrFyuQ.d.ts → types-DYkjhzdz.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-H5K77C7Y.cjs +0 -3848
- package/dist/chunk-H5K77C7Y.cjs.map +0 -1
- package/dist/chunk-NK3WL5TJ.cjs.map +0 -1
- package/dist/chunk-P43HUQRX.cjs.map +0 -1
- package/dist/chunk-VODBAO32.js.map +0 -1
- package/dist/chunk-WWJNC7SX.js +0 -3848
- package/dist/chunk-WWJNC7SX.js.map +0 -1
- /package/dist/{chunk-OIKYP7XC.js.map → chunk-LMUDHBWR.js.map} +0 -0
package/dist/chart/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ var _chunkNN3JGUSXcjs = require('../chunk-NN3JGUSX.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
var _chunkTKPPIVW7cjs = require('../chunk-TKPPIVW7.cjs');
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
@@ -75,7 +76,8 @@ var _chunkNN3JGUSXcjs = require('../chunk-NN3JGUSX.cjs');
|
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
|
|
80
|
+
var _chunkP2CTDJNFcjs = require('../chunk-P2CTDJNF.cjs');
|
|
79
81
|
|
|
80
82
|
|
|
81
83
|
|
|
@@ -259,7 +261,7 @@ function chartFileName(spec, extension) {
|
|
|
259
261
|
}
|
|
260
262
|
async function downloadChartPng(spec, options = {}) {
|
|
261
263
|
const { width = 800, height = 450, filename = chartFileName(spec, "png"), theme, ...raster } = options;
|
|
262
|
-
const svg =
|
|
264
|
+
const svg = _chunkTKPPIVW7cjs.chartToSvg.call(void 0, spec, { width, height, theme });
|
|
263
265
|
const { url, width: w, height: h } = await svgToPngDataUrl(svg, { ...raster, width, height });
|
|
264
266
|
const doc = _nullishCoalesce(raster.document, () => ( globalThis.document));
|
|
265
267
|
const link = doc.createElement("a");
|
|
@@ -301,7 +303,7 @@ function analyzeChartTable(rows) {
|
|
|
301
303
|
} else if (v > 0) anyPositive = true;
|
|
302
304
|
}
|
|
303
305
|
const labels = byRows ? _nullishCoalesce(_optionalChain([grid, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.slice, 'call', _22 => _22(labelColumn ? 1 : 0)]), () => ( [])) : grid.slice(headerRow ? 1 : 0).map((r) => r[0]);
|
|
304
|
-
const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) &&
|
|
306
|
+
const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkP2CTDJNFcjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
|
|
305
307
|
return {
|
|
306
308
|
headerRow,
|
|
307
309
|
labelColumn,
|
|
@@ -427,7 +429,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
427
429
|
params: object({ width: _chunkDK6QBGCScjs.WIDTH, height: _chunkDK6QBGCScjs.HEIGHT }),
|
|
428
430
|
run: (_ctx, params = {}) => {
|
|
429
431
|
const spec = controller.getSpec();
|
|
430
|
-
return { spec: controller.toJSON(), table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, spec), summary:
|
|
432
|
+
return { spec: controller.toJSON(), table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, spec), summary: _chunkTKPPIVW7cjs.summarizeChart.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _25 => _25.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _26 => _26.height]), () => ( 400)) }), issues: controller.getState().issues };
|
|
431
433
|
}
|
|
432
434
|
},
|
|
433
435
|
{
|
|
@@ -565,8 +567,8 @@ function createChartCommands(controller, options = {}) {
|
|
|
565
567
|
keywords: ["chart", "quick layout", "style", "colours", "colors", "monochrome", "theme"],
|
|
566
568
|
description: "Applies a quick layout and / or colour scheme as one undo step.",
|
|
567
569
|
params: object({
|
|
568
|
-
layout: { type: "string", enum:
|
|
569
|
-
colors: { type: "string", enum:
|
|
570
|
+
layout: { type: "string", enum: _chunkTKPPIVW7cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
|
|
571
|
+
colors: { type: "string", enum: _chunkTKPPIVW7cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
|
|
570
572
|
}),
|
|
571
573
|
run: (_ctx, params = {}) => {
|
|
572
574
|
check(controller.applyPreset(_nullishCoalesce(params, () => ( {}))));
|
|
@@ -612,7 +614,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
612
614
|
description: "Replaces the chart with Mermaid xychart-beta, pie or radar-beta text (one undo step). Unreadable lines are listed with line numbers.",
|
|
613
615
|
params: object({ mermaid: { type: "string", description: "Mermaid text." } }, ["mermaid"]),
|
|
614
616
|
run: (_ctx, params) => {
|
|
615
|
-
const read =
|
|
617
|
+
const read = _chunkTKPPIVW7cjs.chartFromMermaid.call(void 0, params.mermaid);
|
|
616
618
|
if (!read.family) fail(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie or radar-beta.");
|
|
617
619
|
check(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
|
|
618
620
|
return { spec: controller.toJSON(), issues: read.issues };
|
|
@@ -626,7 +628,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
626
628
|
keywords: ["chart", "mermaid", "markdown", "export"],
|
|
627
629
|
description: "Returns the chart as Mermaid text (with a round-trip comment unless meta is false).",
|
|
628
630
|
params: object({ meta: { type: "boolean", description: "Include the %% @pixerate round-trip comment (default true)." } }),
|
|
629
|
-
run: (_ctx, params = {}) => ({ mermaid:
|
|
631
|
+
run: (_ctx, params = {}) => ({ mermaid: _chunkTKPPIVW7cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _32 => _32.meta]) }) })
|
|
630
632
|
},
|
|
631
633
|
{
|
|
632
634
|
...base,
|
|
@@ -646,7 +648,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
646
648
|
description: "Returns the chart drawn as a standalone, accessible SVG string (with <title> and <desc>).",
|
|
647
649
|
params: object({ width: _chunkDK6QBGCScjs.WIDTH, height: _chunkDK6QBGCScjs.HEIGHT }),
|
|
648
650
|
run: (_ctx, params = {}) => ({
|
|
649
|
-
svg:
|
|
651
|
+
svg: _chunkTKPPIVW7cjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _33 => _33.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _34 => _34.height]), () => ( 400)) })
|
|
650
652
|
})
|
|
651
653
|
},
|
|
652
654
|
{
|
|
@@ -712,7 +714,7 @@ function snapChartDragValue(scene, value, options = {}) {
|
|
|
712
714
|
const scale = _nullishCoalesce(options.scale, () => ( scene.valueScale));
|
|
713
715
|
const tolerance = _nullishCoalesce(options.tolerancePx, () => ( 6));
|
|
714
716
|
if (scale) {
|
|
715
|
-
const px = (v) =>
|
|
717
|
+
const px = (v) => _chunkP2CTDJNFcjs.chartScaleToPixel.call(void 0, v, scale);
|
|
716
718
|
const at = px(value);
|
|
717
719
|
let best = null;
|
|
718
720
|
let bestDist = tolerance;
|
|
@@ -727,7 +729,7 @@ function snapChartDragValue(scene, value, options = {}) {
|
|
|
727
729
|
}
|
|
728
730
|
if (best !== null) return best;
|
|
729
731
|
}
|
|
730
|
-
return
|
|
732
|
+
return _chunkP2CTDJNFcjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _40 => _40.ticks]), _optionalChain([scale, 'optionalAccess', _41 => _41.logBase]));
|
|
731
733
|
}
|
|
732
734
|
function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
733
735
|
if (!canDragChartPoint(controller, scene, target)) return null;
|
|
@@ -739,8 +741,8 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
739
741
|
const xy = _chunkCKRNELPOcjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
|
|
740
742
|
const startValue = _nullishCoalesce(series.values[index], () => ( 0));
|
|
741
743
|
const startX = _nullishCoalesce(_optionalChain([series, 'access', _42 => _42.x, 'optionalAccess', _43 => _43[index]]), () => ( null));
|
|
742
|
-
const startAt =
|
|
743
|
-
const startAtX = xy ?
|
|
744
|
+
const startAt = _chunkP2CTDJNFcjs.chartValueAtPoint.call(void 0, scene, start, secondary);
|
|
745
|
+
const startAtX = xy ? _chunkP2CTDJNFcjs.chartXAtPoint.call(void 0, scene, start) : void 0;
|
|
744
746
|
if (startAt === void 0) return null;
|
|
745
747
|
const candidates = [0, startValue];
|
|
746
748
|
if (!xy) {
|
|
@@ -758,7 +760,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
758
760
|
target: { seriesId, index },
|
|
759
761
|
move(point, moveOptions = {}) {
|
|
760
762
|
if (ended) return;
|
|
761
|
-
const at =
|
|
763
|
+
const at = _chunkP2CTDJNFcjs.chartValueAtPoint.call(void 0, scene, point, secondary);
|
|
762
764
|
if (at === void 0) return;
|
|
763
765
|
const factor = moveOptions.fine ? 0.1 : 1;
|
|
764
766
|
const moved = (from, to, s, value) => s.logBase && value > 0 && from > 0 && to > 0 ? value * Math.pow(to / from, factor) : value + (to - from) * factor;
|
|
@@ -766,7 +768,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
766
768
|
let moveX = false;
|
|
767
769
|
let atX;
|
|
768
770
|
if (xy && startX !== null && startAtX !== void 0) {
|
|
769
|
-
atX =
|
|
771
|
+
atX = _chunkP2CTDJNFcjs.chartXAtPoint.call(void 0, scene, point);
|
|
770
772
|
moveX = atX !== void 0;
|
|
771
773
|
if (moveOptions.lockAxis) {
|
|
772
774
|
if (Math.abs(point.x - start.x) >= Math.abs(point.y - start.y)) moveY = false;
|
|
@@ -778,7 +780,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
778
780
|
if (moveOptions.fine) {
|
|
779
781
|
if (s.logBase && !options.step) return v > 0 ? Number(v.toPrecision(3)) : v;
|
|
780
782
|
const unit = options.step ? options.step / 10 : s.ticks.length > 1 ? (s.ticks[1] - s.ticks[0]) / 100 : void 0;
|
|
781
|
-
return
|
|
783
|
+
return _chunkP2CTDJNFcjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
|
|
782
784
|
}
|
|
783
785
|
return snapChartDragValue(scene, v, { candidates: c, tolerancePx: options.tolerancePx, step: options.step, scale: s });
|
|
784
786
|
};
|
|
@@ -968,7 +970,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
968
970
|
spec: controller.toJSON(),
|
|
969
971
|
table: table(),
|
|
970
972
|
selection: controller.getState().selection,
|
|
971
|
-
summary:
|
|
973
|
+
summary: _chunkTKPPIVW7cjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
|
|
972
974
|
issues: controller.getState().issues,
|
|
973
975
|
...reason ? { readOnly: reason } : {}
|
|
974
976
|
};
|
|
@@ -990,8 +992,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
990
992
|
annotations: { title: "Render the chart", ...READ },
|
|
991
993
|
handler: async ({ width = size.width, height = size.height, format = "svg" }) => {
|
|
992
994
|
const json = controller.toJSON();
|
|
993
|
-
const scene =
|
|
994
|
-
const svg =
|
|
995
|
+
const scene = _chunkP2CTDJNFcjs.layoutChart.call(void 0, json, { width, height, selection: null });
|
|
996
|
+
const svg = _chunkTKPPIVW7cjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunkTKPPIVW7cjs.describeChart.call(void 0, json) });
|
|
995
997
|
const warnings = scene.warnings;
|
|
996
998
|
if (format === "png") {
|
|
997
999
|
if (!options.rasterize) fail2('This host cannot rasterize charts; call render_chart with format "svg", or get_chart for the layout warnings.');
|
|
@@ -1070,8 +1072,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1070
1072
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
1071
1073
|
annotations: { title: "List chart presets", ...READ },
|
|
1072
1074
|
handler: () => ({
|
|
1073
|
-
layouts:
|
|
1074
|
-
colorSchemes:
|
|
1075
|
+
layouts: _chunkTKPPIVW7cjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
|
|
1076
|
+
colorSchemes: _chunkTKPPIVW7cjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
|
|
1075
1077
|
})
|
|
1076
1078
|
};
|
|
1077
1079
|
const exportMermaid = {
|
|
@@ -1080,7 +1082,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1080
1082
|
description: 'Returns the chart as Mermaid text (xychart-beta, pie or radar-beta) for Markdown or chat. With meta (default true) one "%% @pixerate {\u2026}" comment keeps what Mermaid cannot express, so import_chart_mermaid gets the chart back exactly.',
|
|
1081
1083
|
inputSchema: { type: "object", properties: { meta: { type: "boolean", description: "Include the round-trip comment (default true)." } }, additionalProperties: false },
|
|
1082
1084
|
annotations: { title: "Export chart as Mermaid", ...READ },
|
|
1083
|
-
handler: ({ meta = true }) => ({ mermaid:
|
|
1085
|
+
handler: ({ meta = true }) => ({ mermaid: _chunkTKPPIVW7cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
|
|
1084
1086
|
};
|
|
1085
1087
|
const exportOoxml = {
|
|
1086
1088
|
name: "export_chart_ooxml",
|
|
@@ -1269,7 +1271,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1269
1271
|
annotations: { title: "Import a Mermaid chart", ...DESTRUCTIVE },
|
|
1270
1272
|
handler: ({ mermaid }) => {
|
|
1271
1273
|
const fenced = /```(?:mermaid)?\s*\n([\s\S]*?)```/.exec(mermaid);
|
|
1272
|
-
const read =
|
|
1274
|
+
const read = _chunkTKPPIVW7cjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
|
|
1273
1275
|
if (!read.family) fail2(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie or radar-beta.");
|
|
1274
1276
|
resolve(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
|
|
1275
1277
|
return { spec: controller.toJSON(), issues: read.issues };
|
|
@@ -1324,8 +1326,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1324
1326
|
inputSchema: {
|
|
1325
1327
|
type: "object",
|
|
1326
1328
|
properties: {
|
|
1327
|
-
layout: { type: "string", enum:
|
|
1328
|
-
colors: { type: "string", enum:
|
|
1329
|
+
layout: { type: "string", enum: _chunkTKPPIVW7cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
|
|
1330
|
+
colors: { type: "string", enum: _chunkTKPPIVW7cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
|
|
1329
1331
|
},
|
|
1330
1332
|
additionalProperties: false
|
|
1331
1333
|
},
|
|
@@ -1421,7 +1423,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1421
1423
|
},
|
|
1422
1424
|
annotations: { title: "Drag a chart point", ...WRITE },
|
|
1423
1425
|
handler: ({ from, to, fine, lockAxis, width = size.width, height = size.height }) => {
|
|
1424
|
-
const scene =
|
|
1426
|
+
const scene = _chunkP2CTDJNFcjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
|
|
1425
1427
|
const start = { x: from.x * width, y: from.y * height };
|
|
1426
1428
|
const target = chartHitTest(scene, start);
|
|
1427
1429
|
if (_optionalChain([target, 'optionalAccess', _81 => _81.kind]) !== "point") fail2(`There is no bar or point at (${from.x}, ${from.y}); ${target ? `that is the ${target.kind}` : "that is outside the chart"}. Use render_chart to find marks.`);
|
|
@@ -1451,7 +1453,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1451
1453
|
},
|
|
1452
1454
|
annotations: { title: "Press a key on the chart", ...DESTRUCTIVE },
|
|
1453
1455
|
handler: ({ key: k, shift, alt }) => {
|
|
1454
|
-
const scene =
|
|
1456
|
+
const scene = _chunkP2CTDJNFcjs.layoutChart.call(void 0, controller.toJSON(), size);
|
|
1455
1457
|
const used = handleChartKey(controller, scene, { key: k, shiftKey: shift, altKey: alt });
|
|
1456
1458
|
const sel = controller.getState().selection;
|
|
1457
1459
|
const value = _optionalChain([sel, 'optionalAccess', _86 => _86.kind]) === "point" ? _nullishCoalesce(_optionalChain([controller, 'access', _87 => _87.getSeries, 'call', _88 => _88(sel.seriesId), 'optionalAccess', _89 => _89.values, 'access', _90 => _90[sel.index]]), () => ( null)) : void 0;
|
|
@@ -1564,7 +1566,7 @@ var ChartStream = (_class = class {
|
|
|
1564
1566
|
issues = complete ? read.issues : [];
|
|
1565
1567
|
}
|
|
1566
1568
|
} else {
|
|
1567
|
-
const read =
|
|
1569
|
+
const read = _chunkTKPPIVW7cjs.chartFromMermaid.call(void 0, text, { partial: !complete });
|
|
1568
1570
|
if (read.family) {
|
|
1569
1571
|
spec = read.spec;
|
|
1570
1572
|
issues = complete ? read.issues : [];
|
|
@@ -1672,7 +1674,7 @@ function planChartCommand(spec, scene, command, speed = 1) {
|
|
|
1672
1674
|
const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _93 => _93.values, 'access', _94 => _94[command.index]]), () => ( 0));
|
|
1673
1675
|
const scale = _optionalChain([series, 'optionalAccess', _95 => _95.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
|
|
1674
1676
|
if (at && scale) {
|
|
1675
|
-
const px =
|
|
1677
|
+
const px = _chunkP2CTDJNFcjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
|
|
1676
1678
|
const to = scale.axis === "y" ? { x: at.x, y: px } : { x: px, y: at.y };
|
|
1677
1679
|
steps.push({ type: "move", to: at, ms: ms(380) }, { type: "press" }, { type: "drag", to, ms: ms(520), from, value: command.value }, { type: "release" });
|
|
1678
1680
|
} else steps.push({ type: "drag", to: { x: scene.plot.x + scene.plot.width / 2, y: scene.plot.y + scene.plot.height / 2 }, ms: ms(200), from, value: command.value });
|
|
@@ -2253,5 +2255,5 @@ function createOfficeChartToolProvider(options = {}) {
|
|
|
2253
2255
|
|
|
2254
2256
|
|
|
2255
2257
|
|
|
2256
|
-
exports.CHART_AXIS_KINDS = _chunkCKRNELPOcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkCKRNELPOcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES =
|
|
2258
|
+
exports.CHART_AXIS_KINDS = _chunkCKRNELPOcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkCKRNELPOcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunkTKPPIVW7cjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkCKRNELPOcjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkP2CTDJNFcjs.CHART_DATE_STEPS; exports.CHART_ERROR_BAR_DIRECTIONS = _chunkCKRNELPOcjs.CHART_ERROR_BAR_DIRECTIONS; exports.CHART_ERROR_BAR_LABELS = _chunkCKRNELPOcjs.CHART_ERROR_BAR_LABELS; exports.CHART_ERROR_BAR_TYPES = _chunkCKRNELPOcjs.CHART_ERROR_BAR_TYPES; exports.CHART_LABEL_POSITIONS = _chunkCKRNELPOcjs.CHART_LABEL_POSITIONS; exports.CHART_LAYOUT_PRESETS = _chunkTKPPIVW7cjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkCKRNELPOcjs.CHART_LEGEND_POSITIONS; exports.CHART_MARKERS = _chunkCKRNELPOcjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunkTKPPIVW7cjs.CHART_MERMAID_META_PREFIX; exports.CHART_NUMBER_STYLES = _chunkCKRNELPOcjs.CHART_NUMBER_STYLES; exports.CHART_OOXML_CONTENT_TYPE = _chunkNN3JGUSXcjs.CHART_OOXML_CONTENT_TYPE; exports.CHART_OOXML_NS = _chunkNN3JGUSXcjs.CHART_OOXML_NS; exports.CHART_OOXML_RELATIONSHIP = _chunkNN3JGUSXcjs.CHART_OOXML_RELATIONSHIP; exports.CHART_ORIENTATIONS = _chunkCKRNELPOcjs.CHART_ORIENTATIONS; exports.CHART_PALETTE_SHADES = _chunkCKRNELPOcjs.CHART_PALETTE_SHADES; exports.CHART_PRESENCE_COLORS = CHART_PRESENCE_COLORS; exports.CHART_RASTER_MAX_SIZE = CHART_RASTER_MAX_SIZE; exports.CHART_SERIES_TYPES = _chunkCKRNELPOcjs.CHART_SERIES_TYPES; exports.CHART_STACKINGS = _chunkCKRNELPOcjs.CHART_STACKINGS; exports.CHART_TRENDLINE_TYPES = _chunkCKRNELPOcjs.CHART_TRENDLINE_TYPES; exports.CHART_TYPES = _chunkCKRNELPOcjs.CHART_TYPES; exports.CHART_TYPE_LABELS = _chunkCKRNELPOcjs.CHART_TYPE_LABELS; exports.CSS_VARIABLE_CHART_THEME = _chunkCKRNELPOcjs.CSS_VARIABLE_CHART_THEME; exports.ChartController = _chunkTKPPIVW7cjs.ChartController; exports.ChartDirector = ChartDirector; exports.ChartPresence = ChartPresence; exports.ChartStream = ChartStream; exports.DEFAULT_CHART_PALETTE = _chunkCKRNELPOcjs.DEFAULT_CHART_PALETTE; exports.DEFAULT_CHART_THEME = _chunkCKRNELPOcjs.DEFAULT_CHART_THEME; exports.MAX_CHART_DATA_LABELS = _chunkP2CTDJNFcjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkP2CTDJNFcjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_MARKERS = _chunkP2CTDJNFcjs.MAX_CHART_MARKERS; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkP2CTDJNFcjs.chartBoxStats; exports.chartClientToScene = chartClientToScene; exports.chartColorDistance = _chunkCKRNELPOcjs.chartColorDistance; exports.chartColorInputValue = _chunkCKRNELPOcjs.chartColorInputValue; exports.chartColorsByCategory = _chunkCKRNELPOcjs.chartColorsByCategory; exports.chartContrastRatio = _chunkCKRNELPOcjs.chartContrastRatio; exports.chartDataFromTable = _chunkCKRNELPOcjs.chartDataFromTable; exports.chartDataToTable = _chunkCKRNELPOcjs.chartDataToTable; exports.chartDateLabels = _chunkP2CTDJNFcjs.chartDateLabels; exports.chartDateToSerial = _chunkP2CTDJNFcjs.chartDateToSerial; exports.chartErrorAmounts = _chunkCKRNELPOcjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkCKRNELPOcjs.chartErrorBarsOfType; exports.chartFamily = _chunkCKRNELPOcjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkNN3JGUSXcjs.chartFormatToCode; exports.chartFromMermaid = _chunkTKPPIVW7cjs.chartFromMermaid; exports.chartFromOoxml = _chunkNN3JGUSXcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkP2CTDJNFcjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLuminance = _chunkCKRNELPOcjs.chartLuminance; exports.chartMermaidFamily = _chunkTKPPIVW7cjs.chartMermaidFamily; exports.chartMovingAverage = _chunkP2CTDJNFcjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkCKRNELPOcjs.chartPointColor; exports.chartPresetPatch = _chunkTKPPIVW7cjs.chartPresetPatch; exports.chartQuantile = _chunkP2CTDJNFcjs.chartQuantile; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkCKRNELPOcjs.chartRgbToHex; exports.chartRgbToOklab = _chunkCKRNELPOcjs.chartRgbToOklab; exports.chartScaleFromPixel = _chunkP2CTDJNFcjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkP2CTDJNFcjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunkTKPPIVW7cjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunkTKPPIVW7cjs.chartSceneToSvg; exports.chartSerialToDate = _chunkP2CTDJNFcjs.chartSerialToDate; exports.chartSeriesColor = _chunkCKRNELPOcjs.chartSeriesColor; exports.chartSeriesType = _chunkCKRNELPOcjs.chartSeriesType; exports.chartSliceColor = _chunkCKRNELPOcjs.chartSliceColor; exports.chartSquarify = _chunkP2CTDJNFcjs.chartSquarify; exports.chartSupportsTrendlines = _chunkP2CTDJNFcjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunkTKPPIVW7cjs.chartTextBaseline; exports.chartTextOn = _chunkCKRNELPOcjs.chartTextOn; exports.chartTextTransform = _chunkTKPPIVW7cjs.chartTextTransform; exports.chartToMermaid = _chunkTKPPIVW7cjs.chartToMermaid; exports.chartToOoxml = _chunkNN3JGUSXcjs.chartToOoxml; exports.chartToSvg = _chunkTKPPIVW7cjs.chartToSvg; exports.chartTrendlineName = _chunkP2CTDJNFcjs.chartTrendlineName; exports.chartValueAtPoint = _chunkP2CTDJNFcjs.chartValueAtPoint; exports.chartXAtPoint = _chunkP2CTDJNFcjs.chartXAtPoint; exports.checkChartColors = _chunkCKRNELPOcjs.checkChartColors; exports.cloneChartSeries = _chunkCKRNELPOcjs.cloneChartSeries; exports.cloneChartSpec = _chunkCKRNELPOcjs.cloneChartSpec; exports.compileChartFormatCode = _chunkP2CTDJNFcjs.compileChartFormatCode; exports.contrastingTextColor = _chunkP2CTDJNFcjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunkTKPPIVW7cjs.createChartController; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkCKRNELPOcjs.createChartSpec; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkCKRNELPOcjs.cyclePaletteColor; exports.decimateChartPoints = _chunkP2CTDJNFcjs.decimateChartPoints; exports.defaultChartAxis = _chunkCKRNELPOcjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkCKRNELPOcjs.defaultChartErrorBarValue; exports.describeChart = _chunkTKPPIVW7cjs.describeChart; exports.describeChartErrorBars = _chunkCKRNELPOcjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkP2CTDJNFcjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findMermaidCharts = _chunkTKPPIVW7cjs.findMermaidCharts; exports.fitChartTrendline = _chunkP2CTDJNFcjs.fitChartTrendline; exports.formatChartAmountList = _chunkCKRNELPOcjs.formatChartAmountList; exports.formatChartDate = _chunkP2CTDJNFcjs.formatChartDate; exports.formatChartNumber = _chunkP2CTDJNFcjs.formatChartNumber; exports.formatChartValueWithCode = _chunkP2CTDJNFcjs.formatChartValueWithCode; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkCKRNELPOcjs.isCartesianChart; exports.isXyChart = _chunkCKRNELPOcjs.isXyChart; exports.layoutChart = _chunkP2CTDJNFcjs.layoutChart; exports.layoutSparkline = _chunkTKPPIVW7cjs.layoutSparkline; exports.linearMap = _chunkP2CTDJNFcjs.linearMap; exports.monochromeChartPalette = _chunkTKPPIVW7cjs.monochromeChartPalette; exports.niceLogScale = _chunkP2CTDJNFcjs.niceLogScale; exports.niceScale = _chunkP2CTDJNFcjs.niceScale; exports.niceStep = _chunkP2CTDJNFcjs.niceStep; exports.normalizeChartAxis = _chunkCKRNELPOcjs.normalizeChartAxis; exports.normalizeChartErrorBars = _chunkCKRNELPOcjs.normalizeChartErrorBars; exports.normalizeChartSpec = _chunkCKRNELPOcjs.normalizeChartSpec; exports.normalizeChartTrendline = _chunkCKRNELPOcjs.normalizeChartTrendline; exports.normalizeChartValues = _chunkCKRNELPOcjs.normalizeChartValues; exports.parseChartAmountList = _chunkCKRNELPOcjs.parseChartAmountList; exports.parseChartColor = _chunkCKRNELPOcjs.parseChartColor; exports.parseChartDate = _chunkP2CTDJNFcjs.parseChartDate; exports.parseChartValue = _chunkCKRNELPOcjs.parseChartValue; exports.parsePartialChartJson = parsePartialChartJson; exports.planChartCommand = planChartCommand; exports.rasterizeChartSvg = rasterizeChartSvg; exports.realChartClock = realChartClock; exports.recommendChartTypes = recommendChartTypes; exports.recommendForShape = recommendForShape; exports.resolveChartSvgPaints = resolveChartSvgPaints; exports.sameChartSelection = _chunkP2CTDJNFcjs.sameChartSelection; exports.shadeChartColor = _chunkCKRNELPOcjs.shadeChartColor; exports.simulateChartVision = _chunkCKRNELPOcjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkP2CTDJNFcjs.snapChartValue; exports.sparklineToSvg = _chunkTKPPIVW7cjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkP2CTDJNFcjs.stepDecimals; exports.summarizeChart = _chunkTKPPIVW7cjs.summarizeChart; exports.summarizeChartSeries = _chunkP2CTDJNFcjs.summarizeChartSeries; exports.trendNumberText = _chunkP2CTDJNFcjs.trendNumberText; exports.uniqueChartSeriesId = _chunkCKRNELPOcjs.uniqueChartSeriesId;
|
|
2257
2259
|
//# sourceMappingURL=index.cjs.map
|