oasis-editor 0.0.133 → 0.0.134

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.
@@ -1815,6 +1815,7 @@ const en = {
1815
1815
  "ribbon.tab.view": "View",
1816
1816
  "ribbon.tab.tableDesign": "Table Design",
1817
1817
  "ribbon.tab.tableLayout": "Table Layout",
1818
+ "ribbon.tab.imageFormat": "Picture Format",
1818
1819
  "ribbon.tab.plugins": "Plugins",
1819
1820
  "ribbon.tab.ai": "AI",
1820
1821
  // Ribbon groups
@@ -1838,6 +1839,19 @@ const en = {
1838
1839
  "ribbon.group.merge": "Merge",
1839
1840
  "ribbon.group.cellSize": "Cell Size",
1840
1841
  "ribbon.group.alignment": "Alignment",
1842
+ "ribbon.group.size": "Size",
1843
+ // Image format (contextual tab)
1844
+ "image.crop": "Crop",
1845
+ "image.height": "Height",
1846
+ "image.width": "Width",
1847
+ "image.cropReset": "Reset crop",
1848
+ "image.cropRatio.square": "1:1",
1849
+ "image.cropRatio.16x9": "16:9",
1850
+ "image.cropRatio.4x3": "4:3",
1851
+ "image.cropRatio.3x2": "3:2",
1852
+ "image.cropRatio.2x3": "2:3",
1853
+ "image.cropRatio.3x4": "3:4",
1854
+ "image.cropRatio.9x16": "9:16",
1841
1855
  // Export
1842
1856
  "toolbar.exportDocx": "Export DOCX",
1843
1857
  "toolbar.exportPdf": "Export PDF",
@@ -2362,6 +2376,7 @@ const ptBR = {
2362
2376
  "ribbon.tab.view": "Exibir",
2363
2377
  "ribbon.tab.tableDesign": "Design da Tabela",
2364
2378
  "ribbon.tab.tableLayout": "Layout da Tabela",
2379
+ "ribbon.tab.imageFormat": "Formato da Imagem",
2365
2380
  "ribbon.tab.plugins": "Plugins",
2366
2381
  "ribbon.tab.ai": "IA",
2367
2382
  // Ribbon groups
@@ -2385,6 +2400,19 @@ const ptBR = {
2385
2400
  "ribbon.group.merge": "Mesclar",
2386
2401
  "ribbon.group.cellSize": "Tamanho da Célula",
2387
2402
  "ribbon.group.alignment": "Alinhamento",
2403
+ "ribbon.group.size": "Tamanho",
2404
+ // Image format (contextual tab)
2405
+ "image.crop": "Cortar",
2406
+ "image.height": "Altura",
2407
+ "image.width": "Largura",
2408
+ "image.cropReset": "Redefinir corte",
2409
+ "image.cropRatio.square": "1:1",
2410
+ "image.cropRatio.16x9": "16:9",
2411
+ "image.cropRatio.4x3": "4:3",
2412
+ "image.cropRatio.3x2": "3:2",
2413
+ "image.cropRatio.2x3": "2:3",
2414
+ "image.cropRatio.3x4": "3:4",
2415
+ "image.cropRatio.9x16": "9:16",
2388
2416
  // Export
2389
2417
  "toolbar.exportDocx": "Exportar DOCX",
2390
2418
  "toolbar.exportPdf": "Exportar PDF",
@@ -2562,14 +2590,14 @@ function I18nProvider(props) {
2562
2590
  });
2563
2591
  }
2564
2592
  const oasisMarkBase64 = "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";
2565
- var _tmpl$$14 = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2593
+ var _tmpl$$15 = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2566
2594
  const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
2567
2595
  const MARK_ASPECT = 3 / 4;
2568
2596
  function OasisBrandMark(props) {
2569
2597
  const height = () => props.height ?? 64;
2570
2598
  const width = () => Math.round(height() * MARK_ASPECT);
2571
2599
  return (() => {
2572
- var _el$ = _tmpl$$14();
2600
+ var _el$ = _tmpl$$15();
2573
2601
  setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
2574
2602
  setAttribute(_el$, "draggable", false);
2575
2603
  createRenderEffect((_p$) => {
@@ -2586,7 +2614,7 @@ function OasisBrandMark(props) {
2586
2614
  return _el$;
2587
2615
  })();
2588
2616
  }
2589
- var _tmpl$$13 = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$E = /* @__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$r = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2617
+ var _tmpl$$14 = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$F = /* @__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$r = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2590
2618
  function OasisEditorLoading(props) {
2591
2619
  const t = useI18n();
2592
2620
  const variant = () => props.variant ?? "overlay";
@@ -2596,7 +2624,7 @@ function OasisEditorLoading(props) {
2596
2624
  };
2597
2625
  const isDone = () => (pct() ?? 0) >= 100;
2598
2626
  return (() => {
2599
- var _el$ = _tmpl$2$E(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2627
+ var _el$ = _tmpl$2$F(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2600
2628
  insert(_el$2, createComponent(OasisBrandMark, {
2601
2629
  height: 40,
2602
2630
  "class": "oasis-editor-loading-mark"
@@ -2607,7 +2635,7 @@ function OasisEditorLoading(props) {
2607
2635
  return pct() != null;
2608
2636
  },
2609
2637
  get children() {
2610
- var _el$6 = _tmpl$$13();
2638
+ var _el$6 = _tmpl$$14();
2611
2639
  insert(_el$6, (() => {
2612
2640
  var _c$ = memo(() => !!isDone());
2613
2641
  return () => _c$() ? _tmpl$3$r() : `${pct()}%`;
@@ -2661,7 +2689,7 @@ function OasisEditorAppLazy(props = {}) {
2661
2689
  onCleanup(() => {
2662
2690
  cancelled = true;
2663
2691
  });
2664
- import("./OasisEditorApp-DmXn9H33.js").then((m) => {
2692
+ import("./OasisEditorApp-B2f15Gpe.js").then((m) => {
2665
2693
  cancelled = true;
2666
2694
  setProgress(1);
2667
2695
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -5189,6 +5217,11 @@ const OASIS_BUILTIN_COMMANDS = [
5189
5217
  "insertImage",
5190
5218
  "editImageAlt",
5191
5219
  "insertImageCaption",
5220
+ "imageContext",
5221
+ "imageWidthCm",
5222
+ "imageHeightCm",
5223
+ "imageCrop",
5224
+ "imageCropAspect",
5192
5225
  "outdent",
5193
5226
  "indent",
5194
5227
  "togglePageBreakBefore",
@@ -5259,10 +5292,10 @@ function mount(target, props = {}) {
5259
5292
  unmount: () => client.dispose()
5260
5293
  });
5261
5294
  }
5262
- var _tmpl$$12 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$D = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$q = /* @__PURE__ */ template(`<svg><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1</svg>`, false, true, false), _tmpl$4$i = /* @__PURE__ */ template(`<svg><g><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25></svg>`, false, true, false), _tmpl$5$b = /* @__PURE__ */ template(`<svg><polyline points="4 7 7 4 10 7"></svg>`, false, true, false), _tmpl$6$8 = /* @__PURE__ */ template(`<svg><line x1=7 y1=4 x2=7 y2=20></svg>`, false, true, false), _tmpl$7$3 = /* @__PURE__ */ template(`<svg><polyline points="4 17 7 20 10 17"></svg>`, false, true, false), _tmpl$8$2 = /* @__PURE__ */ template(`<svg><line x1=13 y1=6 x2=21 y2=6></svg>`, false, true, false), _tmpl$9$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=12 x2=21 y2=12></svg>`, false, true, false), _tmpl$0$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=18 x2=21 y2=18></svg>`, false, true, false), _tmpl$1$1 = /* @__PURE__ */ template(`<svg><polyline points="20 6 9 17 4 12"></svg>`, false, true, false), _tmpl$10 = /* @__PURE__ */ template(`<i>`);
5295
+ var _tmpl$$13 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$E = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$q = /* @__PURE__ */ template(`<svg><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1</svg>`, false, true, false), _tmpl$4$i = /* @__PURE__ */ template(`<svg><g><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25></svg>`, false, true, false), _tmpl$5$b = /* @__PURE__ */ template(`<svg><polyline points="4 7 7 4 10 7"></svg>`, false, true, false), _tmpl$6$8 = /* @__PURE__ */ template(`<svg><line x1=7 y1=4 x2=7 y2=20></svg>`, false, true, false), _tmpl$7$3 = /* @__PURE__ */ template(`<svg><polyline points="4 17 7 20 10 17"></svg>`, false, true, false), _tmpl$8$2 = /* @__PURE__ */ template(`<svg><line x1=13 y1=6 x2=21 y2=6></svg>`, false, true, false), _tmpl$9$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=12 x2=21 y2=12></svg>`, false, true, false), _tmpl$0$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=18 x2=21 y2=18></svg>`, false, true, false), _tmpl$1$1 = /* @__PURE__ */ template(`<svg><polyline points="20 6 9 17 4 12"></svg>`, false, true, false), _tmpl$10 = /* @__PURE__ */ template(`<i>`);
5263
5296
  function SvgIcon(props) {
5264
5297
  return (() => {
5265
- var _el$ = _tmpl$$12();
5298
+ var _el$ = _tmpl$$13();
5266
5299
  insert(_el$, () => props.children);
5267
5300
  createRenderEffect((_p$) => {
5268
5301
  var _v$ = props.width ?? 24, _v$2 = props.height ?? 24, _v$3 = props.viewBox ?? "0 0 24 24", _v$4 = props.fill ?? "none", _v$5 = props.stroke, _v$6 = props["stroke-width"], _v$7 = props["stroke-linecap"], _v$8 = props["stroke-linejoin"], _v$9 = props.class;
@@ -5293,7 +5326,7 @@ function SvgIcon(props) {
5293
5326
  const FootnoteIcon = () => createComponent(SvgIcon, {
5294
5327
  fill: "none",
5295
5328
  get children() {
5296
- return [_tmpl$2$D(), _tmpl$3$q()];
5329
+ return [_tmpl$2$E(), _tmpl$3$q()];
5297
5330
  }
5298
5331
  });
5299
5332
  const SpecialIndentFirstLineIcon = () => createComponent(SvgIcon, {
@@ -5353,11 +5386,11 @@ function ToolIcon(props) {
5353
5386
  children: (render2) => render2()()
5354
5387
  });
5355
5388
  }
5356
- var _tmpl$$11 = /* @__PURE__ */ template(`<button>`);
5389
+ var _tmpl$$12 = /* @__PURE__ */ template(`<button>`);
5357
5390
  function SurfaceButton(props) {
5358
5391
  const [local, others] = splitProps(props, ["type", "icon", "label", "variant", "size", "active", "class", "classList", "children"]);
5359
5392
  return (() => {
5360
- var _el$ = _tmpl$$11();
5393
+ var _el$ = _tmpl$$12();
5361
5394
  spread(_el$, mergeProps({
5362
5395
  get type() {
5363
5396
  return local.type ?? "button";
@@ -5418,7 +5451,7 @@ function Text$1(props) {
5418
5451
  }
5419
5452
  }));
5420
5453
  }
5421
- var _tmpl$$10 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$C = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$p = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$a = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$7 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
5454
+ var _tmpl$$11 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$D = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$p = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$a = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$7 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
5422
5455
  function Menubar(props) {
5423
5456
  const t = useI18n();
5424
5457
  const [activeMenu, setActiveMenu] = createSignal(null);
@@ -5486,7 +5519,7 @@ function Menubar(props) {
5486
5519
  });
5487
5520
  const topLevelItems = () => pruneTree(menuTree());
5488
5521
  return (() => {
5489
- var _el$ = _tmpl$$10();
5522
+ var _el$ = _tmpl$$11();
5490
5523
  insert(_el$, createComponent(For, {
5491
5524
  get each() {
5492
5525
  return topLevelItems();
@@ -5527,7 +5560,7 @@ function Menubar(props) {
5527
5560
  return activeMenu() === topLevel.id;
5528
5561
  },
5529
5562
  get children() {
5530
- var _el$3 = _tmpl$2$C();
5563
+ var _el$3 = _tmpl$2$D();
5531
5564
  insert(_el$3, createComponent(For, {
5532
5565
  get each() {
5533
5566
  return topLevel.children;
@@ -5660,10 +5693,10 @@ function MenuNode(props) {
5660
5693
  }
5661
5694
  });
5662
5695
  }
5663
- var _tmpl$$$ = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5696
+ var _tmpl$$10 = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5664
5697
  function TitleBar(props) {
5665
5698
  return (() => {
5666
- var _el$ = _tmpl$$$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5699
+ var _el$ = _tmpl$$10(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5667
5700
  insert(_el$3, () => props.children);
5668
5701
  return _el$;
5669
5702
  })();
@@ -5758,7 +5791,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
5758
5791
  );
5759
5792
  return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
5760
5793
  }
5761
- var _tmpl$$_ = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$B = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$o = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$g = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
5794
+ var _tmpl$$$ = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$C = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$o = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$g = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
5762
5795
  function OutlinePanel(props) {
5763
5796
  const t = useI18n();
5764
5797
  const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
@@ -5835,7 +5868,7 @@ function OutlinePanel(props) {
5835
5868
  return !collapsed();
5836
5869
  },
5837
5870
  get children() {
5838
- var _el$3 = _tmpl$$_();
5871
+ var _el$3 = _tmpl$$$();
5839
5872
  insert(_el$3, () => t("menu.view.outline") || "Outline");
5840
5873
  return _el$3;
5841
5874
  }
@@ -5846,7 +5879,7 @@ function OutlinePanel(props) {
5846
5879
  return !collapsed();
5847
5880
  },
5848
5881
  get children() {
5849
- var _el$6 = _tmpl$2$B();
5882
+ var _el$6 = _tmpl$2$C();
5850
5883
  insert(_el$6, createComponent(Show, {
5851
5884
  get when() {
5852
5885
  return items().length > 0;
@@ -5903,7 +5936,7 @@ function OutlinePanel(props) {
5903
5936
  })();
5904
5937
  }
5905
5938
  delegateEvents(["click"]);
5906
- var _tmpl$$Z = /* @__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$A = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
5939
+ var _tmpl$$_ = /* @__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$B = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
5907
5940
  function ToolbarOverflowManager(props) {
5908
5941
  const t = useI18n();
5909
5942
  const [overflowCount, setOverflowCount] = createSignal(0);
@@ -6047,7 +6080,7 @@ function ToolbarOverflowManager(props) {
6047
6080
  };
6048
6081
  };
6049
6082
  return (() => {
6050
- var _el$ = _tmpl$$Z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
6083
+ var _el$ = _tmpl$$_(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
6051
6084
  var _ref$ = containerRef;
6052
6085
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
6053
6086
  var _ref$2 = moreMeasureRef;
@@ -6059,7 +6092,7 @@ function ToolbarOverflowManager(props) {
6059
6092
  return items();
6060
6093
  },
6061
6094
  children: (item) => (() => {
6062
- var _el$7 = _tmpl$2$A();
6095
+ var _el$7 = _tmpl$2$B();
6063
6096
  insert(_el$7, item);
6064
6097
  return _el$7;
6065
6098
  })()
@@ -6135,12 +6168,12 @@ function resolveLabel(item, api) {
6135
6168
  if (item.labelKey) return api.t(item.labelKey);
6136
6169
  return void 0;
6137
6170
  }
6138
- var _tmpl$$Y = /* @__PURE__ */ template(`<span>`), _tmpl$2$z = /* @__PURE__ */ template(`<button type=button>`);
6171
+ var _tmpl$$Z = /* @__PURE__ */ template(`<span>`), _tmpl$2$A = /* @__PURE__ */ template(`<button type=button>`);
6139
6172
  function Button$1(props) {
6140
6173
  const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
6141
6174
  const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
6142
6175
  return (() => {
6143
- var _el$ = _tmpl$2$z();
6176
+ var _el$ = _tmpl$2$A();
6144
6177
  spread(_el$, mergeProps({
6145
6178
  get ["class"]() {
6146
6179
  return `oasis-editor-tool-button ${local.class || ""}`;
@@ -6177,7 +6210,7 @@ function Button$1(props) {
6177
6210
  return local.label;
6178
6211
  },
6179
6212
  get children() {
6180
- var _el$2 = _tmpl$$Y();
6213
+ var _el$2 = _tmpl$$Z();
6181
6214
  insert(_el$2, () => local.label);
6182
6215
  return _el$2;
6183
6216
  }
@@ -6259,7 +6292,7 @@ function useDismiss(options) {
6259
6292
  });
6260
6293
  });
6261
6294
  }
6262
- var _tmpl$$X = /* @__PURE__ */ template(`<div>`);
6295
+ var _tmpl$$Y = /* @__PURE__ */ template(`<div>`);
6263
6296
  function Popover(props) {
6264
6297
  let anchorRef;
6265
6298
  let panelRef;
@@ -6276,7 +6309,7 @@ function Popover(props) {
6276
6309
  closeOnEscape: props.closeOnEscape
6277
6310
  });
6278
6311
  const panel = (portalled) => (() => {
6279
- var _el$ = _tmpl$$X();
6312
+ var _el$ = _tmpl$$Y();
6280
6313
  addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
6281
6314
  var _ref$ = panelRef;
6282
6315
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
@@ -6328,20 +6361,20 @@ function Popover(props) {
6328
6361
  }
6329
6362
  })];
6330
6363
  }
6331
- var _tmpl$$W = /* @__PURE__ */ template(`<i data-lucide=chevron-down>`);
6364
+ var _tmpl$$X = /* @__PURE__ */ template(`<i data-lucide=chevron-down>`);
6332
6365
  function DropdownChevron(props) {
6333
6366
  return (() => {
6334
- var _el$ = _tmpl$$W();
6367
+ var _el$ = _tmpl$$X();
6335
6368
  createRenderEffect(() => className(_el$, `oasis-editor-dropdown-chevron${props.class ? ` ${props.class}` : ""}`));
6336
6369
  return _el$;
6337
6370
  })();
6338
6371
  }
6339
- var _tmpl$$V = /* @__PURE__ */ template(`<div>`), _tmpl$2$y = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$n = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$4$f = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
6372
+ var _tmpl$$W = /* @__PURE__ */ template(`<div>`), _tmpl$2$z = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$n = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$4$f = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
6340
6373
  function Menu(props) {
6341
6374
  const [open, setOpen] = createSignal(false);
6342
6375
  const ariaLabel = () => props.tooltip || props.label || "";
6343
6376
  return (() => {
6344
- var _el$ = _tmpl$2$y();
6377
+ var _el$ = _tmpl$2$z();
6345
6378
  insert(_el$, createComponent(Popover, {
6346
6379
  get open() {
6347
6380
  return open();
@@ -6411,7 +6444,7 @@ function Menu(props) {
6411
6444
  return _el$3;
6412
6445
  })(),
6413
6446
  get children() {
6414
- var _el$2 = _tmpl$$V();
6447
+ var _el$2 = _tmpl$$W();
6415
6448
  _el$2.$$click = (event) => {
6416
6449
  const el = event.target;
6417
6450
  if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
@@ -6426,7 +6459,7 @@ function Menu(props) {
6426
6459
  })();
6427
6460
  }
6428
6461
  delegateEvents(["click"]);
6429
- var _tmpl$$U = /* @__PURE__ */ template(`<select>`), _tmpl$2$x = /* @__PURE__ */ template(`<span class=oasis-editor-tool-select-ribbon-large-label>`), _tmpl$3$m = /* @__PURE__ */ template(`<div class=oasis-editor-tool-select-ribbon-large-wrap>`);
6462
+ var _tmpl$$V = /* @__PURE__ */ template(`<select>`), _tmpl$2$y = /* @__PURE__ */ template(`<span class=oasis-editor-tool-select-ribbon-large-label>`), _tmpl$3$m = /* @__PURE__ */ template(`<div class=oasis-editor-tool-select-ribbon-large-wrap>`);
6430
6463
  function Select(props) {
6431
6464
  let selectRef;
6432
6465
  const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value", "label", "ribbonSize"]);
@@ -6442,7 +6475,7 @@ function Select(props) {
6442
6475
  }
6443
6476
  });
6444
6477
  const select = () => (() => {
6445
- var _el$ = _tmpl$$U();
6478
+ var _el$ = _tmpl$$V();
6446
6479
  var _ref$ = selectRef;
6447
6480
  typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
6448
6481
  spread(_el$, mergeProps({
@@ -6483,7 +6516,7 @@ function Select(props) {
6483
6516
  return local.label;
6484
6517
  },
6485
6518
  get children() {
6486
- var _el$3 = _tmpl$2$x();
6519
+ var _el$3 = _tmpl$2$y();
6487
6520
  insert(_el$3, () => local.label);
6488
6521
  return _el$3;
6489
6522
  }
@@ -6493,15 +6526,15 @@ function Select(props) {
6493
6526
  }
6494
6527
  });
6495
6528
  }
6496
- var _tmpl$$T = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
6529
+ var _tmpl$$U = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
6497
6530
  function Separator(props) {
6498
6531
  return (() => {
6499
- var _el$ = _tmpl$$T();
6532
+ var _el$ = _tmpl$$U();
6500
6533
  createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
6501
6534
  return _el$;
6502
6535
  })();
6503
6536
  }
6504
- var _tmpl$$S = /* @__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>`);
6537
+ var _tmpl$$T = /* @__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>`);
6505
6538
  function SplitButton(props) {
6506
6539
  return createComponent(Popover, {
6507
6540
  get open() {
@@ -6520,7 +6553,7 @@ function SplitButton(props) {
6520
6553
  return props.onPanelMouseLeave;
6521
6554
  },
6522
6555
  trigger: (api) => (() => {
6523
- var _el$ = _tmpl$$S(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
6556
+ var _el$ = _tmpl$$T(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
6524
6557
  use((el) => api.ref(el), _el$);
6525
6558
  _el$2.$$click = () => props.onMain();
6526
6559
  insert(_el$2, () => props.mainContent);
@@ -6561,7 +6594,7 @@ function SplitButton(props) {
6561
6594
  });
6562
6595
  }
6563
6596
  delegateEvents(["click"]);
6564
- var _tmpl$$R = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$w = /* @__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$e = /* @__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$8 = /* @__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(`<span>`), _tmpl$9 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
6597
+ var _tmpl$$S = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$x = /* @__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$e = /* @__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$8 = /* @__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(`<span>`), _tmpl$9 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
6565
6598
  const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
6566
6599
  function ColorPicker(props) {
6567
6600
  const [isOpen, setIsOpen] = createSignal(false);
@@ -6638,7 +6671,7 @@ function ColorPicker(props) {
6638
6671
  return clearLabel();
6639
6672
  },
6640
6673
  get children() {
6641
- var _el$ = _tmpl$2$w(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
6674
+ var _el$ = _tmpl$2$x(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
6642
6675
  _el$.$$click = () => applyColor(null);
6643
6676
  insert(_el$2, createComponent(Show, {
6644
6677
  get when() {
@@ -6648,7 +6681,7 @@ function ColorPicker(props) {
6648
6681
  return _tmpl$9();
6649
6682
  },
6650
6683
  get children() {
6651
- return _tmpl$$R();
6684
+ return _tmpl$$S();
6652
6685
  }
6653
6686
  }));
6654
6687
  insert(_el$4, clearLabel);
@@ -6761,7 +6794,7 @@ function ColorPicker(props) {
6761
6794
  });
6762
6795
  }
6763
6796
  delegateEvents(["click", "input"]);
6764
- var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$d = /* @__PURE__ */ template(`<span>`), _tmpl$5$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button>`), _tmpl$6$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
6797
+ var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$d = /* @__PURE__ */ template(`<span>`), _tmpl$5$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button>`), _tmpl$6$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
6765
6798
  function GridPicker(props) {
6766
6799
  const t = useI18n();
6767
6800
  const [isOpen, setIsOpen] = createSignal(false);
@@ -6885,11 +6918,11 @@ function GridPicker(props) {
6885
6918
  })(),
6886
6919
  get children() {
6887
6920
  return [(() => {
6888
- var _el$2 = _tmpl$$Q();
6921
+ var _el$2 = _tmpl$$R();
6889
6922
  insert(_el$2, statusLabel);
6890
6923
  return _el$2;
6891
6924
  })(), (() => {
6892
- var _el$3 = _tmpl$2$v();
6925
+ var _el$3 = _tmpl$2$w();
6893
6926
  insert(_el$3, createComponent(For, {
6894
6927
  get each() {
6895
6928
  return rows();
@@ -6989,7 +7022,7 @@ const DEFAULT_PALETTE = {
6989
7022
  standardColors: STANDARD_COLORS,
6990
7023
  allowCustom: true
6991
7024
  };
6992
- var _tmpl$$P = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$u = /* @__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>`), _tmpl$4$c = /* @__PURE__ */ template(`<option>`);
7025
+ var _tmpl$$Q = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$v = /* @__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>`), _tmpl$4$c = /* @__PURE__ */ template(`<option>`);
6993
7026
  function getQuickStyles(styles) {
6994
7027
  const applicable = styles.filter((style2) => style2.type !== "table" && (!style2.semiHidden || style2.unhideWhenUsed && style2.isUsed));
6995
7028
  const hasQuickStyles = applicable.some((style2) => style2.qFormat === true);
@@ -7069,7 +7102,7 @@ function StyleGallery(props) {
7069
7102
  return styles();
7070
7103
  },
7071
7104
  children: (style$1) => (() => {
7072
- var _el$ = _tmpl$$P(), _el$2 = _el$.firstChild;
7105
+ var _el$ = _tmpl$$Q(), _el$2 = _el$.firstChild;
7073
7106
  _el$.$$click = () => apply(style$1);
7074
7107
  insert(_el$2, () => style$1.name);
7075
7108
  createRenderEffect((_p$) => {
@@ -7150,7 +7183,7 @@ function StyleGallery(props) {
7150
7183
  return _el$4;
7151
7184
  })(),
7152
7185
  get children() {
7153
- var _el$3 = _tmpl$2$u();
7186
+ var _el$3 = _tmpl$2$v();
7154
7187
  _el$3.$$keydown = onPanelKeyDown;
7155
7188
  insert(_el$3, cards);
7156
7189
  return _el$3;
@@ -7158,7 +7191,7 @@ function StyleGallery(props) {
7158
7191
  });
7159
7192
  }
7160
7193
  delegateEvents(["click", "keydown"]);
7161
- var _tmpl$$O = /* @__PURE__ */ template(`<option value>`), _tmpl$2$t = /* @__PURE__ */ template(`<option>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
7194
+ var _tmpl$$P = /* @__PURE__ */ template(`<option value>`), _tmpl$2$u = /* @__PURE__ */ template(`<option>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
7162
7195
  function renderMenuContent(content, api) {
7163
7196
  if (content.kind === "custom") {
7164
7197
  return content.render(api);
@@ -7316,7 +7349,7 @@ function RenderSelect(props) {
7316
7349
  return props.item.placeholder !== void 0;
7317
7350
  },
7318
7351
  get children() {
7319
- var _el$ = _tmpl$$O();
7352
+ var _el$ = _tmpl$$P();
7320
7353
  insert(_el$, () => props.item.placeholder);
7321
7354
  return _el$;
7322
7355
  }
@@ -7325,7 +7358,7 @@ function RenderSelect(props) {
7325
7358
  return props.item.options(props.api);
7326
7359
  },
7327
7360
  children: (option) => (() => {
7328
- var _el$2 = _tmpl$2$t();
7361
+ var _el$2 = _tmpl$2$u();
7329
7362
  insert(_el$2, () => option.label);
7330
7363
  createRenderEffect(() => _el$2.value = option.value);
7331
7364
  return _el$2;
@@ -7523,12 +7556,14 @@ const RIBBON_TABS = [
7523
7556
  "view",
7524
7557
  "tableDesign",
7525
7558
  "tableLayout",
7559
+ "imageFormat",
7526
7560
  "plugins",
7527
7561
  "ai"
7528
7562
  ];
7529
7563
  const CONTEXTUAL_TABS = {
7530
7564
  tableDesign: "tableContext",
7531
- tableLayout: "tableContext"
7565
+ tableLayout: "tableContext",
7566
+ imageFormat: "imageContext"
7532
7567
  };
7533
7568
  const TAB_LABEL_KEYS = {
7534
7569
  file: "ribbon.tab.file",
@@ -7542,6 +7577,7 @@ const TAB_LABEL_KEYS = {
7542
7577
  view: "ribbon.tab.view",
7543
7578
  tableDesign: "ribbon.tab.tableDesign",
7544
7579
  tableLayout: "ribbon.tab.tableLayout",
7580
+ imageFormat: "ribbon.tab.imageFormat",
7545
7581
  plugins: "ribbon.tab.plugins",
7546
7582
  ai: "ribbon.tab.ai"
7547
7583
  };
@@ -7565,7 +7601,8 @@ const GROUP_LABEL_KEYS = {
7565
7601
  rowsColumns: "ribbon.group.rowsColumns",
7566
7602
  merge: "ribbon.group.merge",
7567
7603
  cellSize: "ribbon.group.cellSize",
7568
- alignment: "ribbon.group.alignment"
7604
+ alignment: "ribbon.group.alignment",
7605
+ size: "ribbon.group.size"
7569
7606
  };
7570
7607
  function isRibbonTabVisible(id, api) {
7571
7608
  const gatingCommand = CONTEXTUAL_TABS[id];
@@ -7619,6 +7656,9 @@ const RIBBON_GROUP_ORDER = {
7619
7656
  cellSize: 40,
7620
7657
  alignment: 50
7621
7658
  },
7659
+ imageFormat: {
7660
+ size: 10
7661
+ },
7622
7662
  plugins: {
7623
7663
  general: 10
7624
7664
  }
@@ -7695,6 +7735,9 @@ const RIBBON_GROUP_RESIZE_DEFAULTS = {
7695
7735
  cellSize: { priority: 40, collapsedIcon: "move-horizontal" },
7696
7736
  alignment: { priority: 50, collapsedIcon: "align-left" }
7697
7737
  },
7738
+ imageFormat: {
7739
+ size: { priority: 40, collapsedIcon: "crop" }
7740
+ },
7698
7741
  plugins: {
7699
7742
  general: { priority: 50, collapsedIcon: "plug" }
7700
7743
  }
@@ -7934,7 +7977,7 @@ function resolveResponsiveRibbonGroups(groups, availableWidth, measurements = {}
7934
7977
  allocatedWidth: allocatedWidths.get(group.id)
7935
7978
  }));
7936
7979
  }
7937
- var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$s = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
7980
+ var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$t = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
7938
7981
  function RibbonTabs(props) {
7939
7982
  const tabs = createMemo(() => buildRibbonTabDefinitions(props.api.t, props.api));
7940
7983
  const moveTab = (current, delta) => {
@@ -7944,13 +7987,13 @@ function RibbonTabs(props) {
7944
7987
  if (next) props.setActiveTab(next.id);
7945
7988
  };
7946
7989
  return (() => {
7947
- var _el$ = _tmpl$$N();
7990
+ var _el$ = _tmpl$$O();
7948
7991
  insert(_el$, createComponent(For, {
7949
7992
  get each() {
7950
7993
  return tabs();
7951
7994
  },
7952
7995
  children: (tab) => (() => {
7953
- var _el$2 = _tmpl$2$s();
7996
+ var _el$2 = _tmpl$2$t();
7954
7997
  _el$2.$$keydown = (event) => {
7955
7998
  if (event.key === "ArrowRight") {
7956
7999
  event.preventDefault();
@@ -7995,10 +8038,10 @@ function RibbonTabs(props) {
7995
8038
  })();
7996
8039
  }
7997
8040
  delegateEvents(["click", "keydown"]);
7998
- var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
8041
+ var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
7999
8042
  function RibbonRow(props) {
8000
8043
  return (() => {
8001
- var _el$ = _tmpl$$M();
8044
+ var _el$ = _tmpl$$N();
8002
8045
  insert(_el$, createComponent(For, {
8003
8046
  get each() {
8004
8047
  return props.items;
@@ -8013,7 +8056,7 @@ function RibbonRow(props) {
8013
8056
  return _el$;
8014
8057
  })();
8015
8058
  }
8016
- var _tmpl$$L = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$r = /* @__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$b = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
8059
+ var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$s = /* @__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$b = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
8017
8060
  function groupItems(group) {
8018
8061
  return [...group.largeItems, ...group.rows[1], ...group.rows[2]];
8019
8062
  }
@@ -8072,13 +8115,13 @@ function RibbonGroup(props) {
8072
8115
  },
8073
8116
  get children() {
8074
8117
  return [(() => {
8075
- var _el$2 = _tmpl$2$r(), _el$4 = _el$2.firstChild;
8118
+ var _el$2 = _tmpl$2$s(), _el$4 = _el$2.firstChild;
8076
8119
  insert(_el$2, createComponent(Show, {
8077
8120
  get when() {
8078
8121
  return props.group.largeItems.length > 0;
8079
8122
  },
8080
8123
  get children() {
8081
- var _el$3 = _tmpl$$L();
8124
+ var _el$3 = _tmpl$$M();
8082
8125
  insert(_el$3, createComponent(For, {
8083
8126
  get each() {
8084
8127
  return props.group.largeItems;
@@ -8139,7 +8182,7 @@ function RibbonGroup(props) {
8139
8182
  return _el$;
8140
8183
  })();
8141
8184
  }
8142
- var _tmpl$$K = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
8185
+ var _tmpl$$L = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
8143
8186
  function RibbonPanel(props) {
8144
8187
  const [availableWidth, setAvailableWidth] = createSignal(null);
8145
8188
  const [measurements, setMeasurements] = createSignal({});
@@ -8184,7 +8227,7 @@ function RibbonPanel(props) {
8184
8227
  requestAnimationFrame(measureGroups);
8185
8228
  });
8186
8229
  return (() => {
8187
- var _el$ = _tmpl$$K();
8230
+ var _el$ = _tmpl$$L();
8188
8231
  var _ref$ = panelRef;
8189
8232
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
8190
8233
  insert(_el$, createComponent(For, {
@@ -8210,21 +8253,31 @@ function RibbonPanel(props) {
8210
8253
  return _el$;
8211
8254
  })();
8212
8255
  }
8213
- var _tmpl$$J = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$q = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
8256
+ var _tmpl$$K = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
8214
8257
  const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
8215
8258
  function Toolbar(props) {
8216
8259
  const api = createToolbarApi(props.host, useI18n());
8217
8260
  const [version2, setVersion2] = createSignal(0);
8218
8261
  const [activeTab, setActiveTab] = createSignal("home");
8219
- const CONTEXTUAL_TABLE_TABS = ["tableDesign", "tableLayout"];
8220
- createEffect((prevInside) => {
8221
- const inside = api.commands.state("tableContext").isActive;
8222
- if (inside && prevInside === false) {
8223
- setActiveTab("tableDesign");
8224
- } else if (!inside && CONTEXTUAL_TABLE_TABS.includes(activeTab())) {
8262
+ const CONTEXTUAL_TAB_ENTRIES = Object.entries(CONTEXTUAL_TABS);
8263
+ createEffect((prev) => {
8264
+ const current = /* @__PURE__ */ new Map();
8265
+ for (const [, command] of CONTEXTUAL_TAB_ENTRIES) {
8266
+ if (!current.has(command)) {
8267
+ current.set(command, api.commands.state(command).isActive);
8268
+ }
8269
+ }
8270
+ for (const [tab, command] of CONTEXTUAL_TAB_ENTRIES) {
8271
+ if ((current.get(command) ?? false) && !((prev == null ? void 0 : prev.get(command)) ?? false)) {
8272
+ setActiveTab(tab);
8273
+ break;
8274
+ }
8275
+ }
8276
+ const activeCommand = CONTEXTUAL_TABS[activeTab()];
8277
+ if (activeCommand && !(current.get(activeCommand) ?? false)) {
8225
8278
  setActiveTab("home");
8226
8279
  }
8227
- return inside;
8280
+ return current;
8228
8281
  });
8229
8282
  onMount(() => {
8230
8283
  const unsubscribe = props.registry.onChange(() => setVersion2((v) => v + 1));
@@ -8250,7 +8303,7 @@ function Toolbar(props) {
8250
8303
  })
8251
8304
  });
8252
8305
  return (() => {
8253
- var _el$ = _tmpl$$J();
8306
+ var _el$ = _tmpl$$K();
8254
8307
  _el$.$$mousedown = (event) => {
8255
8308
  if (shouldAllowNativeMouseDown(event.target)) {
8256
8309
  return;
@@ -8272,7 +8325,7 @@ function Toolbar(props) {
8272
8325
  return renderItems();
8273
8326
  }
8274
8327
  }) : (() => {
8275
- var _el$2 = _tmpl$2$q();
8328
+ var _el$2 = _tmpl$2$r();
8276
8329
  insert(_el$2, renderItems);
8277
8330
  return _el$2;
8278
8331
  })();
@@ -18910,11 +18963,11 @@ function buildCanvasTableLayout(options) {
18910
18963
  unsupported: Array.from(new Set(unsupported))
18911
18964
  };
18912
18965
  }
18913
- var _tmpl$$I = /* @__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">`);
18966
+ var _tmpl$$J = /* @__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">`);
18914
18967
  function PageBreak(_props) {
18915
18968
  const t = useI18n();
18916
18969
  return (() => {
18917
- var _el$ = _tmpl$$I(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18970
+ var _el$ = _tmpl$$J(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18918
18971
  insert(_el$3, () => t("metric.pageBreak") || "Page Break");
18919
18972
  return _el$;
18920
18973
  })();
@@ -22487,7 +22540,7 @@ function createCanvasPageRenderer(options) {
22487
22540
  }
22488
22541
  };
22489
22542
  }
22490
- var _tmpl$$H = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$p = /* @__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$a = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
22543
+ var _tmpl$$I = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$q = /* @__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$a = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
22491
22544
  const surfaceLogger = createEditorLogger("canvas-surface");
22492
22545
  function checkBrowserFonts(families) {
22493
22546
  if (typeof document === "undefined" || !document.fonts) {
@@ -22547,7 +22600,7 @@ function CanvasEditorSurface(props) {
22547
22600
  return layout;
22548
22601
  });
22549
22602
  return (() => {
22550
- var _el$ = _tmpl$$H();
22603
+ var _el$ = _tmpl$$I();
22551
22604
  insert(_el$, createComponent(Index, {
22552
22605
  get each() {
22553
22606
  return documentLayout().pages;
@@ -22559,7 +22612,7 @@ function CanvasEditorSurface(props) {
22559
22612
  // inserting an image that triggers re-pagination in a narrow viewport),
22560
22613
  // causing "Failed to execute 'insertBefore'" errors.
22561
22614
  (() => {
22562
- var _el$2 = _tmpl$2$p();
22615
+ var _el$2 = _tmpl$2$q();
22563
22616
  insert(_el$2, createComponent(Show, {
22564
22617
  when: index > 0,
22565
22618
  get children() {
@@ -23081,7 +23134,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
23081
23134
  pushSide(-1);
23082
23135
  return ticks;
23083
23136
  }
23084
- var _tmpl$$G = /* @__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$o = /* @__PURE__ */ template(`<div>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
23137
+ var _tmpl$$H = /* @__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$p = /* @__PURE__ */ template(`<div>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
23085
23138
  function getActivePageSettings(state) {
23086
23139
  var _a;
23087
23140
  const idx = getActiveSectionIndex(state);
@@ -23287,7 +23340,7 @@ function HorizontalRuler(props) {
23287
23340
  }
23288
23341
  };
23289
23342
  return (() => {
23290
- var _el$ = _tmpl$$G(), _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;
23343
+ var _el$ = _tmpl$$H(), _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;
23291
23344
  var _ref$ = pageRef;
23292
23345
  typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
23293
23346
  insert(_el$3, createComponent(For, {
@@ -23295,7 +23348,7 @@ function HorizontalRuler(props) {
23295
23348
  return ticks();
23296
23349
  },
23297
23350
  children: (tick) => [(() => {
23298
- var _el$11 = _tmpl$2$o();
23351
+ var _el$11 = _tmpl$2$p();
23299
23352
  createRenderEffect((_p$) => {
23300
23353
  var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${sx(tick.x)}px`;
23301
23354
  _v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
@@ -23384,10 +23437,10 @@ function HorizontalRuler(props) {
23384
23437
  })();
23385
23438
  }
23386
23439
  delegateEvents(["pointerdown"]);
23387
- var _tmpl$$F = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
23440
+ var _tmpl$$G = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
23388
23441
  function CaretOverlay(props) {
23389
23442
  return (() => {
23390
- var _el$ = _tmpl$$F();
23443
+ var _el$ = _tmpl$$G();
23391
23444
  createRenderEffect((_p$) => {
23392
23445
  var _v$ = !!props.active, _v$2 = {
23393
23446
  left: `${props.left}px`,
@@ -23408,16 +23461,16 @@ function CaretOverlay(props) {
23408
23461
  return _el$;
23409
23462
  })();
23410
23463
  }
23411
- var _tmpl$$E = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$n = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
23464
+ var _tmpl$$F = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$o = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
23412
23465
  function SelectionOverlay(props) {
23413
23466
  return (() => {
23414
- var _el$ = _tmpl$$E();
23467
+ var _el$ = _tmpl$$F();
23415
23468
  insert(_el$, createComponent(Index, {
23416
23469
  get each() {
23417
23470
  return props.boxes;
23418
23471
  },
23419
23472
  children: (box) => (() => {
23420
- var _el$2 = _tmpl$2$n();
23473
+ var _el$2 = _tmpl$2$o();
23421
23474
  createRenderEffect((_p$) => {
23422
23475
  var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
23423
23476
  _v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
@@ -23437,7 +23490,7 @@ function SelectionOverlay(props) {
23437
23490
  return _el$;
23438
23491
  })();
23439
23492
  }
23440
- var _tmpl$$D = /* @__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>`);
23493
+ var _tmpl$$E = /* @__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>`);
23441
23494
  function RevisionOverlay(props) {
23442
23495
  const formattedDate = () => {
23443
23496
  try {
@@ -23452,7 +23505,7 @@ function RevisionOverlay(props) {
23452
23505
  return "Alterado por";
23453
23506
  };
23454
23507
  return (() => {
23455
- var _el$ = _tmpl$$D(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
23508
+ var _el$ = _tmpl$$E(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
23456
23509
  _el$4.nextSibling;
23457
23510
  var _el$7 = _el$3.nextSibling;
23458
23511
  insert(_el$4, label, _el$5);
@@ -23470,7 +23523,7 @@ function RevisionOverlay(props) {
23470
23523
  return _el$;
23471
23524
  })();
23472
23525
  }
23473
- var _tmpl$$C = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$m = /* @__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$9 = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$5 = /* @__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>`);
23526
+ var _tmpl$$D = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$n = /* @__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$9 = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$5 = /* @__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>`);
23474
23527
  function CommentHighlightOverlay(props) {
23475
23528
  const [activeCommentId, setActiveCommentId] = createSignal(null);
23476
23529
  const activeComment = createMemo(() => {
@@ -23497,13 +23550,13 @@ function CommentHighlightOverlay(props) {
23497
23550
  }
23498
23551
  };
23499
23552
  return (() => {
23500
- var _el$ = _tmpl$$C();
23553
+ var _el$ = _tmpl$$D();
23501
23554
  insert(_el$, createComponent(For, {
23502
23555
  get each() {
23503
23556
  return props.boxes();
23504
23557
  },
23505
23558
  children: (box) => (() => {
23506
- var _el$2 = _tmpl$2$m();
23559
+ var _el$2 = _tmpl$2$n();
23507
23560
  _el$2.$$click = () => setActiveCommentId(box.commentId);
23508
23561
  _el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
23509
23562
  createRenderEffect((_p$) => {
@@ -23603,7 +23656,7 @@ function useSurfaceRect(surfaceRef) {
23603
23656
  });
23604
23657
  return { rect, tick, refresh };
23605
23658
  }
23606
- var _tmpl$$B = /* @__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>`);
23659
+ var _tmpl$$C = /* @__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>`);
23607
23660
  function FloatingTableToolbar(props) {
23608
23661
  const t = useI18n();
23609
23662
  const host = () => props.host();
@@ -23661,7 +23714,7 @@ function FloatingTableToolbar(props) {
23661
23714
  return document.body;
23662
23715
  },
23663
23716
  get children() {
23664
- var _el$ = _tmpl$$B(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
23717
+ var _el$ = _tmpl$$C(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
23665
23718
  _el$.$$mousedown = (event) => event.preventDefault();
23666
23719
  insert(_el$2, createComponent(Button$1, {
23667
23720
  icon: "combine",
@@ -23821,7 +23874,7 @@ function FloatingTableToolbar(props) {
23821
23874
  });
23822
23875
  }
23823
23876
  delegateEvents(["mousedown"]);
23824
- var _tmpl$$A = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$l = /* @__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$8 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$4 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$3 = /* @__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>`);
23877
+ var _tmpl$$B = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$m = /* @__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$8 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$4 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$3 = /* @__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>`);
23825
23878
  const WRAP_OPTIONS = [{
23826
23879
  preset: "square",
23827
23880
  labelKey: "layoutOptions.square"
@@ -23843,14 +23896,14 @@ const WRAP_OPTIONS = [{
23843
23896
  }];
23844
23897
  function WrapIcon(props) {
23845
23898
  const line = (x, y, w) => (() => {
23846
- var _el$ = _tmpl$$A();
23899
+ var _el$ = _tmpl$$B();
23847
23900
  setAttribute(_el$, "x", x);
23848
23901
  setAttribute(_el$, "y", y);
23849
23902
  setAttribute(_el$, "width", w);
23850
23903
  return _el$;
23851
23904
  })();
23852
23905
  const box = (x, y, w, h, fill = "#1a73e8") => (() => {
23853
- var _el$2 = _tmpl$2$l();
23906
+ var _el$2 = _tmpl$2$m();
23854
23907
  setAttribute(_el$2, "x", x);
23855
23908
  setAttribute(_el$2, "y", y);
23856
23909
  setAttribute(_el$2, "width", w);
@@ -38369,10 +38422,10 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
38369
38422
  nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
38370
38423
  return { width: nextWidth, height: nextHeight };
38371
38424
  }
38372
- var _tmpl$$z = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$k = /* @__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>`);
38425
+ var _tmpl$$A = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$l = /* @__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>`);
38373
38426
  function ResizeHandlesOverlay(props) {
38374
38427
  return (() => {
38375
- var _el$ = _tmpl$2$k();
38428
+ var _el$ = _tmpl$2$l();
38376
38429
  _el$.$$mousedown = (event) => {
38377
38430
  if (props.readOnly || !props.box() || !props.onBodyMouseDown) {
38378
38431
  return;
@@ -38403,7 +38456,7 @@ function ResizeHandlesOverlay(props) {
38403
38456
  return props.onRotateStart;
38404
38457
  },
38405
38458
  get children() {
38406
- var _el$2 = _tmpl$$z();
38459
+ var _el$2 = _tmpl$$A();
38407
38460
  _el$2.$$mousedown = (event) => {
38408
38461
  var _a;
38409
38462
  if (!props.box()) {
@@ -38444,14 +38497,14 @@ function ResizeHandlesOverlay(props) {
38444
38497
  })();
38445
38498
  }
38446
38499
  delegateEvents(["mousedown"]);
38447
- var _tmpl$$y = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>`);
38500
+ var _tmpl$$z = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>`);
38448
38501
  function TableHandlesOverlay(props) {
38449
38502
  return createComponent(Show, {
38450
38503
  get when() {
38451
38504
  return memo(() => !!!props.readOnly)() && props.box();
38452
38505
  },
38453
38506
  children: (box) => (() => {
38454
- var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
38507
+ var _el$ = _tmpl$$z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
38455
38508
  _el$2.$$mousedown = (event) => {
38456
38509
  props.onMoveStart(event);
38457
38510
  };
@@ -38491,7 +38544,7 @@ function createEditorZoom(initial = ZOOM_DEFAULT) {
38491
38544
  const zoomFactor = createMemo(() => zoomPercent() / 100);
38492
38545
  return { zoomPercent, setZoomPercent, adjustZoom, zoomFactor };
38493
38546
  }
38494
- var _tmpl$$x = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$2$j = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$3$b = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`);
38547
+ var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$2$k = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$3$b = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`);
38495
38548
  function EditorImportProgressOverlay(props) {
38496
38549
  const t = useI18n();
38497
38550
  return createComponent(Show, {
@@ -38503,7 +38556,7 @@ function EditorImportProgressOverlay(props) {
38503
38556
  const isDone = progress().phase === "done";
38504
38557
  const isError = progress().phase === "error";
38505
38558
  return (() => {
38506
- var _el$ = _tmpl$$x(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling;
38559
+ var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling;
38507
38560
  _el$.classList.toggle("oasis-editor-import-overlay-done", !!isDone);
38508
38561
  _el$.classList.toggle("oasis-editor-import-overlay-error", !!isError);
38509
38562
  setAttribute(_el$, "aria-busy", !isDone && !isError);
@@ -38516,7 +38569,7 @@ function EditorImportProgressOverlay(props) {
38516
38569
  _el$6.classList.toggle("oasis-editor-import-progress-bar-done", !!isDone);
38517
38570
  _el$6.classList.toggle("oasis-editor-import-progress-bar-error", !!isError);
38518
38571
  insert(_el$7, isDone ? (() => {
38519
- var _el$8 = _tmpl$2$j();
38572
+ var _el$8 = _tmpl$2$k();
38520
38573
  insert(_el$8, () => t("import.phase.done"));
38521
38574
  return _el$8;
38522
38575
  })() : isError ? (() => {
@@ -38538,11 +38591,11 @@ function EditorImportProgressOverlay(props) {
38538
38591
  }
38539
38592
  });
38540
38593
  }
38541
- var _tmpl$$w = /* @__PURE__ */ template(`<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$i = /* @__PURE__ */ template(`<span>`);
38594
+ var _tmpl$$x = /* @__PURE__ */ template(`<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$j = /* @__PURE__ */ template(`<span>`);
38542
38595
  function EditorStatusBar(props) {
38543
38596
  const t = useI18n();
38544
38597
  return (() => {
38545
- var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
38598
+ var _el$ = _tmpl$$x(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
38546
38599
  insert(_el$3, () => t("status.words", [props.wordCount()]));
38547
38600
  insert(_el$4, () => t("status.characters", [props.characterCount()]));
38548
38601
  insert(_el$5, () => t("status.page", [props.currentPage(), props.totalPages()]));
@@ -38565,7 +38618,7 @@ function EditorStatusBar(props) {
38565
38618
  return createComponent(Show, {
38566
38619
  when: key,
38567
38620
  get children() {
38568
- var _el$11 = _tmpl$2$i();
38621
+ var _el$11 = _tmpl$2$j();
38569
38622
  insert(_el$11, () => t(key));
38570
38623
  createRenderEffect(() => className(_el$11, `oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${status.replace("...", "ing").replace(".", "")}`));
38571
38624
  return _el$11;
@@ -38598,7 +38651,7 @@ function EditorStatusBar(props) {
38598
38651
  })();
38599
38652
  }
38600
38653
  delegateEvents(["click", "input"]);
38601
- var _tmpl$$v = /* @__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>`);
38654
+ var _tmpl$$w = /* @__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>`);
38602
38655
  function OasisEditorEditor(props) {
38603
38656
  const layout = () => props.layout;
38604
38657
  const overlays = () => props.overlays;
@@ -38715,6 +38768,10 @@ function OasisEditorEditor(props) {
38715
38768
  return pageIndex === -1 ? 1 : pageIndex + 1;
38716
38769
  };
38717
38770
  const selectedImage = createMemo(() => overlays().selectedImageBox());
38771
+ const imageCropMode = () => {
38772
+ var _a, _b;
38773
+ return ((_b = (_a = overlays()).imageCropMode) == null ? void 0 : _b.call(_a)) ?? false;
38774
+ };
38718
38775
  const selectedTextBox = createMemo(() => overlays().selectedTextBoxBox());
38719
38776
  const selectedTable = createMemo(() => overlays().selectedTableBox());
38720
38777
  const commentsById = createMemo(() => {
@@ -38726,7 +38783,7 @@ function OasisEditorEditor(props) {
38726
38783
  queueMicrotask(recomputeViewportPageIndex);
38727
38784
  });
38728
38785
  return (() => {
38729
- var _el$ = _tmpl$$v(), _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;
38786
+ var _el$ = _tmpl$$w(), _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;
38730
38787
  insert(_el$, createComponent(Show, {
38731
38788
  get when() {
38732
38789
  return memo(() => !!layout().showHorizontalRuler)() && overlays().toolbarHost;
@@ -38880,32 +38937,60 @@ function OasisEditorEditor(props) {
38880
38937
  });
38881
38938
  }
38882
38939
  }), _el$5);
38883
- insert(_el$4, createComponent(ResizeHandlesOverlay, {
38884
- box: selectedImage,
38885
- get readOnly() {
38886
- return Boolean(layout().readOnly);
38887
- },
38888
- variantClass: "oasis-editor-image-selection-overlay",
38889
- rotation: () => {
38890
- var _a;
38891
- return ((_a = selectedImage()) == null ? void 0 : _a.rotation) ?? 0;
38892
- },
38893
- onResizeStart: (direction, event) => {
38894
- const image = selectedImage();
38895
- if (!image) return;
38896
- event.preventDefault();
38897
- event.stopPropagation();
38898
- surfaceHandlers().onImageResizeHandleMouseDown(image.paragraphId, image.startOffset, direction, event);
38940
+ insert(_el$4, createComponent(Show, {
38941
+ get when() {
38942
+ return imageCropMode();
38899
38943
  },
38900
- onRotateStart: (event) => {
38901
- const image = selectedImage();
38902
- if (!image) return;
38903
- surfaceHandlers().onImageRotateHandleMouseDown(image.paragraphId, image.startOffset, event);
38944
+ get fallback() {
38945
+ return createComponent(ResizeHandlesOverlay, {
38946
+ box: selectedImage,
38947
+ get readOnly() {
38948
+ return Boolean(layout().readOnly);
38949
+ },
38950
+ variantClass: "oasis-editor-image-selection-overlay",
38951
+ rotation: () => {
38952
+ var _a;
38953
+ return ((_a = selectedImage()) == null ? void 0 : _a.rotation) ?? 0;
38954
+ },
38955
+ onResizeStart: (direction, event) => {
38956
+ const image = selectedImage();
38957
+ if (!image) return;
38958
+ event.preventDefault();
38959
+ event.stopPropagation();
38960
+ surfaceHandlers().onImageResizeHandleMouseDown(image.paragraphId, image.startOffset, direction, event);
38961
+ },
38962
+ onRotateStart: (event) => {
38963
+ const image = selectedImage();
38964
+ if (!image) return;
38965
+ surfaceHandlers().onImageRotateHandleMouseDown(image.paragraphId, image.startOffset, event);
38966
+ },
38967
+ onBodyMouseDown: (event) => {
38968
+ const image = selectedImage();
38969
+ if (!image) return;
38970
+ surfaceHandlers().onImageMouseDown(image.paragraphId, image.startOffset, event);
38971
+ }
38972
+ });
38904
38973
  },
38905
- onBodyMouseDown: (event) => {
38906
- const image = selectedImage();
38907
- if (!image) return;
38908
- surfaceHandlers().onImageMouseDown(image.paragraphId, image.startOffset, event);
38974
+ get children() {
38975
+ return createComponent(ResizeHandlesOverlay, {
38976
+ box: selectedImage,
38977
+ get readOnly() {
38978
+ return Boolean(layout().readOnly);
38979
+ },
38980
+ variantClass: "oasis-editor-image-crop-overlay",
38981
+ rotation: () => {
38982
+ var _a;
38983
+ return ((_a = selectedImage()) == null ? void 0 : _a.rotation) ?? 0;
38984
+ },
38985
+ onResizeStart: (direction, event) => {
38986
+ var _a, _b;
38987
+ const image = selectedImage();
38988
+ if (!image) return;
38989
+ event.preventDefault();
38990
+ event.stopPropagation();
38991
+ (_b = (_a = surfaceHandlers()).onImageCropHandleMouseDown) == null ? void 0 : _b.call(_a, image.paragraphId, image.startOffset, direction, event);
38992
+ }
38993
+ });
38909
38994
  }
38910
38995
  }), _el$5);
38911
38996
  insert(_el$4, createComponent(ResizeHandlesOverlay, {
@@ -39809,11 +39894,11 @@ function createCanvasLayoutSnapshotProvider() {
39809
39894
  }
39810
39895
  };
39811
39896
  }
39812
- var _tmpl$$u = /* @__PURE__ */ template(`<button>`);
39897
+ var _tmpl$$v = /* @__PURE__ */ template(`<button>`);
39813
39898
  function FloatingActionButton(props) {
39814
39899
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "class", "classList"]);
39815
39900
  return (() => {
39816
- var _el$ = _tmpl$$u();
39901
+ var _el$ = _tmpl$$v();
39817
39902
  spread(_el$, mergeProps({
39818
39903
  get type() {
39819
39904
  return local.type ?? "button";
@@ -39842,7 +39927,7 @@ function FloatingActionButton(props) {
39842
39927
  return _el$;
39843
39928
  })();
39844
39929
  }
39845
- var _tmpl$$t = /* @__PURE__ */ template(`<aside>`), _tmpl$2$h = /* @__PURE__ */ template(`<div>`);
39930
+ var _tmpl$$u = /* @__PURE__ */ template(`<aside>`), _tmpl$2$i = /* @__PURE__ */ template(`<div>`);
39846
39931
  function SidePanel(props) {
39847
39932
  const [local, others] = splitProps(props, ["mode", "width", "class", "classList", "children", "style"]);
39848
39933
  const width = () => {
@@ -39852,7 +39937,7 @@ function SidePanel(props) {
39852
39937
  return local.width ?? "360px";
39853
39938
  };
39854
39939
  return (() => {
39855
- var _el$ = _tmpl$$t();
39940
+ var _el$ = _tmpl$$u();
39856
39941
  spread(_el$, mergeProps({
39857
39942
  get ["class"]() {
39858
39943
  return `oasis-editor-plugin-side-panel ${local.class ?? ""}`;
@@ -39877,7 +39962,7 @@ function SidePanel(props) {
39877
39962
  function SidePanelHeader(props) {
39878
39963
  const [local, others] = splitProps(props, ["class", "children"]);
39879
39964
  return (() => {
39880
- var _el$2 = _tmpl$2$h();
39965
+ var _el$2 = _tmpl$2$i();
39881
39966
  spread(_el$2, mergeProps({
39882
39967
  get ["class"]() {
39883
39968
  return `oasis-editor-plugin-side-panel-header ${local.class ?? ""}`;
@@ -39890,7 +39975,7 @@ function SidePanelHeader(props) {
39890
39975
  function SidePanelBody(props) {
39891
39976
  const [local, others] = splitProps(props, ["class", "children"]);
39892
39977
  return (() => {
39893
- var _el$3 = _tmpl$2$h();
39978
+ var _el$3 = _tmpl$2$i();
39894
39979
  spread(_el$3, mergeProps({
39895
39980
  get ["class"]() {
39896
39981
  return `oasis-editor-plugin-side-panel-body ${local.class ?? ""}`;
@@ -39903,7 +39988,7 @@ function SidePanelBody(props) {
39903
39988
  function SidePanelFooter(props) {
39904
39989
  const [local, others] = splitProps(props, ["class", "children"]);
39905
39990
  return (() => {
39906
- var _el$4 = _tmpl$2$h();
39991
+ var _el$4 = _tmpl$2$i();
39907
39992
  spread(_el$4, mergeProps({
39908
39993
  get ["class"]() {
39909
39994
  return `oasis-editor-plugin-side-panel-footer ${local.class ?? ""}`;
@@ -39913,11 +39998,11 @@ function SidePanelFooter(props) {
39913
39998
  return _el$4;
39914
39999
  })();
39915
40000
  }
39916
- var _tmpl$$s = /* @__PURE__ */ template(`<button>`);
40001
+ var _tmpl$$t = /* @__PURE__ */ template(`<button>`);
39917
40002
  function IconButton(props) {
39918
40003
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "variant", "size", "class", "classList"]);
39919
40004
  return (() => {
39920
- var _el$ = _tmpl$$s();
40005
+ var _el$ = _tmpl$$t();
39921
40006
  spread(_el$, mergeProps({
39922
40007
  get type() {
39923
40008
  return local.type ?? "button";
@@ -39948,7 +40033,7 @@ function IconButton(props) {
39948
40033
  return _el$;
39949
40034
  })();
39950
40035
  }
39951
- var _tmpl$$r = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$g = /* @__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$7 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title>`);
40036
+ var _tmpl$$s = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$h = /* @__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$7 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title>`);
39952
40037
  const EMPTY_SNAPSHOT = {
39953
40038
  floatingActions: [],
39954
40039
  sidePanels: [],
@@ -39980,7 +40065,7 @@ function PluginUiHost(props) {
39980
40065
  return groupActionsByPlacement(actions());
39981
40066
  },
39982
40067
  children: (group) => (() => {
39983
- var _el$ = _tmpl$$r();
40068
+ var _el$ = _tmpl$$s();
39984
40069
  insert(_el$, createComponent(For, {
39985
40070
  get each() {
39986
40071
  return group.actions;
@@ -40009,7 +40094,7 @@ function PluginUiHost(props) {
40009
40094
  })()
40010
40095
  });
40011
40096
  return (() => {
40012
- var _el$2 = _tmpl$2$g(), _el$3 = _el$2.firstChild;
40097
+ var _el$2 = _tmpl$2$h(), _el$3 = _el$2.firstChild;
40013
40098
  insert(_el$3, resolvedChildren);
40014
40099
  insert(_el$2, createComponent(Show, {
40015
40100
  get when() {
@@ -40132,7 +40217,7 @@ function groupActionsByPlacement(actions) {
40132
40217
  actions: groupActions
40133
40218
  }));
40134
40219
  }
40135
- var _tmpl$$q = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
40220
+ var _tmpl$$r = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
40136
40221
  function DocumentShell(props) {
40137
40222
  let surfaceEl;
40138
40223
  let viewportEl;
@@ -40259,7 +40344,7 @@ function DocumentShell(props) {
40259
40344
  return props.runtimeEditor;
40260
40345
  },
40261
40346
  get children() {
40262
- var _el$ = _tmpl$$q(), _el$2 = _el$.firstChild;
40347
+ var _el$ = _tmpl$$r(), _el$2 = _el$.firstChild;
40263
40348
  insert(_el$, createComponent(Show, {
40264
40349
  get when() {
40265
40350
  return memo(() => !!props.showChrome)() && props.showOutline;
@@ -40324,10 +40409,10 @@ function DocumentShell(props) {
40324
40409
  }
40325
40410
  })];
40326
40411
  }
40327
- var _tmpl$$p = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$f = /* @__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">`);
40412
+ var _tmpl$$q = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$g = /* @__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">`);
40328
40413
  function InlineShell(props) {
40329
40414
  return (() => {
40330
- var _el$ = _tmpl$2$f();
40415
+ var _el$ = _tmpl$2$g();
40331
40416
  insert(_el$, createComponent(Show, {
40332
40417
  get when() {
40333
40418
  return memo(() => !!props.showChrome)() && props.showToolbar;
@@ -40354,7 +40439,7 @@ function InlineShell(props) {
40354
40439
  return props.runtimeEditor;
40355
40440
  },
40356
40441
  get children() {
40357
- var _el$2 = _tmpl$$p(), _el$3 = _el$2.firstChild;
40442
+ var _el$2 = _tmpl$$q(), _el$3 = _el$2.firstChild;
40358
40443
  insert(_el$3, createComponent(OasisEditorEditor, {
40359
40444
  state: () => props.state,
40360
40445
  get layout() {
@@ -40394,16 +40479,16 @@ function InlineShell(props) {
40394
40479
  return _el$;
40395
40480
  })();
40396
40481
  }
40397
- var _tmpl$$o = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$e = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
40482
+ var _tmpl$$p = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
40398
40483
  function BalloonShell(props) {
40399
40484
  return (() => {
40400
- var _el$ = _tmpl$2$e();
40485
+ var _el$ = _tmpl$2$f();
40401
40486
  insert(_el$, createComponent(PluginUiHost, {
40402
40487
  get editor() {
40403
40488
  return props.runtimeEditor;
40404
40489
  },
40405
40490
  get children() {
40406
- var _el$2 = _tmpl$$o(), _el$3 = _el$2.firstChild;
40491
+ var _el$2 = _tmpl$$p(), _el$3 = _el$2.firstChild;
40407
40492
  insert(_el$3, createComponent(OasisEditorEditor, {
40408
40493
  state: () => props.state,
40409
40494
  get layout() {
@@ -40443,7 +40528,7 @@ function BalloonShell(props) {
40443
40528
  return _el$;
40444
40529
  })();
40445
40530
  }
40446
- var _tmpl$$n = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$d = /* @__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>`);
40531
+ var _tmpl$$o = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$e = /* @__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>`);
40447
40532
  function Dialog(props) {
40448
40533
  const t = useI18n();
40449
40534
  let dialogRef;
@@ -40468,7 +40553,7 @@ function Dialog(props) {
40468
40553
  return props.isOpen;
40469
40554
  },
40470
40555
  get children() {
40471
- var _el$ = _tmpl$2$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
40556
+ var _el$ = _tmpl$2$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
40472
40557
  _el$.$$click = () => {
40473
40558
  if (props.closeOnOverlayClick ?? true) {
40474
40559
  props.onClose();
@@ -40485,7 +40570,7 @@ function Dialog(props) {
40485
40570
  return props.footer;
40486
40571
  },
40487
40572
  get children() {
40488
- var _el$7 = _tmpl$$n();
40573
+ var _el$7 = _tmpl$$o();
40489
40574
  insert(_el$7, () => props.footer);
40490
40575
  return _el$7;
40491
40576
  }
@@ -40514,7 +40599,7 @@ function Dialog(props) {
40514
40599
  });
40515
40600
  }
40516
40601
  delegateEvents(["click"]);
40517
- var _tmpl$$m = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$c = /* @__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>`);
40602
+ var _tmpl$$n = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$d = /* @__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>`);
40518
40603
  function findEnabledItem(items, startIndex, direction) {
40519
40604
  if (!items.length) return void 0;
40520
40605
  for (let step = 0; step < items.length; step += 1) {
@@ -40565,7 +40650,7 @@ function Tabs(props) {
40565
40650
  selectItem(findEnabledItem(items(), currentIndex + direction, direction), true);
40566
40651
  };
40567
40652
  return (() => {
40568
- var _el$ = _tmpl$$m(), _el$2 = _el$.firstChild;
40653
+ var _el$ = _tmpl$$n(), _el$2 = _el$.firstChild;
40569
40654
  _el$2.$$keydown = handleKeyDown;
40570
40655
  insert(_el$2, createComponent(For, {
40571
40656
  get each() {
@@ -40575,7 +40660,7 @@ function Tabs(props) {
40575
40660
  const tabId = `${baseId}-${item.id}-tab`;
40576
40661
  const panelId = `${baseId}-${item.id}-panel`;
40577
40662
  return (() => {
40578
- var _el$3 = _tmpl$2$c();
40663
+ var _el$3 = _tmpl$2$d();
40579
40664
  _el$3.$$click = () => selectItem(item);
40580
40665
  use((element) => {
40581
40666
  tabRefs[index()] = element;
@@ -40642,12 +40727,12 @@ function Tabs(props) {
40642
40727
  })();
40643
40728
  }
40644
40729
  delegateEvents(["keydown", "click"]);
40645
- var _tmpl$$l = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
40730
+ var _tmpl$$m = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
40646
40731
  function Button(props) {
40647
40732
  const [local, others] = splitProps(props, ["type", "variant", "size", "icon", "iconPosition", "fullWidth", "class", "classList", "children"]);
40648
40733
  const iconPosition = () => local.iconPosition ?? "start";
40649
40734
  return (() => {
40650
- var _el$ = _tmpl$$l(), _el$2 = _el$.firstChild;
40735
+ var _el$ = _tmpl$$m(), _el$2 = _el$.firstChild;
40651
40736
  spread(_el$, mergeProps({
40652
40737
  get type() {
40653
40738
  return local.type ?? "button";
@@ -40727,11 +40812,11 @@ function StatusText(props) {
40727
40812
  }
40728
40813
  }, others));
40729
40814
  }
40730
- var _tmpl$$k = /* @__PURE__ */ template(`<div>`);
40815
+ var _tmpl$$l = /* @__PURE__ */ template(`<div>`);
40731
40816
  function ActionRow(props) {
40732
40817
  const [local, others] = splitProps(props, ["align", "wrap", "class", "classList", "children"]);
40733
40818
  return (() => {
40734
- var _el$ = _tmpl$$k();
40819
+ var _el$ = _tmpl$$l();
40735
40820
  spread(_el$, mergeProps({
40736
40821
  get ["class"]() {
40737
40822
  return `oasis-editor-ui-action-row ${local.class ?? ""}`;
@@ -40787,7 +40872,7 @@ function mergeStyles(...styles) {
40787
40872
  }
40788
40873
  return Object.assign({}, ...objectStyles);
40789
40874
  }
40790
- var _tmpl$$j = /* @__PURE__ */ template(`<span class=oasis-editor-ui-stack-divider-item aria-hidden=true>`);
40875
+ var _tmpl$$k = /* @__PURE__ */ template(`<span class=oasis-editor-ui-stack-divider-item aria-hidden=true>`);
40791
40876
  function childArray(value) {
40792
40877
  if (Array.isArray(value)) return value;
40793
40878
  if (value === null || value === void 0 || value === false) return [];
@@ -40827,7 +40912,7 @@ function Stack(props) {
40827
40912
  return memo(() => index() > 0)() && local.divider;
40828
40913
  },
40829
40914
  get children() {
40830
- var _el$ = _tmpl$$j();
40915
+ var _el$ = _tmpl$$k();
40831
40916
  insert(_el$, () => renderDivider(index()));
40832
40917
  return _el$;
40833
40918
  }
@@ -40906,14 +40991,14 @@ function Grid(props) {
40906
40991
  }
40907
40992
  }));
40908
40993
  }
40909
- var _tmpl$$i = /* @__PURE__ */ template(`<label>`), _tmpl$2$b = /* @__PURE__ */ template(`<div>`);
40994
+ var _tmpl$$j = /* @__PURE__ */ template(`<label>`), _tmpl$2$c = /* @__PURE__ */ template(`<div>`);
40910
40995
  function FormField(props) {
40911
40996
  const fallbackId = createUniqueId();
40912
40997
  const [local, others] = splitProps(props, ["label", "for", "description", "error", "labelClass", "class", "classList", "children"]);
40913
40998
  const descriptionId = () => local.for ?? `${fallbackId}-description`;
40914
40999
  const errorId = () => local.for ?? `${fallbackId}-error`;
40915
41000
  return (() => {
40916
- var _el$ = _tmpl$2$b();
41001
+ var _el$ = _tmpl$2$c();
40917
41002
  spread(_el$, mergeProps({
40918
41003
  get ["class"]() {
40919
41004
  return `oasis-editor-ui-field ${local.class ?? ""}`;
@@ -40927,7 +41012,7 @@ function FormField(props) {
40927
41012
  return local.label;
40928
41013
  },
40929
41014
  get children() {
40930
- var _el$2 = _tmpl$$i();
41015
+ var _el$2 = _tmpl$$j();
40931
41016
  insert(_el$2, () => local.label);
40932
41017
  createRenderEffect((_p$) => {
40933
41018
  var _v$ = `oasis-editor-ui-field-label ${local.labelClass ?? ""}`, _v$2 = local.for;
@@ -40978,7 +41063,7 @@ function FormField(props) {
40978
41063
  return _el$;
40979
41064
  })();
40980
41065
  }
40981
- var _tmpl$$h = /* @__PURE__ */ template(`<span>`), _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$6 = /* @__PURE__ */ template(`<label><input>`);
41066
+ var _tmpl$$i = /* @__PURE__ */ template(`<span>`), _tmpl$2$b = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$6 = /* @__PURE__ */ template(`<label><input>`);
40982
41067
  function TextField(props) {
40983
41068
  const fallbackId = createUniqueId();
40984
41069
  const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "onChange", "class", "classList", "id"]);
@@ -40992,7 +41077,7 @@ function TextField(props) {
40992
41077
  return local.label;
40993
41078
  },
40994
41079
  get children() {
40995
- var _el$2 = _tmpl$$h();
41080
+ var _el$2 = _tmpl$$i();
40996
41081
  insert(_el$2, () => local.label);
40997
41082
  createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-label ${local.labelClass ?? ""}`));
40998
41083
  return _el$2;
@@ -41021,7 +41106,7 @@ function TextField(props) {
41021
41106
  return local.description;
41022
41107
  },
41023
41108
  get children() {
41024
- var _el$4 = _tmpl$2$a();
41109
+ var _el$4 = _tmpl$2$b();
41025
41110
  insert(_el$4, () => local.description);
41026
41111
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
41027
41112
  return _el$4;
@@ -41053,7 +41138,7 @@ function TextField(props) {
41053
41138
  })();
41054
41139
  }
41055
41140
  delegateEvents(["input"]);
41056
- var _tmpl$$g = /* @__PURE__ */ template(`<textarea>`);
41141
+ var _tmpl$$h = /* @__PURE__ */ template(`<textarea>`);
41057
41142
  function TextAreaField(props) {
41058
41143
  const fallbackId = createUniqueId();
41059
41144
  const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "onChange", "class", "id"]);
@@ -41079,7 +41164,7 @@ function TextAreaField(props) {
41079
41164
  return local.error;
41080
41165
  },
41081
41166
  get children() {
41082
- var _el$ = _tmpl$$g();
41167
+ var _el$ = _tmpl$$h();
41083
41168
  _el$.$$input = (event) => {
41084
41169
  var _a;
41085
41170
  return (_a = local.onChange) == null ? void 0 : _a.call(local, event.currentTarget.value);
@@ -41115,7 +41200,7 @@ function ColorField(props) {
41115
41200
  }
41116
41201
  }, others));
41117
41202
  }
41118
- var _tmpl$$f = /* @__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>`);
41203
+ var _tmpl$$g = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$a = /* @__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>`);
41119
41204
  function Checkbox(props) {
41120
41205
  const fallbackId = createUniqueId();
41121
41206
  const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
@@ -41145,7 +41230,7 @@ function Checkbox(props) {
41145
41230
  return local.description;
41146
41231
  },
41147
41232
  get children() {
41148
- var _el$5 = _tmpl$$f();
41233
+ var _el$5 = _tmpl$$g();
41149
41234
  insert(_el$5, () => local.description);
41150
41235
  createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
41151
41236
  return _el$5;
@@ -41156,7 +41241,7 @@ function Checkbox(props) {
41156
41241
  return local.error;
41157
41242
  },
41158
41243
  get children() {
41159
- var _el$6 = _tmpl$2$9();
41244
+ var _el$6 = _tmpl$2$a();
41160
41245
  insert(_el$6, () => local.error);
41161
41246
  createRenderEffect(() => setAttribute(_el$6, "id", errorId()));
41162
41247
  return _el$6;
@@ -41174,7 +41259,7 @@ function Checkbox(props) {
41174
41259
  return _el$;
41175
41260
  })();
41176
41261
  }
41177
- var _tmpl$$e = /* @__PURE__ */ template(`<span>`), _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$5 = /* @__PURE__ */ template(`<label><select>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option>`);
41262
+ var _tmpl$$f = /* @__PURE__ */ template(`<span>`), _tmpl$2$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$6 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$5 = /* @__PURE__ */ template(`<label><select>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option>`);
41178
41263
  function SelectField(props) {
41179
41264
  const fallbackId = createUniqueId();
41180
41265
  const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "options", "onChange", "class", "classList", "id", "value"]);
@@ -41189,7 +41274,7 @@ function SelectField(props) {
41189
41274
  return local.label;
41190
41275
  },
41191
41276
  get children() {
41192
- var _el$2 = _tmpl$$e();
41277
+ var _el$2 = _tmpl$$f();
41193
41278
  insert(_el$2, () => local.label);
41194
41279
  createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-label ${local.labelClass ?? ""}`));
41195
41280
  return _el$2;
@@ -41242,7 +41327,7 @@ function SelectField(props) {
41242
41327
  return local.description;
41243
41328
  },
41244
41329
  get children() {
41245
- var _el$4 = _tmpl$2$8();
41330
+ var _el$4 = _tmpl$2$9();
41246
41331
  insert(_el$4, () => local.description);
41247
41332
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
41248
41333
  return _el$4;
@@ -41288,7 +41373,7 @@ function NumberField(props) {
41288
41373
  }
41289
41374
  }, others));
41290
41375
  }
41291
- var _tmpl$$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$7 = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$4$4 = /* @__PURE__ */ template(`<div role=radiogroup>`);
41376
+ var _tmpl$$e = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$8 = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$4$4 = /* @__PURE__ */ template(`<div role=radiogroup>`);
41292
41377
  const RadioGroupCtx = createContext();
41293
41378
  function Radio(props) {
41294
41379
  const fallbackId = createUniqueId();
@@ -41299,7 +41384,7 @@ function Radio(props) {
41299
41384
  const checked = () => group ? group.value() === local.value : Boolean(local.checked);
41300
41385
  const disabled = () => Boolean(local.disabled) || (group ? group.disabled() : false);
41301
41386
  return (() => {
41302
- var _el$ = _tmpl$2$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
41387
+ var _el$ = _tmpl$2$8(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
41303
41388
  _el$2.addEventListener("change", (event) => {
41304
41389
  var _a;
41305
41390
  if (group) group.onSelect(local.value);
@@ -41331,7 +41416,7 @@ function Radio(props) {
41331
41416
  return local.description;
41332
41417
  },
41333
41418
  get children() {
41334
- var _el$5 = _tmpl$$d();
41419
+ var _el$5 = _tmpl$$e();
41335
41420
  insert(_el$5, () => local.description);
41336
41421
  createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
41337
41422
  return _el$5;
@@ -41416,7 +41501,7 @@ function RadioGroup(props) {
41416
41501
  }
41417
41502
  });
41418
41503
  }
41419
- var _tmpl$$c = /* @__PURE__ */ template(`<div>`);
41504
+ var _tmpl$$d = /* @__PURE__ */ template(`<div>`);
41420
41505
  const ALIGN_MAP = {
41421
41506
  start: "flex-start",
41422
41507
  center: "center",
@@ -41426,7 +41511,7 @@ const ALIGN_MAP = {
41426
41511
  function FieldRow(props) {
41427
41512
  const [local, others] = splitProps(props, ["align", "class", "style", "children"]);
41428
41513
  return (() => {
41429
- var _el$ = _tmpl$$c();
41514
+ var _el$ = _tmpl$$d();
41430
41515
  spread(_el$, mergeProps({
41431
41516
  get ["class"]() {
41432
41517
  return `oasis-editor-ui-field-row ${local.class ?? ""}`;
@@ -41442,11 +41527,11 @@ function FieldRow(props) {
41442
41527
  return _el$;
41443
41528
  })();
41444
41529
  }
41445
- var _tmpl$$b = /* @__PURE__ */ template(`<legend>`), _tmpl$2$6 = /* @__PURE__ */ template(`<fieldset>`);
41530
+ var _tmpl$$c = /* @__PURE__ */ template(`<legend>`), _tmpl$2$7 = /* @__PURE__ */ template(`<fieldset>`);
41446
41531
  function FieldGroup(props) {
41447
41532
  const [local, others] = splitProps(props, ["legend", "legendClass", "class", "children"]);
41448
41533
  return (() => {
41449
- var _el$ = _tmpl$2$6();
41534
+ var _el$ = _tmpl$2$7();
41450
41535
  spread(_el$, mergeProps({
41451
41536
  get ["class"]() {
41452
41537
  return `oasis-editor-ui-field-group ${local.class ?? ""}`;
@@ -41457,7 +41542,7 @@ function FieldGroup(props) {
41457
41542
  return local.legend;
41458
41543
  },
41459
41544
  get children() {
41460
- var _el$2 = _tmpl$$b();
41545
+ var _el$2 = _tmpl$$c();
41461
41546
  insert(_el$2, () => local.legend);
41462
41547
  createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-group-legend ${local.legendClass ?? ""}`));
41463
41548
  return _el$2;
@@ -41467,11 +41552,11 @@ function FieldGroup(props) {
41467
41552
  return _el$;
41468
41553
  })();
41469
41554
  }
41470
- var _tmpl$$a = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>`);
41555
+ var _tmpl$$b = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>`);
41471
41556
  function ToggleChip(props) {
41472
41557
  const [local, others] = splitProps(props, ["label", "labelStyle", "onChange", "class", "checked"]);
41473
41558
  return (() => {
41474
- var _el$ = _tmpl$$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
41559
+ var _el$ = _tmpl$$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
41475
41560
  _el$2.addEventListener("change", (event) => {
41476
41561
  var _a;
41477
41562
  return (_a = local.onChange) == null ? void 0 : _a.call(local, event.currentTarget.checked);
@@ -41496,11 +41581,11 @@ function ToggleChip(props) {
41496
41581
  return _el$;
41497
41582
  })();
41498
41583
  }
41499
- var _tmpl$$9 = /* @__PURE__ */ template(`<div>`);
41584
+ var _tmpl$$a = /* @__PURE__ */ template(`<div>`);
41500
41585
  function DialogFooter(props) {
41501
41586
  const [local, others] = splitProps(props, ["align", "class", "classList", "children"]);
41502
41587
  return (() => {
41503
- var _el$ = _tmpl$$9();
41588
+ var _el$ = _tmpl$$a();
41504
41589
  spread(_el$, mergeProps({
41505
41590
  get ["class"]() {
41506
41591
  return `oasis-editor-ui-dialog-footer ${local.class ?? ""}`;
@@ -41756,7 +41841,7 @@ const UNDERLINE_STYLE_OPTIONS = [
41756
41841
  }
41757
41842
  }
41758
41843
  ];
41759
- var _tmpl$$8 = /* @__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$5 = /* @__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$3 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$2 = /* @__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$2 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
41844
+ 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$3 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$2 = /* @__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$2 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
41760
41845
  const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
41761
41846
  const TEST_ID = "editor-toolbar-underline";
41762
41847
  function UnderlineControl(props) {
@@ -41814,7 +41899,7 @@ function UnderlineControl(props) {
41814
41899
  },
41815
41900
  get children() {
41816
41901
  return [(() => {
41817
- var _el$ = _tmpl$$8(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
41902
+ var _el$ = _tmpl$$9(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
41818
41903
  _el$.$$click = () => {
41819
41904
  removeUnderline();
41820
41905
  setOpen(false);
@@ -41822,7 +41907,7 @@ function UnderlineControl(props) {
41822
41907
  insert(_el$3, () => t("toolbar.underlineRemove"));
41823
41908
  return _el$;
41824
41909
  })(), (() => {
41825
- var _el$4 = _tmpl$2$5();
41910
+ var _el$4 = _tmpl$2$6();
41826
41911
  insert(_el$4, createComponent(For, {
41827
41912
  each: UNDERLINE_STYLE_OPTIONS,
41828
41913
  children: (option) => {
@@ -41877,7 +41962,7 @@ function UnderlineControl(props) {
41877
41962
  });
41878
41963
  }
41879
41964
  delegateEvents(["click"]);
41880
- var _tmpl$$7 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$4 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$3 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$2 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$1 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$1 = /* @__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>`);
41965
+ 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$2 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$1 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$1 = /* @__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>`);
41881
41966
  function ListOptionsControl(props) {
41882
41967
  const t = useI18n();
41883
41968
  const api = props.api;
@@ -41899,11 +41984,11 @@ function ListOptionsControl(props) {
41899
41984
  },
41900
41985
  get children() {
41901
41986
  return [(() => {
41902
- var _el$4 = _tmpl$$7();
41987
+ var _el$4 = _tmpl$$8();
41903
41988
  insert(_el$4, () => t("toolbar.formatDecimal"));
41904
41989
  return _el$4;
41905
41990
  })(), (() => {
41906
- var _el$5 = _tmpl$2$4();
41991
+ var _el$5 = _tmpl$2$5();
41907
41992
  insert(_el$5, () => t("toolbar.formatLowerLetter"));
41908
41993
  return _el$5;
41909
41994
  })(), (() => {
@@ -41937,7 +42022,7 @@ function parseNumber(value) {
41937
42022
  const parsed = Number(value);
41938
42023
  return Number.isFinite(parsed) ? parsed : null;
41939
42024
  }
41940
- var _tmpl$$6 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`);
42025
+ var _tmpl$$7 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`);
41941
42026
  function LineSpacingDialog(props) {
41942
42027
  const t = useI18n();
41943
42028
  const [lineHeight, setLineHeight] = createSignal(null);
@@ -42068,7 +42153,7 @@ function LineSpacingDialog(props) {
42068
42153
  return t("lineSpacing.preview");
42069
42154
  },
42070
42155
  get children() {
42071
- var _el$ = _tmpl$$6(), _el$2 = _el$.firstChild;
42156
+ var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild;
42072
42157
  insert(_el$, () => t("lineSpacing.previewText"), _el$2);
42073
42158
  insert(_el$, () => t("lineSpacing.previewText"), null);
42074
42159
  createRenderEffect((_$p) => style(_el$, previewStyle2(), _$p));
@@ -42078,7 +42163,7 @@ function LineSpacingDialog(props) {
42078
42163
  }
42079
42164
  });
42080
42165
  }
42081
- var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$3 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3$2 = /* @__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>`);
42166
+ 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(`<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>`);
42082
42167
  const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
42083
42168
  function formatPreset(value) {
42084
42169
  return value.toFixed(value === Math.floor(value) ? 1 : 2);
@@ -42177,8 +42262,8 @@ function LineSpacingButton(props) {
42177
42262
  return _el$5;
42178
42263
  })();
42179
42264
  }
42180
- }), _tmpl$$5(), (() => {
42181
- var _el$2 = _tmpl$2$3(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
42265
+ }), _tmpl$$6(), (() => {
42266
+ var _el$2 = _tmpl$2$4(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
42182
42267
  _el$2.$$click = openDialog;
42183
42268
  insert(_el$4, () => t("metric.lineSpacingOptions"));
42184
42269
  return _el$2;
@@ -42207,7 +42292,7 @@ function LineSpacingButton(props) {
42207
42292
  })];
42208
42293
  }
42209
42294
  delegateEvents(["click"]);
42210
- var _tmpl$$4 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid>`);
42295
+ var _tmpl$$5 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid>`);
42211
42296
  const numValue = (api, command) => {
42212
42297
  const value = api.commands.state(command).value;
42213
42298
  return value == null ? "" : String(value);
@@ -42226,7 +42311,7 @@ function MetricGroup(props) {
42226
42311
  keepMounted: true,
42227
42312
  get children() {
42228
42313
  return [(() => {
42229
- var _el$ = _tmpl$$4();
42314
+ var _el$ = _tmpl$$5();
42230
42315
  insert(_el$, createComponent(Button$1, {
42231
42316
  icon: "file-up",
42232
42317
  get active() {
@@ -42251,7 +42336,7 @@ function MetricGroup(props) {
42251
42336
  }), null);
42252
42337
  return _el$;
42253
42338
  })(), (() => {
42254
- var _el$2 = _tmpl$2$2();
42339
+ var _el$2 = _tmpl$2$3();
42255
42340
  insert(_el$2, createComponent(NumberField, {
42256
42341
  "class": "oasis-editor-tool-metric",
42257
42342
  labelClass: "oasis-editor-tool-metric-label",
@@ -42353,7 +42438,7 @@ function MetricGroup(props) {
42353
42438
  }
42354
42439
  });
42355
42440
  }
42356
- var _tmpl$$3 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
42441
+ var _tmpl$$4 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
42357
42442
  function SectionGroup(props) {
42358
42443
  const t = useI18n();
42359
42444
  const api = props.api;
@@ -42370,7 +42455,7 @@ function SectionGroup(props) {
42370
42455
  keepMounted: true,
42371
42456
  get children() {
42372
42457
  return [(() => {
42373
- var _el$ = _tmpl$$3();
42458
+ var _el$ = _tmpl$$4();
42374
42459
  insert(_el$, createComponent(Button$1, {
42375
42460
  icon: "rectangle-vertical",
42376
42461
  get active() {
@@ -42401,7 +42486,7 @@ function SectionGroup(props) {
42401
42486
  }), null);
42402
42487
  return _el$;
42403
42488
  })(), (() => {
42404
- var _el$2 = _tmpl$$3();
42489
+ var _el$2 = _tmpl$$4();
42405
42490
  insert(_el$2, createComponent(Button$1, {
42406
42491
  icon: "scissors",
42407
42492
  "data-testid": "editor-toolbar-section-break-next",
@@ -42483,7 +42568,7 @@ function marginsMatchPreset(margins, preset) {
42483
42568
  const target = presetMarginsPx(preset);
42484
42569
  return Math.abs(margins.top - target.top) <= 1 && Math.abs(margins.bottom - target.bottom) <= 1 && Math.abs(margins.left - target.left) <= 1 && Math.abs(margins.right - target.right) <= 1;
42485
42570
  }
42486
- var _tmpl$$2 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>`), _tmpl$4$1 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>`), _tmpl$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>`), _tmpl$6 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
42571
+ var _tmpl$$3 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>`), _tmpl$4$1 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>`), _tmpl$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>`), _tmpl$6 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
42487
42572
  const FIELDS = [{
42488
42573
  key: "top",
42489
42574
  labelKey: "section.marginField.top"
@@ -42553,7 +42638,7 @@ function MarginsGroup(props) {
42553
42638
  keepMounted: true,
42554
42639
  get children() {
42555
42640
  return [(() => {
42556
- var _el$ = _tmpl$$2();
42641
+ var _el$ = _tmpl$$3();
42557
42642
  insert(_el$, createComponent(For, {
42558
42643
  each: MARGIN_PRESETS,
42559
42644
  children: (preset) => (() => {
@@ -42584,7 +42669,7 @@ function MarginsGroup(props) {
42584
42669
  return showCustom();
42585
42670
  },
42586
42671
  get children() {
42587
- var _el$6 = _tmpl$2$1();
42672
+ var _el$6 = _tmpl$2$2();
42588
42673
  insert(_el$6, createComponent(For, {
42589
42674
  each: FIELDS,
42590
42675
  children: (field) => (() => {
@@ -43113,7 +43198,7 @@ function shapeLabel(preset, locale) {
43113
43198
  var _a;
43114
43199
  return ((_a = SHAPE_LABELS[preset]) == null ? void 0 : _a[locale]) ?? preset;
43115
43200
  }
43116
- var _tmpl$$1 = /* @__PURE__ */ template(`<svg class=oasis-editor-shape-thumb viewBox="0 0 22 22"width=22 height=22 aria-hidden=true><path stroke=currentColor stroke-width=1 stroke-linejoin=round stroke-linecap=round vector-effect=non-scaling-stroke>`);
43201
+ var _tmpl$$2 = /* @__PURE__ */ template(`<svg class=oasis-editor-shape-thumb viewBox="0 0 22 22"width=22 height=22 aria-hidden=true><path stroke=currentColor stroke-width=1 stroke-linejoin=round stroke-linecap=round vector-effect=non-scaling-stroke>`);
43117
43202
  const PREVIEW_W = 22;
43118
43203
  const PREVIEW_H = 22;
43119
43204
  const PREVIEW_PAD = 2;
@@ -43144,7 +43229,7 @@ function ShapeThumbnail(props) {
43144
43229
  const d = () => presetToSvgPath(props.preset, PREVIEW_PAD, PREVIEW_PAD, PREVIEW_W - PREVIEW_PAD * 2, PREVIEW_H - PREVIEW_PAD * 2);
43145
43230
  const strokeOnly = () => STROKE_ONLY_PRESETS.has(props.preset);
43146
43231
  return (() => {
43147
- var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild;
43232
+ var _el$ = _tmpl$$2(), _el$2 = _el$.firstChild;
43148
43233
  createRenderEffect((_p$) => {
43149
43234
  var _v$ = d(), _v$2 = strokeOnly() ? "none" : "currentColor", _v$3 = strokeOnly() ? void 0 : "0.18";
43150
43235
  _v$ !== _p$.e && setAttribute(_el$2, "d", _p$.e = _v$);
@@ -43185,7 +43270,7 @@ function pushRecentShape(preset) {
43185
43270
  }
43186
43271
  return next;
43187
43272
  }
43188
- var _tmpl$ = /* @__PURE__ */ template(`<button type=button class=oasis-editor-shape-gallery-tile>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-section-header>`), _tmpl$3 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-grid>`), _tmpl$4 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery>`);
43273
+ var _tmpl$$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-shape-gallery-tile>`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-section-header>`), _tmpl$3 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-grid>`), _tmpl$4 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery>`);
43189
43274
  function ShapeGallery(props) {
43190
43275
  const t = useI18n();
43191
43276
  const locale = () => t("locale.id") === "en" ? "en" : "pt-BR";
@@ -43196,7 +43281,7 @@ function ShapeGallery(props) {
43196
43281
  props.api.focusEditor();
43197
43282
  };
43198
43283
  const Tile = (tileProps) => (() => {
43199
- var _el$ = _tmpl$();
43284
+ var _el$ = _tmpl$$1();
43200
43285
  _el$.$$click = () => insert$1(tileProps.preset);
43201
43286
  insert(_el$, createComponent(ShapeThumbnail, {
43202
43287
  get preset() {
@@ -43224,7 +43309,7 @@ function ShapeGallery(props) {
43224
43309
  },
43225
43310
  get children() {
43226
43311
  return [(() => {
43227
- var _el$3 = _tmpl$2();
43312
+ var _el$3 = _tmpl$2$1();
43228
43313
  insert(_el$3, () => t("toolbar.shapes.recentlyUsed"));
43229
43314
  return _el$3;
43230
43315
  })(), (() => {
@@ -43244,7 +43329,7 @@ function ShapeGallery(props) {
43244
43329
  insert(_el$2, createComponent(For, {
43245
43330
  each: SHAPE_CATEGORIES,
43246
43331
  children: (category) => [(() => {
43247
- var _el$5 = _tmpl$2();
43332
+ var _el$5 = _tmpl$2$1();
43248
43333
  insert(_el$5, () => t(category.headerKey));
43249
43334
  return _el$5;
43250
43335
  })(), (() => {
@@ -43264,6 +43349,109 @@ function ShapeGallery(props) {
43264
43349
  })();
43265
43350
  }
43266
43351
  delegateEvents(["click"]);
43352
+ var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>`), _tmpl$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-ratios>`);
43353
+ function cmValue(api, command) {
43354
+ const value = api.commands.state(command).value;
43355
+ return typeof value === "number" ? value.toFixed(2) : "";
43356
+ }
43357
+ function ImageSizeField(props) {
43358
+ const t = useI18n();
43359
+ const command = props.dimension === "height" ? "imageHeightCm" : "imageWidthCm";
43360
+ const labelKey = props.dimension === "height" ? "image.height" : "image.width";
43361
+ const icon = props.dimension === "height" ? "move-vertical" : "move-horizontal";
43362
+ return (() => {
43363
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
43364
+ insert(_el$2, createComponent(ToolIcon, {
43365
+ name: icon
43366
+ }));
43367
+ insert(_el$, createComponent(NumberField, {
43368
+ "class": "oasis-editor-tool-metric oasis-editor-image-size-metric",
43369
+ labelClass: "oasis-editor-tool-metric-label",
43370
+ get title() {
43371
+ return t(labelKey);
43372
+ },
43373
+ get label() {
43374
+ return t(labelKey);
43375
+ },
43376
+ controlClass: "oasis-editor-tool-number",
43377
+ get ["data-testid"]() {
43378
+ return `editor-toolbar-image-${props.dimension}`;
43379
+ },
43380
+ min: "0.1",
43381
+ step: "0.1",
43382
+ get value() {
43383
+ return cmValue(props.api, command);
43384
+ },
43385
+ onChange: (value) => {
43386
+ props.api.commands.execute(command, value == null ? "" : String(value));
43387
+ }
43388
+ }), null);
43389
+ return _el$;
43390
+ })();
43391
+ }
43392
+ const CROP_ASPECT_PRESETS = [{
43393
+ id: "reset",
43394
+ labelKey: "image.cropReset"
43395
+ }, {
43396
+ id: "1:1",
43397
+ labelKey: "image.cropRatio.square"
43398
+ }, {
43399
+ id: "16:9",
43400
+ labelKey: "image.cropRatio.16x9"
43401
+ }, {
43402
+ id: "4:3",
43403
+ labelKey: "image.cropRatio.4x3"
43404
+ }, {
43405
+ id: "3:2",
43406
+ labelKey: "image.cropRatio.3x2"
43407
+ }, {
43408
+ id: "2:3",
43409
+ labelKey: "image.cropRatio.2x3"
43410
+ }, {
43411
+ id: "3:4",
43412
+ labelKey: "image.cropRatio.3x4"
43413
+ }, {
43414
+ id: "9:16",
43415
+ labelKey: "image.cropRatio.9x16"
43416
+ }];
43417
+ function ImageCropMenu(props) {
43418
+ const t = useI18n();
43419
+ return (() => {
43420
+ var _el$3 = _tmpl$2(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
43421
+ insert(_el$3, createComponent(Button$1, {
43422
+ icon: "crop",
43423
+ get active() {
43424
+ return props.api.commands.state("imageCrop").isActive;
43425
+ },
43426
+ "data-testid": "editor-toolbar-image-crop-toggle",
43427
+ onClick: () => {
43428
+ props.api.commands.execute("imageCrop");
43429
+ },
43430
+ get label() {
43431
+ return t("image.crop");
43432
+ },
43433
+ get tooltip() {
43434
+ return t("image.crop");
43435
+ }
43436
+ }), _el$4);
43437
+ insert(_el$5, createComponent(For, {
43438
+ each: CROP_ASPECT_PRESETS,
43439
+ children: (preset) => createComponent(Button$1, {
43440
+ "class": "oasis-editor-image-crop-ratio",
43441
+ get label() {
43442
+ return t(preset.labelKey);
43443
+ },
43444
+ get ["data-testid"]() {
43445
+ return `editor-toolbar-image-crop-${preset.id}`;
43446
+ },
43447
+ onClick: () => {
43448
+ props.api.commands.execute("imageCropAspect", preset.id);
43449
+ }
43450
+ })
43451
+ }));
43452
+ return _el$3;
43453
+ })();
43454
+ }
43267
43455
  const RIBBON_PLACEMENTS = {
43268
43456
  "editor-toolbar-file-dropdown": { tab: "file", group: "document", row: 1 },
43269
43457
  "sep-file": { tab: "file", group: "document", row: 1 },
@@ -43309,6 +43497,9 @@ const RIBBON_PLACEMENTS = {
43309
43497
  row: 1
43310
43498
  },
43311
43499
  "sep-insert": { tab: "insert", group: "accessibility", row: 2 },
43500
+ "editor-toolbar-image-crop": { tab: "imageFormat", group: "size", row: 1 },
43501
+ "editor-toolbar-image-height": { tab: "imageFormat", group: "size", row: 1 },
43502
+ "editor-toolbar-image-width": { tab: "imageFormat", group: "size", row: 2 },
43312
43503
  "editor-toolbar-align-left": { tab: "home", group: "paragraph", row: 2 },
43313
43504
  "editor-toolbar-align-center": { tab: "home", group: "paragraph", row: 2 },
43314
43505
  "editor-toolbar-align-right": { tab: "home", group: "paragraph", row: 2 },
@@ -44052,6 +44243,30 @@ function createDefaultToolbarPreset(t) {
44052
44243
  isVisible: (api) => api.commands.state("insertImageCaption").isEnabled
44053
44244
  });
44054
44245
  items.push({ type: "separator", id: "sep-insert" });
44246
+ items.push({
44247
+ type: "menu",
44248
+ id: "editor-toolbar-image-crop",
44249
+ testId: "editor-toolbar-image-crop",
44250
+ iconName: "crop",
44251
+ tooltipKey: "image.crop",
44252
+ labelKey: "image.crop",
44253
+ ribbonSize: "large",
44254
+ isActive: (api) => api.commands.state("imageCrop").isActive,
44255
+ panelClass: "oasis-editor-image-crop-panel",
44256
+ content: { kind: "custom", render: (api) => ImageCropMenu({ api }) }
44257
+ });
44258
+ items.push({
44259
+ type: "custom",
44260
+ id: "editor-toolbar-image-height",
44261
+ testId: "editor-toolbar-image-height",
44262
+ render: (api) => ImageSizeField({ api, dimension: "height" })
44263
+ });
44264
+ items.push({
44265
+ type: "custom",
44266
+ id: "editor-toolbar-image-width",
44267
+ testId: "editor-toolbar-image-width",
44268
+ render: (api) => ImageSizeField({ api, dimension: "width" })
44269
+ });
44055
44270
  for (const button of ALIGN_BUTTONS) {
44056
44271
  items.push({
44057
44272
  type: "toggle",
@@ -44501,100 +44716,104 @@ export {
44501
44716
  resolveTextAlignmentBaselineOffset as by,
44502
44717
  TEXT_BASELINE_RATIO as bz,
44503
44718
  getPageContentWidth as c,
44504
- DialogFooter as c$,
44719
+ ActionRow as c$,
44505
44720
  getDocumentParagraphsCanonical as c0,
44506
44721
  getDocumentParagraphs as c1,
44507
- getDocumentPageSettings as c2,
44508
- getTableCellContentWidthForParagraph as c3,
44509
- layoutMetricsEpoch as c4,
44510
- bumpLayoutMetricsEpoch as c5,
44511
- createCanvasLayoutSnapshotProvider as c6,
44512
- on as c7,
44513
- debounce as c8,
44514
- unwrap as c9,
44515
- previousFontSizePt as cA,
44516
- fontSizePtToPx as cB,
44517
- resolveNamedTextStyle as cC,
44518
- createDefaultToolbarPreset as cD,
44519
- MenuRegistry as cE,
44520
- createToolbarRegistry as cF,
44521
- Editor as cG,
44522
- resolveCommandRef as cH,
44523
- commandRefName as cI,
44524
- createOasisEditorClient as cJ,
44525
- createEditorZoom as cK,
44526
- startLongTaskObserver as cL,
44527
- installGlobalReport as cM,
44528
- applyStoredPreciseFontPreference as cN,
44529
- getWelcomeSeen as cO,
44530
- isLocalFontAccessSupported as cP,
44531
- EDITOR_SCROLL_PADDING_PX as cQ,
44532
- Toolbar as cR,
44533
- OasisEditorLoading as cS,
44534
- I18nProvider as cT,
44535
- createTranslator as cU,
44536
- registerDomStatsSurface as cV,
44537
- createEditorLogger as cW,
44538
- ActionRow as cX,
44539
- ColorPicker as cY,
44540
- CommandRegistry as cZ,
44541
- DEFAULT_PALETTE as c_,
44542
- perfTimer as ca,
44543
- getRunTextBox as cb,
44544
- createEditorDocument as cc,
44545
- resolveResizedDimensions as cd,
44546
- resolveTextBoxRenderHeight as ce,
44547
- getToolbarStyleState as cf,
44548
- VERTICAL_HIT_WEIGHT as cg,
44549
- getCachedCanvasImage as ch,
44550
- measureParagraphMinContentWidthPx as ci,
44551
- getEditableBlocksForZone as cj,
44552
- findParagraphLocation as ck,
44553
- createSectionBoundaryParagraph as cl,
44554
- normalizePageSettings as cm,
44555
- DEFAULT_EDITOR_PAGE_SETTINGS as cn,
44556
- markStart as co,
44557
- markEnd as cp,
44558
- getParagraphEntries as cq,
44559
- getParagraphById as cr,
44560
- createEditorFootnote as cs,
44561
- createFootnoteReferenceRun as ct,
44562
- renumberFootnotes as cu,
44563
- preciseFontModeVersion as cv,
44564
- isPreciseFontModeEnabled as cw,
44565
- getHeadingLevel as cx,
44566
- togglePreciseFontMode as cy,
44567
- nextFontSizePt as cz,
44722
+ PX_PER_CM as c2,
44723
+ getDocumentPageSettings as c3,
44724
+ getTableCellContentWidthForParagraph as c4,
44725
+ layoutMetricsEpoch as c5,
44726
+ bumpLayoutMetricsEpoch as c6,
44727
+ createCanvasLayoutSnapshotProvider as c7,
44728
+ on as c8,
44729
+ debounce as c9,
44730
+ isPreciseFontModeEnabled as cA,
44731
+ getHeadingLevel as cB,
44732
+ togglePreciseFontMode as cC,
44733
+ nextFontSizePt as cD,
44734
+ previousFontSizePt as cE,
44735
+ fontSizePtToPx as cF,
44736
+ resolveNamedTextStyle as cG,
44737
+ createDefaultToolbarPreset as cH,
44738
+ MenuRegistry as cI,
44739
+ createToolbarRegistry as cJ,
44740
+ Editor as cK,
44741
+ resolveCommandRef as cL,
44742
+ commandRefName as cM,
44743
+ createOasisEditorClient as cN,
44744
+ createEditorZoom as cO,
44745
+ startLongTaskObserver as cP,
44746
+ installGlobalReport as cQ,
44747
+ applyStoredPreciseFontPreference as cR,
44748
+ getWelcomeSeen as cS,
44749
+ isLocalFontAccessSupported as cT,
44750
+ EDITOR_SCROLL_PADDING_PX as cU,
44751
+ Toolbar as cV,
44752
+ OasisEditorLoading as cW,
44753
+ I18nProvider as cX,
44754
+ createTranslator as cY,
44755
+ registerDomStatsSurface as cZ,
44756
+ createEditorLogger as c_,
44757
+ unwrap as ca,
44758
+ perfTimer as cb,
44759
+ getRunTextBox as cc,
44760
+ createEditorDocument as cd,
44761
+ resolveResizedDimensions as ce,
44762
+ axisSignForDirection as cf,
44763
+ clamp as cg,
44764
+ MIN_RESIZE_SIZE_PX as ch,
44765
+ resolveTextBoxRenderHeight as ci,
44766
+ getToolbarStyleState as cj,
44767
+ VERTICAL_HIT_WEIGHT as ck,
44768
+ getCachedCanvasImage as cl,
44769
+ measureParagraphMinContentWidthPx as cm,
44770
+ getEditableBlocksForZone as cn,
44771
+ findParagraphLocation as co,
44772
+ createSectionBoundaryParagraph as cp,
44773
+ normalizePageSettings as cq,
44774
+ DEFAULT_EDITOR_PAGE_SETTINGS as cr,
44775
+ markStart as cs,
44776
+ markEnd as ct,
44777
+ getParagraphEntries as cu,
44778
+ getParagraphById as cv,
44779
+ createEditorFootnote as cw,
44780
+ createFootnoteReferenceRun as cx,
44781
+ renumberFootnotes as cy,
44782
+ preciseFontModeVersion as cz,
44568
44783
  domTextMeasurer as d,
44569
- FieldRow as d0,
44570
- FloatingActionButton as d1,
44571
- GridPicker as d2,
44572
- Heading as d3,
44573
- IconButton as d4,
44574
- Menu as d5,
44575
- OASIS_BUILTIN_COMMANDS as d6,
44576
- OASIS_MENU_ITEMS as d7,
44577
- OASIS_TOOLBAR_ITEMS as d8,
44578
- OasisEditorAppLazy as d9,
44579
- OasisEditorContainer as da,
44580
- PluginCollection as db,
44581
- Popover as dc,
44582
- RIBBON_TABS as dd,
44583
- Select as de,
44584
- Separator as df,
44585
- SidePanel as dg,
44586
- SidePanelBody as dh,
44587
- SidePanelFooter as di,
44588
- SidePanelHeader as dj,
44589
- SplitButton as dk,
44590
- StyleGallery as dl,
44591
- Button$1 as dm,
44592
- buildRibbonTabDefinitions as dn,
44593
- createEditorCommandBus as dp,
44594
- createOasisEditor as dq,
44595
- createOasisEditorContainer as dr,
44596
- mount as ds,
44597
- registerToolbarRenderer as dt,
44784
+ ColorPicker as d0,
44785
+ CommandRegistry as d1,
44786
+ DEFAULT_PALETTE as d2,
44787
+ DialogFooter as d3,
44788
+ FieldRow as d4,
44789
+ FloatingActionButton as d5,
44790
+ GridPicker as d6,
44791
+ Heading as d7,
44792
+ IconButton as d8,
44793
+ Menu as d9,
44794
+ OASIS_BUILTIN_COMMANDS as da,
44795
+ OASIS_MENU_ITEMS as db,
44796
+ OASIS_TOOLBAR_ITEMS as dc,
44797
+ OasisEditorAppLazy as dd,
44798
+ OasisEditorContainer as de,
44799
+ PluginCollection as df,
44800
+ Popover as dg,
44801
+ RIBBON_TABS as dh,
44802
+ Select as di,
44803
+ Separator as dj,
44804
+ SidePanel as dk,
44805
+ SidePanelBody as dl,
44806
+ SidePanelFooter as dm,
44807
+ SidePanelHeader as dn,
44808
+ SplitButton as dp,
44809
+ StyleGallery as dq,
44810
+ Button$1 as dr,
44811
+ buildRibbonTabDefinitions as ds,
44812
+ createEditorCommandBus as dt,
44813
+ createOasisEditor as du,
44814
+ createOasisEditorContainer as dv,
44815
+ mount as dw,
44816
+ registerToolbarRenderer as dx,
44598
44817
  estimateTableBlockHeight as e,
44599
44818
  getParagraphText as f,
44600
44819
  getProjectedParagraphBlockHeight as g,