@pixerate/editor 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +18 -17
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +3 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/canvas/index.cjs +2105 -172
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +319 -23
- package/dist/canvas/index.d.ts +319 -23
- package/dist/canvas/index.js +2081 -148
- package/dist/canvas/index.js.map +1 -1
- package/dist/chart/index.cjs +32 -30
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +4 -2
- package/dist/chart/index.d.ts +4 -2
- package/dist/chart/index.js +20 -18
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-C3JHII3M.cjs → chunk-3I6V7PI4.cjs} +45 -45
- package/dist/{chunk-C3JHII3M.cjs.map → chunk-3I6V7PI4.cjs.map} +1 -1
- package/dist/{chunk-P43HUQRX.cjs → chunk-AHCENCU4.cjs} +12 -10
- package/dist/chunk-AHCENCU4.cjs.map +1 -0
- package/dist/chunk-II77MLHN.cjs +11106 -0
- package/dist/chunk-II77MLHN.cjs.map +1 -0
- package/dist/{chunk-OIKYP7XC.js → chunk-LMUDHBWR.js} +2 -2
- package/dist/{chunk-VODBAO32.js → chunk-OEFCLWZ3.js} +4 -1425
- package/dist/chunk-OEFCLWZ3.js.map +1 -0
- package/dist/{chunk-NK3WL5TJ.cjs → chunk-P2CTDJNF.cjs} +27 -1448
- package/dist/chunk-P2CTDJNF.cjs.map +1 -0
- package/dist/chunk-TKPPIVW7.cjs +1443 -0
- package/dist/chunk-TKPPIVW7.cjs.map +1 -0
- package/dist/chunk-WJSCGBJ2.js +11106 -0
- package/dist/chunk-WJSCGBJ2.js.map +1 -0
- package/dist/{chunk-RIXTW3C4.js → chunk-WLVZ235X.js} +5 -3
- package/dist/{chunk-RIXTW3C4.js.map → chunk-WLVZ235X.js.map} +1 -1
- package/dist/chunk-ZOH6X3VR.js +1443 -0
- package/dist/chunk-ZOH6X3VR.js.map +1 -0
- package/dist/{controller-DscWQbjO.d.ts → controller-D2rj5umx.d.ts} +2 -362
- package/dist/{controller-CX0QfSv0.d.cts → controller-R2biKk_E.d.cts} +2 -362
- package/dist/diagram/index.cjs +1457 -47
- package/dist/diagram/index.cjs.map +1 -1
- package/dist/diagram/index.d.cts +1734 -15
- package/dist/diagram/index.d.ts +1734 -15
- package/dist/diagram/index.js +1436 -26
- package/dist/diagram/index.js.map +1 -1
- package/dist/extensions/index.cjs +5 -4
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +4 -3
- package/dist/extensions/index.d.ts +4 -3
- package/dist/extensions/index.js +4 -3
- package/dist/{index-DIWB6xMf.d.cts → index-BcHyG0Wq.d.cts} +2 -1
- package/dist/{index-CALDD35B.d.ts → index-CTCc3m3C.d.ts} +2 -1
- package/dist/index.cjs +10 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/types-BRp-6zkY.d.cts +362 -0
- package/dist/types-BRp-6zkY.d.ts +362 -0
- package/dist/{types-BULrFyuQ.d.cts → types-DYkjhzdz.d.cts} +1 -1
- package/dist/{types-BULrFyuQ.d.ts → types-DYkjhzdz.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-H5K77C7Y.cjs +0 -3848
- package/dist/chunk-H5K77C7Y.cjs.map +0 -1
- package/dist/chunk-NK3WL5TJ.cjs.map +0 -1
- package/dist/chunk-P43HUQRX.cjs.map +0 -1
- package/dist/chunk-VODBAO32.js.map +0 -1
- package/dist/chunk-WWJNC7SX.js +0 -3848
- package/dist/chunk-WWJNC7SX.js.map +0 -1
- /package/dist/{chunk-OIKYP7XC.js.map → chunk-LMUDHBWR.js.map} +0 -0
|
@@ -32,7 +32,7 @@ var _chunkNN3JGUSXcjs = require('./chunk-NN3JGUSX.cjs');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkAHCENCU4cjs = require('./chunk-AHCENCU4.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
var _chunkCKRNELPOcjs = require('./chunk-CKRNELPO.cjs');
|
|
@@ -3640,9 +3640,9 @@ function insertImportedDocument(target, content, options = {}) {
|
|
|
3640
3640
|
if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
|
|
3641
3641
|
from = to = _state.Selection.near(state.doc.resolve(from)).from;
|
|
3642
3642
|
}
|
|
3643
|
-
if (htmlSlice &&
|
|
3643
|
+
if (htmlSlice && _chunkAHCENCU4cjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkAHCENCU4cjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
|
|
3644
3644
|
const tr2 = state.tr;
|
|
3645
|
-
const end2 =
|
|
3645
|
+
const end2 = _chunkAHCENCU4cjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
|
|
3646
3646
|
if (end2 !== null) {
|
|
3647
3647
|
if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
|
|
3648
3648
|
view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
|
|
@@ -3819,7 +3819,7 @@ var RichClipboard = _core.Extension.create({
|
|
|
3819
3819
|
const slice = _chunkHNDSPZ5Tcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
|
|
3820
3820
|
if (!slice) return false;
|
|
3821
3821
|
event.preventDefault();
|
|
3822
|
-
if (
|
|
3822
|
+
if (_chunkAHCENCU4cjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
|
|
3823
3823
|
view.dispatch(
|
|
3824
3824
|
view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
|
|
3825
3825
|
);
|
|
@@ -4220,7 +4220,7 @@ function createOutlineStore(editor) {
|
|
|
4220
4220
|
if (!editor || editor.isDestroyed) return EMPTY_SNAPSHOT;
|
|
4221
4221
|
const headings = getOutline(editor);
|
|
4222
4222
|
const activeId = _nullishCoalesce(_optionalChain([getActiveHeading, 'call', _161 => _161(editor, headings), 'optionalAccess', _162 => _162.id]), () => ( null));
|
|
4223
|
-
const sameStructure =
|
|
4223
|
+
const sameStructure = _chunkAHCENCU4cjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
|
|
4224
4224
|
if (sameStructure && snapshot.activeId === activeId) return snapshot;
|
|
4225
4225
|
return {
|
|
4226
4226
|
headings: sameStructure ? snapshot.headings : headings,
|
|
@@ -4268,7 +4268,7 @@ function navigateToHeading(editor, heading, options = {}) {
|
|
|
4268
4268
|
editor.view.dispatch(tr);
|
|
4269
4269
|
editor.view.focus();
|
|
4270
4270
|
}
|
|
4271
|
-
|
|
4271
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
|
|
4272
4272
|
return true;
|
|
4273
4273
|
}
|
|
4274
4274
|
function assignHeadingIds(state, types, generateId) {
|
|
@@ -4293,11 +4293,11 @@ function assignHeadingIds(state, types, generateId) {
|
|
|
4293
4293
|
}
|
|
4294
4294
|
var Outline = _core.Extension.create({
|
|
4295
4295
|
name: "outline",
|
|
4296
|
-
priority:
|
|
4296
|
+
priority: _chunkAHCENCU4cjs.STRUCTURE_PRIORITY,
|
|
4297
4297
|
addOptions() {
|
|
4298
4298
|
return {
|
|
4299
4299
|
types: ["heading"],
|
|
4300
|
-
generateId: () =>
|
|
4300
|
+
generateId: () => _chunkAHCENCU4cjs.generateStructureId.call(void 0, "h"),
|
|
4301
4301
|
onUpdate: void 0
|
|
4302
4302
|
};
|
|
4303
4303
|
},
|
|
@@ -4330,14 +4330,14 @@ var Outline = _core.Extension.create({
|
|
|
4330
4330
|
tr.scrollIntoView();
|
|
4331
4331
|
_optionalChain([view, 'optionalAccess', _169 => _169.focus, 'optionalCall', _170 => _170()]);
|
|
4332
4332
|
}
|
|
4333
|
-
|
|
4333
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
|
|
4334
4334
|
}
|
|
4335
4335
|
return true;
|
|
4336
4336
|
},
|
|
4337
4337
|
scrollToHeading: (id, options = {}) => ({ state, dispatch, view }) => {
|
|
4338
4338
|
const heading = findHeading(state, id);
|
|
4339
4339
|
if (!heading) return false;
|
|
4340
|
-
if (dispatch)
|
|
4340
|
+
if (dispatch) _chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
|
|
4341
4341
|
return true;
|
|
4342
4342
|
}
|
|
4343
4343
|
};
|
|
@@ -4358,7 +4358,7 @@ var Outline = _core.Extension.create({
|
|
|
4358
4358
|
apply: (tr, prev, _oldState, newState) => {
|
|
4359
4359
|
if (!tr.docChanged) return prev;
|
|
4360
4360
|
const next = computeOutline(newState.doc, types);
|
|
4361
|
-
if (
|
|
4361
|
+
if (_chunkAHCENCU4cjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
|
|
4362
4362
|
storage.headings = next;
|
|
4363
4363
|
_optionalChain([onUpdate, 'call', _171 => _171(), 'optionalCall', _172 => _172(next)]);
|
|
4364
4364
|
return next;
|
|
@@ -4376,7 +4376,7 @@ var Outline = _core.Extension.create({
|
|
|
4376
4376
|
},
|
|
4377
4377
|
onBeforeCreate() {
|
|
4378
4378
|
const { types, generateId } = this.options;
|
|
4379
|
-
|
|
4379
|
+
_chunkAHCENCU4cjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
|
|
4380
4380
|
}
|
|
4381
4381
|
});
|
|
4382
4382
|
|
|
@@ -4546,7 +4546,7 @@ function syncTableOfContents(state, headingTypes) {
|
|
|
4546
4546
|
node.attrs.minLevel,
|
|
4547
4547
|
node.attrs.maxLevel
|
|
4548
4548
|
);
|
|
4549
|
-
if (!
|
|
4549
|
+
if (!_chunkAHCENCU4cjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
|
|
4550
4550
|
tr = _nullishCoalesce(tr, () => ( state.tr));
|
|
4551
4551
|
tr.setNodeMarkup(pos, void 0, { ...node.attrs, entries });
|
|
4552
4552
|
}
|
|
@@ -4558,7 +4558,7 @@ function syncTableOfContents(state, headingTypes) {
|
|
|
4558
4558
|
}
|
|
4559
4559
|
var TableOfContents = _core.Node.create({
|
|
4560
4560
|
name: "tableOfContents",
|
|
4561
|
-
priority:
|
|
4561
|
+
priority: _chunkAHCENCU4cjs.STRUCTURE_PRIORITY - 5,
|
|
4562
4562
|
group: "block",
|
|
4563
4563
|
atom: true,
|
|
4564
4564
|
selectable: true,
|
|
@@ -4669,7 +4669,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4669
4669
|
return [
|
|
4670
4670
|
new (0, _state.Plugin)({
|
|
4671
4671
|
key: tableOfContentsPluginKey,
|
|
4672
|
-
state:
|
|
4672
|
+
state: _chunkAHCENCU4cjs.presenceStateSpec.call(void 0, [this.name]),
|
|
4673
4673
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
4674
4674
|
if (!transactions.some((tr) => tr.docChanged)) return null;
|
|
4675
4675
|
if (!tableOfContentsPluginKey.getState(newState)) return null;
|
|
@@ -4693,7 +4693,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4693
4693
|
);
|
|
4694
4694
|
view.focus();
|
|
4695
4695
|
}
|
|
4696
|
-
|
|
4696
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, heading.pos);
|
|
4697
4697
|
return true;
|
|
4698
4698
|
}
|
|
4699
4699
|
}
|
|
@@ -4703,7 +4703,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4703
4703
|
},
|
|
4704
4704
|
onBeforeCreate() {
|
|
4705
4705
|
const { headingTypes } = this.options;
|
|
4706
|
-
|
|
4706
|
+
_chunkAHCENCU4cjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
|
|
4707
4707
|
}
|
|
4708
4708
|
});
|
|
4709
4709
|
|
|
@@ -4761,7 +4761,7 @@ function syncFootnotes(tr, options = {}) {
|
|
|
4761
4761
|
const listType = schema.nodes[LIST];
|
|
4762
4762
|
const itemType = schema.nodes[ITEM];
|
|
4763
4763
|
if (!listType || !itemType) return false;
|
|
4764
|
-
const generateId = _nullishCoalesce(options.generateId, () => ( (() =>
|
|
4764
|
+
const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkAHCENCU4cjs.generateStructureId.call(void 0, "fn"))));
|
|
4765
4765
|
const refs = [];
|
|
4766
4766
|
const lists = [];
|
|
4767
4767
|
const existing = /* @__PURE__ */ new Map();
|
|
@@ -4845,7 +4845,7 @@ function findReferences(doc, id) {
|
|
|
4845
4845
|
}
|
|
4846
4846
|
var FootnoteReference = _core.Node.create({
|
|
4847
4847
|
name: REFERENCE,
|
|
4848
|
-
priority:
|
|
4848
|
+
priority: _chunkAHCENCU4cjs.STRUCTURE_PRIORITY - 5,
|
|
4849
4849
|
group: "inline",
|
|
4850
4850
|
inline: true,
|
|
4851
4851
|
atom: true,
|
|
@@ -4853,7 +4853,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4853
4853
|
addOptions() {
|
|
4854
4854
|
return {
|
|
4855
4855
|
HTMLAttributes: {},
|
|
4856
|
-
generateId: () =>
|
|
4856
|
+
generateId: () => _chunkAHCENCU4cjs.generateStructureId.call(void 0, "fn")
|
|
4857
4857
|
};
|
|
4858
4858
|
},
|
|
4859
4859
|
addAttributes() {
|
|
@@ -4964,7 +4964,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4964
4964
|
_state.TextSelection.create(tr.doc, footnote.pos + footnote.node.nodeSize - 2)
|
|
4965
4965
|
);
|
|
4966
4966
|
tr.scrollIntoView();
|
|
4967
|
-
|
|
4967
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, footnote.pos);
|
|
4968
4968
|
}
|
|
4969
4969
|
return true;
|
|
4970
4970
|
},
|
|
@@ -4974,7 +4974,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4974
4974
|
if (dispatch) {
|
|
4975
4975
|
tr.setSelection(_state.NodeSelection.create(tr.doc, ref.pos));
|
|
4976
4976
|
tr.scrollIntoView();
|
|
4977
|
-
|
|
4977
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, ref.pos);
|
|
4978
4978
|
}
|
|
4979
4979
|
return true;
|
|
4980
4980
|
}
|
|
@@ -4986,7 +4986,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4986
4986
|
return [
|
|
4987
4987
|
new (0, _state.Plugin)({
|
|
4988
4988
|
key: footnotesPluginKey,
|
|
4989
|
-
state:
|
|
4989
|
+
state: _chunkAHCENCU4cjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
|
|
4990
4990
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
4991
4991
|
if (!transactions.some((tr2) => tr2.docChanged)) return null;
|
|
4992
4992
|
if (!footnotesPluginKey.getState(newState)) return null;
|
|
@@ -5007,7 +5007,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
5007
5007
|
},
|
|
5008
5008
|
onBeforeCreate() {
|
|
5009
5009
|
const { generateId } = this.options;
|
|
5010
|
-
|
|
5010
|
+
_chunkAHCENCU4cjs.syncInitialContent.call(void 0, this.editor, (state) => {
|
|
5011
5011
|
const tr = state.tr;
|
|
5012
5012
|
return syncFootnotes(tr, { generateId }) ? tr : null;
|
|
5013
5013
|
});
|
|
@@ -5147,7 +5147,7 @@ var Bookmark = _core.Mark.create({
|
|
|
5147
5147
|
addOptions() {
|
|
5148
5148
|
return {
|
|
5149
5149
|
HTMLAttributes: {},
|
|
5150
|
-
generateId: () =>
|
|
5150
|
+
generateId: () => _chunkAHCENCU4cjs.generateStructureId.call(void 0, "bm")
|
|
5151
5151
|
};
|
|
5152
5152
|
},
|
|
5153
5153
|
addAttributes() {
|
|
@@ -5232,7 +5232,7 @@ var Bookmark = _core.Mark.create({
|
|
|
5232
5232
|
tr.setSelection(_state.TextSelection.create(tr.doc, bookmark.from, bookmark.to));
|
|
5233
5233
|
tr.scrollIntoView();
|
|
5234
5234
|
const domPos = state.doc.resolve(bookmark.from);
|
|
5235
|
-
|
|
5235
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
|
|
5236
5236
|
}
|
|
5237
5237
|
return true;
|
|
5238
5238
|
}
|
|
@@ -5297,7 +5297,7 @@ function syncCrossReferences(state, headingTypes) {
|
|
|
5297
5297
|
}
|
|
5298
5298
|
var CrossReference = _core.Node.create({
|
|
5299
5299
|
name: NAME,
|
|
5300
|
-
priority:
|
|
5300
|
+
priority: _chunkAHCENCU4cjs.STRUCTURE_PRIORITY - 5,
|
|
5301
5301
|
group: "inline",
|
|
5302
5302
|
inline: true,
|
|
5303
5303
|
atom: true,
|
|
@@ -5399,7 +5399,7 @@ var CrossReference = _core.Node.create({
|
|
|
5399
5399
|
if (dispatch) {
|
|
5400
5400
|
tr.setSelection(_state.TextSelection.create(tr.doc, range.from, range.to));
|
|
5401
5401
|
tr.scrollIntoView();
|
|
5402
|
-
|
|
5402
|
+
_chunkAHCENCU4cjs.scrollDomAtPos.call(void 0, view, range.blockPos);
|
|
5403
5403
|
}
|
|
5404
5404
|
return true;
|
|
5405
5405
|
}
|
|
@@ -5411,7 +5411,7 @@ var CrossReference = _core.Node.create({
|
|
|
5411
5411
|
return [
|
|
5412
5412
|
new (0, _state.Plugin)({
|
|
5413
5413
|
key: crossReferencePluginKey,
|
|
5414
|
-
state:
|
|
5414
|
+
state: _chunkAHCENCU4cjs.presenceStateSpec.call(void 0, [NAME]),
|
|
5415
5415
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
5416
5416
|
if (!transactions.some((tr) => tr.docChanged)) return null;
|
|
5417
5417
|
if (!crossReferencePluginKey.getState(newState)) return null;
|
|
@@ -5430,7 +5430,7 @@ var CrossReference = _core.Node.create({
|
|
|
5430
5430
|
},
|
|
5431
5431
|
onBeforeCreate() {
|
|
5432
5432
|
const { headingTypes } = this.options;
|
|
5433
|
-
|
|
5433
|
+
_chunkAHCENCU4cjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
|
|
5434
5434
|
}
|
|
5435
5435
|
});
|
|
5436
5436
|
|
|
@@ -5685,7 +5685,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5685
5685
|
if (!s || !s.active || s.currentIndex < 0 || !s.matches[s.currentIndex]) return false;
|
|
5686
5686
|
if (dispatch) {
|
|
5687
5687
|
_history.closeHistory.call(void 0, tr);
|
|
5688
|
-
const [end] =
|
|
5688
|
+
const [end] = _chunkAHCENCU4cjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
|
|
5689
5689
|
tr.setSelection(_state.TextSelection.create(tr.doc, end)).scrollIntoView();
|
|
5690
5690
|
meta(tr, { type: "replaced", anchor: end, count: 1 });
|
|
5691
5691
|
}
|
|
@@ -5696,7 +5696,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5696
5696
|
if (!s || !s.active || !s.matches.length) return false;
|
|
5697
5697
|
if (dispatch) {
|
|
5698
5698
|
_history.closeHistory.call(void 0, tr);
|
|
5699
|
-
const ends =
|
|
5699
|
+
const ends = _chunkAHCENCU4cjs.applyReplacements.call(void 0, tr, s.matches);
|
|
5700
5700
|
meta(tr, { type: "replaced", anchor: ends[ends.length - 1], count: s.matches.length });
|
|
5701
5701
|
}
|
|
5702
5702
|
return true;
|
|
@@ -5728,7 +5728,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5728
5728
|
if (!s.active || !s.query) {
|
|
5729
5729
|
return { ...s, matches: [], currentIndex: -1, error: null, truncated: false };
|
|
5730
5730
|
}
|
|
5731
|
-
const result =
|
|
5731
|
+
const result = _chunkAHCENCU4cjs.searchDocument.call(void 0, doc, s.query, s.options, {
|
|
5732
5732
|
replacement: s.replacement,
|
|
5733
5733
|
clipboardText: safeClipboard(options.getClipboardText),
|
|
5734
5734
|
timeLimitMs: options.timeLimitMs,
|
|
@@ -6315,7 +6315,7 @@ function createRichTextPreset(options = {}) {
|
|
|
6315
6315
|
})
|
|
6316
6316
|
];
|
|
6317
6317
|
if (options.table !== false) {
|
|
6318
|
-
extensions2.push(...
|
|
6318
|
+
extensions2.push(..._chunkAHCENCU4cjs.createTableExtensions.call(void 0, optionObject(options.table)));
|
|
6319
6319
|
}
|
|
6320
6320
|
if (characterLimit) {
|
|
6321
6321
|
extensions2.push(
|
|
@@ -6422,8 +6422,8 @@ function createRichTextPreset(options = {}) {
|
|
|
6422
6422
|
}
|
|
6423
6423
|
if (options.chart) {
|
|
6424
6424
|
const { sparkline = true, ...chartOptions } = optionObject(options.chart);
|
|
6425
|
-
extensions2.push(
|
|
6426
|
-
if (sparkline) extensions2.push(
|
|
6425
|
+
extensions2.push(_chunkAHCENCU4cjs.Chart.configure(chartOptions));
|
|
6426
|
+
if (sparkline) extensions2.push(_chunkAHCENCU4cjs.Sparkline.configure(optionObject(sparkline)));
|
|
6427
6427
|
}
|
|
6428
6428
|
if (options.paragraphStyles) {
|
|
6429
6429
|
extensions2.push(ParagraphStyles.configure(optionObject(options.paragraphStyles)));
|
|
@@ -6564,7 +6564,7 @@ function createFindReplaceCommands(editor, options = {}) {
|
|
|
6564
6564
|
];
|
|
6565
6565
|
}
|
|
6566
6566
|
function validateFindPattern(query, options = {}) {
|
|
6567
|
-
const result =
|
|
6567
|
+
const result = _chunkAHCENCU4cjs.compileFindPattern.call(void 0, query, options);
|
|
6568
6568
|
return result.ok ? null : result.error;
|
|
6569
6569
|
}
|
|
6570
6570
|
|
|
@@ -6573,8 +6573,8 @@ var PARAMS = {
|
|
|
6573
6573
|
insertTable: {
|
|
6574
6574
|
type: "object",
|
|
6575
6575
|
properties: {
|
|
6576
|
-
rows: { type: "integer", minimum: 1, maximum:
|
|
6577
|
-
cols: { type: "integer", minimum: 1, maximum:
|
|
6576
|
+
rows: { type: "integer", minimum: 1, maximum: _chunkAHCENCU4cjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
|
|
6577
|
+
cols: { type: "integer", minimum: 1, maximum: _chunkAHCENCU4cjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
|
|
6578
6578
|
withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
|
|
6579
6579
|
},
|
|
6580
6580
|
additionalProperties: false
|
|
@@ -6605,7 +6605,7 @@ function createTableCommands(editor, options = {}) {
|
|
|
6605
6605
|
const group = _nullishCoalesce(options.group, () => ( "Table"));
|
|
6606
6606
|
const scope = options.scope ? { scope: options.scope } : {};
|
|
6607
6607
|
const focus = _nullishCoalesce(options.focus, () => ( true));
|
|
6608
|
-
return
|
|
6608
|
+
return _chunkAHCENCU4cjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
|
|
6609
6609
|
const params = PARAMS[action];
|
|
6610
6610
|
return {
|
|
6611
6611
|
id: `${prefix}${action}`,
|
|
@@ -6615,13 +6615,13 @@ function createTableCommands(editor, options = {}) {
|
|
|
6615
6615
|
description,
|
|
6616
6616
|
...params ? { params } : {},
|
|
6617
6617
|
...scope,
|
|
6618
|
-
enabled: (_ctx, p) =>
|
|
6618
|
+
enabled: (_ctx, p) => _chunkAHCENCU4cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
|
|
6619
6619
|
run: (_ctx, p) => {
|
|
6620
|
-
if (!
|
|
6621
|
-
const reason =
|
|
6620
|
+
if (!_chunkAHCENCU4cjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
|
|
6621
|
+
const reason = _chunkAHCENCU4cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
|
|
6622
6622
|
throw new Error(reason === true ? `${label} did not change the document.` : reason);
|
|
6623
6623
|
}
|
|
6624
|
-
const state =
|
|
6624
|
+
const state = _chunkAHCENCU4cjs.getTableState.call(void 0, editor);
|
|
6625
6625
|
return {
|
|
6626
6626
|
done: true,
|
|
6627
6627
|
table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null
|
|
@@ -6753,4 +6753,4 @@ function createTableCommands(editor, options = {}) {
|
|
|
6753
6753
|
|
|
6754
6754
|
|
|
6755
6755
|
exports.GradientText = GradientText; exports.SlashCommands = SlashCommands; exports.TemplateSuggestions = TemplateSuggestions; exports.LoadingNode = LoadingNode; exports.SMILIE_REPLACEMENTS = SMILIE_REPLACEMENTS; exports.smilieAutocorrectRules = smilieAutocorrectRules; exports.SmilieReplacer = SmilieReplacer; exports.findHexColors = findHexColors; exports.ColorHighlighter = ColorHighlighter; exports.FontSize = FontSize; exports.Mention = Mention; exports.getMentionNodes = getMentionNodes; exports.setMentionRoleAt = setMentionRoleAt; exports.createMentionExtension = createMentionExtension; exports.Markdown = Markdown2; exports.imagePastePluginKey = imagePastePluginKey; exports.insertImageNode = insertImageNode; exports.updateImageSrc = updateImageSrc; exports.removeImageNode = removeImageNode; exports.handleImageInsertion = handleImageInsertion; exports.Image = Image2; exports.commentsPluginKey = commentsPluginKey; exports.COMMENT_MARK_NAME = COMMENT_MARK_NAME; exports.findCommentRanges = findCommentRanges; exports.getCommentAnchors = getCommentAnchors; exports.getCommentIdsAt = getCommentIdsAt; exports.getCommentStore = getCommentStore; exports.Comments = Comments; exports.getCommentAuthor = getCommentAuthor; exports.compareInEditor = compareInEditor; exports.applyDocumentComparison = applyDocumentComparison; exports.DocumentCompare = DocumentCompare; exports.ImportError = ImportError; exports.createImportContext = createImportContext; exports.ImportAdapterRegistry = ImportAdapterRegistry; exports.DOCX_MIME_TYPES = DOCX_MIME_TYPES; exports.DEFAULT_DOCX_MAX_IMAGE_SIZE = DEFAULT_DOCX_MAX_IMAGE_SIZE; exports.docxToDocumentImport = docxToDocumentImport; exports.createDocxImportAdapter = createDocxImportAdapter; exports.docxImportAdapter = docxImportAdapter; exports.markdownImportAdapter = markdownImportAdapter; exports.htmlImportAdapter = htmlImportAdapter; exports.plainTextImportAdapter = plainTextImportAdapter; exports.rtfImportAdapter = rtfImportAdapter; exports.BUILT_IN_IMPORT_ADAPTERS = BUILT_IN_IMPORT_ADAPTERS; exports.createImportAdapterRegistry = createImportAdapterRegistry; exports.defaultImportRegistry = defaultImportRegistry; exports.registerImportAdapter = registerImportAdapter; exports.unregisterImportAdapter = unregisterImportAdapter; exports.findImportAdapter = findImportAdapter; exports.importFile = importFile; exports.getImportAccept = getImportAccept; exports.htmlToSlice = htmlToSlice; exports.insertImportedDocument = insertImportedDocument; exports.applyImportedReviewData = applyImportedReviewData; exports.importFilesIntoEditor = importFilesIntoEditor; exports.fileImportPluginKey = fileImportPluginKey; exports.FileImport = FileImport; exports.richClipboardPluginKey = richClipboardPluginKey; exports.writeRichClipboard = writeRichClipboard; exports.RichClipboard = RichClipboard; exports.smartQuoteRules = smartQuoteRules; exports.symbolRules = symbolRules; exports.fractionRules = fractionRules; exports.capitalizeSentenceRules = capitalizeSentenceRules; exports.twoInitialCapitalsRules = twoInitialCapitalsRules; exports.defaultAutocorrectRules = defaultAutocorrectRules; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.autocorrectPluginKey = autocorrectPluginKey; exports.findAutocorrection = findAutocorrection; exports.isInsidePromptToken = isInsidePromptToken; exports.Autocorrect = Autocorrect; exports.outlinePluginKey = outlinePluginKey; exports.computeOutline = computeOutline; exports.buildOutlineTree = buildOutlineTree; exports.getOutline = getOutline; exports.getActiveHeading = getActiveHeading; exports.createOutlineStore = createOutlineStore; exports.navigateToHeading = navigateToHeading; exports.Outline = Outline; exports.tableOfContentsMarkdownIt = tableOfContentsMarkdownIt; exports.footnotesMarkdownIt = footnotesMarkdownIt; exports.tableOfContentsPluginKey = tableOfContentsPluginKey; exports.getTableOfContentsEntries = getTableOfContentsEntries; exports.TableOfContents = TableOfContents; exports.footnotesPluginKey = footnotesPluginKey; exports.getFootnotes = getFootnotes; exports.syncFootnotes = syncFootnotes; exports.FootnoteReference = FootnoteReference; exports.Footnotes = Footnotes; exports.Footnote = Footnote; exports.getBookmarks = getBookmarks; exports.Bookmark = Bookmark; exports.crossReferencePluginKey = crossReferencePluginKey; exports.getCrossReferenceTargets = getCrossReferenceTargets; exports.CrossReference = CrossReference; exports.documentStructureCommandItems = documentStructureCommandItems; exports.getDocumentStructureCommandItems = getDocumentStructureCommandItems; exports.EMPTY_FIND_REPLACE_SNAPSHOT = EMPTY_FIND_REPLACE_SNAPSHOT; exports.FindReplaceStore = FindReplaceStore; exports.findReplacePluginKey = findReplacePluginKey; exports.getFindReplaceState = getFindReplaceState; exports.getFindReplaceStore = getFindReplaceStore; exports.FIND_OPTION_TOGGLES = FIND_OPTION_TOGGLES; exports.formatFindStatus = formatFindStatus; exports.FindReplace = FindReplace; exports.STYLE_ID_ATTRIBUTE = STYLE_ID_ATTRIBUTE; exports.CHARACTER_STYLE_MARK_NAME = CHARACTER_STYLE_MARK_NAME; exports.paragraphStylesPluginKey = paragraphStylesPluginKey; exports.getStyleRegistry = getStyleRegistry; exports.isParagraphStyleAvailable = isParagraphStyleAvailable; exports.getParagraphStyleAt = getParagraphStyleAt; exports.captureSelectionFormat = captureSelectionFormat; exports.CharacterStyle = CharacterStyle; exports.ParagraphStyles = ParagraphStyles; exports.createParagraphStylesStore = createParagraphStylesStore; exports.createRichTextPreset = createRichTextPreset; exports.createFindReplaceCommands = createFindReplaceCommands; exports.validateFindPattern = validateFindPattern; exports.createTableCommands = createTableCommands;
|
|
6756
|
-
//# sourceMappingURL=chunk-
|
|
6756
|
+
//# sourceMappingURL=chunk-3I6V7PI4.cjs.map
|