oasis-editor 0.0.111 → 0.0.113
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/{OasisEditorApp-MEaOb4ut.js → OasisEditorApp-BKPrQtm5.js} +429 -750
- package/dist/app/controllers/tableOpsMutationCommands.d.ts +8 -1
- package/dist/assets/{importDocxWorker-DyYGjoXG.js → importDocxWorker-Bz2kZOBO.js} +1 -1
- package/dist/core/docxTableMaps.d.ts +11 -0
- package/dist/core/editorState.d.ts +5 -14
- package/dist/{index-mocSBySQ.js → index-DSDwe-yy.js} +526 -475
- package/dist/layoutProjection/paginationSegmentEngine.d.ts +40 -0
- package/dist/oasis-editor.js +51 -51
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/canvas/canvasFontResolution.d.ts +19 -0
- package/dist/ui/canvas/canvasParagraphPainter.d.ts +1 -1
- package/dist/ui/components/Dialogs/DialogFooter.d.ts +12 -0
- package/dist/ui/components/Dialogs/TextInputDialog.d.ts +16 -0
- package/package.json +1 -1
|
@@ -2539,7 +2539,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2539
2539
|
onCleanup(() => {
|
|
2540
2540
|
cancelled = true;
|
|
2541
2541
|
});
|
|
2542
|
-
import("./OasisEditorApp-
|
|
2542
|
+
import("./OasisEditorApp-BKPrQtm5.js").then((m) => {
|
|
2543
2543
|
cancelled = true;
|
|
2544
2544
|
setProgress(1);
|
|
2545
2545
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -16271,6 +16271,30 @@ class PaginationTrack {
|
|
|
16271
16271
|
return this.pages;
|
|
16272
16272
|
}
|
|
16273
16273
|
}
|
|
16274
|
+
function paginateSegments(track, sourceId, segmenter) {
|
|
16275
|
+
var _a, _b;
|
|
16276
|
+
let segmentIndex = 0;
|
|
16277
|
+
while (segmenter.hasMore()) {
|
|
16278
|
+
const segmentId = `${sourceId}:segment:${segmentIndex}`;
|
|
16279
|
+
const remaining = track.currentMaxHeight - track.height;
|
|
16280
|
+
let block = segmenter.fit(segmentId, remaining);
|
|
16281
|
+
if (block === null && track.blocks.length > 0) {
|
|
16282
|
+
(_a = segmenter.onBeforeFlush) == null ? void 0 : _a.call(segmenter);
|
|
16283
|
+
track.flush();
|
|
16284
|
+
continue;
|
|
16285
|
+
}
|
|
16286
|
+
if (block === null) {
|
|
16287
|
+
block = segmenter.force(segmentId);
|
|
16288
|
+
}
|
|
16289
|
+
track.blocks.push(block);
|
|
16290
|
+
track.height += block.estimatedHeight;
|
|
16291
|
+
(_b = segmenter.onAfterPush) == null ? void 0 : _b.call(segmenter, block, segmentIndex);
|
|
16292
|
+
segmentIndex += 1;
|
|
16293
|
+
if (segmenter.hasMore()) {
|
|
16294
|
+
track.flush();
|
|
16295
|
+
}
|
|
16296
|
+
}
|
|
16297
|
+
}
|
|
16274
16298
|
const TEXT_BOX_AUTOFIT_SAFETY_PX$1 = 2;
|
|
16275
16299
|
const PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX = 1.5;
|
|
16276
16300
|
function registerParagraphFloatingExclusions(options) {
|
|
@@ -16457,93 +16481,13 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16457
16481
|
return;
|
|
16458
16482
|
}
|
|
16459
16483
|
let startLineIndex = 0;
|
|
16460
|
-
|
|
16461
|
-
while (startLineIndex < paragraphLayout.lines.length) {
|
|
16462
|
-
const remainingHeight = track.currentMaxHeight - track.height;
|
|
16463
|
-
let lineEndIndex = startLineIndex;
|
|
16464
|
-
let segmentHeight = 0;
|
|
16465
|
-
while (lineEndIndex < paragraphLayout.lines.length) {
|
|
16466
|
-
const candidateLines = paragraphLayout.lines.slice(
|
|
16467
|
-
startLineIndex,
|
|
16468
|
-
lineEndIndex + 1
|
|
16469
|
-
);
|
|
16470
|
-
const candidateHeight = getParagraphSegmentHeight(
|
|
16471
|
-
sourceBlock,
|
|
16472
|
-
candidateLines,
|
|
16473
|
-
startLineIndex === 0,
|
|
16474
|
-
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16475
|
-
styles,
|
|
16476
|
-
!collapseWithPrevious
|
|
16477
|
-
);
|
|
16478
|
-
const candidateFitHeight = getParagraphSegmentFitHeight(
|
|
16479
|
-
sourceBlock,
|
|
16480
|
-
candidateHeight,
|
|
16481
|
-
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16482
|
-
styles
|
|
16483
|
-
);
|
|
16484
|
-
if (candidateFitHeight > remainingHeight + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex === startLineIndex && track.blocks.length > 0) {
|
|
16485
|
-
break;
|
|
16486
|
-
}
|
|
16487
|
-
if (candidateFitHeight > remainingHeight + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex > startLineIndex) {
|
|
16488
|
-
break;
|
|
16489
|
-
}
|
|
16490
|
-
segmentHeight = candidateHeight;
|
|
16491
|
-
lineEndIndex += 1;
|
|
16492
|
-
}
|
|
16493
|
-
if (lineEndIndex === startLineIndex && track.blocks.length > 0) {
|
|
16494
|
-
if (contextualAdjustedPreviousBlock && contextualAdjustedAmount > 0) {
|
|
16495
|
-
contextualAdjustedPreviousBlock.estimatedHeight += contextualAdjustedAmount;
|
|
16496
|
-
track.height += contextualAdjustedAmount;
|
|
16497
|
-
contextualAdjustedPreviousBlock = void 0;
|
|
16498
|
-
contextualAdjustedAmount = 0;
|
|
16499
|
-
}
|
|
16500
|
-
collapseWithPrevious = false;
|
|
16501
|
-
track.flush();
|
|
16502
|
-
continue;
|
|
16503
|
-
}
|
|
16504
|
-
if (lineEndIndex === startLineIndex) {
|
|
16505
|
-
lineEndIndex = Math.min(paragraphLayout.lines.length, startLineIndex + 1);
|
|
16506
|
-
segmentHeight = getParagraphSegmentHeight(
|
|
16507
|
-
sourceBlock,
|
|
16508
|
-
paragraphLayout.lines.slice(startLineIndex, lineEndIndex),
|
|
16509
|
-
startLineIndex === 0,
|
|
16510
|
-
lineEndIndex === paragraphLayout.lines.length,
|
|
16511
|
-
styles,
|
|
16512
|
-
!collapseWithPrevious
|
|
16513
|
-
);
|
|
16514
|
-
}
|
|
16515
|
-
if (lineEndIndex < paragraphLayout.lines.length) {
|
|
16516
|
-
const widowOrphanAdjusted = applyWidowOrphanControl(
|
|
16517
|
-
sourceBlock,
|
|
16518
|
-
paragraphLayout.lines,
|
|
16519
|
-
startLineIndex,
|
|
16520
|
-
lineEndIndex,
|
|
16521
|
-
styles,
|
|
16522
|
-
!collapseWithPrevious,
|
|
16523
|
-
true,
|
|
16524
|
-
track.blocks.length > 0
|
|
16525
|
-
);
|
|
16526
|
-
lineEndIndex = widowOrphanAdjusted.endLineIndexExclusive;
|
|
16527
|
-
segmentHeight = widowOrphanAdjusted.height;
|
|
16528
|
-
if (lineEndIndex === startLineIndex) {
|
|
16529
|
-
if (contextualAdjustedPreviousBlock && contextualAdjustedAmount > 0) {
|
|
16530
|
-
contextualAdjustedPreviousBlock.estimatedHeight += contextualAdjustedAmount;
|
|
16531
|
-
track.height += contextualAdjustedAmount;
|
|
16532
|
-
contextualAdjustedPreviousBlock = void 0;
|
|
16533
|
-
contextualAdjustedAmount = 0;
|
|
16534
|
-
}
|
|
16535
|
-
collapseWithPrevious = false;
|
|
16536
|
-
track.flush();
|
|
16537
|
-
continue;
|
|
16538
|
-
}
|
|
16539
|
-
}
|
|
16484
|
+
const buildSegmentBlock = (originalStart, lineEndIndex, segmentHeight, segmentId) => {
|
|
16540
16485
|
const segmentLayout = createParagraphSegmentLayout(
|
|
16541
16486
|
paragraphLayout,
|
|
16542
|
-
|
|
16487
|
+
originalStart,
|
|
16543
16488
|
lineEndIndex
|
|
16544
16489
|
);
|
|
16545
|
-
const
|
|
16546
|
-
const isWholeParagraphSegment = startLineIndex === 0 && lineEndIndex === paragraphLayout.lines.length;
|
|
16490
|
+
const isWholeParagraphSegment = originalStart === 0 && lineEndIndex === paragraphLayout.lines.length;
|
|
16547
16491
|
const rawMeasuredHeight = getParagraphMeasuredHeight(
|
|
16548
16492
|
measuredHeights,
|
|
16549
16493
|
sourceBlock.id,
|
|
@@ -16552,8 +16496,8 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16552
16496
|
segmentHeight
|
|
16553
16497
|
);
|
|
16554
16498
|
const hasMeasuredHeight = (measuredHeights == null ? void 0 : measuredHeights[segmentId]) !== void 0 || isWholeParagraphSegment && (measuredHeights == null ? void 0 : measuredHeights[sourceBlock.id]) !== void 0;
|
|
16555
|
-
const measuredHeight = collapseWithPrevious &&
|
|
16556
|
-
|
|
16499
|
+
const measuredHeight = collapseWithPrevious && originalStart === 0 && hasMeasuredHeight ? Math.max(0, rawMeasuredHeight - (paragraphStyle.spacingBefore ?? 0)) : rawMeasuredHeight;
|
|
16500
|
+
return {
|
|
16557
16501
|
blockId: segmentId,
|
|
16558
16502
|
sourceBlockId: sourceBlock.id,
|
|
16559
16503
|
blockType: sourceBlock.type,
|
|
@@ -16562,23 +16506,111 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16562
16506
|
estimatedHeight: measuredHeight,
|
|
16563
16507
|
layout: segmentLayout,
|
|
16564
16508
|
sourceBlock
|
|
16565
|
-
}
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16576
|
-
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
|
|
16509
|
+
};
|
|
16510
|
+
};
|
|
16511
|
+
paginateSegments(track, sourceBlock.id, {
|
|
16512
|
+
hasMore: () => startLineIndex < paragraphLayout.lines.length,
|
|
16513
|
+
fit(segmentId, remaining) {
|
|
16514
|
+
const originalStart = startLineIndex;
|
|
16515
|
+
let lineEndIndex = originalStart;
|
|
16516
|
+
let segmentHeight = 0;
|
|
16517
|
+
while (lineEndIndex < paragraphLayout.lines.length) {
|
|
16518
|
+
const candidateLines = paragraphLayout.lines.slice(
|
|
16519
|
+
originalStart,
|
|
16520
|
+
lineEndIndex + 1
|
|
16521
|
+
);
|
|
16522
|
+
const candidateHeight = getParagraphSegmentHeight(
|
|
16523
|
+
sourceBlock,
|
|
16524
|
+
candidateLines,
|
|
16525
|
+
originalStart === 0,
|
|
16526
|
+
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16527
|
+
styles,
|
|
16528
|
+
!collapseWithPrevious
|
|
16529
|
+
);
|
|
16530
|
+
const candidateFitHeight = getParagraphSegmentFitHeight(
|
|
16531
|
+
sourceBlock,
|
|
16532
|
+
candidateHeight,
|
|
16533
|
+
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16534
|
+
styles
|
|
16535
|
+
);
|
|
16536
|
+
if (candidateFitHeight > remaining + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex === originalStart && track.blocks.length > 0) {
|
|
16537
|
+
break;
|
|
16538
|
+
}
|
|
16539
|
+
if (candidateFitHeight > remaining + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex > originalStart) {
|
|
16540
|
+
break;
|
|
16541
|
+
}
|
|
16542
|
+
segmentHeight = candidateHeight;
|
|
16543
|
+
lineEndIndex += 1;
|
|
16544
|
+
}
|
|
16545
|
+
if (lineEndIndex === originalStart) return null;
|
|
16546
|
+
if (lineEndIndex < paragraphLayout.lines.length) {
|
|
16547
|
+
const widowOrphanAdjusted = applyWidowOrphanControl(
|
|
16548
|
+
sourceBlock,
|
|
16549
|
+
paragraphLayout.lines,
|
|
16550
|
+
originalStart,
|
|
16551
|
+
lineEndIndex,
|
|
16552
|
+
styles,
|
|
16553
|
+
!collapseWithPrevious,
|
|
16554
|
+
true,
|
|
16555
|
+
track.blocks.length > 0
|
|
16556
|
+
);
|
|
16557
|
+
lineEndIndex = widowOrphanAdjusted.endLineIndexExclusive;
|
|
16558
|
+
segmentHeight = widowOrphanAdjusted.height;
|
|
16559
|
+
if (lineEndIndex === originalStart) return null;
|
|
16560
|
+
}
|
|
16561
|
+
const block = buildSegmentBlock(
|
|
16562
|
+
originalStart,
|
|
16563
|
+
lineEndIndex,
|
|
16564
|
+
segmentHeight,
|
|
16565
|
+
segmentId
|
|
16566
|
+
);
|
|
16567
|
+
startLineIndex = lineEndIndex;
|
|
16568
|
+
return block;
|
|
16569
|
+
},
|
|
16570
|
+
force(segmentId) {
|
|
16571
|
+
const originalStart = startLineIndex;
|
|
16572
|
+
const lineEndIndex = Math.min(
|
|
16573
|
+
paragraphLayout.lines.length,
|
|
16574
|
+
originalStart + 1
|
|
16575
|
+
);
|
|
16576
|
+
const segmentHeight = getParagraphSegmentHeight(
|
|
16577
|
+
sourceBlock,
|
|
16578
|
+
paragraphLayout.lines.slice(originalStart, lineEndIndex),
|
|
16579
|
+
originalStart === 0,
|
|
16580
|
+
lineEndIndex === paragraphLayout.lines.length,
|
|
16581
|
+
styles,
|
|
16582
|
+
!collapseWithPrevious
|
|
16583
|
+
);
|
|
16584
|
+
const block = buildSegmentBlock(
|
|
16585
|
+
originalStart,
|
|
16586
|
+
lineEndIndex,
|
|
16587
|
+
segmentHeight,
|
|
16588
|
+
segmentId
|
|
16589
|
+
);
|
|
16590
|
+
startLineIndex = lineEndIndex;
|
|
16591
|
+
return block;
|
|
16592
|
+
},
|
|
16593
|
+
onBeforeFlush() {
|
|
16594
|
+
if (contextualAdjustedPreviousBlock && contextualAdjustedAmount > 0) {
|
|
16595
|
+
contextualAdjustedPreviousBlock.estimatedHeight += contextualAdjustedAmount;
|
|
16596
|
+
track.height += contextualAdjustedAmount;
|
|
16597
|
+
contextualAdjustedPreviousBlock = void 0;
|
|
16598
|
+
contextualAdjustedAmount = 0;
|
|
16599
|
+
}
|
|
16600
|
+
collapseWithPrevious = false;
|
|
16601
|
+
},
|
|
16602
|
+
onAfterPush(block, si) {
|
|
16603
|
+
if (si === 0) {
|
|
16604
|
+
registerParagraphFloatingExclusions({
|
|
16605
|
+
track,
|
|
16606
|
+
layout: block.layout,
|
|
16607
|
+
blockTop: track.height - block.estimatedHeight + (paragraphStyle.spacingBefore ?? 0),
|
|
16608
|
+
params,
|
|
16609
|
+
resolveTextBoxHeight
|
|
16610
|
+
});
|
|
16611
|
+
}
|
|
16580
16612
|
}
|
|
16581
|
-
}
|
|
16613
|
+
});
|
|
16582
16614
|
}
|
|
16583
16615
|
function normalizeCellStartPositions(row, starts, legacyStarts) {
|
|
16584
16616
|
return row.cells.map((_, cellIdx) => {
|
|
@@ -16867,139 +16899,192 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
16867
16899
|
rowGroups
|
|
16868
16900
|
);
|
|
16869
16901
|
let groupStartIndex = 0;
|
|
16870
|
-
let segmentIndex = 0;
|
|
16871
16902
|
let currentCellBlockPositions;
|
|
16872
|
-
|
|
16873
|
-
const
|
|
16874
|
-
const
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
...sourceBlock,
|
|
16902
|
-
rows: [slicedFirstRow]
|
|
16903
|
-
},
|
|
16904
|
-
0,
|
|
16905
|
-
1,
|
|
16906
|
-
repeatedHeaderRowCount,
|
|
16907
|
-
styles,
|
|
16908
|
-
contentWidth,
|
|
16909
|
-
measurer,
|
|
16910
|
-
defaultTabStop
|
|
16911
|
-
);
|
|
16903
|
+
const buildTableBlock = (segmentId, startRowIndex, groupEndIndex, repeatedHeaderRowCount, segmentHeight, splitEnds, splitEndPositions, startCellPositions) => {
|
|
16904
|
+
const endRowIndex = rowGroups[groupEndIndex - 1].endRowIndexExclusive;
|
|
16905
|
+
const measuredSegmentHeight = (measuredHeights == null ? void 0 : measuredHeights[segmentId]) ?? segmentHeight;
|
|
16906
|
+
return {
|
|
16907
|
+
blockId: segmentId,
|
|
16908
|
+
sourceBlockId: sourceBlock.id,
|
|
16909
|
+
blockType: sourceBlock.type,
|
|
16910
|
+
globalIndex: index,
|
|
16911
|
+
estimatedHeight: measuredSegmentHeight,
|
|
16912
|
+
tableSegment: {
|
|
16913
|
+
startRowIndex,
|
|
16914
|
+
endRowIndex,
|
|
16915
|
+
repeatedHeaderRowCount,
|
|
16916
|
+
startRowCellBlockStarts: positionsToBlockIndexes(startCellPositions),
|
|
16917
|
+
endRowCellBlockEnds: splitEnds,
|
|
16918
|
+
startRowCellBlockPositions: hasPartialPositions(startCellPositions) ? startCellPositions : void 0,
|
|
16919
|
+
endRowCellBlockPositions: hasPartialPositions(splitEndPositions) ? splitEndPositions : void 0
|
|
16920
|
+
},
|
|
16921
|
+
sourceBlock
|
|
16922
|
+
};
|
|
16923
|
+
};
|
|
16924
|
+
const advanceCursor = (groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions) => {
|
|
16925
|
+
if (isLastRowSplit) {
|
|
16926
|
+
const lastRowIndex = rowGroups[groupEndIndex - 1].startRowIndex;
|
|
16927
|
+
const lastRow = sourceBlock.rows[lastRowIndex];
|
|
16928
|
+
const ends = splitEndPositions ?? (splitEnds == null ? void 0 : splitEnds.map((blockIndex) => ({ blockIndex }))) ?? [];
|
|
16929
|
+
if (positionsFinishedRow(lastRow, ends)) {
|
|
16930
|
+
currentCellBlockPositions = void 0;
|
|
16931
|
+
groupStartIndex = groupEndIndex;
|
|
16912
16932
|
} else {
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
startRowIndex,
|
|
16916
|
-
candidateEndRowIndex,
|
|
16917
|
-
repeatedHeaderRowCount,
|
|
16918
|
-
styles,
|
|
16919
|
-
contentWidth,
|
|
16920
|
-
measurer,
|
|
16921
|
-
defaultTabStop
|
|
16922
|
-
);
|
|
16923
|
-
}
|
|
16924
|
-
if (candidateHeight <= remainingHeight) {
|
|
16925
|
-
segmentHeight = candidateHeight;
|
|
16926
|
-
groupEndIndex += 1;
|
|
16927
|
-
continue;
|
|
16933
|
+
currentCellBlockPositions = ends;
|
|
16934
|
+
groupStartIndex = groupEndIndex - 1;
|
|
16928
16935
|
}
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16936
|
+
} else {
|
|
16937
|
+
currentCellBlockPositions = void 0;
|
|
16938
|
+
groupStartIndex = groupEndIndex;
|
|
16939
|
+
}
|
|
16940
|
+
};
|
|
16941
|
+
paginateSegments(track, sourceBlock.id, {
|
|
16942
|
+
hasMore: () => groupStartIndex < rowGroups.length,
|
|
16943
|
+
fit(segmentId, remaining) {
|
|
16944
|
+
const startRowIndex = rowGroups[groupStartIndex].startRowIndex;
|
|
16945
|
+
const repeatedHeaderRowCount = startRowIndex > 0 ? headerRowCount : 0;
|
|
16946
|
+
const startCellPositions = currentCellBlockPositions;
|
|
16947
|
+
let groupEndIndex = groupStartIndex;
|
|
16948
|
+
let segmentHeight = 0;
|
|
16949
|
+
let splitEnds;
|
|
16950
|
+
let splitEndPositions;
|
|
16951
|
+
let isLastRowSplit = false;
|
|
16952
|
+
while (groupEndIndex < rowGroups.length) {
|
|
16953
|
+
const candidateEndRowIndex = rowGroups[groupEndIndex].endRowIndexExclusive;
|
|
16954
|
+
let candidateHeight = 0;
|
|
16955
|
+
if (groupEndIndex === groupStartIndex && currentCellBlockPositions) {
|
|
16956
|
+
const firstRow2 = sourceBlock.rows[startRowIndex];
|
|
16945
16957
|
const starts = normalizeCellStartPositions(
|
|
16946
|
-
|
|
16947
|
-
|
|
16958
|
+
firstRow2,
|
|
16959
|
+
currentCellBlockPositions,
|
|
16948
16960
|
void 0
|
|
16949
16961
|
);
|
|
16950
|
-
const ends =
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
16962
|
+
const ends = firstRow2.cells.map((cell) => ({
|
|
16963
|
+
blockIndex: cell.blocks.length
|
|
16964
|
+
}));
|
|
16965
|
+
const slicedFirstRow = buildRowSliceFromPositions(
|
|
16966
|
+
firstRow2,
|
|
16967
|
+
starts,
|
|
16968
|
+
ends
|
|
16969
|
+
);
|
|
16970
|
+
candidateHeight = getTableSegmentHeight(
|
|
16971
|
+
{ ...sourceBlock, rows: [slicedFirstRow] },
|
|
16972
|
+
0,
|
|
16973
|
+
1,
|
|
16974
|
+
repeatedHeaderRowCount,
|
|
16975
|
+
styles,
|
|
16976
|
+
contentWidth,
|
|
16977
|
+
measurer,
|
|
16978
|
+
defaultTabStop
|
|
16979
|
+
);
|
|
16980
|
+
} else {
|
|
16981
|
+
candidateHeight = getTableSegmentHeight(
|
|
16982
|
+
sourceBlock,
|
|
16983
|
+
startRowIndex,
|
|
16984
|
+
candidateEndRowIndex,
|
|
16985
|
+
repeatedHeaderRowCount,
|
|
16986
|
+
styles,
|
|
16987
|
+
contentWidth,
|
|
16988
|
+
measurer,
|
|
16989
|
+
defaultTabStop
|
|
16963
16990
|
);
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16991
|
+
}
|
|
16992
|
+
if (candidateHeight <= remaining) {
|
|
16993
|
+
segmentHeight = candidateHeight;
|
|
16994
|
+
groupEndIndex += 1;
|
|
16995
|
+
continue;
|
|
16996
|
+
}
|
|
16997
|
+
const isSingleRowGroup = candidateEndRowIndex === rowGroups[groupEndIndex].startRowIndex + 1;
|
|
16998
|
+
const targetRow = sourceBlock.rows[rowGroups[groupEndIndex].startRowIndex];
|
|
16999
|
+
const isSplitCandidate = isSingleRowGroup && canSplitTableRow(targetRow);
|
|
17000
|
+
if (isSplitCandidate) {
|
|
17001
|
+
const precedingHeight = groupEndIndex > groupStartIndex ? getTableSegmentHeight(
|
|
17002
|
+
sourceBlock,
|
|
17003
|
+
startRowIndex,
|
|
17004
|
+
rowGroups[groupEndIndex].startRowIndex,
|
|
17005
|
+
repeatedHeaderRowCount,
|
|
17006
|
+
styles,
|
|
17007
|
+
contentWidth,
|
|
17008
|
+
measurer,
|
|
17009
|
+
defaultTabStop
|
|
17010
|
+
) : 0;
|
|
17011
|
+
const availableForSplitRow = remaining - precedingHeight;
|
|
17012
|
+
if (availableForSplitRow > 0) {
|
|
17013
|
+
const starts = normalizeCellStartPositions(
|
|
16969
17014
|
targetRow,
|
|
16970
|
-
|
|
16971
|
-
|
|
17015
|
+
groupEndIndex === groupStartIndex ? currentCellBlockPositions : void 0,
|
|
17016
|
+
void 0
|
|
16972
17017
|
);
|
|
16973
|
-
const
|
|
16974
|
-
|
|
16975
|
-
|
|
17018
|
+
const ends = targetRow.cells.map(
|
|
17019
|
+
(_, cellIdx) => findCellSplitEndPosition(
|
|
17020
|
+
targetRow,
|
|
17021
|
+
cellIdx,
|
|
17022
|
+
starts[cellIdx] ?? { blockIndex: 0 },
|
|
17023
|
+
availableForSplitRow,
|
|
17024
|
+
styles,
|
|
17025
|
+
measurer,
|
|
17026
|
+
defaultTabStop,
|
|
17027
|
+
contentWidth,
|
|
17028
|
+
sourceBlock,
|
|
16976
17029
|
rowGroups[groupEndIndex].startRowIndex
|
|
16977
|
-
)
|
|
16978
|
-
slicedLastRow
|
|
16979
|
-
];
|
|
16980
|
-
segmentHeight = getTableSegmentHeight(
|
|
16981
|
-
{ ...sourceBlock, rows: segmentRows },
|
|
16982
|
-
0,
|
|
16983
|
-
segmentRows.length,
|
|
16984
|
-
repeatedHeaderRowCount,
|
|
16985
|
-
styles,
|
|
16986
|
-
contentWidth,
|
|
16987
|
-
measurer,
|
|
16988
|
-
defaultTabStop
|
|
17030
|
+
)
|
|
16989
17031
|
);
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
17032
|
+
if (positionsProgressed(starts, ends)) {
|
|
17033
|
+
splitEnds = positionsToBlockIndexes(ends);
|
|
17034
|
+
isLastRowSplit = true;
|
|
17035
|
+
const slicedLastRow = buildRowSliceFromPositions(
|
|
17036
|
+
targetRow,
|
|
17037
|
+
starts,
|
|
17038
|
+
ends
|
|
17039
|
+
);
|
|
17040
|
+
const segmentRows = [
|
|
17041
|
+
...sourceBlock.rows.slice(
|
|
17042
|
+
startRowIndex,
|
|
17043
|
+
rowGroups[groupEndIndex].startRowIndex
|
|
17044
|
+
),
|
|
17045
|
+
slicedLastRow
|
|
17046
|
+
];
|
|
17047
|
+
segmentHeight = getTableSegmentHeight(
|
|
17048
|
+
{ ...sourceBlock, rows: segmentRows },
|
|
17049
|
+
0,
|
|
17050
|
+
segmentRows.length,
|
|
17051
|
+
repeatedHeaderRowCount,
|
|
17052
|
+
styles,
|
|
17053
|
+
contentWidth,
|
|
17054
|
+
measurer,
|
|
17055
|
+
defaultTabStop
|
|
17056
|
+
);
|
|
17057
|
+
splitEndPositions = ends;
|
|
17058
|
+
groupEndIndex += 1;
|
|
17059
|
+
break;
|
|
17060
|
+
}
|
|
16993
17061
|
}
|
|
16994
17062
|
}
|
|
17063
|
+
break;
|
|
16995
17064
|
}
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17065
|
+
if (groupEndIndex === groupStartIndex) return null;
|
|
17066
|
+
const block = buildTableBlock(
|
|
17067
|
+
segmentId,
|
|
17068
|
+
startRowIndex,
|
|
17069
|
+
groupEndIndex,
|
|
17070
|
+
repeatedHeaderRowCount,
|
|
17071
|
+
segmentHeight,
|
|
17072
|
+
splitEnds,
|
|
17073
|
+
splitEndPositions,
|
|
17074
|
+
startCellPositions
|
|
17075
|
+
);
|
|
17076
|
+
advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
|
|
17077
|
+
return block;
|
|
17078
|
+
},
|
|
17079
|
+
force(segmentId) {
|
|
17080
|
+
const startRowIndex = rowGroups[groupStartIndex].startRowIndex;
|
|
17081
|
+
const repeatedHeaderRowCount = startRowIndex > 0 ? headerRowCount : 0;
|
|
17082
|
+
const startCellPositions = currentCellBlockPositions;
|
|
17083
|
+
let groupEndIndex = groupStartIndex;
|
|
17084
|
+
let segmentHeight = 0;
|
|
17085
|
+
let splitEnds;
|
|
17086
|
+
let splitEndPositions;
|
|
17087
|
+
let isLastRowSplit = false;
|
|
17003
17088
|
const targetRow = sourceBlock.rows[startRowIndex];
|
|
17004
17089
|
const isSingleRowGroup = rowGroups[groupStartIndex].endRowIndexExclusive === startRowIndex + 1;
|
|
17005
17090
|
const isSplitCandidate = isSingleRowGroup && canSplitTableRow(targetRow);
|
|
@@ -17034,11 +17119,7 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
17034
17119
|
splitEnds = positionsToBlockIndexes(ends);
|
|
17035
17120
|
splitEndPositions = ends;
|
|
17036
17121
|
isLastRowSplit = true;
|
|
17037
|
-
const slicedLastRow = buildRowSliceFromPositions(
|
|
17038
|
-
targetRow,
|
|
17039
|
-
starts,
|
|
17040
|
-
ends
|
|
17041
|
-
);
|
|
17122
|
+
const slicedLastRow = buildRowSliceFromPositions(targetRow, starts, ends);
|
|
17042
17123
|
segmentHeight = getTableSegmentHeight(
|
|
17043
17124
|
{ ...sourceBlock, rows: [slicedLastRow] },
|
|
17044
17125
|
0,
|
|
@@ -17063,53 +17144,20 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
17063
17144
|
defaultTabStop
|
|
17064
17145
|
);
|
|
17065
17146
|
}
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
const measuredSegmentHeight = (measuredHeights == null ? void 0 : measuredHeights[segmentId]) ?? segmentHeight;
|
|
17069
|
-
const endRowIndex = rowGroups[groupEndIndex - 1].endRowIndexExclusive;
|
|
17070
|
-
track.blocks.push({
|
|
17071
|
-
blockId: segmentId,
|
|
17072
|
-
sourceBlockId: sourceBlock.id,
|
|
17073
|
-
blockType: sourceBlock.type,
|
|
17074
|
-
globalIndex: index,
|
|
17075
|
-
estimatedHeight: measuredSegmentHeight,
|
|
17076
|
-
tableSegment: {
|
|
17147
|
+
const block = buildTableBlock(
|
|
17148
|
+
segmentId,
|
|
17077
17149
|
startRowIndex,
|
|
17078
|
-
|
|
17150
|
+
groupEndIndex,
|
|
17079
17151
|
repeatedHeaderRowCount,
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
endRowCellBlockPositions: hasPartialPositions(splitEndPositions) ? splitEndPositions : void 0
|
|
17088
|
-
},
|
|
17089
|
-
sourceBlock
|
|
17090
|
-
});
|
|
17091
|
-
track.height += measuredSegmentHeight;
|
|
17092
|
-
segmentIndex += 1;
|
|
17093
|
-
if (isLastRowSplit) {
|
|
17094
|
-
const lastRowIndex = rowGroups[groupEndIndex - 1].startRowIndex;
|
|
17095
|
-
const lastRow = sourceBlock.rows[lastRowIndex];
|
|
17096
|
-
const ends = splitEndPositions ?? (splitEnds == null ? void 0 : splitEnds.map((blockIndex) => ({ blockIndex }))) ?? [];
|
|
17097
|
-
const isFinished = positionsFinishedRow(lastRow, ends);
|
|
17098
|
-
if (isFinished) {
|
|
17099
|
-
currentCellBlockPositions = void 0;
|
|
17100
|
-
groupStartIndex = groupEndIndex;
|
|
17101
|
-
} else {
|
|
17102
|
-
currentCellBlockPositions = ends;
|
|
17103
|
-
groupStartIndex = groupEndIndex - 1;
|
|
17104
|
-
}
|
|
17105
|
-
} else {
|
|
17106
|
-
currentCellBlockPositions = void 0;
|
|
17107
|
-
groupStartIndex = groupEndIndex;
|
|
17108
|
-
}
|
|
17109
|
-
if (groupStartIndex < rowGroups.length) {
|
|
17110
|
-
track.flush();
|
|
17152
|
+
segmentHeight,
|
|
17153
|
+
splitEnds,
|
|
17154
|
+
splitEndPositions,
|
|
17155
|
+
startCellPositions
|
|
17156
|
+
);
|
|
17157
|
+
advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
|
|
17158
|
+
return block;
|
|
17111
17159
|
}
|
|
17112
|
-
}
|
|
17160
|
+
});
|
|
17113
17161
|
}
|
|
17114
17162
|
function projectBlocksLayout(context2) {
|
|
17115
17163
|
const columns = context2.pageSettings.columns;
|
|
@@ -17519,6 +17567,19 @@ function applyCanvasTextFeatureHints(ctx, styles, fontSizePx) {
|
|
|
17519
17567
|
featureCtx.textRendering = (styles == null ? void 0 : styles.ligatures) && styles.ligatures !== "none" ? "optimizeLegibility" : "optimizeSpeed";
|
|
17520
17568
|
}
|
|
17521
17569
|
}
|
|
17570
|
+
function resolveCanvasRunPaintStyle(styles) {
|
|
17571
|
+
const fontSize = (styles == null ? void 0 : styles.fontSize) ?? DEFAULT_FONT_SIZE_PX;
|
|
17572
|
+
const fontFamily = resolveCanvasFontFamily(styles == null ? void 0 : styles.fontFamily);
|
|
17573
|
+
const fontWeight = (styles == null ? void 0 : styles.bold) ? "700" : "400";
|
|
17574
|
+
const fontStyle = (styles == null ? void 0 : styles.italic) ? "italic" : "normal";
|
|
17575
|
+
const renderMetrics = resolveCanvasTextRenderMetrics(styles, fontSize);
|
|
17576
|
+
return {
|
|
17577
|
+
font: `${fontStyle} ${fontWeight} ${renderMetrics.fontSize}px ${fontFamily}`,
|
|
17578
|
+
fillStyle: (styles == null ? void 0 : styles.color) ?? "#000000",
|
|
17579
|
+
renderMetrics,
|
|
17580
|
+
scale: (styles == null ? void 0 : styles.characterScale) && styles.characterScale > 0 ? styles.characterScale / 100 : 1
|
|
17581
|
+
};
|
|
17582
|
+
}
|
|
17522
17583
|
function resolveVerticalMode(direction) {
|
|
17523
17584
|
switch (direction) {
|
|
17524
17585
|
case "tbRl":
|
|
@@ -17649,10 +17710,8 @@ function layoutStackedGlyphs(paragraph, state, box, startColumn, columnsRtl = tr
|
|
|
17649
17710
|
state.document.styles
|
|
17650
17711
|
);
|
|
17651
17712
|
const fontSize = styles.fontSize ?? DEFAULT_FONT_SIZE_PX;
|
|
17652
|
-
const
|
|
17713
|
+
const { font, fillStyle: color } = resolveCanvasRunPaintStyle(styles);
|
|
17653
17714
|
const glyphHeight = fontSize * STACK_LINE_FACTOR;
|
|
17654
|
-
const font = `${styles.italic ? "italic" : "normal"} ${styles.bold ? "700" : "400"} ${metrics.fontSize}px ${resolveCanvasFontFamily(styles.fontFamily)}`;
|
|
17655
|
-
const color = styles.color ?? "#000000";
|
|
17656
17715
|
for (const char of run.text) {
|
|
17657
17716
|
if (char === "\n") {
|
|
17658
17717
|
newColumn();
|
|
@@ -20490,13 +20549,10 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20490
20549
|
(_b = paragraph.style) == null ? void 0 : _b.styleId,
|
|
20491
20550
|
state.document.styles
|
|
20492
20551
|
);
|
|
20493
|
-
const
|
|
20494
|
-
const prefixWeight = prefixStyles.bold ? "700" : "400";
|
|
20495
|
-
const prefixStyle = prefixStyles.italic ? "italic" : "normal";
|
|
20496
|
-
const prefixFamily = resolveCanvasFontFamily(prefixStyles.fontFamily);
|
|
20552
|
+
const { font: prefixFont, fillStyle: prefixFillStyle } = resolveCanvasRunPaintStyle(prefixStyles);
|
|
20497
20553
|
ctx.save();
|
|
20498
|
-
ctx.font =
|
|
20499
|
-
ctx.fillStyle =
|
|
20554
|
+
ctx.font = prefixFont;
|
|
20555
|
+
ctx.fillStyle = prefixFillStyle;
|
|
20500
20556
|
const first = line.slots[0];
|
|
20501
20557
|
const gap = ctx.measureText(`${listPrefix} `).width;
|
|
20502
20558
|
const labelInset = getListLabelInset(paragraph, state.document.styles);
|
|
@@ -20524,12 +20580,9 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20524
20580
|
const metricFamily = resolveMetricCompatibleFamily(
|
|
20525
20581
|
styles.fontFamily ?? "Calibri"
|
|
20526
20582
|
);
|
|
20527
|
-
const
|
|
20528
|
-
const fontWeight = styles.bold ? "700" : "400";
|
|
20529
|
-
const fontStyle = styles.italic ? "italic" : "normal";
|
|
20530
|
-
const renderMetrics = resolveCanvasTextRenderMetrics(styles, fontSize);
|
|
20583
|
+
const { font, renderMetrics } = resolveCanvasRunPaintStyle(styles);
|
|
20531
20584
|
ctx.save();
|
|
20532
|
-
ctx.font =
|
|
20585
|
+
ctx.font = font;
|
|
20533
20586
|
applyCanvasTextFeatureHints(ctx, styles, fontSize);
|
|
20534
20587
|
logCanvasFontUse({
|
|
20535
20588
|
requestedFamily: styles.fontFamily,
|
|
@@ -20698,18 +20751,10 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20698
20751
|
state.document.styles
|
|
20699
20752
|
);
|
|
20700
20753
|
if (!styles.hidden) {
|
|
20701
|
-
const
|
|
20702
|
-
const fontFamily = resolveCanvasFontFamily(styles.fontFamily);
|
|
20703
|
-
const fontWeight = styles.bold ? "700" : "400";
|
|
20704
|
-
const fontStyle = styles.italic ? "italic" : "normal";
|
|
20705
|
-
const renderMetrics = resolveCanvasTextRenderMetrics(
|
|
20706
|
-
styles,
|
|
20707
|
-
fontSize
|
|
20708
|
-
);
|
|
20709
|
-
const scale = styles.characterScale && styles.characterScale > 0 ? styles.characterScale / 100 : 1;
|
|
20754
|
+
const { font, fillStyle, renderMetrics, scale } = resolveCanvasRunPaintStyle(styles);
|
|
20710
20755
|
ctx.save();
|
|
20711
|
-
ctx.font =
|
|
20712
|
-
ctx.fillStyle =
|
|
20756
|
+
ctx.font = font;
|
|
20757
|
+
ctx.fillStyle = fillStyle;
|
|
20713
20758
|
drawStyledText(
|
|
20714
20759
|
ctx,
|
|
20715
20760
|
"-",
|
|
@@ -21248,18 +21293,14 @@ function drawDropCapForParagraph(options) {
|
|
|
21248
21293
|
return;
|
|
21249
21294
|
}
|
|
21250
21295
|
const style2 = dropCap.style;
|
|
21251
|
-
const
|
|
21252
|
-
const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? fontSize;
|
|
21253
|
-
const renderMetrics = resolveCanvasTextRenderMetrics(style2, fontSize);
|
|
21254
|
-
const fontWeight = (style2 == null ? void 0 : style2.bold) ? "700" : "400";
|
|
21255
|
-
const fontStyle = (style2 == null ? void 0 : style2.italic) ? "italic" : "normal";
|
|
21256
|
-
const fontFamily = resolveCanvasFontFamily(style2 == null ? void 0 : style2.fontFamily);
|
|
21296
|
+
const { font, fillStyle, renderMetrics } = resolveCanvasRunPaintStyle(style2);
|
|
21297
|
+
const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? ((style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX);
|
|
21257
21298
|
const glyphWidth = measureDropCapWidth(dropCap);
|
|
21258
21299
|
const x = dropCap.type === "margin" ? originX - glyphWidth : originX;
|
|
21259
21300
|
const baselineY = paragraphTop + (dropCap.lines - 0.2) * bodyLineHeight + renderMetrics.baselineOffset;
|
|
21260
21301
|
ctx.save();
|
|
21261
|
-
ctx.font =
|
|
21262
|
-
ctx.fillStyle =
|
|
21302
|
+
ctx.font = font;
|
|
21303
|
+
ctx.fillStyle = fillStyle;
|
|
21263
21304
|
ctx.textBaseline = "alphabetic";
|
|
21264
21305
|
ctx.fillText(dropCap.text, x, baselineY);
|
|
21265
21306
|
ctx.restore();
|
|
@@ -33465,6 +33506,28 @@ function parseParagraphStyle$1(paragraphProperties, colors) {
|
|
|
33465
33506
|
}
|
|
33466
33507
|
return emptyOrUndefined(style2);
|
|
33467
33508
|
}
|
|
33509
|
+
const TABLE_CONDITIONAL_FLAG_ATTRIBUTES = [
|
|
33510
|
+
["firstRow", "firstRow"],
|
|
33511
|
+
["lastRow", "lastRow"],
|
|
33512
|
+
["firstColumn", "firstCol"],
|
|
33513
|
+
["lastColumn", "lastCol"],
|
|
33514
|
+
["oddVBand", "band1Vert"],
|
|
33515
|
+
["evenVBand", "band2Vert"],
|
|
33516
|
+
["oddHBand", "band1Horz"],
|
|
33517
|
+
["evenHBand", "band2Horz"],
|
|
33518
|
+
["firstRowFirstColumn", "nwCell"],
|
|
33519
|
+
["firstRowLastColumn", "neCell"],
|
|
33520
|
+
["lastRowFirstColumn", "swCell"],
|
|
33521
|
+
["lastRowLastColumn", "seCell"]
|
|
33522
|
+
];
|
|
33523
|
+
const TABLE_BORDER_EDGE_KEYS = [
|
|
33524
|
+
["top", "borderTop"],
|
|
33525
|
+
["left", "borderLeft"],
|
|
33526
|
+
["bottom", "borderBottom"],
|
|
33527
|
+
["right", "borderRight"],
|
|
33528
|
+
["insideH", "borderInsideH"],
|
|
33529
|
+
["insideV", "borderInsideV"]
|
|
33530
|
+
];
|
|
33468
33531
|
function parseDocxWidthValue(element) {
|
|
33469
33532
|
if (!element) {
|
|
33470
33533
|
return void 0;
|
|
@@ -33492,23 +33555,9 @@ function parsePositiveIntegerProperty(parent, localName) {
|
|
|
33492
33555
|
function parseTableConditionalFlags(properties) {
|
|
33493
33556
|
const element = getFirstChildByTagNameNS(properties, WORD_NS, "cnfStyle");
|
|
33494
33557
|
if (!element) return void 0;
|
|
33495
|
-
const names = [
|
|
33496
|
-
["firstRow", "firstRow"],
|
|
33497
|
-
["lastRow", "lastRow"],
|
|
33498
|
-
["firstColumn", "firstCol"],
|
|
33499
|
-
["lastColumn", "lastCol"],
|
|
33500
|
-
["oddVBand", "band1Vert"],
|
|
33501
|
-
["evenVBand", "band2Vert"],
|
|
33502
|
-
["oddHBand", "band1Horz"],
|
|
33503
|
-
["evenHBand", "band2Horz"],
|
|
33504
|
-
["firstRowFirstColumn", "nwCell"],
|
|
33505
|
-
["firstRowLastColumn", "neCell"],
|
|
33506
|
-
["lastRowFirstColumn", "swCell"],
|
|
33507
|
-
["lastRowLastColumn", "seCell"]
|
|
33508
|
-
];
|
|
33509
33558
|
const rawBits = getAttributeValue(element, "val") ?? "";
|
|
33510
33559
|
const flags = {};
|
|
33511
|
-
|
|
33560
|
+
TABLE_CONDITIONAL_FLAG_ATTRIBUTES.forEach(([attribute, key], index) => {
|
|
33512
33561
|
const explicit = getAttributeValue(element, attribute);
|
|
33513
33562
|
if (explicit === "1" || explicit === "true" || explicit === "on") {
|
|
33514
33563
|
flags[key] = true;
|
|
@@ -36959,7 +37008,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
36959
37008
|
const worker = new Worker(
|
|
36960
37009
|
new URL(
|
|
36961
37010
|
/* @vite-ignore */
|
|
36962
|
-
"" + new URL("assets/importDocxWorker-
|
|
37011
|
+
"" + new URL("assets/importDocxWorker-Bz2kZOBO.js", import.meta.url).href,
|
|
36963
37012
|
import.meta.url
|
|
36964
37013
|
),
|
|
36965
37014
|
{
|
|
@@ -42617,7 +42666,7 @@ export {
|
|
|
42617
42666
|
resolveImageSrc as Z,
|
|
42618
42667
|
listKindForTag as _,
|
|
42619
42668
|
getPageContentWidth as a,
|
|
42620
|
-
|
|
42669
|
+
getPresetPathSegments as a$,
|
|
42621
42670
|
collectInlineRuns as a0,
|
|
42622
42671
|
parseParagraphStyle as a1,
|
|
42623
42672
|
getRunImage as a2,
|
|
@@ -42633,28 +42682,28 @@ export {
|
|
|
42633
42682
|
PX_PER_INCH as aC,
|
|
42634
42683
|
TWIPS_PER_INCH as aD,
|
|
42635
42684
|
normalizeHex6 as aE,
|
|
42636
|
-
|
|
42637
|
-
|
|
42638
|
-
|
|
42639
|
-
|
|
42640
|
-
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42644
|
-
|
|
42645
|
-
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42653
|
-
|
|
42654
|
-
|
|
42655
|
-
|
|
42656
|
-
|
|
42657
|
-
|
|
42685
|
+
TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aF,
|
|
42686
|
+
TABLE_BORDER_EDGE_KEYS as aG,
|
|
42687
|
+
resolveEffectiveParagraphStyle as aH,
|
|
42688
|
+
resolveEffectiveTextStyleForParagraph as aI,
|
|
42689
|
+
EMU_PER_PT as aJ,
|
|
42690
|
+
OOXML_ROTATION_UNITS as aK,
|
|
42691
|
+
OOXML_PERCENT_DENOMINATOR as aL,
|
|
42692
|
+
parseHexColorToRgb255 as aM,
|
|
42693
|
+
EMU_PER_PX as aN,
|
|
42694
|
+
getRunFootnoteReference as aO,
|
|
42695
|
+
getRunEndnoteReference as aP,
|
|
42696
|
+
iterateFootnoteReferenceRuns as aQ,
|
|
42697
|
+
iterateEndnoteReferenceRuns as aR,
|
|
42698
|
+
imageContentTypeDefaults as aS,
|
|
42699
|
+
getRunFieldChar as aT,
|
|
42700
|
+
getRunFieldInstruction as aU,
|
|
42701
|
+
createEditorRun as aV,
|
|
42702
|
+
JSZip as aW,
|
|
42703
|
+
imageExtensionFromMime as aX,
|
|
42704
|
+
pxToPt as aY,
|
|
42705
|
+
resolveFloatingObjectRect as aZ,
|
|
42706
|
+
getTextBoxFloatingGeometry as a_,
|
|
42658
42707
|
CaretOverlay as aa,
|
|
42659
42708
|
Show as ab,
|
|
42660
42709
|
createRenderEffect as ac,
|
|
@@ -42663,13 +42712,13 @@ export {
|
|
|
42663
42712
|
setStyleProperty as af,
|
|
42664
42713
|
memo as ag,
|
|
42665
42714
|
template as ah,
|
|
42666
|
-
|
|
42667
|
-
|
|
42668
|
-
|
|
42669
|
-
|
|
42670
|
-
|
|
42671
|
-
|
|
42672
|
-
|
|
42715
|
+
addEventListener as ai,
|
|
42716
|
+
insert as aj,
|
|
42717
|
+
delegateEvents as ak,
|
|
42718
|
+
useI18n as al,
|
|
42719
|
+
createEffect as am,
|
|
42720
|
+
use as an,
|
|
42721
|
+
Dialog as ao,
|
|
42673
42722
|
className as ap,
|
|
42674
42723
|
For as aq,
|
|
42675
42724
|
UNDERLINE_STYLE_OPTIONS as ar,
|
|
@@ -42682,133 +42731,135 @@ export {
|
|
|
42682
42731
|
setPreciseFontPreference as ay,
|
|
42683
42732
|
setWelcomeSeen as az,
|
|
42684
42733
|
getPageBodyTop as b,
|
|
42685
|
-
|
|
42686
|
-
|
|
42687
|
-
|
|
42688
|
-
|
|
42689
|
-
|
|
42690
|
-
|
|
42691
|
-
|
|
42692
|
-
|
|
42693
|
-
|
|
42694
|
-
|
|
42695
|
-
|
|
42696
|
-
|
|
42697
|
-
|
|
42698
|
-
|
|
42699
|
-
|
|
42700
|
-
|
|
42701
|
-
|
|
42702
|
-
|
|
42703
|
-
|
|
42704
|
-
|
|
42705
|
-
|
|
42706
|
-
|
|
42707
|
-
|
|
42708
|
-
|
|
42709
|
-
|
|
42710
|
-
|
|
42711
|
-
|
|
42712
|
-
|
|
42713
|
-
|
|
42714
|
-
|
|
42715
|
-
|
|
42716
|
-
|
|
42717
|
-
|
|
42718
|
-
|
|
42719
|
-
|
|
42720
|
-
|
|
42721
|
-
|
|
42722
|
-
|
|
42723
|
-
|
|
42724
|
-
|
|
42725
|
-
|
|
42726
|
-
|
|
42727
|
-
|
|
42728
|
-
|
|
42729
|
-
|
|
42730
|
-
|
|
42731
|
-
|
|
42732
|
-
|
|
42733
|
-
|
|
42734
|
-
|
|
42735
|
-
|
|
42736
|
-
|
|
42737
|
-
|
|
42738
|
-
|
|
42739
|
-
|
|
42740
|
-
|
|
42741
|
-
|
|
42742
|
-
|
|
42743
|
-
|
|
42744
|
-
|
|
42745
|
-
|
|
42746
|
-
|
|
42747
|
-
|
|
42748
|
-
|
|
42734
|
+
createFootnoteReferenceRun as b$,
|
|
42735
|
+
buildListLabels as b0,
|
|
42736
|
+
getImageFloatingGeometry as b1,
|
|
42737
|
+
textStyleToFontSizePt as b2,
|
|
42738
|
+
PX_PER_POINT as b3,
|
|
42739
|
+
DEFAULT_FONT_SIZE_PX as b4,
|
|
42740
|
+
resolveOpenTypeFeatureTags as b5,
|
|
42741
|
+
rgb255ToHex as b6,
|
|
42742
|
+
isDoubleUnderlineStyle as b7,
|
|
42743
|
+
isWavyUnderlineStyle as b8,
|
|
42744
|
+
underlineStyleLineWidthPx as b9,
|
|
42745
|
+
getDocumentParagraphs as bA,
|
|
42746
|
+
getDocumentPageSettings as bB,
|
|
42747
|
+
getTableCellContentWidthForParagraph as bC,
|
|
42748
|
+
layoutMetricsEpoch as bD,
|
|
42749
|
+
bumpLayoutMetricsEpoch as bE,
|
|
42750
|
+
createCanvasLayoutSnapshotProvider as bF,
|
|
42751
|
+
on as bG,
|
|
42752
|
+
debounce as bH,
|
|
42753
|
+
unwrap as bI,
|
|
42754
|
+
perfTimer as bJ,
|
|
42755
|
+
getRunTextBox as bK,
|
|
42756
|
+
createEditorDocument as bL,
|
|
42757
|
+
resolveResizedDimensions as bM,
|
|
42758
|
+
resolveTextBoxRenderHeight as bN,
|
|
42759
|
+
getToolbarStyleState as bO,
|
|
42760
|
+
getCachedCanvasImage as bP,
|
|
42761
|
+
measureParagraphMinContentWidthPx as bQ,
|
|
42762
|
+
getEditableBlocksForZone as bR,
|
|
42763
|
+
findParagraphLocation as bS,
|
|
42764
|
+
createSectionBoundaryParagraph as bT,
|
|
42765
|
+
normalizePageSettings as bU,
|
|
42766
|
+
DEFAULT_EDITOR_PAGE_SETTINGS as bV,
|
|
42767
|
+
markStart as bW,
|
|
42768
|
+
markEnd as bX,
|
|
42769
|
+
getParagraphEntries as bY,
|
|
42770
|
+
getParagraphById as bZ,
|
|
42771
|
+
createEditorFootnote as b_,
|
|
42772
|
+
underlineStyleDashArray as ba,
|
|
42773
|
+
resolveListLabel as bb,
|
|
42774
|
+
getListLabelInset as bc,
|
|
42775
|
+
getAlignedListLabelInset as bd,
|
|
42776
|
+
getParagraphBorderInsets as be,
|
|
42777
|
+
buildSegmentTable as bf,
|
|
42778
|
+
buildCanvasTableLayout as bg,
|
|
42779
|
+
resolveCanvasTableWidth as bh,
|
|
42780
|
+
resolveFloatingTableRect as bi,
|
|
42781
|
+
normalizeFamily as bj,
|
|
42782
|
+
ROBOTO_FONT_FILES as bk,
|
|
42783
|
+
loadFontAsset as bl,
|
|
42784
|
+
OFFICE_COMPAT_FONT_FAMILIES as bm,
|
|
42785
|
+
BinaryReader as bn,
|
|
42786
|
+
buildSfnt as bo,
|
|
42787
|
+
defaultFontDecoderRegistry as bp,
|
|
42788
|
+
SfntFontProgram as bq,
|
|
42789
|
+
collectPdfFontFamilies as br,
|
|
42790
|
+
outlineFrom as bs,
|
|
42791
|
+
getPageHeaderZoneTop as bt,
|
|
42792
|
+
getPageColumnRects as bu,
|
|
42793
|
+
findFootnoteReference as bv,
|
|
42794
|
+
FOOTNOTE_MARKER_GUTTER_PX as bw,
|
|
42795
|
+
resolveImporterForFile as bx,
|
|
42796
|
+
getDocumentSectionsCanonical as by,
|
|
42797
|
+
getDocumentParagraphsCanonical as bz,
|
|
42749
42798
|
getPageBodyBottom as c,
|
|
42750
|
-
|
|
42751
|
-
|
|
42752
|
-
|
|
42753
|
-
|
|
42754
|
-
|
|
42755
|
-
|
|
42756
|
-
|
|
42757
|
-
|
|
42758
|
-
|
|
42759
|
-
|
|
42760
|
-
|
|
42761
|
-
|
|
42762
|
-
|
|
42763
|
-
|
|
42764
|
-
|
|
42765
|
-
|
|
42766
|
-
|
|
42767
|
-
|
|
42768
|
-
|
|
42769
|
-
|
|
42770
|
-
|
|
42771
|
-
|
|
42772
|
-
|
|
42773
|
-
|
|
42774
|
-
|
|
42775
|
-
|
|
42776
|
-
|
|
42777
|
-
|
|
42778
|
-
|
|
42779
|
-
|
|
42780
|
-
|
|
42781
|
-
|
|
42782
|
-
|
|
42783
|
-
|
|
42784
|
-
|
|
42785
|
-
|
|
42786
|
-
|
|
42787
|
-
|
|
42788
|
-
|
|
42789
|
-
|
|
42790
|
-
|
|
42791
|
-
|
|
42792
|
-
|
|
42793
|
-
|
|
42794
|
-
|
|
42795
|
-
|
|
42796
|
-
|
|
42797
|
-
|
|
42798
|
-
|
|
42799
|
-
|
|
42800
|
-
|
|
42801
|
-
|
|
42802
|
-
|
|
42803
|
-
|
|
42804
|
-
|
|
42805
|
-
|
|
42806
|
-
|
|
42807
|
-
|
|
42808
|
-
|
|
42809
|
-
|
|
42810
|
-
|
|
42811
|
-
|
|
42799
|
+
registerToolbarRenderer as c$,
|
|
42800
|
+
renumberFootnotes as c0,
|
|
42801
|
+
getHeadingLevel as c1,
|
|
42802
|
+
preciseFontModeVersion as c2,
|
|
42803
|
+
isPreciseFontModeEnabled as c3,
|
|
42804
|
+
resolveNamedTextStyle as c4,
|
|
42805
|
+
togglePreciseFontMode as c5,
|
|
42806
|
+
nextFontSizePt as c6,
|
|
42807
|
+
previousFontSizePt as c7,
|
|
42808
|
+
fontSizePtToPx as c8,
|
|
42809
|
+
createDefaultToolbarPreset as c9,
|
|
42810
|
+
GridPicker as cA,
|
|
42811
|
+
IconButton as cB,
|
|
42812
|
+
Menu as cC,
|
|
42813
|
+
OASIS_BUILTIN_COMMANDS as cD,
|
|
42814
|
+
OASIS_MENU_ITEMS as cE,
|
|
42815
|
+
OASIS_TOOLBAR_ITEMS as cF,
|
|
42816
|
+
OasisEditorAppLazy as cG,
|
|
42817
|
+
OasisEditorContainer as cH,
|
|
42818
|
+
PluginCollection as cI,
|
|
42819
|
+
Popover as cJ,
|
|
42820
|
+
RIBBON_TABS as cK,
|
|
42821
|
+
Select as cL,
|
|
42822
|
+
SelectField as cM,
|
|
42823
|
+
Separator as cN,
|
|
42824
|
+
SidePanel as cO,
|
|
42825
|
+
SidePanelBody as cP,
|
|
42826
|
+
SidePanelFooter as cQ,
|
|
42827
|
+
SidePanelHeader as cR,
|
|
42828
|
+
SplitButton as cS,
|
|
42829
|
+
StyleGallery as cT,
|
|
42830
|
+
TextField as cU,
|
|
42831
|
+
Button$1 as cV,
|
|
42832
|
+
buildRibbonTabDefinitions as cW,
|
|
42833
|
+
createEditorCommandBus as cX,
|
|
42834
|
+
createOasisEditor as cY,
|
|
42835
|
+
createOasisEditorContainer as cZ,
|
|
42836
|
+
mount as c_,
|
|
42837
|
+
MenuRegistry as ca,
|
|
42838
|
+
createToolbarRegistry as cb,
|
|
42839
|
+
Editor as cc,
|
|
42840
|
+
resolveCommandRef as cd,
|
|
42841
|
+
commandRefName as ce,
|
|
42842
|
+
createOasisEditorClient as cf,
|
|
42843
|
+
createEditorZoom as cg,
|
|
42844
|
+
startLongTaskObserver as ch,
|
|
42845
|
+
installGlobalReport as ci,
|
|
42846
|
+
applyStoredPreciseFontPreference as cj,
|
|
42847
|
+
getWelcomeSeen as ck,
|
|
42848
|
+
isLocalFontAccessSupported as cl,
|
|
42849
|
+
EDITOR_SCROLL_PADDING_PX as cm,
|
|
42850
|
+
Toolbar as cn,
|
|
42851
|
+
OasisEditorLoading as co,
|
|
42852
|
+
I18nProvider as cp,
|
|
42853
|
+
createTranslator as cq,
|
|
42854
|
+
createEditorLogger as cr,
|
|
42855
|
+
registerDomStatsSurface as cs,
|
|
42856
|
+
Button as ct,
|
|
42857
|
+
Checkbox as cu,
|
|
42858
|
+
ColorPicker as cv,
|
|
42859
|
+
CommandRegistry as cw,
|
|
42860
|
+
DEFAULT_PALETTE as cx,
|
|
42861
|
+
DialogFooter as cy,
|
|
42862
|
+
FloatingActionButton as cz,
|
|
42812
42863
|
domTextMeasurer as d,
|
|
42813
42864
|
estimateTableBlockHeight as e,
|
|
42814
42865
|
getFootnoteDisplayMarker as f,
|