@harbour-enterprises/superdoc 0.21.0-next.4 → 0.21.0-next.6
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-OZDJ7gwT.cjs → PdfViewer-BrJSIJjF.cjs} +1 -1
- package/dist/chunks/{PdfViewer-D3zo7tPo.es.js → PdfViewer-CJAEtjUD.es.js} +1 -1
- package/dist/chunks/{index-MzW5BVNd.es.js → index-BDfKQQiO.es.js} +4 -3
- package/dist/chunks/{index-CfYf4T_z.cjs → index-NiOytIlp.cjs} +4 -3
- package/dist/chunks/{super-editor.es-U-GVCd_F.cjs → super-editor.es-DmkkMNKU.cjs} +2015 -787
- package/dist/chunks/{super-editor.es-Bntob7Wd.es.js → super-editor.es-iVTtEcot.es.js} +2015 -787
- package/dist/core/types/index.d.ts +8 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +43 -38
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-3xnF_NHq.js → converter-CYC0HBJe.js} +733 -642
- package/dist/super-editor/chunks/{docx-zipper-CZdELYi-.js → docx-zipper-DlwteneT.js} +1 -1
- package/dist/super-editor/chunks/{editor-BqYH4kDD.js → editor-BzT9rpXb.js} +59 -13
- package/dist/super-editor/chunks/{toolbar-TkaE2kKM.js → toolbar-BnTHDmlP.js} +6 -7
- 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/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/noderesizer/helpers.d.ts +2 -0
- package/dist/super-editor/src/tests/helpers/helpers.d.ts +1 -0
- package/dist/super-editor/src/utils/shadow-root.d.ts +12 -0
- package/dist/super-editor/style.css +16 -11
- package/dist/super-editor/super-editor.es.js +1226 -134
- 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 +2017 -788
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 { b2, a5, i, a2 } from "./chunks/converter-
|
|
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, a as Plugin } from "./chunks/converter-CYC0HBJe.js";
|
|
13
|
+
import { b2, a5, i, a2 } from "./chunks/converter-CYC0HBJe.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 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-BzT9rpXb.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-BzT9rpXb.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-BnTHDmlP.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-DlwteneT.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -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();
|
|
@@ -3835,22 +4074,23 @@ const _sfc_main$4 = {
|
|
|
3835
4074
|
return;
|
|
3836
4075
|
}
|
|
3837
4076
|
event.preventDefault();
|
|
4077
|
+
const context = await getEditorContext(props.editor, event);
|
|
4078
|
+
currentContext.value = context;
|
|
4079
|
+
sections.value = getItems({ ...context, trigger: "click" });
|
|
4080
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4081
|
+
searchQuery.value = "";
|
|
3838
4082
|
props.editor.view.dispatch(
|
|
3839
4083
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
3840
4084
|
type: "open",
|
|
3841
|
-
pos: props.editor.view.state.selection.from,
|
|
4085
|
+
pos: context?.pos ?? props.editor.view.state.selection.from,
|
|
3842
4086
|
clientX: event.clientX,
|
|
3843
4087
|
clientY: event.clientY
|
|
3844
4088
|
})
|
|
3845
4089
|
);
|
|
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
4090
|
};
|
|
3851
4091
|
const executeCommand = async (item) => {
|
|
3852
4092
|
if (props.editor) {
|
|
3853
|
-
item.action ? await item.action(props.editor) : null;
|
|
4093
|
+
item.action ? await item.action(props.editor, currentContext.value) : null;
|
|
3854
4094
|
if (item.component) {
|
|
3855
4095
|
menuRef.value;
|
|
3856
4096
|
const componentProps = getPropsByItemId(item.id, props);
|
|
@@ -3868,7 +4108,7 @@ const _sfc_main$4 = {
|
|
|
3868
4108
|
const closeMenu = (options = { restoreCursor: true }) => {
|
|
3869
4109
|
if (props.editor?.view) {
|
|
3870
4110
|
const pluginState = SlashMenuPluginKey.getState(props.editor.view.state);
|
|
3871
|
-
const
|
|
4111
|
+
const anchorPos = pluginState?.anchorPos;
|
|
3872
4112
|
props.editor.view.dispatch(
|
|
3873
4113
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
3874
4114
|
type: "close"
|
|
@@ -3881,6 +4121,8 @@ const _sfc_main$4 = {
|
|
|
3881
4121
|
props.editor.view.dispatch(tr);
|
|
3882
4122
|
props.editor.view.focus();
|
|
3883
4123
|
}
|
|
4124
|
+
cleanupCustomItems();
|
|
4125
|
+
currentContext.value = null;
|
|
3884
4126
|
isOpen.value = false;
|
|
3885
4127
|
searchQuery.value = "";
|
|
3886
4128
|
sections.value = [];
|
|
@@ -3897,19 +4139,29 @@ const _sfc_main$4 = {
|
|
|
3897
4139
|
isOpen.value = true;
|
|
3898
4140
|
menuPosition.value = event.menuPosition;
|
|
3899
4141
|
searchQuery.value = "";
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
4142
|
+
if (!currentContext.value) {
|
|
4143
|
+
const context = await getEditorContext(props.editor);
|
|
4144
|
+
currentContext.value = context;
|
|
4145
|
+
sections.value = getItems({ ...context, trigger: "slash" });
|
|
4146
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4147
|
+
} else if (sections.value.length === 0) {
|
|
4148
|
+
const trigger = currentContext.value.event?.type === "contextmenu" ? "click" : "slash";
|
|
4149
|
+
sections.value = getItems({ ...currentContext.value, trigger });
|
|
4150
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4151
|
+
}
|
|
3903
4152
|
});
|
|
3904
4153
|
props.editor.view.dom.addEventListener("contextmenu", handleRightClick);
|
|
3905
4154
|
props.editor.on("slashMenu:close", () => {
|
|
4155
|
+
cleanupCustomItems();
|
|
3906
4156
|
isOpen.value = false;
|
|
3907
4157
|
searchQuery.value = "";
|
|
4158
|
+
currentContext.value = null;
|
|
3908
4159
|
});
|
|
3909
4160
|
});
|
|
3910
4161
|
onBeforeUnmount(() => {
|
|
3911
4162
|
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
3912
4163
|
document.removeEventListener("mousedown", handleGlobalOutsideClick);
|
|
4164
|
+
cleanupCustomItems();
|
|
3913
4165
|
if (props.editor) {
|
|
3914
4166
|
try {
|
|
3915
4167
|
props.editor.off("slashMenu:open");
|
|
@@ -3956,12 +4208,19 @@ const _sfc_main$4 = {
|
|
|
3956
4208
|
class: normalizeClass(["slash-menu-item", { "is-selected": item.id === selectedId.value }]),
|
|
3957
4209
|
onClick: ($event) => executeCommand(item)
|
|
3958
4210
|
}, [
|
|
3959
|
-
item.
|
|
4211
|
+
item.render ? (openBlock(), createElementBlock("div", {
|
|
3960
4212
|
key: 0,
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
4213
|
+
ref_for: true,
|
|
4214
|
+
ref: (el) => setCustomItemRef(el, item),
|
|
4215
|
+
class: "slash-menu-custom-item"
|
|
4216
|
+
}, null, 512)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4217
|
+
item.icon ? (openBlock(), createElementBlock("span", {
|
|
4218
|
+
key: 0,
|
|
4219
|
+
class: "slash-menu-item-icon",
|
|
4220
|
+
innerHTML: item.icon
|
|
4221
|
+
}, null, 8, _hoisted_4)) : createCommentVNode("", true),
|
|
4222
|
+
createElementVNode("span", null, toDisplayString(item.label), 1)
|
|
4223
|
+
], 64))
|
|
3965
4224
|
], 10, _hoisted_3$1);
|
|
3966
4225
|
}), 128))
|
|
3967
4226
|
], 64);
|
|
@@ -3972,10 +4231,12 @@ const _sfc_main$4 = {
|
|
|
3972
4231
|
}
|
|
3973
4232
|
};
|
|
3974
4233
|
function adjustPaginationBreaks(editorElem, editor) {
|
|
3975
|
-
|
|
4234
|
+
const hostElement = editorElem.value;
|
|
4235
|
+
if (!hostElement || !editor?.value?.options?.scale) return;
|
|
3976
4236
|
const zoom = editor.value.options.scale;
|
|
3977
|
-
const bounds =
|
|
3978
|
-
const
|
|
4237
|
+
const bounds = hostElement.getBoundingClientRect();
|
|
4238
|
+
const searchRoot = hostElement.shadowRoot || hostElement;
|
|
4239
|
+
const breakNodes = searchRoot.querySelectorAll(".pagination-break-wrapper");
|
|
3979
4240
|
let firstLeft;
|
|
3980
4241
|
breakNodes.forEach((node) => {
|
|
3981
4242
|
const nodeBounds = node.getBoundingClientRect();
|
|
@@ -4266,6 +4527,821 @@ const _sfc_main$2 = {
|
|
|
4266
4527
|
};
|
|
4267
4528
|
const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cbddcc0f"]]);
|
|
4268
4529
|
const B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tAgAAEQAAAAAAAAAAAAAAAADgMAAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAIRivWWsBAADFAgAAEAAAAAAAAAAAAAAAAACDMwAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAEDAAAkNgAAAAA=";
|
|
4530
|
+
const editorStyles = `:root {
|
|
4531
|
+
/* CSS variables */
|
|
4532
|
+
}
|
|
4533
|
+
.sd-input-active {
|
|
4534
|
+
border: 1px solid #1355ff !important;
|
|
4535
|
+
}
|
|
4536
|
+
.sd-super-editor-html .ProseMirror {
|
|
4537
|
+
border: 1px solid #d9d9d9;
|
|
4538
|
+
outline: none;
|
|
4539
|
+
border-radius: 8px;
|
|
4540
|
+
height: 100%;
|
|
4541
|
+
width: 100%;
|
|
4542
|
+
outline: none;
|
|
4543
|
+
}
|
|
4544
|
+
a {
|
|
4545
|
+
text-decoration: auto;
|
|
4546
|
+
}
|
|
4547
|
+
/**
|
|
4548
|
+
* Basic ProseMirror styles.
|
|
4549
|
+
* https://github.com/ProseMirror/prosemirror-view/blob/master/style/prosemirror.css
|
|
4550
|
+
*/
|
|
4551
|
+
.ProseMirror {
|
|
4552
|
+
position: relative;
|
|
4553
|
+
}
|
|
4554
|
+
.ProseMirror {
|
|
4555
|
+
word-wrap: break-word;
|
|
4556
|
+
white-space: pre-wrap;
|
|
4557
|
+
white-space: break-spaces;
|
|
4558
|
+
-webkit-font-variant-ligatures: none;
|
|
4559
|
+
font-variant-ligatures: none;
|
|
4560
|
+
font-feature-settings: 'liga' 0; /* the above doesn't seem to work in Edge */
|
|
4561
|
+
}
|
|
4562
|
+
.ProseMirror pre {
|
|
4563
|
+
white-space: pre-wrap;
|
|
4564
|
+
}
|
|
4565
|
+
.ProseMirror ol,
|
|
4566
|
+
.ProseMirror ul {
|
|
4567
|
+
margin-block-start: 0;
|
|
4568
|
+
margin-block-end: 0;
|
|
4569
|
+
margin-inline-start: 0;
|
|
4570
|
+
margin-inline-end: 0;
|
|
4571
|
+
}
|
|
4572
|
+
.ProseMirror ol,
|
|
4573
|
+
.ProseMirror ul {
|
|
4574
|
+
padding-inline-start: 0;
|
|
4575
|
+
padding-left: 0;
|
|
4576
|
+
list-style: none;
|
|
4577
|
+
}
|
|
4578
|
+
.ProseMirror li::marker {
|
|
4579
|
+
content: none;
|
|
4580
|
+
}
|
|
4581
|
+
.ProseMirror li::marker {
|
|
4582
|
+
padding: 0;
|
|
4583
|
+
margin: 0;
|
|
4584
|
+
}
|
|
4585
|
+
.ProseMirror li > p {
|
|
4586
|
+
margin: 0;
|
|
4587
|
+
padding: 0;
|
|
4588
|
+
display: inline-block;
|
|
4589
|
+
}
|
|
4590
|
+
.ProseMirror.header-footer-edit > p img,
|
|
4591
|
+
.ProseMirror.header-footer-edit > p a,
|
|
4592
|
+
.ProseMirror.header-footer-edit li img,
|
|
4593
|
+
.ProseMirror.header-footer-edit li a,
|
|
4594
|
+
.ProseMirror.header-footer-edit span img,
|
|
4595
|
+
.ProseMirror.header-footer-edit span a {
|
|
4596
|
+
opacity: 1;
|
|
4597
|
+
}
|
|
4598
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper {
|
|
4599
|
+
color: initial !important;
|
|
4600
|
+
}
|
|
4601
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper span {
|
|
4602
|
+
color: initial !important;
|
|
4603
|
+
}
|
|
4604
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper img,
|
|
4605
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper a {
|
|
4606
|
+
opacity: 1;
|
|
4607
|
+
}
|
|
4608
|
+
.pagination-section-header div[contenteditable='false'] {
|
|
4609
|
+
user-select: none;
|
|
4610
|
+
}
|
|
4611
|
+
/**
|
|
4612
|
+
* Hide marker for indented lists.
|
|
4613
|
+
* If a list-item contains a list but doesn't contain a "p" tag with text.
|
|
4614
|
+
*/
|
|
4615
|
+
.ProseMirror ol {
|
|
4616
|
+
margin: 0;
|
|
4617
|
+
}
|
|
4618
|
+
.ProseMirror li:has(> ul:first-child, > ol:first-child):not(:has(> p)) {
|
|
4619
|
+
list-style-type: none;
|
|
4620
|
+
}
|
|
4621
|
+
.ProseMirror li:has(> ul:first-child, > ol:first-child):not(:has(> p))::marker {
|
|
4622
|
+
content: '';
|
|
4623
|
+
}
|
|
4624
|
+
.ProseMirror-hideselection *::selection {
|
|
4625
|
+
background: transparent;
|
|
4626
|
+
}
|
|
4627
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
4628
|
+
background: transparent;
|
|
4629
|
+
}
|
|
4630
|
+
.ProseMirror-hideselection * {
|
|
4631
|
+
caret-color: transparent;
|
|
4632
|
+
}
|
|
4633
|
+
/* See https://github.com/ProseMirror/prosemirror/issues/1421#issuecomment-1759320191 */
|
|
4634
|
+
.ProseMirror [draggable][contenteditable='false'] {
|
|
4635
|
+
user-select: text;
|
|
4636
|
+
}
|
|
4637
|
+
.ProseMirror-selectednode {
|
|
4638
|
+
outline: 2px solid #8cf;
|
|
4639
|
+
}
|
|
4640
|
+
/* Make sure li selections wrap around markers */
|
|
4641
|
+
li.ProseMirror-selectednode {
|
|
4642
|
+
outline: none;
|
|
4643
|
+
}
|
|
4644
|
+
li.ProseMirror-selectednode:after {
|
|
4645
|
+
content: '';
|
|
4646
|
+
position: absolute;
|
|
4647
|
+
left: -32px;
|
|
4648
|
+
right: -2px;
|
|
4649
|
+
top: -2px;
|
|
4650
|
+
bottom: -2px;
|
|
4651
|
+
border: 2px solid #8cf;
|
|
4652
|
+
pointer-events: none;
|
|
4653
|
+
}
|
|
4654
|
+
.ProseMirror img {
|
|
4655
|
+
height: auto;
|
|
4656
|
+
max-width: 100%;
|
|
4657
|
+
}
|
|
4658
|
+
/* Protect against generic img rules */
|
|
4659
|
+
img.ProseMirror-separator {
|
|
4660
|
+
display: inline !important;
|
|
4661
|
+
border: none !important;
|
|
4662
|
+
margin: 0 !important;
|
|
4663
|
+
}
|
|
4664
|
+
.ProseMirror .sd-editor-tab {
|
|
4665
|
+
display: inline-block;
|
|
4666
|
+
vertical-align: text-bottom;
|
|
4667
|
+
}
|
|
4668
|
+
.ProseMirror u .sd-editor-tab:not(.pagination-inner .sd-editor-tab) {
|
|
4669
|
+
white-space: pre;
|
|
4670
|
+
border-bottom: 1px solid #000;
|
|
4671
|
+
margin-bottom: 1.5px;
|
|
4672
|
+
}
|
|
4673
|
+
/*
|
|
4674
|
+
Tables
|
|
4675
|
+
https://github.com/ProseMirror/prosemirror-tables/blob/master/style/tables.css
|
|
4676
|
+
https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
4677
|
+
*/
|
|
4678
|
+
.ProseMirror.resize-cursor {
|
|
4679
|
+
cursor: ew-resize;
|
|
4680
|
+
cursor: col-resize;
|
|
4681
|
+
}
|
|
4682
|
+
.ProseMirror .tableWrapper {
|
|
4683
|
+
--table-border-width: 1px;
|
|
4684
|
+
--offset: 2px;
|
|
4685
|
+
|
|
4686
|
+
overflow-x: auto;
|
|
4687
|
+
scrollbar-width: thin;
|
|
4688
|
+
overflow: hidden;
|
|
4689
|
+
|
|
4690
|
+
/*
|
|
4691
|
+
The border width does not need to be multiplied by two,
|
|
4692
|
+
for tables it works differently. */
|
|
4693
|
+
width: calc(100% + (var(--table-border-width) + var(--offset)));
|
|
4694
|
+
}
|
|
4695
|
+
.ProseMirror table {
|
|
4696
|
+
border-collapse: collapse;
|
|
4697
|
+
border-spacing: 0;
|
|
4698
|
+
table-layout: fixed;
|
|
4699
|
+
margin: 0;
|
|
4700
|
+
/* width: 100%; */
|
|
4701
|
+
}
|
|
4702
|
+
.ProseMirror tr {
|
|
4703
|
+
position: relative;
|
|
4704
|
+
}
|
|
4705
|
+
.ProseMirror td,
|
|
4706
|
+
.ProseMirror th {
|
|
4707
|
+
min-width: 1em;
|
|
4708
|
+
position: relative;
|
|
4709
|
+
vertical-align: top;
|
|
4710
|
+
box-sizing: border-box;
|
|
4711
|
+
overflow-wrap: anywhere;
|
|
4712
|
+
}
|
|
4713
|
+
.ProseMirror th {
|
|
4714
|
+
font-weight: bold;
|
|
4715
|
+
text-align: left;
|
|
4716
|
+
}
|
|
4717
|
+
.ProseMirror table .column-resize-handle {
|
|
4718
|
+
position: absolute;
|
|
4719
|
+
right: -2px;
|
|
4720
|
+
top: 0;
|
|
4721
|
+
bottom: -2px; /* 0 */
|
|
4722
|
+
width: 4px;
|
|
4723
|
+
z-index: 20;
|
|
4724
|
+
background-color: #adf;
|
|
4725
|
+
pointer-events: none;
|
|
4726
|
+
}
|
|
4727
|
+
.ProseMirror table .selectedCell:after {
|
|
4728
|
+
position: absolute;
|
|
4729
|
+
content: '';
|
|
4730
|
+
left: 0;
|
|
4731
|
+
right: 0;
|
|
4732
|
+
top: 0;
|
|
4733
|
+
bottom: 0;
|
|
4734
|
+
background: rgba(200, 200, 255, 0.4);
|
|
4735
|
+
pointer-events: none;
|
|
4736
|
+
z-index: 2;
|
|
4737
|
+
}
|
|
4738
|
+
/* Tables - end */
|
|
4739
|
+
/* Track changes */
|
|
4740
|
+
.ProseMirror .track-insert-dec,
|
|
4741
|
+
.ProseMirror .track-delete-dec,
|
|
4742
|
+
.ProseMirror .track-format-dec {
|
|
4743
|
+
pointer-events: none;
|
|
4744
|
+
}
|
|
4745
|
+
.ProseMirror .track-insert-dec.hidden,
|
|
4746
|
+
.ProseMirror .track-delete-dec.hidden {
|
|
4747
|
+
display: none;
|
|
4748
|
+
}
|
|
4749
|
+
.ProseMirror .track-insert-dec.highlighted {
|
|
4750
|
+
border-top: 1px dashed #00853d;
|
|
4751
|
+
border-bottom: 1px dashed #00853d;
|
|
4752
|
+
background-color: #399c7222;
|
|
4753
|
+
}
|
|
4754
|
+
.ProseMirror .track-delete-dec.highlighted {
|
|
4755
|
+
border-top: 1px dashed #cb0e47;
|
|
4756
|
+
border-bottom: 1px dashed #cb0e47;
|
|
4757
|
+
background-color: #cb0e4722;
|
|
4758
|
+
text-decoration: line-through;
|
|
4759
|
+
text-decoration-thickness: 2px;
|
|
4760
|
+
}
|
|
4761
|
+
.ProseMirror .track-format-dec.highlighted {
|
|
4762
|
+
border-bottom: 2px solid gold;
|
|
4763
|
+
}
|
|
4764
|
+
.ProseMirror .track-delete-widget {
|
|
4765
|
+
visibility: hidden;
|
|
4766
|
+
}
|
|
4767
|
+
/* Track changes - end */
|
|
4768
|
+
/* Collaboration cursors */
|
|
4769
|
+
.ProseMirror > .ProseMirror-yjs-cursor:first-child {
|
|
4770
|
+
margin-top: 16px;
|
|
4771
|
+
}
|
|
4772
|
+
.ProseMirror-yjs-cursor {
|
|
4773
|
+
position: relative;
|
|
4774
|
+
margin-left: -1px;
|
|
4775
|
+
margin-right: -1px;
|
|
4776
|
+
border-left: 1px solid black;
|
|
4777
|
+
border-right: 1px solid black;
|
|
4778
|
+
border-color: orange;
|
|
4779
|
+
word-break: normal;
|
|
4780
|
+
pointer-events: none;
|
|
4781
|
+
}
|
|
4782
|
+
.ProseMirror-yjs-cursor > div {
|
|
4783
|
+
position: absolute;
|
|
4784
|
+
top: -1.05em;
|
|
4785
|
+
left: -1px;
|
|
4786
|
+
font-size: 13px;
|
|
4787
|
+
background-color: rgb(250, 129, 0);
|
|
4788
|
+
font-family: serif;
|
|
4789
|
+
font-style: normal;
|
|
4790
|
+
font-weight: normal;
|
|
4791
|
+
line-height: normal;
|
|
4792
|
+
user-select: none;
|
|
4793
|
+
color: white;
|
|
4794
|
+
padding-left: 2px;
|
|
4795
|
+
padding-right: 2px;
|
|
4796
|
+
white-space: nowrap;
|
|
4797
|
+
}
|
|
4798
|
+
/* Collaboration cursors - end */
|
|
4799
|
+
/* Image placeholder */
|
|
4800
|
+
.ProseMirror placeholder {
|
|
4801
|
+
display: inline;
|
|
4802
|
+
border: 1px solid #ccc;
|
|
4803
|
+
color: #ccc;
|
|
4804
|
+
}
|
|
4805
|
+
.ProseMirror placeholder:after {
|
|
4806
|
+
content: '☁';
|
|
4807
|
+
font-size: 200%;
|
|
4808
|
+
line-height: 0.1;
|
|
4809
|
+
font-weight: bold;
|
|
4810
|
+
}
|
|
4811
|
+
/* Gapcursor */
|
|
4812
|
+
.ProseMirror-gapcursor {
|
|
4813
|
+
display: none;
|
|
4814
|
+
pointer-events: none;
|
|
4815
|
+
position: absolute;
|
|
4816
|
+
margin: 0;
|
|
4817
|
+
}
|
|
4818
|
+
.ProseMirror-gapcursor:after {
|
|
4819
|
+
content: '';
|
|
4820
|
+
display: block;
|
|
4821
|
+
position: absolute;
|
|
4822
|
+
top: -2px;
|
|
4823
|
+
width: 20px;
|
|
4824
|
+
border-top: 1px solid black;
|
|
4825
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
4826
|
+
}
|
|
4827
|
+
@keyframes ProseMirror-cursor-blink {
|
|
4828
|
+
to {
|
|
4829
|
+
visibility: hidden;
|
|
4830
|
+
}
|
|
4831
|
+
}
|
|
4832
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
4833
|
+
display: block;
|
|
4834
|
+
}
|
|
4835
|
+
.ProseMirror div[data-type='contentBlock'] {
|
|
4836
|
+
position: absolute;
|
|
4837
|
+
outline: none;
|
|
4838
|
+
user-select: none;
|
|
4839
|
+
z-index: -1;
|
|
4840
|
+
}
|
|
4841
|
+
.ProseMirror div[data-horizontal-rule='true'] {
|
|
4842
|
+
margin-top: auto;
|
|
4843
|
+
align-self: flex-end;
|
|
4844
|
+
}
|
|
4845
|
+
.sd-editor-dropcap {
|
|
4846
|
+
float: left;
|
|
4847
|
+
display: flex;
|
|
4848
|
+
align-items: baseline;
|
|
4849
|
+
margin-top: -5px;
|
|
4850
|
+
}
|
|
4851
|
+
.ProseMirror-search-match {
|
|
4852
|
+
background-color: #ffff0054;
|
|
4853
|
+
}
|
|
4854
|
+
.ProseMirror-active-search-match {
|
|
4855
|
+
background-color: #ff6a0054;
|
|
4856
|
+
}
|
|
4857
|
+
.ProseMirror span.sd-custom-selection::selection {
|
|
4858
|
+
background: transparent;
|
|
4859
|
+
}
|
|
4860
|
+
.sd-custom-selection {
|
|
4861
|
+
background-color: #d9d9d9;
|
|
4862
|
+
border-radius: 0.1em;
|
|
4863
|
+
}
|
|
4864
|
+
.superdoc-toolbar svg {
|
|
4865
|
+
width: 100%;
|
|
4866
|
+
height: 100%;
|
|
4867
|
+
display: block;
|
|
4868
|
+
fill: currentColor;
|
|
4869
|
+
}
|
|
4870
|
+
.superdoc-toolbar svg path {
|
|
4871
|
+
stroke: currentColor;
|
|
4872
|
+
}
|
|
4873
|
+
.sd-editor-toolbar-dropdown .n-dropdown-option .dropdown-select-icon {
|
|
4874
|
+
display: flex;
|
|
4875
|
+
width: 12px;
|
|
4876
|
+
height: 12px;
|
|
4877
|
+
}
|
|
4878
|
+
/* Custom toolbar styling */
|
|
4879
|
+
/* AI button icon styling with gradient */
|
|
4880
|
+
.toolbar-icon__icon--ai {
|
|
4881
|
+
position: relative;
|
|
4882
|
+
z-index: 1;
|
|
4883
|
+
}
|
|
4884
|
+
.toolbar-icon__icon--ai svg {
|
|
4885
|
+
fill: transparent;
|
|
4886
|
+
}
|
|
4887
|
+
.toolbar-icon__icon--ai::before {
|
|
4888
|
+
content: '';
|
|
4889
|
+
position: absolute;
|
|
4890
|
+
top: 0;
|
|
4891
|
+
left: 0;
|
|
4892
|
+
right: 0;
|
|
4893
|
+
bottom: 0;
|
|
4894
|
+
z-index: -1;
|
|
4895
|
+
background: linear-gradient(
|
|
4896
|
+
270deg,
|
|
4897
|
+
rgba(218, 215, 118, 0.5) -20%,
|
|
4898
|
+
rgba(191, 100, 100, 1) 30%,
|
|
4899
|
+
rgba(77, 82, 217, 1) 60%,
|
|
4900
|
+
rgb(255, 219, 102) 150%
|
|
4901
|
+
);
|
|
4902
|
+
-webkit-mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>")
|
|
4903
|
+
center / contain no-repeat;
|
|
4904
|
+
mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>")
|
|
4905
|
+
center / contain no-repeat;
|
|
4906
|
+
filter: brightness(1.2);
|
|
4907
|
+
transition: filter 0.2s ease;
|
|
4908
|
+
}
|
|
4909
|
+
.toolbar-icon__icon--ai:hover::before {
|
|
4910
|
+
filter: brightness(1.3);
|
|
4911
|
+
}
|
|
4912
|
+
/* AI text appear animation */
|
|
4913
|
+
@keyframes aiTextAppear {
|
|
4914
|
+
from {
|
|
4915
|
+
opacity: 0;
|
|
4916
|
+
transform: translateY(5px);
|
|
4917
|
+
}
|
|
4918
|
+
to {
|
|
4919
|
+
opacity: 1;
|
|
4920
|
+
transform: translateY(0);
|
|
4921
|
+
}
|
|
4922
|
+
}
|
|
4923
|
+
.sd-ai-text-appear {
|
|
4924
|
+
display: inline;
|
|
4925
|
+
opacity: 0;
|
|
4926
|
+
animation: aiTextAppear 0.7s ease-out forwards;
|
|
4927
|
+
animation-fill-mode: both;
|
|
4928
|
+
will-change: opacity, transform;
|
|
4929
|
+
/* Ensure each mark is treated as a separate animation context */
|
|
4930
|
+
contain: content;
|
|
4931
|
+
}
|
|
4932
|
+
.sd-ai-loader {
|
|
4933
|
+
display: flex;
|
|
4934
|
+
justify-content: flex-start;
|
|
4935
|
+
}
|
|
4936
|
+
.sd-ai-loader > img {
|
|
4937
|
+
width: fit-content;
|
|
4938
|
+
height: 40px;
|
|
4939
|
+
}
|
|
4940
|
+
@keyframes ai-pulse {
|
|
4941
|
+
0% {
|
|
4942
|
+
background-color: rgba(99, 102, 241, 0.1);
|
|
4943
|
+
}
|
|
4944
|
+
50% {
|
|
4945
|
+
background-color: rgba(99, 102, 241, 0.375);
|
|
4946
|
+
}
|
|
4947
|
+
100% {
|
|
4948
|
+
background-color: rgba(99, 102, 241, 0.1);
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
.sd-ai-highlight-pulse {
|
|
4952
|
+
animation: ai-pulse 1.5s ease-in-out infinite;
|
|
4953
|
+
}
|
|
4954
|
+
.sd-editor-auto-page-number,
|
|
4955
|
+
.sd-editor-auto-total-pages {
|
|
4956
|
+
transition: all 250ms ease;
|
|
4957
|
+
border-bottom: 1px solid #9a9a9a;
|
|
4958
|
+
cursor: not-allowed;
|
|
4959
|
+
}
|
|
4960
|
+
.sd-editor-auto-page-number:hover,
|
|
4961
|
+
.sd-editor-auto-total-pages:hover {
|
|
4962
|
+
border-bottom-color: #4f4f4f;
|
|
4963
|
+
}
|
|
4964
|
+
.sd-editor-auto-page-number-content {
|
|
4965
|
+
pointer-events: none;
|
|
4966
|
+
}
|
|
4967
|
+
.ProseMirror.view-mode .sd-editor-auto-page-number,
|
|
4968
|
+
.ProseMirror.view-mode .sd-editor-auto-total-pages {
|
|
4969
|
+
border: none;
|
|
4970
|
+
}
|
|
4971
|
+
:root {
|
|
4972
|
+
--sd-editor-separator-height: 18px;
|
|
4973
|
+
}
|
|
4974
|
+
.pagination-section-header {
|
|
4975
|
+
cursor: default;
|
|
4976
|
+
}
|
|
4977
|
+
/* To not inherit styles from the wrapper paragraph */
|
|
4978
|
+
.pagination-section-header p {
|
|
4979
|
+
text-align: initial;
|
|
4980
|
+
}
|
|
4981
|
+
.pagination-section-footer {
|
|
4982
|
+
position: relative;
|
|
4983
|
+
width: 100%;
|
|
4984
|
+
min-width: 100%;
|
|
4985
|
+
display: flex;
|
|
4986
|
+
flex-direction: column;
|
|
4987
|
+
justify-content: flex-end;
|
|
4988
|
+
cursor: default;
|
|
4989
|
+
}
|
|
4990
|
+
/* To not inherit styles from the wrapper paragraph */
|
|
4991
|
+
.pagination-section-footer p {
|
|
4992
|
+
text-align: initial;
|
|
4993
|
+
}
|
|
4994
|
+
.pagination-break-wrapper {
|
|
4995
|
+
width: 100%;
|
|
4996
|
+
margin: 0;
|
|
4997
|
+
padding: 0;
|
|
4998
|
+
cursor: default;
|
|
4999
|
+
position: relative;
|
|
5000
|
+
}
|
|
5001
|
+
.pagination-separator {
|
|
5002
|
+
position: relative;
|
|
5003
|
+
display: block;
|
|
5004
|
+
height: var(--sd-editor-separator-height);
|
|
5005
|
+
min-height: var(--sd-editor-separator-height);
|
|
5006
|
+
min-width: 100%;
|
|
5007
|
+
width: 100%;
|
|
5008
|
+
border-top: 1px solid #dbdbdb;
|
|
5009
|
+
border-bottom: 1px solid #dbdbdb;
|
|
5010
|
+
cursor: default;
|
|
5011
|
+
}
|
|
5012
|
+
.pagination-separator--table {
|
|
5013
|
+
border: 0;
|
|
5014
|
+
}
|
|
5015
|
+
.pagination-separator-floating {
|
|
5016
|
+
position: absolute;
|
|
5017
|
+
height: var(--sd-editor-separator-height);
|
|
5018
|
+
border-top: 1px solid #dbdbdb;
|
|
5019
|
+
border-bottom: 1px solid #dbdbdb;
|
|
5020
|
+
pointer-events: none;
|
|
5021
|
+
}
|
|
5022
|
+
.pagination-inner {
|
|
5023
|
+
position: absolute;
|
|
5024
|
+
top: 0;
|
|
5025
|
+
left: 0;
|
|
5026
|
+
display: flex;
|
|
5027
|
+
flex-direction: column;
|
|
5028
|
+
background-color: white;
|
|
5029
|
+
}
|
|
5030
|
+
/**
|
|
5031
|
+
Workaround to display pagination in footer
|
|
5032
|
+
on the right if it is inside shape textbox.
|
|
5033
|
+
*/
|
|
5034
|
+
.pagination-section-footer .sd-editor-shape-container:has([data-id='auto-page-number'], [data-id='auto-total-pages']) {
|
|
5035
|
+
margin-left: auto;
|
|
5036
|
+
}
|
|
5037
|
+
.pagination-section-header img[contenteditable='false'],
|
|
5038
|
+
.pagination-section-footer img[contenteditable='false'] {
|
|
5039
|
+
pointer-events: none;
|
|
5040
|
+
}
|
|
5041
|
+
.pagination-break-wrapper {
|
|
5042
|
+
font-weight: normal;
|
|
5043
|
+
font-style: normal;
|
|
5044
|
+
color: initial;
|
|
5045
|
+
}
|
|
5046
|
+
/* TODO: This is going to be enabled again */
|
|
5047
|
+
/* .pagination-section-header div[contenteditable="false"]:not([documentmode="viewing"]),
|
|
5048
|
+
.pagination-section-footer div[contenteditable="false"]:not([documentmode="viewing"]) {
|
|
5049
|
+
opacity: 0.5;
|
|
5050
|
+
} */
|
|
5051
|
+
.sd-editor-popover {
|
|
5052
|
+
background-color: #fff;
|
|
5053
|
+
border-radius: 8px;
|
|
5054
|
+
-webkit-box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
5055
|
+
-moz-box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
5056
|
+
box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
5057
|
+
padding: 0;
|
|
5058
|
+
width: auto;
|
|
5059
|
+
height: auto;
|
|
5060
|
+
font-size: 14px;
|
|
5061
|
+
color: #333;
|
|
5062
|
+
z-index: 1000;
|
|
5063
|
+
}
|
|
5064
|
+
.sd-editor-popover .popover-header {
|
|
5065
|
+
font-weight: bold;
|
|
5066
|
+
margin-bottom: 8px;
|
|
5067
|
+
}
|
|
5068
|
+
.tippy-box[data-theme~='sd-editor-popover'] {
|
|
5069
|
+
background-color: #fff;
|
|
5070
|
+
border-radius: 8px;
|
|
5071
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
5072
|
+
border: none !important;
|
|
5073
|
+
padding: 0 !important;
|
|
5074
|
+
}
|
|
5075
|
+
.tippy-box[data-theme~='sd-editor-popover'] .tippy-arrow {
|
|
5076
|
+
color: #fff;
|
|
5077
|
+
border: 1px solid #dbdbdb;
|
|
5078
|
+
}
|
|
5079
|
+
.tippy-box[data-theme~='sd-editor-popover'] .tippy-content {
|
|
5080
|
+
padding: 0;
|
|
5081
|
+
}
|
|
5082
|
+
.sd-editor-placeholder::before {
|
|
5083
|
+
content: attr(data-placeholder);
|
|
5084
|
+
color: #aaa;
|
|
5085
|
+
pointer-events: none;
|
|
5086
|
+
display: block;
|
|
5087
|
+
height: 0;
|
|
5088
|
+
}
|
|
5089
|
+
.sd-editor-mention {
|
|
5090
|
+
background-color: #1355ff15;
|
|
5091
|
+
color: #222;
|
|
5092
|
+
font-weight: 400;
|
|
5093
|
+
border-radius: 3px;
|
|
5094
|
+
padding: 0 5px;
|
|
5095
|
+
cursor: default;
|
|
5096
|
+
display: inline-block;
|
|
5097
|
+
box-sizing: border-box;
|
|
5098
|
+
}
|
|
5099
|
+
.sd-editor-comment-highlight {
|
|
5100
|
+
transition: background-color 250ms ease;
|
|
5101
|
+
}
|
|
5102
|
+
.sd-editor-comment-highlight:hover {
|
|
5103
|
+
background-color: #1354ff55;
|
|
5104
|
+
}
|
|
5105
|
+
.sd-editor-comment-highlight.sd-custom-selection {
|
|
5106
|
+
background-color: #d6c0c6 !important;
|
|
5107
|
+
}
|
|
5108
|
+
.sd-editor-list-item-node-view {
|
|
5109
|
+
position: relative;
|
|
5110
|
+
width: 100%;
|
|
5111
|
+
}
|
|
5112
|
+
.sd-editor-list-item-numbering {
|
|
5113
|
+
position: absolute;
|
|
5114
|
+
top: 0;
|
|
5115
|
+
white-space: nowrap;
|
|
5116
|
+
user-select: none;
|
|
5117
|
+
pointer-events: auto;
|
|
5118
|
+
text-align: right;
|
|
5119
|
+
z-index: 1;
|
|
5120
|
+
}
|
|
5121
|
+
.sd-editor-list-item-content-dom {
|
|
5122
|
+
position: relative;
|
|
5123
|
+
min-height: inherit;
|
|
5124
|
+
word-wrap: break-word;
|
|
5125
|
+
}
|
|
5126
|
+
/* temporary fix */
|
|
5127
|
+
.sd-editor-list-item-node-view .sd-custom-selection {
|
|
5128
|
+
font-size: inherit !important;
|
|
5129
|
+
}
|
|
5130
|
+
/* Resize handles container */
|
|
5131
|
+
.sd-editor-resize-container {
|
|
5132
|
+
position: absolute;
|
|
5133
|
+
pointer-events: none;
|
|
5134
|
+
z-index: 11;
|
|
5135
|
+
}
|
|
5136
|
+
/* Resize handles */
|
|
5137
|
+
.sd-editor-resize-handle {
|
|
5138
|
+
position: absolute;
|
|
5139
|
+
width: 12px;
|
|
5140
|
+
height: 12px;
|
|
5141
|
+
background-color: #4dabf7;
|
|
5142
|
+
border: 2px solid #fff;
|
|
5143
|
+
border-radius: 50%;
|
|
5144
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
|
5145
|
+
pointer-events: auto;
|
|
5146
|
+
transition: all 0.1s ease;
|
|
5147
|
+
}
|
|
5148
|
+
.sd-editor-resize-handle:hover {
|
|
5149
|
+
background-color: #228be6;
|
|
5150
|
+
transform: scale(1.1);
|
|
5151
|
+
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
|
|
5152
|
+
}
|
|
5153
|
+
/* Handle positions */
|
|
5154
|
+
.sd-editor-resize-handle-nw {
|
|
5155
|
+
top: -6px;
|
|
5156
|
+
left: -6px;
|
|
5157
|
+
cursor: nwse-resize;
|
|
5158
|
+
}
|
|
5159
|
+
.sd-editor-resize-handle-ne {
|
|
5160
|
+
top: -6px;
|
|
5161
|
+
right: -6px;
|
|
5162
|
+
cursor: nesw-resize;
|
|
5163
|
+
}
|
|
5164
|
+
.sd-editor-resize-handle-sw {
|
|
5165
|
+
bottom: -6px;
|
|
5166
|
+
left: -6px;
|
|
5167
|
+
cursor: nesw-resize;
|
|
5168
|
+
}
|
|
5169
|
+
.sd-editor-resize-handle-se {
|
|
5170
|
+
bottom: -6px;
|
|
5171
|
+
right: -6px;
|
|
5172
|
+
cursor: nwse-resize;
|
|
5173
|
+
}
|
|
5174
|
+
/* Hide handles when editor loses focus */
|
|
5175
|
+
.ProseMirror:not(.ProseMirror-focused) .sd-editor-resize-container {
|
|
5176
|
+
display: none;
|
|
5177
|
+
}
|
|
5178
|
+
/* Smooth transitions for resizing */
|
|
5179
|
+
.sd-editor-resizable-wrapper * {
|
|
5180
|
+
transition: none;
|
|
5181
|
+
}
|
|
5182
|
+
.sd-editor-resizable-wrapper *:not([style*='width']) {
|
|
5183
|
+
transition: all 0.2s ease;
|
|
5184
|
+
}
|
|
5185
|
+
/* Resize feedback indicator */
|
|
5186
|
+
.sd-editor-resizable-wrapper::after {
|
|
5187
|
+
content: 'Drag corners to resize';
|
|
5188
|
+
position: absolute;
|
|
5189
|
+
bottom: -25px;
|
|
5190
|
+
left: 50%;
|
|
5191
|
+
transform: translateX(-50%);
|
|
5192
|
+
background-color: rgba(77, 171, 247, 0.9);
|
|
5193
|
+
color: white;
|
|
5194
|
+
font-size: 11px;
|
|
5195
|
+
padding: 4px 8px;
|
|
5196
|
+
border-radius: 4px;
|
|
5197
|
+
white-space: nowrap;
|
|
5198
|
+
pointer-events: none;
|
|
5199
|
+
opacity: 0;
|
|
5200
|
+
transition: opacity 0.3s ease;
|
|
5201
|
+
z-index: 12;
|
|
5202
|
+
}
|
|
5203
|
+
.sd-editor-resizable-wrapper:hover::after {
|
|
5204
|
+
opacity: 1;
|
|
5205
|
+
}
|
|
5206
|
+
.sd-document-section-block {
|
|
5207
|
+
background-color: #fafafa;
|
|
5208
|
+
border: 1px solid #ababab;
|
|
5209
|
+
border-radius: 4px;
|
|
5210
|
+
position: relative;
|
|
5211
|
+
}
|
|
5212
|
+
.sd-document-section-block-info {
|
|
5213
|
+
position: absolute;
|
|
5214
|
+
top: -19px;
|
|
5215
|
+
left: -1px;
|
|
5216
|
+
max-width: 100px;
|
|
5217
|
+
min-width: 0;
|
|
5218
|
+
height: 18px;
|
|
5219
|
+
border: 1px solid #ababab;
|
|
5220
|
+
border-bottom: none;
|
|
5221
|
+
border-radius: 6px 6px 0 0;
|
|
5222
|
+
padding: 0 8px;
|
|
5223
|
+
align-items: center;
|
|
5224
|
+
font-size: 10px;
|
|
5225
|
+
display: none;
|
|
5226
|
+
z-index: 100;
|
|
5227
|
+
background-color: #fafafa;
|
|
5228
|
+
}
|
|
5229
|
+
.sd-document-section-block:hover {
|
|
5230
|
+
border-radius: 0 4px 4px 4px;
|
|
5231
|
+
}
|
|
5232
|
+
.sd-document-section-block:hover .sd-document-section-block-info {
|
|
5233
|
+
display: flex;
|
|
5234
|
+
align-items: center;
|
|
5235
|
+
}
|
|
5236
|
+
.sd-document-section-block-info span {
|
|
5237
|
+
max-width: 100%;
|
|
5238
|
+
overflow: hidden;
|
|
5239
|
+
white-space: nowrap;
|
|
5240
|
+
text-overflow: ellipsis;
|
|
5241
|
+
}
|
|
5242
|
+
.sd-structured-content,
|
|
5243
|
+
.sd-structured-content-block {
|
|
5244
|
+
padding: 1px;
|
|
5245
|
+
box-sizing: border-box;
|
|
5246
|
+
border-radius: 4px;
|
|
5247
|
+
border: 1px solid #629be7;
|
|
5248
|
+
position: relative;
|
|
5249
|
+
}
|
|
5250
|
+
.sd-structured-content-draggable {
|
|
5251
|
+
font-size: 10px;
|
|
5252
|
+
align-items: center;
|
|
5253
|
+
justify-content: center;
|
|
5254
|
+
position: absolute;
|
|
5255
|
+
left: 2px;
|
|
5256
|
+
bottom: 100%;
|
|
5257
|
+
width: calc(100% - 4px);
|
|
5258
|
+
max-width: 110px;
|
|
5259
|
+
min-width: 0;
|
|
5260
|
+
height: 18px;
|
|
5261
|
+
padding: 0 4px;
|
|
5262
|
+
border: 1px solid #629be7;
|
|
5263
|
+
border-bottom: none;
|
|
5264
|
+
border-radius: 6px 6px 0 0;
|
|
5265
|
+
background-color: #629be7dd;
|
|
5266
|
+
z-index: 10;
|
|
5267
|
+
cursor: grab;
|
|
5268
|
+
display: none;
|
|
5269
|
+
}
|
|
5270
|
+
.sd-structured-content-draggable span {
|
|
5271
|
+
max-width: 100%;
|
|
5272
|
+
overflow: hidden;
|
|
5273
|
+
white-space: nowrap;
|
|
5274
|
+
text-overflow: ellipsis;
|
|
5275
|
+
}
|
|
5276
|
+
.sd-structured-content:hover .sd-structured-content-draggable,
|
|
5277
|
+
.sd-structured-content-block:hover .sd-structured-content-draggable {
|
|
5278
|
+
display: inline-flex;
|
|
5279
|
+
}
|
|
5280
|
+
`;
|
|
5281
|
+
let cachedStyleSheet = null;
|
|
5282
|
+
const defaultEditorStyles = editorStyles;
|
|
5283
|
+
let shadowEditorStyles = defaultEditorStyles;
|
|
5284
|
+
const supportsConstructableStylesheets = () => {
|
|
5285
|
+
const DocumentCtor = (
|
|
5286
|
+
/** @type {typeof Document | undefined} */
|
|
5287
|
+
globalThis.Document
|
|
5288
|
+
);
|
|
5289
|
+
const CSSStyleSheetCtor = (
|
|
5290
|
+
/** @type {typeof CSSStyleSheet | undefined} */
|
|
5291
|
+
globalThis.CSSStyleSheet
|
|
5292
|
+
);
|
|
5293
|
+
if (!DocumentCtor || !CSSStyleSheetCtor) return false;
|
|
5294
|
+
const documentPrototype = DocumentCtor.prototype;
|
|
5295
|
+
const styleSheetPrototype = CSSStyleSheetCtor.prototype;
|
|
5296
|
+
return !!documentPrototype && "adoptedStyleSheets" in documentPrototype && !!styleSheetPrototype && typeof styleSheetPrototype.replaceSync === "function";
|
|
5297
|
+
};
|
|
5298
|
+
const ensureStyleSheet = (root) => {
|
|
5299
|
+
if (!root || !shadowEditorStyles) return;
|
|
5300
|
+
if (supportsConstructableStylesheets()) {
|
|
5301
|
+
if (!cachedStyleSheet) {
|
|
5302
|
+
const CSSStyleSheetCtor = (
|
|
5303
|
+
/** @type {typeof CSSStyleSheet} */
|
|
5304
|
+
globalThis.CSSStyleSheet
|
|
5305
|
+
);
|
|
5306
|
+
cachedStyleSheet = new CSSStyleSheetCtor();
|
|
5307
|
+
cachedStyleSheet.replaceSync(shadowEditorStyles);
|
|
5308
|
+
}
|
|
5309
|
+
const sheets = Array.isArray(root.adoptedStyleSheets) ? root.adoptedStyleSheets : [];
|
|
5310
|
+
if (!sheets.includes(cachedStyleSheet)) {
|
|
5311
|
+
root.adoptedStyleSheets = [...sheets, cachedStyleSheet];
|
|
5312
|
+
}
|
|
5313
|
+
return;
|
|
5314
|
+
}
|
|
5315
|
+
const doc = (
|
|
5316
|
+
/** @type {Document | undefined} */
|
|
5317
|
+
globalThis.document
|
|
5318
|
+
);
|
|
5319
|
+
if (!doc || typeof root.querySelector !== "function") return;
|
|
5320
|
+
if (!root.querySelector("style[data-super-editor-styles]")) {
|
|
5321
|
+
const styleEl = doc.createElement("style");
|
|
5322
|
+
styleEl.setAttribute("data-super-editor-styles", "");
|
|
5323
|
+
styleEl.textContent = shadowEditorStyles;
|
|
5324
|
+
root.appendChild(styleEl);
|
|
5325
|
+
}
|
|
5326
|
+
};
|
|
5327
|
+
const ensureEditorShadowRoot = (hostElement) => {
|
|
5328
|
+
const doc = (
|
|
5329
|
+
/** @type {Document | undefined} */
|
|
5330
|
+
globalThis.document
|
|
5331
|
+
);
|
|
5332
|
+
if (!hostElement || !doc || typeof hostElement.attachShadow !== "function") {
|
|
5333
|
+
return { root: null, mount: null };
|
|
5334
|
+
}
|
|
5335
|
+
const root = hostElement.shadowRoot || hostElement.attachShadow({ mode: "open" });
|
|
5336
|
+
ensureStyleSheet(root);
|
|
5337
|
+
let mount = root.querySelector(".sd-editor-mount");
|
|
5338
|
+
if (!mount) {
|
|
5339
|
+
mount = doc.createElement("div");
|
|
5340
|
+
mount.className = "sd-editor-mount";
|
|
5341
|
+
root.appendChild(mount);
|
|
5342
|
+
}
|
|
5343
|
+
return { root, mount };
|
|
5344
|
+
};
|
|
4269
5345
|
const _hoisted_1$1 = { class: "super-editor-container" };
|
|
4270
5346
|
const _hoisted_2 = {
|
|
4271
5347
|
key: 1,
|
|
@@ -4304,6 +5380,7 @@ const _sfc_main$1 = {
|
|
|
4304
5380
|
const message = useMessage();
|
|
4305
5381
|
const editorWrapper = ref(null);
|
|
4306
5382
|
const editorElem = ref(null);
|
|
5383
|
+
const editorMountPoint = shallowRef(null);
|
|
4307
5384
|
const fileSource = ref(null);
|
|
4308
5385
|
const popoverControls = reactive({
|
|
4309
5386
|
visible: false,
|
|
@@ -4392,9 +5469,15 @@ const _sfc_main$1 = {
|
|
|
4392
5469
|
return extensions;
|
|
4393
5470
|
};
|
|
4394
5471
|
const initEditor = async ({ content, media = {}, mediaFiles = {}, fonts = {} } = {}) => {
|
|
5472
|
+
if (!editorElem.value) return;
|
|
5473
|
+
const { mount } = ensureEditorShadowRoot(editorElem.value);
|
|
5474
|
+
editorMountPoint.value = mount;
|
|
5475
|
+
if (editorMountPoint.value) {
|
|
5476
|
+
editorMountPoint.value.innerHTML = "";
|
|
5477
|
+
}
|
|
4395
5478
|
editor.value = new Editor({
|
|
4396
5479
|
mode: "docx",
|
|
4397
|
-
element: editorElem.value,
|
|
5480
|
+
element: editorMountPoint.value || editorElem.value,
|
|
4398
5481
|
fileSource: fileSource.value,
|
|
4399
5482
|
extensions: getExtensions(),
|
|
4400
5483
|
externalExtensions: props.options.externalExtensions,
|
|
@@ -4441,11 +5524,12 @@ const _sfc_main$1 = {
|
|
|
4441
5524
|
};
|
|
4442
5525
|
const handleSuperEditorClick = (event) => {
|
|
4443
5526
|
emit("editor-click", { editor: editor.value });
|
|
4444
|
-
|
|
5527
|
+
const pmElement = editor.value?.view?.dom;
|
|
4445
5528
|
if (!pmElement || !editor.value) {
|
|
4446
5529
|
return;
|
|
4447
5530
|
}
|
|
4448
|
-
|
|
5531
|
+
const eventPath = event.composedPath?.() || [];
|
|
5532
|
+
const isInsideEditor = eventPath.includes(pmElement);
|
|
4449
5533
|
if (!isInsideEditor && editor.value.isEditable) {
|
|
4450
5534
|
editor.value.view?.focus();
|
|
4451
5535
|
}
|
|
@@ -4458,7 +5542,9 @@ const _sfc_main$1 = {
|
|
|
4458
5542
|
if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
|
|
4459
5543
|
});
|
|
4460
5544
|
const handleMarginClick = (event) => {
|
|
4461
|
-
|
|
5545
|
+
const pmElement = editor.value?.view?.dom;
|
|
5546
|
+
const eventPath = event.composedPath?.() || [];
|
|
5547
|
+
if (pmElement && eventPath.includes(pmElement)) return;
|
|
4462
5548
|
onMarginClickCursorChange(event, editor.value);
|
|
4463
5549
|
};
|
|
4464
5550
|
const handleMarginChange = ({ side, value }) => {
|
|
@@ -4564,7 +5650,7 @@ const _sfc_main$1 = {
|
|
|
4564
5650
|
};
|
|
4565
5651
|
}
|
|
4566
5652
|
};
|
|
4567
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5653
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3d49a1a6"]]);
|
|
4568
5654
|
const _hoisted_1 = ["innerHTML"];
|
|
4569
5655
|
const _sfc_main = {
|
|
4570
5656
|
__name: "SuperInput",
|
|
@@ -4594,6 +5680,7 @@ const _sfc_main = {
|
|
|
4594
5680
|
const props = __props;
|
|
4595
5681
|
const editor = shallowRef();
|
|
4596
5682
|
const editorElem = ref(null);
|
|
5683
|
+
const editorMountPoint = shallowRef(null);
|
|
4597
5684
|
const isFocused = ref(false);
|
|
4598
5685
|
const onTransaction = ({ editor: editor2, transaction }) => {
|
|
4599
5686
|
const contents = editor2.getHTML();
|
|
@@ -4613,10 +5700,15 @@ const _sfc_main = {
|
|
|
4613
5700
|
props.options.onTransaction = onTransaction;
|
|
4614
5701
|
props.options.onFocus = onFocus;
|
|
4615
5702
|
props.options.onBlur = onBlur;
|
|
5703
|
+
const { mount } = ensureEditorShadowRoot(editorElem.value);
|
|
5704
|
+
editorMountPoint.value = mount;
|
|
5705
|
+
if (editorMountPoint.value) {
|
|
5706
|
+
editorMountPoint.value.innerHTML = "";
|
|
5707
|
+
}
|
|
4616
5708
|
editor.value = new Editor({
|
|
4617
5709
|
mode: "text",
|
|
4618
5710
|
content: document.getElementById("currentContent"),
|
|
4619
|
-
element: editorElem.value,
|
|
5711
|
+
element: editorMountPoint.value || editorElem.value,
|
|
4620
5712
|
extensions: getRichTextExtensions(),
|
|
4621
5713
|
users: props.users,
|
|
4622
5714
|
...props.options
|
|
@@ -4655,7 +5747,7 @@ const _sfc_main = {
|
|
|
4655
5747
|
};
|
|
4656
5748
|
}
|
|
4657
5749
|
};
|
|
4658
|
-
const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5750
|
+
const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-23a4e794"]]);
|
|
4659
5751
|
const baseHandlers = {
|
|
4660
5752
|
...runPropertyTranslators,
|
|
4661
5753
|
"w:br": translator$p,
|