@pixerate/editor 0.156.0 → 0.157.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 +34 -34
- package/dist/agent/index.js +5 -5
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.js +2 -2
- package/dist/chart/index.cjs +90 -88
- package/dist/chart/index.js +9 -7
- package/dist/chart/spec.d.cts +2 -1
- package/dist/chart/spec.d.ts +2 -1
- package/dist/chart/types.d.cts +5 -0
- package/dist/chart/types.d.ts +5 -0
- package/dist/{chunk-2WDZI6QD.cjs → chunk-4T44CJ5K.cjs} +15 -15
- package/dist/{chunk-XTU6QO2W.cjs → chunk-4YWAEV4W.cjs} +36 -27
- package/dist/{chunk-4YQKRHMI.cjs → chunk-57JLBGJ5.cjs} +8 -8
- package/dist/{chunk-SVINJIGK.js → chunk-5QBRAIVK.js} +3 -3
- package/dist/{chunk-R3PECGTQ.cjs → chunk-6LUYFHHN.cjs} +51 -51
- package/dist/{chunk-ML2II3Y3.cjs → chunk-AKDWAWSY.cjs} +58 -46
- package/dist/{chunk-EQ4SF4X4.js → chunk-DBIVICAO.js} +1 -1
- package/dist/{chunk-SUVZJ2CP.js → chunk-H5XX4KHB.js} +11 -1
- package/dist/{chunk-37RLSNQ3.js → chunk-Q6PA362P.js} +2 -2
- package/dist/{chunk-DSZCDNTM.js → chunk-R3QY7PPL.js} +11 -2
- package/dist/{chunk-4RF2H3N3.js → chunk-SSCL7QQ4.js} +15 -3
- package/dist/{chunk-TLMRGLQQ.cjs → chunk-TVO6W2Q6.cjs} +20 -17
- package/dist/{chunk-EIUTJPEL.js → chunk-UM3RPYC5.js} +5 -2
- package/dist/{chunk-I4AHLP7F.cjs → chunk-WPPJH6X4.cjs} +12 -2
- package/dist/{chunk-RZJCYJWO.cjs → chunk-XNQ5EFB4.cjs} +16 -16
- package/dist/{chunk-R6HNWN7B.js → chunk-YABNLNY7.js} +3 -3
- 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/index.cjs +13 -13
- package/dist/index.js +7 -7
- package/package.json +1 -1
- package/skills/pixerate-chart/SKILL.md +4 -1
package/dist/agent/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkTVO6W2Q6cjs = require('../chunk-TVO6W2Q6.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkGLQQ2VILcjs = require('../chunk-GLQQ2VIL.cjs');
|
|
@@ -115,15 +115,15 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
var
|
|
118
|
+
var _chunkXNQ5EFB4cjs = require('../chunk-XNQ5EFB4.cjs');
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
var
|
|
122
|
-
require('../chunk-
|
|
121
|
+
var _chunkAKDWAWSYcjs = require('../chunk-AKDWAWSY.cjs');
|
|
122
|
+
require('../chunk-4YWAEV4W.cjs');
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
var
|
|
126
|
+
var _chunkWPPJH6X4cjs = require('../chunk-WPPJH6X4.cjs');
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
@@ -623,14 +623,14 @@ var SIZE_WIDTH = {
|
|
|
623
623
|
};
|
|
624
624
|
var SIZE_HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 320)." };
|
|
625
625
|
var SPEC_PROPERTIES = {
|
|
626
|
-
...
|
|
626
|
+
..._chunkTVO6W2Q6cjs.CHART_UPDATE_PROPERTIES,
|
|
627
627
|
categories: { type: "array", items: { type: "string" }, description: "Category labels in order (x axis labels, or pie slices)." },
|
|
628
628
|
series: {
|
|
629
629
|
type: "array",
|
|
630
630
|
description: "The series, each with one value per category (padded with gaps).",
|
|
631
631
|
items: {
|
|
632
632
|
type: "object",
|
|
633
|
-
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ...
|
|
633
|
+
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkTVO6W2Q6cjs.SERIES_PROPS },
|
|
634
634
|
required: ["name", "values"],
|
|
635
635
|
additionalProperties: false
|
|
636
636
|
}
|
|
@@ -641,7 +641,7 @@ function cleanSeries(series) {
|
|
|
641
641
|
return series.map((s) => s && typeof s === "object" ? Object.fromEntries(Object.entries(s).filter(([, v]) => v !== null)) : s);
|
|
642
642
|
}
|
|
643
643
|
function checkedSpec(input) {
|
|
644
|
-
const { spec, issues } =
|
|
644
|
+
const { spec, issues } = _chunkWPPJH6X4cjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
|
|
645
645
|
if (issues.length) throw new Error(`The chart was not changed: ${issues.map((i) => i.message).join(" ")}`);
|
|
646
646
|
return spec;
|
|
647
647
|
}
|
|
@@ -656,14 +656,14 @@ function describe(chart, includeSpec) {
|
|
|
656
656
|
series: spec.series.map((s) => ({ id: s.id, name: s.name })),
|
|
657
657
|
width: _nullishCoalesce(node.attrs.width, () => ( null)),
|
|
658
658
|
height: node.attrs.height,
|
|
659
|
-
description:
|
|
659
|
+
description: _chunkAKDWAWSYcjs.describeChart.call(void 0, spec),
|
|
660
660
|
...includeSpec ? { spec } : {}
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
function sparklines(doc) {
|
|
664
664
|
const found = [];
|
|
665
665
|
doc.descendants((node, pos) => {
|
|
666
|
-
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label:
|
|
666
|
+
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkXNQ5EFB4cjs.sparklineLabel.call(void 0, node) });
|
|
667
667
|
});
|
|
668
668
|
return found;
|
|
669
669
|
}
|
|
@@ -674,7 +674,7 @@ function checkPosition(editor, at) {
|
|
|
674
674
|
function createDocumentChartTools(editor) {
|
|
675
675
|
const chartType = () => editor().schema.nodes.chart;
|
|
676
676
|
const findChart = (args) => {
|
|
677
|
-
const charts =
|
|
677
|
+
const charts = _chunkXNQ5EFB4cjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
678
678
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
679
679
|
if (args.chartId !== void 0) {
|
|
680
680
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -701,7 +701,7 @@ function createDocumentChartTools(editor) {
|
|
|
701
701
|
annotations: { title: "List charts in the document", ...READ },
|
|
702
702
|
handler: ({ includeSpec = false }) => {
|
|
703
703
|
const doc = editor().state.doc;
|
|
704
|
-
return { charts:
|
|
704
|
+
return { charts: _chunkXNQ5EFB4cjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
const insertChart = {
|
|
@@ -728,7 +728,7 @@ function createDocumentChartTools(editor) {
|
|
|
728
728
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
729
729
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
730
730
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
731
|
-
const chart =
|
|
731
|
+
const chart = _chunkXNQ5EFB4cjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
732
732
|
if (!ok || !chart) throw new Error(`A chart cannot go at ${_nullishCoalesce(at, () => ( ed.state.selection.from))}; pass a position between blocks or inside a paragraph.`);
|
|
733
733
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
734
734
|
}
|
|
@@ -775,8 +775,8 @@ function createDocumentChartTools(editor) {
|
|
|
775
775
|
inputSchema: {
|
|
776
776
|
type: "object",
|
|
777
777
|
properties: {
|
|
778
|
-
values: { type: "array", items:
|
|
779
|
-
kind: { type: "string", enum: [...
|
|
778
|
+
values: { type: "array", items: _chunkTVO6W2Q6cjs.VALUE, minItems: 1, maxItems: _chunkXNQ5EFB4cjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
779
|
+
kind: { type: "string", enum: [..._chunkXNQ5EFB4cjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
780
780
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
781
781
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
782
782
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -790,12 +790,12 @@ function createDocumentChartTools(editor) {
|
|
|
790
790
|
handler: ({ values, kind = "line", at, width = 80, height = 18, color = null, label = null }) => {
|
|
791
791
|
const ed = editor();
|
|
792
792
|
checkPosition(ed, at);
|
|
793
|
-
const parsed = values.map((v) =>
|
|
793
|
+
const parsed = values.map((v) => _chunkWPPJH6X4cjs.parseChartValue.call(void 0, v));
|
|
794
794
|
const bad = parsed.findIndex((v) => v === void 0);
|
|
795
795
|
if (bad >= 0) throw new Error(`values[${bad}] ("${String(values[bad])}") is not a number; pass numbers, numeric text or null. Nothing was inserted.`);
|
|
796
796
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
797
797
|
if (!ed.state.doc.resolve(pos).parent.inlineContent) throw new Error(`Position ${pos} is between blocks; a sparkline goes inside a paragraph (use a position from get_text {blocks: true}).`);
|
|
798
|
-
const stored =
|
|
798
|
+
const stored = _chunkXNQ5EFB4cjs.normalizeSparklineValues.call(void 0, parsed);
|
|
799
799
|
ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).insertContentAt(pos, { type: "sparkline", attrs: { values: stored, kind, width, height, color, label } }).run();
|
|
800
800
|
return { pos, kind, values: stored };
|
|
801
801
|
}
|
|
@@ -1133,8 +1133,8 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1133
1133
|
const config = option === false ? null : option === true || option === void 0 ? {} : option;
|
|
1134
1134
|
const caret = {
|
|
1135
1135
|
id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
|
|
1136
|
-
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => (
|
|
1137
|
-
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => (
|
|
1136
|
+
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkXNQ5EFB4cjs.DEFAULT_AGENT_CARET_NAME)),
|
|
1137
|
+
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkXNQ5EFB4cjs.DEFAULT_AGENT_CARET_COLOR))
|
|
1138
1138
|
};
|
|
1139
1139
|
const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
|
|
1140
1140
|
const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
|
|
@@ -1147,19 +1147,19 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1147
1147
|
};
|
|
1148
1148
|
const touch = () => {
|
|
1149
1149
|
clearTimeout(idleTimer);
|
|
1150
|
-
if (idleMs > 0) idleTimer = setTimeout(() => live() &&
|
|
1150
|
+
if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkXNQ5EFB4cjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
|
|
1151
1151
|
};
|
|
1152
1152
|
const tint = (ed, ranges) => {
|
|
1153
1153
|
clearTimeout(tintTimer);
|
|
1154
|
-
|
|
1155
|
-
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() &&
|
|
1154
|
+
_chunkXNQ5EFB4cjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
|
|
1155
|
+
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkXNQ5EFB4cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1156
1156
|
};
|
|
1157
1157
|
return {
|
|
1158
1158
|
/** Puts the caret at `head`, selecting from `anchor`. */
|
|
1159
1159
|
show(anchor, head = anchor) {
|
|
1160
1160
|
const ed = live();
|
|
1161
1161
|
if (!ed) return;
|
|
1162
|
-
|
|
1162
|
+
_chunkXNQ5EFB4cjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
|
|
1163
1163
|
touch();
|
|
1164
1164
|
},
|
|
1165
1165
|
/** Shows the caret after ranges just changed by a tool, tinting them. */
|
|
@@ -1167,7 +1167,7 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1167
1167
|
const ed = live();
|
|
1168
1168
|
if (!ed || !ranges.length) return;
|
|
1169
1169
|
const last = ranges[ranges.length - 1];
|
|
1170
|
-
|
|
1170
|
+
_chunkXNQ5EFB4cjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
|
|
1171
1171
|
tint(ed, ranges);
|
|
1172
1172
|
touch();
|
|
1173
1173
|
},
|
|
@@ -1175,12 +1175,12 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1175
1175
|
async write(ed, from, to, text, signal) {
|
|
1176
1176
|
if (live() && typing) {
|
|
1177
1177
|
clearTimeout(tintTimer);
|
|
1178
|
-
const range2 = await
|
|
1179
|
-
if (changedMs > 0) tintTimer = setTimeout(() => live() &&
|
|
1178
|
+
const range2 = await _chunkXNQ5EFB4cjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
|
|
1179
|
+
if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkXNQ5EFB4cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1180
1180
|
touch();
|
|
1181
1181
|
return range2;
|
|
1182
1182
|
}
|
|
1183
|
-
const tr = _history.closeHistory.call(void 0,
|
|
1183
|
+
const tr = _history.closeHistory.call(void 0, _chunkXNQ5EFB4cjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
|
|
1184
1184
|
const end = tr.mapping.map(to, 1);
|
|
1185
1185
|
const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
|
|
1186
1186
|
ed.view.dispatch(tr.scrollIntoView());
|
|
@@ -1209,7 +1209,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
1209
1209
|
wholeWord: !!args.wholeWord,
|
|
1210
1210
|
...args.regex ? { regex: true } : { literal: true }
|
|
1211
1211
|
};
|
|
1212
|
-
const result =
|
|
1212
|
+
const result = _chunkXNQ5EFB4cjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
1213
1213
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
1214
1214
|
return { matches: result.matches, truncated: result.truncated };
|
|
1215
1215
|
}
|
|
@@ -1371,7 +1371,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1371
1371
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
1372
1372
|
}));
|
|
1373
1373
|
const tr = _history.closeHistory.call(void 0, ed.state.tr);
|
|
1374
|
-
const ends =
|
|
1374
|
+
const ends = _chunkXNQ5EFB4cjs.applyReplacements.call(void 0, tr, chosen);
|
|
1375
1375
|
ed.view.dispatch(tr.scrollIntoView());
|
|
1376
1376
|
const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
|
|
1377
1377
|
presence.changed(ranges.filter((r) => r.from < r.to));
|
|
@@ -1472,7 +1472,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1472
1472
|
inputSchema: {
|
|
1473
1473
|
type: "object",
|
|
1474
1474
|
properties: {
|
|
1475
|
-
operation: { type: "string", enum:
|
|
1475
|
+
operation: { type: "string", enum: _chunkXNQ5EFB4cjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
1476
1476
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
1477
1477
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
1478
1478
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -1502,10 +1502,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
1502
1502
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
1503
1503
|
}
|
|
1504
1504
|
const action = operation;
|
|
1505
|
-
const state =
|
|
1505
|
+
const state = _chunkXNQ5EFB4cjs.getTableActionState.call(void 0, ed, action, params);
|
|
1506
1506
|
if (state !== true) throw new Error(state);
|
|
1507
|
-
|
|
1508
|
-
const table =
|
|
1507
|
+
_chunkXNQ5EFB4cjs.runTableAction.call(void 0, ed, action, params);
|
|
1508
|
+
const table = _chunkXNQ5EFB4cjs.getTableState.call(void 0, ed);
|
|
1509
1509
|
return {
|
|
1510
1510
|
operation,
|
|
1511
1511
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -1524,7 +1524,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1524
1524
|
if (!ed || ed.isDestroyed) return [];
|
|
1525
1525
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
1526
1526
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
|
|
1527
|
-
return [...tools, ...
|
|
1527
|
+
return [...tools, ..._chunkXNQ5EFB4cjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
|
|
1528
1528
|
},
|
|
1529
1529
|
subscribe: (notify) => {
|
|
1530
1530
|
const ed = editor();
|
package/dist/agent/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CHART_UPDATE_PROPERTIES,
|
|
3
3
|
SERIES_PROPS,
|
|
4
4
|
VALUE
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-UM3RPYC5.js";
|
|
6
6
|
import {
|
|
7
7
|
hasVariantCommands
|
|
8
8
|
} from "../chunk-3TNA7JKI.js";
|
|
@@ -115,15 +115,15 @@ import {
|
|
|
115
115
|
setAgentCaret,
|
|
116
116
|
sparklineLabel,
|
|
117
117
|
typeAgentText
|
|
118
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-5QBRAIVK.js";
|
|
119
119
|
import {
|
|
120
120
|
describeChart
|
|
121
|
-
} from "../chunk-
|
|
122
|
-
import "../chunk-
|
|
121
|
+
} from "../chunk-SSCL7QQ4.js";
|
|
122
|
+
import "../chunk-R3QY7PPL.js";
|
|
123
123
|
import {
|
|
124
124
|
normalizeChartSpec,
|
|
125
125
|
parseChartValue
|
|
126
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-H5XX4KHB.js";
|
|
127
127
|
import {
|
|
128
128
|
getEditorMarkdown,
|
|
129
129
|
getEditorText
|
package/dist/canvas/index.cjs
CHANGED
|
@@ -113,10 +113,10 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
|
|
|
113
113
|
var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
114
114
|
|
|
115
115
|
|
|
116
|
-
var
|
|
116
|
+
var _chunk4YWAEV4Wcjs = require('../chunk-4YWAEV4W.cjs');
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
var
|
|
119
|
+
var _chunkWPPJH6X4cjs = require('../chunk-WPPJH6X4.cjs');
|
|
120
120
|
require('../chunk-55AKPTLM.cjs');
|
|
121
121
|
|
|
122
122
|
|
|
@@ -8870,7 +8870,7 @@ function xyChartSpec(graph, palette) {
|
|
|
8870
8870
|
);
|
|
8871
8871
|
}
|
|
8872
8872
|
const bars = graph.nodes.some((n3) => n3.shape === "bar");
|
|
8873
|
-
return
|
|
8873
|
+
return _chunkWPPJH6X4cjs.createChartSpec.call(void 0, {
|
|
8874
8874
|
type: bars ? "bar" : "line",
|
|
8875
8875
|
title: _nullishCoalesce(graph.title, () => ( "")),
|
|
8876
8876
|
categories,
|
|
@@ -8884,7 +8884,7 @@ function xyChartSpec(graph, palette) {
|
|
|
8884
8884
|
}
|
|
8885
8885
|
function radarChartSpec(graph, palette) {
|
|
8886
8886
|
const data = _nullishCoalesce(graph.data, () => ( {}));
|
|
8887
|
-
return
|
|
8887
|
+
return _chunkWPPJH6X4cjs.createChartSpec.call(void 0, {
|
|
8888
8888
|
type: "radar",
|
|
8889
8889
|
title: _nullishCoalesce(graph.title, () => ( "")),
|
|
8890
8890
|
categories: Array.isArray(data.axes) ? data.axes.map(String) : [],
|
|
@@ -8932,12 +8932,12 @@ function translatePath(d, dx, dy) {
|
|
|
8932
8932
|
}
|
|
8933
8933
|
var xyChartScene = ({ graph, theme }) => {
|
|
8934
8934
|
const box = _chunkZVNAMTFOcjs.XY_CHART_BOX;
|
|
8935
|
-
const scene =
|
|
8935
|
+
const scene = _chunk4YWAEV4Wcjs.layoutChart.call(void 0, xyChartSpec(graph, theme.palette), { width: box.width, height: box.height, theme: chartTheme(theme) });
|
|
8936
8936
|
return toDiagramMarks(scene.marks, box.x, box.y);
|
|
8937
8937
|
};
|
|
8938
8938
|
var radarScene = ({ graph, theme }) => {
|
|
8939
8939
|
const box = _chunkZVNAMTFOcjs.RADAR_CHART_BOX;
|
|
8940
|
-
const scene =
|
|
8940
|
+
const scene = _chunk4YWAEV4Wcjs.layoutChart.call(void 0, radarChartSpec(graph, theme.palette), { width: box.width, height: box.height, theme: chartTheme(theme) });
|
|
8941
8941
|
return toDiagramMarks(scene.marks, box.x, box.y);
|
|
8942
8942
|
};
|
|
8943
8943
|
|
package/dist/canvas/index.js
CHANGED
|
@@ -113,10 +113,10 @@ import {
|
|
|
113
113
|
} from "../chunk-5ED73EC6.js";
|
|
114
114
|
import {
|
|
115
115
|
layoutChart
|
|
116
|
-
} from "../chunk-
|
|
116
|
+
} from "../chunk-R3QY7PPL.js";
|
|
117
117
|
import {
|
|
118
118
|
createChartSpec
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-H5XX4KHB.js";
|
|
120
120
|
import "../chunk-II2WIF5Z.js";
|
|
121
121
|
import {
|
|
122
122
|
PathOpsError,
|