oasis-editor 0.0.71 → 0.0.73
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-Cy7UGzeb.js → OasisEditorApp-BkJmlejJ.js} +84 -72
- package/dist/assets/{importDocxWorker-Bn1fun73.js → importDocxWorker-CmygfpkG.js} +1 -1
- package/dist/{index-BBQr5P8i.js → index-ByZZP8TQ.js} +93 -73
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +2 -2
- package/package.json +1 -1
|
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2483
2483
|
onCleanup(() => {
|
|
2484
2484
|
cancelled = true;
|
|
2485
2485
|
});
|
|
2486
|
-
import("./OasisEditorApp-
|
|
2486
|
+
import("./OasisEditorApp-BkJmlejJ.js").then((m) => {
|
|
2487
2487
|
cancelled = true;
|
|
2488
2488
|
setProgress(1);
|
|
2489
2489
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -3644,13 +3644,18 @@ function collectNumberingParagraphs(document2) {
|
|
|
3644
3644
|
};
|
|
3645
3645
|
const collectBlocks2 = (blocks) => {
|
|
3646
3646
|
for (const block of blocks) {
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3647
|
+
switch (block.type) {
|
|
3648
|
+
case "paragraph":
|
|
3649
|
+
result.push(block);
|
|
3650
|
+
collectTextBoxes(block);
|
|
3651
|
+
break;
|
|
3652
|
+
case "table":
|
|
3653
|
+
for (const row of block.rows) {
|
|
3654
|
+
for (const cell of row.cells) collectBlocks2(cell.blocks);
|
|
3655
|
+
}
|
|
3656
|
+
break;
|
|
3657
|
+
default:
|
|
3658
|
+
assertNever(block, "block");
|
|
3654
3659
|
}
|
|
3655
3660
|
}
|
|
3656
3661
|
};
|
|
@@ -3730,7 +3735,7 @@ function getEditableBlocksForZone(state, zone) {
|
|
|
3730
3735
|
}
|
|
3731
3736
|
function getParagraphs(state) {
|
|
3732
3737
|
return getEditableBlocksForZone(state, getActiveZone(state)).flatMap(
|
|
3733
|
-
|
|
3738
|
+
getBlockParagraphs
|
|
3734
3739
|
);
|
|
3735
3740
|
}
|
|
3736
3741
|
function findParagraphIndex(paragraphs, paragraphId) {
|
|
@@ -14073,32 +14078,41 @@ function renumberFootnotes(document2) {
|
|
|
14073
14078
|
if (!blocks) return blocks;
|
|
14074
14079
|
let blockChanged = false;
|
|
14075
14080
|
const nextBlocks = blocks.map((block) => {
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14081
|
+
switch (block.type) {
|
|
14082
|
+
case "paragraph": {
|
|
14083
|
+
const updated = rewriteParagraphMarkers$1(block, markerByFootnoteId);
|
|
14084
|
+
if (updated !== block) blockChanged = true;
|
|
14085
|
+
return updated;
|
|
14086
|
+
}
|
|
14087
|
+
case "table": {
|
|
14088
|
+
let tableChanged = false;
|
|
14089
|
+
const nextRows = block.rows.map((row) => {
|
|
14090
|
+
let rowChanged = false;
|
|
14091
|
+
const nextCells = row.cells.map((cell) => {
|
|
14092
|
+
let cellChanged = false;
|
|
14093
|
+
const nextCellBlocks = cell.blocks.map((p) => {
|
|
14094
|
+
const updated = rewriteParagraphMarkers$1(
|
|
14095
|
+
p,
|
|
14096
|
+
markerByFootnoteId
|
|
14097
|
+
);
|
|
14098
|
+
if (updated !== p) cellChanged = true;
|
|
14099
|
+
return updated;
|
|
14100
|
+
});
|
|
14101
|
+
if (!cellChanged) return cell;
|
|
14102
|
+
rowChanged = true;
|
|
14103
|
+
return { ...cell, blocks: nextCellBlocks };
|
|
14104
|
+
});
|
|
14105
|
+
if (!rowChanged) return row;
|
|
14106
|
+
tableChanged = true;
|
|
14107
|
+
return { ...row, cells: nextCells };
|
|
14090
14108
|
});
|
|
14091
|
-
if (!
|
|
14092
|
-
|
|
14093
|
-
return { ...
|
|
14094
|
-
}
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
});
|
|
14099
|
-
if (!tableChanged) return block;
|
|
14100
|
-
blockChanged = true;
|
|
14101
|
-
return { ...block, rows: nextRows };
|
|
14109
|
+
if (!tableChanged) return block;
|
|
14110
|
+
blockChanged = true;
|
|
14111
|
+
return { ...block, rows: nextRows };
|
|
14112
|
+
}
|
|
14113
|
+
default:
|
|
14114
|
+
return assertNever(block, "block");
|
|
14115
|
+
}
|
|
14102
14116
|
});
|
|
14103
14117
|
if (!blockChanged) return blocks;
|
|
14104
14118
|
mutatedSections = true;
|
|
@@ -14227,32 +14241,38 @@ function renumberEndnotes(document2) {
|
|
|
14227
14241
|
if (!blocks) return blocks;
|
|
14228
14242
|
let blockChanged = false;
|
|
14229
14243
|
const nextBlocks = blocks.map((block) => {
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
+
switch (block.type) {
|
|
14245
|
+
case "paragraph": {
|
|
14246
|
+
const updated = rewriteParagraphMarkers(block, markerByEndnoteId);
|
|
14247
|
+
if (updated !== block) blockChanged = true;
|
|
14248
|
+
return updated;
|
|
14249
|
+
}
|
|
14250
|
+
case "table": {
|
|
14251
|
+
let tableChanged = false;
|
|
14252
|
+
const nextRows = block.rows.map((row) => {
|
|
14253
|
+
let rowChanged = false;
|
|
14254
|
+
const nextCells = row.cells.map((cell) => {
|
|
14255
|
+
let cellChanged = false;
|
|
14256
|
+
const nextCellBlocks = cell.blocks.map((p) => {
|
|
14257
|
+
const updated = rewriteParagraphMarkers(p, markerByEndnoteId);
|
|
14258
|
+
if (updated !== p) cellChanged = true;
|
|
14259
|
+
return updated;
|
|
14260
|
+
});
|
|
14261
|
+
if (!cellChanged) return cell;
|
|
14262
|
+
rowChanged = true;
|
|
14263
|
+
return { ...cell, blocks: nextCellBlocks };
|
|
14264
|
+
});
|
|
14265
|
+
if (!rowChanged) return row;
|
|
14266
|
+
tableChanged = true;
|
|
14267
|
+
return { ...row, cells: nextCells };
|
|
14244
14268
|
});
|
|
14245
|
-
if (!
|
|
14246
|
-
|
|
14247
|
-
return { ...
|
|
14248
|
-
}
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
});
|
|
14253
|
-
if (!tableChanged) return block;
|
|
14254
|
-
blockChanged = true;
|
|
14255
|
-
return { ...block, rows: nextRows };
|
|
14269
|
+
if (!tableChanged) return block;
|
|
14270
|
+
blockChanged = true;
|
|
14271
|
+
return { ...block, rows: nextRows };
|
|
14272
|
+
}
|
|
14273
|
+
default:
|
|
14274
|
+
return assertNever(block, "block");
|
|
14275
|
+
}
|
|
14256
14276
|
});
|
|
14257
14277
|
if (!blockChanged) return blocks;
|
|
14258
14278
|
mutatedSections = true;
|
|
@@ -35607,7 +35627,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
35607
35627
|
const worker = new Worker(
|
|
35608
35628
|
new URL(
|
|
35609
35629
|
/* @vite-ignore */
|
|
35610
|
-
"" + new URL("assets/importDocxWorker-
|
|
35630
|
+
"" + new URL("assets/importDocxWorker-CmygfpkG.js", import.meta.url).href,
|
|
35611
35631
|
import.meta.url
|
|
35612
35632
|
),
|
|
35613
35633
|
{
|
|
@@ -39971,7 +39991,7 @@ export {
|
|
|
39971
39991
|
PX_PER_INCH as Y,
|
|
39972
39992
|
TWIPS_PER_INCH as Z,
|
|
39973
39993
|
resolveEffectiveParagraphStyle as _,
|
|
39974
|
-
|
|
39994
|
+
assertNever as a,
|
|
39975
39995
|
createToolbarRegistry as a$,
|
|
39976
39996
|
EMU_PER_PT as a0,
|
|
39977
39997
|
iterateEndnoteReferenceRuns as a1,
|
|
@@ -40036,7 +40056,7 @@ export {
|
|
|
40036
40056
|
getPageHeaderZoneTop as ax,
|
|
40037
40057
|
getPageBodyTop as ay,
|
|
40038
40058
|
getPageColumnRects as az,
|
|
40039
|
-
|
|
40059
|
+
getParagraphLength as b,
|
|
40040
40060
|
DEFAULT_PALETTE as b$,
|
|
40041
40061
|
Editor as b0,
|
|
40042
40062
|
resolveCommandRef as b1,
|
|
@@ -40131,21 +40151,21 @@ export {
|
|
|
40131
40151
|
createOasisEditorContainer as cq,
|
|
40132
40152
|
mount as cr,
|
|
40133
40153
|
registerToolbarRenderer as cs,
|
|
40134
|
-
|
|
40135
|
-
|
|
40136
|
-
|
|
40154
|
+
createEditorRun as d,
|
|
40155
|
+
getDocumentSections as e,
|
|
40156
|
+
createEditorStyledRun as f,
|
|
40137
40157
|
getParagraphs as g,
|
|
40138
|
-
|
|
40158
|
+
getParagraphText as h,
|
|
40139
40159
|
isInlineObjectRun as i,
|
|
40140
|
-
|
|
40141
|
-
|
|
40142
|
-
|
|
40143
|
-
|
|
40160
|
+
getActiveZone as j,
|
|
40161
|
+
getActiveSectionIndex as k,
|
|
40162
|
+
paragraphOffsetToPosition as l,
|
|
40163
|
+
clampPosition as m,
|
|
40144
40164
|
normalizeSelection as n,
|
|
40145
|
-
|
|
40165
|
+
findParagraphIndex as o,
|
|
40146
40166
|
positionToParagraphOffset as p,
|
|
40147
|
-
|
|
40148
|
-
|
|
40167
|
+
createCollapsedSelection as q,
|
|
40168
|
+
isSelectionCollapsed as r,
|
|
40149
40169
|
createEditorParagraph as s,
|
|
40150
40170
|
getBlockParagraphs as t,
|
|
40151
40171
|
createEditorFootnote as u,
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b4, bX, bY, bZ, b_, b$, bm, c0, b5, b0, c1, c2, c3, b3, c4, a_, c5, c6, c7, c8, c9, bS, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, br, cl, bR, cm, bZ as bZ2, c2 as c22, c4 as c42, cd as cd2, cf as cf2, ck as ck2, cn, b2, aZ, co, cp, cq, a$, cr, cs, b1 } from "./index-
|
|
1
|
+
import { b4, bX, bY, bZ, b_, b$, bm, c0, b5, b0, c1, c2, c3, b3, c4, a_, c5, c6, c7, c8, c9, bS, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, br, cl, bR, cm, bZ as bZ2, c2 as c22, c4 as c42, cd as cd2, cf as cf2, ck as ck2, cn, b2, aZ, co, cp, cq, a$, cr, cs, b1 } from "./index-ByZZP8TQ.js";
|
|
2
2
|
export {
|
|
3
3
|
b4 as BalloonShell,
|
|
4
4
|
bX as Button,
|