@harbour-enterprises/superdoc 1.0.0-beta.99 → 1.0.0-next.10
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-BtuTHUW7.cjs → PdfViewer-B9LcTIm2.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DF-v5Yrr.es.js → PdfViewer-CZG4udaT.es.js} +2 -2
- package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
- package/dist/chunks/{index-CJy3FxL7.es.js → index-1n6qegaQ.es.js} +564 -325
- package/dist/chunks/{index-BBu9BBvp.cjs → index-4FiyZ-0E.cjs} +561 -322
- package/dist/chunks/{index-BB0msI45-DUPBw4Bh.es.js → index-DdTDm9oI-BXzE00pk.es.js} +1 -1
- package/dist/chunks/{index-BB0msI45-CPU6Ak2R.cjs → index-DdTDm9oI-Duiy8M_G.cjs} +1 -1
- package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
- package/dist/chunks/{super-editor.es-C04sFzVD.cjs → super-editor.es-BQQuazyp.cjs} +28809 -25325
- package/dist/chunks/{super-editor.es-BiaFIbw-.es.js → super-editor.es-DKr759cY.es.js} +28810 -25326
- package/dist/chunks/{vue-Dysv_7z5.es.js → vue-BuPTonTJ.es.js} +27 -27
- package/dist/chunks/xml-js-LkEmUa9-.es.js +2 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +42 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts +3 -3
- package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/helpers.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +4 -167
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +94 -92
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-B_cVJPnh.js → converter-BavE2jnW.js} +12 -6
- package/dist/super-editor/chunks/{docx-zipper-fPWx7kV0.js → docx-zipper-CY4M19qa.js} +1 -1
- package/dist/super-editor/chunks/{editor-DS9z42Je.js → editor-Cslr04KI.js} +28419 -25540
- package/dist/super-editor/chunks/{index-BB0msI45.js → index-DdTDm9oI.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-aIFlIr6h.js → toolbar-Zdgn--Js.js} +804 -568
- 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/style.css +22 -21
- package/dist/super-editor/super-editor.es.js +48 -23
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +29358 -25635
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +10 -1
- package/dist/chunks/xml-js-ClO_jHnq.es.js +0 -2
- package/dist/images/altText_add.svg +0 -3
- package/dist/images/altText_disclaimer.svg +0 -3
- package/dist/images/altText_done.svg +0 -3
- package/dist/images/altText_spinner.svg +0 -30
- package/dist/images/altText_warning.svg +0 -3
- package/dist/images/annotation-check.svg +0 -11
- package/dist/images/annotation-comment.svg +0 -16
- package/dist/images/annotation-help.svg +0 -26
- package/dist/images/annotation-insert.svg +0 -10
- package/dist/images/annotation-key.svg +0 -11
- package/dist/images/annotation-newparagraph.svg +0 -11
- package/dist/images/annotation-noicon.svg +0 -7
- package/dist/images/annotation-note.svg +0 -42
- package/dist/images/annotation-paperclip.svg +0 -6
- package/dist/images/annotation-paragraph.svg +0 -16
- package/dist/images/annotation-pushpin.svg +0 -7
- package/dist/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/images/cursor-editorFreeText.svg +0 -3
- package/dist/images/cursor-editorInk.svg +0 -4
- package/dist/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/images/editor-toolbar-delete.svg +0 -5
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/messageBar_closingButton.svg +0 -3
- package/dist/images/messageBar_warning.svg +0 -3
- package/dist/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/images/toolbarButton-menuArrow.svg +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-Cslr04KI.js";
|
|
2
|
+
import "./chunks/converter-BavE2jnW.js";
|
|
3
|
+
import "./chunks/docx-zipper-CY4M19qa.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -282,36 +282,37 @@
|
|
|
282
282
|
border-radius: 8px !important;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
.button-group[data-v-
|
|
285
|
+
.button-group[data-v-f732136c] {
|
|
286
286
|
display: flex;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
.superdoc-toolbar[data-v-
|
|
289
|
+
.superdoc-toolbar[data-v-c7a72aa9] {
|
|
290
290
|
display: flex;
|
|
291
291
|
width: 100%;
|
|
292
292
|
justify-content: space-between;
|
|
293
293
|
padding: 4px 16px;
|
|
294
294
|
box-sizing: border-box;
|
|
295
|
+
font-family: var(--sd-ui-font-family, Arial, Helvetica, sans-serif);
|
|
295
296
|
}
|
|
296
297
|
@media (max-width: 1280px) {
|
|
297
|
-
.superdoc-toolbar-group-side[data-v-
|
|
298
|
+
.superdoc-toolbar-group-side[data-v-c7a72aa9] {
|
|
298
299
|
min-width: auto !important;
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
@media (max-width: 768px) {
|
|
302
|
-
.superdoc-toolbar[data-v-
|
|
303
|
+
.superdoc-toolbar[data-v-c7a72aa9] {
|
|
303
304
|
padding: 4px 10px;
|
|
304
305
|
justify-content: inherit;
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
/* Add isolation styles */
|
|
309
|
-
.prosemirror-isolated[data-v-
|
|
310
|
+
.prosemirror-isolated[data-v-a4bc3d14] {
|
|
310
311
|
/* Make sure the component is above ProseMirror in z-index */
|
|
311
312
|
z-index: 100;
|
|
312
313
|
position: relative;
|
|
313
314
|
}
|
|
314
|
-
.ai-writer[data-v-
|
|
315
|
+
.ai-writer[data-v-a4bc3d14] {
|
|
315
316
|
background-color: white;
|
|
316
317
|
display: flex;
|
|
317
318
|
flex-direction: column;
|
|
@@ -329,12 +330,12 @@
|
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
/* Chrome, Safari, and Opera */
|
|
332
|
-
.ai-writer[data-v-
|
|
333
|
+
.ai-writer[data-v-a4bc3d14]::-webkit-scrollbar {
|
|
333
334
|
display: none;
|
|
334
335
|
}
|
|
335
336
|
|
|
336
337
|
/* Replace .ai-editable with .ai-textarea */
|
|
337
|
-
.ai-textarea[data-v-
|
|
338
|
+
.ai-textarea[data-v-a4bc3d14] {
|
|
338
339
|
padding-left: 8px;
|
|
339
340
|
width: 100%;
|
|
340
341
|
color: #47484a;
|
|
@@ -345,15 +346,15 @@
|
|
|
345
346
|
resize: none;
|
|
346
347
|
overflow: hidden;
|
|
347
348
|
height: 100%;
|
|
348
|
-
font-family:
|
|
349
|
+
font-family: var(--sd-ui-font-family, Arial, Helvetica, sans-serif);
|
|
349
350
|
}
|
|
350
351
|
|
|
351
352
|
/* Add specific styles for textarea placeholder */
|
|
352
|
-
.ai-textarea[data-v-
|
|
353
|
+
.ai-textarea[data-v-a4bc3d14]::placeholder {
|
|
353
354
|
color: #666;
|
|
354
355
|
font-weight: 400;
|
|
355
356
|
}
|
|
356
|
-
.ai-user-input-field[data-v-
|
|
357
|
+
.ai-user-input-field[data-v-a4bc3d14] {
|
|
357
358
|
line-height: 13px;
|
|
358
359
|
display: flex;
|
|
359
360
|
flex-direction: row;
|
|
@@ -363,27 +364,27 @@
|
|
|
363
364
|
border-radius: 8px;
|
|
364
365
|
margin-bottom: 10px;
|
|
365
366
|
}
|
|
366
|
-
.ai-textarea-icon[data-v-
|
|
367
|
+
.ai-textarea-icon[data-v-a4bc3d14] {
|
|
367
368
|
display: block;
|
|
368
369
|
font-weight: 800;
|
|
369
370
|
font-size: 14px;
|
|
370
371
|
width: 16px;
|
|
371
372
|
height: 16px;
|
|
372
373
|
}
|
|
373
|
-
.ai-textarea-icon svg[data-v-
|
|
374
|
+
.ai-textarea-icon svg[data-v-a4bc3d14] {
|
|
374
375
|
height: 16px;
|
|
375
376
|
width: 16px;
|
|
376
377
|
}
|
|
377
|
-
.ai-textarea-icon.loading[data-v-
|
|
378
|
-
animation: spin-
|
|
378
|
+
.ai-textarea-icon.loading[data-v-a4bc3d14] {
|
|
379
|
+
animation: spin-a4bc3d14 2s linear infinite;
|
|
379
380
|
}
|
|
380
|
-
.loading i[data-v-
|
|
381
|
+
.loading i[data-v-a4bc3d14] {
|
|
381
382
|
display: flex;
|
|
382
383
|
}
|
|
383
|
-
.error[data-v-
|
|
384
|
+
.error[data-v-a4bc3d14] {
|
|
384
385
|
fill: #ed4337;
|
|
385
386
|
}
|
|
386
|
-
.ai-submit-button[data-v-
|
|
387
|
+
.ai-submit-button[data-v-a4bc3d14] {
|
|
387
388
|
border: none;
|
|
388
389
|
padding: 0;
|
|
389
390
|
margin: 0;
|
|
@@ -391,10 +392,10 @@
|
|
|
391
392
|
display: flex;
|
|
392
393
|
align-items: center;
|
|
393
394
|
}
|
|
394
|
-
.ai-submit-button[data-v-
|
|
395
|
+
.ai-submit-button[data-v-a4bc3d14]:hover {
|
|
395
396
|
opacity: 0.8;
|
|
396
397
|
}
|
|
397
|
-
@keyframes spin-
|
|
398
|
+
@keyframes spin-a4bc3d14 {
|
|
398
399
|
from {
|
|
399
400
|
transform: rotate(0deg);
|
|
400
401
|
}
|
|
@@ -402,7 +403,7 @@ to {
|
|
|
402
403
|
transform: rotate(360deg);
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
|
-
.ai-loader[data-v-
|
|
406
|
+
.ai-loader[data-v-a4bc3d14] {
|
|
406
407
|
display: flex;
|
|
407
408
|
height: 14px;
|
|
408
409
|
justify-content: flex-end;
|
|
@@ -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 _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
|
|
12
|
-
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9, aQ } 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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { F, I, G, T, B, H, C } from "./chunks/editor-
|
|
12
|
+
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-BavE2jnW.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-BavE2jnW.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-Cslr04KI.js";
|
|
15
|
+
import { F, I, G, T, B, H, C } from "./chunks/editor-Cslr04KI.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, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, Teleport, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-Zdgn--Js.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-CY4M19qa.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -1872,7 +1872,7 @@ const makeDefaultItems = ({
|
|
|
1872
1872
|
}
|
|
1873
1873
|
},
|
|
1874
1874
|
{
|
|
1875
|
-
label: toolbarTexts2.
|
|
1875
|
+
label: toolbarTexts2.removeBorders,
|
|
1876
1876
|
command: "deleteCellAndTableBorders",
|
|
1877
1877
|
icon: toolbarIcons2.deleteBorders,
|
|
1878
1878
|
bottomBorder: true,
|
|
@@ -2453,7 +2453,7 @@ const toolbarTexts = {
|
|
|
2453
2453
|
deleteRow: "Delete row",
|
|
2454
2454
|
deleteColumn: "Delete column",
|
|
2455
2455
|
deleteTable: "Delete table",
|
|
2456
|
-
|
|
2456
|
+
removeBorders: "Remove borders",
|
|
2457
2457
|
mergeCells: "Merge cells",
|
|
2458
2458
|
splitCell: "Split cell",
|
|
2459
2459
|
fixTables: "Fix tables",
|
|
@@ -2860,6 +2860,10 @@ const _SuperToolbar = class _SuperToolbar extends EventEmitter {
|
|
|
2860
2860
|
this.config.selector = this.config.element;
|
|
2861
2861
|
}
|
|
2862
2862
|
this.toolbarContainer = this.findElementBySelector(this.config.selector);
|
|
2863
|
+
if (this.toolbarContainer) {
|
|
2864
|
+
const uiFontFamily = (this.config?.uiDisplayFallbackFont || "").toString().trim() || "Arial, Helvetica, sans-serif";
|
|
2865
|
+
this.toolbarContainer.style.setProperty("--sd-ui-font-family", uiFontFamily);
|
|
2866
|
+
}
|
|
2863
2867
|
__privateMethod(this, _SuperToolbar_instances, initToolbarGroups_fn).call(this);
|
|
2864
2868
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
2865
2869
|
superToolbar: this,
|
|
@@ -3576,7 +3580,7 @@ const TEXTS = {
|
|
|
3576
3580
|
deleteRow: "Delete row",
|
|
3577
3581
|
deleteColumn: "Delete column",
|
|
3578
3582
|
deleteTable: "Delete table",
|
|
3579
|
-
|
|
3583
|
+
removeBorders: "Remove borders",
|
|
3580
3584
|
mergeCells: "Merge cells",
|
|
3581
3585
|
splitCell: "Split cell",
|
|
3582
3586
|
fixTables: "Fix tables",
|
|
@@ -3659,7 +3663,7 @@ const tableActionsOptions = [
|
|
|
3659
3663
|
}
|
|
3660
3664
|
},
|
|
3661
3665
|
{
|
|
3662
|
-
label: TEXTS.
|
|
3666
|
+
label: TEXTS.removeBorders,
|
|
3663
3667
|
command: "deleteCellAndTableBorders",
|
|
3664
3668
|
icon: ICONS.deleteBorders,
|
|
3665
3669
|
bottomBorder: true,
|
|
@@ -4067,9 +4071,9 @@ function getItems(context, customItems = [], includeDefaultItems = true) {
|
|
|
4067
4071
|
action: (editor2) => {
|
|
4068
4072
|
editor2.commands.createDocumentSection();
|
|
4069
4073
|
},
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
return
|
|
4074
|
+
// TODO: Temporarily disabled - restore original: `return trigger === TRIGGERS.click;`
|
|
4075
|
+
showWhen: () => {
|
|
4076
|
+
return false;
|
|
4073
4077
|
}
|
|
4074
4078
|
},
|
|
4075
4079
|
{
|
|
@@ -4407,19 +4411,31 @@ const _sfc_main$8 = {
|
|
|
4407
4411
|
return;
|
|
4408
4412
|
}
|
|
4409
4413
|
event.preventDefault();
|
|
4410
|
-
|
|
4414
|
+
const editorState = props.editor?.state;
|
|
4415
|
+
const hasRangeSelection = editorState?.selection?.from !== editorState?.selection?.to;
|
|
4416
|
+
let isClickInsideSelection = false;
|
|
4417
|
+
if (hasRangeSelection && Number.isFinite(event.clientX) && Number.isFinite(event.clientY)) {
|
|
4418
|
+
const hit = props.editor?.posAtCoords?.({ left: event.clientX, top: event.clientY });
|
|
4419
|
+
if (typeof hit?.pos === "number") {
|
|
4420
|
+
const { from, to } = editorState.selection;
|
|
4421
|
+
isClickInsideSelection = hit.pos >= from && hit.pos <= to;
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
if (!isClickInsideSelection) {
|
|
4425
|
+
moveCursorToMouseEvent(event, props.editor);
|
|
4426
|
+
}
|
|
4411
4427
|
try {
|
|
4412
4428
|
const context = await getEditorContext(props.editor, event);
|
|
4413
4429
|
currentContext.value = context;
|
|
4414
4430
|
sections.value = getItems({ ...context, trigger: "click" });
|
|
4415
4431
|
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
4416
4432
|
searchQuery.value = "";
|
|
4417
|
-
const
|
|
4418
|
-
if (!
|
|
4433
|
+
const currentState = props.editor.state;
|
|
4434
|
+
if (!currentState) return;
|
|
4419
4435
|
props.editor.dispatch(
|
|
4420
|
-
|
|
4436
|
+
currentState.tr.setMeta(SlashMenuPluginKey, {
|
|
4421
4437
|
type: "open",
|
|
4422
|
-
pos: context?.pos ??
|
|
4438
|
+
pos: context?.pos ?? currentState.selection.from,
|
|
4423
4439
|
clientX: event.clientX,
|
|
4424
4440
|
clientY: event.clientY
|
|
4425
4441
|
})
|
|
@@ -4432,12 +4448,21 @@ const _sfc_main$8 = {
|
|
|
4432
4448
|
if (props.editor) {
|
|
4433
4449
|
item.action ? await item.action(props.editor, currentContext.value) : null;
|
|
4434
4450
|
if (item.component) {
|
|
4435
|
-
menuRef.value;
|
|
4451
|
+
const menuElement = menuRef.value;
|
|
4436
4452
|
const componentProps = getPropsByItemId(item.id, props);
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4453
|
+
let popoverPosition = { left: menuPosition.value.left, top: menuPosition.value.top };
|
|
4454
|
+
if (menuElement) {
|
|
4455
|
+
const menuRect = menuElement.getBoundingClientRect();
|
|
4456
|
+
const container = menuElement.closest(".super-editor");
|
|
4457
|
+
if (container) {
|
|
4458
|
+
const containerRect = container.getBoundingClientRect();
|
|
4459
|
+
popoverPosition = {
|
|
4460
|
+
left: `${menuRect.left - containerRect.left}px`,
|
|
4461
|
+
top: `${menuRect.top - containerRect.top}px`
|
|
4462
|
+
};
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
props.openPopover(markRaw(item.component), componentProps, popoverPosition);
|
|
4441
4466
|
closeMenu({ restoreCursor: false });
|
|
4442
4467
|
} else {
|
|
4443
4468
|
const shouldRestoreCursor = item.id !== "paste";
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BQQuazyp.cjs");
|
|
4
4
|
require("./chunks/vue-jWLMl8Ts.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
2
|
-
import "./chunks/vue-
|
|
1
|
+
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-DKr759cY.es.js";
|
|
2
|
+
import "./chunks/vue-BuPTonTJ.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
|
5
5
|
a as AnnotatorHelpers,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BQQuazyp.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-4FiyZ-0E.cjs");
|
|
5
5
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
|
7
7
|
exports.Editor = superEditor_es.Editor;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-DKr759cY.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-1n6qegaQ.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|