@harbour-enterprises/superdoc 2.0.0-next.3 → 2.0.0-next.5
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-C6tuSJXA.cjs → PdfViewer-C4wZizyW.cjs} +1 -1
- package/dist/chunks/{PdfViewer-4xn9rggA.es.js → PdfViewer-CO_oGFDw.es.js} +1 -1
- package/dist/chunks/{index-k0xTe_8v.cjs → index-B4QOihiF.cjs} +3 -3
- package/dist/chunks/{index-lLnrqNSJ-DoACeFqL.es.js → index-CBSyVaOM-B5I90g0S.es.js} +1 -1
- package/dist/chunks/{index-lLnrqNSJ-CMJxa5vJ.cjs → index-CBSyVaOM-BMpzJRoR.cjs} +1 -1
- package/dist/chunks/{index-CSZ7bAL7.es.js → index-XOJnODHJ.es.js} +3 -3
- package/dist/chunks/{super-editor.es-BY4paJvP.cjs → super-editor.es-DzolekK0.cjs} +141 -26
- package/dist/chunks/{super-editor.es-B1DZfUz0.es.js → super-editor.es-qnE7-VRy.es.js} +141 -26
- 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-Bd6dIe0l.js → converter-CH2eG52x.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-Dzdi5pfi.js → docx-zipper-JJRnWzI6.js} +1 -1
- package/dist/super-editor/chunks/{editor-C3sjGwAb.js → editor-Du7p05wU.js} +129 -24
- package/dist/super-editor/chunks/{index-lLnrqNSJ.js → index-CBSyVaOM.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-Bn20lflQ.js → toolbar-unNlfpEL.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 +19 -9
- 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 +143 -28
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -42428,7 +42428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42428
42428
|
static getStoredSuperdocVersion(docx) {
|
|
42429
42429
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42430
42430
|
}
|
|
42431
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.
|
|
42431
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.5") {
|
|
42432
42432
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42433
42433
|
}
|
|
42434
42434
|
/**
|
|
@@ -68384,7 +68384,7 @@ ${err.toString()}`);
|
|
|
68384
68384
|
const shouldSkipNodeView = (editor) => {
|
|
68385
68385
|
return isHeadless(editor);
|
|
68386
68386
|
};
|
|
68387
|
-
const summaryVersion = "2.0.0-next.
|
|
68387
|
+
const summaryVersion = "2.0.0-next.5";
|
|
68388
68388
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
68389
68389
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
68390
68390
|
function mapAttributes(attrs) {
|
|
@@ -69173,7 +69173,7 @@ ${err.toString()}`);
|
|
|
69173
69173
|
{ default: remarkStringify2 },
|
|
69174
69174
|
{ default: remarkGfm2 }
|
|
69175
69175
|
] = await Promise.all([
|
|
69176
|
-
Promise.resolve().then(() =>
|
|
69176
|
+
Promise.resolve().then(() => indexCBSyVaOM),
|
|
69177
69177
|
Promise.resolve().then(() => indexDRCvimau),
|
|
69178
69178
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
69179
69179
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -69378,7 +69378,7 @@ ${err.toString()}`);
|
|
|
69378
69378
|
* Process collaboration migrations
|
|
69379
69379
|
*/
|
|
69380
69380
|
processCollaborationMigrations() {
|
|
69381
|
-
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.
|
|
69381
|
+
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.5");
|
|
69382
69382
|
if (!this.options.ydoc) return;
|
|
69383
69383
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
69384
69384
|
let docVersion = metaMap.get("version");
|
|
@@ -81744,7 +81744,8 @@ ${l}
|
|
|
81744
81744
|
}
|
|
81745
81745
|
const text2 = "src" in run2 || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" ? "" : run2.text ?? "";
|
|
81746
81746
|
const runLength = text2.length;
|
|
81747
|
-
const
|
|
81747
|
+
const transform = isTabRun$1(run2) || "src" in run2 || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" ? void 0 : run2.textTransform;
|
|
81748
|
+
const displayText = applyTextTransform$2(text2, transform);
|
|
81748
81749
|
if (currentCharOffset + runLength >= charOffset) {
|
|
81749
81750
|
const offsetInRun = charOffset - currentCharOffset;
|
|
81750
81751
|
ctx2.font = getRunFontString(run2);
|
|
@@ -81794,7 +81795,8 @@ ${l}
|
|
|
81794
81795
|
return segmentBaseX + (offsetInSegment >= segmentChars ? segment.width ?? 0 : 0);
|
|
81795
81796
|
}
|
|
81796
81797
|
const text2 = run2.text ?? "";
|
|
81797
|
-
const
|
|
81798
|
+
const transform = "textTransform" in run2 ? run2.textTransform : void 0;
|
|
81799
|
+
const displayText = applyTextTransform$2(text2, transform);
|
|
81798
81800
|
const displaySegmentText = displayText.slice(segment.fromChar, segment.toChar);
|
|
81799
81801
|
const textUpToTarget = displaySegmentText.slice(0, offsetInSegment);
|
|
81800
81802
|
ctx2.font = getRunFontString(run2);
|
|
@@ -81892,7 +81894,8 @@ ${l}
|
|
|
81892
81894
|
}
|
|
81893
81895
|
const text2 = "src" in run2 || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" ? "" : run2.text ?? "";
|
|
81894
81896
|
const runLength = text2.length;
|
|
81895
|
-
const
|
|
81897
|
+
const transform = isTabRun$1(run2) || "src" in run2 || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" ? void 0 : run2.textTransform;
|
|
81898
|
+
const displayText = applyTextTransform$2(text2, transform);
|
|
81896
81899
|
if (runLength === 0) continue;
|
|
81897
81900
|
ctx2.font = getRunFontString(run2);
|
|
81898
81901
|
for (let i2 = 0; i2 <= runLength; i2++) {
|
|
@@ -82370,12 +82373,12 @@ ${l}
|
|
|
82370
82373
|
if (markerTextWidth == null && marker.markerText) {
|
|
82371
82374
|
markerTextWidth = measureMarkerText(marker.markerText, marker);
|
|
82372
82375
|
}
|
|
82373
|
-
if (!Number.isFinite(markerTextWidth) || markerTextWidth < 0) {
|
|
82376
|
+
if (!Number.isFinite(markerTextWidth) || markerTextWidth !== void 0 && markerTextWidth < 0) {
|
|
82374
82377
|
markerTextWidth = markerBoxWidth;
|
|
82375
82378
|
}
|
|
82376
|
-
|
|
82379
|
+
const finalMarkerTextWidth = Math.max(0, markerTextWidth ?? 0);
|
|
82377
82380
|
let markerStartPos;
|
|
82378
|
-
if (wordLayout?.firstLineIndentMode === true && Number.isFinite(marker.markerX)) {
|
|
82381
|
+
if (wordLayout?.firstLineIndentMode === true && typeof marker.markerX === "number" && Number.isFinite(marker.markerX)) {
|
|
82379
82382
|
markerStartPos = marker.markerX;
|
|
82380
82383
|
} else {
|
|
82381
82384
|
markerStartPos = indentLeft - hanging + firstLine;
|
|
@@ -82383,18 +82386,18 @@ ${l}
|
|
|
82383
82386
|
if (!Number.isFinite(markerStartPos)) {
|
|
82384
82387
|
markerStartPos = 0;
|
|
82385
82388
|
}
|
|
82386
|
-
const currentPos = markerStartPos +
|
|
82389
|
+
const currentPos = markerStartPos + finalMarkerTextWidth;
|
|
82387
82390
|
const suffix2 = marker.suffix ?? "tab";
|
|
82388
82391
|
if (suffix2 === "space") {
|
|
82389
|
-
return markerStartPos +
|
|
82392
|
+
return markerStartPos + finalMarkerTextWidth + SPACE_SUFFIX_GAP_PX;
|
|
82390
82393
|
}
|
|
82391
82394
|
if (suffix2 === "nothing") {
|
|
82392
|
-
return markerStartPos +
|
|
82395
|
+
return markerStartPos + finalMarkerTextWidth;
|
|
82393
82396
|
}
|
|
82394
82397
|
const markerJustification = marker.justification ?? "left";
|
|
82395
82398
|
if (markerJustification !== "left") {
|
|
82396
82399
|
const gutterWidth = typeof marker.gutterWidthPx === "number" && Number.isFinite(marker.gutterWidthPx) && marker.gutterWidthPx > 0 ? marker.gutterWidthPx : LIST_MARKER_GAP$1;
|
|
82397
|
-
return markerStartPos +
|
|
82400
|
+
return markerStartPos + finalMarkerTextWidth + Math.max(gutterWidth, LIST_MARKER_GAP$1);
|
|
82398
82401
|
}
|
|
82399
82402
|
if (wordLayout?.firstLineIndentMode === true) {
|
|
82400
82403
|
let targetTabStop;
|
|
@@ -82418,7 +82421,7 @@ ${l}
|
|
|
82418
82421
|
if (tabWidth2 < LIST_MARKER_GAP$1) {
|
|
82419
82422
|
tabWidth2 = LIST_MARKER_GAP$1;
|
|
82420
82423
|
}
|
|
82421
|
-
return markerStartPos +
|
|
82424
|
+
return markerStartPos + finalMarkerTextWidth + tabWidth2;
|
|
82422
82425
|
}
|
|
82423
82426
|
const textStart = indentLeft + firstLine;
|
|
82424
82427
|
let tabWidth = textStart - currentPos;
|
|
@@ -82427,7 +82430,7 @@ ${l}
|
|
|
82427
82430
|
} else if (tabWidth < LIST_MARKER_GAP$1) {
|
|
82428
82431
|
tabWidth = LIST_MARKER_GAP$1;
|
|
82429
82432
|
}
|
|
82430
|
-
return markerStartPos +
|
|
82433
|
+
return markerStartPos + finalMarkerTextWidth + tabWidth;
|
|
82431
82434
|
}
|
|
82432
82435
|
function getWordLayoutConfig(block) {
|
|
82433
82436
|
if (!block || block.kind !== "paragraph") {
|
|
@@ -83747,6 +83750,94 @@ ${l}
|
|
|
83747
83750
|
function getCellTotalLines(cell2) {
|
|
83748
83751
|
return getCellLines(cell2).length;
|
|
83749
83752
|
}
|
|
83753
|
+
function mergePmRange(target, range2) {
|
|
83754
|
+
if (typeof range2.pmStart === "number") {
|
|
83755
|
+
target.pmStart = target.pmStart == null ? range2.pmStart : Math.min(target.pmStart, range2.pmStart);
|
|
83756
|
+
}
|
|
83757
|
+
if (typeof range2.pmEnd === "number") {
|
|
83758
|
+
target.pmEnd = target.pmEnd == null ? range2.pmEnd : Math.max(target.pmEnd, range2.pmEnd);
|
|
83759
|
+
}
|
|
83760
|
+
}
|
|
83761
|
+
function computeCellPmRange(cell2, cellMeasure, fromLine, toLine) {
|
|
83762
|
+
const range2 = {};
|
|
83763
|
+
if (!cell2 || !cellMeasure) return range2;
|
|
83764
|
+
const cellBlocks = cell2.blocks ?? (cell2.paragraph ? [cell2.paragraph] : []);
|
|
83765
|
+
const blockMeasures = cellMeasure.blocks ?? (cellMeasure.paragraph ? [cellMeasure.paragraph] : []);
|
|
83766
|
+
const maxBlocks = Math.min(cellBlocks.length, blockMeasures.length);
|
|
83767
|
+
let cumulativeLineCount = 0;
|
|
83768
|
+
for (let i2 = 0; i2 < maxBlocks; i2++) {
|
|
83769
|
+
const block = cellBlocks[i2];
|
|
83770
|
+
const blockMeasure = blockMeasures[i2];
|
|
83771
|
+
if (blockMeasure.kind === "paragraph" && block?.kind === "paragraph") {
|
|
83772
|
+
const paraMeasure = blockMeasure;
|
|
83773
|
+
const lines = paraMeasure.lines;
|
|
83774
|
+
const blockLineCount = lines?.length ?? 0;
|
|
83775
|
+
const blockStartGlobal = cumulativeLineCount;
|
|
83776
|
+
const blockEndGlobal = cumulativeLineCount + blockLineCount;
|
|
83777
|
+
const localFrom = Math.max(fromLine, blockStartGlobal) - blockStartGlobal;
|
|
83778
|
+
const localTo = Math.min(toLine, blockEndGlobal) - blockStartGlobal;
|
|
83779
|
+
if (lines && lines.length > 0 && localFrom < localTo) {
|
|
83780
|
+
mergePmRange(range2, computeFragmentPmRange(block, lines, localFrom, localTo));
|
|
83781
|
+
} else {
|
|
83782
|
+
mergePmRange(range2, extractBlockPmRange(block));
|
|
83783
|
+
}
|
|
83784
|
+
cumulativeLineCount += blockLineCount;
|
|
83785
|
+
continue;
|
|
83786
|
+
}
|
|
83787
|
+
mergePmRange(range2, extractBlockPmRange(block));
|
|
83788
|
+
}
|
|
83789
|
+
return range2;
|
|
83790
|
+
}
|
|
83791
|
+
function computeTableFragmentPmRange(block, measure, fromRow, toRow, partialRow) {
|
|
83792
|
+
const range2 = {};
|
|
83793
|
+
for (let rowIndex = fromRow; rowIndex < toRow; rowIndex++) {
|
|
83794
|
+
const row2 = block.rows[rowIndex];
|
|
83795
|
+
const rowMeasure = measure.rows[rowIndex];
|
|
83796
|
+
if (!row2 || !rowMeasure) continue;
|
|
83797
|
+
const isPartial = partialRow?.rowIndex === rowIndex;
|
|
83798
|
+
const cellCount = Math.min(row2.cells.length, rowMeasure.cells.length);
|
|
83799
|
+
for (let cellIndex = 0; cellIndex < cellCount; cellIndex++) {
|
|
83800
|
+
const cell2 = row2.cells[cellIndex];
|
|
83801
|
+
const cellMeasure = rowMeasure.cells[cellIndex];
|
|
83802
|
+
if (!cell2 || !cellMeasure) continue;
|
|
83803
|
+
const totalLines = getCellTotalLines(cellMeasure);
|
|
83804
|
+
let fromLine = 0;
|
|
83805
|
+
let toLine = totalLines;
|
|
83806
|
+
if (isPartial) {
|
|
83807
|
+
const hasValidFromLineByCell = partialRow?.fromLineByCell && cellIndex < partialRow.fromLineByCell.length;
|
|
83808
|
+
const hasValidToLineByCell = partialRow?.toLineByCell && cellIndex < partialRow.toLineByCell.length;
|
|
83809
|
+
if (hasValidFromLineByCell) {
|
|
83810
|
+
const rawFrom = partialRow.fromLineByCell[cellIndex];
|
|
83811
|
+
if (typeof rawFrom === "number" && rawFrom >= 0) {
|
|
83812
|
+
fromLine = rawFrom;
|
|
83813
|
+
}
|
|
83814
|
+
}
|
|
83815
|
+
if (hasValidToLineByCell) {
|
|
83816
|
+
const rawTo = partialRow.toLineByCell[cellIndex];
|
|
83817
|
+
if (typeof rawTo === "number") {
|
|
83818
|
+
toLine = rawTo === -1 ? totalLines : rawTo;
|
|
83819
|
+
}
|
|
83820
|
+
}
|
|
83821
|
+
}
|
|
83822
|
+
fromLine = Math.max(0, Math.min(fromLine, totalLines));
|
|
83823
|
+
toLine = Math.max(0, Math.min(toLine, totalLines));
|
|
83824
|
+
if (toLine < fromLine) {
|
|
83825
|
+
toLine = fromLine;
|
|
83826
|
+
}
|
|
83827
|
+
mergePmRange(range2, computeCellPmRange(cell2, cellMeasure, fromLine, toLine));
|
|
83828
|
+
}
|
|
83829
|
+
}
|
|
83830
|
+
return range2;
|
|
83831
|
+
}
|
|
83832
|
+
function applyTableFragmentPmRange(fragment, block, measure) {
|
|
83833
|
+
const range2 = computeTableFragmentPmRange(block, measure, fragment.fromRow, fragment.toRow, fragment.partialRow);
|
|
83834
|
+
if (range2.pmStart != null) {
|
|
83835
|
+
fragment.pmStart = range2.pmStart;
|
|
83836
|
+
}
|
|
83837
|
+
if (range2.pmEnd != null) {
|
|
83838
|
+
fragment.pmEnd = range2.pmEnd;
|
|
83839
|
+
}
|
|
83840
|
+
}
|
|
83750
83841
|
function computePartialRow(rowIndex, blockRow, measure, availableHeight, fromLineByCell) {
|
|
83751
83842
|
const row2 = measure.rows[rowIndex];
|
|
83752
83843
|
if (!row2) {
|
|
@@ -83891,6 +83982,7 @@ ${l}
|
|
|
83891
83982
|
height,
|
|
83892
83983
|
metadata
|
|
83893
83984
|
};
|
|
83985
|
+
applyTableFragmentPmRange(fragment, context.block, context.measure);
|
|
83894
83986
|
state2.page.fragments.push(fragment);
|
|
83895
83987
|
state2.cursorY += height;
|
|
83896
83988
|
}
|
|
@@ -83969,6 +84061,7 @@ ${l}
|
|
|
83969
84061
|
height,
|
|
83970
84062
|
metadata
|
|
83971
84063
|
};
|
|
84064
|
+
applyTableFragmentPmRange(fragment, block, measure);
|
|
83972
84065
|
state2.page.fragments.push(fragment);
|
|
83973
84066
|
state2.cursorY += height;
|
|
83974
84067
|
return;
|
|
@@ -84032,6 +84125,7 @@ ${l}
|
|
|
84032
84125
|
partialRow: continuationPartialRow,
|
|
84033
84126
|
metadata: generateFragmentMetadata(measure)
|
|
84034
84127
|
};
|
|
84128
|
+
applyTableFragmentPmRange(fragment2, block, measure);
|
|
84035
84129
|
state2.page.fragments.push(fragment2);
|
|
84036
84130
|
state2.cursorY += fragmentHeight2;
|
|
84037
84131
|
}
|
|
@@ -84076,6 +84170,7 @@ ${l}
|
|
|
84076
84170
|
partialRow: forcedPartialRow,
|
|
84077
84171
|
metadata: generateFragmentMetadata(measure)
|
|
84078
84172
|
};
|
|
84173
|
+
applyTableFragmentPmRange(fragment2, block, measure);
|
|
84079
84174
|
state2.page.fragments.push(fragment2);
|
|
84080
84175
|
state2.cursorY += fragmentHeight2;
|
|
84081
84176
|
pendingPartialRow = forcedPartialRow;
|
|
@@ -84111,6 +84206,7 @@ ${l}
|
|
|
84111
84206
|
partialRow: partialRow || void 0,
|
|
84112
84207
|
metadata: generateFragmentMetadata(measure)
|
|
84113
84208
|
};
|
|
84209
|
+
applyTableFragmentPmRange(fragment, block, measure);
|
|
84114
84210
|
state2.page.fragments.push(fragment);
|
|
84115
84211
|
state2.cursorY += fragmentHeight;
|
|
84116
84212
|
if (partialRow && !partialRow.isLastPart) {
|
|
@@ -84128,7 +84224,7 @@ ${l}
|
|
|
84128
84224
|
columnBoundaries: generateColumnBoundaries(measure),
|
|
84129
84225
|
coordinateSystem: "fragment"
|
|
84130
84226
|
};
|
|
84131
|
-
|
|
84227
|
+
const fragment = {
|
|
84132
84228
|
kind: "table",
|
|
84133
84229
|
blockId: block.id,
|
|
84134
84230
|
fromRow: 0,
|
|
@@ -84139,6 +84235,8 @@ ${l}
|
|
|
84139
84235
|
height: measure.totalHeight ?? 0,
|
|
84140
84236
|
metadata
|
|
84141
84237
|
};
|
|
84238
|
+
applyTableFragmentPmRange(fragment, block, measure);
|
|
84239
|
+
return fragment;
|
|
84142
84240
|
}
|
|
84143
84241
|
function isPageRelativeAnchor(block) {
|
|
84144
84242
|
const vRelativeFrom = block.anchor?.vRelativeFrom;
|
|
@@ -86598,7 +86696,8 @@ ${l}
|
|
|
86598
86696
|
function measureRunSliceWidth(run2, fromChar, toChar) {
|
|
86599
86697
|
const context = getCtx();
|
|
86600
86698
|
const fullText = runText(run2);
|
|
86601
|
-
const
|
|
86699
|
+
const transform = isTextRun$2(run2) ? run2.textTransform : void 0;
|
|
86700
|
+
const text2 = applyTextTransform$1(fullText.slice(fromChar, toChar), transform, fullText, fromChar);
|
|
86602
86701
|
if (!context) {
|
|
86603
86702
|
const textRun = isTextRun$2(run2) ? run2 : null;
|
|
86604
86703
|
const size2 = textRun?.fontSize ?? 16;
|
|
@@ -89899,14 +89998,15 @@ ${l}
|
|
|
89899
89998
|
if (!schema) return [];
|
|
89900
89999
|
const types2 = [];
|
|
89901
90000
|
try {
|
|
89902
|
-
schema.nodes
|
|
90001
|
+
for (const name in schema.nodes) {
|
|
89903
90002
|
if (name === "text") {
|
|
89904
|
-
|
|
90003
|
+
continue;
|
|
89905
90004
|
}
|
|
89906
|
-
|
|
90005
|
+
const nodeType = schema.nodes[name];
|
|
90006
|
+
if (nodeType && (nodeType.isAtom || nodeType.isLeaf)) {
|
|
89907
90007
|
types2.push(name);
|
|
89908
90008
|
}
|
|
89909
|
-
}
|
|
90009
|
+
}
|
|
89910
90010
|
} catch {
|
|
89911
90011
|
return [];
|
|
89912
90012
|
}
|
|
@@ -100803,7 +100903,7 @@ ${l}
|
|
|
100803
100903
|
return result;
|
|
100804
100904
|
};
|
|
100805
100905
|
const applyTextTransform = (text2, run2, startOffset) => {
|
|
100806
|
-
const transform = run2.textTransform;
|
|
100906
|
+
const transform = "textTransform" in run2 ? run2.textTransform : void 0;
|
|
100807
100907
|
if (!text2 || !transform || transform === "none") return text2;
|
|
100808
100908
|
if (transform === "uppercase") return text2.toUpperCase();
|
|
100809
100909
|
if (transform === "lowercase") return text2.toLowerCase();
|
|
@@ -101126,6 +101226,9 @@ ${l}
|
|
|
101126
101226
|
if (event.button !== 0) {
|
|
101127
101227
|
return;
|
|
101128
101228
|
}
|
|
101229
|
+
if (event.ctrlKey && navigator.platform.includes("Mac")) {
|
|
101230
|
+
return;
|
|
101231
|
+
}
|
|
101129
101232
|
__privateSet(this, _pendingMarginClick, null);
|
|
101130
101233
|
const target = event.target;
|
|
101131
101234
|
if (target?.closest?.(".superdoc-ruler-handle") != null) {
|
|
@@ -106535,6 +106638,8 @@ ${l}
|
|
|
106535
106638
|
const cbRect = containingBlock.getBoundingClientRect();
|
|
106536
106639
|
left2 -= cbRect.left;
|
|
106537
106640
|
top2 -= cbRect.top;
|
|
106641
|
+
left2 += containingBlock.scrollLeft || 0;
|
|
106642
|
+
top2 += containingBlock.scrollTop || 0;
|
|
106538
106643
|
} catch (error) {
|
|
106539
106644
|
console.warn("SlashMenu: Failed to adjust for containing block", error);
|
|
106540
106645
|
}
|
|
@@ -137873,7 +137978,7 @@ ${style2}
|
|
|
137873
137978
|
if (open) {
|
|
137874
137979
|
nextTick(() => {
|
|
137875
137980
|
if (searchInput.value) {
|
|
137876
|
-
searchInput.value.focus();
|
|
137981
|
+
searchInput.value.focus({ preventScroll: true });
|
|
137877
137982
|
}
|
|
137878
137983
|
});
|
|
137879
137984
|
}
|
|
@@ -137978,7 +138083,11 @@ ${style2}
|
|
|
137978
138083
|
};
|
|
137979
138084
|
const handleGlobalOutsideClick = (event) => {
|
|
137980
138085
|
if (isOpen.value && menuRef.value && !menuRef.value.contains(event.target)) {
|
|
137981
|
-
|
|
138086
|
+
const isCtrlClickOnMac = event.ctrlKey && isMacOS();
|
|
138087
|
+
const isLeftClick = event.button === 0 && !isCtrlClickOnMac;
|
|
138088
|
+
if (isLeftClick) {
|
|
138089
|
+
moveCursorToMouseEvent(event, props.editor);
|
|
138090
|
+
}
|
|
137982
138091
|
closeMenu({ restoreCursor: false });
|
|
137983
138092
|
}
|
|
137984
138093
|
};
|
|
@@ -140073,6 +140182,12 @@ ${style2}
|
|
|
140073
140182
|
if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
|
|
140074
140183
|
});
|
|
140075
140184
|
const handleMarginClick = (event) => {
|
|
140185
|
+
if (event.button !== 0) {
|
|
140186
|
+
return;
|
|
140187
|
+
}
|
|
140188
|
+
if (event.ctrlKey && isMacOS()) {
|
|
140189
|
+
return;
|
|
140190
|
+
}
|
|
140076
140191
|
if (event.target.classList.contains("ProseMirror")) return;
|
|
140077
140192
|
onMarginClickCursorChange(event, activeEditor.value);
|
|
140078
140193
|
};
|
|
@@ -140211,7 +140326,7 @@ ${style2}
|
|
|
140211
140326
|
};
|
|
140212
140327
|
}
|
|
140213
140328
|
});
|
|
140214
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
140329
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-c9a3c876"]]);
|
|
140215
140330
|
const _hoisted_1$h = ["innerHTML"];
|
|
140216
140331
|
const _sfc_main$i = {
|
|
140217
140332
|
__name: "SuperInput",
|
|
@@ -157665,7 +157780,7 @@ ${style2}
|
|
|
157665
157780
|
this.config.colors = shuffleArray(this.config.colors);
|
|
157666
157781
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
157667
157782
|
this.colorIndex = 0;
|
|
157668
|
-
this.version = "2.0.0-next.
|
|
157783
|
+
this.version = "2.0.0-next.5";
|
|
157669
157784
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
157670
157785
|
this.superdocId = config2.superdocId || v4();
|
|
157671
157786
|
this.colors = this.config.colors;
|
|
@@ -160138,7 +160253,7 @@ ${style2}
|
|
|
160138
160253
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
160139
160254
|
);
|
|
160140
160255
|
}
|
|
160141
|
-
const
|
|
160256
|
+
const indexCBSyVaOM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
160142
160257
|
__proto__: null,
|
|
160143
160258
|
unified
|
|
160144
160259
|
}, Symbol.toStringTag, { value: "Module" }));
|