@harbour-enterprises/superdoc 0.21.0 → 0.21.2
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/chunks/{PdfViewer-D3zo7tPo.es.js → PdfViewer-B8NGBTSu.es.js} +1 -1
- package/dist/chunks/{PdfViewer-OZDJ7gwT.cjs → PdfViewer-BI_j6JKS.cjs} +1 -1
- package/dist/chunks/{index-MzW5BVNd.es.js → index-CBHfvgkG.es.js} +42 -21
- package/dist/chunks/{index-CfYf4T_z.cjs → index-tTdOfgF_.cjs} +42 -21
- package/dist/chunks/{super-editor.es-U-GVCd_F.cjs → super-editor.es-BHEMJ9ST.cjs} +1595 -866
- package/dist/chunks/{super-editor.es-Bntob7Wd.es.js → super-editor.es-BIEh7qVW.es.js} +1595 -866
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +12 -4
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +47 -27
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-3xnF_NHq.js → converter-D7lP9y8P.js} +1064 -710
- package/dist/super-editor/chunks/{docx-zipper-CZdELYi-.js → docx-zipper-_TMbHpUQ.js} +73 -12
- package/dist/super-editor/chunks/{editor-BqYH4kDD.js → editor-BuT5uWdz.js} +80 -26
- package/dist/super-editor/chunks/{toolbar-TkaE2kKM.js → toolbar-6ZwZPyNU.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/components/slash-menu/menuItems.d.ts +5 -1
- package/dist/super-editor/src/components/slash-menu/tests/testHelpers.d.ts +466 -0
- package/dist/super-editor/src/components/slash-menu/utils.d.ts +9 -2
- package/dist/super-editor/src/core/DocxZipper.d.ts +1 -1
- package/dist/super-editor/src/core/commands/__tests__/schemaWithLists.d.ts +2 -0
- package/dist/super-editor/src/core/commands/__tests__/testHelpers.d.ts +4 -0
- package/dist/super-editor/src/core/commands/__tests__/testSchema.d.ts +2 -0
- package/dist/super-editor/src/core/commands/tests/commandTestUtils.d.ts +7 -0
- package/dist/super-editor/src/core/commands/tests/test-schema.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +1 -13
- package/dist/super-editor/src/core/super-converter/exporter.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/helpers/tableFallbackHelpers.d.ts +24 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +5 -0
- package/dist/super-editor/src/tests/helpers/helpers.d.ts +1 -0
- package/dist/super-editor/src/utils/contextmenu-helpers.d.ts +24 -0
- package/dist/super-editor/style.css +20 -0
- package/dist/super-editor/super-editor.es.js +454 -154
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +1635 -885
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -5
- package/dist/super-editor/src/extensions/run-item/index.d.ts +0 -1
- package/dist/super-editor/src/extensions/run-item/run-item.d.ts +0 -26
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import {
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { n, C, o, T, l, p, m } from "./chunks/editor-
|
|
12
|
+
import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, b2 as translator$q, b3 as translator$r, b4 as translator$s, b5 as translator$t, b6 as translator$u, b7 as translator$v, b8 as translator$w, b9 as translator$x, ba as translator$y, bb as translator$z, bc as translator$A, bd as translator$B, be as translator$C, bf as translator$D, bg as translator$E, bh as translator$F, bi as translator$G, bj as translator$H, bk as translator$I, bl as translator$J, bm as translator$K, bn as translator$L, bo as translator$M, bp as translator$N, bq as translator$O, br as translator$P, bs as translator$Q, bt as translator$R, bu as translator$S, bv as translator$T, bw as translator$U, bx as translator$V, by as translator$W, bz as translator$X, bA as translator$Y, bB as translator$Z, bC as translator$_, bD as translator$$, bE as translator$10, a as Plugin } from "./chunks/converter-D7lP9y8P.js";
|
|
13
|
+
import { bF, a5, i, a2 } from "./chunks/converter-D7lP9y8P.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-BuT5uWdz.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-BuT5uWdz.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-6ZwZPyNU.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-_TMbHpUQ.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -2584,7 +2584,7 @@ class SuperToolbar extends EventEmitter {
|
|
|
2584
2584
|
if (!argument) return;
|
|
2585
2585
|
item.onActivate({ zoom: argument });
|
|
2586
2586
|
this.emit("superdoc-command", { item, argument });
|
|
2587
|
-
const layers =
|
|
2587
|
+
const layers = this.superdoc.element?.querySelector(".layers");
|
|
2588
2588
|
if (!layers) return;
|
|
2589
2589
|
const isMobileDevice = typeof screen.orientation !== "undefined";
|
|
2590
2590
|
const isSmallScreen = window.matchMedia("(max-width: 834px)").matches;
|
|
@@ -3208,6 +3208,115 @@ runCommandWithArgumentOnly_fn = function({ item, argument, noArgumentCallback =
|
|
|
3208
3208
|
this.updateToolbarState();
|
|
3209
3209
|
}
|
|
3210
3210
|
};
|
|
3211
|
+
const onMarginClickCursorChange = (event, editor) => {
|
|
3212
|
+
const y = event.clientY;
|
|
3213
|
+
const x = event.clientX;
|
|
3214
|
+
const { view } = editor;
|
|
3215
|
+
const editorRect = view.dom.getBoundingClientRect();
|
|
3216
|
+
let coords = {
|
|
3217
|
+
left: 0,
|
|
3218
|
+
top: y
|
|
3219
|
+
};
|
|
3220
|
+
let isRightMargin = false;
|
|
3221
|
+
if (x > editorRect.right) {
|
|
3222
|
+
coords.left = editorRect.left + editorRect.width - 1;
|
|
3223
|
+
isRightMargin = true;
|
|
3224
|
+
} else if (x < editorRect.left) {
|
|
3225
|
+
coords.left = editorRect.left;
|
|
3226
|
+
}
|
|
3227
|
+
const pos = view.posAtCoords(coords)?.pos;
|
|
3228
|
+
if (pos) {
|
|
3229
|
+
let cursorPos = pos;
|
|
3230
|
+
if (isRightMargin) {
|
|
3231
|
+
const $pos = view.state.doc.resolve(pos);
|
|
3232
|
+
const charOffset = $pos.textOffset;
|
|
3233
|
+
const node = view.state.doc.nodeAt(pos);
|
|
3234
|
+
const text = node?.text;
|
|
3235
|
+
const charAtPos = text?.charAt(charOffset);
|
|
3236
|
+
cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
|
|
3237
|
+
}
|
|
3238
|
+
const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
|
|
3239
|
+
view.dispatch(transaction);
|
|
3240
|
+
view.focus();
|
|
3241
|
+
}
|
|
3242
|
+
};
|
|
3243
|
+
const checkNodeSpecificClicks = (editor, event, popoverControls) => {
|
|
3244
|
+
if (!editor) return;
|
|
3245
|
+
if (selectionHasNodeOrMark(editor.view.state, "link", { requireEnds: true })) {
|
|
3246
|
+
popoverControls.component = LinkInput;
|
|
3247
|
+
popoverControls.position = {
|
|
3248
|
+
left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
|
|
3249
|
+
top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
|
|
3250
|
+
};
|
|
3251
|
+
popoverControls.props = {
|
|
3252
|
+
showInput: true
|
|
3253
|
+
};
|
|
3254
|
+
popoverControls.visible = true;
|
|
3255
|
+
}
|
|
3256
|
+
};
|
|
3257
|
+
function selectionHasNodeOrMark(state, name, options = {}) {
|
|
3258
|
+
const { requireEnds = false } = options;
|
|
3259
|
+
const $from = state.selection.$from;
|
|
3260
|
+
const $to = state.selection.$to;
|
|
3261
|
+
if (requireEnds) {
|
|
3262
|
+
for (let d = $from.depth; d > 0; d--) {
|
|
3263
|
+
if ($from.node(d).type.name === name) {
|
|
3264
|
+
return true;
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
for (let d = $to.depth; d > 0; d--) {
|
|
3268
|
+
if ($to.node(d).type.name === name) {
|
|
3269
|
+
return true;
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
} else {
|
|
3273
|
+
for (let d = $from.depth; d > 0; d--) {
|
|
3274
|
+
if ($from.node(d).type.name === name) {
|
|
3275
|
+
return true;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
const markType = state.schema.marks[name];
|
|
3280
|
+
if (markType) {
|
|
3281
|
+
const { from, to, empty } = state.selection;
|
|
3282
|
+
if (requireEnds) {
|
|
3283
|
+
const fromMarks = markType.isInSet($from.marks());
|
|
3284
|
+
const toMarks = markType.isInSet($to.marks());
|
|
3285
|
+
if (fromMarks || toMarks) {
|
|
3286
|
+
return true;
|
|
3287
|
+
}
|
|
3288
|
+
if (empty && markType.isInSet(state.storedMarks || $from.marks())) {
|
|
3289
|
+
return true;
|
|
3290
|
+
}
|
|
3291
|
+
} else {
|
|
3292
|
+
if (empty) {
|
|
3293
|
+
if (markType.isInSet(state.storedMarks || $from.marks())) {
|
|
3294
|
+
return true;
|
|
3295
|
+
}
|
|
3296
|
+
} else {
|
|
3297
|
+
let hasMark = false;
|
|
3298
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
3299
|
+
if (markType.isInSet(node.marks)) {
|
|
3300
|
+
hasMark = true;
|
|
3301
|
+
return false;
|
|
3302
|
+
}
|
|
3303
|
+
});
|
|
3304
|
+
if (hasMark) return true;
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
}
|
|
3308
|
+
return false;
|
|
3309
|
+
}
|
|
3310
|
+
function moveCursorToMouseEvent(event, editor) {
|
|
3311
|
+
const { view } = editor;
|
|
3312
|
+
const coords = { left: event.clientX, top: event.clientY };
|
|
3313
|
+
const pos = view.posAtCoords(coords)?.pos;
|
|
3314
|
+
if (typeof pos === "number") {
|
|
3315
|
+
const tr = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, pos));
|
|
3316
|
+
view.dispatch(tr);
|
|
3317
|
+
view.focus();
|
|
3318
|
+
}
|
|
3319
|
+
}
|
|
3211
3320
|
const ICONS = {
|
|
3212
3321
|
addRowBefore: plusIconSvg,
|
|
3213
3322
|
addRowAfter: plusIconSvg,
|
|
@@ -3407,6 +3516,30 @@ const getPropsByItemId = (itemId, props) => {
|
|
|
3407
3516
|
return baseProps;
|
|
3408
3517
|
}
|
|
3409
3518
|
};
|
|
3519
|
+
function normalizeClipboardContent(rawClipboardContent) {
|
|
3520
|
+
if (!rawClipboardContent) {
|
|
3521
|
+
return {
|
|
3522
|
+
html: null,
|
|
3523
|
+
text: null,
|
|
3524
|
+
hasContent: false,
|
|
3525
|
+
raw: null
|
|
3526
|
+
};
|
|
3527
|
+
}
|
|
3528
|
+
const html = typeof rawClipboardContent.html === "string" ? rawClipboardContent.html : null;
|
|
3529
|
+
const text = typeof rawClipboardContent.text === "string" ? rawClipboardContent.text : null;
|
|
3530
|
+
const hasHtml = !!html && html.trim().length > 0;
|
|
3531
|
+
const hasText = !!text && text.length > 0;
|
|
3532
|
+
const isObject = typeof rawClipboardContent === "object" && rawClipboardContent !== null;
|
|
3533
|
+
const fragmentSize = typeof rawClipboardContent.size === "number" ? rawClipboardContent.size : null;
|
|
3534
|
+
const nestedSize = isObject && rawClipboardContent.content && typeof rawClipboardContent.content.size === "number" ? rawClipboardContent.content.size : null;
|
|
3535
|
+
const hasFragmentContent = (fragmentSize ?? nestedSize ?? 0) > 0;
|
|
3536
|
+
return {
|
|
3537
|
+
html,
|
|
3538
|
+
text,
|
|
3539
|
+
hasContent: hasHtml || hasText || hasFragmentContent,
|
|
3540
|
+
raw: rawClipboardContent
|
|
3541
|
+
};
|
|
3542
|
+
}
|
|
3410
3543
|
async function getEditorContext(editor, event) {
|
|
3411
3544
|
const { view } = editor;
|
|
3412
3545
|
const { state } = view;
|
|
@@ -3422,123 +3555,144 @@ async function getEditorContext(editor, event) {
|
|
|
3422
3555
|
pos = from;
|
|
3423
3556
|
node = state.doc.nodeAt(pos);
|
|
3424
3557
|
}
|
|
3425
|
-
const
|
|
3558
|
+
const rawClipboardContent = await readFromClipboard(state);
|
|
3559
|
+
const clipboardContent = normalizeClipboardContent(rawClipboardContent);
|
|
3560
|
+
const structureFromResolvedPos = pos !== null ? getStructureFromResolvedPos(state, pos) : null;
|
|
3561
|
+
const isInTable2 = structureFromResolvedPos?.isInTable ?? selectionHasNodeOrMark(state, "table", { requireEnds: true });
|
|
3562
|
+
const isInList = structureFromResolvedPos?.isInList ?? (selectionHasNodeOrMark(state, "bulletList", { requireEnds: false }) || selectionHasNodeOrMark(state, "orderedList", { requireEnds: false }));
|
|
3563
|
+
const isInSectionNode = structureFromResolvedPos?.isInSectionNode ?? selectionHasNodeOrMark(state, "documentSection", { requireEnds: true });
|
|
3564
|
+
const currentNodeType = node?.type?.name || null;
|
|
3565
|
+
const activeMarks = [];
|
|
3566
|
+
if (event && pos !== null) {
|
|
3567
|
+
const $pos = state.doc.resolve(pos);
|
|
3568
|
+
if ($pos.marks && typeof $pos.marks === "function") {
|
|
3569
|
+
$pos.marks().forEach((mark) => activeMarks.push(mark.type.name));
|
|
3570
|
+
}
|
|
3571
|
+
if (node && node.marks) {
|
|
3572
|
+
node.marks.forEach((mark) => activeMarks.push(mark.type.name));
|
|
3573
|
+
}
|
|
3574
|
+
} else {
|
|
3575
|
+
state.storedMarks?.forEach((mark) => activeMarks.push(mark.type.name));
|
|
3576
|
+
state.selection.$head.marks().forEach((mark) => activeMarks.push(mark.type.name));
|
|
3577
|
+
}
|
|
3578
|
+
const isTrackedChange = activeMarks.includes("trackInsert") || activeMarks.includes("trackDelete");
|
|
3579
|
+
let trackedChangeId = null;
|
|
3580
|
+
if (isTrackedChange && event && pos !== null) {
|
|
3581
|
+
const $pos = state.doc.resolve(pos);
|
|
3582
|
+
const marksAtPos = $pos.marks();
|
|
3583
|
+
const trackedMark = marksAtPos.find((mark) => mark.type.name === "trackInsert" || mark.type.name === "trackDelete");
|
|
3584
|
+
if (trackedMark) {
|
|
3585
|
+
trackedChangeId = trackedMark.attrs.id;
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
const cursorCoords = pos ? view.coordsAtPos(pos) : null;
|
|
3589
|
+
const cursorPosition = cursorCoords ? {
|
|
3590
|
+
x: cursorCoords.left,
|
|
3591
|
+
y: cursorCoords.top
|
|
3592
|
+
} : null;
|
|
3426
3593
|
return {
|
|
3427
|
-
|
|
3594
|
+
// Selection info
|
|
3428
3595
|
selectedText,
|
|
3596
|
+
hasSelection: !empty,
|
|
3597
|
+
selectionStart: from,
|
|
3598
|
+
selectionEnd: to,
|
|
3599
|
+
// Document structure
|
|
3600
|
+
isInTable: isInTable2,
|
|
3601
|
+
isInList,
|
|
3602
|
+
isInSectionNode,
|
|
3603
|
+
currentNodeType,
|
|
3604
|
+
activeMarks,
|
|
3605
|
+
// Document state
|
|
3606
|
+
isTrackedChange,
|
|
3607
|
+
trackedChangeId,
|
|
3608
|
+
documentMode: editor.options?.documentMode || "editing",
|
|
3609
|
+
canUndo: computeCanUndo(editor, state),
|
|
3610
|
+
canRedo: computeCanRedo(editor, state),
|
|
3611
|
+
isEditable: editor.isEditable,
|
|
3612
|
+
// Clipboard
|
|
3613
|
+
clipboardContent,
|
|
3614
|
+
// Position and trigger info
|
|
3615
|
+
cursorPosition,
|
|
3429
3616
|
pos,
|
|
3430
3617
|
node,
|
|
3431
3618
|
event,
|
|
3432
|
-
|
|
3619
|
+
// Editor reference for advanced use cases
|
|
3620
|
+
editor
|
|
3433
3621
|
};
|
|
3434
3622
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
if (x > editorRect.right) {
|
|
3446
|
-
coords.left = editorRect.left + editorRect.width - 1;
|
|
3447
|
-
isRightMargin = true;
|
|
3448
|
-
} else if (x < editorRect.left) {
|
|
3449
|
-
coords.left = editorRect.left;
|
|
3623
|
+
function computeCanUndo(editor, state) {
|
|
3624
|
+
if (typeof editor?.can === "function") {
|
|
3625
|
+
try {
|
|
3626
|
+
const can = editor.can();
|
|
3627
|
+
if (can && typeof can.undo === "function") {
|
|
3628
|
+
return !!can.undo();
|
|
3629
|
+
}
|
|
3630
|
+
} catch (error) {
|
|
3631
|
+
console.warn("[SlashMenu] Unable to determine undo availability via editor.can():", error);
|
|
3632
|
+
}
|
|
3450
3633
|
}
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
const node = view.state.doc.nodeAt(pos);
|
|
3458
|
-
const text = node?.text;
|
|
3459
|
-
const charAtPos = text?.charAt(charOffset);
|
|
3460
|
-
cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
|
|
3634
|
+
if (isCollaborationEnabled(editor)) {
|
|
3635
|
+
try {
|
|
3636
|
+
const undoManager = yUndoPluginKey.getState(state)?.undoManager;
|
|
3637
|
+
return !!undoManager && undoManager.undoStack.length > 0;
|
|
3638
|
+
} catch (error) {
|
|
3639
|
+
console.warn("[SlashMenu] Unable to determine undo availability via y-prosemirror:", error);
|
|
3461
3640
|
}
|
|
3462
|
-
const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
|
|
3463
|
-
view.dispatch(transaction);
|
|
3464
|
-
view.focus();
|
|
3465
3641
|
}
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
popoverControls.position = {
|
|
3472
|
-
left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
|
|
3473
|
-
top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
|
|
3474
|
-
};
|
|
3475
|
-
popoverControls.props = {
|
|
3476
|
-
showInput: true
|
|
3477
|
-
};
|
|
3478
|
-
popoverControls.visible = true;
|
|
3642
|
+
try {
|
|
3643
|
+
return undoDepth(state) > 0;
|
|
3644
|
+
} catch (error) {
|
|
3645
|
+
console.warn("[SlashMenu] Unable to determine undo availability via history plugin:", error);
|
|
3646
|
+
return false;
|
|
3479
3647
|
}
|
|
3480
|
-
}
|
|
3481
|
-
function
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
if ($from.node(d).type.name === name) {
|
|
3488
|
-
return true;
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
3491
|
-
for (let d = $to.depth; d > 0; d--) {
|
|
3492
|
-
if ($to.node(d).type.name === name) {
|
|
3493
|
-
return true;
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
} else {
|
|
3497
|
-
for (let d = $from.depth; d > 0; d--) {
|
|
3498
|
-
if ($from.node(d).type.name === name) {
|
|
3499
|
-
return true;
|
|
3648
|
+
}
|
|
3649
|
+
function computeCanRedo(editor, state) {
|
|
3650
|
+
if (typeof editor?.can === "function") {
|
|
3651
|
+
try {
|
|
3652
|
+
const can = editor.can();
|
|
3653
|
+
if (can && typeof can.redo === "function") {
|
|
3654
|
+
return !!can.redo();
|
|
3500
3655
|
}
|
|
3656
|
+
} catch (error) {
|
|
3657
|
+
console.warn("[SlashMenu] Unable to determine redo availability via editor.can():", error);
|
|
3501
3658
|
}
|
|
3502
3659
|
}
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
if (fromMarks || toMarks) {
|
|
3510
|
-
return true;
|
|
3511
|
-
}
|
|
3512
|
-
if (empty && markType.isInSet(state.storedMarks || $from.marks())) {
|
|
3513
|
-
return true;
|
|
3514
|
-
}
|
|
3515
|
-
} else {
|
|
3516
|
-
if (empty) {
|
|
3517
|
-
if (markType.isInSet(state.storedMarks || $from.marks())) {
|
|
3518
|
-
return true;
|
|
3519
|
-
}
|
|
3520
|
-
} else {
|
|
3521
|
-
let hasMark = false;
|
|
3522
|
-
state.doc.nodesBetween(from, to, (node) => {
|
|
3523
|
-
if (markType.isInSet(node.marks)) {
|
|
3524
|
-
hasMark = true;
|
|
3525
|
-
return false;
|
|
3526
|
-
}
|
|
3527
|
-
});
|
|
3528
|
-
if (hasMark) return true;
|
|
3529
|
-
}
|
|
3660
|
+
if (isCollaborationEnabled(editor)) {
|
|
3661
|
+
try {
|
|
3662
|
+
const undoManager = yUndoPluginKey.getState(state)?.undoManager;
|
|
3663
|
+
return !!undoManager && undoManager.redoStack.length > 0;
|
|
3664
|
+
} catch (error) {
|
|
3665
|
+
console.warn("[SlashMenu] Unable to determine redo availability via y-prosemirror:", error);
|
|
3530
3666
|
}
|
|
3531
3667
|
}
|
|
3532
|
-
|
|
3668
|
+
try {
|
|
3669
|
+
return redoDepth(state) > 0;
|
|
3670
|
+
} catch (error) {
|
|
3671
|
+
console.warn("[SlashMenu] Unable to determine redo availability via history plugin:", error);
|
|
3672
|
+
return false;
|
|
3673
|
+
}
|
|
3533
3674
|
}
|
|
3534
|
-
function
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3541
|
-
|
|
3675
|
+
function isCollaborationEnabled(editor) {
|
|
3676
|
+
return Boolean(editor?.options?.collaborationProvider && editor?.options?.ydoc);
|
|
3677
|
+
}
|
|
3678
|
+
function getStructureFromResolvedPos(state, pos) {
|
|
3679
|
+
try {
|
|
3680
|
+
const $pos = state.doc.resolve(pos);
|
|
3681
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
3682
|
+
for (let depth = $pos.depth; depth > 0; depth--) {
|
|
3683
|
+
ancestors.add($pos.node(depth).type.name);
|
|
3684
|
+
}
|
|
3685
|
+
const isInList = ancestors.has("bulletList") || ancestors.has("orderedList");
|
|
3686
|
+
const isInTable2 = ancestors.has("table") || ancestors.has("tableRow") || ancestors.has("tableCell") || ancestors.has("tableHeader");
|
|
3687
|
+
const isInSectionNode = ancestors.has("documentSection");
|
|
3688
|
+
return {
|
|
3689
|
+
isInTable: isInTable2,
|
|
3690
|
+
isInList,
|
|
3691
|
+
isInSectionNode
|
|
3692
|
+
};
|
|
3693
|
+
} catch (error) {
|
|
3694
|
+
console.warn("[SlashMenu] Unable to resolve position for structural context:", error);
|
|
3695
|
+
return null;
|
|
3542
3696
|
}
|
|
3543
3697
|
}
|
|
3544
3698
|
const isModuleEnabled = (editorOptions, moduleName) => {
|
|
@@ -3552,8 +3706,52 @@ const isModuleEnabled = (editorOptions, moduleName) => {
|
|
|
3552
3706
|
return true;
|
|
3553
3707
|
}
|
|
3554
3708
|
};
|
|
3709
|
+
function applyCustomMenuConfiguration(defaultSections, context) {
|
|
3710
|
+
const { editor } = context;
|
|
3711
|
+
const slashMenuConfig = editor.options?.slashMenuConfig;
|
|
3712
|
+
if (!slashMenuConfig) {
|
|
3713
|
+
return defaultSections;
|
|
3714
|
+
}
|
|
3715
|
+
let sections = [];
|
|
3716
|
+
if (slashMenuConfig.includeDefaultItems !== false) {
|
|
3717
|
+
sections = [...defaultSections];
|
|
3718
|
+
}
|
|
3719
|
+
if (slashMenuConfig.customItems && Array.isArray(slashMenuConfig.customItems)) {
|
|
3720
|
+
sections = [...sections, ...slashMenuConfig.customItems];
|
|
3721
|
+
}
|
|
3722
|
+
if (typeof slashMenuConfig.menuProvider === "function") {
|
|
3723
|
+
try {
|
|
3724
|
+
sections = slashMenuConfig.menuProvider(context, sections) || sections;
|
|
3725
|
+
} catch (error) {
|
|
3726
|
+
console.warn("[SlashMenu] Error in custom menuProvider:", error);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
return sections;
|
|
3730
|
+
}
|
|
3731
|
+
function filterCustomItems(sections, context) {
|
|
3732
|
+
return sections.map((section) => {
|
|
3733
|
+
const filteredItems = section.items.filter((item) => {
|
|
3734
|
+
if (typeof item.showWhen === "function") {
|
|
3735
|
+
try {
|
|
3736
|
+
return item.showWhen(context);
|
|
3737
|
+
} catch (error) {
|
|
3738
|
+
console.warn(`[SlashMenu] Error in showWhen for item ${item.id}:`, error);
|
|
3739
|
+
return false;
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
return true;
|
|
3743
|
+
});
|
|
3744
|
+
return {
|
|
3745
|
+
...section,
|
|
3746
|
+
items: filteredItems
|
|
3747
|
+
};
|
|
3748
|
+
}).filter((section) => section.items.length > 0);
|
|
3749
|
+
}
|
|
3555
3750
|
function getItems(context) {
|
|
3556
3751
|
const { editor, selectedText, trigger, clipboardContent } = context;
|
|
3752
|
+
const clipboardHasContent = Boolean(
|
|
3753
|
+
clipboardContent?.hasContent || clipboardContent?.html || clipboardContent?.text || typeof clipboardContent?.size === "number" && clipboardContent.size > 0 || clipboardContent && typeof clipboardContent?.content?.size === "number" && clipboardContent.content.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw.size === "number" && clipboardContent.raw.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw?.content?.size === "number" && clipboardContent.raw.content.size > 0
|
|
3754
|
+
);
|
|
3557
3755
|
const isInTable2 = selectionHasNodeOrMark(editor.view.state, "table", { requireEnds: true });
|
|
3558
3756
|
const isInSectionNode = selectionHasNodeOrMark(editor.view.state, "documentSection", { requireEnds: true });
|
|
3559
3757
|
const sections = [
|
|
@@ -3690,12 +3888,13 @@ function getItems(context) {
|
|
|
3690
3888
|
]
|
|
3691
3889
|
}
|
|
3692
3890
|
];
|
|
3693
|
-
|
|
3891
|
+
let allSections = applyCustomMenuConfiguration(sections, context);
|
|
3892
|
+
const filteredSections = allSections.map((section) => {
|
|
3694
3893
|
const filteredItems = section.items.filter((item) => {
|
|
3695
3894
|
if (item.requiresModule && !isModuleEnabled(editor?.options, item.requiresModule)) return false;
|
|
3696
3895
|
if (item.requiresSelection && !selectedText) return false;
|
|
3697
3896
|
if (!item.allowedTriggers.includes(trigger)) return false;
|
|
3698
|
-
if (item.requiresClipboard && !
|
|
3897
|
+
if (item.requiresClipboard && !clipboardHasContent) return false;
|
|
3699
3898
|
if (item.requiresTableParent && !isInTable2 || item.id === "insert-table" && isInTable2) return false;
|
|
3700
3899
|
if (item.requiresSectionParent && !isInSectionNode) return false;
|
|
3701
3900
|
return true;
|
|
@@ -3705,7 +3904,8 @@ function getItems(context) {
|
|
|
3705
3904
|
items: filteredItems
|
|
3706
3905
|
};
|
|
3707
3906
|
}).filter((section) => section.items.length > 0);
|
|
3708
|
-
|
|
3907
|
+
const finalSections = filterCustomItems(filteredSections, context);
|
|
3908
|
+
return finalSections;
|
|
3709
3909
|
}
|
|
3710
3910
|
const _hoisted_1$3 = { class: "slash-menu-items" };
|
|
3711
3911
|
const _hoisted_2$1 = {
|
|
@@ -3740,6 +3940,7 @@ const _sfc_main$4 = {
|
|
|
3740
3940
|
const menuRef = ref(null);
|
|
3741
3941
|
const sections = ref([]);
|
|
3742
3942
|
const selectedId = ref(null);
|
|
3943
|
+
const currentContext = ref(null);
|
|
3743
3944
|
const handleEditorUpdate = () => {
|
|
3744
3945
|
if (!props.editor?.isEditable && isOpen.value) {
|
|
3745
3946
|
closeMenu({ restoreCursor: false });
|
|
@@ -3785,6 +3986,44 @@ const _sfc_main$4 = {
|
|
|
3785
3986
|
selectedId.value = newItems[0].id;
|
|
3786
3987
|
}
|
|
3787
3988
|
});
|
|
3989
|
+
const customItemRefs = /* @__PURE__ */ new Map();
|
|
3990
|
+
const setCustomItemRef = (el, item) => {
|
|
3991
|
+
if (el && item.render) {
|
|
3992
|
+
customItemRefs.set(item.id, { element: el, item });
|
|
3993
|
+
nextTick(() => {
|
|
3994
|
+
renderCustomItem(item.id);
|
|
3995
|
+
});
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
const renderCustomItem = async (itemId) => {
|
|
3999
|
+
const refData = customItemRefs.get(itemId);
|
|
4000
|
+
if (!refData || refData.element.hasCustomContent) return;
|
|
4001
|
+
const { element, item } = refData;
|
|
4002
|
+
try {
|
|
4003
|
+
if (!currentContext.value) {
|
|
4004
|
+
currentContext.value = await getEditorContext(props.editor);
|
|
4005
|
+
}
|
|
4006
|
+
const context = currentContext.value;
|
|
4007
|
+
const customElement = item.render(context);
|
|
4008
|
+
if (customElement instanceof HTMLElement) {
|
|
4009
|
+
element.innerHTML = "";
|
|
4010
|
+
element.appendChild(customElement);
|
|
4011
|
+
element.hasCustomContent = true;
|
|
4012
|
+
}
|
|
4013
|
+
} catch (error) {
|
|
4014
|
+
console.warn(`[SlashMenu] Error rendering custom item ${itemId}:`, error);
|
|
4015
|
+
element.innerHTML = `<span>${item.label || "Custom Item"}</span>`;
|
|
4016
|
+
element.hasCustomContent = true;
|
|
4017
|
+
}
|
|
4018
|
+
};
|
|
4019
|
+
const cleanupCustomItems = () => {
|
|
4020
|
+
customItemRefs.forEach((refData) => {
|
|
4021
|
+
if (refData.element) {
|
|
4022
|
+
refData.element.hasCustomContent = false;
|
|
4023
|
+
}
|
|
4024
|
+
});
|
|
4025
|
+
customItemRefs.clear();
|
|
4026
|
+
};
|
|
3788
4027
|
const handleGlobalKeyDown = (event) => {
|
|
3789
4028
|
if (event.key === "Escape") {
|
|
3790
4029
|
event.preventDefault();
|
|
@@ -3830,27 +4069,27 @@ const _sfc_main$4 = {
|
|
|
3830
4069
|
};
|
|
3831
4070
|
const handleRightClick = async (event) => {
|
|
3832
4071
|
const readOnly = !props.editor?.isEditable;
|
|
3833
|
-
|
|
3834
|
-
if (readOnly || isHoldingCtrl) {
|
|
4072
|
+
if (readOnly || shouldBypassContextMenu(event)) {
|
|
3835
4073
|
return;
|
|
3836
4074
|
}
|
|
3837
4075
|
event.preventDefault();
|
|
4076
|
+
const context = await getEditorContext(props.editor, event);
|
|
4077
|
+
currentContext.value = context;
|
|
4078
|
+
sections.value = getItems({ ...context, trigger: "click" });
|
|
4079
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4080
|
+
searchQuery.value = "";
|
|
3838
4081
|
props.editor.view.dispatch(
|
|
3839
4082
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
3840
4083
|
type: "open",
|
|
3841
|
-
pos: props.editor.view.state.selection.from,
|
|
4084
|
+
pos: context?.pos ?? props.editor.view.state.selection.from,
|
|
3842
4085
|
clientX: event.clientX,
|
|
3843
4086
|
clientY: event.clientY
|
|
3844
4087
|
})
|
|
3845
4088
|
);
|
|
3846
|
-
searchQuery.value = "";
|
|
3847
|
-
const context = await getEditorContext(props.editor, event);
|
|
3848
|
-
sections.value = getItems({ ...context, trigger: "click" });
|
|
3849
|
-
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
3850
4089
|
};
|
|
3851
4090
|
const executeCommand = async (item) => {
|
|
3852
4091
|
if (props.editor) {
|
|
3853
|
-
item.action ? await item.action(props.editor) : null;
|
|
4092
|
+
item.action ? await item.action(props.editor, currentContext.value) : null;
|
|
3854
4093
|
if (item.component) {
|
|
3855
4094
|
menuRef.value;
|
|
3856
4095
|
const componentProps = getPropsByItemId(item.id, props);
|
|
@@ -3868,7 +4107,7 @@ const _sfc_main$4 = {
|
|
|
3868
4107
|
const closeMenu = (options = { restoreCursor: true }) => {
|
|
3869
4108
|
if (props.editor?.view) {
|
|
3870
4109
|
const pluginState = SlashMenuPluginKey.getState(props.editor.view.state);
|
|
3871
|
-
const
|
|
4110
|
+
const anchorPos = pluginState?.anchorPos;
|
|
3872
4111
|
props.editor.view.dispatch(
|
|
3873
4112
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
3874
4113
|
type: "close"
|
|
@@ -3881,6 +4120,8 @@ const _sfc_main$4 = {
|
|
|
3881
4120
|
props.editor.view.dispatch(tr);
|
|
3882
4121
|
props.editor.view.focus();
|
|
3883
4122
|
}
|
|
4123
|
+
cleanupCustomItems();
|
|
4124
|
+
currentContext.value = null;
|
|
3884
4125
|
isOpen.value = false;
|
|
3885
4126
|
searchQuery.value = "";
|
|
3886
4127
|
sections.value = [];
|
|
@@ -3897,19 +4138,29 @@ const _sfc_main$4 = {
|
|
|
3897
4138
|
isOpen.value = true;
|
|
3898
4139
|
menuPosition.value = event.menuPosition;
|
|
3899
4140
|
searchQuery.value = "";
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
4141
|
+
if (!currentContext.value) {
|
|
4142
|
+
const context = await getEditorContext(props.editor);
|
|
4143
|
+
currentContext.value = context;
|
|
4144
|
+
sections.value = getItems({ ...context, trigger: "slash" });
|
|
4145
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4146
|
+
} else if (sections.value.length === 0) {
|
|
4147
|
+
const trigger = currentContext.value.event?.type === "contextmenu" ? "click" : "slash";
|
|
4148
|
+
sections.value = getItems({ ...currentContext.value, trigger });
|
|
4149
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4150
|
+
}
|
|
3903
4151
|
});
|
|
3904
4152
|
props.editor.view.dom.addEventListener("contextmenu", handleRightClick);
|
|
3905
4153
|
props.editor.on("slashMenu:close", () => {
|
|
4154
|
+
cleanupCustomItems();
|
|
3906
4155
|
isOpen.value = false;
|
|
3907
4156
|
searchQuery.value = "";
|
|
4157
|
+
currentContext.value = null;
|
|
3908
4158
|
});
|
|
3909
4159
|
});
|
|
3910
4160
|
onBeforeUnmount(() => {
|
|
3911
4161
|
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
3912
4162
|
document.removeEventListener("mousedown", handleGlobalOutsideClick);
|
|
4163
|
+
cleanupCustomItems();
|
|
3913
4164
|
if (props.editor) {
|
|
3914
4165
|
try {
|
|
3915
4166
|
props.editor.off("slashMenu:open");
|
|
@@ -3956,12 +4207,19 @@ const _sfc_main$4 = {
|
|
|
3956
4207
|
class: normalizeClass(["slash-menu-item", { "is-selected": item.id === selectedId.value }]),
|
|
3957
4208
|
onClick: ($event) => executeCommand(item)
|
|
3958
4209
|
}, [
|
|
3959
|
-
item.
|
|
4210
|
+
item.render ? (openBlock(), createElementBlock("div", {
|
|
3960
4211
|
key: 0,
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
4212
|
+
ref_for: true,
|
|
4213
|
+
ref: (el) => setCustomItemRef(el, item),
|
|
4214
|
+
class: "slash-menu-custom-item"
|
|
4215
|
+
}, null, 512)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4216
|
+
item.icon ? (openBlock(), createElementBlock("span", {
|
|
4217
|
+
key: 0,
|
|
4218
|
+
class: "slash-menu-item-icon",
|
|
4219
|
+
innerHTML: item.icon
|
|
4220
|
+
}, null, 8, _hoisted_4)) : createCommentVNode("", true),
|
|
4221
|
+
createElementVNode("span", null, toDisplayString(item.label), 1)
|
|
4222
|
+
], 64))
|
|
3965
4223
|
], 10, _hoisted_3$1);
|
|
3966
4224
|
}), 128))
|
|
3967
4225
|
], 64);
|
|
@@ -4656,34 +4914,76 @@ const _sfc_main = {
|
|
|
4656
4914
|
}
|
|
4657
4915
|
};
|
|
4658
4916
|
const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
|
|
4917
|
+
const additionalHandlers = Object.freeze({
|
|
4918
|
+
"mc:AlternateContent": translator$10,
|
|
4919
|
+
"w:b": translator$$,
|
|
4920
|
+
"w:bidiVisual": translator$_,
|
|
4921
|
+
"w:bookmarkEnd": translator$Z,
|
|
4922
|
+
"w:bookmarkStart": translator$Y,
|
|
4923
|
+
"w:bottom": translator$X,
|
|
4924
|
+
"w:br": translator$W,
|
|
4925
|
+
"w:cantSplit": translator$V,
|
|
4926
|
+
"w:cnfStyle": translator$U,
|
|
4927
|
+
"w:color": translator$T,
|
|
4928
|
+
"w:divId": translator$S,
|
|
4929
|
+
"w:drawing": translator$R,
|
|
4930
|
+
"w:end": translator$Q,
|
|
4931
|
+
"w:gridAfter": translator$P,
|
|
4932
|
+
"w:gridBefore": translator$O,
|
|
4933
|
+
"w:gridCol": translator$N,
|
|
4934
|
+
"w:hidden": translator$M,
|
|
4935
|
+
"w:highlight": translator$L,
|
|
4936
|
+
"w:hyperlink": translator$K,
|
|
4937
|
+
"w:i": translator$J,
|
|
4938
|
+
"w:insideH": translator$I,
|
|
4939
|
+
"w:insideV": translator$H,
|
|
4940
|
+
"w:jc": translator$G,
|
|
4941
|
+
"w:left": translator$F,
|
|
4942
|
+
"w:p": translator$E,
|
|
4943
|
+
"w:r": translator$D,
|
|
4944
|
+
"w:rFonts": translator$C,
|
|
4945
|
+
"w:rPr": translator$B,
|
|
4946
|
+
"w:rStyle": translator$A,
|
|
4947
|
+
"w:right": translator$z,
|
|
4948
|
+
"w:sdt": translator$y,
|
|
4949
|
+
"w:shd": translator$x,
|
|
4950
|
+
"w:start": translator$w,
|
|
4951
|
+
"w:strike": translator$v,
|
|
4952
|
+
"w:sz": translator$u,
|
|
4953
|
+
"w:szCs": translator$t,
|
|
4954
|
+
"w:tab": translator$s,
|
|
4955
|
+
"w:tbl": translator$r,
|
|
4956
|
+
"w:tblBorders": translator$q,
|
|
4957
|
+
"w:tblCaption": translator$p,
|
|
4958
|
+
"w:tblCellMar": translator$o,
|
|
4959
|
+
"w:tblCellSpacing": translator$n,
|
|
4960
|
+
"w:tblDescription": translator$m,
|
|
4961
|
+
"w:tblGrid": translator$l,
|
|
4962
|
+
"w:tblHeader": translator$k,
|
|
4963
|
+
"w:tblInd": translator$j,
|
|
4964
|
+
"w:tblLayout": translator$i,
|
|
4965
|
+
"w:tblLook": translator$h,
|
|
4966
|
+
"w:tblOverlap": translator$g,
|
|
4967
|
+
"w:tblPr": translator$f,
|
|
4968
|
+
"w:tblStyle": translator$e,
|
|
4969
|
+
"w:tblStyleColBandSize": translator$d,
|
|
4970
|
+
"w:tblStyleRowBandSize": translator$c,
|
|
4971
|
+
"w:tblW": translator$b,
|
|
4972
|
+
"w:tblpPr": translator$a,
|
|
4973
|
+
"w:tc": translator$9,
|
|
4974
|
+
"w:top": translator$8,
|
|
4975
|
+
"w:tr": translator$7,
|
|
4976
|
+
"w:trHeight": translator$6,
|
|
4977
|
+
"w:trPr": translator$5,
|
|
4978
|
+
"w:u": translator$4,
|
|
4979
|
+
"w:wAfter": translator$3,
|
|
4980
|
+
"w:wBefore": translator$2,
|
|
4981
|
+
"wp:anchor": translator$1,
|
|
4982
|
+
"wp:inline": translator
|
|
4983
|
+
});
|
|
4659
4984
|
const baseHandlers = {
|
|
4660
4985
|
...runPropertyTranslators,
|
|
4661
|
-
|
|
4662
|
-
"w:cantSplit": translator$o,
|
|
4663
|
-
"w:cnfStyle": translator$n,
|
|
4664
|
-
"w:divId": translator$m,
|
|
4665
|
-
"w:gridAfter": translator$l,
|
|
4666
|
-
"w:gridBefore": translator$k,
|
|
4667
|
-
"w:hidden": translator$j,
|
|
4668
|
-
"w:hyperlink": translator$i,
|
|
4669
|
-
"w:jc": translator$h,
|
|
4670
|
-
"w:p": translator$g,
|
|
4671
|
-
"w:r": translator$f,
|
|
4672
|
-
"w:rPr": translator$e,
|
|
4673
|
-
"w:sdt": translator$d,
|
|
4674
|
-
"w:tab": translator$c,
|
|
4675
|
-
"w:tblCellSpacing": translator$b,
|
|
4676
|
-
"w:tblHeader": translator$a,
|
|
4677
|
-
"w:tc": translator$9,
|
|
4678
|
-
"w:tr": translator$8,
|
|
4679
|
-
"w:trHeight": translator$7,
|
|
4680
|
-
"w:trPr": translator$6,
|
|
4681
|
-
"w:wAfter": translator$5,
|
|
4682
|
-
"w:wBefore": translator$4,
|
|
4683
|
-
"wp:anchor": translator$3,
|
|
4684
|
-
"wp:inline": translator$2,
|
|
4685
|
-
"w:bookmarkStart": translator$1,
|
|
4686
|
-
"w:bookmarkEnd": translator
|
|
4986
|
+
...additionalHandlers
|
|
4687
4987
|
};
|
|
4688
4988
|
const registeredHandlers = Object.freeze(baseHandlers);
|
|
4689
4989
|
const Extensions = {
|
|
@@ -4696,7 +4996,7 @@ const Extensions = {
|
|
|
4696
4996
|
export {
|
|
4697
4997
|
AIWriter,
|
|
4698
4998
|
n as AnnotatorHelpers,
|
|
4699
|
-
|
|
4999
|
+
bF as BasicUpload,
|
|
4700
5000
|
C as CommentsPluginKey,
|
|
4701
5001
|
D as DocxZipper,
|
|
4702
5002
|
Editor,
|