oasis-editor 0.0.115 → 0.0.117

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.
Files changed (50) hide show
  1. package/dist/{OasisEditorApp-C1dyjJoH.js → OasisEditorApp-DijR5F-O.js} +2183 -907
  2. package/dist/adapters/react.d.ts +11 -0
  3. package/dist/adapters/ui.d.ts +2 -0
  4. package/dist/adapters/vue.d.ts +23 -0
  5. package/dist/assets/{importDocxWorker-D0F0jbcF.js → importDocxWorker-nIS-zjkj.js} +1 -1
  6. package/dist/core/html/inlineImageParser.d.ts +7 -0
  7. package/dist/core/layoutConstants.d.ts +18 -0
  8. package/dist/{index-Cq3YFYX2.js → index-Comlrue1.js} +779 -738
  9. package/dist/layoutProjection/blocksPaginationTypes.d.ts +2 -0
  10. package/dist/layoutProjection/constants.d.ts +7 -1
  11. package/dist/layoutProjection/footnotePagination.d.ts +0 -1
  12. package/dist/layoutProjection/headerFooterLayoutContext.d.ts +2 -0
  13. package/dist/layoutProjection/paginationTrack.d.ts +2 -0
  14. package/dist/layoutProjection/paragraphPagination.d.ts +8 -3
  15. package/dist/layoutProjection/sectionPagination.d.ts +3 -0
  16. package/dist/layoutProjection/tableRowSlicing.d.ts +2 -1
  17. package/dist/oasis-editor.css +1 -1
  18. package/dist/oasis-editor.js +55 -55
  19. package/dist/oasis-editor.umd.cjs +4 -4
  20. package/dist/react.d.ts +7 -8
  21. package/dist/react.js +18 -22
  22. package/dist/ui/canvas/table/prepareCells.d.ts +1 -1
  23. package/dist/ui/canvas/table/resolveRowHeights.d.ts +1 -1
  24. package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +2 -99
  25. package/dist/ui/components/Dialogs/font-dialog/FontTab.d.ts +2 -1
  26. package/dist/ui/components/Dialogs/table-properties/AltTextTabPanel.d.ts +3 -0
  27. package/dist/ui/components/Dialogs/table-properties/CellTabPanel.d.ts +3 -0
  28. package/dist/ui/components/Dialogs/table-properties/ColumnTabPanel.d.ts +3 -0
  29. package/dist/ui/components/Dialogs/table-properties/RowTabPanel.d.ts +3 -0
  30. package/dist/ui/components/Dialogs/table-properties/TablePropertiesController.d.ts +12 -0
  31. package/dist/ui/components/Dialogs/table-properties/TablePropertiesTypes.d.ts +160 -0
  32. package/dist/ui/components/Dialogs/table-properties/TableTabPanel.d.ts +6 -0
  33. package/dist/ui/components/Dialogs/table-properties/fields.d.ts +9 -0
  34. package/dist/ui/components/Dialogs/table-properties/useTablePropertiesController.d.ts +4 -0
  35. package/dist/ui/components/FindReplace/FindReplaceDialog.d.ts +1 -2
  36. package/dist/ui/components/Menubar/Menubar.d.ts +1 -2
  37. package/dist/ui/components/PageBreak.d.ts +1 -1
  38. package/dist/ui/components/Toolbar/primitives/useSurfaceRect.d.ts +20 -0
  39. package/dist/ui/public/FieldRow.d.ts +13 -0
  40. package/dist/ui/public/NumberField.d.ts +13 -0
  41. package/dist/ui/public/Radio.d.ts +38 -0
  42. package/dist/ui/public/ToggleChip.d.ts +14 -0
  43. package/dist/ui/public/index.d.ts +8 -0
  44. package/dist/ui.d.ts +2 -42
  45. package/dist/ui.js +19 -18
  46. package/dist/utils/performanceMetrics.d.ts +0 -6
  47. package/dist/utils/round.d.ts +7 -0
  48. package/dist/vue.d.ts +22 -8
  49. package/dist/vue.js +18 -24
  50. package/package.json +9 -6
@@ -2440,14 +2440,14 @@ function I18nProvider(props) {
2440
2440
  });
2441
2441
  }
2442
2442
  const oasisMarkBase64 = "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";
2443
- var _tmpl$$U = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2443
+ var _tmpl$$V = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2444
2444
  const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
2445
2445
  const MARK_ASPECT = 3 / 4;
