oasis-editor 0.0.149 → 0.0.150
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-CmqlSXEk.js → OasisEditorApp-CZNfjaj2.js} +360 -35
- package/dist/app/controllers/EditorCommandsController.d.ts +4 -0
- package/dist/app/controllers/createCropSession.d.ts +1 -0
- package/dist/app/controllers/useEditorImageOperations.d.ts +3 -0
- package/dist/assets/{importDocxWorker-CpQR2fwx.js → importDocxWorker-Ddoy1WwF.js} +1 -1
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/image.d.ts +16 -1
- package/dist/core/commands/publicCommandTypes.d.ts +4 -0
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/primitives.d.ts +16 -0
- package/dist/export/docx/docxTypes.d.ts +3 -1
- package/dist/export/pdf/OasisPdfWriter.d.ts +2 -1
- package/dist/export/pdf/writer/PdfContentStream.d.ts +3 -1
- package/dist/i18n/locales/en.d.ts +8 -0
- package/dist/i18n/locales/pt-BR.d.ts +8 -0
- package/dist/{index-B7V7kbjr.js → index-DgN6KXYw.js} +547 -227
- package/dist/index.d.ts +1 -1
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/essentialsCapabilities.d.ts +10 -0
- package/dist/ui/OasisEditorEditorProps.d.ts +3 -0
- package/dist/ui/app/buildEditorViewProps.d.ts +1 -0
- package/dist/ui/app/createAppCommandsController.d.ts +8 -0
- package/dist/ui/app/createEditorCommandRuntime.d.ts +4 -0
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +3 -0
- package/dist/ui/cropGeometry.d.ts +4 -3
- package/dist/ui/overlays/ImageCropPreviewOverlay.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1860,6 +1860,7 @@ const en = {
|
|
|
1860
1860
|
"ribbon.group.paragraph": "Paragraph",
|
|
1861
1861
|
"ribbon.group.styles": "Styles",
|
|
1862
1862
|
"ribbon.group.illustrations": "Illustrations",
|
|
1863
|
+
"ribbon.group.symbols": "Symbols",
|
|
1863
1864
|
"ribbon.group.tables": "Tables",
|
|
1864
1865
|
"ribbon.group.links": "Links",
|
|
1865
1866
|
"ribbon.group.footnotes": "Footnotes",
|
|
@@ -1879,10 +1880,17 @@ const en = {
|
|
|
1879
1880
|
"ribbon.group.imageStyles": "Picture Styles",
|
|
1880
1881
|
// Image format (contextual tab)
|
|
1881
1882
|
"image.crop": "Crop",
|
|
1883
|
+
"image.cropToShape": "Crop to Shape",
|
|
1884
|
+
"image.cropAspectRatio": "Aspect Ratio",
|
|
1885
|
+
"image.cropFill": "Fill",
|
|
1886
|
+
"image.cropFit": "Fit",
|
|
1882
1887
|
"image.height": "Height",
|
|
1883
1888
|
"image.width": "Width",
|
|
1884
1889
|
"image.cropReset": "Reset crop",
|
|
1885
1890
|
"image.cropRatio.square": "1:1",
|
|
1891
|
+
"image.cropRatio.squareGroup": "Square",
|
|
1892
|
+
"image.cropRatio.portrait": "Portrait",
|
|
1893
|
+
"image.cropRatio.landscape": "Landscape",
|
|
1886
1894
|
"image.cropRatio.16x9": "16:9",
|
|
1887
1895
|
"image.cropRatio.4x3": "4:3",
|
|
1888
1896
|
"image.cropRatio.3x2": "3:2",
|
|
@@ -2474,6 +2482,7 @@ const ptBR = {
|
|
|
2474
2482
|
"ribbon.group.paragraph": "Parágrafo",
|
|
2475
2483
|
"ribbon.group.styles": "Estilos",
|
|
2476
2484
|
"ribbon.group.illustrations": "Ilustrações",
|
|
2485
|
+
"ribbon.group.symbols": "Símbolos",
|
|
2477
2486
|
"ribbon.group.tables": "Tabelas",
|
|
2478
2487
|
"ribbon.group.links": "Links",
|
|
2479
2488
|
"ribbon.group.footnotes": "Notas de Rodapé",
|
|
@@ -2493,10 +2502,17 @@ const ptBR = {
|
|
|
2493
2502
|
"ribbon.group.imageStyles": "Estilos de Imagem",
|
|
2494
2503
|
// Image format (contextual tab)
|
|
2495
2504
|
"image.crop": "Cortar",
|
|
2505
|
+
"image.cropToShape": "Cortar para Demarcar Forma",
|
|
2506
|
+
"image.cropAspectRatio": "Taxa de Proporção",
|
|
2507
|
+
"image.cropFill": "Preencher",
|
|
2508
|
+
"image.cropFit": "Ajustar",
|
|
2496
2509
|
"image.height": "Altura",
|
|
2497
2510
|
"image.width": "Largura",
|
|
2498
2511
|
"image.cropReset": "Redefinir corte",
|
|
2499
2512
|
"image.cropRatio.square": "1:1",
|
|
2513
|
+
"image.cropRatio.squareGroup": "Quadrado",
|
|
2514
|
+
"image.cropRatio.portrait": "Retrato",
|
|
2515
|
+
"image.cropRatio.landscape": "Paisagem",
|
|
2500
2516
|
"image.cropRatio.16x9": "16:9",
|
|
2501
2517
|
"image.cropRatio.4x3": "4:3",
|
|
2502
2518
|
"image.cropRatio.3x2": "3:2",
|
|
@@ -2696,14 +2712,14 @@ function I18nProvider(props) {
|
|
|
2696
2712
|
});
|
|
2697
2713
|
}
|
|
2698
2714
|
const oasisMarkBase64 = "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";
|
|
2699
|
-
var _tmpl$$
|
|
2715
|
+
var _tmpl$$1c = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
2700
2716
|
const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
|
|
2701
2717
|
const MARK_ASPECT = 3 / 4;
|
|
2702
2718
|
function OasisBrandMark(props) {
|
|
2703
2719
|
const height = () => props.height ?? 64;
|
|
2704
2720
|
const width = () => Math.round(height() * MARK_ASPECT);
|
|
2705
2721
|
return (() => {
|
|
2706
|
-
var _el$ = _tmpl$$
|
|
2722
|
+
var _el$ = _tmpl$$1c();
|
|
2707
2723
|
setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
|
|
2708
2724
|
setAttribute(_el$, "draggable", false);
|
|
2709
2725
|
createRenderEffect((_p$) => {
|
|
@@ -2720,7 +2736,7 @@ function OasisBrandMark(props) {
|
|
|
2720
2736
|
return _el$;
|
|
2721
2737
|
})();
|
|
2722
2738
|
}
|
|
2723
|
-
var _tmpl$$
|
|
2739
|
+
var _tmpl$$1b = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$L = /* @__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$y = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2724
2740
|
function OasisEditorLoading(props) {
|
|
2725
2741
|
const t = useI18n();
|
|
2726
2742
|
const variant = () => props.variant ?? "overlay";
|
|
@@ -2741,10 +2757,10 @@ function OasisEditorLoading(props) {
|
|
|
2741
2757
|
return pct() != null;
|
|
2742
2758
|
},
|
|
2743
2759
|
get children() {
|
|
2744
|
-
var _el$6 = _tmpl$$
|
|
2760
|
+
var _el$6 = _tmpl$$1b();
|
|
2745
2761
|
insert(_el$6, (() => {
|
|
2746
2762
|
var _c$ = memo(() => !!isDone());
|
|
2747
|
-
return () => _c$() ? _tmpl$3$
|
|
2763
|
+
return () => _c$() ? _tmpl$3$y() : `${pct()}%`;
|
|
2748
2764
|
})());
|
|
2749
2765
|
return _el$6;
|
|
2750
2766
|
}
|
|
@@ -2795,7 +2811,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2795
2811
|
onCleanup(() => {
|
|
2796
2812
|
cancelled = true;
|
|
2797
2813
|
});
|
|
2798
|
-
import("./OasisEditorApp-
|
|
2814
|
+
import("./OasisEditorApp-CZNfjaj2.js").then((m) => {
|
|
2799
2815
|
cancelled = true;
|
|
2800
2816
|
setProgress(1);
|
|
2801
2817
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -6145,6 +6161,10 @@ const OASIS_BUILTIN_COMMANDS = [
|
|
|
6145
6161
|
"imageHeightCm",
|
|
6146
6162
|
"imageCrop",
|
|
6147
6163
|
"imageCropAspect",
|
|
6164
|
+
"imageCropShape",
|
|
6165
|
+
"imageCropFill",
|
|
6166
|
+
"imageCropFit",
|
|
6167
|
+
"imageCropReset",
|
|
6148
6168
|
"imageBorder",
|
|
6149
6169
|
"outdent",
|
|
6150
6170
|
"indent",
|
|
@@ -6221,10 +6241,10 @@ function mount(target, props = {}) {
|
|
|
6221
6241
|
unmount: () => client.dispose()
|
|
6222
6242
|
});
|
|
6223
6243
|
}
|
|
6224
|
-
var _tmpl$$
|
|
6244
|
+
var _tmpl$$1a = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$K = /* @__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$x = /* @__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$m = /* @__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$e = /* @__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>`);
|
|
6225
6245
|
function SvgIcon(props) {
|
|
6226
6246
|
return (() => {
|
|
6227
|
-
var _el$ = _tmpl$$
|
|
6247
|
+
var _el$ = _tmpl$$1a();
|
|
6228
6248
|
insert(_el$, () => props.children);
|
|
6229
6249
|
createRenderEffect((_p$) => {
|
|
6230
6250
|
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;
|
|
@@ -6255,13 +6275,13 @@ function SvgIcon(props) {
|
|
|
6255
6275
|
const FootnoteIcon = () => createComponent(SvgIcon, {
|
|
6256
6276
|
fill: "none",
|
|
6257
6277
|
get children() {
|
|
6258
|
-
return [_tmpl$2$K(), _tmpl$3$
|
|
6278
|
+
return [_tmpl$2$K(), _tmpl$3$x()];
|
|
6259
6279
|
}
|
|
6260
6280
|
});
|
|
6261
6281
|
const SpecialIndentFirstLineIcon = () => createComponent(SvgIcon, {
|
|
6262
6282
|
fill: "currentColor",
|
|
6263
6283
|
get children() {
|
|
6264
|
-
return _tmpl$4$
|
|
6284
|
+
return _tmpl$4$m();
|
|
6265
6285
|
}
|
|
6266
6286
|
});
|
|
6267
6287
|
const LineSpacingIcon = () => createComponent(SvgIcon, {
|
|
@@ -6272,7 +6292,7 @@ const LineSpacingIcon = () => createComponent(SvgIcon, {
|
|
|
6272
6292
|
"stroke-linecap": "round",
|
|
6273
6293
|
"stroke-linejoin": "round",
|
|
6274
6294
|
get children() {
|
|
6275
|
-
return [_tmpl$5$
|
|
6295
|
+
return [_tmpl$5$e(), _tmpl$6$a(), _tmpl$7$5(), _tmpl$8$3(), _tmpl$9$1(), _tmpl$0$1()];
|
|
6276
6296
|
}
|
|
6277
6297
|
});
|
|
6278
6298
|
const TableIcon = (props) => createComponent(SvgIcon, {
|
|
@@ -6432,11 +6452,11 @@ function ToolIcon(props) {
|
|
|
6432
6452
|
children: (render2) => render2()()
|
|
6433
6453
|
});
|
|
6434
6454
|
}
|
|
6435
|
-
var _tmpl$$
|
|
6455
|
+
var _tmpl$$19 = /* @__PURE__ */ template(`<button>`);
|
|
6436
6456
|
function SurfaceButton(props) {
|
|
6437
6457
|
const [local, others] = splitProps(props, ["type", "icon", "label", "variant", "size", "active", "class", "classList", "children"]);
|
|
6438
6458
|
return (() => {
|
|
6439
|
-
var _el$ = _tmpl$$
|
|
6459
|
+
var _el$ = _tmpl$$19();
|
|
6440
6460
|
spread(_el$, mergeProps({
|
|
6441
6461
|
get type() {
|
|
6442
6462
|
return local.type ?? "button";
|
|
@@ -6497,7 +6517,7 @@ function Text$1(props) {
|
|
|
6497
6517
|
}
|
|
6498
6518
|
}));
|
|
6499
6519
|
}
|
|
6500
|
-
var _tmpl$$
|
|
6520
|
+
var _tmpl$$18 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$J = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$w = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$l = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$d = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$9 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
|
|
6501
6521
|
function Menubar(props) {
|
|
6502
6522
|
const t = useI18n();
|
|
6503
6523
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
@@ -6565,13 +6585,13 @@ function Menubar(props) {
|
|
|
6565
6585
|
});
|
|
6566
6586
|
const topLevelItems = () => pruneTree(menuTree());
|
|
6567
6587
|
return (() => {
|
|
6568
|
-
var _el$ = _tmpl$$
|
|
6588
|
+
var _el$ = _tmpl$$18();
|
|
6569
6589
|
insert(_el$, createComponent(For, {
|
|
6570
6590
|
get each() {
|
|
6571
6591
|
return topLevelItems();
|
|
6572
6592
|
},
|
|
6573
6593
|
children: (topLevel) => (() => {
|
|
6574
|
-
var _el$2 = _tmpl$3$
|
|
6594
|
+
var _el$2 = _tmpl$3$w();
|
|
6575
6595
|
_el$2.addEventListener("mouseenter", () => {
|
|
6576
6596
|
if (activeMenu() && activeMenu() !== topLevel.id) {
|
|
6577
6597
|
setActiveMenu(topLevel.id);
|
|
@@ -6637,7 +6657,7 @@ function MenuNode(props) {
|
|
|
6637
6657
|
} = props;
|
|
6638
6658
|
const isSeparator = (_a2 = node.item) == null ? void 0 : _a2.separator;
|
|
6639
6659
|
if (isSeparator) {
|
|
6640
|
-
return _tmpl$4$
|
|
6660
|
+
return _tmpl$4$l();
|
|
6641
6661
|
}
|
|
6642
6662
|
const hasChildren = node.children.length > 0;
|
|
6643
6663
|
const [showSub, setShowSub] = createSignal(false);
|
|
@@ -6713,7 +6733,7 @@ function MenuNode(props) {
|
|
|
6713
6733
|
}), createComponent(Show, {
|
|
6714
6734
|
when: hasChildren,
|
|
6715
6735
|
get children() {
|
|
6716
|
-
return _tmpl$5$
|
|
6736
|
+
return _tmpl$5$d();
|
|
6717
6737
|
}
|
|
6718
6738
|
}), createComponent(Show, {
|
|
6719
6739
|
get when() {
|
|
@@ -6739,10 +6759,10 @@ function MenuNode(props) {
|
|
|
6739
6759
|
}
|
|
6740
6760
|
});
|
|
6741
6761
|
}
|
|
6742
|
-
var _tmpl$$
|
|
6762
|
+
var _tmpl$$17 = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
|
|
6743
6763
|
function TitleBar(props) {
|
|
6744
6764
|
return (() => {
|
|
6745
|
-
var _el$ = _tmpl$$
|
|
6765
|
+
var _el$ = _tmpl$$17(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
6746
6766
|
insert(_el$3, () => props.children);
|
|
6747
6767
|
return _el$;
|
|
6748
6768
|
})();
|
|
@@ -6837,7 +6857,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
6837
6857
|
);
|
|
6838
6858
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
6839
6859
|
}
|
|
6840
|
-
var _tmpl$$
|
|
6860
|
+
var _tmpl$$16 = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$I = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$v = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$k = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$c = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
6841
6861
|
function OutlinePanel(props) {
|
|
6842
6862
|
const t = useI18n();
|
|
6843
6863
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
@@ -6908,13 +6928,13 @@ function OutlinePanel(props) {
|
|
|
6908
6928
|
}
|
|
6909
6929
|
});
|
|
6910
6930
|
return (() => {
|
|
6911
|
-
var _el$ = _tmpl$3$
|
|
6931
|
+
var _el$ = _tmpl$3$v(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
|
|
6912
6932
|
insert(_el$2, createComponent(Show, {
|
|
6913
6933
|
get when() {
|
|
6914
6934
|
return !collapsed();
|
|
6915
6935
|
},
|
|
6916
6936
|
get children() {
|
|
6917
|
-
var _el$3 = _tmpl$$
|
|
6937
|
+
var _el$3 = _tmpl$$16();
|
|
6918
6938
|
insert(_el$3, () => t("menu.view.outline") || "Outline");
|
|
6919
6939
|
return _el$3;
|
|
6920
6940
|
}
|
|
@@ -6932,7 +6952,7 @@ function OutlinePanel(props) {
|
|
|
6932
6952
|
},
|
|
6933
6953
|
get fallback() {
|
|
6934
6954
|
return (() => {
|
|
6935
|
-
var _el$7 = _tmpl$4$
|
|
6955
|
+
var _el$7 = _tmpl$4$k();
|
|
6936
6956
|
insert(_el$7, () => t("outline.empty"));
|
|
6937
6957
|
return _el$7;
|
|
6938
6958
|
})();
|
|
@@ -6943,7 +6963,7 @@ function OutlinePanel(props) {
|
|
|
6943
6963
|
return items();
|
|
6944
6964
|
},
|
|
6945
6965
|
children: (item) => (() => {
|
|
6946
|
-
var _el$8 = _tmpl$5$
|
|
6966
|
+
var _el$8 = _tmpl$5$c();
|
|
6947
6967
|
_el$8.$$click = () => props.onNavigate(item.anchor);
|
|
6948
6968
|
insert(_el$8, () => item.text);
|
|
6949
6969
|
createRenderEffect((_p$) => {
|
|
@@ -6982,7 +7002,7 @@ function OutlinePanel(props) {
|
|
|
6982
7002
|
})();
|
|
6983
7003
|
}
|
|
6984
7004
|
delegateEvents(["click"]);
|
|
6985
|
-
var _tmpl$$
|
|
7005
|
+
var _tmpl$$15 = /* @__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$H = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
6986
7006
|
function ToolbarOverflowManager(props) {
|
|
6987
7007
|
const t = useI18n();
|
|
6988
7008
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
@@ -7126,7 +7146,7 @@ function ToolbarOverflowManager(props) {
|
|
|
7126
7146
|
};
|
|
7127
7147
|
};
|
|
7128
7148
|
return (() => {
|
|
7129
|
-
var _el$ = _tmpl$$
|
|
7149
|
+
var _el$ = _tmpl$$15(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
7130
7150
|
var _ref$ = containerRef;
|
|
7131
7151
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
7132
7152
|
var _ref$2 = moreMeasureRef;
|
|
@@ -7214,7 +7234,7 @@ function resolveLabel(item, api) {
|
|
|
7214
7234
|
if (item.labelKey) return api.t(item.labelKey);
|
|
7215
7235
|
return void 0;
|
|
7216
7236
|
}
|
|
7217
|
-
var _tmpl$$
|
|
7237
|
+
var _tmpl$$14 = /* @__PURE__ */ template(`<span>`), _tmpl$2$G = /* @__PURE__ */ template(`<button type=button>`);
|
|
7218
7238
|
function Button$1(props) {
|
|
7219
7239
|
const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
7220
7240
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
@@ -7256,7 +7276,7 @@ function Button$1(props) {
|
|
|
7256
7276
|
return local.label;
|
|
7257
7277
|
},
|
|
7258
7278
|
get children() {
|
|
7259
|
-
var _el$2 = _tmpl$$
|
|
7279
|
+
var _el$2 = _tmpl$$14();
|
|
7260
7280
|
insert(_el$2, () => local.label);
|
|
7261
7281
|
return _el$2;
|
|
7262
7282
|
}
|
|
@@ -7338,7 +7358,7 @@ function useDismiss(options) {
|
|
|
7338
7358
|
});
|
|
7339
7359
|
});
|
|
7340
7360
|
}
|
|
7341
|
-
var _tmpl$$
|
|
7361
|
+
var _tmpl$$13 = /* @__PURE__ */ template(`<div>`);
|
|
7342
7362
|
function Popover(props) {
|
|
7343
7363
|
let anchorRef;
|
|
7344
7364
|
let panelRef;
|
|
@@ -7355,7 +7375,7 @@ function Popover(props) {
|
|
|
7355
7375
|
closeOnEscape: props.closeOnEscape
|
|
7356
7376
|
});
|
|
7357
7377
|
const panel = (portalled) => (() => {
|
|
7358
|
-
var _el$ = _tmpl$$
|
|
7378
|
+
var _el$ = _tmpl$$13();
|
|
7359
7379
|
addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
|
|
7360
7380
|
var _ref$ = panelRef;
|
|
7361
7381
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
@@ -7407,15 +7427,15 @@ function Popover(props) {
|
|
|
7407
7427
|
}
|
|
7408
7428
|
})];
|
|
7409
7429
|
}
|
|
7410
|
-
var _tmpl$$
|
|
7430
|
+
var _tmpl$$12 = /* @__PURE__ */ template(`<i data-lucide=chevron-down>`);
|
|
7411
7431
|
function DropdownChevron(props) {
|
|
7412
7432
|
return (() => {
|
|
7413
|
-
var _el$ = _tmpl$$
|
|
7433
|
+
var _el$ = _tmpl$$12();
|
|
7414
7434
|
createRenderEffect(() => className(_el$, `oasis-editor-dropdown-chevron${props.class ? ` ${props.class}` : ""}`));
|
|
7415
7435
|
return _el$;
|
|
7416
7436
|
})();
|
|
7417
7437
|
}
|
|
7418
|
-
var _tmpl$$
|
|
7438
|
+
var _tmpl$$11 = /* @__PURE__ */ template(`<div>`), _tmpl$2$F = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$u = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$4$j = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
|
|
7419
7439
|
function Menu(props) {
|
|
7420
7440
|
const [open, setOpen] = createSignal(false);
|
|
7421
7441
|
const updateOpen = (nextOpen) => {
|
|
@@ -7440,7 +7460,7 @@ function Menu(props) {
|
|
|
7440
7460
|
},
|
|
7441
7461
|
onPanelMouseLeave: void 0,
|
|
7442
7462
|
trigger: (api) => (() => {
|
|
7443
|
-
var _el$3 = _tmpl$4$
|
|
7463
|
+
var _el$3 = _tmpl$4$j();
|
|
7444
7464
|
_el$3.$$click = () => api.toggle();
|
|
7445
7465
|
use((el) => api.ref(el), _el$3);
|
|
7446
7466
|
insert(_el$3, createComponent(Show, {
|
|
@@ -7460,7 +7480,7 @@ function Menu(props) {
|
|
|
7460
7480
|
return props.label;
|
|
7461
7481
|
},
|
|
7462
7482
|
get children() {
|
|
7463
|
-
var _el$4 = _tmpl$3$
|
|
7483
|
+
var _el$4 = _tmpl$3$u();
|
|
7464
7484
|
insert(_el$4, () => props.label);
|
|
7465
7485
|
return _el$4;
|
|
7466
7486
|
}
|
|
@@ -7495,7 +7515,7 @@ function Menu(props) {
|
|
|
7495
7515
|
return _el$3;
|
|
7496
7516
|
})(),
|
|
7497
7517
|
get children() {
|
|
7498
|
-
var _el$2 = _tmpl$$
|
|
7518
|
+
var _el$2 = _tmpl$$11();
|
|
7499
7519
|
_el$2.$$click = (event) => {
|
|
7500
7520
|
const el = event.target;
|
|
7501
7521
|
if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
|
|
@@ -7510,7 +7530,7 @@ function Menu(props) {
|
|
|
7510
7530
|
})();
|
|
7511
7531
|
}
|
|
7512
7532
|
delegateEvents(["click"]);
|
|
7513
|
-
var _tmpl
|
|
7533
|
+
var _tmpl$$10 = /* @__PURE__ */ template(`<select>`), _tmpl$2$E = /* @__PURE__ */ template(`<span class=oasis-editor-tool-select-ribbon-large-label>`), _tmpl$3$t = /* @__PURE__ */ template(`<div class=oasis-editor-tool-select-ribbon-large-wrap>`);
|
|
7514
7534
|
function Select(props) {
|
|
7515
7535
|
let selectRef;
|
|
7516
7536
|
const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value", "label", "ribbonSize"]);
|
|
@@ -7526,7 +7546,7 @@ function Select(props) {
|
|
|
7526
7546
|
}
|
|
7527
7547
|
});
|
|
7528
7548
|
const select = () => (() => {
|
|
7529
|
-
var _el$ = _tmpl
|
|
7549
|
+
var _el$ = _tmpl$$10();
|
|
7530
7550
|
var _ref$ = selectRef;
|
|
7531
7551
|
typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
|
|
7532
7552
|
spread(_el$, mergeProps({
|
|
@@ -7561,7 +7581,7 @@ function Select(props) {
|
|
|
7561
7581
|
return select();
|
|
7562
7582
|
},
|
|
7563
7583
|
get children() {
|
|
7564
|
-
var _el$2 = _tmpl$3$
|
|
7584
|
+
var _el$2 = _tmpl$3$t();
|
|
7565
7585
|
insert(_el$2, createComponent(Show, {
|
|
7566
7586
|
get when() {
|
|
7567
7587
|
return local.label;
|
|
@@ -7577,15 +7597,15 @@ function Select(props) {
|
|
|
7577
7597
|
}
|
|
7578
7598
|
});
|
|
7579
7599
|
}
|
|
7580
|
-
var _tmpl
|
|
7600
|
+
var _tmpl$$$ = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
|
|
7581
7601
|
function Separator(props) {
|
|
7582
7602
|
return (() => {
|
|
7583
|
-
var _el$ = _tmpl
|
|
7603
|
+
var _el$ = _tmpl$$$();
|
|
7584
7604
|
createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
|
|
7585
7605
|
return _el$;
|
|
7586
7606
|
})();
|
|
7587
7607
|
}
|
|
7588
|
-
var _tmpl$$
|
|
7608
|
+
var _tmpl$$_ = /* @__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>`);
|
|
7589
7609
|
function SplitButton(props) {
|
|
7590
7610
|
return createComponent(Popover, {
|
|
7591
7611
|
get open() {
|
|
@@ -7604,7 +7624,7 @@ function SplitButton(props) {
|
|
|
7604
7624
|
return props.onPanelMouseLeave;
|
|
7605
7625
|
},
|
|
7606
7626
|
trigger: (api) => (() => {
|
|
7607
|
-
var _el$ = _tmpl$$
|
|
7627
|
+
var _el$ = _tmpl$$_(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7608
7628
|
use((el) => api.ref(el), _el$);
|
|
7609
7629
|
_el$2.$$click = () => props.onMain();
|
|
7610
7630
|
insert(_el$2, () => props.mainContent);
|
|
@@ -7645,24 +7665,24 @@ function SplitButton(props) {
|
|
|
7645
7665
|
});
|
|
7646
7666
|
}
|
|
7647
7667
|
delegateEvents(["click"]);
|
|
7648
|
-
var _tmpl$$
|
|
7668
|
+
var _tmpl$$Z = /* @__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$D = /* @__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$s = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$4$i = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
|
|
7649
7669
|
const normalize = (value2) => value2.trim().toLowerCase();
|
|
7650
7670
|
function ColorGrids(props) {
|
|
7651
7671
|
return [(() => {
|
|
7652
|
-
var _el$ = _tmpl$$
|
|
7672
|
+
var _el$ = _tmpl$$Z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7653
7673
|
insert(_el$2, () => props.themeColorsLabel);
|
|
7654
7674
|
insert(_el$3, createComponent(For, {
|
|
7655
7675
|
get each() {
|
|
7656
7676
|
return props.palette.themeColors;
|
|
7657
7677
|
},
|
|
7658
7678
|
children: (theme) => (() => {
|
|
7659
|
-
var _el$7 = _tmpl$3$
|
|
7679
|
+
var _el$7 = _tmpl$3$s();
|
|
7660
7680
|
insert(_el$7, createComponent(For, {
|
|
7661
7681
|
get each() {
|
|
7662
7682
|
return theme.values;
|
|
7663
7683
|
},
|
|
7664
7684
|
children: (color) => (() => {
|
|
7665
|
-
var _el$8 = _tmpl$4$
|
|
7685
|
+
var _el$8 = _tmpl$4$i();
|
|
7666
7686
|
_el$8.$$click = () => props.onPick(color);
|
|
7667
7687
|
_el$8.addEventListener("blur", () => props.onPreview(null));
|
|
7668
7688
|
_el$8.addEventListener("focus", () => props.onPreview(color));
|
|
@@ -7696,7 +7716,7 @@ function ColorGrids(props) {
|
|
|
7696
7716
|
return props.palette.standardColors;
|
|
7697
7717
|
},
|
|
7698
7718
|
children: (swatch) => (() => {
|
|
7699
|
-
var _el$9 = _tmpl$4$
|
|
7719
|
+
var _el$9 = _tmpl$4$i();
|
|
7700
7720
|
_el$9.$$click = () => props.onPick(swatch.value);
|
|
7701
7721
|
_el$9.addEventListener("blur", () => props.onPreview(null));
|
|
7702
7722
|
_el$9.addEventListener("focus", () => props.onPreview(swatch.value));
|
|
@@ -7723,7 +7743,7 @@ function ColorGrids(props) {
|
|
|
7723
7743
|
})()];
|
|
7724
7744
|
}
|
|
7725
7745
|
delegateEvents(["click"]);
|
|
7726
|
-
var _tmpl$$
|
|
7746
|
+
var _tmpl$$Y = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$C = /* @__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$r = /* @__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$h = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$5$b = /* @__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>`);
|
|
7727
7747
|
const normalizeColor = (value2) => (value2 == null ? void 0 : value2.trim().toLowerCase()) ?? "";
|
|
7728
7748
|
function ColorPicker(props) {
|
|
7729
7749
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -7770,7 +7790,7 @@ function ColorPicker(props) {
|
|
|
7770
7790
|
},
|
|
7771
7791
|
get mainContent() {
|
|
7772
7792
|
return [(() => {
|
|
7773
|
-
var _el$9 = _tmpl$5$
|
|
7793
|
+
var _el$9 = _tmpl$5$b(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
7774
7794
|
createRenderEffect((_p$) => {
|
|
7775
7795
|
var _v$3 = props.icon, _v$4 = !displayColor(), _v$5 = displayColor() ?? void 0;
|
|
7776
7796
|
_v$3 !== _p$.e && setAttribute(_el$0, "data-lucide", _p$.e = _v$3);
|
|
@@ -7810,7 +7830,7 @@ function ColorPicker(props) {
|
|
|
7810
7830
|
return _tmpl$7$4();
|
|
7811
7831
|
},
|
|
7812
7832
|
get children() {
|
|
7813
|
-
return _tmpl$$
|
|
7833
|
+
return _tmpl$$Y();
|
|
7814
7834
|
}
|
|
7815
7835
|
}));
|
|
7816
7836
|
insert(_el$4, clearLabel);
|
|
@@ -7841,13 +7861,13 @@ function ColorPicker(props) {
|
|
|
7841
7861
|
},
|
|
7842
7862
|
get children() {
|
|
7843
7863
|
return [(() => {
|
|
7844
|
-
var _el$5 = _tmpl$3$
|
|
7864
|
+
var _el$5 = _tmpl$3$r(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
7845
7865
|
_el$5.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
|
|
7846
7866
|
insert(_el$7, () => props.moreColorsLabel);
|
|
7847
7867
|
createRenderEffect(() => setAttribute(_el$5, "data-testid", `${props.testId}-more-colors`));
|
|
7848
7868
|
return _el$5;
|
|
7849
7869
|
})(), (() => {
|
|
7850
|
-
var _el$8 = _tmpl$4$
|
|
7870
|
+
var _el$8 = _tmpl$4$h();
|
|
7851
7871
|
_el$8.$$input = (event) => applyColor(event.currentTarget.value);
|
|
7852
7872
|
var _ref$ = customColorInputRef;
|
|
7853
7873
|
typeof _ref$ === "function" ? use(_ref$, _el$8) : customColorInputRef = _el$8;
|
|
@@ -7869,7 +7889,7 @@ function ColorPicker(props) {
|
|
|
7869
7889
|
});
|
|
7870
7890
|
}
|
|
7871
7891
|
delegateEvents(["click", "input"]);
|
|
7872
|
-
var _tmpl$$
|
|
7892
|
+
var _tmpl$$X = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$B = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$q = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$g = /* @__PURE__ */ template(`<span>`), _tmpl$5$a = /* @__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>`);
|
|
7873
7893
|
function GridPicker(props) {
|
|
7874
7894
|
const t = useI18n();
|
|
7875
7895
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -7944,7 +7964,7 @@ function GridPicker(props) {
|
|
|
7944
7964
|
return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
|
|
7945
7965
|
};
|
|
7946
7966
|
return (() => {
|
|
7947
|
-
var _el$ = _tmpl$3$
|
|
7967
|
+
var _el$ = _tmpl$3$q();
|
|
7948
7968
|
insert(_el$, createComponent(Popover, {
|
|
7949
7969
|
get open() {
|
|
7950
7970
|
return isOpen();
|
|
@@ -7956,7 +7976,7 @@ function GridPicker(props) {
|
|
|
7956
7976
|
col: 0
|
|
7957
7977
|
}),
|
|
7958
7978
|
trigger: (api) => (() => {
|
|
7959
|
-
var _el$4 = _tmpl$5$
|
|
7979
|
+
var _el$4 = _tmpl$5$a();
|
|
7960
7980
|
_el$4.$$click = () => api.toggle();
|
|
7961
7981
|
use((el) => api.ref(el), _el$4);
|
|
7962
7982
|
insert(_el$4, createComponent(ToolIcon, {
|
|
@@ -7969,7 +7989,7 @@ function GridPicker(props) {
|
|
|
7969
7989
|
return props.label;
|
|
7970
7990
|
},
|
|
7971
7991
|
get children() {
|
|
7972
|
-
var _el$5 = _tmpl$4$
|
|
7992
|
+
var _el$5 = _tmpl$4$g();
|
|
7973
7993
|
insert(_el$5, () => props.label);
|
|
7974
7994
|
return _el$5;
|
|
7975
7995
|
}
|
|
@@ -7993,7 +8013,7 @@ function GridPicker(props) {
|
|
|
7993
8013
|
})(),
|
|
7994
8014
|
get children() {
|
|
7995
8015
|
return [(() => {
|
|
7996
|
-
var _el$2 = _tmpl$$
|
|
8016
|
+
var _el$2 = _tmpl$$X();
|
|
7997
8017
|
insert(_el$2, statusLabel);
|
|
7998
8018
|
return _el$2;
|
|
7999
8019
|
})(), (() => {
|
|
@@ -8097,7 +8117,7 @@ const DEFAULT_PALETTE = {
|
|
|
8097
8117
|
standardColors: STANDARD_COLORS,
|
|
8098
8118
|
allowCustom: true
|
|
8099
8119
|
};
|
|
8100
|
-
var _tmpl$$
|
|
8120
|
+
var _tmpl$$W = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$A = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery-grid>`), _tmpl$3$p = /* @__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$f = /* @__PURE__ */ template(`<option>`);
|
|
8101
8121
|
function getQuickStyles(styles) {
|
|
8102
8122
|
const applicable = styles.filter((style2) => style2.type !== "table" && (!style2.semiHidden || style2.unhideWhenUsed && style2.isUsed));
|
|
8103
8123
|
const hasQuickStyles = applicable.some((style2) => style2.qFormat === true);
|
|
@@ -8177,7 +8197,7 @@ function StyleGallery(props) {
|
|
|
8177
8197
|
return styles();
|
|
8178
8198
|
},
|
|
8179
8199
|
children: (style$1) => (() => {
|
|
8180
|
-
var _el$ = _tmpl$$
|
|
8200
|
+
var _el$ = _tmpl$$W(), _el$2 = _el$.firstChild;
|
|
8181
8201
|
_el$.$$click = () => apply(style$1);
|
|
8182
8202
|
insert(_el$2, () => style$1.name);
|
|
8183
8203
|
createRenderEffect((_p$) => {
|
|
@@ -8208,7 +8228,7 @@ function StyleGallery(props) {
|
|
|
8208
8228
|
panelRole: "listbox",
|
|
8209
8229
|
panelTestId,
|
|
8210
8230
|
trigger: (popover) => (() => {
|
|
8211
|
-
var _el$4 = _tmpl$3$
|
|
8231
|
+
var _el$4 = _tmpl$3$p(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
8212
8232
|
var _ref$ = popover.ref;
|
|
8213
8233
|
typeof _ref$ === "function" ? use(_ref$, _el$4) : popover.ref = _el$4;
|
|
8214
8234
|
insert(_el$4, createComponent(Select, {
|
|
@@ -8232,7 +8252,7 @@ function StyleGallery(props) {
|
|
|
8232
8252
|
return styles();
|
|
8233
8253
|
},
|
|
8234
8254
|
children: (style2) => (() => {
|
|
8235
|
-
var _el$8 = _tmpl$4$
|
|
8255
|
+
var _el$8 = _tmpl$4$f();
|
|
8236
8256
|
insert(_el$8, () => style2.name);
|
|
8237
8257
|
createRenderEffect(() => _el$8.value = style2.id);
|
|
8238
8258
|
return _el$8;
|
|
@@ -8266,7 +8286,7 @@ function StyleGallery(props) {
|
|
|
8266
8286
|
});
|
|
8267
8287
|
}
|
|
8268
8288
|
delegateEvents(["click", "keydown"]);
|
|
8269
|
-
var _tmpl$$
|
|
8289
|
+
var _tmpl$$V = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-indicator>`), _tmpl$2$z = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-icon>`), _tmpl$3$o = /* @__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>`);
|
|
8270
8290
|
function WideMenuButton(props) {
|
|
8271
8291
|
return createComponent(Popover, {
|
|
8272
8292
|
get open() {
|
|
@@ -8280,7 +8300,7 @@ function WideMenuButton(props) {
|
|
|
8280
8300
|
return `oasis-editor-color-menu ${props.panelClass ?? ""}`;
|
|
8281
8301
|
},
|
|
8282
8302
|
trigger: (api) => (() => {
|
|
8283
|
-
var _el$ = _tmpl$3$
|
|
8303
|
+
var _el$ = _tmpl$3$o(), _el$4 = _el$.firstChild;
|
|
8284
8304
|
_el$.$$click = () => api.toggle();
|
|
8285
8305
|
use((el) => api.ref(el), _el$);
|
|
8286
8306
|
insert(_el$, createComponent(Show, {
|
|
@@ -8299,7 +8319,7 @@ function WideMenuButton(props) {
|
|
|
8299
8319
|
return props.indicatorColor !== void 0;
|
|
8300
8320
|
},
|
|
8301
8321
|
get children() {
|
|
8302
|
-
var _el$3 = _tmpl$$
|
|
8322
|
+
var _el$3 = _tmpl$$V();
|
|
8303
8323
|
createRenderEffect((_p$) => {
|
|
8304
8324
|
var _v$ = !props.indicatorColor, _v$2 = props.indicatorColor ?? "";
|
|
8305
8325
|
_v$ !== _p$.e && _el$3.classList.toggle("oasis-editor-wide-menu-button-indicator-empty", _p$.e = _v$);
|
|
@@ -8375,8 +8395,8 @@ const PICTURE_BORDER_WEIGHTS_PT = [
|
|
|
8375
8395
|
];
|
|
8376
8396
|
function formatBorderWeight(widthPt) {
|
|
8377
8397
|
const whole = Math.floor(widthPt);
|
|
8378
|
-
const
|
|
8379
|
-
const glyph =
|
|
8398
|
+
const fraction2 = widthPt - whole;
|
|
8399
|
+
const glyph = fraction2 === 0.25 ? "¼" : fraction2 === 0.5 ? "½" : fraction2 === 0.75 ? "¾" : "";
|
|
8380
8400
|
if (!glyph) {
|
|
8381
8401
|
return String(whole);
|
|
8382
8402
|
}
|
|
@@ -8397,7 +8417,7 @@ function dashPreviewArray(dash) {
|
|
|
8397
8417
|
const pattern = lineDashPatternPt(dash);
|
|
8398
8418
|
return pattern.length > 0 ? pattern.join(" ") : void 0;
|
|
8399
8419
|
}
|
|
8400
|
-
var _tmpl$$
|
|
8420
|
+
var _tmpl$$U = /* @__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$y = /* @__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$n = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-flyout role=menu>`), _tmpl$5$9 = /* @__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>`);
|
|
8401
8421
|
function PictureBorderPicker(props) {
|
|
8402
8422
|
const [open, setOpen] = createSignal(false);
|
|
8403
8423
|
const [submenu, setSubmenu] = createSignal(null);
|
|
@@ -8465,7 +8485,7 @@ function PictureBorderPicker(props) {
|
|
|
8465
8485
|
color
|
|
8466
8486
|
})
|
|
8467
8487
|
}), (() => {
|
|
8468
|
-
var _el$ = _tmpl$$
|
|
8488
|
+
var _el$ = _tmpl$$U(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
8469
8489
|
_el$.$$click = () => apply({
|
|
8470
8490
|
color: null
|
|
8471
8491
|
});
|
|
@@ -8479,7 +8499,7 @@ function PictureBorderPicker(props) {
|
|
|
8479
8499
|
createRenderEffect(() => setAttribute(_el$4, "data-testid", `${props.testId}-more-colors`));
|
|
8480
8500
|
return _el$4;
|
|
8481
8501
|
})(), (() => {
|
|
8482
|
-
var _el$7 = _tmpl$3$
|
|
8502
|
+
var _el$7 = _tmpl$3$n();
|
|
8483
8503
|
_el$7.$$input = (event) => apply({
|
|
8484
8504
|
color: event.currentTarget.value
|
|
8485
8505
|
});
|
|
@@ -8500,7 +8520,7 @@ function PictureBorderPicker(props) {
|
|
|
8500
8520
|
});
|
|
8501
8521
|
return _el$7;
|
|
8502
8522
|
})(), (() => {
|
|
8503
|
-
var _el$8 = _tmpl$5$
|
|
8523
|
+
var _el$8 = _tmpl$5$9(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
8504
8524
|
_el$9.$$click = () => toggleSubmenu("weight");
|
|
8505
8525
|
insert(_el$1, () => props.weightLabel);
|
|
8506
8526
|
insert(_el$8, createComponent(Show, {
|
|
@@ -8508,7 +8528,7 @@ function PictureBorderPicker(props) {
|
|
|
8508
8528
|
return submenu() === "weight";
|
|
8509
8529
|
},
|
|
8510
8530
|
get children() {
|
|
8511
|
-
var _el$10 = _tmpl$4$
|
|
8531
|
+
var _el$10 = _tmpl$4$e();
|
|
8512
8532
|
insert(_el$10, createComponent(For, {
|
|
8513
8533
|
each: PICTURE_BORDER_WEIGHTS_PT,
|
|
8514
8534
|
children: (widthPt) => {
|
|
@@ -8562,7 +8582,7 @@ function PictureBorderPicker(props) {
|
|
|
8562
8582
|
return submenu() === "dashes";
|
|
8563
8583
|
},
|
|
8564
8584
|
get children() {
|
|
8565
|
-
var _el$15 = _tmpl$4$
|
|
8585
|
+
var _el$15 = _tmpl$4$e();
|
|
8566
8586
|
insert(_el$15, createComponent(For, {
|
|
8567
8587
|
get each() {
|
|
8568
8588
|
return props.dashOptions;
|
|
@@ -8614,7 +8634,7 @@ function PictureBorderPicker(props) {
|
|
|
8614
8634
|
});
|
|
8615
8635
|
}
|
|
8616
8636
|
delegateEvents(["click", "input"]);
|
|
8617
|
-
var _tmpl$$
|
|
8637
|
+
var _tmpl$$T = /* @__PURE__ */ template(`<option value>`), _tmpl$2$x = /* @__PURE__ */ template(`<option>`), _tmpl$3$m = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
8618
8638
|
function renderMenuContent(content2, api) {
|
|
8619
8639
|
if (content2.kind === "custom") {
|
|
8620
8640
|
return content2.render(api);
|
|
@@ -8772,7 +8792,7 @@ function RenderSelect(props) {
|
|
|
8772
8792
|
return props.item.placeholder !== void 0;
|
|
8773
8793
|
},
|
|
8774
8794
|
get children() {
|
|
8775
|
-
var _el$ = _tmpl$$
|
|
8795
|
+
var _el$ = _tmpl$$T();
|
|
8776
8796
|
insert(_el$, () => props.item.placeholder);
|
|
8777
8797
|
return _el$;
|
|
8778
8798
|
}
|
|
@@ -8979,7 +8999,7 @@ function ToolbarItemRenderer(props) {
|
|
|
8979
8999
|
const binding = bindItem(props.item, props.api);
|
|
8980
9000
|
const component = () => resolveRenderer(props.item.type);
|
|
8981
9001
|
return (() => {
|
|
8982
|
-
var _el$3 = _tmpl$3$
|
|
9002
|
+
var _el$3 = _tmpl$3$m();
|
|
8983
9003
|
insert(_el$3, createComponent(Show, {
|
|
8984
9004
|
get when() {
|
|
8985
9005
|
return component();
|
|
@@ -9058,6 +9078,7 @@ const GROUP_LABEL_KEYS = {
|
|
|
9058
9078
|
paragraph: "ribbon.group.paragraph",
|
|
9059
9079
|
styles: "ribbon.group.styles",
|
|
9060
9080
|
illustrations: "ribbon.group.illustrations",
|
|
9081
|
+
symbols: "ribbon.group.symbols",
|
|
9061
9082
|
tables: "ribbon.group.tables",
|
|
9062
9083
|
links: "ribbon.group.links",
|
|
9063
9084
|
footnotes: "ribbon.group.footnotes",
|
|
@@ -9487,7 +9508,7 @@ function resolveResponsiveRibbonGroups(groups, availableWidth, measurements = {}
|
|
|
9487
9508
|
allocatedWidth: allocatedWidths.get(group.id)
|
|
9488
9509
|
}));
|
|
9489
9510
|
}
|
|
9490
|
-
var _tmpl$$
|
|
9511
|
+
var _tmpl$$S = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$w = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
|
|
9491
9512
|
function RibbonTabs(props) {
|
|
9492
9513
|
const tabs = createMemo(() => buildRibbonTabDefinitions(props.api.t, props.api, props.items()));
|
|
9493
9514
|
createEffect(() => {
|
|
@@ -9503,7 +9524,7 @@ function RibbonTabs(props) {
|
|
|
9503
9524
|
if (next) props.setActiveTab(next.id);
|
|
9504
9525
|
};
|
|
9505
9526
|
return (() => {
|
|
9506
|
-
var _el$ = _tmpl$$
|
|
9527
|
+
var _el$ = _tmpl$$S();
|
|
9507
9528
|
insert(_el$, createComponent(For, {
|
|
9508
9529
|
get each() {
|
|
9509
9530
|
return tabs();
|
|
@@ -9554,10 +9575,10 @@ function RibbonTabs(props) {
|
|
|
9554
9575
|
})();
|
|
9555
9576
|
}
|
|
9556
9577
|
delegateEvents(["click", "keydown"]);
|
|
9557
|
-
var _tmpl$$
|
|
9578
|
+
var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
|
|
9558
9579
|
function RibbonRow(props) {
|
|
9559
9580
|
return (() => {
|
|
9560
|
-
var _el$ = _tmpl$$
|
|
9581
|
+
var _el$ = _tmpl$$R();
|
|
9561
9582
|
insert(_el$, createComponent(For, {
|
|
9562
9583
|
get each() {
|
|
9563
9584
|
return props.items;
|
|
@@ -9572,7 +9593,7 @@ function RibbonRow(props) {
|
|
|
9572
9593
|
return _el$;
|
|
9573
9594
|
})();
|
|
9574
9595
|
}
|
|
9575
|
-
var _tmpl$$
|
|
9596
|
+
var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows><div class=oasis-editor-ribbon-normal-rows>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-label>`), _tmpl$4$d = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
|
|
9576
9597
|
function groupItems(group) {
|
|
9577
9598
|
return [...group.largeItems, ...group.rows[1], ...group.rows[2]];
|
|
9578
9599
|
}
|
|
@@ -9583,7 +9604,7 @@ function groupStyle(group) {
|
|
|
9583
9604
|
}
|
|
9584
9605
|
function RibbonGroup(props) {
|
|
9585
9606
|
return (() => {
|
|
9586
|
-
var _el$ = _tmpl$4$
|
|
9607
|
+
var _el$ = _tmpl$4$d();
|
|
9587
9608
|
insert(_el$, createComponent(Show, {
|
|
9588
9609
|
get when() {
|
|
9589
9610
|
return props.group.resizeState !== "collapsed";
|
|
@@ -9604,7 +9625,7 @@ function RibbonGroup(props) {
|
|
|
9604
9625
|
ribbonSize: "large",
|
|
9605
9626
|
panelClass: "oasis-editor-ribbon-collapsed-menu",
|
|
9606
9627
|
get children() {
|
|
9607
|
-
var _el$7 = _tmpl$5$
|
|
9628
|
+
var _el$7 = _tmpl$5$8();
|
|
9608
9629
|
insert(_el$7, createComponent(For, {
|
|
9609
9630
|
get each() {
|
|
9610
9631
|
return groupItems(props.group);
|
|
@@ -9621,7 +9642,7 @@ function RibbonGroup(props) {
|
|
|
9621
9642
|
}));
|
|
9622
9643
|
return _el$6;
|
|
9623
9644
|
})(), (() => {
|
|
9624
|
-
var _el$8 = _tmpl$3$
|
|
9645
|
+
var _el$8 = _tmpl$3$l();
|
|
9625
9646
|
insert(_el$8, () => props.group.label);
|
|
9626
9647
|
return _el$8;
|
|
9627
9648
|
})()];
|
|
@@ -9634,7 +9655,7 @@ function RibbonGroup(props) {
|
|
|
9634
9655
|
return props.group.largeItems.length > 0;
|
|
9635
9656
|
},
|
|
9636
9657
|
get children() {
|
|
9637
|
-
var _el$3 = _tmpl$$
|
|
9658
|
+
var _el$3 = _tmpl$$Q();
|
|
9638
9659
|
insert(_el$3, createComponent(For, {
|
|
9639
9660
|
get each() {
|
|
9640
9661
|
return props.group.largeItems;
|
|
@@ -9667,7 +9688,7 @@ function RibbonGroup(props) {
|
|
|
9667
9688
|
}), null);
|
|
9668
9689
|
return _el$2;
|
|
9669
9690
|
})(), (() => {
|
|
9670
|
-
var _el$5 = _tmpl$3$
|
|
9691
|
+
var _el$5 = _tmpl$3$l();
|
|
9671
9692
|
insert(_el$5, () => props.group.label);
|
|
9672
9693
|
return _el$5;
|
|
9673
9694
|
})()];
|
|
@@ -9695,7 +9716,7 @@ function RibbonGroup(props) {
|
|
|
9695
9716
|
return _el$;
|
|
9696
9717
|
})();
|
|
9697
9718
|
}
|
|
9698
|
-
var _tmpl$$
|
|
9719
|
+
var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
|
|
9699
9720
|
function RibbonPanel(props) {
|
|
9700
9721
|
const [availableWidth, setAvailableWidth] = createSignal(null);
|
|
9701
9722
|
const [measurements, setMeasurements] = createSignal({});
|
|
@@ -9740,7 +9761,7 @@ function RibbonPanel(props) {
|
|
|
9740
9761
|
requestAnimationFrame(measureGroups);
|
|
9741
9762
|
});
|
|
9742
9763
|
return (() => {
|
|
9743
|
-
var _el$ = _tmpl$$
|
|
9764
|
+
var _el$ = _tmpl$$P();
|
|
9744
9765
|
var _ref$ = panelRef;
|
|
9745
9766
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
9746
9767
|
insert(_el$, createComponent(For, {
|
|
@@ -9766,7 +9787,7 @@ function RibbonPanel(props) {
|
|
|
9766
9787
|
return _el$;
|
|
9767
9788
|
})();
|
|
9768
9789
|
}
|
|
9769
|
-
var _tmpl$$
|
|
9790
|
+
var _tmpl$$O = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
|
|
9770
9791
|
const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
|
|
9771
9792
|
function Toolbar(props) {
|
|
9772
9793
|
const api = createToolbarApi(props.host, useI18n());
|
|
@@ -9816,7 +9837,7 @@ function Toolbar(props) {
|
|
|
9816
9837
|
})
|
|
9817
9838
|
});
|
|
9818
9839
|
return (() => {
|
|
9819
|
-
var _el$ = _tmpl$$
|
|
9840
|
+
var _el$ = _tmpl$$O();
|
|
9820
9841
|
_el$.$$mousedown = (event) => {
|
|
9821
9842
|
if (shouldAllowNativeMouseDown(event.target)) {
|
|
9822
9843
|
return;
|
|
@@ -15819,9 +15840,9 @@ function computeWordTextTopOffsetPx(os2VerticalMetrics, unitsPerEm, fontSizePx)
|
|
|
15819
15840
|
}
|
|
15820
15841
|
function readSignedFixed16_16(reader, offset) {
|
|
15821
15842
|
const integer = reader.u16At(offset);
|
|
15822
|
-
const
|
|
15843
|
+
const fraction2 = reader.u16At(offset + 2);
|
|
15823
15844
|
const signed = integer & 32768 ? integer - 65536 : integer;
|
|
15824
|
-
return signed +
|
|
15845
|
+
return signed + fraction2 / 65536;
|
|
15825
15846
|
}
|
|
15826
15847
|
function readAscii(bytes) {
|
|
15827
15848
|
return Array.from(bytes, (byte) => String.fromCharCode(byte)).join(
|
|
@@ -21785,11 +21806,11 @@ function buildCanvasTableLayout(options) {
|
|
|
21785
21806
|
unsupported: Array.from(new Set(unsupported))
|
|
21786
21807
|
};
|
|
21787
21808
|
}
|
|
21788
|
-
var _tmpl$$
|
|
21809
|
+
var _tmpl$$N = /* @__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">`);
|
|
21789
21810
|
function PageBreak(_props) {
|
|
21790
21811
|
const t = useI18n();
|
|
21791
21812
|
return (() => {
|
|
21792
|
-
var _el$ = _tmpl$$
|
|
21813
|
+
var _el$ = _tmpl$$N(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
21793
21814
|
insert(_el$3, () => t("metric.pageBreak") || "Page Break");
|
|
21794
21815
|
return _el$;
|
|
21795
21816
|
})();
|
|
@@ -24193,7 +24214,7 @@ function clamp01(value2) {
|
|
|
24193
24214
|
if (!Number.isFinite(value2) || value2 < 0) return 0;
|
|
24194
24215
|
return value2 > 1 ? 1 : value2;
|
|
24195
24216
|
}
|
|
24196
|
-
function strokeImageBorder(ctx, border, x, y, width, height, rotation) {
|
|
24217
|
+
function strokeImageBorder(ctx, border, x, y, width, height, rotation, borderShape) {
|
|
24197
24218
|
ctx.save();
|
|
24198
24219
|
ctx.translate(x + width / 2, y + height / 2);
|
|
24199
24220
|
if (rotation) ctx.rotate(rotation * DEG_TO_RAD$1);
|
|
@@ -24202,10 +24223,17 @@ function strokeImageBorder(ctx, border, x, y, width, height, rotation) {
|
|
|
24202
24223
|
ctx.setLineDash(
|
|
24203
24224
|
lineDashPatternPt(border.dash).map((value2) => value2 * PX_PER_POINT)
|
|
24204
24225
|
);
|
|
24205
|
-
|
|
24226
|
+
if (borderShape) {
|
|
24227
|
+
ctx.stroke(
|
|
24228
|
+
buildPresetPath(borderShape, -width / 2, -height / 2, width, height)
|
|
24229
|
+
);
|
|
24230
|
+
} else {
|
|
24231
|
+
ctx.strokeRect(-width / 2, -height / 2, width, height);
|
|
24232
|
+
}
|
|
24206
24233
|
ctx.restore();
|
|
24207
24234
|
}
|
|
24208
24235
|
function drawImageFragment(ctx, img, image, x, y) {
|
|
24236
|
+
var _a2;
|
|
24209
24237
|
drawImageContent(ctx, img, image, x, y);
|
|
24210
24238
|
if (image.border) {
|
|
24211
24239
|
strokeImageBorder(
|
|
@@ -24215,17 +24243,34 @@ function drawImageFragment(ctx, img, image, x, y) {
|
|
|
24215
24243
|
y,
|
|
24216
24244
|
image.width,
|
|
24217
24245
|
image.height,
|
|
24218
|
-
image.rotation
|
|
24246
|
+
image.rotation,
|
|
24247
|
+
(_a2 = image.cropShape) == null ? void 0 : _a2.preset
|
|
24219
24248
|
);
|
|
24220
24249
|
}
|
|
24221
24250
|
}
|
|
24222
24251
|
function drawImageContent(ctx, img, image, x, y) {
|
|
24252
|
+
var _a2;
|
|
24223
24253
|
const { width, height, crop, fillMode, rotation, flipH, flipV } = image;
|
|
24224
24254
|
const hasTransform = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
|
|
24255
|
+
const sourceRatio = img.naturalWidth / Math.max(1, img.naturalHeight);
|
|
24256
|
+
const frameRatio = width / Math.max(1, height);
|
|
24257
|
+
let dx = 0;
|
|
24258
|
+
let dy = 0;
|
|
24259
|
+
let dw = width;
|
|
24260
|
+
let dh = height;
|
|
24261
|
+
if (image.cropFit === "fit" && sourceRatio > 0) {
|
|
24262
|
+
if (sourceRatio > frameRatio) {
|
|
24263
|
+
dh = width / sourceRatio;
|
|
24264
|
+
dy = (height - dh) / 2;
|
|
24265
|
+
} else {
|
|
24266
|
+
dw = height * sourceRatio;
|
|
24267
|
+
dx = (width - dw) / 2;
|
|
24268
|
+
}
|
|
24269
|
+
}
|
|
24225
24270
|
if (fillMode === "tile") {
|
|
24226
24271
|
const pattern = ctx.createPattern(img, "repeat");
|
|
24227
24272
|
if (!pattern) {
|
|
24228
|
-
ctx.drawImage(img, x, y,
|
|
24273
|
+
ctx.drawImage(img, x + dx, y + dy, dw, dh);
|
|
24229
24274
|
return;
|
|
24230
24275
|
}
|
|
24231
24276
|
ctx.save();
|
|
@@ -24237,7 +24282,7 @@ function drawImageContent(ctx, img, image, x, y) {
|
|
|
24237
24282
|
}
|
|
24238
24283
|
ctx.translate(x, y);
|
|
24239
24284
|
ctx.fillStyle = pattern;
|
|
24240
|
-
ctx.fillRect(
|
|
24285
|
+
ctx.fillRect(dx, dy, dw, dh);
|
|
24241
24286
|
ctx.restore();
|
|
24242
24287
|
return;
|
|
24243
24288
|
}
|
|
@@ -24257,15 +24302,27 @@ function drawImageContent(ctx, img, image, x, y) {
|
|
|
24257
24302
|
sh = (1 - top - bottom) * img.naturalHeight;
|
|
24258
24303
|
}
|
|
24259
24304
|
}
|
|
24260
|
-
|
|
24261
|
-
|
|
24305
|
+
const hasShape = Boolean((_a2 = image.cropShape) == null ? void 0 : _a2.preset);
|
|
24306
|
+
if (!hasTransform && !hasShape) {
|
|
24307
|
+
ctx.drawImage(img, sx, sy, sw, sh, x + dx, y + dy, dw, dh);
|
|
24262
24308
|
return;
|
|
24263
24309
|
}
|
|
24264
24310
|
ctx.save();
|
|
24265
24311
|
ctx.translate(x + width / 2, y + height / 2);
|
|
24266
24312
|
if (rotation) ctx.rotate(rotation * DEG_TO_RAD$1);
|
|
24267
24313
|
ctx.scale(flipH ? -1 : 1, flipV ? -1 : 1);
|
|
24268
|
-
|
|
24314
|
+
if (hasShape) {
|
|
24315
|
+
ctx.clip(
|
|
24316
|
+
buildPresetPath(
|
|
24317
|
+
image.cropShape.preset,
|
|
24318
|
+
-width / 2,
|
|
24319
|
+
-height / 2,
|
|
24320
|
+
width,
|
|
24321
|
+
height
|
|
24322
|
+
)
|
|
24323
|
+
);
|
|
24324
|
+
}
|
|
24325
|
+
ctx.drawImage(img, sx, sy, sw, sh, -width / 2 + dx, -height / 2 + dy, dw, dh);
|
|
24269
24326
|
ctx.restore();
|
|
24270
24327
|
}
|
|
24271
24328
|
function drawFloatingImagesForParagraph(options) {
|
|
@@ -25719,7 +25776,7 @@ function prepareDocumentFonts(document2, options = {}) {
|
|
|
25719
25776
|
preparationLoads.set(key, load);
|
|
25720
25777
|
return load;
|
|
25721
25778
|
}
|
|
25722
|
-
var _tmpl$$
|
|
25779
|
+
var _tmpl$$M = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$t = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
|
|
25723
25780
|
const surfaceLogger = createEditorLogger("canvas-surface");
|
|
25724
25781
|
function CanvasEditorSurface(props) {
|
|
25725
25782
|
const documentFontFamilies = createMemo(() => Array.from(collectPdfFontFamilies(props.state().document)));
|
|
@@ -25742,7 +25799,7 @@ function CanvasEditorSurface(props) {
|
|
|
25742
25799
|
return layout;
|
|
25743
25800
|
});
|
|
25744
25801
|
return (() => {
|
|
25745
|
-
var _el$ = _tmpl$$
|
|
25802
|
+
var _el$ = _tmpl$$M();
|
|
25746
25803
|
insert(_el$, createComponent(Index, {
|
|
25747
25804
|
get each() {
|
|
25748
25805
|
return documentLayout().pages;
|
|
@@ -25884,7 +25941,7 @@ function CanvasPage(props) {
|
|
|
25884
25941
|
});
|
|
25885
25942
|
onCleanup(() => renderer.dispose());
|
|
25886
25943
|
return (() => {
|
|
25887
|
-
var _el$3 = _tmpl$3$
|
|
25944
|
+
var _el$3 = _tmpl$3$k(), _el$4 = _el$3.firstChild;
|
|
25888
25945
|
addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
|
|
25889
25946
|
addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
|
|
25890
25947
|
addEventListener(_el$3, "click", props.onSurfaceClick, true);
|
|
@@ -25896,7 +25953,7 @@ function CanvasPage(props) {
|
|
|
25896
25953
|
return revisionCells();
|
|
25897
25954
|
},
|
|
25898
25955
|
children: (revision) => (() => {
|
|
25899
|
-
var _el$5 = _tmpl$4$
|
|
25956
|
+
var _el$5 = _tmpl$4$c();
|
|
25900
25957
|
addEventListener(_el$5, "mousedown", props.onSurfaceMouseDown, true);
|
|
25901
25958
|
_el$5.addEventListener("mouseleave", (event) => {
|
|
25902
25959
|
var _a2;
|
|
@@ -26276,7 +26333,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
|
|
|
26276
26333
|
pushSide(-1);
|
|
26277
26334
|
return ticks;
|
|
26278
26335
|
}
|
|
26279
|
-
var _tmpl$$
|
|
26336
|
+
var _tmpl$$L = /* @__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$s = /* @__PURE__ */ template(`<div>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
|
|
26280
26337
|
function getActivePageSettings(state) {
|
|
26281
26338
|
var _a2;
|
|
26282
26339
|
const idx = getActiveSectionIndex(state);
|
|
@@ -26482,7 +26539,7 @@ function HorizontalRuler(props) {
|
|
|
26482
26539
|
}
|
|
26483
26540
|
};
|
|
26484
26541
|
return (() => {
|
|
26485
|
-
var _el$ = _tmpl$$
|
|
26542
|
+
var _el$ = _tmpl$$L(), _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;
|
|
26486
26543
|
var _ref$ = pageRef;
|
|
26487
26544
|
typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
|
|
26488
26545
|
insert(_el$3, createComponent(For, {
|
|
@@ -26502,7 +26559,7 @@ function HorizontalRuler(props) {
|
|
|
26502
26559
|
});
|
|
26503
26560
|
return _el$11;
|
|
26504
26561
|
})(), memo(() => memo(() => !!tick.label)() && (() => {
|
|
26505
|
-
var _el$12 = _tmpl$3$
|
|
26562
|
+
var _el$12 = _tmpl$3$j();
|
|
26506
26563
|
insert(_el$12, () => tick.label);
|
|
26507
26564
|
createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${sx(tick.x)}px`));
|
|
26508
26565
|
return _el$12;
|
|
@@ -26579,10 +26636,10 @@ function HorizontalRuler(props) {
|
|
|
26579
26636
|
})();
|
|
26580
26637
|
}
|
|
26581
26638
|
delegateEvents(["pointerdown"]);
|
|
26582
|
-
var _tmpl$$
|
|
26639
|
+
var _tmpl$$K = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
|
|
26583
26640
|
function CaretOverlay(props) {
|
|
26584
26641
|
return (() => {
|
|
26585
|
-
var _el$ = _tmpl$$
|
|
26642
|
+
var _el$ = _tmpl$$K();
|
|
26586
26643
|
createRenderEffect((_p$) => {
|
|
26587
26644
|
var _v$ = !!props.active, _v$2 = {
|
|
26588
26645
|
left: `${props.left}px`,
|
|
@@ -26603,10 +26660,10 @@ function CaretOverlay(props) {
|
|
|
26603
26660
|
return _el$;
|
|
26604
26661
|
})();
|
|
26605
26662
|
}
|
|
26606
|
-
var _tmpl$$
|
|
26663
|
+
var _tmpl$$J = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$r = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
|
|
26607
26664
|
function SelectionOverlay(props) {
|
|
26608
26665
|
return (() => {
|
|
26609
|
-
var _el$ = _tmpl$$
|
|
26666
|
+
var _el$ = _tmpl$$J();
|
|
26610
26667
|
insert(_el$, createComponent(Index, {
|
|
26611
26668
|
get each() {
|
|
26612
26669
|
return props.boxes;
|
|
@@ -26632,7 +26689,7 @@ function SelectionOverlay(props) {
|
|
|
26632
26689
|
return _el$;
|
|
26633
26690
|
})();
|
|
26634
26691
|
}
|
|
26635
|
-
var _tmpl$$
|
|
26692
|
+
var _tmpl$$I = /* @__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>`);
|
|
26636
26693
|
function RevisionOverlay(props) {
|
|
26637
26694
|
const formattedDate = () => {
|
|
26638
26695
|
try {
|
|
@@ -26647,7 +26704,7 @@ function RevisionOverlay(props) {
|
|
|
26647
26704
|
return "Alterado por";
|
|
26648
26705
|
};
|
|
26649
26706
|
return (() => {
|
|
26650
|
-
var _el$ = _tmpl$$
|
|
26707
|
+
var _el$ = _tmpl$$I(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
26651
26708
|
_el$4.nextSibling;
|
|
26652
26709
|
var _el$7 = _el$3.nextSibling;
|
|
26653
26710
|
insert(_el$4, label, _el$5);
|
|
@@ -26665,7 +26722,7 @@ function RevisionOverlay(props) {
|
|
|
26665
26722
|
return _el$;
|
|
26666
26723
|
})();
|
|
26667
26724
|
}
|
|
26668
|
-
var _tmpl$$
|
|
26725
|
+
var _tmpl$$H = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$q = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$i = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$b = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$7 = /* @__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>`);
|
|
26669
26726
|
function CommentHighlightOverlay(props) {
|
|
26670
26727
|
const [activeCommentId, setActiveCommentId] = createSignal(null);
|
|
26671
26728
|
const activeComment = createMemo(() => {
|
|
@@ -26692,7 +26749,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26692
26749
|
}
|
|
26693
26750
|
};
|
|
26694
26751
|
return (() => {
|
|
26695
|
-
var _el$ = _tmpl$$
|
|
26752
|
+
var _el$ = _tmpl$$H();
|
|
26696
26753
|
insert(_el$, createComponent(For, {
|
|
26697
26754
|
get each() {
|
|
26698
26755
|
return props.boxes();
|
|
@@ -26730,7 +26787,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26730
26787
|
const comment = activeComment();
|
|
26731
26788
|
const anchor = popupAnchor();
|
|
26732
26789
|
return (() => {
|
|
26733
|
-
var _el$3 = _tmpl$5$
|
|
26790
|
+
var _el$3 = _tmpl$5$7(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
|
|
26734
26791
|
_el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
|
|
26735
26792
|
insert(_el$5, () => comment.author || "—");
|
|
26736
26793
|
insert(_el$4, createComponent(Show, {
|
|
@@ -26738,7 +26795,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26738
26795
|
return comment.date !== void 0;
|
|
26739
26796
|
},
|
|
26740
26797
|
get children() {
|
|
26741
|
-
var _el$6 = _tmpl$3$
|
|
26798
|
+
var _el$6 = _tmpl$3$i();
|
|
26742
26799
|
insert(_el$6, () => formattedDate(comment.date));
|
|
26743
26800
|
return _el$6;
|
|
26744
26801
|
}
|
|
@@ -26748,7 +26805,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26748
26805
|
return comment.resolved;
|
|
26749
26806
|
},
|
|
26750
26807
|
get children() {
|
|
26751
|
-
return _tmpl$4$
|
|
26808
|
+
return _tmpl$4$b();
|
|
26752
26809
|
}
|
|
26753
26810
|
}), null);
|
|
26754
26811
|
insert(_el$8, () => comment.text);
|
|
@@ -26798,7 +26855,7 @@ function useSurfaceRect(surfaceRef) {
|
|
|
26798
26855
|
});
|
|
26799
26856
|
return { rect, tick, refresh };
|
|
26800
26857
|
}
|
|
26801
|
-
var _tmpl$$
|
|
26858
|
+
var _tmpl$$G = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$p = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$h = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$a = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$6 = /* @__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>`);
|
|
26802
26859
|
const WRAP_OPTIONS = [{
|
|
26803
26860
|
preset: "square",
|
|
26804
26861
|
labelKey: "layoutOptions.square"
|
|
@@ -26820,7 +26877,7 @@ const WRAP_OPTIONS = [{
|
|
|
26820
26877
|
}];
|
|
26821
26878
|
function WrapIcon(props) {
|
|
26822
26879
|
const line = (x, y, w) => (() => {
|
|
26823
|
-
var _el$ = _tmpl$$
|
|
26880
|
+
var _el$ = _tmpl$$G();
|
|
26824
26881
|
setAttribute(_el$, "x", x);
|
|
26825
26882
|
setAttribute(_el$, "y", y);
|
|
26826
26883
|
setAttribute(_el$, "width", w);
|
|
@@ -26836,7 +26893,7 @@ function WrapIcon(props) {
|
|
|
26836
26893
|
return _el$2;
|
|
26837
26894
|
})();
|
|
26838
26895
|
return (() => {
|
|
26839
|
-
var _el$3 = _tmpl$5$
|
|
26896
|
+
var _el$3 = _tmpl$5$6();
|
|
26840
26897
|
insert(_el$3, createComponent(Show, {
|
|
26841
26898
|
get when() {
|
|
26842
26899
|
return props.preset === "square";
|
|
@@ -26850,7 +26907,7 @@ function WrapIcon(props) {
|
|
|
26850
26907
|
return props.preset === "tight";
|
|
26851
26908
|
},
|
|
26852
26909
|
get children() {
|
|
26853
|
-
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$
|
|
26910
|
+
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$h()];
|
|
26854
26911
|
}
|
|
26855
26912
|
}), null);
|
|
26856
26913
|
insert(_el$3, createComponent(Show, {
|
|
@@ -26858,7 +26915,7 @@ function WrapIcon(props) {
|
|
|
26858
26915
|
return props.preset === "through";
|
|
26859
26916
|
},
|
|
26860
26917
|
get children() {
|
|
26861
|
-
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$
|
|
26918
|
+
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$a()];
|
|
26862
26919
|
}
|
|
26863
26920
|
}), null);
|
|
26864
26921
|
insert(_el$3, createComponent(Show, {
|
|
@@ -38835,6 +38892,46 @@ function parseFillMode(picPic) {
|
|
|
38835
38892
|
}
|
|
38836
38893
|
return void 0;
|
|
38837
38894
|
}
|
|
38895
|
+
function parseImageCropShape(drawing) {
|
|
38896
|
+
const pic = findElementDeep(drawing, "pic");
|
|
38897
|
+
const spPr = pic && findElementDeep(pic, "spPr");
|
|
38898
|
+
if (!spPr) return void 0;
|
|
38899
|
+
let geometry = null;
|
|
38900
|
+
for (let index = 0; index < spPr.childNodes.length; index += 1) {
|
|
38901
|
+
const node = spPr.childNodes[index];
|
|
38902
|
+
if ((node == null ? void 0 : node.nodeType) !== 1) continue;
|
|
38903
|
+
const element = node;
|
|
38904
|
+
if (element.localName === "prstGeom") {
|
|
38905
|
+
geometry = element;
|
|
38906
|
+
break;
|
|
38907
|
+
}
|
|
38908
|
+
}
|
|
38909
|
+
const preset = geometry == null ? void 0 : geometry.getAttribute("prst");
|
|
38910
|
+
if (!geometry || !preset || preset === "rect") return void 0;
|
|
38911
|
+
const adjustments = {};
|
|
38912
|
+
const avLst = Array.from(geometry.childNodes).find(
|
|
38913
|
+
(node) => (node == null ? void 0 : node.nodeType) === 1 && node.localName === "avLst"
|
|
38914
|
+
);
|
|
38915
|
+
if (avLst) {
|
|
38916
|
+
for (let index = 0; index < avLst.childNodes.length; index += 1) {
|
|
38917
|
+
const node = avLst.childNodes[index];
|
|
38918
|
+
if ((node == null ? void 0 : node.nodeType) !== 1 || node.localName !== "gd") {
|
|
38919
|
+
continue;
|
|
38920
|
+
}
|
|
38921
|
+
const gd = node;
|
|
38922
|
+
const name = gd.getAttribute("name");
|
|
38923
|
+
const formula = gd.getAttribute("fmla");
|
|
38924
|
+
const match = (formula ?? "").match(/(-?\d+(?:\.\d+)?)\s*$/);
|
|
38925
|
+
if (name && match) adjustments[name] = Number(match[1]);
|
|
38926
|
+
}
|
|
38927
|
+
}
|
|
38928
|
+
const result = {
|
|
38929
|
+
preset,
|
|
38930
|
+
rawXml: new XMLSerializer().serializeToString(geometry)
|
|
38931
|
+
};
|
|
38932
|
+
if (Object.keys(adjustments).length > 0) result.adjustments = adjustments;
|
|
38933
|
+
return result;
|
|
38934
|
+
}
|
|
38838
38935
|
function parseImageBorder(drawing) {
|
|
38839
38936
|
var _a2, _b2;
|
|
38840
38937
|
const picPic = findElementDeep(drawing, "pic");
|
|
@@ -38911,6 +39008,7 @@ async function parseDrawingImage(drawing, zip, relsMap, assets) {
|
|
|
38911
39008
|
}
|
|
38912
39009
|
const alt = docPr ? getAttributeValue(docPr, "descr") ?? getAttributeValue(docPr, "title") : null;
|
|
38913
39010
|
const crop = parseSrcRect(drawing);
|
|
39011
|
+
const cropShape = parseImageCropShape(drawing);
|
|
38914
39012
|
const fillMode = parseFillMode(drawing);
|
|
38915
39013
|
const border = parseImageBorder(drawing);
|
|
38916
39014
|
const xfrm = parseXfrm(drawing);
|
|
@@ -38921,6 +39019,7 @@ async function parseDrawingImage(drawing, zip, relsMap, assets) {
|
|
|
38921
39019
|
height,
|
|
38922
39020
|
...alt !== null ? { alt } : {},
|
|
38923
39021
|
...crop ? { crop } : {},
|
|
39022
|
+
...cropShape ? { cropShape, cropFit: "fill" } : {},
|
|
38924
39023
|
...fillMode ? { fillMode } : {},
|
|
38925
39024
|
...border ? { border } : {},
|
|
38926
39025
|
...xfrm.rotation !== void 0 ? { rotation: xfrm.rotation } : {},
|
|
@@ -38985,8 +39084,8 @@ function parseVmlCropValue(value2) {
|
|
|
38985
39084
|
return Number.isFinite(percent) && percent !== 0 ? percent / 100 : void 0;
|
|
38986
39085
|
}
|
|
38987
39086
|
if (/f$/i.test(trimmed)) {
|
|
38988
|
-
const
|
|
38989
|
-
return Number.isFinite(
|
|
39087
|
+
const fraction2 = Number(trimmed.slice(0, -1));
|
|
39088
|
+
return Number.isFinite(fraction2) && fraction2 !== 0 ? fraction2 / VML_FRACTION_DENOMINATOR : void 0;
|
|
38990
39089
|
}
|
|
38991
39090
|
const numeric = Number(trimmed);
|
|
38992
39091
|
return Number.isFinite(numeric) && numeric !== 0 ? numeric / VML_FRACTION_DENOMINATOR : void 0;
|
|
@@ -43944,6 +44043,15 @@ function buildDrawingXml(img, docPrId, altAttr, picXml) {
|
|
|
43944
44043
|
wrapPolygon: img.wrapPolygon
|
|
43945
44044
|
});
|
|
43946
44045
|
}
|
|
44046
|
+
function buildImageGeometryXml(shape) {
|
|
44047
|
+
if (!shape) return '<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>';
|
|
44048
|
+
if (shape.rawXml && !shape.adjustments) return shape.rawXml;
|
|
44049
|
+
const adjustments = Object.entries(shape.adjustments ?? {}).map(
|
|
44050
|
+
([name, value2]) => `<a:gd name="${escapeXml(name)}" fmla="val ${Number.isFinite(value2) ? value2 : 0}"/>`
|
|
44051
|
+
).join("");
|
|
44052
|
+
const adjustmentList = adjustments ? `<a:avLst>${adjustments}</a:avLst>` : "<a:avLst/>";
|
|
44053
|
+
return `<a:prstGeom prst="${escapeXml(shape.preset)}">${adjustmentList}</a:prstGeom>`;
|
|
44054
|
+
}
|
|
43947
44055
|
function serializeImageRun(runId, rId, context2, rPrXml) {
|
|
43948
44056
|
const img = context2.images.find((i) => i.rId === rId);
|
|
43949
44057
|
if (!img) {
|
|
@@ -43956,7 +44064,8 @@ function serializeImageRun(runId, rId, context2, rPrXml) {
|
|
|
43956
44064
|
const lnXml = buildImageLnXml(img.border);
|
|
43957
44065
|
const fill = img.fillMode === "tile" ? "<a:tile/>" : "<a:stretch><a:fillRect/></a:stretch>";
|
|
43958
44066
|
const blipRelAttr = img.kind === "linked" ? `r:link="${rId}"` : `r:embed="${rId}"`;
|
|
43959
|
-
const
|
|
44067
|
+
const geometry = buildImageGeometryXml(img.cropShape);
|
|
44068
|
+
const picXml = `<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="0" name="Picture"${altAttr}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip ${blipRelAttr} xmlns:r="${OFFICE_REL_NS}"/>${srcRect}${fill}</pic:blipFill><pic:spPr><a:xfrm${xfrmAttrs}><a:off x="0" y="0"/><a:ext cx="${img.cx}" cy="${img.cy}"/></a:xfrm>${geometry}${lnXml}</pic:spPr></pic:pic></a:graphicData></a:graphic>`;
|
|
43960
44069
|
const drawing = buildDrawingXml(img, docPrId, altAttr, picXml);
|
|
43961
44070
|
return `<w:r>${rPrXml}${drawing}</w:r>`;
|
|
43962
44071
|
}
|
|
@@ -46299,6 +46408,8 @@ function buildPartContext(blocks, numberingContext, state, document2) {
|
|
|
46299
46408
|
cy: Math.round(run.image.height * EMU_PER_PX),
|
|
46300
46409
|
alt: run.image.alt,
|
|
46301
46410
|
crop: run.image.crop,
|
|
46411
|
+
cropShape: run.image.cropShape,
|
|
46412
|
+
cropFit: run.image.cropFit,
|
|
46302
46413
|
fillMode: run.image.fillMode,
|
|
46303
46414
|
border: run.image.border,
|
|
46304
46415
|
rotation: run.image.rotation,
|
|
@@ -46891,7 +47002,7 @@ async function importDocxInWorker(buffer, options = {}) {
|
|
|
46891
47002
|
const worker = new Worker(
|
|
46892
47003
|
new URL(
|
|
46893
47004
|
/* @vite-ignore */
|
|
46894
|
-
"" + new URL("assets/importDocxWorker-
|
|
47005
|
+
"" + new URL("assets/importDocxWorker-Ddoy1WwF.js", import.meta.url).href,
|
|
46895
47006
|
import.meta.url
|
|
46896
47007
|
),
|
|
46897
47008
|
{
|
|
@@ -47531,7 +47642,7 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
|
|
|
47531
47642
|
nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
|
|
47532
47643
|
return { width: nextWidth, height: nextHeight };
|
|
47533
47644
|
}
|
|
47534
|
-
var _tmpl$$
|
|
47645
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$o = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$g = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
|
|
47535
47646
|
function ResizeHandlesOverlay(props) {
|
|
47536
47647
|
return (() => {
|
|
47537
47648
|
var _el$ = _tmpl$2$o();
|
|
@@ -47550,7 +47661,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
47550
47661
|
return [createComponent(For, {
|
|
47551
47662
|
each: RESIZE_HANDLE_DIRECTIONS,
|
|
47552
47663
|
children: (direction) => (() => {
|
|
47553
|
-
var _el$3 = _tmpl$3$
|
|
47664
|
+
var _el$3 = _tmpl$3$g();
|
|
47554
47665
|
_el$3.$$mousedown = (event) => {
|
|
47555
47666
|
if (!props.box()) {
|
|
47556
47667
|
return;
|
|
@@ -47565,7 +47676,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
47565
47676
|
return props.onRotateStart;
|
|
47566
47677
|
},
|
|
47567
47678
|
get children() {
|
|
47568
|
-
var _el$2 = _tmpl$$
|
|
47679
|
+
var _el$2 = _tmpl$$F();
|
|
47569
47680
|
_el$2.$$mousedown = (event) => {
|
|
47570
47681
|
var _a2;
|
|
47571
47682
|
if (!props.box()) {
|
|
@@ -47606,6 +47717,79 @@ function ResizeHandlesOverlay(props) {
|
|
|
47606
47717
|
})();
|
|
47607
47718
|
}
|
|
47608
47719
|
delegateEvents(["mousedown"]);
|
|
47720
|
+
var _tmpl$$E = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-image-crop-preview><img alt>`);
|
|
47721
|
+
function fraction(value2) {
|
|
47722
|
+
return Number.isFinite(value2) ? Math.max(0, Math.min(0.99, value2 ?? 0)) : 0;
|
|
47723
|
+
}
|
|
47724
|
+
function ImageCropPreviewOverlay(props) {
|
|
47725
|
+
const geometry = () => {
|
|
47726
|
+
const box = props.box();
|
|
47727
|
+
const image = props.image();
|
|
47728
|
+
if (!box || !image) return null;
|
|
47729
|
+
const sourceWidth = image.intrinsicWidth ?? image.width;
|
|
47730
|
+
const sourceHeight = image.intrinsicHeight ?? image.height;
|
|
47731
|
+
const sourceRatio = sourceWidth / Math.max(1, sourceHeight);
|
|
47732
|
+
if (image.cropFit === "fit" && sourceRatio > 0) {
|
|
47733
|
+
const frameRatio = box.width / Math.max(1, box.height);
|
|
47734
|
+
const width2 = sourceRatio > frameRatio ? box.width : box.height * sourceRatio;
|
|
47735
|
+
const height2 = width2 / sourceRatio;
|
|
47736
|
+
return {
|
|
47737
|
+
crop: {},
|
|
47738
|
+
left: box.left + (box.width - width2) / 2,
|
|
47739
|
+
top: box.top + (box.height - height2) / 2,
|
|
47740
|
+
width: width2,
|
|
47741
|
+
height: height2
|
|
47742
|
+
};
|
|
47743
|
+
}
|
|
47744
|
+
const crop = image.crop ?? {};
|
|
47745
|
+
const leftCrop = fraction(crop.left);
|
|
47746
|
+
const topCrop = fraction(crop.top);
|
|
47747
|
+
const rightCrop = fraction(crop.right);
|
|
47748
|
+
const bottomCrop = fraction(crop.bottom);
|
|
47749
|
+
const width = box.width / Math.max(0.01, 1 - leftCrop - rightCrop);
|
|
47750
|
+
const height = box.height / Math.max(0.01, 1 - topCrop - bottomCrop);
|
|
47751
|
+
return {
|
|
47752
|
+
crop,
|
|
47753
|
+
left: box.left - leftCrop * width,
|
|
47754
|
+
top: box.top - topCrop * height,
|
|
47755
|
+
width,
|
|
47756
|
+
height
|
|
47757
|
+
};
|
|
47758
|
+
};
|
|
47759
|
+
return (() => {
|
|
47760
|
+
var _el$ = _tmpl$$E(), _el$2 = _el$.firstChild;
|
|
47761
|
+
setAttribute(_el$2, "draggable", false);
|
|
47762
|
+
createRenderEffect((_p$) => {
|
|
47763
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
47764
|
+
var _v$ = geometry() ? void 0 : "none", _v$2 = `${((_a2 = props.box()) == null ? void 0 : _a2.left) ?? 0}px`, _v$3 = `${((_b2 = props.box()) == null ? void 0 : _b2.top) ?? 0}px`, _v$4 = `${((_c = props.box()) == null ? void 0 : _c.width) ?? 0}px`, _v$5 = `${((_d = props.box()) == null ? void 0 : _d.height) ?? 0}px`, _v$6 = `rotate(${props.rotation()}deg)`, _v$7 = props.src(), _v$8 = `${(((_e = geometry()) == null ? void 0 : _e.left) ?? 0) - (((_f = props.box()) == null ? void 0 : _f.left) ?? 0)}px`, _v$9 = `${(((_g = geometry()) == null ? void 0 : _g.top) ?? 0) - (((_h = props.box()) == null ? void 0 : _h.top) ?? 0)}px`, _v$0 = `${((_i = geometry()) == null ? void 0 : _i.width) ?? 0}px`, _v$1 = `${((_j = geometry()) == null ? void 0 : _j.height) ?? 0}px`;
|
|
47765
|
+
_v$ !== _p$.e && setStyleProperty(_el$, "display", _p$.e = _v$);
|
|
47766
|
+
_v$2 !== _p$.t && setStyleProperty(_el$, "left", _p$.t = _v$2);
|
|
47767
|
+
_v$3 !== _p$.a && setStyleProperty(_el$, "top", _p$.a = _v$3);
|
|
47768
|
+
_v$4 !== _p$.o && setStyleProperty(_el$, "width", _p$.o = _v$4);
|
|
47769
|
+
_v$5 !== _p$.i && setStyleProperty(_el$, "height", _p$.i = _v$5);
|
|
47770
|
+
_v$6 !== _p$.n && setStyleProperty(_el$, "transform", _p$.n = _v$6);
|
|
47771
|
+
_v$7 !== _p$.s && setAttribute(_el$2, "src", _p$.s = _v$7);
|
|
47772
|
+
_v$8 !== _p$.h && setStyleProperty(_el$2, "left", _p$.h = _v$8);
|
|
47773
|
+
_v$9 !== _p$.r && setStyleProperty(_el$2, "top", _p$.r = _v$9);
|
|
47774
|
+
_v$0 !== _p$.d && setStyleProperty(_el$2, "width", _p$.d = _v$0);
|
|
47775
|
+
_v$1 !== _p$.l && setStyleProperty(_el$2, "height", _p$.l = _v$1);
|
|
47776
|
+
return _p$;
|
|
47777
|
+
}, {
|
|
47778
|
+
e: void 0,
|
|
47779
|
+
t: void 0,
|
|
47780
|
+
a: void 0,
|
|
47781
|
+
o: void 0,
|
|
47782
|
+
i: void 0,
|
|
47783
|
+
n: void 0,
|
|
47784
|
+
s: void 0,
|
|
47785
|
+
h: void 0,
|
|
47786
|
+
r: void 0,
|
|
47787
|
+
d: void 0,
|
|
47788
|
+
l: void 0
|
|
47789
|
+
});
|
|
47790
|
+
return _el$;
|
|
47791
|
+
})();
|
|
47792
|
+
}
|
|
47609
47793
|
var _tmpl$$D = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>`);
|
|
47610
47794
|
function TableHandlesOverlay(props) {
|
|
47611
47795
|
return createComponent(Show, {
|
|
@@ -47653,7 +47837,7 @@ function createEditorZoom(initial = ZOOM_DEFAULT) {
|
|
|
47653
47837
|
const zoomFactor = createMemo(() => zoomPercent() / 100);
|
|
47654
47838
|
return { zoomPercent, setZoomPercent, adjustZoom, zoomFactor };
|
|
47655
47839
|
}
|
|
47656
|
-
var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$2$n = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$3$
|
|
47840
|
+
var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$2$n = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$3$f = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`);
|
|
47657
47841
|
function EditorImportProgressOverlay(props) {
|
|
47658
47842
|
const t = useI18n();
|
|
47659
47843
|
return createComponent(Show, {
|
|
@@ -47682,7 +47866,7 @@ function EditorImportProgressOverlay(props) {
|
|
|
47682
47866
|
insert(_el$8, () => t("import.phase.done"));
|
|
47683
47867
|
return _el$8;
|
|
47684
47868
|
})() : isError ? (() => {
|
|
47685
|
-
var _el$9 = _tmpl$3$
|
|
47869
|
+
var _el$9 = _tmpl$3$f();
|
|
47686
47870
|
insert(_el$9, () => t("import.phase.error"));
|
|
47687
47871
|
return _el$9;
|
|
47688
47872
|
})() : [memo(() => Math.round(progress().progress)), "%"]);
|
|
@@ -47877,6 +48061,23 @@ function OasisEditorEditor(props) {
|
|
|
47877
48061
|
return pageIndex === -1 ? 1 : pageIndex + 1;
|
|
47878
48062
|
};
|
|
47879
48063
|
const selectedImage = createMemo(() => overlays().selectedImageBox());
|
|
48064
|
+
const selectedImageData = createMemo(() => {
|
|
48065
|
+
const box = selectedImage();
|
|
48066
|
+
if (!box) return null;
|
|
48067
|
+
const paragraph = getDocumentParagraphs(props.state().document).find((candidate) => candidate.id === box.paragraphId);
|
|
48068
|
+
if (!paragraph) return null;
|
|
48069
|
+
let offset = 0;
|
|
48070
|
+
for (const run of paragraph.runs) {
|
|
48071
|
+
if (run.kind === "image" && offset === box.startOffset) {
|
|
48072
|
+
return {
|
|
48073
|
+
image: getRunImage(run),
|
|
48074
|
+
src: resolveImageSrc(props.state().document, run.image.src)
|
|
48075
|
+
};
|
|
48076
|
+
}
|
|
48077
|
+
offset += run.text.length;
|
|
48078
|
+
}
|
|
48079
|
+
return null;
|
|
48080
|
+
});
|
|
47880
48081
|
const imageCropMode = () => {
|
|
47881
48082
|
var _a2, _b2;
|
|
47882
48083
|
return ((_b2 = (_a2 = overlays()).imageCropMode) == null ? void 0 : _b2.call(_a2)) ?? false;
|
|
@@ -48084,7 +48285,21 @@ function OasisEditorEditor(props) {
|
|
|
48084
48285
|
});
|
|
48085
48286
|
},
|
|
48086
48287
|
get children() {
|
|
48087
|
-
return createComponent(
|
|
48288
|
+
return [createComponent(ImageCropPreviewOverlay, {
|
|
48289
|
+
box: selectedImage,
|
|
48290
|
+
image: () => {
|
|
48291
|
+
var _a2;
|
|
48292
|
+
return ((_a2 = selectedImageData()) == null ? void 0 : _a2.image) ?? null;
|
|
48293
|
+
},
|
|
48294
|
+
src: () => {
|
|
48295
|
+
var _a2;
|
|
48296
|
+
return ((_a2 = selectedImageData()) == null ? void 0 : _a2.src) ?? "";
|
|
48297
|
+
},
|
|
48298
|
+
rotation: () => {
|
|
48299
|
+
var _a2;
|
|
48300
|
+
return ((_a2 = selectedImage()) == null ? void 0 : _a2.rotation) ?? 0;
|
|
48301
|
+
}
|
|
48302
|
+
}), createComponent(ResizeHandlesOverlay, {
|
|
48088
48303
|
box: selectedImage,
|
|
48089
48304
|
get readOnly() {
|
|
48090
48305
|
return Boolean(layout().readOnly);
|
|
@@ -48101,8 +48316,14 @@ function OasisEditorEditor(props) {
|
|
|
48101
48316
|
event.preventDefault();
|
|
48102
48317
|
event.stopPropagation();
|
|
48103
48318
|
(_b2 = (_a2 = surfaceHandlers()).onImageCropHandleMouseDown) == null ? void 0 : _b2.call(_a2, image.paragraphId, image.startOffset, direction, event);
|
|
48319
|
+
},
|
|
48320
|
+
onBodyMouseDown: (event) => {
|
|
48321
|
+
var _a2, _b2;
|
|
48322
|
+
const image = selectedImage();
|
|
48323
|
+
if (!image) return;
|
|
48324
|
+
(_b2 = (_a2 = surfaceHandlers()).onImageCropBodyMouseDown) == null ? void 0 : _b2.call(_a2, image.paragraphId, image.startOffset, event);
|
|
48104
48325
|
}
|
|
48105
|
-
});
|
|
48326
|
+
})];
|
|
48106
48327
|
}
|
|
48107
48328
|
}), _el$5);
|
|
48108
48329
|
insert(_el$4, createComponent(ResizeHandlesOverlay, {
|
|
@@ -49129,7 +49350,7 @@ function IconButton(props) {
|
|
|
49129
49350
|
return _el$;
|
|
49130
49351
|
})();
|
|
49131
49352
|
}
|
|
49132
|
-
var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$k = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$
|
|
49353
|
+
var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$k = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$9 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title>`);
|
|
49133
49354
|
const EMPTY_SNAPSHOT = {
|
|
49134
49355
|
floatingActions: [],
|
|
49135
49356
|
sidePanels: [],
|
|
@@ -49203,7 +49424,7 @@ function PluginUiHost(props) {
|
|
|
49203
49424
|
return overlayPanel();
|
|
49204
49425
|
},
|
|
49205
49426
|
children: (panel) => (() => {
|
|
49206
|
-
var _el$4 = _tmpl$3$
|
|
49427
|
+
var _el$4 = _tmpl$3$e();
|
|
49207
49428
|
insert(_el$4, () => renderPanel(props.editor, panel(), t));
|
|
49208
49429
|
return _el$4;
|
|
49209
49430
|
})()
|
|
@@ -49254,7 +49475,7 @@ function renderPanel(editor, panel, t) {
|
|
|
49254
49475
|
return [createComponent(SidePanelHeader, {
|
|
49255
49476
|
get children() {
|
|
49256
49477
|
return [(() => {
|
|
49257
|
-
var _el$5 = _tmpl$4$
|
|
49478
|
+
var _el$5 = _tmpl$4$9();
|
|
49258
49479
|
insert(_el$5, createComponent(Show, {
|
|
49259
49480
|
get when() {
|
|
49260
49481
|
return panel.icon;
|
|
@@ -49692,7 +49913,7 @@ function Dialog(props) {
|
|
|
49692
49913
|
});
|
|
49693
49914
|
}
|
|
49694
49915
|
delegateEvents(["click"]);
|
|
49695
|
-
var _tmpl$$r = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$g = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$
|
|
49916
|
+
var _tmpl$$r = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$g = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$d = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
|
|
49696
49917
|
function findEnabledItem(items, startIndex, direction) {
|
|
49697
49918
|
if (!items.length) return void 0;
|
|
49698
49919
|
for (let step = 0; step < items.length; step += 1) {
|
|
@@ -49788,7 +50009,7 @@ function Tabs(props) {
|
|
|
49788
50009
|
return items();
|
|
49789
50010
|
},
|
|
49790
50011
|
children: (item) => (() => {
|
|
49791
|
-
var _el$4 = _tmpl$3$
|
|
50012
|
+
var _el$4 = _tmpl$3$d();
|
|
49792
50013
|
insert(_el$4, () => item.panel);
|
|
49793
50014
|
createRenderEffect((_p$) => {
|
|
49794
50015
|
var _a2, _b2;
|
|
@@ -50156,7 +50377,7 @@ function FormField(props) {
|
|
|
50156
50377
|
return _el$;
|
|
50157
50378
|
})();
|
|
50158
50379
|
}
|
|
50159
|
-
var _tmpl$$m = /* @__PURE__ */ template(`<span>`), _tmpl$2$e = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$
|
|
50380
|
+
var _tmpl$$m = /* @__PURE__ */ template(`<span>`), _tmpl$2$e = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$c = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$8 = /* @__PURE__ */ template(`<label><input>`);
|
|
50160
50381
|
function TextField(props) {
|
|
50161
50382
|
const fallbackId = createUniqueId();
|
|
50162
50383
|
const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "onChange", "class", "classList", "id"]);
|
|
@@ -50164,7 +50385,7 @@ function TextField(props) {
|
|
|
50164
50385
|
const descriptionId = () => `${id()}-description`;
|
|
50165
50386
|
const errorId = () => `${id()}-error`;
|
|
50166
50387
|
return (() => {
|
|
50167
|
-
var _el$ = _tmpl$4$
|
|
50388
|
+
var _el$ = _tmpl$4$8(), _el$3 = _el$.firstChild;
|
|
50168
50389
|
insert(_el$, createComponent(Show, {
|
|
50169
50390
|
get when() {
|
|
50170
50391
|
return local.label;
|
|
@@ -50210,7 +50431,7 @@ function TextField(props) {
|
|
|
50210
50431
|
return local.error;
|
|
50211
50432
|
},
|
|
50212
50433
|
get children() {
|
|
50213
|
-
var _el$5 = _tmpl$3$
|
|
50434
|
+
var _el$5 = _tmpl$3$c();
|
|
50214
50435
|
insert(_el$5, () => local.error);
|
|
50215
50436
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
50216
50437
|
return _el$5;
|
|
@@ -50293,7 +50514,7 @@ function ColorField(props) {
|
|
|
50293
50514
|
}
|
|
50294
50515
|
}, others));
|
|
50295
50516
|
}
|
|
50296
|
-
var _tmpl$$k = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$
|
|
50517
|
+
var _tmpl$$k = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$b = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`);
|
|
50297
50518
|
function Checkbox(props) {
|
|
50298
50519
|
const fallbackId = createUniqueId();
|
|
50299
50520
|
const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
|
|
@@ -50301,7 +50522,7 @@ function Checkbox(props) {
|
|
|
50301
50522
|
const descriptionId = () => `${id()}-description`;
|
|
50302
50523
|
const errorId = () => `${id()}-error`;
|
|
50303
50524
|
return (() => {
|
|
50304
|
-
var _el$ = _tmpl$3$
|
|
50525
|
+
var _el$ = _tmpl$3$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
50305
50526
|
_el$2.addEventListener("change", (event) => {
|
|
50306
50527
|
var _a2;
|
|
50307
50528
|
return (_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.checked);
|
|
@@ -50352,7 +50573,7 @@ function Checkbox(props) {
|
|
|
50352
50573
|
return _el$;
|
|
50353
50574
|
})();
|
|
50354
50575
|
}
|
|
50355
|
-
var _tmpl$$j = /* @__PURE__ */ template(`<span>`), _tmpl$2$c = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$
|
|
50576
|
+
var _tmpl$$j = /* @__PURE__ */ template(`<span>`), _tmpl$2$c = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$7 = /* @__PURE__ */ template(`<label><select>`), _tmpl$5$5 = /* @__PURE__ */ template(`<option>`);
|
|
50356
50577
|
function SelectField(props) {
|
|
50357
50578
|
const fallbackId = createUniqueId();
|
|
50358
50579
|
const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "options", "onChange", "class", "classList", "id", "value"]);
|
|
@@ -50361,7 +50582,7 @@ function SelectField(props) {
|
|
|
50361
50582
|
const descriptionId = () => `${id()}-description`;
|
|
50362
50583
|
const errorId = () => `${id()}-error`;
|
|
50363
50584
|
return (() => {
|
|
50364
|
-
var _el$ = _tmpl$4$
|
|
50585
|
+
var _el$ = _tmpl$4$7(), _el$3 = _el$.firstChild;
|
|
50365
50586
|
insert(_el$, createComponent(Show, {
|
|
50366
50587
|
get when() {
|
|
50367
50588
|
return local.label;
|
|
@@ -50400,7 +50621,7 @@ function SelectField(props) {
|
|
|
50400
50621
|
return local.options;
|
|
50401
50622
|
},
|
|
50402
50623
|
children: (option) => (() => {
|
|
50403
|
-
var _el$6 = _tmpl$5$
|
|
50624
|
+
var _el$6 = _tmpl$5$5();
|
|
50404
50625
|
insert(_el$6, () => option.label);
|
|
50405
50626
|
createRenderEffect((_p$) => {
|
|
50406
50627
|
var _v$4 = option.disabled, _v$5 = option.value === currentValue();
|
|
@@ -50431,7 +50652,7 @@ function SelectField(props) {
|
|
|
50431
50652
|
return local.error;
|
|
50432
50653
|
},
|
|
50433
50654
|
get children() {
|
|
50434
|
-
var _el$5 = _tmpl$3$
|
|
50655
|
+
var _el$5 = _tmpl$3$a();
|
|
50435
50656
|
insert(_el$5, () => local.error);
|
|
50436
50657
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
50437
50658
|
return _el$5;
|
|
@@ -50466,7 +50687,7 @@ function NumberField(props) {
|
|
|
50466
50687
|
}
|
|
50467
50688
|
}, others));
|
|
50468
50689
|
}
|
|
50469
|
-
var _tmpl$$i = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$b = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$
|
|
50690
|
+
var _tmpl$$i = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$b = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$4$6 = /* @__PURE__ */ template(`<div role=radiogroup>`);
|
|
50470
50691
|
const RadioGroupCtx = createContext();
|
|
50471
50692
|
function Radio(props) {
|
|
50472
50693
|
const fallbackId = createUniqueId();
|
|
@@ -50541,13 +50762,13 @@ function RadioGroup(props) {
|
|
|
50541
50762
|
return createComponent(RadioGroupCtx.Provider, {
|
|
50542
50763
|
value: ctx,
|
|
50543
50764
|
get children() {
|
|
50544
|
-
var _el$6 = _tmpl$4$
|
|
50765
|
+
var _el$6 = _tmpl$4$6();
|
|
50545
50766
|
insert(_el$6, createComponent(Show, {
|
|
50546
50767
|
get when() {
|
|
50547
50768
|
return props.label;
|
|
50548
50769
|
},
|
|
50549
50770
|
get children() {
|
|
50550
|
-
var _el$7 = _tmpl$3$
|
|
50771
|
+
var _el$7 = _tmpl$3$9();
|
|
50551
50772
|
insert(_el$7, () => props.label);
|
|
50552
50773
|
return _el$7;
|
|
50553
50774
|
}
|
|
@@ -50943,7 +51164,7 @@ const UNDERLINE_STYLE_OPTIONS = [
|
|
|
50943
51164
|
}
|
|
50944
51165
|
}
|
|
50945
51166
|
];
|
|
50946
|
-
var _tmpl$$d = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$9 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$
|
|
51167
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$9 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$8 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$5 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
|
|
50947
51168
|
const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
|
|
50948
51169
|
const TEST_ID = "editor-toolbar-underline";
|
|
50949
51170
|
function UnderlineControl(props) {
|
|
@@ -50994,7 +51215,7 @@ function UnderlineControl(props) {
|
|
|
50994
51215
|
panelRole: "menu",
|
|
50995
51216
|
get mainContent() {
|
|
50996
51217
|
return (() => {
|
|
50997
|
-
var _el$5 = _tmpl$3$
|
|
51218
|
+
var _el$5 = _tmpl$3$8(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
50998
51219
|
createRenderEffect(() => setAttribute(_el$7, "data-style", indicatorStyle()));
|
|
50999
51220
|
return _el$5;
|
|
51000
51221
|
})();
|
|
@@ -51015,7 +51236,7 @@ function UnderlineControl(props) {
|
|
|
51015
51236
|
children: (option) => {
|
|
51016
51237
|
const isActive = () => active() && activeStyleValue() === option.value.toLowerCase();
|
|
51017
51238
|
return (() => {
|
|
51018
|
-
var _el$8 = _tmpl$5$
|
|
51239
|
+
var _el$8 = _tmpl$5$4(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
|
|
51019
51240
|
_el$8.$$click = () => {
|
|
51020
51241
|
applyUnderlineStyle(option.value);
|
|
51021
51242
|
setOpen(false);
|
|
@@ -51035,7 +51256,7 @@ function UnderlineControl(props) {
|
|
|
51035
51256
|
})();
|
|
51036
51257
|
},
|
|
51037
51258
|
get children() {
|
|
51038
|
-
var _el$0 = _tmpl$4$
|
|
51259
|
+
var _el$0 = _tmpl$4$5();
|
|
51039
51260
|
createRenderEffect(() => _el$0.innerHTML = option.preview.svg);
|
|
51040
51261
|
return _el$0;
|
|
51041
51262
|
}
|
|
@@ -51064,7 +51285,7 @@ function UnderlineControl(props) {
|
|
|
51064
51285
|
});
|
|
51065
51286
|
}
|
|
51066
51287
|
delegateEvents(["click"]);
|
|
51067
|
-
var _tmpl$$c = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$8 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$
|
|
51288
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$8 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$7 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$4 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$2 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>`);
|
|
51068
51289
|
function ListOptionsControl(props) {
|
|
51069
51290
|
const t = useI18n();
|
|
51070
51291
|
const api = props.api;
|
|
@@ -51094,15 +51315,15 @@ function ListOptionsControl(props) {
|
|
|
51094
51315
|
insert(_el$5, () => t("toolbar.formatLowerLetter"));
|
|
51095
51316
|
return _el$5;
|
|
51096
51317
|
})(), (() => {
|
|
51097
|
-
var _el$6 = _tmpl$3$
|
|
51318
|
+
var _el$6 = _tmpl$3$7();
|
|
51098
51319
|
insert(_el$6, () => t("toolbar.formatUpperLetter"));
|
|
51099
51320
|
return _el$6;
|
|
51100
51321
|
})(), (() => {
|
|
51101
|
-
var _el$7 = _tmpl$4$
|
|
51322
|
+
var _el$7 = _tmpl$4$4();
|
|
51102
51323
|
insert(_el$7, () => t("toolbar.formatLowerRoman"));
|
|
51103
51324
|
return _el$7;
|
|
51104
51325
|
})(), (() => {
|
|
51105
|
-
var _el$8 = _tmpl$5$
|
|
51326
|
+
var _el$8 = _tmpl$5$3();
|
|
51106
51327
|
insert(_el$8, () => t("toolbar.formatUpperRoman"));
|
|
51107
51328
|
return _el$8;
|
|
51108
51329
|
})(), (() => {
|
|
@@ -51265,7 +51486,7 @@ function LineSpacingDialog(props) {
|
|
|
51265
51486
|
}
|
|
51266
51487
|
});
|
|
51267
51488
|
}
|
|
51268
|
-
var _tmpl$$a = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$7 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3$
|
|
51489
|
+
var _tmpl$$a = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$7 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3$6 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`);
|
|
51269
51490
|
const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
|
|
51270
51491
|
function formatPreset(value2) {
|
|
51271
51492
|
return value2.toFixed(value2 === Math.floor(value2) ? 1 : 2);
|
|
@@ -51335,7 +51556,7 @@ function LineSpacingButton(props) {
|
|
|
51335
51556
|
return lh !== null && approxEqual(lh, value2);
|
|
51336
51557
|
};
|
|
51337
51558
|
return (() => {
|
|
51338
|
-
var _el$5 = _tmpl$3$
|
|
51559
|
+
var _el$5 = _tmpl$3$6(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
51339
51560
|
_el$5.$$click = () => applyPreset(value2);
|
|
51340
51561
|
insert(_el$6, createComponent(Show, {
|
|
51341
51562
|
get when() {
|
|
@@ -51686,7 +51907,7 @@ function marginsMatchPreset(margins, preset) {
|
|
|
51686
51907
|
const target = presetMarginsPx(preset);
|
|
51687
51908
|
return Math.abs(margins.top - target.top) <= 1 && Math.abs(margins.bottom - target.bottom) <= 1 && Math.abs(margins.left - target.left) <= 1 && Math.abs(margins.right - target.right) <= 1;
|
|
51688
51909
|
}
|
|
51689
|
-
var _tmpl$$7 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3$
|
|
51910
|
+
var _tmpl$$7 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3$5 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>`), _tmpl$4$3 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>`), _tmpl$6$1 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
|
|
51690
51911
|
const FIELDS = [{
|
|
51691
51912
|
key: "top",
|
|
51692
51913
|
labelKey: "section.marginField.top"
|
|
@@ -51760,7 +51981,7 @@ function MarginsGroup(props) {
|
|
|
51760
51981
|
insert(_el$, createComponent(For, {
|
|
51761
51982
|
each: MARGIN_PRESETS,
|
|
51762
51983
|
children: (preset) => (() => {
|
|
51763
|
-
var _el$9 = _tmpl$5$
|
|
51984
|
+
var _el$9 = _tmpl$5$2(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
51764
51985
|
_el$9.$$click = () => applyPreset(preset);
|
|
51765
51986
|
insert(_el$0, () => t(preset.labelKey));
|
|
51766
51987
|
insert(_el$1, () => `${t("section.marginField.top")} ${formatCm(preset.top)} ${t("section.marginField.bottom")} ${formatCm(preset.bottom)}`, _el$10);
|
|
@@ -51781,7 +52002,7 @@ function MarginsGroup(props) {
|
|
|
51781
52002
|
}));
|
|
51782
52003
|
return _el$;
|
|
51783
52004
|
})(), (() => {
|
|
51784
|
-
var _el$2 = _tmpl$3$
|
|
52005
|
+
var _el$2 = _tmpl$3$5(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
51785
52006
|
_el$3.$$click = openCustom;
|
|
51786
52007
|
insert(_el$5, () => t("section.marginPreset.custom"));
|
|
51787
52008
|
insert(_el$2, createComponent(Show, {
|
|
@@ -51812,7 +52033,7 @@ function MarginsGroup(props) {
|
|
|
51812
52033
|
return showCustom();
|
|
51813
52034
|
},
|
|
51814
52035
|
get children() {
|
|
51815
|
-
var _el$7 = _tmpl$4$
|
|
52036
|
+
var _el$7 = _tmpl$4$3(), _el$8 = _el$7.firstChild;
|
|
51816
52037
|
_el$8.$$click = applyCustom;
|
|
51817
52038
|
insert(_el$8, () => t("section.marginApply"));
|
|
51818
52039
|
return _el$7;
|
|
@@ -52390,7 +52611,7 @@ function pushRecentShape(preset) {
|
|
|
52390
52611
|
}
|
|
52391
52612
|
return next;
|
|
52392
52613
|
}
|
|
52393
|
-
var _tmpl$$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-shape-gallery-tile>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-section-header>`), _tmpl$3$
|
|
52614
|
+
var _tmpl$$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-shape-gallery-tile>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-section-header>`), _tmpl$3$4 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-grid>`), _tmpl$4$2 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery>`);
|
|
52394
52615
|
function ShapeGallery(props) {
|
|
52395
52616
|
const t = useI18n();
|
|
52396
52617
|
const locale = () => t("locale.id") === "en" ? "en" : "pt-BR";
|
|
@@ -52422,7 +52643,7 @@ function ShapeGallery(props) {
|
|
|
52422
52643
|
return _el$;
|
|
52423
52644
|
})();
|
|
52424
52645
|
return (() => {
|
|
52425
|
-
var _el$2 = _tmpl$4$
|
|
52646
|
+
var _el$2 = _tmpl$4$2();
|
|
52426
52647
|
insert(_el$2, createComponent(Show, {
|
|
52427
52648
|
get when() {
|
|
52428
52649
|
return recent().length > 0;
|
|
@@ -52433,7 +52654,7 @@ function ShapeGallery(props) {
|
|
|
52433
52654
|
insert(_el$3, () => t("toolbar.shapes.recentlyUsed"));
|
|
52434
52655
|
return _el$3;
|
|
52435
52656
|
})(), (() => {
|
|
52436
|
-
var _el$4 = _tmpl$3$
|
|
52657
|
+
var _el$4 = _tmpl$3$4();
|
|
52437
52658
|
insert(_el$4, createComponent(For, {
|
|
52438
52659
|
get each() {
|
|
52439
52660
|
return recent();
|
|
@@ -52453,7 +52674,7 @@ function ShapeGallery(props) {
|
|
|
52453
52674
|
insert(_el$5, () => t(category.headerKey));
|
|
52454
52675
|
return _el$5;
|
|
52455
52676
|
})(), (() => {
|
|
52456
|
-
var _el$6 = _tmpl$3$
|
|
52677
|
+
var _el$6 = _tmpl$3$4();
|
|
52457
52678
|
insert(_el$6, createComponent(For, {
|
|
52458
52679
|
get each() {
|
|
52459
52680
|
return category.presets;
|
|
@@ -52542,7 +52763,7 @@ function rememberSymbol(character) {
|
|
|
52542
52763
|
)
|
|
52543
52764
|
].slice(0, MAX_RECENT_SYMBOLS);
|
|
52544
52765
|
}
|
|
52545
|
-
var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-menu-actions><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-equation><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-symbol><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-number><span>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-picker><div class=oasis-editor-symbol-picker-header><button type=button class=oasis-editor-symbol-back></button><span></span></div><div class=oasis-editor-symbol-grid></div><button type=button class=oasis-editor-symbol-more data-testid=editor-toolbar-more-symbols><span>`), _tmpl$3$
|
|
52766
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-menu-actions><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-equation><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-symbol><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-number><span>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-picker><div class=oasis-editor-symbol-picker-header><button type=button class=oasis-editor-symbol-back></button><span></span></div><div class=oasis-editor-symbol-grid></div><button type=button class=oasis-editor-symbol-more data-testid=editor-toolbar-more-symbols><span>`), _tmpl$3$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-symbol-tile>`);
|
|
52546
52767
|
function SymbolMenu(props) {
|
|
52547
52768
|
const t = useI18n();
|
|
52548
52769
|
const [view, setView] = createSignal("root");
|
|
@@ -52617,7 +52838,7 @@ function SymbolMenu(props) {
|
|
|
52617
52838
|
return entriesForView();
|
|
52618
52839
|
},
|
|
52619
52840
|
children: (entry) => (() => {
|
|
52620
|
-
var _el$13 = _tmpl$3$
|
|
52841
|
+
var _el$13 = _tmpl$3$3();
|
|
52621
52842
|
_el$13.$$click = () => insert$1(entry);
|
|
52622
52843
|
insert(_el$13, () => entry.character);
|
|
52623
52844
|
createRenderEffect((_p$) => {
|
|
@@ -52699,7 +52920,7 @@ function SymbolMenu(props) {
|
|
|
52699
52920
|
});
|
|
52700
52921
|
}
|
|
52701
52922
|
delegateEvents(["click"]);
|
|
52702
|
-
var _tmpl$$3 = /* @__PURE__ */ template(`<i>`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-grid>`), _tmpl$3$
|
|
52923
|
+
var _tmpl$$3 = /* @__PURE__ */ template(`<i>`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-grid>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-gallery><div class=oasis-editor-table-style-strip role=listbox>`);
|
|
52703
52924
|
const tableStyles = (styles) => styles.filter((style2) => style2.type === "table").map((style2, index) => ({
|
|
52704
52925
|
style: style2,
|
|
52705
52926
|
index
|
|
@@ -52825,7 +53046,7 @@ function TableStyleGallery(props) {
|
|
|
52825
53046
|
return panelTestId();
|
|
52826
53047
|
},
|
|
52827
53048
|
trigger: (popover) => (() => {
|
|
52828
|
-
var _el$1 = _tmpl$3$
|
|
53049
|
+
var _el$1 = _tmpl$3$2(), _el$10 = _el$1.firstChild;
|
|
52829
53050
|
var _ref$ = popover.ref;
|
|
52830
53051
|
typeof _ref$ === "function" ? use(_ref$, _el$1) : popover.ref = _el$1;
|
|
52831
53052
|
insert(_el$10, cards);
|
|
@@ -52906,7 +53127,7 @@ function TableStyleOptions(props) {
|
|
|
52906
53127
|
return _el$;
|
|
52907
53128
|
})();
|
|
52908
53129
|
}
|
|
52909
|
-
var _tmpl$$1 = /* @__PURE__ */ template(`<svg class=oasis-editor-table-border-preset-icon viewBox="0 0 20 20"aria-hidden=true><rect x=2 y=2 width=16 height=16 fill=none stroke=currentColor stroke-opacity=.45 stroke-dasharray="1.5 1.5">`), _tmpl$2$1 = /* @__PURE__ */ template(`<svg><path d="M2 2h16"></svg>`, false, true, false), _tmpl$3 = /* @__PURE__ */ template(`<svg><path d="M2 18h16"></svg>`, false, true, false), _tmpl$4 = /* @__PURE__ */ template(`<svg><path d="M2 2v16"></svg>`, false, true, false), _tmpl$5 = /* @__PURE__ */ template(`<svg><path d="M18 2v16"></svg>`, false, true, false), _tmpl$6 = /* @__PURE__ */ template(`<svg><path d="M2 10h16"></svg>`, false, true, false), _tmpl$7 = /* @__PURE__ */ template(`<svg><path d="M10 2v16"></svg>`, false, true, false), _tmpl$8 = /* @__PURE__ */ template(`<svg><path d="M2 2l16 16"></svg>`, false, true, false), _tmpl$9 = /* @__PURE__ */ template(`<svg><path d="M2 18 18 2"></svg>`, false, true, false), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-divider>`), _tmpl$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-section>`);
|
|
53130
|
+
var _tmpl$$1 = /* @__PURE__ */ template(`<svg class=oasis-editor-table-border-preset-icon viewBox="0 0 20 20"aria-hidden=true><rect x=2 y=2 width=16 height=16 fill=none stroke=currentColor stroke-opacity=.45 stroke-dasharray="1.5 1.5">`), _tmpl$2$1 = /* @__PURE__ */ template(`<svg><path d="M2 2h16"></svg>`, false, true, false), _tmpl$3$1 = /* @__PURE__ */ template(`<svg><path d="M2 18h16"></svg>`, false, true, false), _tmpl$4$1 = /* @__PURE__ */ template(`<svg><path d="M2 2v16"></svg>`, false, true, false), _tmpl$5$1 = /* @__PURE__ */ template(`<svg><path d="M18 2v16"></svg>`, false, true, false), _tmpl$6 = /* @__PURE__ */ template(`<svg><path d="M2 10h16"></svg>`, false, true, false), _tmpl$7 = /* @__PURE__ */ template(`<svg><path d="M10 2v16"></svg>`, false, true, false), _tmpl$8 = /* @__PURE__ */ template(`<svg><path d="M2 2l16 16"></svg>`, false, true, false), _tmpl$9 = /* @__PURE__ */ template(`<svg><path d="M2 18 18 2"></svg>`, false, true, false), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-divider>`), _tmpl$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-section>`);
|
|
52910
53131
|
const GROUPS = [[{
|
|
52911
53132
|
preset: "bottom",
|
|
52912
53133
|
label: "Borda Inferior"
|
|
@@ -52949,7 +53170,7 @@ function Preview(props) {
|
|
|
52949
53170
|
return (() => {
|
|
52950
53171
|
var _el$ = _tmpl$$1();
|
|
52951
53172
|
_el$.firstChild;
|
|
52952
|
-
insert(_el$, p !== "none" && [memo(() => memo(() => !!["all", "outside", "top"].includes(p))() && _tmpl$2$1()), memo(() => memo(() => !!["all", "outside", "bottom"].includes(p))() && _tmpl$3()), memo(() => memo(() => !!["all", "outside", "left"].includes(p))() && _tmpl$4()), memo(() => memo(() => !!["all", "outside", "right"].includes(p))() && _tmpl$5()), memo(() => memo(() => !!["all", "inside", "insideHorizontal"].includes(p))() && _tmpl$6()), memo(() => memo(() => !!["all", "inside", "insideVertical"].includes(p))() && _tmpl$7()), p === "diagonalDown" && _tmpl$8(), p === "diagonalUp" && _tmpl$9()], null);
|
|
53173
|
+
insert(_el$, p !== "none" && [memo(() => memo(() => !!["all", "outside", "top"].includes(p))() && _tmpl$2$1()), memo(() => memo(() => !!["all", "outside", "bottom"].includes(p))() && _tmpl$3$1()), memo(() => memo(() => !!["all", "outside", "left"].includes(p))() && _tmpl$4$1()), memo(() => memo(() => !!["all", "outside", "right"].includes(p))() && _tmpl$5$1()), memo(() => memo(() => !!["all", "inside", "insideHorizontal"].includes(p))() && _tmpl$6()), memo(() => memo(() => !!["all", "inside", "insideVertical"].includes(p))() && _tmpl$7()), p === "diagonalDown" && _tmpl$8(), p === "diagonalUp" && _tmpl$9()], null);
|
|
52953
53174
|
return _el$;
|
|
52954
53175
|
})();
|
|
52955
53176
|
}
|
|
@@ -53084,7 +53305,7 @@ function TableBordersMenu(props) {
|
|
|
53084
53305
|
}
|
|
53085
53306
|
});
|
|
53086
53307
|
}
|
|
53087
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>`), _tmpl$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-
|
|
53308
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-image-crop-flyout role=menu>`), _tmpl$3 = /* @__PURE__ */ template(`<div class="oasis-editor-image-crop-flyout oasis-editor-image-crop-ratio-flyout"role=menu>`), _tmpl$4 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"role=menu><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-menu-submenu-row></div><div class=oasis-editor-image-crop-menu-submenu-row>`), _tmpl$5 = /* @__PURE__ */ template(`<div class=oasis-editor-image-crop-ratio-group><div class=oasis-editor-image-crop-ratio-heading>`);
|
|
53088
53309
|
function cmValue(api, command) {
|
|
53089
53310
|
const value2 = api.commands.state(command).value;
|
|
53090
53311
|
return typeof value2 === "number" ? value2.toFixed(2) : "";
|
|
@@ -53124,66 +53345,165 @@ function ImageSizeField(props) {
|
|
|
53124
53345
|
return _el$;
|
|
53125
53346
|
})();
|
|
53126
53347
|
}
|
|
53127
|
-
const
|
|
53128
|
-
id: "
|
|
53129
|
-
labelKey: "image.
|
|
53130
|
-
|
|
53131
|
-
id: "1:1",
|
|
53132
|
-
labelKey: "image.cropRatio.square"
|
|
53133
|
-
}, {
|
|
53134
|
-
id: "16:9",
|
|
53135
|
-
labelKey: "image.cropRatio.16x9"
|
|
53348
|
+
const CROP_ASPECT_GROUPS = [{
|
|
53349
|
+
id: "square",
|
|
53350
|
+
labelKey: "image.cropRatio.squareGroup",
|
|
53351
|
+
presets: ["1:1"]
|
|
53136
53352
|
}, {
|
|
53137
|
-
id: "
|
|
53138
|
-
labelKey: "image.cropRatio.
|
|
53353
|
+
id: "portrait",
|
|
53354
|
+
labelKey: "image.cropRatio.portrait",
|
|
53355
|
+
presets: ["2:3", "3:4", "3:5", "4:5"]
|
|
53139
53356
|
}, {
|
|
53140
|
-
id: "
|
|
53141
|
-
labelKey: "image.cropRatio.
|
|
53142
|
-
|
|
53143
|
-
id: "2:3",
|
|
53144
|
-
labelKey: "image.cropRatio.2x3"
|
|
53145
|
-
}, {
|
|
53146
|
-
id: "3:4",
|
|
53147
|
-
labelKey: "image.cropRatio.3x4"
|
|
53148
|
-
}, {
|
|
53149
|
-
id: "9:16",
|
|
53150
|
-
labelKey: "image.cropRatio.9x16"
|
|
53357
|
+
id: "landscape",
|
|
53358
|
+
labelKey: "image.cropRatio.landscape",
|
|
53359
|
+
presets: ["3:2", "4:3", "5:3", "5:4", "16:9", "16:10"]
|
|
53151
53360
|
}];
|
|
53361
|
+
const OPEN_CROP_SHAPES = /* @__PURE__ */ new Set(["line", "lineInv", "straightConnector1", "bentConnector3", "curvedConnector3", "arc", "leftBracket", "rightBracket", "leftBrace", "rightBrace"]);
|
|
53362
|
+
function cropShapePresets() {
|
|
53363
|
+
return SHAPE_CATEGORIES.flatMap((category) => category.presets).filter((preset, index, all) => !OPEN_CROP_SHAPES.has(preset) && all.indexOf(preset) === index);
|
|
53364
|
+
}
|
|
53365
|
+
function CropMenuRow(props) {
|
|
53366
|
+
return createComponent(Button$1, {
|
|
53367
|
+
"class": "oasis-editor-image-crop-menu-row",
|
|
53368
|
+
get ["data-testid"]() {
|
|
53369
|
+
return props.testId;
|
|
53370
|
+
},
|
|
53371
|
+
role: "menuitem",
|
|
53372
|
+
get ["aria-haspopup"]() {
|
|
53373
|
+
return props.submenu ? "menu" : void 0;
|
|
53374
|
+
},
|
|
53375
|
+
get onClick() {
|
|
53376
|
+
return props.onClick;
|
|
53377
|
+
},
|
|
53378
|
+
get icon() {
|
|
53379
|
+
return props.icon;
|
|
53380
|
+
},
|
|
53381
|
+
get label() {
|
|
53382
|
+
return memo(() => !!props.submenu)() ? `${props.label} ›` : props.label;
|
|
53383
|
+
}
|
|
53384
|
+
});
|
|
53385
|
+
}
|
|
53152
53386
|
function ImageCropMenu(props) {
|
|
53153
53387
|
const t = useI18n();
|
|
53388
|
+
const locale = () => t("locale.id") === "en" ? "en" : "pt-BR";
|
|
53389
|
+
const [submenu, setSubmenu] = createSignal(null);
|
|
53390
|
+
const toggleSubmenu = (value2) => {
|
|
53391
|
+
setSubmenu((current) => current === value2 ? null : value2);
|
|
53392
|
+
};
|
|
53393
|
+
const apply = (command, payload) => {
|
|
53394
|
+
props.api.commands.execute(command, payload);
|
|
53395
|
+
setSubmenu(null);
|
|
53396
|
+
};
|
|
53154
53397
|
return (() => {
|
|
53155
|
-
var _el$3 = _tmpl$
|
|
53156
|
-
insert(_el$3, createComponent(
|
|
53398
|
+
var _el$3 = _tmpl$4(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling;
|
|
53399
|
+
insert(_el$3, createComponent(CropMenuRow, {
|
|
53400
|
+
testId: "editor-toolbar-image-crop-toggle",
|
|
53157
53401
|
icon: "crop",
|
|
53158
|
-
get
|
|
53159
|
-
return
|
|
53402
|
+
get label() {
|
|
53403
|
+
return t("image.crop");
|
|
53404
|
+
},
|
|
53405
|
+
onClick: () => apply("imageCrop")
|
|
53406
|
+
}), _el$4);
|
|
53407
|
+
insert(_el$5, createComponent(CropMenuRow, {
|
|
53408
|
+
testId: "editor-toolbar-image-crop-shape",
|
|
53409
|
+
icon: "shapes",
|
|
53410
|
+
get label() {
|
|
53411
|
+
return t("image.cropToShape");
|
|
53160
53412
|
},
|
|
53161
|
-
|
|
53162
|
-
onClick: () =>
|
|
53163
|
-
|
|
53413
|
+
submenu: true,
|
|
53414
|
+
onClick: () => toggleSubmenu("shape")
|
|
53415
|
+
}), null);
|
|
53416
|
+
insert(_el$5, createComponent(Show, {
|
|
53417
|
+
get when() {
|
|
53418
|
+
return submenu() === "shape";
|
|
53164
53419
|
},
|
|
53420
|
+
get children() {
|
|
53421
|
+
var _el$6 = _tmpl$2();
|
|
53422
|
+
insert(_el$6, createComponent(For, {
|
|
53423
|
+
get each() {
|
|
53424
|
+
return cropShapePresets();
|
|
53425
|
+
},
|
|
53426
|
+
children: (preset) => createComponent(Button$1, {
|
|
53427
|
+
"class": "oasis-editor-image-crop-shape-tile",
|
|
53428
|
+
get title() {
|
|
53429
|
+
return shapeLabel(preset, locale());
|
|
53430
|
+
},
|
|
53431
|
+
get ["aria-label"]() {
|
|
53432
|
+
return shapeLabel(preset, locale());
|
|
53433
|
+
},
|
|
53434
|
+
"data-testid": `editor-toolbar-image-crop-shape-${preset}`,
|
|
53435
|
+
onClick: () => apply("imageCropShape", preset),
|
|
53436
|
+
get children() {
|
|
53437
|
+
return createComponent(ShapeThumbnail, {
|
|
53438
|
+
preset
|
|
53439
|
+
});
|
|
53440
|
+
}
|
|
53441
|
+
})
|
|
53442
|
+
}));
|
|
53443
|
+
return _el$6;
|
|
53444
|
+
}
|
|
53445
|
+
}), null);
|
|
53446
|
+
insert(_el$7, createComponent(CropMenuRow, {
|
|
53447
|
+
testId: "editor-toolbar-image-crop-ratio",
|
|
53448
|
+
icon: "ratio",
|
|
53165
53449
|
get label() {
|
|
53166
|
-
return t("image.
|
|
53450
|
+
return t("image.cropAspectRatio");
|
|
53167
53451
|
},
|
|
53168
|
-
|
|
53169
|
-
|
|
53452
|
+
submenu: true,
|
|
53453
|
+
onClick: () => toggleSubmenu("ratio")
|
|
53454
|
+
}), null);
|
|
53455
|
+
insert(_el$7, createComponent(Show, {
|
|
53456
|
+
get when() {
|
|
53457
|
+
return submenu() === "ratio";
|
|
53458
|
+
},
|
|
53459
|
+
get children() {
|
|
53460
|
+
var _el$8 = _tmpl$3();
|
|
53461
|
+
insert(_el$8, createComponent(For, {
|
|
53462
|
+
each: CROP_ASPECT_GROUPS,
|
|
53463
|
+
children: (group) => (() => {
|
|
53464
|
+
var _el$9 = _tmpl$5(), _el$0 = _el$9.firstChild;
|
|
53465
|
+
insert(_el$0, () => t(group.labelKey));
|
|
53466
|
+
insert(_el$9, createComponent(For, {
|
|
53467
|
+
get each() {
|
|
53468
|
+
return group.presets;
|
|
53469
|
+
},
|
|
53470
|
+
children: (preset) => createComponent(Button$1, {
|
|
53471
|
+
"class": "oasis-editor-image-crop-option",
|
|
53472
|
+
label: preset,
|
|
53473
|
+
"data-testid": `editor-toolbar-image-crop-${preset}`,
|
|
53474
|
+
onClick: () => apply("imageCropAspect", preset)
|
|
53475
|
+
})
|
|
53476
|
+
}), null);
|
|
53477
|
+
return _el$9;
|
|
53478
|
+
})()
|
|
53479
|
+
}));
|
|
53480
|
+
return _el$8;
|
|
53170
53481
|
}
|
|
53171
|
-
}),
|
|
53172
|
-
insert(_el$
|
|
53173
|
-
|
|
53174
|
-
|
|
53175
|
-
|
|
53176
|
-
|
|
53177
|
-
|
|
53178
|
-
|
|
53179
|
-
|
|
53180
|
-
|
|
53181
|
-
|
|
53182
|
-
|
|
53183
|
-
|
|
53184
|
-
|
|
53185
|
-
}
|
|
53186
|
-
|
|
53482
|
+
}), null);
|
|
53483
|
+
insert(_el$3, createComponent(CropMenuRow, {
|
|
53484
|
+
testId: "editor-toolbar-image-crop-fill",
|
|
53485
|
+
icon: "maximize",
|
|
53486
|
+
get label() {
|
|
53487
|
+
return t("image.cropFill");
|
|
53488
|
+
},
|
|
53489
|
+
onClick: () => apply("imageCropFill")
|
|
53490
|
+
}), null);
|
|
53491
|
+
insert(_el$3, createComponent(CropMenuRow, {
|
|
53492
|
+
testId: "editor-toolbar-image-crop-fit",
|
|
53493
|
+
icon: "minimize",
|
|
53494
|
+
get label() {
|
|
53495
|
+
return t("image.cropFit");
|
|
53496
|
+
},
|
|
53497
|
+
onClick: () => apply("imageCropFit")
|
|
53498
|
+
}), null);
|
|
53499
|
+
insert(_el$3, createComponent(CropMenuRow, {
|
|
53500
|
+
testId: "editor-toolbar-image-crop-reset",
|
|
53501
|
+
icon: "rotate-ccw",
|
|
53502
|
+
get label() {
|
|
53503
|
+
return t("image.cropReset");
|
|
53504
|
+
},
|
|
53505
|
+
onClick: () => apply("imageCropReset")
|
|
53506
|
+
}), null);
|
|
53187
53507
|
return _el$3;
|
|
53188
53508
|
})();
|
|
53189
53509
|
}
|