oasis-editor 0.0.19 → 0.0.20
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-xXfigQp4.js → OasisEditorApp-YuR1PFAE.js} +14 -4
- package/dist/i18n/locales/en.d.ts +13 -2
- package/dist/i18n/locales/pt-BR.d.ts +13 -2
- package/dist/{index-C7Ftk4dm.js → index-CBXD1ygJ.js} +437 -213
- 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/createEssentialsPlugin.d.ts +3 -4
- package/dist/ui/components/Toolbar/groups/MarginsGroup.d.ts +7 -0
- package/dist/ui/components/Toolbar/marginPresets.d.ts +34 -0
- package/package.json +1 -1
|
@@ -1568,8 +1568,19 @@ const en = {
|
|
|
1568
1568
|
"section.pageSetup": "Page Setup",
|
|
1569
1569
|
"section.toggleOrientation": "Toggle Orientation",
|
|
1570
1570
|
"section.margins": "Margins",
|
|
1571
|
-
"section.
|
|
1572
|
-
"section.
|
|
1571
|
+
"section.marginPreset.normal": "Normal",
|
|
1572
|
+
"section.marginPreset.narrow": "Narrow",
|
|
1573
|
+
"section.marginPreset.moderate": "Moderate",
|
|
1574
|
+
"section.marginPreset.wide": "Wide",
|
|
1575
|
+
"section.marginPreset.mirrored": "Mirrored",
|
|
1576
|
+
"section.marginPreset.custom": "Custom Margins…",
|
|
1577
|
+
"section.marginField.top": "Top:",
|
|
1578
|
+
"section.marginField.bottom": "Bottom:",
|
|
1579
|
+
"section.marginField.left": "Left:",
|
|
1580
|
+
"section.marginField.right": "Right:",
|
|
1581
|
+
"section.marginValue": "{0} cm",
|
|
1582
|
+
"section.marginApply": "Apply",
|
|
1583
|
+
"number.decimalSeparator": ".",
|
|
1573
1584
|
"section.secNext": "Sec Next",
|
|
1574
1585
|
"section.secNextTooltip": "Insert Section Break (Next Page)",
|
|
1575
1586
|
"section.secCont": "Sec Cont",
|
|
@@ -2013,8 +2024,19 @@ const ptBR = {
|
|
|
2013
2024
|
"section.pageSetup": "Configurações de Página",
|
|
2014
2025
|
"section.toggleOrientation": "Alternar Orientação",
|
|
2015
2026
|
"section.margins": "Margens",
|
|
2016
|
-
"section.
|
|
2017
|
-
"section.
|
|
2027
|
+
"section.marginPreset.normal": "Normal",
|
|
2028
|
+
"section.marginPreset.narrow": "Estreita",
|
|
2029
|
+
"section.marginPreset.moderate": "Moderada",
|
|
2030
|
+
"section.marginPreset.wide": "Larga",
|
|
2031
|
+
"section.marginPreset.mirrored": "Espelhada",
|
|
2032
|
+
"section.marginPreset.custom": "Margens Personalizadas…",
|
|
2033
|
+
"section.marginField.top": "Sup.:",
|
|
2034
|
+
"section.marginField.bottom": "Inf.:",
|
|
2035
|
+
"section.marginField.left": "Esq.:",
|
|
2036
|
+
"section.marginField.right": "Dir.:",
|
|
2037
|
+
"section.marginValue": "{0} cm",
|
|
2038
|
+
"section.marginApply": "Aplicar",
|
|
2039
|
+
"number.decimalSeparator": ",",
|
|
2018
2040
|
"section.secNext": "Próx Seç",
|
|
2019
2041
|
"section.secNextTooltip": "Inserir Quebra de Seção (Próxima Página)",
|
|
2020
2042
|
"section.secCont": "Seç Cont",
|
|
@@ -2320,14 +2342,14 @@ function t(key, params = []) {
|
|
|
2320
2342
|
return template2;
|
|
2321
2343
|
}
|
|
2322
2344
|
const oasisMarkBase64 = "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";
|
|
2323
|
-
var _tmpl$$
|
|
2345
|
+
var _tmpl$$S = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
2324
2346
|
const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
|
|
2325
2347
|
const MARK_ASPECT = 3 / 4;
|
|
2326
2348
|
function OasisBrandMark(props) {
|
|
2327
2349
|
const height = () => props.height ?? 64;
|
|
2328
2350
|
const width = () => Math.round(height() * MARK_ASPECT);
|
|
2329
2351
|
return (() => {
|
|
2330
|
-
var _el$ = _tmpl$$
|
|
2352
|
+
var _el$ = _tmpl$$S();
|
|
2331
2353
|
setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
|
|
2332
2354
|
setAttribute(_el$, "draggable", false);
|
|
2333
2355
|
createRenderEffect((_p$) => {
|
|
@@ -2344,7 +2366,7 @@ function OasisBrandMark(props) {
|
|
|
2344
2366
|
return _el$;
|
|
2345
2367
|
})();
|
|
2346
2368
|
}
|
|
2347
|
-
var _tmpl$$
|
|
2369
|
+
var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$y = /* @__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$m = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2348
2370
|
function OasisEditorLoading(props) {
|
|
2349
2371
|
const variant = () => props.variant ?? "overlay";
|
|
2350
2372
|
const pct = () => {
|
|
@@ -2353,7 +2375,7 @@ function OasisEditorLoading(props) {
|
|
|
2353
2375
|
};
|
|
2354
2376
|
const isDone = () => (pct() ?? 0) >= 100;
|
|
2355
2377
|
return (() => {
|
|
2356
|
-
var _el$ = _tmpl$2$
|
|
2378
|
+
var _el$ = _tmpl$2$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
|
|
2357
2379
|
insert(_el$2, createComponent(OasisBrandMark, {
|
|
2358
2380
|
height: 40,
|
|
2359
2381
|
"class": "oasis-editor-loading-mark"
|
|
@@ -2364,10 +2386,10 @@ function OasisEditorLoading(props) {
|
|
|
2364
2386
|
return pct() != null;
|
|
2365
2387
|
},
|
|
2366
2388
|
get children() {
|
|
2367
|
-
var _el$6 = _tmpl$$
|
|
2389
|
+
var _el$6 = _tmpl$$R();
|
|
2368
2390
|
insert(_el$6, (() => {
|
|
2369
2391
|
var _c$ = memo(() => !!isDone());
|
|
2370
|
-
return () => _c$() ? _tmpl$3$
|
|
2392
|
+
return () => _c$() ? _tmpl$3$m() : `${pct()}%`;
|
|
2371
2393
|
})());
|
|
2372
2394
|
return _el$6;
|
|
2373
2395
|
}
|
|
@@ -2416,7 +2438,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2416
2438
|
onCleanup(() => {
|
|
2417
2439
|
cancelled = true;
|
|
2418
2440
|
});
|
|
2419
|
-
import("./OasisEditorApp-
|
|
2441
|
+
import("./OasisEditorApp-YuR1PFAE.js").then((m) => {
|
|
2420
2442
|
cancelled = true;
|
|
2421
2443
|
setProgress(1);
|
|
2422
2444
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -4489,9 +4511,9 @@ class MenuRegistry {
|
|
|
4489
4511
|
}
|
|
4490
4512
|
}
|
|
4491
4513
|
const defaultMenuRegistry = new MenuRegistry();
|
|
4492
|
-
var _tmpl$$
|
|
4493
|
-
const FootnoteIcon = () => _tmpl$$
|
|
4494
|
-
const SpecialIndentFirstLineIcon = () => _tmpl$2$
|
|
4514
|
+
var _tmpl$$Q = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$x = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"aria-hidden=true><g fill=currentColor><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>`), _tmpl$3$l = /* @__PURE__ */ template(`<i>`);
|
|
4515
|
+
const FootnoteIcon = () => _tmpl$$Q();
|
|
4516
|
+
const SpecialIndentFirstLineIcon = () => _tmpl$2$x();
|
|
4495
4517
|
const CUSTOM_ICONS = {
|
|
4496
4518
|
footnote: FootnoteIcon,
|
|
4497
4519
|
specialIndentFirstLine: SpecialIndentFirstLineIcon
|
|
@@ -4506,7 +4528,7 @@ function ToolIcon(props) {
|
|
|
4506
4528
|
},
|
|
4507
4529
|
get fallback() {
|
|
4508
4530
|
return (() => {
|
|
4509
|
-
var _el$3 = _tmpl$3$
|
|
4531
|
+
var _el$3 = _tmpl$3$l();
|
|
4510
4532
|
createRenderEffect(() => setAttribute(_el$3, "data-lucide", props.name));
|
|
4511
4533
|
return _el$3;
|
|
4512
4534
|
})();
|
|
@@ -4856,7 +4878,7 @@ const defaultMenuItems = [
|
|
|
4856
4878
|
}
|
|
4857
4879
|
];
|
|
4858
4880
|
defaultMenuItems.forEach((item) => defaultMenuRegistry.register(item));
|
|
4859
|
-
var _tmpl$$
|
|
4881
|
+
var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$f = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$e = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$7 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
|
|
4860
4882
|
function Menubar(props) {
|
|
4861
4883
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
4862
4884
|
const menuItems = () => (props.registry ?? defaultMenuRegistry).getItems();
|
|
@@ -4923,13 +4945,13 @@ function Menubar(props) {
|
|
|
4923
4945
|
});
|
|
4924
4946
|
const topLevelItems = () => pruneTree(menuTree());
|
|
4925
4947
|
return (() => {
|
|
4926
|
-
var _el$ = _tmpl$$
|
|
4948
|
+
var _el$ = _tmpl$$P();
|
|
4927
4949
|
insert(_el$, createComponent(For, {
|
|
4928
4950
|
get each() {
|
|
4929
4951
|
return topLevelItems();
|
|
4930
4952
|
},
|
|
4931
4953
|
children: (topLevel) => (() => {
|
|
4932
|
-
var _el$2 = _tmpl$3$
|
|
4954
|
+
var _el$2 = _tmpl$3$k(), _el$3 = _el$2.firstChild;
|
|
4933
4955
|
_el$2.addEventListener("mouseenter", () => {
|
|
4934
4956
|
if (activeMenu() && activeMenu() !== topLevel.id) {
|
|
4935
4957
|
setActiveMenu(topLevel.id);
|
|
@@ -4949,7 +4971,7 @@ function Menubar(props) {
|
|
|
4949
4971
|
return activeMenu() === topLevel.id;
|
|
4950
4972
|
},
|
|
4951
4973
|
get children() {
|
|
4952
|
-
var _el$4 = _tmpl$2$
|
|
4974
|
+
var _el$4 = _tmpl$2$w();
|
|
4953
4975
|
insert(_el$4, createComponent(For, {
|
|
4954
4976
|
get each() {
|
|
4955
4977
|
return topLevel.children;
|
|
@@ -4988,7 +5010,7 @@ function MenuNode(props) {
|
|
|
4988
5010
|
} = props;
|
|
4989
5011
|
const isSeparator = (_a = node.item) == null ? void 0 : _a.separator;
|
|
4990
5012
|
if (isSeparator) {
|
|
4991
|
-
return _tmpl$4$
|
|
5013
|
+
return _tmpl$4$f();
|
|
4992
5014
|
}
|
|
4993
5015
|
const hasChildren = node.children.length > 0;
|
|
4994
5016
|
const [showSub, setShowSub] = createSignal(false);
|
|
@@ -5023,7 +5045,7 @@ function MenuNode(props) {
|
|
|
5023
5045
|
return icon();
|
|
5024
5046
|
},
|
|
5025
5047
|
get children() {
|
|
5026
|
-
var _el$8 = _tmpl$5$
|
|
5048
|
+
var _el$8 = _tmpl$5$e();
|
|
5027
5049
|
insert(_el$8, createComponent(ToolIcon, {
|
|
5028
5050
|
get name() {
|
|
5029
5051
|
return icon();
|
|
@@ -5039,7 +5061,7 @@ function MenuNode(props) {
|
|
|
5039
5061
|
return (_a2 = node.item) == null ? void 0 : _a2.shortcut;
|
|
5040
5062
|
},
|
|
5041
5063
|
get children() {
|
|
5042
|
-
var _el$0 = _tmpl$6$
|
|
5064
|
+
var _el$0 = _tmpl$6$7();
|
|
5043
5065
|
insert(_el$0, () => node.item.shortcut);
|
|
5044
5066
|
return _el$0;
|
|
5045
5067
|
}
|
|
@@ -5076,10 +5098,10 @@ function MenuNode(props) {
|
|
|
5076
5098
|
})();
|
|
5077
5099
|
}
|
|
5078
5100
|
delegateEvents(["click"]);
|
|
5079
|
-
var _tmpl$$
|
|
5101
|
+
var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
|
|
5080
5102
|
function TitleBar(props) {
|
|
5081
5103
|
return (() => {
|
|
5082
|
-
var _el$ = _tmpl$$
|
|
5104
|
+
var _el$ = _tmpl$$O(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
5083
5105
|
insert(_el$3, () => props.children);
|
|
5084
5106
|
return _el$;
|
|
5085
5107
|
})();
|
|
@@ -17138,7 +17160,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
17138
17160
|
);
|
|
17139
17161
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
17140
17162
|
}
|
|
17141
|
-
var _tmpl$$
|
|
17163
|
+
var _tmpl$$N = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
17142
17164
|
function OutlinePanel(props) {
|
|
17143
17165
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
17144
17166
|
const [items, setItems] = createSignal([]);
|
|
@@ -17206,13 +17228,13 @@ function OutlinePanel(props) {
|
|
|
17206
17228
|
}
|
|
17207
17229
|
});
|
|
17208
17230
|
return (() => {
|
|
17209
|
-
var _el$ = _tmpl$3$
|
|
17231
|
+
var _el$ = _tmpl$3$j(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
|
|
17210
17232
|
insert(_el$2, createComponent(Show, {
|
|
17211
17233
|
get when() {
|
|
17212
17234
|
return !collapsed();
|
|
17213
17235
|
},
|
|
17214
17236
|
get children() {
|
|
17215
|
-
var _el$3 = _tmpl$$
|
|
17237
|
+
var _el$3 = _tmpl$$N();
|
|
17216
17238
|
insert(_el$3, () => t("menu.view.outline") || "Outline");
|
|
17217
17239
|
return _el$3;
|
|
17218
17240
|
}
|
|
@@ -17223,14 +17245,14 @@ function OutlinePanel(props) {
|
|
|
17223
17245
|
return !collapsed();
|
|
17224
17246
|
},
|
|
17225
17247
|
get children() {
|
|
17226
|
-
var _el$6 = _tmpl$2$
|
|
17248
|
+
var _el$6 = _tmpl$2$v();
|
|
17227
17249
|
insert(_el$6, createComponent(Show, {
|
|
17228
17250
|
get when() {
|
|
17229
17251
|
return items().length > 0;
|
|
17230
17252
|
},
|
|
17231
17253
|
get fallback() {
|
|
17232
17254
|
return (() => {
|
|
17233
|
-
var _el$7 = _tmpl$4$
|
|
17255
|
+
var _el$7 = _tmpl$4$e();
|
|
17234
17256
|
insert(_el$7, () => t("outline.empty"));
|
|
17235
17257
|
return _el$7;
|
|
17236
17258
|
})();
|
|
@@ -17241,7 +17263,7 @@ function OutlinePanel(props) {
|
|
|
17241
17263
|
return items();
|
|
17242
17264
|
},
|
|
17243
17265
|
children: (item) => (() => {
|
|
17244
|
-
var _el$8 = _tmpl$5$
|
|
17266
|
+
var _el$8 = _tmpl$5$d();
|
|
17245
17267
|
_el$8.$$click = () => props.onNavigate(item.anchor);
|
|
17246
17268
|
insert(_el$8, () => item.text);
|
|
17247
17269
|
createRenderEffect((_p$) => {
|
|
@@ -17280,7 +17302,7 @@ function OutlinePanel(props) {
|
|
|
17280
17302
|
})();
|
|
17281
17303
|
}
|
|
17282
17304
|
delegateEvents(["click"]);
|
|
17283
|
-
var _tmpl$$
|
|
17305
|
+
var _tmpl$$M = /* @__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$u = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
17284
17306
|
function ToolbarOverflowManager(props) {
|
|
17285
17307
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
17286
17308
|
const [menuOpen, setMenuOpen] = createSignal(false);
|
|
@@ -17423,7 +17445,7 @@ function ToolbarOverflowManager(props) {
|
|
|
17423
17445
|
};
|
|
17424
17446
|
};
|
|
17425
17447
|
return (() => {
|
|
17426
|
-
var _el$ = _tmpl$$
|
|
17448
|
+
var _el$ = _tmpl$$M(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
17427
17449
|
var _ref$ = containerRef;
|
|
17428
17450
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
17429
17451
|
var _ref$2 = moreMeasureRef;
|
|
@@ -17435,7 +17457,7 @@ function ToolbarOverflowManager(props) {
|
|
|
17435
17457
|
return items();
|
|
17436
17458
|
},
|
|
17437
17459
|
children: (item) => (() => {
|
|
17438
|
-
var _el$7 = _tmpl$2$
|
|
17460
|
+
var _el$7 = _tmpl$2$u();
|
|
17439
17461
|
insert(_el$7, item);
|
|
17440
17462
|
return _el$7;
|
|
17441
17463
|
})()
|
|
@@ -17511,12 +17533,12 @@ function resolveLabel(item, api) {
|
|
|
17511
17533
|
if (item.labelKey) return api.t(item.labelKey);
|
|
17512
17534
|
return void 0;
|
|
17513
17535
|
}
|
|
17514
|
-
var _tmpl$$
|
|
17536
|
+
var _tmpl$$L = /* @__PURE__ */ template(`<span>`), _tmpl$2$t = /* @__PURE__ */ template(`<button type=button>`);
|
|
17515
17537
|
function Button$1(props) {
|
|
17516
17538
|
const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "aria-label", "class", "classList"]);
|
|
17517
17539
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
17518
17540
|
return (() => {
|
|
17519
|
-
var _el$ = _tmpl$2$
|
|
17541
|
+
var _el$ = _tmpl$2$t();
|
|
17520
17542
|
spread(_el$, mergeProps({
|
|
17521
17543
|
get ["class"]() {
|
|
17522
17544
|
return `oasis-editor-tool-button ${local.class || ""}`;
|
|
@@ -17552,7 +17574,7 @@ function Button$1(props) {
|
|
|
17552
17574
|
return local.label;
|
|
17553
17575
|
},
|
|
17554
17576
|
get children() {
|
|
17555
|
-
var _el$2 = _tmpl$$
|
|
17577
|
+
var _el$2 = _tmpl$$L();
|
|
17556
17578
|
insert(_el$2, () => local.label);
|
|
17557
17579
|
return _el$2;
|
|
17558
17580
|
}
|
|
@@ -17634,7 +17656,7 @@ function useDismiss(options) {
|
|
|
17634
17656
|
});
|
|
17635
17657
|
});
|
|
17636
17658
|
}
|
|
17637
|
-
var _tmpl$$
|
|
17659
|
+
var _tmpl$$K = /* @__PURE__ */ template(`<div>`);
|
|
17638
17660
|
function Popover(props) {
|
|
17639
17661
|
let anchorRef;
|
|
17640
17662
|
let panelRef;
|
|
@@ -17651,7 +17673,7 @@ function Popover(props) {
|
|
|
17651
17673
|
closeOnEscape: props.closeOnEscape
|
|
17652
17674
|
});
|
|
17653
17675
|
const panel = (portalled) => (() => {
|
|
17654
|
-
var _el$ = _tmpl$$
|
|
17676
|
+
var _el$ = _tmpl$$K();
|
|
17655
17677
|
addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
|
|
17656
17678
|
var _ref$ = panelRef;
|
|
17657
17679
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
@@ -17703,12 +17725,12 @@ function Popover(props) {
|
|
|
17703
17725
|
}
|
|
17704
17726
|
})];
|
|
17705
17727
|
}
|
|
17706
|
-
var _tmpl$$
|
|
17728
|
+
var _tmpl$$J = /* @__PURE__ */ template(`<div>`), _tmpl$2$s = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$i = /* @__PURE__ */ template(`<i>`), _tmpl$4$d = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$c = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$6 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
|
|
17707
17729
|
function Menu(props) {
|
|
17708
17730
|
const [open, setOpen] = createSignal(false);
|
|
17709
17731
|
const ariaLabel = () => props.tooltip || props.label || "";
|
|
17710
17732
|
return (() => {
|
|
17711
|
-
var _el$ = _tmpl$2$
|
|
17733
|
+
var _el$ = _tmpl$2$s();
|
|
17712
17734
|
insert(_el$, createComponent(Popover, {
|
|
17713
17735
|
get open() {
|
|
17714
17736
|
return open();
|
|
@@ -17723,7 +17745,7 @@ function Menu(props) {
|
|
|
17723
17745
|
},
|
|
17724
17746
|
onPanelMouseLeave: void 0,
|
|
17725
17747
|
trigger: (api) => (() => {
|
|
17726
|
-
var _el$3 = _tmpl$6$
|
|
17748
|
+
var _el$3 = _tmpl$6$6();
|
|
17727
17749
|
_el$3.$$click = () => api.toggle();
|
|
17728
17750
|
use((el) => api.ref(el), _el$3);
|
|
17729
17751
|
insert(_el$3, createComponent(Show, {
|
|
@@ -17731,7 +17753,7 @@ function Menu(props) {
|
|
|
17731
17753
|
return props.icon;
|
|
17732
17754
|
},
|
|
17733
17755
|
get children() {
|
|
17734
|
-
var _el$4 = _tmpl$3$
|
|
17756
|
+
var _el$4 = _tmpl$3$i();
|
|
17735
17757
|
createRenderEffect(() => setAttribute(_el$4, "data-lucide", props.icon));
|
|
17736
17758
|
return _el$4;
|
|
17737
17759
|
}
|
|
@@ -17741,7 +17763,7 @@ function Menu(props) {
|
|
|
17741
17763
|
return props.label;
|
|
17742
17764
|
},
|
|
17743
17765
|
get children() {
|
|
17744
|
-
var _el$5 = _tmpl$4$
|
|
17766
|
+
var _el$5 = _tmpl$4$d();
|
|
17745
17767
|
insert(_el$5, () => props.label);
|
|
17746
17768
|
return _el$5;
|
|
17747
17769
|
}
|
|
@@ -17751,7 +17773,7 @@ function Menu(props) {
|
|
|
17751
17773
|
return !props.hideChevron;
|
|
17752
17774
|
},
|
|
17753
17775
|
get children() {
|
|
17754
|
-
return _tmpl$5$
|
|
17776
|
+
return _tmpl$5$c();
|
|
17755
17777
|
}
|
|
17756
17778
|
}), null);
|
|
17757
17779
|
createRenderEffect((_p$) => {
|
|
@@ -17774,7 +17796,7 @@ function Menu(props) {
|
|
|
17774
17796
|
return _el$3;
|
|
17775
17797
|
})(),
|
|
17776
17798
|
get children() {
|
|
17777
|
-
var _el$2 = _tmpl$$
|
|
17799
|
+
var _el$2 = _tmpl$$J();
|
|
17778
17800
|
_el$2.$$click = (event) => {
|
|
17779
17801
|
const el = event.target;
|
|
17780
17802
|
if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
|
|
@@ -17789,7 +17811,7 @@ function Menu(props) {
|
|
|
17789
17811
|
})();
|
|
17790
17812
|
}
|
|
17791
17813
|
delegateEvents(["click"]);
|
|
17792
|
-
var _tmpl$$
|
|
17814
|
+
var _tmpl$$I = /* @__PURE__ */ template(`<select>`);
|
|
17793
17815
|
function Select(props) {
|
|
17794
17816
|
let selectRef;
|
|
17795
17817
|
const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value"]);
|
|
@@ -17805,7 +17827,7 @@ function Select(props) {
|
|
|
17805
17827
|
}
|
|
17806
17828
|
});
|
|
17807
17829
|
return (() => {
|
|
17808
|
-
var _el$ = _tmpl$$
|
|
17830
|
+
var _el$ = _tmpl$$I();
|
|
17809
17831
|
var _ref$ = selectRef;
|
|
17810
17832
|
typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
|
|
17811
17833
|
spread(_el$, mergeProps({
|
|
@@ -17832,15 +17854,15 @@ function Select(props) {
|
|
|
17832
17854
|
return _el$;
|
|
17833
17855
|
})();
|
|
17834
17856
|
}
|
|
17835
|
-
var _tmpl$$
|
|
17857
|
+
var _tmpl$$H = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
|
|
17836
17858
|
function Separator(props) {
|
|
17837
17859
|
return (() => {
|
|
17838
|
-
var _el$ = _tmpl$$
|
|
17860
|
+
var _el$ = _tmpl$$H();
|
|
17839
17861
|
createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
|
|
17840
17862
|
return _el$;
|
|
17841
17863
|
})();
|
|
17842
17864
|
}
|
|
17843
|
-
var _tmpl$$
|
|
17865
|
+
var _tmpl$$G = /* @__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><i data-lucide=chevron-down>`);
|
|
17844
17866
|
function SplitButton(props) {
|
|
17845
17867
|
return createComponent(Popover, {
|
|
17846
17868
|
get open() {
|
|
@@ -17859,7 +17881,7 @@ function SplitButton(props) {
|
|
|
17859
17881
|
return props.onPanelMouseLeave;
|
|
17860
17882
|
},
|
|
17861
17883
|
trigger: (api) => (() => {
|
|
17862
|
-
var _el$ = _tmpl$$
|
|
17884
|
+
var _el$ = _tmpl$$G(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
17863
17885
|
use((el) => api.ref(el), _el$);
|
|
17864
17886
|
_el$2.$$click = () => props.onMain();
|
|
17865
17887
|
insert(_el$2, () => props.mainContent);
|
|
@@ -17897,7 +17919,7 @@ function SplitButton(props) {
|
|
|
17897
17919
|
});
|
|
17898
17920
|
}
|
|
17899
17921
|
delegateEvents(["click"]);
|
|
17900
|
-
var _tmpl$$
|
|
17922
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$r = /* @__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$h = /* @__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$4$c = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-standard-grid>`), _tmpl$5$b = /* @__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$6$5 = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$8$1 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$0 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
|
|
17901
17923
|
const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
|
|
17902
17924
|
function ColorPicker(props) {
|
|
17903
17925
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -17962,7 +17984,7 @@ function ColorPicker(props) {
|
|
|
17962
17984
|
return clearLabel();
|
|
17963
17985
|
},
|
|
17964
17986
|
get children() {
|
|
17965
|
-
var _el$ = _tmpl$2$
|
|
17987
|
+
var _el$ = _tmpl$2$r(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
|
|
17966
17988
|
_el$.$$click = () => applyColor(null);
|
|
17967
17989
|
insert(_el$2, createComponent(Show, {
|
|
17968
17990
|
get when() {
|
|
@@ -17972,7 +17994,7 @@ function ColorPicker(props) {
|
|
|
17972
17994
|
return _tmpl$8$1();
|
|
17973
17995
|
},
|
|
17974
17996
|
get children() {
|
|
17975
|
-
return _tmpl$$
|
|
17997
|
+
return _tmpl$$F();
|
|
17976
17998
|
}
|
|
17977
17999
|
}));
|
|
17978
18000
|
insert(_el$4, clearLabel);
|
|
@@ -17980,7 +18002,7 @@ function ColorPicker(props) {
|
|
|
17980
18002
|
return _el$;
|
|
17981
18003
|
}
|
|
17982
18004
|
}), (() => {
|
|
17983
|
-
var _el$5 = _tmpl$3$
|
|
18005
|
+
var _el$5 = _tmpl$3$h(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
17984
18006
|
insert(_el$6, () => props.themeColorsLabel);
|
|
17985
18007
|
insert(_el$7, createComponent(For, {
|
|
17986
18008
|
get each() {
|
|
@@ -18020,7 +18042,7 @@ function ColorPicker(props) {
|
|
|
18020
18042
|
}));
|
|
18021
18043
|
return _el$5;
|
|
18022
18044
|
})(), (() => {
|
|
18023
|
-
var _el$8 = _tmpl$4$
|
|
18045
|
+
var _el$8 = _tmpl$4$c(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
18024
18046
|
insert(_el$9, () => props.standardColorsLabel);
|
|
18025
18047
|
insert(_el$0, createComponent(For, {
|
|
18026
18048
|
get each() {
|
|
@@ -18057,13 +18079,13 @@ function ColorPicker(props) {
|
|
|
18057
18079
|
},
|
|
18058
18080
|
get children() {
|
|
18059
18081
|
return [(() => {
|
|
18060
|
-
var _el$1 = _tmpl$5$
|
|
18082
|
+
var _el$1 = _tmpl$5$b(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
18061
18083
|
_el$1.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
|
|
18062
18084
|
insert(_el$11, () => props.moreColorsLabel);
|
|
18063
18085
|
createRenderEffect(() => setAttribute(_el$1, "data-testid", `${props.testId}-more-colors`));
|
|
18064
18086
|
return _el$1;
|
|
18065
18087
|
})(), (() => {
|
|
18066
|
-
var _el$12 = _tmpl$6$
|
|
18088
|
+
var _el$12 = _tmpl$6$5();
|
|
18067
18089
|
_el$12.$$input = (event) => applyColor(event.currentTarget.value);
|
|
18068
18090
|
var _ref$ = customColorInputRef;
|
|
18069
18091
|
typeof _ref$ === "function" ? use(_ref$, _el$12) : customColorInputRef = _el$12;
|
|
@@ -18085,7 +18107,7 @@ function ColorPicker(props) {
|
|
|
18085
18107
|
});
|
|
18086
18108
|
}
|
|
18087
18109
|
delegateEvents(["click", "input"]);
|
|
18088
|
-
var _tmpl$$
|
|
18110
|
+
var _tmpl$$E = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$q = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$a = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
|
|
18089
18111
|
function GridPicker(props) {
|
|
18090
18112
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
18091
18113
|
const [hover, setHover] = createSignal({
|
|
@@ -18159,7 +18181,7 @@ function GridPicker(props) {
|
|
|
18159
18181
|
return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
|
|
18160
18182
|
};
|
|
18161
18183
|
return (() => {
|
|
18162
|
-
var _el$ = _tmpl$3$
|
|
18184
|
+
var _el$ = _tmpl$3$g();
|
|
18163
18185
|
insert(_el$, createComponent(Popover, {
|
|
18164
18186
|
get open() {
|
|
18165
18187
|
return isOpen();
|
|
@@ -18171,7 +18193,7 @@ function GridPicker(props) {
|
|
|
18171
18193
|
col: 0
|
|
18172
18194
|
}),
|
|
18173
18195
|
trigger: (api) => (() => {
|
|
18174
|
-
var _el$4 = _tmpl$4$
|
|
18196
|
+
var _el$4 = _tmpl$4$b(), _el$5 = _el$4.firstChild;
|
|
18175
18197
|
_el$4.$$click = () => api.toggle();
|
|
18176
18198
|
use((el) => api.ref(el), _el$4);
|
|
18177
18199
|
createRenderEffect((_p$) => {
|
|
@@ -18193,11 +18215,11 @@ function GridPicker(props) {
|
|
|
18193
18215
|
})(),
|
|
18194
18216
|
get children() {
|
|
18195
18217
|
return [(() => {
|
|
18196
|
-
var _el$2 = _tmpl$$
|
|
18218
|
+
var _el$2 = _tmpl$$E();
|
|
18197
18219
|
insert(_el$2, statusLabel);
|
|
18198
18220
|
return _el$2;
|
|
18199
18221
|
})(), (() => {
|
|
18200
|
-
var _el$3 = _tmpl$2$
|
|
18222
|
+
var _el$3 = _tmpl$2$q();
|
|
18201
18223
|
insert(_el$3, createComponent(For, {
|
|
18202
18224
|
get each() {
|
|
18203
18225
|
return rows();
|
|
@@ -18207,7 +18229,7 @@ function GridPicker(props) {
|
|
|
18207
18229
|
return cols();
|
|
18208
18230
|
},
|
|
18209
18231
|
children: (c) => (() => {
|
|
18210
|
-
var _el$6 = _tmpl$5$
|
|
18232
|
+
var _el$6 = _tmpl$5$a();
|
|
18211
18233
|
_el$6.$$click = () => selectGridSize(r, c);
|
|
18212
18234
|
_el$6.$$mousedown = (event) => event.preventDefault();
|
|
18213
18235
|
_el$6.addEventListener("mouseenter", () => setHover({
|
|
@@ -18297,7 +18319,7 @@ const DEFAULT_PALETTE = {
|
|
|
18297
18319
|
standardColors: STANDARD_COLORS,
|
|
18298
18320
|
allowCustom: true
|
|
18299
18321
|
};
|
|
18300
|
-
var _tmpl$$
|
|
18322
|
+
var _tmpl$$D = /* @__PURE__ */ template(`<option value>`), _tmpl$2$p = /* @__PURE__ */ template(`<option>`);
|
|
18301
18323
|
function renderMenuContent(content, api) {
|
|
18302
18324
|
if (content.kind === "custom") {
|
|
18303
18325
|
return content.render(api);
|
|
@@ -18470,7 +18492,7 @@ function RenderSelect(props) {
|
|
|
18470
18492
|
return props.item.placeholder !== void 0;
|
|
18471
18493
|
},
|
|
18472
18494
|
get children() {
|
|
18473
|
-
var _el$ = _tmpl$$
|
|
18495
|
+
var _el$ = _tmpl$$D();
|
|
18474
18496
|
insert(_el$, () => props.item.placeholder);
|
|
18475
18497
|
return _el$;
|
|
18476
18498
|
}
|
|
@@ -18479,7 +18501,7 @@ function RenderSelect(props) {
|
|
|
18479
18501
|
return props.item.options(props.api);
|
|
18480
18502
|
},
|
|
18481
18503
|
children: (option) => (() => {
|
|
18482
|
-
var _el$2 = _tmpl$2$
|
|
18504
|
+
var _el$2 = _tmpl$2$p();
|
|
18483
18505
|
insert(_el$2, () => option.label);
|
|
18484
18506
|
createRenderEffect(() => _el$2.value = option.value);
|
|
18485
18507
|
return _el$2;
|
|
@@ -18602,12 +18624,12 @@ function registerToolbarRenderer(type, component) {
|
|
|
18602
18624
|
function resolveRenderer(type) {
|
|
18603
18625
|
return TOOLBAR_RENDERERS[type] ?? customRenderers.get(type);
|
|
18604
18626
|
}
|
|
18605
|
-
var _tmpl$$
|
|
18627
|
+
var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
18606
18628
|
function ToolbarItemRenderer(props) {
|
|
18607
18629
|
const binding = bindItem(props.item, props.api);
|
|
18608
18630
|
const component = () => resolveRenderer(props.item.type);
|
|
18609
18631
|
return (() => {
|
|
18610
|
-
var _el$ = _tmpl$$
|
|
18632
|
+
var _el$ = _tmpl$$C();
|
|
18611
18633
|
insert(_el$, createComponent(Show, {
|
|
18612
18634
|
get when() {
|
|
18613
18635
|
return component();
|
|
@@ -18748,7 +18770,7 @@ function buildRibbonGroups(items, tab) {
|
|
|
18748
18770
|
});
|
|
18749
18771
|
return Array.from(groups.values()).sort((a, b) => a.order - b.order);
|
|
18750
18772
|
}
|
|
18751
|
-
var _tmpl$$
|
|
18773
|
+
var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$o = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
|
|
18752
18774
|
function RibbonTabs(props) {
|
|
18753
18775
|
const tabs = RIBBON_TAB_DEFINITIONS;
|
|
18754
18776
|
const moveTab = (current, delta) => {
|
|
@@ -18757,11 +18779,11 @@ function RibbonTabs(props) {
|
|
|
18757
18779
|
if (next) props.setActiveTab(next.id);
|
|
18758
18780
|
};
|
|
18759
18781
|
return (() => {
|
|
18760
|
-
var _el$ = _tmpl$$
|
|
18782
|
+
var _el$ = _tmpl$$B();
|
|
18761
18783
|
insert(_el$, createComponent(For, {
|
|
18762
18784
|
each: tabs,
|
|
18763
18785
|
children: (tab) => (() => {
|
|
18764
|
-
var _el$2 = _tmpl$2$
|
|
18786
|
+
var _el$2 = _tmpl$2$o();
|
|
18765
18787
|
_el$2.$$keydown = (event) => {
|
|
18766
18788
|
if (event.key === "ArrowRight") {
|
|
18767
18789
|
event.preventDefault();
|
|
@@ -18803,10 +18825,10 @@ function RibbonTabs(props) {
|
|
|
18803
18825
|
})();
|
|
18804
18826
|
}
|
|
18805
18827
|
delegateEvents(["click", "keydown"]);
|
|
18806
|
-
var _tmpl$$
|
|
18828
|
+
var _tmpl$$A = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
|
|
18807
18829
|
function RibbonRow(props) {
|
|
18808
18830
|
return (() => {
|
|
18809
|
-
var _el$ = _tmpl$$
|
|
18831
|
+
var _el$ = _tmpl$$A();
|
|
18810
18832
|
insert(_el$, createComponent(For, {
|
|
18811
18833
|
get each() {
|
|
18812
18834
|
return props.items;
|
|
@@ -18821,10 +18843,10 @@ function RibbonRow(props) {
|
|
|
18821
18843
|
return _el$;
|
|
18822
18844
|
})();
|
|
18823
18845
|
}
|
|
18824
|
-
var _tmpl$$
|
|
18846
|
+
var _tmpl$$z = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group><div class=oasis-editor-ribbon-group-rows></div><div class=oasis-editor-ribbon-group-label>`);
|
|
18825
18847
|
function RibbonGroup(props) {
|
|
18826
18848
|
return (() => {
|
|
18827
|
-
var _el$ = _tmpl$$
|
|
18849
|
+
var _el$ = _tmpl$$z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
18828
18850
|
insert(_el$2, createComponent(RibbonRow, {
|
|
18829
18851
|
get items() {
|
|
18830
18852
|
return props.group.rows[1];
|
|
@@ -18854,11 +18876,11 @@ function RibbonGroup(props) {
|
|
|
18854
18876
|
return _el$;
|
|
18855
18877
|
})();
|
|
18856
18878
|
}
|
|
18857
|
-
var _tmpl$$
|
|
18879
|
+
var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
|
|
18858
18880
|
function RibbonPanel(props) {
|
|
18859
18881
|
const groups = () => buildRibbonGroups(props.items(), props.activeTab());
|
|
18860
18882
|
return (() => {
|
|
18861
|
-
var _el$ = _tmpl$$
|
|
18883
|
+
var _el$ = _tmpl$$y();
|
|
18862
18884
|
insert(_el$, createComponent(For, {
|
|
18863
18885
|
get each() {
|
|
18864
18886
|
return groups();
|
|
@@ -18882,7 +18904,7 @@ function RibbonPanel(props) {
|
|
|
18882
18904
|
return _el$;
|
|
18883
18905
|
})();
|
|
18884
18906
|
}
|
|
18885
|
-
var _tmpl$$
|
|
18907
|
+
var _tmpl$$x = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
|
|
18886
18908
|
const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
|
|
18887
18909
|
function Toolbar(props) {
|
|
18888
18910
|
const api = createToolbarApi(props.host);
|
|
@@ -18912,7 +18934,7 @@ function Toolbar(props) {
|
|
|
18912
18934
|
})
|
|
18913
18935
|
});
|
|
18914
18936
|
return (() => {
|
|
18915
|
-
var _el$ = _tmpl$$
|
|
18937
|
+
var _el$ = _tmpl$$x();
|
|
18916
18938
|
_el$.$$mousedown = (event) => {
|
|
18917
18939
|
if (shouldAllowNativeMouseDown(event.target)) {
|
|
18918
18940
|
return;
|
|
@@ -18933,7 +18955,7 @@ function Toolbar(props) {
|
|
|
18933
18955
|
return renderItems();
|
|
18934
18956
|
}
|
|
18935
18957
|
}) : (() => {
|
|
18936
|
-
var _el$2 = _tmpl$2$
|
|
18958
|
+
var _el$2 = _tmpl$2$n();
|
|
18937
18959
|
insert(_el$2, renderItems);
|
|
18938
18960
|
return _el$2;
|
|
18939
18961
|
})();
|
|
@@ -19262,10 +19284,10 @@ function createLayoutIdentityStabilizer() {
|
|
|
19262
19284
|
return { pages };
|
|
19263
19285
|
};
|
|
19264
19286
|
}
|
|
19265
|
-
var _tmpl$$
|
|
19287
|
+
var _tmpl$$w = /* @__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">`);
|
|
19266
19288
|
function PageBreak(props) {
|
|
19267
19289
|
return (() => {
|
|
19268
|
-
var _el$ = _tmpl$$
|
|
19290
|
+
var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
19269
19291
|
insert(_el$3, () => t("metric.pageBreak") || "Page Break");
|
|
19270
19292
|
return _el$;
|
|
19271
19293
|
})();
|
|
@@ -19782,7 +19804,7 @@ function createCanvasPageRenderer(options) {
|
|
|
19782
19804
|
}
|
|
19783
19805
|
};
|
|
19784
19806
|
}
|
|
19785
|
-
var _tmpl$$
|
|
19807
|
+
var _tmpl$$v = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$m = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`);
|
|
19786
19808
|
const canvasTextMeasurer = {
|
|
19787
19809
|
composeMeasuredParagraphLines: (options) => domTextMeasurer.composeMeasuredParagraphLines(options),
|
|
19788
19810
|
resolveRenderedLineHeightPx: (styles, lineHeightMultiple) => domTextMeasurer.resolveRenderedLineHeightPx(styles, lineHeightMultiple)
|
|
@@ -19851,7 +19873,7 @@ function CanvasEditorSurface(props) {
|
|
|
19851
19873
|
return layout;
|
|
19852
19874
|
});
|
|
19853
19875
|
return (() => {
|
|
19854
|
-
var _el$ = _tmpl$$
|
|
19876
|
+
var _el$ = _tmpl$$v();
|
|
19855
19877
|
insert(_el$, createComponent(Index, {
|
|
19856
19878
|
get each() {
|
|
19857
19879
|
return documentLayout().pages;
|
|
@@ -19863,7 +19885,7 @@ function CanvasEditorSurface(props) {
|
|
|
19863
19885
|
// inserting an image that triggers re-pagination in a narrow viewport),
|
|
19864
19886
|
// causing "Failed to execute 'insertBefore'" errors.
|
|
19865
19887
|
(() => {
|
|
19866
|
-
var _el$2 = _tmpl$2$
|
|
19888
|
+
var _el$2 = _tmpl$2$m();
|
|
19867
19889
|
insert(_el$2, createComponent(Show, {
|
|
19868
19890
|
when: index > 0,
|
|
19869
19891
|
get children() {
|
|
@@ -19936,7 +19958,7 @@ function CanvasPage(props) {
|
|
|
19936
19958
|
});
|
|
19937
19959
|
onCleanup(() => renderer.dispose());
|
|
19938
19960
|
return (() => {
|
|
19939
|
-
var _el$3 = _tmpl$3$
|
|
19961
|
+
var _el$3 = _tmpl$3$f(), _el$4 = _el$3.firstChild;
|
|
19940
19962
|
addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
|
|
19941
19963
|
addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
|
|
19942
19964
|
addEventListener(_el$3, "click", props.onSurfaceClick, true);
|
|
@@ -20274,7 +20296,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
|
|
|
20274
20296
|
pushSide(-1);
|
|
20275
20297
|
return ticks;
|
|
20276
20298
|
}
|
|
20277
|
-
var _tmpl$$
|
|
20299
|
+
var _tmpl$$u = /* @__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$l = /* @__PURE__ */ template(`<div>`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
|
|
20278
20300
|
function getActivePageSettings(state) {
|
|
20279
20301
|
var _a;
|
|
20280
20302
|
const idx = getActiveSectionIndex(state);
|
|
@@ -20477,7 +20499,7 @@ function HorizontalRuler(props) {
|
|
|
20477
20499
|
}
|
|
20478
20500
|
};
|
|
20479
20501
|
return (() => {
|
|
20480
|
-
var _el$ = _tmpl$$
|
|
20502
|
+
var _el$ = _tmpl$$u(), _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;
|
|
20481
20503
|
var _ref$ = pageRef;
|
|
20482
20504
|
typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
|
|
20483
20505
|
insert(_el$3, createComponent(For, {
|
|
@@ -20485,7 +20507,7 @@ function HorizontalRuler(props) {
|
|
|
20485
20507
|
return ticks();
|
|
20486
20508
|
},
|
|
20487
20509
|
children: (tick) => [(() => {
|
|
20488
|
-
var _el$11 = _tmpl$2$
|
|
20510
|
+
var _el$11 = _tmpl$2$l();
|
|
20489
20511
|
createRenderEffect((_p$) => {
|
|
20490
20512
|
var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${tick.x}px`;
|
|
20491
20513
|
_v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
|
|
@@ -20497,7 +20519,7 @@ function HorizontalRuler(props) {
|
|
|
20497
20519
|
});
|
|
20498
20520
|
return _el$11;
|
|
20499
20521
|
})(), memo(() => memo(() => !!tick.label)() && (() => {
|
|
20500
|
-
var _el$12 = _tmpl$3$
|
|
20522
|
+
var _el$12 = _tmpl$3$e();
|
|
20501
20523
|
insert(_el$12, () => tick.label);
|
|
20502
20524
|
createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${tick.x}px`));
|
|
20503
20525
|
return _el$12;
|
|
@@ -20574,10 +20596,10 @@ function HorizontalRuler(props) {
|
|
|
20574
20596
|
})();
|
|
20575
20597
|
}
|
|
20576
20598
|
delegateEvents(["pointerdown"]);
|
|
20577
|
-
var _tmpl$$
|
|
20599
|
+
var _tmpl$$t = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
|
|
20578
20600
|
function CaretOverlay(props) {
|
|
20579
20601
|
return (() => {
|
|
20580
|
-
var _el$ = _tmpl$$
|
|
20602
|
+
var _el$ = _tmpl$$t();
|
|
20581
20603
|
createRenderEffect((_p$) => {
|
|
20582
20604
|
var _v$ = !!props.active, _v$2 = {
|
|
20583
20605
|
left: `${props.left}px`,
|
|
@@ -20598,16 +20620,16 @@ function CaretOverlay(props) {
|
|
|
20598
20620
|
return _el$;
|
|
20599
20621
|
})();
|
|
20600
20622
|
}
|
|
20601
|
-
var _tmpl$$
|
|
20623
|
+
var _tmpl$$s = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$k = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
|
|
20602
20624
|
function SelectionOverlay(props) {
|
|
20603
20625
|
return (() => {
|
|
20604
|
-
var _el$ = _tmpl$$
|
|
20626
|
+
var _el$ = _tmpl$$s();
|
|
20605
20627
|
insert(_el$, createComponent(Index, {
|
|
20606
20628
|
get each() {
|
|
20607
20629
|
return props.boxes;
|
|
20608
20630
|
},
|
|
20609
20631
|
children: (box) => (() => {
|
|
20610
|
-
var _el$2 = _tmpl$2$
|
|
20632
|
+
var _el$2 = _tmpl$2$k();
|
|
20611
20633
|
createRenderEffect((_p$) => {
|
|
20612
20634
|
var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
|
|
20613
20635
|
_v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
|
|
@@ -20627,7 +20649,7 @@ function SelectionOverlay(props) {
|
|
|
20627
20649
|
return _el$;
|
|
20628
20650
|
})();
|
|
20629
20651
|
}
|
|
20630
|
-
var _tmpl$$
|
|
20652
|
+
var _tmpl$$r = /* @__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>`);
|
|
20631
20653
|
function RevisionOverlay(props) {
|
|
20632
20654
|
const formattedDate = () => {
|
|
20633
20655
|
try {
|
|
@@ -20638,7 +20660,7 @@ function RevisionOverlay(props) {
|
|
|
20638
20660
|
};
|
|
20639
20661
|
const label = () => props.box.type === "insert" ? "Inserido por" : "ExcluÃdo por";
|
|
20640
20662
|
return (() => {
|
|
20641
|
-
var _el$ = _tmpl$$
|
|
20663
|
+
var _el$ = _tmpl$$r(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
20642
20664
|
_el$4.nextSibling;
|
|
20643
20665
|
var _el$7 = _el$3.nextSibling;
|
|
20644
20666
|
insert(_el$4, label, _el$5);
|
|
@@ -20656,7 +20678,7 @@ function RevisionOverlay(props) {
|
|
|
20656
20678
|
return _el$;
|
|
20657
20679
|
})();
|
|
20658
20680
|
}
|
|
20659
|
-
var _tmpl$$
|
|
20681
|
+
var _tmpl$$q = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$j = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$d = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$a = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$9 = /* @__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>`);
|
|
20660
20682
|
function CommentHighlightOverlay(props) {
|
|
20661
20683
|
const [activeCommentId, setActiveCommentId] = createSignal(null);
|
|
20662
20684
|
const activeComment = createMemo(() => {
|
|
@@ -20683,13 +20705,13 @@ function CommentHighlightOverlay(props) {
|
|
|
20683
20705
|
}
|
|
20684
20706
|
};
|
|
20685
20707
|
return (() => {
|
|
20686
|
-
var _el$ = _tmpl$$
|
|
20708
|
+
var _el$ = _tmpl$$q();
|
|
20687
20709
|
insert(_el$, createComponent(For, {
|
|
20688
20710
|
get each() {
|
|
20689
20711
|
return props.boxes();
|
|
20690
20712
|
},
|
|
20691
20713
|
children: (box) => (() => {
|
|
20692
|
-
var _el$2 = _tmpl$2$
|
|
20714
|
+
var _el$2 = _tmpl$2$j();
|
|
20693
20715
|
_el$2.$$click = () => setActiveCommentId(box.commentId);
|
|
20694
20716
|
_el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
|
|
20695
20717
|
createRenderEffect((_p$) => {
|
|
@@ -20721,7 +20743,7 @@ function CommentHighlightOverlay(props) {
|
|
|
20721
20743
|
const comment = activeComment();
|
|
20722
20744
|
const anchor = popupAnchor();
|
|
20723
20745
|
return (() => {
|
|
20724
|
-
var _el$3 = _tmpl$5$
|
|
20746
|
+
var _el$3 = _tmpl$5$9(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
|
|
20725
20747
|
_el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
|
|
20726
20748
|
insert(_el$5, () => comment.author || "—");
|
|
20727
20749
|
insert(_el$4, createComponent(Show, {
|
|
@@ -20729,7 +20751,7 @@ function CommentHighlightOverlay(props) {
|
|
|
20729
20751
|
return comment.date !== void 0;
|
|
20730
20752
|
},
|
|
20731
20753
|
get children() {
|
|
20732
|
-
var _el$6 = _tmpl$3$
|
|
20754
|
+
var _el$6 = _tmpl$3$d();
|
|
20733
20755
|
insert(_el$6, () => formattedDate(comment.date));
|
|
20734
20756
|
return _el$6;
|
|
20735
20757
|
}
|
|
@@ -20739,7 +20761,7 @@ function CommentHighlightOverlay(props) {
|
|
|
20739
20761
|
return comment.resolved;
|
|
20740
20762
|
},
|
|
20741
20763
|
get children() {
|
|
20742
|
-
return _tmpl$4$
|
|
20764
|
+
return _tmpl$4$a();
|
|
20743
20765
|
}
|
|
20744
20766
|
}), null);
|
|
20745
20767
|
insert(_el$8, () => comment.text);
|
|
@@ -20761,7 +20783,7 @@ function CommentHighlightOverlay(props) {
|
|
|
20761
20783
|
})();
|
|
20762
20784
|
}
|
|
20763
20785
|
delegateEvents(["click"]);
|
|
20764
|
-
var _tmpl$$
|
|
20786
|
+
var _tmpl$$p = /* @__PURE__ */ template(`<div class=oasis-editor-floating-toolbar data-testid=editor-floating-table-toolbar><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group>`);
|
|
20765
20787
|
function FloatingTableToolbar(props) {
|
|
20766
20788
|
const host = () => props.host();
|
|
20767
20789
|
const run = (command, payload) => host().commands.execute(command, payload);
|
|
@@ -20842,7 +20864,7 @@ function FloatingTableToolbar(props) {
|
|
|
20842
20864
|
return document.body;
|
|
20843
20865
|
},
|
|
20844
20866
|
get children() {
|
|
20845
|
-
var _el$ = _tmpl$$
|
|
20867
|
+
var _el$ = _tmpl$$p(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
20846
20868
|
_el$.$$mousedown = (event) => event.preventDefault();
|
|
20847
20869
|
insert(_el$2, createComponent(Button$1, {
|
|
20848
20870
|
icon: "combine",
|
|
@@ -21002,7 +21024,7 @@ function FloatingTableToolbar(props) {
|
|
|
21002
21024
|
});
|
|
21003
21025
|
}
|
|
21004
21026
|
delegateEvents(["mousedown"]);
|
|
21005
|
-
var _tmpl$$
|
|
21027
|
+
var _tmpl$$o = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$i = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$c = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$9 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$8 = /* @__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$1 = /* @__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 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-cell>`);
|
|
21006
21028
|
const WRAP_OPTIONS = [{
|
|
21007
21029
|
preset: "square",
|
|
21008
21030
|
labelKey: "layoutOptions.square"
|
|
@@ -21024,14 +21046,14 @@ const WRAP_OPTIONS = [{
|
|
|
21024
21046
|
}];
|
|
21025
21047
|
function WrapIcon(props) {
|
|
21026
21048
|
const line = (x, y, w) => (() => {
|
|
21027
|
-
var _el$ = _tmpl$$
|
|
21049
|
+
var _el$ = _tmpl$$o();
|
|
21028
21050
|
setAttribute(_el$, "x", x);
|
|
21029
21051
|
setAttribute(_el$, "y", y);
|
|
21030
21052
|
setAttribute(_el$, "width", w);
|
|
21031
21053
|
return _el$;
|
|
21032
21054
|
})();
|
|
21033
21055
|
const box = (x, y, w, h, fill = "#1a73e8") => (() => {
|
|
21034
|
-
var _el$2 = _tmpl$2$
|
|
21056
|
+
var _el$2 = _tmpl$2$i();
|
|
21035
21057
|
setAttribute(_el$2, "x", x);
|
|
21036
21058
|
setAttribute(_el$2, "y", y);
|
|
21037
21059
|
setAttribute(_el$2, "width", w);
|
|
@@ -21040,7 +21062,7 @@ function WrapIcon(props) {
|
|
|
21040
21062
|
return _el$2;
|
|
21041
21063
|
})();
|
|
21042
21064
|
return (() => {
|
|
21043
|
-
var _el$3 = _tmpl$5$
|
|
21065
|
+
var _el$3 = _tmpl$5$8();
|
|
21044
21066
|
insert(_el$3, createComponent(Show, {
|
|
21045
21067
|
get when() {
|
|
21046
21068
|
return props.preset === "square";
|
|
@@ -21054,7 +21076,7 @@ function WrapIcon(props) {
|
|
|
21054
21076
|
return props.preset === "tight";
|
|
21055
21077
|
},
|
|
21056
21078
|
get children() {
|
|
21057
|
-
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$
|
|
21079
|
+
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$c()];
|
|
21058
21080
|
}
|
|
21059
21081
|
}), null);
|
|
21060
21082
|
insert(_el$3, createComponent(Show, {
|
|
@@ -21062,7 +21084,7 @@ function WrapIcon(props) {
|
|
|
21062
21084
|
return props.preset === "through";
|
|
21063
21085
|
},
|
|
21064
21086
|
get children() {
|
|
21065
|
-
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$
|
|
21087
|
+
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$9()];
|
|
21066
21088
|
}
|
|
21067
21089
|
}), null);
|
|
21068
21090
|
insert(_el$3, createComponent(Show, {
|
|
@@ -21151,7 +21173,7 @@ function FloatingLayoutOptions(props) {
|
|
|
21151
21173
|
},
|
|
21152
21174
|
get children() {
|
|
21153
21175
|
return [(() => {
|
|
21154
|
-
var _el$6 = _tmpl$6$
|
|
21176
|
+
var _el$6 = _tmpl$6$4();
|
|
21155
21177
|
_el$6.$$click = () => setOpen((value) => !value);
|
|
21156
21178
|
_el$6.$$mousedown = (event) => event.preventDefault();
|
|
21157
21179
|
createRenderEffect((_p$) => {
|
|
@@ -34998,10 +35020,10 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
|
|
|
34998
35020
|
nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
|
|
34999
35021
|
return { width: nextWidth, height: nextHeight };
|
|
35000
35022
|
}
|
|
35001
|
-
var _tmpl$$
|
|
35023
|
+
var _tmpl$$n = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$h = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$b = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
|
|
35002
35024
|
function ResizeHandlesOverlay(props) {
|
|
35003
35025
|
return (() => {
|
|
35004
|
-
var _el$ = _tmpl$2$
|
|
35026
|
+
var _el$ = _tmpl$2$h();
|
|
35005
35027
|
_el$.$$mousedown = (event) => {
|
|
35006
35028
|
if (props.readOnly || !props.box() || !props.onBodyMouseDown) {
|
|
35007
35029
|
return;
|
|
@@ -35017,7 +35039,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
35017
35039
|
return [createComponent(For, {
|
|
35018
35040
|
each: RESIZE_HANDLE_DIRECTIONS,
|
|
35019
35041
|
children: (direction) => (() => {
|
|
35020
|
-
var _el$3 = _tmpl$3$
|
|
35042
|
+
var _el$3 = _tmpl$3$b();
|
|
35021
35043
|
_el$3.$$mousedown = (event) => {
|
|
35022
35044
|
if (!props.box()) {
|
|
35023
35045
|
return;
|
|
@@ -35032,7 +35054,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
35032
35054
|
return props.onRotateStart;
|
|
35033
35055
|
},
|
|
35034
35056
|
get children() {
|
|
35035
|
-
var _el$2 = _tmpl$$
|
|
35057
|
+
var _el$2 = _tmpl$$n();
|
|
35036
35058
|
_el$2.$$mousedown = (event) => {
|
|
35037
35059
|
var _a;
|
|
35038
35060
|
if (!props.box()) {
|
|
@@ -35073,7 +35095,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
35073
35095
|
})();
|
|
35074
35096
|
}
|
|
35075
35097
|
delegateEvents(["mousedown"]);
|
|
35076
|
-
var _tmpl$$
|
|
35098
|
+
var _tmpl$$m = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none></div></div><div class=oasis-editor-statusbar data-testid=editor-statusbar><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span><span class=oasis-editor-statusbar-item>: 100%`), _tmpl$2$g = /* @__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$3$a = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$4$8 = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`);
|
|
35077
35099
|
function OasisEditorEditor(props) {
|
|
35078
35100
|
const layout = () => props.layout ?? {};
|
|
35079
35101
|
const overlays = () => props.overlays;
|
|
@@ -35161,7 +35183,7 @@ function OasisEditorEditor(props) {
|
|
|
35161
35183
|
queueMicrotask(recomputeViewportPageIndex);
|
|
35162
35184
|
});
|
|
35163
35185
|
return (() => {
|
|
35164
|
-
var _el$ = _tmpl$$
|
|
35186
|
+
var _el$ = _tmpl$$m(), _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$2.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
35165
35187
|
insert(_el$, createComponent(Show, {
|
|
35166
35188
|
get when() {
|
|
35167
35189
|
return memo(() => !!layout().showHorizontalRuler)() && overlays().toolbarHost;
|
|
@@ -35417,7 +35439,7 @@ function OasisEditorEditor(props) {
|
|
|
35417
35439
|
const isDone = progress().phase === "done";
|
|
35418
35440
|
const isError = progress().phase === "error";
|
|
35419
35441
|
return (() => {
|
|
35420
|
-
var _el$11 = _tmpl$2$
|
|
35442
|
+
var _el$11 = _tmpl$2$g(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
|
|
35421
35443
|
_el$11.classList.toggle("oasis-editor-import-overlay-done", !!isDone);
|
|
35422
35444
|
_el$11.classList.toggle("oasis-editor-import-overlay-error", !!isError);
|
|
35423
35445
|
setAttribute(_el$11, "aria-busy", !isDone && !isError);
|
|
@@ -35430,11 +35452,11 @@ function OasisEditorEditor(props) {
|
|
|
35430
35452
|
_el$16.classList.toggle("oasis-editor-import-progress-bar-done", !!isDone);
|
|
35431
35453
|
_el$16.classList.toggle("oasis-editor-import-progress-bar-error", !!isError);
|
|
35432
35454
|
insert(_el$17, isDone ? (() => {
|
|
35433
|
-
var _el$18 = _tmpl$3$
|
|
35455
|
+
var _el$18 = _tmpl$3$a();
|
|
35434
35456
|
insert(_el$18, () => t("import.phase.done"));
|
|
35435
35457
|
return _el$18;
|
|
35436
35458
|
})() : isError ? (() => {
|
|
35437
|
-
var _el$19 = _tmpl$4$
|
|
35459
|
+
var _el$19 = _tmpl$4$8();
|
|
35438
35460
|
insert(_el$19, () => t("import.phase.error"));
|
|
35439
35461
|
return _el$19;
|
|
35440
35462
|
})() : [memo(() => Math.round(progress().progress)), "%"]);
|
|
@@ -35467,7 +35489,7 @@ function OasisEditorEditor(props) {
|
|
|
35467
35489
|
return createComponent(Show, {
|
|
35468
35490
|
when: key,
|
|
35469
35491
|
get children() {
|
|
35470
|
-
var _el$20 = _tmpl$5$
|
|
35492
|
+
var _el$20 = _tmpl$5$7();
|
|
35471
35493
|
insert(_el$20, () => t(key));
|
|
35472
35494
|
createRenderEffect(() => className(_el$20, `oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${status.replace("...", "ing").replace(".", "")}`));
|
|
35473
35495
|
return _el$20;
|
|
@@ -35499,11 +35521,11 @@ function OasisEditorEditor(props) {
|
|
|
35499
35521
|
})();
|
|
35500
35522
|
}
|
|
35501
35523
|
delegateEvents(["mousedown", "contextmenu", "input", "keydown"]);
|
|
35502
|
-
var _tmpl$$
|
|
35524
|
+
var _tmpl$$l = /* @__PURE__ */ template(`<button>`);
|
|
35503
35525
|
function FloatingActionButton(props) {
|
|
35504
35526
|
const [local, others] = splitProps(props, ["type", "icon", "label", "active", "class", "classList"]);
|
|
35505
35527
|
return (() => {
|
|
35506
|
-
var _el$ = _tmpl$$
|
|
35528
|
+
var _el$ = _tmpl$$l();
|
|
35507
35529
|
spread(_el$, mergeProps({
|
|
35508
35530
|
get type() {
|
|
35509
35531
|
return local.type ?? "button";
|
|
@@ -35532,7 +35554,7 @@ function FloatingActionButton(props) {
|
|
|
35532
35554
|
return _el$;
|
|
35533
35555
|
})();
|
|
35534
35556
|
}
|
|
35535
|
-
var _tmpl$$
|
|
35557
|
+
var _tmpl$$k = /* @__PURE__ */ template(`<aside>`), _tmpl$2$f = /* @__PURE__ */ template(`<div>`);
|
|
35536
35558
|
function SidePanel(props) {
|
|
35537
35559
|
const [local, others] = splitProps(props, ["mode", "width", "class", "classList", "children", "style"]);
|
|
35538
35560
|
const width = () => {
|
|
@@ -35542,7 +35564,7 @@ function SidePanel(props) {
|
|
|
35542
35564
|
return local.width ?? "360px";
|
|
35543
35565
|
};
|
|
35544
35566
|
return (() => {
|
|
35545
|
-
var _el$ = _tmpl$$
|
|
35567
|
+
var _el$ = _tmpl$$k();
|
|
35546
35568
|
spread(_el$, mergeProps({
|
|
35547
35569
|
get ["class"]() {
|
|
35548
35570
|
return `oasis-editor-plugin-side-panel ${local.class ?? ""}`;
|
|
@@ -35567,7 +35589,7 @@ function SidePanel(props) {
|
|
|
35567
35589
|
function SidePanelHeader(props) {
|
|
35568
35590
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
35569
35591
|
return (() => {
|
|
35570
|
-
var _el$2 = _tmpl$2$
|
|
35592
|
+
var _el$2 = _tmpl$2$f();
|
|
35571
35593
|
spread(_el$2, mergeProps({
|
|
35572
35594
|
get ["class"]() {
|
|
35573
35595
|
return `oasis-editor-plugin-side-panel-header ${local.class ?? ""}`;
|
|
@@ -35580,7 +35602,7 @@ function SidePanelHeader(props) {
|
|
|
35580
35602
|
function SidePanelBody(props) {
|
|
35581
35603
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
35582
35604
|
return (() => {
|
|
35583
|
-
var _el$3 = _tmpl$2$
|
|
35605
|
+
var _el$3 = _tmpl$2$f();
|
|
35584
35606
|
spread(_el$3, mergeProps({
|
|
35585
35607
|
get ["class"]() {
|
|
35586
35608
|
return `oasis-editor-plugin-side-panel-body ${local.class ?? ""}`;
|
|
@@ -35593,7 +35615,7 @@ function SidePanelBody(props) {
|
|
|
35593
35615
|
function SidePanelFooter(props) {
|
|
35594
35616
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
35595
35617
|
return (() => {
|
|
35596
|
-
var _el$4 = _tmpl$2$
|
|
35618
|
+
var _el$4 = _tmpl$2$f();
|
|
35597
35619
|
spread(_el$4, mergeProps({
|
|
35598
35620
|
get ["class"]() {
|
|
35599
35621
|
return `oasis-editor-plugin-side-panel-footer ${local.class ?? ""}`;
|
|
@@ -35603,11 +35625,11 @@ function SidePanelFooter(props) {
|
|
|
35603
35625
|
return _el$4;
|
|
35604
35626
|
})();
|
|
35605
35627
|
}
|
|
35606
|
-
var _tmpl$$
|
|
35628
|
+
var _tmpl$$j = /* @__PURE__ */ template(`<button>`);
|
|
35607
35629
|
function IconButton(props) {
|
|
35608
35630
|
const [local, others] = splitProps(props, ["type", "icon", "label", "active", "variant", "size", "class", "classList"]);
|
|
35609
35631
|
return (() => {
|
|
35610
|
-
var _el$ = _tmpl$$
|
|
35632
|
+
var _el$ = _tmpl$$j();
|
|
35611
35633
|
spread(_el$, mergeProps({
|
|
35612
35634
|
get type() {
|
|
35613
35635
|
return local.type ?? "button";
|
|
@@ -35638,7 +35660,7 @@ function IconButton(props) {
|
|
|
35638
35660
|
return _el$;
|
|
35639
35661
|
})();
|
|
35640
35662
|
}
|
|
35641
|
-
var _tmpl$$
|
|
35663
|
+
var _tmpl$$i = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$e = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$9 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$7 = /* @__PURE__ */ template(`<span class=oasis-editor-plugin-side-panel-icon>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title><span>`);
|
|
35642
35664
|
const EMPTY_SNAPSHOT = {
|
|
35643
35665
|
floatingActions: [],
|
|
35644
35666
|
sidePanels: [],
|
|
@@ -35669,7 +35691,7 @@ function PluginUiHost(props) {
|
|
|
35669
35691
|
return groupActionsByPlacement(actions());
|
|
35670
35692
|
},
|
|
35671
35693
|
children: (group) => (() => {
|
|
35672
|
-
var _el$ = _tmpl$$
|
|
35694
|
+
var _el$ = _tmpl$$i();
|
|
35673
35695
|
insert(_el$, createComponent(For, {
|
|
35674
35696
|
get each() {
|
|
35675
35697
|
return group.actions;
|
|
@@ -35698,7 +35720,7 @@ function PluginUiHost(props) {
|
|
|
35698
35720
|
})()
|
|
35699
35721
|
});
|
|
35700
35722
|
return (() => {
|
|
35701
|
-
var _el$2 = _tmpl$2$
|
|
35723
|
+
var _el$2 = _tmpl$2$e(), _el$3 = _el$2.firstChild;
|
|
35702
35724
|
insert(_el$3, resolvedChildren);
|
|
35703
35725
|
insert(_el$2, createComponent(Show, {
|
|
35704
35726
|
get when() {
|
|
@@ -35711,7 +35733,7 @@ function PluginUiHost(props) {
|
|
|
35711
35733
|
return overlayPanel();
|
|
35712
35734
|
},
|
|
35713
35735
|
children: (panel) => (() => {
|
|
35714
|
-
var _el$4 = _tmpl$3$
|
|
35736
|
+
var _el$4 = _tmpl$3$9();
|
|
35715
35737
|
insert(_el$4, () => renderPanel(props.editor, panel()));
|
|
35716
35738
|
return _el$4;
|
|
35717
35739
|
})()
|
|
@@ -35762,13 +35784,13 @@ function renderPanel(editor, panel) {
|
|
|
35762
35784
|
return [createComponent(SidePanelHeader, {
|
|
35763
35785
|
get children() {
|
|
35764
35786
|
return [(() => {
|
|
35765
|
-
var _el$5 = _tmpl$5$
|
|
35787
|
+
var _el$5 = _tmpl$5$6(), _el$7 = _el$5.firstChild;
|
|
35766
35788
|
insert(_el$5, createComponent(Show, {
|
|
35767
35789
|
get when() {
|
|
35768
35790
|
return panel.icon;
|
|
35769
35791
|
},
|
|
35770
35792
|
get children() {
|
|
35771
|
-
var _el$6 = _tmpl$4$
|
|
35793
|
+
var _el$6 = _tmpl$4$7();
|
|
35772
35794
|
insert(_el$6, createComponent(ToolIcon, {
|
|
35773
35795
|
get name() {
|
|
35774
35796
|
return panel.icon;
|
|
@@ -35817,7 +35839,7 @@ function groupActionsByPlacement(actions) {
|
|
|
35817
35839
|
actions: groupActions
|
|
35818
35840
|
}));
|
|
35819
35841
|
}
|
|
35820
|
-
var _tmpl$$
|
|
35842
|
+
var _tmpl$$h = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
|
|
35821
35843
|
function DocumentShell(props) {
|
|
35822
35844
|
let surfaceEl;
|
|
35823
35845
|
let viewportEl;
|
|
@@ -35940,7 +35962,7 @@ function DocumentShell(props) {
|
|
|
35940
35962
|
return props.runtimeEditor;
|
|
35941
35963
|
},
|
|
35942
35964
|
get children() {
|
|
35943
|
-
var _el$ = _tmpl$$
|
|
35965
|
+
var _el$ = _tmpl$$h(), _el$2 = _el$.firstChild;
|
|
35944
35966
|
insert(_el$, createComponent(Show, {
|
|
35945
35967
|
get when() {
|
|
35946
35968
|
return memo(() => !!props.showChrome)() && props.showOutline;
|
|
@@ -35997,10 +36019,10 @@ function DocumentShell(props) {
|
|
|
35997
36019
|
}
|
|
35998
36020
|
})];
|
|
35999
36021
|
}
|
|
36000
|
-
var _tmpl$$
|
|
36022
|
+
var _tmpl$$g = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">`);
|
|
36001
36023
|
function InlineShell(props) {
|
|
36002
36024
|
return (() => {
|
|
36003
|
-
var _el$ = _tmpl$2$
|
|
36025
|
+
var _el$ = _tmpl$2$d();
|
|
36004
36026
|
insert(_el$, createComponent(Show, {
|
|
36005
36027
|
get when() {
|
|
36006
36028
|
return memo(() => !!props.showChrome)() && props.showToolbar;
|
|
@@ -36027,7 +36049,7 @@ function InlineShell(props) {
|
|
|
36027
36049
|
return props.runtimeEditor;
|
|
36028
36050
|
},
|
|
36029
36051
|
get children() {
|
|
36030
|
-
var _el$2 = _tmpl$$
|
|
36052
|
+
var _el$2 = _tmpl$$g(), _el$3 = _el$2.firstChild;
|
|
36031
36053
|
insert(_el$3, createComponent(OasisEditorEditor, {
|
|
36032
36054
|
state: () => props.state,
|
|
36033
36055
|
get layout() {
|
|
@@ -36066,16 +36088,16 @@ function InlineShell(props) {
|
|
|
36066
36088
|
return _el$;
|
|
36067
36089
|
})();
|
|
36068
36090
|
}
|
|
36069
|
-
var _tmpl$$
|
|
36091
|
+
var _tmpl$$f = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
|
|
36070
36092
|
function BalloonShell(props) {
|
|
36071
36093
|
return (() => {
|
|
36072
|
-
var _el$ = _tmpl$2$
|
|
36094
|
+
var _el$ = _tmpl$2$c();
|
|
36073
36095
|
insert(_el$, createComponent(PluginUiHost, {
|
|
36074
36096
|
get editor() {
|
|
36075
36097
|
return props.runtimeEditor;
|
|
36076
36098
|
},
|
|
36077
36099
|
get children() {
|
|
36078
|
-
var _el$2 = _tmpl$$
|
|
36100
|
+
var _el$2 = _tmpl$$f(), _el$3 = _el$2.firstChild;
|
|
36079
36101
|
insert(_el$3, createComponent(OasisEditorEditor, {
|
|
36080
36102
|
state: () => props.state,
|
|
36081
36103
|
get layout() {
|
|
@@ -36114,7 +36136,7 @@ function BalloonShell(props) {
|
|
|
36114
36136
|
return _el$;
|
|
36115
36137
|
})();
|
|
36116
36138
|
}
|
|
36117
|
-
var _tmpl$$
|
|
36139
|
+
var _tmpl$$e = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>`);
|
|
36118
36140
|
function Dialog(props) {
|
|
36119
36141
|
let dialogRef;
|
|
36120
36142
|
const fallbackTitleId = createUniqueId();
|
|
@@ -36138,7 +36160,7 @@ function Dialog(props) {
|
|
|
36138
36160
|
return props.isOpen;
|
|
36139
36161
|
},
|
|
36140
36162
|
get children() {
|
|
36141
|
-
var _el$ = _tmpl$2$
|
|
36163
|
+
var _el$ = _tmpl$2$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
|
|
36142
36164
|
_el$.$$click = () => {
|
|
36143
36165
|
if (props.closeOnOverlayClick ?? true) {
|
|
36144
36166
|
props.onClose();
|
|
@@ -36155,7 +36177,7 @@ function Dialog(props) {
|
|
|
36155
36177
|
return props.footer;
|
|
36156
36178
|
},
|
|
36157
36179
|
get children() {
|
|
36158
|
-
var _el$7 = _tmpl$$
|
|
36180
|
+
var _el$7 = _tmpl$$e();
|
|
36159
36181
|
insert(_el$7, () => props.footer);
|
|
36160
36182
|
return _el$7;
|
|
36161
36183
|
}
|
|
@@ -36184,7 +36206,7 @@ function Dialog(props) {
|
|
|
36184
36206
|
});
|
|
36185
36207
|
}
|
|
36186
36208
|
delegateEvents(["click"]);
|
|
36187
|
-
var _tmpl$$
|
|
36209
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$a = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$8 = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
|
|
36188
36210
|
function findEnabledItem(items, startIndex, direction) {
|
|
36189
36211
|
if (!items.length) return void 0;
|
|
36190
36212
|
for (let step = 0; step < items.length; step += 1) {
|
|
@@ -36235,7 +36257,7 @@ function Tabs(props) {
|
|
|
36235
36257
|
selectItem(findEnabledItem(items(), currentIndex + direction, direction), true);
|
|
36236
36258
|
};
|
|
36237
36259
|
return (() => {
|
|
36238
|
-
var _el$ = _tmpl$$
|
|
36260
|
+
var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild;
|
|
36239
36261
|
_el$2.$$keydown = handleKeyDown;
|
|
36240
36262
|
insert(_el$2, createComponent(For, {
|
|
36241
36263
|
get each() {
|
|
@@ -36245,7 +36267,7 @@ function Tabs(props) {
|
|
|
36245
36267
|
const tabId = `${baseId}-${item.id}-tab`;
|
|
36246
36268
|
const panelId = `${baseId}-${item.id}-panel`;
|
|
36247
36269
|
return (() => {
|
|
36248
|
-
var _el$3 = _tmpl$2$
|
|
36270
|
+
var _el$3 = _tmpl$2$a();
|
|
36249
36271
|
_el$3.$$click = () => selectItem(item);
|
|
36250
36272
|
use((element) => {
|
|
36251
36273
|
tabRefs[index()] = element;
|
|
@@ -36280,7 +36302,7 @@ function Tabs(props) {
|
|
|
36280
36302
|
return items();
|
|
36281
36303
|
},
|
|
36282
36304
|
children: (item) => (() => {
|
|
36283
|
-
var _el$4 = _tmpl$3$
|
|
36305
|
+
var _el$4 = _tmpl$3$8();
|
|
36284
36306
|
insert(_el$4, () => item.panel);
|
|
36285
36307
|
createRenderEffect((_p$) => {
|
|
36286
36308
|
var _a, _b;
|
|
@@ -36312,12 +36334,12 @@ function Tabs(props) {
|
|
|
36312
36334
|
})();
|
|
36313
36335
|
}
|
|
36314
36336
|
delegateEvents(["keydown", "click"]);
|
|
36315
|
-
var _tmpl$$
|
|
36337
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
|
|
36316
36338
|
function Button(props) {
|
|
36317
36339
|
const [local, others] = splitProps(props, ["type", "variant", "size", "icon", "iconPosition", "fullWidth", "class", "classList", "children"]);
|
|
36318
36340
|
const iconPosition = () => local.iconPosition ?? "start";
|
|
36319
36341
|
return (() => {
|
|
36320
|
-
var _el$ = _tmpl$$
|
|
36342
|
+
var _el$ = _tmpl$$c(), _el$2 = _el$.firstChild;
|
|
36321
36343
|
spread(_el$, mergeProps({
|
|
36322
36344
|
get type() {
|
|
36323
36345
|
return local.type ?? "button";
|
|
@@ -36362,7 +36384,7 @@ function Button(props) {
|
|
|
36362
36384
|
return _el$;
|
|
36363
36385
|
})();
|
|
36364
36386
|
}
|
|
36365
|
-
var _tmpl$$
|
|
36387
|
+
var _tmpl$$b = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$7 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$6 = /* @__PURE__ */ template(`<label><input class=oasis-editor-ui-input>`);
|
|
36366
36388
|
function TextField(props) {
|
|
36367
36389
|
const fallbackId = createUniqueId();
|
|
36368
36390
|
const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
|
|
@@ -36370,13 +36392,13 @@ function TextField(props) {
|
|
|
36370
36392
|
const descriptionId = () => `${id()}-description`;
|
|
36371
36393
|
const errorId = () => `${id()}-error`;
|
|
36372
36394
|
return (() => {
|
|
36373
|
-
var _el$ = _tmpl$4$
|
|
36395
|
+
var _el$ = _tmpl$4$6(), _el$3 = _el$.firstChild;
|
|
36374
36396
|
insert(_el$, createComponent(Show, {
|
|
36375
36397
|
get when() {
|
|
36376
36398
|
return local.label;
|
|
36377
36399
|
},
|
|
36378
36400
|
get children() {
|
|
36379
|
-
var _el$2 = _tmpl$$
|
|
36401
|
+
var _el$2 = _tmpl$$b();
|
|
36380
36402
|
insert(_el$2, () => local.label);
|
|
36381
36403
|
return _el$2;
|
|
36382
36404
|
}
|
|
@@ -36401,7 +36423,7 @@ function TextField(props) {
|
|
|
36401
36423
|
return local.description;
|
|
36402
36424
|
},
|
|
36403
36425
|
get children() {
|
|
36404
|
-
var _el$4 = _tmpl$2$
|
|
36426
|
+
var _el$4 = _tmpl$2$9();
|
|
36405
36427
|
insert(_el$4, () => local.description);
|
|
36406
36428
|
createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
|
|
36407
36429
|
return _el$4;
|
|
@@ -36412,7 +36434,7 @@ function TextField(props) {
|
|
|
36412
36434
|
return local.error;
|
|
36413
36435
|
},
|
|
36414
36436
|
get children() {
|
|
36415
|
-
var _el$5 = _tmpl$3$
|
|
36437
|
+
var _el$5 = _tmpl$3$7();
|
|
36416
36438
|
insert(_el$5, () => local.error);
|
|
36417
36439
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
36418
36440
|
return _el$5;
|
|
@@ -36431,7 +36453,7 @@ function TextField(props) {
|
|
|
36431
36453
|
})();
|
|
36432
36454
|
}
|
|
36433
36455
|
delegateEvents(["input"]);
|
|
36434
|
-
var _tmpl$$
|
|
36456
|
+
var _tmpl$$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$6 = /* @__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>`);
|
|
36435
36457
|
function Checkbox(props) {
|
|
36436
36458
|
const fallbackId = createUniqueId();
|
|
36437
36459
|
const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
|
|
@@ -36439,7 +36461,7 @@ function Checkbox(props) {
|
|
|
36439
36461
|
const descriptionId = () => `${id()}-description`;
|
|
36440
36462
|
const errorId = () => `${id()}-error`;
|
|
36441
36463
|
return (() => {
|
|
36442
|
-
var _el$ = _tmpl$3$
|
|
36464
|
+
var _el$ = _tmpl$3$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
36443
36465
|
_el$2.addEventListener("change", (event) => {
|
|
36444
36466
|
var _a;
|
|
36445
36467
|
return (_a = local.onChange) == null ? void 0 : _a.call(local, event.currentTarget.checked);
|
|
@@ -36461,7 +36483,7 @@ function Checkbox(props) {
|
|
|
36461
36483
|
return local.description;
|
|
36462
36484
|
},
|
|
36463
36485
|
get children() {
|
|
36464
|
-
var _el$5 = _tmpl$$
|
|
36486
|
+
var _el$5 = _tmpl$$a();
|
|
36465
36487
|
insert(_el$5, () => local.description);
|
|
36466
36488
|
createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
|
|
36467
36489
|
return _el$5;
|
|
@@ -36472,7 +36494,7 @@ function Checkbox(props) {
|
|
|
36472
36494
|
return local.error;
|
|
36473
36495
|
},
|
|
36474
36496
|
get children() {
|
|
36475
|
-
var _el$6 = _tmpl$2$
|
|
36497
|
+
var _el$6 = _tmpl$2$8();
|
|
36476
36498
|
insert(_el$6, () => local.error);
|
|
36477
36499
|
createRenderEffect(() => setAttribute(_el$6, "id", errorId()));
|
|
36478
36500
|
return _el$6;
|
|
@@ -36490,7 +36512,7 @@ function Checkbox(props) {
|
|
|
36490
36512
|
return _el$;
|
|
36491
36513
|
})();
|
|
36492
36514
|
}
|
|
36493
|
-
var _tmpl$$
|
|
36515
|
+
var _tmpl$$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$7 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$5 = /* @__PURE__ */ template(`<label><select class=oasis-editor-ui-select>`), _tmpl$5$5 = /* @__PURE__ */ template(`<option>`);
|
|
36494
36516
|
function SelectField(props) {
|
|
36495
36517
|
const fallbackId = createUniqueId();
|
|
36496
36518
|
const [local, others] = splitProps(props, ["label", "description", "error", "options", "onChange", "class", "id"]);
|
|
@@ -36498,13 +36520,13 @@ function SelectField(props) {
|
|
|
36498
36520
|
const descriptionId = () => `${id()}-description`;
|
|
36499
36521
|
const errorId = () => `${id()}-error`;
|
|
36500
36522
|
return (() => {
|
|
36501
|
-
var _el$ = _tmpl$4$
|
|
36523
|
+
var _el$ = _tmpl$4$5(), _el$3 = _el$.firstChild;
|
|
36502
36524
|
insert(_el$, createComponent(Show, {
|
|
36503
36525
|
get when() {
|
|
36504
36526
|
return local.label;
|
|
36505
36527
|
},
|
|
36506
36528
|
get children() {
|
|
36507
|
-
var _el$2 = _tmpl$$
|
|
36529
|
+
var _el$2 = _tmpl$$9();
|
|
36508
36530
|
insert(_el$2, () => local.label);
|
|
36509
36531
|
return _el$2;
|
|
36510
36532
|
}
|
|
@@ -36529,7 +36551,7 @@ function SelectField(props) {
|
|
|
36529
36551
|
return local.options;
|
|
36530
36552
|
},
|
|
36531
36553
|
children: (option) => (() => {
|
|
36532
|
-
var _el$6 = _tmpl$5$
|
|
36554
|
+
var _el$6 = _tmpl$5$5();
|
|
36533
36555
|
insert(_el$6, () => option.label);
|
|
36534
36556
|
createRenderEffect(() => _el$6.disabled = option.disabled);
|
|
36535
36557
|
createRenderEffect(() => _el$6.value = option.value);
|
|
@@ -36541,7 +36563,7 @@ function SelectField(props) {
|
|
|
36541
36563
|
return local.description;
|
|
36542
36564
|
},
|
|
36543
36565
|
get children() {
|
|
36544
|
-
var _el$4 = _tmpl$2$
|
|
36566
|
+
var _el$4 = _tmpl$2$7();
|
|
36545
36567
|
insert(_el$4, () => local.description);
|
|
36546
36568
|
createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
|
|
36547
36569
|
return _el$4;
|
|
@@ -36552,7 +36574,7 @@ function SelectField(props) {
|
|
|
36552
36574
|
return local.error;
|
|
36553
36575
|
},
|
|
36554
36576
|
get children() {
|
|
36555
|
-
var _el$5 = _tmpl$3$
|
|
36577
|
+
var _el$5 = _tmpl$3$5();
|
|
36556
36578
|
insert(_el$5, () => local.error);
|
|
36557
36579
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
36558
36580
|
return _el$5;
|
|
@@ -36570,11 +36592,11 @@ function SelectField(props) {
|
|
|
36570
36592
|
return _el$;
|
|
36571
36593
|
})();
|
|
36572
36594
|
}
|
|
36573
|
-
var _tmpl$$
|
|
36595
|
+
var _tmpl$$8 = /* @__PURE__ */ template(`<div>`);
|
|
36574
36596
|
function DialogFooter(props) {
|
|
36575
36597
|
const [local, others] = splitProps(props, ["align", "class", "classList", "children"]);
|
|
36576
36598
|
return (() => {
|
|
36577
|
-
var _el$ = _tmpl$$
|
|
36599
|
+
var _el$ = _tmpl$$8();
|
|
36578
36600
|
spread(_el$, mergeProps({
|
|
36579
36601
|
get ["class"]() {
|
|
36580
36602
|
return `oasis-editor-ui-dialog-footer ${local.class ?? ""}`;
|
|
@@ -36850,7 +36872,7 @@ const UNDERLINE_STYLE_OPTIONS = [
|
|
|
36850
36872
|
}
|
|
36851
36873
|
}
|
|
36852
36874
|
];
|
|
36853
|
-
var _tmpl$$
|
|
36875
|
+
var _tmpl$$7 = /* @__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$6 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$4 = /* @__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$4 = /* @__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>`);
|
|
36854
36876
|
const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
|
|
36855
36877
|
const UNDERLINE_BUTTON_TOOLTIP = `${t("toolbar.underline")} (${mod$1}+U)`;
|
|
36856
36878
|
const TEST_ID = "editor-toolbar-underline";
|
|
@@ -36900,14 +36922,14 @@ function UnderlineControl(props) {
|
|
|
36900
36922
|
panelRole: "menu",
|
|
36901
36923
|
get mainContent() {
|
|
36902
36924
|
return (() => {
|
|
36903
|
-
var _el$5 = _tmpl$3$
|
|
36925
|
+
var _el$5 = _tmpl$3$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
36904
36926
|
createRenderEffect(() => setAttribute(_el$7, "data-style", indicatorStyle()));
|
|
36905
36927
|
return _el$5;
|
|
36906
36928
|
})();
|
|
36907
36929
|
},
|
|
36908
36930
|
get children() {
|
|
36909
36931
|
return [(() => {
|
|
36910
|
-
var _el$ = _tmpl$$
|
|
36932
|
+
var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
36911
36933
|
_el$.$$click = () => {
|
|
36912
36934
|
removeUnderline();
|
|
36913
36935
|
setOpen(false);
|
|
@@ -36915,13 +36937,13 @@ function UnderlineControl(props) {
|
|
|
36915
36937
|
insert(_el$3, () => t("toolbar.underlineRemove"));
|
|
36916
36938
|
return _el$;
|
|
36917
36939
|
})(), (() => {
|
|
36918
|
-
var _el$4 = _tmpl$2$
|
|
36940
|
+
var _el$4 = _tmpl$2$6();
|
|
36919
36941
|
insert(_el$4, createComponent(For, {
|
|
36920
36942
|
each: UNDERLINE_STYLE_OPTIONS,
|
|
36921
36943
|
children: (option) => {
|
|
36922
36944
|
const isActive = () => active() && activeStyleValue() === option.value.toLowerCase();
|
|
36923
36945
|
return (() => {
|
|
36924
|
-
var _el$8 = _tmpl$5$
|
|
36946
|
+
var _el$8 = _tmpl$5$4(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
|
|
36925
36947
|
_el$8.$$click = () => {
|
|
36926
36948
|
applyUnderlineStyle(option.value);
|
|
36927
36949
|
setOpen(false);
|
|
@@ -36932,7 +36954,7 @@ function UnderlineControl(props) {
|
|
|
36932
36954
|
},
|
|
36933
36955
|
get fallback() {
|
|
36934
36956
|
return (() => {
|
|
36935
|
-
var _el$10 = _tmpl$6$
|
|
36957
|
+
var _el$10 = _tmpl$6$3();
|
|
36936
36958
|
createRenderEffect((_$p) => style(_el$10, option.preview.borderStyle === "wavy" ? void 0 : {
|
|
36937
36959
|
"border-bottom-style": option.preview.borderStyle,
|
|
36938
36960
|
"border-bottom-width": option.preview.borderBottomWidth ?? "1px"
|
|
@@ -36941,7 +36963,7 @@ function UnderlineControl(props) {
|
|
|
36941
36963
|
})();
|
|
36942
36964
|
},
|
|
36943
36965
|
get children() {
|
|
36944
|
-
var _el$0 = _tmpl$4$
|
|
36966
|
+
var _el$0 = _tmpl$4$4();
|
|
36945
36967
|
createRenderEffect(() => _el$0.innerHTML = option.preview.svg);
|
|
36946
36968
|
return _el$0;
|
|
36947
36969
|
}
|
|
@@ -36970,7 +36992,7 @@ function UnderlineControl(props) {
|
|
|
36970
36992
|
});
|
|
36971
36993
|
}
|
|
36972
36994
|
delegateEvents(["click"]);
|
|
36973
|
-
var _tmpl$$
|
|
36995
|
+
var _tmpl$$6 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$5 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$3 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$3 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$2 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7 = /* @__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>`);
|
|
36974
36996
|
function ListOptionsControl(props) {
|
|
36975
36997
|
const api = props.api;
|
|
36976
36998
|
return createComponent(Menu, {
|
|
@@ -36991,27 +37013,27 @@ function ListOptionsControl(props) {
|
|
|
36991
37013
|
},
|
|
36992
37014
|
get children() {
|
|
36993
37015
|
return [(() => {
|
|
36994
|
-
var _el$4 = _tmpl$$
|
|
37016
|
+
var _el$4 = _tmpl$$6();
|
|
36995
37017
|
insert(_el$4, () => t("toolbar.formatDecimal"));
|
|
36996
37018
|
return _el$4;
|
|
36997
37019
|
})(), (() => {
|
|
36998
|
-
var _el$5 = _tmpl$2$
|
|
37020
|
+
var _el$5 = _tmpl$2$5();
|
|
36999
37021
|
insert(_el$5, () => t("toolbar.formatLowerLetter"));
|
|
37000
37022
|
return _el$5;
|
|
37001
37023
|
})(), (() => {
|
|
37002
|
-
var _el$6 = _tmpl$3$
|
|
37024
|
+
var _el$6 = _tmpl$3$3();
|
|
37003
37025
|
insert(_el$6, () => t("toolbar.formatUpperLetter"));
|
|
37004
37026
|
return _el$6;
|
|
37005
37027
|
})(), (() => {
|
|
37006
|
-
var _el$7 = _tmpl$4$
|
|
37028
|
+
var _el$7 = _tmpl$4$3();
|
|
37007
37029
|
insert(_el$7, () => t("toolbar.formatLowerRoman"));
|
|
37008
37030
|
return _el$7;
|
|
37009
37031
|
})(), (() => {
|
|
37010
|
-
var _el$8 = _tmpl$5$
|
|
37032
|
+
var _el$8 = _tmpl$5$3();
|
|
37011
37033
|
insert(_el$8, () => t("toolbar.formatUpperRoman"));
|
|
37012
37034
|
return _el$8;
|
|
37013
37035
|
})(), (() => {
|
|
37014
|
-
var _el$9 = _tmpl$6$
|
|
37036
|
+
var _el$9 = _tmpl$6$2();
|
|
37015
37037
|
insert(_el$9, () => t("toolbar.formatBullet"));
|
|
37016
37038
|
return _el$9;
|
|
37017
37039
|
})()];
|
|
@@ -37024,7 +37046,7 @@ function ListOptionsControl(props) {
|
|
|
37024
37046
|
}
|
|
37025
37047
|
});
|
|
37026
37048
|
}
|
|
37027
|
-
var _tmpl$$
|
|
37049
|
+
var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0.5 step=0.05 data-testid=editor-line-spacing-dialog-line-height>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-before></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-after>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`), _tmpl$4$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary"data-testid=editor-line-spacing-dialog-cancel>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary"data-testid=editor-line-spacing-dialog-apply>`);
|
|
37028
37050
|
function LineSpacingDialog(props) {
|
|
37029
37051
|
const [lineHeight, setLineHeight] = createSignal("");
|
|
37030
37052
|
const [spacingBefore, setSpacingBefore] = createSignal("");
|
|
@@ -37067,12 +37089,12 @@ function LineSpacingDialog(props) {
|
|
|
37067
37089
|
},
|
|
37068
37090
|
get footer() {
|
|
37069
37091
|
return [(() => {
|
|
37070
|
-
var _el$14 = _tmpl$4$
|
|
37092
|
+
var _el$14 = _tmpl$4$2();
|
|
37071
37093
|
addEventListener(_el$14, "click", props.onClose, true);
|
|
37072
37094
|
insert(_el$14, () => t("generic.cancel"));
|
|
37073
37095
|
return _el$14;
|
|
37074
37096
|
})(), (() => {
|
|
37075
|
-
var _el$15 = _tmpl$5$
|
|
37097
|
+
var _el$15 = _tmpl$5$2();
|
|
37076
37098
|
_el$15.$$click = handleApply;
|
|
37077
37099
|
insert(_el$15, () => t("generic.apply"));
|
|
37078
37100
|
return _el$15;
|
|
@@ -37080,13 +37102,13 @@ function LineSpacingDialog(props) {
|
|
|
37080
37102
|
},
|
|
37081
37103
|
get children() {
|
|
37082
37104
|
return [(() => {
|
|
37083
|
-
var _el$ = _tmpl$$
|
|
37105
|
+
var _el$ = _tmpl$$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
37084
37106
|
insert(_el$3, () => t("lineSpacing.lineSpacingLabel"));
|
|
37085
37107
|
_el$4.$$input = (e) => setLineHeight(e.currentTarget.value);
|
|
37086
37108
|
createRenderEffect(() => _el$4.value = lineHeight());
|
|
37087
37109
|
return _el$;
|
|
37088
37110
|
})(), (() => {
|
|
37089
|
-
var _el$5 = _tmpl$2$
|
|
37111
|
+
var _el$5 = _tmpl$2$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
37090
37112
|
insert(_el$7, () => t("lineSpacing.spacingBeforeLabel"));
|
|
37091
37113
|
_el$8.$$input = (e) => setSpacingBefore(e.currentTarget.value);
|
|
37092
37114
|
insert(_el$0, () => t("lineSpacing.spacingAfterLabel"));
|
|
@@ -37095,7 +37117,7 @@ function LineSpacingDialog(props) {
|
|
|
37095
37117
|
createRenderEffect(() => _el$1.value = spacingAfter());
|
|
37096
37118
|
return _el$5;
|
|
37097
37119
|
})(), (() => {
|
|
37098
|
-
var _el$10 = _tmpl$3$
|
|
37120
|
+
var _el$10 = _tmpl$3$2(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild;
|
|
37099
37121
|
insert(_el$11, () => t("lineSpacing.preview"));
|
|
37100
37122
|
insert(_el$12, () => t("lineSpacing.previewText"), _el$13);
|
|
37101
37123
|
insert(_el$12, () => t("lineSpacing.previewText"), null);
|
|
@@ -37106,7 +37128,7 @@ function LineSpacingDialog(props) {
|
|
|
37106
37128
|
});
|
|
37107
37129
|
}
|
|
37108
37130
|
delegateEvents(["input", "click"]);
|
|
37109
|
-
var _tmpl$$
|
|
37131
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$3 = /* @__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$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$1 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-line-spacing-button"aria-haspopup=menu data-testid=editor-toolbar-line-spacing><span class=oasis-editor-line-spacing-icon aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="4 7 7 4 10 7"></polyline><line x1=7 y1=4 x2=7 y2=20></line><polyline points="4 17 7 20 10 17"></polyline><line x1=13 y1=6 x2=21 y2=6></line><line x1=13 y1=12 x2=21 y2=12></line><line x1=13 y1=18 x2=21 y2=18>`), _tmpl$5$1 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">`), _tmpl$6$1 = /* @__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>`);
|
|
37110
37132
|
const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
|
|
37111
37133
|
function formatPreset(value) {
|
|
37112
37134
|
return value.toFixed(value === Math.floor(value) ? 1 : 2);
|
|
@@ -37163,7 +37185,7 @@ function LineSpacingButton(props) {
|
|
|
37163
37185
|
api.focusEditor();
|
|
37164
37186
|
};
|
|
37165
37187
|
return (() => {
|
|
37166
|
-
var _el$ = _tmpl$3();
|
|
37188
|
+
var _el$ = _tmpl$3$1();
|
|
37167
37189
|
insert(_el$, createComponent(Popover, {
|
|
37168
37190
|
get open() {
|
|
37169
37191
|
return isOpen();
|
|
@@ -37172,7 +37194,7 @@ function LineSpacingButton(props) {
|
|
|
37172
37194
|
panelRole: "menu",
|
|
37173
37195
|
panelClass: "oasis-editor-toolbar-dropdown-menu oasis-editor-line-spacing-menu",
|
|
37174
37196
|
trigger: (popover) => (() => {
|
|
37175
|
-
var _el$6 = _tmpl$4();
|
|
37197
|
+
var _el$6 = _tmpl$4$1();
|
|
37176
37198
|
_el$6.$$click = () => popover.toggle();
|
|
37177
37199
|
use((el) => popover.ref(el), _el$6);
|
|
37178
37200
|
createRenderEffect((_p$) => {
|
|
@@ -37200,14 +37222,14 @@ function LineSpacingButton(props) {
|
|
|
37200
37222
|
return lh !== null && approxEqual(lh, value);
|
|
37201
37223
|
};
|
|
37202
37224
|
return (() => {
|
|
37203
|
-
var _el$7 = _tmpl$6(), _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
|
|
37225
|
+
var _el$7 = _tmpl$6$1(), _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
|
|
37204
37226
|
_el$7.$$click = () => applyPreset(value);
|
|
37205
37227
|
insert(_el$8, createComponent(Show, {
|
|
37206
37228
|
get when() {
|
|
37207
37229
|
return isActive();
|
|
37208
37230
|
},
|
|
37209
37231
|
get children() {
|
|
37210
|
-
return _tmpl$5();
|
|
37232
|
+
return _tmpl$5$1();
|
|
37211
37233
|
}
|
|
37212
37234
|
}));
|
|
37213
37235
|
insert(_el$0, label);
|
|
@@ -37227,8 +37249,8 @@ function LineSpacingButton(props) {
|
|
|
37227
37249
|
return _el$7;
|
|
37228
37250
|
})();
|
|
37229
37251
|
}
|
|
37230
|
-
}), _tmpl$$
|
|
37231
|
-
var _el$3 = _tmpl$2$
|
|
37252
|
+
}), _tmpl$$4(), (() => {
|
|
37253
|
+
var _el$3 = _tmpl$2$3(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
37232
37254
|
_el$3.$$click = openDialog;
|
|
37233
37255
|
insert(_el$5, () => t("metric.lineSpacingOptions"));
|
|
37234
37256
|
return _el$3;
|
|
@@ -37260,7 +37282,7 @@ function LineSpacingButton(props) {
|
|
|
37260
37282
|
})();
|
|
37261
37283
|
}
|
|
37262
37284
|
delegateEvents(["click"]);
|
|
37263
|
-
var _tmpl$$
|
|
37285
|
+
var _tmpl$$3 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-spacing-after min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-left min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-first-line step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-hanging min=0 step=1></label><label class=oasis-editor-tool-color><span></span><input type=color class=oasis-editor-tool-color-input data-testid=editor-toolbar-paragraph-shading>`);
|
|
37264
37286
|
const numValue = (api, command) => {
|
|
37265
37287
|
const value = api.commands.state(command).value;
|
|
37266
37288
|
return value == null ? "" : String(value);
|
|
@@ -37279,7 +37301,7 @@ function MetricGroup(props) {
|
|
|
37279
37301
|
keepMounted: true,
|
|
37280
37302
|
get children() {
|
|
37281
37303
|
return [(() => {
|
|
37282
|
-
var _el$ = _tmpl$$
|
|
37304
|
+
var _el$ = _tmpl$$3();
|
|
37283
37305
|
insert(_el$, createComponent(Button$1, {
|
|
37284
37306
|
icon: "file-up",
|
|
37285
37307
|
get active() {
|
|
@@ -37304,7 +37326,7 @@ function MetricGroup(props) {
|
|
|
37304
37326
|
}), null);
|
|
37305
37327
|
return _el$;
|
|
37306
37328
|
})(), (() => {
|
|
37307
|
-
var _el$2 = _tmpl$2$
|
|
37329
|
+
var _el$2 = _tmpl$2$2(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
|
|
37308
37330
|
insert(_el$4, () => t("metric.after"));
|
|
37309
37331
|
addEventListener(_el$5, "change", onNumber("setSpacingAfter"));
|
|
37310
37332
|
insert(_el$7, () => t("metric.indent"));
|
|
@@ -37349,7 +37371,7 @@ function MetricGroup(props) {
|
|
|
37349
37371
|
});
|
|
37350
37372
|
}
|
|
37351
37373
|
delegateEvents(["input"]);
|
|
37352
|
-
var _tmpl$$
|
|
37374
|
+
var _tmpl$$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-badge data-testid=editor-table-selection-label>`);
|
|
37353
37375
|
function TableGroup(props) {
|
|
37354
37376
|
const api = props.api;
|
|
37355
37377
|
const disabled = (command) => !api.commands.state(command).isEnabled;
|
|
@@ -37365,7 +37387,7 @@ function TableGroup(props) {
|
|
|
37365
37387
|
keepMounted: true,
|
|
37366
37388
|
get children() {
|
|
37367
37389
|
return [(() => {
|
|
37368
|
-
var _el$ = _tmpl$$
|
|
37390
|
+
var _el$ = _tmpl$$2();
|
|
37369
37391
|
insert(_el$, createComponent(Button$1, {
|
|
37370
37392
|
icon: "combine",
|
|
37371
37393
|
"data-testid": "editor-toolbar-merge-table",
|
|
@@ -37390,7 +37412,7 @@ function TableGroup(props) {
|
|
|
37390
37412
|
}), null);
|
|
37391
37413
|
return _el$;
|
|
37392
37414
|
})(), (() => {
|
|
37393
|
-
var _el$2 = _tmpl$$
|
|
37415
|
+
var _el$2 = _tmpl$$2();
|
|
37394
37416
|
insert(_el$2, createComponent(Button$1, {
|
|
37395
37417
|
icon: "columns",
|
|
37396
37418
|
"data-testid": "editor-toolbar-insert-table-column-before",
|
|
@@ -37426,7 +37448,7 @@ function TableGroup(props) {
|
|
|
37426
37448
|
}), null);
|
|
37427
37449
|
return _el$2;
|
|
37428
37450
|
})(), (() => {
|
|
37429
|
-
var _el$3 = _tmpl$$
|
|
37451
|
+
var _el$3 = _tmpl$$2();
|
|
37430
37452
|
insert(_el$3, createComponent(Button$1, {
|
|
37431
37453
|
icon: "rows",
|
|
37432
37454
|
"data-testid": "editor-toolbar-insert-table-row-before",
|
|
@@ -37462,7 +37484,7 @@ function TableGroup(props) {
|
|
|
37462
37484
|
}), null);
|
|
37463
37485
|
return _el$3;
|
|
37464
37486
|
})(), (() => {
|
|
37465
|
-
var _el$4 = _tmpl$$
|
|
37487
|
+
var _el$4 = _tmpl$$2();
|
|
37466
37488
|
insert(_el$4, createComponent(Button$1, {
|
|
37467
37489
|
icon: "palette",
|
|
37468
37490
|
"data-testid": "editor-toolbar-table-shading",
|
|
@@ -37492,7 +37514,7 @@ function TableGroup(props) {
|
|
|
37492
37514
|
}), null);
|
|
37493
37515
|
return _el$4;
|
|
37494
37516
|
})(), (() => {
|
|
37495
|
-
var _el$5 = _tmpl$$
|
|
37517
|
+
var _el$5 = _tmpl$$2();
|
|
37496
37518
|
insert(_el$5, createComponent(Button$1, {
|
|
37497
37519
|
icon: "maximize",
|
|
37498
37520
|
"data-testid": "editor-toolbar-table-width-100",
|
|
@@ -37503,7 +37525,7 @@ function TableGroup(props) {
|
|
|
37503
37525
|
}));
|
|
37504
37526
|
return _el$5;
|
|
37505
37527
|
})(), (() => {
|
|
37506
|
-
var _el$6 = _tmpl$$
|
|
37528
|
+
var _el$6 = _tmpl$$2();
|
|
37507
37529
|
insert(_el$6, createComponent(Button$1, {
|
|
37508
37530
|
icon: "align-left",
|
|
37509
37531
|
"data-testid": "editor-toolbar-table-align-left",
|
|
@@ -37545,7 +37567,7 @@ function TableGroup(props) {
|
|
|
37545
37567
|
return selectionLabel();
|
|
37546
37568
|
},
|
|
37547
37569
|
children: (label) => (() => {
|
|
37548
|
-
var _el$7 = _tmpl$2();
|
|
37570
|
+
var _el$7 = _tmpl$2$1();
|
|
37549
37571
|
insert(_el$7, label);
|
|
37550
37572
|
return _el$7;
|
|
37551
37573
|
})()
|
|
@@ -37553,7 +37575,7 @@ function TableGroup(props) {
|
|
|
37553
37575
|
}
|
|
37554
37576
|
});
|
|
37555
37577
|
}
|
|
37556
|
-
var _tmpl
|
|
37578
|
+
var _tmpl$$1 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
|
|
37557
37579
|
function SectionGroup(props) {
|
|
37558
37580
|
const api = props.api;
|
|
37559
37581
|
return createComponent(Menu, {
|
|
@@ -37567,7 +37589,7 @@ function SectionGroup(props) {
|
|
|
37567
37589
|
keepMounted: true,
|
|
37568
37590
|
get children() {
|
|
37569
37591
|
return [(() => {
|
|
37570
|
-
var _el$ = _tmpl
|
|
37592
|
+
var _el$ = _tmpl$$1();
|
|
37571
37593
|
insert(_el$, createComponent(Button$1, {
|
|
37572
37594
|
icon: "rectangle-vertical",
|
|
37573
37595
|
get active() {
|
|
@@ -37598,7 +37620,7 @@ function SectionGroup(props) {
|
|
|
37598
37620
|
}), null);
|
|
37599
37621
|
return _el$;
|
|
37600
37622
|
})(), (() => {
|
|
37601
|
-
var _el$2 = _tmpl
|
|
37623
|
+
var _el$2 = _tmpl$$1();
|
|
37602
37624
|
insert(_el$2, createComponent(Button$1, {
|
|
37603
37625
|
icon: "scissors",
|
|
37604
37626
|
"data-testid": "editor-toolbar-section-break-next",
|
|
@@ -37620,6 +37642,202 @@ function SectionGroup(props) {
|
|
|
37620
37642
|
}
|
|
37621
37643
|
});
|
|
37622
37644
|
}
|
|
37645
|
+
const CM_TO_PX = 96 / 2.54;
|
|
37646
|
+
function cmToPx(cm) {
|
|
37647
|
+
return Math.round(cm * CM_TO_PX);
|
|
37648
|
+
}
|
|
37649
|
+
function pxToCm(px) {
|
|
37650
|
+
return Math.round(px / CM_TO_PX * 100) / 100;
|
|
37651
|
+
}
|
|
37652
|
+
const MARGIN_PRESETS = [
|
|
37653
|
+
{
|
|
37654
|
+
id: "normal",
|
|
37655
|
+
labelKey: "section.marginPreset.normal",
|
|
37656
|
+
top: 2.5,
|
|
37657
|
+
bottom: 2.5,
|
|
37658
|
+
left: 3,
|
|
37659
|
+
right: 3
|
|
37660
|
+
},
|
|
37661
|
+
{
|
|
37662
|
+
id: "narrow",
|
|
37663
|
+
labelKey: "section.marginPreset.narrow",
|
|
37664
|
+
top: 1.27,
|
|
37665
|
+
bottom: 1.27,
|
|
37666
|
+
left: 1.27,
|
|
37667
|
+
right: 1.27
|
|
37668
|
+
},
|
|
37669
|
+
{
|
|
37670
|
+
id: "moderate",
|
|
37671
|
+
labelKey: "section.marginPreset.moderate",
|
|
37672
|
+
top: 2.54,
|
|
37673
|
+
bottom: 2.54,
|
|
37674
|
+
left: 1.91,
|
|
37675
|
+
right: 1.91
|
|
37676
|
+
},
|
|
37677
|
+
{
|
|
37678
|
+
id: "wide",
|
|
37679
|
+
labelKey: "section.marginPreset.wide",
|
|
37680
|
+
top: 2.54,
|
|
37681
|
+
bottom: 2.54,
|
|
37682
|
+
left: 5.08,
|
|
37683
|
+
right: 5.08
|
|
37684
|
+
},
|
|
37685
|
+
{
|
|
37686
|
+
id: "mirrored",
|
|
37687
|
+
labelKey: "section.marginPreset.mirrored",
|
|
37688
|
+
top: 2.54,
|
|
37689
|
+
bottom: 2.54,
|
|
37690
|
+
left: 3.18,
|
|
37691
|
+
right: 2.54
|
|
37692
|
+
}
|
|
37693
|
+
];
|
|
37694
|
+
function presetMarginsPx(preset) {
|
|
37695
|
+
return {
|
|
37696
|
+
top: cmToPx(preset.top),
|
|
37697
|
+
bottom: cmToPx(preset.bottom),
|
|
37698
|
+
left: cmToPx(preset.left),
|
|
37699
|
+
right: cmToPx(preset.right)
|
|
37700
|
+
};
|
|
37701
|
+
}
|
|
37702
|
+
function marginsMatchPreset(margins, preset) {
|
|
37703
|
+
const target = presetMarginsPx(preset);
|
|
37704
|
+
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;
|
|
37705
|
+
}
|
|
37706
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3 = /* @__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 = /* @__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 = /* @__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 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
|
|
37707
|
+
const FIELDS = [{
|
|
37708
|
+
key: "top",
|
|
37709
|
+
labelKey: "section.marginField.top"
|
|
37710
|
+
}, {
|
|
37711
|
+
key: "bottom",
|
|
37712
|
+
labelKey: "section.marginField.bottom"
|
|
37713
|
+
}, {
|
|
37714
|
+
key: "left",
|
|
37715
|
+
labelKey: "section.marginField.left"
|
|
37716
|
+
}, {
|
|
37717
|
+
key: "right",
|
|
37718
|
+
labelKey: "section.marginField.right"
|
|
37719
|
+
}];
|
|
37720
|
+
function formatCm(cm) {
|
|
37721
|
+
return t("section.marginValue", [String(cm).replace(".", t("number.decimalSeparator"))]);
|
|
37722
|
+
}
|
|
37723
|
+
function MarginsGroup(props) {
|
|
37724
|
+
const api = props.api;
|
|
37725
|
+
const [showCustom, setShowCustom] = createSignal(false);
|
|
37726
|
+
const [draft, setDraft] = createSignal({});
|
|
37727
|
+
const current = createMemo(() => api.commands.state("setPageMargins").value);
|
|
37728
|
+
const activePresetId = createMemo(() => {
|
|
37729
|
+
var _a;
|
|
37730
|
+
const margins = current();
|
|
37731
|
+
if (!margins) return void 0;
|
|
37732
|
+
return (_a = MARGIN_PRESETS.find((preset) => marginsMatchPreset(margins, preset))) == null ? void 0 : _a.id;
|
|
37733
|
+
});
|
|
37734
|
+
const applyPreset = (preset) => {
|
|
37735
|
+
api.commands.execute("setPageMargins", presetMarginsPx(preset));
|
|
37736
|
+
api.focusEditor();
|
|
37737
|
+
};
|
|
37738
|
+
const openCustom = () => {
|
|
37739
|
+
const margins = current();
|
|
37740
|
+
setDraft({
|
|
37741
|
+
top: margins ? String(pxToCm(margins.top)) : "",
|
|
37742
|
+
bottom: margins ? String(pxToCm(margins.bottom)) : "",
|
|
37743
|
+
left: margins ? String(pxToCm(margins.left)) : "",
|
|
37744
|
+
right: margins ? String(pxToCm(margins.right)) : ""
|
|
37745
|
+
});
|
|
37746
|
+
setShowCustom((v) => !v);
|
|
37747
|
+
};
|
|
37748
|
+
const applyCustom = () => {
|
|
37749
|
+
const d = draft();
|
|
37750
|
+
const payload = {};
|
|
37751
|
+
for (const {
|
|
37752
|
+
key
|
|
37753
|
+
} of FIELDS) {
|
|
37754
|
+
const raw = d[key];
|
|
37755
|
+
if (raw == null || raw === "") continue;
|
|
37756
|
+
const cm = Number(raw.replace(",", "."));
|
|
37757
|
+
if (Number.isFinite(cm) && cm >= 0) payload[key] = cmToPx(cm);
|
|
37758
|
+
}
|
|
37759
|
+
if (Object.keys(payload).length > 0) {
|
|
37760
|
+
api.commands.execute("setPageMargins", payload);
|
|
37761
|
+
}
|
|
37762
|
+
api.focusEditor();
|
|
37763
|
+
};
|
|
37764
|
+
return createComponent(Menu, {
|
|
37765
|
+
icon: "square-dashed",
|
|
37766
|
+
get label() {
|
|
37767
|
+
return t("section.margins");
|
|
37768
|
+
},
|
|
37769
|
+
testId: "editor-toolbar-margins-dropdown",
|
|
37770
|
+
get tooltip() {
|
|
37771
|
+
return t("section.margins");
|
|
37772
|
+
},
|
|
37773
|
+
panelClass: "oasis-editor-toolbar-panel oasis-editor-margins-panel",
|
|
37774
|
+
keepMounted: true,
|
|
37775
|
+
get children() {
|
|
37776
|
+
return [(() => {
|
|
37777
|
+
var _el$ = _tmpl$();
|
|
37778
|
+
insert(_el$, createComponent(For, {
|
|
37779
|
+
each: MARGIN_PRESETS,
|
|
37780
|
+
children: (preset) => (() => {
|
|
37781
|
+
var _el$9 = _tmpl$5(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
37782
|
+
_el$9.$$click = () => applyPreset(preset);
|
|
37783
|
+
insert(_el$0, () => t(preset.labelKey));
|
|
37784
|
+
insert(_el$1, () => `${t("section.marginField.top")} ${formatCm(preset.top)} ${t("section.marginField.bottom")} ${formatCm(preset.bottom)}`, _el$10);
|
|
37785
|
+
insert(_el$1, () => `${t("section.marginField.left")} ${formatCm(preset.left)} ${t("section.marginField.right")} ${formatCm(preset.right)}`, null);
|
|
37786
|
+
createRenderEffect((_p$) => {
|
|
37787
|
+
var _v$ = !!(activePresetId() === preset.id), _v$2 = `editor-toolbar-margins-${preset.id}`;
|
|
37788
|
+
_v$ !== _p$.e && _el$9.classList.toggle("oasis-editor-margins-item-active", _p$.e = _v$);
|
|
37789
|
+
_v$2 !== _p$.t && setAttribute(_el$9, "data-testid", _p$.t = _v$2);
|
|
37790
|
+
return _p$;
|
|
37791
|
+
}, {
|
|
37792
|
+
e: void 0,
|
|
37793
|
+
t: void 0
|
|
37794
|
+
});
|
|
37795
|
+
return _el$9;
|
|
37796
|
+
})()
|
|
37797
|
+
}));
|
|
37798
|
+
return _el$;
|
|
37799
|
+
})(), (() => {
|
|
37800
|
+
var _el$2 = _tmpl$3(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
37801
|
+
_el$3.$$click = openCustom;
|
|
37802
|
+
insert(_el$5, () => t("section.marginPreset.custom"));
|
|
37803
|
+
insert(_el$2, createComponent(Show, {
|
|
37804
|
+
get when() {
|
|
37805
|
+
return showCustom();
|
|
37806
|
+
},
|
|
37807
|
+
get children() {
|
|
37808
|
+
var _el$6 = _tmpl$2();
|
|
37809
|
+
insert(_el$6, createComponent(For, {
|
|
37810
|
+
each: FIELDS,
|
|
37811
|
+
children: (field) => (() => {
|
|
37812
|
+
var _el$11 = _tmpl$6(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
|
|
37813
|
+
insert(_el$12, () => t(field.labelKey));
|
|
37814
|
+
_el$13.$$input = (e) => setDraft((d) => ({
|
|
37815
|
+
...d,
|
|
37816
|
+
[field.key]: e.currentTarget.value
|
|
37817
|
+
}));
|
|
37818
|
+
createRenderEffect(() => _el$13.value = draft()[field.key] ?? "");
|
|
37819
|
+
return _el$11;
|
|
37820
|
+
})()
|
|
37821
|
+
}));
|
|
37822
|
+
return _el$6;
|
|
37823
|
+
}
|
|
37824
|
+
}), null);
|
|
37825
|
+
return _el$2;
|
|
37826
|
+
})(), createComponent(Show, {
|
|
37827
|
+
get when() {
|
|
37828
|
+
return showCustom();
|
|
37829
|
+
},
|
|
37830
|
+
get children() {
|
|
37831
|
+
var _el$7 = _tmpl$4(), _el$8 = _el$7.firstChild;
|
|
37832
|
+
_el$8.$$click = applyCustom;
|
|
37833
|
+
insert(_el$8, () => t("section.marginApply"));
|
|
37834
|
+
return _el$7;
|
|
37835
|
+
}
|
|
37836
|
+
})];
|
|
37837
|
+
}
|
|
37838
|
+
});
|
|
37839
|
+
}
|
|
37840
|
+
delegateEvents(["click", "input"]);
|
|
37623
37841
|
const mod = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
|
|
37624
37842
|
const documentStyles = (api) => api.commands.state("documentStyles").value ?? [];
|
|
37625
37843
|
const fontFamilyOptions = (api) => {
|
|
@@ -37763,6 +37981,7 @@ const RIBBON_PLACEMENTS = {
|
|
|
37763
37981
|
"sep-metrics": { tab: "layout", group: "paragraph", row: 2 },
|
|
37764
37982
|
"editor-toolbar-table": { tab: "layout", group: "table", row: 1 },
|
|
37765
37983
|
"sep-table": { tab: "layout", group: "table", row: 2 },
|
|
37984
|
+
"editor-toolbar-margins": { tab: "layout", group: "section", row: 1 },
|
|
37766
37985
|
"editor-toolbar-section": { tab: "layout", group: "section", row: 1 }
|
|
37767
37986
|
};
|
|
37768
37987
|
function withDefaultRibbonPlacement(items) {
|
|
@@ -38265,6 +38484,11 @@ function createDefaultToolbarPreset() {
|
|
|
38265
38484
|
id: "sep-table",
|
|
38266
38485
|
isVisible: (api) => api.commands.state("tableContext").isActive
|
|
38267
38486
|
});
|
|
38487
|
+
items.push({
|
|
38488
|
+
type: "custom",
|
|
38489
|
+
id: "editor-toolbar-margins",
|
|
38490
|
+
render: (api) => MarginsGroup({ api })
|
|
38491
|
+
});
|
|
38268
38492
|
items.push({
|
|
38269
38493
|
type: "custom",
|
|
38270
38494
|
id: "editor-toolbar-section",
|