2446
2446
  function OasisBrandMark(props) {
2447
2447
  const height = () => props.height ?? 64;
2448
2448
  const width = () => Math.round(height() * MARK_ASPECT);
2449
2449
  return (() => {
2450
- var _el$ = _tmpl$$U();
2450
+ var _el$ = _tmpl$$V();
2451
2451
  setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
2452
2452
  setAttribute(_el$, "draggable", false);
2453
2453
  createRenderEffect((_p$) => {
@@ -2464,7 +2464,7 @@ function OasisBrandMark(props) {
2464
2464
  return _el$;
2465
2465
  })();
2466
2466
  }
2467
- var _tmpl$$T = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$B = /* @__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$q = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2467
+ var _tmpl$$U = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$A = /* @__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$p = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2468
2468
  function OasisEditorLoading(props) {
2469
2469
  const t = useI18n();
2470
2470
  const variant = () => props.variant ?? "overlay";
@@ -2474,7 +2474,7 @@ function OasisEditorLoading(props) {
2474
2474
  };
2475
2475
  const isDone = () => (pct() ?? 0) >= 100;
2476
2476
  return (() => {
2477
- var _el$ = _tmpl$2$B(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2477
+ var _el$ = _tmpl$2$A(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2478
2478
  insert(_el$2, createComponent(OasisBrandMark, {
2479
2479
  height: 40,
2480
2480
  "class": "oasis-editor-loading-mark"
@@ -2485,10 +2485,10 @@ function OasisEditorLoading(props) {
2485
2485
  return pct() != null;
2486
2486
  },
2487
2487
  get children() {
2488
- var _el$6 = _tmpl$$T();
2488
+ var _el$6 = _tmpl$$U();
2489
2489
  insert(_el$6, (() => {
2490
2490
  var _c$ = memo(() => !!isDone());
2491
- return () => _c$() ? _tmpl$3$q() : `${pct()}%`;
2491
+ return () => _c$() ? _tmpl$3$p() : `${pct()}%`;
2492
2492
  })());
2493
2493
  return _el$6;
2494
2494
  }
@@ -2539,7 +2539,7 @@ function OasisEditorAppLazy(props = {}) {
2539
2539
  onCleanup(() => {
2540
2540
  cancelled = true;
2541
2541
  });
2542
- import("./OasisEditorApp-C1dyjJoH.js").then((m) => {
2542
+ import("./OasisEditorApp-DijR5F-O.js").then((m) => {
2543
2543
  cancelled = true;
2544
2544
  setProgress(1);
2545
2545
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -5096,9 +5096,9 @@ function mount(target, props = {}) {
5096
5096
  unmount: () => client.dispose()
5097
5097
  });
5098
5098
  }
5099
- var _tmpl$$S = /* @__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$A = /* @__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$p = /* @__PURE__ */ template(`<i>`);
5100
- const FootnoteIcon = () => _tmpl$$S();
5101
- const SpecialIndentFirstLineIcon = () => _tmpl$2$A();
5099
+ var _tmpl$$T = /* @__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$z = /* @__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$o = /* @__PURE__ */ template(`<i>`);
5100
+ const FootnoteIcon = () => _tmpl$$T();
5101
+ const SpecialIndentFirstLineIcon = () => _tmpl$2$z();
5102
5102
  const CUSTOM_ICONS = {
5103
5103
  footnote: FootnoteIcon,
5104
5104
  specialIndentFirstLine: SpecialIndentFirstLineIcon
@@ -5113,7 +5113,7 @@ function ToolIcon(props) {
5113
5113
  },
5114
5114
  get fallback() {
5115
5115
  return (() => {
5116
- var _el$3 = _tmpl$3$p();
5116
+ var _el$3 = _tmpl$3$o();
5117
5117
  createRenderEffect(() => setAttribute(_el$3, "data-lucide", props.name));
5118
5118
  return _el$3;
5119
5119
  })();
@@ -5121,7 +5121,7 @@ function ToolIcon(props) {
5121
5121
  children: (render2) => render2()()
5122
5122
  });
5123
5123
  }
5124
- var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$z = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$o = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$f = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$8 = /* @__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>`);
5124
+ var _tmpl$$S = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$y = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$n = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$i = /* @__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$8 = /* @__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>`);
5125
5125
  function Menubar(props) {
5126
5126
  const t = useI18n();
5127
5127
  const [activeMenu, setActiveMenu] = createSignal(null);
@@ -5189,13 +5189,13 @@ function Menubar(props) {
5189
5189
  });
5190
5190
  const topLevelItems = () => pruneTree(menuTree());
5191
5191
  return (() => {
5192
- var _el$ = _tmpl$$R();
5192
+ var _el$ = _tmpl$$S();
5193
5193
  insert(_el$, createComponent(For, {
5194
5194
  get each() {
5195
5195
  return topLevelItems();
5196
5196
  },
5197
5197
  children: (topLevel) => (() => {
5198
- var _el$2 = _tmpl$3$o(), _el$3 = _el$2.firstChild;
5198
+ var _el$2 = _tmpl$3$n(), _el$3 = _el$2.firstChild;
5199
5199
  _el$2.addEventListener("mouseenter", () => {
5200
5200
  if (activeMenu() && activeMenu() !== topLevel.id) {
5201
5201
  setActiveMenu(topLevel.id);
@@ -5215,7 +5215,7 @@ function Menubar(props) {
5215
5215
  return activeMenu() === topLevel.id;
5216
5216
  },
5217
5217
  get children() {
5218
- var _el$4 = _tmpl$2$z();
5218
+ var _el$4 = _tmpl$2$y();
5219
5219
  insert(_el$4, createComponent(For, {
5220
5220
  get each() {
5221
5221
  return topLevel.children;
@@ -5255,7 +5255,7 @@ function MenuNode(props) {
5255
5255
  } = props;
5256
5256
  const isSeparator = (_a = node.item) == null ? void 0 : _a.separator;
5257
5257
  if (isSeparator) {
5258
- return _tmpl$4$j();
5258
+ return _tmpl$4$i();
5259
5259
  }
5260
5260
  const hasChildren = node.children.length > 0;
5261
5261
  const [showSub, setShowSub] = createSignal(false);
@@ -5290,7 +5290,7 @@ function MenuNode(props) {
5290
5290
  return icon();
5291
5291
  },
5292
5292
  get children() {
5293
- var _el$8 = _tmpl$5$f();
5293
+ var _el$8 = _tmpl$5$e();
5294
5294
  insert(_el$8, createComponent(ToolIcon, {
5295
5295
  get name() {
5296
5296
  return icon();
@@ -5343,10 +5343,10 @@ function MenuNode(props) {
5343
5343
  })();
5344
5344
  }
5345
5345
  delegateEvents(["click"]);
5346
- var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5346
+ var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5347
5347
  function TitleBar(props) {
5348
5348
  return (() => {
5349
- var _el$ = _tmpl$$Q(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5349
+ var _el$ = _tmpl$$R(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5350
5350
  insert(_el$3, () => props.children);
5351
5351
  return _el$;
5352
5352
  })();
@@ -5439,7 +5439,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
5439
5439
  );
5440
5440
  return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
5441
5441
  }
5442
- var _tmpl$$P = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$y = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$n = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$i = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$e = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
5442
+ var _tmpl$$Q = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$x = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$m = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
5443
5443
  function OutlinePanel(props) {
5444
5444
  const t = useI18n();
5445
5445
  const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
@@ -5510,13 +5510,13 @@ function OutlinePanel(props) {
5510
5510
  }
5511
5511
  });
5512
5512
  return (() => {
5513
- var _el$ = _tmpl$3$n(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
5513
+ var _el$ = _tmpl$3$m(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
5514
5514
  insert(_el$2, createComponent(Show, {
5515
5515
  get when() {
5516
5516
  return !collapsed();
5517
5517
  },
5518
5518
  get children() {
5519
- var _el$3 = _tmpl$$P();
5519
+ var _el$3 = _tmpl$$Q();
5520
5520
  insert(_el$3, () => t("menu.view.outline") || "Outline");
5521
5521
  return _el$3;
5522
5522
  }
@@ -5527,14 +5527,14 @@ function OutlinePanel(props) {
5527
5527
  return !collapsed();
5528
5528
  },
5529
5529
  get children() {
5530
- var _el$6 = _tmpl$2$y();
5530
+ var _el$6 = _tmpl$2$x();
5531
5531
  insert(_el$6, createComponent(Show, {
5532
5532
  get when() {
5533
5533
  return items().length > 0;
5534
5534
  },
5535
5535
  get fallback() {
5536
5536
  return (() => {
5537
- var _el$7 = _tmpl$4$i();
5537
+ var _el$7 = _tmpl$4$h();
5538
5538
  insert(_el$7, () => t("outline.empty"));
5539
5539
  return _el$7;
5540
5540
  })();
@@ -5545,7 +5545,7 @@ function OutlinePanel(props) {
5545
5545
  return items();
5546
5546
  },
5547
5547
  children: (item) => (() => {
5548
- var _el$8 = _tmpl$5$e();
5548
+ var _el$8 = _tmpl$5$d();
5549
5549
  _el$8.$$click = () => props.onNavigate(item.anchor);
5550
5550
  insert(_el$8, () => item.text);
5551
5551
  createRenderEffect((_p$) => {
@@ -5584,7 +5584,7 @@ function OutlinePanel(props) {
5584
5584
  })();
5585
5585
  }
5586
5586
  delegateEvents(["click"]);
5587
- var _tmpl$$O = /* @__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$x = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
5587
+ var _tmpl$$P = /* @__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$w = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
5588
5588
  function ToolbarOverflowManager(props) {
5589
5589
  const t = useI18n();
5590
5590
  const [overflowCount, setOverflowCount] = createSignal(0);
@@ -5728,7 +5728,7 @@ function ToolbarOverflowManager(props) {
5728
5728
  };
5729
5729
  };
5730
5730
  return (() => {
5731
- var _el$ = _tmpl$$O(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
5731
+ var _el$ = _tmpl$$P(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
5732
5732
  var _ref$ = containerRef;
5733
5733
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
5734
5734
  var _ref$2 = moreMeasureRef;
@@ -5740,7 +5740,7 @@ function ToolbarOverflowManager(props) {
5740
5740
  return items();
5741
5741
  },
5742
5742
  children: (item) => (() => {
5743
- var _el$7 = _tmpl$2$x();
5743
+ var _el$7 = _tmpl$2$w();
5744
5744
  insert(_el$7, item);
5745
5745
  return _el$7;
5746
5746
  })()
@@ -5816,12 +5816,12 @@ function resolveLabel(item, api) {
5816
5816
  if (item.labelKey) return api.t(item.labelKey);
5817
5817
  return void 0;
5818
5818
  }
5819
- var _tmpl$$N = /* @__PURE__ */ template(`<span>`), _tmpl$2$w = /* @__PURE__ */ template(`<button type=button>`);
5819
+ var _tmpl$$O = /* @__PURE__ */ template(`<span>`), _tmpl$2$v = /* @__PURE__ */ template(`<button type=button>`);
5820
5820
  function Button$1(props) {
5821
5821
  const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
5822
5822
  const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
5823
5823
  return (() => {
5824
- var _el$ = _tmpl$2$w();
5824
+ var _el$ = _tmpl$2$v();
5825
5825
  spread(_el$, mergeProps({
5826
5826
  get ["class"]() {
5827
5827
  return `oasis-editor-tool-button ${local.class || ""}`;
@@ -5858,7 +5858,7 @@ function Button$1(props) {
5858
5858
  return local.label;
5859
5859
  },
5860
5860
  get children() {
5861
- var _el$2 = _tmpl$$N();
5861
+ var _el$2 = _tmpl$$O();
5862
5862
  insert(_el$2, () => local.label);
5863
5863
  return _el$2;
5864
5864
  }
@@ -5940,7 +5940,7 @@ function useDismiss(options) {
5940
5940
  });
5941
5941
  });
5942
5942
  }
5943
- var _tmpl$$M = /* @__PURE__ */ template(`<div>`);
5943
+ var _tmpl$$N = /* @__PURE__ */ template(`<div>`);
5944
5944
  function Popover(props) {
5945
5945
  let anchorRef;
5946
5946
  let panelRef;
@@ -5957,7 +5957,7 @@ function Popover(props) {
5957
5957
  closeOnEscape: props.closeOnEscape
5958
5958
  });
5959
5959
  const panel = (portalled) => (() => {
5960
- var _el$ = _tmpl$$M();
5960
+ var _el$ = _tmpl$$N();
5961
5961
  addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
5962
5962
  var _ref$ = panelRef;
5963
5963
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
@@ -6009,12 +6009,12 @@ function Popover(props) {
6009
6009
  }
6010
6010
  })];
6011
6011
  }
6012
- var _tmpl$$L = /* @__PURE__ */ template(`<div>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$m = /* @__PURE__ */ template(`<i>`), _tmpl$4$h = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$d = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$7 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
6012
+ var _tmpl$$M = /* @__PURE__ */ template(`<div>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$l = /* @__PURE__ */ template(`<i>`), _tmpl$4$g = /* @__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$7 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
6013
6013
  function Menu(props) {
6014
6014
  const [open, setOpen] = createSignal(false);
6015
6015
  const ariaLabel = () => props.tooltip || props.label || "";
6016
6016
  return (() => {
6017
- var _el$ = _tmpl$2$v();
6017
+ var _el$ = _tmpl$2$u();
6018
6018
  insert(_el$, createComponent(Popover, {
6019
6019
  get open() {
6020
6020
  return open();
@@ -6037,7 +6037,7 @@ function Menu(props) {
6037
6037
  return props.icon;
6038
6038
  },
6039
6039
  get children() {
6040
- var _el$4 = _tmpl$3$m();
6040
+ var _el$4 = _tmpl$3$l();
6041
6041
  createRenderEffect(() => setAttribute(_el$4, "data-lucide", props.icon));
6042
6042
  return _el$4;
6043
6043
  }
@@ -6047,7 +6047,7 @@ function Menu(props) {
6047
6047
  return props.label;
6048
6048
  },
6049
6049
  get children() {
6050
- var _el$5 = _tmpl$4$h();
6050
+ var _el$5 = _tmpl$4$g();
6051
6051
  insert(_el$5, () => props.label);
6052
6052
  return _el$5;
6053
6053
  }
@@ -6057,7 +6057,7 @@ function Menu(props) {
6057
6057
  return !props.hideChevron;
6058
6058
  },
6059
6059
  get children() {
6060
- return _tmpl$5$d();
6060
+ return _tmpl$5$c();
6061
6061
  }
6062
6062
  }), null);
6063
6063
  createRenderEffect((_p$) => {
@@ -6082,7 +6082,7 @@ function Menu(props) {
6082
6082
  return _el$3;
6083
6083
  })(),
6084
6084
  get children() {
6085
- var _el$2 = _tmpl$$L();
6085
+ var _el$2 = _tmpl$$M();
6086
6086
  _el$2.$$click = (event) => {
6087
6087
  const el = event.target;
6088
6088
  if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
@@ -6097,7 +6097,7 @@ function Menu(props) {
6097
6097
  })();
6098
6098
  }
6099
6099
  delegateEvents(["click"]);
6100
- var _tmpl$$K = /* @__PURE__ */ template(`<select>`);
6100
+ var _tmpl$$L = /* @__PURE__ */ template(`<select>`);
6101
6101
  function Select(props) {
6102
6102
  let selectRef;
6103
6103
  const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value"]);
@@ -6113,7 +6113,7 @@ function Select(props) {
6113
6113
  }
6114
6114
  });
6115
6115
  return (() => {
6116
- var _el$ = _tmpl$$K();
6116
+ var _el$ = _tmpl$$L();
6117
6117
  var _ref$ = selectRef;
6118
6118
  typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
6119
6119
  spread(_el$, mergeProps({
@@ -6140,15 +6140,15 @@ function Select(props) {
6140
6140
  return _el$;
6141
6141
  })();
6142
6142
  }
6143
- var _tmpl$$J = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
6143
+ var _tmpl$$K = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
6144
6144
  function Separator(props) {
6145
6145
  return (() => {
6146
- var _el$ = _tmpl$$J();
6146
+ var _el$ = _tmpl$$K();
6147
6147
  createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
6148
6148
  return _el$;
6149
6149
  })();
6150
6150
  }
6151
- var _tmpl$$I = /* @__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>`);
6151
+ var _tmpl$$J = /* @__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>`);
6152
6152
  function SplitButton(props) {
6153
6153
  return createComponent(Popover, {
6154
6154
  get open() {
@@ -6167,7 +6167,7 @@ function SplitButton(props) {
6167
6167
  return props.onPanelMouseLeave;
6168
6168
  },
6169
6169
  trigger: (api) => (() => {
6170
- var _el$ = _tmpl$$I(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
6170
+ var _el$ = _tmpl$$J(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
6171
6171
  use((el) => api.ref(el), _el$);
6172
6172
  _el$2.$$click = () => props.onMain();
6173
6173
  insert(_el$2, () => props.mainContent);
@@ -6205,7 +6205,7 @@ function SplitButton(props) {
6205
6205
  });
6206
6206
  }
6207
6207
  delegateEvents(["click"]);
6208
- var _tmpl$$H = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$u = /* @__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$l = /* @__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$g = /* @__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$c = /* @__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$6 = /* @__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>`);
6208
+ var _tmpl$$I = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$t = /* @__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$k = /* @__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$f = /* @__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$6 = /* @__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>`);
6209
6209
  const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
6210
6210
  function ColorPicker(props) {
6211
6211
  const [isOpen, setIsOpen] = createSignal(false);
@@ -6270,7 +6270,7 @@ function ColorPicker(props) {
6270
6270
  return clearLabel();
6271
6271
  },
6272
6272
  get children() {
6273
- var _el$ = _tmpl$2$u(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
6273
+ var _el$ = _tmpl$2$t(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
6274
6274
  _el$.$$click = () => applyColor(null);
6275
6275
  insert(_el$2, createComponent(Show, {
6276
6276
  get when() {
@@ -6280,7 +6280,7 @@ function ColorPicker(props) {
6280
6280
  return _tmpl$8$1();
6281
6281
  },
6282
6282
  get children() {
6283
- return _tmpl$$H();
6283
+ return _tmpl$$I();
6284
6284
  }
6285
6285
  }));
6286
6286
  insert(_el$4, clearLabel);
@@ -6288,7 +6288,7 @@ function ColorPicker(props) {
6288
6288
  return _el$;
6289
6289
  }
6290
6290
  }), (() => {
6291
- var _el$5 = _tmpl$3$l(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
6291
+ var _el$5 = _tmpl$3$k(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
6292
6292
  insert(_el$6, () => props.themeColorsLabel);
6293
6293
  insert(_el$7, createComponent(For, {
6294
6294
  get each() {
@@ -6328,7 +6328,7 @@ function ColorPicker(props) {
6328
6328
  }));
6329
6329
  return _el$5;
6330
6330
  })(), (() => {
6331
- var _el$8 = _tmpl$4$g(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
6331
+ var _el$8 = _tmpl$4$f(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
6332
6332
  insert(_el$9, () => props.standardColorsLabel);
6333
6333
  insert(_el$0, createComponent(For, {
6334
6334
  get each() {
@@ -6365,7 +6365,7 @@ function ColorPicker(props) {
6365
6365
  },
6366
6366
  get children() {
6367
6367
  return [(() => {
6368
- var _el$1 = _tmpl$5$c(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
6368
+ var _el$1 = _tmpl$5$b(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
6369
6369
  _el$1.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
6370
6370
  insert(_el$11, () => props.moreColorsLabel);
6371
6371
  createRenderEffect(() => setAttribute(_el$1, "data-testid", `${props.testId}-more-colors`));
@@ -6393,7 +6393,7 @@ function ColorPicker(props) {
6393
6393
  });
6394
6394
  }
6395
6395
  delegateEvents(["click", "input"]);
6396
- var _tmpl$$G = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$t = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$f = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
6396
+ var _tmpl$$H = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$s = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$e = /* @__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>`);
6397
6397
  function GridPicker(props) {
6398
6398
  const t = useI18n();
6399
6399
  const [isOpen, setIsOpen] = createSignal(false);
@@ -6468,7 +6468,7 @@ function GridPicker(props) {
6468
6468
  return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
6469
6469
  };
6470
6470
  return (() => {
6471
- var _el$ = _tmpl$3$k();
6471
+ var _el$ = _tmpl$3$j();
6472
6472
  insert(_el$, createComponent(Popover, {
6473
6473
  get open() {
6474
6474
  return isOpen();
@@ -6480,7 +6480,7 @@ function GridPicker(props) {
6480
6480
  col: 0
6481
6481
  }),
6482
6482
  trigger: (api) => (() => {
6483
- var _el$4 = _tmpl$4$f(), _el$5 = _el$4.firstChild;
6483
+ var _el$4 = _tmpl$4$e(), _el$5 = _el$4.firstChild;
6484
6484
  _el$4.$$click = () => api.toggle();
6485
6485
  use((el) => api.ref(el), _el$4);
6486
6486
  createRenderEffect((_p$) => {
@@ -6502,11 +6502,11 @@ function GridPicker(props) {
6502
6502
  })(),
6503
6503
  get children() {
6504
6504
  return [(() => {
6505
- var _el$2 = _tmpl$$G();
6505
+ var _el$2 = _tmpl$$H();
6506
6506
  insert(_el$2, statusLabel);
6507
6507
  return _el$2;
6508
6508
  })(), (() => {
6509
- var _el$3 = _tmpl$2$t();
6509
+ var _el$3 = _tmpl$2$s();
6510
6510
  insert(_el$3, createComponent(For, {
6511
6511
  get each() {
6512
6512
  return rows();
@@ -6516,7 +6516,7 @@ function GridPicker(props) {
6516
6516
  return cols();
6517
6517
  },
6518
6518
  children: (c) => (() => {
6519
- var _el$6 = _tmpl$5$b();
6519
+ var _el$6 = _tmpl$5$a();
6520
6520
  _el$6.$$click = () => selectGridSize(r, c);
6521
6521
  _el$6.$$mousedown = (event) => event.preventDefault();
6522
6522
  _el$6.addEventListener("mouseenter", () => setHover({
@@ -6606,7 +6606,7 @@ const DEFAULT_PALETTE = {
6606
6606
  standardColors: STANDARD_COLORS,
6607
6607
  allowCustom: true
6608
6608
  };
6609
- var _tmpl$$F = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$s = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery-grid>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery><div class=oasis-editor-style-gallery-ribbon><div class=oasis-editor-style-gallery-strip role=listbox></div><button type=button class=oasis-editor-style-gallery-expand aria-haspopup=listbox><i data-lucide=chevron-down>`), _tmpl$4$e = /* @__PURE__ */ template(`<option>`);
6609
+ var _tmpl$$G = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery-grid>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery><div class=oasis-editor-style-gallery-ribbon><div class=oasis-editor-style-gallery-strip role=listbox></div><button type=button class=oasis-editor-style-gallery-expand aria-haspopup=listbox><i data-lucide=chevron-down>`), _tmpl$4$d = /* @__PURE__ */ template(`<option>`);
6610
6610
  function getQuickStyles(styles) {
6611
6611
  const applicable = styles.filter((style2) => style2.type !== "table" && (!style2.semiHidden || style2.unhideWhenUsed && style2.isUsed));
6612
6612
  const hasQuickStyles = applicable.some((style2) => style2.qFormat === true);
@@ -6686,7 +6686,7 @@ function StyleGallery(props) {
6686
6686
  return styles();
6687
6687
  },
6688
6688
  children: (style$1) => (() => {
6689
- var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild;
6689
+ var _el$ = _tmpl$$G(), _el$2 = _el$.firstChild;
6690
6690
  _el$.$$click = () => apply(style$1);
6691
6691
  insert(_el$2, () => style$1.name);
6692
6692
  createRenderEffect((_p$) => {
@@ -6717,7 +6717,7 @@ function StyleGallery(props) {
6717
6717
  panelRole: "listbox",
6718
6718
  panelTestId,
6719
6719
  trigger: (popover) => (() => {
6720
- var _el$4 = _tmpl$3$j(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
6720
+ var _el$4 = _tmpl$3$i(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
6721
6721
  var _ref$ = popover.ref;
6722
6722
  typeof _ref$ === "function" ? use(_ref$, _el$4) : popover.ref = _el$4;
6723
6723
  insert(_el$4, createComponent(Select, {
@@ -6741,7 +6741,7 @@ function StyleGallery(props) {
6741
6741
  return styles();
6742
6742
  },
6743
6743
  children: (style2) => (() => {
6744
- var _el$8 = _tmpl$4$e();
6744
+ var _el$8 = _tmpl$4$d();
6745
6745
  insert(_el$8, () => style2.name);
6746
6746
  createRenderEffect(() => _el$8.value = style2.id);
6747
6747
  return _el$8;
@@ -6766,7 +6766,7 @@ function StyleGallery(props) {
6766
6766
  return _el$4;
6767
6767
  })(),
6768
6768
  get children() {
6769
- var _el$3 = _tmpl$2$s();
6769
+ var _el$3 = _tmpl$2$r();
6770
6770
  _el$3.$$keydown = onPanelKeyDown;
6771
6771
  insert(_el$3, cards);
6772
6772
  return _el$3;
@@ -6774,7 +6774,7 @@ function StyleGallery(props) {
6774
6774
  });
6775
6775
  }
6776
6776
  delegateEvents(["click", "keydown"]);
6777
- var _tmpl$$E = /* @__PURE__ */ template(`<option value>`), _tmpl$2$r = /* @__PURE__ */ template(`<option>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
6777
+ var _tmpl$$F = /* @__PURE__ */ template(`<option value>`), _tmpl$2$q = /* @__PURE__ */ template(`<option>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
6778
6778
  function renderMenuContent(content, api) {
6779
6779
  if (content.kind === "custom") {
6780
6780
  return content.render(api);
@@ -6956,7 +6956,7 @@ function RenderSelect(props) {
6956
6956
  return props.item.placeholder !== void 0;
6957
6957
  },
6958
6958
  get children() {
6959
- var _el$ = _tmpl$$E();
6959
+ var _el$ = _tmpl$$F();
6960
6960
  insert(_el$, () => props.item.placeholder);
6961
6961
  return _el$;
6962
6962
  }
@@ -6965,7 +6965,7 @@ function RenderSelect(props) {
6965
6965
  return props.item.options(props.api);
6966
6966
  },
6967
6967
  children: (option) => (() => {
6968
- var _el$2 = _tmpl$2$r();
6968
+ var _el$2 = _tmpl$2$q();
6969
6969
  insert(_el$2, () => option.label);
6970
6970
  createRenderEffect(() => _el$2.value = option.value);
6971
6971
  return _el$2;
@@ -7103,7 +7103,7 @@ function ToolbarItemRenderer(props) {
7103
7103
  const binding = bindItem(props.item, props.api);
7104
7104
  const component = () => resolveRenderer(props.item.type);
7105
7105
  return (() => {
7106
- var _el$3 = _tmpl$3$i();
7106
+ var _el$3 = _tmpl$3$h();
7107
7107
  insert(_el$3, createComponent(Show, {
7108
7108
  get when() {
7109
7109
  return component();
@@ -7514,7 +7514,7 @@ function resolveResponsiveRibbonGroups(groups, availableWidth, measurements = {}
7514
7514
  allocatedWidth: allocatedWidths.get(group.id)
7515
7515
  }));
7516
7516
  }
7517
- var _tmpl$$D = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$q = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
7517
+ var _tmpl$$E = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$p = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
7518
7518
  function RibbonTabs(props) {
7519
7519
  const tabs = buildRibbonTabDefinitions(useI18n());
7520
7520
  const moveTab = (current, delta) => {
@@ -7523,11 +7523,11 @@ function RibbonTabs(props) {
7523
7523
  if (next) props.setActiveTab(next.id);
7524
7524
  };
7525
7525
  return (() => {
7526
- var _el$ = _tmpl$$D();
7526
+ var _el$ = _tmpl$$E();
7527
7527
  insert(_el$, createComponent(For, {
7528
7528
  each: tabs,
7529
7529
  children: (tab) => (() => {
7530
- var _el$2 = _tmpl$2$q();
7530
+ var _el$2 = _tmpl$2$p();
7531
7531
  _el$2.$$keydown = (event) => {
7532
7532
  if (event.key === "ArrowRight") {
7533
7533
  event.preventDefault();
@@ -7569,10 +7569,10 @@ function RibbonTabs(props) {
7569
7569
  })();
7570
7570
  }
7571
7571
  delegateEvents(["click", "keydown"]);
7572
- var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
7572
+ var _tmpl$$D = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
7573
7573
  function RibbonRow(props) {
7574
7574
  return (() => {
7575
- var _el$ = _tmpl$$C();
7575
+ var _el$ = _tmpl$$D();
7576
7576
  insert(_el$, createComponent(For, {
7577
7577
  get each() {
7578
7578
  return props.items;
@@ -7587,7 +7587,7 @@ function RibbonRow(props) {
7587
7587
  return _el$;
7588
7588
  })();
7589
7589
  }
7590
- var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$p = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows><div class=oasis-editor-ribbon-normal-rows>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-label>`), _tmpl$4$d = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$a = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
7590
+ var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$o = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows><div class=oasis-editor-ribbon-normal-rows>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-label>`), _tmpl$4$c = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
7591
7591
  function groupItems(group) {
7592
7592
  return [...group.largeItems, ...group.rows[1], ...group.rows[2]];
7593
7593
  }
@@ -7598,7 +7598,7 @@ function groupStyle(group) {
7598
7598
  }
7599
7599
  function RibbonGroup(props) {
7600
7600
  return (() => {
7601
- var _el$ = _tmpl$4$d();
7601
+ var _el$ = _tmpl$4$c();
7602
7602
  insert(_el$, createComponent(Show, {
7603
7603
  get when() {
7604
7604
  return props.group.resizeState !== "collapsed";
@@ -7622,7 +7622,7 @@ function RibbonGroup(props) {
7622
7622
  ribbonSize: "large",
7623
7623
  panelClass: "oasis-editor-ribbon-collapsed-menu",
7624
7624
  get children() {
7625
- var _el$7 = _tmpl$5$a();
7625
+ var _el$7 = _tmpl$5$9();
7626
7626
  insert(_el$7, createComponent(For, {
7627
7627
  get each() {
7628
7628
  return groupItems(props.group);
@@ -7639,20 +7639,20 @@ function RibbonGroup(props) {
7639
7639
  }));
7640
7640
  return _el$6;
7641
7641
  })(), (() => {
7642
- var _el$8 = _tmpl$3$h();
7642
+ var _el$8 = _tmpl$3$g();
7643
7643
  insert(_el$8, () => props.group.label);
7644
7644
  return _el$8;
7645
7645
  })()];
7646
7646
  },
7647
7647
  get children() {
7648
7648
  return [(() => {
7649
- var _el$2 = _tmpl$2$p(), _el$4 = _el$2.firstChild;
7649
+ var _el$2 = _tmpl$2$o(), _el$4 = _el$2.firstChild;
7650
7650
  insert(_el$2, createComponent(Show, {
7651
7651
  get when() {
7652
7652
  return props.group.largeItems.length > 0;
7653
7653
  },
7654
7654
  get children() {
7655
- var _el$3 = _tmpl$$B();
7655
+ var _el$3 = _tmpl$$C();
7656
7656
  insert(_el$3, createComponent(For, {
7657
7657
  get each() {
7658
7658
  return props.group.largeItems;
@@ -7685,7 +7685,7 @@ function RibbonGroup(props) {
7685
7685
  }), null);
7686
7686
  return _el$2;
7687
7687
  })(), (() => {
7688
- var _el$5 = _tmpl$3$h();
7688
+ var _el$5 = _tmpl$3$g();
7689
7689
  insert(_el$5, () => props.group.label);
7690
7690
  return _el$5;
7691
7691
  })()];
@@ -7713,7 +7713,7 @@ function RibbonGroup(props) {
7713
7713
  return _el$;
7714
7714
  })();
7715
7715
  }
7716
- var _tmpl$$A = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
7716
+ var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
7717
7717
  function RibbonPanel(props) {
7718
7718
  const [availableWidth, setAvailableWidth] = createSignal(null);
7719
7719
  const [measurements, setMeasurements] = createSignal({});
@@ -7758,7 +7758,7 @@ function RibbonPanel(props) {
7758
7758
  requestAnimationFrame(measureGroups);
7759
7759
  });
7760
7760
  return (() => {
7761
- var _el$ = _tmpl$$A();
7761
+ var _el$ = _tmpl$$B();
7762
7762
  var _ref$ = panelRef;
7763
7763
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
7764
7764
  insert(_el$, createComponent(For, {
@@ -7784,7 +7784,7 @@ function RibbonPanel(props) {
7784
7784
  return _el$;
7785
7785
  })();
7786
7786
  }
7787
- var _tmpl$$z = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$o = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
7787
+ var _tmpl$$A = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
7788
7788
  const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
7789
7789
  function Toolbar(props) {
7790
7790
  const api = createToolbarApi(props.host, useI18n());
@@ -7814,7 +7814,7 @@ function Toolbar(props) {
7814
7814
  })
7815
7815
  });
7816
7816
  return (() => {
7817
- var _el$ = _tmpl$$z();
7817
+ var _el$ = _tmpl$$A();
7818
7818
  _el$.$$mousedown = (event) => {
7819
7819
  if (shouldAllowNativeMouseDown(event.target)) {
7820
7820
  return;
@@ -7835,7 +7835,7 @@ function Toolbar(props) {
7835
7835
  return renderItems();
7836
7836
  }
7837
7837
  }) : (() => {
7838
- var _el$2 = _tmpl$2$o();
7838
+ var _el$2 = _tmpl$2$n();
7839
7839
  insert(_el$2, renderItems);
7840
7840
  return _el$2;
7841
7841
  })();
@@ -13135,6 +13135,10 @@ function getPreciseFontProgram(family, bold, italic) {
13135
13135
  const resolved = family ?? "";
13136
13136
  return registry.get(faceKey(resolved, bold, italic)) ?? registry.get(faceKey(resolved, false, false)) ?? null;
13137
13137
  }
13138
+ function roundTo(value, decimals) {
13139
+ const factor = 10 ** decimals;
13140
+ return Math.round(value * factor) / factor;
13141
+ }
13138
13142
  const familyFileCache = /* @__PURE__ */ new Map();
13139
13143
  const fontLogger$1 = createEditorLogger("fonts");
13140
13144
  function resolveFaceFiles(family) {
@@ -13312,7 +13316,7 @@ async function preloadLayoutFonts(families) {
13312
13316
  );
13313
13317
  const finishedAt = typeof performance !== "undefined" ? performance.now() : Date.now();
13314
13318
  fontLogger$1.info("preload:done", {
13315
- durationMs: Math.round((finishedAt - startedAt) * 100) / 100,
13319
+ durationMs: roundTo(finishedAt - startedAt, 2),
13316
13320
  results,
13317
13321
  documentFontsStatus: typeof document !== "undefined" && document.fonts ? document.fonts.status : "unavailable"
13318
13322
  });
@@ -14086,7 +14090,6 @@ function findHyphenationPoints(word, lang) {
14086
14090
  }
14087
14091
  const DEFAULT_CONTENT_WIDTH = 624;
14088
14092
  const MIN_CONTENT_WIDTH = 120;
14089
- const PT_TO_PX = 96 / 72;
14090
14093
  function intersectsVertically(aTop, aBottom, bTop, bBottom) {
14091
14094
  return aTop < bBottom && aBottom > bTop;
14092
14095
  }
@@ -14538,7 +14541,7 @@ function composeMeasuredParagraphLines(options) {
14538
14541
  }
14539
14542
  if (!isEmptyLine) {
14540
14543
  const remaining = lineAvailableWidth - lineWidth;
14541
- const zonePx = ((hyphenation == null ? void 0 : hyphenation.zone) ?? 0) * PT_TO_PX;
14544
+ const zonePx = ((hyphenation == null ? void 0 : hyphenation.zone) ?? 0) * PX_PER_POINT;
14542
14545
  if (remaining > zonePx) {
14543
14546
  const hy = tryHyphenate(token.chars, remaining);
14544
14547
  if (hy) {
@@ -14779,149 +14782,7 @@ function collectPdfFontFamilies(document2) {
14779
14782
  }
14780
14783
  return families;
14781
14784
  }
14782
- const FOOTNOTE_SEPARATOR_HEIGHT = 10;
14783
- const FOOTNOTE_BLOCK_GAP = 2;
14784
14785
  const FOOTNOTE_MARKER_GUTTER_PX = 24;
14785
- const MAX_FOOTNOTE_LAYOUT_ITERATIONS = 4;
14786
- function getProjectedBlocksHeight(blocks) {
14787
- if (!blocks || blocks.length === 0) {
14788
- return 0;
14789
- }
14790
- return blocks.reduce((sum, block) => sum + block.estimatedHeight, 0);
14791
- }
14792
- function collectFootnoteReferencesFromBlock(block) {
14793
- var _a, _b;
14794
- const result = [];
14795
- const appendFromParagraph = (paragraph, startOffset, endOffset) => {
14796
- let runStart = 0;
14797
- for (const run of paragraph.runs) {
14798
- const runEnd = runStart + run.text.length;
14799
- const footnoteReference = getRunFootnoteReference(run);
14800
- if (footnoteReference && runEnd > startOffset && runStart < endOffset) {
14801
- result.push(footnoteReference.footnoteId);
14802
- }
14803
- runStart = runEnd;
14804
- }
14805
- };
14806
- if (block.sourceBlock.type === "paragraph") {
14807
- appendFromParagraph(
14808
- block.sourceBlock,
14809
- ((_a = block.layout) == null ? void 0 : _a.startOffset) ?? 0,
14810
- ((_b = block.layout) == null ? void 0 : _b.endOffset) ?? getParagraphText(block.sourceBlock).length
14811
- );
14812
- return result;
14813
- }
14814
- for (const paragraph of getBlockParagraphs(block.sourceBlock)) {
14815
- appendFromParagraph(paragraph, 0, getParagraphText(paragraph).length);
14816
- }
14817
- return result;
14818
- }
14819
- function collectPageFootnoteReferenceIds(page) {
14820
- const seen = /* @__PURE__ */ new Set();
14821
- const ids = [];
14822
- for (const block of page.blocks) {
14823
- for (const footnoteId of collectFootnoteReferencesFromBlock(block)) {
14824
- if (seen.has(footnoteId)) continue;
14825
- seen.add(footnoteId);
14826
- ids.push(footnoteId);
14827
- }
14828
- }
14829
- return ids;
14830
- }
14831
- function projectFootnoteBlocksForPage(document2, footnoteReferenceIds, page, totalPages, measuredHeights, measuredParagraphLayouts, measurer, projectBlocks) {
14832
- var _a, _b, _c;
14833
- const contentWidth = Math.max(
14834
- 24,
14835
- getPageContentWidth(page.pageSettings) - FOOTNOTE_MARKER_GUTTER_PX
14836
- );
14837
- const blocks = [];
14838
- for (const footnoteId of footnoteReferenceIds) {
14839
- const footnote = (_b = (_a = document2.footnotes) == null ? void 0 : _a.items) == null ? void 0 : _b[footnoteId];
14840
- if (!footnote) continue;
14841
- const projected = projectBlocks(footnote.blocks, {
14842
- pageIndex: page.index,
14843
- totalPages,
14844
- measuredHeights,
14845
- measuredParagraphLayouts,
14846
- styles: document2.styles,
14847
- contentWidth,
14848
- measurer,
14849
- defaultTabStop: (_c = document2.settings) == null ? void 0 : _c.defaultTabStop
14850
- });
14851
- for (const block of projected) {
14852
- blocks.push({
14853
- ...block,
14854
- blockId: `${footnoteId}:${block.blockId}`
14855
- });
14856
- }
14857
- }
14858
- return blocks;
14859
- }
14860
- function buildFootnoteReservations(pages, context2) {
14861
- const reservations = /* @__PURE__ */ new Map();
14862
- for (const page of pages) {
14863
- const footnoteReferenceIds = collectPageFootnoteReferenceIds(page);
14864
- if (footnoteReferenceIds.length === 0) continue;
14865
- const footnoteBlocks = projectFootnoteBlocksForPage(
14866
- context2.document,
14867
- footnoteReferenceIds,
14868
- page,
14869
- context2.totalPages,
14870
- context2.measuredHeights,
14871
- context2.measuredParagraphLayouts,
14872
- context2.measurer,
14873
- context2.projectBlocks
14874
- );
14875
- if (footnoteBlocks.length === 0) continue;
14876
- const blockGaps = Math.max(0, footnoteBlocks.length - 1) * FOOTNOTE_BLOCK_GAP;
14877
- reservations.set(
14878
- page.index,
14879
- FOOTNOTE_SEPARATOR_HEIGHT + getProjectedBlocksHeight(footnoteBlocks) + blockGaps
14880
- );
14881
- }
14882
- return reservations;
14883
- }
14884
- function reservationSignature(reservations) {
14885
- return [...reservations.entries()].sort(([left], [right]) => left - right).map(([pageIndex, height]) => `${pageIndex}:${Math.round(height)}`).join("|");
14886
- }
14887
- function applyFootnotesToPages(pages, context2) {
14888
- return pages.map((page) => {
14889
- const footnoteReferenceIds = collectPageFootnoteReferenceIds(page);
14890
- if (footnoteReferenceIds.length === 0) {
14891
- return {
14892
- ...page,
14893
- footnoteBlocks: void 0,
14894
- footnoteReferenceIds: void 0,
14895
- footnoteTop: void 0,
14896
- footnoteSeparatorTop: void 0
14897
- };
14898
- }
14899
- const footnoteBlocks = projectFootnoteBlocksForPage(
14900
- context2.document,
14901
- footnoteReferenceIds,
14902
- page,
14903
- context2.totalPages,
14904
- context2.measuredHeights,
14905
- context2.measuredParagraphLayouts,
14906
- context2.measurer,
14907
- context2.projectBlocks
14908
- );
14909
- const bodyBottom = page.bodyBottom ?? getPageBodyBottom(page.pageSettings);
14910
- const footnoteSeparatorTop = Math.max(
14911
- page.bodyTop ?? getPageBodyTop(page.pageSettings),
14912
- bodyBottom
14913
- );
14914
- const footnoteTop = footnoteSeparatorTop + FOOTNOTE_SEPARATOR_HEIGHT;
14915
- return {
14916
- ...page,
14917
- footnoteBlocks,
14918
- footnoteReferenceIds,
14919
- footnoteSeparatorTop,
14920
- footnoteTop,
14921
- bodyBottom
14922
- };
14923
- });
14924
- }
14925
14786
  const PARAGRAPH_BORDER_PADDING_PX = 2;
14926
14787
  function isVisibleBorder$1(border) {
14927
14788
  return !!border && border.type !== "none" && border.width > 0;
@@ -14938,6 +14799,9 @@ function getParagraphBorderInsets(style2) {
14938
14799
  bottom: edgeInset(style2.borderBottom)
14939
14800
  };
14940
14801
  }
14802
+ const VERTICAL_HIT_WEIGHT = 1e3;
14803
+ const TEXT_BASELINE_RATIO = 0.8;
14804
+ const NO_WRAP_MEASURE_WIDTH_PX = 1e5;
14941
14805
  function formatTimestamp() {
14942
14806
  const now = /* @__PURE__ */ new Date();
14943
14807
  const h = String(now.getHours()).padStart(2, "0");
@@ -14972,7 +14836,7 @@ function markEnd(label) {
14972
14836
  performance.mark(endName);
14973
14837
  try {
14974
14838
  const measure = performance.measure(label, startName, endName);
14975
- const duration = Math.round(measure.duration * 100) / 100;
14839
+ const duration = roundTo(measure.duration, 2);
14976
14840
  marks.push({
14977
14841
  name: label,
14978
14842
  duration,
@@ -14993,14 +14857,14 @@ function markEnd(label) {
14993
14857
  function recordDuration(label, durationMs) {
14994
14858
  marks.push({
14995
14859
  name: label,
14996
- duration: Math.round(durationMs * 100) / 100,
14860
+ duration: roundTo(durationMs, 2),
14997
14861
  timestamp: Date.now()
14998
14862
  });
14999
14863
  if (shouldLogPerformanceMetrics()) {
15000
14864
  console.info(
15001
14865
  `%c[perf] ${label}`,
15002
14866
  "color: #f59e0b;",
15003
- `${formatTimestamp()} ${Math.round(durationMs * 100) / 100}ms`
14867
+ `${formatTimestamp()} ${roundTo(durationMs, 2)}ms`
15004
14868
  );
15005
14869
  }
15006
14870
  }
@@ -15052,7 +14916,7 @@ function startLongTaskObserver() {
15052
14916
  observer = new PerformanceObserver((list) => {
15053
14917
  for (const entry of list.getEntries()) {
15054
14918
  longTasks.push({
15055
- duration: Math.round(entry.duration * 100) / 100,
14919
+ duration: roundTo(entry.duration, 2),
15056
14920
  startTime: Math.round(entry.startTime)
15057
14921
  });
15058
14922
  }
@@ -15347,11 +15211,14 @@ function resolveDropCapExclusion(options) {
15347
15211
  sourceRunId: DROP_CAP_EXCLUSION_RUN_ID
15348
15212
  };
15349
15213
  }
15350
- let activeHyphenation;
15351
- let activeHyphenationSignature = "";
15352
- function setActiveHyphenation(options) {
15353
- activeHyphenation = (options == null ? void 0 : options.enabled) ? options : void 0;
15354
- activeHyphenationSignature = activeHyphenation ? `h:${activeHyphenation.zone ?? ""}:${activeHyphenation.consecutiveLimit ?? ""}:${activeHyphenation.doNotHyphenateCaps ? 1 : 0}` : "";
15214
+ const EMPTY_PROJECTION_CONTEXT = {
15215
+ hyphenation: void 0,
15216
+ hyphenationSignature: ""
15217
+ };
15218
+ function createProjectionContext(options) {
15219
+ const hyphenation = (options == null ? void 0 : options.enabled) ? options : void 0;
15220
+ const hyphenationSignature = hyphenation ? `h:${hyphenation.zone ?? ""}:${hyphenation.consecutiveLimit ?? ""}:${hyphenation.doNotHyphenateCaps ? 1 : 0}` : "";
15221
+ return { hyphenation, hyphenationSignature };
15355
15222
  }
15356
15223
  function paragraphStyleComparableKey(style2) {
15357
15224
  const {
@@ -15418,9 +15285,9 @@ function getParagraphFieldDependence(paragraph) {
15418
15285
  paragraphFieldDependenceCache.set(paragraph, result);
15419
15286
  return result;
15420
15287
  }
15421
- function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, contentWidth, measurer = domTextMeasurer, defaultTabStop) {
15288
+ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, contentWidth, measurer = domTextMeasurer, defaultTabStop, context2 = EMPTY_PROJECTION_CONTEXT) {
15422
15289
  const { dependsOnPageIndex, dependsOnTotalPages } = getParagraphFieldDependence(paragraph);
15423
- const cacheKey = `${dependsOnPageIndex ? pageIndex ?? "" : ""}:${dependsOnTotalPages ? totalPages ?? "" : ""}:${contentWidth ?? ""}:${defaultTabStop ?? ""}:${activeHyphenationSignature}`;
15290
+ const cacheKey = `${dependsOnPageIndex ? pageIndex ?? "" : ""}:${dependsOnTotalPages ? totalPages ?? "" : ""}:${contentWidth ?? ""}:${defaultTabStop ?? ""}:${context2.hyphenationSignature}`;
15424
15291
  let cacheForParagraph = paragraphLayoutCache.get(paragraph);
15425
15292
  if (cacheForParagraph) {
15426
15293
  const cached = cacheForParagraph.get(cacheKey);
@@ -15478,7 +15345,7 @@ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, conten
15478
15345
  styles,
15479
15346
  contentWidth,
15480
15347
  defaultTabStop,
15481
- hyphenation: activeHyphenation
15348
+ hyphenation: context2.hyphenation
15482
15349
  }).map((line) => ({
15483
15350
  ...line,
15484
15351
  height: line.height || lineHeight,
@@ -15507,7 +15374,7 @@ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, conten
15507
15374
  cacheForParagraph.set(cacheKey, result);
15508
15375
  return result;
15509
15376
  }
15510
- function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWidth, measurer = domTextMeasurer, pageIndex, totalPages, styles, defaultTabStop, resolveTextBoxHeight, externalExclusions = []) {
15377
+ function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWidth, measurer = domTextMeasurer, pageIndex, totalPages, styles, defaultTabStop, resolveTextBoxHeight, externalExclusions = [], context2 = EMPTY_PROJECTION_CONTEXT) {
15511
15378
  const preliminary = projectParagraphLayout(
15512
15379
  paragraph,
15513
15380
  pageIndex,
@@ -15515,7 +15382,8 @@ function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWi
15515
15382
  styles,
15516
15383
  contentWidth,
15517
15384
  measurer,
15518
- defaultTabStop
15385
+ defaultTabStop,
15386
+ context2
15519
15387
  );
15520
15388
  if (!pageSettings || !contentWidth) {
15521
15389
  return preliminary;
@@ -15776,7 +15644,6 @@ function estimateParagraphBlockHeight(paragraph, styles, contentWidth, measurer
15776
15644
  }
15777
15645
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$2 = 24;
15778
15646
  const DEFAULT_CELL_PADDING_LEFT_RIGHT_PX$1 = 7.2;
15779
- const NO_WRAP_MEASURE_WIDTH_PX$1 = 1e5;
15780
15647
  function toPx$1(valuePt) {
15781
15648
  return valuePt * PX_PER_POINT;
15782
15649
  }
@@ -15850,7 +15717,7 @@ function getTableCellContentWidthForParagraph(document2, paragraphId, activeSect
15850
15717
  if (!row) return null;
15851
15718
  const cell = row.cells[tableLocation.cellIndex];
15852
15719
  if (!cell) return null;
15853
- if ((_a = cell.style) == null ? void 0 : _a.noWrap) return NO_WRAP_MEASURE_WIDTH_PX$1;
15720
+ if ((_a = cell.style) == null ? void 0 : _a.noWrap) return NO_WRAP_MEASURE_WIDTH_PX;
15854
15721
  const pageContentWidthPx = getPageContentWidth(
15855
15722
  getDocumentPageSettings(document2)
15856
15723
  );
@@ -15917,7 +15784,6 @@ function resolveCachedTableCellParagraph(source, formatting, styles) {
15917
15784
  return resolved;
15918
15785
  }
15919
15786
  const DEFAULT_LINE_HEIGHT = 1.15;
15920
- const NO_WRAP_MEASURE_WIDTH_PX = 1e5;
15921
15787
  const DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX = 14.4;
15922
15788
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$1 = 24;
15923
15789
  const DEFAULT_TABLE_SEGMENT_VERTICAL_SPACING = 0;
@@ -16471,7 +16337,8 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
16471
16337
  track.floatingExclusions.map((exclusion) => ({
16472
16338
  ...exclusion,
16473
16339
  y: exclusion.y - track.height
16474
- }))
16340
+ })),
16341
+ params.projectionContext ?? EMPTY_PROJECTION_CONTEXT
16475
16342
  );
16476
16343
  const measuredParagraphLayout = measuredParagraphLayouts == null ? void 0 : measuredParagraphLayouts[sourceBlock.id];
16477
16344
  const paragraphLayout = measuredParagraphLayout && isMeasuredLayoutCurrent(projectedParagraphLayout, measuredParagraphLayout) ? applyMeasuredLineGeometry(
@@ -16783,7 +16650,7 @@ function estimateSingleCellRowSliceHeight(row, cellIndex, start, end, styles, me
16783
16650
  rowIndex
16784
16651
  );
16785
16652
  }
16786
- function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles, measurer, defaultTabStop, contentWidth, table, rowIndex) {
16653
+ function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles, measurer, defaultTabStop, contentWidth, table, rowIndex, projectionContext = EMPTY_PROJECTION_CONTEXT) {
16787
16654
  const cell = row.cells[cellIndex];
16788
16655
  if (!cell) return start;
16789
16656
  const limit = cell.blocks.length;
@@ -16822,7 +16689,8 @@ function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles
16822
16689
  styles,
16823
16690
  contentWidth,
16824
16691
  measurer,
16825
- defaultTabStop
16692
+ defaultTabStop,
16693
+ projectionContext
16826
16694
  );
16827
16695
  for (const line of layout.lines) {
16828
16696
  if (line.endOffset <= startOffset || line.endOffset >= paragraphLength) {
@@ -16894,7 +16762,14 @@ function resolveFloatingTableWidth(table, contentWidth) {
16894
16762
  }
16895
16763
  function paginateTableBlock(track, params, sourceBlock, index) {
16896
16764
  var _a;
16897
- const { contentWidth, measurer, styles, defaultTabStop, measuredHeights } = params;
16765
+ const {
16766
+ contentWidth,
16767
+ measurer,
16768
+ styles,
16769
+ defaultTabStop,
16770
+ measuredHeights,
16771
+ projectionContext
16772
+ } = params;
16898
16773
  const tableHeight = (measuredHeights == null ? void 0 : measuredHeights[sourceBlock.id]) ?? estimateTableBlockHeight(
16899
16774
  sourceBlock,
16900
16775
  styles,
@@ -17108,7 +16983,8 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17108
16983
  defaultTabStop,
17109
16984
  contentWidth,
17110
16985
  sourceBlock,
17111
- rowGroups[groupEndIndex].startRowIndex
16986
+ rowGroups[groupEndIndex].startRowIndex,
16987
+ projectionContext
17112
16988
  )
17113
16989
  );
17114
16990
  if (positionsProgressed(starts, ends)) {
@@ -17155,7 +17031,12 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17155
17031
  splitEndPositions,
17156
17032
  startCellPositions
17157
17033
  );
17158
- advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
17034
+ advanceCursor(
17035
+ groupEndIndex,
17036
+ isLastRowSplit,
17037
+ splitEnds,
17038
+ splitEndPositions
17039
+ );
17159
17040
  return block;
17160
17041
  },
17161
17042
  force(segmentId) {
@@ -17187,7 +17068,8 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17187
17068
  defaultTabStop,
17188
17069
  contentWidth,
17189
17070
  sourceBlock,
17190
- startRowIndex
17071
+ startRowIndex,
17072
+ projectionContext
17191
17073
  )
17192
17074
  );
17193
17075
  if (!positionsProgressed(starts, ends)) {
@@ -17201,7 +17083,11 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17201
17083
  splitEnds = positionsToBlockIndexes(ends);
17202
17084
  splitEndPositions = ends;
17203
17085
  isLastRowSplit = true;
17204
- const slicedLastRow = buildRowSliceFromPositions(targetRow, starts, ends);
17086
+ const slicedLastRow = buildRowSliceFromPositions(
17087
+ targetRow,
17088
+ starts,
17089
+ ends
17090
+ );
17205
17091
  segmentHeight = getTableSegmentHeight(
17206
17092
  { ...sourceBlock, rows: [slicedLastRow] },
17207
17093
  0,
@@ -17236,7 +17122,12 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17236
17122
  splitEndPositions,
17237
17123
  startCellPositions
17238
17124
  );
17239
- advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
17125
+ advanceCursor(
17126
+ groupEndIndex,
17127
+ isLastRowSplit,
17128
+ splitEnds,
17129
+ splitEndPositions
17130
+ );
17240
17131
  return block;
17241
17132
  }
17242
17133
  });
@@ -17267,7 +17158,8 @@ function projectColumnTrackLayout(context2) {
17267
17158
  measurer = domTextMeasurer,
17268
17159
  reservedHeightByPageIndex,
17269
17160
  defaultTabStop,
17270
- contentWidthOverride
17161
+ contentWidthOverride,
17162
+ projectionContext
17271
17163
  } = context2;
17272
17164
  const contentWidth = contentWidthOverride ?? getPageContentWidth(pageSettings);
17273
17165
  const track = new PaginationTrack(
@@ -17285,7 +17177,8 @@ function projectColumnTrackLayout(context2) {
17285
17177
  totalPages,
17286
17178
  defaultTabStop,
17287
17179
  measuredHeights,
17288
- measuredParagraphLayouts
17180
+ measuredParagraphLayouts,
17181
+ projectionContext
17289
17182
  };
17290
17183
  for (let index = 0; index < blocks.length; index += 1) {
17291
17184
  const sourceBlock = blocks[index];
@@ -17966,7 +17859,6 @@ function resolveTableLeftOffset(table, tableWidth, contentWidth) {
17966
17859
  }
17967
17860
  return resolveTableIndentLeft(table);
17968
17861
  }
17969
- const NO_WRAP_WIDTH_PX = 1e5;
17970
17862
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX = 24;
17971
17863
  function resolveCellVerticalMode(cell) {
17972
17864
  var _a, _b, _c;
@@ -18044,8 +17936,16 @@ function prepareCells(options) {
18044
17936
  right: resolveBorder(((_m = cell.style) == null ? void 0 : _m.borderRight) ?? logicalRight),
18045
17937
  bottom: resolveBorder((_n = cell.style) == null ? void 0 : _n.borderBottom),
18046
17938
  left: resolveBorder(((_o = cell.style) == null ? void 0 : _o.borderLeft) ?? logicalLeft),
18047
- ...((_p = cell.style) == null ? void 0 : _p.borderTopLeftToBottomRight) ? { topLeftToBottomRight: resolveBorder(cell.style.borderTopLeftToBottomRight) } : {},
18048
- ...((_q = cell.style) == null ? void 0 : _q.borderTopRightToBottomLeft) ? { topRightToBottomLeft: resolveBorder(cell.style.borderTopRightToBottomLeft) } : {}
17939
+ ...((_p = cell.style) == null ? void 0 : _p.borderTopLeftToBottomRight) ? {
17940
+ topLeftToBottomRight: resolveBorder(
17941
+ cell.style.borderTopLeftToBottomRight
17942
+ )
17943
+ } : {},
17944
+ ...((_q = cell.style) == null ? void 0 : _q.borderTopRightToBottomLeft) ? {
17945
+ topRightToBottomLeft: resolveBorder(
17946
+ cell.style.borderTopRightToBottomLeft
17947
+ )
17948
+ } : {}
18049
17949
  };
18050
17950
  const contentWidthPx = Math.max(
18051
17951
  MIN_TABLE_CELL_CONTENT_WIDTH_PX,
@@ -18060,7 +17960,7 @@ function prepareCells(options) {
18060
17960
  const wrapWidth = isRotated || ((_s = cell.style) == null ? void 0 : _s.noWrap) ? isRotated && hasExplicitRowHeight ? Math.max(
18061
17961
  MIN_TABLE_CELL_CONTENT_WIDTH_PX,
18062
17962
  explicitRowHeightPx - borders.top.width - borders.bottom.width - padding.top - padding.bottom
18063
- ) : NO_WRAP_WIDTH_PX : contentWidthPx;
17963
+ ) : NO_WRAP_MEASURE_WIDTH_PX : contentWidthPx;
18064
17964
  const projectedParagraphs = [];
18065
17965
  let contentNaturalHeightPx = 0;
18066
17966
  for (const original of cell.blocks) {
@@ -18071,7 +17971,7 @@ function prepareCells(options) {
18071
17971
  pageIndex,
18072
17972
  void 0,
18073
17973
  state.document.styles,
18074
- NO_WRAP_WIDTH_PX,
17974
+ NO_WRAP_MEASURE_WIDTH_PX,
18075
17975
  void 0,
18076
17976
  (_t = state.document.settings) == null ? void 0 : _t.defaultTabStop
18077
17977
  );
@@ -18127,7 +18027,10 @@ function prepareCells(options) {
18127
18027
  const removedAfter = previous.spacingAfter;
18128
18028
  previous.height = Math.max(1, previous.height - removedAfter);
18129
18029
  previous.spacingAfter = 0;
18130
- contentNaturalHeightPx = Math.max(0, contentNaturalHeightPx - removedAfter);
18030
+ contentNaturalHeightPx = Math.max(
18031
+ 0,
18032
+ contentNaturalHeightPx - removedAfter
18033
+ );
18131
18034
  effectiveSpacingBefore = 0;
18132
18035
  } else {
18133
18036
  const collapsed = Math.min(previous.spacingAfter, spacingBefore);
@@ -18279,7 +18182,11 @@ function assembleCellEntries(options) {
18279
18182
  0
18280
18183
  );
18281
18184
  let paragraphCursorY = 0;
18282
- const verticalContentOffset = cellEntry.verticalMode === "horizontal" ? resolveVerticalContentOffset(cell, contentHeightPx, cellEntry.contentNaturalHeightPx) : 0;
18185
+ const verticalContentOffset = cellEntry.verticalMode === "horizontal" ? resolveVerticalContentOffset(
18186
+ cell,
18187
+ contentHeightPx,
18188
+ cellEntry.contentNaturalHeightPx
18189
+ ) : 0;
18283
18190
  const paragraphs = [];
18284
18191
  for (const projected of cellEntry.projectedParagraphs) {
18285
18192
  paragraphs.push({
@@ -18371,7 +18278,10 @@ function buildCanvasTableLayout(options) {
18371
18278
  let glyphWidth = 0;
18372
18279
  for (const block of cell.blocks) {
18373
18280
  if (block.type !== "paragraph") continue;
18374
- glyphWidth = Math.max(glyphWidth, estimateStackedColumnWidth(block, state));
18281
+ glyphWidth = Math.max(
18282
+ glyphWidth,
18283
+ estimateStackedColumnWidth(block, state)
18284
+ );
18375
18285
  }
18376
18286
  if (glyphWidth <= 0) continue;
18377
18287
  const padding = resolveCellPadding(cell);
@@ -18387,7 +18297,9 @@ function buildCanvasTableLayout(options) {
18387
18297
  columnOffsets[i + 1] = columnOffsets[i] + resolvedColumnWidths[i] + cellSpacingPx;
18388
18298
  }
18389
18299
  const effectiveRowStyles = table.rows.map((row, rowIndex) => {
18390
- const entry = tableEntries.find((candidate) => candidate.rowIndex === rowIndex);
18300
+ const entry = tableEntries.find(
18301
+ (candidate) => candidate.rowIndex === rowIndex
18302
+ );
18391
18303
  return entry ? resolveEffectiveTableCellFormatting({
18392
18304
  table: sourceTable,
18393
18305
  rowIndex,
@@ -18436,11 +18348,11 @@ function buildCanvasTableLayout(options) {
18436
18348
  unsupported: Array.from(new Set(unsupported))
18437
18349
  };
18438
18350
  }
18439
- var _tmpl$$y = /* @__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">`);
18440
- function PageBreak(props) {
18351
+ var _tmpl$$z = /* @__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">`);
18352
+ function PageBreak(_props) {
18441
18353
  const t = useI18n();
18442
18354
  return (() => {
18443
- var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18355
+ var _el$ = _tmpl$$z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18444
18356
  insert(_el$3, () => t("metric.pageBreak") || "Page Break");
18445
18357
  return _el$;
18446
18358
  })();
@@ -20489,7 +20401,10 @@ function resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY) {
20489
20401
  const axis = resolveGradientAxis(x0, y0, x1, y1, fill.angle ?? 0);
20490
20402
  const gradient = ctx.createLinearGradient(axis.x0, axis.y0, axis.x1, axis.y1);
20491
20403
  for (const stop of fill.stops) {
20492
- gradient.addColorStop(stop.position, hexToRgba(stop.color, stop.alpha ?? 1));
20404
+ gradient.addColorStop(
20405
+ stop.position,
20406
+ hexToRgba(stop.color, stop.alpha ?? 1)
20407
+ );
20493
20408
  }
20494
20409
  return gradient;
20495
20410
  }
@@ -20980,7 +20895,14 @@ function drawTextFragment(ctx, paragraph, line, fragment, slotByOffset, state, s
20980
20895
  segmentLeft = null;
20981
20896
  return;
20982
20897
  }
20983
- drawStyledText(ctx, segmentText, originX + segmentLeft, baselineY, scale, styles);
20898
+ drawStyledText(
20899
+ ctx,
20900
+ segmentText,
20901
+ originX + segmentLeft,
20902
+ baselineY,
20903
+ scale,
20904
+ styles
20905
+ );
20984
20906
  segmentText = "";
20985
20907
  segmentLeft = null;
20986
20908
  };
@@ -20999,14 +20921,27 @@ function drawTextFragment(ctx, paragraph, line, fragment, slotByOffset, state, s
20999
20921
  const nextSlot = slotByOffset.get(char.paragraphOffset + 1);
21000
20922
  const leader = resolveTabLeader(paragraph, line, slot.left, state);
21001
20923
  if (nextSlot && leader) {
21002
- drawTabLeader(ctx, leader, originX + slot.left, originX + nextSlot.left, baselineY);
20924
+ drawTabLeader(
20925
+ ctx,
20926
+ leader,
20927
+ originX + slot.left,
20928
+ originX + nextSlot.left,
20929
+ baselineY
20930
+ );
21003
20931
  }
21004
20932
  continue;
21005
20933
  }
21006
20934
  const renderedChar = getRenderedChar(char.char, styles);
21007
20935
  if (hasManualCharacterSpacing) {
21008
20936
  flushSegment();
21009
- drawStyledText(ctx, renderedChar, originX + slot.left, baselineY, scale, styles);
20937
+ drawStyledText(
20938
+ ctx,
20939
+ renderedChar,
20940
+ originX + slot.left,
20941
+ baselineY,
20942
+ scale,
20943
+ styles
20944
+ );
21010
20945
  continue;
21011
20946
  }
21012
20947
  if (char.char === " ") {
@@ -21028,7 +20963,7 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21028
20963
  for (const slot of line.slots) {
21029
20964
  slotByOffset.set(slot.offset, slot);
21030
20965
  }
21031
- const baselineY = originY + line.top + line.height * 0.8;
20966
+ const baselineY = originY + line.top + line.height * TEXT_BASELINE_RATIO;
21032
20967
  const listPrefix = line.index === 0 ? resolveListPrefix(paragraph, state.document) : "";
21033
20968
  if (listPrefix) {
21034
20969
  const prefixStyles = resolveEffectiveTextStyleForParagraph(
@@ -21078,15 +21013,43 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21078
21013
  italic: Boolean(styles.italic),
21079
21014
  sample: fragment.text.slice(0, 80)
21080
21015
  });
21081
- ctx.fillStyle = resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY);
21016
+ ctx.fillStyle = resolveCanvasTextFill(
21017
+ ctx,
21018
+ styles,
21019
+ line,
21020
+ fragment,
21021
+ originX,
21022
+ originY
21023
+ );
21082
21024
  if (styles.shading) {
21083
- drawFragmentShading(ctx, line, fragment, originX, originY, styles.shading);
21025
+ drawFragmentShading(
21026
+ ctx,
21027
+ line,
21028
+ fragment,
21029
+ originX,
21030
+ originY,
21031
+ styles.shading
21032
+ );
21084
21033
  }
21085
21034
  if (styles.highlight) {
21086
- drawFragmentHighlight(ctx, line, fragment, originX, originY, styles.highlight);
21035
+ drawFragmentHighlight(
21036
+ ctx,
21037
+ line,
21038
+ fragment,
21039
+ originX,
21040
+ originY,
21041
+ styles.highlight
21042
+ );
21087
21043
  }
21088
21044
  if (styles.textBorder) {
21089
- drawFragmentBorder(ctx, line, fragment, originX, originY, styles.textBorder);
21045
+ drawFragmentBorder(
21046
+ ctx,
21047
+ line,
21048
+ fragment,
21049
+ originX,
21050
+ originY,
21051
+ styles.textBorder
21052
+ );
21090
21053
  }
21091
21054
  if (fragment.image && !fragment.image.floating) {
21092
21055
  const slot = slotByOffset.get(fragment.startOffset);
@@ -21173,7 +21136,14 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21173
21136
  drawTextDecoration(ctx, line, fragment, originX, originY, "strike");
21174
21137
  }
21175
21138
  if (styles.doubleStrike) {
21176
- drawTextDecoration(ctx, line, fragment, originX, originY, "doubleStrike");
21139
+ drawTextDecoration(
21140
+ ctx,
21141
+ line,
21142
+ fragment,
21143
+ originX,
21144
+ originY,
21145
+ "doubleStrike"
21146
+ );
21177
21147
  }
21178
21148
  if (styles.emphasisMark) {
21179
21149
  drawFragmentEmphasis(
@@ -21223,7 +21193,7 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21223
21193
  ctx.save();
21224
21194
  ctx.font = "400 13px Calibri";
21225
21195
  ctx.fillStyle = "#9ca3af";
21226
- const y = originY + line.top + line.height * 0.8;
21196
+ const y = originY + line.top + line.height * TEXT_BASELINE_RATIO;
21227
21197
  ctx.fillText("¶", originX + markSlot.left + 2, y);
21228
21198
  ctx.restore();
21229
21199
  }
@@ -21352,7 +21322,7 @@ function drawDropCapForParagraph(options) {
21352
21322
  }
21353
21323
  const style2 = dropCap.style;
21354
21324
  const { font, fillStyle, renderMetrics } = resolveCanvasRunPaintStyle(style2);
21355
- const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? ((style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX);
21325
+ const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? (style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX;
21356
21326
  const glyphWidth = measureDropCapWidth(dropCap);
21357
21327
  const x = dropCap.type === "margin" ? originX - glyphWidth : originX;
21358
21328
  const baselineY = paragraphTop + (dropCap.lines - 0.2) * bodyLineHeight + renderMetrics.baselineOffset;
@@ -21889,7 +21859,7 @@ function createCanvasPageRenderer(options) {
21889
21859
  }
21890
21860
  };
21891
21861
  }
21892
- var _tmpl$$x = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
21862
+ var _tmpl$$y = /* @__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>`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
21893
21863
  const surfaceLogger = createEditorLogger("canvas-surface");
21894
21864
  function checkBrowserFonts(families) {
21895
21865
  if (typeof document === "undefined" || !document.fonts) {
@@ -21949,7 +21919,7 @@ function CanvasEditorSurface(props) {
21949
21919
  return layout;
21950
21920
  });
21951
21921
  return (() => {
21952
- var _el$ = _tmpl$$x();
21922
+ var _el$ = _tmpl$$y();
21953
21923
  insert(_el$, createComponent(Index, {
21954
21924
  get each() {
21955
21925
  return documentLayout().pages;
@@ -21961,7 +21931,7 @@ function CanvasEditorSurface(props) {
21961
21931
  // inserting an image that triggers re-pagination in a narrow viewport),
21962
21932
  // causing "Failed to execute 'insertBefore'" errors.
21963
21933
  (() => {
21964
- var _el$2 = _tmpl$2$n();
21934
+ var _el$2 = _tmpl$2$m();
21965
21935
  insert(_el$2, createComponent(Show, {
21966
21936
  when: index > 0,
21967
21937
  get children() {
@@ -22091,7 +22061,7 @@ function CanvasPage(props) {
22091
22061
  });
22092
22062
  onCleanup(() => renderer.dispose());
22093
22063
  return (() => {
22094
- var _el$3 = _tmpl$3$g(), _el$4 = _el$3.firstChild;
22064
+ var _el$3 = _tmpl$3$f(), _el$4 = _el$3.firstChild;
22095
22065
  addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
22096
22066
  addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
22097
22067
  addEventListener(_el$3, "click", props.onSurfaceClick, true);
@@ -22103,7 +22073,7 @@ function CanvasPage(props) {
22103
22073
  return revisionCells();
22104
22074
  },
22105
22075
  children: (revision) => (() => {
22106
- var _el$5 = _tmpl$4$c();
22076
+ var _el$5 = _tmpl$4$b();
22107
22077
  addEventListener(_el$5, "mousedown", props.onSurfaceMouseDown, true);
22108
22078
  _el$5.addEventListener("mouseleave", (event) => {
22109
22079
  var _a;
@@ -22457,7 +22427,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
22457
22427
  pushSide(-1);
22458
22428
  return ticks;
22459
22429
  }
22460
- var _tmpl$$w = /* @__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$m = /* @__PURE__ */ template(`<div>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
22430
+ var _tmpl$$x = /* @__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>`);
22461
22431
  function getActivePageSettings(state) {
22462
22432
  var _a;
22463
22433
  const idx = getActiveSectionIndex(state);
@@ -22663,7 +22633,7 @@ function HorizontalRuler(props) {
22663
22633
  }
22664
22634
  };
22665
22635
  return (() => {
22666
- var _el$ = _tmpl$$w(), _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;
22636
+ var _el$ = _tmpl$$x(), _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;
22667
22637
  var _ref$ = pageRef;
22668
22638
  typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
22669
22639
  insert(_el$3, createComponent(For, {
@@ -22671,7 +22641,7 @@ function HorizontalRuler(props) {
22671
22641
  return ticks();
22672
22642
  },
22673
22643
  children: (tick) => [(() => {
22674
- var _el$11 = _tmpl$2$m();
22644
+ var _el$11 = _tmpl$2$l();
22675
22645
  createRenderEffect((_p$) => {
22676
22646
  var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${sx(tick.x)}px`;
22677
22647
  _v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
@@ -22683,7 +22653,7 @@ function HorizontalRuler(props) {
22683
22653
  });
22684
22654
  return _el$11;
22685
22655
  })(), memo(() => memo(() => !!tick.label)() && (() => {
22686
- var _el$12 = _tmpl$3$f();
22656
+ var _el$12 = _tmpl$3$e();
22687
22657
  insert(_el$12, () => tick.label);
22688
22658
  createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${sx(tick.x)}px`));
22689
22659
  return _el$12;
@@ -22760,10 +22730,10 @@ function HorizontalRuler(props) {
22760
22730
  })();
22761
22731
  }
22762
22732
  delegateEvents(["pointerdown"]);
22763
- var _tmpl$$v = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
22733
+ var _tmpl$$w = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
22764
22734
  function CaretOverlay(props) {
22765
22735
  return (() => {
22766
- var _el$ = _tmpl$$v();
22736
+ var _el$ = _tmpl$$w();
22767
22737
  createRenderEffect((_p$) => {
22768
22738
  var _v$ = !!props.active, _v$2 = {
22769
22739
  left: `${props.left}px`,
@@ -22784,16 +22754,16 @@ function CaretOverlay(props) {
22784
22754
  return _el$;
22785
22755
  })();
22786
22756
  }
22787
- var _tmpl$$u = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$l = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
22757
+ var _tmpl$$v = /* @__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>`);
22788
22758
  function SelectionOverlay(props) {
22789
22759
  return (() => {
22790
- var _el$ = _tmpl$$u();
22760
+ var _el$ = _tmpl$$v();
22791
22761
  insert(_el$, createComponent(Index, {
22792
22762
  get each() {
22793
22763
  return props.boxes;
22794
22764
  },
22795
22765
  children: (box) => (() => {
22796
- var _el$2 = _tmpl$2$l();
22766
+ var _el$2 = _tmpl$2$k();
22797
22767
  createRenderEffect((_p$) => {
22798
22768
  var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
22799
22769
  _v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
@@ -22813,7 +22783,7 @@ function SelectionOverlay(props) {
22813
22783
  return _el$;
22814
22784
  })();
22815
22785
  }
22816
- var _tmpl$$t = /* @__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>`);
22786
+ var _tmpl$$u = /* @__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>`);
22817
22787
  function RevisionOverlay(props) {
22818
22788
  const formattedDate = () => {
22819
22789
  try {
@@ -22828,7 +22798,7 @@ function RevisionOverlay(props) {
22828
22798
  return "Alterado por";
22829
22799
  };
22830
22800
  return (() => {
22831
- var _el$ = _tmpl$$t(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
22801
+ var _el$ = _tmpl$$u(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
22832
22802
  _el$4.nextSibling;
22833
22803
  var _el$7 = _el$3.nextSibling;
22834
22804
  insert(_el$4, label, _el$5);
@@ -22846,7 +22816,7 @@ function RevisionOverlay(props) {
22846
22816
  return _el$;
22847
22817
  })();
22848
22818
  }
22849
- var _tmpl$$s = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$k = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$e = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$b = /* @__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>`);
22819
+ var _tmpl$$t = /* @__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$8 = /* @__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>`);
22850
22820
  function CommentHighlightOverlay(props) {
22851
22821
  const [activeCommentId, setActiveCommentId] = createSignal(null);
22852
22822
  const activeComment = createMemo(() => {
@@ -22873,13 +22843,13 @@ function CommentHighlightOverlay(props) {
22873
22843
  }
22874
22844
  };
22875
22845
  return (() => {
22876
- var _el$ = _tmpl$$s();
22846
+ var _el$ = _tmpl$$t();
22877
22847
  insert(_el$, createComponent(For, {
22878
22848
  get each() {
22879
22849
  return props.boxes();
22880
22850
  },
22881
22851
  children: (box) => (() => {
22882
- var _el$2 = _tmpl$2$k();
22852
+ var _el$2 = _tmpl$2$j();
22883
22853
  _el$2.$$click = () => setActiveCommentId(box.commentId);
22884
22854
  _el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
22885
22855
  createRenderEffect((_p$) => {
@@ -22911,7 +22881,7 @@ function CommentHighlightOverlay(props) {
22911
22881
  const comment = activeComment();
22912
22882
  const anchor = popupAnchor();
22913
22883
  return (() => {
22914
- var _el$3 = _tmpl$5$9(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
22884
+ var _el$3 = _tmpl$5$8(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
22915
22885
  _el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
22916
22886
  insert(_el$5, () => comment.author || "—");
22917
22887
  insert(_el$4, createComponent(Show, {
@@ -22919,7 +22889,7 @@ function CommentHighlightOverlay(props) {
22919
22889
  return comment.date !== void 0;
22920
22890
  },
22921
22891
  get children() {
22922
- var _el$6 = _tmpl$3$e();
22892
+ var _el$6 = _tmpl$3$d();
22923
22893
  insert(_el$6, () => formattedDate(comment.date));
22924
22894
  return _el$6;
22925
22895
  }
@@ -22929,7 +22899,7 @@ function CommentHighlightOverlay(props) {
22929
22899
  return comment.resolved;
22930
22900
  },
22931
22901
  get children() {
22932
- return _tmpl$4$b();
22902
+ return _tmpl$4$a();
22933
22903
  }
22934
22904
  }), null);
22935
22905
  insert(_el$8, () => comment.text);
@@ -22951,41 +22921,45 @@ function CommentHighlightOverlay(props) {
22951
22921
  })();
22952
22922
  }
22953
22923
  delegateEvents(["click"]);
22954
- var _tmpl$$r = /* @__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>`);
22955
- function FloatingTableToolbar(props) {
22956
- const t = useI18n();
22957
- const host = () => props.host();
22958
- const run = (command, payload) => host().commands.execute(command, payload);
22959
- const blocked = (command) => !host().commands.state(command).isEnabled;
22960
- const [surfaceRect, setSurfaceRect] = createSignal(null);
22924
+ function useSurfaceRect(surfaceRef) {
22925
+ const [rect, setRect] = createSignal(null);
22961
22926
  const [tick, setTick] = createSignal(0);
22962
- const refreshSurfaceRect = () => {
22963
- const surface = props.surfaceRef();
22964
- if (surface) {
22965
- setSurfaceRect(surface.getBoundingClientRect());
22966
- } else {
22967
- setSurfaceRect(null);
22968
- }
22927
+ const measure = () => {
22928
+ const surface = surfaceRef();
22929
+ setRect(surface ? surface.getBoundingClientRect() : null);
22969
22930
  };
22970
22931
  let frame = null;
22971
- const scheduleRefresh = () => {
22932
+ const refresh = () => {
22972
22933
  if (frame !== null) return;
22973
22934
  frame = requestAnimationFrame(() => {
22974
22935
  frame = null;
22975
- refreshSurfaceRect();
22976
- setTick((t2) => t2 + 1);
22936
+ measure();
22937
+ setTick((value) => value + 1);
22977
22938
  });
22978
22939
  };
22979
22940
  onMount(() => {
22980
- refreshSurfaceRect();
22981
- window.addEventListener("scroll", scheduleRefresh, true);
22982
- window.addEventListener("resize", scheduleRefresh);
22941
+ measure();
22942
+ window.addEventListener("scroll", refresh, true);
22943
+ window.addEventListener("resize", refresh);
22983
22944
  onCleanup(() => {
22984
- window.removeEventListener("scroll", scheduleRefresh, true);
22985
- window.removeEventListener("resize", scheduleRefresh);
22945
+ window.removeEventListener("scroll", refresh, true);
22946
+ window.removeEventListener("resize", refresh);
22986
22947
  if (frame !== null) cancelAnimationFrame(frame);
22987
22948
  });
22988
22949
  });
22950
+ return { rect, tick, refresh };
22951
+ }
22952
+ var _tmpl$$s = /* @__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>`);
22953
+ function FloatingTableToolbar(props) {
22954
+ const t = useI18n();
22955
+ const host = () => props.host();
22956
+ const run = (command, payload) => host().commands.execute(command, payload);
22957
+ const blocked = (command) => !host().commands.state(command).isEnabled;
22958
+ const {
22959
+ rect: surfaceRect,
22960
+ tick,
22961
+ refresh: scheduleRefresh
22962
+ } = useSurfaceRect(props.surfaceRef);
22989
22963
  const position2 = createMemo(() => {
22990
22964
  tick();
22991
22965
  if (!props.visible()) {
@@ -23033,7 +23007,7 @@ function FloatingTableToolbar(props) {
23033
23007
  return document.body;
23034
23008
  },
23035
23009
  get children() {
23036
- var _el$ = _tmpl$$r(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
23010
+ var _el$ = _tmpl$$s(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
23037
23011
  _el$.$$mousedown = (event) => event.preventDefault();
23038
23012
  insert(_el$2, createComponent(Button$1, {
23039
23013
  icon: "combine",
@@ -23193,7 +23167,7 @@ function FloatingTableToolbar(props) {
23193
23167
  });
23194
23168
  }
23195
23169
  delegateEvents(["mousedown"]);
23196
- var _tmpl$$q = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$j = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$d = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$a = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$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>`);
23170
+ var _tmpl$$r = /* @__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$7 = /* @__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>`);
23197
23171
  const WRAP_OPTIONS = [{
23198
23172
  preset: "square",
23199
23173
  labelKey: "layoutOptions.square"
@@ -23214,16 +23188,15 @@ const WRAP_OPTIONS = [{
23214
23188
  labelKey: "layoutOptions.front"
23215
23189
  }];
23216
23190
  function WrapIcon(props) {
23217
- useI18n();
23218
23191
  const line = (x, y, w) => (() => {
23219
- var _el$ = _tmpl$$q();
23192
+ var _el$ = _tmpl$$r();
23220
23193
  setAttribute(_el$, "x", x);
23221
23194
  setAttribute(_el$, "y", y);
23222
23195
  setAttribute(_el$, "width", w);
23223
23196
  return _el$;
23224
23197
  })();
23225
23198
  const box = (x, y, w, h, fill = "#1a73e8") => (() => {
23226
- var _el$2 = _tmpl$2$j();
23199
+ var _el$2 = _tmpl$2$i();
23227
23200
  setAttribute(_el$2, "x", x);
23228
23201
  setAttribute(_el$2, "y", y);
23229
23202
  setAttribute(_el$2, "width", w);
@@ -23232,7 +23205,7 @@ function WrapIcon(props) {
23232
23205
  return _el$2;
23233
23206
  })();
23234
23207
  return (() => {
23235
- var _el$3 = _tmpl$5$8();
23208
+ var _el$3 = _tmpl$5$7();
23236
23209
  insert(_el$3, createComponent(Show, {
23237
23210
  get when() {
23238
23211
  return props.preset === "square";
@@ -23246,7 +23219,7 @@ function WrapIcon(props) {
23246
23219
  return props.preset === "tight";
23247
23220
  },
23248
23221
  get children() {
23249
- return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$d()];
23222
+ return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$c()];
23250
23223
  }
23251
23224
  }), null);
23252
23225
  insert(_el$3, createComponent(Show, {
@@ -23254,7 +23227,7 @@ function WrapIcon(props) {
23254
23227
  return props.preset === "through";
23255
23228
  },
23256
23229
  get children() {
23257
- return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$a()];
23230
+ return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$9()];
23258
23231
  }
23259
23232
  }), null);
23260
23233
  insert(_el$3, createComponent(Show, {
@@ -23287,31 +23260,11 @@ function WrapIcon(props) {
23287
23260
  function FloatingLayoutOptions(props) {
23288
23261
  const t = useI18n();
23289
23262
  const [open, setOpen] = createSignal(false);
23290
- const [surfaceRect, setSurfaceRect] = createSignal(null);
23291
- const [tick, setTick] = createSignal(0);
23292
- const refreshSurfaceRect = () => {
23293
- const surface = props.surfaceRef();
23294
- setSurfaceRect(surface ? surface.getBoundingClientRect() : null);
23295
- };
23296
- let frame = null;
23297
- const scheduleRefresh = () => {
23298
- if (frame !== null) return;
23299
- frame = requestAnimationFrame(() => {
23300
- frame = null;
23301
- refreshSurfaceRect();
23302
- setTick((value) => value + 1);
23303
- });
23304
- };
23305
- onMount(() => {
23306
- refreshSurfaceRect();
23307
- window.addEventListener("scroll", scheduleRefresh, true);
23308
- window.addEventListener("resize", scheduleRefresh);
23309
- onCleanup(() => {
23310
- window.removeEventListener("scroll", scheduleRefresh, true);
23311
- window.removeEventListener("resize", scheduleRefresh);
23312
- if (frame !== null) cancelAnimationFrame(frame);
23313
- });
23314
- });
23263
+ const {
23264
+ rect: surfaceRect,
23265
+ tick,
23266
+ refresh: scheduleRefresh
23267
+ } = useSurfaceRect(props.surfaceRef);
23315
23268
  createMemo(() => {
23316
23269
  props.layoutOptions.target();
23317
23270
  props.box();
@@ -32263,14 +32216,14 @@ function twipsToPoints(value) {
32263
32216
  if (!Number.isFinite(parsed)) {
32264
32217
  return void 0;
32265
32218
  }
32266
- return Math.round(parsed / 20 * 1e4) / 1e4;
32219
+ return roundTo(parsed / 20, 4);
32267
32220
  }
32268
32221
  function halfPointsToPx(value) {
32269
32222
  const parsed = value ? Number(value) : Number.NaN;
32270
32223
  if (!Number.isFinite(parsed)) {
32271
32224
  return null;
32272
32225
  }
32273
- return Math.round(parsed / 2 / 72 * PX_PER_INCH * 1e4) / 1e4;
32226
+ return roundTo(parsed / 2 / 72 * PX_PER_INCH, 4);
32274
32227
  }
32275
32228
  function normalizeImportedFontFamily(value) {
32276
32229
  const family = value == null ? void 0 : value.trim();
@@ -32735,7 +32688,7 @@ function parseDocxBorder(borderNode) {
32735
32688
  return { width: 0, type: "none", color: "transparent" };
32736
32689
  }
32737
32690
  const size = Number(getAttributeValue(borderNode, "sz"));
32738
- const width = Number.isFinite(size) && size > 0 ? Math.round(size / 8 * 1e4) / 1e4 : 0.75;
32691
+ const width = Number.isFinite(size) && size > 0 ? roundTo(size / 8, 4) : 0.75;
32739
32692
  const color = normalizeImportedHexColor(getAttributeValue(borderNode, "color")) ?? "#000000";
32740
32693
  const normalizedValue = (value == null ? void 0 : value.toLowerCase()) ?? "single";
32741
32694
  const type = normalizedValue.includes("dotted") || normalizedValue.includes("dot") ? "dotted" : normalizedValue.includes("dash") ? "dashed" : "solid";
@@ -33467,7 +33420,7 @@ function parseParagraphStyle$1(paragraphProperties, colors) {
33467
33420
  }
33468
33421
  if (line) {
33469
33422
  if (lineRule === "exact" || lineRule === "atLeast") {
33470
- style2.lineHeight = Math.round(Number(line) / 1440 * 96 * 1e4) / 1e4;
33423
+ style2.lineHeight = roundTo(Number(line) / 1440 * 96, 4);
33471
33424
  style2.lineRule = lineRule;
33472
33425
  } else {
33473
33426
  style2.lineHeight = Number(line) / 240;
@@ -33600,7 +33553,7 @@ function parseDocxWidthValue(element) {
33600
33553
  return void 0;
33601
33554
  }
33602
33555
  const pct = raw.trim().endsWith("%") ? Number.parseFloat(raw) : Number(raw) / 50;
33603
- return Number.isFinite(pct) ? `${Math.round(pct * 1e4) / 1e4}%` : void 0;
33556
+ return Number.isFinite(pct) ? `${roundTo(pct, 4)}%` : void 0;
33604
33557
  }
33605
33558
  return twipsToPoints(raw);
33606
33559
  }
@@ -33984,7 +33937,7 @@ function parseTableCellStyle(cellProperties, tableDefaultMargins, colors) {
33984
33937
  } else if (cellWidthType === "pct" && cellWidthValue) {
33985
33938
  const pct = Number(cellWidthValue);
33986
33939
  if (Number.isFinite(pct)) {
33987
- style2.width = `${Math.round(pct / 50 * 1e4) / 1e4}%`;
33940
+ style2.width = `${roundTo(pct / 50, 4)}%`;
33988
33941
  }
33989
33942
  }
33990
33943
  const tcMar = parseCellMargins(
@@ -35042,7 +34995,7 @@ function parseTextBoxShape(wsp) {
35042
34995
  } else if (el.localName === "ln") {
35043
34996
  const width = parseOptionalInt$1(el.getAttribute("w"));
35044
34997
  if (width !== void 0) {
35045
- shape.borderWidthPt = Math.round(width / EMU_PER_PT * 100) / 100;
34998
+ shape.borderWidthPt = roundTo(width / EMU_PER_PT, 2);
35046
34999
  }
35047
35000
  const color = normalizeHexColor(
35048
35001
  (_b = findElementDeep(el, "srgbClr")) == null ? void 0 : _b.getAttribute("val")
@@ -36812,12 +36765,16 @@ async function importDocxToEditorDocument(buffer, options = {}) {
36812
36765
  const hasAssets = Object.keys(assets.assets).length > 0;
36813
36766
  const finalize = (doc2) => {
36814
36767
  const settingsPatch = {};
36815
- if (docSettings.defaultTabStop !== void 0) settingsPatch.defaultTabStop = docSettings.defaultTabStop;
36816
- if (docSettings.allowSpaceOfSameStyleInTable) settingsPatch.allowSpaceOfSameStyleInTable = true;
36768
+ if (docSettings.defaultTabStop !== void 0)
36769
+ settingsPatch.defaultTabStop = docSettings.defaultTabStop;
36770
+ if (docSettings.allowSpaceOfSameStyleInTable)
36771
+ settingsPatch.allowSpaceOfSameStyleInTable = true;
36817
36772
  if (docSettings.autoHyphenation) settingsPatch.autoHyphenation = true;
36818
36773
  if (docSettings.doNotHyphenateCaps) settingsPatch.doNotHyphenateCaps = true;
36819
- if (docSettings.consecutiveHyphenLimit !== void 0) settingsPatch.consecutiveHyphenLimit = docSettings.consecutiveHyphenLimit;
36820
- if (docSettings.hyphenationZone !== void 0) settingsPatch.hyphenationZone = docSettings.hyphenationZone;
36774
+ if (docSettings.consecutiveHyphenLimit !== void 0)
36775
+ settingsPatch.consecutiveHyphenLimit = docSettings.consecutiveHyphenLimit;
36776
+ if (docSettings.hyphenationZone !== void 0)
36777
+ settingsPatch.hyphenationZone = docSettings.hyphenationZone;
36821
36778
  if (Object.keys(settingsPatch).length > 0) {
36822
36779
  doc2.settings = { ...doc2.settings ?? {}, ...settingsPatch };
36823
36780
  }
@@ -37005,7 +36962,7 @@ function importDocxInWorker(buffer, options = {}) {
37005
36962
  const worker = new Worker(
37006
36963
  new URL(
37007
36964
  /* @vite-ignore */
37008
- "" + new URL("assets/importDocxWorker-D0F0jbcF.js", import.meta.url).href,
36965
+ "" + new URL("assets/importDocxWorker-nIS-zjkj.js", import.meta.url).href,
37009
36966
  import.meta.url
37010
36967
  ),
37011
36968
  {
@@ -37064,6 +37021,10 @@ const docxImporter = {
37064
37021
  });
37065
37022
  }
37066
37023
  };
37024
+ function isAllowedImageSrc(src) {
37025
+ const normalized = src.trim().toLowerCase();
37026
+ return normalized.startsWith("data:image/") || normalized.startsWith("blob:");
37027
+ }
37067
37028
  function parseInlineImage(element) {
37068
37029
  var _a, _b, _c;
37069
37030
  if (element.tagName !== "IMG") {
@@ -37071,7 +37032,7 @@ function parseInlineImage(element) {
37071
37032
  }
37072
37033
  const img = element;
37073
37034
  const src = ((_a = img.getAttribute("src")) == null ? void 0 : _a.trim()) ?? "";
37074
- if (!src) {
37035
+ if (!src || !isAllowedImageSrc(src)) {
37075
37036
  return void 0;
37076
37037
  }
37077
37038
  const widthAttr = ((_b = img.getAttribute("width")) == null ? void 0 : _b.trim()) ?? "";
@@ -37637,10 +37598,10 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
37637
37598
  nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
37638
37599
  return { width: nextWidth, height: nextHeight };
37639
37600
  }
37640
- var _tmpl$$p = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$i = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$c = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
37601
+ var _tmpl$$q = /* @__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>`);
37641
37602
  function ResizeHandlesOverlay(props) {
37642
37603
  return (() => {
37643
- var _el$ = _tmpl$2$i();
37604
+ var _el$ = _tmpl$2$h();
37644
37605
  _el$.$$mousedown = (event) => {
37645
37606
  if (props.readOnly || !props.box() || !props.onBodyMouseDown) {
37646
37607
  return;
@@ -37656,7 +37617,7 @@ function ResizeHandlesOverlay(props) {
37656
37617
  return [createComponent(For, {
37657
37618
  each: RESIZE_HANDLE_DIRECTIONS,
37658
37619
  children: (direction) => (() => {
37659
- var _el$3 = _tmpl$3$c();
37620
+ var _el$3 = _tmpl$3$b();
37660
37621
  _el$3.$$mousedown = (event) => {
37661
37622
  if (!props.box()) {
37662
37623
  return;
@@ -37671,7 +37632,7 @@ function ResizeHandlesOverlay(props) {
37671
37632
  return props.onRotateStart;
37672
37633
  },
37673
37634
  get children() {
37674
- var _el$2 = _tmpl$$p();
37635
+ var _el$2 = _tmpl$$q();
37675
37636
  _el$2.$$mousedown = (event) => {
37676
37637
  var _a;
37677
37638
  if (!props.box()) {
@@ -37727,7 +37688,7 @@ function createEditorZoom(initial = ZOOM_DEFAULT) {
37727
37688
  const zoomFactor = createMemo(() => zoomPercent() / 100);
37728
37689
  return { zoomPercent, setZoomPercent, adjustZoom, zoomFactor };
37729
37690
  }
37730
- var _tmpl$$o = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><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><div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><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></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%`), _tmpl$2$h = /* @__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$b = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$4$9 = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`);
37691
+ var _tmpl$$p = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><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><div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><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></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%`), _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$6 = /* @__PURE__ */ template(`<span>`);
37731
37692
  function OasisEditorEditor(props) {
37732
37693
  const t = useI18n();
37733
37694
  const layout = () => props.layout;
@@ -37855,7 +37816,7 @@ function OasisEditorEditor(props) {
37855
37816
  queueMicrotask(recomputeViewportPageIndex);
37856
37817
  });
37857
37818
  return (() => {
37858
- var _el$ = _tmpl$$o(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$2.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild;
37819
+ var _el$ = _tmpl$$p(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$2.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild;
37859
37820
  insert(_el$, createComponent(Show, {
37860
37821
  get when() {
37861
37822
  return memo(() => !!layout().showHorizontalRuler)() && overlays().toolbarHost;
@@ -38139,7 +38100,7 @@ function OasisEditorEditor(props) {
38139
38100
  const isDone = progress().phase === "done";
38140
38101
  const isError = progress().phase === "error";
38141
38102
  return (() => {
38142
- var _el$18 = _tmpl$2$h(), _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
38103
+ var _el$18 = _tmpl$2$g(), _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
38143
38104
  _el$18.classList.toggle("oasis-editor-import-overlay-done", !!isDone);
38144
38105
  _el$18.classList.toggle("oasis-editor-import-overlay-error", !!isError);
38145
38106
  setAttribute(_el$18, "aria-busy", !isDone && !isError);
@@ -38152,11 +38113,11 @@ function OasisEditorEditor(props) {
38152
38113
  _el$23.classList.toggle("oasis-editor-import-progress-bar-done", !!isDone);
38153
38114
  _el$23.classList.toggle("oasis-editor-import-progress-bar-error", !!isError);
38154
38115
  insert(_el$24, isDone ? (() => {
38155
- var _el$25 = _tmpl$3$b();
38116
+ var _el$25 = _tmpl$3$a();
38156
38117
  insert(_el$25, () => t("import.phase.done"));
38157
38118
  return _el$25;
38158
38119
  })() : isError ? (() => {
38159
- var _el$26 = _tmpl$4$9();
38120
+ var _el$26 = _tmpl$4$8();
38160
38121
  insert(_el$26, () => t("import.phase.error"));
38161
38122
  return _el$26;
38162
38123
  })() : [memo(() => Math.round(progress().progress)), "%"]);
@@ -38195,7 +38156,7 @@ function OasisEditorEditor(props) {
38195
38156
  return createComponent(Show, {
38196
38157
  when: key,
38197
38158
  get children() {
38198
- var _el$27 = _tmpl$5$7();
38159
+ var _el$27 = _tmpl$5$6();
38199
38160
  insert(_el$27, () => t(key));
38200
38161
  createRenderEffect(() => className(_el$27, `oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${status.replace("...", "ing").replace(".", "")}`));
38201
38162
  return _el$27;
@@ -38865,7 +38826,7 @@ function buildCanvasLayoutSnapshot(options) {
38865
38826
  };
38866
38827
  }
38867
38828
  function rounded(value) {
38868
- return Math.round(value * 100) / 100;
38829
+ return roundTo(value, 2);
38869
38830
  }
38870
38831
  function getCanvasPageRectSignature(surface) {
38871
38832
  const surfaceRect = surface.getBoundingClientRect();
@@ -38925,11 +38886,11 @@ function createCanvasLayoutSnapshotProvider() {
38925
38886
  }
38926
38887
  };
38927
38888
  }
38928
- var _tmpl$$n = /* @__PURE__ */ template(`<button>`);
38889
+ var _tmpl$$o = /* @__PURE__ */ template(`<button>`);
38929
38890
  function FloatingActionButton(props) {
38930
38891
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "class", "classList"]);
38931
38892
  return (() => {
38932
- var _el$ = _tmpl$$n();
38893
+ var _el$ = _tmpl$$o();
38933
38894
  spread(_el$, mergeProps({
38934
38895
  get type() {
38935
38896
  return local.type ?? "button";
@@ -38958,7 +38919,7 @@ function FloatingActionButton(props) {
38958
38919
  return _el$;
38959
38920
  })();
38960
38921
  }
38961
- var _tmpl$$m = /* @__PURE__ */ template(`<aside>`), _tmpl$2$g = /* @__PURE__ */ template(`<div>`);
38922
+ var _tmpl$$n = /* @__PURE__ */ template(`<aside>`), _tmpl$2$f = /* @__PURE__ */ template(`<div>`);
38962
38923
  function SidePanel(props) {
38963
38924
  const [local, others] = splitProps(props, ["mode", "width", "class", "classList", "children", "style"]);
38964
38925
  const width = () => {
@@ -38968,7 +38929,7 @@ function SidePanel(props) {
38968
38929
  return local.width ?? "360px";
38969
38930
  };
38970
38931
  return (() => {
38971
- var _el$ = _tmpl$$m();
38932
+ var _el$ = _tmpl$$n();
38972
38933
  spread(_el$, mergeProps({
38973
38934
  get ["class"]() {
38974
38935
  return `oasis-editor-plugin-side-panel ${local.class ?? ""}`;
@@ -38993,7 +38954,7 @@ function SidePanel(props) {
38993
38954
  function SidePanelHeader(props) {
38994
38955
  const [local, others] = splitProps(props, ["class", "children"]);
38995
38956
  return (() => {
38996
- var _el$2 = _tmpl$2$g();
38957
+ var _el$2 = _tmpl$2$f();
38997
38958
  spread(_el$2, mergeProps({
38998
38959
  get ["class"]() {
38999
38960
  return `oasis-editor-plugin-side-panel-header ${local.class ?? ""}`;
@@ -39006,7 +38967,7 @@ function SidePanelHeader(props) {
39006
38967
  function SidePanelBody(props) {
39007
38968
  const [local, others] = splitProps(props, ["class", "children"]);
39008
38969
  return (() => {
39009
- var _el$3 = _tmpl$2$g();
38970
+ var _el$3 = _tmpl$2$f();
39010
38971
  spread(_el$3, mergeProps({
39011
38972
  get ["class"]() {
39012
38973
  return `oasis-editor-plugin-side-panel-body ${local.class ?? ""}`;
@@ -39019,7 +38980,7 @@ function SidePanelBody(props) {
39019
38980
  function SidePanelFooter(props) {
39020
38981
  const [local, others] = splitProps(props, ["class", "children"]);
39021
38982
  return (() => {
39022
- var _el$4 = _tmpl$2$g();
38983
+ var _el$4 = _tmpl$2$f();
39023
38984
  spread(_el$4, mergeProps({
39024
38985
  get ["class"]() {
39025
38986
  return `oasis-editor-plugin-side-panel-footer ${local.class ?? ""}`;
@@ -39029,11 +38990,11 @@ function SidePanelFooter(props) {
39029
38990
  return _el$4;
39030
38991
  })();
39031
38992
  }
39032
- var _tmpl$$l = /* @__PURE__ */ template(`<button>`);
38993
+ var _tmpl$$m = /* @__PURE__ */ template(`<button>`);
39033
38994
  function IconButton(props) {
39034
38995
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "variant", "size", "class", "classList"]);
39035
38996
  return (() => {
39036
- var _el$ = _tmpl$$l();
38997
+ var _el$ = _tmpl$$m();
39037
38998
  spread(_el$, mergeProps({
39038
38999
  get type() {
39039
39000
  return local.type ?? "button";
@@ -39064,7 +39025,7 @@ function IconButton(props) {
39064
39025
  return _el$;
39065
39026
  })();
39066
39027
  }
39067
- var _tmpl$$k = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$a = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$8 = /* @__PURE__ */ template(`<span class=oasis-editor-plugin-side-panel-icon>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title><span>`);
39028
+ var _tmpl$$l = /* @__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$5 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title><span>`);
39068
39029
  const EMPTY_SNAPSHOT = {
39069
39030
  floatingActions: [],
39070
39031
  sidePanels: [],
@@ -39096,7 +39057,7 @@ function PluginUiHost(props) {
39096
39057
  return groupActionsByPlacement(actions());
39097
39058
  },
39098
39059
  children: (group) => (() => {
39099
- var _el$ = _tmpl$$k();
39060
+ var _el$ = _tmpl$$l();
39100
39061
  insert(_el$, createComponent(For, {
39101
39062
  get each() {
39102
39063
  return group.actions;
@@ -39125,7 +39086,7 @@ function PluginUiHost(props) {
39125
39086
  })()
39126
39087
  });
39127
39088
  return (() => {
39128
- var _el$2 = _tmpl$2$f(), _el$3 = _el$2.firstChild;
39089
+ var _el$2 = _tmpl$2$e(), _el$3 = _el$2.firstChild;
39129
39090
  insert(_el$3, resolvedChildren);
39130
39091
  insert(_el$2, createComponent(Show, {
39131
39092
  get when() {
@@ -39138,7 +39099,7 @@ function PluginUiHost(props) {
39138
39099
  return overlayPanel();
39139
39100
  },
39140
39101
  children: (panel) => (() => {
39141
- var _el$4 = _tmpl$3$a();
39102
+ var _el$4 = _tmpl$3$9();
39142
39103
  insert(_el$4, () => renderPanel(props.editor, panel(), t));
39143
39104
  return _el$4;
39144
39105
  })()
@@ -39189,13 +39150,13 @@ function renderPanel(editor, panel, t) {
39189
39150
  return [createComponent(SidePanelHeader, {
39190
39151
  get children() {
39191
39152
  return [(() => {
39192
- var _el$5 = _tmpl$5$6(), _el$7 = _el$5.firstChild;
39153
+ var _el$5 = _tmpl$5$5(), _el$7 = _el$5.firstChild;
39193
39154
  insert(_el$5, createComponent(Show, {
39194
39155
  get when() {
39195
39156
  return panel.icon;
39196
39157
  },
39197
39158
  get children() {
39198
- var _el$6 = _tmpl$4$8();
39159
+ var _el$6 = _tmpl$4$7();
39199
39160
  insert(_el$6, createComponent(ToolIcon, {
39200
39161
  get name() {
39201
39162
  return panel.icon;
@@ -39244,7 +39205,7 @@ function groupActionsByPlacement(actions) {
39244
39205
  actions: groupActions
39245
39206
  }));
39246
39207
  }
39247
- var _tmpl$$j = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
39208
+ var _tmpl$$k = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
39248
39209
  function DocumentShell(props) {
39249
39210
  let surfaceEl;
39250
39211
  let viewportEl;
@@ -39371,7 +39332,7 @@ function DocumentShell(props) {
39371
39332
  return props.runtimeEditor;
39372
39333
  },
39373
39334
  get children() {
39374
- var _el$ = _tmpl$$j(), _el$2 = _el$.firstChild;
39335
+ var _el$ = _tmpl$$k(), _el$2 = _el$.firstChild;
39375
39336
  insert(_el$, createComponent(Show, {
39376
39337
  get when() {
39377
39338
  return memo(() => !!props.showChrome)() && props.showOutline;
@@ -39436,10 +39397,10 @@ function DocumentShell(props) {
39436
39397
  }
39437
39398
  })];
39438
39399
  }
39439
- var _tmpl$$i = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$e = /* @__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">`);
39400
+ var _tmpl$$j = /* @__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">`);
39440
39401
  function InlineShell(props) {
39441
39402
  return (() => {
39442
- var _el$ = _tmpl$2$e();
39403
+ var _el$ = _tmpl$2$d();
39443
39404
  insert(_el$, createComponent(Show, {
39444
39405
  get when() {
39445
39406
  return memo(() => !!props.showChrome)() && props.showToolbar;
@@ -39466,7 +39427,7 @@ function InlineShell(props) {
39466
39427
  return props.runtimeEditor;
39467
39428
  },
39468
39429
  get children() {
39469
- var _el$2 = _tmpl$$i(), _el$3 = _el$2.firstChild;
39430
+ var _el$2 = _tmpl$$j(), _el$3 = _el$2.firstChild;
39470
39431
  insert(_el$3, createComponent(OasisEditorEditor, {
39471
39432
  state: () => props.state,
39472
39433
  get layout() {
@@ -39506,16 +39467,16 @@ function InlineShell(props) {
39506
39467
  return _el$;
39507
39468
  })();
39508
39469
  }
39509
- var _tmpl$$h = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
39470
+ var _tmpl$$i = /* @__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>`);
39510
39471
  function BalloonShell(props) {
39511
39472
  return (() => {
39512
- var _el$ = _tmpl$2$d();
39473
+ var _el$ = _tmpl$2$c();
39513
39474
  insert(_el$, createComponent(PluginUiHost, {
39514
39475
  get editor() {
39515
39476
  return props.runtimeEditor;
39516
39477
  },
39517
39478
  get children() {
39518
- var _el$2 = _tmpl$$h(), _el$3 = _el$2.firstChild;
39479
+ var _el$2 = _tmpl$$i(), _el$3 = _el$2.firstChild;
39519
39480
  insert(_el$3, createComponent(OasisEditorEditor, {
39520
39481
  state: () => props.state,
39521
39482
  get layout() {
@@ -39555,7 +39516,7 @@ function BalloonShell(props) {
39555
39516
  return _el$;
39556
39517
  })();
39557
39518
  }
39558
- var _tmpl$$g = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$c = /* @__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>`);
39519
+ var _tmpl$$h = /* @__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>`);
39559
39520
  function Dialog(props) {
39560
39521
  const t = useI18n();
39561
39522
  let dialogRef;
@@ -39580,7 +39541,7 @@ function Dialog(props) {
39580
39541
  return props.isOpen;
39581
39542
  },
39582
39543
  get children() {
39583
- var _el$ = _tmpl$2$c(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
39544
+ 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;
39584
39545
  _el$.$$click = () => {
39585
39546
  if (props.closeOnOverlayClick ?? true) {
39586
39547
  props.onClose();
@@ -39597,7 +39558,7 @@ function Dialog(props) {
39597
39558
  return props.footer;
39598
39559
  },
39599
39560
  get children() {
39600
- var _el$7 = _tmpl$$g();
39561
+ var _el$7 = _tmpl$$h();
39601
39562
  insert(_el$7, () => props.footer);
39602
39563
  return _el$7;
39603
39564
  }
@@ -39626,7 +39587,7 @@ function Dialog(props) {
39626
39587
  });
39627
39588
  }
39628
39589
  delegateEvents(["click"]);
39629
- var _tmpl$$f = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$b = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$9 = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
39590
+ var _tmpl$$g = /* @__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>`);
39630
39591
  function findEnabledItem(items, startIndex, direction) {
39631
39592
  if (!items.length) return void 0;
39632
39593
  for (let step = 0; step < items.length; step += 1) {
@@ -39677,7 +39638,7 @@ function Tabs(props) {
39677
39638
  selectItem(findEnabledItem(items(), currentIndex + direction, direction), true);
39678
39639
  };
39679
39640
  return (() => {
39680
- var _el$ = _tmpl$$f(), _el$2 = _el$.firstChild;
39641
+ var _el$ = _tmpl$$g(), _el$2 = _el$.firstChild;
39681
39642
  _el$2.$$keydown = handleKeyDown;
39682
39643
  insert(_el$2, createComponent(For, {
39683
39644
  get each() {
@@ -39687,7 +39648,7 @@ function Tabs(props) {
39687
39648
  const tabId = `${baseId}-${item.id}-tab`;
39688
39649
  const panelId = `${baseId}-${item.id}-panel`;
39689
39650
  return (() => {
39690
- var _el$3 = _tmpl$2$b();
39651
+ var _el$3 = _tmpl$2$a();
39691
39652
  _el$3.$$click = () => selectItem(item);
39692
39653
  use((element) => {
39693
39654
  tabRefs[index()] = element;
@@ -39722,7 +39683,7 @@ function Tabs(props) {
39722
39683
  return items();
39723
39684
  },
39724
39685
  children: (item) => (() => {
39725
- var _el$4 = _tmpl$3$9();
39686
+ var _el$4 = _tmpl$3$8();
39726
39687
  insert(_el$4, () => item.panel);
39727
39688
  createRenderEffect((_p$) => {
39728
39689
  var _a, _b;
@@ -39754,12 +39715,12 @@ function Tabs(props) {
39754
39715
  })();
39755
39716
  }
39756
39717
  delegateEvents(["keydown", "click"]);
39757
- var _tmpl$$e = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
39718
+ var _tmpl$$f = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
39758
39719
  function Button(props) {
39759
39720
  const [local, others] = splitProps(props, ["type", "variant", "size", "icon", "iconPosition", "fullWidth", "class", "classList", "children"]);
39760
39721
  const iconPosition = () => local.iconPosition ?? "start";
39761
39722
  return (() => {
39762
- var _el$ = _tmpl$$e(), _el$2 = _el$.firstChild;
39723
+ var _el$ = _tmpl$$f(), _el$2 = _el$.firstChild;
39763
39724
  spread(_el$, mergeProps({
39764
39725
  get type() {
39765
39726
  return local.type ?? "button";
@@ -39804,7 +39765,7 @@ function Button(props) {
39804
39765
  return _el$;
39805
39766
  })();
39806
39767
  }
39807
- var _tmpl$$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$7 = /* @__PURE__ */ template(`<label><input class=oasis-editor-ui-input>`);
39768
+ var _tmpl$$e = /* @__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>`);
39808
39769
  function TextField(props) {
39809
39770
  const fallbackId = createUniqueId();
39810
39771
  const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
@@ -39812,13 +39773,13 @@ function TextField(props) {
39812
39773
  const descriptionId = () => `${id()}-description`;
39813
39774
  const errorId = () => `${id()}-error`;
39814
39775
  return (() => {
39815
- var _el$ = _tmpl$4$7(), _el$3 = _el$.firstChild;
39776
+ var _el$ = _tmpl$4$6(), _el$3 = _el$.firstChild;
39816
39777
  insert(_el$, createComponent(Show, {
39817
39778
  get when() {
39818
39779
  return local.label;
39819
39780
  },
39820
39781
  get children() {
39821
- var _el$2 = _tmpl$$d();
39782
+ var _el$2 = _tmpl$$e();
39822
39783
  insert(_el$2, () => local.label);
39823
39784
  return _el$2;
39824
39785
  }
@@ -39843,7 +39804,7 @@ function TextField(props) {
39843
39804
  return local.description;
39844
39805
  },
39845
39806
  get children() {
39846
- var _el$4 = _tmpl$2$a();
39807
+ var _el$4 = _tmpl$2$9();
39847
39808
  insert(_el$4, () => local.description);
39848
39809
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
39849
39810
  return _el$4;
@@ -39854,7 +39815,7 @@ function TextField(props) {
39854
39815
  return local.error;
39855
39816
  },
39856
39817
  get children() {
39857
- var _el$5 = _tmpl$3$8();
39818
+ var _el$5 = _tmpl$3$7();
39858
39819
  insert(_el$5, () => local.error);
39859
39820
  createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
39860
39821
  return _el$5;
@@ -39873,7 +39834,7 @@ function TextField(props) {
39873
39834
  })();
39874
39835
  }
39875
39836
  delegateEvents(["input"]);
39876
- var _tmpl$$c = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$7 = /* @__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>`);
39837
+ var _tmpl$$d = /* @__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>`);
39877
39838
  function Checkbox(props) {
39878
39839
  const fallbackId = createUniqueId();
39879
39840
  const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
@@ -39881,7 +39842,7 @@ function Checkbox(props) {
39881
39842
  const descriptionId = () => `${id()}-description`;
39882
39843
  const errorId = () => `${id()}-error`;
39883
39844
  return (() => {
39884
- var _el$ = _tmpl$3$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
39845
+ var _el$ = _tmpl$3$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
39885
39846
  _el$2.addEventListener("change", (event) => {
39886
39847
  var _a;
39887
39848
  return (_a = local.onChange) == null ? void 0 : _a.call(local, event.currentTarget.checked);
@@ -39903,7 +39864,7 @@ function Checkbox(props) {
39903
39864
  return local.description;
39904
39865
  },
39905
39866
  get children() {
39906
- var _el$5 = _tmpl$$c();
39867
+ var _el$5 = _tmpl$$d();
39907
39868
  insert(_el$5, () => local.description);
39908
39869
  createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
39909
39870
  return _el$5;
@@ -39914,7 +39875,7 @@ function Checkbox(props) {
39914
39875
  return local.error;
39915
39876
  },
39916
39877
  get children() {
39917
- var _el$6 = _tmpl$2$9();
39878
+ var _el$6 = _tmpl$2$8();
39918
39879
  insert(_el$6, () => local.error);
39919
39880
  createRenderEffect(() => setAttribute(_el$6, "id", errorId()));
39920
39881
  return _el$6;
@@ -39932,7 +39893,7 @@ function Checkbox(props) {
39932
39893
  return _el$;
39933
39894
  })();
39934
39895
  }
39935
- var _tmpl$$b = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$6 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$6 = /* @__PURE__ */ template(`<label><select class=oasis-editor-ui-select>`), _tmpl$5$5 = /* @__PURE__ */ template(`<option>`);
39896
+ var _tmpl$$c = /* @__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$4 = /* @__PURE__ */ template(`<option>`);
39936
39897
  function SelectField(props) {
39937
39898
  const fallbackId = createUniqueId();
39938
39899
  const [local, others] = splitProps(props, ["label", "description", "error", "options", "onChange", "class", "id"]);
@@ -39940,13 +39901,13 @@ function SelectField(props) {
39940
39901
  const descriptionId = () => `${id()}-description`;
39941
39902
  const errorId = () => `${id()}-error`;
39942
39903
  return (() => {
39943
- var _el$ = _tmpl$4$6(), _el$3 = _el$.firstChild;
39904
+ var _el$ = _tmpl$4$5(), _el$3 = _el$.firstChild;
39944
39905
  insert(_el$, createComponent(Show, {
39945
39906
  get when() {
39946
39907
  return local.label;
39947
39908
  },
39948
39909
  get children() {
39949
- var _el$2 = _tmpl$$b();
39910
+ var _el$2 = _tmpl$$c();
39950
39911
  insert(_el$2, () => local.label);
39951
39912
  return _el$2;
39952
39913
  }
@@ -39971,7 +39932,7 @@ function SelectField(props) {
39971
39932
  return local.options;
39972
39933
  },
39973
39934
  children: (option) => (() => {
39974
- var _el$6 = _tmpl$5$5();
39935
+ var _el$6 = _tmpl$5$4();
39975
39936
  insert(_el$6, () => option.label);
39976
39937
  createRenderEffect(() => _el$6.disabled = option.disabled);
39977
39938
  createRenderEffect(() => _el$6.value = option.value);
@@ -39983,7 +39944,7 @@ function SelectField(props) {
39983
39944
  return local.description;
39984
39945
  },
39985
39946
  get children() {
39986
- var _el$4 = _tmpl$2$8();
39947
+ var _el$4 = _tmpl$2$7();
39987
39948
  insert(_el$4, () => local.description);
39988
39949
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
39989
39950
  return _el$4;
@@ -39994,7 +39955,7 @@ function SelectField(props) {
39994
39955
  return local.error;
39995
39956
  },
39996
39957
  get children() {
39997
- var _el$5 = _tmpl$3$6();
39958
+ var _el$5 = _tmpl$3$5();
39998
39959
  insert(_el$5, () => local.error);
39999
39960
  createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
40000
39961
  return _el$5;
@@ -40012,6 +39973,47 @@ function SelectField(props) {
40012
39973
  return _el$;
40013
39974
  })();
40014
39975
  }
39976
+ function NumberField(props) {
39977
+ const [local, others] = splitProps(props, ["onChange"]);
39978
+ return createComponent(TextField, mergeProps({
39979
+ type: "number",
39980
+ onChange: (raw) => {
39981
+ var _a, _b;
39982
+ if (raw.trim() === "") {
39983
+ (_a = local.onChange) == null ? void 0 : _a.call(local, null);
39984
+ return;
39985
+ }
39986
+ const parsed = Number(raw);
39987
+ (_b = local.onChange) == null ? void 0 : _b.call(local, Number.isNaN(parsed) ? null : parsed);
39988
+ }
39989
+ }, others));
39990
+ }
39991
+ var _tmpl$$b = /* @__PURE__ */ template(`<div>`);
39992
+ const ALIGN_MAP = {
39993
+ start: "flex-start",
39994
+ center: "center",
39995
+ end: "flex-end",
39996
+ stretch: "stretch"
39997
+ };
39998
+ function FieldRow(props) {
39999
+ const [local, others] = splitProps(props, ["align", "class", "style", "children"]);
40000
+ return (() => {
40001
+ var _el$ = _tmpl$$b();
40002
+ spread(_el$, mergeProps({
40003
+ get ["class"]() {
40004
+ return `oasis-editor-ui-field-row ${local.class ?? ""}`;
40005
+ },
40006
+ get style() {
40007
+ return {
40008
+ "align-items": ALIGN_MAP[local.align ?? "end"],
40009
+ ...typeof local.style === "object" ? local.style : {}
40010
+ };
40011
+ }
40012
+ }, others), false, true);
40013
+ insert(_el$, () => local.children);
40014
+ return _el$;
40015
+ })();
40016
+ }
40015
40017
  var _tmpl$$a = /* @__PURE__ */ template(`<div>`);
40016
40018
  function DialogFooter(props) {
40017
40019
  const [local, others] = splitProps(props, ["align", "class", "classList", "children"]);
@@ -40219,10 +40221,10 @@ function previousFontSizePt(currentPt) {
40219
40221
  return Math.max(1, Math.round(currentPt) - 1);
40220
40222
  }
40221
40223
  function fontSizePxToPt(px) {
40222
- return Math.round(pxToPt(px) * 100) / 100;
40224
+ return roundTo(pxToPt(px), 2);
40223
40225
  }
40224
40226
  function fontSizePtToPx(pt2) {
40225
- return Math.round(ptToPx(pt2) * 1e4) / 1e4;
40227
+ return roundTo(ptToPx(pt2), 4);
40226
40228
  }
40227
40229
  function formatFontSizePt(px) {
40228
40230
  const value = Number(px);
@@ -40329,7 +40331,7 @@ const UNDERLINE_STYLE_OPTIONS = [
40329
40331
  }
40330
40332
  }
40331
40333
  ];
40332
- var _tmpl$$9 = /* @__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$7 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$5 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
40334
+ var _tmpl$$9 = /* @__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$3 = /* @__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>`);
40333
40335
  const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
40334
40336
  const TEST_ID = "editor-toolbar-underline";
40335
40337
  function UnderlineControl(props) {
@@ -40380,7 +40382,7 @@ function UnderlineControl(props) {
40380
40382
  panelRole: "menu",
40381
40383
  get mainContent() {
40382
40384
  return (() => {
40383
- var _el$5 = _tmpl$3$5(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
40385
+ var _el$5 = _tmpl$3$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
40384
40386
  createRenderEffect(() => setAttribute(_el$7, "data-style", indicatorStyle()));
40385
40387
  return _el$5;
40386
40388
  })();
@@ -40395,13 +40397,13 @@ function UnderlineControl(props) {
40395
40397
  insert(_el$3, () => t("toolbar.underlineRemove"));
40396
40398
  return _el$;
40397
40399
  })(), (() => {
40398
- var _el$4 = _tmpl$2$7();
40400
+ var _el$4 = _tmpl$2$6();
40399
40401
  insert(_el$4, createComponent(For, {
40400
40402
  each: UNDERLINE_STYLE_OPTIONS,
40401
40403
  children: (option) => {
40402
40404
  const isActive = () => active() && activeStyleValue() === option.value.toLowerCase();
40403
40405
  return (() => {
40404
- var _el$8 = _tmpl$5$4(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
40406
+ var _el$8 = _tmpl$5$3(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
40405
40407
  _el$8.$$click = () => {
40406
40408
  applyUnderlineStyle(option.value);
40407
40409
  setOpen(false);
@@ -40421,7 +40423,7 @@ function UnderlineControl(props) {
40421
40423
  })();
40422
40424
  },
40423
40425
  get children() {
40424
- var _el$0 = _tmpl$4$5();
40426
+ var _el$0 = _tmpl$4$4();
40425
40427
  createRenderEffect(() => _el$0.innerHTML = option.preview.svg);
40426
40428
  return _el$0;
40427
40429
  }
@@ -40450,7 +40452,7 @@ function UnderlineControl(props) {
40450
40452
  });
40451
40453
  }
40452
40454
  delegateEvents(["click"]);
40453
- var _tmpl$$8 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$6 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$4 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$4 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$2 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7 = /* @__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>`);
40455
+ var _tmpl$$8 = /* @__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$2 = /* @__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>`);
40454
40456
  function ListOptionsControl(props) {
40455
40457
  const t = useI18n();
40456
40458
  const api = props.api;
@@ -40476,19 +40478,19 @@ function ListOptionsControl(props) {
40476
40478
  insert(_el$4, () => t("toolbar.formatDecimal"));
40477
40479
  return _el$4;
40478
40480
  })(), (() => {
40479
- var _el$5 = _tmpl$2$6();
40481
+ var _el$5 = _tmpl$2$5();
40480
40482
  insert(_el$5, () => t("toolbar.formatLowerLetter"));
40481
40483
  return _el$5;
40482
40484
  })(), (() => {
40483
- var _el$6 = _tmpl$3$4();
40485
+ var _el$6 = _tmpl$3$3();
40484
40486
  insert(_el$6, () => t("toolbar.formatUpperLetter"));
40485
40487
  return _el$6;
40486
40488
  })(), (() => {
40487
- var _el$7 = _tmpl$4$4();
40489
+ var _el$7 = _tmpl$4$3();
40488
40490
  insert(_el$7, () => t("toolbar.formatLowerRoman"));
40489
40491
  return _el$7;
40490
40492
  })(), (() => {
40491
- var _el$8 = _tmpl$5$3();
40493
+ var _el$8 = _tmpl$5$2();
40492
40494
  insert(_el$8, () => t("toolbar.formatUpperRoman"));
40493
40495
  return _el$8;
40494
40496
  })(), (() => {
@@ -40505,35 +40507,35 @@ function ListOptionsControl(props) {
40505
40507
  }
40506
40508
  });
40507
40509
  }
40508
- var _tmpl$$7 = /* @__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$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 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$3 = /* @__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$3 = /* @__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>`);
40510
+ var _tmpl$$7 = /* @__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>`);
40509
40511
  function LineSpacingDialog(props) {
40510
40512
  const t = useI18n();
40511
- const [lineHeight, setLineHeight] = createSignal("");
40512
- const [spacingBefore, setSpacingBefore] = createSignal("");
40513
- const [spacingAfter, setSpacingAfter] = createSignal("");
40514
- createEffect(() => {
40515
- if (props.isOpen) {
40516
- setLineHeight(props.initial.lineHeight ?? "");
40517
- setSpacingBefore(props.initial.spacingBefore ?? "");
40518
- setSpacingAfter(props.initial.spacingAfter ?? "");
40519
- }
40520
- });
40521
40513
  const parseNumber = (value) => {
40522
40514
  if (value.trim() === "") return null;
40523
40515
  const num = Number(value);
40524
40516
  return Number.isFinite(num) ? num : null;
40525
40517
  };
40518
+ const [lineHeight, setLineHeight] = createSignal(null);
40519
+ const [spacingBefore, setSpacingBefore] = createSignal(null);
40520
+ const [spacingAfter, setSpacingAfter] = createSignal(null);
40521
+ createEffect(() => {
40522
+ if (props.isOpen) {
40523
+ setLineHeight(parseNumber(props.initial.lineHeight ?? ""));
40524
+ setSpacingBefore(parseNumber(props.initial.spacingBefore ?? ""));
40525
+ setSpacingAfter(parseNumber(props.initial.spacingAfter ?? ""));
40526
+ }
40527
+ });
40526
40528
  const previewStyle2 = createMemo(() => {
40527
- const lh = parseNumber(lineHeight());
40529
+ const lh = lineHeight();
40528
40530
  return {
40529
40531
  "line-height": lh !== null && lh > 0 ? String(lh) : void 0
40530
40532
  };
40531
40533
  });
40532
40534
  const handleApply = () => {
40533
40535
  props.onApply({
40534
- lineHeight: parseNumber(lineHeight()),
40535
- spacingBefore: parseNumber(spacingBefore()),
40536
- spacingAfter: parseNumber(spacingAfter())
40536
+ lineHeight: lineHeight(),
40537
+ spacingBefore: spacingBefore(),
40538
+ spacingAfter: spacingAfter()
40537
40539
  }, props.initial);
40538
40540
  props.onClose();
40539
40541
  };
@@ -40548,46 +40550,77 @@ function LineSpacingDialog(props) {
40548
40550
  return props.onClose;
40549
40551
  },
40550
40552
  get footer() {
40551
- return [(() => {
40552
- var _el$14 = _tmpl$4$3();
40553
- addEventListener(_el$14, "click", props.onClose, true);
40554
- insert(_el$14, () => t("generic.cancel"));
40555
- return _el$14;
40556
- })(), (() => {
40557
- var _el$15 = _tmpl$5$2();
40558
- _el$15.$$click = handleApply;
40559
- insert(_el$15, () => t("generic.apply"));
40560
- return _el$15;
40561
- })()];
40553
+ return [createComponent(Button, {
40554
+ variant: "secondary",
40555
+ get onClick() {
40556
+ return props.onClose;
40557
+ },
40558
+ "data-testid": "editor-line-spacing-dialog-cancel",
40559
+ get children() {
40560
+ return t("generic.cancel");
40561
+ }
40562
+ }), createComponent(Button, {
40563
+ variant: "primary",
40564
+ onClick: handleApply,
40565
+ "data-testid": "editor-line-spacing-dialog-apply",
40566
+ get children() {
40567
+ return t("generic.apply");
40568
+ }
40569
+ })];
40562
40570
  },
40563
40571
  get children() {
40564
- return [(() => {
40565
- var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
40566
- insert(_el$3, () => t("lineSpacing.lineSpacingLabel"));
40567
- _el$4.$$input = (e) => setLineHeight(e.currentTarget.value);
40568
- createRenderEffect(() => _el$4.value = lineHeight());
40572
+ return [createComponent(FieldRow, {
40573
+ get children() {
40574
+ return createComponent(NumberField, {
40575
+ get label() {
40576
+ return t("lineSpacing.lineSpacingLabel");
40577
+ },
40578
+ min: "0.5",
40579
+ step: "0.05",
40580
+ get value() {
40581
+ return lineHeight() ?? "";
40582
+ },
40583
+ onChange: setLineHeight,
40584
+ "data-testid": "editor-line-spacing-dialog-line-height"
40585
+ });
40586
+ }
40587
+ }), createComponent(FieldRow, {
40588
+ get children() {
40589
+ return [createComponent(NumberField, {
40590
+ get label() {
40591
+ return t("lineSpacing.spacingBeforeLabel");
40592
+ },
40593
+ min: "0",
40594
+ step: "1",
40595
+ get value() {
40596
+ return spacingBefore() ?? "";
40597
+ },
40598
+ onChange: setSpacingBefore,
40599
+ "data-testid": "editor-line-spacing-dialog-spacing-before"
40600
+ }), createComponent(NumberField, {
40601
+ get label() {
40602
+ return t("lineSpacing.spacingAfterLabel");
40603
+ },
40604
+ min: "0",
40605
+ step: "1",
40606
+ get value() {
40607
+ return spacingAfter() ?? "";
40608
+ },
40609
+ onChange: setSpacingAfter,
40610
+ "data-testid": "editor-line-spacing-dialog-spacing-after"
40611
+ })];
40612
+ }
40613
+ }), (() => {
40614
+ var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
40615
+ insert(_el$2, () => t("lineSpacing.preview"));
40616
+ insert(_el$3, () => t("lineSpacing.previewText"), _el$4);
40617
+ insert(_el$3, () => t("lineSpacing.previewText"), null);
40618
+ createRenderEffect((_$p) => style(_el$3, previewStyle2(), _$p));
40569
40619
  return _el$;
40570
- })(), (() => {
40571
- var _el$5 = _tmpl$2$5(), _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;
40572
- insert(_el$7, () => t("lineSpacing.spacingBeforeLabel"));
40573
- _el$8.$$input = (e) => setSpacingBefore(e.currentTarget.value);
40574
- insert(_el$0, () => t("lineSpacing.spacingAfterLabel"));
40575
- _el$1.$$input = (e) => setSpacingAfter(e.currentTarget.value);
40576
- createRenderEffect(() => _el$8.value = spacingBefore());
40577
- createRenderEffect(() => _el$1.value = spacingAfter());
40578
- return _el$5;
40579
- })(), (() => {
40580
- var _el$10 = _tmpl$3$3(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild;
40581
- insert(_el$11, () => t("lineSpacing.preview"));
40582
- insert(_el$12, () => t("lineSpacing.previewText"), _el$13);
40583
- insert(_el$12, () => t("lineSpacing.previewText"), null);
40584
- createRenderEffect((_$p) => style(_el$12, previewStyle2(), _$p));
40585
- return _el$10;
40586
40620
  })()];
40587
40621
  }
40588
40622
  });
40589
40623
  }
40590
- delegateEvents(["input", "click"]);
40591
40624
  var _tmpl$$6 = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$4 = /* @__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$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$2 = /* @__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>`);
40592
40625
  const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
40593
40626
  function formatPreset(value) {
@@ -41112,7 +41145,7 @@ function cmToPx(cm) {
41112
41145
  return Math.round(cm * PX_PER_CM);
41113
41146
  }
41114
41147
  function pxToCm(px) {
41115
- return Math.round(px / PX_PER_CM * 100) / 100;
41148
+ return roundTo(px / PX_PER_CM, 2);
41116
41149
  }
41117
41150
  const MARGIN_PRESETS = [
41118
41151
  {
@@ -42634,259 +42667,267 @@ const OASIS_MENU_ITEMS = {
42634
42667
  formatListsNumbered: "format_lists_numbered"
42635
42668
  };
42636
42669
  export {
42637
- isParagraphTag as $,
42638
- getParagraphLength as A,
42639
- getParagraphText as B,
42640
- getActiveZone as C,
42641
- getActiveSectionIndex as D,
42642
- getParagraphs as E,
42643
- normalizeSelection as F,
42644
- positionToParagraphOffset as G,
42645
- paragraphOffsetToPosition as H,
42646
- clampPosition as I,
42647
- findParagraphIndex as J,
42648
- createCollapsedSelection as K,
42649
- isSelectionCollapsed as L,
42650
- MAX_FOOTNOTE_LAYOUT_ITERATIONS as M,
42651
- parseFontSizePtToPx as N,
42652
- formatFontSizePt as O,
42653
- createEditorParagraph as P,
42654
- getBlockParagraphs as Q,
42655
- findParagraphTableLocation as R,
42656
- STANDARD_FONT_SIZES_PT as S,
42657
- buildTableCellLayout as T,
42658
- PT_PER_PX as U,
42659
- createEditorTableCell as V,
42660
- createEditorTableRow as W,
42661
- createEditorTable as X,
42662
- underlineStyleToCssDecorationStyle as Y,
42663
- resolveImageSrc as Z,
42664
- listKindForTag as _,
42665
- getPageContentWidth as a,
42666
- resolveFloatingObjectRect as a$,
42667
- collectInlineRuns as a0,
42668
- parseParagraphStyle as a1,
42669
- getRunImage as a2,
42670
- InlineShell as a3,
42671
- BalloonShell as a4,
42672
- DocumentShell as a5,
42673
- createMemo as a6,
42674
- getCaretRectFromSnapshot as a7,
42675
- getParagraphRectFromSnapshot as a8,
42676
- createComponent as a9,
42677
- setPreciseFontPreference as aA,
42678
- setWelcomeSeen as aB,
42679
- enablePreciseFontMode as aC,
42680
- TWIPS_PER_POINT as aD,
42681
- PX_PER_INCH as aE,
42682
- TWIPS_PER_INCH as aF,
42683
- normalizeHex6 as aG,
42684
- TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aH,
42685
- TABLE_BORDER_EDGE_KEYS as aI,
42686
- resolveEffectiveParagraphStyle as aJ,
42687
- resolveEffectiveTextStyleForParagraph as aK,
42688
- EMU_PER_PT as aL,
42689
- OOXML_ROTATION_UNITS as aM,
42690
- OOXML_PERCENT_DENOMINATOR as aN,
42691
- parseHexColorToRgb255 as aO,
42692
- EMU_PER_PX as aP,
42693
- getRunFootnoteReference as aQ,
42694
- getRunEndnoteReference as aR,
42695
- iterateFootnoteReferenceRuns as aS,
42696
- iterateEndnoteReferenceRuns as aT,
42697
- imageContentTypeDefaults as aU,
42698
- getRunFieldChar as aV,
42699
- getRunFieldInstruction as aW,
42700
- createEditorRun as aX,
42701
- JSZip as aY,
42702
- imageExtensionFromMime as aZ,
42703
- pxToPt as a_,
42704
- CaretOverlay as aa,
42705
- Show as ab,
42706
- createRenderEffect as ac,
42707
- style as ad,
42708
- setAttribute as ae,
42709
- setStyleProperty as af,
42710
- memo as ag,
42711
- template as ah,
42712
- addEventListener as ai,
42713
- insert as aj,
42714
- delegateEvents as ak,
42715
- useI18n as al,
42716
- createEffect as am,
42717
- use as an,
42718
- Dialog as ao,
42719
- className as ap,
42720
- For as aq,
42721
- UNDERLINE_STYLE_OPTIONS as ar,
42722
- Tabs as as,
42723
- createStore as at,
42724
- reconcile as au,
42725
- onMount as av,
42726
- onCleanup as aw,
42727
- PluginUiHost as ax,
42728
- OasisEditorEditor as ay,
42729
- OasisBrandMark as az,
42670
+ findParagraphIndex as $,
42671
+ For as A,
42672
+ createContext as B,
42673
+ template as C,
42674
+ createUniqueId as D,
42675
+ EMPTY_PROJECTION_CONTEXT as E,
42676
+ FOOTNOTE_MARKER_GUTTER_PX as F,
42677
+ style as G,
42678
+ visitRun as H,
42679
+ assertNever as I,
42680
+ createSignal as J,
42681
+ createEditorStateFromDocument as K,
42682
+ createInitialEditorState as L,
42683
+ STANDARD_FONT_SIZES_PT as M,
42684
+ fontSizePxToPt as N,
42685
+ probeLocalFontFamilies as O,
42686
+ createEditorParagraphFromRuns as P,
42687
+ isInlineObjectRun as Q,
42688
+ createEditorStyledRun as R,
42689
+ Show as S,
42690
+ getParagraphLength as T,
42691
+ getActiveZone as U,
42692
+ getActiveSectionIndex as V,
42693
+ getParagraphs as W,
42694
+ normalizeSelection as X,
42695
+ positionToParagraphOffset as Y,
42696
+ paragraphOffsetToPosition as Z,
42697
+ clampPosition as _,
42698
+ getPageBodyBottom as a,
42699
+ EMU_PER_PX as a$,
42700
+ createCollapsedSelection as a0,
42701
+ isSelectionCollapsed as a1,
42702
+ parseFontSizePtToPx as a2,
42703
+ formatFontSizePt as a3,
42704
+ createEditorParagraph as a4,
42705
+ findParagraphTableLocation as a5,
42706
+ buildTableCellLayout as a6,
42707
+ PT_PER_PX as a7,
42708
+ createEditorTableCell as a8,
42709
+ createEditorTableRow as a9,
42710
+ Tabs as aA,
42711
+ FieldRow as aB,
42712
+ NumberField as aC,
42713
+ createStore as aD,
42714
+ reconcile as aE,
42715
+ addEventListener as aF,
42716
+ onMount as aG,
42717
+ onCleanup as aH,
42718
+ use as aI,
42719
+ PluginUiHost as aJ,
42720
+ OasisEditorEditor as aK,
42721
+ OasisBrandMark as aL,
42722
+ setPreciseFontPreference as aM,
42723
+ setWelcomeSeen as aN,
42724
+ enablePreciseFontMode as aO,
42725
+ TWIPS_PER_POINT as aP,
42726
+ PX_PER_INCH as aQ,
42727
+ TWIPS_PER_INCH as aR,
42728
+ normalizeHex6 as aS,
42729
+ TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aT,
42730
+ TABLE_BORDER_EDGE_KEYS as aU,
42731
+ resolveEffectiveParagraphStyle as aV,
42732
+ resolveEffectiveTextStyleForParagraph as aW,
42733
+ EMU_PER_PT as aX,
42734
+ OOXML_ROTATION_UNITS as aY,
42735
+ OOXML_PERCENT_DENOMINATOR as aZ,
42736
+ parseHexColorToRgb255 as a_,
42737
+ createEditorTable as aa,
42738
+ PX_PER_POINT as ab,
42739
+ underlineStyleToCssDecorationStyle as ac,
42740
+ resolveImageSrc as ad,
42741
+ listKindForTag as ae,
42742
+ isParagraphTag as af,
42743
+ collectInlineRuns as ag,
42744
+ parseParagraphStyle as ah,
42745
+ getRunImage as ai,
42746
+ InlineShell as aj,
42747
+ BalloonShell as ak,
42748
+ DocumentShell as al,
42749
+ createMemo as am,
42750
+ getCaretRectFromSnapshot as an,
42751
+ getParagraphRectFromSnapshot as ao,
42752
+ CaretOverlay as ap,
42753
+ setStyleProperty as aq,
42754
+ Button as ar,
42755
+ useI18n as as,
42756
+ createEffect as at,
42757
+ TextField as au,
42758
+ Dialog as av,
42759
+ SelectField as aw,
42760
+ UNDERLINE_STYLE_OPTIONS as ax,
42761
+ delegateEvents as ay,
42762
+ Checkbox as az,
42730
42763
  getPageBodyTop as b,
42731
- findParagraphLocation as b$,
42732
- getTextBoxFloatingGeometry as b0,
42733
- getPresetPathSegments as b1,
42734
- buildListLabels as b2,
42735
- PX_PER_POINT as b3,
42736
- DEFAULT_FONT_SIZE_PX as b4,
42737
- resolveGradientAxis as b5,
42738
- isDoubleUnderlineStyle as b6,
42739
- isWavyUnderlineStyle as b7,
42740
- underlineStyleLineWidthPx as b8,
42741
- WAVY_UNDERLINE_WAVELENGTH_PX as b9,
42742
- collectPdfFontFamilies as bA,
42743
- outlineFrom as bB,
42744
- getPageHeaderZoneTop as bC,
42745
- getPageColumnRects as bD,
42746
- findFootnoteReference as bE,
42747
- FOOTNOTE_MARKER_GUTTER_PX as bF,
42748
- resolveImporterForFile as bG,
42749
- getDocumentSectionsCanonical as bH,
42750
- getDocumentParagraphsCanonical as bI,
42751
- getDocumentParagraphs as bJ,
42752
- getDocumentPageSettings as bK,
42753
- getTableCellContentWidthForParagraph as bL,
42754
- layoutMetricsEpoch as bM,
42755
- bumpLayoutMetricsEpoch as bN,
42756
- createCanvasLayoutSnapshotProvider as bO,
42757
- on as bP,
42758
- debounce as bQ,
42759
- unwrap as bR,
42760
- perfTimer as bS,
42761
- getRunTextBox as bT,
42762
- createEditorDocument as bU,
42763
- resolveResizedDimensions as bV,
42764
- resolveTextBoxRenderHeight as bW,
42765
- getToolbarStyleState as bX,
42766
- getCachedCanvasImage as bY,
42767
- measureParagraphMinContentWidthPx as bZ,
42768
- getEditableBlocksForZone as b_,
42769
- WAVY_UNDERLINE_AMPLITUDE_PX as ba,
42770
- DOUBLE_UNDERLINE_OFFSET_PX as bb,
42771
- underlineStyleDashArray as bc,
42772
- EMPHASIS_GLYPH as bd,
42773
- rgb255ToHex as be,
42774
- getImageFloatingGeometry as bf,
42775
- textStyleToFontSizePt as bg,
42776
- resolveOpenTypeFeatureTags as bh,
42777
- resolveDecorationLineY as bi,
42778
- DOUBLE_STRIKE_OFFSET_PX as bj,
42779
- resolveListLabel as bk,
42780
- getListLabelInset as bl,
42781
- getAlignedListLabelInset as bm,
42782
- getParagraphBorderInsets as bn,
42783
- buildSegmentTable as bo,
42784
- buildCanvasTableLayout as bp,
42785
- resolveCanvasTableWidth as bq,
42786
- resolveFloatingTableRect as br,
42787
- normalizeFamily as bs,
42788
- ROBOTO_FONT_FILES as bt,
42789
- loadFontAsset as bu,
42790
- OFFICE_COMPAT_FONT_FAMILIES as bv,
42791
- BinaryReader as bw,
42792
- buildSfnt as bx,
42793
- defaultFontDecoderRegistry as by,
42794
- SfntFontProgram as bz,
42795
- getPageBodyBottom as c,
42796
- SplitButton as c$,
42797
- createSectionBoundaryParagraph as c0,
42798
- normalizePageSettings as c1,
42799
- DEFAULT_EDITOR_PAGE_SETTINGS as c2,
42800
- markStart as c3,
42801
- markEnd as c4,
42802
- getParagraphEntries as c5,
42803
- getParagraphById as c6,
42804
- createEditorFootnote as c7,
42805
- createFootnoteReferenceRun as c8,
42806
- renumberFootnotes as c9,
42807
- createEditorLogger as cA,
42808
- registerDomStatsSurface as cB,
42809
- Button as cC,
42810
- Checkbox as cD,
42811
- ColorPicker as cE,
42812
- CommandRegistry as cF,
42813
- DEFAULT_PALETTE as cG,
42814
- DialogFooter as cH,
42815
- FloatingActionButton as cI,
42816
- GridPicker as cJ,
42817
- IconButton as cK,
42818
- Menu as cL,
42819
- OASIS_BUILTIN_COMMANDS as cM,
42820
- OASIS_MENU_ITEMS as cN,
42821
- OASIS_TOOLBAR_ITEMS as cO,
42822
- OasisEditorAppLazy as cP,
42823
- OasisEditorContainer as cQ,
42824
- PluginCollection as cR,
42825
- Popover as cS,
42826
- RIBBON_TABS as cT,
42827
- Select as cU,
42828
- SelectField as cV,
42829
- Separator as cW,
42830
- SidePanel as cX,
42831
- SidePanelBody as cY,
42832
- SidePanelFooter as cZ,
42833
- SidePanelHeader as c_,
42834
- getHeadingLevel as ca,
42835
- preciseFontModeVersion as cb,
42836
- isPreciseFontModeEnabled as cc,
42837
- resolveNamedTextStyle as cd,
42838
- togglePreciseFontMode as ce,
42839
- nextFontSizePt as cf,
42840
- previousFontSizePt as cg,
42841
- fontSizePtToPx as ch,
42842
- createDefaultToolbarPreset as ci,
42843
- MenuRegistry as cj,
42844
- createToolbarRegistry as ck,
42845
- Editor as cl,
42846
- resolveCommandRef as cm,
42847
- commandRefName as cn,
42848
- createOasisEditorClient as co,
42849
- createEditorZoom as cp,
42850
- startLongTaskObserver as cq,
42851
- installGlobalReport as cr,
42852
- applyStoredPreciseFontPreference as cs,
42853
- getWelcomeSeen as ct,
42854
- isLocalFontAccessSupported as cu,
42855
- EDITOR_SCROLL_PADDING_PX as cv,
42856
- Toolbar as cw,
42857
- OasisEditorLoading as cx,
42858
- I18nProvider as cy,
42859
- createTranslator as cz,
42764
+ debounce as b$,
42765
+ getRunEndnoteReference as b0,
42766
+ iterateFootnoteReferenceRuns as b1,
42767
+ iterateEndnoteReferenceRuns as b2,
42768
+ imageContentTypeDefaults as b3,
42769
+ getRunFieldChar as b4,
42770
+ getRunFieldInstruction as b5,
42771
+ createEditorRun as b6,
42772
+ JSZip as b7,
42773
+ imageExtensionFromMime as b8,
42774
+ pxToPt as b9,
42775
+ buildCanvasTableLayout as bA,
42776
+ resolveCanvasTableWidth as bB,
42777
+ resolveFloatingTableRect as bC,
42778
+ normalizeFamily as bD,
42779
+ ROBOTO_FONT_FILES as bE,
42780
+ loadFontAsset as bF,
42781
+ OFFICE_COMPAT_FONT_FAMILIES as bG,
42782
+ BinaryReader as bH,
42783
+ buildSfnt as bI,
42784
+ defaultFontDecoderRegistry as bJ,
42785
+ SfntFontProgram as bK,
42786
+ collectPdfFontFamilies as bL,
42787
+ outlineFrom as bM,
42788
+ getPageHeaderZoneTop as bN,
42789
+ getPageColumnRects as bO,
42790
+ findFootnoteReference as bP,
42791
+ resolveImporterForFile as bQ,
42792
+ roundTo as bR,
42793
+ getDocumentSectionsCanonical as bS,
42794
+ getDocumentParagraphsCanonical as bT,
42795
+ getDocumentParagraphs as bU,
42796
+ getDocumentPageSettings as bV,
42797
+ getTableCellContentWidthForParagraph as bW,
42798
+ layoutMetricsEpoch as bX,
42799
+ bumpLayoutMetricsEpoch as bY,
42800
+ createCanvasLayoutSnapshotProvider as bZ,
42801
+ on as b_,
42802
+ resolveFloatingObjectRect as ba,
42803
+ getTextBoxFloatingGeometry as bb,
42804
+ getPresetPathSegments as bc,
42805
+ buildListLabels as bd,
42806
+ DEFAULT_FONT_SIZE_PX as be,
42807
+ resolveGradientAxis as bf,
42808
+ isDoubleUnderlineStyle as bg,
42809
+ isWavyUnderlineStyle as bh,
42810
+ underlineStyleLineWidthPx as bi,
42811
+ WAVY_UNDERLINE_WAVELENGTH_PX as bj,
42812
+ WAVY_UNDERLINE_AMPLITUDE_PX as bk,
42813
+ DOUBLE_UNDERLINE_OFFSET_PX as bl,
42814
+ underlineStyleDashArray as bm,
42815
+ EMPHASIS_GLYPH as bn,
42816
+ rgb255ToHex as bo,
42817
+ getImageFloatingGeometry as bp,
42818
+ textStyleToFontSizePt as bq,
42819
+ TEXT_BASELINE_RATIO as br,
42820
+ resolveOpenTypeFeatureTags as bs,
42821
+ resolveDecorationLineY as bt,
42822
+ DOUBLE_STRIKE_OFFSET_PX as bu,
42823
+ resolveListLabel as bv,
42824
+ getListLabelInset as bw,
42825
+ getAlignedListLabelInset as bx,
42826
+ getParagraphBorderInsets as by,
42827
+ buildSegmentTable as bz,
42828
+ getPageContentWidth as c,
42829
+ PluginCollection as c$,
42830
+ unwrap as c0,
42831
+ perfTimer as c1,
42832
+ getRunTextBox as c2,
42833
+ createEditorDocument as c3,
42834
+ resolveResizedDimensions as c4,
42835
+ resolveTextBoxRenderHeight as c5,
42836
+ getToolbarStyleState as c6,
42837
+ VERTICAL_HIT_WEIGHT as c7,
42838
+ getCachedCanvasImage as c8,
42839
+ measureParagraphMinContentWidthPx as c9,
42840
+ createOasisEditorClient as cA,
42841
+ createEditorZoom as cB,
42842
+ startLongTaskObserver as cC,
42843
+ installGlobalReport as cD,
42844
+ applyStoredPreciseFontPreference as cE,
42845
+ getWelcomeSeen as cF,
42846
+ isLocalFontAccessSupported as cG,
42847
+ EDITOR_SCROLL_PADDING_PX as cH,
42848
+ Toolbar as cI,
42849
+ OasisEditorLoading as cJ,
42850
+ I18nProvider as cK,
42851
+ createTranslator as cL,
42852
+ createEditorLogger as cM,
42853
+ registerDomStatsSurface as cN,
42854
+ ColorPicker as cO,
42855
+ CommandRegistry as cP,
42856
+ DEFAULT_PALETTE as cQ,
42857
+ DialogFooter as cR,
42858
+ FloatingActionButton as cS,
42859
+ GridPicker as cT,
42860
+ IconButton as cU,
42861
+ Menu as cV,
42862
+ OASIS_BUILTIN_COMMANDS as cW,
42863
+ OASIS_MENU_ITEMS as cX,
42864
+ OASIS_TOOLBAR_ITEMS as cY,
42865
+ OasisEditorAppLazy as cZ,
42866
+ OasisEditorContainer as c_,
42867
+ getEditableBlocksForZone as ca,
42868
+ findParagraphLocation as cb,
42869
+ createSectionBoundaryParagraph as cc,
42870
+ normalizePageSettings as cd,
42871
+ DEFAULT_EDITOR_PAGE_SETTINGS as ce,
42872
+ markStart as cf,
42873
+ markEnd as cg,
42874
+ getParagraphEntries as ch,
42875
+ getParagraphById as ci,
42876
+ createEditorFootnote as cj,
42877
+ createFootnoteReferenceRun as ck,
42878
+ renumberFootnotes as cl,
42879
+ getHeadingLevel as cm,
42880
+ preciseFontModeVersion as cn,
42881
+ isPreciseFontModeEnabled as co,
42882
+ resolveNamedTextStyle as cp,
42883
+ togglePreciseFontMode as cq,
42884
+ nextFontSizePt as cr,
42885
+ previousFontSizePt as cs,
42886
+ fontSizePtToPx as ct,
42887
+ createDefaultToolbarPreset as cu,
42888
+ MenuRegistry as cv,
42889
+ createToolbarRegistry as cw,
42890
+ Editor as cx,
42891
+ resolveCommandRef as cy,
42892
+ commandRefName as cz,
42860
42893
  domTextMeasurer as d,
42861
- StyleGallery as d0,
42862
- TextField as d1,
42863
- Button$1 as d2,
42864
- buildRibbonTabDefinitions as d3,
42865
- createEditorCommandBus as d4,
42866
- createOasisEditor as d5,
42867
- createOasisEditorContainer as d6,
42868
- mount as d7,
42869
- registerToolbarRenderer as d8,
42894
+ Popover as d0,
42895
+ RIBBON_TABS as d1,
42896
+ Select as d2,
42897
+ Separator as d3,
42898
+ SidePanel as d4,
42899
+ SidePanelBody as d5,
42900
+ SidePanelFooter as d6,
42901
+ SidePanelHeader as d7,
42902
+ SplitButton as d8,
42903
+ StyleGallery as d9,
42904
+ Button$1 as da,
42905
+ buildRibbonTabDefinitions as db,
42906
+ createEditorCommandBus as dc,
42907
+ createOasisEditor as dd,
42908
+ createOasisEditorContainer as de,
42909
+ mount as df,
42910
+ registerToolbarRenderer as dg,
42870
42911
  estimateTableBlockHeight as e,
42871
- getFootnoteDisplayMarker as f,
42912
+ getParagraphText as f,
42872
42913
  getProjectedParagraphBlockHeight as g,
42873
- getDocumentSections as h,
42874
- buildFootnoteReservations as i,
42875
- applyFootnotesToPages as j,
42876
- getRunField as k,
42914
+ getBlockParagraphs as h,
42915
+ getRunFootnoteReference as i,
42916
+ getFootnoteDisplayMarker as j,
42917
+ createProjectionContext as k,
42877
42918
  listReferencedEndnotes as l,
42878
- projectBlocksLayout as m,
42879
- assertNever as n,
42880
- createSignal as o,
42919
+ getDocumentSections as m,
42920
+ getRunField as n,
42921
+ projectBlocksLayout as o,
42881
42922
  projectParagraphLayout as p,
42882
- createEditorStateFromDocument as q,
42883
- reservationSignature as r,
42884
- setActiveHyphenation as s,
42885
- createInitialEditorState as t,
42886
- fontSizePxToPt as u,
42887
- visitRun as v,
42888
- probeLocalFontFamilies as w,
42889
- createEditorParagraphFromRuns as x,
42890
- isInlineObjectRun as y,
42891
- createEditorStyledRun as z
42923
+ spread as q,
42924
+ mergeProps as r,
42925
+ splitProps as s,
42926
+ memo as t,
42927
+ useContext as u,
42928
+ insert as v,
42929
+ createComponent as w,
42930
+ createRenderEffect as x,
42931
+ setAttribute as y,
42932
+ className as z
42892
42933
  };