@harbour-enterprises/superdoc 1.3.0-next.9 → 1.3.1-next.1
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-D5wFkJWQ.cjs → PdfViewer-B1rqV4Hp.cjs} +2 -2
- package/dist/chunks/{PdfViewer-GBLnj5Yg.es.js → PdfViewer-BVvi-ZEK.es.js} +2 -2
- package/dist/chunks/{SuperConverter-lLx4GqcF.es.js → SuperConverter-AxPNFosS.es.js} +13 -12
- package/dist/chunks/{SuperConverter-BuhT_Z5G.cjs → SuperConverter-rwP6nlvC.cjs} +2 -1
- package/dist/chunks/{index-Dgo4AYNb.cjs → index-BmwaXglr.cjs} +30 -7
- package/dist/chunks/{index-CqzJ4gdV.cjs → index-Ccw24rQt.cjs} +518 -162
- package/dist/chunks/{index-s5ZqooQe.es.js → index-DZF2SDeC.es.js} +518 -162
- package/dist/chunks/{index-C0aR6iQ3.es.js → index-IUXq0EQx.es.js} +30 -7
- package/dist/style.css +40 -34
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +3 -3
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +545 -166
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const superdoc = require("./index-BmwaXglr.cjs");
|
|
5
|
+
const index = require("./index-Ccw24rQt.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
|
|
2
|
-
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-
|
|
3
|
-
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-
|
|
2
|
+
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-IUXq0EQx.es.js";
|
|
3
|
+
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-DZF2SDeC.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -31007,7 +31007,7 @@ class SuperConverter {
|
|
|
31007
31007
|
static getStoredSuperdocVersion(docx) {
|
|
31008
31008
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
31009
31009
|
}
|
|
31010
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.3.
|
|
31010
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.3.1-next.1") {
|
|
31011
31011
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
31012
31012
|
}
|
|
31013
31013
|
/**
|
|
@@ -31685,17 +31685,18 @@ export {
|
|
|
31685
31685
|
translator$14 as a0,
|
|
31686
31686
|
translator$1O as a1,
|
|
31687
31687
|
resolveDocxFontFamily as a2,
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31691
|
-
|
|
31692
|
-
|
|
31693
|
-
|
|
31694
|
-
|
|
31695
|
-
|
|
31696
|
-
|
|
31697
|
-
|
|
31698
|
-
|
|
31688
|
+
combineIndentProperties as a3,
|
|
31689
|
+
_getReferencedTableStyles as a4,
|
|
31690
|
+
decodeRPrFromMarks as a5,
|
|
31691
|
+
calculateResolvedParagraphProperties as a6,
|
|
31692
|
+
encodeCSSFromPPr as a7,
|
|
31693
|
+
encodeCSSFromRPr as a8,
|
|
31694
|
+
generateOrderedListIndex as a9,
|
|
31695
|
+
docxNumberingHelpers as aa,
|
|
31696
|
+
InputRule as ab,
|
|
31697
|
+
insertNewRelationship as ac,
|
|
31698
|
+
kebabCase as ad,
|
|
31699
|
+
getUnderlineCssString as ae,
|
|
31699
31700
|
chainableEditorState as b,
|
|
31700
31701
|
createDocFromMarkdown as c,
|
|
31701
31702
|
convertMarkdownToHTML as d,
|
|
@@ -31008,7 +31008,7 @@ class SuperConverter {
|
|
|
31008
31008
|
static getStoredSuperdocVersion(docx) {
|
|
31009
31009
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
31010
31010
|
}
|
|
31011
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.3.
|
|
31011
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.3.1-next.1") {
|
|
31012
31012
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
31013
31013
|
}
|
|
31014
31014
|
/**
|
|
@@ -31686,6 +31686,7 @@ exports.canJoin = canJoin;
|
|
|
31686
31686
|
exports.canSplit = canSplit;
|
|
31687
31687
|
exports.chainableEditorState = chainableEditorState;
|
|
31688
31688
|
exports.changeListLevel = changeListLevel;
|
|
31689
|
+
exports.combineIndentProperties = combineIndentProperties;
|
|
31689
31690
|
exports.convertMarkdownToHTML = convertMarkdownToHTML;
|
|
31690
31691
|
exports.createDocFromHTML = createDocFromHTML;
|
|
31691
31692
|
exports.createDocFromMarkdown = createDocFromMarkdown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-Ccw24rQt.cjs");
|
|
3
|
+
require("./SuperConverter-rwP6nlvC.cjs");
|
|
4
4
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
5
5
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
6
6
|
const provider = require("@hocuspocus/provider");
|
|
@@ -7465,7 +7465,7 @@ const _sfc_main = {
|
|
|
7465
7465
|
__name: "SuperDoc",
|
|
7466
7466
|
emits: ["selection-update"],
|
|
7467
7467
|
setup(__props, { emit: __emit }) {
|
|
7468
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
7468
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-B1rqV4Hp.cjs")));
|
|
7469
7469
|
const superdocStore = useSuperdocStore();
|
|
7470
7470
|
const commentsStore = useCommentsStore();
|
|
7471
7471
|
const {
|
|
@@ -7506,6 +7506,7 @@ const _sfc_main = {
|
|
|
7506
7506
|
commentsStore.proxy = proxy;
|
|
7507
7507
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
7508
7508
|
const { uiFontFamily } = useUiFontFamily();
|
|
7509
|
+
const isViewingMode = () => proxy?.$superdoc?.config?.documentMode === "viewing";
|
|
7509
7510
|
const commentsModuleConfig = vue.computed(() => {
|
|
7510
7511
|
const config = modules.comments;
|
|
7511
7512
|
if (config === false || config == null) return null;
|
|
@@ -7600,6 +7601,10 @@ const _sfc_main = {
|
|
|
7600
7601
|
const commentsConfig = proxy.$superdoc.config.modules?.comments;
|
|
7601
7602
|
if (!commentsConfig || commentsConfig === false) return;
|
|
7602
7603
|
if (!positions || Object.keys(positions).length === 0) return;
|
|
7604
|
+
if (isViewingMode()) {
|
|
7605
|
+
commentsStore.clearEditorCommentPositions?.();
|
|
7606
|
+
return;
|
|
7607
|
+
}
|
|
7603
7608
|
const mappedPositions = presentationEditor.getCommentBounds(positions, layers.value);
|
|
7604
7609
|
handleEditorLocationsUpdate(mappedPositions);
|
|
7605
7610
|
});
|
|
@@ -7619,6 +7624,13 @@ const _sfc_main = {
|
|
|
7619
7624
|
const onEditorSelectionChange = ({ editor, transaction }) => {
|
|
7620
7625
|
if (skipSelectionUpdate.value) {
|
|
7621
7626
|
skipSelectionUpdate.value = false;
|
|
7627
|
+
if (isViewingMode()) {
|
|
7628
|
+
resetSelection();
|
|
7629
|
+
}
|
|
7630
|
+
return;
|
|
7631
|
+
}
|
|
7632
|
+
if (isViewingMode()) {
|
|
7633
|
+
resetSelection();
|
|
7622
7634
|
return;
|
|
7623
7635
|
}
|
|
7624
7636
|
const { documentId } = editor.options;
|
|
@@ -7797,6 +7809,10 @@ const _sfc_main = {
|
|
|
7797
7809
|
const onEditorCommentLocationsUpdate = (doc, { allCommentIds: activeThreadId, allCommentPositions } = {}) => {
|
|
7798
7810
|
const commentsConfig = proxy.$superdoc.config.modules?.comments;
|
|
7799
7811
|
if (!commentsConfig || commentsConfig === false) return;
|
|
7812
|
+
if (isViewingMode()) {
|
|
7813
|
+
commentsStore.clearEditorCommentPositions?.();
|
|
7814
|
+
return;
|
|
7815
|
+
}
|
|
7800
7816
|
const presentation = index.PresentationEditor.getInstance(doc.id);
|
|
7801
7817
|
if (!presentation) {
|
|
7802
7818
|
handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
|
|
@@ -7852,11 +7868,12 @@ const _sfc_main = {
|
|
|
7852
7868
|
};
|
|
7853
7869
|
const isCommentsEnabled = vue.computed(() => Boolean(commentsModuleConfig.value));
|
|
7854
7870
|
const showCommentsSidebar = vue.computed(() => {
|
|
7871
|
+
if (isViewingMode()) return false;
|
|
7855
7872
|
return pendingComment.value || getFloatingComments.value?.length > 0 && isReady.value && layers.value && isCommentsEnabled.value && !isCommentsListVisible.value;
|
|
7856
7873
|
});
|
|
7857
7874
|
const showToolsFloatingMenu = vue.computed(() => {
|
|
7858
7875
|
if (!isCommentsEnabled.value) return false;
|
|
7859
|
-
return toolsMenuPosition.top && !getConfig.value?.readOnly;
|
|
7876
|
+
return selectionPosition.value && toolsMenuPosition.top && !getConfig.value?.readOnly;
|
|
7860
7877
|
});
|
|
7861
7878
|
vue.computed(() => {
|
|
7862
7879
|
if (!isCommentsEnabled.value) return false;
|
|
@@ -7904,6 +7921,10 @@ const _sfc_main = {
|
|
|
7904
7921
|
return style2;
|
|
7905
7922
|
});
|
|
7906
7923
|
const handleSelectionChange = (selection) => {
|
|
7924
|
+
if (isViewingMode()) {
|
|
7925
|
+
resetSelection();
|
|
7926
|
+
return;
|
|
7927
|
+
}
|
|
7907
7928
|
if (!selection.selectionBounds || !isCommentsEnabled.value) return;
|
|
7908
7929
|
resetSelection();
|
|
7909
7930
|
const isMobileView = window.matchMedia("(max-width: 768px)").matches;
|
|
@@ -7929,12 +7950,14 @@ const _sfc_main = {
|
|
|
7929
7950
|
};
|
|
7930
7951
|
const resetSelection = () => {
|
|
7931
7952
|
selectionPosition.value = null;
|
|
7953
|
+
toolsMenuPosition.top = null;
|
|
7932
7954
|
};
|
|
7933
7955
|
const updateSelection = ({ startX, startY, x, y, source }) => {
|
|
7934
7956
|
const hasStartCoords = typeof startX === "number" || typeof startY === "number";
|
|
7935
7957
|
const hasEndCoords = typeof x === "number" || typeof y === "number";
|
|
7936
7958
|
if (!hasStartCoords && !hasEndCoords) {
|
|
7937
|
-
|
|
7959
|
+
resetSelection();
|
|
7960
|
+
return;
|
|
7938
7961
|
}
|
|
7939
7962
|
if (!selectionPosition.value) {
|
|
7940
7963
|
if (startY == null || startX == null) return;
|
|
@@ -8187,7 +8210,7 @@ const _sfc_main = {
|
|
|
8187
8210
|
};
|
|
8188
8211
|
}
|
|
8189
8212
|
};
|
|
8190
|
-
const App = /* @__PURE__ */ index._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
8213
|
+
const App = /* @__PURE__ */ index._export_sfc(_sfc_main, [["__scopeId", "data-v-5196811d"]]);
|
|
8191
8214
|
const createSuperdocVueApp = () => {
|
|
8192
8215
|
const app = vue.createApp(App);
|
|
8193
8216
|
const pinia = createPinia();
|
|
@@ -8371,7 +8394,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
8371
8394
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8372
8395
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8373
8396
|
this.colorIndex = 0;
|
|
8374
|
-
this.version = "1.3.
|
|
8397
|
+
this.version = "1.3.1-next.1";
|
|
8375
8398
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8376
8399
|
this.superdocId = config.superdocId || uuid.v4();
|
|
8377
8400
|
this.colors = this.config.colors;
|