@pixerate/editor 0.51.0 → 0.53.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 +23 -23
- package/dist/agent/index.js +4 -4
- package/dist/chart/index.cjs +475 -124
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +174 -25
- package/dist/chart/index.d.ts +174 -25
- package/dist/chart/index.js +375 -24
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-GJBIVWB2.js → chunk-3S72F46R.js} +387 -9
- 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-MR2764X2.js → chunk-AGGUNWT6.js} +2 -322
- package/dist/chunk-AGGUNWT6.js.map +1 -0
- package/dist/{chunk-T6XU4B54.js → chunk-BQQZ6MOI.js} +7 -7
- package/dist/{chunk-LNKZPIQD.cjs → chunk-C3JHII3M.cjs} +67 -67
- package/dist/{chunk-LNKZPIQD.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-GTZXF4BI.cjs → chunk-NK3WL5TJ.cjs} +298 -133
- package/dist/chunk-NK3WL5TJ.cjs.map +1 -0
- package/dist/{chunk-3JNRQVTS.cjs → chunk-NN3JGUSX.cjs} +402 -24
- package/dist/chunk-NN3JGUSX.cjs.map +1 -0
- package/dist/{chunk-3CC7OPUQ.cjs → chunk-O6FO6VI3.cjs} +3 -323
- package/dist/chunk-O6FO6VI3.cjs.map +1 -0
- package/dist/{chunk-DQPBQXKG.js → chunk-OIKYP7XC.js} +8 -8
- 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-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-2Q46FKZK.cjs → chunk-YZZMX6V7.cjs} +25 -25
- package/dist/{chunk-2Q46FKZK.cjs.map → chunk-YZZMX6V7.cjs.map} +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/export/index.cjs +5 -5
- package/dist/export/index.js +4 -4
- package/dist/extensions/index.cjs +7 -7
- package/dist/extensions/index.d.cts +2 -2
- package/dist/extensions/index.d.ts +2 -2
- package/dist/extensions/index.js +6 -6
- 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 +15 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -113
- package/dist/index.d.ts +6 -113
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/zip-4nG0YAH7.d.cts +110 -0
- package/dist/zip-4nG0YAH7.d.ts +110 -0
- package/package.json +1 -1
- package/dist/chunk-3CC7OPUQ.cjs.map +0 -1
- package/dist/chunk-3JNRQVTS.cjs.map +0 -1
- package/dist/chunk-5TWIN7ZJ.js.map +0 -1
- package/dist/chunk-GJBIVWB2.js.map +0 -1
- package/dist/chunk-GTZXF4BI.cjs.map +0 -1
- package/dist/chunk-JOX6MJW4.cjs.map +0 -1
- package/dist/chunk-MR2764X2.js.map +0 -1
- package/dist/chunk-OV7UAKIY.js.map +0 -1
- package/dist/chunk-TGBCBQFV.cjs.map +0 -1
- package/dist/chunk-WBOAXDKD.js.map +0 -1
- /package/dist/{chunk-T6XU4B54.js.map → chunk-BQQZ6MOI.js.map} +0 -0
- /package/dist/{chunk-DQPBQXKG.js.map → chunk-OIKYP7XC.js.map} +0 -0
- /package/dist/{chunk-QFTVLEVN.js.map → chunk-RIXTW3C4.js.map} +0 -0
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkNK3WL5TJcjs = require('./chunk-NK3WL5TJ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkCKRNELPOcjs = require('./chunk-CKRNELPO.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _chunkIFHKKVXHcjs = require('./chunk-IFHKKVXH.cjs');
|
|
@@ -1204,7 +1204,7 @@ var ChartNodeView = (_class = class {
|
|
|
1204
1204
|
this.dom.contentEditable = "false";
|
|
1205
1205
|
this.syncAttributes();
|
|
1206
1206
|
this.key = specKey(this.node.attrs.spec);
|
|
1207
|
-
this.controller = new (0,
|
|
1207
|
+
this.controller = new (0, _chunkNK3WL5TJcjs.ChartController)({ spec: this.node.attrs.spec });
|
|
1208
1208
|
this.unsubscribe = this.controller.subscribe((state) => {
|
|
1209
1209
|
if (!state.gesture) this.writeBack();
|
|
1210
1210
|
});
|
|
@@ -1437,7 +1437,7 @@ function readSpec(value) {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
if (!input || typeof input !== "object" || Array.isArray(input)) return null;
|
|
1440
|
-
return
|
|
1440
|
+
return _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, input).spec;
|
|
1441
1441
|
}
|
|
1442
1442
|
var readSize = (value) => {
|
|
1443
1443
|
const n = value === null ? NaN : Number(value);
|
|
@@ -1463,10 +1463,10 @@ function staticChartSvg(node, options) {
|
|
|
1463
1463
|
const spec = node.attrs.spec;
|
|
1464
1464
|
const width = _nullishCoalesce(node.attrs.width, () => ( options.defaultWidth));
|
|
1465
1465
|
const height = _nullishCoalesce(node.attrs.height, () => ( options.defaultHeight));
|
|
1466
|
-
const scene =
|
|
1467
|
-
return
|
|
1466
|
+
const scene = _chunkNK3WL5TJcjs.layoutChart.call(void 0, spec, { width, height, theme: options.theme, selection: null });
|
|
1467
|
+
return _chunkNK3WL5TJcjs.chartSceneToDomSpec.call(void 0, scene, {
|
|
1468
1468
|
ariaLabel: spec.title || "Chart",
|
|
1469
|
-
description:
|
|
1469
|
+
description: _chunkNK3WL5TJcjs.describeChart.call(void 0, spec),
|
|
1470
1470
|
attrs: { style: "max-width: 100%; height: auto; display: block" }
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
@@ -1482,7 +1482,7 @@ var Chart = _core.Node.create({
|
|
|
1482
1482
|
return {
|
|
1483
1483
|
HTMLAttributes: {},
|
|
1484
1484
|
nodeView: null,
|
|
1485
|
-
theme:
|
|
1485
|
+
theme: _chunkCKRNELPOcjs.DEFAULT_CHART_THEME,
|
|
1486
1486
|
defaultWidth: 640,
|
|
1487
1487
|
defaultHeight: 320,
|
|
1488
1488
|
generateId: () => generateStructureId("chart")
|
|
@@ -1496,7 +1496,7 @@ var Chart = _core.Node.create({
|
|
|
1496
1496
|
renderHTML: (attributes) => attributes.id ? { "data-chart-id": attributes.id } : {}
|
|
1497
1497
|
},
|
|
1498
1498
|
spec: {
|
|
1499
|
-
default:
|
|
1499
|
+
default: _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, {}).spec,
|
|
1500
1500
|
// null (no `data-chart`) keeps what the parse rule found, e.g. a mermaid block's spec.
|
|
1501
1501
|
parseHTML: (element) => readSpec(element.getAttribute("data-chart")),
|
|
1502
1502
|
renderHTML: (attributes) => ({
|
|
@@ -1534,7 +1534,7 @@ var Chart = _core.Node.create({
|
|
|
1534
1534
|
const code = element.querySelector("code");
|
|
1535
1535
|
const language = _nullishCoalesce(_nullishCoalesce(_optionalChain([code, 'optionalAccess', _33 => _33.getAttribute, 'call', _34 => _34("class")]), () => ( element.getAttribute("data-language"))), () => ( ""));
|
|
1536
1536
|
if (!/(?:^|\s)language-mermaid(?:\s|$)/.test(language) && language !== "mermaid") return false;
|
|
1537
|
-
const result =
|
|
1537
|
+
const result = _chunkNK3WL5TJcjs.chartFromMermaid.call(void 0, _nullishCoalesce((_nullishCoalesce(code, () => ( element))).textContent, () => ( "")));
|
|
1538
1538
|
return result.family ? { spec: result.spec } : false;
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
@@ -1558,7 +1558,7 @@ var Chart = _core.Node.create({
|
|
|
1558
1558
|
return {
|
|
1559
1559
|
markdown: {
|
|
1560
1560
|
serialize(state, node) {
|
|
1561
|
-
const text =
|
|
1561
|
+
const text = _chunkNK3WL5TJcjs.chartToMermaid.call(void 0, node.attrs.spec);
|
|
1562
1562
|
const fence = "`".repeat(Math.max(3, longestBacktickRun(text) + 1));
|
|
1563
1563
|
state.write(`${fence}mermaid
|
|
1564
1564
|
`);
|
|
@@ -1580,7 +1580,7 @@ var Chart = _core.Node.create({
|
|
|
1580
1580
|
type: this.name,
|
|
1581
1581
|
attrs: {
|
|
1582
1582
|
id: _nullishCoalesce(options.id, () => ( this.options.generateId())),
|
|
1583
|
-
spec:
|
|
1583
|
+
spec: _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, _nullishCoalesce(options.spec, () => ( {}))).spec,
|
|
1584
1584
|
width: _nullishCoalesce(options.width, () => ( null)),
|
|
1585
1585
|
height: _nullishCoalesce(options.height, () => ( this.options.defaultHeight))
|
|
1586
1586
|
}
|
|
@@ -1591,7 +1591,7 @@ var Chart = _core.Node.create({
|
|
|
1591
1591
|
if (dispatch) {
|
|
1592
1592
|
tr.setNodeMarkup(chart.pos, void 0, {
|
|
1593
1593
|
...chart.node.attrs,
|
|
1594
|
-
...changes.spec !== void 0 ? { spec:
|
|
1594
|
+
...changes.spec !== void 0 ? { spec: _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, changes.spec).spec } : {},
|
|
1595
1595
|
...changes.width !== void 0 ? { width: changes.width } : {},
|
|
1596
1596
|
...changes.height !== void 0 ? { height: changes.height } : {}
|
|
1597
1597
|
});
|
|
@@ -1698,14 +1698,14 @@ var Sparkline = _core.Node.create({
|
|
|
1698
1698
|
return [{ tag: 'span[data-type="sparkline"]', priority: 60 }];
|
|
1699
1699
|
},
|
|
1700
1700
|
renderHTML({ node, HTMLAttributes }) {
|
|
1701
|
-
const scene =
|
|
1701
|
+
const scene = _chunkNK3WL5TJcjs.layoutSparkline.call(void 0, node.attrs.values, {
|
|
1702
1702
|
kind: node.attrs.kind,
|
|
1703
1703
|
width: node.attrs.width,
|
|
1704
1704
|
height: node.attrs.height,
|
|
1705
1705
|
color: _nullishCoalesce(node.attrs.color, () => ( this.options.color)),
|
|
1706
1706
|
negativeColor: this.options.negativeColor
|
|
1707
1707
|
});
|
|
1708
|
-
const svg =
|
|
1708
|
+
const svg = _chunkNK3WL5TJcjs.chartSceneToDomSpec.call(void 0, scene, {
|
|
1709
1709
|
ariaLabel: sparklineLabel(node),
|
|
1710
1710
|
attrs: { style: "display: inline-block; vertical-align: middle" }
|
|
1711
1711
|
});
|
|
@@ -2057,4 +2057,4 @@ function createTableStore(editor) {
|
|
|
2057
2057
|
|
|
2058
2058
|
|
|
2059
2059
|
exports.ALLOW_NESTED_TABLES_META = ALLOW_NESTED_TABLES_META; exports.tableNestingPluginKey = tableNestingPluginKey; exports.outermostTableDepth = outermostTableDepth; exports.isInTableCell = isInTableCell; exports.sliceContainsTable = sliceContainsTable; exports.insertSliceAfterTable = insertSliceAfterTable; exports.handleTablePasteWithoutNesting = handleTablePasteWithoutNesting; exports.unnestTables = unnestTables; exports.createTableNestingPlugin = createTableNestingPlugin; exports.generateStructureId = generateStructureId; exports.presenceStateSpec = presenceStateSpec; exports.arraysEqual = arraysEqual; exports.scrollDomAtPos = scrollDomAtPos; exports.syncInitialContent = syncInitialContent; exports.STRUCTURE_PRIORITY = STRUCTURE_PRIORITY; exports.FIND_PARAGRAPH_MARK = FIND_PARAGRAPH_MARK; exports.MAX_FIND_PATTERN_LENGTH = MAX_FIND_PATTERN_LENGTH; exports.createSearchBudget = createSearchBudget; exports.foldCodePoint = foldCodePoint; exports.compileFindPattern = compileFindPattern; exports.findAllMatches = findAllMatches; exports.parseReplacement = parseReplacement; exports.expandReplacement = expandReplacement; exports.searchDocument = searchDocument; exports.applyReplacements = applyReplacements; exports.normalizeTableCellAlignment = normalizeTableCellAlignment; exports.normalizeTableCellColor = normalizeTableCellColor; exports.isGfmTable = isGfmTable; exports.DEFAULT_TABLE_OPTIONS = DEFAULT_TABLE_OPTIONS; exports.Table = Table; exports.TableRow = TableRow; exports.TableCell = TableCell; exports.TableHeader = TableHeader; exports.createTableExtensions = createTableExtensions; exports.ChartNodeView = ChartNodeView; exports.createChartNodeView = createChartNodeView; exports.chartPluginKey = chartPluginKey; exports.getDocumentCharts = getDocumentCharts; exports.isChartEnabled = isChartEnabled; exports.staticChartSvg = staticChartSvg; exports.Chart = Chart; exports.SPARKLINE_KINDS = SPARKLINE_KINDS; exports.MAX_SPARKLINE_VALUES = MAX_SPARKLINE_VALUES; exports.normalizeSparklineValues = normalizeSparklineValues; exports.sparklineLabel = sparklineLabel; exports.Sparkline = Sparkline; exports.TABLE_ACTIONS = TABLE_ACTIONS; exports.DEFAULT_TABLE_TOOLBAR = DEFAULT_TABLE_TOOLBAR; exports.MAX_TABLE_ROWS = MAX_TABLE_ROWS; exports.MAX_TABLE_COLUMNS = MAX_TABLE_COLUMNS; exports.isTableEnabled = isTableEnabled; exports.isSelectionInTable = isSelectionInTable; exports.shouldShowTableBubbleMenu = shouldShowTableBubbleMenu; exports.getTableActionState = getTableActionState; exports.runTableAction = runTableAction; exports.EMPTY_TABLE_STATE = EMPTY_TABLE_STATE; exports.getTableState = getTableState; exports.createTableStore = createTableStore;
|
|
2060
|
-
//# sourceMappingURL=chunk-
|
|
2060
|
+
//# sourceMappingURL=chunk-P43HUQRX.cjs.map
|