oasis-editor 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{OasisEditorApp-BgOoWqpC.js → OasisEditorApp-DYcAe_1n.js} +568 -41
  2. package/dist/app/controllers/EditorCommandsController.d.ts +4 -0
  3. package/dist/app/controllers/useEditorLayout.d.ts +2 -1
  4. package/dist/assets/{importDocxWorker-DbiKelzX.js → importDocxWorker-cjz15bhS.js} +1 -1
  5. package/dist/core/commands/builtinCommands.d.ts +1 -1
  6. package/dist/core/commands/image.d.ts +2 -0
  7. package/dist/core/commands/publicCommandTypes.d.ts +1 -0
  8. package/dist/core/document/imageCaptions.d.ts +13 -0
  9. package/dist/core/editorState.d.ts +1 -0
  10. package/dist/core/model/index.d.ts +1 -0
  11. package/dist/core/model/types/document.d.ts +7 -0
  12. package/dist/core/model/types/documentComments.d.ts +50 -0
  13. package/dist/export/docx/commentsXml.d.ts +34 -0
  14. package/dist/export/docx/docxTypes.d.ts +7 -0
  15. package/dist/i18n/locales/en.d.ts +4 -0
  16. package/dist/i18n/locales/pt-BR.d.ts +4 -0
  17. package/dist/import/docx/comments.d.ts +12 -0
  18. package/dist/import/docx/commentsXml.d.ts +14 -0
  19. package/dist/import/docx/runs/types.d.ts +10 -0
  20. package/dist/import/docx/runs.d.ts +5 -1
  21. package/dist/{index-L71R0x7D.js → index-CWev1Jg0.js} +723 -304
  22. package/dist/oasis-editor.css +1 -1
  23. package/dist/oasis-editor.js +54 -54
  24. package/dist/oasis-editor.umd.cjs +4 -4
  25. package/dist/plugins/internal/createEssentialsPlugin.d.ts +1 -0
  26. package/dist/ui/OasisEditorEditor.d.ts +2 -1
  27. package/dist/ui/app/EditorDialogsLayer.d.ts +1 -0
  28. package/dist/ui/app/buildEditorViewProps.d.ts +2 -1
  29. package/dist/ui/app/useEditorDialogs.d.ts +8 -0
  30. package/dist/ui/canvas/CanvasCommentGeometry.d.ts +13 -0
  31. package/dist/ui/components/CommentHighlightOverlay.d.ts +16 -0
  32. package/dist/ui/components/Dialogs/ImageCaptionDialog.d.ts +8 -0
  33. package/dist/ui/components/Menubar/builtinMenuIds.d.ts +1 -0
  34. package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +1 -0
  35. package/dist/ui/editorUiTypes.d.ts +8 -0
  36. package/package.json +1 -1
