superdoc 1.0.2 → 1.0.3
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-Dk7wI3bm.cjs → PdfViewer-2wYU1nQs.cjs} +1 -1
- package/dist/chunks/{PdfViewer-C51KNTCu.es.js → PdfViewer-Brf64q-p.es.js} +1 -1
- package/dist/chunks/{index-DDZ1ZT8N-DzepXBTN.cjs → index-BFesQTtm-DF8MwT73.cjs} +1 -1
- package/dist/chunks/{index-DDZ1ZT8N-MJzqg0qg.es.js → index-BFesQTtm-DNeH374x.es.js} +1 -1
- package/dist/chunks/{index-Cf7hdzkm.cjs → index-DeETxTrW.cjs} +3 -3
- package/dist/chunks/{index-rtbawgUA.es.js → index-KBIvw6xZ.es.js} +3 -3
- package/dist/chunks/{super-editor.es-BijxiFs9.cjs → super-editor.es-C_LoTWvJ.cjs} +687 -136
- package/dist/chunks/{super-editor.es-DFXddrgb.es.js → super-editor.es-DWpzsMUa.es.js} +687 -136
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/style.css +6 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-VYPiNbpo.js → converter-BhELnOP5.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-D8Tzq3RX.js → docx-zipper-Bwi8bTEB.js} +1 -1
- package/dist/super-editor/chunks/{editor-mgoEnsBi.js → editor-Dyj08tpz.js} +684 -150
- package/dist/super-editor/chunks/{index-DDZ1ZT8N.js → index-BFesQTtm.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-DULgxvjl.js → toolbar-DRFf1nRv.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +6 -6
- package/dist/super-editor/super-editor.es.js +41 -17
- 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 +689 -138
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, readonly, watch, computed, getCurrentInstance, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, withDirectives, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, markRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, withKeys, unref, withModifiers, createBlock, toDisplayString, vModelText, createVNode, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-BhELnOP5.js";
|
|
3
|
+
import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-Dyj08tpz.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -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-Dyj08tpz.js";
|
|
2
|
+
import "./chunks/converter-BhELnOP5.js";
|
|
3
|
+
import "./chunks/docx-zipper-Bwi8bTEB.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -1957,10 +1957,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
1957
1957
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
1958
1958
|
}
|
|
1959
1959
|
|
|
1960
|
-
.editor-element[data-v-
|
|
1960
|
+
.editor-element[data-v-c9a3c876] {
|
|
1961
1961
|
position: relative;
|
|
1962
1962
|
}
|
|
1963
|
-
.super-editor-container[data-v-
|
|
1963
|
+
.super-editor-container[data-v-c9a3c876] {
|
|
1964
1964
|
width: auto;
|
|
1965
1965
|
height: auto;
|
|
1966
1966
|
min-width: 8in;
|
|
@@ -1969,14 +1969,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
1969
1969
|
display: flex;
|
|
1970
1970
|
flex-direction: column;
|
|
1971
1971
|
}
|
|
1972
|
-
.ruler[data-v-
|
|
1972
|
+
.ruler[data-v-c9a3c876] {
|
|
1973
1973
|
margin-bottom: 2px;
|
|
1974
1974
|
}
|
|
1975
|
-
.super-editor[data-v-
|
|
1975
|
+
.super-editor[data-v-c9a3c876] {
|
|
1976
1976
|
color: initial;
|
|
1977
1977
|
overflow: hidden;
|
|
1978
1978
|
}
|
|
1979
|
-
.placeholder-editor[data-v-
|
|
1979
|
+
.placeholder-editor[data-v-c9a3c876] {
|
|
1980
1980
|
position: absolute;
|
|
1981
1981
|
top: 0;
|
|
1982
1982
|
left: 0;
|
|
@@ -1988,7 +1988,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
1988
1988
|
background-color: white;
|
|
1989
1989
|
box-sizing: border-box;
|
|
1990
1990
|
}
|
|
1991
|
-
.placeholder-title[data-v-
|
|
1991
|
+
.placeholder-title[data-v-c9a3c876] {
|
|
1992
1992
|
display: flex;
|
|
1993
1993
|
justify-content: center;
|
|
1994
1994
|
margin-bottom: 40px;
|
|
@@ -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,
|
|
15
|
-
import {
|
|
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, W as isMacOS, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-BhELnOP5.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-BhELnOP5.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 SLASH_MENU_HANDLED_FLAG, m as SlashMenuPluginKey, s as shouldBypassContextMenu, n as generateRulerDefinition, o as clampHandlePosition, p as calculateMarginFromHandle, q as measureCache, t as isHeadless, E as Editor, v as getStarterExtensions, P as PresentationEditor, w as Placeholder, x as getRichTextExtensions, D as DecorationSet, z as Decoration, M as Mark, A as Extension, B as Attribute, N as Node } from "./chunks/editor-Dyj08tpz.js";
|
|
15
|
+
import { G, J, H, T, C, I, F } from "./chunks/editor-Dyj08tpz.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-DRFf1nRv.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Bwi8bTEB.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -4294,7 +4294,7 @@ const _sfc_main$8 = {
|
|
|
4294
4294
|
if (open) {
|
|
4295
4295
|
nextTick(() => {
|
|
4296
4296
|
if (searchInput.value) {
|
|
4297
|
-
searchInput.value.focus();
|
|
4297
|
+
searchInput.value.focus({ preventScroll: true });
|
|
4298
4298
|
}
|
|
4299
4299
|
});
|
|
4300
4300
|
}
|
|
@@ -4399,15 +4399,31 @@ const _sfc_main$8 = {
|
|
|
4399
4399
|
};
|
|
4400
4400
|
const handleGlobalOutsideClick = (event) => {
|
|
4401
4401
|
if (isOpen.value && menuRef.value && !menuRef.value.contains(event.target)) {
|
|
4402
|
-
|
|
4402
|
+
const isCtrlClickOnMac = event.ctrlKey && isMacOS();
|
|
4403
|
+
const isLeftClick = event.button === 0 && !isCtrlClickOnMac;
|
|
4404
|
+
if (isLeftClick) {
|
|
4405
|
+
moveCursorToMouseEvent(event, props.editor);
|
|
4406
|
+
}
|
|
4403
4407
|
closeMenu({ restoreCursor: false });
|
|
4404
4408
|
}
|
|
4405
4409
|
};
|
|
4406
|
-
const
|
|
4410
|
+
const shouldHandleContextMenu = (event) => {
|
|
4407
4411
|
const readOnly = !props.editor?.isEditable;
|
|
4408
4412
|
const contextMenuDisabled = props.editor?.options?.disableContextMenu;
|
|
4409
4413
|
const bypass = shouldBypassContextMenu(event);
|
|
4410
|
-
|
|
4414
|
+
return !readOnly && !contextMenuDisabled && !bypass;
|
|
4415
|
+
};
|
|
4416
|
+
const handleRightClickCapture = (event) => {
|
|
4417
|
+
try {
|
|
4418
|
+
if (shouldHandleContextMenu(event)) {
|
|
4419
|
+
event[SLASH_MENU_HANDLED_FLAG] = true;
|
|
4420
|
+
}
|
|
4421
|
+
} catch (error) {
|
|
4422
|
+
console.warn("[SlashMenu] Error in capture phase context menu handler:", error);
|
|
4423
|
+
}
|
|
4424
|
+
};
|
|
4425
|
+
const handleRightClick = async (event) => {
|
|
4426
|
+
if (!shouldHandleContextMenu(event)) {
|
|
4411
4427
|
return;
|
|
4412
4428
|
}
|
|
4413
4429
|
event.preventDefault();
|
|
@@ -4518,6 +4534,7 @@ const _sfc_main$8 = {
|
|
|
4518
4534
|
props.editor.on("slashMenu:open", slashMenuOpenHandler);
|
|
4519
4535
|
contextMenuTarget = getEditorSurfaceElement(props.editor);
|
|
4520
4536
|
if (contextMenuTarget) {
|
|
4537
|
+
contextMenuTarget.addEventListener("contextmenu", handleRightClickCapture, true);
|
|
4521
4538
|
contextMenuTarget.addEventListener("contextmenu", handleRightClick);
|
|
4522
4539
|
}
|
|
4523
4540
|
slashMenuCloseHandler = () => {
|
|
@@ -4541,6 +4558,7 @@ const _sfc_main$8 = {
|
|
|
4541
4558
|
props.editor.off("slashMenu:close", slashMenuCloseHandler);
|
|
4542
4559
|
}
|
|
4543
4560
|
props.editor.off("update", handleEditorUpdate);
|
|
4561
|
+
contextMenuTarget?.removeEventListener("contextmenu", handleRightClickCapture, true);
|
|
4544
4562
|
contextMenuTarget?.removeEventListener("contextmenu", handleRightClick);
|
|
4545
4563
|
} catch (error) {
|
|
4546
4564
|
console.warn("[SlashMenu] Error during cleanup:", error);
|
|
@@ -6507,6 +6525,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6507
6525
|
if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
|
|
6508
6526
|
});
|
|
6509
6527
|
const handleMarginClick = (event) => {
|
|
6528
|
+
if (event.button !== 0) {
|
|
6529
|
+
return;
|
|
6530
|
+
}
|
|
6531
|
+
if (event.ctrlKey && isMacOS()) {
|
|
6532
|
+
return;
|
|
6533
|
+
}
|
|
6510
6534
|
if (event.target.classList.contains("ProseMirror")) return;
|
|
6511
6535
|
onMarginClickCursorChange(event, activeEditor.value);
|
|
6512
6536
|
};
|
|
@@ -6645,7 +6669,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6645
6669
|
};
|
|
6646
6670
|
}
|
|
6647
6671
|
});
|
|
6648
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
6672
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c9a3c876"]]);
|
|
6649
6673
|
const _hoisted_1 = ["innerHTML"];
|
|
6650
6674
|
const _sfc_main = {
|
|
6651
6675
|
__name: "SuperInput",
|
|
@@ -6750,14 +6774,14 @@ const Extensions = {
|
|
|
6750
6774
|
};
|
|
6751
6775
|
export {
|
|
6752
6776
|
AIWriter,
|
|
6753
|
-
|
|
6777
|
+
G as AnnotatorHelpers,
|
|
6754
6778
|
_sfc_main$7 as BasicUpload,
|
|
6755
|
-
|
|
6779
|
+
J as CommentsPluginKey,
|
|
6756
6780
|
D as DocxZipper,
|
|
6757
6781
|
Editor,
|
|
6758
6782
|
Extensions,
|
|
6759
6783
|
PresentationEditor,
|
|
6760
|
-
|
|
6784
|
+
H as SectionHelpers,
|
|
6761
6785
|
_sfc_main$8 as SlashMenu,
|
|
6762
6786
|
ac as SuperConverter,
|
|
6763
6787
|
SuperEditor,
|
|
@@ -6766,13 +6790,13 @@ export {
|
|
|
6766
6790
|
Toolbar,
|
|
6767
6791
|
T as TrackChangesBasePluginKey,
|
|
6768
6792
|
createZip,
|
|
6769
|
-
|
|
6793
|
+
C as fieldAnnotationHelpers,
|
|
6770
6794
|
getActiveFormatting,
|
|
6771
|
-
|
|
6795
|
+
I as getAllowedImageDimensions,
|
|
6772
6796
|
i as getMarksFromSelection,
|
|
6773
6797
|
getRichTextExtensions,
|
|
6774
6798
|
getStarterExtensions,
|
|
6775
6799
|
a9 as helpers,
|
|
6776
6800
|
aQ as registeredHandlers,
|
|
6777
|
-
|
|
6801
|
+
F as trackChangesHelpers
|
|
6778
6802
|
};
|
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-C_LoTWvJ.cjs");
|
|
4
4
|
require("./chunks/vue-gvuFr0vx.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DWpzsMUa.es.js";
|
|
2
2
|
import "./chunks/vue-CLFbn_1r.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
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-C_LoTWvJ.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DeETxTrW.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-DWpzsMUa.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-KBIvw6xZ.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|