@pixerate/editor 0.180.0 → 0.182.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 +39 -39
- package/dist/agent/index.js +8 -8
- package/dist/animation/index.cjs +2 -2
- package/dist/animation/index.js +1 -1
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.js +2 -2
- package/dist/chart/index.cjs +169 -164
- package/dist/chart/index.d.cts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/index.js +13 -8
- package/dist/chart/layout-streamgraph.d.cts +15 -0
- package/dist/chart/layout-streamgraph.d.ts +15 -0
- package/dist/chart/spec.d.cts +1 -1
- package/dist/chart/spec.d.ts +1 -1
- package/dist/chart/types.d.cts +2 -1
- package/dist/chart/types.d.ts +2 -1
- package/dist/{chunk-KPWG3PSW.js → chunk-23E5GI2U.js} +8 -2
- package/dist/{chunk-IMHRN4ZZ.js → chunk-3MO3ZS7E.js} +3 -3
- package/dist/{chunk-5EMS4BZG.cjs → chunk-3SLBXKAW.cjs} +15 -7
- package/dist/{chunk-GXEC4FS6.cjs → chunk-5DQPDXOM.cjs} +82 -76
- package/dist/{chunk-ORZF4JOO.js → chunk-6ZZKRH7R.js} +3 -1
- package/dist/{chunk-FHNGNL3V.cjs → chunk-CZBRY4SW.cjs} +51 -51
- package/dist/{chunk-WL4IN36A.js → chunk-EHTX34RE.js} +13 -5
- package/dist/{chunk-ZXTO6U7T.js → chunk-GI3AVES4.js} +1 -1
- package/dist/{chunk-34UCPHYO.js → chunk-GOBOCZZI.js} +2 -2
- package/dist/{chunk-VKHJJUBK.cjs → chunk-HUAISCUX.cjs} +22 -18
- package/dist/{chunk-O2ANJFUF.js → chunk-IVSWRVB4.js} +8 -1
- package/dist/{chunk-SWTUM32H.cjs → chunk-K7ENM55P.cjs} +8 -1
- package/dist/{chunk-OLCHKGGO.js → chunk-L6Y7TSQ4.js} +5 -1
- package/dist/{chunk-TUXKLM5W.cjs → chunk-N76AMOKE.cjs} +224 -42
- package/dist/{chunk-RLOIEDA3.cjs → chunk-O7QXVGMP.cjs} +16 -16
- package/dist/{chunk-R2VHVQVY.js → chunk-PI2UYMZY.js} +3 -3
- package/dist/{chunk-E45AIIWY.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-GTF4RYXJ.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/{chunk-NJGFSOPP.cjs → chunk-U4QN36YT.cjs} +2 -2
- package/dist/{chunk-FKYGM35R.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-OJQVKJYD.js → chunk-WKMUBATU.js} +183 -1
- package/dist/{chunk-OUO3DSRT.cjs → chunk-WRZ6C4TU.cjs} +3 -1
- package/dist/commands/index.cjs +3 -3
- package/dist/commands/index.js +2 -2
- package/dist/diagram/index.cjs +7 -7
- package/dist/diagram/index.js +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +7 -7
- package/dist/extensions/index.js +6 -6
- package/dist/image-editor/controller.d.cts +2 -0
- package/dist/image-editor/controller.d.ts +2 -0
- package/dist/image-editor/index.cjs +135 -115
- package/dist/image-editor/index.js +28 -8
- package/dist/image-editor/playback.d.cts +14 -4
- package/dist/image-editor/playback.d.ts +14 -4
- package/dist/image-editor/selection/segmentation.d.cts +3 -0
- package/dist/image-editor/selection/segmentation.d.ts +3 -0
- package/dist/index.cjs +13 -13
- package/dist/index.js +7 -7
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.js +3 -3
- package/dist/tools/playback.d.cts +4 -1
- package/dist/tools/playback.d.ts +4 -1
- package/dist/tools/presence.d.cts +15 -3
- package/dist/tools/presence.d.ts +15 -3
- package/dist/tools/registry.d.cts +7 -1
- package/dist/tools/registry.d.ts +7 -1
- package/package.json +1 -1
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5DQPDXOMcjs = require('./chunk-5DQPDXOM.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkN76AMOKEcjs = require('./chunk-N76AMOKE.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkWRZ6C4TUcjs = require('./chunk-WRZ6C4TU.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkG43MNQ4Ccjs = require('./chunk-G43MNQ4C.cjs');
|
|
@@ -1211,7 +1211,7 @@ var ChartNodeView = (_class = class {
|
|
|
1211
1211
|
this.dom.contentEditable = "false";
|
|
1212
1212
|
this.syncAttributes();
|
|
1213
1213
|
this.key = specKey(this.node.attrs.spec);
|
|
1214
|
-
this.controller = new (0,
|
|
1214
|
+
this.controller = new (0, _chunk5DQPDXOMcjs.ChartController)({ spec: this.node.attrs.spec });
|
|
1215
1215
|
this.unsubscribe = this.controller.subscribe((state) => {
|
|
1216
1216
|
if (!state.gesture) this.writeBack();
|
|
1217
1217
|
});
|
|
@@ -1444,7 +1444,7 @@ function readSpec(value) {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
if (!input || typeof input !== "object" || Array.isArray(input)) return null;
|
|
1447
|
-
return
|
|
1447
|
+
return _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, input).spec;
|
|
1448
1448
|
}
|
|
1449
1449
|
var readSize = (value) => {
|
|
1450
1450
|
const n = value === null ? NaN : Number(value);
|
|
@@ -1470,10 +1470,10 @@ function staticChartSvg(node, options) {
|
|
|
1470
1470
|
const spec = node.attrs.spec;
|
|
1471
1471
|
const width = _nullishCoalesce(node.attrs.width, () => ( options.defaultWidth));
|
|
1472
1472
|
const height = _nullishCoalesce(node.attrs.height, () => ( options.defaultHeight));
|
|
1473
|
-
const scene =
|
|
1474
|
-
return
|
|
1473
|
+
const scene = _chunkN76AMOKEcjs.layoutChart.call(void 0, spec, { width, height, theme: options.theme, selection: null });
|
|
1474
|
+
return _chunk5DQPDXOMcjs.chartSceneToDomSpec.call(void 0, scene, {
|
|
1475
1475
|
ariaLabel: spec.title || "Chart",
|
|
1476
|
-
description:
|
|
1476
|
+
description: _chunk5DQPDXOMcjs.describeChart.call(void 0, spec),
|
|
1477
1477
|
attrs: { style: "max-width: 100%; height: auto; display: block" }
|
|
1478
1478
|
});
|
|
1479
1479
|
}
|
|
@@ -1489,7 +1489,7 @@ var Chart = _core.Node.create({
|
|
|
1489
1489
|
return {
|
|
1490
1490
|
HTMLAttributes: {},
|
|
1491
1491
|
nodeView: null,
|
|
1492
|
-
theme:
|
|
1492
|
+
theme: _chunkWRZ6C4TUcjs.DEFAULT_CHART_THEME,
|
|
1493
1493
|
defaultWidth: 640,
|
|
1494
1494
|
defaultHeight: 320,
|
|
1495
1495
|
generateId: () => generateStructureId("chart")
|
|
@@ -1503,7 +1503,7 @@ var Chart = _core.Node.create({
|
|
|
1503
1503
|
renderHTML: (attributes) => attributes.id ? { "data-chart-id": attributes.id } : {}
|
|
1504
1504
|
},
|
|
1505
1505
|
spec: {
|
|
1506
|
-
default:
|
|
1506
|
+
default: _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, {}).spec,
|
|
1507
1507
|
// null (no `data-chart`) keeps what the parse rule found, e.g. a mermaid block's spec.
|
|
1508
1508
|
parseHTML: (element) => readSpec(element.getAttribute("data-chart")),
|
|
1509
1509
|
renderHTML: (attributes) => ({
|
|
@@ -1541,7 +1541,7 @@ var Chart = _core.Node.create({
|
|
|
1541
1541
|
const code = element.querySelector("code");
|
|
1542
1542
|
const language = _nullishCoalesce(_nullishCoalesce(_optionalChain([code, 'optionalAccess', _34 => _34.getAttribute, 'call', _35 => _35("class")]), () => ( element.getAttribute("data-language"))), () => ( ""));
|
|
1543
1543
|
if (!/(?:^|\s)language-mermaid(?:\s|$)/.test(language) && language !== "mermaid") return false;
|
|
1544
|
-
const result =
|
|
1544
|
+
const result = _chunk5DQPDXOMcjs.chartFromMermaid.call(void 0, _nullishCoalesce((_nullishCoalesce(code, () => ( element))).textContent, () => ( "")));
|
|
1545
1545
|
return result.family ? { spec: result.spec } : false;
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
@@ -1565,7 +1565,7 @@ var Chart = _core.Node.create({
|
|
|
1565
1565
|
return {
|
|
1566
1566
|
markdown: {
|
|
1567
1567
|
serialize(state, node) {
|
|
1568
|
-
const text =
|
|
1568
|
+
const text = _chunk5DQPDXOMcjs.chartToMermaid.call(void 0, node.attrs.spec);
|
|
1569
1569
|
const fence = "`".repeat(Math.max(3, longestBacktickRun(text) + 1));
|
|
1570
1570
|
state.write(`${fence}mermaid
|
|
1571
1571
|
`);
|
|
@@ -1587,7 +1587,7 @@ var Chart = _core.Node.create({
|
|
|
1587
1587
|
type: this.name,
|
|
1588
1588
|
attrs: {
|
|
1589
1589
|
id: _nullishCoalesce(options.id, () => ( this.options.generateId())),
|
|
1590
|
-
spec:
|
|
1590
|
+
spec: _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, _nullishCoalesce(options.spec, () => ( {}))).spec,
|
|
1591
1591
|
width: _nullishCoalesce(options.width, () => ( null)),
|
|
1592
1592
|
height: _nullishCoalesce(options.height, () => ( this.options.defaultHeight))
|
|
1593
1593
|
}
|
|
@@ -1598,7 +1598,7 @@ var Chart = _core.Node.create({
|
|
|
1598
1598
|
if (dispatch) {
|
|
1599
1599
|
tr.setNodeMarkup(chart.pos, void 0, {
|
|
1600
1600
|
...chart.node.attrs,
|
|
1601
|
-
...changes.spec !== void 0 ? { spec:
|
|
1601
|
+
...changes.spec !== void 0 ? { spec: _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, changes.spec).spec } : {},
|
|
1602
1602
|
...changes.width !== void 0 ? { width: changes.width } : {},
|
|
1603
1603
|
...changes.height !== void 0 ? { height: changes.height } : {}
|
|
1604
1604
|
});
|
|
@@ -1705,14 +1705,14 @@ var Sparkline = _core.Node.create({
|
|
|
1705
1705
|
return [{ tag: 'span[data-type="sparkline"]', priority: 60 }];
|
|
1706
1706
|
},
|
|
1707
1707
|
renderHTML({ node, HTMLAttributes }) {
|
|
1708
|
-
const scene =
|
|
1708
|
+
const scene = _chunk5DQPDXOMcjs.layoutSparkline.call(void 0, node.attrs.values, {
|
|
1709
1709
|
kind: node.attrs.kind,
|
|
1710
1710
|
width: node.attrs.width,
|
|
1711
1711
|
height: node.attrs.height,
|
|
1712
1712
|
color: _nullishCoalesce(node.attrs.color, () => ( this.options.color)),
|
|
1713
1713
|
negativeColor: this.options.negativeColor
|
|
1714
1714
|
});
|
|
1715
|
-
const svg =
|
|
1715
|
+
const svg = _chunk5DQPDXOMcjs.chartSceneToDomSpec.call(void 0, scene, {
|
|
1716
1716
|
ariaLabel: sparklineLabel(node),
|
|
1717
1717
|
attrs: { style: "display: inline-block; vertical-align: middle" }
|
|
1718
1718
|
});
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
chartToMermaid,
|
|
6
6
|
describeChart,
|
|
7
7
|
layoutSparkline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-23E5GI2U.js";
|
|
9
9
|
import {
|
|
10
10
|
layoutChart
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WKMUBATU.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_CHART_THEME,
|
|
14
14
|
normalizeChartSpec
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6ZZKRH7R.js";
|
|
16
16
|
import {
|
|
17
17
|
plainTextToSlice
|
|
18
18
|
} from "./chunk-2INPJDNY.js";
|
|
@@ -11,10 +11,10 @@ var _chunkYN6JKAUEcjs = require('./chunk-YN6JKAUE.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkHUAISCUXcjs = require('./chunk-HUAISCUX.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkWRZ6C4TUcjs = require('./chunk-WRZ6C4TU.cjs');
|
|
18
18
|
|
|
19
19
|
// src/export/images.ts
|
|
20
20
|
var DOCX_IMAGE_TYPES = {
|
|
@@ -1028,12 +1028,12 @@ var DocxBuilder = (_class2 = class {
|
|
|
1028
1028
|
this.drop("node", "chart", "chart has no spec");
|
|
1029
1029
|
return;
|
|
1030
1030
|
}
|
|
1031
|
-
const spec =
|
|
1032
|
-
const written =
|
|
1031
|
+
const spec = _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, raw).spec;
|
|
1032
|
+
const written = _chunkHUAISCUXcjs.chartToOoxml.call(void 0, spec);
|
|
1033
1033
|
for (const issue of written.issues) this.drop("node", "chart", issue);
|
|
1034
1034
|
const name = `chart${this.charts.length + 1}.xml`;
|
|
1035
1035
|
this.charts.push(written.xml);
|
|
1036
|
-
const relId = this.rels.add(
|
|
1036
|
+
const relId = this.rels.add(_chunkHUAISCUXcjs.CHART_OOXML_RELATIONSHIP, `charts/${name}`);
|
|
1037
1037
|
let width = _nullishCoalesce(pixelAttr(_optionalChain([node, 'access', _91 => _91.attrs, 'optionalAccess', _92 => _92.width])), () => ( MAX_IMAGE_WIDTH_PX));
|
|
1038
1038
|
let height = _nullishCoalesce(pixelAttr(_optionalChain([node, 'access', _93 => _93.attrs, 'optionalAccess', _94 => _94.height])), () => ( 320));
|
|
1039
1039
|
if (width > MAX_IMAGE_WIDTH_PX) {
|
|
@@ -1050,8 +1050,8 @@ var DocxBuilder = (_class2 = class {
|
|
|
1050
1050
|
drawing.empty("wp:extent", { cx, cy }).empty("wp:effectExtent", { l: 0, t: 0, r: 0, b: 0 });
|
|
1051
1051
|
drawing.empty("wp:docPr", { id, name: `Chart ${id}`, descr: title || void 0, title: title || void 0 });
|
|
1052
1052
|
drawing.empty("wp:cNvGraphicFramePr");
|
|
1053
|
-
drawing.open("a:graphic").open("a:graphicData", { uri:
|
|
1054
|
-
drawing.empty("c:chart", { "xmlns:c":
|
|
1053
|
+
drawing.open("a:graphic").open("a:graphicData", { uri: _chunkHUAISCUXcjs.CHART_OOXML_NS });
|
|
1054
|
+
drawing.empty("c:chart", { "xmlns:c": _chunkHUAISCUXcjs.CHART_OOXML_NS, "r:id": relId });
|
|
1055
1055
|
drawing.close("a:graphicData").close("a:graphic").close("wp:inline").close("w:drawing").close("w:r");
|
|
1056
1056
|
this.report.written.paragraphs++;
|
|
1057
1057
|
w.open("w:p");
|
|
@@ -1384,7 +1384,7 @@ var DocxBuilder = (_class2 = class {
|
|
|
1384
1384
|
if (people) add("word/people.xml", people, `${CT_WML}people+xml`);
|
|
1385
1385
|
parts.push({ name: "word/_rels/document.xml.rels", data: this.rels.xml() });
|
|
1386
1386
|
for (const file of this.media) parts.push({ name: `word/media/${file.name}`, data: file.bytes });
|
|
1387
|
-
this.charts.forEach((xml, i) => add(`word/charts/chart${i + 1}.xml`, xml,
|
|
1387
|
+
this.charts.forEach((xml, i) => add(`word/charts/chart${i + 1}.xml`, xml, _chunkHUAISCUXcjs.CHART_OOXML_CONTENT_TYPE));
|
|
1388
1388
|
add("docProps/core.xml", this.coreXml(now), "application/vnd.openxmlformats-package.core-properties+xml");
|
|
1389
1389
|
const app = new XmlWriter();
|
|
1390
1390
|
app.open("Properties", { xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" });
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkWRZ6C4TUcjs = require('./chunk-WRZ6C4TU.cjs');
|
|
22
22
|
|
|
23
23
|
// src/chart/schemas.ts
|
|
24
24
|
var VALUE = { type: ["number", "string", "null"], description: 'A number, numeric text ("1,200", "12%", "$40", "(3)") or null for a gap.' };
|
|
@@ -30,7 +30,7 @@ var FORMAT = {
|
|
|
30
30
|
type: "object",
|
|
31
31
|
description: "How numbers are written on this axis or series.",
|
|
32
32
|
properties: {
|
|
33
|
-
style: { type: "string", enum: [...
|
|
33
|
+
style: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_NUMBER_STYLES], description: "number (default), percent (0.25 \u2192 25%), currency or compact (1.2K)." },
|
|
34
34
|
decimals: { type: "integer", minimum: 0, maximum: 10, description: "Fixed decimals (default: what the ticks need)." },
|
|
35
35
|
currency: { type: "string", description: 'ISO currency code for style "currency", e.g. "EUR" (default USD).' },
|
|
36
36
|
prefix: { type: "string", description: "Text before every number." },
|
|
@@ -50,10 +50,10 @@ var AXIS = (what) => ({
|
|
|
50
50
|
step: { type: ["number", "null"], exclusiveMinimum: 0, description: "Fixed distance between ticks, or null for automatic." },
|
|
51
51
|
gridlines: { type: "boolean", description: "Grid lines at each tick." },
|
|
52
52
|
format: FORMAT,
|
|
53
|
-
kind: { type: ["string", "null"], enum: [...
|
|
53
|
+
kind: { type: ["string", "null"], enum: [..._chunkWRZ6C4TUcjs.CHART_AXIS_KINDS, null], description: 'Category axis only: "date" reads categories as dates and labels them by calendar steps.' },
|
|
54
54
|
scale: {
|
|
55
55
|
type: ["string", "null"],
|
|
56
|
-
enum: [...
|
|
56
|
+
enum: [..._chunkWRZ6C4TUcjs.CHART_AXIS_SCALES, null],
|
|
57
57
|
description: 'Value axes and the numeric x axis of scatter / bubble charts: "log" spaces ticks by powers of logBase (values of 0 or less are skipped; min and max must be above 0; not with percent stacking). "linear" or null is the default. Ignored on a category axis.'
|
|
58
58
|
},
|
|
59
59
|
logBase: { type: ["number", "null"], minimum: 2, maximum: 1e3, description: "Base of a log axis, 2 to 1000 (default 10; null resets)." },
|
|
@@ -62,7 +62,7 @@ var AXIS = (what) => ({
|
|
|
62
62
|
additionalProperties: false
|
|
63
63
|
});
|
|
64
64
|
var TRENDLINE_PROPS = {
|
|
65
|
-
type: { type: "string", enum: [...
|
|
65
|
+
type: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_TRENDLINE_TYPES], description: "Fit: linear, exponential, logarithmic, power, polynomial or moving-average." },
|
|
66
66
|
order: { type: "integer", minimum: 2, maximum: 6, description: "Polynomial order (default 2)." },
|
|
67
67
|
period: { type: "integer", minimum: 2, description: "Moving-average period in points (default 2)." },
|
|
68
68
|
forward: { type: "number", minimum: 0, description: "Extend the line this many x units past the last point (default 0)." },
|
|
@@ -77,7 +77,7 @@ var REFERENCE_COMMON = {
|
|
|
77
77
|
label: { type: "string", description: 'Text written on it, e.g. "Target" (default none).' },
|
|
78
78
|
axis: {
|
|
79
79
|
type: "string",
|
|
80
|
-
enum: [...
|
|
80
|
+
enum: [..._chunkWRZ6C4TUcjs.CHART_REFERENCE_AXES],
|
|
81
81
|
description: "Axis it is measured on: y (default) is the value axis, y2 the secondary value axis (needs a series there), x the numeric x axis of a scatter or bubble chart."
|
|
82
82
|
},
|
|
83
83
|
color: { type: "string", description: "CSS colour (default: the text colour)." }
|
|
@@ -93,7 +93,7 @@ var REFERENCE_BAND_PROPS = {
|
|
|
93
93
|
};
|
|
94
94
|
var REFERENCE_COMMON_PATCH = {
|
|
95
95
|
label: { type: ["string", "null"], description: "Text written on it; null removes it." },
|
|
96
|
-
axis: { type: ["string", "null"], enum: [...
|
|
96
|
+
axis: { type: ["string", "null"], enum: [..._chunkWRZ6C4TUcjs.CHART_REFERENCE_AXES, null], description: "Axis it is measured on (y, y2 or x); null goes back to y." },
|
|
97
97
|
color: { type: ["string", "null"], description: "CSS colour; null goes back to the text colour." }
|
|
98
98
|
};
|
|
99
99
|
var REFERENCE_LINE_PATCH = { value: REFERENCE_LINE_PROPS.value, ...REFERENCE_COMMON_PATCH };
|
|
@@ -127,13 +127,13 @@ var ERROR_BARS = (what) => ({
|
|
|
127
127
|
properties: {
|
|
128
128
|
type: {
|
|
129
129
|
type: "string",
|
|
130
|
-
enum: [...
|
|
130
|
+
enum: [..._chunkWRZ6C4TUcjs.CHART_ERROR_BAR_TYPES],
|
|
131
131
|
description: "fixed: the same amount at every point; percent: a percentage of each value; stddev: value standard deviations of the series, drawn around the series mean (as Excel does); stderr: the standard error of the series at every point; custom: per-point plus / minus amounts."
|
|
132
132
|
},
|
|
133
133
|
value: { type: "number", minimum: 0, description: "Amount in data units for fixed (default 1), percent of each value for percent (default 5), number of standard deviations for stddev (default 1). Not for stderr or custom." },
|
|
134
134
|
plus: { type: "array", items: VALUE, description: "custom only: amount above each point, one per category, in data units (0 or more; null for none)." },
|
|
135
135
|
minus: { type: "array", items: VALUE, description: "custom only: amount below each point, one per category (default: the plus amounts)." },
|
|
136
|
-
direction: { type: "string", enum: [...
|
|
136
|
+
direction: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_ERROR_BAR_DIRECTIONS], description: "both (default), plus (only above) or minus (only below)." },
|
|
137
137
|
cap: { type: "boolean", description: "Draw end caps (default true)." }
|
|
138
138
|
},
|
|
139
139
|
required: ["type"],
|
|
@@ -143,22 +143,22 @@ var SERIES_PROPS = {
|
|
|
143
143
|
name: { type: "string", description: "Series name (legend and data grid header)." },
|
|
144
144
|
values: { type: "array", items: VALUE, description: "One value per category, in category order (padded with gaps)." },
|
|
145
145
|
color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." },
|
|
146
|
-
type: { type: ["string", "null"], enum: [...
|
|
146
|
+
type: { type: ["string", "null"], enum: [..._chunkWRZ6C4TUcjs.CHART_SERIES_TYPES, null], description: "Draw this series as bar, line, area or scatter (a combo chart); null follows the chart type." },
|
|
147
147
|
hidden: { type: "boolean", description: "Hide the series (its data is kept)." },
|
|
148
148
|
axis: { type: ["string", "null"], enum: ["primary", "secondary", null], description: "Value axis: secondary is drawn on the right with its own scale." },
|
|
149
149
|
x: { type: ["array", "null"], items: VALUE, description: "Numeric x per category, for scatter and bubble charts." },
|
|
150
150
|
sizes: { type: ["array", "null"], items: VALUE, description: "Bubble sizes per category (area is proportional to size)." },
|
|
151
151
|
pointColors: { type: ["array", "null"], items: { type: ["string", "null"] }, description: "Colour per category (null keeps the series colour)." },
|
|
152
152
|
callouts: { type: ["array", "null"], items: { type: ["string", "null"] }, description: "A label pinned to each point that matters, one per category (null: none); null removes them all. Bar, line, area and scatter charts. set_chart_callout sets one." },
|
|
153
|
-
marker: { type: ["string", "null"], enum: [...
|
|
154
|
-
curve: { type: ["string", "null"], enum: [...
|
|
153
|
+
marker: { type: ["string", "null"], enum: [..._chunkWRZ6C4TUcjs.CHART_MARKERS, null], description: "Point marker shape for line, area and scatter series." },
|
|
154
|
+
curve: { type: ["string", "null"], enum: [..._chunkWRZ6C4TUcjs.CHART_CURVES, null], description: "Line shape for this series: linear, smooth or step." },
|
|
155
155
|
dataLabels: { type: ["boolean", "null"], description: "Value labels for this series (null follows the chart)." },
|
|
156
156
|
format: { ...FORMAT, type: ["object", "null"], description: "How this series' labels are written (null follows the value axis)." },
|
|
157
157
|
errorBars: ERROR_BARS("Error bars along the value axis (bar, line, area and scatter series; on stacked charts they sit on the stack top)."),
|
|
158
158
|
xErrorBars: ERROR_BARS("Error bars along the x axis (scatter and bubble charts with numeric x values; amounts in x units).")
|
|
159
159
|
};
|
|
160
160
|
var CHART_UPDATE_PROPERTIES = {
|
|
161
|
-
type: { type: "string", enum: [...
|
|
161
|
+
type: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_TYPES], description: "Chart type. streamgraph stacks areas symmetrically around a center baseline; slope joins each category from the first series (before) to the second (after); likert reads each category as a question and the series as answers from most negative to most positive; parliament draws the first series as seats; sunburst draws the grouped data (set_chart_tree) as rings, and a treemap with grouped data nests its groups; sankey draws the flows (set_chart_links); barrace reads categories as time points and series as names, and animates their ranking; choropleth shades the regions of a map, each category naming a region by code (FRA) or name (France)." },
|
|
162
162
|
title: { type: "string", description: 'Title ("" for none).' },
|
|
163
163
|
subtitle: { type: "string", description: 'Subtitle ("" for none).' },
|
|
164
164
|
xAxis: AXIS("Category axis (or numeric x axis of scatter / bubble charts)."),
|
|
@@ -167,15 +167,15 @@ var CHART_UPDATE_PROPERTIES = {
|
|
|
167
167
|
legend: {
|
|
168
168
|
type: "object",
|
|
169
169
|
description: "Legend.",
|
|
170
|
-
properties: { show: { type: "boolean", description: "Show the legend." }, position: { type: "string", enum: [...
|
|
170
|
+
properties: { show: { type: "boolean", description: "Show the legend." }, position: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_LEGEND_POSITIONS], description: "Where the legend goes." } },
|
|
171
171
|
additionalProperties: false
|
|
172
172
|
},
|
|
173
|
-
stacking: { type: "string", enum: [...
|
|
174
|
-
orientation: { type: "string", enum: [...
|
|
175
|
-
curve: { type: "string", enum: [...
|
|
173
|
+
stacking: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_STACKINGS], description: "none, stacked, or percent (each category scaled to 100%)." },
|
|
174
|
+
orientation: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_ORIENTATIONS], description: "horizontal draws bars sideways." },
|
|
175
|
+
curve: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_CURVES], description: "Line shape: linear, smooth or step." },
|
|
176
176
|
points: { type: "boolean", description: "Dots on line and area series." },
|
|
177
177
|
dataLabels: { type: "boolean", description: "Value labels on bars, points and slices." },
|
|
178
|
-
labelPosition: { type: "string", enum: [...
|
|
178
|
+
labelPosition: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_LABEL_POSITIONS], description: "Bar label position; auto drops labels that do not fit." },
|
|
179
179
|
palette: { type: "array", items: { type: "string" }, minItems: 1, description: "Series colours in order (CSS colours)." },
|
|
180
180
|
innerRadius: { type: "number", minimum: 0, maximum: 0.9, description: "Donut hole as a fraction of the radius." },
|
|
181
181
|
gapWidth: { type: "number", minimum: 0, maximum: 0.9, description: "Space between bar groups as a fraction of the category (default 0.28)." },
|
|
@@ -183,19 +183,19 @@ var CHART_UPDATE_PROPERTIES = {
|
|
|
183
183
|
bins: { type: ["integer", "null"], minimum: 1, maximum: 500, description: "Histogram bin count, or null for \u221An." },
|
|
184
184
|
showTotal: { type: "boolean", description: "Waterfall: append a total bar." },
|
|
185
185
|
radarTicks: { type: ["integer", "null"], minimum: 1, maximum: 50, description: "Radar: number of evenly spaced rings from the value axis min to max, or null for round-number rings (default null)." },
|
|
186
|
-
radarGraticule: { type: "string", enum: [...
|
|
186
|
+
radarGraticule: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_RADAR_GRATICULES], description: "Radar: draw rings as polygons through the spokes or as circles (default polygon)." },
|
|
187
187
|
note: { type: "string", description: 'A source or footnote written under the chart ("" for none).' },
|
|
188
188
|
highlight: { type: "array", items: { type: "string" }, description: "Category labels and series names (or ids) to draw normally while the rest are muted; [] shows everything. highlight_chart checks the names." },
|
|
189
189
|
referenceLines: { type: "array", items: { type: "object", properties: REFERENCE_LINE_PROPS, required: ["value"], additionalProperties: false }, description: "Replaces every reference line (targets, floors, averages across the plot). add_chart_reference_line adds one." },
|
|
190
190
|
referenceBands: { type: "array", items: { type: "object", properties: REFERENCE_BAND_PROPS, required: ["from", "to"], additionalProperties: false }, description: "Replaces every reference band (target ranges across the plot). add_chart_reference_band adds one." },
|
|
191
191
|
varyColors: { type: "boolean", description: "A one-series bar, line, area or scatter chart colours each category from the palette, and its legend lists the categories (default false)." },
|
|
192
|
-
likertNeutral: { type: "string", enum: [...
|
|
193
|
-
likertSort: { type: "string", enum: [...
|
|
192
|
+
likertNeutral: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_LIKERT_NEUTRALS], description: "Likert with an odd number of answers: split (default) puts the middle answer across the centre line; separate draws it in its own column on the right." },
|
|
193
|
+
likertSort: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_LIKERT_SORTS], description: "Likert: order the questions by agreement (positive), by disagreement (negative) or as given (none, default)." },
|
|
194
194
|
parliamentArc: { type: "number", minimum: 90, maximum: 360, description: "Parliament: sweep of the hemicycle in degrees (default 180)." },
|
|
195
195
|
parliamentMajority: { type: ["integer", "null"], minimum: 1, description: "Parliament: seats needed for a majority, drawn as a dashed line (null: half of the seats plus one)." },
|
|
196
196
|
parliamentLabel: { type: "string", description: 'Parliament: caption under the seat total ("" writes "seats").' },
|
|
197
197
|
sunburstLabel: { type: "string", description: 'Sunburst: caption under the total in the centre ("" for none).' },
|
|
198
|
-
sankeyLinkColor: { type: "string", enum: [...
|
|
198
|
+
sankeyLinkColor: { type: "string", enum: [..._chunkWRZ6C4TUcjs.CHART_SANKEY_LINK_COLORS], description: "Sankey: colour each flow by its source node (default), its target node, or grey." },
|
|
199
199
|
map: { type: "string", description: 'Choropleth: the registered map to draw (list_chart_map_regions lists them; "europe" by default).' },
|
|
200
200
|
mapSteps: { type: "integer", minimum: 2, maximum: 9, description: "Choropleth: number of equal colour classes between the smallest and largest value (default 5)." },
|
|
201
201
|
mapThresholds: { type: "array", items: { type: "number" }, maxItems: 8, description: "Choropleth: class breaks in ascending order, e.g. [100, 250, 500], used instead of mapSteps; [] goes back to equal classes." },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkAMX23CSNcjs = require('./chunk-AMX23CSN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3SLBXKAWcjs = require('./chunk-3SLBXKAW.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
|
|
@@ -46,7 +46,7 @@ async function runToolScript(source, script, options = {}) {
|
|
|
46
46
|
if (step.say) {
|
|
47
47
|
emit({ type: "say", step: i, text: step.say });
|
|
48
48
|
_optionalChain([options, 'access', _6 => _6.playback, 'optionalAccess', _7 => _7.say, 'call', _8 => _8(step.say, options.actor ? { actor: options.actor } : {})]);
|
|
49
|
-
await pause(
|
|
49
|
+
await pause(_chunk3SLBXKAWcjs.readingTime.call(void 0, step.say));
|
|
50
50
|
}
|
|
51
51
|
if (!step.tool) continue;
|
|
52
52
|
if (control.stopped) return finish(false);
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
CHART_OOXML_NS,
|
|
12
12
|
CHART_OOXML_RELATIONSHIP,
|
|
13
13
|
chartToOoxml
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-L6Y7TSQ4.js";
|
|
15
15
|
import {
|
|
16
16
|
normalizeChartSpec
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6ZZKRH7R.js";
|
|
18
18
|
|
|
19
19
|
// src/export/images.ts
|
|
20
20
|
var DOCX_IMAGE_TYPES = {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
chartTreeTotal,
|
|
13
13
|
chartVariesColors,
|
|
14
14
|
shadeChartColor
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6ZZKRH7R.js";
|
|
16
16
|
import {
|
|
17
17
|
NumberFormat
|
|
18
18
|
} from "./chunk-II2WIF5Z.js";
|
|
@@ -1678,6 +1678,185 @@ function trendlineLegendItems(spec, color) {
|
|
|
1678
1678
|
);
|
|
1679
1679
|
}
|
|
1680
1680
|
|
|
1681
|
+
// src/chart/layout-streamgraph.ts
|
|
1682
|
+
function layoutStreamgraph(ctx, area, visible) {
|
|
1683
|
+
const { spec, theme, marks, selection } = ctx;
|
|
1684
|
+
const n = spec.categories.length;
|
|
1685
|
+
if (!visible.length || n === 0) {
|
|
1686
|
+
const plot2 = { x: area.x + 8, y: area.y + 8, width: Math.max(1, area.width - 16), height: Math.max(1, area.height - 16) };
|
|
1687
|
+
marks.push({
|
|
1688
|
+
kind: "text",
|
|
1689
|
+
key: "empty",
|
|
1690
|
+
role: "empty",
|
|
1691
|
+
x: plot2.x + plot2.width / 2,
|
|
1692
|
+
y: plot2.y + plot2.height / 2,
|
|
1693
|
+
text: ctx.options.emptyMessage ?? "No data",
|
|
1694
|
+
anchor: "middle",
|
|
1695
|
+
baseline: "middle",
|
|
1696
|
+
size: ctx.fs + 1,
|
|
1697
|
+
fill: theme.mutedText
|
|
1698
|
+
});
|
|
1699
|
+
return { plot: plot2 };
|
|
1700
|
+
}
|
|
1701
|
+
const totals = new Array(n).fill(0);
|
|
1702
|
+
for (let i = 0; i < n; i++) {
|
|
1703
|
+
let colSum = 0;
|
|
1704
|
+
for (const s of visible) {
|
|
1705
|
+
const v = s.values[i];
|
|
1706
|
+
if (v !== null && Number.isFinite(v) && v > 0) {
|
|
1707
|
+
colSum += v;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
totals[i] = colSum;
|
|
1711
|
+
}
|
|
1712
|
+
const maxTotal = Math.max(0, ...totals);
|
|
1713
|
+
const halfTotal = maxTotal > 0 ? maxTotal / 2 : 1;
|
|
1714
|
+
const headroom = spec.yAxis.max === null;
|
|
1715
|
+
const maxHalf = headroom ? halfTotal * 1.15 : halfTotal;
|
|
1716
|
+
const lo = -maxHalf;
|
|
1717
|
+
const hi = maxHalf;
|
|
1718
|
+
const frame = categoryFrame(ctx, area, {
|
|
1719
|
+
labels: spec.categories,
|
|
1720
|
+
horizontal: spec.orientation === "horizontal",
|
|
1721
|
+
primary: {
|
|
1722
|
+
lo,
|
|
1723
|
+
hi,
|
|
1724
|
+
axis: spec.yAxis,
|
|
1725
|
+
format: spec.yAxis.format,
|
|
1726
|
+
frozen: ctx.options.valueDomain,
|
|
1727
|
+
key: "y"
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
const { plot, catCenter, map, value } = frame;
|
|
1731
|
+
const curve = spec.curve === "step" ? "linear" : spec.curve;
|
|
1732
|
+
const baselines = totals.map((t) => -0.5 * t);
|
|
1733
|
+
const currentOffsets = [...baselines];
|
|
1734
|
+
const zeroPx = value.px(0);
|
|
1735
|
+
const [zx1, zy1] = map({ c: frame.catStart, v: zeroPx });
|
|
1736
|
+
const [zx2, zy2] = map({ c: frame.catStart + frame.catLen, v: zeroPx });
|
|
1737
|
+
marks.push({
|
|
1738
|
+
kind: "line",
|
|
1739
|
+
key: "rule-zero",
|
|
1740
|
+
role: "grid",
|
|
1741
|
+
x1: zx1,
|
|
1742
|
+
y1: zy1,
|
|
1743
|
+
x2: zx2,
|
|
1744
|
+
y2: zy2,
|
|
1745
|
+
stroke: theme.axis,
|
|
1746
|
+
strokeWidth: 1,
|
|
1747
|
+
dash: "3,3"
|
|
1748
|
+
});
|
|
1749
|
+
const layers = [];
|
|
1750
|
+
for (let sIdx = 0; sIdx < visible.length; sIdx++) {
|
|
1751
|
+
const s = visible[sIdx];
|
|
1752
|
+
const color = chartSeriesColor(spec, spec.series.indexOf(s));
|
|
1753
|
+
const selSeries = ctx.seriesSelected(s.id);
|
|
1754
|
+
const bottomPts = [];
|
|
1755
|
+
const topPts = [];
|
|
1756
|
+
for (let i = 0; i < n; i++) {
|
|
1757
|
+
const c = catCenter(i);
|
|
1758
|
+
const rawVal = s.values[i];
|
|
1759
|
+
const val = rawVal !== null && Number.isFinite(rawVal) && rawVal > 0 ? rawVal : 0;
|
|
1760
|
+
const bVal = currentOffsets[i];
|
|
1761
|
+
const tVal = bVal + val;
|
|
1762
|
+
currentOffsets[i] = tVal;
|
|
1763
|
+
bottomPts.push({ c, v: value.px(bVal), i });
|
|
1764
|
+
topPts.push({ c, v: value.px(tVal), i });
|
|
1765
|
+
}
|
|
1766
|
+
layers.push({ series: s, color, selSeries, bottomPts, topPts });
|
|
1767
|
+
}
|
|
1768
|
+
for (const layer of layers) {
|
|
1769
|
+
const { series: s, color, selSeries, bottomPts, topPts } = layer;
|
|
1770
|
+
const seriesTarget = { kind: "series", seriesId: s.id };
|
|
1771
|
+
const revBottom = [...bottomPts].reverse();
|
|
1772
|
+
const d = `${curvePath(topPts, curve, map)}${curvePath(revBottom, curve, map, false)}Z`;
|
|
1773
|
+
marks.push({
|
|
1774
|
+
kind: "path",
|
|
1775
|
+
key: `area-${s.id}`,
|
|
1776
|
+
role: "area",
|
|
1777
|
+
d,
|
|
1778
|
+
fill: color,
|
|
1779
|
+
opacity: selSeries ? 0.85 : 0.65,
|
|
1780
|
+
target: seriesTarget,
|
|
1781
|
+
selected: selSeries
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
if (layers.length > 0) {
|
|
1785
|
+
const bottomBase = layers[0].bottomPts;
|
|
1786
|
+
marks.push({
|
|
1787
|
+
kind: "path",
|
|
1788
|
+
key: `boundary-bottom`,
|
|
1789
|
+
role: "line",
|
|
1790
|
+
d: curvePath(bottomBase, curve, map),
|
|
1791
|
+
fill: "none",
|
|
1792
|
+
stroke: theme.axis,
|
|
1793
|
+
strokeWidth: 1.5,
|
|
1794
|
+
opacity: 0.7
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
for (const layer of layers) {
|
|
1798
|
+
const { series: s, color, selSeries, topPts } = layer;
|
|
1799
|
+
const seriesTarget = { kind: "series", seriesId: s.id };
|
|
1800
|
+
marks.push({
|
|
1801
|
+
kind: "path",
|
|
1802
|
+
key: `line-${s.id}`,
|
|
1803
|
+
role: "line",
|
|
1804
|
+
d: curvePath(topPts, curve, map),
|
|
1805
|
+
fill: "none",
|
|
1806
|
+
stroke: color,
|
|
1807
|
+
strokeWidth: selSeries ? 3 : 1.75,
|
|
1808
|
+
target: seriesTarget,
|
|
1809
|
+
selected: selSeries
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
const showDots = spec.points;
|
|
1813
|
+
for (const layer of layers) {
|
|
1814
|
+
const { series: s, color } = layer;
|
|
1815
|
+
for (let i = 0; i < n; i++) {
|
|
1816
|
+
const rawVal = s.values[i];
|
|
1817
|
+
if (rawVal === null || !Number.isFinite(rawVal)) continue;
|
|
1818
|
+
const bPt = layer.bottomPts[i];
|
|
1819
|
+
const tPt = layer.topPts[i];
|
|
1820
|
+
const midV = (bPt.v + tPt.v) / 2;
|
|
1821
|
+
const [cx, cy] = map({ c: bPt.c, v: midV });
|
|
1822
|
+
const target = { kind: "point", seriesId: s.id, index: i };
|
|
1823
|
+
const selected = ctx.isSelected(target);
|
|
1824
|
+
if (showDots || selected) {
|
|
1825
|
+
marks.push({
|
|
1826
|
+
kind: "circle",
|
|
1827
|
+
key: `pt-${s.id}-${i}`,
|
|
1828
|
+
role: "point",
|
|
1829
|
+
cx: r2(cx),
|
|
1830
|
+
cy: r2(cy),
|
|
1831
|
+
r: selected ? 5 : 3.5,
|
|
1832
|
+
fill: selected ? theme.selection : color,
|
|
1833
|
+
stroke: theme.surface,
|
|
1834
|
+
strokeWidth: 1.5,
|
|
1835
|
+
target,
|
|
1836
|
+
selected
|
|
1837
|
+
});
|
|
1838
|
+
} else {
|
|
1839
|
+
marks.push({
|
|
1840
|
+
kind: "circle",
|
|
1841
|
+
key: `hit-${s.id}-${i}`,
|
|
1842
|
+
role: "point",
|
|
1843
|
+
cx: r2(cx),
|
|
1844
|
+
cy: r2(cy),
|
|
1845
|
+
r: 6,
|
|
1846
|
+
fill: "transparent",
|
|
1847
|
+
stroke: "none",
|
|
1848
|
+
target
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
return {
|
|
1854
|
+
plot,
|
|
1855
|
+
valueScale: toValueScale(value, frame.horizontal ? "x" : "y"),
|
|
1856
|
+
categoryScale: { axis: frame.horizontal ? "y" : "x", start: frame.catStart, length: frame.catLen, count: frame.n, reverse: !!spec.xAxis.reverse }
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1681
1860
|
// src/chart/maps.ts
|
|
1682
1861
|
var maps = /* @__PURE__ */ new Map();
|
|
1683
1862
|
function registerChartMap(map) {
|
|
@@ -2777,6 +2956,8 @@ function layoutChart(spec, options) {
|
|
|
2777
2956
|
}
|
|
2778
2957
|
case "barrace":
|
|
2779
2958
|
return finish(layoutBarRace(ctx, area, options.raceFrame));
|
|
2959
|
+
case "streamgraph":
|
|
2960
|
+
return finish(layoutStreamgraph(ctx, area, visible));
|
|
2780
2961
|
case "sankey":
|
|
2781
2962
|
if (!spec.links.length) {
|
|
2782
2963
|
ctx.warn("type-fallback", "A Sankey diagram needs flows (set_chart_links); it is drawn as a bar chart until then.");
|
|
@@ -2994,6 +3175,7 @@ export {
|
|
|
2994
3175
|
MAX_CHART_DATA_LABELS,
|
|
2995
3176
|
MAX_CHART_LINE_POINTS,
|
|
2996
3177
|
MAX_CHART_MARKERS,
|
|
3178
|
+
layoutStreamgraph,
|
|
2997
3179
|
registerChartMap,
|
|
2998
3180
|
getChartMap,
|
|
2999
3181
|
listChartMaps,
|
|
@@ -426,7 +426,7 @@ function removeChartTreeRow(rows, row) {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
// src/chart/spec.ts
|
|
429
|
-
var CHART_TYPES = ["bar", "line", "area", "scatter", "bubble", "pie", "donut", "radar", "waterfall", "histogram", "box", "funnel", "treemap", "sunburst", "sankey", "slope", "likert", "parliament", "barrace", "choropleth"];
|
|
429
|
+
var CHART_TYPES = ["bar", "line", "area", "scatter", "bubble", "pie", "donut", "radar", "waterfall", "histogram", "box", "funnel", "treemap", "sunburst", "sankey", "streamgraph", "slope", "likert", "parliament", "barrace", "choropleth"];
|
|
430
430
|
var CHART_MARKERS = ["circle", "square", "diamond", "triangle", "cross", "none"];
|
|
431
431
|
var CHART_TRENDLINE_TYPES = ["linear", "exponential", "logarithmic", "power", "polynomial", "moving-average"];
|
|
432
432
|
var CHART_LABEL_POSITIONS = ["auto", "inside", "outside", "center"];
|
|
@@ -462,6 +462,7 @@ var CHART_TYPE_LABELS = {
|
|
|
462
462
|
parliament: "Parliament",
|
|
463
463
|
sunburst: "Sunburst",
|
|
464
464
|
sankey: "Sankey",
|
|
465
|
+
streamgraph: "Streamgraph",
|
|
465
466
|
barrace: "Bar race",
|
|
466
467
|
choropleth: "Map"
|
|
467
468
|
};
|
|
@@ -515,6 +516,7 @@ function chartFamily(spec) {
|
|
|
515
516
|
case "parliament":
|
|
516
517
|
case "sunburst":
|
|
517
518
|
case "sankey":
|
|
519
|
+
case "streamgraph":
|
|
518
520
|
case "barrace":
|
|
519
521
|
case "choropleth":
|
|
520
522
|
return spec.type;
|
package/dist/commands/index.cjs
CHANGED
|
@@ -29,12 +29,12 @@ var _chunkGLQQ2VILcjs = require('../chunk-GLQQ2VIL.cjs');
|
|
|
29
29
|
var _chunk4EFNS2HVcjs = require('../chunk-4EFNS2HV.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk3SLBXKAWcjs = require('../chunk-3SLBXKAW.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkVCL7CB56cjs = require('../chunk-VCL7CB56.cjs');
|
|
37
|
-
require('../chunk-
|
|
37
|
+
require('../chunk-K7ENM55P.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
@@ -612,7 +612,7 @@ function createCommandToolProvider(registry, options = {}) {
|
|
|
612
612
|
const surface = _nullishCoalesce(_nullishCoalesce(spec.playbackSurface, () => ( spec.scope)), () => ( (id.includes(".") ? id.slice(0, id.indexOf(".")) : void 0)));
|
|
613
613
|
const planned = _optionalChain([spec, 'access', _24 => _24.plan, 'optionalCall', _25 => _25(context(), _nullishCoalesce(params, () => ( {})))]);
|
|
614
614
|
const own = !planned ? [] : Array.isArray(planned) ? planned : planned.steps;
|
|
615
|
-
const steps = own.length ? own :
|
|
615
|
+
const steps = own.length ? own : _chunk3SLBXKAWcjs.derivePlaybackSteps.call(void 0, params);
|
|
616
616
|
return {
|
|
617
617
|
steps,
|
|
618
618
|
...surface ? { surface } : {},
|
package/dist/commands/index.js
CHANGED
|
@@ -29,12 +29,12 @@ import {
|
|
|
29
29
|
} from "../chunk-7KZ2HKKC.js";
|
|
30
30
|
import {
|
|
31
31
|
derivePlaybackSteps
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-EHTX34RE.js";
|
|
33
33
|
import {
|
|
34
34
|
createFormatCommands,
|
|
35
35
|
formatCommandsFor
|
|
36
36
|
} from "../chunk-NZ3CTY7K.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-IVSWRVB4.js";
|
|
38
38
|
import {
|
|
39
39
|
validateJsonSchema
|
|
40
40
|
} from "../chunk-V2ZCJRDM.js";
|