oasis-editor 0.0.112 → 0.0.114
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-p9k7O_1i.js → OasisEditorApp-XloOiKSu.js} +982 -1284
- package/dist/app/controllers/tableOpsMutationCommands.d.ts +8 -1
- package/dist/assets/{importDocxWorker-Bz2kZOBO.js → importDocxWorker-D0F0jbcF.js} +1 -1
- package/dist/core/textStyleMappings.d.ts +2 -0
- package/dist/{index-AX7m_SeX.js → index-CwpzM--5.js} +708 -628
- 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/text/fonts/opentype/otLayoutCommon.d.ts +6 -0
- package/dist/ui/canvas/canvasBorders.d.ts +1 -0
- 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-XloOiKSu.js").then((m) => {
|
|
2543
2543
|
cancelled = true;
|
|
2544
2544
|
setProgress(1);
|
|
2545
2545
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -3057,6 +3057,88 @@ function createStore(...[store, options]) {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
return [wrappedStore, setStore];
|
|
3059
3059
|
}
|
|
3060
|
+
const $ROOT = Symbol("store-root");
|
|
3061
|
+
function applyState(target, parent, property, merge, key) {
|
|
3062
|
+
const previous = parent[property];
|
|
3063
|
+
if (target === previous) return;
|
|
3064
|
+
const isArray = Array.isArray(target);
|
|
3065
|
+
if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
|
|
3066
|
+
setProperty(parent, property, target);
|
|
3067
|
+
return;
|
|
3068
|
+
}
|
|
3069
|
+
if (isArray) {
|
|
3070
|
+
if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
|
|
3071
|
+
let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
|
|
3072
|
+
for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] && previous[start][key] === target[start][key]); start++) {
|
|
3073
|
+
applyState(target[start], previous, start, merge, key);
|
|
3074
|
+
}
|
|
3075
|
+
const temp = new Array(target.length), newIndices = /* @__PURE__ */ new Map();
|
|
3076
|
+
for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end] && target[newEnd] && previous[end][key] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
|
|
3077
|
+
temp[newEnd] = previous[end];
|
|
3078
|
+
}
|
|
3079
|
+
if (start > newEnd || start > end) {
|
|
3080
|
+
for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);
|
|
3081
|
+
for (; j < target.length; j++) {
|
|
3082
|
+
setProperty(previous, j, temp[j]);
|
|
3083
|
+
applyState(target[j], previous, j, merge, key);
|
|
3084
|
+
}
|
|
3085
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
3086
|
+
return;
|
|
3087
|
+
}
|
|
3088
|
+
newIndicesNext = new Array(newEnd + 1);
|
|
3089
|
+
for (j = newEnd; j >= start; j--) {
|
|
3090
|
+
item = target[j];
|
|
3091
|
+
keyVal = key && item ? item[key] : item;
|
|
3092
|
+
i = newIndices.get(keyVal);
|
|
3093
|
+
newIndicesNext[j] = i === void 0 ? -1 : i;
|
|
3094
|
+
newIndices.set(keyVal, j);
|
|
3095
|
+
}
|
|
3096
|
+
for (i = start; i <= end; i++) {
|
|
3097
|
+
item = previous[i];
|
|
3098
|
+
keyVal = key && item ? item[key] : item;
|
|
3099
|
+
j = newIndices.get(keyVal);
|
|
3100
|
+
if (j !== void 0 && j !== -1) {
|
|
3101
|
+
temp[j] = previous[i];
|
|
3102
|
+
j = newIndicesNext[j];
|
|
3103
|
+
newIndices.set(keyVal, j);
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
for (j = start; j < target.length; j++) {
|
|
3107
|
+
if (j in temp) {
|
|
3108
|
+
setProperty(previous, j, temp[j]);
|
|
3109
|
+
applyState(target[j], previous, j, merge, key);
|
|
3110
|
+
} else setProperty(previous, j, target[j]);
|
|
3111
|
+
}
|
|
3112
|
+
} else {
|
|
3113
|
+
for (let i = 0, len = target.length; i < len; i++) {
|
|
3114
|
+
applyState(target[i], previous, i, merge, key);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
3118
|
+
return;
|
|
3119
|
+
}
|
|
3120
|
+
const targetKeys = Object.keys(target);
|
|
3121
|
+
for (let i = 0, len = targetKeys.length; i < len; i++) {
|
|
3122
|
+
applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);
|
|
3123
|
+
}
|
|
3124
|
+
const previousKeys = Object.keys(previous);
|
|
3125
|
+
for (let i = 0, len = previousKeys.length; i < len; i++) {
|
|
3126
|
+
if (target[previousKeys[i]] === void 0) setProperty(previous, previousKeys[i], void 0);
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
function reconcile(value, options = {}) {
|
|
3130
|
+
const {
|
|
3131
|
+
merge,
|
|
3132
|
+
key = "id"
|
|
3133
|
+
} = options, v = unwrap(value);
|
|
3134
|
+
return (state) => {
|
|
3135
|
+
if (!isWrappable(state) || !isWrappable(v)) return v;
|
|
3136
|
+
const res = applyState(v, {
|
|
3137
|
+
[$ROOT]: state
|
|
3138
|
+
}, $ROOT, merge, key);
|
|
3139
|
+
return res === void 0 ? state : res;
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3060
3142
|
function assertNever(value, label = "value") {
|
|
3061
3143
|
const tag = value && typeof value === "object" && "type" in value ? value.type : value;
|
|
3062
3144
|
throw new Error(`Unhandled ${label}: ${String(tag)}`);
|
|
@@ -16271,6 +16353,30 @@ class PaginationTrack {
|
|
|
16271
16353
|
return this.pages;
|
|
16272
16354
|
}
|
|
16273
16355
|
}
|
|
16356
|
+
function paginateSegments(track, sourceId, segmenter) {
|
|
16357
|
+
var _a, _b;
|
|
16358
|
+
let segmentIndex = 0;
|
|
16359
|
+
while (segmenter.hasMore()) {
|
|
16360
|
+
const segmentId = `${sourceId}:segment:${segmentIndex}`;
|
|
16361
|
+
const remaining = track.currentMaxHeight - track.height;
|
|
16362
|
+
let block = segmenter.fit(segmentId, remaining);
|
|
16363
|
+
if (block === null && track.blocks.length > 0) {
|
|
16364
|
+
(_a = segmenter.onBeforeFlush) == null ? void 0 : _a.call(segmenter);
|
|
16365
|
+
track.flush();
|
|
16366
|
+
continue;
|
|
16367
|
+
}
|
|
16368
|
+
if (block === null) {
|
|
16369
|
+
block = segmenter.force(segmentId);
|
|
16370
|
+
}
|
|
16371
|
+
track.blocks.push(block);
|
|
16372
|
+
track.height += block.estimatedHeight;
|
|
16373
|
+
(_b = segmenter.onAfterPush) == null ? void 0 : _b.call(segmenter, block, segmentIndex);
|
|
16374
|
+
segmentIndex += 1;
|
|
16375
|
+
if (segmenter.hasMore()) {
|
|
16376
|
+
track.flush();
|
|
16377
|
+
}
|
|
16378
|
+
}
|
|
16379
|
+
}
|
|
16274
16380
|
const TEXT_BOX_AUTOFIT_SAFETY_PX$1 = 2;
|
|
16275
16381
|
const PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX = 1.5;
|
|
16276
16382
|
function registerParagraphFloatingExclusions(options) {
|
|
@@ -16457,93 +16563,13 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16457
16563
|
return;
|
|
16458
16564
|
}
|
|
16459
16565
|
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
|
-
}
|
|
16566
|
+
const buildSegmentBlock = (originalStart, lineEndIndex, segmentHeight, segmentId) => {
|
|
16540
16567
|
const segmentLayout = createParagraphSegmentLayout(
|
|
16541
16568
|
paragraphLayout,
|
|
16542
|
-
|
|
16569
|
+
originalStart,
|
|
16543
16570
|
lineEndIndex
|
|
16544
16571
|
);
|
|
16545
|
-
const
|
|
16546
|
-
const isWholeParagraphSegment = startLineIndex === 0 && lineEndIndex === paragraphLayout.lines.length;
|
|
16572
|
+
const isWholeParagraphSegment = originalStart === 0 && lineEndIndex === paragraphLayout.lines.length;
|
|
16547
16573
|
const rawMeasuredHeight = getParagraphMeasuredHeight(
|
|
16548
16574
|
measuredHeights,
|
|
16549
16575
|
sourceBlock.id,
|
|
@@ -16552,8 +16578,8 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16552
16578
|
segmentHeight
|
|
16553
16579
|
);
|
|
16554
16580
|
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
|
-
|
|
16581
|
+
const measuredHeight = collapseWithPrevious && originalStart === 0 && hasMeasuredHeight ? Math.max(0, rawMeasuredHeight - (paragraphStyle.spacingBefore ?? 0)) : rawMeasuredHeight;
|
|
16582
|
+
return {
|
|
16557
16583
|
blockId: segmentId,
|
|
16558
16584
|
sourceBlockId: sourceBlock.id,
|
|
16559
16585
|
blockType: sourceBlock.type,
|
|
@@ -16562,23 +16588,111 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
|
|
|
16562
16588
|
estimatedHeight: measuredHeight,
|
|
16563
16589
|
layout: segmentLayout,
|
|
16564
16590
|
sourceBlock
|
|
16565
|
-
}
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16576
|
-
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
|
|
16591
|
+
};
|
|
16592
|
+
};
|
|
16593
|
+
paginateSegments(track, sourceBlock.id, {
|
|
16594
|
+
hasMore: () => startLineIndex < paragraphLayout.lines.length,
|
|
16595
|
+
fit(segmentId, remaining) {
|
|
16596
|
+
const originalStart = startLineIndex;
|
|
16597
|
+
let lineEndIndex = originalStart;
|
|
16598
|
+
let segmentHeight = 0;
|
|
16599
|
+
while (lineEndIndex < paragraphLayout.lines.length) {
|
|
16600
|
+
const candidateLines = paragraphLayout.lines.slice(
|
|
16601
|
+
originalStart,
|
|
16602
|
+
lineEndIndex + 1
|
|
16603
|
+
);
|
|
16604
|
+
const candidateHeight = getParagraphSegmentHeight(
|
|
16605
|
+
sourceBlock,
|
|
16606
|
+
candidateLines,
|
|
16607
|
+
originalStart === 0,
|
|
16608
|
+
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16609
|
+
styles,
|
|
16610
|
+
!collapseWithPrevious
|
|
16611
|
+
);
|
|
16612
|
+
const candidateFitHeight = getParagraphSegmentFitHeight(
|
|
16613
|
+
sourceBlock,
|
|
16614
|
+
candidateHeight,
|
|
16615
|
+
lineEndIndex === paragraphLayout.lines.length - 1,
|
|
16616
|
+
styles
|
|
16617
|
+
);
|
|
16618
|
+
if (candidateFitHeight > remaining + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex === originalStart && track.blocks.length > 0) {
|
|
16619
|
+
break;
|
|
16620
|
+
}
|
|
16621
|
+
if (candidateFitHeight > remaining + PARAGRAPH_FIT_HEIGHT_TOLERANCE_PX && lineEndIndex > originalStart) {
|
|
16622
|
+
break;
|
|
16623
|
+
}
|
|
16624
|
+
segmentHeight = candidateHeight;
|
|
16625
|
+
lineEndIndex += 1;
|
|
16626
|
+
}
|
|
16627
|
+
if (lineEndIndex === originalStart) return null;
|
|
16628
|
+
if (lineEndIndex < paragraphLayout.lines.length) {
|
|
16629
|
+
const widowOrphanAdjusted = applyWidowOrphanControl(
|
|
16630
|
+
sourceBlock,
|
|
16631
|
+
paragraphLayout.lines,
|
|
16632
|
+
originalStart,
|
|
16633
|
+
lineEndIndex,
|
|
16634
|
+
styles,
|
|
16635
|
+
!collapseWithPrevious,
|
|
16636
|
+
true,
|
|
16637
|
+
track.blocks.length > 0
|
|
16638
|
+
);
|
|
16639
|
+
lineEndIndex = widowOrphanAdjusted.endLineIndexExclusive;
|
|
16640
|
+
segmentHeight = widowOrphanAdjusted.height;
|
|
16641
|
+
if (lineEndIndex === originalStart) return null;
|
|
16642
|
+
}
|
|
16643
|
+
const block = buildSegmentBlock(
|
|
16644
|
+
originalStart,
|
|
16645
|
+
lineEndIndex,
|
|
16646
|
+
segmentHeight,
|
|
16647
|
+
segmentId
|
|
16648
|
+
);
|
|
16649
|
+
startLineIndex = lineEndIndex;
|
|
16650
|
+
return block;
|
|
16651
|
+
},
|
|
16652
|
+
force(segmentId) {
|
|
16653
|
+
const originalStart = startLineIndex;
|
|
16654
|
+
const lineEndIndex = Math.min(
|
|
16655
|
+
paragraphLayout.lines.length,
|
|
16656
|
+
originalStart + 1
|
|
16657
|
+
);
|
|
16658
|
+
const segmentHeight = getParagraphSegmentHeight(
|
|
16659
|
+
sourceBlock,
|
|
16660
|
+
paragraphLayout.lines.slice(originalStart, lineEndIndex),
|
|
16661
|
+
originalStart === 0,
|
|
16662
|
+
lineEndIndex === paragraphLayout.lines.length,
|
|
16663
|
+
styles,
|
|
16664
|
+
!collapseWithPrevious
|
|
16665
|
+
);
|
|
16666
|
+
const block = buildSegmentBlock(
|
|
16667
|
+
originalStart,
|
|
16668
|
+
lineEndIndex,
|
|
16669
|
+
segmentHeight,
|
|
16670
|
+
segmentId
|
|
16671
|
+
);
|
|
16672
|
+
startLineIndex = lineEndIndex;
|
|
16673
|
+
return block;
|
|
16674
|
+
},
|
|
16675
|
+
onBeforeFlush() {
|
|
16676
|
+
if (contextualAdjustedPreviousBlock && contextualAdjustedAmount > 0) {
|
|
16677
|
+
contextualAdjustedPreviousBlock.estimatedHeight += contextualAdjustedAmount;
|
|
16678
|
+
track.height += contextualAdjustedAmount;
|
|
16679
|
+
contextualAdjustedPreviousBlock = void 0;
|
|
16680
|
+
contextualAdjustedAmount = 0;
|
|
16681
|
+
}
|
|
16682
|
+
collapseWithPrevious = false;
|
|
16683
|
+
},
|
|
16684
|
+
onAfterPush(block, si) {
|
|
16685
|
+
if (si === 0) {
|
|
16686
|
+
registerParagraphFloatingExclusions({
|
|
16687
|
+
track,
|
|
16688
|
+
layout: block.layout,
|
|
16689
|
+
blockTop: track.height - block.estimatedHeight + (paragraphStyle.spacingBefore ?? 0),
|
|
16690
|
+
params,
|
|
16691
|
+
resolveTextBoxHeight
|
|
16692
|
+
});
|
|
16693
|
+
}
|
|
16580
16694
|
}
|
|
16581
|
-
}
|
|
16695
|
+
});
|
|
16582
16696
|
}
|
|
16583
16697
|
function normalizeCellStartPositions(row, starts, legacyStarts) {
|
|
16584
16698
|
return row.cells.map((_, cellIdx) => {
|
|
@@ -16867,139 +16981,192 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
16867
16981
|
rowGroups
|
|
16868
16982
|
);
|
|
16869
16983
|
let groupStartIndex = 0;
|
|
16870
|
-
let segmentIndex = 0;
|
|
16871
16984
|
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
|
-
);
|
|
16985
|
+
const buildTableBlock = (segmentId, startRowIndex, groupEndIndex, repeatedHeaderRowCount, segmentHeight, splitEnds, splitEndPositions, startCellPositions) => {
|
|
16986
|
+
const endRowIndex = rowGroups[groupEndIndex - 1].endRowIndexExclusive;
|
|
16987
|
+
const measuredSegmentHeight = (measuredHeights == null ? void 0 : measuredHeights[segmentId]) ?? segmentHeight;
|
|
16988
|
+
return {
|
|
16989
|
+
blockId: segmentId,
|
|
16990
|
+
sourceBlockId: sourceBlock.id,
|
|
16991
|
+
blockType: sourceBlock.type,
|
|
16992
|
+
globalIndex: index,
|
|
16993
|
+
estimatedHeight: measuredSegmentHeight,
|
|
16994
|
+
tableSegment: {
|
|
16995
|
+
startRowIndex,
|
|
16996
|
+
endRowIndex,
|
|
16997
|
+
repeatedHeaderRowCount,
|
|
16998
|
+
startRowCellBlockStarts: positionsToBlockIndexes(startCellPositions),
|
|
16999
|
+
endRowCellBlockEnds: splitEnds,
|
|
17000
|
+
startRowCellBlockPositions: hasPartialPositions(startCellPositions) ? startCellPositions : void 0,
|
|
17001
|
+
endRowCellBlockPositions: hasPartialPositions(splitEndPositions) ? splitEndPositions : void 0
|
|
17002
|
+
},
|
|
17003
|
+
sourceBlock
|
|
17004
|
+
};
|
|
17005
|
+
};
|
|
17006
|
+
const advanceCursor = (groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions) => {
|
|
17007
|
+
if (isLastRowSplit) {
|
|
17008
|
+
const lastRowIndex = rowGroups[groupEndIndex - 1].startRowIndex;
|
|
17009
|
+
const lastRow = sourceBlock.rows[lastRowIndex];
|
|
17010
|
+
const ends = splitEndPositions ?? (splitEnds == null ? void 0 : splitEnds.map((blockIndex) => ({ blockIndex }))) ?? [];
|
|
17011
|
+
if (positionsFinishedRow(lastRow, ends)) {
|
|
17012
|
+
currentCellBlockPositions = void 0;
|
|
17013
|
+
groupStartIndex = groupEndIndex;
|
|
16912
17014
|
} 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;
|
|
17015
|
+
currentCellBlockPositions = ends;
|
|
17016
|
+
groupStartIndex = groupEndIndex - 1;
|
|
16928
17017
|
}
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
17018
|
+
} else {
|
|
17019
|
+
currentCellBlockPositions = void 0;
|
|
17020
|
+
groupStartIndex = groupEndIndex;
|
|
17021
|
+
}
|
|
17022
|
+
};
|
|
17023
|
+
paginateSegments(track, sourceBlock.id, {
|
|
17024
|
+
hasMore: () => groupStartIndex < rowGroups.length,
|
|
17025
|
+
fit(segmentId, remaining) {
|
|
17026
|
+
const startRowIndex = rowGroups[groupStartIndex].startRowIndex;
|
|
17027
|
+
const repeatedHeaderRowCount = startRowIndex > 0 ? headerRowCount : 0;
|
|
17028
|
+
const startCellPositions = currentCellBlockPositions;
|
|
17029
|
+
let groupEndIndex = groupStartIndex;
|
|
17030
|
+
let segmentHeight = 0;
|
|
17031
|
+
let splitEnds;
|
|
17032
|
+
let splitEndPositions;
|
|
17033
|
+
let isLastRowSplit = false;
|
|
17034
|
+
while (groupEndIndex < rowGroups.length) {
|
|
17035
|
+
const candidateEndRowIndex = rowGroups[groupEndIndex].endRowIndexExclusive;
|
|
17036
|
+
let candidateHeight = 0;
|
|
17037
|
+
if (groupEndIndex === groupStartIndex && currentCellBlockPositions) {
|
|
17038
|
+
const firstRow2 = sourceBlock.rows[startRowIndex];
|
|
16945
17039
|
const starts = normalizeCellStartPositions(
|
|
16946
|
-
|
|
16947
|
-
|
|
17040
|
+
firstRow2,
|
|
17041
|
+
currentCellBlockPositions,
|
|
16948
17042
|
void 0
|
|
16949
17043
|
);
|
|
16950
|
-
const ends =
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
17044
|
+
const ends = firstRow2.cells.map((cell) => ({
|
|
17045
|
+
blockIndex: cell.blocks.length
|
|
17046
|
+
}));
|
|
17047
|
+
const slicedFirstRow = buildRowSliceFromPositions(
|
|
17048
|
+
firstRow2,
|
|
17049
|
+
starts,
|
|
17050
|
+
ends
|
|
17051
|
+
);
|
|
17052
|
+
candidateHeight = getTableSegmentHeight(
|
|
17053
|
+
{ ...sourceBlock, rows: [slicedFirstRow] },
|
|
17054
|
+
0,
|
|
17055
|
+
1,
|
|
17056
|
+
repeatedHeaderRowCount,
|
|
17057
|
+
styles,
|
|
17058
|
+
contentWidth,
|
|
17059
|
+
measurer,
|
|
17060
|
+
defaultTabStop
|
|
17061
|
+
);
|
|
17062
|
+
} else {
|
|
17063
|
+
candidateHeight = getTableSegmentHeight(
|
|
17064
|
+
sourceBlock,
|
|
17065
|
+
startRowIndex,
|
|
17066
|
+
candidateEndRowIndex,
|
|
17067
|
+
repeatedHeaderRowCount,
|
|
17068
|
+
styles,
|
|
17069
|
+
contentWidth,
|
|
17070
|
+
measurer,
|
|
17071
|
+
defaultTabStop
|
|
16963
17072
|
);
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
17073
|
+
}
|
|
17074
|
+
if (candidateHeight <= remaining) {
|
|
17075
|
+
segmentHeight = candidateHeight;
|
|
17076
|
+
groupEndIndex += 1;
|
|
17077
|
+
continue;
|
|
17078
|
+
}
|
|
17079
|
+
const isSingleRowGroup = candidateEndRowIndex === rowGroups[groupEndIndex].startRowIndex + 1;
|
|
17080
|
+
const targetRow = sourceBlock.rows[rowGroups[groupEndIndex].startRowIndex];
|
|
17081
|
+
const isSplitCandidate = isSingleRowGroup && canSplitTableRow(targetRow);
|
|
17082
|
+
if (isSplitCandidate) {
|
|
17083
|
+
const precedingHeight = groupEndIndex > groupStartIndex ? getTableSegmentHeight(
|
|
17084
|
+
sourceBlock,
|
|
17085
|
+
startRowIndex,
|
|
17086
|
+
rowGroups[groupEndIndex].startRowIndex,
|
|
17087
|
+
repeatedHeaderRowCount,
|
|
17088
|
+
styles,
|
|
17089
|
+
contentWidth,
|
|
17090
|
+
measurer,
|
|
17091
|
+
defaultTabStop
|
|
17092
|
+
) : 0;
|
|
17093
|
+
const availableForSplitRow = remaining - precedingHeight;
|
|
17094
|
+
if (availableForSplitRow > 0) {
|
|
17095
|
+
const starts = normalizeCellStartPositions(
|
|
16969
17096
|
targetRow,
|
|
16970
|
-
|
|
16971
|
-
|
|
17097
|
+
groupEndIndex === groupStartIndex ? currentCellBlockPositions : void 0,
|
|
17098
|
+
void 0
|
|
16972
17099
|
);
|
|
16973
|
-
const
|
|
16974
|
-
|
|
16975
|
-
|
|
17100
|
+
const ends = targetRow.cells.map(
|
|
17101
|
+
(_, cellIdx) => findCellSplitEndPosition(
|
|
17102
|
+
targetRow,
|
|
17103
|
+
cellIdx,
|
|
17104
|
+
starts[cellIdx] ?? { blockIndex: 0 },
|
|
17105
|
+
availableForSplitRow,
|
|
17106
|
+
styles,
|
|
17107
|
+
measurer,
|
|
17108
|
+
defaultTabStop,
|
|
17109
|
+
contentWidth,
|
|
17110
|
+
sourceBlock,
|
|
16976
17111
|
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
|
|
17112
|
+
)
|
|
16989
17113
|
);
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
17114
|
+
if (positionsProgressed(starts, ends)) {
|
|
17115
|
+
splitEnds = positionsToBlockIndexes(ends);
|
|
17116
|
+
isLastRowSplit = true;
|
|
17117
|
+
const slicedLastRow = buildRowSliceFromPositions(
|
|
17118
|
+
targetRow,
|
|
17119
|
+
starts,
|
|
17120
|
+
ends
|
|
17121
|
+
);
|
|
17122
|
+
const segmentRows = [
|
|
17123
|
+
...sourceBlock.rows.slice(
|
|
17124
|
+
startRowIndex,
|
|
17125
|
+
rowGroups[groupEndIndex].startRowIndex
|
|
17126
|
+
),
|
|
17127
|
+
slicedLastRow
|
|
17128
|
+
];
|
|
17129
|
+
segmentHeight = getTableSegmentHeight(
|
|
17130
|
+
{ ...sourceBlock, rows: segmentRows },
|
|
17131
|
+
0,
|
|
17132
|
+
segmentRows.length,
|
|
17133
|
+
repeatedHeaderRowCount,
|
|
17134
|
+
styles,
|
|
17135
|
+
contentWidth,
|
|
17136
|
+
measurer,
|
|
17137
|
+
defaultTabStop
|
|
17138
|
+
);
|
|
17139
|
+
splitEndPositions = ends;
|
|
17140
|
+
groupEndIndex += 1;
|
|
17141
|
+
break;
|
|
17142
|
+
}
|
|
16993
17143
|
}
|
|
16994
17144
|
}
|
|
17145
|
+
break;
|
|
16995
17146
|
}
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17147
|
+
if (groupEndIndex === groupStartIndex) return null;
|
|
17148
|
+
const block = buildTableBlock(
|
|
17149
|
+
segmentId,
|
|
17150
|
+
startRowIndex,
|
|
17151
|
+
groupEndIndex,
|
|
17152
|
+
repeatedHeaderRowCount,
|
|
17153
|
+
segmentHeight,
|
|
17154
|
+
splitEnds,
|
|
17155
|
+
splitEndPositions,
|
|
17156
|
+
startCellPositions
|
|
17157
|
+
);
|
|
17158
|
+
advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
|
|
17159
|
+
return block;
|
|
17160
|
+
},
|
|
17161
|
+
force(segmentId) {
|
|
17162
|
+
const startRowIndex = rowGroups[groupStartIndex].startRowIndex;
|
|
17163
|
+
const repeatedHeaderRowCount = startRowIndex > 0 ? headerRowCount : 0;
|
|
17164
|
+
const startCellPositions = currentCellBlockPositions;
|
|
17165
|
+
let groupEndIndex = groupStartIndex;
|
|
17166
|
+
let segmentHeight = 0;
|
|
17167
|
+
let splitEnds;
|
|
17168
|
+
let splitEndPositions;
|
|
17169
|
+
let isLastRowSplit = false;
|
|
17003
17170
|
const targetRow = sourceBlock.rows[startRowIndex];
|
|
17004
17171
|
const isSingleRowGroup = rowGroups[groupStartIndex].endRowIndexExclusive === startRowIndex + 1;
|
|
17005
17172
|
const isSplitCandidate = isSingleRowGroup && canSplitTableRow(targetRow);
|
|
@@ -17034,11 +17201,7 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
17034
17201
|
splitEnds = positionsToBlockIndexes(ends);
|
|
17035
17202
|
splitEndPositions = ends;
|
|
17036
17203
|
isLastRowSplit = true;
|
|
17037
|
-
const slicedLastRow = buildRowSliceFromPositions(
|
|
17038
|
-
targetRow,
|
|
17039
|
-
starts,
|
|
17040
|
-
ends
|
|
17041
|
-
);
|
|
17204
|
+
const slicedLastRow = buildRowSliceFromPositions(targetRow, starts, ends);
|
|
17042
17205
|
segmentHeight = getTableSegmentHeight(
|
|
17043
17206
|
{ ...sourceBlock, rows: [slicedLastRow] },
|
|
17044
17207
|
0,
|
|
@@ -17063,53 +17226,20 @@ function paginateTableBlock(track, params, sourceBlock, index) {
|
|
|
17063
17226
|
defaultTabStop
|
|
17064
17227
|
);
|
|
17065
17228
|
}
|
|
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: {
|
|
17229
|
+
const block = buildTableBlock(
|
|
17230
|
+
segmentId,
|
|
17077
17231
|
startRowIndex,
|
|
17078
|
-
|
|
17232
|
+
groupEndIndex,
|
|
17079
17233
|
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();
|
|
17234
|
+
segmentHeight,
|
|
17235
|
+
splitEnds,
|
|
17236
|
+
splitEndPositions,
|
|
17237
|
+
startCellPositions
|
|
17238
|
+
);
|
|
17239
|
+
advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
|
|
17240
|
+
return block;
|
|
17111
17241
|
}
|
|
17112
|
-
}
|
|
17242
|
+
});
|
|
17113
17243
|
}
|
|
17114
17244
|
function projectBlocksLayout(context2) {
|
|
17115
17245
|
const columns = context2.pageSettings.columns;
|
|
@@ -17519,6 +17649,19 @@ function applyCanvasTextFeatureHints(ctx, styles, fontSizePx) {
|
|
|
17519
17649
|
featureCtx.textRendering = (styles == null ? void 0 : styles.ligatures) && styles.ligatures !== "none" ? "optimizeLegibility" : "optimizeSpeed";
|
|
17520
17650
|
}
|
|
17521
17651
|
}
|
|
17652
|
+
function resolveCanvasRunPaintStyle(styles) {
|
|
17653
|
+
const fontSize = (styles == null ? void 0 : styles.fontSize) ?? DEFAULT_FONT_SIZE_PX;
|
|
17654
|
+
const fontFamily = resolveCanvasFontFamily(styles == null ? void 0 : styles.fontFamily);
|
|
17655
|
+
const fontWeight = (styles == null ? void 0 : styles.bold) ? "700" : "400";
|
|
17656
|
+
const fontStyle = (styles == null ? void 0 : styles.italic) ? "italic" : "normal";
|
|
17657
|
+
const renderMetrics = resolveCanvasTextRenderMetrics(styles, fontSize);
|
|
17658
|
+
return {
|
|
17659
|
+
font: `${fontStyle} ${fontWeight} ${renderMetrics.fontSize}px ${fontFamily}`,
|
|
17660
|
+
fillStyle: (styles == null ? void 0 : styles.color) ?? "#000000",
|
|
17661
|
+
renderMetrics,
|
|
17662
|
+
scale: (styles == null ? void 0 : styles.characterScale) && styles.characterScale > 0 ? styles.characterScale / 100 : 1
|
|
17663
|
+
};
|
|
17664
|
+
}
|
|
17522
17665
|
function resolveVerticalMode(direction) {
|
|
17523
17666
|
switch (direction) {
|
|
17524
17667
|
case "tbRl":
|
|
@@ -17649,10 +17792,8 @@ function layoutStackedGlyphs(paragraph, state, box, startColumn, columnsRtl = tr
|
|
|
17649
17792
|
state.document.styles
|
|
17650
17793
|
);
|
|
17651
17794
|
const fontSize = styles.fontSize ?? DEFAULT_FONT_SIZE_PX;
|
|
17652
|
-
const
|
|
17795
|
+
const { font, fillStyle: color } = resolveCanvasRunPaintStyle(styles);
|
|
17653
17796
|
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
17797
|
for (const char of run.text) {
|
|
17657
17798
|
if (char === "\n") {
|
|
17658
17799
|
newColumn();
|
|
@@ -17998,7 +18139,8 @@ function buildCanvasTableLayout(options) {
|
|
|
17998
18139
|
const isStacked = verticalMode === "stack";
|
|
17999
18140
|
const isFitText = !!((_w = cell.style) == null ? void 0 : _w.fitText) && !isRotated && !isStacked;
|
|
18000
18141
|
const explicitRowHeightPx = parseDimensionToPx(effectiveRow.height);
|
|
18001
|
-
const
|
|
18142
|
+
const hasExplicitRowHeight = explicitRowHeightPx !== null && explicitRowHeightPx > 0;
|
|
18143
|
+
const wrapWidth = isRotated || ((_x = cell.style) == null ? void 0 : _x.noWrap) ? isRotated && hasExplicitRowHeight ? Math.max(
|
|
18002
18144
|
MIN_TABLE_CELL_CONTENT_WIDTH_PX,
|
|
18003
18145
|
explicitRowHeightPx - borders.top.width - borders.bottom.width - padding.top - padding.bottom
|
|
18004
18146
|
) : NO_WRAP_WIDTH_PX : contentWidthPx;
|
|
@@ -18040,7 +18182,6 @@ function buildCanvasTableLayout(options) {
|
|
|
18040
18182
|
spacingBefore,
|
|
18041
18183
|
spacingAfter
|
|
18042
18184
|
});
|
|
18043
|
-
const hasExplicitRowHeight = explicitRowHeightPx !== null && explicitRowHeightPx > 0;
|
|
18044
18185
|
const paragraphStyleSize = ((_A = (_z = paragraph.runs[0]) == null ? void 0 : _z.styles) == null ? void 0 : _A.fontSize) ?? DEFAULT_FONT_SIZE_PX;
|
|
18045
18186
|
contentNaturalHeightPx = Math.max(
|
|
18046
18187
|
contentNaturalHeightPx,
|
|
@@ -18103,7 +18244,6 @@ function buildCanvasTableLayout(options) {
|
|
|
18103
18244
|
});
|
|
18104
18245
|
if (isRotated) {
|
|
18105
18246
|
const lineThickness = projected.lines.length > 0 ? Math.max(...projected.lines.map((line) => line.height)) : paragraphHeight;
|
|
18106
|
-
const hasExplicitRowHeight = explicitRowHeightPx !== null && explicitRowHeightPx > 0;
|
|
18107
18247
|
const flowLength = projected.lines.length ? Math.max(
|
|
18108
18248
|
...projected.lines.map((line) => {
|
|
18109
18249
|
const last = line.slots[line.slots.length - 1];
|
|
@@ -18273,6 +18413,35 @@ function PageBreak(props) {
|
|
|
18273
18413
|
return _el$;
|
|
18274
18414
|
})();
|
|
18275
18415
|
}
|
|
18416
|
+
const HEX6_PATTERN = /^[0-9a-fA-F]{6}$/;
|
|
18417
|
+
function stripHashPrefix(color) {
|
|
18418
|
+
return color.trim().replace(/^#/, "");
|
|
18419
|
+
}
|
|
18420
|
+
function normalizeHex6(color) {
|
|
18421
|
+
if (!color) {
|
|
18422
|
+
return null;
|
|
18423
|
+
}
|
|
18424
|
+
const body = stripHashPrefix(color);
|
|
18425
|
+
return HEX6_PATTERN.test(body) ? body.toUpperCase() : null;
|
|
18426
|
+
}
|
|
18427
|
+
function parseHexColorToRgb255(color) {
|
|
18428
|
+
if (!color) {
|
|
18429
|
+
return null;
|
|
18430
|
+
}
|
|
18431
|
+
const normalized = stripHashPrefix(color);
|
|
18432
|
+
if (!HEX6_PATTERN.test(normalized)) {
|
|
18433
|
+
return null;
|
|
18434
|
+
}
|
|
18435
|
+
return [
|
|
18436
|
+
Number.parseInt(normalized.slice(0, 2), 16),
|
|
18437
|
+
Number.parseInt(normalized.slice(2, 4), 16),
|
|
18438
|
+
Number.parseInt(normalized.slice(4, 6), 16)
|
|
18439
|
+
];
|
|
18440
|
+
}
|
|
18441
|
+
function rgb255ToHex(r, g2, b) {
|
|
18442
|
+
const toHex2 = (value) => Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
18443
|
+
return `#${toHex2(r)}${toHex2(g2)}${toHex2(b)}`;
|
|
18444
|
+
}
|
|
18276
18445
|
const imageCache = /* @__PURE__ */ new Map();
|
|
18277
18446
|
function getCachedCanvasImage(src, onUpdate) {
|
|
18278
18447
|
const cached = imageCache.get(src);
|
|
@@ -19817,6 +19986,39 @@ function buildPresetPath(preset, x, y, width, height) {
|
|
|
19817
19986
|
}
|
|
19818
19987
|
return path;
|
|
19819
19988
|
}
|
|
19989
|
+
const DEG_TO_RAD = Math.PI / 180;
|
|
19990
|
+
const CANVAS_DASH_DASHED = [5, 3];
|
|
19991
|
+
const CANVAS_DASH_DOTTED = [1, 3];
|
|
19992
|
+
function drawEdge(ctx, border, x1, y1, x2, y2) {
|
|
19993
|
+
if (!border || border.type === "none" || border.width <= 0) {
|
|
19994
|
+
return;
|
|
19995
|
+
}
|
|
19996
|
+
ctx.save();
|
|
19997
|
+
ctx.beginPath();
|
|
19998
|
+
ctx.strokeStyle = border.color;
|
|
19999
|
+
ctx.lineWidth = border.width;
|
|
20000
|
+
if (border.type === "dashed") {
|
|
20001
|
+
ctx.setLineDash(CANVAS_DASH_DASHED);
|
|
20002
|
+
} else if (border.type === "dotted") {
|
|
20003
|
+
ctx.setLineDash(CANVAS_DASH_DOTTED);
|
|
20004
|
+
} else {
|
|
20005
|
+
ctx.setLineDash([]);
|
|
20006
|
+
}
|
|
20007
|
+
ctx.moveTo(x1, y1);
|
|
20008
|
+
ctx.lineTo(x2, y2);
|
|
20009
|
+
ctx.stroke();
|
|
20010
|
+
ctx.restore();
|
|
20011
|
+
}
|
|
20012
|
+
function drawBorderBox(ctx, left, top, width, height, borders) {
|
|
20013
|
+
const right = left + width;
|
|
20014
|
+
const bottom = top + height;
|
|
20015
|
+
drawEdge(ctx, borders.top, left, top, right, top);
|
|
20016
|
+
drawEdge(ctx, borders.right, right, top, right, bottom);
|
|
20017
|
+
drawEdge(ctx, borders.bottom, left, bottom, right, bottom);
|
|
20018
|
+
drawEdge(ctx, borders.left, left, top, left, bottom);
|
|
20019
|
+
drawEdge(ctx, borders.topLeftToBottomRight, left, top, right, bottom);
|
|
20020
|
+
drawEdge(ctx, borders.topRightToBottomLeft, right, top, left, bottom);
|
|
20021
|
+
}
|
|
19820
20022
|
const TEXT_BOX_AUTOFIT_MEASURE_HEIGHT = 1e5;
|
|
19821
20023
|
const TEXT_BOX_AUTOFIT_SAFETY_PX = 2;
|
|
19822
20024
|
function getTextBoxPadding(textBox) {
|
|
@@ -20001,7 +20203,7 @@ function paintTextBox(ctx, textBox, state, x, y, width, height, pageIndex, onUpd
|
|
|
20001
20203
|
if (rotation) {
|
|
20002
20204
|
ctx.save();
|
|
20003
20205
|
ctx.translate(x + width / 2, y + height / 2);
|
|
20004
|
-
ctx.rotate(rotation *
|
|
20206
|
+
ctx.rotate(rotation * DEG_TO_RAD);
|
|
20005
20207
|
ctx.translate(-(x + width / 2), -(y + height / 2));
|
|
20006
20208
|
}
|
|
20007
20209
|
drawTextBoxShape(ctx, textBox, x, y, width, height);
|
|
@@ -20203,6 +20405,8 @@ function isDoubleUnderlineStyle(underlineStyle) {
|
|
|
20203
20405
|
function isWavyUnderlineStyle(underlineStyle) {
|
|
20204
20406
|
return underlineStyle === "wave" || underlineStyle === "wavyHeavy";
|
|
20205
20407
|
}
|
|
20408
|
+
const WAVY_UNDERLINE_AMPLITUDE_PX = 1.5;
|
|
20409
|
+
const WAVY_UNDERLINE_WAVELENGTH_PX = 4;
|
|
20206
20410
|
function underlineStyleLineWidthPx(underlineStyle) {
|
|
20207
20411
|
switch (underlineStyle) {
|
|
20208
20412
|
case "thick":
|
|
@@ -20268,42 +20472,12 @@ function underlineStyleDashArray(underlineStyle) {
|
|
|
20268
20472
|
return void 0;
|
|
20269
20473
|
}
|
|
20270
20474
|
}
|
|
20271
|
-
const CANVAS_DASH_DASHED = [5, 3];
|
|
20272
|
-
const CANVAS_DASH_DOTTED = [1, 3];
|
|
20273
|
-
function drawEdge(ctx, border, x1, y1, x2, y2) {
|
|
20274
|
-
if (!border || border.type === "none" || border.width <= 0) {
|
|
20275
|
-
return;
|
|
20276
|
-
}
|
|
20277
|
-
ctx.save();
|
|
20278
|
-
ctx.beginPath();
|
|
20279
|
-
ctx.strokeStyle = border.color;
|
|
20280
|
-
ctx.lineWidth = border.width;
|
|
20281
|
-
if (border.type === "dashed") {
|
|
20282
|
-
ctx.setLineDash(CANVAS_DASH_DASHED);
|
|
20283
|
-
} else if (border.type === "dotted") {
|
|
20284
|
-
ctx.setLineDash(CANVAS_DASH_DOTTED);
|
|
20285
|
-
} else {
|
|
20286
|
-
ctx.setLineDash([]);
|
|
20287
|
-
}
|
|
20288
|
-
ctx.moveTo(x1, y1);
|
|
20289
|
-
ctx.lineTo(x2, y2);
|
|
20290
|
-
ctx.stroke();
|
|
20291
|
-
ctx.restore();
|
|
20292
|
-
}
|
|
20293
|
-
function drawBorderBox(ctx, left, top, width, height, borders) {
|
|
20294
|
-
const right = left + width;
|
|
20295
|
-
const bottom = top + height;
|
|
20296
|
-
drawEdge(ctx, borders.top, left, top, right, top);
|
|
20297
|
-
drawEdge(ctx, borders.right, right, top, right, bottom);
|
|
20298
|
-
drawEdge(ctx, borders.bottom, left, bottom, right, bottom);
|
|
20299
|
-
drawEdge(ctx, borders.left, left, top, left, bottom);
|
|
20300
|
-
drawEdge(ctx, borders.topLeftToBottomRight, left, top, right, bottom);
|
|
20301
|
-
drawEdge(ctx, borders.topRightToBottomLeft, right, top, left, bottom);
|
|
20302
|
-
}
|
|
20303
20475
|
const DOUBLE_STRIKE_OFFSET_PX = 1.3;
|
|
20304
20476
|
const DOUBLE_UNDERLINE_OFFSET_PX = 1.5;
|
|
20305
|
-
|
|
20306
|
-
const
|
|
20477
|
+
function hexToRgba(color, alpha) {
|
|
20478
|
+
const [r, g2, b] = parseHexColorToRgb255(color) ?? [0, 0, 0];
|
|
20479
|
+
return `rgba(${r},${g2},${b},${alpha})`;
|
|
20480
|
+
}
|
|
20307
20481
|
const canvasTextLogger = createEditorLogger("canvas-text");
|
|
20308
20482
|
const loggedCanvasFontKeys = /* @__PURE__ */ new Set();
|
|
20309
20483
|
const MAX_CANVAS_FONT_LOGS = 40;
|
|
@@ -20382,7 +20556,7 @@ function drawImageFragment(ctx, img, image, x, y) {
|
|
|
20382
20556
|
if (hasTransform) {
|
|
20383
20557
|
ctx.translate(x + width / 2, y + height / 2);
|
|
20384
20558
|
if (rotation) {
|
|
20385
|
-
ctx.rotate(rotation *
|
|
20559
|
+
ctx.rotate(rotation * DEG_TO_RAD);
|
|
20386
20560
|
}
|
|
20387
20561
|
ctx.scale(flipH ? -1 : 1, flipV ? -1 : 1);
|
|
20388
20562
|
ctx.translate(-(x + width / 2), -(y + height / 2));
|
|
@@ -20416,7 +20590,7 @@ function drawImageFragment(ctx, img, image, x, y) {
|
|
|
20416
20590
|
ctx.save();
|
|
20417
20591
|
ctx.translate(x + width / 2, y + height / 2);
|
|
20418
20592
|
if (rotation) {
|
|
20419
|
-
ctx.rotate(rotation *
|
|
20593
|
+
ctx.rotate(rotation * DEG_TO_RAD);
|
|
20420
20594
|
}
|
|
20421
20595
|
ctx.scale(flipH ? -1 : 1, flipV ? -1 : 1);
|
|
20422
20596
|
ctx.drawImage(img, sx, sy, sw, sh, -width / 2, -height / 2, width, height);
|
|
@@ -20490,13 +20664,10 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20490
20664
|
(_b = paragraph.style) == null ? void 0 : _b.styleId,
|
|
20491
20665
|
state.document.styles
|
|
20492
20666
|
);
|
|
20493
|
-
const
|
|
20494
|
-
const prefixWeight = prefixStyles.bold ? "700" : "400";
|
|
20495
|
-
const prefixStyle = prefixStyles.italic ? "italic" : "normal";
|
|
20496
|
-
const prefixFamily = resolveCanvasFontFamily(prefixStyles.fontFamily);
|
|
20667
|
+
const { font: prefixFont, fillStyle: prefixFillStyle } = resolveCanvasRunPaintStyle(prefixStyles);
|
|
20497
20668
|
ctx.save();
|
|
20498
|
-
ctx.font =
|
|
20499
|
-
ctx.fillStyle =
|
|
20669
|
+
ctx.font = prefixFont;
|
|
20670
|
+
ctx.fillStyle = prefixFillStyle;
|
|
20500
20671
|
const first = line.slots[0];
|
|
20501
20672
|
const gap = ctx.measureText(`${listPrefix} `).width;
|
|
20502
20673
|
const labelInset = getListLabelInset(paragraph, state.document.styles);
|
|
@@ -20524,12 +20695,9 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20524
20695
|
const metricFamily = resolveMetricCompatibleFamily(
|
|
20525
20696
|
styles.fontFamily ?? "Calibri"
|
|
20526
20697
|
);
|
|
20527
|
-
const
|
|
20528
|
-
const fontWeight = styles.bold ? "700" : "400";
|
|
20529
|
-
const fontStyle = styles.italic ? "italic" : "normal";
|
|
20530
|
-
const renderMetrics = resolveCanvasTextRenderMetrics(styles, fontSize);
|
|
20698
|
+
const { font, renderMetrics } = resolveCanvasRunPaintStyle(styles);
|
|
20531
20699
|
ctx.save();
|
|
20532
|
-
ctx.font =
|
|
20700
|
+
ctx.font = font;
|
|
20533
20701
|
applyCanvasTextFeatureHints(ctx, styles, fontSize);
|
|
20534
20702
|
logCanvasFontUse({
|
|
20535
20703
|
requestedFamily: styles.fontFamily,
|
|
@@ -20698,18 +20866,10 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20698
20866
|
state.document.styles
|
|
20699
20867
|
);
|
|
20700
20868
|
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;
|
|
20869
|
+
const { font, fillStyle, renderMetrics, scale } = resolveCanvasRunPaintStyle(styles);
|
|
20710
20870
|
ctx.save();
|
|
20711
|
-
ctx.font =
|
|
20712
|
-
ctx.fillStyle =
|
|
20871
|
+
ctx.font = font;
|
|
20872
|
+
ctx.fillStyle = fillStyle;
|
|
20713
20873
|
drawStyledText(
|
|
20714
20874
|
ctx,
|
|
20715
20875
|
"-",
|
|
@@ -20737,11 +20897,11 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
20737
20897
|
}
|
|
20738
20898
|
}
|
|
20739
20899
|
}
|
|
20740
|
-
function
|
|
20900
|
+
function drawFragmentColorRect(ctx, line, fragment, originX, originY, color, alpha) {
|
|
20741
20901
|
const bounds = resolveFragmentPaintBounds(line, fragment);
|
|
20742
20902
|
if (!bounds) return;
|
|
20743
20903
|
ctx.save();
|
|
20744
|
-
ctx.globalAlpha =
|
|
20904
|
+
if (alpha !== void 0) ctx.globalAlpha = alpha;
|
|
20745
20905
|
ctx.fillStyle = color;
|
|
20746
20906
|
ctx.fillRect(
|
|
20747
20907
|
originX + bounds.left,
|
|
@@ -20751,6 +20911,9 @@ function drawFragmentHighlight(ctx, line, fragment, originX, originY, color) {
|
|
|
20751
20911
|
);
|
|
20752
20912
|
ctx.restore();
|
|
20753
20913
|
}
|
|
20914
|
+
function drawFragmentHighlight(ctx, line, fragment, originX, originY, color) {
|
|
20915
|
+
drawFragmentColorRect(ctx, line, fragment, originX, originY, color, 0.35);
|
|
20916
|
+
}
|
|
20754
20917
|
function resolveFragmentPaintBounds(line, fragment) {
|
|
20755
20918
|
const slotByOffset = new Map(
|
|
20756
20919
|
line.slots.map((slot) => [slot.offset, slot])
|
|
@@ -20773,17 +20936,7 @@ function resolveFragmentPaintBounds(line, fragment) {
|
|
|
20773
20936
|
};
|
|
20774
20937
|
}
|
|
20775
20938
|
function drawFragmentShading(ctx, line, fragment, originX, originY, color) {
|
|
20776
|
-
|
|
20777
|
-
if (!bounds) return;
|
|
20778
|
-
ctx.save();
|
|
20779
|
-
ctx.fillStyle = color;
|
|
20780
|
-
ctx.fillRect(
|
|
20781
|
-
originX + bounds.left,
|
|
20782
|
-
originY + line.top + 2,
|
|
20783
|
-
Math.max(0, bounds.right - bounds.left),
|
|
20784
|
-
Math.max(2, line.height - 4)
|
|
20785
|
-
);
|
|
20786
|
-
ctx.restore();
|
|
20939
|
+
drawFragmentColorRect(ctx, line, fragment, originX, originY, color);
|
|
20787
20940
|
}
|
|
20788
20941
|
function getRenderedChar(char, styles) {
|
|
20789
20942
|
return styles.allCaps ? char.toUpperCase() : char;
|
|
@@ -20813,16 +20966,12 @@ function resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY) {
|
|
|
20813
20966
|
const cx = (x0 + x1) / 2;
|
|
20814
20967
|
const cy = (y0 + y1) / 2;
|
|
20815
20968
|
const angleDeg = fill.angle ?? 0;
|
|
20816
|
-
const rad = angleDeg *
|
|
20969
|
+
const rad = angleDeg * DEG_TO_RAD;
|
|
20817
20970
|
const dx = Math.cos(rad) * (x1 - x0) / 2;
|
|
20818
20971
|
const dy = Math.sin(rad) * (y1 - y0) / 2;
|
|
20819
20972
|
const gradient = ctx.createLinearGradient(cx - dx, cy - dy, cx + dx, cy + dy);
|
|
20820
20973
|
for (const stop of fill.stops) {
|
|
20821
|
-
|
|
20822
|
-
const r = Number.parseInt(stop.color.slice(1, 3), 16);
|
|
20823
|
-
const g2 = Number.parseInt(stop.color.slice(3, 5), 16);
|
|
20824
|
-
const b = Number.parseInt(stop.color.slice(5, 7), 16);
|
|
20825
|
-
gradient.addColorStop(stop.position, `rgba(${r},${g2},${b},${alpha})`);
|
|
20974
|
+
gradient.addColorStop(stop.position, hexToRgba(stop.color, stop.alpha ?? 1));
|
|
20826
20975
|
}
|
|
20827
20976
|
return gradient;
|
|
20828
20977
|
}
|
|
@@ -20843,23 +20992,15 @@ function drawStyledText(ctx, text, x, y, scale, styles) {
|
|
|
20843
20992
|
ctx.save();
|
|
20844
20993
|
if (styles.textShadow) {
|
|
20845
20994
|
const ts = styles.textShadow;
|
|
20846
|
-
const dirRad = ts.dirDeg *
|
|
20995
|
+
const dirRad = ts.dirDeg * DEG_TO_RAD;
|
|
20847
20996
|
const distPx = ts.distPt * PX_PER_POINT;
|
|
20848
|
-
|
|
20849
|
-
const r = Number.parseInt(ts.color.slice(1, 3), 16);
|
|
20850
|
-
const g2 = Number.parseInt(ts.color.slice(3, 5), 16);
|
|
20851
|
-
const b = Number.parseInt(ts.color.slice(5, 7), 16);
|
|
20852
|
-
ctx.shadowColor = `rgba(${r},${g2},${b},${alpha})`;
|
|
20997
|
+
ctx.shadowColor = hexToRgba(ts.color, ts.alpha ?? 1);
|
|
20853
20998
|
ctx.shadowBlur = ts.blurPt * PX_PER_POINT;
|
|
20854
20999
|
ctx.shadowOffsetX = Math.cos(dirRad) * distPx;
|
|
20855
21000
|
ctx.shadowOffsetY = Math.sin(dirRad) * distPx;
|
|
20856
21001
|
} else if (styles.glow) {
|
|
20857
21002
|
const gl = styles.glow;
|
|
20858
|
-
|
|
20859
|
-
const r = Number.parseInt(gl.color.slice(1, 3), 16);
|
|
20860
|
-
const g2 = Number.parseInt(gl.color.slice(3, 5), 16);
|
|
20861
|
-
const b = Number.parseInt(gl.color.slice(5, 7), 16);
|
|
20862
|
-
ctx.shadowColor = `rgba(${r},${g2},${b},${alpha})`;
|
|
21003
|
+
ctx.shadowColor = hexToRgba(gl.color, gl.alpha ?? 0.7);
|
|
20863
21004
|
ctx.shadowBlur = gl.radiusPt * PX_PER_POINT;
|
|
20864
21005
|
ctx.shadowOffsetX = 0;
|
|
20865
21006
|
ctx.shadowOffsetY = 0;
|
|
@@ -21248,18 +21389,14 @@ function drawDropCapForParagraph(options) {
|
|
|
21248
21389
|
return;
|
|
21249
21390
|
}
|
|
21250
21391
|
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);
|
|
21392
|
+
const { font, fillStyle, renderMetrics } = resolveCanvasRunPaintStyle(style2);
|
|
21393
|
+
const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? ((style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX);
|
|
21257
21394
|
const glyphWidth = measureDropCapWidth(dropCap);
|
|
21258
21395
|
const x = dropCap.type === "margin" ? originX - glyphWidth : originX;
|
|
21259
21396
|
const baselineY = paragraphTop + (dropCap.lines - 0.2) * bodyLineHeight + renderMetrics.baselineOffset;
|
|
21260
21397
|
ctx.save();
|
|
21261
|
-
ctx.font =
|
|
21262
|
-
ctx.fillStyle =
|
|
21398
|
+
ctx.font = font;
|
|
21399
|
+
ctx.fillStyle = fillStyle;
|
|
21263
21400
|
ctx.textBaseline = "alphabetic";
|
|
21264
21401
|
ctx.fillText(dropCap.text, x, baselineY);
|
|
21265
21402
|
ctx.restore();
|
|
@@ -34388,35 +34525,6 @@ function applyDocGridLinePitch(blocks, linePitchPx, mode, docGridType, settings)
|
|
|
34388
34525
|
}
|
|
34389
34526
|
}
|
|
34390
34527
|
}
|
|
34391
|
-
const HEX6_PATTERN = /^[0-9a-fA-F]{6}$/;
|
|
34392
|
-
function stripHashPrefix(color) {
|
|
34393
|
-
return color.trim().replace(/^#/, "");
|
|
34394
|
-
}
|
|
34395
|
-
function normalizeHex6(color) {
|
|
34396
|
-
if (!color) {
|
|
34397
|
-
return null;
|
|
34398
|
-
}
|
|
34399
|
-
const body = stripHashPrefix(color);
|
|
34400
|
-
return HEX6_PATTERN.test(body) ? body.toUpperCase() : null;
|
|
34401
|
-
}
|
|
34402
|
-
function parseHexColorToRgb255(color) {
|
|
34403
|
-
if (!color) {
|
|
34404
|
-
return null;
|
|
34405
|
-
}
|
|
34406
|
-
const normalized = stripHashPrefix(color);
|
|
34407
|
-
if (!HEX6_PATTERN.test(normalized)) {
|
|
34408
|
-
return null;
|
|
34409
|
-
}
|
|
34410
|
-
return [
|
|
34411
|
-
Number.parseInt(normalized.slice(0, 2), 16),
|
|
34412
|
-
Number.parseInt(normalized.slice(2, 4), 16),
|
|
34413
|
-
Number.parseInt(normalized.slice(4, 6), 16)
|
|
34414
|
-
];
|
|
34415
|
-
}
|
|
34416
|
-
function rgb255ToHex(r, g2, b) {
|
|
34417
|
-
const toHex2 = (value) => Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
34418
|
-
return `#${toHex2(r)}${toHex2(g2)}${toHex2(b)}`;
|
|
34419
|
-
}
|
|
34420
34528
|
const VML_FRACTION_DENOMINATOR = 65536;
|
|
34421
34529
|
function emuToPx(value) {
|
|
34422
34530
|
const emu = parseOptionalInt$1(value);
|
|
@@ -36741,41 +36849,15 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
36741
36849
|
);
|
|
36742
36850
|
const hasAssets = Object.keys(assets.assets).length > 0;
|
|
36743
36851
|
const finalize = (doc2) => {
|
|
36744
|
-
|
|
36745
|
-
|
|
36746
|
-
|
|
36747
|
-
|
|
36748
|
-
|
|
36749
|
-
|
|
36750
|
-
if (docSettings.
|
|
36751
|
-
|
|
36752
|
-
|
|
36753
|
-
allowSpaceOfSameStyleInTable: true
|
|
36754
|
-
};
|
|
36755
|
-
}
|
|
36756
|
-
if (docSettings.autoHyphenation) {
|
|
36757
|
-
doc2.settings = {
|
|
36758
|
-
...doc2.settings ?? {},
|
|
36759
|
-
autoHyphenation: true
|
|
36760
|
-
};
|
|
36761
|
-
}
|
|
36762
|
-
if (docSettings.doNotHyphenateCaps) {
|
|
36763
|
-
doc2.settings = {
|
|
36764
|
-
...doc2.settings ?? {},
|
|
36765
|
-
doNotHyphenateCaps: true
|
|
36766
|
-
};
|
|
36767
|
-
}
|
|
36768
|
-
if (docSettings.consecutiveHyphenLimit !== void 0) {
|
|
36769
|
-
doc2.settings = {
|
|
36770
|
-
...doc2.settings ?? {},
|
|
36771
|
-
consecutiveHyphenLimit: docSettings.consecutiveHyphenLimit
|
|
36772
|
-
};
|
|
36773
|
-
}
|
|
36774
|
-
if (docSettings.hyphenationZone !== void 0) {
|
|
36775
|
-
doc2.settings = {
|
|
36776
|
-
...doc2.settings ?? {},
|
|
36777
|
-
hyphenationZone: docSettings.hyphenationZone
|
|
36778
|
-
};
|
|
36852
|
+
const settingsPatch = {};
|
|
36853
|
+
if (docSettings.defaultTabStop !== void 0) settingsPatch.defaultTabStop = docSettings.defaultTabStop;
|
|
36854
|
+
if (docSettings.allowSpaceOfSameStyleInTable) settingsPatch.allowSpaceOfSameStyleInTable = true;
|
|
36855
|
+
if (docSettings.autoHyphenation) settingsPatch.autoHyphenation = true;
|
|
36856
|
+
if (docSettings.doNotHyphenateCaps) settingsPatch.doNotHyphenateCaps = true;
|
|
36857
|
+
if (docSettings.consecutiveHyphenLimit !== void 0) settingsPatch.consecutiveHyphenLimit = docSettings.consecutiveHyphenLimit;
|
|
36858
|
+
if (docSettings.hyphenationZone !== void 0) settingsPatch.hyphenationZone = docSettings.hyphenationZone;
|
|
36859
|
+
if (Object.keys(settingsPatch).length > 0) {
|
|
36860
|
+
doc2.settings = { ...doc2.settings ?? {}, ...settingsPatch };
|
|
36779
36861
|
}
|
|
36780
36862
|
if (fontTable) {
|
|
36781
36863
|
doc2.fontTable = fontTable;
|
|
@@ -36863,8 +36945,19 @@ function buildEditorComments(ranges, bodies) {
|
|
|
36863
36945
|
}
|
|
36864
36946
|
return order.length > 0 ? { items, order } : void 0;
|
|
36865
36947
|
}
|
|
36866
|
-
function
|
|
36948
|
+
function walkSectionBlocks(sections, visit) {
|
|
36867
36949
|
var _a, _b, _c, _d, _e, _f;
|
|
36950
|
+
for (const section of sections) {
|
|
36951
|
+
section.blocks.forEach(visit);
|
|
36952
|
+
(_a = section.header) == null ? void 0 : _a.forEach(visit);
|
|
36953
|
+
(_b = section.firstPageHeader) == null ? void 0 : _b.forEach(visit);
|
|
36954
|
+
(_c = section.evenPageHeader) == null ? void 0 : _c.forEach(visit);
|
|
36955
|
+
(_d = section.footer) == null ? void 0 : _d.forEach(visit);
|
|
36956
|
+
(_e = section.firstPageFooter) == null ? void 0 : _e.forEach(visit);
|
|
36957
|
+
(_f = section.evenPageFooter) == null ? void 0 : _f.forEach(visit);
|
|
36958
|
+
}
|
|
36959
|
+
}
|
|
36960
|
+
function remapImportedFootnoteRefsInSections(sections, byDocxId) {
|
|
36868
36961
|
const remapBlock = (block) => {
|
|
36869
36962
|
if (block.type === "paragraph") {
|
|
36870
36963
|
block.runs.forEach((run, index) => {
|
|
@@ -36898,18 +36991,9 @@ function remapImportedFootnoteRefsInSections(sections, byDocxId) {
|
|
|
36898
36991
|
}
|
|
36899
36992
|
}
|
|
36900
36993
|
};
|
|
36901
|
-
|
|
36902
|
-
section.blocks.forEach(remapBlock);
|
|
36903
|
-
(_a = section.header) == null ? void 0 : _a.forEach(remapBlock);
|
|
36904
|
-
(_b = section.firstPageHeader) == null ? void 0 : _b.forEach(remapBlock);
|
|
36905
|
-
(_c = section.evenPageHeader) == null ? void 0 : _c.forEach(remapBlock);
|
|
36906
|
-
(_d = section.footer) == null ? void 0 : _d.forEach(remapBlock);
|
|
36907
|
-
(_e = section.firstPageFooter) == null ? void 0 : _e.forEach(remapBlock);
|
|
36908
|
-
(_f = section.evenPageFooter) == null ? void 0 : _f.forEach(remapBlock);
|
|
36909
|
-
}
|
|
36994
|
+
walkSectionBlocks(sections, remapBlock);
|
|
36910
36995
|
}
|
|
36911
36996
|
function remapImportedEndnoteRefsInSections(sections, byDocxId) {
|
|
36912
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36913
36997
|
const remapBlock = (block) => {
|
|
36914
36998
|
if (block.type === "paragraph") {
|
|
36915
36999
|
block.runs.forEach((run, index) => {
|
|
@@ -36943,15 +37027,7 @@ function remapImportedEndnoteRefsInSections(sections, byDocxId) {
|
|
|
36943
37027
|
}
|
|
36944
37028
|
}
|
|
36945
37029
|
};
|
|
36946
|
-
|
|
36947
|
-
section.blocks.forEach(remapBlock);
|
|
36948
|
-
(_a = section.header) == null ? void 0 : _a.forEach(remapBlock);
|
|
36949
|
-
(_b = section.firstPageHeader) == null ? void 0 : _b.forEach(remapBlock);
|
|
36950
|
-
(_c = section.evenPageHeader) == null ? void 0 : _c.forEach(remapBlock);
|
|
36951
|
-
(_d = section.footer) == null ? void 0 : _d.forEach(remapBlock);
|
|
36952
|
-
(_e = section.firstPageFooter) == null ? void 0 : _e.forEach(remapBlock);
|
|
36953
|
-
(_f = section.evenPageFooter) == null ? void 0 : _f.forEach(remapBlock);
|
|
36954
|
-
}
|
|
37030
|
+
walkSectionBlocks(sections, remapBlock);
|
|
36955
37031
|
}
|
|
36956
37032
|
let nextRequestId = 1;
|
|
36957
37033
|
function canUseDocxWorker() {
|
|
@@ -36967,7 +37043,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
36967
37043
|
const worker = new Worker(
|
|
36968
37044
|
new URL(
|
|
36969
37045
|
/* @vite-ignore */
|
|
36970
|
-
"" + new URL("assets/importDocxWorker-
|
|
37046
|
+
"" + new URL("assets/importDocxWorker-D0F0jbcF.js", import.meta.url).href,
|
|
36971
37047
|
import.meta.url
|
|
36972
37048
|
),
|
|
36973
37049
|
{
|
|
@@ -42625,7 +42701,7 @@ export {
|
|
|
42625
42701
|
resolveImageSrc as Z,
|
|
42626
42702
|
listKindForTag as _,
|
|
42627
42703
|
getPageContentWidth as a,
|
|
42628
|
-
|
|
42704
|
+
resolveFloatingObjectRect as a$,
|
|
42629
42705
|
collectInlineRuns as a0,
|
|
42630
42706
|
parseParagraphStyle as a1,
|
|
42631
42707
|
getRunImage as a2,
|
|
@@ -42636,33 +42712,33 @@ export {
|
|
|
42636
42712
|
getCaretRectFromSnapshot as a7,
|
|
42637
42713
|
getParagraphRectFromSnapshot as a8,
|
|
42638
42714
|
createComponent as a9,
|
|
42639
|
-
|
|
42640
|
-
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42644
|
-
|
|
42645
|
-
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42653
|
-
|
|
42654
|
-
|
|
42655
|
-
|
|
42656
|
-
|
|
42657
|
-
|
|
42658
|
-
|
|
42659
|
-
|
|
42660
|
-
|
|
42661
|
-
|
|
42662
|
-
|
|
42663
|
-
|
|
42664
|
-
|
|
42665
|
-
|
|
42715
|
+
setPreciseFontPreference as aA,
|
|
42716
|
+
setWelcomeSeen as aB,
|
|
42717
|
+
enablePreciseFontMode as aC,
|
|
42718
|
+
TWIPS_PER_POINT as aD,
|
|
42719
|
+
PX_PER_INCH as aE,
|
|
42720
|
+
TWIPS_PER_INCH as aF,
|
|
42721
|
+
normalizeHex6 as aG,
|
|
42722
|
+
TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aH,
|
|
42723
|
+
TABLE_BORDER_EDGE_KEYS as aI,
|
|
42724
|
+
resolveEffectiveParagraphStyle as aJ,
|
|
42725
|
+
resolveEffectiveTextStyleForParagraph as aK,
|
|
42726
|
+
EMU_PER_PT as aL,
|
|
42727
|
+
OOXML_ROTATION_UNITS as aM,
|
|
42728
|
+
OOXML_PERCENT_DENOMINATOR as aN,
|
|
42729
|
+
parseHexColorToRgb255 as aO,
|
|
42730
|
+
EMU_PER_PX as aP,
|
|
42731
|
+
getRunFootnoteReference as aQ,
|
|
42732
|
+
getRunEndnoteReference as aR,
|
|
42733
|
+
iterateFootnoteReferenceRuns as aS,
|
|
42734
|
+
iterateEndnoteReferenceRuns as aT,
|
|
42735
|
+
imageContentTypeDefaults as aU,
|
|
42736
|
+
getRunFieldChar as aV,
|
|
42737
|
+
getRunFieldInstruction as aW,
|
|
42738
|
+
createEditorRun as aX,
|
|
42739
|
+
JSZip as aY,
|
|
42740
|
+
imageExtensionFromMime as aZ,
|
|
42741
|
+
pxToPt as a_,
|
|
42666
42742
|
CaretOverlay as aa,
|
|
42667
42743
|
Show as ab,
|
|
42668
42744
|
createRenderEffect as ac,
|
|
@@ -42671,155 +42747,159 @@ export {
|
|
|
42671
42747
|
setStyleProperty as af,
|
|
42672
42748
|
memo as ag,
|
|
42673
42749
|
template as ah,
|
|
42674
|
-
|
|
42675
|
-
|
|
42676
|
-
|
|
42677
|
-
|
|
42678
|
-
|
|
42679
|
-
|
|
42680
|
-
|
|
42750
|
+
addEventListener as ai,
|
|
42751
|
+
insert as aj,
|
|
42752
|
+
delegateEvents as ak,
|
|
42753
|
+
useI18n as al,
|
|
42754
|
+
createEffect as am,
|
|
42755
|
+
use as an,
|
|
42756
|
+
Dialog as ao,
|
|
42681
42757
|
className as ap,
|
|
42682
42758
|
For as aq,
|
|
42683
42759
|
UNDERLINE_STYLE_OPTIONS as ar,
|
|
42684
42760
|
Tabs as as,
|
|
42685
|
-
|
|
42686
|
-
|
|
42687
|
-
|
|
42688
|
-
|
|
42689
|
-
|
|
42690
|
-
|
|
42691
|
-
|
|
42761
|
+
createStore as at,
|
|
42762
|
+
reconcile as au,
|
|
42763
|
+
onMount as av,
|
|
42764
|
+
onCleanup as aw,
|
|
42765
|
+
PluginUiHost as ax,
|
|
42766
|
+
OasisEditorEditor as ay,
|
|
42767
|
+
OasisBrandMark as az,
|
|
42692
42768
|
getPageBodyTop as b,
|
|
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
|
-
|
|
42749
|
-
|
|
42750
|
-
|
|
42751
|
-
|
|
42752
|
-
|
|
42753
|
-
|
|
42754
|
-
|
|
42755
|
-
|
|
42756
|
-
|
|
42769
|
+
markEnd as b$,
|
|
42770
|
+
getTextBoxFloatingGeometry as b0,
|
|
42771
|
+
getPresetPathSegments as b1,
|
|
42772
|
+
buildListLabels as b2,
|
|
42773
|
+
getImageFloatingGeometry as b3,
|
|
42774
|
+
textStyleToFontSizePt as b4,
|
|
42775
|
+
PX_PER_POINT as b5,
|
|
42776
|
+
DEFAULT_FONT_SIZE_PX as b6,
|
|
42777
|
+
resolveOpenTypeFeatureTags as b7,
|
|
42778
|
+
rgb255ToHex as b8,
|
|
42779
|
+
isDoubleUnderlineStyle as b9,
|
|
42780
|
+
FOOTNOTE_MARKER_GUTTER_PX as bA,
|
|
42781
|
+
resolveImporterForFile as bB,
|
|
42782
|
+
getDocumentSectionsCanonical as bC,
|
|
42783
|
+
getDocumentParagraphsCanonical as bD,
|
|
42784
|
+
getDocumentParagraphs as bE,
|
|
42785
|
+
getDocumentPageSettings as bF,
|
|
42786
|
+
getTableCellContentWidthForParagraph as bG,
|
|
42787
|
+
layoutMetricsEpoch as bH,
|
|
42788
|
+
bumpLayoutMetricsEpoch as bI,
|
|
42789
|
+
createCanvasLayoutSnapshotProvider as bJ,
|
|
42790
|
+
on as bK,
|
|
42791
|
+
debounce as bL,
|
|
42792
|
+
unwrap as bM,
|
|
42793
|
+
perfTimer as bN,
|
|
42794
|
+
getRunTextBox as bO,
|
|
42795
|
+
createEditorDocument as bP,
|
|
42796
|
+
resolveResizedDimensions as bQ,
|
|
42797
|
+
resolveTextBoxRenderHeight as bR,
|
|
42798
|
+
getToolbarStyleState as bS,
|
|
42799
|
+
getCachedCanvasImage as bT,
|
|
42800
|
+
measureParagraphMinContentWidthPx as bU,
|
|
42801
|
+
getEditableBlocksForZone as bV,
|
|
42802
|
+
findParagraphLocation as bW,
|
|
42803
|
+
createSectionBoundaryParagraph as bX,
|
|
42804
|
+
normalizePageSettings as bY,
|
|
42805
|
+
DEFAULT_EDITOR_PAGE_SETTINGS as bZ,
|
|
42806
|
+
markStart as b_,
|
|
42807
|
+
isWavyUnderlineStyle as ba,
|
|
42808
|
+
underlineStyleLineWidthPx as bb,
|
|
42809
|
+
WAVY_UNDERLINE_WAVELENGTH_PX as bc,
|
|
42810
|
+
WAVY_UNDERLINE_AMPLITUDE_PX as bd,
|
|
42811
|
+
underlineStyleDashArray as be,
|
|
42812
|
+
resolveListLabel as bf,
|
|
42813
|
+
getListLabelInset as bg,
|
|
42814
|
+
getAlignedListLabelInset as bh,
|
|
42815
|
+
getParagraphBorderInsets as bi,
|
|
42816
|
+
buildSegmentTable as bj,
|
|
42817
|
+
buildCanvasTableLayout as bk,
|
|
42818
|
+
resolveCanvasTableWidth as bl,
|
|
42819
|
+
resolveFloatingTableRect as bm,
|
|
42820
|
+
normalizeFamily as bn,
|
|
42821
|
+
ROBOTO_FONT_FILES as bo,
|
|
42822
|
+
loadFontAsset as bp,
|
|
42823
|
+
OFFICE_COMPAT_FONT_FAMILIES as bq,
|
|
42824
|
+
BinaryReader as br,
|
|
42825
|
+
buildSfnt as bs,
|
|
42826
|
+
defaultFontDecoderRegistry as bt,
|
|
42827
|
+
SfntFontProgram as bu,
|
|
42828
|
+
collectPdfFontFamilies as bv,
|
|
42829
|
+
outlineFrom as bw,
|
|
42830
|
+
getPageHeaderZoneTop as bx,
|
|
42831
|
+
getPageColumnRects as by,
|
|
42832
|
+
findFootnoteReference as bz,
|
|
42757
42833
|
getPageBodyBottom as c,
|
|
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
|
-
|
|
42812
|
-
|
|
42813
|
-
|
|
42814
|
-
|
|
42815
|
-
|
|
42816
|
-
|
|
42817
|
-
|
|
42818
|
-
|
|
42819
|
-
|
|
42820
|
-
|
|
42821
|
-
|
|
42834
|
+
createEditorCommandBus as c$,
|
|
42835
|
+
getParagraphEntries as c0,
|
|
42836
|
+
getParagraphById as c1,
|
|
42837
|
+
createEditorFootnote as c2,
|
|
42838
|
+
createFootnoteReferenceRun as c3,
|
|
42839
|
+
renumberFootnotes as c4,
|
|
42840
|
+
getHeadingLevel as c5,
|
|
42841
|
+
preciseFontModeVersion as c6,
|
|
42842
|
+
isPreciseFontModeEnabled as c7,
|
|
42843
|
+
resolveNamedTextStyle as c8,
|
|
42844
|
+
togglePreciseFontMode as c9,
|
|
42845
|
+
CommandRegistry as cA,
|
|
42846
|
+
DEFAULT_PALETTE as cB,
|
|
42847
|
+
DialogFooter as cC,
|
|
42848
|
+
FloatingActionButton as cD,
|
|
42849
|
+
GridPicker as cE,
|
|
42850
|
+
IconButton as cF,
|
|
42851
|
+
Menu as cG,
|
|
42852
|
+
OASIS_BUILTIN_COMMANDS as cH,
|
|
42853
|
+
OASIS_MENU_ITEMS as cI,
|
|
42854
|
+
OASIS_TOOLBAR_ITEMS as cJ,
|
|
42855
|
+
OasisEditorAppLazy as cK,
|
|
42856
|
+
OasisEditorContainer as cL,
|
|
42857
|
+
PluginCollection as cM,
|
|
42858
|
+
Popover as cN,
|
|
42859
|
+
RIBBON_TABS as cO,
|
|
42860
|
+
Select as cP,
|
|
42861
|
+
SelectField as cQ,
|
|
42862
|
+
Separator as cR,
|
|
42863
|
+
SidePanel as cS,
|
|
42864
|
+
SidePanelBody as cT,
|
|
42865
|
+
SidePanelFooter as cU,
|
|
42866
|
+
SidePanelHeader as cV,
|
|
42867
|
+
SplitButton as cW,
|
|
42868
|
+
StyleGallery as cX,
|
|
42869
|
+
TextField as cY,
|
|
42870
|
+
Button$1 as cZ,
|
|
42871
|
+
buildRibbonTabDefinitions as c_,
|
|
42872
|
+
nextFontSizePt as ca,
|
|
42873
|
+
previousFontSizePt as cb,
|
|
42874
|
+
fontSizePtToPx as cc,
|
|
42875
|
+
createDefaultToolbarPreset as cd,
|
|
42876
|
+
MenuRegistry as ce,
|
|
42877
|
+
createToolbarRegistry as cf,
|
|
42878
|
+
Editor as cg,
|
|
42879
|
+
resolveCommandRef as ch,
|
|
42880
|
+
commandRefName as ci,
|
|
42881
|
+
createOasisEditorClient as cj,
|
|
42882
|
+
createEditorZoom as ck,
|
|
42883
|
+
startLongTaskObserver as cl,
|
|
42884
|
+
installGlobalReport as cm,
|
|
42885
|
+
applyStoredPreciseFontPreference as cn,
|
|
42886
|
+
getWelcomeSeen as co,
|
|
42887
|
+
isLocalFontAccessSupported as cp,
|
|
42888
|
+
EDITOR_SCROLL_PADDING_PX as cq,
|
|
42889
|
+
Toolbar as cr,
|
|
42890
|
+
OasisEditorLoading as cs,
|
|
42891
|
+
I18nProvider as ct,
|
|
42892
|
+
createTranslator as cu,
|
|
42893
|
+
createEditorLogger as cv,
|
|
42894
|
+
registerDomStatsSurface as cw,
|
|
42895
|
+
Button as cx,
|
|
42896
|
+
Checkbox as cy,
|
|
42897
|
+
ColorPicker as cz,
|
|
42822
42898
|
domTextMeasurer as d,
|
|
42899
|
+
createOasisEditor as d0,
|
|
42900
|
+
createOasisEditorContainer as d1,
|
|
42901
|
+
mount as d2,
|
|
42902
|
+
registerToolbarRenderer as d3,
|
|
42823
42903
|
estimateTableBlockHeight as e,
|
|
42824
42904
|
getFootnoteDisplayMarker as f,
|
|
42825
42905
|
getProjectedParagraphBlockHeight as g,
|