oasis-editor 0.0.136 → 0.0.138
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-DPrjPRTW.js → OasisEditorApp-DMI2ZfOd.js} +561 -115
- package/dist/app/controllers/animationFrame.d.ts +2 -0
- package/dist/app/controllers/tableResize/tableResizeDom.d.ts +3 -3
- package/dist/app/controllers/tableResize/tableResizeHitTest.d.ts +1 -1
- package/dist/app/controllers/tableResize/tableResizeTypes.d.ts +1 -0
- package/dist/app/controllers/useEditorTableCornerResize.d.ts +1 -0
- package/dist/app/controllers/useEditorTableDrag.d.ts +2 -0
- package/dist/assets/{importDocxWorker-B0cSSI12.js → importDocxWorker-DBjcGf-C.js} +1 -1
- package/dist/core/commands/table/tableCellStyleCommands.d.ts +3 -0
- package/dist/core/commands/table/tableRowCommands.d.ts +1 -0
- package/dist/core/editorState/defaultStyles.d.ts +1 -0
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/nodes.d.ts +123 -5
- package/dist/export/docx/text/sdtXml.d.ts +10 -0
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/pt-BR.d.ts +4 -0
- package/dist/import/docx/contentControls.d.ts +9 -0
- package/dist/import/docx/tableProperties.d.ts +1 -14
- package/dist/{index-Cbwb1bgI.js → index-M7h7REmM.js} +691 -488
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +49 -49
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/OasisEditorEditorProps.d.ts +0 -1
- package/dist/ui/app/EditorWorkspace.d.ts +0 -1
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +1 -0
- package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +0 -1
- package/dist/ui/components/Toolbar/presets/defaultToolbar/buttonSpecs.d.ts +1 -0
- package/dist/ui/components/Toolbar/primitives/useSurfaceRect.d.ts +2 -2
- package/dist/ui/editorHistory.d.ts +2 -0
- package/dist/ui/shells/DocumentShell.d.ts +1 -2
- package/package.json +1 -1
- package/dist/ui/components/FloatingToolbar/FloatingTableToolbar.d.ts +0 -11
|
@@ -1667,9 +1667,13 @@ const en = {
|
|
|
1667
1667
|
"table.mergeTooltip": "Merge selected cells",
|
|
1668
1668
|
"table.split": "Split",
|
|
1669
1669
|
"table.splitTooltip": "Split selected cells",
|
|
1670
|
+
"table.insertLeft": "Left",
|
|
1671
|
+
"table.insertRight": "Right",
|
|
1670
1672
|
"table.insertColumnLeft": "Insert column left",
|
|
1671
1673
|
"table.insertColumnRight": "Insert column right",
|
|
1672
1674
|
"table.deleteColumn": "Delete column",
|
|
1675
|
+
"table.insertAbove": "Above",
|
|
1676
|
+
"table.insertBelow": "Below",
|
|
1673
1677
|
"table.insertRowAbove": "Insert row above",
|
|
1674
1678
|
"table.insertRowBelow": "Insert row below",
|
|
1675
1679
|
"table.deleteRow": "Delete row",
|
|
@@ -2245,9 +2249,13 @@ const ptBR = {
|
|
|
2245
2249
|
"table.mergeTooltip": "Mesclar células selecionadas",
|
|
2246
2250
|
"table.split": "Dividir",
|
|
2247
2251
|
"table.splitTooltip": "Dividir células selecionadas",
|
|
2252
|
+
"table.insertLeft": "À esquerda",
|
|
2253
|
+
"table.insertRight": "À direita",
|
|
2248
2254
|
"table.insertColumnLeft": "Inserir coluna à esquerda",
|
|
2249
2255
|
"table.insertColumnRight": "Inserir coluna à direita",
|
|
2250
2256
|
"table.deleteColumn": "Excluir coluna",
|
|
2257
|
+
"table.insertAbove": "Acima",
|
|
2258
|
+
"table.insertBelow": "Abaixo",
|
|
2251
2259
|
"table.insertRowAbove": "Inserir linha acima",
|
|
2252
2260
|
"table.insertRowBelow": "Inserir linha abaixo",
|
|
2253
2261
|
"table.deleteRow": "Excluir linha",
|
|
@@ -2624,14 +2632,14 @@ function I18nProvider(props) {
|
|
|
2624
2632
|
});
|
|
2625
2633
|
}
|
|
2626
2634
|
const oasisMarkBase64 = "UklGRmQXAABXRUJQ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P4sabdMsauWXINaIyR9ClOZLdIZQVGHUgLjxKW6YiFUs72zTJmKtf/RovsidqZlmEXrWGZ3UuGplChFUtjEkvwi2XxICgc0grD+9/tRt47usAAADGbVjPUInsKZHILQ8Tdvbj09q/9k2Mg7uynD2e+HudOmr+jOK+SyWmKsSZ4pH89FUSffyxPKUMVNp8o1m1apG/WDvwhmHllHVfELy0BgfyAIevaAuIOzl4NX3ayQnv+tsCnIGxjvF1IwPLyoflKFrL2OBFh3pJ57ChDdzSC9IDKqpaycKVMm2mWUPGBLK2cpD+b4VPleMoNCtKZz4AileaHHtk77gduJB8sihmMPR1lV1Vba4pOywdJgGueqt4IcTd2RJFxeSRNjuzHcR4tYGdli66ijJZC20ODhr8miT+cauMIflgiAAAAA=";
|
|
2627
|
-
var _tmpl$$
|
|
2635
|
+
var _tmpl$$1a = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
2628
2636
|
const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
|
|
2629
2637
|
const MARK_ASPECT = 3 / 4;
|
|
2630
2638
|
function OasisBrandMark(props) {
|
|
2631
2639
|
const height = () => props.height ?? 64;
|
|
2632
2640
|
const width = () => Math.round(height() * MARK_ASPECT);
|
|
2633
2641
|
return (() => {
|
|
2634
|
-
var _el$ = _tmpl$$
|
|
2642
|
+
var _el$ = _tmpl$$1a();
|
|
2635
2643
|
setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
|
|
2636
2644
|
setAttribute(_el$, "draggable", false);
|
|
2637
2645
|
createRenderEffect((_p$) => {
|
|
@@ -2648,7 +2656,7 @@ function OasisBrandMark(props) {
|
|
|
2648
2656
|
return _el$;
|
|
2649
2657
|
})();
|
|
2650
2658
|
}
|
|
2651
|
-
var _tmpl$$
|
|
2659
|
+
var _tmpl$$19 = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$K = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$w = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2652
2660
|
function OasisEditorLoading(props) {
|
|
2653
2661
|
const t = useI18n();
|
|
2654
2662
|
const variant = () => props.variant ?? "overlay";
|
|
@@ -2669,7 +2677,7 @@ function OasisEditorLoading(props) {
|
|
|
2669
2677
|
return pct() != null;
|
|
2670
2678
|
},
|
|
2671
2679
|
get children() {
|
|
2672
|
-
var _el$6 = _tmpl$$
|
|
2680
|
+
var _el$6 = _tmpl$$19();
|
|
2673
2681
|
insert(_el$6, (() => {
|
|
2674
2682
|
var _c$ = memo(() => !!isDone());
|
|
2675
2683
|
return () => _c$() ? _tmpl$3$w() : `${pct()}%`;
|
|
@@ -2723,7 +2731,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2723
2731
|
onCleanup(() => {
|
|
2724
2732
|
cancelled = true;
|
|
2725
2733
|
});
|
|
2726
|
-
import("./OasisEditorApp-
|
|
2734
|
+
import("./OasisEditorApp-DMI2ZfOd.js").then((m) => {
|
|
2727
2735
|
cancelled = true;
|
|
2728
2736
|
setProgress(1);
|
|
2729
2737
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -3462,6 +3470,114 @@ const TWIPS_PER_POINT = 20;
|
|
|
3462
3470
|
const OOXML_PERCENT_DENOMINATOR = 1e5;
|
|
3463
3471
|
const OOXML_ROTATION_UNITS = 6e4;
|
|
3464
3472
|
const DEFAULT_FONT_SIZE_PX = 14.6667;
|
|
3473
|
+
const TABLE_ACCENTS = [
|
|
3474
|
+
{ accent: "#4472c4", tint: "#d9e2f3" },
|
|
3475
|
+
{ accent: "#ed7d31", tint: "#fce4d6" },
|
|
3476
|
+
{ accent: "#a5a5a5", tint: "#e7e6e6" },
|
|
3477
|
+
{ accent: "#ffc000", tint: "#fff2cc" },
|
|
3478
|
+
{ accent: "#5b9bd5", tint: "#ddebf7" },
|
|
3479
|
+
{ accent: "#70ad47", tint: "#e2f0d9" }
|
|
3480
|
+
];
|
|
3481
|
+
const tableBorder = (color) => ({
|
|
3482
|
+
width: 0.5,
|
|
3483
|
+
type: "solid",
|
|
3484
|
+
color
|
|
3485
|
+
});
|
|
3486
|
+
function accentTableStyle(index, palette, medium) {
|
|
3487
|
+
const id = `${medium ? "MediumShading1" : "LightShading"}-Accent${index}`;
|
|
3488
|
+
const border = tableBorder(medium ? "#ffffff" : palette.accent);
|
|
3489
|
+
return {
|
|
3490
|
+
id,
|
|
3491
|
+
name: `${medium ? "Medium Shading 1" : "Light Shading"} Accent ${index}`,
|
|
3492
|
+
type: "table",
|
|
3493
|
+
qFormat: true,
|
|
3494
|
+
uiPriority: (medium ? 40 : 20) + index,
|
|
3495
|
+
tableStyle: {
|
|
3496
|
+
rowBandSize: 1,
|
|
3497
|
+
tblLook: {
|
|
3498
|
+
firstRow: true,
|
|
3499
|
+
lastRow: false,
|
|
3500
|
+
firstCol: false,
|
|
3501
|
+
lastCol: false,
|
|
3502
|
+
noHBand: false,
|
|
3503
|
+
noVBand: true
|
|
3504
|
+
},
|
|
3505
|
+
borders: {
|
|
3506
|
+
borderTop: border,
|
|
3507
|
+
borderRight: border,
|
|
3508
|
+
borderBottom: border,
|
|
3509
|
+
borderLeft: border,
|
|
3510
|
+
borderInsideH: border,
|
|
3511
|
+
borderInsideV: border
|
|
3512
|
+
},
|
|
3513
|
+
conditionalFormats: {
|
|
3514
|
+
wholeTable: {
|
|
3515
|
+
shading: medium ? palette.tint : "#ffffff"
|
|
3516
|
+
},
|
|
3517
|
+
firstRow: {
|
|
3518
|
+
shading: palette.accent,
|
|
3519
|
+
textStyle: { bold: true, color: "#ffffff" }
|
|
3520
|
+
},
|
|
3521
|
+
band1Horz: { shading: palette.tint }
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
};
|
|
3525
|
+
}
|
|
3526
|
+
const DEFAULT_TABLE_STYLES = {
|
|
3527
|
+
TableNormal: {
|
|
3528
|
+
id: "TableNormal",
|
|
3529
|
+
name: "Table Normal",
|
|
3530
|
+
type: "table",
|
|
3531
|
+
isDefault: true,
|
|
3532
|
+
uiPriority: 0,
|
|
3533
|
+
tableStyle: {
|
|
3534
|
+
tblLook: {
|
|
3535
|
+
firstRow: false,
|
|
3536
|
+
lastRow: false,
|
|
3537
|
+
firstCol: false,
|
|
3538
|
+
lastCol: false,
|
|
3539
|
+
noHBand: true,
|
|
3540
|
+
noVBand: true
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
},
|
|
3544
|
+
TableGrid: {
|
|
3545
|
+
id: "TableGrid",
|
|
3546
|
+
name: "Table Grid",
|
|
3547
|
+
type: "table",
|
|
3548
|
+
qFormat: true,
|
|
3549
|
+
uiPriority: 1,
|
|
3550
|
+
tableStyle: {
|
|
3551
|
+
borders: {
|
|
3552
|
+
borderTop: tableBorder("#7f7f7f"),
|
|
3553
|
+
borderRight: tableBorder("#7f7f7f"),
|
|
3554
|
+
borderBottom: tableBorder("#7f7f7f"),
|
|
3555
|
+
borderLeft: tableBorder("#7f7f7f"),
|
|
3556
|
+
borderInsideH: tableBorder("#7f7f7f"),
|
|
3557
|
+
borderInsideV: tableBorder("#7f7f7f")
|
|
3558
|
+
},
|
|
3559
|
+
tblLook: {
|
|
3560
|
+
firstRow: false,
|
|
3561
|
+
lastRow: false,
|
|
3562
|
+
firstCol: false,
|
|
3563
|
+
lastCol: false,
|
|
3564
|
+
noHBand: true,
|
|
3565
|
+
noVBand: true
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
},
|
|
3569
|
+
...Object.fromEntries(
|
|
3570
|
+
TABLE_ACCENTS.flatMap((palette, offset) => {
|
|
3571
|
+
const index = offset + 1;
|
|
3572
|
+
const light = accentTableStyle(index, palette, false);
|
|
3573
|
+
const medium = accentTableStyle(index, palette, true);
|
|
3574
|
+
return [
|
|
3575
|
+
[light.id, light],
|
|
3576
|
+
[medium.id, medium]
|
|
3577
|
+
];
|
|
3578
|
+
})
|
|
3579
|
+
)
|
|
3580
|
+
};
|
|
3465
3581
|
const DEFAULT_EDITOR_STYLES = {
|
|
3466
3582
|
normal: {
|
|
3467
3583
|
id: "normal",
|
|
@@ -3598,7 +3714,8 @@ const DEFAULT_EDITOR_STYLES = {
|
|
|
3598
3714
|
fontSize: 12,
|
|
3599
3715
|
italic: true
|
|
3600
3716
|
}
|
|
3601
|
-
}
|
|
3717
|
+
},
|
|
3718
|
+
...DEFAULT_TABLE_STYLES
|
|
3602
3719
|
};
|
|
3603
3720
|
function assertNever(value, label = "value") {
|
|
3604
3721
|
const tag = value && typeof value === "object" && "type" in value ? value.type : value;
|
|
@@ -4593,6 +4710,12 @@ function resolveEffectiveTableCellFormatting(options) {
|
|
|
4593
4710
|
conditionalKeys: keys
|
|
4594
4711
|
};
|
|
4595
4712
|
}
|
|
4713
|
+
function withDefaultTableStyles(styles) {
|
|
4714
|
+
const defaults = Object.fromEntries(
|
|
4715
|
+
Object.entries(DEFAULT_TABLE_STYLES).filter(([id]) => !(id in styles))
|
|
4716
|
+
);
|
|
4717
|
+
return { ...styles, ...defaults };
|
|
4718
|
+
}
|
|
4596
4719
|
function createEditorDocument(blocks, pageSettings, sections, styles, metadata, assets) {
|
|
4597
4720
|
const normalizedPageSettings = normalizePageSettings(
|
|
4598
4721
|
pageSettings ? {
|
|
@@ -4618,7 +4741,7 @@ function createEditorDocument(blocks, pageSettings, sections, styles, metadata,
|
|
|
4618
4741
|
pageSettings: normalizedPageSettings
|
|
4619
4742
|
}
|
|
4620
4743
|
],
|
|
4621
|
-
styles: styles
|
|
4744
|
+
styles: styles ? withDefaultTableStyles(styles) : { ...DEFAULT_EDITOR_STYLES },
|
|
4622
4745
|
metadata: metadata ?? { title: "Untitled document" },
|
|
4623
4746
|
// The asset registry holds out-of-band image payloads (data URLs).
|
|
4624
4747
|
// It must be carried through any document-rebuild path or `asset:<id>`
|
|
@@ -5330,10 +5453,10 @@ function mount(target, props = {}) {
|
|
|
5330
5453
|
unmount: () => client.dispose()
|
|
5331
5454
|
});
|
|
5332
5455
|
}
|
|
5333
|
-
var _tmpl$$
|
|
5456
|
+
var _tmpl$$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$J = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$v = /* @__PURE__ */ template(`<svg><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1</svg>`, false, true, false), _tmpl$4$l = /* @__PURE__ */ template(`<svg><g><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25></svg>`, false, true, false), _tmpl$5$d = /* @__PURE__ */ template(`<svg><polyline points="4 7 7 4 10 7"></svg>`, false, true, false), _tmpl$6$a = /* @__PURE__ */ template(`<svg><line x1=7 y1=4 x2=7 y2=20></svg>`, false, true, false), _tmpl$7$5 = /* @__PURE__ */ template(`<svg><polyline points="4 17 7 20 10 17"></svg>`, false, true, false), _tmpl$8$3 = /* @__PURE__ */ template(`<svg><line x1=13 y1=6 x2=21 y2=6></svg>`, false, true, false), _tmpl$9$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=12 x2=21 y2=12></svg>`, false, true, false), _tmpl$0$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=18 x2=21 y2=18></svg>`, false, true, false), _tmpl$1$1 = /* @__PURE__ */ template(`<svg><rect x=5.25 y=5.25 width=13.5 height=13.5 rx=0.7></svg>`, false, true, false), _tmpl$10 = /* @__PURE__ */ template(`<svg><path d="M9.75 5.25v13.5M14.25 5.25v13.5M5.25 9.75h13.5M5.25 14.25h13.5"></svg>`, false, true, false), _tmpl$11 = /* @__PURE__ */ template(`<svg><path d="M12 1.75v3M10.5 3.25 12 1.75l1.5 1.5"></svg>`, false, true, false), _tmpl$12 = /* @__PURE__ */ template(`<svg><path d="M5.25 8h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$13 = /* @__PURE__ */ template(`<svg><path d="M12 22.25v-3M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$14 = /* @__PURE__ */ template(`<svg><path d="M5.25 16h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$15 = /* @__PURE__ */ template(`<svg><path d="M4.5 12h15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$16 = /* @__PURE__ */ template(`<svg><path d="M1.75 12h3M3.25 10.5 1.75 12l1.5 1.5"></svg>`, false, true, false), _tmpl$17 = /* @__PURE__ */ template(`<svg><path d="M8 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$18 = /* @__PURE__ */ template(`<svg><path d="M22.25 12h-3M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$19 = /* @__PURE__ */ template(`<svg><path d="M16 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$20 = /* @__PURE__ */ template(`<svg><path d="M12 4.5v15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$21 = /* @__PURE__ */ template(`<svg><path d="M7.25 12h9.5M9.25 10l-2 2 2 2M14.75 10l2 2-2 2"stroke-width=2></svg>`, false, true, false), _tmpl$22 = /* @__PURE__ */ template(`<svg><path d="M12 8v8M10 10l2-2 2 2M10 14l2 2 2-2"stroke-width=2></svg>`, false, true, false), _tmpl$23 = /* @__PURE__ */ template(`<svg><path d="M3 21h18M4.5 19.5 3 21l1.5 1.5M19.5 19.5 21 21l-1.5 1.5"></svg>`, false, true, false), _tmpl$24 = /* @__PURE__ */ template(`<svg><path d="M2.5 6h19M2.5 18h19M12 1.75v2.5M10.5 3.25 12 1.75l1.5 1.5M12 22.25v-2.5M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$25 = /* @__PURE__ */ template(`<svg><path d="M6 2.5v19M18 2.5v19M1.75 12h2.5M3.25 10.5 1.75 12l1.5 1.5M22.25 12h-2.5M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$26 = /* @__PURE__ */ template(`<svg><path d="M2 21h20M5 19 2 21l3 2M19 19l3 2-3 2M8 12h8M10 10l-2 2 2 2M14 10l2 2-2 2"></svg>`, false, true, false), _tmpl$27 = /* @__PURE__ */ template(`<svg><rect x=4 y=4 width=16 height=16 rx=0.8></svg>`, false, true, false), _tmpl$28 = /* @__PURE__ */ template(`<svg><path></svg>`, false, true, false), _tmpl$29 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke-width=2></svg>`, false, true, false), _tmpl$30 = /* @__PURE__ */ template(`<svg><rect x=5 y=5 width=14 height=14 rx=0.8 stroke-dasharray="2.5 2"></svg>`, false, true, false), _tmpl$31 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke=#d14343 stroke-width=2.1></svg>`, false, true, false), _tmpl$32 = /* @__PURE__ */ template(`<svg><polyline points="20 6 9 17 4 12"></svg>`, false, true, false), _tmpl$33 = /* @__PURE__ */ template(`<i>`);
|
|
5334
5457
|
function SvgIcon(props) {
|
|
5335
5458
|
return (() => {
|
|
5336
|
-
var _el$ = _tmpl$$
|
|
5459
|
+
var _el$ = _tmpl$$18();
|
|
5337
5460
|
insert(_el$, () => props.children);
|
|
5338
5461
|
createRenderEffect((_p$) => {
|
|
5339
5462
|
var _v$ = props.width ?? 24, _v$2 = props.height ?? 24, _v$3 = props.viewBox ?? "0 0 24 24", _v$4 = props.fill ?? "none", _v$5 = props.stroke, _v$6 = props["stroke-width"], _v$7 = props["stroke-linecap"], _v$8 = props["stroke-linejoin"], _v$9 = props.class;
|
|
@@ -5541,11 +5664,11 @@ function ToolIcon(props) {
|
|
|
5541
5664
|
children: (render2) => render2()()
|
|
5542
5665
|
});
|
|
5543
5666
|
}
|
|
5544
|
-
var _tmpl$$
|
|
5667
|
+
var _tmpl$$17 = /* @__PURE__ */ template(`<button>`);
|
|
5545
5668
|
function SurfaceButton(props) {
|
|
5546
5669
|
const [local, others] = splitProps(props, ["type", "icon", "label", "variant", "size", "active", "class", "classList", "children"]);
|
|
5547
5670
|
return (() => {
|
|
5548
|
-
var _el$ = _tmpl$$
|
|
5671
|
+
var _el$ = _tmpl$$17();
|
|
5549
5672
|
spread(_el$, mergeProps({
|
|
5550
5673
|
get type() {
|
|
5551
5674
|
return local.type ?? "button";
|
|
@@ -5606,7 +5729,7 @@ function Text$1(props) {
|
|
|
5606
5729
|
}
|
|
5607
5730
|
}));
|
|
5608
5731
|
}
|
|
5609
|
-
var _tmpl$$
|
|
5732
|
+
var _tmpl$$16 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$I = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$u = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$k = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$c = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$9 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
|
|
5610
5733
|
function Menubar(props) {
|
|
5611
5734
|
const t = useI18n();
|
|
5612
5735
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
@@ -5674,7 +5797,7 @@ function Menubar(props) {
|
|
|
5674
5797
|
});
|
|
5675
5798
|
const topLevelItems = () => pruneTree(menuTree());
|
|
5676
5799
|
return (() => {
|
|
5677
|
-
var _el$ = _tmpl$$
|
|
5800
|
+
var _el$ = _tmpl$$16();
|
|
5678
5801
|
insert(_el$, createComponent(For, {
|
|
5679
5802
|
get each() {
|
|
5680
5803
|
return topLevelItems();
|
|
@@ -5848,10 +5971,10 @@ function MenuNode(props) {
|
|
|
5848
5971
|
}
|
|
5849
5972
|
});
|
|
5850
5973
|
}
|
|
5851
|
-
var _tmpl$$
|
|
5974
|
+
var _tmpl$$15 = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
|
|
5852
5975
|
function TitleBar(props) {
|
|
5853
5976
|
return (() => {
|
|
5854
|
-
var _el$ = _tmpl$$
|
|
5977
|
+
var _el$ = _tmpl$$15(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
5855
5978
|
insert(_el$3, () => props.children);
|
|
5856
5979
|
return _el$;
|
|
5857
5980
|
})();
|
|
@@ -5946,7 +6069,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
5946
6069
|
);
|
|
5947
6070
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
5948
6071
|
}
|
|
5949
|
-
var _tmpl$$
|
|
6072
|
+
var _tmpl$$14 = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$H = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$t = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$b = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
5950
6073
|
function OutlinePanel(props) {
|
|
5951
6074
|
const t = useI18n();
|
|
5952
6075
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
@@ -6023,7 +6146,7 @@ function OutlinePanel(props) {
|
|
|
6023
6146
|
return !collapsed();
|
|
6024
6147
|
},
|
|
6025
6148
|
get children() {
|
|
6026
|
-
var _el$3 = _tmpl$$
|
|
6149
|
+
var _el$3 = _tmpl$$14();
|
|
6027
6150
|
insert(_el$3, () => t("menu.view.outline") || "Outline");
|
|
6028
6151
|
return _el$3;
|
|
6029
6152
|
}
|
|
@@ -6091,7 +6214,7 @@ function OutlinePanel(props) {
|
|
|
6091
6214
|
})();
|
|
6092
6215
|
}
|
|
6093
6216
|
delegateEvents(["click"]);
|
|
6094
|
-
var _tmpl$$
|
|
6217
|
+
var _tmpl$$13 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-overflow-manager style="display:flex;align-items:center;flex:1 1 0%;min-width:0;position:relative;margin-right:8px"><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-toolbar-more-measure"aria-hidden=true tabindex=-1 style=position:absolute;visibility:hidden;pointer-events:none;right:0><i data-lucide=ellipsis></i></button><div style="display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;overflow:hidden"></div><div style=flex-shrink:0;padding-left:8px;padding-right:16px;align-items:center><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"data-testid=editor-toolbar-overflow-dropdown><i data-lucide=ellipsis></i></button></div><div class="oasis-editor-toolbar-overflow-dropdown-menu oasis-editor-toolbar-overflow-menu"style="flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;background:var(--oasis-paper);border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:calc(100vw - 16px);overflow-x:hidden;overflow-y:auto">`), _tmpl$2$G = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
6095
6218
|
function ToolbarOverflowManager(props) {
|
|
6096
6219
|
const t = useI18n();
|
|
6097
6220
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
@@ -6235,7 +6358,7 @@ function ToolbarOverflowManager(props) {
|
|
|
6235
6358
|
};
|
|
6236
6359
|
};
|
|
6237
6360
|
return (() => {
|
|
6238
|
-
var _el$ = _tmpl$$
|
|
6361
|
+
var _el$ = _tmpl$$13(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
6239
6362
|
var _ref$ = containerRef;
|
|
6240
6363
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
6241
6364
|
var _ref$2 = moreMeasureRef;
|
|
@@ -6323,7 +6446,7 @@ function resolveLabel(item, api) {
|
|
|
6323
6446
|
if (item.labelKey) return api.t(item.labelKey);
|
|
6324
6447
|
return void 0;
|
|
6325
6448
|
}
|
|
6326
|
-
var _tmpl$$
|
|
6449
|
+
var _tmpl$$12 = /* @__PURE__ */ template(`<span>`), _tmpl$2$F = /* @__PURE__ */ template(`<button type=button>`);
|
|
6327
6450
|
function Button$1(props) {
|
|
6328
6451
|
const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
6329
6452
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
@@ -6365,7 +6488,7 @@ function Button$1(props) {
|
|
|
6365
6488
|
return local.label;
|
|
6366
6489
|
},
|
|
6367
6490
|
get children() {
|
|
6368
|
-
var _el$2 = _tmpl$$
|
|
6491
|
+
var _el$2 = _tmpl$$12();
|
|
6369
6492
|
insert(_el$2, () => local.label);
|
|
6370
6493
|
return _el$2;
|
|
6371
6494
|
}
|
|
@@ -6447,7 +6570,7 @@ function useDismiss(options) {
|
|
|
6447
6570
|
});
|
|
6448
6571
|
});
|
|
6449
6572
|
}
|
|
6450
|
-
var _tmpl$$
|
|
6573
|
+
var _tmpl$$11 = /* @__PURE__ */ template(`<div>`);
|
|
6451
6574
|
function Popover(props) {
|
|
6452
6575
|
let anchorRef;
|
|
6453
6576
|
let panelRef;
|
|
@@ -6464,7 +6587,7 @@ function Popover(props) {
|
|
|
6464
6587
|
closeOnEscape: props.closeOnEscape
|
|
6465
6588
|
});
|
|
6466
6589
|
const panel = (portalled) => (() => {
|
|
6467
|
-
var _el$ = _tmpl$$
|
|
6590
|
+
var _el$ = _tmpl$$11();
|
|
6468
6591
|
addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
|
|
6469
6592
|
var _ref$ = panelRef;
|
|
6470
6593
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
@@ -6516,15 +6639,15 @@ function Popover(props) {
|
|
|
6516
6639
|
}
|
|
6517
6640
|
})];
|
|
6518
6641
|
}
|
|
6519
|
-
var _tmpl$$
|
|
6642
|
+
var _tmpl$$10 = /* @__PURE__ */ template(`<i data-lucide=chevron-down>`);
|
|
6520
6643
|
function DropdownChevron(props) {
|
|
6521
6644
|
return (() => {
|
|
6522
|
-
var _el$ = _tmpl$$
|
|
6645
|
+
var _el$ = _tmpl$$10();
|
|
6523
6646
|
createRenderEffect(() => className(_el$, `oasis-editor-dropdown-chevron${props.class ? ` ${props.class}` : ""}`));
|
|
6524
6647
|
return _el$;
|
|
6525
6648
|
})();
|
|
6526
6649
|
}
|
|
6527
|
-
var _tmpl
|
|
6650
|
+
var _tmpl$$$ = /* @__PURE__ */ template(`<div>`), _tmpl$2$E = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$s = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$4$i = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
|
|
6528
6651
|
function Menu(props) {
|
|
6529
6652
|
const [open, setOpen] = createSignal(false);
|
|
6530
6653
|
const ariaLabel = () => props.tooltip || props.label || "";
|
|
@@ -6599,7 +6722,7 @@ function Menu(props) {
|
|
|
6599
6722
|
return _el$3;
|
|
6600
6723
|
})(),
|
|
6601
6724
|
get children() {
|
|
6602
|
-
var _el$2 = _tmpl
|
|
6725
|
+
var _el$2 = _tmpl$$$();
|
|
6603
6726
|
_el$2.$$click = (event) => {
|
|
6604
6727
|
const el = event.target;
|
|
6605
6728
|
if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
|
|
@@ -6614,7 +6737,7 @@ function Menu(props) {
|
|
|
6614
6737
|
})();
|
|
6615
6738
|
}
|
|
6616
6739
|
delegateEvents(["click"]);
|
|
6617
|
-
var _tmpl
|
|
6740
|
+
var _tmpl$$_ = /* @__PURE__ */ template(`<select>`), _tmpl$2$D = /* @__PURE__ */ template(`<span class=oasis-editor-tool-select-ribbon-large-label>`), _tmpl$3$r = /* @__PURE__ */ template(`<div class=oasis-editor-tool-select-ribbon-large-wrap>`);
|
|
6618
6741
|
function Select(props) {
|
|
6619
6742
|
let selectRef;
|
|
6620
6743
|
const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value", "label", "ribbonSize"]);
|
|
@@ -6630,7 +6753,7 @@ function Select(props) {
|
|
|
6630
6753
|
}
|
|
6631
6754
|
});
|
|
6632
6755
|
const select = () => (() => {
|
|
6633
|
-
var _el$ = _tmpl
|
|
6756
|
+
var _el$ = _tmpl$$_();
|
|
6634
6757
|
var _ref$ = selectRef;
|
|
6635
6758
|
typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
|
|
6636
6759
|
spread(_el$, mergeProps({
|
|
@@ -6681,15 +6804,15 @@ function Select(props) {
|
|
|
6681
6804
|
}
|
|
6682
6805
|
});
|
|
6683
6806
|
}
|
|
6684
|
-
var _tmpl$$
|
|
6807
|
+
var _tmpl$$Z = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
|
|
6685
6808
|
function Separator(props) {
|
|
6686
6809
|
return (() => {
|
|
6687
|
-
var _el$ = _tmpl$$
|
|
6810
|
+
var _el$ = _tmpl$$Z();
|
|
6688
6811
|
createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
|
|
6689
6812
|
return _el$;
|
|
6690
6813
|
})();
|
|
6691
6814
|
}
|
|
6692
|
-
var _tmpl$$
|
|
6815
|
+
var _tmpl$$Y = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu>`);
|
|
6693
6816
|
function SplitButton(props) {
|
|
6694
6817
|
return createComponent(Popover, {
|
|
6695
6818
|
get open() {
|
|
@@ -6708,7 +6831,7 @@ function SplitButton(props) {
|
|
|
6708
6831
|
return props.onPanelMouseLeave;
|
|
6709
6832
|
},
|
|
6710
6833
|
trigger: (api) => (() => {
|
|
6711
|
-
var _el$ = _tmpl$$
|
|
6834
|
+
var _el$ = _tmpl$$Y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
6712
6835
|
use((el) => api.ref(el), _el$);
|
|
6713
6836
|
_el$2.$$click = () => props.onMain();
|
|
6714
6837
|
insert(_el$2, () => props.mainContent);
|
|
@@ -6749,11 +6872,11 @@ function SplitButton(props) {
|
|
|
6749
6872
|
});
|
|
6750
6873
|
}
|
|
6751
6874
|
delegateEvents(["click"]);
|
|
6752
|
-
var _tmpl$$
|
|
6875
|
+
var _tmpl$$X = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-theme-grid>`), _tmpl$2$C = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-standard-grid>`), _tmpl$3$q = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$4$h = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
|
|
6753
6876
|
const normalize = (value) => value.trim().toLowerCase();
|
|
6754
6877
|
function ColorGrids(props) {
|
|
6755
6878
|
return [(() => {
|
|
6756
|
-
var _el$ = _tmpl$$
|
|
6879
|
+
var _el$ = _tmpl$$X(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
6757
6880
|
insert(_el$2, () => props.themeColorsLabel);
|
|
6758
6881
|
insert(_el$3, createComponent(For, {
|
|
6759
6882
|
get each() {
|
|
@@ -6827,7 +6950,7 @@ function ColorGrids(props) {
|
|
|
6827
6950
|
})()];
|
|
6828
6951
|
}
|
|
6829
6952
|
delegateEvents(["click"]);
|
|
6830
|
-
var _tmpl$$
|
|
6953
|
+
var _tmpl$$W = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$B = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch></span><span>`), _tmpl$3$p = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$4$g = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$5$a = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$6$8 = /* @__PURE__ */ template(`<span>`), _tmpl$7$4 = /* @__PURE__ */ template(`<i data-lucide=slash>`);
|
|
6831
6954
|
const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
|
|
6832
6955
|
function ColorPicker(props) {
|
|
6833
6956
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -6914,7 +7037,7 @@ function ColorPicker(props) {
|
|
|
6914
7037
|
return _tmpl$7$4();
|
|
6915
7038
|
},
|
|
6916
7039
|
get children() {
|
|
6917
|
-
return _tmpl$$
|
|
7040
|
+
return _tmpl$$W();
|
|
6918
7041
|
}
|
|
6919
7042
|
}));
|
|
6920
7043
|
insert(_el$4, clearLabel);
|
|
@@ -6973,7 +7096,7 @@ function ColorPicker(props) {
|
|
|
6973
7096
|
});
|
|
6974
7097
|
}
|
|
6975
7098
|
delegateEvents(["click", "input"]);
|
|
6976
|
-
var _tmpl$$
|
|
7099
|
+
var _tmpl$$V = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$A = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$o = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$f = /* @__PURE__ */ template(`<span>`), _tmpl$5$9 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button>`), _tmpl$6$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
|
|
6977
7100
|
function GridPicker(props) {
|
|
6978
7101
|
const t = useI18n();
|
|
6979
7102
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -7097,7 +7220,7 @@ function GridPicker(props) {
|
|
|
7097
7220
|
})(),
|
|
7098
7221
|
get children() {
|
|
7099
7222
|
return [(() => {
|
|
7100
|
-
var _el$2 = _tmpl$$
|
|
7223
|
+
var _el$2 = _tmpl$$V();
|
|
7101
7224
|
insert(_el$2, statusLabel);
|
|
7102
7225
|
return _el$2;
|
|
7103
7226
|
})(), (() => {
|
|
@@ -7201,7 +7324,7 @@ const DEFAULT_PALETTE = {
|
|
|
7201
7324
|
standardColors: STANDARD_COLORS,
|
|
7202
7325
|
allowCustom: true
|
|
7203
7326
|
};
|
|
7204
|
-
var _tmpl$$
|
|
7327
|
+
var _tmpl$$U = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$z = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery-grid>`), _tmpl$3$n = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery><div class=oasis-editor-style-gallery-ribbon><div class=oasis-editor-style-gallery-strip role=listbox></div><button type=button class=oasis-editor-style-gallery-expand aria-haspopup=listbox>`), _tmpl$4$e = /* @__PURE__ */ template(`<option>`);
|
|
7205
7328
|
function getQuickStyles(styles) {
|
|
7206
7329
|
const applicable = styles.filter((style2) => style2.type !== "table" && (!style2.semiHidden || style2.unhideWhenUsed && style2.isUsed));
|
|
7207
7330
|
const hasQuickStyles = applicable.some((style2) => style2.qFormat === true);
|
|
@@ -7281,7 +7404,7 @@ function StyleGallery(props) {
|
|
|
7281
7404
|
return styles();
|
|
7282
7405
|
},
|
|
7283
7406
|
children: (style$1) => (() => {
|
|
7284
|
-
var _el$ = _tmpl$$
|
|
7407
|
+
var _el$ = _tmpl$$U(), _el$2 = _el$.firstChild;
|
|
7285
7408
|
_el$.$$click = () => apply(style$1);
|
|
7286
7409
|
insert(_el$2, () => style$1.name);
|
|
7287
7410
|
createRenderEffect((_p$) => {
|
|
@@ -7370,7 +7493,7 @@ function StyleGallery(props) {
|
|
|
7370
7493
|
});
|
|
7371
7494
|
}
|
|
7372
7495
|
delegateEvents(["click", "keydown"]);
|
|
7373
|
-
var _tmpl$$
|
|
7496
|
+
var _tmpl$$T = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-indicator>`), _tmpl$2$y = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-icon>`), _tmpl$3$m = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-wide-menu-button"aria-haspopup=menu><span class=oasis-editor-wide-menu-button-label>`);
|
|
7374
7497
|
function WideMenuButton(props) {
|
|
7375
7498
|
return createComponent(Popover, {
|
|
7376
7499
|
get open() {
|
|
@@ -7403,7 +7526,7 @@ function WideMenuButton(props) {
|
|
|
7403
7526
|
return props.indicatorColor !== void 0;
|
|
7404
7527
|
},
|
|
7405
7528
|
get children() {
|
|
7406
|
-
var _el$3 = _tmpl$$
|
|
7529
|
+
var _el$3 = _tmpl$$T();
|
|
7407
7530
|
createRenderEffect((_p$) => {
|
|
7408
7531
|
var _v$ = !props.indicatorColor, _v$2 = props.indicatorColor ?? "";
|
|
7409
7532
|
_v$ !== _p$.e && _el$3.classList.toggle("oasis-editor-wide-menu-button-indicator-empty", _p$.e = _v$);
|
|
@@ -7501,7 +7624,7 @@ function dashPreviewArray(dash) {
|
|
|
7501
7624
|
const pattern = lineDashPatternPt(dash);
|
|
7502
7625
|
return pattern.length > 0 ? pattern.join(" ") : void 0;
|
|
7503
7626
|
}
|
|
7504
|
-
var _tmpl$$
|
|
7627
|
+
var _tmpl$$S = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$x = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$3$l = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$4$d = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-flyout role=menu>`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-submenu-row><button type=button class="oasis-editor-color-menu-action oasis-editor-picture-border-submenu-trigger"role=menuitem aria-haspopup=menu><span class=oasis-editor-color-menu-action-swatch><i data-lucide=minus></i></span><span></span><i data-lucide=chevron-right class=oasis-editor-dropdown-chevron>`), _tmpl$6$6 = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-submenu-row><button type=button class="oasis-editor-color-menu-action oasis-editor-picture-border-submenu-trigger"role=menuitem aria-haspopup=menu><span class=oasis-editor-color-menu-action-swatch><i data-lucide=align-justify></i></span><span></span><i data-lucide=chevron-right class=oasis-editor-dropdown-chevron>`), _tmpl$7$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-picture-border-option role=menuitemradio><span class=oasis-editor-picture-border-preview></span><span class=oasis-editor-picture-border-option-label>`), _tmpl$8$2 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-picture-border-option role=menuitemradio><svg class=oasis-editor-picture-border-preview-svg viewBox="0 0 48 4"aria-hidden=true><line x1=0 y1=2 x2=48 y2=2 stroke=currentColor stroke-width=1.5></line></svg><span class=oasis-editor-picture-border-option-label>`);
|
|
7505
7628
|
function PictureBorderPicker(props) {
|
|
7506
7629
|
const [open, setOpen] = createSignal(false);
|
|
7507
7630
|
const [submenu, setSubmenu] = createSignal(null);
|
|
@@ -7569,7 +7692,7 @@ function PictureBorderPicker(props) {
|
|
|
7569
7692
|
color
|
|
7570
7693
|
})
|
|
7571
7694
|
}), (() => {
|
|
7572
|
-
var _el$ = _tmpl$$
|
|
7695
|
+
var _el$ = _tmpl$$S(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7573
7696
|
_el$.$$click = () => apply({
|
|
7574
7697
|
color: null
|
|
7575
7698
|
});
|
|
@@ -7718,7 +7841,7 @@ function PictureBorderPicker(props) {
|
|
|
7718
7841
|
});
|
|
7719
7842
|
}
|
|
7720
7843
|
delegateEvents(["click", "input"]);
|
|
7721
|
-
var _tmpl$$
|
|
7844
|
+
var _tmpl$$R = /* @__PURE__ */ template(`<option value>`), _tmpl$2$w = /* @__PURE__ */ template(`<option>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
7722
7845
|
function renderMenuContent(content, api) {
|
|
7723
7846
|
if (content.kind === "custom") {
|
|
7724
7847
|
return content.render(api);
|
|
@@ -7876,7 +7999,7 @@ function RenderSelect(props) {
|
|
|
7876
7999
|
return props.item.placeholder !== void 0;
|
|
7877
8000
|
},
|
|
7878
8001
|
get children() {
|
|
7879
|
-
var _el$ = _tmpl$$
|
|
8002
|
+
var _el$ = _tmpl$$R();
|
|
7880
8003
|
insert(_el$, () => props.item.placeholder);
|
|
7881
8004
|
return _el$;
|
|
7882
8005
|
}
|
|
@@ -8301,16 +8424,48 @@ const RIBBON_GROUP_RESIZE_DEFAULTS = {
|
|
|
8301
8424
|
footnotes: { priority: 10, collapsedIcon: "footnote" }
|
|
8302
8425
|
},
|
|
8303
8426
|
tableDesign: {
|
|
8304
|
-
tableStyleOptions: {
|
|
8305
|
-
|
|
8306
|
-
|
|
8427
|
+
tableStyleOptions: {
|
|
8428
|
+
priority: 20,
|
|
8429
|
+
states: ["full", "collapsed"],
|
|
8430
|
+
collapsedIcon: "list-checks"
|
|
8431
|
+
},
|
|
8432
|
+
tableStyles: {
|
|
8433
|
+
priority: 10,
|
|
8434
|
+
states: ["full", "collapsed"],
|
|
8435
|
+
collapsedIcon: "table"
|
|
8436
|
+
},
|
|
8437
|
+
borders: {
|
|
8438
|
+
priority: 30,
|
|
8439
|
+
states: ["full", "collapsed"],
|
|
8440
|
+
collapsedIcon: "frame"
|
|
8441
|
+
}
|
|
8307
8442
|
},
|
|
8308
8443
|
tableLayout: {
|
|
8309
|
-
table: {
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8444
|
+
table: {
|
|
8445
|
+
priority: 15,
|
|
8446
|
+
states: ["full", "collapsed"],
|
|
8447
|
+
collapsedIcon: "table-properties"
|
|
8448
|
+
},
|
|
8449
|
+
rowsColumns: {
|
|
8450
|
+
priority: 20,
|
|
8451
|
+
states: ["full", "collapsed"],
|
|
8452
|
+
collapsedIcon: "rows"
|
|
8453
|
+
},
|
|
8454
|
+
merge: {
|
|
8455
|
+
priority: 30,
|
|
8456
|
+
states: ["full", "collapsed"],
|
|
8457
|
+
collapsedIcon: "combine"
|
|
8458
|
+
},
|
|
8459
|
+
cellSize: {
|
|
8460
|
+
priority: 40,
|
|
8461
|
+
states: ["full", "collapsed"],
|
|
8462
|
+
collapsedIcon: "move-horizontal"
|
|
8463
|
+
},
|
|
8464
|
+
alignment: {
|
|
8465
|
+
priority: 50,
|
|
8466
|
+
states: ["full", "collapsed"],
|
|
8467
|
+
collapsedIcon: "align-left"
|
|
8468
|
+
}
|
|
8314
8469
|
},
|
|
8315
8470
|
imageFormat: {
|
|
8316
8471
|
imageStyles: { priority: 30, collapsedIcon: "square" },
|
|
@@ -8555,7 +8710,7 @@ function resolveResponsiveRibbonGroups(groups, availableWidth, measurements = {}
|
|
|
8555
8710
|
allocatedWidth: allocatedWidths.get(group.id)
|
|
8556
8711
|
}));
|
|
8557
8712
|
}
|
|
8558
|
-
var _tmpl$$
|
|
8713
|
+
var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$v = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
|
|
8559
8714
|
function RibbonTabs(props) {
|
|
8560
8715
|
const tabs = createMemo(() => buildRibbonTabDefinitions(props.api.t, props.api));
|
|
8561
8716
|
const moveTab = (current, delta) => {
|
|
@@ -8565,7 +8720,7 @@ function RibbonTabs(props) {
|
|
|
8565
8720
|
if (next) props.setActiveTab(next.id);
|
|
8566
8721
|
};
|
|
8567
8722
|
return (() => {
|
|
8568
|
-
var _el$ = _tmpl$$
|
|
8723
|
+
var _el$ = _tmpl$$Q();
|
|
8569
8724
|
insert(_el$, createComponent(For, {
|
|
8570
8725
|
get each() {
|
|
8571
8726
|
return tabs();
|
|
@@ -8616,10 +8771,10 @@ function RibbonTabs(props) {
|
|
|
8616
8771
|
})();
|
|
8617
8772
|
}
|
|
8618
8773
|
delegateEvents(["click", "keydown"]);
|
|
8619
|
-
var _tmpl$$
|
|
8774
|
+
var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
|
|
8620
8775
|
function RibbonRow(props) {
|
|
8621
8776
|
return (() => {
|
|
8622
|
-
var _el$ = _tmpl$$
|
|
8777
|
+
var _el$ = _tmpl$$P();
|
|
8623
8778
|
insert(_el$, createComponent(For, {
|
|
8624
8779
|
get each() {
|
|
8625
8780
|
return props.items;
|
|
@@ -8634,7 +8789,7 @@ function RibbonRow(props) {
|
|
|
8634
8789
|
return _el$;
|
|
8635
8790
|
})();
|
|
8636
8791
|
}
|
|
8637
|
-
var _tmpl$$
|
|
8792
|
+
var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows><div class=oasis-editor-ribbon-normal-rows>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-label>`), _tmpl$4$c = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$7 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
|
|
8638
8793
|
function groupItems(group) {
|
|
8639
8794
|
return [...group.largeItems, ...group.rows[1], ...group.rows[2]];
|
|
8640
8795
|
}
|
|
@@ -8657,9 +8812,6 @@ function RibbonGroup(props) {
|
|
|
8657
8812
|
get icon() {
|
|
8658
8813
|
return props.group.resizePolicy.collapsedIcon;
|
|
8659
8814
|
},
|
|
8660
|
-
get label() {
|
|
8661
|
-
return props.group.label;
|
|
8662
|
-
},
|
|
8663
8815
|
get tooltip() {
|
|
8664
8816
|
return props.group.label;
|
|
8665
8817
|
},
|
|
@@ -8699,7 +8851,7 @@ function RibbonGroup(props) {
|
|
|
8699
8851
|
return props.group.largeItems.length > 0;
|
|
8700
8852
|
},
|
|
8701
8853
|
get children() {
|
|
8702
|
-
var _el$3 = _tmpl$$
|
|
8854
|
+
var _el$3 = _tmpl$$O();
|
|
8703
8855
|
insert(_el$3, createComponent(For, {
|
|
8704
8856
|
get each() {
|
|
8705
8857
|
return props.group.largeItems;
|
|
@@ -8760,7 +8912,7 @@ function RibbonGroup(props) {
|
|
|
8760
8912
|
return _el$;
|
|
8761
8913
|
})();
|
|
8762
8914
|
}
|
|
8763
|
-
var _tmpl$$
|
|
8915
|
+
var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
|
|
8764
8916
|
function RibbonPanel(props) {
|
|
8765
8917
|
const [availableWidth, setAvailableWidth] = createSignal(null);
|
|
8766
8918
|
const [measurements, setMeasurements] = createSignal({});
|
|
@@ -8805,7 +8957,7 @@ function RibbonPanel(props) {
|
|
|
8805
8957
|
requestAnimationFrame(measureGroups);
|
|
8806
8958
|
});
|
|
8807
8959
|
return (() => {
|
|
8808
|
-
var _el$ = _tmpl$$
|
|
8960
|
+
var _el$ = _tmpl$$N();
|
|
8809
8961
|
var _ref$ = panelRef;
|
|
8810
8962
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
8811
8963
|
insert(_el$, createComponent(For, {
|
|
@@ -8831,7 +8983,7 @@ function RibbonPanel(props) {
|
|
|
8831
8983
|
return _el$;
|
|
8832
8984
|
})();
|
|
8833
8985
|
}
|
|
8834
|
-
var _tmpl$$
|
|
8986
|
+
var _tmpl$$M = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$t = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
|
|
8835
8987
|
const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
|
|
8836
8988
|
function Toolbar(props) {
|
|
8837
8989
|
const api = createToolbarApi(props.host, useI18n());
|
|
@@ -8881,7 +9033,7 @@ function Toolbar(props) {
|
|
|
8881
9033
|
})
|
|
8882
9034
|
});
|
|
8883
9035
|
return (() => {
|
|
8884
|
-
var _el$ = _tmpl$$
|
|
9036
|
+
var _el$ = _tmpl$$M();
|
|
8885
9037
|
_el$.$$mousedown = (event) => {
|
|
8886
9038
|
if (shouldAllowNativeMouseDown(event.target)) {
|
|
8887
9039
|
return;
|
|
@@ -17938,6 +18090,32 @@ function parseTableRowHeightToPx(height) {
|
|
|
17938
18090
|
const parsed = Number.parseFloat(trimmed);
|
|
17939
18091
|
return Number.isFinite(parsed) ? Math.max(0, parsed * PX_PER_POINT) : null;
|
|
17940
18092
|
}
|
|
18093
|
+
const tableLayoutIndexCache = /* @__PURE__ */ new WeakMap();
|
|
18094
|
+
function getCachedTableLayoutIndex(table) {
|
|
18095
|
+
var _a2, _b2;
|
|
18096
|
+
const cached = tableLayoutIndexCache.get(table);
|
|
18097
|
+
if (cached) return cached;
|
|
18098
|
+
const entries2 = buildTableCellLayout(table);
|
|
18099
|
+
const firstEntryByRow = [];
|
|
18100
|
+
const entryByRowAndCell = [];
|
|
18101
|
+
let columnCount = 1;
|
|
18102
|
+
for (const entry of entries2) {
|
|
18103
|
+
firstEntryByRow[_a2 = entry.rowIndex] ?? (firstEntryByRow[_a2] = entry);
|
|
18104
|
+
(entryByRowAndCell[_b2 = entry.rowIndex] ?? (entryByRowAndCell[_b2] = []))[entry.cellIndex] = entry;
|
|
18105
|
+
columnCount = Math.max(
|
|
18106
|
+
columnCount,
|
|
18107
|
+
entry.visualColumnIndex + Math.max(1, entry.colSpan)
|
|
18108
|
+
);
|
|
18109
|
+
}
|
|
18110
|
+
const index = {
|
|
18111
|
+
entries: entries2,
|
|
18112
|
+
columnCount,
|
|
18113
|
+
firstEntryByRow,
|
|
18114
|
+
entryByRowAndCell
|
|
18115
|
+
};
|
|
18116
|
+
tableLayoutIndexCache.set(table, index);
|
|
18117
|
+
return index;
|
|
18118
|
+
}
|
|
17941
18119
|
const tableColumnGeometryCache = /* @__PURE__ */ new WeakMap();
|
|
17942
18120
|
function getCachedTableColumnGeometry(table, contentWidthPx) {
|
|
17943
18121
|
let perTable = tableColumnGeometryCache.get(table);
|
|
@@ -17949,7 +18127,7 @@ function getCachedTableColumnGeometry(table, contentWidthPx) {
|
|
|
17949
18127
|
let geometry = perTable.get(key);
|
|
17950
18128
|
if (geometry) return geometry;
|
|
17951
18129
|
const columnWidths = resolveTableColumnWidthsPx(table, contentWidthPx);
|
|
17952
|
-
const entries2 =
|
|
18130
|
+
const entries2 = getCachedTableLayoutIndex(table).entries;
|
|
17953
18131
|
const cellColumnWidth = /* @__PURE__ */ new Map();
|
|
17954
18132
|
for (const entry of entries2) {
|
|
17955
18133
|
let total = 0;
|
|
@@ -17958,23 +18136,16 @@ function getCachedTableColumnGeometry(table, contentWidthPx) {
|
|
|
17958
18136
|
}
|
|
17959
18137
|
cellColumnWidth.set(`${entry.rowIndex}:${entry.cellIndex}`, total);
|
|
17960
18138
|
}
|
|
17961
|
-
geometry = {
|
|
18139
|
+
geometry = { cellColumnWidth };
|
|
17962
18140
|
perTable.set(key, geometry);
|
|
17963
18141
|
return geometry;
|
|
17964
18142
|
}
|
|
17965
18143
|
function estimateTableRowHeight(row, styles, measurer, defaultTabStop, contentWidth, table, rowIndex) {
|
|
17966
18144
|
var _a2, _b2;
|
|
17967
|
-
const
|
|
17968
|
-
const columnCount =
|
|
17969
|
-
1,
|
|
17970
|
-
...tableEntries.map(
|
|
17971
|
-
(entry) => entry.visualColumnIndex + Math.max(1, entry.colSpan)
|
|
17972
|
-
)
|
|
17973
|
-
);
|
|
18145
|
+
const tableLayoutIndex = table ? getCachedTableLayoutIndex(table) : null;
|
|
18146
|
+
const columnCount = (tableLayoutIndex == null ? void 0 : tableLayoutIndex.columnCount) ?? 1;
|
|
17974
18147
|
const rowFormatting = table && rowIndex !== void 0 ? (() => {
|
|
17975
|
-
const entry =
|
|
17976
|
-
(candidate) => candidate.rowIndex === rowIndex
|
|
17977
|
-
);
|
|
18148
|
+
const entry = tableLayoutIndex == null ? void 0 : tableLayoutIndex.firstEntryByRow[rowIndex];
|
|
17978
18149
|
return entry ? resolveEffectiveTableCellFormatting({
|
|
17979
18150
|
table,
|
|
17980
18151
|
rowIndex,
|
|
@@ -17989,10 +18160,8 @@ function estimateTableRowHeight(row, styles, measurer, defaultTabStop, contentWi
|
|
|
17989
18160
|
}
|
|
17990
18161
|
const geometry = table && typeof contentWidth === "number" ? getCachedTableColumnGeometry(table, contentWidth) : null;
|
|
17991
18162
|
const cellHeights = row.cells.map((sourceCell, cellIndex) => {
|
|
17992
|
-
var _a3;
|
|
17993
|
-
const entry = rowIndex !== void 0 ?
|
|
17994
|
-
(candidate) => candidate.rowIndex === rowIndex && candidate.cellIndex === cellIndex
|
|
17995
|
-
) : void 0;
|
|
18163
|
+
var _a3, _b3;
|
|
18164
|
+
const entry = rowIndex !== void 0 ? (_a3 = tableLayoutIndex == null ? void 0 : tableLayoutIndex.entryByRowAndCell[rowIndex]) == null ? void 0 : _a3[cellIndex] : void 0;
|
|
17996
18165
|
const formatting = table && rowIndex !== void 0 && entry ? resolveEffectiveTableCellFormatting({
|
|
17997
18166
|
table,
|
|
17998
18167
|
rowIndex,
|
|
@@ -18019,7 +18188,7 @@ function estimateTableRowHeight(row, styles, measurer, defaultTabStop, contentWi
|
|
|
18019
18188
|
contentWidth,
|
|
18020
18189
|
columnWidthPx
|
|
18021
18190
|
);
|
|
18022
|
-
const paragraphContentWidth = ((
|
|
18191
|
+
const paragraphContentWidth = ((_b3 = cell.style) == null ? void 0 : _b3.noWrap) ? NO_WRAP_MEASURE_WIDTH_PX : cellContentWidth;
|
|
18023
18192
|
let blockHeights = 0;
|
|
18024
18193
|
for (let blockIndex = 0; blockIndex < cell.blocks.length; blockIndex += 1) {
|
|
18025
18194
|
const paragraph = cell.blocks[blockIndex];
|
|
@@ -19803,6 +19972,9 @@ function resolveDefaultBorder() {
|
|
|
19803
19972
|
}
|
|
19804
19973
|
function resolveBorder(border) {
|
|
19805
19974
|
if (!border) return resolveDefaultBorder();
|
|
19975
|
+
if (border.type === "none" || border.width <= 0) {
|
|
19976
|
+
return { width: 0, color: "transparent", type: "none" };
|
|
19977
|
+
}
|
|
19806
19978
|
const width = Math.max(
|
|
19807
19979
|
0,
|
|
19808
19980
|
Number.isFinite(border.width) ? toPx(border.width) : 1
|
|
@@ -20396,11 +20568,11 @@ function buildCanvasTableLayout(options) {
|
|
|
20396
20568
|
unsupported: Array.from(new Set(unsupported))
|
|
20397
20569
|
};
|
|
20398
20570
|
}
|
|
20399
|
-
var _tmpl$$
|
|
20571
|
+
var _tmpl$$L = /* @__PURE__ */ template(`<div class=oasis-editor-page-break style="display:flex;align-items:center;justify-content:center;margin:16px 0;position:relative;user-select:none"><div style="position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--oasis-toolbar-border, #e0e3e7)"></div><div style="background:var(--oasis-bg, #f6f8fb);padding:0 12px;color:var(--oasis-text-muted, #5f6368);font-size:12px;font-family:var(--oasis-font-ui, sans-serif);z-index:1">`);
|
|
20400
20572
|
function PageBreak(_props) {
|
|
20401
20573
|
const t = useI18n();
|
|
20402
20574
|
return (() => {
|
|
20403
|
-
var _el$ = _tmpl$$
|
|
20575
|
+
var _el$ = _tmpl$$L(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
20404
20576
|
insert(_el$3, () => t("metric.pageBreak") || "Page Break");
|
|
20405
20577
|
return _el$;
|
|
20406
20578
|
})();
|
|
@@ -24318,7 +24490,7 @@ function prepareDocumentFonts(document2, options = {}) {
|
|
|
24318
24490
|
preparationLoads.set(key, load);
|
|
24319
24491
|
return load;
|
|
24320
24492
|
}
|
|
24321
|
-
var _tmpl$$
|
|
24493
|
+
var _tmpl$$K = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$s = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
|
|
24322
24494
|
const surfaceLogger = createEditorLogger("canvas-surface");
|
|
24323
24495
|
function CanvasEditorSurface(props) {
|
|
24324
24496
|
const documentFontFamilies = createMemo(() => Array.from(collectPdfFontFamilies(props.state().document)));
|
|
@@ -24341,7 +24513,7 @@ function CanvasEditorSurface(props) {
|
|
|
24341
24513
|
return layout;
|
|
24342
24514
|
});
|
|
24343
24515
|
return (() => {
|
|
24344
|
-
var _el$ = _tmpl$$
|
|
24516
|
+
var _el$ = _tmpl$$K();
|
|
24345
24517
|
insert(_el$, createComponent(Index, {
|
|
24346
24518
|
get each() {
|
|
24347
24519
|
return documentLayout().pages;
|
|
@@ -24875,7 +25047,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
|
|
|
24875
25047
|
pushSide(-1);
|
|
24876
25048
|
return ticks;
|
|
24877
25049
|
}
|
|
24878
|
-
var _tmpl$$
|
|
25050
|
+
var _tmpl$$J = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler data-testid=editor-horizontal-ruler role=presentation><div class=oasis-editor-horizontal-ruler-track><div class=oasis-editor-horizontal-ruler-page><div class=oasis-editor-horizontal-ruler-margin style=left:0px></div><div class=oasis-editor-horizontal-ruler-margin></div><div class=oasis-editor-horizontal-ruler-content></div><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-first-line"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-hanging"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-left-box"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-right-indent">`), _tmpl$2$r = /* @__PURE__ */ template(`<div>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
|
|
24879
25051
|
function getActivePageSettings(state) {
|
|
24880
25052
|
var _a2;
|
|
24881
25053
|
const idx = getActiveSectionIndex(state);
|
|
@@ -25081,7 +25253,7 @@ function HorizontalRuler(props) {
|
|
|
25081
25253
|
}
|
|
25082
25254
|
};
|
|
25083
25255
|
return (() => {
|
|
25084
|
-
var _el$ = _tmpl$$
|
|
25256
|
+
var _el$ = _tmpl$$J(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling;
|
|
25085
25257
|
var _ref$ = pageRef;
|
|
25086
25258
|
typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
|
|
25087
25259
|
insert(_el$3, createComponent(For, {
|
|
@@ -25178,10 +25350,10 @@ function HorizontalRuler(props) {
|
|
|
25178
25350
|
})();
|
|
25179
25351
|
}
|
|
25180
25352
|
delegateEvents(["pointerdown"]);
|
|
25181
|
-
var _tmpl$$
|
|
25353
|
+
var _tmpl$$I = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
|
|
25182
25354
|
function CaretOverlay(props) {
|
|
25183
25355
|
return (() => {
|
|
25184
|
-
var _el$ = _tmpl$$
|
|
25356
|
+
var _el$ = _tmpl$$I();
|
|
25185
25357
|
createRenderEffect((_p$) => {
|
|
25186
25358
|
var _v$ = !!props.active, _v$2 = {
|
|
25187
25359
|
left: `${props.left}px`,
|
|
@@ -25202,10 +25374,10 @@ function CaretOverlay(props) {
|
|
|
25202
25374
|
return _el$;
|
|
25203
25375
|
})();
|
|
25204
25376
|
}
|
|
25205
|
-
var _tmpl$$
|
|
25377
|
+
var _tmpl$$H = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$q = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
|
|
25206
25378
|
function SelectionOverlay(props) {
|
|
25207
25379
|
return (() => {
|
|
25208
|
-
var _el$ = _tmpl$$
|
|
25380
|
+
var _el$ = _tmpl$$H();
|
|
25209
25381
|
insert(_el$, createComponent(Index, {
|
|
25210
25382
|
get each() {
|
|
25211
25383
|
return props.boxes;
|
|
@@ -25231,7 +25403,7 @@ function SelectionOverlay(props) {
|
|
|
25231
25403
|
return _el$;
|
|
25232
25404
|
})();
|
|
25233
25405
|
}
|
|
25234
|
-
var _tmpl$$
|
|
25406
|
+
var _tmpl$$G = /* @__PURE__ */ template(`<div class=oasis-editor-revision-overlay data-testid=editor-revision-overlay><div class=oasis-editor-revision-overlay-content><span class=oasis-editor-revision-overlay-author><strong>:</strong> </span><span class=oasis-editor-revision-overlay-date></span></div><div class=oasis-editor-revision-overlay-arrow>`);
|
|
25235
25407
|
function RevisionOverlay(props) {
|
|
25236
25408
|
const formattedDate = () => {
|
|
25237
25409
|
try {
|
|
@@ -25246,7 +25418,7 @@ function RevisionOverlay(props) {
|
|
|
25246
25418
|
return "Alterado por";
|
|
25247
25419
|
};
|
|
25248
25420
|
return (() => {
|
|
25249
|
-
var _el$ = _tmpl$$
|
|
25421
|
+
var _el$ = _tmpl$$G(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
25250
25422
|
_el$4.nextSibling;
|
|
25251
25423
|
var _el$7 = _el$3.nextSibling;
|
|
25252
25424
|
insert(_el$4, label, _el$5);
|
|
@@ -25264,7 +25436,7 @@ function RevisionOverlay(props) {
|
|
|
25264
25436
|
return _el$;
|
|
25265
25437
|
})();
|
|
25266
25438
|
}
|
|
25267
|
-
var _tmpl$$
|
|
25439
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$p = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$g = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$a = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-comment-popup data-testid=editor-comment-popup><div class=oasis-editor-comment-popup-header><span class=oasis-editor-comment-popup-author></span></div><div class=oasis-editor-comment-popup-body>`);
|
|
25268
25440
|
function CommentHighlightOverlay(props) {
|
|
25269
25441
|
const [activeCommentId, setActiveCommentId] = createSignal(null);
|
|
25270
25442
|
const activeComment = createMemo(() => {
|
|
@@ -25291,7 +25463,7 @@ function CommentHighlightOverlay(props) {
|
|
|
25291
25463
|
}
|
|
25292
25464
|
};
|
|
25293
25465
|
return (() => {
|
|
25294
|
-
var _el$ = _tmpl$$
|
|
25466
|
+
var _el$ = _tmpl$$F();
|
|
25295
25467
|
insert(_el$, createComponent(For, {
|
|
25296
25468
|
get each() {
|
|
25297
25469
|
return props.boxes();
|
|
@@ -25397,224 +25569,6 @@ function useSurfaceRect(surfaceRef) {
|
|
|
25397
25569
|
});
|
|
25398
25570
|
return { rect, tick, refresh };
|
|
25399
25571
|
}
|
|
25400
|
-
var _tmpl$$F = /* @__PURE__ */ template(`<div class=oasis-editor-floating-toolbar data-testid=editor-floating-table-toolbar><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group>`);
|
|
25401
|
-
function FloatingTableToolbar(props) {
|
|
25402
|
-
const t = useI18n();
|
|
25403
|
-
const host = () => props.host();
|
|
25404
|
-
const run = (command, payload) => host().commands.execute(command, payload);
|
|
25405
|
-
const blocked = (command) => !host().commands.state(command).isEnabled;
|
|
25406
|
-
const {
|
|
25407
|
-
rect: surfaceRect,
|
|
25408
|
-
tick,
|
|
25409
|
-
refresh: scheduleRefresh
|
|
25410
|
-
} = useSurfaceRect(props.surfaceRef);
|
|
25411
|
-
const position2 = createMemo(() => {
|
|
25412
|
-
tick();
|
|
25413
|
-
if (!props.visible()) {
|
|
25414
|
-
return null;
|
|
25415
|
-
}
|
|
25416
|
-
const boxes = props.selectionBoxes();
|
|
25417
|
-
if (boxes.length === 0) {
|
|
25418
|
-
return null;
|
|
25419
|
-
}
|
|
25420
|
-
const rect = surfaceRect();
|
|
25421
|
-
if (!rect) {
|
|
25422
|
-
return null;
|
|
25423
|
-
}
|
|
25424
|
-
let left = Infinity;
|
|
25425
|
-
let top = Infinity;
|
|
25426
|
-
let right = -Infinity;
|
|
25427
|
-
for (const box of boxes) {
|
|
25428
|
-
if (box.left < left) left = box.left;
|
|
25429
|
-
if (box.top < top) top = box.top;
|
|
25430
|
-
if (box.left + box.width > right) right = box.left + box.width;
|
|
25431
|
-
}
|
|
25432
|
-
if (!Number.isFinite(left) || !Number.isFinite(top) || !Number.isFinite(right)) {
|
|
25433
|
-
return null;
|
|
25434
|
-
}
|
|
25435
|
-
const viewportCenterX = rect.left + (left + right) / 2;
|
|
25436
|
-
const viewportTop = rect.top + top;
|
|
25437
|
-
return {
|
|
25438
|
-
centerX: viewportCenterX,
|
|
25439
|
-
top: viewportTop
|
|
25440
|
-
};
|
|
25441
|
-
});
|
|
25442
|
-
createMemo(() => {
|
|
25443
|
-
props.visible();
|
|
25444
|
-
props.selectionBoxes();
|
|
25445
|
-
if (typeof window !== "undefined") {
|
|
25446
|
-
scheduleRefresh();
|
|
25447
|
-
}
|
|
25448
|
-
});
|
|
25449
|
-
return createComponent(Show, {
|
|
25450
|
-
get when() {
|
|
25451
|
-
return position2();
|
|
25452
|
-
},
|
|
25453
|
-
children: (pos) => createComponent(Portal, {
|
|
25454
|
-
get mount() {
|
|
25455
|
-
return document.body;
|
|
25456
|
-
},
|
|
25457
|
-
get children() {
|
|
25458
|
-
var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
25459
|
-
_el$.$$mousedown = (event) => event.preventDefault();
|
|
25460
|
-
insert(_el$2, createComponent(Button$1, {
|
|
25461
|
-
icon: "combine",
|
|
25462
|
-
"data-testid": "editor-floating-toolbar-merge",
|
|
25463
|
-
get disabled() {
|
|
25464
|
-
return blocked("tableMerge");
|
|
25465
|
-
},
|
|
25466
|
-
onClick: () => run("tableMerge"),
|
|
25467
|
-
get tooltip() {
|
|
25468
|
-
return t("table.mergeTooltip");
|
|
25469
|
-
}
|
|
25470
|
-
}), null);
|
|
25471
|
-
insert(_el$2, createComponent(Button$1, {
|
|
25472
|
-
icon: "split",
|
|
25473
|
-
"data-testid": "editor-floating-toolbar-split",
|
|
25474
|
-
get disabled() {
|
|
25475
|
-
return blocked("tableSplit");
|
|
25476
|
-
},
|
|
25477
|
-
onClick: () => run("tableSplit"),
|
|
25478
|
-
get tooltip() {
|
|
25479
|
-
return t("table.splitTooltip");
|
|
25480
|
-
}
|
|
25481
|
-
}), null);
|
|
25482
|
-
insert(_el$, createComponent(Separator, {}), _el$3);
|
|
25483
|
-
insert(_el$3, createComponent(Button$1, {
|
|
25484
|
-
icon: "align-left",
|
|
25485
|
-
"data-testid": "editor-floating-toolbar-align-left",
|
|
25486
|
-
onClick: () => run("tableAlignLeft"),
|
|
25487
|
-
get tooltip() {
|
|
25488
|
-
return t("table.alignLeft");
|
|
25489
|
-
}
|
|
25490
|
-
}), null);
|
|
25491
|
-
insert(_el$3, createComponent(Button$1, {
|
|
25492
|
-
icon: "align-center",
|
|
25493
|
-
"data-testid": "editor-floating-toolbar-align-center",
|
|
25494
|
-
onClick: () => run("tableAlignCenter"),
|
|
25495
|
-
get tooltip() {
|
|
25496
|
-
return t("table.alignCenter");
|
|
25497
|
-
}
|
|
25498
|
-
}), null);
|
|
25499
|
-
insert(_el$3, createComponent(Button$1, {
|
|
25500
|
-
icon: "align-right",
|
|
25501
|
-
"data-testid": "editor-floating-toolbar-align-right",
|
|
25502
|
-
onClick: () => run("tableAlignRight"),
|
|
25503
|
-
get tooltip() {
|
|
25504
|
-
return t("table.alignRight");
|
|
25505
|
-
}
|
|
25506
|
-
}), null);
|
|
25507
|
-
insert(_el$, createComponent(Separator, {}), _el$4);
|
|
25508
|
-
insert(_el$4, createComponent(Button$1, {
|
|
25509
|
-
icon: "palette",
|
|
25510
|
-
"data-testid": "editor-floating-toolbar-shading",
|
|
25511
|
-
onClick: () => {
|
|
25512
|
-
const color = prompt(t("table.cellBgColorPrompt"), "#f1f5f9");
|
|
25513
|
-
if (color !== null) run("tableCellShading", color);
|
|
25514
|
-
},
|
|
25515
|
-
get tooltip() {
|
|
25516
|
-
return t("table.cellColor");
|
|
25517
|
-
}
|
|
25518
|
-
}), null);
|
|
25519
|
-
insert(_el$4, createComponent(Button$1, {
|
|
25520
|
-
icon: "frame",
|
|
25521
|
-
"data-testid": "editor-floating-toolbar-borders",
|
|
25522
|
-
onClick: () => run("tableCellBorders"),
|
|
25523
|
-
get tooltip() {
|
|
25524
|
-
return t("table.applyBorders");
|
|
25525
|
-
}
|
|
25526
|
-
}), null);
|
|
25527
|
-
insert(_el$4, createComponent(Button$1, {
|
|
25528
|
-
icon: "square",
|
|
25529
|
-
"data-testid": "editor-floating-toolbar-no-borders",
|
|
25530
|
-
onClick: () => run("tableCellNoBorders"),
|
|
25531
|
-
get tooltip() {
|
|
25532
|
-
return t("table.removeBorders");
|
|
25533
|
-
}
|
|
25534
|
-
}), null);
|
|
25535
|
-
insert(_el$, createComponent(Separator, {}), _el$5);
|
|
25536
|
-
insert(_el$5, createComponent(Button$1, {
|
|
25537
|
-
icon: "arrow-up-to-line",
|
|
25538
|
-
"data-testid": "editor-floating-toolbar-insert-row-above",
|
|
25539
|
-
get disabled() {
|
|
25540
|
-
return blocked("tableInsertRowBefore");
|
|
25541
|
-
},
|
|
25542
|
-
onClick: () => run("tableInsertRowBefore"),
|
|
25543
|
-
get tooltip() {
|
|
25544
|
-
return t("table.insertRowAbove");
|
|
25545
|
-
}
|
|
25546
|
-
}), null);
|
|
25547
|
-
insert(_el$5, createComponent(Button$1, {
|
|
25548
|
-
icon: "arrow-down-to-line",
|
|
25549
|
-
"data-testid": "editor-floating-toolbar-insert-row-below",
|
|
25550
|
-
get disabled() {
|
|
25551
|
-
return blocked("tableInsertRowAfter");
|
|
25552
|
-
},
|
|
25553
|
-
onClick: () => run("tableInsertRowAfter"),
|
|
25554
|
-
get tooltip() {
|
|
25555
|
-
return t("table.insertRowBelow");
|
|
25556
|
-
}
|
|
25557
|
-
}), null);
|
|
25558
|
-
insert(_el$5, createComponent(Button$1, {
|
|
25559
|
-
icon: "arrow-left-to-line",
|
|
25560
|
-
"data-testid": "editor-floating-toolbar-insert-column-left",
|
|
25561
|
-
get disabled() {
|
|
25562
|
-
return blocked("tableInsertColumnBefore");
|
|
25563
|
-
},
|
|
25564
|
-
onClick: () => run("tableInsertColumnBefore"),
|
|
25565
|
-
get tooltip() {
|
|
25566
|
-
return t("table.insertColumnLeft");
|
|
25567
|
-
}
|
|
25568
|
-
}), null);
|
|
25569
|
-
insert(_el$5, createComponent(Button$1, {
|
|
25570
|
-
icon: "arrow-right-to-line",
|
|
25571
|
-
"data-testid": "editor-floating-toolbar-insert-column-right",
|
|
25572
|
-
get disabled() {
|
|
25573
|
-
return blocked("tableInsertColumnAfter");
|
|
25574
|
-
},
|
|
25575
|
-
onClick: () => run("tableInsertColumnAfter"),
|
|
25576
|
-
get tooltip() {
|
|
25577
|
-
return t("table.insertColumnRight");
|
|
25578
|
-
}
|
|
25579
|
-
}), null);
|
|
25580
|
-
insert(_el$, createComponent(Separator, {}), _el$6);
|
|
25581
|
-
insert(_el$6, createComponent(Button$1, {
|
|
25582
|
-
icon: "rows-3",
|
|
25583
|
-
"data-testid": "editor-floating-toolbar-delete-row",
|
|
25584
|
-
get disabled() {
|
|
25585
|
-
return blocked("tableDeleteRow");
|
|
25586
|
-
},
|
|
25587
|
-
onClick: () => run("tableDeleteRow"),
|
|
25588
|
-
get tooltip() {
|
|
25589
|
-
return t("table.deleteRow");
|
|
25590
|
-
}
|
|
25591
|
-
}), null);
|
|
25592
|
-
insert(_el$6, createComponent(Button$1, {
|
|
25593
|
-
icon: "columns-3",
|
|
25594
|
-
"data-testid": "editor-floating-toolbar-delete-column",
|
|
25595
|
-
get disabled() {
|
|
25596
|
-
return blocked("tableDeleteColumn");
|
|
25597
|
-
},
|
|
25598
|
-
onClick: () => run("tableDeleteColumn"),
|
|
25599
|
-
get tooltip() {
|
|
25600
|
-
return t("table.deleteColumn");
|
|
25601
|
-
}
|
|
25602
|
-
}), null);
|
|
25603
|
-
createRenderEffect((_p$) => {
|
|
25604
|
-
var _v$ = `${pos().centerX}px`, _v$2 = `${pos().top}px`;
|
|
25605
|
-
_v$ !== _p$.e && setStyleProperty(_el$, "left", _p$.e = _v$);
|
|
25606
|
-
_v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
|
|
25607
|
-
return _p$;
|
|
25608
|
-
}, {
|
|
25609
|
-
e: void 0,
|
|
25610
|
-
t: void 0
|
|
25611
|
-
});
|
|
25612
|
-
return _el$;
|
|
25613
|
-
}
|
|
25614
|
-
})
|
|
25615
|
-
});
|
|
25616
|
-
}
|
|
25617
|
-
delegateEvents(["mousedown"]);
|
|
25618
25572
|
var _tmpl$$E = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$o = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$f = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$9 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$5 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-anchor data-testid=editor-layout-options-anchor><svg viewBox="0 0 24 24"fill=none aria-hidden=true><rect x=3 y=4 width=10 height=10 rx=1.5 fill=#1a73e8></rect><rect x=3 y=17 width=18 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=5 width=6 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=9 width=6 height=2 rx=1 fill=#9aa0a6>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=oasis-editor-layout-options-popup data-testid=editor-layout-options-popup><div class=oasis-editor-layout-options-popup-header><span class=oasis-editor-layout-options-title></span><button type=button class=oasis-editor-layout-options-close>×</button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid><button type=button class=oasis-editor-layout-options-cell data-testid=editor-layout-options-inline><svg viewBox="0 0 40 32"fill=none aria-hidden=true><rect x=4 y=7 width=9 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=4 width=11 height=11 rx=1.5 fill=#1a73e8></rect><rect x=28 y=7 width=8 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=20 width=32 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=26 width=32 height=2 rx=1 fill=#9aa0a6></rect></svg></button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid></div><div class=oasis-editor-layout-options-radios><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position></label><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position>`), _tmpl$8$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-cell>`);
|
|
25619
25573
|
const WRAP_OPTIONS = [{
|
|
25620
25574
|
preset: "square",
|
|
@@ -36257,35 +36211,6 @@ function isTableHeaderRow(rowNode) {
|
|
|
36257
36211
|
const rowProperties = getFirstChildByTagNameNS(rowNode, WORD_NS, "trPr");
|
|
36258
36212
|
return rowProperties ? parseOnOffProperty(rowProperties, "tblHeader") === true : false;
|
|
36259
36213
|
}
|
|
36260
|
-
function collapseCellAutospacing(paragraphs, flags) {
|
|
36261
|
-
var _a2, _b2;
|
|
36262
|
-
const styleOf = (paragraph) => paragraph.style ?? (paragraph.style = {});
|
|
36263
|
-
const lastIndex = paragraphs.length - 1;
|
|
36264
|
-
for (let index = 0; index < paragraphs.length; index += 1) {
|
|
36265
|
-
const flag = flags[index];
|
|
36266
|
-
if (!flag) {
|
|
36267
|
-
continue;
|
|
36268
|
-
}
|
|
36269
|
-
if (index === 0 && flag.before) {
|
|
36270
|
-
styleOf(paragraphs[index]).spacingBefore = 0;
|
|
36271
|
-
}
|
|
36272
|
-
if (index === lastIndex && flag.after) {
|
|
36273
|
-
styleOf(paragraphs[index]).spacingAfter = 0;
|
|
36274
|
-
}
|
|
36275
|
-
}
|
|
36276
|
-
for (let index = 0; index < lastIndex; index += 1) {
|
|
36277
|
-
if (!((_a2 = flags[index]) == null ? void 0 : _a2.after) || !((_b2 = flags[index + 1]) == null ? void 0 : _b2.before)) {
|
|
36278
|
-
continue;
|
|
36279
|
-
}
|
|
36280
|
-
const prev = styleOf(paragraphs[index]);
|
|
36281
|
-
const next = styleOf(paragraphs[index + 1]);
|
|
36282
|
-
if ((prev.spacingAfter ?? 0) >= (next.spacingBefore ?? 0)) {
|
|
36283
|
-
next.spacingBefore = 0;
|
|
36284
|
-
} else {
|
|
36285
|
-
prev.spacingAfter = 0;
|
|
36286
|
-
}
|
|
36287
|
-
}
|
|
36288
|
-
}
|
|
36289
36214
|
function normalizeImportedParagraphStyle(style2) {
|
|
36290
36215
|
if (!style2) {
|
|
36291
36216
|
return void 0;
|
|
@@ -38313,6 +38238,31 @@ function parseTableLook(tblPr) {
|
|
|
38313
38238
|
noVBand: attr("noVBand") ?? bit(1024) ?? false
|
|
38314
38239
|
};
|
|
38315
38240
|
}
|
|
38241
|
+
function collapseCellAutospacing(paragraphs, flags) {
|
|
38242
|
+
var _a2, _b2;
|
|
38243
|
+
const styleOf = (paragraph) => paragraph.style ?? (paragraph.style = {});
|
|
38244
|
+
const lastIndex = paragraphs.length - 1;
|
|
38245
|
+
for (let index = 0; index < paragraphs.length; index += 1) {
|
|
38246
|
+
const flag = flags[index];
|
|
38247
|
+
if (!flag) continue;
|
|
38248
|
+
if (index === 0 && flag.before) {
|
|
38249
|
+
styleOf(paragraphs[index]).spacingBefore = 0;
|
|
38250
|
+
}
|
|
38251
|
+
if (index === lastIndex && flag.after) {
|
|
38252
|
+
styleOf(paragraphs[index]).spacingAfter = 0;
|
|
38253
|
+
}
|
|
38254
|
+
}
|
|
38255
|
+
for (let index = 0; index < lastIndex; index += 1) {
|
|
38256
|
+
if (!((_a2 = flags[index]) == null ? void 0 : _a2.after) || !((_b2 = flags[index + 1]) == null ? void 0 : _b2.before)) continue;
|
|
38257
|
+
const previous = styleOf(paragraphs[index]);
|
|
38258
|
+
const next = styleOf(paragraphs[index + 1]);
|
|
38259
|
+
if ((previous.spacingAfter ?? 0) >= (next.spacingBefore ?? 0)) {
|
|
38260
|
+
next.spacingBefore = 0;
|
|
38261
|
+
} else {
|
|
38262
|
+
previous.spacingAfter = 0;
|
|
38263
|
+
}
|
|
38264
|
+
}
|
|
38265
|
+
}
|
|
38316
38266
|
async function parseTableNode(tableNode, numberingMaps, zip, relsMap, assets, theme, parseNestedBlocks, _styles) {
|
|
38317
38267
|
const gridCols = [];
|
|
38318
38268
|
const tblGrid = getFirstChildByTagNameNS(tableNode, WORD_NS, "tblGrid");
|
|
@@ -38485,6 +38435,283 @@ async function parseTableNode(tableNode, numberingMaps, zip, relsMap, assets, th
|
|
|
38485
38435
|
}
|
|
38486
38436
|
return table;
|
|
38487
38437
|
}
|
|
38438
|
+
const RECOGNIZED_SDT_PR_CHILDREN = /* @__PURE__ */ new Set([
|
|
38439
|
+
"alias",
|
|
38440
|
+
"tag",
|
|
38441
|
+
"id",
|
|
38442
|
+
"lock",
|
|
38443
|
+
"placeholder",
|
|
38444
|
+
"dataBinding",
|
|
38445
|
+
"temporary",
|
|
38446
|
+
"appearance",
|
|
38447
|
+
"showingPlcHdr",
|
|
38448
|
+
"color",
|
|
38449
|
+
"text",
|
|
38450
|
+
"richText",
|
|
38451
|
+
"picture",
|
|
38452
|
+
"comboBox",
|
|
38453
|
+
"dropDownList",
|
|
38454
|
+
"date",
|
|
38455
|
+
"repeatingSection",
|
|
38456
|
+
"repeatingSectionItem",
|
|
38457
|
+
"group",
|
|
38458
|
+
"equation",
|
|
38459
|
+
"citation",
|
|
38460
|
+
"bibliography"
|
|
38461
|
+
]);
|
|
38462
|
+
function parseSdtPr(sdtPr) {
|
|
38463
|
+
if (!sdtPr) {
|
|
38464
|
+
return {};
|
|
38465
|
+
}
|
|
38466
|
+
const result = {};
|
|
38467
|
+
const aliasEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "alias");
|
|
38468
|
+
if (aliasEl) {
|
|
38469
|
+
const alias = getAttributeValue(aliasEl, "val");
|
|
38470
|
+
if (alias !== null) {
|
|
38471
|
+
result.alias = alias;
|
|
38472
|
+
}
|
|
38473
|
+
}
|
|
38474
|
+
const tagEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "tag");
|
|
38475
|
+
if (tagEl) {
|
|
38476
|
+
const tag = getAttributeValue(tagEl, "val");
|
|
38477
|
+
if (tag !== null) {
|
|
38478
|
+
result.tag = tag;
|
|
38479
|
+
}
|
|
38480
|
+
}
|
|
38481
|
+
const idEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "id");
|
|
38482
|
+
if (idEl) {
|
|
38483
|
+
const id = getAttributeValue(idEl, "val");
|
|
38484
|
+
if (id !== null) {
|
|
38485
|
+
result.id = id;
|
|
38486
|
+
}
|
|
38487
|
+
}
|
|
38488
|
+
const lockEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "lock");
|
|
38489
|
+
if (lockEl) {
|
|
38490
|
+
const lock = getAttributeValue(lockEl, "val");
|
|
38491
|
+
if (lock !== null) {
|
|
38492
|
+
result.lock = lock;
|
|
38493
|
+
}
|
|
38494
|
+
}
|
|
38495
|
+
const appearanceEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "appearance");
|
|
38496
|
+
if (appearanceEl) {
|
|
38497
|
+
const appearance = getAttributeValue(appearanceEl, "val");
|
|
38498
|
+
if (appearance !== null) {
|
|
38499
|
+
result.appearance = appearance;
|
|
38500
|
+
}
|
|
38501
|
+
}
|
|
38502
|
+
const showingPlcHdrEl = getFirstChildByTagNameNS(
|
|
38503
|
+
sdtPr,
|
|
38504
|
+
WORD_NS,
|
|
38505
|
+
"showingPlcHdr"
|
|
38506
|
+
);
|
|
38507
|
+
if (showingPlcHdrEl) {
|
|
38508
|
+
result.showingPlcHdr = isWordTrue(
|
|
38509
|
+
getAttributeValue(showingPlcHdrEl, "val")
|
|
38510
|
+
);
|
|
38511
|
+
}
|
|
38512
|
+
const temporaryEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "temporary");
|
|
38513
|
+
if (temporaryEl) {
|
|
38514
|
+
result.temporary = isWordTrue(getAttributeValue(temporaryEl, "val"));
|
|
38515
|
+
}
|
|
38516
|
+
const colorEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "color");
|
|
38517
|
+
if (colorEl) {
|
|
38518
|
+
const color = getAttributeValue(colorEl, "val");
|
|
38519
|
+
if (color !== null) {
|
|
38520
|
+
result.color = color;
|
|
38521
|
+
}
|
|
38522
|
+
}
|
|
38523
|
+
const placeholderEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "placeholder");
|
|
38524
|
+
if (placeholderEl) {
|
|
38525
|
+
const docPart = getFirstChildByTagNameNS(placeholderEl, WORD_NS, "docPart");
|
|
38526
|
+
if (docPart) {
|
|
38527
|
+
const docPartVal = getAttributeValue(docPart, "val");
|
|
38528
|
+
if (docPartVal !== null) {
|
|
38529
|
+
result.placeholderDocPart = docPartVal;
|
|
38530
|
+
}
|
|
38531
|
+
}
|
|
38532
|
+
}
|
|
38533
|
+
const dataBindingEl = getFirstChildByTagNameNS(sdtPr, WORD_NS, "dataBinding");
|
|
38534
|
+
if (dataBindingEl) {
|
|
38535
|
+
const dataBinding = parseSdtDataBinding(dataBindingEl);
|
|
38536
|
+
if (dataBinding) {
|
|
38537
|
+
result.dataBinding = dataBinding;
|
|
38538
|
+
}
|
|
38539
|
+
}
|
|
38540
|
+
const subtype = parseSdtSubtype(sdtPr);
|
|
38541
|
+
if (subtype) {
|
|
38542
|
+
result.subtype = subtype;
|
|
38543
|
+
}
|
|
38544
|
+
const unknownXml = serializeUnknownSdtPrChildren(sdtPr);
|
|
38545
|
+
if (unknownXml.length > 0) {
|
|
38546
|
+
result.unknownXml = unknownXml;
|
|
38547
|
+
}
|
|
38548
|
+
return result;
|
|
38549
|
+
}
|
|
38550
|
+
function parseSdtDataBinding(el) {
|
|
38551
|
+
const prefixMappingsEl = getFirstChildByTagNameNS(
|
|
38552
|
+
el,
|
|
38553
|
+
WORD_NS,
|
|
38554
|
+
"prefixMappings"
|
|
38555
|
+
);
|
|
38556
|
+
const xpathEl = getFirstChildByTagNameNS(el, WORD_NS, "xpath");
|
|
38557
|
+
const storeItemIDEl = getFirstChildByTagNameNS(el, WORD_NS, "storeItemID");
|
|
38558
|
+
const dataBinding = {};
|
|
38559
|
+
if (prefixMappingsEl) {
|
|
38560
|
+
const val = getAttributeValue(prefixMappingsEl, "val");
|
|
38561
|
+
if (val !== null) {
|
|
38562
|
+
dataBinding.prefixMappings = val;
|
|
38563
|
+
}
|
|
38564
|
+
}
|
|
38565
|
+
if (xpathEl) {
|
|
38566
|
+
const val = getAttributeValue(xpathEl, "val");
|
|
38567
|
+
if (val !== null) {
|
|
38568
|
+
dataBinding.xpath = val;
|
|
38569
|
+
}
|
|
38570
|
+
}
|
|
38571
|
+
if (storeItemIDEl) {
|
|
38572
|
+
const val = getAttributeValue(storeItemIDEl, "val");
|
|
38573
|
+
if (val !== null) {
|
|
38574
|
+
dataBinding.storeItemID = val;
|
|
38575
|
+
}
|
|
38576
|
+
}
|
|
38577
|
+
if (dataBinding.prefixMappings === void 0 && dataBinding.xpath === void 0 && dataBinding.storeItemID === void 0) {
|
|
38578
|
+
return null;
|
|
38579
|
+
}
|
|
38580
|
+
return dataBinding;
|
|
38581
|
+
}
|
|
38582
|
+
function parseSdtListItems(parent) {
|
|
38583
|
+
const items = getChildrenByTagNameNS(parent, WORD_NS, "listItem");
|
|
38584
|
+
if (items.length === 0) {
|
|
38585
|
+
return void 0;
|
|
38586
|
+
}
|
|
38587
|
+
return items.map(
|
|
38588
|
+
(item) => ({
|
|
38589
|
+
displayText: getAttributeValue(item, "displayText") ?? void 0,
|
|
38590
|
+
value: getAttributeValue(item, "value") ?? void 0
|
|
38591
|
+
})
|
|
38592
|
+
);
|
|
38593
|
+
}
|
|
38594
|
+
function parseSdtSubtype(parent) {
|
|
38595
|
+
const comboBoxEl = getFirstChildByTagNameNS(parent, WORD_NS, "comboBox");
|
|
38596
|
+
if (comboBoxEl) {
|
|
38597
|
+
const lastSelectedEl = getFirstChildByTagNameNS(
|
|
38598
|
+
comboBoxEl,
|
|
38599
|
+
WORD_NS,
|
|
38600
|
+
"lastSelectedValue"
|
|
38601
|
+
);
|
|
38602
|
+
return {
|
|
38603
|
+
kind: "comboBox",
|
|
38604
|
+
listItems: parseSdtListItems(comboBoxEl),
|
|
38605
|
+
...lastSelectedEl ? {
|
|
38606
|
+
lastSelectedValue: getAttributeValue(lastSelectedEl, "val") ?? void 0
|
|
38607
|
+
} : {}
|
|
38608
|
+
};
|
|
38609
|
+
}
|
|
38610
|
+
const dropDownEl = getFirstChildByTagNameNS(parent, WORD_NS, "dropDownList");
|
|
38611
|
+
if (dropDownEl) {
|
|
38612
|
+
const lastSelectedEl = getFirstChildByTagNameNS(
|
|
38613
|
+
dropDownEl,
|
|
38614
|
+
WORD_NS,
|
|
38615
|
+
"lastSelectedValue"
|
|
38616
|
+
);
|
|
38617
|
+
return {
|
|
38618
|
+
kind: "dropDownList",
|
|
38619
|
+
listItems: parseSdtListItems(dropDownEl),
|
|
38620
|
+
...lastSelectedEl ? {
|
|
38621
|
+
lastSelectedValue: getAttributeValue(lastSelectedEl, "val") ?? void 0
|
|
38622
|
+
} : {}
|
|
38623
|
+
};
|
|
38624
|
+
}
|
|
38625
|
+
const dateEl = getFirstChildByTagNameNS(parent, WORD_NS, "date");
|
|
38626
|
+
if (dateEl) {
|
|
38627
|
+
const fullDate = getAttributeValue(dateEl, "fullDate") ?? void 0;
|
|
38628
|
+
const dateFormatEl = getFirstChildByTagNameNS(
|
|
38629
|
+
dateEl,
|
|
38630
|
+
WORD_NS,
|
|
38631
|
+
"dateFormat"
|
|
38632
|
+
);
|
|
38633
|
+
const lidEl = getFirstChildByTagNameNS(dateEl, WORD_NS, "lid");
|
|
38634
|
+
const calendarEl = getFirstChildByTagNameNS(dateEl, WORD_NS, "calendar");
|
|
38635
|
+
const storeMappedDataAsEl = getFirstChildByTagNameNS(
|
|
38636
|
+
dateEl,
|
|
38637
|
+
WORD_NS,
|
|
38638
|
+
"storeMappedDataAs"
|
|
38639
|
+
);
|
|
38640
|
+
return {
|
|
38641
|
+
kind: "date",
|
|
38642
|
+
fullDate,
|
|
38643
|
+
dateFormat: dateFormatEl ? getAttributeValue(dateFormatEl, "val") ?? void 0 : void 0,
|
|
38644
|
+
lid: lidEl ? getAttributeValue(lidEl, "val") ?? void 0 : void 0,
|
|
38645
|
+
calendar: calendarEl ? getAttributeValue(calendarEl, "val") ?? void 0 : void 0,
|
|
38646
|
+
storeMappedDataAs: storeMappedDataAsEl ? getAttributeValue(storeMappedDataAsEl, "val") ?? void 0 : void 0
|
|
38647
|
+
};
|
|
38648
|
+
}
|
|
38649
|
+
const textEl = getFirstChildByTagNameNS(parent, WORD_NS, "text");
|
|
38650
|
+
if (textEl) {
|
|
38651
|
+
return { kind: "text" };
|
|
38652
|
+
}
|
|
38653
|
+
for (const kind of [
|
|
38654
|
+
"richText",
|
|
38655
|
+
"picture",
|
|
38656
|
+
"group",
|
|
38657
|
+
"equation",
|
|
38658
|
+
"citation",
|
|
38659
|
+
"bibliography",
|
|
38660
|
+
"repeatingSection",
|
|
38661
|
+
"repeatingSectionItem"
|
|
38662
|
+
]) {
|
|
38663
|
+
if (getFirstChildByTagNameNS(parent, WORD_NS, kind)) {
|
|
38664
|
+
return { kind };
|
|
38665
|
+
}
|
|
38666
|
+
}
|
|
38667
|
+
const w14CheckboxEl = getFirstW14Child(parent, "checkbox");
|
|
38668
|
+
if (w14CheckboxEl) {
|
|
38669
|
+
const checkedEl = getFirstChildByTagNameNS(
|
|
38670
|
+
w14CheckboxEl,
|
|
38671
|
+
WORD14_NS,
|
|
38672
|
+
"checked"
|
|
38673
|
+
);
|
|
38674
|
+
const checkedStateEl = getFirstChildByTagNameNS(
|
|
38675
|
+
w14CheckboxEl,
|
|
38676
|
+
WORD14_NS,
|
|
38677
|
+
"checkedState"
|
|
38678
|
+
);
|
|
38679
|
+
const uncheckedStateEl = getFirstChildByTagNameNS(
|
|
38680
|
+
w14CheckboxEl,
|
|
38681
|
+
WORD14_NS,
|
|
38682
|
+
"uncheckedState"
|
|
38683
|
+
);
|
|
38684
|
+
const checked = checkedEl ? isWordTrue(getAttributeValue(checkedEl, "val")) : void 0;
|
|
38685
|
+
return {
|
|
38686
|
+
kind: "checkbox",
|
|
38687
|
+
...checked !== void 0 ? { checked } : {},
|
|
38688
|
+
...checkedStateEl ? {
|
|
38689
|
+
checkedStateFont: getAttributeValue(checkedStateEl, "font") ?? void 0,
|
|
38690
|
+
checkedStateChar: getAttributeValue(checkedStateEl, "char") ?? void 0
|
|
38691
|
+
} : {},
|
|
38692
|
+
...uncheckedStateEl ? {
|
|
38693
|
+
uncheckedStateFont: getAttributeValue(uncheckedStateEl, "font") ?? void 0,
|
|
38694
|
+
uncheckedStateChar: getAttributeValue(uncheckedStateEl, "char") ?? void 0
|
|
38695
|
+
} : {}
|
|
38696
|
+
};
|
|
38697
|
+
}
|
|
38698
|
+
return void 0;
|
|
38699
|
+
}
|
|
38700
|
+
function serializeUnknownSdtPrChildren(sdtPr) {
|
|
38701
|
+
let out = "";
|
|
38702
|
+
for (let i = 0; i < sdtPr.childNodes.length; i += 1) {
|
|
38703
|
+
const node = sdtPr.childNodes[i];
|
|
38704
|
+
if ((node == null ? void 0 : node.nodeType) !== node.ELEMENT_NODE) {
|
|
38705
|
+
continue;
|
|
38706
|
+
}
|
|
38707
|
+
const el = node;
|
|
38708
|
+
if (el.localName && el.namespaceURI === WORD_NS && RECOGNIZED_SDT_PR_CHILDREN.has(el.localName)) {
|
|
38709
|
+
continue;
|
|
38710
|
+
}
|
|
38711
|
+
out += new XMLSerializer().serializeToString(el);
|
|
38712
|
+
}
|
|
38713
|
+
return out;
|
|
38714
|
+
}
|
|
38488
38715
|
async function parseBlockLevelChild(element, numberingMaps, zip, relsMap, assets, theme, parseNestedBlocks) {
|
|
38489
38716
|
if (element.namespaceURI !== WORD_NS) {
|
|
38490
38717
|
return [];
|
|
@@ -38532,7 +38759,7 @@ async function parseSdtBlockNode(sdtElement, numberingMaps, zip, relsMap, assets
|
|
|
38532
38759
|
const sdtEndPr = getFirstChildByTagNameNS(sdtElement, WORD_NS, "sdtEndPr");
|
|
38533
38760
|
const wrapper = {
|
|
38534
38761
|
groupId: createEditorNodeId("sdt"),
|
|
38535
|
-
|
|
38762
|
+
sdtPr: parseSdtPr(sdtPr),
|
|
38536
38763
|
...sdtEndPr ? { sdtEndPrXml: new XMLSerializer().serializeToString(sdtEndPr) } : {}
|
|
38537
38764
|
};
|
|
38538
38765
|
const sdtContent = getFirstChildByTagNameNS(
|
|
@@ -39558,7 +39785,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
39558
39785
|
const worker = new Worker(
|
|
39559
39786
|
new URL(
|
|
39560
39787
|
/* @vite-ignore */
|
|
39561
|
-
"" + new URL("assets/importDocxWorker-
|
|
39788
|
+
"" + new URL("assets/importDocxWorker-DBjcGf-C.js", import.meta.url).href,
|
|
39562
39789
|
import.meta.url
|
|
39563
39790
|
),
|
|
39564
39791
|
{
|
|
@@ -40811,25 +41038,6 @@ function OasisEditorEditor(props) {
|
|
|
40811
41038
|
surfaceHandlers().onTableCornerResizeHandleMouseDown(table.tableId, event);
|
|
40812
41039
|
}
|
|
40813
41040
|
}), _el$5);
|
|
40814
|
-
insert(_el$4, createComponent(Show, {
|
|
40815
|
-
get when() {
|
|
40816
|
-
return memo(() => !!overlays().toolbarHost)() && overlays().showFloatingTableToolbar;
|
|
40817
|
-
},
|
|
40818
|
-
get children() {
|
|
40819
|
-
return createComponent(FloatingTableToolbar, {
|
|
40820
|
-
get host() {
|
|
40821
|
-
return overlays().toolbarHost;
|
|
40822
|
-
},
|
|
40823
|
-
get selectionBoxes() {
|
|
40824
|
-
return overlays().selectionBoxes;
|
|
40825
|
-
},
|
|
40826
|
-
get visible() {
|
|
40827
|
-
return overlays().showFloatingTableToolbar;
|
|
40828
|
-
},
|
|
40829
|
-
surfaceRef: () => scrollContentRef
|
|
40830
|
-
});
|
|
40831
|
-
}
|
|
40832
|
-
}), _el$5);
|
|
40833
41041
|
insert(_el$4, createComponent(Show, {
|
|
40834
41042
|
get when() {
|
|
40835
41043
|
return overlays().layoutOptions;
|
|
@@ -41461,6 +41669,11 @@ function buildCanvasLayoutSnapshot(options) {
|
|
|
41461
41669
|
if (documentLayout.pages.length === 0 || canvasPages.length === 0) {
|
|
41462
41670
|
return null;
|
|
41463
41671
|
}
|
|
41672
|
+
const canvasPageByIndex = new Map(
|
|
41673
|
+
canvasPages.map(
|
|
41674
|
+
(page) => [Number(page.dataset.pageIndex ?? "-1"), page]
|
|
41675
|
+
)
|
|
41676
|
+
);
|
|
41464
41677
|
const paragraphs = getDocumentParagraphs(state.document);
|
|
41465
41678
|
const paragraphIndexById = new Map(
|
|
41466
41679
|
paragraphs.map(
|
|
@@ -41477,9 +41690,7 @@ function buildCanvasLayoutSnapshot(options) {
|
|
|
41477
41690
|
const floatingTables = [];
|
|
41478
41691
|
const unsupportedRegions = [];
|
|
41479
41692
|
for (const page of documentLayout.pages) {
|
|
41480
|
-
const pageElement =
|
|
41481
|
-
(candidate) => Number(candidate.dataset.pageIndex ?? "-1") === page.index
|
|
41482
|
-
) ?? null;
|
|
41693
|
+
const pageElement = canvasPageByIndex.get(page.index) ?? null;
|
|
41483
41694
|
if (!pageElement) {
|
|
41484
41695
|
continue;
|
|
41485
41696
|
}
|
|
@@ -42163,8 +42374,7 @@ function DocumentShell(props) {
|
|
|
42163
42374
|
return {
|
|
42164
42375
|
...props.overlays,
|
|
42165
42376
|
toolbarHost: props.toolbarHost,
|
|
42166
|
-
persistenceStatus: () => props.persistenceStatus()
|
|
42167
|
-
showFloatingTableToolbar: () => props.showFloatingTableToolbar()
|
|
42377
|
+
persistenceStatus: () => props.persistenceStatus()
|
|
42168
42378
|
};
|
|
42169
42379
|
},
|
|
42170
42380
|
get refs() {
|
|
@@ -42235,8 +42445,7 @@ function InlineShell(props) {
|
|
|
42235
42445
|
return {
|
|
42236
42446
|
...props.overlays,
|
|
42237
42447
|
toolbarHost: props.toolbarHost,
|
|
42238
|
-
persistenceStatus: () => props.persistenceStatus()
|
|
42239
|
-
showFloatingTableToolbar: () => props.showFloatingTableToolbar()
|
|
42448
|
+
persistenceStatus: () => props.persistenceStatus()
|
|
42240
42449
|
};
|
|
42241
42450
|
},
|
|
42242
42451
|
get refs() {
|
|
@@ -42284,8 +42493,7 @@ function BalloonShell(props) {
|
|
|
42284
42493
|
return {
|
|
42285
42494
|
...props.overlays,
|
|
42286
42495
|
toolbarHost: props.toolbarHost,
|
|
42287
|
-
persistenceStatus: () => props.persistenceStatus()
|
|
42288
|
-
showFloatingTableToolbar: () => props.showFloatingTableToolbar()
|
|
42496
|
+
persistenceStatus: () => props.persistenceStatus()
|
|
42289
42497
|
};
|
|
42290
42498
|
},
|
|
42291
42499
|
get refs() {
|
|
@@ -45210,26 +45418,21 @@ function TableStyleGallery(props) {
|
|
|
45210
45418
|
},
|
|
45211
45419
|
onClick: () => apply(style2),
|
|
45212
45420
|
get children() {
|
|
45213
|
-
return
|
|
45421
|
+
return createComponent(Text$1, {
|
|
45214
45422
|
"class": "oasis-editor-table-style-preview",
|
|
45215
45423
|
get style() {
|
|
45216
45424
|
return {
|
|
45217
45425
|
"--table-fill": preview().wholeFill ?? "#ffffff",
|
|
45218
|
-
"--table-header-fill": preview().headerFill ?? preview().wholeFill ?? "#
|
|
45219
|
-
"--table-band-fill": preview().bandFill ?? preview().wholeFill ?? "#
|
|
45220
|
-
"--table-border": preview().borderColor ?? "#
|
|
45426
|
+
"--table-header-fill": preview().headerFill ?? preview().wholeFill ?? "#ffffff",
|
|
45427
|
+
"--table-band-fill": preview().bandFill ?? preview().wholeFill ?? "#ffffff",
|
|
45428
|
+
"--table-border": preview().borderColor ?? "#d1d5db",
|
|
45221
45429
|
"--table-header-color": preview().headerColor ?? "#17212b"
|
|
45222
45430
|
};
|
|
45223
45431
|
},
|
|
45224
45432
|
get children() {
|
|
45225
45433
|
return [_tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3(), _tmpl$$3()];
|
|
45226
45434
|
}
|
|
45227
|
-
})
|
|
45228
|
-
"class": "oasis-editor-table-style-card-label",
|
|
45229
|
-
get children() {
|
|
45230
|
-
return style2.name;
|
|
45231
|
-
}
|
|
45232
|
-
})];
|
|
45435
|
+
});
|
|
45233
45436
|
}
|
|
45234
45437
|
});
|
|
45235
45438
|
}
|
|
@@ -45622,8 +45825,9 @@ function ImageCropMenu(props) {
|
|
|
45622
45825
|
})();
|
|
45623
45826
|
}
|
|
45624
45827
|
const RIBBON_PLACEMENTS = {
|
|
45625
|
-
"editor-toolbar-
|
|
45626
|
-
"
|
|
45828
|
+
"editor-toolbar-export-docx": { tab: "file", group: "document", row: 1 },
|
|
45829
|
+
"editor-toolbar-export-pdf": { tab: "file", group: "document", row: 1 },
|
|
45830
|
+
"editor-toolbar-import-document": { tab: "file", group: "document", row: 1 },
|
|
45627
45831
|
"editor-toolbar-undo": { tab: "home", group: "clipboard", row: 1 },
|
|
45628
45832
|
"editor-toolbar-redo": { tab: "home", group: "clipboard", row: 2 },
|
|
45629
45833
|
"sep-history": { tab: "home", group: "clipboard", row: 2 },
|
|
@@ -45877,6 +46081,7 @@ const TABLE_LAYOUT_BUTTONS = [
|
|
|
45877
46081
|
id: "editor-toolbar-tbl-insert-row-above",
|
|
45878
46082
|
command: "tableInsertRowBefore",
|
|
45879
46083
|
icon: "tableInsertRowAbove",
|
|
46084
|
+
labelKey: "table.insertAbove",
|
|
45880
46085
|
tooltipKey: "table.insertRowAbove",
|
|
45881
46086
|
ribbonSize: "large"
|
|
45882
46087
|
},
|
|
@@ -45884,6 +46089,7 @@ const TABLE_LAYOUT_BUTTONS = [
|
|
|
45884
46089
|
id: "editor-toolbar-tbl-insert-row-below",
|
|
45885
46090
|
command: "tableInsertRowAfter",
|
|
45886
46091
|
icon: "tableInsertRowBelow",
|
|
46092
|
+
labelKey: "table.insertBelow",
|
|
45887
46093
|
tooltipKey: "table.insertRowBelow",
|
|
45888
46094
|
ribbonSize: "large"
|
|
45889
46095
|
},
|
|
@@ -45891,12 +46097,14 @@ const TABLE_LAYOUT_BUTTONS = [
|
|
|
45891
46097
|
id: "editor-toolbar-tbl-delete-row",
|
|
45892
46098
|
command: "tableDeleteRow",
|
|
45893
46099
|
icon: "tableDeleteRow",
|
|
46100
|
+
labelKey: "table.deleteRow",
|
|
45894
46101
|
tooltipKey: "table.deleteRow"
|
|
45895
46102
|
},
|
|
45896
46103
|
{
|
|
45897
46104
|
id: "editor-toolbar-tbl-insert-col-left",
|
|
45898
46105
|
command: "tableInsertColumnBefore",
|
|
45899
46106
|
icon: "tableInsertColumnLeft",
|
|
46107
|
+
labelKey: "table.insertLeft",
|
|
45900
46108
|
tooltipKey: "table.insertColumnLeft",
|
|
45901
46109
|
ribbonSize: "large"
|
|
45902
46110
|
},
|
|
@@ -45904,6 +46112,7 @@ const TABLE_LAYOUT_BUTTONS = [
|
|
|
45904
46112
|
id: "editor-toolbar-tbl-insert-col-right",
|
|
45905
46113
|
command: "tableInsertColumnAfter",
|
|
45906
46114
|
icon: "tableInsertColumnRight",
|
|
46115
|
+
labelKey: "table.insertRight",
|
|
45907
46116
|
tooltipKey: "table.insertColumnRight",
|
|
45908
46117
|
ribbonSize: "large"
|
|
45909
46118
|
},
|
|
@@ -45911,43 +46120,49 @@ const TABLE_LAYOUT_BUTTONS = [
|
|
|
45911
46120
|
id: "editor-toolbar-tbl-delete-col",
|
|
45912
46121
|
command: "tableDeleteColumn",
|
|
45913
46122
|
icon: "tableDeleteColumn",
|
|
46123
|
+
labelKey: "table.deleteColumn",
|
|
45914
46124
|
tooltipKey: "table.deleteColumn"
|
|
45915
46125
|
},
|
|
45916
46126
|
{
|
|
45917
46127
|
id: "editor-toolbar-tbl-merge",
|
|
45918
46128
|
command: "tableMerge",
|
|
45919
46129
|
icon: "tableMerge",
|
|
45920
|
-
|
|
45921
|
-
|
|
46130
|
+
labelKey: "table.merge",
|
|
46131
|
+
tooltipKey: "table.mergeTooltip"
|
|
45922
46132
|
},
|
|
45923
46133
|
{
|
|
45924
46134
|
id: "editor-toolbar-tbl-split",
|
|
45925
46135
|
command: "tableSplit",
|
|
45926
46136
|
icon: "tableSplit",
|
|
46137
|
+
labelKey: "table.split",
|
|
45927
46138
|
tooltipKey: "table.splitTooltip"
|
|
45928
46139
|
},
|
|
45929
46140
|
{
|
|
45930
46141
|
id: "editor-toolbar-tbl-width-100",
|
|
45931
46142
|
command: "tableWidth100",
|
|
45932
46143
|
icon: "tableWidth",
|
|
46144
|
+
labelKey: "table.width100",
|
|
45933
46145
|
tooltipKey: "table.width100Tooltip"
|
|
45934
46146
|
},
|
|
45935
46147
|
{
|
|
45936
46148
|
id: "editor-toolbar-tbl-align-left",
|
|
45937
46149
|
command: "tableAlignLeft",
|
|
45938
46150
|
icon: "tableAlignLeft",
|
|
46151
|
+
labelKey: "table.alignLeft",
|
|
45939
46152
|
tooltipKey: "table.alignLeft"
|
|
45940
46153
|
},
|
|
45941
46154
|
{
|
|
45942
46155
|
id: "editor-toolbar-tbl-align-center",
|
|
45943
46156
|
command: "tableAlignCenter",
|
|
45944
46157
|
icon: "tableAlignCenter",
|
|
46158
|
+
labelKey: "table.alignCenter",
|
|
45945
46159
|
tooltipKey: "table.alignCenter"
|
|
45946
46160
|
},
|
|
45947
46161
|
{
|
|
45948
46162
|
id: "editor-toolbar-tbl-align-right",
|
|
45949
46163
|
command: "tableAlignRight",
|
|
45950
46164
|
icon: "tableAlignRight",
|
|
46165
|
+
labelKey: "table.alignRight",
|
|
45951
46166
|
tooltipKey: "table.alignRight"
|
|
45952
46167
|
}
|
|
45953
46168
|
];
|
|
@@ -46057,48 +46272,35 @@ const fontSizeOptions = (api) => {
|
|
|
46057
46272
|
function createDefaultToolbarPreset(t) {
|
|
46058
46273
|
const items = [];
|
|
46059
46274
|
items.push({
|
|
46060
|
-
type: "
|
|
46061
|
-
id: "editor-toolbar-
|
|
46062
|
-
|
|
46063
|
-
iconName: "file",
|
|
46064
|
-
|
|
46065
|
-
|
|
46066
|
-
|
|
46067
|
-
|
|
46068
|
-
|
|
46069
|
-
|
|
46070
|
-
|
|
46071
|
-
|
|
46072
|
-
|
|
46073
|
-
|
|
46074
|
-
|
|
46075
|
-
|
|
46076
|
-
|
|
46077
|
-
|
|
46078
|
-
|
|
46079
|
-
|
|
46080
|
-
|
|
46081
|
-
|
|
46082
|
-
|
|
46083
|
-
|
|
46084
|
-
|
|
46085
|
-
|
|
46086
|
-
|
|
46087
|
-
|
|
46088
|
-
{
|
|
46089
|
-
type: "button",
|
|
46090
|
-
id: "editor-toolbar-import-document",
|
|
46091
|
-
testId: "editor-toolbar-import-document",
|
|
46092
|
-
iconName: "upload",
|
|
46093
|
-
labelKey: "toolbar.import",
|
|
46094
|
-
wide: true,
|
|
46095
|
-
tooltipKey: "toolbar.import",
|
|
46096
|
-
command: "importDocument"
|
|
46097
|
-
}
|
|
46098
|
-
]
|
|
46099
|
-
}
|
|
46275
|
+
type: "button",
|
|
46276
|
+
id: "editor-toolbar-export-docx",
|
|
46277
|
+
testId: "editor-toolbar-export-docx",
|
|
46278
|
+
iconName: "file-text",
|
|
46279
|
+
labelKey: "toolbar.exportDocx",
|
|
46280
|
+
tooltipKey: "toolbar.exportDocx",
|
|
46281
|
+
command: "exportDocx",
|
|
46282
|
+
ribbonSize: "large"
|
|
46283
|
+
});
|
|
46284
|
+
items.push({
|
|
46285
|
+
type: "button",
|
|
46286
|
+
id: "editor-toolbar-export-pdf",
|
|
46287
|
+
testId: "editor-toolbar-export-pdf",
|
|
46288
|
+
iconName: "file-down",
|
|
46289
|
+
labelKey: "toolbar.exportPdf",
|
|
46290
|
+
tooltipKey: "toolbar.exportPdf",
|
|
46291
|
+
command: "exportPdf",
|
|
46292
|
+
ribbonSize: "large"
|
|
46293
|
+
});
|
|
46294
|
+
items.push({
|
|
46295
|
+
type: "button",
|
|
46296
|
+
id: "editor-toolbar-import-document",
|
|
46297
|
+
testId: "editor-toolbar-import-document",
|
|
46298
|
+
iconName: "upload",
|
|
46299
|
+
labelKey: "toolbar.import",
|
|
46300
|
+
tooltipKey: "toolbar.import",
|
|
46301
|
+
command: "importDocument",
|
|
46302
|
+
ribbonSize: "large"
|
|
46100
46303
|
});
|
|
46101
|
-
items.push({ type: "separator", id: "sep-file", group: "file" });
|
|
46102
46304
|
items.push({
|
|
46103
46305
|
type: "button",
|
|
46104
46306
|
id: "editor-toolbar-undo",
|
|
@@ -46532,7 +46734,7 @@ function createDefaultToolbarPreset(t) {
|
|
|
46532
46734
|
iconName: spec.icon,
|
|
46533
46735
|
command: spec.command,
|
|
46534
46736
|
tooltipKey: spec.tooltipKey,
|
|
46535
|
-
labelKey: spec.
|
|
46737
|
+
labelKey: spec.labelKey,
|
|
46536
46738
|
ribbonSize: spec.ribbonSize
|
|
46537
46739
|
});
|
|
46538
46740
|
}
|
|
@@ -46553,7 +46755,8 @@ function createDefaultToolbarPreset(t) {
|
|
|
46553
46755
|
command: "tableCellShading",
|
|
46554
46756
|
defaultValue: "#f1f5f9",
|
|
46555
46757
|
tooltipKey: "table.cellColor",
|
|
46556
|
-
labelKey: "table.cellColor"
|
|
46758
|
+
labelKey: "table.cellColor",
|
|
46759
|
+
ribbonSize: "large"
|
|
46557
46760
|
});
|
|
46558
46761
|
items.push({
|
|
46559
46762
|
type: "custom",
|
|
@@ -46628,7 +46831,6 @@ function createDefaultToolbarPreset(t) {
|
|
|
46628
46831
|
return withDefaultRibbonPlacement(items);
|
|
46629
46832
|
}
|
|
46630
46833
|
const OASIS_TOOLBAR_ITEMS = {
|
|
46631
|
-
fileDropdown: "editor-toolbar-file-dropdown",
|
|
46632
46834
|
exportDocx: "editor-toolbar-export-docx",
|
|
46633
46835
|
exportPdf: "editor-toolbar-export-pdf",
|
|
46634
46836
|
importDocument: "editor-toolbar-import-document",
|
|
@@ -46864,7 +47066,7 @@ export {
|
|
|
46864
47066
|
textStyleToFontSizePt as by,
|
|
46865
47067
|
resolveTextAlignmentBaselineOffset as bz,
|
|
46866
47068
|
getPageContentWidth as c,
|
|
46867
|
-
|
|
47069
|
+
isLocalFontAccessSupported as c$,
|
|
46868
47070
|
getPageColumnRects as c0,
|
|
46869
47071
|
findFootnoteReference as c1,
|
|
46870
47072
|
resolveImporterForFile as c2,
|
|
@@ -46889,19 +47091,19 @@ export {
|
|
|
46889
47091
|
fontSizePtToPx as cL,
|
|
46890
47092
|
resolveNamedTextStyle as cM,
|
|
46891
47093
|
resolveNamedTableStyle as cN,
|
|
46892
|
-
|
|
46893
|
-
|
|
46894
|
-
|
|
46895
|
-
|
|
46896
|
-
|
|
46897
|
-
|
|
46898
|
-
|
|
46899
|
-
|
|
46900
|
-
|
|
46901
|
-
|
|
46902
|
-
|
|
46903
|
-
|
|
46904
|
-
|
|
47094
|
+
resolveEffectiveTableStyle as cO,
|
|
47095
|
+
createDefaultToolbarPreset as cP,
|
|
47096
|
+
MenuRegistry as cQ,
|
|
47097
|
+
createToolbarRegistry as cR,
|
|
47098
|
+
Editor as cS,
|
|
47099
|
+
resolveCommandRef as cT,
|
|
47100
|
+
commandRefName as cU,
|
|
47101
|
+
createOasisEditorClient as cV,
|
|
47102
|
+
createEditorZoom as cW,
|
|
47103
|
+
startLongTaskObserver as cX,
|
|
47104
|
+
installGlobalReport as cY,
|
|
47105
|
+
applyStoredPreciseFontPreference as cZ,
|
|
47106
|
+
getWelcomeSeen as c_,
|
|
46905
47107
|
layoutMetricsEpoch as ca,
|
|
46906
47108
|
bumpLayoutMetricsEpoch as cb,
|
|
46907
47109
|
createCanvasLayoutSnapshotProvider as cc,
|
|
@@ -46929,46 +47131,47 @@ export {
|
|
|
46929
47131
|
markStart as cy,
|
|
46930
47132
|
markEnd as cz,
|
|
46931
47133
|
domTextMeasurer as d,
|
|
46932
|
-
|
|
46933
|
-
|
|
46934
|
-
|
|
46935
|
-
|
|
46936
|
-
|
|
46937
|
-
|
|
46938
|
-
|
|
46939
|
-
|
|
46940
|
-
|
|
46941
|
-
|
|
46942
|
-
|
|
46943
|
-
|
|
46944
|
-
|
|
46945
|
-
|
|
46946
|
-
|
|
46947
|
-
|
|
46948
|
-
|
|
46949
|
-
|
|
46950
|
-
|
|
46951
|
-
|
|
46952
|
-
|
|
46953
|
-
|
|
46954
|
-
|
|
46955
|
-
|
|
46956
|
-
|
|
46957
|
-
|
|
46958
|
-
|
|
46959
|
-
|
|
46960
|
-
|
|
46961
|
-
|
|
46962
|
-
|
|
46963
|
-
|
|
46964
|
-
|
|
46965
|
-
|
|
46966
|
-
|
|
46967
|
-
|
|
46968
|
-
|
|
46969
|
-
|
|
46970
|
-
|
|
46971
|
-
|
|
47134
|
+
EDITOR_SCROLL_PADDING_PX as d0,
|
|
47135
|
+
Toolbar as d1,
|
|
47136
|
+
OasisEditorLoading as d2,
|
|
47137
|
+
I18nProvider as d3,
|
|
47138
|
+
createTranslator as d4,
|
|
47139
|
+
registerDomStatsSurface as d5,
|
|
47140
|
+
createEditorLogger as d6,
|
|
47141
|
+
ActionRow as d7,
|
|
47142
|
+
ColorPicker as d8,
|
|
47143
|
+
CommandRegistry as d9,
|
|
47144
|
+
buildRibbonTabDefinitions as dA,
|
|
47145
|
+
createEditorCommandBus as dB,
|
|
47146
|
+
createOasisEditor as dC,
|
|
47147
|
+
createOasisEditorContainer as dD,
|
|
47148
|
+
mount as dE,
|
|
47149
|
+
registerToolbarRenderer as dF,
|
|
47150
|
+
DEFAULT_PALETTE as da,
|
|
47151
|
+
DialogFooter as db,
|
|
47152
|
+
FieldRow as dc,
|
|
47153
|
+
FloatingActionButton as dd,
|
|
47154
|
+
GridPicker as de,
|
|
47155
|
+
Heading as df,
|
|
47156
|
+
IconButton as dg,
|
|
47157
|
+
Menu as dh,
|
|
47158
|
+
OASIS_BUILTIN_COMMANDS as di,
|
|
47159
|
+
OASIS_MENU_ITEMS as dj,
|
|
47160
|
+
OASIS_TOOLBAR_ITEMS as dk,
|
|
47161
|
+
OasisEditorAppLazy as dl,
|
|
47162
|
+
OasisEditorContainer as dm,
|
|
47163
|
+
PluginCollection as dn,
|
|
47164
|
+
Popover as dp,
|
|
47165
|
+
RIBBON_TABS as dq,
|
|
47166
|
+
Select as dr,
|
|
47167
|
+
Separator as ds,
|
|
47168
|
+
SidePanel as dt,
|
|
47169
|
+
SidePanelBody as du,
|
|
47170
|
+
SidePanelFooter as dv,
|
|
47171
|
+
SidePanelHeader as dw,
|
|
47172
|
+
SplitButton as dx,
|
|
47173
|
+
StyleGallery as dy,
|
|
47174
|
+
Button$1 as dz,
|
|
46972
47175
|
estimateTableBlockHeight as e,
|
|
46973
47176
|
getParagraphText as f,
|
|
46974
47177
|
getProjectedParagraphBlockHeight as g,
|