@@ -1422,6 +1422,7 @@ const en = {
1422
1422
  "toolbar.redo": "Redo last undone change",
1423
1423
  "toolbar.insert": "Insert",
1424
1424
  "toolbar.image": "Image",
1425
+ "toolbar.imageCaption": "Image caption",
1425
1426
  "toolbar.shapes": "Shapes",
1426
1427
  "toolbar.shape.rect": "Rectangle",
1427
1428
  "toolbar.shape.roundRect": "Rounded rectangle",
@@ -1653,6 +1654,9 @@ const en = {
1653
1654
  "dialog.imageAlt.title": "Image Alt Text",
1654
1655
  "dialog.imageAlt.label": "Description (Alt text)",
1655
1656
  "dialog.imageAlt.placeholder": "Describe the image",
1657
+ "dialog.imageCaption.title": "Image Caption",
1658
+ "dialog.imageCaption.label": "Caption",
1659
+ "dialog.imageCaption.placeholder": "Enter a caption",
1656
1660
  "dialog.link.title": "Insert Link",
1657
1661
  "dialog.link.label": "Link URL",
1658
1662
  "dialog.link.placeholder": "https://example.com",
@@ -1810,6 +1814,7 @@ const ptBR = {
1810
1814
  "toolbar.redo": "Refazer última alteração",
1811
1815
  "toolbar.insert": "Inserir",
1812
1816
  "toolbar.image": "Imagem",
1817
+ "toolbar.imageCaption": "Legenda da imagem",
1813
1818
  "toolbar.shapes": "Formas",
1814
1819
  "toolbar.shape.rect": "Retângulo",
1815
1820
  "toolbar.shape.roundRect": "Retângulo arredondado",
@@ -2041,6 +2046,9 @@ const ptBR = {
2041
2046
  "dialog.imageAlt.title": "Texto Alternativo da Imagem",
2042
2047
  "dialog.imageAlt.label": "Descrição (Texto Alt)",
2043
2048
  "dialog.imageAlt.placeholder": "Descreva a imagem",
2049
+ "dialog.imageCaption.title": "Legenda da imagem",
2050
+ "dialog.imageCaption.label": "Legenda",
2051
+ "dialog.imageCaption.placeholder": "Digite a legenda",
2044
2052
  "dialog.link.title": "Inserir Link",
2045
2053
  "dialog.link.label": "URL do Link",
2046
2054
  "dialog.link.placeholder": "https://exemplo.com",
@@ -2206,14 +2214,14 @@ function t(key, params = []) {
2206
2214
  return template2;
2207
2215
  }
2208
2216
  const oasisMarkBase64 = "UklGRmQXAABXRUJQVlA4IFgXAACwWwCdASrAAAABPjEWiUMiISESyL50IAMEswHYDxjW/947Oi5/a/7H+1P90/ar5n65/UvwH+Q/QZm27Sf5n9r/I/5m/2n/p+wv9E/9j3AP07/0X92/HLuKeYL+mf4r/zf3f3tf9x+rnvH/z/qAfzf/J/9/sM/QX/bv02P28+Fb9s/2s+B39h//51gH//6yfrV/QO1z/CdMx6vl0OAGqD8Z+4X6H+9/up8b/6vvP+IeoL+Lfyr/CflxwuoAPz7+0/7T1iPk/9p6R/zXqAflpxyVAX8y+hD/5/6f0W/UX7UfAl/Ov75/zOxr6SR2HAT+kJLsdULBbdVn3b+sl8uZdjuThjIe3NwBwjfGz5SniiBN2m7i7b0hA/wxE1PuC+4EcbOyjUkU3CDDghPY1Va4tpUped9TFa05Qb1z7O+Ye73ccvEl10Sgdj6Hhy71hb/XpA23GjXBN/obAlaswz9gKwvW9d9npbC69rQeTm6DEr/cjrNngjQaHgFGjh4uVY1bY9Q+/iG037f80w0bLlYIe7smzz4tG1kC8r/KyWvzd3IXXrR2bKmhoB3Md69ltbERYFBI/2f+w7Jcsw+aUOGSwP6v6jv3tvwprg/7n5tto40/iRIKwEHQ5H/G5c0tpJ2pwREanIK3qHinjvovnkmuTw0mV2bumYqdc7he7hG0hpvBna8vIRpKYe6K1v3F8trOEtYUwr7w8e6j3nviknKtsFMtPtxZzn0YnhgtOn9inBlwqyEGR+wk7X1KHxOekXCA1UVbmLwGx1NqbI6r2WBOwQdpmpTg85DMOjwzW/JHUmfxKTDfhoXLi9gBMP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/Dj+q60L9YPOU6t+1FP6od8x4iXUpAtBsclYfJhOrwv66P13ocoB3LV1x09Eb5wq33vepBq3qYQJQyOHbj/jl4eLRUxXLQgLorpnB4HNs4v40tGGosw2Ka6eDt5K6P8DQK5ozy56BizczJenDjZ5DYx1Xu3YLmI/quRSR8ORIJqwhWFwM+Q8/gNfUL/YgQHlHmfhYi5vjU0TzsgnLyhP/kOFSnR9zjJkIMcYAFB/Ft1tfks1aQiBMtgP4sabdMsauWXINaIyR9ClOZLdIZQVGHUgLjxKW6YiFUs72zTJmKtf/RovsidqZlmEXrWGZ3UuGplChFUtjEkvwi2XxICgc0grD+9/tRt47usAAADGbVjPUInsKZHILQ8Tdvbj09q/9k2Mg7uynD2e+HudOmr+jOK+SyWmKsSZ4pH89FUSffyxPKUMVNp8o1m1apG/WDvwhmHllHVfELy0BgfyAIevaAuIOzl4NX3ayQnv+tsCnIGxjvF1IwPLyoflKFrL2OBFh3pJ57ChDdzSC9IDKqpaycKVMm2mWUPGBLK2cpD+b4VPleMoNCtKZz4AileaHHtk77gduJB8sihmMPR1lV1Vba4pOywdJgGueqt4IcTd2RJFxeSRNjuzHcR4tYGdli66ijJZC20ODhr8miT+cauMIflgiAAAAA=";
2209
- var _tmpl$$Q = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2217
+ var _tmpl$$R = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2210
2218
  const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
2211
2219
  const MARK_ASPECT = 3 / 4;
2212
2220
  function OasisBrandMark(props) {
2213
2221
  const height = () => props.height ?? 64;
2214
2222
  const width = () => Math.round(height() * MARK_ASPECT);
2215
2223
  return (() => {
2216
- var _el$ = _tmpl$$Q();
2224
+ var _el$ = _tmpl$$R();
2217
2225
  setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
2218
2226
  setAttribute(_el$, "draggable", false);
2219
2227
  createRenderEffect((_p$) => {
@@ -2230,7 +2238,7 @@ function OasisBrandMark(props) {
2230
2238
  return _el$;
2231
2239
  })();
2232
2240
  }
2233
- var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$w = /* @__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$k = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2241
+ var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$x = /* @__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$l = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2234
2242
  function OasisEditorLoading(props) {
2235
2243
  const variant = () => props.variant ?? "overlay";
2236
2244
  const pct = () => {
@@ -2239,7 +2247,7 @@ function OasisEditorLoading(props) {
2239
2247
  };
2240
2248
  const isDone = () => (pct() ?? 0) >= 100;
2241
2249
  return (() => {
2242
- var _el$ = _tmpl$2$w(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2250
+ var _el$ = _tmpl$2$x(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2243
2251
  insert(_el$2, createComponent(OasisBrandMark, {
2244
2252
  height: 40,
2245
2253
  "class": "oasis-editor-loading-mark"
@@ -2250,10 +2258,10 @@ function OasisEditorLoading(props) {
2250
2258
  return pct() != null;
2251
2259
  },
2252
2260
  get children() {
2253
- var _el$6 = _tmpl$$P();
2261
+ var _el$6 = _tmpl$$Q();
2254
2262
  insert(_el$6, (() => {
2255
2263
  var _c$ = memo(() => !!isDone());
2256
- return () => _c$() ? _tmpl$3$k() : `${pct()}%`;
2264
+ return () => _c$() ? _tmpl$3$l() : `${pct()}%`;
2257
2265
  })());
2258
2266
  return _el$6;
2259
2267
  }
@@ -2302,7 +2310,7 @@ function OasisEditorAppLazy(props = {}) {
2302
2310
  onCleanup(() => {
2303
2311
  cancelled = true;
2304
2312
  });
2305
- import("./OasisEditorApp-BgOoWqpC.js").then((m) => {
2313
+ import("./OasisEditorApp-DYcAe_1n.js").then((m) => {
2306
2314
  cancelled = true;
2307
2315
  setProgress(1);
2308
2316
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -3415,11 +3423,17 @@ let nextTableRowId = 1;
3415
3423
  let nextTableCellId = 1;
3416
3424
  let nextFootnoteId = 1;
3417
3425
  let nextBookmarkId = 1;
3426
+ let nextCommentId = 1;
3418
3427
  function createEditorBookmarkId() {
3419
3428
  const id = `bookmark:${nextBookmarkId}`;
3420
3429
  nextBookmarkId += 1;
3421
3430
  return id;
3422
3431
  }
3432
+ function createEditorCommentId() {
3433
+ const id = `comment:${nextCommentId}`;
3434
+ nextCommentId += 1;
3435
+ return id;
3436
+ }
3423
3437
  function createEditorRun(text = "") {
3424
3438
  const run = {
3425
3439
  id: `run:${nextRunId}`,
@@ -3634,6 +3648,23 @@ const DEFAULT_EDITOR_STYLES = {
3634
3648
  textStyle: {
3635
3649
  superscript: true
3636
3650
  }
3651
+ },
3652
+ Caption: {
3653
+ id: "Caption",
3654
+ name: "Caption",
3655
+ type: "paragraph",
3656
+ basedOn: "normal",
3657
+ nextStyle: "normal",
3658
+ paragraphStyle: {
3659
+ align: "center",
3660
+ spacingBefore: 4,
3661
+ spacingAfter: 8
3662
+ },
3663
+ textStyle: {
3664
+ fontFamily: "Calibri, sans-serif",
3665
+ fontSize: 12,
3666
+ italic: true
3667
+ }
3637
3668
  }
3638
3669
  };
3639
3670
  function createEditorDocument(blocks, pageSettings, sections, styles, metadata, assets) {
@@ -4235,6 +4266,7 @@ const OASIS_BUILTIN_COMMANDS = [
4235
4266
  "importDocument",
4236
4267
  "insertImage",
4237
4268
  "editImageAlt",
4269
+ "insertImageCaption",
4238
4270
  "outdent",
4239
4271
  "indent",
4240
4272
  "togglePageBreakBefore",
@@ -4315,8 +4347,8 @@ class MenuRegistry {
4315
4347
  }
4316
4348
  }
4317
4349
  const defaultMenuRegistry = new MenuRegistry();
4318
- var _tmpl$$O = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$v = /* @__PURE__ */ template(`<i>`);
4319
- const FootnoteIcon = () => _tmpl$$O();
4350
+ var _tmpl$$P = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$w = /* @__PURE__ */ template(`<i>`);
4351
+ const FootnoteIcon = () => _tmpl$$P();
4320
4352
  const CUSTOM_ICONS = {
4321
4353
  footnote: FootnoteIcon
4322
4354
  };
@@ -4330,7 +4362,7 @@ function ToolIcon(props) {
4330
4362
  },
4331
4363
  get fallback() {
4332
4364
  return (() => {
4333
- var _el$2 = _tmpl$2$v();
4365
+ var _el$2 = _tmpl$2$w();
4334
4366
  createRenderEffect(() => setAttribute(_el$2, "data-lucide", props.name));
4335
4367
  return _el$2;
4336
4368
  })();
@@ -4496,6 +4528,13 @@ const defaultMenuItems = [
4496
4528
  command: "insertImage",
4497
4529
  icon: "image"
4498
4530
  },
4531
+ {
4532
+ id: "insert_image_caption",
4533
+ path: "Insert/Image Caption",
4534
+ labelKey: "toolbar.imageCaption",
4535
+ command: "insertImageCaption",
4536
+ icon: "subtitles"
4537
+ },
4499
4538
  {
4500
4539
  id: "insert_table",
4501
4540
  path: "Insert/Table",
@@ -4652,7 +4691,7 @@ const defaultMenuItems = [
4652
4691
  }
4653
4692
  ];
4654
4693
  defaultMenuItems.forEach((item) => defaultMenuRegistry.register(item));
4655
- var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$d = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$c = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$6 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
4694
+ var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$d = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$6 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
4656
4695
  function Menubar(props) {
4657
4696
  const [activeMenu, setActiveMenu] = createSignal(null);
4658
4697
  const menuItems = () => (props.registry ?? defaultMenuRegistry).getItems();
@@ -4719,13 +4758,13 @@ function Menubar(props) {
4719
4758
  });
4720
4759
  const topLevelItems = () => pruneTree(menuTree());
4721
4760
  return (() => {
4722
- var _el$ = _tmpl$$N();
4761
+ var _el$ = _tmpl$$O();
4723
4762
  insert(_el$, createComponent(For, {
4724
4763
  get each() {
4725
4764
  return topLevelItems();
4726
4765
  },
4727
4766
  children: (topLevel) => (() => {
4728
- var _el$2 = _tmpl$3$j(), _el$3 = _el$2.firstChild;
4767
+ var _el$2 = _tmpl$3$k(), _el$3 = _el$2.firstChild;
4729
4768
  _el$2.addEventListener("mouseenter", () => {
4730
4769
  if (activeMenu() && activeMenu() !== topLevel.id) {
4731
4770
  setActiveMenu(topLevel.id);
@@ -4745,7 +4784,7 @@ function Menubar(props) {
4745
4784
  return activeMenu() === topLevel.id;
4746
4785
  },
4747
4786
  get children() {
4748
- var _el$4 = _tmpl$2$u();
4787
+ var _el$4 = _tmpl$2$v();
4749
4788
  insert(_el$4, createComponent(For, {
4750
4789
  get each() {
4751
4790
  return topLevel.children;
@@ -4784,7 +4823,7 @@ function MenuNode(props) {
4784
4823
  } = props;
4785
4824
  const isSeparator = (_a = node.item) == null ? void 0 : _a.separator;
4786
4825
  if (isSeparator) {
4787
- return _tmpl$4$d();
4826
+ return _tmpl$4$e();
4788
4827
  }
4789
4828
  const hasChildren = node.children.length > 0;
4790
4829
  const [showSub, setShowSub] = createSignal(false);
@@ -4819,7 +4858,7 @@ function MenuNode(props) {
4819
4858
  return icon();
4820
4859
  },
4821
4860
  get children() {
4822
- var _el$8 = _tmpl$5$c();
4861
+ var _el$8 = _tmpl$5$d();
4823
4862
  insert(_el$8, createComponent(ToolIcon, {
4824
4863
  get name() {
4825
4864
  return icon();
@@ -4872,10 +4911,10 @@ function MenuNode(props) {
4872
4911
  })();
4873
4912
  }
4874
4913
  delegateEvents(["click"]);
4875
- var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
4914
+ var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
4876
4915
  function TitleBar(props) {
4877
4916
  return (() => {
4878
- var _el$ = _tmpl$$M(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
4917
+ var _el$ = _tmpl$$N(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
4879
4918
  insert(_el$3, () => props.children);
4880
4919
  return _el$;
4881
4920
  })();
@@ -16841,7 +16880,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
16841
16880
  );
16842
16881
  return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
16843
16882
  }
16844
- var _tmpl$$L = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$t = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$b = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
16883
+ var _tmpl$$M = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$d = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$c = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
16845
16884
  function OutlinePanel(props) {
16846
16885
  const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
16847
16886
  const [items, setItems] = createSignal([]);
@@ -16909,13 +16948,13 @@ function OutlinePanel(props) {
16909
16948
  }
16910
16949
  });
16911
16950
  return (() => {
16912
- var _el$ = _tmpl$3$i(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
16951
+ var _el$ = _tmpl$3$j(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
16913
16952
  insert(_el$2, createComponent(Show, {
16914
16953
  get when() {
16915
16954
  return !collapsed();
16916
16955
  },
16917
16956
  get children() {
16918
- var _el$3 = _tmpl$$L();
16957
+ var _el$3 = _tmpl$$M();
16919
16958
  insert(_el$3, () => t("menu.view.outline") || "Outline");
16920
16959
  return _el$3;
16921
16960
  }
@@ -16926,14 +16965,14 @@ function OutlinePanel(props) {
16926
16965
  return !collapsed();
16927
16966
  },
16928
16967
  get children() {
16929
- var _el$6 = _tmpl$2$t();
16968
+ var _el$6 = _tmpl$2$u();
16930
16969
  insert(_el$6, createComponent(Show, {
16931
16970
  get when() {
16932
16971
  return items().length > 0;
16933
16972
  },
16934
16973
  get fallback() {
16935
16974
  return (() => {
16936
- var _el$7 = _tmpl$4$c();
16975
+ var _el$7 = _tmpl$4$d();
16937
16976
  insert(_el$7, () => t("outline.empty"));
16938
16977
  return _el$7;
16939
16978
  })();
@@ -16944,7 +16983,7 @@ function OutlinePanel(props) {
16944
16983
  return items();
16945
16984
  },
16946
16985
  children: (item) => (() => {
16947
- var _el$8 = _tmpl$5$b();
16986
+ var _el$8 = _tmpl$5$c();
16948
16987
  _el$8.$$click = () => props.onNavigate(item.anchor);
16949
16988
  insert(_el$8, () => item.text);
16950
16989
  createRenderEffect((_p$) => {
@@ -16983,7 +17022,7 @@ function OutlinePanel(props) {
16983
17022
  })();
16984
17023
  }
16985
17024
  delegateEvents(["click"]);
16986
- var _tmpl$$K = /* @__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$s = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
17025
+ var _tmpl$$L = /* @__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$t = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
16987
17026
  function ToolbarOverflowManager(props) {
16988
17027
  const [overflowCount, setOverflowCount] = createSignal(0);
16989
17028
  const [menuOpen, setMenuOpen] = createSignal(false);
@@ -17126,7 +17165,7 @@ function ToolbarOverflowManager(props) {
17126
17165
  };
17127
17166
  };
17128
17167
  return (() => {
17129
- var _el$ = _tmpl$$K(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
17168
+ var _el$ = _tmpl$$L(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
17130
17169
  var _ref$ = containerRef;
17131
17170
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
17132
17171
  var _ref$2 = moreMeasureRef;
@@ -17138,7 +17177,7 @@ function ToolbarOverflowManager(props) {
17138
17177
  return items();
17139
17178
  },
17140
17179
  children: (item) => (() => {
17141
- var _el$7 = _tmpl$2$s();
17180
+ var _el$7 = _tmpl$2$t();
17142
17181
  insert(_el$7, item);
17143
17182
  return _el$7;
17144
17183
  })()
@@ -17214,12 +17253,12 @@ function resolveLabel(item, api) {
17214
17253
  if (item.labelKey) return api.t(item.labelKey);
17215
17254
  return void 0;
17216
17255
  }
17217
- var _tmpl$$J = /* @__PURE__ */ template(`<span>`), _tmpl$2$r = /* @__PURE__ */ template(`<button type=button>`);
17256
+ var _tmpl$$K = /* @__PURE__ */ template(`<span>`), _tmpl$2$s = /* @__PURE__ */ template(`<button type=button>`);
17218
17257
  function Button$1(props) {
17219
17258
  const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "aria-label", "class", "classList"]);
17220
17259
  const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
17221
17260
  return (() => {
17222
- var _el$ = _tmpl$2$r();
17261
+ var _el$ = _tmpl$2$s();
17223
17262
  spread(_el$, mergeProps({
17224
17263
  get ["class"]() {
17225
17264
  return `oasis-editor-tool-button ${local.class || ""}`;
@@ -17255,7 +17294,7 @@ function Button$1(props) {
17255
17294
  return local.label;
17256
17295
  },
17257
17296
  get children() {
17258
- var _el$2 = _tmpl$$J();
17297
+ var _el$2 = _tmpl$$K();
17259
17298
  insert(_el$2, () => local.label);
17260
17299
  return _el$2;
17261
17300
  }
@@ -17337,7 +17376,7 @@ function useDismiss(options) {
17337
17376
  });
17338
17377
  });
17339
17378
  }
17340
- var _tmpl$$I = /* @__PURE__ */ template(`<div>`);
17379
+ var _tmpl$$J = /* @__PURE__ */ template(`<div>`);
17341
17380
  function Popover(props) {
17342
17381
  let anchorRef;
17343
17382
  let panelRef;
@@ -17354,7 +17393,7 @@ function Popover(props) {
17354
17393
  closeOnEscape: props.closeOnEscape
17355
17394
  });
17356
17395
  const panel = (portalled) => (() => {
17357
- var _el$ = _tmpl$$I();
17396
+ var _el$ = _tmpl$$J();
17358
17397
  addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
17359
17398
  var _ref$ = panelRef;
17360
17399
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
@@ -17406,12 +17445,12 @@ function Popover(props) {
17406
17445
  }
17407
17446
  })];
17408
17447
  }
17409
- var _tmpl$$H = /* @__PURE__ */ template(`<div>`), _tmpl$2$q = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$h = /* @__PURE__ */ template(`<i>`), _tmpl$4$b = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$a = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$5 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
17448
+ var _tmpl$$I = /* @__PURE__ */ template(`<div>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$i = /* @__PURE__ */ template(`<i>`), _tmpl$4$c = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$b = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$5 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
17410
17449
  function Menu(props) {
17411
17450
  const [open, setOpen] = createSignal(false);
17412
17451
  const ariaLabel = () => props.tooltip || props.label || "";
17413
17452
  return (() => {
17414
- var _el$ = _tmpl$2$q();
17453
+ var _el$ = _tmpl$2$r();
17415
17454
  insert(_el$, createComponent(Popover, {
17416
17455
  get open() {
17417
17456
  return open();
@@ -17434,7 +17473,7 @@ function Menu(props) {
17434
17473
  return props.icon;
17435
17474
  },
17436
17475
  get children() {
17437
- var _el$4 = _tmpl$3$h();
17476
+ var _el$4 = _tmpl$3$i();
17438
17477
  createRenderEffect(() => setAttribute(_el$4, "data-lucide", props.icon));
17439
17478
  return _el$4;
17440
17479
  }
@@ -17444,7 +17483,7 @@ function Menu(props) {
17444
17483
  return props.label;
17445
17484
  },
17446
17485
  get children() {
17447
- var _el$5 = _tmpl$4$b();
17486
+ var _el$5 = _tmpl$4$c();
17448
17487
  insert(_el$5, () => props.label);
17449
17488
  return _el$5;
17450
17489
  }
@@ -17454,7 +17493,7 @@ function Menu(props) {
17454
17493
  return !props.hideChevron;
17455
17494
  },
17456
17495
  get children() {
17457
- return _tmpl$5$a();
17496
+ return _tmpl$5$b();
17458
17497
  }
17459
17498
  }), null);
17460
17499
  createRenderEffect((_p$) => {
@@ -17477,7 +17516,7 @@ function Menu(props) {
17477
17516
  return _el$3;
17478
17517
  })(),
17479
17518
  get children() {
17480
- var _el$2 = _tmpl$$H();
17519
+ var _el$2 = _tmpl$$I();
17481
17520
  _el$2.$$click = (event) => {
17482
17521
  const el = event.target;
17483
17522
  if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
@@ -17492,7 +17531,7 @@ function Menu(props) {
17492
17531
  })();
17493
17532
  }
17494
17533
  delegateEvents(["click"]);
17495
- var _tmpl$$G = /* @__PURE__ */ template(`<select>`);
17534
+ var _tmpl$$H = /* @__PURE__ */ template(`<select>`);
17496
17535
  function Select(props) {
17497
17536
  let selectRef;
17498
17537
  const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value"]);
@@ -17508,7 +17547,7 @@ function Select(props) {
17508
17547
  }
17509
17548
  });
17510
17549
  return (() => {
17511
- var _el$ = _tmpl$$G();
17550
+ var _el$ = _tmpl$$H();
17512
17551
  var _ref$ = selectRef;
17513
17552
  typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
17514
17553
  spread(_el$, mergeProps({
@@ -17535,15 +17574,15 @@ function Select(props) {
17535
17574
  return _el$;
17536
17575
  })();
17537
17576
  }
17538
- var _tmpl$$F = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
17577
+ var _tmpl$$G = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
17539
17578
  function Separator(props) {
17540
17579
  return (() => {
17541
- var _el$ = _tmpl$$F();
17580
+ var _el$ = _tmpl$$G();
17542
17581
  createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
17543
17582
  return _el$;
17544
17583
  })();
17545
17584
  }
17546
- var _tmpl$$E = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu><i data-lucide=chevron-down>`);
17585
+ var _tmpl$$F = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu><i data-lucide=chevron-down>`);
17547
17586
  function SplitButton(props) {
17548
17587
  return createComponent(Popover, {
17549
17588
  get open() {
@@ -17562,7 +17601,7 @@ function SplitButton(props) {
17562
17601
  return props.onPanelMouseLeave;
17563
17602
  },
17564
17603
  trigger: (api) => (() => {
17565
- var _el$ = _tmpl$$E(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
17604
+ var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
17566
17605
  use((el) => api.ref(el), _el$);
17567
17606
  _el$2.$$click = () => props.onMain();
17568
17607
  insert(_el$2, () => props.mainContent);
@@ -17600,7 +17639,7 @@ function SplitButton(props) {
17600
17639
  });
17601
17640
  }
17602
17641
  delegateEvents(["click"]);
17603
- var _tmpl$$D = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$p = /* @__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$g = /* @__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$a = /* @__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$9 = /* @__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$4 = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$8$1 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$0 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
17642
+ var _tmpl$$E = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$q = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch></span><span>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-theme-grid>`), _tmpl$4$b = /* @__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$a = /* @__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$4 = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$8$1 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$0 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
17604
17643
  const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
17605
17644
  function ColorPicker(props) {
17606
17645
  const [isOpen, setIsOpen] = createSignal(false);
@@ -17665,7 +17704,7 @@ function ColorPicker(props) {
17665
17704
  return clearLabel();
17666
17705
  },
17667
17706
  get children() {
17668
- var _el$ = _tmpl$2$p(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
17707
+ var _el$ = _tmpl$2$q(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
17669
17708
  _el$.$$click = () => applyColor(null);
17670
17709
  insert(_el$2, createComponent(Show, {
17671
17710
  get when() {
@@ -17675,7 +17714,7 @@ function ColorPicker(props) {
17675
17714
  return _tmpl$8$1();
17676
17715
  },
17677
17716
  get children() {
17678
- return _tmpl$$D();
17717
+ return _tmpl$$E();
17679
17718
  }
17680
17719
  }));
17681
17720
  insert(_el$4, clearLabel);
@@ -17683,7 +17722,7 @@ function ColorPicker(props) {
17683
17722
  return _el$;
17684
17723
  }
17685
17724
  }), (() => {
17686
- var _el$5 = _tmpl$3$g(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
17725
+ var _el$5 = _tmpl$3$h(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
17687
17726
  insert(_el$6, () => props.themeColorsLabel);
17688
17727
  insert(_el$7, createComponent(For, {
17689
17728
  get each() {
@@ -17723,7 +17762,7 @@ function ColorPicker(props) {
17723
17762
  }));
17724
17763
  return _el$5;
17725
17764
  })(), (() => {
17726
- var _el$8 = _tmpl$4$a(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
17765
+ var _el$8 = _tmpl$4$b(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
17727
17766
  insert(_el$9, () => props.standardColorsLabel);
17728
17767
  insert(_el$0, createComponent(For, {
17729
17768
  get each() {
@@ -17760,7 +17799,7 @@ function ColorPicker(props) {
17760
17799
  },
17761
17800
  get children() {
17762
17801
  return [(() => {
17763
- var _el$1 = _tmpl$5$9(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
17802
+ var _el$1 = _tmpl$5$a(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
17764
17803
  _el$1.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
17765
17804
  insert(_el$11, () => props.moreColorsLabel);
17766
17805
  createRenderEffect(() => setAttribute(_el$1, "data-testid", `${props.testId}-more-colors`));
@@ -17788,7 +17827,7 @@ function ColorPicker(props) {
17788
17827
  });
17789
17828
  }
17790
17829
  delegateEvents(["click", "input"]);
17791
- var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$o = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$9 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$8 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
17830
+ var _tmpl$$D = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$p = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$a = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$9 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
17792
17831
  function GridPicker(props) {
17793
17832
  const [isOpen, setIsOpen] = createSignal(false);
17794
17833
  const [hover, setHover] = createSignal({
@@ -17862,7 +17901,7 @@ function GridPicker(props) {
17862
17901
  return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
17863
17902
  };
17864
17903
  return (() => {
17865
- var _el$ = _tmpl$3$f();
17904
+ var _el$ = _tmpl$3$g();
17866
17905
  insert(_el$, createComponent(Popover, {
17867
17906
  get open() {
17868
17907
  return isOpen();
@@ -17874,7 +17913,7 @@ function GridPicker(props) {
17874
17913
  col: 0
17875
17914
  }),
17876
17915
  trigger: (api) => (() => {
17877
- var _el$4 = _tmpl$4$9(), _el$5 = _el$4.firstChild;
17916
+ var _el$4 = _tmpl$4$a(), _el$5 = _el$4.firstChild;
17878
17917
  _el$4.$$click = () => api.toggle();
17879
17918
  use((el) => api.ref(el), _el$4);
17880
17919
  createRenderEffect((_p$) => {
@@ -17896,11 +17935,11 @@ function GridPicker(props) {
17896
17935
  })(),
17897
17936
  get children() {
17898
17937
  return [(() => {
17899
- var _el$2 = _tmpl$$C();
17938
+ var _el$2 = _tmpl$$D();
17900
17939
  insert(_el$2, statusLabel);
17901
17940
  return _el$2;
17902
17941
  })(), (() => {
17903
- var _el$3 = _tmpl$2$o();
17942
+ var _el$3 = _tmpl$2$p();
17904
17943
  insert(_el$3, createComponent(For, {
17905
17944
  get each() {
17906
17945
  return rows();
@@ -17910,7 +17949,7 @@ function GridPicker(props) {
17910
17949
  return cols();
17911
17950
  },
17912
17951
  children: (c) => (() => {
17913
- var _el$6 = _tmpl$5$8();
17952
+ var _el$6 = _tmpl$5$9();
17914
17953
  _el$6.$$click = () => selectGridSize(r, c);
17915
17954
  _el$6.$$mousedown = (event) => event.preventDefault();
17916
17955
  _el$6.addEventListener("mouseenter", () => setHover({
@@ -18000,7 +18039,7 @@ const DEFAULT_PALETTE = {
18000
18039
  standardColors: STANDARD_COLORS,
18001
18040
  allowCustom: true
18002
18041
  };
18003
- var _tmpl$$B = /* @__PURE__ */ template(`<i>`), _tmpl$2$n = /* @__PURE__ */ template(`<option value>`), _tmpl$3$e = /* @__PURE__ */ template(`<option>`);
18042
+ var _tmpl$$C = /* @__PURE__ */ template(`<i>`), _tmpl$2$o = /* @__PURE__ */ template(`<option value>`), _tmpl$3$f = /* @__PURE__ */ template(`<option>`);
18004
18043
  function renderMenuContent(content, api) {
18005
18044
  if (content.kind === "custom") {
18006
18045
  return content.render(api);
@@ -18132,7 +18171,7 @@ function RenderSplit(props) {
18132
18171
  panelRole: "menu",
18133
18172
  get mainContent() {
18134
18173
  return (() => {
18135
- var _el$ = _tmpl$$B();
18174
+ var _el$ = _tmpl$$C();
18136
18175
  createRenderEffect(() => setAttribute(_el$, "data-lucide", props.item.iconName));
18137
18176
  return _el$;
18138
18177
  })();
@@ -18171,7 +18210,7 @@ function RenderSelect(props) {
18171
18210
  return props.item.placeholder !== void 0;
18172
18211
  },
18173
18212
  get children() {
18174
- var _el$2 = _tmpl$2$n();
18213
+ var _el$2 = _tmpl$2$o();
18175
18214
  insert(_el$2, () => props.item.placeholder);
18176
18215
  return _el$2;
18177
18216
  }
@@ -18180,7 +18219,7 @@ function RenderSelect(props) {
18180
18219
  return props.item.options(props.api);
18181
18220
  },
18182
18221
  children: (option) => (() => {
18183
- var _el$3 = _tmpl$3$e();
18222
+ var _el$3 = _tmpl$3$f();
18184
18223
  insert(_el$3, () => option.label);
18185
18224
  createRenderEffect(() => _el$3.value = option.value);
18186
18225
  return _el$3;
@@ -18303,12 +18342,12 @@ function registerToolbarRenderer(type, component) {
18303
18342
  function resolveRenderer(type) {
18304
18343
  return TOOLBAR_RENDERERS[type] ?? customRenderers.get(type);
18305
18344
  }
18306
- var _tmpl$$A = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
18345
+ var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
18307
18346
  function ToolbarItemRenderer(props) {
18308
18347
  const binding = bindItem(props.item, props.api);
18309
18348
  const component = () => resolveRenderer(props.item.type);
18310
18349
  return (() => {
18311
- var _el$ = _tmpl$$A();
18350
+ var _el$ = _tmpl$$B();
18312
18351
  insert(_el$, createComponent(Show, {
18313
18352
  get when() {
18314
18353
  return component();
@@ -18434,7 +18473,7 @@ function buildRibbonGroups(items, tab) {
18434
18473
  });
18435
18474
  return Array.from(groups.values()).sort((a, b) => a.order - b.order);
18436
18475
  }
18437
- var _tmpl$$z = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$m = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
18476
+ var _tmpl$$A = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$n = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
18438
18477
  function RibbonTabs(props) {
18439
18478
  const tabs = RIBBON_TAB_DEFINITIONS;
18440
18479
  const moveTab = (current, delta) => {
@@ -18443,11 +18482,11 @@ function RibbonTabs(props) {
18443
18482
  if (next) props.setActiveTab(next.id);
18444
18483
  };
18445
18484
  return (() => {
18446
- var _el$ = _tmpl$$z();
18485
+ var _el$ = _tmpl$$A();
18447
18486
  insert(_el$, createComponent(For, {
18448
18487
  each: tabs,
18449
18488
  children: (tab) => (() => {
18450
- var _el$2 = _tmpl$2$m();
18489
+ var _el$2 = _tmpl$2$n();
18451
18490
  _el$2.$$keydown = (event) => {
18452
18491
  if (event.key === "ArrowRight") {
18453
18492
  event.preventDefault();
@@ -18489,10 +18528,10 @@ function RibbonTabs(props) {
18489
18528
  })();
18490
18529
  }
18491
18530
  delegateEvents(["click", "keydown"]);
18492
- var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
18531
+ var _tmpl$$z = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
18493
18532
  function RibbonRow(props) {
18494
18533
  return (() => {
18495
- var _el$ = _tmpl$$y();
18534
+ var _el$ = _tmpl$$z();
18496
18535
  insert(_el$, createComponent(For, {
18497
18536
  get each() {
18498
18537
  return props.items;
@@ -18507,10 +18546,10 @@ function RibbonRow(props) {
18507
18546
  return _el$;
18508
18547
  })();
18509
18548
  }
18510
- var _tmpl$$x = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group><div class=oasis-editor-ribbon-group-rows></div><div class=oasis-editor-ribbon-group-label>`);
18549
+ var _tmpl$$y = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group><div class=oasis-editor-ribbon-group-rows></div><div class=oasis-editor-ribbon-group-label>`);
18511
18550
  function RibbonGroup(props) {
18512
18551
  return (() => {
18513
- var _el$ = _tmpl$$x(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18552
+ var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18514
18553
  insert(_el$2, createComponent(RibbonRow, {
18515
18554
  get items() {
18516
18555
  return props.group.rows[1];
@@ -18540,11 +18579,11 @@ function RibbonGroup(props) {
18540
18579
  return _el$;
18541
18580
  })();
18542
18581
  }
18543
- var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
18582
+ var _tmpl$$x = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
18544
18583
  function RibbonPanel(props) {
18545
18584
  const groups = () => buildRibbonGroups(props.items(), props.activeTab());
18546
18585
  return (() => {
18547
- var _el$ = _tmpl$$w();
18586
+ var _el$ = _tmpl$$x();
18548
18587
  insert(_el$, createComponent(For, {
18549
18588
  get each() {
18550
18589
  return groups();
@@ -18568,7 +18607,7 @@ function RibbonPanel(props) {
18568
18607
  return _el$;
18569
18608
  })();
18570
18609
  }
18571
- var _tmpl$$v = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$l = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
18610
+ var _tmpl$$w = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$m = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
18572
18611
  const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
18573
18612
  function Toolbar(props) {
18574
18613
  const api = createToolbarApi(props.host);
@@ -18598,7 +18637,7 @@ function Toolbar(props) {
18598
18637
  })
18599
18638
  });
18600
18639
  return (() => {
18601
- var _el$ = _tmpl$$v();
18640
+ var _el$ = _tmpl$$w();
18602
18641
  _el$.$$mousedown = (event) => {
18603
18642
  if (shouldAllowNativeMouseDown(event.target)) {
18604
18643
  return;
@@ -18619,7 +18658,7 @@ function Toolbar(props) {
18619
18658
  return renderItems();
18620
18659
  }
18621
18660
  }) : (() => {
18622
- var _el$2 = _tmpl$2$l();
18661
+ var _el$2 = _tmpl$2$m();
18623
18662
  insert(_el$2, renderItems);
18624
18663
  return _el$2;
18625
18664
  })();
@@ -18948,10 +18987,10 @@ function createLayoutIdentityStabilizer() {
18948
18987
  return { pages };
18949
18988
  };
18950
18989
  }
18951
- var _tmpl$$u = /* @__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">`);
18990
+ var _tmpl$$v = /* @__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">`);
18952
18991
  function PageBreak(props) {
18953
18992
  return (() => {
18954
- var _el$ = _tmpl$$u(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18993
+ var _el$ = _tmpl$$v(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18955
18994
  insert(_el$3, () => t("metric.pageBreak") || "Page Break");
18956
18995
  return _el$;
18957
18996
  })();
@@ -19420,7 +19459,7 @@ function createCanvasPageRenderer(options) {
19420
19459
  }
19421
19460
  };
19422
19461
  }
19423
- var _tmpl$$t = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$k = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$d = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`);
19462
+ var _tmpl$$u = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$l = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`);
19424
19463
  const canvasTextMeasurer = {
19425
19464
  composeMeasuredParagraphLines: (options) => domTextMeasurer.composeMeasuredParagraphLines(options),
19426
19465
  resolveRenderedLineHeightPx: (styles, lineHeightMultiple) => domTextMeasurer.resolveRenderedLineHeightPx(styles, lineHeightMultiple)
@@ -19489,7 +19528,7 @@ function CanvasEditorSurface(props) {
19489
19528
  return layout;
19490
19529
  });
19491
19530
  return (() => {
19492
- var _el$ = _tmpl$$t();
19531
+ var _el$ = _tmpl$$u();
19493
19532
  insert(_el$, createComponent(Index, {
19494
19533
  get each() {
19495
19534
  return documentLayout().pages;
@@ -19501,7 +19540,7 @@ function CanvasEditorSurface(props) {
19501
19540
  // inserting an image that triggers re-pagination in a narrow viewport),
19502
19541
  // causing "Failed to execute 'insertBefore'" errors.
19503
19542
  (() => {
19504
- var _el$2 = _tmpl$2$k();
19543
+ var _el$2 = _tmpl$2$l();
19505
19544
  insert(_el$2, createComponent(Show, {
19506
19545
  when: index > 0,
19507
19546
  get children() {
@@ -19574,7 +19613,7 @@ function CanvasPage(props) {
19574
19613
  });
19575
19614
  onCleanup(() => renderer.dispose());
19576
19615
  return (() => {
19577
- var _el$3 = _tmpl$3$d(), _el$4 = _el$3.firstChild;
19616
+ var _el$3 = _tmpl$3$e(), _el$4 = _el$3.firstChild;
19578
19617
  addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
19579
19618
  addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
19580
19619
  addEventListener(_el$3, "click", props.onSurfaceClick, true);
@@ -19911,7 +19950,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
19911
19950
  pushSide(-1);
19912
19951
  return ticks;
19913
19952
  }
19914
- var _tmpl$$s = /* @__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$j = /* @__PURE__ */ template(`<div>`), _tmpl$3$c = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
19953
+ var _tmpl$$t = /* @__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$k = /* @__PURE__ */ template(`<div>`), _tmpl$3$d = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
19915
19954
  function getActivePageSettings(state) {
19916
19955
  var _a;
19917
19956
  const idx = getActiveSectionIndex(state);
@@ -20114,7 +20153,7 @@ function HorizontalRuler(props) {
20114
20153
  }
20115
20154
  };
20116
20155
  return (() => {
20117
- var _el$ = _tmpl$$s(), _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;
20156
+ var _el$ = _tmpl$$t(), _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;
20118
20157
  var _ref$ = pageRef;
20119
20158
  typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
20120
20159
  insert(_el$3, createComponent(For, {
@@ -20122,7 +20161,7 @@ function HorizontalRuler(props) {
20122
20161
  return ticks();
20123
20162
  },
20124
20163
  children: (tick) => [(() => {
20125
- var _el$11 = _tmpl$2$j();
20164
+ var _el$11 = _tmpl$2$k();
20126
20165
  createRenderEffect((_p$) => {
20127
20166
  var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${tick.x}px`;
20128
20167
  _v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
@@ -20134,7 +20173,7 @@ function HorizontalRuler(props) {
20134
20173
  });
20135
20174
  return _el$11;
20136
20175
  })(), memo(() => memo(() => !!tick.label)() && (() => {
20137
- var _el$12 = _tmpl$3$c();
20176
+ var _el$12 = _tmpl$3$d();
20138
20177
  insert(_el$12, () => tick.label);
20139
20178
  createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${tick.x}px`));
20140
20179
  return _el$12;
@@ -20211,10 +20250,10 @@ function HorizontalRuler(props) {
20211
20250
  })();
20212
20251
  }
20213
20252
  delegateEvents(["pointerdown"]);
20214
- var _tmpl$$r = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
20253
+ var _tmpl$$s = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
20215
20254
  function CaretOverlay(props) {
20216
20255
  return (() => {
20217
- var _el$ = _tmpl$$r();
20256
+ var _el$ = _tmpl$$s();
20218
20257
  createRenderEffect((_p$) => {
20219
20258
  var _v$ = !!props.active, _v$2 = {
20220
20259
  left: `${props.left}px`,
@@ -20235,16 +20274,16 @@ function CaretOverlay(props) {
20235
20274
  return _el$;
20236
20275
  })();
20237
20276
  }
20238
- var _tmpl$$q = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$i = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
20277
+ var _tmpl$$r = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$j = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
20239
20278
  function SelectionOverlay(props) {
20240
20279
  return (() => {
20241
- var _el$ = _tmpl$$q();
20280
+ var _el$ = _tmpl$$r();
20242
20281
  insert(_el$, createComponent(Index, {
20243
20282
  get each() {
20244
20283
  return props.boxes;
20245
20284
  },
20246
20285
  children: (box) => (() => {
20247
- var _el$2 = _tmpl$2$i();
20286
+ var _el$2 = _tmpl$2$j();
20248
20287
  createRenderEffect((_p$) => {
20249
20288
  var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
20250
20289
  _v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
@@ -20264,7 +20303,7 @@ function SelectionOverlay(props) {
20264
20303
  return _el$;
20265
20304
  })();
20266
20305
  }
20267
- var _tmpl$$p = /* @__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>`);
20306
+ var _tmpl$$q = /* @__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>`);
20268
20307
  function RevisionOverlay(props) {
20269
20308
  const formattedDate = () => {
20270
20309
  try {
@@ -20275,7 +20314,7 @@ function RevisionOverlay(props) {
20275
20314
  };
20276
20315
  const label = () => props.box.type === "insert" ? "Inserido por" : "Excluído por";
20277
20316
  return (() => {
20278
- var _el$ = _tmpl$$p(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
20317
+ var _el$ = _tmpl$$q(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
20279
20318
  _el$4.nextSibling;
20280
20319
  var _el$7 = _el$3.nextSibling;
20281
20320
  insert(_el$4, label, _el$5);
@@ -20293,6 +20332,111 @@ function RevisionOverlay(props) {
20293
20332
  return _el$;
20294
20333
  })();
20295
20334
  }
20335
+ var _tmpl$$p = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$i = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$c = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$9 = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=oasis-editor-comment-popup data-testid=editor-comment-popup><div class=oasis-editor-comment-popup-header><span class=oasis-editor-comment-popup-author></span></div><div class=oasis-editor-comment-popup-body>`);
20336
+ function CommentHighlightOverlay(props) {
20337
+ const [activeCommentId, setActiveCommentId] = createSignal(null);
20338
+ const activeComment = createMemo(() => {
20339
+ const id = activeCommentId();
20340
+ if (!id) return null;
20341
+ return props.commentsById()[id] ?? null;
20342
+ });
20343
+ const popupAnchor = createMemo(() => {
20344
+ const id = activeCommentId();
20345
+ if (!id) return null;
20346
+ let best = null;
20347
+ for (const box of props.boxes()) {
20348
+ if (box.commentId !== id) continue;
20349
+ if (!best || box.top < best.top) best = box;
20350
+ }
20351
+ return best;
20352
+ });
20353
+ const formattedDate = (date) => {
20354
+ if (date === void 0) return "";
20355
+ try {
20356
+ return new Date(date).toLocaleString();
20357
+ } catch {
20358
+ return "";
20359
+ }
20360
+ };
20361
+ return (() => {
20362
+ var _el$ = _tmpl$$p();
20363
+ insert(_el$, createComponent(For, {
20364
+ get each() {
20365
+ return props.boxes();
20366
+ },
20367
+ children: (box) => (() => {
20368
+ var _el$2 = _tmpl$2$i();
20369
+ _el$2.$$click = () => setActiveCommentId(box.commentId);
20370
+ _el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
20371
+ createRenderEffect((_p$) => {
20372
+ var _v$ = !!(activeCommentId() === box.commentId), _v$2 = box.commentId, _v$3 = `${box.left}px`, _v$4 = `${box.top}px`, _v$5 = `${box.width}px`, _v$6 = `${box.height}px`;
20373
+ _v$ !== _p$.e && _el$2.classList.toggle("oasis-editor-comment-highlight-active", _p$.e = _v$);
20374
+ _v$2 !== _p$.t && setAttribute(_el$2, "data-comment-id", _p$.t = _v$2);
20375
+ _v$3 !== _p$.a && setStyleProperty(_el$2, "left", _p$.a = _v$3);
20376
+ _v$4 !== _p$.o && setStyleProperty(_el$2, "top", _p$.o = _v$4);
20377
+ _v$5 !== _p$.i && setStyleProperty(_el$2, "width", _p$.i = _v$5);
20378
+ _v$6 !== _p$.n && setStyleProperty(_el$2, "height", _p$.n = _v$6);
20379
+ return _p$;
20380
+ }, {
20381
+ e: void 0,
20382
+ t: void 0,
20383
+ a: void 0,
20384
+ o: void 0,
20385
+ i: void 0,
20386
+ n: void 0
20387
+ });
20388
+ return _el$2;
20389
+ })()
20390
+ }), null);
20391
+ insert(_el$, createComponent(Show, {
20392
+ get when() {
20393
+ return memo(() => !!activeComment())() && popupAnchor();
20394
+ },
20395
+ get children() {
20396
+ return (() => {
20397
+ const comment = activeComment();
20398
+ const anchor = popupAnchor();
20399
+ return (() => {
20400
+ var _el$3 = _tmpl$5$8(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
20401
+ _el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
20402
+ insert(_el$5, () => comment.author || "—");
20403
+ insert(_el$4, createComponent(Show, {
20404
+ get when() {
20405
+ return comment.date !== void 0;
20406
+ },
20407
+ get children() {
20408
+ var _el$6 = _tmpl$3$c();
20409
+ insert(_el$6, () => formattedDate(comment.date));
20410
+ return _el$6;
20411
+ }
20412
+ }), null);
20413
+ insert(_el$4, createComponent(Show, {
20414
+ get when() {
20415
+ return comment.resolved;
20416
+ },
20417
+ get children() {
20418
+ return _tmpl$4$9();
20419
+ }
20420
+ }), null);
20421
+ insert(_el$8, () => comment.text);
20422
+ createRenderEffect((_p$) => {
20423
+ var _v$7 = `${anchor.left}px`, _v$8 = `${anchor.top + anchor.height + 6}px`;
20424
+ _v$7 !== _p$.e && setStyleProperty(_el$3, "left", _p$.e = _v$7);
20425
+ _v$8 !== _p$.t && setStyleProperty(_el$3, "top", _p$.t = _v$8);
20426
+ return _p$;
20427
+ }, {
20428
+ e: void 0,
20429
+ t: void 0
20430
+ });
20431
+ return _el$3;
20432
+ })();
20433
+ })();
20434
+ }
20435
+ }), null);
20436
+ return _el$;
20437
+ })();
20438
+ }
20439
+ delegateEvents(["click"]);
20296
20440
  var _tmpl$$o = /* @__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>`);
20297
20441
  function FloatingTableToolbar(props) {
20298
20442
  const host = () => props.host();
@@ -31563,6 +31707,16 @@ function parseBookmarkMarker(element) {
31563
31707
  ...colLast !== void 0 && !Number.isNaN(colLast) ? { colLast } : {}
31564
31708
  };
31565
31709
  }
31710
+ function parseCommentMarker(element) {
31711
+ const docxId = getAttributeValue(element, "id");
31712
+ if (!docxId) {
31713
+ return void 0;
31714
+ }
31715
+ return {
31716
+ kind: element.localName === "commentRangeEnd" ? "end" : "start",
31717
+ docxId
31718
+ };
31719
+ }
31566
31720
  async function parseRunElement(runElement, zip, relsMap, assets, parseNestedBlocks) {
31567
31721
  const textParts = [];
31568
31722
  let image;
@@ -31570,6 +31724,7 @@ async function parseRunElement(runElement, zip, relsMap, assets, parseNestedBloc
31570
31724
  let sym;
31571
31725
  let textLength = 0;
31572
31726
  const innerBookmarks = [];
31727
+ const innerComments = [];
31573
31728
  const pushText = (value) => {
31574
31729
  textParts.push(value);
31575
31730
  textLength += value.length;
@@ -31602,7 +31757,13 @@ async function parseRunElement(runElement, zip, relsMap, assets, parseNestedBloc
31602
31757
  innerBookmarks.push({ offset: textLength, marker });
31603
31758
  }
31604
31759
  continue;
31605
- } else if (element.localName === "proofErr" || element.localName === "commentRangeStart" || element.localName === "commentRangeEnd" || element.localName === "commentReference" || element.localName === "permStart" || element.localName === "permEnd") {
31760
+ } else if (element.localName === "commentRangeStart" || element.localName === "commentRangeEnd") {
31761
+ const marker = parseCommentMarker(element);
31762
+ if (marker) {
31763
+ innerComments.push({ offset: textLength, marker });
31764
+ }
31765
+ continue;
31766
+ } else if (element.localName === "proofErr" || element.localName === "commentReference" || element.localName === "permStart" || element.localName === "permEnd") {
31606
31767
  continue;
31607
31768
  } else if (element.localName === "cr") {
31608
31769
  pushText("\n");
@@ -31653,6 +31814,7 @@ async function parseRunElement(runElement, zip, relsMap, assets, parseNestedBloc
31653
31814
  image,
31654
31815
  ...textBox ? { textBox } : {},
31655
31816
  ...innerBookmarks.length > 0 ? { innerBookmarks } : {},
31817
+ ...innerComments.length > 0 ? { innerComments } : {},
31656
31818
  ...sym ? { sym } : {}
31657
31819
  };
31658
31820
  }
@@ -31750,6 +31912,14 @@ async function parseRunsContainer(container, numberingMaps, zip, relsMap, assets
31750
31912
  runs.push({ text: "", bookmark: marker });
31751
31913
  continue;
31752
31914
  }
31915
+ if (element.localName === "commentRangeStart" || element.localName === "commentRangeEnd") {
31916
+ const marker = parseCommentMarker(element);
31917
+ if (!marker) {
31918
+ continue;
31919
+ }
31920
+ runs.push({ text: "", comment: marker });
31921
+ continue;
31922
+ }
31753
31923
  if (element.localName === "r") {
31754
31924
  const runStyles = parseRunStyle(
31755
31925
  getFirstChildByTagNameNS(element, WORD_NS, "rPr"),
@@ -31825,13 +31995,7 @@ async function parseRunsContainer(container, numberingMaps, zip, relsMap, assets
31825
31995
  });
31826
31996
  continue;
31827
31997
  }
31828
- const { text, image, textBox, innerBookmarks, sym } = await parseRunElement(
31829
- element,
31830
- zip,
31831
- relsMap,
31832
- assets,
31833
- parseNestedBlocks
31834
- );
31998
+ const { text, image, textBox, innerBookmarks, innerComments, sym } = await parseRunElement(element, zip, relsMap, assets, parseNestedBlocks);
31835
31999
  let styles = runStyles;
31836
32000
  if (sym && !(styles == null ? void 0 : styles.fontFamily)) {
31837
32001
  (styles ?? (styles = {})).fontFamily = sym.font;
@@ -31839,14 +32003,25 @@ async function parseRunsContainer(container, numberingMaps, zip, relsMap, assets
31839
32003
  if (inheritedLink) {
31840
32004
  (styles ?? (styles = {})).link = inheritedLink;
31841
32005
  }
31842
- if (innerBookmarks && innerBookmarks.length > 0 && !image && !textBox) {
32006
+ const innerMarkers = [
32007
+ ...(innerBookmarks ?? []).map((m) => ({
32008
+ offset: m.offset,
32009
+ run: { text: "", bookmark: m.marker }
32010
+ })),
32011
+ ...(innerComments ?? []).map((m) => ({
32012
+ offset: m.offset,
32013
+ run: { text: "", comment: m.marker }
32014
+ }))
32015
+ ];
32016
+ if (innerMarkers.length > 0 && !image && !textBox) {
32017
+ innerMarkers.sort((a, b) => a.offset - b.offset);
31843
32018
  let cursor = 0;
31844
- for (const inner of innerBookmarks) {
32019
+ for (const inner of innerMarkers) {
31845
32020
  const segment = text.slice(cursor, inner.offset);
31846
32021
  if (segment.length > 0) {
31847
32022
  runs.push({ text: segment, ...styles ? { styles } : {} });
31848
32023
  }
31849
- runs.push({ text: "", bookmark: inner.marker });
32024
+ runs.push(inner.run);
31850
32025
  cursor = inner.offset;
31851
32026
  }
31852
32027
  const tail = text.slice(cursor);
@@ -32763,6 +32938,9 @@ function createImportedParagraph(runs, paragraphStyle, list, markRunStyle) {
32763
32938
  if (run.bookmark) {
32764
32939
  paragraph.runs[index].__importedBookmark = { ...run.bookmark };
32765
32940
  }
32941
+ if (run.comment) {
32942
+ paragraph.runs[index].__importedComment = { ...run.comment };
32943
+ }
32766
32944
  if (run.sym) {
32767
32945
  paragraph.runs[index].sym = { ...run.sym };
32768
32946
  }
@@ -32781,7 +32959,7 @@ function splitRunsAtPageBreaks(runs) {
32781
32959
  const segments = [[]];
32782
32960
  let hasPageBreak = false;
32783
32961
  const appendRun = (run, text) => {
32784
- if (text.length === 0 && !run.image && !run.textBox && !run.field && !run.fieldChar && run.fieldInstruction === void 0 && !run.bookmark) {
32962
+ if (text.length === 0 && !run.image && !run.textBox && !run.field && !run.fieldChar && run.fieldInstruction === void 0 && !run.bookmark && !run.comment) {
32785
32963
  return;
32786
32964
  }
32787
32965
  segments[segments.length - 1].push({
@@ -32807,7 +32985,7 @@ function splitRunsAtPageBreaks(runs) {
32807
32985
  }
32808
32986
  function paragraphHasVisibleContent(runs) {
32809
32987
  return runs.some(
32810
- (run) => run.image || run.textBox || run.field || run.fieldChar || run.fieldInstruction !== void 0 || run.bookmark || run.text.replace(/\s/g, "").length > 0
32988
+ (run) => run.image || run.textBox || run.field || run.fieldChar || run.fieldInstruction !== void 0 || run.bookmark || run.comment || run.text.replace(/\s/g, "").length > 0
32811
32989
  );
32812
32990
  }
32813
32991
  async function parseParagraphNodes(paragraphNode, numberingMaps, zip, relsMap, assets, theme, inheritedStyle) {
@@ -33125,7 +33303,7 @@ async function parseEndnotesXml(xmlContent, numberingMaps, zip, relsMap, assets,
33125
33303
  };
33126
33304
  }
33127
33305
  const RESERVED_BOOKMARK_NAMES = /* @__PURE__ */ new Set(["_GoBack"]);
33128
- function collectFromBlock(block, out, seqRef) {
33306
+ function collectFromBlock$1(block, out, seqRef) {
33129
33307
  if (block.type === "paragraph") {
33130
33308
  let offset = 0;
33131
33309
  const kept = [];
@@ -33154,7 +33332,7 @@ function collectFromBlock(block, out, seqRef) {
33154
33332
  for (const row of block.rows) {
33155
33333
  for (const cell of row.cells) {
33156
33334
  for (const child of cell.blocks) {
33157
- collectFromBlock(child, out, seqRef);
33335
+ collectFromBlock$1(child, out, seqRef);
33158
33336
  }
33159
33337
  }
33160
33338
  }
@@ -33164,7 +33342,7 @@ function extractBookmarksFromSections(sections) {
33164
33342
  const boundaries = [];
33165
33343
  const seqRef = { value: 0 };
33166
33344
  const visit = (blocks) => {
33167
- blocks == null ? void 0 : blocks.forEach((block) => collectFromBlock(block, boundaries, seqRef));
33345
+ blocks == null ? void 0 : blocks.forEach((block) => collectFromBlock$1(block, boundaries, seqRef));
33168
33346
  };
33169
33347
  for (const section of sections) {
33170
33348
  visit(section.blocks);
@@ -33229,8 +33407,157 @@ function extractBookmarksFromSections(sections) {
33229
33407
  }
33230
33408
  return { items, order };
33231
33409
  }
33410
+ function collectFromBlock(block, out, seqRef) {
33411
+ if (block.type === "paragraph") {
33412
+ let offset = 0;
33413
+ const kept = [];
33414
+ for (const run of block.runs) {
33415
+ const marker = run.__importedComment;
33416
+ if (marker) {
33417
+ out.push({
33418
+ marker,
33419
+ anchor: {
33420
+ paragraphId: block.id,
33421
+ offset,
33422
+ seq: seqRef.value
33423
+ }
33424
+ });
33425
+ seqRef.value += 1;
33426
+ continue;
33427
+ }
33428
+ offset += run.text.length;
33429
+ kept.push(run);
33430
+ }
33431
+ if (kept.length !== block.runs.length) {
33432
+ block.runs = kept.length > 0 ? kept : [createEditorRun("")];
33433
+ }
33434
+ return;
33435
+ }
33436
+ for (const row of block.rows) {
33437
+ for (const cell of row.cells) {
33438
+ for (const child of cell.blocks) {
33439
+ collectFromBlock(child, out, seqRef);
33440
+ }
33441
+ }
33442
+ }
33443
+ }
33444
+ function extractCommentRangesFromSections(sections) {
33445
+ const boundaries = [];
33446
+ const seqRef = { value: 0 };
33447
+ const visit = (blocks) => {
33448
+ blocks == null ? void 0 : blocks.forEach((block) => collectFromBlock(block, boundaries, seqRef));
33449
+ };
33450
+ for (const section of sections) {
33451
+ visit(section.blocks);
33452
+ visit(section.header);
33453
+ visit(section.firstPageHeader);
33454
+ visit(section.evenPageHeader);
33455
+ visit(section.footer);
33456
+ visit(section.firstPageFooter);
33457
+ visit(section.evenPageFooter);
33458
+ }
33459
+ const ranges = /* @__PURE__ */ new Map();
33460
+ for (const { marker, anchor } of boundaries) {
33461
+ const range = ranges.get(marker.docxId) ?? {};
33462
+ if (marker.kind === "start") {
33463
+ range.start = anchor;
33464
+ } else {
33465
+ range.end = anchor;
33466
+ }
33467
+ ranges.set(marker.docxId, range);
33468
+ }
33469
+ return ranges;
33470
+ }
33471
+ const WORD15_NS = "http://schemas.microsoft.com/office/word/2012/wordml";
33472
+ function flattenCommentText(element) {
33473
+ let out = "";
33474
+ for (let index = 0; index < element.childNodes.length; index += 1) {
33475
+ const node = element.childNodes[index];
33476
+ if ((node == null ? void 0 : node.nodeType) !== node.ELEMENT_NODE) {
33477
+ continue;
33478
+ }
33479
+ const child = node;
33480
+ if (child.namespaceURI === WORD_NS) {
33481
+ if (child.localName === "t") {
33482
+ out += child.textContent ?? "";
33483
+ continue;
33484
+ }
33485
+ if (child.localName === "tab") {
33486
+ out += " ";
33487
+ continue;
33488
+ }
33489
+ if (child.localName === "br" || child.localName === "cr") {
33490
+ out += "\n";
33491
+ continue;
33492
+ }
33493
+ }
33494
+ out += flattenCommentText(child);
33495
+ }
33496
+ return out;
33497
+ }
33498
+ function parseDate(value) {
33499
+ if (!value) {
33500
+ return void 0;
33501
+ }
33502
+ const ms = Date.parse(value);
33503
+ return Number.isNaN(ms) ? void 0 : ms;
33504
+ }
33505
+ function parseCommentsExtended(xml) {
33506
+ const done = /* @__PURE__ */ new Map();
33507
+ if (!xml) {
33508
+ return done;
33509
+ }
33510
+ const doc = new DOMParser$1().parseFromString(xml, "application/xml");
33511
+ const root = doc.documentElement;
33512
+ if (!root) {
33513
+ return done;
33514
+ }
33515
+ for (const ex of getChildrenByTagNameNS(root, WORD15_NS, "commentEx")) {
33516
+ const paraId = ex.getAttributeNS(WORD15_NS, "paraId");
33517
+ if (!paraId) {
33518
+ continue;
33519
+ }
33520
+ const isDone = ex.getAttributeNS(WORD15_NS, "done");
33521
+ done.set(paraId, isDone === "1" || isDone === "true");
33522
+ }
33523
+ return done;
33524
+ }
33525
+ function parseCommentsXml(commentsXml, commentsExtendedXml) {
33526
+ const byDocxId = /* @__PURE__ */ new Map();
33527
+ if (!commentsXml) {
33528
+ return byDocxId;
33529
+ }
33530
+ const doc = new DOMParser$1().parseFromString(commentsXml, "application/xml");
33531
+ const root = doc.documentElement;
33532
+ if (!root) {
33533
+ return byDocxId;
33534
+ }
33535
+ const doneByParaId = parseCommentsExtended(commentsExtendedXml);
33536
+ for (const comment of getChildrenByTagNameNS(root, WORD_NS, "comment")) {
33537
+ const docxId = getAttributeValue(comment, "id");
33538
+ if (docxId === null) {
33539
+ continue;
33540
+ }
33541
+ const author = getAttributeValue(comment, "author") ?? "";
33542
+ const initials = getAttributeValue(comment, "initials") ?? void 0;
33543
+ const date = parseDate(getAttributeValue(comment, "date"));
33544
+ const paragraphs = getChildrenByTagNameNS(comment, WORD_NS, "p");
33545
+ const text = paragraphs.map((p) => flattenCommentText(p)).join("\n").trim();
33546
+ const paraId = paragraphs.length > 0 ? getAttributeValue(paragraphs[0], "paraId") ?? void 0 : void 0;
33547
+ const resolved = paraId !== void 0 ? doneByParaId.get(paraId) : void 0;
33548
+ byDocxId.set(docxId, {
33549
+ author,
33550
+ ...initials ? { initials } : {},
33551
+ ...date !== void 0 ? { date } : {},
33552
+ text,
33553
+ ...resolved ? { resolved } : {},
33554
+ ...paraId ? { paraId } : {}
33555
+ });
33556
+ }
33557
+ return byDocxId;
33558
+ }
33232
33559
  async function importDocxToEditorDocument(buffer, options = {}) {
33233
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
33560
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
33234
33561
  (_a = options.onProgress) == null ? void 0 : _a.call(options, "opening-docx");
33235
33562
  const zip = await JSZip.loadAsync(buffer);
33236
33563
  const documentXml = await ((_b = zip.file("word/document.xml")) == null ? void 0 : _b.async("string"));
@@ -33491,6 +33818,11 @@ async function importDocxToEditorDocument(buffer, options = {}) {
33491
33818
  const editorEndnotes = Object.keys(parsedEndnotes.endnotes.items).length > 0 || parsedEndnotes.endnotes.separator || parsedEndnotes.endnotes.continuationSeparator || parsedEndnotes.endnotes.settings ? parsedEndnotes.endnotes : void 0;
33492
33819
  remapImportedEndnoteRefsInSections(sections, parsedEndnotes.byDocxId);
33493
33820
  const editorBookmarks = extractBookmarksFromSections(sections);
33821
+ const commentRanges = extractCommentRangesFromSections(sections);
33822
+ const commentsXml = await ((_l = zip.file("word/comments.xml")) == null ? void 0 : _l.async("string")) ?? null;
33823
+ const commentsExtendedXml = await ((_m = zip.file("word/commentsExtended.xml")) == null ? void 0 : _m.async("string")) ?? null;
33824
+ const commentBodies = parseCommentsXml(commentsXml, commentsExtendedXml);
33825
+ const editorComments = buildEditorComments(commentRanges, commentBodies);
33494
33826
  const shouldPreserveSections = sections.length > 1 || sections.some(
33495
33827
  (section) => {
33496
33828
  var _a2, _b2, _c2, _d2, _e2, _f2;
@@ -33517,6 +33849,9 @@ async function importDocxToEditorDocument(buffer, options = {}) {
33517
33849
  if (editorBookmarks) {
33518
33850
  result.bookmarks = editorBookmarks;
33519
33851
  }
33852
+ if (editorComments) {
33853
+ result.comments = editorComments;
33854
+ }
33520
33855
  return result;
33521
33856
  };
33522
33857
  if (shouldPreserveSections) {
@@ -33546,6 +33881,44 @@ async function importDocxToEditorDocument(buffer, options = {}) {
33546
33881
  }
33547
33882
  return finalize(doc);
33548
33883
  }
33884
+ function buildEditorComments(ranges, bodies) {
33885
+ const docxIds = /* @__PURE__ */ new Set([...ranges.keys(), ...bodies.keys()]);
33886
+ if (docxIds.size === 0) {
33887
+ return void 0;
33888
+ }
33889
+ const sorted = [...docxIds].sort((a, b) => {
33890
+ const na = Number.parseInt(a, 10);
33891
+ const nb = Number.parseInt(b, 10);
33892
+ if (Number.isNaN(na) || Number.isNaN(nb)) {
33893
+ return a.localeCompare(b);
33894
+ }
33895
+ return na - nb;
33896
+ });
33897
+ const items = {};
33898
+ const order = [];
33899
+ for (const docxId of sorted) {
33900
+ const range = ranges.get(docxId);
33901
+ const body = bodies.get(docxId);
33902
+ if (!range && !body) {
33903
+ continue;
33904
+ }
33905
+ const id = createEditorCommentId();
33906
+ const docxIdNum = Number.parseInt(docxId, 10);
33907
+ items[id] = {
33908
+ id,
33909
+ author: (body == null ? void 0 : body.author) ?? "",
33910
+ ...(body == null ? void 0 : body.initials) ? { initials: body.initials } : {},
33911
+ ...(body == null ? void 0 : body.date) !== void 0 ? { date: body.date } : {},
33912
+ ...(body == null ? void 0 : body.resolved) ? { resolved: body.resolved } : {},
33913
+ text: (body == null ? void 0 : body.text) ?? "",
33914
+ ...(range == null ? void 0 : range.start) ? { start: range.start } : {},
33915
+ ...(range == null ? void 0 : range.end) ? { end: range.end } : {},
33916
+ ...Number.isNaN(docxIdNum) ? {} : { docxIdHint: docxIdNum }
33917
+ };
33918
+ order.push(id);
33919
+ }
33920
+ return order.length > 0 ? { items, order } : void 0;
33921
+ }
33549
33922
  function remapImportedFootnoteRefsInSections(sections, byDocxId) {
33550
33923
  var _a, _b, _c, _d, _e, _f;
33551
33924
  const remapBlock = (block) => {
@@ -33636,7 +34009,7 @@ function importDocxInWorker(buffer, options = {}) {
33636
34009
  const worker = new Worker(
33637
34010
  new URL(
33638
34011
  /* @vite-ignore */
33639
- "" + new URL("assets/importDocxWorker-DbiKelzX.js", import.meta.url).href,
34012
+ "" + new URL("assets/importDocxWorker-cjz15bhS.js", import.meta.url).href,
33640
34013
  import.meta.url
33641
34014
  ),
33642
34015
  {
@@ -34415,6 +34788,10 @@ function OasisEditorEditor(props) {
34415
34788
  };
34416
34789
  const selectedImage = createMemo(() => overlays().selectedImageBox());
34417
34790
  const selectedTextBox = createMemo(() => overlays().selectedTextBoxBox());
34791
+ const commentsById = createMemo(() => {
34792
+ var _a;
34793
+ return ((_a = props.state().document.comments) == null ? void 0 : _a.items) ?? {};
34794
+ });
34418
34795
  createEffect(() => {
34419
34796
  statusDocumentLayout();
34420
34797
  queueMicrotask(recomputeViewportPageIndex);
@@ -34530,6 +34907,19 @@ function OasisEditorEditor(props) {
34530
34907
  });
34531
34908
  }
34532
34909
  }), _el$4);
34910
+ insert(_el$3, createComponent(Show, {
34911
+ get when() {
34912
+ return overlays().commentHighlights().length > 0;
34913
+ },
34914
+ get children() {
34915
+ return createComponent(CommentHighlightOverlay, {
34916
+ get boxes() {
34917
+ return overlays().commentHighlights;
34918
+ },
34919
+ commentsById
34920
+ });
34921
+ }
34922
+ }), _el$4);
34533
34923
  insert(_el$3, createComponent(ResizeHandlesOverlay, {
34534
34924
  box: selectedImage,
34535
34925
  get readOnly() {
@@ -36947,13 +37337,26 @@ const RIBBON_PLACEMENTS = {
36947
37337
  "editor-toolbar-superscript": { tab: "home", group: "font", row: 2 },
36948
37338
  "editor-toolbar-subscript": { tab: "home", group: "font", row: 2 },
36949
37339
  "sep-format": { tab: "home", group: "font", row: 2 },
36950
- "editor-toolbar-insert-image": { tab: "insert", group: "illustrations", row: 1 },
36951
- "editor-toolbar-insert-shape": { tab: "insert", group: "illustrations", row: 2 },
37340
+ "editor-toolbar-insert-image": {
37341
+ tab: "insert",
37342
+ group: "illustrations",
37343
+ row: 1
37344
+ },
37345
+ "editor-toolbar-insert-shape": {
37346
+ tab: "insert",
37347
+ group: "illustrations",
37348
+ row: 2
37349
+ },
36952
37350
  "editor-toolbar-insert-table": { tab: "insert", group: "tables", row: 1 },
36953
37351
  "editor-toolbar-link": { tab: "insert", group: "links", row: 1 },
36954
37352
  "editor-toolbar-unlink": { tab: "insert", group: "links", row: 2 },
36955
37353
  "editor-toolbar-footnote": { tab: "references", group: "footnotes", row: 1 },
36956
37354
  "editor-toolbar-image-alt": { tab: "insert", group: "accessibility", row: 2 },
37355
+ "editor-toolbar-image-caption": {
37356
+ tab: "insert",
37357
+ group: "accessibility",
37358
+ row: 1
37359
+ },
36957
37360
  "sep-insert": { tab: "insert", group: "accessibility", row: 2 },
36958
37361
  "editor-toolbar-align-left": { tab: "home", group: "paragraph", row: 2 },
36959
37362
  "editor-toolbar-align-center": { tab: "home", group: "paragraph", row: 2 },
@@ -36964,7 +37367,11 @@ const RIBBON_PLACEMENTS = {
36964
37367
  "editor-toolbar-list-outdent": { tab: "home", group: "paragraph", row: 1 },
36965
37368
  "editor-toolbar-list-indent": { tab: "home", group: "paragraph", row: 1 },
36966
37369
  "editor-toolbar-list-options": { tab: "home", group: "paragraph", row: 1 },
36967
- "editor-toolbar-line-spacing-control": { tab: "home", group: "paragraph", row: 2 },
37370
+ "editor-toolbar-line-spacing-control": {
37371
+ tab: "home",
37372
+ group: "paragraph",
37373
+ row: 2
37374
+ },
36968
37375
  "sep-paragraph": { tab: "home", group: "paragraph", row: 2 },
36969
37376
  "editor-toolbar-metrics": { tab: "layout", group: "paragraph", row: 1 },
36970
37377
  "sep-metrics": { tab: "layout", group: "paragraph", row: 2 },
@@ -37350,6 +37757,15 @@ function createDefaultToolbarPreset() {
37350
37757
  command: "editImageAlt",
37351
37758
  isVisible: (api) => api.commands.state("editImageAlt").isEnabled
37352
37759
  });
37760
+ items.push({
37761
+ type: "button",
37762
+ id: "editor-toolbar-image-caption",
37763
+ testId: "editor-toolbar-image-caption",
37764
+ iconName: "subtitles",
37765
+ tooltipKey: "toolbar.imageCaption",
37766
+ command: "insertImageCaption",
37767
+ isVisible: (api) => api.commands.state("insertImageCaption").isEnabled
37768
+ });
37353
37769
  items.push({ type: "separator", id: "sep-insert" });
37354
37770
  for (const button of ALIGN_BUTTONS) {
37355
37771
  items.push({
@@ -37447,6 +37863,7 @@ const OASIS_TOOLBAR_ITEMS = {
37447
37863
  unlink: "editor-toolbar-unlink",
37448
37864
  footnote: "editor-toolbar-footnote",
37449
37865
  imageAlt: "editor-toolbar-image-alt",
37866
+ imageCaption: "editor-toolbar-image-caption",
37450
37867
  alignLeft: "editor-toolbar-align-left",
37451
37868
  alignCenter: "editor-toolbar-align-center",
37452
37869
  alignRight: "editor-toolbar-align-right",
@@ -37478,6 +37895,7 @@ const OASIS_MENU_ITEMS = {
37478
37895
  viewParagraphMarks: "view_paragraph_marks",
37479
37896
  viewPreciseFonts: "view_precise_fonts",
37480
37897
  insertImage: "insert_image",
37898
+ insertImageCaption: "insert_image_caption",
37481
37899
  insertTable: "insert_table",
37482
37900
  insertLink: "insert_link",
37483
37901
  insertFootnote: "insert_footnote",
@@ -37497,200 +37915,201 @@ const OASIS_MENU_ITEMS = {
37497
37915
  formatListsNumbered: "format_lists_numbered"
37498
37916
  };
37499
37917
  export {
37500
- buildCanvasTableLayout as $,
37501
- renumberFootnotes as A,
37502
- iterateFootnoteReferenceRuns as B,
37503
- getFootnoteDisplayMarker as C,
37504
- createSignal as D,
37505
- createEffect as E,
37506
- onCleanup as F,
37507
- buildCanvasLayoutSnapshot as G,
37508
- on as H,
37509
- onMount as I,
37510
- debounce as J,
37511
- unwrap as K,
37512
- getDocumentParagraphs as L,
37513
- getDocumentSectionsCanonical as M,
37514
- createEditorDocument as N,
37515
- getPageContentWidth as O,
37516
- getDocumentPageSettings as P,
37517
- getTableCellContentWidthForParagraph as Q,
37518
- resolveResizedDimensions as R,
37519
- resolveTextBoxRenderHeight as S,
37520
- resolveEffectiveParagraphStyle as T,
37521
- resolveEffectiveTextStyleForParagraph as U,
37522
- iterateEndnoteReferenceRuns as V,
37523
- JSZip as W,
37524
- imageContentTypeDefaults as X,
37525
- imageExtensionFromMime as Y,
37526
- pxToPt as Z,
37527
- buildSegmentTable as _,
37528
- createEditorStyledRun as a,
37529
- createRenderEffect as a$,
37530
- resolveFloatingObjectRect as a0,
37531
- getTextBoxFloatingGeometry as a1,
37532
- getPresetPathSegments as a2,
37533
- projectBlocksLayout as a3,
37534
- textStyleToFontSizePt as a4,
37535
- PX_PER_POINT$2 as a5,
37536
- DEFAULT_FONT_SIZE_PX as a6,
37537
- isDoubleUnderlineStyle as a7,
37538
- isWavyUnderlineStyle as a8,
37539
- underlineStyleLineWidthPx as a9,
37540
- listKindForTag as aA,
37541
- isParagraphTag as aB,
37542
- collectInlineRuns as aC,
37543
- parseParagraphStyle as aD,
37544
- t as aE,
37545
- preciseFontModeVersion as aF,
37546
- isPreciseFontModeEnabled as aG,
37547
- togglePreciseFontMode as aH,
37548
- nextFontSizePt as aI,
37549
- previousFontSizePt as aJ,
37550
- fontSizePtToPx as aK,
37551
- createDefaultToolbarPreset as aL,
37552
- defaultMenuItems as aM,
37553
- MenuRegistry as aN,
37554
- createToolbarRegistry as aO,
37555
- Editor as aP,
37556
- resolveCommandRef as aQ,
37557
- commandRefName as aR,
37558
- InlineShell as aS,
37559
- BalloonShell as aT,
37560
- DocumentShell as aU,
37561
- createMemo as aV,
37562
- getCaretRectFromSnapshot as aW,
37563
- getParagraphRectFromSnapshot as aX,
37564
- createComponent as aY,
37565
- CaretOverlay as aZ,
37566
- Show as a_,
37567
- underlineStyleDashArray as aa,
37568
- getListLabelInset as ab,
37569
- getParagraphBorderInsets as ac,
37570
- normalizeFamily as ad,
37571
- ROBOTO_FONT_FILES as ae,
37572
- loadFontAsset as af,
37573
- OFFICE_COMPAT_FONT_FAMILIES as ag,
37574
- buildSfnt as ah,
37575
- defaultFontDecoderRegistry as ai,
37576
- SfntFontProgram as aj,
37577
- collectPdfFontFamilies as ak,
37578
- projectDocumentLayout as al,
37579
- getPageHeaderZoneTop as am,
37580
- getPageBodyTop as an,
37581
- findFootnoteReference as ao,
37582
- FOOTNOTE_MARKER_GUTTER_PX as ap,
37583
- resolveImporterForFile as aq,
37584
- createEditorStateFromDocument as ar,
37585
- getDocumentParagraphsCanonical as as,
37586
- getToolbarStyleState as at,
37587
- STANDARD_FONT_SIZES_PT as au,
37588
- fontSizePxToPt as av,
37589
- probeLocalFontFamilies as aw,
37590
- createInitialEditorState as ax,
37591
- parseFontSizePtToPx as ay,
37592
- formatFontSizePt as az,
37593
- getParagraphLength as b,
37594
- Select as b$,
37595
- style as b0,
37596
- setAttribute as b1,
37597
- setStyleProperty as b2,
37598
- memo as b3,
37599
- template as b4,
37600
- insert as b5,
37601
- use as b6,
37602
- addEventListener as b7,
37603
- Dialog as b8,
37604
- delegateEvents as b9,
37605
- getWelcomeSeen as bA,
37606
- isLocalFontAccessSupported as bB,
37607
- EDITOR_SCROLL_PADDING_PX as bC,
37608
- Toolbar as bD,
37609
- OasisEditorLoading as bE,
37610
- createEditorLogger as bF,
37611
- getCachedCanvasImage as bG,
37612
- registerDomStatsSurface as bH,
37613
- Button as bI,
37614
- Checkbox as bJ,
37615
- ColorPicker as bK,
37616
- CommandRegistry as bL,
37617
- DEFAULT_PALETTE as bM,
37618
- DialogFooter as bN,
37619
- FloatingActionButton as bO,
37620
- GridPicker as bP,
37621
- IconButton as bQ,
37622
- Menu as bR,
37623
- OASIS_BUILTIN_COMMANDS as bS,
37624
- OASIS_MENU_ITEMS as bT,
37625
- OASIS_TOOLBAR_ITEMS as bU,
37626
- OasisEditorAppLazy as bV,
37627
- OasisEditorContainer as bW,
37628
- PluginCollection as bX,
37629
- Popover as bY,
37630
- RIBBON_TABS as bZ,
37631
- RIBBON_TAB_DEFINITIONS as b_,
37632
- className as ba,
37633
- For as bb,
37634
- UNDERLINE_STYLE_OPTIONS as bc,
37635
- Tabs as bd,
37636
- measureParagraphMinContentWidthPx as be,
37637
- getEditableBlocksForZone as bf,
37638
- findParagraphLocation as bg,
37639
- createSectionBoundaryParagraph as bh,
37640
- normalizePageSettings as bi,
37641
- DEFAULT_EDITOR_PAGE_SETTINGS as bj,
37642
- markStart as bk,
37643
- markEnd as bl,
37644
- getParagraphEntries as bm,
37645
- getParagraphById as bn,
37646
- PluginUiHost as bo,
37647
- OasisEditorEditor as bp,
37648
- perfTimer as bq,
37649
- OasisBrandMark as br,
37650
- setPreciseFontPreference as bs,
37651
- setWelcomeSeen as bt,
37652
- enablePreciseFontMode as bu,
37653
- createOasisEditorClient as bv,
37654
- setLocale as bw,
37655
- startLongTaskObserver as bx,
37656
- installGlobalReport as by,
37657
- applyStoredPreciseFontPreference as bz,
37918
+ buildSegmentTable as $,
37919
+ createFootnoteReferenceRun as A,
37920
+ renumberFootnotes as B,
37921
+ iterateFootnoteReferenceRuns as C,
37922
+ getFootnoteDisplayMarker as D,
37923
+ createSignal as E,
37924
+ createEffect as F,
37925
+ onCleanup as G,
37926
+ buildCanvasLayoutSnapshot as H,
37927
+ on as I,
37928
+ onMount as J,
37929
+ debounce as K,
37930
+ unwrap as L,
37931
+ getDocumentParagraphs as M,
37932
+ getDocumentSectionsCanonical as N,
37933
+ createEditorDocument as O,
37934
+ getPageContentWidth as P,
37935
+ getDocumentPageSettings as Q,
37936
+ getTableCellContentWidthForParagraph as R,
37937
+ resolveResizedDimensions as S,
37938
+ resolveTextBoxRenderHeight as T,
37939
+ resolveEffectiveParagraphStyle as U,
37940
+ resolveEffectiveTextStyleForParagraph as V,
37941
+ iterateEndnoteReferenceRuns as W,
37942
+ JSZip as X,
37943
+ imageContentTypeDefaults as Y,
37944
+ imageExtensionFromMime as Z,
37945
+ pxToPt as _,
37946
+ getParagraphLength as a,
37947
+ Show as a$,
37948
+ buildCanvasTableLayout as a0,
37949
+ resolveFloatingObjectRect as a1,
37950
+ getTextBoxFloatingGeometry as a2,
37951
+ getPresetPathSegments as a3,
37952
+ projectBlocksLayout as a4,
37953
+ textStyleToFontSizePt as a5,
37954
+ PX_PER_POINT$2 as a6,
37955
+ DEFAULT_FONT_SIZE_PX as a7,
37956
+ isDoubleUnderlineStyle as a8,
37957
+ isWavyUnderlineStyle as a9,
37958
+ formatFontSizePt as aA,
37959
+ listKindForTag as aB,
37960
+ isParagraphTag as aC,
37961
+ collectInlineRuns as aD,
37962
+ parseParagraphStyle as aE,
37963
+ t as aF,
37964
+ preciseFontModeVersion as aG,
37965
+ isPreciseFontModeEnabled as aH,
37966
+ togglePreciseFontMode as aI,
37967
+ nextFontSizePt as aJ,
37968
+ previousFontSizePt as aK,
37969
+ fontSizePtToPx as aL,
37970
+ createDefaultToolbarPreset as aM,
37971
+ defaultMenuItems as aN,
37972
+ MenuRegistry as aO,
37973
+ createToolbarRegistry as aP,
37974
+ Editor as aQ,
37975
+ resolveCommandRef as aR,
37976
+ commandRefName as aS,
37977
+ InlineShell as aT,
37978
+ BalloonShell as aU,
37979
+ DocumentShell as aV,
37980
+ createMemo as aW,
37981
+ getCaretRectFromSnapshot as aX,
37982
+ getParagraphRectFromSnapshot as aY,
37983
+ createComponent as aZ,
37984
+ CaretOverlay as a_,
37985
+ underlineStyleLineWidthPx as aa,
37986
+ underlineStyleDashArray as ab,
37987
+ getListLabelInset as ac,
37988
+ getParagraphBorderInsets as ad,
37989
+ normalizeFamily as ae,
37990
+ ROBOTO_FONT_FILES as af,
37991
+ loadFontAsset as ag,
37992
+ OFFICE_COMPAT_FONT_FAMILIES as ah,
37993
+ buildSfnt as ai,
37994
+ defaultFontDecoderRegistry as aj,
37995
+ SfntFontProgram as ak,
37996
+ collectPdfFontFamilies as al,
37997
+ projectDocumentLayout as am,
37998
+ getPageHeaderZoneTop as an,
37999
+ getPageBodyTop as ao,
38000
+ findFootnoteReference as ap,
38001
+ FOOTNOTE_MARKER_GUTTER_PX as aq,
38002
+ resolveImporterForFile as ar,
38003
+ createEditorStateFromDocument as as,
38004
+ getDocumentParagraphsCanonical as at,
38005
+ getToolbarStyleState as au,
38006
+ STANDARD_FONT_SIZES_PT as av,
38007
+ fontSizePxToPt as aw,
38008
+ probeLocalFontFamilies as ax,
38009
+ createInitialEditorState as ay,
38010
+ parseFontSizePtToPx as az,
38011
+ createEditorRun as b,
38012
+ RIBBON_TAB_DEFINITIONS as b$,
38013
+ createRenderEffect as b0,
38014
+ style as b1,
38015
+ setAttribute as b2,
38016
+ setStyleProperty as b3,
38017
+ memo as b4,
38018
+ template as b5,
38019
+ insert as b6,
38020
+ use as b7,
38021
+ addEventListener as b8,
38022
+ Dialog as b9,
38023
+ applyStoredPreciseFontPreference as bA,
38024
+ getWelcomeSeen as bB,
38025
+ isLocalFontAccessSupported as bC,
38026
+ EDITOR_SCROLL_PADDING_PX as bD,
38027
+ Toolbar as bE,
38028
+ OasisEditorLoading as bF,
38029
+ createEditorLogger as bG,
38030
+ getCachedCanvasImage as bH,
38031
+ registerDomStatsSurface as bI,
38032
+ Button as bJ,
38033
+ Checkbox as bK,
38034
+ ColorPicker as bL,
38035
+ CommandRegistry as bM,
38036
+ DEFAULT_PALETTE as bN,
38037
+ DialogFooter as bO,
38038
+ FloatingActionButton as bP,
38039
+ GridPicker as bQ,
38040
+ IconButton as bR,
38041
+ Menu as bS,
38042
+ OASIS_BUILTIN_COMMANDS as bT,
38043
+ OASIS_MENU_ITEMS as bU,
38044
+ OASIS_TOOLBAR_ITEMS as bV,
38045
+ OasisEditorAppLazy as bW,
38046
+ OasisEditorContainer as bX,
38047
+ PluginCollection as bY,
38048
+ Popover as bZ,
38049
+ RIBBON_TABS as b_,
38050
+ delegateEvents as ba,
38051
+ className as bb,
38052
+ For as bc,
38053
+ UNDERLINE_STYLE_OPTIONS as bd,
38054
+ Tabs as be,
38055
+ measureParagraphMinContentWidthPx as bf,
38056
+ getEditableBlocksForZone as bg,
38057
+ findParagraphLocation as bh,
38058
+ createSectionBoundaryParagraph as bi,
38059
+ normalizePageSettings as bj,
38060
+ DEFAULT_EDITOR_PAGE_SETTINGS as bk,
38061
+ markStart as bl,
38062
+ markEnd as bm,
38063
+ getParagraphEntries as bn,
38064
+ getParagraphById as bo,
38065
+ PluginUiHost as bp,
38066
+ OasisEditorEditor as bq,
38067
+ perfTimer as br,
38068
+ OasisBrandMark as bs,
38069
+ setPreciseFontPreference as bt,
38070
+ setWelcomeSeen as bu,
38071
+ enablePreciseFontMode as bv,
38072
+ createOasisEditorClient as bw,
38073
+ setLocale as bx,
38074
+ startLongTaskObserver as by,
38075
+ installGlobalReport as bz,
37658
38076
  createEditorParagraphFromRuns as c,
37659
- SelectField as c0,
37660
- Separator as c1,
37661
- SidePanel as c2,
37662
- SidePanelBody as c3,
37663
- SidePanelFooter as c4,
37664
- SidePanelHeader as c5,
37665
- SplitButton as c6,
37666
- TextField as c7,
37667
- Button$1 as c8,
37668
- createEditorCommandBus as c9,
37669
- createOasisEditor as ca,
37670
- createOasisEditorContainer as cb,
37671
- mount as cc,
37672
- registerToolbarRenderer as cd,
37673
- getParagraphText as d,
37674
- getActiveZone as e,
37675
- getDocumentSections as f,
38077
+ Select as c0,
38078
+ SelectField as c1,
38079
+ Separator as c2,
38080
+ SidePanel as c3,
38081
+ SidePanelBody as c4,
38082
+ SidePanelFooter as c5,
38083
+ SidePanelHeader as c6,
38084
+ SplitButton as c7,
38085
+ TextField as c8,
38086
+ Button$1 as c9,
38087
+ createEditorCommandBus as ca,
38088
+ createOasisEditor as cb,
38089
+ createOasisEditorContainer as cc,
38090
+ mount as cd,
38091
+ registerToolbarRenderer as ce,
38092
+ getDocumentSections as d,
38093
+ createEditorStyledRun as e,
38094
+ getParagraphText as f,
37676
38095
  getParagraphs as g,
37677
- getActiveSectionIndex as h,
37678
- paragraphOffsetToPosition as i,
37679
- clampPosition as j,
37680
- findParagraphIndex as k,
37681
- createCollapsedSelection as l,
37682
- isSelectionCollapsed as m,
38096
+ getActiveZone as h,
38097
+ getActiveSectionIndex as i,
38098
+ paragraphOffsetToPosition as j,
38099
+ clampPosition as k,
38100
+ findParagraphIndex as l,
38101
+ createCollapsedSelection as m,
37683
38102
  normalizeSelection as n,
37684
- createEditorParagraph as o,
38103
+ isSelectionCollapsed as o,
37685
38104
  positionToParagraphOffset as p,
37686
- getBlockParagraphs as q,
37687
- findParagraphTableLocation as r,
37688
- buildTableCellLayout as s,
37689
- createEditorTableCell as t,
37690
- createEditorTable as u,
37691
- createEditorTableRow as v,
37692
- underlineStyleToCssDecorationStyle as w,
37693
- resolveImageSrc as x,
37694
- createEditorFootnote as y,
37695
- createFootnoteReferenceRun as z
38105
+ createEditorParagraph as q,
38106
+ getBlockParagraphs as r,
38107
+ findParagraphTableLocation as s,
38108
+ buildTableCellLayout as t,
38109
+ createEditorTableCell as u,
38110
+ createEditorTable as v,
38111
+ createEditorTableRow as w,
38112
+ underlineStyleToCssDecorationStyle as x,
38113
+ resolveImageSrc as y,
38114
+ createEditorFootnote as z
37696
38115
  };