@harbour-enterprises/superdoc 1.0.0-beta.55 → 1.0.0-beta.57
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-ARRkZgYS.es.js → PdfViewer-BpJ5YJmq.es.js} +1 -1
- package/dist/chunks/{PdfViewer-ObG30G-u.cjs → PdfViewer-DvAhx37Y.cjs} +1 -1
- package/dist/chunks/{index-Bwqb03qi.es.js → index-BE9w4viZ.es.js} +3 -3
- package/dist/chunks/{index-DFHwDXHd.cjs → index-BbXDEDIW.cjs} +3 -3
- package/dist/chunks/{index-bqjMjne1-DBB94Dlj.es.js → index-D5IkZjf9-CPmfOXHq.es.js} +1 -1
- package/dist/chunks/{index-bqjMjne1-CJi4d9NS.cjs → index-D5IkZjf9-XnnWMFi7.cjs} +1 -1
- package/dist/chunks/{super-editor.es-7Twgz-8H.es.js → super-editor.es-BY9i51n2.es.js} +131 -38
- package/dist/chunks/{super-editor.es-C2Ob7BbN.cjs → super-editor.es-BjELk3Xl.cjs} +131 -38
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-D33MGATy.js → converter-Aoe_RSZD.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-C7Fp89_I.js → docx-zipper-Ct68kitw.js} +1 -1
- package/dist/super-editor/chunks/{editor-BiFHsy25.js → editor-Dfqm3VkC.js} +132 -39
- package/dist/super-editor/chunks/{index-bqjMjne1.js → index-D5IkZjf9.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BNta2qOv.js → toolbar-Dj_HCM6i.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/super-editor.es.js +6 -6
- 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 +133 -40
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -42186,7 +42186,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42186
42186
|
static getStoredSuperdocVersion(docx) {
|
|
42187
42187
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42188
42188
|
}
|
|
42189
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42189
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.57") {
|
|
42190
42190
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42191
42191
|
}
|
|
42192
42192
|
/**
|
|
@@ -67225,7 +67225,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67225
67225
|
const shouldSkipNodeView = (editor) => {
|
|
67226
67226
|
return isHeadless(editor);
|
|
67227
67227
|
};
|
|
67228
|
-
const summaryVersion = "1.0.0-beta.
|
|
67228
|
+
const summaryVersion = "1.0.0-beta.57";
|
|
67229
67229
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67230
67230
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67231
67231
|
function mapAttributes(attrs) {
|
|
@@ -68014,7 +68014,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68014
68014
|
{ default: remarkStringify2 },
|
|
68015
68015
|
{ default: remarkGfm2 }
|
|
68016
68016
|
] = await Promise.all([
|
|
68017
|
-
Promise.resolve().then(() =>
|
|
68017
|
+
Promise.resolve().then(() => indexD5IkZjf9),
|
|
68018
68018
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68019
68019
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68020
68020
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68219,7 +68219,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68219
68219
|
* Process collaboration migrations
|
|
68220
68220
|
*/
|
|
68221
68221
|
processCollaborationMigrations() {
|
|
68222
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68222
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.57");
|
|
68223
68223
|
if (!this.options.ydoc) return;
|
|
68224
68224
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68225
68225
|
let docVersion = metaMap.get("version");
|
|
@@ -69166,7 +69166,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
69166
69166
|
const DEFAULT_HYPERLINK_CONFIG$1 = {
|
|
69167
69167
|
enableRichHyperlinks: false
|
|
69168
69168
|
};
|
|
69169
|
-
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
69169
|
+
const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
|
|
69170
|
+
"image",
|
|
69171
|
+
"hardBreak",
|
|
69172
|
+
"lineBreak",
|
|
69173
|
+
"page-number",
|
|
69174
|
+
"total-page-number",
|
|
69175
|
+
"passthroughInline",
|
|
69176
|
+
"bookmarkEnd"
|
|
69177
|
+
]);
|
|
69170
69178
|
const TOKEN_INLINE_TYPES = /* @__PURE__ */ new Map([
|
|
69171
69179
|
["page-number", "pageNumber"],
|
|
69172
69180
|
["total-page-number", "totalPageCount"]
|
|
@@ -70687,6 +70695,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
70687
70695
|
case "center":
|
|
70688
70696
|
case "right":
|
|
70689
70697
|
case "justify":
|
|
70698
|
+
case "left":
|
|
70690
70699
|
return value;
|
|
70691
70700
|
case "both":
|
|
70692
70701
|
case "distribute":
|
|
@@ -80242,9 +80251,11 @@ ${l}
|
|
|
80242
80251
|
const hasExplicitSegmentPositioning = line.segments?.some((seg) => seg.x !== void 0);
|
|
80243
80252
|
const isFirstLine = index2 === 0 && !fragment.continuesFromPrev;
|
|
80244
80253
|
if (!isListFirstLine) {
|
|
80245
|
-
if (
|
|
80246
|
-
|
|
80247
|
-
|
|
80254
|
+
if (hasExplicitSegmentPositioning) {
|
|
80255
|
+
if (isFirstLine && firstLineOffset !== 0) {
|
|
80256
|
+
const adjustedPadding = paraIndentLeft + firstLineOffset;
|
|
80257
|
+
lineEl.style.paddingLeft = `${adjustedPadding}px`;
|
|
80258
|
+
}
|
|
80248
80259
|
} else if (paraIndentLeft) {
|
|
80249
80260
|
lineEl.style.paddingLeft = `${paraIndentLeft}px`;
|
|
80250
80261
|
}
|
|
@@ -81675,6 +81686,13 @@ ${l}
|
|
|
81675
81686
|
}
|
|
81676
81687
|
}
|
|
81677
81688
|
if (hasExplicitPositioning && line.segments) {
|
|
81689
|
+
const paraIndent = block.attrs?.indent;
|
|
81690
|
+
const indentLeft = paraIndent?.left ?? 0;
|
|
81691
|
+
const firstLine = paraIndent?.firstLine ?? 0;
|
|
81692
|
+
const hanging = paraIndent?.hanging ?? 0;
|
|
81693
|
+
const isFirstLineOfPara = lineIndex === 0 || lineIndex === void 0;
|
|
81694
|
+
const firstLineOffsetForCumX = isFirstLineOfPara ? firstLine - hanging : 0;
|
|
81695
|
+
const indentOffset = indentLeft + firstLineOffsetForCumX;
|
|
81678
81696
|
let cumulativeX = 0;
|
|
81679
81697
|
const segmentsByRun = /* @__PURE__ */ new Map();
|
|
81680
81698
|
line.segments.forEach((segment) => {
|
|
@@ -81706,7 +81724,7 @@ ${l}
|
|
|
81706
81724
|
const actualTabWidth = tabEndX - tabStartX;
|
|
81707
81725
|
const tabEl = this.doc.createElement("span");
|
|
81708
81726
|
tabEl.style.position = "absolute";
|
|
81709
|
-
tabEl.style.left = `${tabStartX}px`;
|
|
81727
|
+
tabEl.style.left = `${tabStartX + indentOffset}px`;
|
|
81710
81728
|
tabEl.style.top = "0px";
|
|
81711
81729
|
tabEl.style.width = `${actualTabWidth}px`;
|
|
81712
81730
|
tabEl.style.height = `${line.lineHeight}px`;
|
|
@@ -81737,12 +81755,13 @@ ${l}
|
|
|
81737
81755
|
elem.setAttribute("styleid", styleId);
|
|
81738
81756
|
}
|
|
81739
81757
|
const runSegments2 = segmentsByRun.get(runIndex);
|
|
81740
|
-
const
|
|
81758
|
+
const baseSegX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
|
|
81759
|
+
const segX = baseSegX + indentOffset;
|
|
81741
81760
|
const segWidth = (runSegments2 && runSegments2[0]?.width !== void 0 ? runSegments2[0].width : elem.offsetWidth) ?? 0;
|
|
81742
81761
|
elem.style.position = "absolute";
|
|
81743
81762
|
elem.style.left = `${segX}px`;
|
|
81744
81763
|
el.appendChild(elem);
|
|
81745
|
-
cumulativeX =
|
|
81764
|
+
cumulativeX = baseSegX + segWidth;
|
|
81746
81765
|
}
|
|
81747
81766
|
continue;
|
|
81748
81767
|
}
|
|
@@ -81759,12 +81778,13 @@ ${l}
|
|
|
81759
81778
|
elem.setAttribute("styleid", styleId);
|
|
81760
81779
|
}
|
|
81761
81780
|
const runSegments2 = segmentsByRun.get(runIndex);
|
|
81762
|
-
const
|
|
81781
|
+
const baseSegX = runSegments2 && runSegments2[0]?.x !== void 0 ? runSegments2[0].x : cumulativeX;
|
|
81782
|
+
const segX = baseSegX + indentOffset;
|
|
81763
81783
|
const segWidth = (runSegments2 && runSegments2[0]?.width !== void 0 ? runSegments2[0].width : 0) ?? 0;
|
|
81764
81784
|
elem.style.position = "absolute";
|
|
81765
81785
|
elem.style.left = `${segX}px`;
|
|
81766
81786
|
el.appendChild(elem);
|
|
81767
|
-
cumulativeX =
|
|
81787
|
+
cumulativeX = baseSegX + segWidth;
|
|
81768
81788
|
}
|
|
81769
81789
|
continue;
|
|
81770
81790
|
}
|
|
@@ -81794,7 +81814,8 @@ ${l}
|
|
|
81794
81814
|
if (styleId) {
|
|
81795
81815
|
elem.setAttribute("styleid", styleId);
|
|
81796
81816
|
}
|
|
81797
|
-
const
|
|
81817
|
+
const baseX = segment.x !== void 0 ? segment.x : cumulativeX;
|
|
81818
|
+
const xPos = baseX + indentOffset;
|
|
81798
81819
|
elem.style.position = "absolute";
|
|
81799
81820
|
elem.style.left = `${xPos}px`;
|
|
81800
81821
|
el.appendChild(elem);
|
|
@@ -81808,7 +81829,7 @@ ${l}
|
|
|
81808
81829
|
width = measureEl.offsetWidth;
|
|
81809
81830
|
this.doc.body.removeChild(measureEl);
|
|
81810
81831
|
}
|
|
81811
|
-
cumulativeX =
|
|
81832
|
+
cumulativeX = baseX + width;
|
|
81812
81833
|
}
|
|
81813
81834
|
});
|
|
81814
81835
|
}
|
|
@@ -84198,6 +84219,32 @@ ${l}
|
|
|
84198
84219
|
state2.page.fragments.push(fragment);
|
|
84199
84220
|
state2.cursorY += requiredHeight;
|
|
84200
84221
|
}
|
|
84222
|
+
function getTableIndentWidth(attrs) {
|
|
84223
|
+
if (!attrs) {
|
|
84224
|
+
return 0;
|
|
84225
|
+
}
|
|
84226
|
+
const tableIndent = attrs.tableIndent;
|
|
84227
|
+
if (!tableIndent || typeof tableIndent !== "object") {
|
|
84228
|
+
return 0;
|
|
84229
|
+
}
|
|
84230
|
+
const width = tableIndent.width;
|
|
84231
|
+
if (width === void 0 || width === null) {
|
|
84232
|
+
return 0;
|
|
84233
|
+
}
|
|
84234
|
+
if (typeof width !== "number") {
|
|
84235
|
+
return 0;
|
|
84236
|
+
}
|
|
84237
|
+
if (!Number.isFinite(width)) {
|
|
84238
|
+
return 0;
|
|
84239
|
+
}
|
|
84240
|
+
return width;
|
|
84241
|
+
}
|
|
84242
|
+
function applyTableIndent(x2, width, indent2) {
|
|
84243
|
+
return {
|
|
84244
|
+
x: x2 + indent2,
|
|
84245
|
+
width: Math.max(0, width - indent2)
|
|
84246
|
+
};
|
|
84247
|
+
}
|
|
84201
84248
|
function calculateColumnMinWidth(columnIndex, measure) {
|
|
84202
84249
|
const DEFAULT_MIN_WIDTH = 25;
|
|
84203
84250
|
const measuredWidth = measure.columnWidths[columnIndex] || DEFAULT_MIN_WIDTH;
|
|
@@ -84412,14 +84459,18 @@ ${l}
|
|
|
84412
84459
|
columnBoundaries: generateColumnBoundaries(context.measure),
|
|
84413
84460
|
coordinateSystem: "fragment"
|
|
84414
84461
|
};
|
|
84462
|
+
const tableIndent = getTableIndentWidth(context.block.attrs);
|
|
84463
|
+
const baseX = context.columnX(state2.columnIndex);
|
|
84464
|
+
const baseWidth = Math.min(context.columnWidth, context.measure.totalWidth || context.columnWidth);
|
|
84465
|
+
const { x: x2, width } = applyTableIndent(baseX, baseWidth, tableIndent);
|
|
84415
84466
|
const fragment = {
|
|
84416
84467
|
kind: "table",
|
|
84417
84468
|
blockId: context.block.id,
|
|
84418
84469
|
fromRow: 0,
|
|
84419
84470
|
toRow: context.block.rows.length,
|
|
84420
|
-
x:
|
|
84471
|
+
x: x2,
|
|
84421
84472
|
y: state2.cursorY,
|
|
84422
|
-
width
|
|
84473
|
+
width,
|
|
84423
84474
|
height,
|
|
84424
84475
|
metadata
|
|
84425
84476
|
};
|
|
@@ -84486,14 +84537,18 @@ ${l}
|
|
|
84486
84537
|
columnBoundaries: generateColumnBoundaries(measure),
|
|
84487
84538
|
coordinateSystem: "fragment"
|
|
84488
84539
|
};
|
|
84540
|
+
const tableIndent = getTableIndentWidth(block.attrs);
|
|
84541
|
+
const baseX = columnX(state2.columnIndex);
|
|
84542
|
+
const baseWidth = Math.min(columnWidth, measure.totalWidth || columnWidth);
|
|
84543
|
+
const { x: x2, width } = applyTableIndent(baseX, baseWidth, tableIndent);
|
|
84489
84544
|
const fragment = {
|
|
84490
84545
|
kind: "table",
|
|
84491
84546
|
blockId: block.id,
|
|
84492
84547
|
fromRow: 0,
|
|
84493
84548
|
toRow: 0,
|
|
84494
|
-
x:
|
|
84549
|
+
x: x2,
|
|
84495
84550
|
y: state2.cursorY,
|
|
84496
|
-
width
|
|
84551
|
+
width,
|
|
84497
84552
|
height,
|
|
84498
84553
|
metadata
|
|
84499
84554
|
};
|
|
@@ -84541,14 +84596,18 @@ ${l}
|
|
|
84541
84596
|
});
|
|
84542
84597
|
const fragmentHeight2 = continuationPartialRow.partialHeight + (repeatHeaderCount > 0 ? headerHeight : 0);
|
|
84543
84598
|
if (fragmentHeight2 > 0 && madeProgress) {
|
|
84599
|
+
const tableIndent2 = getTableIndentWidth(block.attrs);
|
|
84600
|
+
const baseX2 = columnX(state2.columnIndex);
|
|
84601
|
+
const baseWidth2 = Math.min(columnWidth, measure.totalWidth || columnWidth);
|
|
84602
|
+
const { x: x22, width: width2 } = applyTableIndent(baseX2, baseWidth2, tableIndent2);
|
|
84544
84603
|
const fragment2 = {
|
|
84545
84604
|
kind: "table",
|
|
84546
84605
|
blockId: block.id,
|
|
84547
84606
|
fromRow: rowIndex,
|
|
84548
84607
|
toRow: rowIndex + 1,
|
|
84549
|
-
x:
|
|
84608
|
+
x: x22,
|
|
84550
84609
|
y: state2.cursorY,
|
|
84551
|
-
width:
|
|
84610
|
+
width: width2,
|
|
84552
84611
|
height: fragmentHeight2,
|
|
84553
84612
|
continuesFromPrev: true,
|
|
84554
84613
|
continuesOnNext: hasRemainingLinesAfterContinuation || rowIndex + 1 < block.rows.length,
|
|
@@ -84581,14 +84640,18 @@ ${l}
|
|
|
84581
84640
|
const forcedPartialRow = computePartialRow(bodyStartRow, block.rows[bodyStartRow], measure, availableForBody);
|
|
84582
84641
|
const forcedEndRow = bodyStartRow + 1;
|
|
84583
84642
|
const fragmentHeight2 = forcedPartialRow.partialHeight + (repeatHeaderCount > 0 ? headerHeight : 0);
|
|
84643
|
+
const tableIndent2 = getTableIndentWidth(block.attrs);
|
|
84644
|
+
const baseX2 = columnX(state2.columnIndex);
|
|
84645
|
+
const baseWidth2 = Math.min(columnWidth, measure.totalWidth || columnWidth);
|
|
84646
|
+
const { x: x22, width: width2 } = applyTableIndent(baseX2, baseWidth2, tableIndent2);
|
|
84584
84647
|
const fragment2 = {
|
|
84585
84648
|
kind: "table",
|
|
84586
84649
|
blockId: block.id,
|
|
84587
84650
|
fromRow: bodyStartRow,
|
|
84588
84651
|
toRow: forcedEndRow,
|
|
84589
|
-
x:
|
|
84652
|
+
x: x22,
|
|
84590
84653
|
y: state2.cursorY,
|
|
84591
|
-
width:
|
|
84654
|
+
width: width2,
|
|
84592
84655
|
height: fragmentHeight2,
|
|
84593
84656
|
continuesFromPrev: isTableContinuation,
|
|
84594
84657
|
continuesOnNext: !forcedPartialRow.isLastPart || forcedEndRow < block.rows.length,
|
|
@@ -84612,14 +84675,18 @@ ${l}
|
|
|
84612
84675
|
measure
|
|
84613
84676
|
);
|
|
84614
84677
|
}
|
|
84678
|
+
const tableIndent = getTableIndentWidth(block.attrs);
|
|
84679
|
+
const baseX = columnX(state2.columnIndex);
|
|
84680
|
+
const baseWidth = Math.min(columnWidth, measure.totalWidth || columnWidth);
|
|
84681
|
+
const { x: x2, width } = applyTableIndent(baseX, baseWidth, tableIndent);
|
|
84615
84682
|
const fragment = {
|
|
84616
84683
|
kind: "table",
|
|
84617
84684
|
blockId: block.id,
|
|
84618
84685
|
fromRow: bodyStartRow,
|
|
84619
84686
|
toRow: endRow,
|
|
84620
|
-
x:
|
|
84687
|
+
x: x2,
|
|
84621
84688
|
y: state2.cursorY,
|
|
84622
|
-
width
|
|
84689
|
+
width,
|
|
84623
84690
|
height: fragmentHeight,
|
|
84624
84691
|
continuesFromPrev: isTableContinuation,
|
|
84625
84692
|
continuesOnNext: endRow < block.rows.length || (partialRow ? !partialRow.isLastPart : false),
|
|
@@ -87790,6 +87857,7 @@ ${l}
|
|
|
87790
87857
|
return effectiveEndA > startB && startA < endB;
|
|
87791
87858
|
};
|
|
87792
87859
|
function hitTestPage(layout, point2) {
|
|
87860
|
+
const pageGap = layout.pageGap ?? 0;
|
|
87793
87861
|
let cursorY = 0;
|
|
87794
87862
|
for (let pageIndex = 0; pageIndex < layout.pages.length; pageIndex += 1) {
|
|
87795
87863
|
const page = layout.pages[pageIndex];
|
|
@@ -87798,7 +87866,7 @@ ${l}
|
|
|
87798
87866
|
if (point2.y >= top2 && point2.y < bottom2) {
|
|
87799
87867
|
return { pageIndex, page };
|
|
87800
87868
|
}
|
|
87801
|
-
cursorY = bottom2;
|
|
87869
|
+
cursorY = bottom2 + pageGap;
|
|
87802
87870
|
}
|
|
87803
87871
|
return null;
|
|
87804
87872
|
}
|
|
@@ -88007,9 +88075,10 @@ ${l}
|
|
|
88007
88075
|
if (!pageHit) {
|
|
88008
88076
|
return null;
|
|
88009
88077
|
}
|
|
88078
|
+
const pageGap = layout.pageGap ?? 0;
|
|
88010
88079
|
const pageRelativePoint = {
|
|
88011
88080
|
x: containerPoint.x,
|
|
88012
|
-
y: containerPoint.y - pageHit.pageIndex * layout.pageSize.h
|
|
88081
|
+
y: containerPoint.y - pageHit.pageIndex * (layout.pageSize.h + pageGap)
|
|
88013
88082
|
};
|
|
88014
88083
|
logClickStage("log", "page-hit", {
|
|
88015
88084
|
pageIndex: pageHit.pageIndex
|
|
@@ -88230,7 +88299,7 @@ ${l}
|
|
|
88230
88299
|
const rectY = fragment.y + lineOffset;
|
|
88231
88300
|
rects.push({
|
|
88232
88301
|
x: rectX,
|
|
88233
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
88302
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88234
88303
|
width: rectWidth,
|
|
88235
88304
|
height: line.lineHeight,
|
|
88236
88305
|
pageIndex
|
|
@@ -88347,7 +88416,7 @@ ${l}
|
|
|
88347
88416
|
const rectY = fragment.y + rowOffset + blockTopCursor + lineOffset;
|
|
88348
88417
|
rects.push({
|
|
88349
88418
|
x: rectX,
|
|
88350
|
-
y: rectY + pageIndex * layout.pageSize.h,
|
|
88419
|
+
y: rectY + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88351
88420
|
width: rectWidth,
|
|
88352
88421
|
height: line.lineHeight,
|
|
88353
88422
|
pageIndex
|
|
@@ -88376,7 +88445,7 @@ ${l}
|
|
|
88376
88445
|
if (!rangesOverlap(pmRange.pmStart, pmRange.pmEnd, from2, to)) return;
|
|
88377
88446
|
rects.push({
|
|
88378
88447
|
x: fragment.x,
|
|
88379
|
-
y: fragment.y + pageIndex * layout.pageSize.h,
|
|
88448
|
+
y: fragment.y + pageIndex * (layout.pageSize.h + (layout.pageGap ?? 0)),
|
|
88380
88449
|
width: fragment.width,
|
|
88381
88450
|
height: fragment.height,
|
|
88382
88451
|
pageIndex
|
|
@@ -89405,7 +89474,15 @@ ${l}
|
|
|
89405
89474
|
currentLine.width = roundValue(currentLine.width + boundarySpacing + wordOnlyWidth);
|
|
89406
89475
|
currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run2);
|
|
89407
89476
|
currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run2.fontSize);
|
|
89408
|
-
|
|
89477
|
+
const useExplicitXHere = wordIndex === 0 && segmentStartX !== void 0;
|
|
89478
|
+
appendSegment(
|
|
89479
|
+
currentLine.segments,
|
|
89480
|
+
runIndex,
|
|
89481
|
+
wordStartChar,
|
|
89482
|
+
wordEndNoSpace,
|
|
89483
|
+
wordOnlyWidth,
|
|
89484
|
+
useExplicitXHere ? segmentStartX : void 0
|
|
89485
|
+
);
|
|
89409
89486
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
89410
89487
|
const completedLine = { ...currentLine, ...metrics };
|
|
89411
89488
|
addBarTabsToLine(completedLine);
|
|
@@ -91290,6 +91367,8 @@ ${l}
|
|
|
91290
91367
|
const FIELD_ANNOTATION_DATA_TYPE = "fieldAnnotation";
|
|
91291
91368
|
const DEFAULT_PAGE_SIZE = { w: 612, h: 792 };
|
|
91292
91369
|
const DEFAULT_MARGINS = { top: 72, right: 72, bottom: 72, left: 72 };
|
|
91370
|
+
const DEFAULT_VIRTUALIZED_PAGE_GAP = 72;
|
|
91371
|
+
const DEFAULT_PAGE_GAP = 24;
|
|
91293
91372
|
const WORD_CHARACTER_REGEX = /[\p{L}\p{N}''_~-]/u;
|
|
91294
91373
|
const MULTI_CLICK_TIME_THRESHOLD_MS = 400;
|
|
91295
91374
|
const MULTI_CLICK_DISTANCE_THRESHOLD_PX = 5;
|
|
@@ -92364,8 +92443,9 @@ ${l}
|
|
|
92364
92443
|
const rawRects = layoutRectSource();
|
|
92365
92444
|
if (!rawRects.length) return [];
|
|
92366
92445
|
const pageHeight = __privateGet$1(this, _session).mode === "body" ? __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this) : __privateMethod$1(this, _PresentationEditor_instances, getHeaderFooterPageHeight_fn).call(this);
|
|
92446
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
92367
92447
|
return rawRects.map((rect) => {
|
|
92368
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
92448
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
92369
92449
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
92370
92450
|
if (!coords) return null;
|
|
92371
92451
|
const absLeft = coords.x * zoom + overlayRect.left;
|
|
@@ -92617,7 +92697,8 @@ ${l}
|
|
|
92617
92697
|
return null;
|
|
92618
92698
|
}
|
|
92619
92699
|
const pageHeight = __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
92620
|
-
const
|
|
92700
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
92701
|
+
const pageLocalY = rect2.y - rect2.pageIndex * (pageHeight + pageGap);
|
|
92621
92702
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect2.pageIndex, rect2.x, pageLocalY);
|
|
92622
92703
|
if (!coords) {
|
|
92623
92704
|
return null;
|
|
@@ -93361,10 +93442,11 @@ ${l}
|
|
|
93361
93442
|
const color2 = __privateMethod$1(this, _PresentationEditor_instances, getValidatedColor_fn).call(this, cursor);
|
|
93362
93443
|
const opacity = __privateGet$1(this, _layoutOptions).presence?.highlightOpacity ?? 0.35;
|
|
93363
93444
|
const pageHeight = layout.pageSize?.h ?? __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
93445
|
+
const pageGap = layout.pageGap ?? 0;
|
|
93364
93446
|
const doc2 = __privateGet$1(this, _visibleHost).ownerDocument ?? document;
|
|
93365
93447
|
const limitedRects = rects.slice(0, MAX_SELECTION_RECTS_PER_USER);
|
|
93366
93448
|
limitedRects.forEach((rect) => {
|
|
93367
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
93449
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
93368
93450
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
93369
93451
|
if (!coords) return;
|
|
93370
93452
|
const selectionEl = doc2.createElement("div");
|
|
@@ -93827,6 +93909,12 @@ ${l}
|
|
|
93827
93909
|
return;
|
|
93828
93910
|
}
|
|
93829
93911
|
({ layout, measures } = result);
|
|
93912
|
+
if (__privateGet$1(this, _layoutOptions).virtualization?.enabled) {
|
|
93913
|
+
const gap = __privateGet$1(this, _layoutOptions).virtualization.gap ?? DEFAULT_VIRTUALIZED_PAGE_GAP;
|
|
93914
|
+
layout.pageGap = Math.max(0, gap);
|
|
93915
|
+
} else {
|
|
93916
|
+
layout.pageGap = DEFAULT_PAGE_GAP;
|
|
93917
|
+
}
|
|
93830
93918
|
headerLayouts = result.headers;
|
|
93831
93919
|
footerLayouts = result.footers;
|
|
93832
93920
|
} catch (error) {
|
|
@@ -94314,9 +94402,10 @@ ${l}
|
|
|
94314
94402
|
const layout = __privateGet$1(this, _layoutState).layout;
|
|
94315
94403
|
if (!layout) return null;
|
|
94316
94404
|
const pageHeight = layout.pageSize?.h ?? __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
94405
|
+
const pageGap = layout.pageGap ?? 0;
|
|
94317
94406
|
if (pageHeight <= 0) return null;
|
|
94318
|
-
const pageIndex = Math.max(0, Math.floor(y2 / pageHeight));
|
|
94319
|
-
const pageLocalY = y2 - pageIndex * pageHeight;
|
|
94407
|
+
const pageIndex = Math.max(0, Math.floor(y2 / (pageHeight + pageGap)));
|
|
94408
|
+
const pageLocalY = y2 - pageIndex * (pageHeight + pageGap);
|
|
94320
94409
|
const headerRegion = __privateGet$1(this, _headerRegions).get(pageIndex);
|
|
94321
94410
|
if (headerRegion && __privateMethod$1(this, _PresentationEditor_instances, pointInRegion_fn).call(this, headerRegion, x2, pageLocalY)) {
|
|
94322
94411
|
return headerRegion;
|
|
@@ -94741,8 +94830,9 @@ ${l}
|
|
|
94741
94830
|
return;
|
|
94742
94831
|
}
|
|
94743
94832
|
const pageHeight = __privateMethod$1(this, _PresentationEditor_instances, getBodyPageHeight_fn).call(this);
|
|
94833
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
94744
94834
|
rects.forEach((rect, _index) => {
|
|
94745
|
-
const pageLocalY = rect.y - rect.pageIndex * pageHeight;
|
|
94835
|
+
const pageLocalY = rect.y - rect.pageIndex * (pageHeight + pageGap);
|
|
94746
94836
|
const coords = __privateMethod$1(this, _PresentationEditor_instances, convertPageLocalToOverlayCoords_fn).call(this, rect.pageIndex, rect.x, pageLocalY);
|
|
94747
94837
|
if (!coords) {
|
|
94748
94838
|
return;
|
|
@@ -95000,9 +95090,10 @@ ${l}
|
|
|
95000
95090
|
return null;
|
|
95001
95091
|
}
|
|
95002
95092
|
const pageHeight = __privateGet$1(this, _layoutOptions).pageSize?.h ?? DEFAULT_PAGE_SIZE.h;
|
|
95093
|
+
const pageGap = __privateGet$1(this, _layoutState).layout?.pageGap ?? 0;
|
|
95003
95094
|
return {
|
|
95004
95095
|
x: pageLocalX,
|
|
95005
|
-
y: pageIndex * pageHeight + pageLocalY
|
|
95096
|
+
y: pageIndex * (pageHeight + pageGap) + pageLocalY
|
|
95006
95097
|
};
|
|
95007
95098
|
};
|
|
95008
95099
|
normalizeClientPoint_fn = function(clientX, clientY) {
|
|
@@ -108653,6 +108744,8 @@ ${l}
|
|
|
108653
108744
|
name: "passthroughInline",
|
|
108654
108745
|
group: "inline",
|
|
108655
108746
|
inline: true,
|
|
108747
|
+
// IMPORTANT: This node is registered in pm-adapter/src/constants.ts ATOMIC_INLINE_TYPES
|
|
108748
|
+
// If you change atom to false, you MUST remove it from that set to avoid positioning bugs
|
|
108656
108749
|
atom: true,
|
|
108657
108750
|
draggable: false,
|
|
108658
108751
|
selectable: false,
|
|
@@ -148971,7 +149064,7 @@ ${style2}
|
|
|
148971
149064
|
this.config.colors = shuffleArray(this.config.colors);
|
|
148972
149065
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
148973
149066
|
this.colorIndex = 0;
|
|
148974
|
-
this.version = "1.0.0-beta.
|
|
149067
|
+
this.version = "1.0.0-beta.57";
|
|
148975
149068
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
148976
149069
|
this.superdocId = config2.superdocId || v4();
|
|
148977
149070
|
this.colors = this.config.colors;
|
|
@@ -151437,7 +151530,7 @@ ${style2}
|
|
|
151437
151530
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
151438
151531
|
);
|
|
151439
151532
|
}
|
|
151440
|
-
const
|
|
151533
|
+
const indexD5IkZjf9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151441
151534
|
__proto__: null,
|
|
151442
151535
|
unified
|
|
151443
151536
|
}, Symbol.toStringTag, { value: "Module" }));
|