@harbour-enterprises/superdoc 1.3.0-next.12 → 1.3.0-next.13
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-D4-tXW9I.es.js → PdfViewer-DebfKi_n.es.js} +2 -2
- package/dist/chunks/{PdfViewer-B4cw8sRa.cjs → PdfViewer-z2obaZHa.cjs} +2 -2
- package/dist/chunks/{SuperConverter-BQHQ2WON.es.js → SuperConverter-Dh27SFeK.es.js} +1 -1
- package/dist/chunks/{SuperConverter-BauKfBRr.cjs → SuperConverter-Dxl1uYvz.cjs} +1 -1
- package/dist/chunks/{index-BC056HXc.cjs → index-C7p34V06.cjs} +30 -7
- package/dist/chunks/{index-CCWqRqAf.cjs → index-DNdp0AxW.cjs} +4 -4
- package/dist/chunks/{index-BPi2Cjky.es.js → index-DOsTLvRQ.es.js} +30 -7
- package/dist/chunks/{index-BRomAwaA.es.js → index-OlLDoLS-.es.js} +4 -4
- package/dist/style.css +27 -27
- 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 +31 -8
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -36435,7 +36435,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36435
36435
|
static getStoredSuperdocVersion(docx) {
|
|
36436
36436
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
36437
36437
|
}
|
|
36438
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.3.0-next.
|
|
36438
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.3.0-next.13") {
|
|
36439
36439
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
36440
36440
|
}
|
|
36441
36441
|
/**
|
|
@@ -62245,7 +62245,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62245
62245
|
return false;
|
|
62246
62246
|
}
|
|
62247
62247
|
};
|
|
62248
|
-
const summaryVersion = "1.3.0-next.
|
|
62248
|
+
const summaryVersion = "1.3.0-next.13";
|
|
62249
62249
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
62250
62250
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
62251
62251
|
function mapAttributes(attrs) {
|
|
@@ -64878,7 +64878,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
64878
64878
|
* Process collaboration migrations
|
|
64879
64879
|
*/
|
|
64880
64880
|
processCollaborationMigrations() {
|
|
64881
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.
|
|
64881
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.13");
|
|
64882
64882
|
if (!this.options.ydoc) return;
|
|
64883
64883
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
64884
64884
|
let docVersion = metaMap.get("version");
|
|
@@ -101543,7 +101543,7 @@ ${l}
|
|
|
101543
101543
|
const zoom = this.#layoutOptions.zoom ?? 1;
|
|
101544
101544
|
const layoutMode = this.#layoutOptions.layoutMode ?? "vertical";
|
|
101545
101545
|
const pages = this.#layoutState.layout?.pages;
|
|
101546
|
-
const pageGap = this.#
|
|
101546
|
+
const pageGap = this.#getEffectivePageGap();
|
|
101547
101547
|
const defaultWidth = this.#layoutOptions.pageSize?.w ?? DEFAULT_PAGE_SIZE.w;
|
|
101548
101548
|
const defaultHeight = this.#layoutOptions.pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
101549
101549
|
let maxWidth = defaultWidth;
|
|
@@ -143451,6 +143451,7 @@ ${reason}`);
|
|
|
143451
143451
|
commentsStore.proxy = proxy;
|
|
143452
143452
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
143453
143453
|
const { uiFontFamily } = useUiFontFamily();
|
|
143454
|
+
const isViewingMode = () => proxy?.$superdoc?.config?.documentMode === "viewing";
|
|
143454
143455
|
const commentsModuleConfig = computed(() => {
|
|
143455
143456
|
const config2 = modules.comments;
|
|
143456
143457
|
if (config2 === false || config2 == null) return null;
|
|
@@ -143545,6 +143546,10 @@ ${reason}`);
|
|
|
143545
143546
|
const commentsConfig = proxy.$superdoc.config.modules?.comments;
|
|
143546
143547
|
if (!commentsConfig || commentsConfig === false) return;
|
|
143547
143548
|
if (!positions || Object.keys(positions).length === 0) return;
|
|
143549
|
+
if (isViewingMode()) {
|
|
143550
|
+
commentsStore.clearEditorCommentPositions?.();
|
|
143551
|
+
return;
|
|
143552
|
+
}
|
|
143548
143553
|
const mappedPositions = presentationEditor.getCommentBounds(positions, layers.value);
|
|
143549
143554
|
handleEditorLocationsUpdate(mappedPositions);
|
|
143550
143555
|
});
|
|
@@ -143564,6 +143569,13 @@ ${reason}`);
|
|
|
143564
143569
|
const onEditorSelectionChange = ({ editor, transaction }) => {
|
|
143565
143570
|
if (skipSelectionUpdate.value) {
|
|
143566
143571
|
skipSelectionUpdate.value = false;
|
|
143572
|
+
if (isViewingMode()) {
|
|
143573
|
+
resetSelection();
|
|
143574
|
+
}
|
|
143575
|
+
return;
|
|
143576
|
+
}
|
|
143577
|
+
if (isViewingMode()) {
|
|
143578
|
+
resetSelection();
|
|
143567
143579
|
return;
|
|
143568
143580
|
}
|
|
143569
143581
|
const { documentId } = editor.options;
|
|
@@ -143742,6 +143754,10 @@ ${reason}`);
|
|
|
143742
143754
|
const onEditorCommentLocationsUpdate = (doc2, { allCommentIds: activeThreadId, allCommentPositions } = {}) => {
|
|
143743
143755
|
const commentsConfig = proxy.$superdoc.config.modules?.comments;
|
|
143744
143756
|
if (!commentsConfig || commentsConfig === false) return;
|
|
143757
|
+
if (isViewingMode()) {
|
|
143758
|
+
commentsStore.clearEditorCommentPositions?.();
|
|
143759
|
+
return;
|
|
143760
|
+
}
|
|
143745
143761
|
const presentation = PresentationEditor.getInstance(doc2.id);
|
|
143746
143762
|
if (!presentation) {
|
|
143747
143763
|
handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
|
|
@@ -143797,11 +143813,12 @@ ${reason}`);
|
|
|
143797
143813
|
};
|
|
143798
143814
|
const isCommentsEnabled = computed(() => Boolean(commentsModuleConfig.value));
|
|
143799
143815
|
const showCommentsSidebar = computed(() => {
|
|
143816
|
+
if (isViewingMode()) return false;
|
|
143800
143817
|
return pendingComment.value || getFloatingComments.value?.length > 0 && isReady.value && layers.value && isCommentsEnabled.value && !isCommentsListVisible.value;
|
|
143801
143818
|
});
|
|
143802
143819
|
const showToolsFloatingMenu = computed(() => {
|
|
143803
143820
|
if (!isCommentsEnabled.value) return false;
|
|
143804
|
-
return toolsMenuPosition.top && !getConfig2.value?.readOnly;
|
|
143821
|
+
return selectionPosition.value && toolsMenuPosition.top && !getConfig2.value?.readOnly;
|
|
143805
143822
|
});
|
|
143806
143823
|
computed(() => {
|
|
143807
143824
|
if (!isCommentsEnabled.value) return false;
|
|
@@ -143849,6 +143866,10 @@ ${reason}`);
|
|
|
143849
143866
|
return style2;
|
|
143850
143867
|
});
|
|
143851
143868
|
const handleSelectionChange = (selection) => {
|
|
143869
|
+
if (isViewingMode()) {
|
|
143870
|
+
resetSelection();
|
|
143871
|
+
return;
|
|
143872
|
+
}
|
|
143852
143873
|
if (!selection.selectionBounds || !isCommentsEnabled.value) return;
|
|
143853
143874
|
resetSelection();
|
|
143854
143875
|
const isMobileView = window.matchMedia("(max-width: 768px)").matches;
|
|
@@ -143874,12 +143895,14 @@ ${reason}`);
|
|
|
143874
143895
|
};
|
|
143875
143896
|
const resetSelection = () => {
|
|
143876
143897
|
selectionPosition.value = null;
|
|
143898
|
+
toolsMenuPosition.top = null;
|
|
143877
143899
|
};
|
|
143878
143900
|
const updateSelection2 = ({ startX, startY, x: x2, y: y2, source }) => {
|
|
143879
143901
|
const hasStartCoords = typeof startX === "number" || typeof startY === "number";
|
|
143880
143902
|
const hasEndCoords = typeof x2 === "number" || typeof y2 === "number";
|
|
143881
143903
|
if (!hasStartCoords && !hasEndCoords) {
|
|
143882
|
-
|
|
143904
|
+
resetSelection();
|
|
143905
|
+
return;
|
|
143883
143906
|
}
|
|
143884
143907
|
if (!selectionPosition.value) {
|
|
143885
143908
|
if (startY == null || startX == null) return;
|
|
@@ -144132,7 +144155,7 @@ ${reason}`);
|
|
|
144132
144155
|
};
|
|
144133
144156
|
}
|
|
144134
144157
|
};
|
|
144135
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
144158
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5196811d"]]);
|
|
144136
144159
|
const createSuperdocVueApp = () => {
|
|
144137
144160
|
const app = createApp(App);
|
|
144138
144161
|
const pinia = createPinia();
|
|
@@ -144316,7 +144339,7 @@ ${reason}`);
|
|
|
144316
144339
|
this.config.colors = shuffleArray(this.config.colors);
|
|
144317
144340
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
144318
144341
|
this.colorIndex = 0;
|
|
144319
|
-
this.version = "1.3.0-next.
|
|
144342
|
+
this.version = "1.3.0-next.13";
|
|
144320
144343
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
144321
144344
|
this.superdocId = config2.superdocId || v4();
|
|
144322
144345
|
this.colors = this.config.colors;
|