@pixerate/editor 0.26.0 → 0.27.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/README.md +8 -2
- package/dist/agent/index.cjs +59 -9
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +6 -4
- package/dist/agent/index.d.ts +6 -4
- package/dist/agent/index.js +52 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/{builtins-Chj6zv_O.d.ts → builtins-haN82vjT.d.ts} +33 -3
- package/dist/{builtins-CdPcLwwF.d.cts → builtins-nMXh9sT3.d.cts} +33 -3
- package/dist/canvas/index.cjs +372 -8
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +72 -4
- package/dist/canvas/index.d.ts +72 -4
- package/dist/canvas/index.js +368 -4
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-UBCFIABU.js → chunk-5H2OPMXZ.js} +183 -6
- package/dist/chunk-5H2OPMXZ.js.map +1 -0
- package/dist/{chunk-NFVBT3UZ.cjs → chunk-66IMF6OD.cjs} +108 -25
- package/dist/chunk-66IMF6OD.cjs.map +1 -0
- package/dist/{chunk-Q2OHWD2A.js → chunk-6IO7WUSU.js} +19 -5
- package/dist/chunk-6IO7WUSU.js.map +1 -0
- package/dist/{chunk-YOMYSFJU.cjs → chunk-AGR7EVRW.cjs} +49 -35
- package/dist/chunk-AGR7EVRW.cjs.map +1 -0
- package/dist/{chunk-RRREAOVM.cjs → chunk-HNDSPZ5T.cjs} +4 -4
- package/dist/{chunk-RRREAOVM.cjs.map → chunk-HNDSPZ5T.cjs.map} +1 -1
- package/dist/chunk-HXDMZQTD.cjs +497 -0
- package/dist/chunk-HXDMZQTD.cjs.map +1 -0
- package/dist/chunk-IB3ZHQAX.js +497 -0
- package/dist/chunk-IB3ZHQAX.js.map +1 -0
- package/dist/{chunk-X7HXL2SB.js → chunk-JT7AXQTE.js} +336 -10
- package/dist/chunk-JT7AXQTE.js.map +1 -0
- package/dist/{chunk-HDYMLS3X.cjs → chunk-MC2LQN5S.cjs} +196 -19
- package/dist/chunk-MC2LQN5S.cjs.map +1 -0
- package/dist/{chunk-JOIREKL7.js → chunk-UKI64KUD.js} +85 -2
- package/dist/chunk-UKI64KUD.js.map +1 -0
- package/dist/{chunk-MHEPLBFB.js → chunk-WON34HKM.js} +2 -2
- package/dist/{chunk-NQF32I6Z.cjs → chunk-YK5TATOF.cjs} +461 -135
- package/dist/chunk-YK5TATOF.cjs.map +1 -0
- package/dist/commands/index.cjs +30 -410
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.d.cts +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +17 -397
- package/dist/commands/index.js.map +1 -1
- package/dist/{controller-CxXGOEmy.d.cts → controller-w6eRTjF8.d.cts} +67 -2
- package/dist/{controller-CxXGOEmy.d.ts → controller-w6eRTjF8.d.ts} +67 -2
- package/dist/extensions/index.cjs +23 -5
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +23 -5
- package/dist/{index-jcJwmBYt.d.cts → index-C6gaQRH0.d.cts} +53 -4
- package/dist/{index-B273Zllk.d.ts → index-DXAv_R08.d.ts} +53 -4
- package/dist/index.cjs +66 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +46 -6
- package/dist/index.js.map +1 -1
- package/dist/serializers/index.cjs +5 -3
- package/dist/serializers/index.cjs.map +1 -1
- package/dist/serializers/index.d.cts +13 -3
- package/dist/serializers/index.d.ts +13 -3
- package/dist/serializers/index.js +4 -2
- package/dist/spreadsheet/index.cjs +22 -2
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +76 -3
- package/dist/spreadsheet/index.d.ts +76 -3
- package/dist/spreadsheet/index.js +21 -1
- package/package.json +1 -1
- package/dist/chunk-HDYMLS3X.cjs.map +0 -1
- package/dist/chunk-JOIREKL7.js.map +0 -1
- package/dist/chunk-NFVBT3UZ.cjs.map +0 -1
- package/dist/chunk-NQF32I6Z.cjs.map +0 -1
- package/dist/chunk-Q2OHWD2A.js.map +0 -1
- package/dist/chunk-UBCFIABU.js.map +0 -1
- package/dist/chunk-X7HXL2SB.js.map +0 -1
- package/dist/chunk-YOMYSFJU.cjs.map +0 -1
- /package/dist/{chunk-MHEPLBFB.js.map → chunk-WON34HKM.js.map} +0 -0
|
@@ -23,7 +23,7 @@ var _chunkMKA3AHLVcjs = require('./chunk-MKA3AHLV.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkHNDSPZ5Tcjs = require('./chunk-HNDSPZ5T.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -32,13 +32,17 @@ var _chunkRRREAOVMcjs = require('./chunk-RRREAOVM.cjs');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var _chunkHDYMLS3Xcjs = require('./chunk-HDYMLS3X.cjs');
|
|
36
35
|
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
|
|
39
|
+
var _chunkMC2LQN5Scjs = require('./chunk-MC2LQN5S.cjs');
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var _chunk66IMF6ODcjs = require('./chunk-66IMF6OD.cjs');
|
|
42
46
|
|
|
43
47
|
|
|
44
48
|
|
|
@@ -2869,7 +2873,7 @@ var FORMAT_MARK_TYPES = [
|
|
|
2869
2873
|
var formatMarks = (f) => FORMAT_MARK_TYPES.filter(([key]) => f[key]).map(([, type]) => ({ type }));
|
|
2870
2874
|
var formatKey = (f) => `${f.b ? 1 : 0}${f.i ? 1 : 0}${f.u ? 1 : 0}${f.s ? 1 : 0}${f.sup ? 1 : 0}${f.sub ? 1 : 0}|${_nullishCoalesce(f.href, () => ( ""))}` + (f.rev ? `|${f.rev.kind}:${f.rev.changeId}:${_nullishCoalesce(f.rev.moveId, () => ( ""))}` : "") + (f.fmt ? `|f:${f.fmt.changeId}` : "") + (f.comments ? `|c:${f.comments.join(",")}` : "");
|
|
2871
2875
|
function changeAttrs(change) {
|
|
2872
|
-
return ` data-change-id="${
|
|
2876
|
+
return ` data-change-id="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, change.changeId)}" data-author-id="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, change.authorId)}" data-author-name="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, change.authorName)}" data-created-at="${change.createdAt}"`;
|
|
2873
2877
|
}
|
|
2874
2878
|
function wrapFormat(inner, f) {
|
|
2875
2879
|
let html = inner;
|
|
@@ -2880,15 +2884,15 @@ function wrapFormat(inner, f) {
|
|
|
2880
2884
|
if (f.i) html = `<em>${html}</em>`;
|
|
2881
2885
|
if (f.b) html = `<strong>${html}</strong>`;
|
|
2882
2886
|
if (f.fmt) {
|
|
2883
|
-
html = `<span data-change-type="format"${changeAttrs(f.fmt)} data-format-before="${
|
|
2887
|
+
html = `<span data-change-type="format"${changeAttrs(f.fmt)} data-format-before="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, JSON.stringify(f.fmt.before))}" data-format-after="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, JSON.stringify(f.fmt.after))}">${html}</span>`;
|
|
2884
2888
|
}
|
|
2885
2889
|
if (f.rev) {
|
|
2886
2890
|
const tag = f.rev.kind === "insertion" ? "ins" : "del";
|
|
2887
|
-
const move = f.rev.moveId ? ` data-move-id="${
|
|
2891
|
+
const move = f.rev.moveId ? ` data-move-id="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, f.rev.moveId)}"` : "";
|
|
2888
2892
|
html = `<${tag} data-change-type="${f.rev.kind}"${changeAttrs(f.rev)}${move}>${html}</${tag}>`;
|
|
2889
2893
|
}
|
|
2890
|
-
for (const id of [..._nullishCoalesce(f.comments, () => ( []))].reverse()) html = `<span data-comment-id="${
|
|
2891
|
-
if (f.href) html = `<a href="${
|
|
2894
|
+
for (const id of [..._nullishCoalesce(f.comments, () => ( []))].reverse()) html = `<span data-comment-id="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, id)}">${html}</span>`;
|
|
2895
|
+
if (f.href) html = `<a href="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, f.href)}">${html}</a>`;
|
|
2892
2896
|
return html;
|
|
2893
2897
|
}
|
|
2894
2898
|
function renderSegments(segments, code = false) {
|
|
@@ -2900,9 +2904,9 @@ function renderSegments(segments, code = false) {
|
|
|
2900
2904
|
let j = i;
|
|
2901
2905
|
for (; j < segments.length && formatKey(segments[j].format) === key; j++) {
|
|
2902
2906
|
const seg = segments[j];
|
|
2903
|
-
if (seg.kind === "text") inner +=
|
|
2907
|
+
if (seg.kind === "text") inner += _chunk66IMF6ODcjs.escapeHtml.call(void 0, seg.text);
|
|
2904
2908
|
else if (seg.kind === "br") inner += code ? "\n" : "<br>";
|
|
2905
|
-
else if (seg.kind === "img") inner += code ? "" : `<img src="${
|
|
2909
|
+
else if (seg.kind === "img") inner += code ? "" : `<img src="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, seg.src)}" alt="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, seg.alt)}">`;
|
|
2906
2910
|
else inner += `<sup>${seg.n}</sup>`;
|
|
2907
2911
|
}
|
|
2908
2912
|
const format = segments[i].format;
|
|
@@ -3239,7 +3243,7 @@ function blockChangeAttr(pPr, ctx) {
|
|
|
3239
3243
|
createdAt: dateOf(attr(change, "date")),
|
|
3240
3244
|
previous
|
|
3241
3245
|
};
|
|
3242
|
-
return ` data-block-change="${
|
|
3246
|
+
return ` data-block-change="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, JSON.stringify(record))}"`;
|
|
3243
3247
|
}
|
|
3244
3248
|
function renderBlocks(container, ctx, part, topLevel = false) {
|
|
3245
3249
|
let html = "";
|
|
@@ -3281,7 +3285,7 @@ function renderBlocks(container, ctx, part, topLevel = false) {
|
|
|
3281
3285
|
const task = list && !list.ordered ? renderer.takeTaskGlyph() : void 0;
|
|
3282
3286
|
const inner = renderer.html();
|
|
3283
3287
|
const mappedStyle = styleId ? ctx.styleIds.get(styleId) : void 0;
|
|
3284
|
-
const styleAttr = !heading && !list && mappedStyle && mappedStyle !== _chunk3CC7OPUQcjs.NORMAL_STYLE_ID ? ` data-style="${
|
|
3288
|
+
const styleAttr = !heading && !list && mappedStyle && mappedStyle !== _chunk3CC7OPUQcjs.NORMAL_STYLE_ID ? ` data-style="${_chunk66IMF6ODcjs.escapeHtml.call(void 0, mappedStyle)}"` : "";
|
|
3285
3289
|
const changeAttr = topLevel && !list && ctx.tracked === "marks" ? blockChangeAttr(pPr, ctx) : "";
|
|
3286
3290
|
const blockHtml = heading ? `<h${heading}${changeAttr}>${inner}</h${heading}>` : `<p${styleAttr}${changeAttr}>${inner}</p>`;
|
|
3287
3291
|
if (!list) {
|
|
@@ -3455,8 +3459,8 @@ async function docxToDocumentImport(data, options = {}) {
|
|
|
3455
3459
|
}
|
|
3456
3460
|
html += `<hr><ol>${notesHtml}</ol>`;
|
|
3457
3461
|
}
|
|
3458
|
-
const sanitized =
|
|
3459
|
-
const result = { html: sanitized, text:
|
|
3462
|
+
const sanitized = _chunkHNDSPZ5Tcjs.sanitizeImportedHtml.call(void 0, html);
|
|
3463
|
+
const result = { html: sanitized, text: _chunk66IMF6ODcjs.htmlToPlainText.call(void 0, sanitized) };
|
|
3460
3464
|
if (threads.length) result.comments = { version: 1, threads };
|
|
3461
3465
|
if (useStyles) {
|
|
3462
3466
|
const definitions = styleDefinitions(styles, styleIds);
|
|
@@ -3487,7 +3491,7 @@ var markdownImportAdapter = {
|
|
|
3487
3491
|
target: "document",
|
|
3488
3492
|
async import(_input, context) {
|
|
3489
3493
|
const text = await context.readText();
|
|
3490
|
-
return { html:
|
|
3494
|
+
return { html: _chunk66IMF6ODcjs.markdownToTipTapHtml.call(void 0, text), text };
|
|
3491
3495
|
}
|
|
3492
3496
|
};
|
|
3493
3497
|
var htmlImportAdapter = {
|
|
@@ -3497,8 +3501,8 @@ var htmlImportAdapter = {
|
|
|
3497
3501
|
extensions: [".html", ".htm", ".xhtml"],
|
|
3498
3502
|
target: "document",
|
|
3499
3503
|
async import(_input, context) {
|
|
3500
|
-
const html =
|
|
3501
|
-
return { html, text:
|
|
3504
|
+
const html = _chunkHNDSPZ5Tcjs.sanitizeImportedHtml.call(void 0, await context.readText());
|
|
3505
|
+
return { html, text: _chunk66IMF6ODcjs.htmlToPlainText.call(void 0, html) };
|
|
3502
3506
|
}
|
|
3503
3507
|
};
|
|
3504
3508
|
var plainTextImportAdapter = {
|
|
@@ -3509,7 +3513,7 @@ var plainTextImportAdapter = {
|
|
|
3509
3513
|
target: "document",
|
|
3510
3514
|
async import(_input, context) {
|
|
3511
3515
|
const text = (await context.readText()).replace(/\r\n?/g, "\n");
|
|
3512
|
-
return { html:
|
|
3516
|
+
return { html: _chunkHNDSPZ5Tcjs.plainTextToParagraphHtml.call(void 0, text), text };
|
|
3513
3517
|
}
|
|
3514
3518
|
};
|
|
3515
3519
|
var rtfImportAdapter = {
|
|
@@ -3519,8 +3523,8 @@ var rtfImportAdapter = {
|
|
|
3519
3523
|
extensions: [".rtf"],
|
|
3520
3524
|
target: "document",
|
|
3521
3525
|
async import(_input, context) {
|
|
3522
|
-
const text =
|
|
3523
|
-
return { html:
|
|
3526
|
+
const text = _chunkHNDSPZ5Tcjs.rtfToPlainText.call(void 0, await context.readText());
|
|
3527
|
+
return { html: _chunkHNDSPZ5Tcjs.plainTextToParagraphHtml.call(void 0, text), text };
|
|
3524
3528
|
}
|
|
3525
3529
|
};
|
|
3526
3530
|
var BUILT_IN_IMPORT_ADAPTERS = [
|
|
@@ -3574,7 +3578,16 @@ function insertImportedDocument(target, content, options = {}) {
|
|
|
3574
3578
|
if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
|
|
3575
3579
|
from = to = _state.Selection.near(state.doc.resolve(from)).from;
|
|
3576
3580
|
}
|
|
3577
|
-
|
|
3581
|
+
if (htmlSlice && _chunkMC2LQN5Scjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkMC2LQN5Scjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
|
|
3582
|
+
const tr2 = state.tr;
|
|
3583
|
+
const end2 = _chunkMC2LQN5Scjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
|
|
3584
|
+
if (end2 !== null) {
|
|
3585
|
+
if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
|
|
3586
|
+
view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
|
|
3587
|
+
return end2;
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
const tr = htmlSlice ? state.tr.replaceRange(from, to, htmlSlice) : state.tr.replace(from, to, _chunk66IMF6ODcjs.plainTextToSlice.call(void 0, content.text, state.schema));
|
|
3578
3591
|
const end = tr.mapping.map(to, 1);
|
|
3579
3592
|
view.dispatch(tr.scrollIntoView().setMeta("uiEvent", "drop"));
|
|
3580
3593
|
return end;
|
|
@@ -3703,7 +3716,7 @@ var richClipboardPluginKey = new (0, _state.PluginKey)("richClipboard");
|
|
|
3703
3716
|
function writeRichClipboard(view, event, options = {}) {
|
|
3704
3717
|
const { state } = view;
|
|
3705
3718
|
if (state.selection.empty) return false;
|
|
3706
|
-
const data =
|
|
3719
|
+
const data = _chunkHNDSPZ5Tcjs.getClipboardData.call(void 0, event);
|
|
3707
3720
|
if (!data || typeof data.setData !== "function") return false;
|
|
3708
3721
|
const slice = state.selection.content();
|
|
3709
3722
|
const { dom, text } = view.serializeForClipboard(slice);
|
|
@@ -3711,7 +3724,7 @@ function writeRichClipboard(view, event, options = {}) {
|
|
|
3711
3724
|
_optionalChain([data, 'access', _146 => _146.clearData, 'optionalCall', _147 => _147()]);
|
|
3712
3725
|
data.setData("text/html", dom.innerHTML);
|
|
3713
3726
|
data.setData("text/plain", text);
|
|
3714
|
-
data.setData(_nullishCoalesce(options.mimeType, () => (
|
|
3727
|
+
data.setData(_nullishCoalesce(options.mimeType, () => ( _chunkHNDSPZ5Tcjs.PIXERATE_DOCUMENT_MIME)), _chunkHNDSPZ5Tcjs.serializeRichClipboardPayload.call(void 0, slice, state.schema));
|
|
3715
3728
|
if (options.cut && view.editable) {
|
|
3716
3729
|
view.dispatch(state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
3717
3730
|
}
|
|
@@ -3721,7 +3734,7 @@ var RichClipboard = _core.Extension.create({
|
|
|
3721
3734
|
name: "richClipboard",
|
|
3722
3735
|
addOptions() {
|
|
3723
3736
|
return {
|
|
3724
|
-
mimeType:
|
|
3737
|
+
mimeType: _chunkHNDSPZ5Tcjs.PIXERATE_DOCUMENT_MIME,
|
|
3725
3738
|
plainTextMode: false
|
|
3726
3739
|
};
|
|
3727
3740
|
},
|
|
@@ -3729,7 +3742,7 @@ var RichClipboard = _core.Extension.create({
|
|
|
3729
3742
|
return { plainTextMode: !!this.options.plainTextMode };
|
|
3730
3743
|
},
|
|
3731
3744
|
addProseMirrorPlugins() {
|
|
3732
|
-
const mimeType = _nullishCoalesce(this.options.mimeType, () => (
|
|
3745
|
+
const mimeType = _nullishCoalesce(this.options.mimeType, () => ( _chunkHNDSPZ5Tcjs.PIXERATE_DOCUMENT_MIME));
|
|
3733
3746
|
const storage = this.storage;
|
|
3734
3747
|
return [
|
|
3735
3748
|
new (0, _state.Plugin)({
|
|
@@ -3741,9 +3754,10 @@ var RichClipboard = _core.Extension.create({
|
|
|
3741
3754
|
},
|
|
3742
3755
|
handlePaste(view, event) {
|
|
3743
3756
|
if (storage.plainTextMode) return false;
|
|
3744
|
-
const slice =
|
|
3757
|
+
const slice = _chunkHNDSPZ5Tcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
|
|
3745
3758
|
if (!slice) return false;
|
|
3746
3759
|
event.preventDefault();
|
|
3760
|
+
if (_chunkMC2LQN5Scjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
|
|
3747
3761
|
view.dispatch(
|
|
3748
3762
|
view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
|
|
3749
3763
|
);
|
|
@@ -7194,7 +7208,7 @@ function createRichTextPreset(options = {}) {
|
|
|
7194
7208
|
})
|
|
7195
7209
|
];
|
|
7196
7210
|
if (options.table !== false) {
|
|
7197
|
-
extensions2.push(...
|
|
7211
|
+
extensions2.push(..._chunkMC2LQN5Scjs.createTableExtensions.call(void 0, optionObject(options.table)));
|
|
7198
7212
|
}
|
|
7199
7213
|
if (characterLimit) {
|
|
7200
7214
|
extensions2.push(
|
|
@@ -7447,8 +7461,8 @@ var PARAMS = {
|
|
|
7447
7461
|
insertTable: {
|
|
7448
7462
|
type: "object",
|
|
7449
7463
|
properties: {
|
|
7450
|
-
rows: { type: "integer", minimum: 1, maximum:
|
|
7451
|
-
cols: { type: "integer", minimum: 1, maximum:
|
|
7464
|
+
rows: { type: "integer", minimum: 1, maximum: _chunkMC2LQN5Scjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
|
|
7465
|
+
cols: { type: "integer", minimum: 1, maximum: _chunkMC2LQN5Scjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
|
|
7452
7466
|
withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
|
|
7453
7467
|
},
|
|
7454
7468
|
additionalProperties: false
|
|
@@ -7479,7 +7493,7 @@ function createTableCommands(editor, options = {}) {
|
|
|
7479
7493
|
const group = _nullishCoalesce(options.group, () => ( "Table"));
|
|
7480
7494
|
const scope = options.scope ? { scope: options.scope } : {};
|
|
7481
7495
|
const focus = _nullishCoalesce(options.focus, () => ( true));
|
|
7482
|
-
return
|
|
7496
|
+
return _chunkMC2LQN5Scjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
|
|
7483
7497
|
const params = PARAMS[action];
|
|
7484
7498
|
return {
|
|
7485
7499
|
id: `${prefix}${action}`,
|
|
@@ -7489,13 +7503,13 @@ function createTableCommands(editor, options = {}) {
|
|
|
7489
7503
|
description,
|
|
7490
7504
|
...params ? { params } : {},
|
|
7491
7505
|
...scope,
|
|
7492
|
-
enabled: (_ctx, p) =>
|
|
7506
|
+
enabled: (_ctx, p) => _chunkMC2LQN5Scjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
|
|
7493
7507
|
run: (_ctx, p) => {
|
|
7494
|
-
if (!
|
|
7495
|
-
const reason =
|
|
7508
|
+
if (!_chunkMC2LQN5Scjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
|
|
7509
|
+
const reason = _chunkMC2LQN5Scjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
|
|
7496
7510
|
throw new Error(reason === true ? `${label} did not change the document.` : reason);
|
|
7497
7511
|
}
|
|
7498
|
-
const state =
|
|
7512
|
+
const state = _chunkMC2LQN5Scjs.getTableState.call(void 0, editor);
|
|
7499
7513
|
return {
|
|
7500
7514
|
done: true,
|
|
7501
7515
|
table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null
|
|
@@ -7637,4 +7651,4 @@ function createTableCommands(editor, options = {}) {
|
|
|
7637
7651
|
|
|
7638
7652
|
|
|
7639
7653
|
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.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.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;
|
|
7640
|
-
//# sourceMappingURL=chunk-
|
|
7654
|
+
//# sourceMappingURL=chunk-AGR7EVRW.cjs.map
|