superdoc 1.3.0-next.13 → 1.3.0-next.14
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-DebfKi_n.es.js → PdfViewer-CMc0iPaz.es.js} +2 -2
- package/dist/chunks/{PdfViewer-z2obaZHa.cjs → PdfViewer-DLGmNBgc.cjs} +2 -2
- package/dist/chunks/{SuperConverter-Dh27SFeK.es.js → SuperConverter-CD9khdbr.es.js} +1 -1
- package/dist/chunks/{SuperConverter-Dxl1uYvz.cjs → SuperConverter-kUELrLda.cjs} +1 -1
- package/dist/chunks/{index-OlLDoLS-.es.js → index-B1GscRFR.es.js} +174 -34
- package/dist/chunks/{index-DNdp0AxW.cjs → index-CyFX6QZq.cjs} +174 -34
- package/dist/chunks/{index-DOsTLvRQ.es.js → index-DVRukmH6.es.js} +4 -4
- package/dist/chunks/{index-C7p34V06.cjs → index-DgWw6KLR.cjs} +4 -4
- package/dist/style.css +12 -6
- 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 +175 -35
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-C8_CqJxM.cjs");
|
|
3
3
|
const helpers$1 = require("./helpers-nOdwpmwb.cjs");
|
|
4
|
-
const superEditor_converter = require("./SuperConverter-
|
|
4
|
+
const superEditor_converter = require("./SuperConverter-kUELrLda.cjs");
|
|
5
5
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
6
6
|
require("./jszip.min-BPh2MMAa.cjs");
|
|
7
7
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
@@ -15451,7 +15451,7 @@ const canUseDOM = () => {
|
|
|
15451
15451
|
return false;
|
|
15452
15452
|
}
|
|
15453
15453
|
};
|
|
15454
|
-
const summaryVersion = "1.3.0-next.
|
|
15454
|
+
const summaryVersion = "1.3.0-next.14";
|
|
15455
15455
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15456
15456
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15457
15457
|
function mapAttributes(attrs) {
|
|
@@ -18083,7 +18083,7 @@ class Editor extends EventEmitter {
|
|
|
18083
18083
|
* Process collaboration migrations
|
|
18084
18084
|
*/
|
|
18085
18085
|
processCollaborationMigrations() {
|
|
18086
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.
|
|
18086
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.14");
|
|
18087
18087
|
if (!this.options.ydoc) return;
|
|
18088
18088
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18089
18089
|
let docVersion = metaMap.get("version");
|
|
@@ -48742,10 +48742,13 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
48742
48742
|
};
|
|
48743
48743
|
}
|
|
48744
48744
|
const originX = currentLine.width;
|
|
48745
|
-
const
|
|
48745
|
+
const effectiveIndent = lines.length === 0 ? indentLeft + rawFirstLineOffset : indentLeft;
|
|
48746
|
+
const absCurrentX = currentLine.width + effectiveIndent;
|
|
48747
|
+
const { target, nextIndex, stop } = getNextTabStopPx(absCurrentX, tabStops, tabStopCursor);
|
|
48746
48748
|
tabStopCursor = nextIndex;
|
|
48747
|
-
const
|
|
48748
|
-
const
|
|
48749
|
+
const maxAbsWidth = currentLine.maxWidth + effectiveIndent;
|
|
48750
|
+
const clampedTarget = Math.min(target, maxAbsWidth);
|
|
48751
|
+
const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
|
|
48749
48752
|
currentLine.width = roundValue(currentLine.width + tabAdvance);
|
|
48750
48753
|
run.width = tabAdvance;
|
|
48751
48754
|
currentLine.maxFontSize = Math.max(currentLine.maxFontSize, 12);
|
|
@@ -48753,8 +48756,9 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
48753
48756
|
currentLine.toChar = 1;
|
|
48754
48757
|
if (stop && stop.leader && stop.leader !== "none") {
|
|
48755
48758
|
const leaderStyle = stop.leader;
|
|
48756
|
-
const
|
|
48757
|
-
const
|
|
48759
|
+
const relativeTarget = clampedTarget - effectiveIndent;
|
|
48760
|
+
const from3 = Math.min(originX, relativeTarget);
|
|
48761
|
+
const to = Math.max(originX, relativeTarget);
|
|
48758
48762
|
if (!currentLine.leaders) currentLine.leaders = [];
|
|
48759
48763
|
currentLine.leaders.push({ from: from3, to, style: leaderStyle });
|
|
48760
48764
|
}
|
|
@@ -48763,27 +48767,28 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
48763
48767
|
if (stop.val === "end" || stop.val === "center" || stop.val === "decimal") {
|
|
48764
48768
|
const groupMeasure = measureTabAlignmentGroup(runIndex + 1, runsToProcess, ctx2, decimalSeparator);
|
|
48765
48769
|
if (groupMeasure.totalWidth > 0) {
|
|
48770
|
+
const relativeTarget = clampedTarget - effectiveIndent;
|
|
48766
48771
|
let groupStartX;
|
|
48767
48772
|
if (stop.val === "end") {
|
|
48768
|
-
groupStartX = Math.max(0,
|
|
48773
|
+
groupStartX = Math.max(0, relativeTarget - groupMeasure.totalWidth);
|
|
48769
48774
|
} else if (stop.val === "center") {
|
|
48770
|
-
groupStartX = Math.max(0,
|
|
48775
|
+
groupStartX = Math.max(0, relativeTarget - groupMeasure.totalWidth / 2);
|
|
48771
48776
|
} else {
|
|
48772
48777
|
const beforeDecimal = groupMeasure.beforeDecimalWidth ?? groupMeasure.totalWidth;
|
|
48773
|
-
groupStartX = Math.max(0,
|
|
48778
|
+
groupStartX = Math.max(0, relativeTarget - beforeDecimal);
|
|
48774
48779
|
}
|
|
48775
48780
|
activeTabGroup = {
|
|
48776
48781
|
measure: groupMeasure,
|
|
48777
48782
|
startX: groupStartX,
|
|
48778
48783
|
currentX: groupStartX,
|
|
48779
|
-
target:
|
|
48784
|
+
target: relativeTarget,
|
|
48780
48785
|
val: stop.val
|
|
48781
48786
|
};
|
|
48782
48787
|
currentLine.width = roundValue(groupStartX);
|
|
48783
48788
|
}
|
|
48784
48789
|
pendingTabAlignment = null;
|
|
48785
48790
|
} else {
|
|
48786
|
-
pendingTabAlignment = { target: clampedTarget, val: stop.val };
|
|
48791
|
+
pendingTabAlignment = { target: clampedTarget - effectiveIndent, val: stop.val };
|
|
48787
48792
|
}
|
|
48788
48793
|
} else {
|
|
48789
48794
|
pendingTabAlignment = null;
|
|
@@ -49424,10 +49429,13 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
49424
49429
|
};
|
|
49425
49430
|
}
|
|
49426
49431
|
const originX = currentLine.width;
|
|
49427
|
-
const
|
|
49432
|
+
const effectiveIndent = lines.length === 0 ? indentLeft + rawFirstLineOffset : indentLeft;
|
|
49433
|
+
const absCurrentX = currentLine.width + effectiveIndent;
|
|
49434
|
+
const { target, nextIndex, stop } = getNextTabStopPx(absCurrentX, tabStops, tabStopCursor);
|
|
49428
49435
|
tabStopCursor = nextIndex;
|
|
49429
|
-
const
|
|
49430
|
-
const
|
|
49436
|
+
const maxAbsWidth = currentLine.maxWidth + effectiveIndent;
|
|
49437
|
+
const clampedTarget = Math.min(target, maxAbsWidth);
|
|
49438
|
+
const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
|
|
49431
49439
|
currentLine.width = roundValue(currentLine.width + tabAdvance);
|
|
49432
49440
|
currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run);
|
|
49433
49441
|
currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
|
|
@@ -49436,14 +49444,15 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
49436
49444
|
charPosInRun += 1;
|
|
49437
49445
|
if (stop) {
|
|
49438
49446
|
validateTabStopVal(stop);
|
|
49439
|
-
pendingTabAlignment = { target: clampedTarget, val: stop.val };
|
|
49447
|
+
pendingTabAlignment = { target: clampedTarget - effectiveIndent, val: stop.val };
|
|
49440
49448
|
} else {
|
|
49441
49449
|
pendingTabAlignment = null;
|
|
49442
49450
|
}
|
|
49443
49451
|
if (stop && stop.leader && stop.leader !== "none" && stop.leader !== "middleDot") {
|
|
49444
49452
|
const leaderStyle = stop.leader;
|
|
49445
|
-
const
|
|
49446
|
-
const
|
|
49453
|
+
const relativeTarget = clampedTarget - effectiveIndent;
|
|
49454
|
+
const from3 = Math.min(originX, relativeTarget);
|
|
49455
|
+
const to = Math.max(originX, relativeTarget);
|
|
49447
49456
|
if (!currentLine.leaders) currentLine.leaders = [];
|
|
49448
49457
|
currentLine.leaders.push({ from: from3, to, style: leaderStyle });
|
|
49449
49458
|
}
|
|
@@ -58613,12 +58622,18 @@ function findParagraphContext($pos, cache2, helpers2) {
|
|
|
58613
58622
|
return null;
|
|
58614
58623
|
}
|
|
58615
58624
|
function extractParagraphContext(node, startPos, helpers2, depth = 0) {
|
|
58616
|
-
const paragraphProperties = superEditor_converter.getResolvedParagraphProperties(node) ?? {};
|
|
58625
|
+
const paragraphProperties = superEditor_converter.getResolvedParagraphProperties(node) ?? node.attrs?.paragraphProperties ?? {};
|
|
58617
58626
|
const alignmentAliases = { left: "start", right: "end" };
|
|
58618
58627
|
let tabStops = [];
|
|
58619
58628
|
if (Array.isArray(paragraphProperties.tabStops)) {
|
|
58620
58629
|
tabStops = paragraphProperties.tabStops.map((stop) => {
|
|
58621
58630
|
const ref = stop?.tab;
|
|
58631
|
+
if (!ref && stop?.pos != null) {
|
|
58632
|
+
return {
|
|
58633
|
+
...stop,
|
|
58634
|
+
pos: twipsToPixels(Number(stop.pos) || 0)
|
|
58635
|
+
};
|
|
58636
|
+
}
|
|
58622
58637
|
if (!ref) return stop || null;
|
|
58623
58638
|
const rawType = ref.tabType || "start";
|
|
58624
58639
|
const mappedVal = alignmentAliases[rawType] || rawType;
|
|
@@ -59884,6 +59899,13 @@ function createLayoutRequest(doc2, paragraphPos, view, helpers2, revision, parag
|
|
|
59884
59899
|
pos: entry.pos,
|
|
59885
59900
|
nodeSize: node.nodeSize
|
|
59886
59901
|
});
|
|
59902
|
+
} else if (node.type.name === "lineBreak" || node.type.name === "hardBreak") {
|
|
59903
|
+
spans.push({
|
|
59904
|
+
type: node.type.name,
|
|
59905
|
+
spanId,
|
|
59906
|
+
pos: entry.pos,
|
|
59907
|
+
nodeSize: node.nodeSize
|
|
59908
|
+
});
|
|
59887
59909
|
} else if (node.type.name === "text") {
|
|
59888
59910
|
spans.push({
|
|
59889
59911
|
type: "text",
|
|
@@ -59933,6 +59955,7 @@ function calculateTabLayout(request, measurement, view) {
|
|
|
59933
59955
|
paragraphNode
|
|
59934
59956
|
} = request;
|
|
59935
59957
|
const tabs = {};
|
|
59958
|
+
const leftIndentPx = request.indents?.left ?? 0;
|
|
59936
59959
|
let currentX = indentWidth;
|
|
59937
59960
|
const measureText2 = (span) => {
|
|
59938
59961
|
if (view && typeof span.from === "number" && typeof span.to === "number") {
|
|
@@ -59945,6 +59968,8 @@ function calculateTabLayout(request, measurement, view) {
|
|
|
59945
59968
|
const span = spans[i];
|
|
59946
59969
|
if (span.type === "text") {
|
|
59947
59970
|
currentX += measureText2(span);
|
|
59971
|
+
} else if (span.type === "lineBreak" || span.type === "hardBreak") {
|
|
59972
|
+
currentX = leftIndentPx;
|
|
59948
59973
|
} else if (span.type === "tab") {
|
|
59949
59974
|
const followingText = collectFollowingText(spans, i + 1);
|
|
59950
59975
|
let measureTextCallback;
|
|
@@ -60040,7 +60065,7 @@ function collectFollowingText(spans, startIndex) {
|
|
|
60040
60065
|
let text = "";
|
|
60041
60066
|
for (let i = startIndex; i < spans.length; i++) {
|
|
60042
60067
|
const span = spans[i];
|
|
60043
|
-
if (span.type === "tab") break;
|
|
60068
|
+
if (span.type === "tab" || span.type === "lineBreak" || span.type === "hardBreak") break;
|
|
60044
60069
|
if (span.type === "text") text += span.text || "";
|
|
60045
60070
|
}
|
|
60046
60071
|
return text;
|
|
@@ -60050,7 +60075,7 @@ function getFollowingTextRange(spans, startIndex) {
|
|
|
60050
60075
|
let to = null;
|
|
60051
60076
|
for (let i = startIndex; i < spans.length; i++) {
|
|
60052
60077
|
const span = spans[i];
|
|
60053
|
-
if (span.type === "tab") break;
|
|
60078
|
+
if (span.type === "tab" || span.type === "lineBreak" || span.type === "hardBreak") break;
|
|
60054
60079
|
if (span.type === "text" && typeof span.from === "number" && typeof span.to === "number") {
|
|
60055
60080
|
if (from3 === null) from3 = span.from;
|
|
60056
60081
|
to = span.to;
|
|
@@ -79004,7 +79029,7 @@ var ResizeObserverController = (function() {
|
|
|
79004
79029
|
};
|
|
79005
79030
|
return ResizeObserverController2;
|
|
79006
79031
|
})();
|
|
79007
|
-
var ResizeObserver = (function() {
|
|
79032
|
+
var ResizeObserver$1 = (function() {
|
|
79008
79033
|
function ResizeObserver2(callback) {
|
|
79009
79034
|
if (arguments.length === 0) {
|
|
79010
79035
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
@@ -79043,7 +79068,7 @@ var ResizeObserver = (function() {
|
|
|
79043
79068
|
class ResizeObserverDelegate {
|
|
79044
79069
|
constructor() {
|
|
79045
79070
|
this.handleResize = this.handleResize.bind(this);
|
|
79046
|
-
this.observer = new (typeof window !== "undefined" && window.ResizeObserver || ResizeObserver)(this.handleResize);
|
|
79071
|
+
this.observer = new (typeof window !== "undefined" && window.ResizeObserver || ResizeObserver$1)(this.handleResize);
|
|
79047
79072
|
this.elHandlersMap = /* @__PURE__ */ new Map();
|
|
79048
79073
|
}
|
|
79049
79074
|
handleResize(entries) {
|
|
@@ -89912,6 +89937,31 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
89912
89937
|
},
|
|
89913
89938
|
{ immediate: true, deep: true }
|
|
89914
89939
|
);
|
|
89940
|
+
vue.watch(
|
|
89941
|
+
() => props.options?.rulerContainer,
|
|
89942
|
+
() => {
|
|
89943
|
+
vue.nextTick(() => {
|
|
89944
|
+
syncRulerOffset();
|
|
89945
|
+
setupRulerObservers();
|
|
89946
|
+
});
|
|
89947
|
+
},
|
|
89948
|
+
{ immediate: true }
|
|
89949
|
+
);
|
|
89950
|
+
vue.watch(
|
|
89951
|
+
rulersVisible,
|
|
89952
|
+
(visible) => {
|
|
89953
|
+
vue.nextTick(() => {
|
|
89954
|
+
if (visible) {
|
|
89955
|
+
syncRulerOffset();
|
|
89956
|
+
setupRulerObservers();
|
|
89957
|
+
} else {
|
|
89958
|
+
rulerHostStyle.value = {};
|
|
89959
|
+
cleanupRulerObservers();
|
|
89960
|
+
}
|
|
89961
|
+
});
|
|
89962
|
+
},
|
|
89963
|
+
{ immediate: true }
|
|
89964
|
+
);
|
|
89915
89965
|
const containerStyle = vue.computed(() => {
|
|
89916
89966
|
let maxWidth = 8.5 * 96;
|
|
89917
89967
|
const ed = editor.value;
|
|
@@ -89936,6 +89986,71 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
89936
89986
|
minWidth: `${scaledWidth}px`
|
|
89937
89987
|
};
|
|
89938
89988
|
});
|
|
89989
|
+
const rulerHostStyle = vue.ref({});
|
|
89990
|
+
const rulerContainerEl = vue.ref(null);
|
|
89991
|
+
let editorResizeObserver = null;
|
|
89992
|
+
let rulerContainerResizeObserver = null;
|
|
89993
|
+
let layoutUpdatedHandler = null;
|
|
89994
|
+
const resolveRulerContainer = () => {
|
|
89995
|
+
const container = props.options?.rulerContainer;
|
|
89996
|
+
if (!container) return null;
|
|
89997
|
+
if (typeof container === "string") {
|
|
89998
|
+
const doc2 = editorWrapper.value?.ownerDocument ?? document;
|
|
89999
|
+
return doc2.querySelector(container);
|
|
90000
|
+
}
|
|
90001
|
+
return container instanceof HTMLElement ? container : null;
|
|
90002
|
+
};
|
|
90003
|
+
const getViewportRect2 = () => {
|
|
90004
|
+
const host = editorWrapper.value;
|
|
90005
|
+
if (!host) return null;
|
|
90006
|
+
const viewport2 = host.querySelector(".presentation-editor__viewport");
|
|
90007
|
+
const target = viewport2 ?? host;
|
|
90008
|
+
return target.getBoundingClientRect();
|
|
90009
|
+
};
|
|
90010
|
+
const syncRulerOffset = () => {
|
|
90011
|
+
if (!rulersVisible.value) {
|
|
90012
|
+
rulerHostStyle.value = {};
|
|
90013
|
+
return;
|
|
90014
|
+
}
|
|
90015
|
+
rulerContainerEl.value = resolveRulerContainer();
|
|
90016
|
+
if (!rulerContainerEl.value) {
|
|
90017
|
+
rulerHostStyle.value = {};
|
|
90018
|
+
return;
|
|
90019
|
+
}
|
|
90020
|
+
const viewportRect = getViewportRect2();
|
|
90021
|
+
if (!viewportRect) return;
|
|
90022
|
+
const hostRect = rulerContainerEl.value.getBoundingClientRect();
|
|
90023
|
+
const paddingLeft = Math.max(0, viewportRect.left - hostRect.left);
|
|
90024
|
+
const paddingRight = Math.max(0, hostRect.right - viewportRect.right);
|
|
90025
|
+
rulerHostStyle.value = {
|
|
90026
|
+
paddingLeft: `${paddingLeft}px`,
|
|
90027
|
+
paddingRight: `${paddingRight}px`
|
|
90028
|
+
};
|
|
90029
|
+
};
|
|
90030
|
+
const cleanupRulerObservers = () => {
|
|
90031
|
+
if (editorResizeObserver) {
|
|
90032
|
+
editorResizeObserver.disconnect();
|
|
90033
|
+
editorResizeObserver = null;
|
|
90034
|
+
}
|
|
90035
|
+
if (rulerContainerResizeObserver) {
|
|
90036
|
+
rulerContainerResizeObserver.disconnect();
|
|
90037
|
+
rulerContainerResizeObserver = null;
|
|
90038
|
+
}
|
|
90039
|
+
};
|
|
90040
|
+
const setupRulerObservers = () => {
|
|
90041
|
+
cleanupRulerObservers();
|
|
90042
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
90043
|
+
const viewportHost = editorWrapper.value;
|
|
90044
|
+
const rulerHost = resolveRulerContainer();
|
|
90045
|
+
if (viewportHost) {
|
|
90046
|
+
editorResizeObserver = new ResizeObserver(() => syncRulerOffset());
|
|
90047
|
+
editorResizeObserver.observe(viewportHost);
|
|
90048
|
+
}
|
|
90049
|
+
if (rulerHost) {
|
|
90050
|
+
rulerContainerResizeObserver = new ResizeObserver(() => syncRulerOffset());
|
|
90051
|
+
rulerContainerResizeObserver.observe(rulerHost);
|
|
90052
|
+
}
|
|
90053
|
+
};
|
|
89939
90054
|
const message = useMessage();
|
|
89940
90055
|
const editorWrapper = vue.ref(null);
|
|
89941
90056
|
const editorElem = vue.ref(null);
|
|
@@ -90247,7 +90362,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90247
90362
|
presentationEditor.on("imageDeselected", () => {
|
|
90248
90363
|
clearSelectedImage();
|
|
90249
90364
|
});
|
|
90250
|
-
|
|
90365
|
+
layoutUpdatedHandler = () => {
|
|
90251
90366
|
if (imageResizeState.visible && imageResizeState.blockId) {
|
|
90252
90367
|
const escapedBlockId = CSS.escape(imageResizeState.blockId);
|
|
90253
90368
|
const newElement = editorElem.value?.querySelector(
|
|
@@ -90280,13 +90395,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90280
90395
|
clearSelectedImage();
|
|
90281
90396
|
}
|
|
90282
90397
|
}
|
|
90283
|
-
|
|
90398
|
+
vue.nextTick(() => syncRulerOffset());
|
|
90399
|
+
};
|
|
90400
|
+
presentationEditor.on("layoutUpdated", layoutUpdatedHandler);
|
|
90284
90401
|
zoomChangeHandler = ({ zoom }) => {
|
|
90285
90402
|
currentZoom.value = zoom;
|
|
90403
|
+
vue.nextTick(() => syncRulerOffset());
|
|
90286
90404
|
};
|
|
90287
90405
|
presentationEditor.on("zoomChange", zoomChangeHandler);
|
|
90288
90406
|
if (typeof presentationEditor.zoom === "number") {
|
|
90289
90407
|
currentZoom.value = presentationEditor.zoom;
|
|
90408
|
+
vue.nextTick(() => syncRulerOffset());
|
|
90290
90409
|
}
|
|
90291
90410
|
}
|
|
90292
90411
|
editor.value.on("paginationUpdate", () => {
|
|
@@ -90346,6 +90465,11 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90346
90465
|
vue.onMounted(() => {
|
|
90347
90466
|
initializeData();
|
|
90348
90467
|
if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
|
|
90468
|
+
window.addEventListener("resize", syncRulerOffset, { passive: true });
|
|
90469
|
+
vue.nextTick(() => {
|
|
90470
|
+
syncRulerOffset();
|
|
90471
|
+
setupRulerObservers();
|
|
90472
|
+
});
|
|
90349
90473
|
});
|
|
90350
90474
|
const handleMarginClick = (event) => {
|
|
90351
90475
|
if (event.button !== 0) {
|
|
@@ -90376,6 +90500,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90376
90500
|
editor.value.off("zoomChange", zoomChangeHandler);
|
|
90377
90501
|
zoomChangeHandler = null;
|
|
90378
90502
|
}
|
|
90503
|
+
if (editor.value instanceof PresentationEditor && layoutUpdatedHandler) {
|
|
90504
|
+
editor.value.off("layoutUpdated", layoutUpdatedHandler);
|
|
90505
|
+
layoutUpdatedHandler = null;
|
|
90506
|
+
}
|
|
90507
|
+
cleanupRulerObservers();
|
|
90508
|
+
window.removeEventListener("resize", syncRulerOffset);
|
|
90379
90509
|
editor.value?.destroy();
|
|
90380
90510
|
editor.value = null;
|
|
90381
90511
|
});
|
|
@@ -90387,18 +90517,28 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90387
90517
|
__props.options.rulerContainer && rulersVisible.value && !!activeEditor.value ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
90388
90518
|
key: 0,
|
|
90389
90519
|
to: __props.options.rulerContainer
|
|
90520
|
+
}, [
|
|
90521
|
+
vue.createBaseVNode("div", {
|
|
90522
|
+
class: "ruler-host",
|
|
90523
|
+
style: vue.normalizeStyle(rulerHostStyle.value)
|
|
90524
|
+
}, [
|
|
90525
|
+
vue.createVNode(Ruler, {
|
|
90526
|
+
class: "ruler superdoc-ruler",
|
|
90527
|
+
editor: activeEditor.value,
|
|
90528
|
+
onMarginChange: handleMarginChange
|
|
90529
|
+
}, null, 8, ["editor"])
|
|
90530
|
+
], 4)
|
|
90531
|
+
], 8, ["to"])) : rulersVisible.value && !!activeEditor.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
90532
|
+
key: 1,
|
|
90533
|
+
class: "ruler-host",
|
|
90534
|
+
style: vue.normalizeStyle(rulerHostStyle.value)
|
|
90390
90535
|
}, [
|
|
90391
90536
|
vue.createVNode(Ruler, {
|
|
90392
|
-
class: "ruler
|
|
90537
|
+
class: "ruler",
|
|
90393
90538
|
editor: activeEditor.value,
|
|
90394
90539
|
onMarginChange: handleMarginChange
|
|
90395
90540
|
}, null, 8, ["editor"])
|
|
90396
|
-
],
|
|
90397
|
-
key: 1,
|
|
90398
|
-
class: "ruler",
|
|
90399
|
-
editor: activeEditor.value,
|
|
90400
|
-
onMarginChange: handleMarginChange
|
|
90401
|
-
}, null, 8, ["editor"])) : vue.createCommentVNode("", true),
|
|
90541
|
+
], 4)) : vue.createCommentVNode("", true),
|
|
90402
90542
|
vue.createBaseVNode("div", {
|
|
90403
90543
|
class: "super-editor",
|
|
90404
90544
|
ref_key: "editorWrapper",
|
|
@@ -90503,7 +90643,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
90503
90643
|
};
|
|
90504
90644
|
}
|
|
90505
90645
|
});
|
|
90506
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
90646
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f5c4f915"]]);
|
|
90507
90647
|
const _hoisted_1 = ["innerHTML"];
|
|
90508
90648
|
const _sfc_main = {
|
|
90509
90649
|
__name: "SuperInput",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-
|
|
2
|
-
import "./SuperConverter-
|
|
1
|
+
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-B1GscRFR.es.js";
|
|
2
|
+
import "./SuperConverter-CD9khdbr.es.js";
|
|
3
3
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
|
|
5
5
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -7448,7 +7448,7 @@ const _sfc_main = {
|
|
|
7448
7448
|
__name: "SuperDoc",
|
|
7449
7449
|
emits: ["selection-update"],
|
|
7450
7450
|
setup(__props, { emit: __emit }) {
|
|
7451
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
7451
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CMc0iPaz.es.js"));
|
|
7452
7452
|
const superdocStore = useSuperdocStore();
|
|
7453
7453
|
const commentsStore = useCommentsStore();
|
|
7454
7454
|
const {
|
|
@@ -8377,7 +8377,7 @@ class SuperDoc extends EventEmitter {
|
|
|
8377
8377
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8378
8378
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8379
8379
|
this.colorIndex = 0;
|
|
8380
|
-
this.version = "1.3.0-next.
|
|
8380
|
+
this.version = "1.3.0-next.14";
|
|
8381
8381
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8382
8382
|
this.superdocId = config.superdocId || v4();
|
|
8383
8383
|
this.colors = this.config.colors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-CyFX6QZq.cjs");
|
|
3
|
+
require("./SuperConverter-kUELrLda.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-DLGmNBgc.cjs")));
|
|
7469
7469
|
const superdocStore = useSuperdocStore();
|
|
7470
7470
|
const commentsStore = useCommentsStore();
|
|
7471
7471
|
const {
|
|
@@ -8394,7 +8394,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
8394
8394
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8395
8395
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8396
8396
|
this.colorIndex = 0;
|
|
8397
|
-
this.version = "1.3.0-next.
|
|
8397
|
+
this.version = "1.3.0-next.14";
|
|
8398
8398
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8399
8399
|
this.superdocId = config.superdocId || uuid.v4();
|
|
8400
8400
|
this.colors = this.config.colors;
|
package/dist/style.css
CHANGED
|
@@ -1978,10 +1978,10 @@ to {
|
|
|
1978
1978
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
1979
1979
|
}
|
|
1980
1980
|
|
|
1981
|
-
.editor-element[data-v-
|
|
1981
|
+
.editor-element[data-v-f5c4f915] {
|
|
1982
1982
|
position: relative;
|
|
1983
1983
|
}
|
|
1984
|
-
.super-editor-container[data-v-
|
|
1984
|
+
.super-editor-container[data-v-f5c4f915] {
|
|
1985
1985
|
width: auto;
|
|
1986
1986
|
height: auto;
|
|
1987
1987
|
/* min-width is controlled via inline style (containerStyle) to scale with zoom */
|
|
@@ -1990,14 +1990,20 @@ to {
|
|
|
1990
1990
|
display: flex;
|
|
1991
1991
|
flex-direction: column;
|
|
1992
1992
|
}
|
|
1993
|
-
.ruler[data-v-
|
|
1993
|
+
.ruler-host[data-v-f5c4f915] {
|
|
1994
|
+
display: flex;
|
|
1995
|
+
justify-content: center;
|
|
1996
|
+
width: 100%;
|
|
1997
|
+
box-sizing: border-box;
|
|
1998
|
+
}
|
|
1999
|
+
.ruler[data-v-f5c4f915] {
|
|
1994
2000
|
margin-bottom: 2px;
|
|
1995
2001
|
}
|
|
1996
|
-
.super-editor[data-v-
|
|
2002
|
+
.super-editor[data-v-f5c4f915] {
|
|
1997
2003
|
color: initial;
|
|
1998
2004
|
overflow: hidden;
|
|
1999
2005
|
}
|
|
2000
|
-
.placeholder-editor[data-v-
|
|
2006
|
+
.placeholder-editor[data-v-f5c4f915] {
|
|
2001
2007
|
position: absolute;
|
|
2002
2008
|
top: 0;
|
|
2003
2009
|
left: 0;
|
|
@@ -2009,7 +2015,7 @@ to {
|
|
|
2009
2015
|
background-color: white;
|
|
2010
2016
|
box-sizing: border-box;
|
|
2011
2017
|
}
|
|
2012
|
-
.placeholder-title[data-v-
|
|
2018
|
+
.placeholder-title[data-v-f5c4f915] {
|
|
2013
2019
|
display: flex;
|
|
2014
2020
|
justify-content: center;
|
|
2015
2021
|
margin-bottom: 40px;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../chunks/jszip-C8_CqJxM.cjs");
|
|
4
4
|
require("../chunks/helpers-nOdwpmwb.cjs");
|
|
5
|
-
const superEditor_converter = require("../chunks/SuperConverter-
|
|
5
|
+
const superEditor_converter = require("../chunks/SuperConverter-kUELrLda.cjs");
|
|
6
6
|
require("../chunks/uuid-R7L08bOx.cjs");
|
|
7
7
|
exports.SuperConverter = superEditor_converter.SuperConverter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunks/jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import "../chunks/helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { S } from "../chunks/SuperConverter-
|
|
3
|
+
import { S } from "../chunks/SuperConverter-CD9khdbr.es.js";
|
|
4
4
|
import "../chunks/uuid-CjlX8hrF.es.js";
|
|
5
5
|
export {
|
|
6
6
|
S as SuperConverter
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
3
|
+
const index = require("./chunks/index-CyFX6QZq.cjs");
|
|
4
4
|
const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
|
|
5
5
|
const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
|
|
6
6
|
const vue = require("./chunks/vue-De9wkgLl.cjs");
|
|
7
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
7
|
+
const superEditor_converter = require("./chunks/SuperConverter-kUELrLda.cjs");
|
|
8
8
|
function isNodeType(node, name) {
|
|
9
9
|
return node.type.name === name;
|
|
10
10
|
}
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ax as Node, ay as Mark } from "./chunks/index-
|
|
2
|
-
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-
|
|
1
|
+
import { ax as Node, ay as Mark } from "./chunks/index-B1GscRFR.es.js";
|
|
2
|
+
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-B1GscRFR.es.js";
|
|
3
3
|
import { default as default2 } from "./super-editor/docx-zipper.es.js";
|
|
4
4
|
import { createZip } from "./super-editor/file-zipper.es.js";
|
|
5
5
|
import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
|
|
6
|
-
import { S, r } from "./chunks/SuperConverter-
|
|
6
|
+
import { S, r } from "./chunks/SuperConverter-CD9khdbr.es.js";
|
|
7
7
|
function isNodeType(node, name) {
|
|
8
8
|
return node.type.name === name;
|
|
9
9
|
}
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
5
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
3
|
+
const index = require("./chunks/index-CyFX6QZq.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DgWw6KLR.cjs");
|
|
5
|
+
const superEditor_converter = require("./chunks/SuperConverter-kUELrLda.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
require("./chunks/jszip-C8_CqJxM.cjs");
|
|
8
8
|
require("./chunks/helpers-nOdwpmwb.cjs");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-
|
|
2
|
-
import { D, H, P, S, c } from "./chunks/index-
|
|
3
|
-
import { S as S2, r } from "./chunks/SuperConverter-
|
|
1
|
+
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-B1GscRFR.es.js";
|
|
2
|
+
import { D, H, P, S, c } from "./chunks/index-DVRukmH6.es.js";
|
|
3
|
+
import { S as S2, r } from "./chunks/SuperConverter-CD9khdbr.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
import "./chunks/jszip-B1fkPkPJ.es.js";
|
|
6
6
|
import "./chunks/helpers-C8e9wR5l.es.js";
|