@pixerate/editor 0.52.0 → 0.54.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 +37 -29
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +4 -3
- package/dist/agent/index.d.ts +4 -3
- package/dist/agent/index.js +16 -8
- package/dist/agent/index.js.map +1 -1
- package/dist/animation/index.cjs +15 -1
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +3 -226
- package/dist/animation/index.d.ts +3 -226
- package/dist/animation/index.js +14 -0
- package/dist/bridge/cli.cjs +36 -0
- package/dist/bridge/cli.cjs.map +1 -0
- package/dist/bridge/cli.d.cts +1 -0
- package/dist/bridge/cli.d.ts +1 -0
- package/dist/bridge/cli.js +36 -0
- package/dist/bridge/cli.js.map +1 -0
- package/dist/bridge/index.cjs +16 -0
- package/dist/bridge/index.cjs.map +1 -0
- package/dist/bridge/index.d.cts +65 -0
- package/dist/bridge/index.d.ts +65 -0
- package/dist/bridge/index.js +16 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge-client-C5OziCRK.d.cts +148 -0
- package/dist/bridge-client-C5dRjrz5.d.ts +148 -0
- package/dist/canvas/index.cjs +1308 -528
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +309 -5
- package/dist/canvas/index.d.ts +309 -5
- package/dist/canvas/index.js +1295 -515
- package/dist/canvas/index.js.map +1 -1
- package/dist/chart/index.cjs +193 -192
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +77 -59
- package/dist/chart/index.d.ts +77 -59
- package/dist/chart/index.js +87 -86
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-UAW5FEMD.js → chunk-3S72F46R.js} +66 -8
- package/dist/chunk-3S72F46R.js.map +1 -0
- package/dist/{chunk-5TWIN7ZJ.js → chunk-47WWV3LI.js} +34 -4
- package/dist/chunk-47WWV3LI.js.map +1 -0
- package/dist/{chunk-OV7UAKIY.js → chunk-633QC34G.js} +172 -1
- package/dist/chunk-633QC34G.js.map +1 -0
- package/dist/chunk-AWKPSOSX.js +401 -0
- package/dist/chunk-AWKPSOSX.js.map +1 -0
- package/dist/chunk-B6DSIEXA.js +96 -0
- package/dist/chunk-B6DSIEXA.js.map +1 -0
- package/dist/{chunk-5N6AQCVB.js → chunk-BQQZ6MOI.js} +3 -3
- package/dist/{chunk-M5Z77GFH.cjs → chunk-C3JHII3M.cjs} +53 -53
- package/dist/{chunk-M5Z77GFH.cjs.map → chunk-C3JHII3M.cjs.map} +1 -1
- package/dist/{chunk-JOX6MJW4.cjs → chunk-CKRNELPO.cjs} +176 -5
- package/dist/chunk-CKRNELPO.cjs.map +1 -0
- package/dist/{chunk-TGBCBQFV.cjs → chunk-DK6QBGCS.cjs} +45 -15
- package/dist/chunk-DK6QBGCS.cjs.map +1 -0
- package/dist/chunk-EGFUVXKK.cjs +96 -0
- package/dist/chunk-EGFUVXKK.cjs.map +1 -0
- package/dist/{chunk-AMWXSYCI.js → chunk-GPWNYQ7R.js} +2 -370
- package/dist/chunk-GPWNYQ7R.js.map +1 -0
- package/dist/chunk-H5K77C7Y.cjs +3848 -0
- package/dist/chunk-H5K77C7Y.cjs.map +1 -0
- package/dist/chunk-K73CKYUM.cjs +458 -0
- package/dist/chunk-K73CKYUM.cjs.map +1 -0
- package/dist/{chunk-GTZXF4BI.cjs → chunk-NK3WL5TJ.cjs} +298 -133
- package/dist/chunk-NK3WL5TJ.cjs.map +1 -0
- package/dist/{chunk-3ZBAXET6.cjs → chunk-NN3JGUSX.cjs} +80 -22
- package/dist/chunk-NN3JGUSX.cjs.map +1 -0
- package/dist/chunk-NV22EMOZ.cjs +401 -0
- package/dist/chunk-NV22EMOZ.cjs.map +1 -0
- package/dist/{chunk-YMKPMXZ4.js → chunk-OIKYP7XC.js} +4 -4
- package/dist/{chunk-FEMIVHN3.cjs → chunk-P43HUQRX.cjs} +16 -16
- package/dist/{chunk-FEMIVHN3.cjs.map → chunk-P43HUQRX.cjs.map} +1 -1
- package/dist/chunk-PTMIGXZ2.js +467 -0
- package/dist/chunk-PTMIGXZ2.js.map +1 -0
- package/dist/chunk-QIWFEEWG.cjs +467 -0
- package/dist/chunk-QIWFEEWG.cjs.map +1 -0
- package/dist/{chunk-QFTVLEVN.js → chunk-RIXTW3C4.js} +3 -3
- package/dist/{chunk-WBOAXDKD.js → chunk-VODBAO32.js} +222 -57
- package/dist/chunk-VODBAO32.js.map +1 -0
- package/dist/chunk-WWJNC7SX.js +3848 -0
- package/dist/chunk-WWJNC7SX.js.map +1 -0
- package/dist/{chunk-2DEBI6KU.cjs → chunk-YZZMX6V7.cjs} +10 -10
- package/dist/{chunk-2DEBI6KU.cjs.map → chunk-YZZMX6V7.cjs.map} +1 -1
- package/dist/commands/index.d.cts +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/{controller-DS3drIvy.d.cts → controller-CX0QfSv0.d.cts} +53 -2
- package/dist/{controller-BdKzaxs2.d.ts → controller-DscWQbjO.d.ts} +53 -2
- package/dist/diagram/index.cjs +1146 -0
- package/dist/diagram/index.cjs.map +1 -0
- package/dist/diagram/index.d.cts +787 -0
- package/dist/diagram/index.d.ts +787 -0
- package/dist/diagram/index.js +1146 -0
- package/dist/diagram/index.js.map +1 -0
- package/dist/{easing-DTmX99QG.d.cts → easing-CNGk-W6d.d.cts} +1 -1
- package/dist/{easing-DTmX99QG.d.ts → easing-CNGk-W6d.d.ts} +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +6 -6
- package/dist/extensions/index.d.cts +2 -2
- package/dist/extensions/index.d.ts +2 -2
- package/dist/extensions/index.js +5 -5
- package/dist/generation/index.d.cts +2 -2
- package/dist/generation/index.d.ts +2 -2
- package/dist/image-editor/index.d.cts +1 -1
- package/dist/image-editor/index.d.ts +1 -1
- package/dist/{index-Dt9lzydb.d.ts → index-CALDD35B.d.ts} +1 -1
- package/dist/{index-DOy9HzfC.d.cts → index-DIWB6xMf.d.cts} +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/parameters/index.d.cts +1 -1
- package/dist/parameters/index.d.ts +1 -1
- package/dist/player-DSMjdgQ9.d.cts +225 -0
- package/dist/player-DdfVrKWq.d.ts +225 -0
- package/dist/presence-Cb6WhcrQ.d.cts +77 -0
- package/dist/presence-Cb6WhcrQ.d.ts +77 -0
- package/dist/{registry-CSlH4iUn.d.ts → registry-7AZFuand.d.ts} +1 -1
- package/dist/{registry-B4l-lYts.d.cts → registry-DIpIaCkH.d.cts} +1 -1
- package/dist/tools/index.cjs +10 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +3 -74
- package/dist/tools/index.d.ts +3 -74
- package/dist/tools/index.js +12 -4
- package/dist/types-BULrFyuQ.d.cts +316 -0
- package/dist/types-BULrFyuQ.d.ts +316 -0
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/package.json +14 -1
- package/dist/chunk-3ZBAXET6.cjs.map +0 -1
- package/dist/chunk-5TWIN7ZJ.js.map +0 -1
- package/dist/chunk-AMWXSYCI.js.map +0 -1
- package/dist/chunk-GTZXF4BI.cjs.map +0 -1
- package/dist/chunk-JOX6MJW4.cjs.map +0 -1
- package/dist/chunk-OV7UAKIY.js.map +0 -1
- package/dist/chunk-TGBCBQFV.cjs.map +0 -1
- package/dist/chunk-UAW5FEMD.js.map +0 -1
- package/dist/chunk-WBOAXDKD.js.map +0 -1
- package/dist/chunk-XFYUFVAX.cjs +0 -826
- package/dist/chunk-XFYUFVAX.cjs.map +0 -1
- /package/dist/{chunk-5N6AQCVB.js.map → chunk-BQQZ6MOI.js.map} +0 -0
- /package/dist/{chunk-YMKPMXZ4.js.map → chunk-OIKYP7XC.js.map} +0 -0
- /package/dist/{chunk-QFTVLEVN.js.map → chunk-RIXTW3C4.js.map} +0 -0
package/dist/chart/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkDK6QBGCScjs = require('../chunk-DK6QBGCS.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ var _chunkTGBCBQFVcjs = require('../chunk-TGBCBQFV.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkNN3JGUSXcjs = require('../chunk-NN3JGUSX.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -72,10 +72,10 @@ var _chunk3ZBAXET6cjs = require('../chunk-3ZBAXET6.cjs');
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var _chunkGTZXF4BIcjs = require('../chunk-GTZXF4BI.cjs');
|
|
76
75
|
|
|
77
76
|
|
|
78
77
|
|
|
78
|
+
var _chunkNK3WL5TJcjs = require('../chunk-NK3WL5TJ.cjs');
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
@@ -122,13 +122,35 @@ var _chunkGTZXF4BIcjs = require('../chunk-GTZXF4BI.cjs');
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
var _chunkCKRNELPOcjs = require('../chunk-CKRNELPO.cjs');
|
|
126
140
|
require('../chunk-XP5IUZUO.cjs');
|
|
127
141
|
|
|
128
142
|
|
|
129
143
|
var _chunkTNNJXF46cjs = require('../chunk-TNNJXF46.cjs');
|
|
130
144
|
require('../chunk-QKLRAA4T.cjs');
|
|
131
145
|
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
var _chunkEGFUVXKKcjs = require('../chunk-EGFUVXKK.cjs');
|
|
153
|
+
|
|
132
154
|
// src/chart/raster.ts
|
|
133
155
|
var CHART_RASTER_MAX_SIZE = 1024;
|
|
134
156
|
function chartRasterSize(width, height, scale = 2, maxSize = CHART_RASTER_MAX_SIZE) {
|
|
@@ -237,7 +259,7 @@ function chartFileName(spec, extension) {
|
|
|
237
259
|
}
|
|
238
260
|
async function downloadChartPng(spec, options = {}) {
|
|
239
261
|
const { width = 800, height = 450, filename = chartFileName(spec, "png"), theme, ...raster } = options;
|
|
240
|
-
const svg =
|
|
262
|
+
const svg = _chunkNK3WL5TJcjs.chartToSvg.call(void 0, spec, { width, height, theme });
|
|
241
263
|
const { url, width: w, height: h } = await svgToPngDataUrl(svg, { ...raster, width, height });
|
|
242
264
|
const doc = _nullishCoalesce(raster.document, () => ( globalThis.document));
|
|
243
265
|
const link = doc.createElement("a");
|
|
@@ -252,7 +274,7 @@ async function downloadChartPng(spec, options = {}) {
|
|
|
252
274
|
|
|
253
275
|
// src/chart/recommend.ts
|
|
254
276
|
var blank = (c) => c === null || c === void 0 || String(c).trim() === "";
|
|
255
|
-
var isText = (c) => blank(c) ||
|
|
277
|
+
var isText = (c) => blank(c) || _chunkCKRNELPOcjs.parseChartValue.call(void 0, c) === void 0;
|
|
256
278
|
function analyzeChartTable(rows) {
|
|
257
279
|
const grid = rows.filter((r) => r.some((c) => !blank(c)));
|
|
258
280
|
const height = grid.length;
|
|
@@ -270,7 +292,7 @@ function analyzeChartTable(rows) {
|
|
|
270
292
|
let anyPositive = false;
|
|
271
293
|
for (let r = headerRow ? 1 : 0; r < height; r++)
|
|
272
294
|
for (let c = labelColumn ? 1 : 0; c < width; c++) {
|
|
273
|
-
const v =
|
|
295
|
+
const v = _chunkCKRNELPOcjs.parseChartValue.call(void 0, cell(r, c));
|
|
274
296
|
if (typeof v !== "number") continue;
|
|
275
297
|
anyNumber = true;
|
|
276
298
|
if (v < 0) {
|
|
@@ -279,7 +301,7 @@ function analyzeChartTable(rows) {
|
|
|
279
301
|
} else if (v > 0) anyPositive = true;
|
|
280
302
|
}
|
|
281
303
|
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]);
|
|
282
|
-
const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) &&
|
|
304
|
+
const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkNK3WL5TJcjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
|
|
283
305
|
return {
|
|
284
306
|
headerRow,
|
|
285
307
|
labelColumn,
|
|
@@ -366,7 +388,7 @@ function chartFromTable(rows, options = {}) {
|
|
|
366
388
|
if (xFromFirst) {
|
|
367
389
|
table = table.map((r) => [r[1], ...r.slice(2)]);
|
|
368
390
|
}
|
|
369
|
-
const data =
|
|
391
|
+
const data = _chunkCKRNELPOcjs.chartDataFromTable.call(void 0, table, { seriesIn: shape.byRows ? "rows" : "columns", header: true, xFromFirstColumn: xFromFirst });
|
|
370
392
|
return { type, stacking, categories: data.categories, series: data.series, issues: data.issues, shape };
|
|
371
393
|
}
|
|
372
394
|
|
|
@@ -402,10 +424,10 @@ function createChartCommands(controller, options = {}) {
|
|
|
402
424
|
readOnly: true,
|
|
403
425
|
keywords: ["chart", "data", "spec", "get", "summary"],
|
|
404
426
|
description: "Returns the chart spec, its data as a table (series names in the header row) and a summary: per-series min / max / mean / trend, axes as drawn, layout warnings and a colour check.",
|
|
405
|
-
params: object({ width:
|
|
427
|
+
params: object({ width: _chunkDK6QBGCScjs.WIDTH, height: _chunkDK6QBGCScjs.HEIGHT }),
|
|
406
428
|
run: (_ctx, params = {}) => {
|
|
407
429
|
const spec = controller.getSpec();
|
|
408
|
-
return { spec: controller.toJSON(), table:
|
|
430
|
+
return { spec: controller.toJSON(), table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, spec), summary: _chunkNK3WL5TJcjs.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 };
|
|
409
431
|
}
|
|
410
432
|
},
|
|
411
433
|
{
|
|
@@ -413,8 +435,8 @@ function createChartCommands(controller, options = {}) {
|
|
|
413
435
|
id: `${prefix}update`,
|
|
414
436
|
label: "Change Chart\u2026",
|
|
415
437
|
keywords: ["chart", "title", "axis", "legend", "stack", "style", "format", "type"],
|
|
416
|
-
description:
|
|
417
|
-
params: object(
|
|
438
|
+
description: 'Changes chart presentation as one undo step: type, titles, axes (xAxis = categories, yAxis = values, yAxis2 = secondary values; reverse, and scale "log" on value axes), legend, stacking, orientation, curve, points, data labels, palette, donut hole, bar spacing, histogram bins or waterfall total. Invalid values change nothing and return why.',
|
|
439
|
+
params: object(_chunkDK6QBGCScjs.CHART_UPDATE_PROPERTIES),
|
|
418
440
|
run: (_ctx, params) => {
|
|
419
441
|
check(controller.update(params));
|
|
420
442
|
return { spec: controller.toJSON() };
|
|
@@ -428,11 +450,11 @@ function createChartCommands(controller, options = {}) {
|
|
|
428
450
|
description: "Replaces the categories and series as one undo step. Each series has one value per category (padded with gaps).",
|
|
429
451
|
params: object({
|
|
430
452
|
categories: { type: "array", items: { type: "string" }, description: "Category labels in order." },
|
|
431
|
-
series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ...
|
|
453
|
+
series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ..._chunkDK6QBGCScjs.SERIES_PROPS }, ["name", "values"]) }
|
|
432
454
|
}),
|
|
433
455
|
run: (_ctx, params) => {
|
|
434
456
|
check(controller.setData(params));
|
|
435
|
-
return { table:
|
|
457
|
+
return { table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, controller.getSpec()) };
|
|
436
458
|
}
|
|
437
459
|
},
|
|
438
460
|
{
|
|
@@ -441,10 +463,10 @@ function createChartCommands(controller, options = {}) {
|
|
|
441
463
|
label: "Set Chart Values\u2026",
|
|
442
464
|
keywords: ["chart", "value", "cell", "edit"],
|
|
443
465
|
description: "Sets individual values as one undo step. Series by id or name; category by index or label.",
|
|
444
|
-
params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series:
|
|
466
|
+
params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series: _chunkDK6QBGCScjs.SERIES_REF, category: _chunkDK6QBGCScjs.CATEGORY_REF, value: _chunkDK6QBGCScjs.VALUE }, ["series", "category", "value"]) } }, ["cells"]),
|
|
445
467
|
run: (_ctx, params) => {
|
|
446
468
|
check(controller.setValues(params.cells.map((c) => ({ seriesId: resolveSeries(c.series).id, index: resolveCategory(c.category), value: c.value }))));
|
|
447
|
-
return { table:
|
|
469
|
+
return { table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, controller.getSpec()) };
|
|
448
470
|
}
|
|
449
471
|
},
|
|
450
472
|
{
|
|
@@ -453,7 +475,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
453
475
|
label: "Add Series",
|
|
454
476
|
keywords: ["chart", "series", "new"],
|
|
455
477
|
description: "Adds a series (default: an empty one at the end). Returns its id.",
|
|
456
|
-
params: object({ ...
|
|
478
|
+
params: object({ ..._chunkDK6QBGCScjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } }),
|
|
457
479
|
run: (_ctx, params = {}) => {
|
|
458
480
|
const { at, ...input } = _nullishCoalesce(params, () => ( {}));
|
|
459
481
|
const clean = Object.fromEntries(Object.entries(input).filter(([, v]) => v !== null));
|
|
@@ -467,8 +489,8 @@ function createChartCommands(controller, options = {}) {
|
|
|
467
489
|
id: `${prefix}updateSeries`,
|
|
468
490
|
label: "Change Series\u2026",
|
|
469
491
|
keywords: ["chart", "series", "rename", "colour", "color", "hide", "axis", "marker"],
|
|
470
|
-
description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn (null resets a field).",
|
|
471
|
-
params: object({ series:
|
|
492
|
+
description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn, including error bars (null resets a field).",
|
|
493
|
+
params: object({ series: _chunkDK6QBGCScjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkDK6QBGCScjs.SERIES_PROPS).filter(([k]) => k !== "values")) }, ["series"]),
|
|
472
494
|
run: (_ctx, params) => {
|
|
473
495
|
const { series, ...patch } = params;
|
|
474
496
|
const id = resolveSeries(series).id;
|
|
@@ -482,7 +504,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
482
504
|
label: "Delete Series",
|
|
483
505
|
keywords: ["chart", "series", "remove"],
|
|
484
506
|
description: "Deletes a series by id or name.",
|
|
485
|
-
params: object({ series:
|
|
507
|
+
params: object({ series: _chunkDK6QBGCScjs.SERIES_REF }, ["series"]),
|
|
486
508
|
run: (_ctx, params) => {
|
|
487
509
|
check(controller.removeSeries(resolveSeries(params.series).id));
|
|
488
510
|
return { series: seriesIds() };
|
|
@@ -503,7 +525,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
503
525
|
label: "Delete Category",
|
|
504
526
|
keywords: ["chart", "category", "row", "remove"],
|
|
505
527
|
description: "Deletes a category (and its values) by index or label.",
|
|
506
|
-
params: object({ category:
|
|
528
|
+
params: object({ category: _chunkDK6QBGCScjs.CATEGORY_REF }, ["category"]),
|
|
507
529
|
run: (_ctx, params) => {
|
|
508
530
|
check(controller.removeCategory(resolveCategory(params.category)));
|
|
509
531
|
return { categories: controller.getSpec().categories };
|
|
@@ -515,7 +537,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
515
537
|
label: "Add Trendline\u2026",
|
|
516
538
|
keywords: ["chart", "trend", "regression", "fit", "forecast", "moving average"],
|
|
517
539
|
description: "Fits a trendline to a series (linear, exponential, logarithmic, power, polynomial or moving average). Returns its index and the fit.",
|
|
518
|
-
params: object({ series:
|
|
540
|
+
params: object({ series: _chunkDK6QBGCScjs.SERIES_REF, ..._chunkDK6QBGCScjs.TRENDLINE_PROPS }, ["series", "type"]),
|
|
519
541
|
run: (_ctx, params) => {
|
|
520
542
|
const { series, ...line } = params;
|
|
521
543
|
const result = controller.addTrendline(resolveSeries(series).id, line);
|
|
@@ -530,7 +552,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
530
552
|
label: "Delete Trendline",
|
|
531
553
|
keywords: ["chart", "trend", "remove"],
|
|
532
554
|
description: "Deletes a trendline from a series.",
|
|
533
|
-
params: object({ series:
|
|
555
|
+
params: object({ series: _chunkDK6QBGCScjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index (0 = first)." } }, ["series", "index"]),
|
|
534
556
|
run: (_ctx, params) => {
|
|
535
557
|
check(controller.removeTrendline(resolveSeries(params.series).id, params.index));
|
|
536
558
|
return { trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _29 => _29.getSeries, 'call', _30 => _30(resolveSeries(params.series).id), 'optionalAccess', _31 => _31.trendlines]), () => ( [])) };
|
|
@@ -543,8 +565,8 @@ function createChartCommands(controller, options = {}) {
|
|
|
543
565
|
keywords: ["chart", "quick layout", "style", "colours", "colors", "monochrome", "theme"],
|
|
544
566
|
description: "Applies a quick layout and / or colour scheme as one undo step.",
|
|
545
567
|
params: object({
|
|
546
|
-
layout: { type: "string", enum:
|
|
547
|
-
colors: { type: "string", enum:
|
|
568
|
+
layout: { type: "string", enum: _chunkNK3WL5TJcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
|
|
569
|
+
colors: { type: "string", enum: _chunkNK3WL5TJcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
|
|
548
570
|
}),
|
|
549
571
|
run: (_ctx, params = {}) => {
|
|
550
572
|
check(controller.applyPreset(_nullishCoalesce(params, () => ( {}))));
|
|
@@ -559,7 +581,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
559
581
|
description: "Swaps series and categories as one undo step.",
|
|
560
582
|
run: () => {
|
|
561
583
|
check(controller.transpose());
|
|
562
|
-
return { table:
|
|
584
|
+
return { table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, controller.getSpec()) };
|
|
563
585
|
}
|
|
564
586
|
},
|
|
565
587
|
{
|
|
@@ -579,7 +601,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
579
601
|
run: (_ctx, params) => {
|
|
580
602
|
const result = controller.importCsv(params.csv, { seriesIn: params.seriesIn, header: params.header });
|
|
581
603
|
check(result);
|
|
582
|
-
return { table:
|
|
604
|
+
return { table: _chunkCKRNELPOcjs.chartDataToTable.call(void 0, controller.getSpec()), issues: _nullishCoalesce(result.issues, () => ( [])) };
|
|
583
605
|
}
|
|
584
606
|
},
|
|
585
607
|
{
|
|
@@ -590,7 +612,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
590
612
|
description: "Replaces the chart with Mermaid xychart-beta, pie or radar-beta text (one undo step). Unreadable lines are listed with line numbers.",
|
|
591
613
|
params: object({ mermaid: { type: "string", description: "Mermaid text." } }, ["mermaid"]),
|
|
592
614
|
run: (_ctx, params) => {
|
|
593
|
-
const read =
|
|
615
|
+
const read = _chunkNK3WL5TJcjs.chartFromMermaid.call(void 0, params.mermaid);
|
|
594
616
|
if (!read.family) fail(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie or radar-beta.");
|
|
595
617
|
check(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
|
|
596
618
|
return { spec: controller.toJSON(), issues: read.issues };
|
|
@@ -604,7 +626,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
604
626
|
keywords: ["chart", "mermaid", "markdown", "export"],
|
|
605
627
|
description: "Returns the chart as Mermaid text (with a round-trip comment unless meta is false).",
|
|
606
628
|
params: object({ meta: { type: "boolean", description: "Include the %% @pixerate round-trip comment (default true)." } }),
|
|
607
|
-
run: (_ctx, params = {}) => ({ mermaid:
|
|
629
|
+
run: (_ctx, params = {}) => ({ mermaid: _chunkNK3WL5TJcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _32 => _32.meta]) }) })
|
|
608
630
|
},
|
|
609
631
|
{
|
|
610
632
|
...base,
|
|
@@ -613,7 +635,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
613
635
|
readOnly: true,
|
|
614
636
|
keywords: ["chart", "office", "word", "powerpoint", "docx", "pptx", "xml", "export"],
|
|
615
637
|
description: "Returns the chart as a DrawingML chart part (c:chartSpace) and what could not be written.",
|
|
616
|
-
run: () =>
|
|
638
|
+
run: () => _chunkNN3JGUSXcjs.chartToOoxml.call(void 0, controller.toJSON())
|
|
617
639
|
},
|
|
618
640
|
{
|
|
619
641
|
...base,
|
|
@@ -622,9 +644,9 @@ function createChartCommands(controller, options = {}) {
|
|
|
622
644
|
readOnly: true,
|
|
623
645
|
keywords: ["chart", "svg", "export", "image"],
|
|
624
646
|
description: "Returns the chart drawn as a standalone, accessible SVG string (with <title> and <desc>).",
|
|
625
|
-
params: object({ width:
|
|
647
|
+
params: object({ width: _chunkDK6QBGCScjs.WIDTH, height: _chunkDK6QBGCScjs.HEIGHT }),
|
|
626
648
|
run: (_ctx, params = {}) => ({
|
|
627
|
-
svg:
|
|
649
|
+
svg: _chunkNK3WL5TJcjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _33 => _33.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _34 => _34.height]), () => ( 400)) })
|
|
628
650
|
})
|
|
629
651
|
},
|
|
630
652
|
{
|
|
@@ -636,7 +658,7 @@ function createChartCommands(controller, options = {}) {
|
|
|
636
658
|
description: "Suggests chart types for the current data (or CSV), best first, each with a reason.",
|
|
637
659
|
params: object({ csv: { type: "string", description: "CSV text to analyse instead of the current data." } }),
|
|
638
660
|
run: (_ctx, params = {}) => ({
|
|
639
|
-
recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _35 => _35.csv]) !== void 0 ? _chunkTNNJXF46cjs.parseCsv.call(void 0, params.csv) :
|
|
661
|
+
recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _35 => _35.csv]) !== void 0 ? _chunkTNNJXF46cjs.parseCsv.call(void 0, params.csv) : _chunkCKRNELPOcjs.chartDataToTable.call(void 0, controller.getSpec()))
|
|
640
662
|
})
|
|
641
663
|
},
|
|
642
664
|
{
|
|
@@ -649,8 +671,8 @@ function createChartCommands(controller, options = {}) {
|
|
|
649
671
|
run: () => {
|
|
650
672
|
const s = controller.getSpec();
|
|
651
673
|
const visible = s.series.filter((x) => !x.hidden);
|
|
652
|
-
const colors =
|
|
653
|
-
return { colors, ...
|
|
674
|
+
const colors = _chunkCKRNELPOcjs.chartColorsByCategory.call(void 0, s.type) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _36 => _36[0], 'optionalAccess', _37 => _37.pointColors, 'optionalAccess', _38 => _38[i]]) || _chunkCKRNELPOcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkCKRNELPOcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
|
|
675
|
+
return { colors, ..._chunkCKRNELPOcjs.checkChartColors.call(void 0, colors) };
|
|
654
676
|
}
|
|
655
677
|
},
|
|
656
678
|
{
|
|
@@ -681,7 +703,7 @@ function chartClientToScene(scene, box, clientX, clientY) {
|
|
|
681
703
|
function canDragChartPoint(controller, scene, target) {
|
|
682
704
|
if (_optionalChain([target, 'optionalAccess', _39 => _39.kind]) !== "point" || !scene.valueScale || scene.percent) return false;
|
|
683
705
|
const spec = controller.getSpec();
|
|
684
|
-
const family =
|
|
706
|
+
const family = _chunkCKRNELPOcjs.chartFamily.call(void 0, spec);
|
|
685
707
|
if (family !== "cartesian" && family !== "xy" && family !== "waterfall") return false;
|
|
686
708
|
const series = controller.getSeries(target.seriesId);
|
|
687
709
|
return !!series && !series.hidden && series.values[target.index] !== null;
|
|
@@ -690,13 +712,14 @@ function snapChartDragValue(scene, value, options = {}) {
|
|
|
690
712
|
const scale = _nullishCoalesce(options.scale, () => ( scene.valueScale));
|
|
691
713
|
const tolerance = _nullishCoalesce(options.tolerancePx, () => ( 6));
|
|
692
714
|
if (scale) {
|
|
693
|
-
const px = (v) =>
|
|
715
|
+
const px = (v) => _chunkNK3WL5TJcjs.chartScaleToPixel.call(void 0, v, scale);
|
|
694
716
|
const at = px(value);
|
|
695
717
|
let best = null;
|
|
696
718
|
let bestDist = tolerance;
|
|
697
719
|
for (const c of [..._nullishCoalesce(options.candidates, () => ( [])), ...scale.ticks]) {
|
|
698
720
|
if (!Number.isFinite(c)) continue;
|
|
699
721
|
const d = Math.abs(px(c) - at);
|
|
722
|
+
if (!Number.isFinite(d)) continue;
|
|
700
723
|
if (d <= bestDist) {
|
|
701
724
|
best = c;
|
|
702
725
|
bestDist = d;
|
|
@@ -704,7 +727,7 @@ function snapChartDragValue(scene, value, options = {}) {
|
|
|
704
727
|
}
|
|
705
728
|
if (best !== null) return best;
|
|
706
729
|
}
|
|
707
|
-
return
|
|
730
|
+
return _chunkNK3WL5TJcjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _40 => _40.ticks]), _optionalChain([scale, 'optionalAccess', _41 => _41.logBase]));
|
|
708
731
|
}
|
|
709
732
|
function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
710
733
|
if (!canDragChartPoint(controller, scene, target)) return null;
|
|
@@ -713,11 +736,11 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
713
736
|
const series = controller.getSeries(seriesId);
|
|
714
737
|
const secondary = series.axis === "secondary" && !!scene.valueScale2;
|
|
715
738
|
const scale = secondary ? scene.valueScale2 : scene.valueScale;
|
|
716
|
-
const xy =
|
|
739
|
+
const xy = _chunkCKRNELPOcjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
|
|
717
740
|
const startValue = _nullishCoalesce(series.values[index], () => ( 0));
|
|
718
|
-
const startX = _nullishCoalesce(_optionalChain([series, 'access',
|
|
719
|
-
const startAt =
|
|
720
|
-
const startAtX = xy ?
|
|
741
|
+
const startX = _nullishCoalesce(_optionalChain([series, 'access', _42 => _42.x, 'optionalAccess', _43 => _43[index]]), () => ( null));
|
|
742
|
+
const startAt = _chunkNK3WL5TJcjs.chartValueAtPoint.call(void 0, scene, start, secondary);
|
|
743
|
+
const startAtX = xy ? _chunkNK3WL5TJcjs.chartXAtPoint.call(void 0, scene, start) : void 0;
|
|
721
744
|
if (startAt === void 0) return null;
|
|
722
745
|
const candidates = [0, startValue];
|
|
723
746
|
if (!xy) {
|
|
@@ -735,34 +758,38 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
|
|
|
735
758
|
target: { seriesId, index },
|
|
736
759
|
move(point, moveOptions = {}) {
|
|
737
760
|
if (ended) return;
|
|
738
|
-
const at =
|
|
761
|
+
const at = _chunkNK3WL5TJcjs.chartValueAtPoint.call(void 0, scene, point, secondary);
|
|
739
762
|
if (at === void 0) return;
|
|
740
763
|
const factor = moveOptions.fine ? 0.1 : 1;
|
|
741
|
-
|
|
742
|
-
let
|
|
764
|
+
const moved = (from, to, s, value) => s.logBase && value > 0 && from > 0 && to > 0 ? value * Math.pow(to / from, factor) : value + (to - from) * factor;
|
|
765
|
+
let moveY = true;
|
|
766
|
+
let moveX = false;
|
|
767
|
+
let atX;
|
|
743
768
|
if (xy && startX !== null && startAtX !== void 0) {
|
|
744
|
-
|
|
745
|
-
|
|
769
|
+
atX = _chunkNK3WL5TJcjs.chartXAtPoint.call(void 0, scene, point);
|
|
770
|
+
moveX = atX !== void 0;
|
|
746
771
|
if (moveOptions.lockAxis) {
|
|
747
|
-
if (Math.abs(point.x - start.x) >= Math.abs(point.y - start.y))
|
|
748
|
-
else
|
|
772
|
+
if (Math.abs(point.x - start.x) >= Math.abs(point.y - start.y)) moveY = false;
|
|
773
|
+
else moveX = false;
|
|
749
774
|
}
|
|
750
775
|
}
|
|
751
776
|
const snap = (v, s, c) => {
|
|
752
777
|
if (moveOptions.noSnap) return Number(v.toPrecision(12));
|
|
753
778
|
if (moveOptions.fine) {
|
|
779
|
+
if (s.logBase && !options.step) return v > 0 ? Number(v.toPrecision(3)) : v;
|
|
754
780
|
const unit = options.step ? options.step / 10 : s.ticks.length > 1 ? (s.ticks[1] - s.ticks[0]) / 100 : void 0;
|
|
755
|
-
return
|
|
781
|
+
return _chunkNK3WL5TJcjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
|
|
756
782
|
}
|
|
757
783
|
return snapChartDragValue(scene, v, { candidates: c, tolerancePx: options.tolerancePx, step: options.step, scale: s });
|
|
758
784
|
};
|
|
759
|
-
const y = snap(
|
|
785
|
+
const y = moveY ? snap(moved(startAt, at, scale, startValue), scale, candidates) : startValue;
|
|
760
786
|
if (xy && startX !== null) {
|
|
761
|
-
const
|
|
787
|
+
const nextX = moveX ? moved(startAtX, atX, scene.xScale, startX) : startX;
|
|
788
|
+
const x = nextX !== startX ? snap(nextX, scene.xScale, [0, startX]) : startX;
|
|
762
789
|
const xs = [..._nullishCoalesce(series.x, () => ( []))];
|
|
763
790
|
xs[index] = x;
|
|
764
791
|
controller.setValue(seriesId, index, y, { label });
|
|
765
|
-
if (x !== _optionalChain([controller, 'access',
|
|
792
|
+
if (x !== _optionalChain([controller, 'access', _44 => _44.getSeries, 'call', _45 => _45(seriesId), 'optionalAccess', _46 => _46.x, 'optionalAccess', _47 => _47[index]])) controller.updateSeries(seriesId, { x: xs });
|
|
766
793
|
} else controller.setValue(seriesId, index, y, { label });
|
|
767
794
|
},
|
|
768
795
|
end() {
|
|
@@ -796,7 +823,7 @@ function handleChartKey(controller, scene, event) {
|
|
|
796
823
|
return true;
|
|
797
824
|
case "ArrowLeft":
|
|
798
825
|
case "ArrowRight": {
|
|
799
|
-
if (event.altKey || _optionalChain([selection, 'optionalAccess',
|
|
826
|
+
if (event.altKey || _optionalChain([selection, 'optionalAccess', _48 => _48.kind]) !== "point" && _optionalChain([selection, 'optionalAccess', _49 => _49.kind]) !== "category") return false;
|
|
800
827
|
const n = spec.categories.length;
|
|
801
828
|
const index = Math.max(0, Math.min(n - 1, selection.index + (event.key === "ArrowRight" ? 1 : -1)));
|
|
802
829
|
controller.select({ ...selection, index });
|
|
@@ -804,12 +831,22 @@ function handleChartKey(controller, scene, event) {
|
|
|
804
831
|
}
|
|
805
832
|
case "ArrowUp":
|
|
806
833
|
case "ArrowDown": {
|
|
807
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
808
|
-
const
|
|
809
|
-
const
|
|
834
|
+
if (_optionalChain([selection, 'optionalAccess', _50 => _50.kind]) !== "point" || _optionalChain([scene, 'optionalAccess', _51 => _51.percent])) return false;
|
|
835
|
+
const series = controller.getSeries(selection.seriesId);
|
|
836
|
+
const secondary = _optionalChain([series, 'optionalAccess', _52 => _52.axis]) === "secondary";
|
|
837
|
+
const scale = _nullishCoalesce((secondary ? _optionalChain([scene, 'optionalAccess', _53 => _53.valueScale2]) : null), () => ( _optionalChain([scene, 'optionalAccess', _54 => _54.valueScale])));
|
|
838
|
+
const ticks = _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _55 => _55.ticks]), () => ( []));
|
|
839
|
+
const up = event.key === "ArrowUp";
|
|
840
|
+
const current = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _56 => _56.values, 'access', _57 => _57[selection.index]]), () => ( null));
|
|
841
|
+
if (_optionalChain([scale, 'optionalAccess', _58 => _58.logBase]) && current !== null && current > 0) {
|
|
842
|
+
const power = event.shiftKey ? 1 : event.altKey ? 0.01 : 0.1;
|
|
843
|
+
const next = Number((current * Math.pow(scale.logBase, up ? power : -power)).toPrecision(event.altKey ? 4 : 3));
|
|
844
|
+
controller.nudgeValue(selection.seriesId, selection.index, next - current);
|
|
845
|
+
return true;
|
|
846
|
+
}
|
|
810
847
|
const step = ticks.length > 1 ? ticks[1] - ticks[0] : 1;
|
|
811
848
|
const amount = event.shiftKey ? step : event.altKey ? step / 100 : step / 10;
|
|
812
|
-
controller.nudgeValue(selection.seriesId, selection.index, amount * (
|
|
849
|
+
controller.nudgeValue(selection.seriesId, selection.index, amount * (up ? 1 : -1));
|
|
813
850
|
return true;
|
|
814
851
|
}
|
|
815
852
|
default:
|
|
@@ -829,22 +866,22 @@ function describeChartSelection(controller, selection = controller.getState().se
|
|
|
829
866
|
case "legend":
|
|
830
867
|
return "Legend";
|
|
831
868
|
case "axis":
|
|
832
|
-
return selection.axis === "x" ?
|
|
869
|
+
return selection.axis === "x" ? _chunkCKRNELPOcjs.chartFamily.call(void 0, spec) === "xy" ? "X axis" : "Category axis" : selection.axis === "y" ? "Value axis" : "Secondary value axis";
|
|
833
870
|
case "series":
|
|
834
|
-
return `Series "${_nullishCoalesce(_optionalChain([controller, 'access',
|
|
871
|
+
return `Series "${_nullishCoalesce(_optionalChain([controller, 'access', _59 => _59.getSeries, 'call', _60 => _60(selection.seriesId), 'optionalAccess', _61 => _61.name]), () => ( selection.seriesId))}"`;
|
|
835
872
|
case "category":
|
|
836
873
|
return `Category "${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}"`;
|
|
837
874
|
case "trendline": {
|
|
838
875
|
const series = controller.getSeries(selection.seriesId);
|
|
839
|
-
const line = _optionalChain([series, 'optionalAccess',
|
|
840
|
-
return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
876
|
+
const line = _optionalChain([series, 'optionalAccess', _62 => _62.trendlines, 'optionalAccess', _63 => _63[selection.index]]);
|
|
877
|
+
return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _64 => _64.name]), () => ( selection.seriesId))}"`;
|
|
841
878
|
}
|
|
842
879
|
case "point": {
|
|
843
880
|
const series = controller.getSeries(selection.seriesId);
|
|
844
|
-
const value = _optionalChain([series, 'optionalAccess',
|
|
845
|
-
const x = _optionalChain([series, 'optionalAccess',
|
|
846
|
-
if (x !== void 0 && x !== null &&
|
|
847
|
-
return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
881
|
+
const value = _optionalChain([series, 'optionalAccess', _65 => _65.values, 'access', _66 => _66[selection.index]]);
|
|
882
|
+
const x = _optionalChain([series, 'optionalAccess', _67 => _67.x, 'optionalAccess', _68 => _68[selection.index]]);
|
|
883
|
+
if (x !== void 0 && x !== null && _chunkCKRNELPOcjs.chartFamily.call(void 0, spec) === "xy") return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _69 => _69.name]), () => ( selection.seriesId))}: (${x}, ${_nullishCoalesce(value, () => ( "blank"))})`;
|
|
884
|
+
return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _70 => _70.name]), () => ( selection.seriesId))} \xB7 ${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}: ${_nullishCoalesce(value, () => ( "blank"))}`;
|
|
848
885
|
}
|
|
849
886
|
}
|
|
850
887
|
}
|
|
@@ -917,13 +954,13 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
917
954
|
fail2(`There is no category ${JSON.stringify(ref)}; expected an index from 0 to ${categories.length - 1} or one of ${categories.slice(0, 20).map((c) => JSON.stringify(c)).join(", ")}.`);
|
|
918
955
|
return index;
|
|
919
956
|
};
|
|
920
|
-
const table = () =>
|
|
957
|
+
const table = () => _chunkCKRNELPOcjs.chartDataToTable.call(void 0, spec());
|
|
921
958
|
const Parser = () => _nullishCoalesce(options.DOMParser, () => ( globalThis.DOMParser));
|
|
922
959
|
const getChart = {
|
|
923
960
|
name: "get_chart",
|
|
924
961
|
title: "Read the chart",
|
|
925
962
|
description: "Returns the chart spec (type, titles, axes, legend, series with ids and settings), its data as a table (header row of series names, then one row per category), the current selection, and a summary at the given size: per-series min / max / mean / trend, the axes as drawn, layout warnings (hidden labels, thinned lines), a colour check and a plain-language description. Use the series ids and category indexes it returns with the write tools.",
|
|
926
|
-
inputSchema: { type: "object", properties: { width:
|
|
963
|
+
inputSchema: { type: "object", properties: { width: _chunkDK6QBGCScjs.WIDTH, height: _chunkDK6QBGCScjs.HEIGHT }, additionalProperties: false },
|
|
927
964
|
annotations: { title: "Read the chart", ...READ },
|
|
928
965
|
handler: ({ width = size.width, height = size.height }) => {
|
|
929
966
|
const reason = readOnlyReason();
|
|
@@ -931,7 +968,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
931
968
|
spec: controller.toJSON(),
|
|
932
969
|
table: table(),
|
|
933
970
|
selection: controller.getState().selection,
|
|
934
|
-
summary:
|
|
971
|
+
summary: _chunkNK3WL5TJcjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
|
|
935
972
|
issues: controller.getState().issues,
|
|
936
973
|
...reason ? { readOnly: reason } : {}
|
|
937
974
|
};
|
|
@@ -944,8 +981,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
944
981
|
inputSchema: {
|
|
945
982
|
type: "object",
|
|
946
983
|
properties: {
|
|
947
|
-
width:
|
|
948
|
-
height:
|
|
984
|
+
width: _chunkDK6QBGCScjs.WIDTH,
|
|
985
|
+
height: _chunkDK6QBGCScjs.HEIGHT,
|
|
949
986
|
format: { type: "string", enum: ["svg", "png"], description: "svg (default): the SVG document as text. png: an image to look at (only when the host can rasterize; costs image tokens)." }
|
|
950
987
|
},
|
|
951
988
|
additionalProperties: false
|
|
@@ -953,8 +990,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
953
990
|
annotations: { title: "Render the chart", ...READ },
|
|
954
991
|
handler: async ({ width = size.width, height = size.height, format = "svg" }) => {
|
|
955
992
|
const json = controller.toJSON();
|
|
956
|
-
const scene =
|
|
957
|
-
const svg =
|
|
993
|
+
const scene = _chunkNK3WL5TJcjs.layoutChart.call(void 0, json, { width, height, selection: null });
|
|
994
|
+
const svg = _chunkNK3WL5TJcjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunkNK3WL5TJcjs.describeChart.call(void 0, json) });
|
|
958
995
|
const warnings = scene.warnings;
|
|
959
996
|
if (format === "png") {
|
|
960
997
|
if (!options.rasterize) fail2('This host cannot rasterize charts; call render_chart with format "svg", or get_chart for the layout warnings.');
|
|
@@ -988,8 +1025,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
988
1025
|
handler: ({ colors, surface }) => {
|
|
989
1026
|
const s = spec();
|
|
990
1027
|
const visible = s.series.filter((x) => !x.hidden);
|
|
991
|
-
const own =
|
|
992
|
-
return { colors: _nullishCoalesce(colors, () => ( own)), ...
|
|
1028
|
+
const own = _chunkCKRNELPOcjs.chartColorsByCategory.call(void 0, s.type) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _71 => _71[0], 'optionalAccess', _72 => _72.pointColors, 'optionalAccess', _73 => _73[i]]) || _chunkCKRNELPOcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkCKRNELPOcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
|
|
1029
|
+
return { colors: _nullishCoalesce(colors, () => ( own)), ..._chunkCKRNELPOcjs.checkChartColors.call(void 0, _nullishCoalesce(colors, () => ( own)), { surface }) };
|
|
993
1030
|
}
|
|
994
1031
|
};
|
|
995
1032
|
const recommend = {
|
|
@@ -1011,15 +1048,15 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1011
1048
|
description: "Returns a trendline's fitted coefficients (in x for category charts, x = 1, 2, 3, \u2026), R\xB2, equation and the number of points, or the moving-average points.",
|
|
1012
1049
|
inputSchema: {
|
|
1013
1050
|
type: "object",
|
|
1014
|
-
properties: { series:
|
|
1051
|
+
properties: { series: _chunkDK6QBGCScjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
|
|
1015
1052
|
required: ["series", "index"],
|
|
1016
1053
|
additionalProperties: false
|
|
1017
1054
|
},
|
|
1018
1055
|
annotations: { title: "Read a trendline fit", ...READ },
|
|
1019
1056
|
handler: ({ series, index }) => {
|
|
1020
1057
|
const s = seriesById(series);
|
|
1021
|
-
const line = _optionalChain([s, 'access',
|
|
1022
|
-
if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access',
|
|
1058
|
+
const line = _optionalChain([s, 'access', _74 => _74.trendlines, 'optionalAccess', _75 => _75[index]]);
|
|
1059
|
+
if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access', _76 => _76.trendlines, 'optionalAccess', _77 => _77.length]), () => ( 0))}.`);
|
|
1023
1060
|
if (line.type === "moving-average") return { trendline: line, points: controller.trendlineMovingAverage(s.id, index) };
|
|
1024
1061
|
const fit = controller.trendlineFit(s.id, index);
|
|
1025
1062
|
if (!fit) fail2(`The ${line.type} trendline on "${s.name}" cannot be fitted: it needs more points (and positive values for log, exponential and power fits).`);
|
|
@@ -1033,8 +1070,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1033
1070
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
1034
1071
|
annotations: { title: "List chart presets", ...READ },
|
|
1035
1072
|
handler: () => ({
|
|
1036
|
-
layouts:
|
|
1037
|
-
colorSchemes:
|
|
1073
|
+
layouts: _chunkNK3WL5TJcjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
|
|
1074
|
+
colorSchemes: _chunkNK3WL5TJcjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
|
|
1038
1075
|
})
|
|
1039
1076
|
};
|
|
1040
1077
|
const exportMermaid = {
|
|
@@ -1043,7 +1080,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1043
1080
|
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.',
|
|
1044
1081
|
inputSchema: { type: "object", properties: { meta: { type: "boolean", description: "Include the round-trip comment (default true)." } }, additionalProperties: false },
|
|
1045
1082
|
annotations: { title: "Export chart as Mermaid", ...READ },
|
|
1046
|
-
handler: ({ meta = true }) => ({ mermaid:
|
|
1083
|
+
handler: ({ meta = true }) => ({ mermaid: _chunkNK3WL5TJcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
|
|
1047
1084
|
};
|
|
1048
1085
|
const exportOoxml = {
|
|
1049
1086
|
name: "export_chart_ooxml",
|
|
@@ -1051,15 +1088,15 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1051
1088
|
description: "Returns the chart as a DrawingML chart part (c:chartSpace) for Word or PowerPoint files, with what could not be written as sentences.",
|
|
1052
1089
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
1053
1090
|
annotations: { title: "Export chart as Office XML", ...READ },
|
|
1054
|
-
handler: () =>
|
|
1091
|
+
handler: () => _chunkNN3JGUSXcjs.chartToOoxml.call(void 0, controller.toJSON())
|
|
1055
1092
|
};
|
|
1056
1093
|
const updateChart = {
|
|
1057
1094
|
name: "update_chart",
|
|
1058
1095
|
title: "Change chart presentation",
|
|
1059
|
-
description:
|
|
1096
|
+
description: 'Changes how the chart looks, as one undo step: type, titles, axes (xAxis = categories or numeric x, yAxis = values, yAxis2 = secondary values; each can be reversed, and value axes can be logarithmic with scale "log"), legend, stacking, orientation, curve, points, data labels and their position, palette, donut hole, bar spacing, histogram bins, waterfall total. All-or-nothing: invalid values change nothing and come back as sentences. Returns the new spec.',
|
|
1060
1097
|
inputSchema: {
|
|
1061
1098
|
type: "object",
|
|
1062
|
-
properties:
|
|
1099
|
+
properties: _chunkDK6QBGCScjs.CHART_UPDATE_PROPERTIES,
|
|
1063
1100
|
additionalProperties: false
|
|
1064
1101
|
},
|
|
1065
1102
|
annotations: { title: "Change chart presentation", ...WRITE_IDEMPOTENT },
|
|
@@ -1080,7 +1117,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1080
1117
|
series: {
|
|
1081
1118
|
type: "array",
|
|
1082
1119
|
description: "The new series (replaces all).",
|
|
1083
|
-
items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ...
|
|
1120
|
+
items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ..._chunkDK6QBGCScjs.SERIES_PROPS }, required: ["name", "values"], additionalProperties: false }
|
|
1084
1121
|
}
|
|
1085
1122
|
},
|
|
1086
1123
|
additionalProperties: false
|
|
@@ -1103,7 +1140,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1103
1140
|
type: "array",
|
|
1104
1141
|
minItems: 1,
|
|
1105
1142
|
description: "Values to set.",
|
|
1106
|
-
items: { type: "object", properties: { series:
|
|
1143
|
+
items: { type: "object", properties: { series: _chunkDK6QBGCScjs.SERIES_REF, category: _chunkDK6QBGCScjs.CATEGORY_REF, value: _chunkDK6QBGCScjs.VALUE }, required: ["series", "category", "value"], additionalProperties: false }
|
|
1107
1144
|
}
|
|
1108
1145
|
},
|
|
1109
1146
|
required: ["cells"],
|
|
@@ -1112,7 +1149,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1112
1149
|
annotations: { title: "Set chart values", ...WRITE_IDEMPOTENT },
|
|
1113
1150
|
handler: async ({ cells }) => {
|
|
1114
1151
|
const resolved = cells.map((c) => ({ seriesId: seriesById(c.series).id, index: categoryIndex(c.category), value: c.value }));
|
|
1115
|
-
const parsed = resolved.map((c) =>
|
|
1152
|
+
const parsed = resolved.map((c) => _chunkCKRNELPOcjs.parseChartValue.call(void 0, c.value));
|
|
1116
1153
|
const bad = resolved.find((_, i) => parsed[i] === void 0);
|
|
1117
1154
|
if (bad) fail2(`"${String(bad.value)}" is not a number; pass a number, numeric text or null for a gap. Nothing was changed.`);
|
|
1118
1155
|
if (options.director && parsed.every((v) => typeof v === "number")) {
|
|
@@ -1129,7 +1166,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1129
1166
|
description: "Adds a series (values padded to the categories) and selects it. Returns its id and stored values.",
|
|
1130
1167
|
inputSchema: {
|
|
1131
1168
|
type: "object",
|
|
1132
|
-
properties: { ...
|
|
1169
|
+
properties: { ..._chunkDK6QBGCScjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default: series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } },
|
|
1133
1170
|
required: ["name"],
|
|
1134
1171
|
additionalProperties: false
|
|
1135
1172
|
},
|
|
@@ -1144,10 +1181,10 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1144
1181
|
const updateSeries = {
|
|
1145
1182
|
name: "update_chart_series",
|
|
1146
1183
|
title: "Change a series",
|
|
1147
|
-
description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn (marker, curve, labels, format, x values, bubble sizes, point colours). null resets a field. Values change with set_chart_values. Returns the series.",
|
|
1184
|
+
description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn (marker, curve, labels, format, x values, bubble sizes, point colours, error bars). null resets a field. Values change with set_chart_values. Returns the series.",
|
|
1148
1185
|
inputSchema: {
|
|
1149
1186
|
type: "object",
|
|
1150
|
-
properties: { series:
|
|
1187
|
+
properties: { series: _chunkDK6QBGCScjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkDK6QBGCScjs.SERIES_PROPS).filter(([k]) => k !== "values")) },
|
|
1151
1188
|
required: ["series"],
|
|
1152
1189
|
additionalProperties: false
|
|
1153
1190
|
},
|
|
@@ -1163,7 +1200,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1163
1200
|
name: "remove_chart_series",
|
|
1164
1201
|
title: "Delete a series",
|
|
1165
1202
|
description: "Deletes a series and its values. Returns the remaining series ids.",
|
|
1166
|
-
inputSchema: { type: "object", properties: { series:
|
|
1203
|
+
inputSchema: { type: "object", properties: { series: _chunkDK6QBGCScjs.SERIES_REF }, required: ["series"], additionalProperties: false },
|
|
1167
1204
|
annotations: { title: "Delete a series", ...DESTRUCTIVE },
|
|
1168
1205
|
handler: ({ series }) => {
|
|
1169
1206
|
resolve(controller.removeSeries(seriesById(series).id));
|
|
@@ -1189,7 +1226,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1189
1226
|
name: "remove_chart_category",
|
|
1190
1227
|
title: "Delete a category",
|
|
1191
1228
|
description: "Deletes a category and its value in every series. Returns the remaining categories.",
|
|
1192
|
-
inputSchema: { type: "object", properties: { category:
|
|
1229
|
+
inputSchema: { type: "object", properties: { category: _chunkDK6QBGCScjs.CATEGORY_REF }, required: ["category"], additionalProperties: false },
|
|
1193
1230
|
annotations: { title: "Delete a category", ...DESTRUCTIVE },
|
|
1194
1231
|
handler: ({ category }) => {
|
|
1195
1232
|
resolve(controller.removeCategory(categoryIndex(category)));
|
|
@@ -1232,7 +1269,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1232
1269
|
annotations: { title: "Import a Mermaid chart", ...DESTRUCTIVE },
|
|
1233
1270
|
handler: ({ mermaid }) => {
|
|
1234
1271
|
const fenced = /```(?:mermaid)?\s*\n([\s\S]*?)```/.exec(mermaid);
|
|
1235
|
-
const read =
|
|
1272
|
+
const read = _chunkNK3WL5TJcjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
|
|
1236
1273
|
if (!read.family) fail2(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie or radar-beta.");
|
|
1237
1274
|
resolve(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
|
|
1238
1275
|
return { spec: controller.toJSON(), issues: read.issues };
|
|
@@ -1245,7 +1282,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1245
1282
|
inputSchema: { type: "object", properties: { xml: { type: "string", description: "The chart part XML, e.g. word/charts/chart1.xml." } }, required: ["xml"], additionalProperties: false },
|
|
1246
1283
|
annotations: { title: "Import an Office chart", ...DESTRUCTIVE },
|
|
1247
1284
|
handler: ({ xml }) => {
|
|
1248
|
-
const read =
|
|
1285
|
+
const read = _chunkNN3JGUSXcjs.chartFromOoxml.call(void 0, xml, { DOMParser: Parser() });
|
|
1249
1286
|
if (read.issues.some((i) => i.path === "" || i.path === "plotArea")) fail2(read.issues.map((i) => i.message).join(" "));
|
|
1250
1287
|
resolve(controller.update({ ...read.spec }, { label: "Import Office chart" }));
|
|
1251
1288
|
return { spec: controller.toJSON(), issues: read.issues.map((i) => i.message), unsupported: read.unsupported, lossless: read.lossless };
|
|
@@ -1255,7 +1292,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1255
1292
|
name: "add_chart_trendline",
|
|
1256
1293
|
title: "Add a trendline",
|
|
1257
1294
|
description: "Fits a trendline to a series and draws it (unstacked bar, line, area, scatter and bubble charts). Returns its index and the fit: coefficients, R\xB2 and equation.",
|
|
1258
|
-
inputSchema: { type: "object", properties: { series:
|
|
1295
|
+
inputSchema: { type: "object", properties: { series: _chunkDK6QBGCScjs.SERIES_REF, ..._chunkDK6QBGCScjs.TRENDLINE_PROPS }, required: ["series", "type"], additionalProperties: false },
|
|
1259
1296
|
annotations: { title: "Add a trendline", ...WRITE },
|
|
1260
1297
|
handler: ({ series, ...line }) => {
|
|
1261
1298
|
const s = seriesById(series);
|
|
@@ -1269,7 +1306,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1269
1306
|
description: "Deletes a trendline from a series. Returns the series' remaining trendlines.",
|
|
1270
1307
|
inputSchema: {
|
|
1271
1308
|
type: "object",
|
|
1272
|
-
properties: { series:
|
|
1309
|
+
properties: { series: _chunkDK6QBGCScjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
|
|
1273
1310
|
required: ["series", "index"],
|
|
1274
1311
|
additionalProperties: false
|
|
1275
1312
|
},
|
|
@@ -1277,7 +1314,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1277
1314
|
handler: ({ series, index }) => {
|
|
1278
1315
|
const s = seriesById(series);
|
|
1279
1316
|
resolve(controller.removeTrendline(s.id, index));
|
|
1280
|
-
return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
1317
|
+
return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _78 => _78.getSeries, 'call', _79 => _79(s.id), 'optionalAccess', _80 => _80.trendlines]), () => ( [])) };
|
|
1281
1318
|
}
|
|
1282
1319
|
};
|
|
1283
1320
|
const applyPreset = {
|
|
@@ -1287,8 +1324,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1287
1324
|
inputSchema: {
|
|
1288
1325
|
type: "object",
|
|
1289
1326
|
properties: {
|
|
1290
|
-
layout: { type: "string", enum:
|
|
1291
|
-
colors: { type: "string", enum:
|
|
1327
|
+
layout: { type: "string", enum: _chunkNK3WL5TJcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
|
|
1328
|
+
colors: { type: "string", enum: _chunkNK3WL5TJcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
|
|
1292
1329
|
},
|
|
1293
1330
|
additionalProperties: false
|
|
1294
1331
|
},
|
|
@@ -1317,8 +1354,8 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1317
1354
|
type: "object",
|
|
1318
1355
|
properties: {
|
|
1319
1356
|
kind: { type: "string", enum: ["none", "chart", "title", "subtitle", "legend", "axis", "series", "point", "category", "trendline"], description: "What to select." },
|
|
1320
|
-
series: { ...
|
|
1321
|
-
category: { ...
|
|
1357
|
+
series: { ..._chunkDK6QBGCScjs.SERIES_REF, description: "Series id or name (series, point, trendline)." },
|
|
1358
|
+
category: { ..._chunkDK6QBGCScjs.CATEGORY_REF, description: "Category index or label (point, category)." },
|
|
1322
1359
|
axis: { type: "string", enum: ["x", "y", "y2"], description: "Axis (axis)." },
|
|
1323
1360
|
index: { type: "integer", minimum: 0, description: "Trendline index (trendline)." }
|
|
1324
1361
|
},
|
|
@@ -1376,20 +1413,20 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1376
1413
|
to: { type: "object", description: "End, as fractions of the chart.", properties: { x: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the width." }, y: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the height." } }, required: ["x", "y"], additionalProperties: false },
|
|
1377
1414
|
fine: { type: "boolean", description: "Move a tenth as far (Alt)." },
|
|
1378
1415
|
lockAxis: { type: "boolean", description: "Scatter charts: change only the axis moved along most (Shift)." },
|
|
1379
|
-
width:
|
|
1380
|
-
height:
|
|
1416
|
+
width: _chunkDK6QBGCScjs.WIDTH,
|
|
1417
|
+
height: _chunkDK6QBGCScjs.HEIGHT
|
|
1381
1418
|
},
|
|
1382
1419
|
required: ["from", "to"],
|
|
1383
1420
|
additionalProperties: false
|
|
1384
1421
|
},
|
|
1385
1422
|
annotations: { title: "Drag a chart point", ...WRITE },
|
|
1386
1423
|
handler: ({ from, to, fine, lockAxis, width = size.width, height = size.height }) => {
|
|
1387
|
-
const scene =
|
|
1424
|
+
const scene = _chunkNK3WL5TJcjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
|
|
1388
1425
|
const start = { x: from.x * width, y: from.y * height };
|
|
1389
1426
|
const target = chartHitTest(scene, start);
|
|
1390
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
1427
|
+
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.`);
|
|
1391
1428
|
const t = target;
|
|
1392
|
-
const before = _nullishCoalesce(_optionalChain([controller, 'access',
|
|
1429
|
+
const before = _nullishCoalesce(_optionalChain([controller, 'access', _82 => _82.getSeries, 'call', _83 => _83(t.seriesId), 'optionalAccess', _84 => _84.values, 'access', _85 => _85[t.index]]), () => ( null));
|
|
1393
1430
|
const session = startChartPointDrag(controller, scene, t, start);
|
|
1394
1431
|
if (!session) fail2("That point cannot be dragged here (percent-stacked charts, pies and gaps cannot be dragged).");
|
|
1395
1432
|
session.move({ x: to.x * width, y: to.y * height }, { fine, lockAxis });
|
|
@@ -1414,10 +1451,10 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1414
1451
|
},
|
|
1415
1452
|
annotations: { title: "Press a key on the chart", ...DESTRUCTIVE },
|
|
1416
1453
|
handler: ({ key: k, shift, alt }) => {
|
|
1417
|
-
const scene =
|
|
1454
|
+
const scene = _chunkNK3WL5TJcjs.layoutChart.call(void 0, controller.toJSON(), size);
|
|
1418
1455
|
const used = handleChartKey(controller, scene, { key: k, shiftKey: shift, altKey: alt });
|
|
1419
1456
|
const sel = controller.getState().selection;
|
|
1420
|
-
const value = _optionalChain([sel, 'optionalAccess',
|
|
1457
|
+
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;
|
|
1421
1458
|
return { used, selection: sel, ...value !== void 0 ? { value } : {} };
|
|
1422
1459
|
}
|
|
1423
1460
|
};
|
|
@@ -1522,12 +1559,12 @@ var ChartStream = (_class = class {
|
|
|
1522
1559
|
if (format === "json") {
|
|
1523
1560
|
const value = complete ? safeParse(text) : parsePartialChartJson(text);
|
|
1524
1561
|
if (value !== void 0) {
|
|
1525
|
-
const read =
|
|
1562
|
+
const read = _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, value);
|
|
1526
1563
|
spec = read.spec;
|
|
1527
1564
|
issues = complete ? read.issues : [];
|
|
1528
1565
|
}
|
|
1529
1566
|
} else {
|
|
1530
|
-
const read =
|
|
1567
|
+
const read = _chunkNK3WL5TJcjs.chartFromMermaid.call(void 0, text, { partial: !complete });
|
|
1531
1568
|
if (read.family) {
|
|
1532
1569
|
spec = read.spec;
|
|
1533
1570
|
issues = complete ? read.issues : [];
|
|
@@ -1600,46 +1637,13 @@ function blendChartScenes(from, to, t) {
|
|
|
1600
1637
|
var easeChartTween = (t) => 1 - Math.pow(1 - Math.max(0, Math.min(1, t)), 3);
|
|
1601
1638
|
|
|
1602
1639
|
// src/chart/presence.ts
|
|
1603
|
-
var ChartPresence =
|
|
1604
|
-
__init4() {this.state = { actors: [] }}
|
|
1605
|
-
__init5() {this.listeners = /* @__PURE__ */ new Set()}
|
|
1606
|
-
__init6() {this.getState = () => this.state}
|
|
1607
|
-
__init7() {this.subscribe = (listener) => {
|
|
1608
|
-
this.listeners.add(listener);
|
|
1609
|
-
return () => {
|
|
1610
|
-
this.listeners.delete(listener);
|
|
1611
|
-
};
|
|
1612
|
-
}}
|
|
1613
|
-
/** Adds or changes an actor. */
|
|
1614
|
-
set(actor) {
|
|
1615
|
-
const current = this.state.actors.find((a) => a.id === actor.id);
|
|
1616
|
-
const next = { name: actor.id, color: CHART_PRESENCE_COLORS[this.state.actors.length % CHART_PRESENCE_COLORS.length], x: 0, y: 0, pressed: false, ...current, ...actor };
|
|
1617
|
-
this.state = { actors: current ? this.state.actors.map((a) => a.id === actor.id ? next : a) : [...this.state.actors, next] };
|
|
1618
|
-
this.listeners.forEach((l) => l(this.state));
|
|
1619
|
-
}
|
|
1620
|
-
remove(id) {
|
|
1621
|
-
if (!this.state.actors.some((a) => a.id === id)) return;
|
|
1622
|
-
this.state = { actors: this.state.actors.filter((a) => a.id !== id) };
|
|
1623
|
-
this.listeners.forEach((l) => l(this.state));
|
|
1624
|
-
}
|
|
1625
|
-
}, _class2);
|
|
1626
|
-
var CHART_PRESENCE_COLORS = ["#7c3aed", "#db2777", "#0891b2", "#ea580c", "#16a34a"];
|
|
1627
|
-
var realChartClock = {
|
|
1628
|
-
now: () => Date.now(),
|
|
1629
|
-
wait: (ms) => new Promise((resolve2) => setTimeout(resolve2, Math.max(0, ms)))
|
|
1640
|
+
var ChartPresence = class extends _chunkEGFUVXKKcjs.PresenceStore {
|
|
1630
1641
|
};
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
now: () => t,
|
|
1635
|
-
wait: async (ms) => {
|
|
1636
|
-
t += Math.max(0, ms);
|
|
1637
|
-
},
|
|
1638
|
-
elapsed: () => t - start
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1642
|
+
var CHART_PRESENCE_COLORS = _chunkEGFUVXKKcjs.PRESENCE_COLORS;
|
|
1643
|
+
var realChartClock = _chunkEGFUVXKKcjs.realPresenceClock;
|
|
1644
|
+
var createInstantChartClock = _chunkEGFUVXKKcjs.createInstantPresenceClock;
|
|
1641
1645
|
function chartPointAnchor(scene, seriesId, index) {
|
|
1642
|
-
const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access',
|
|
1646
|
+
const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _91 => _91.target, 'optionalAccess', _92 => _92.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
|
|
1643
1647
|
if (!mark) return null;
|
|
1644
1648
|
if (mark.kind === "rect") return { x: mark.x + mark.width / 2, y: mark.y };
|
|
1645
1649
|
if (mark.kind === "circle") return { x: mark.cx, y: mark.cy };
|
|
@@ -1665,10 +1669,10 @@ function planChartCommand(spec, scene, command, speed = 1) {
|
|
|
1665
1669
|
case "setValue": {
|
|
1666
1670
|
const at = chartPointAnchor(scene, command.seriesId, command.index);
|
|
1667
1671
|
const series = spec.series.find((s) => s.id === command.seriesId);
|
|
1668
|
-
const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
1669
|
-
const scale = _optionalChain([series, 'optionalAccess',
|
|
1672
|
+
const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _93 => _93.values, 'access', _94 => _94[command.index]]), () => ( 0));
|
|
1673
|
+
const scale = _optionalChain([series, 'optionalAccess', _95 => _95.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
|
|
1670
1674
|
if (at && scale) {
|
|
1671
|
-
const px =
|
|
1675
|
+
const px = _chunkNK3WL5TJcjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
|
|
1672
1676
|
const to = scale.axis === "y" ? { x: at.x, y: px } : { x: px, y: at.y };
|
|
1673
1677
|
steps.push({ type: "move", to: at, ms: ms(380) }, { type: "press" }, { type: "drag", to, ms: ms(520), from, value: command.value }, { type: "release" });
|
|
1674
1678
|
} 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 });
|
|
@@ -1678,12 +1682,12 @@ function planChartCommand(spec, scene, command, speed = 1) {
|
|
|
1678
1682
|
case "select": {
|
|
1679
1683
|
const sel = command.selection;
|
|
1680
1684
|
let to = null;
|
|
1681
|
-
if (_optionalChain([sel, 'optionalAccess',
|
|
1685
|
+
if (_optionalChain([sel, 'optionalAccess', _96 => _96.kind]) === "point") to = chartPointAnchor(scene, sel.seriesId, sel.index);
|
|
1682
1686
|
else if (sel) {
|
|
1683
1687
|
const m = scene.marks.find((x) => x.target && JSON.stringify(x.target) === JSON.stringify(sel));
|
|
1684
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
1685
|
-
else if (_optionalChain([m, 'optionalAccess',
|
|
1686
|
-
else if (_optionalChain([m, 'optionalAccess',
|
|
1688
|
+
if (_optionalChain([m, 'optionalAccess', _97 => _97.kind]) === "text") to = { x: m.x, y: m.y };
|
|
1689
|
+
else if (_optionalChain([m, 'optionalAccess', _98 => _98.kind]) === "rect") to = { x: m.x + m.width / 2, y: m.y + m.height / 2 };
|
|
1690
|
+
else if (_optionalChain([m, 'optionalAccess', _99 => _99.kind]) === "circle") to = { x: m.cx, y: m.cy };
|
|
1687
1691
|
}
|
|
1688
1692
|
if (to) steps.push({ type: "move", to, ms: ms(380) }, { type: "press" }, { type: "release" });
|
|
1689
1693
|
steps.push({ type: "commit" });
|
|
@@ -1698,41 +1702,31 @@ function planChartCommand(spec, scene, command, speed = 1) {
|
|
|
1698
1702
|
}
|
|
1699
1703
|
}
|
|
1700
1704
|
}
|
|
1701
|
-
var ChartDirector =
|
|
1702
|
-
constructor(controller, presence, options) {
|
|
1705
|
+
var ChartDirector = class {
|
|
1706
|
+
constructor(controller, presence, options) {
|
|
1703
1707
|
this.controller = controller;
|
|
1704
1708
|
this.presence = presence;
|
|
1705
1709
|
this.options = options;
|
|
1706
1710
|
this.clock = _nullishCoalesce(options.clock, () => ( realChartClock));
|
|
1711
|
+
this.queue = new (0, _chunkEGFUVXKKcjs.PerformanceQueue)(presence, {
|
|
1712
|
+
clock: this.clock,
|
|
1713
|
+
linger: options.linger,
|
|
1714
|
+
beginGesture: (key) => controller.beginGesture(key),
|
|
1715
|
+
endGesture: () => controller.endGesture()
|
|
1716
|
+
});
|
|
1707
1717
|
}
|
|
1708
1718
|
|
|
1709
1719
|
|
|
1710
1720
|
|
|
1711
|
-
__init8() {this.queues = /* @__PURE__ */ new Map()}
|
|
1712
1721
|
|
|
1713
|
-
|
|
1722
|
+
|
|
1714
1723
|
/** Acts out `commands` in order for `actor`. Resolves with one result per command. */
|
|
1715
1724
|
perform(actor, commands) {
|
|
1716
|
-
|
|
1717
|
-
const run = prev.then(async () => {
|
|
1725
|
+
return this.queue.run(actor, async () => {
|
|
1718
1726
|
const results = [];
|
|
1719
|
-
|
|
1720
|
-
this.controller.beginGesture(`agent:${actor.id}:${++this.calls}`);
|
|
1721
|
-
try {
|
|
1722
|
-
for (const command of commands) results.push(await this.performOne(actor.id, command));
|
|
1723
|
-
} finally {
|
|
1724
|
-
this.controller.endGesture();
|
|
1725
|
-
this.presence.set({ id: actor.id, message: void 0, pressed: false });
|
|
1726
|
-
}
|
|
1727
|
-
const linger = _nullishCoalesce(this.options.linger, () => ( 1500));
|
|
1728
|
-
if (linger > 0) {
|
|
1729
|
-
await this.clock.wait(linger);
|
|
1730
|
-
if (this.queues.get(actor.id) === run) this.presence.remove(actor.id);
|
|
1731
|
-
}
|
|
1727
|
+
for (const command of commands) results.push(await this.performOne(actor.id, command));
|
|
1732
1728
|
return results;
|
|
1733
1729
|
});
|
|
1734
|
-
this.queues.set(actor.id, run.catch(() => void 0));
|
|
1735
|
-
return run;
|
|
1736
1730
|
}
|
|
1737
1731
|
stale(command) {
|
|
1738
1732
|
const spec = this.controller.getSpec();
|
|
@@ -1744,15 +1738,8 @@ var ChartDirector = (_class3 = class {
|
|
|
1744
1738
|
}
|
|
1745
1739
|
return null;
|
|
1746
1740
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
for (let f = 1; f <= frames; f++) {
|
|
1750
|
-
const t = f / frames;
|
|
1751
|
-
const e = 1 - Math.pow(1 - t, 3);
|
|
1752
|
-
this.presence.set({ id, x: from.x + (to.x - from.x) * e, y: from.y + (to.y - from.y) * e });
|
|
1753
|
-
_optionalChain([each, 'optionalCall', _99 => _99(e)]);
|
|
1754
|
-
await this.clock.wait(ms / frames);
|
|
1755
|
-
}
|
|
1741
|
+
move(id, from, to, ms, each) {
|
|
1742
|
+
return _chunkEGFUVXKKcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, from, to, ms, each);
|
|
1756
1743
|
}
|
|
1757
1744
|
async performOne(id, command) {
|
|
1758
1745
|
const stale = this.stale(command);
|
|
@@ -1803,7 +1790,7 @@ var ChartDirector = (_class3 = class {
|
|
|
1803
1790
|
return { ok: true, command };
|
|
1804
1791
|
}
|
|
1805
1792
|
}
|
|
1806
|
-
}
|
|
1793
|
+
};
|
|
1807
1794
|
|
|
1808
1795
|
// src/chart/office-files.ts
|
|
1809
1796
|
var OfficeChartsError = class extends Error {
|
|
@@ -1854,7 +1841,7 @@ async function readRels(r, partPath) {
|
|
|
1854
1841
|
}
|
|
1855
1842
|
return rels;
|
|
1856
1843
|
}
|
|
1857
|
-
var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI ===
|
|
1844
|
+
var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI === _chunkNN3JGUSXcjs.CHART_OOXML_NS || el.namespaceURI === STRICT_CHART_NS || el.namespaceURI === CHARTEX_NS);
|
|
1858
1845
|
function frameName(ref) {
|
|
1859
1846
|
for (let el = ref.parentElement; el; el = el.parentElement) {
|
|
1860
1847
|
if (el.localName === "graphicFrame") {
|
|
@@ -1873,7 +1860,7 @@ async function chartsInPart(r, root, rels, place) {
|
|
|
1873
1860
|
const entry = r.zip.get(rel.target);
|
|
1874
1861
|
if (!entry) continue;
|
|
1875
1862
|
r.seen.add(rel.target);
|
|
1876
|
-
const read =
|
|
1863
|
+
const read = _chunkNN3JGUSXcjs.chartFromOoxml.call(void 0, await r.zip.readText(entry), { DOMParser: r.Parser });
|
|
1877
1864
|
const name = frameName(ref);
|
|
1878
1865
|
r.charts.push({
|
|
1879
1866
|
id: `chart-${r.charts.length + 1}`,
|
|
@@ -1955,7 +1942,7 @@ async function open(bytes, options) {
|
|
|
1955
1942
|
if (!Parser) throw new OfficeChartsError("Reading Office files needs a DOMParser. In Node, pass one (e.g. from jsdom or @xmldom/xmldom) as { DOMParser }.");
|
|
1956
1943
|
let zip;
|
|
1957
1944
|
try {
|
|
1958
|
-
zip = await
|
|
1945
|
+
zip = await _chunkNN3JGUSXcjs.readZip.call(void 0, bytes, options);
|
|
1959
1946
|
} catch (error) {
|
|
1960
1947
|
throw new OfficeChartsError(`This is not an Office file: ${error.message}`, { cause: error });
|
|
1961
1948
|
}
|
|
@@ -2252,5 +2239,19 @@ function createOfficeChartToolProvider(options = {}) {
|
|
|
2252
2239
|
|
|
2253
2240
|
|
|
2254
2241
|
|
|
2255
|
-
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
exports.CHART_AXIS_KINDS = _chunkCKRNELPOcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkCKRNELPOcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunkNK3WL5TJcjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkCKRNELPOcjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkCKRNELPOcjs.CHART_LEGEND_POSITIONS; exports.CHART_MARKERS = _chunkCKRNELPOcjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkNK3WL5TJcjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_MARKERS = _chunkNK3WL5TJcjs.MAX_CHART_MARKERS; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.chartDateLabels; exports.chartDateToSerial = _chunkNK3WL5TJcjs.chartDateToSerial; exports.chartErrorAmounts = _chunkCKRNELPOcjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkCKRNELPOcjs.chartErrorBarsOfType; exports.chartFamily = _chunkCKRNELPOcjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkNN3JGUSXcjs.chartFormatToCode; exports.chartFromMermaid = _chunkNK3WL5TJcjs.chartFromMermaid; exports.chartFromOoxml = _chunkNN3JGUSXcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkNK3WL5TJcjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLuminance = _chunkCKRNELPOcjs.chartLuminance; exports.chartMermaidFamily = _chunkNK3WL5TJcjs.chartMermaidFamily; exports.chartMovingAverage = _chunkNK3WL5TJcjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkCKRNELPOcjs.chartPointColor; exports.chartPresetPatch = _chunkNK3WL5TJcjs.chartPresetPatch; exports.chartQuantile = _chunkNK3WL5TJcjs.chartQuantile; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkCKRNELPOcjs.chartRgbToHex; exports.chartRgbToOklab = _chunkCKRNELPOcjs.chartRgbToOklab; exports.chartScaleFromPixel = _chunkNK3WL5TJcjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkNK3WL5TJcjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunkNK3WL5TJcjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunkNK3WL5TJcjs.chartSceneToSvg; exports.chartSerialToDate = _chunkNK3WL5TJcjs.chartSerialToDate; exports.chartSeriesColor = _chunkCKRNELPOcjs.chartSeriesColor; exports.chartSeriesType = _chunkCKRNELPOcjs.chartSeriesType; exports.chartSliceColor = _chunkCKRNELPOcjs.chartSliceColor; exports.chartSquarify = _chunkNK3WL5TJcjs.chartSquarify; exports.chartSupportsTrendlines = _chunkNK3WL5TJcjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunkNK3WL5TJcjs.chartTextBaseline; exports.chartTextOn = _chunkCKRNELPOcjs.chartTextOn; exports.chartTextTransform = _chunkNK3WL5TJcjs.chartTextTransform; exports.chartToMermaid = _chunkNK3WL5TJcjs.chartToMermaid; exports.chartToOoxml = _chunkNN3JGUSXcjs.chartToOoxml; exports.chartToSvg = _chunkNK3WL5TJcjs.chartToSvg; exports.chartTrendlineName = _chunkNK3WL5TJcjs.chartTrendlineName; exports.chartValueAtPoint = _chunkNK3WL5TJcjs.chartValueAtPoint; exports.chartXAtPoint = _chunkNK3WL5TJcjs.chartXAtPoint; exports.checkChartColors = _chunkCKRNELPOcjs.checkChartColors; exports.cloneChartSeries = _chunkCKRNELPOcjs.cloneChartSeries; exports.cloneChartSpec = _chunkCKRNELPOcjs.cloneChartSpec; exports.compileChartFormatCode = _chunkNK3WL5TJcjs.compileChartFormatCode; exports.contrastingTextColor = _chunkNK3WL5TJcjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunkNK3WL5TJcjs.createChartController; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkCKRNELPOcjs.createChartSpec; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkCKRNELPOcjs.cyclePaletteColor; exports.decimateChartPoints = _chunkNK3WL5TJcjs.decimateChartPoints; exports.defaultChartAxis = _chunkCKRNELPOcjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkCKRNELPOcjs.defaultChartErrorBarValue; exports.describeChart = _chunkNK3WL5TJcjs.describeChart; exports.describeChartErrorBars = _chunkCKRNELPOcjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkNK3WL5TJcjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findMermaidCharts = _chunkNK3WL5TJcjs.findMermaidCharts; exports.fitChartTrendline = _chunkNK3WL5TJcjs.fitChartTrendline; exports.formatChartAmountList = _chunkCKRNELPOcjs.formatChartAmountList; exports.formatChartDate = _chunkNK3WL5TJcjs.formatChartDate; exports.formatChartNumber = _chunkNK3WL5TJcjs.formatChartNumber; exports.formatChartValueWithCode = _chunkNK3WL5TJcjs.formatChartValueWithCode; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkCKRNELPOcjs.isCartesianChart; exports.isXyChart = _chunkCKRNELPOcjs.isXyChart; exports.layoutChart = _chunkNK3WL5TJcjs.layoutChart; exports.layoutSparkline = _chunkNK3WL5TJcjs.layoutSparkline; exports.linearMap = _chunkNK3WL5TJcjs.linearMap; exports.monochromeChartPalette = _chunkNK3WL5TJcjs.monochromeChartPalette; exports.niceLogScale = _chunkNK3WL5TJcjs.niceLogScale; exports.niceScale = _chunkNK3WL5TJcjs.niceScale; exports.niceStep = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.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 = _chunkNK3WL5TJcjs.sameChartSelection; exports.shadeChartColor = _chunkCKRNELPOcjs.shadeChartColor; exports.simulateChartVision = _chunkCKRNELPOcjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkNK3WL5TJcjs.snapChartValue; exports.sparklineToSvg = _chunkNK3WL5TJcjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkNK3WL5TJcjs.stepDecimals; exports.summarizeChart = _chunkNK3WL5TJcjs.summarizeChart; exports.summarizeChartSeries = _chunkNK3WL5TJcjs.summarizeChartSeries; exports.trendNumberText = _chunkNK3WL5TJcjs.trendNumberText; exports.uniqueChartSeriesId = _chunkCKRNELPOcjs.uniqueChartSeriesId;
|
|
2256
2257
|
//# sourceMappingURL=index.cjs.map
|