oasis-editor 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1568,8 +1568,19 @@ const en = {
1568
1568
  "section.pageSetup": "Page Setup",
1569
1569
  "section.toggleOrientation": "Toggle Orientation",
1570
1570
  "section.margins": "Margins",
1571
- "section.marginsNormal": "Normal Margins",
1572
- "section.marginsNarrow": "Narrow Margins",
1571
+ "section.marginPreset.normal": "Normal",
1572
+ "section.marginPreset.narrow": "Narrow",
1573
+ "section.marginPreset.moderate": "Moderate",
1574
+ "section.marginPreset.wide": "Wide",
1575
+ "section.marginPreset.mirrored": "Mirrored",
1576
+ "section.marginPreset.custom": "Custom Margins…",
1577
+ "section.marginField.top": "Top:",
1578
+ "section.marginField.bottom": "Bottom:",
1579
+ "section.marginField.left": "Left:",
1580
+ "section.marginField.right": "Right:",
1581
+ "section.marginValue": "{0} cm",
1582
+ "section.marginApply": "Apply",
1583
+ "number.decimalSeparator": ".",
1573
1584
  "section.secNext": "Sec Next",
1574
1585
  "section.secNextTooltip": "Insert Section Break (Next Page)",
1575
1586
  "section.secCont": "Sec Cont",
@@ -2013,8 +2024,19 @@ const ptBR = {
2013
2024
  "section.pageSetup": "Configurações de Página",
2014
2025
  "section.toggleOrientation": "Alternar Orientação",
2015
2026
  "section.margins": "Margens",
2016
- "section.marginsNormal": "Margens Normais",
2017
- "section.marginsNarrow": "Margens Estreitas",
2027
+ "section.marginPreset.normal": "Normal",
2028
+ "section.marginPreset.narrow": "Estreita",
2029
+ "section.marginPreset.moderate": "Moderada",
2030
+ "section.marginPreset.wide": "Larga",
2031
+ "section.marginPreset.mirrored": "Espelhada",
2032
+ "section.marginPreset.custom": "Margens Personalizadas…",
2033
+ "section.marginField.top": "Sup.:",
2034
+ "section.marginField.bottom": "Inf.:",
2035
+ "section.marginField.left": "Esq.:",
2036
+ "section.marginField.right": "Dir.:",
2037
+ "section.marginValue": "{0} cm",
2038
+ "section.marginApply": "Aplicar",
2039
+ "number.decimalSeparator": ",",
2018
2040
  "section.secNext": "Próx Seç",
2019
2041
  "section.secNextTooltip": "Inserir Quebra de Seção (Próxima Página)",
2020
2042
  "section.secCont": "Seç Cont",
@@ -2320,14 +2342,14 @@ function t(key, params = []) {
2320
2342
  return template2;
2321
2343
  }
2322
2344
  const oasisMarkBase64 = "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";
2323
- var _tmpl$$R = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2345
+ var _tmpl$$S = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
2324
2346
  const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
2325
2347
  const MARK_ASPECT = 3 / 4;
2326
2348
  function OasisBrandMark(props) {
2327
2349
  const height = () => props.height ?? 64;
2328
2350
  const width = () => Math.round(height() * MARK_ASPECT);
2329
2351
  return (() => {
2330
- var _el$ = _tmpl$$R();
2352
+ var _el$ = _tmpl$$S();
2331
2353
  setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
2332
2354
  setAttribute(_el$, "draggable", false);
2333
2355
  createRenderEffect((_p$) => {
@@ -2344,7 +2366,7 @@ function OasisBrandMark(props) {
2344
2366
  return _el$;
2345
2367
  })();
2346
2368
  }
2347
- var _tmpl$$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`);
2369
+ var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$y = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$m = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
2348
2370
  function OasisEditorLoading(props) {
2349
2371
  const variant = () => props.variant ?? "overlay";
2350
2372
  const pct = () => {
@@ -2353,7 +2375,7 @@ function OasisEditorLoading(props) {
2353
2375
  };
2354
2376
  const isDone = () => (pct() ?? 0) >= 100;
2355
2377
  return (() => {
2356
- var _el$ = _tmpl$2$x(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2378
+ var _el$ = _tmpl$2$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
2357
2379
  insert(_el$2, createComponent(OasisBrandMark, {
2358
2380
  height: 40,
2359
2381
  "class": "oasis-editor-loading-mark"
@@ -2364,10 +2386,10 @@ function OasisEditorLoading(props) {
2364
2386
  return pct() != null;
2365
2387
  },
2366
2388
  get children() {
2367
- var _el$6 = _tmpl$$Q();
2389
+ var _el$6 = _tmpl$$R();
2368
2390
  insert(_el$6, (() => {
2369
2391
  var _c$ = memo(() => !!isDone());
2370
- return () => _c$() ? _tmpl$3$l() : `${pct()}%`;
2392
+ return () => _c$() ? _tmpl$3$m() : `${pct()}%`;
2371
2393
  })());
2372
2394
  return _el$6;
2373
2395
  }
@@ -2416,7 +2438,7 @@ function OasisEditorAppLazy(props = {}) {
2416
2438
  onCleanup(() => {
2417
2439
  cancelled = true;
2418
2440
  });
2419
- import("./OasisEditorApp-Cwoo0WV0.js").then((m) => {
2441
+ import("./OasisEditorApp-YuR1PFAE.js").then((m) => {
2420
2442
  cancelled = true;
2421
2443
  setProgress(1);
2422
2444
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -3032,7 +3054,8 @@ function normalizePageSettings(pageSettings) {
3032
3054
  header: pageSettings.margins.header,
3033
3055
  footer: pageSettings.margins.footer,
3034
3056
  gutter: pageSettings.margins.gutter
3035
- }
3057
+ },
3058
+ ...pageSettings.columns ? { columns: pageSettings.columns } : {}
3036
3059
  };
3037
3060
  }
3038
3061
  function getDocumentPageSettings(document2) {
@@ -3049,7 +3072,8 @@ function getDocumentPageSettings(document2) {
3049
3072
  header: (pageSettings == null ? void 0 : pageSettings.margins.header) ?? DEFAULT_EDITOR_PAGE_SETTINGS.margins.header,
3050
3073
  footer: (pageSettings == null ? void 0 : pageSettings.margins.footer) ?? DEFAULT_EDITOR_PAGE_SETTINGS.margins.footer,
3051
3074
  gutter: (pageSettings == null ? void 0 : pageSettings.margins.gutter) ?? DEFAULT_EDITOR_PAGE_SETTINGS.margins.gutter
3052
- }
3075
+ },
3076
+ ...(pageSettings == null ? void 0 : pageSettings.columns) ? { columns: pageSettings.columns } : {}
3053
3077
  });
3054
3078
  }
3055
3079
  function getPageContentWidth(pageSettings) {
@@ -3060,6 +3084,37 @@ function getPageContentWidth(pageSettings) {
3060
3084
  )
3061
3085
  );
3062
3086
  }
3087
+ function getPageColumnRects(pageSettings) {
3088
+ var _a;
3089
+ const contentLeft = pageSettings.margins.left + pageSettings.margins.gutter;
3090
+ const contentWidth = getPageContentWidth(pageSettings);
3091
+ const columns = pageSettings.columns;
3092
+ const count = (columns == null ? void 0 : columns.count) ?? 1;
3093
+ if (!columns || count <= 1) {
3094
+ return [{ left: contentLeft, width: contentWidth }];
3095
+ }
3096
+ if (columns.equalWidth === false && ((_a = columns.columns) == null ? void 0 : _a.length)) {
3097
+ const rects2 = [];
3098
+ let cursor = contentLeft;
3099
+ for (let i = 0; i < count; i += 1) {
3100
+ const col = columns.columns[i];
3101
+ const width = Math.max(1, (col == null ? void 0 : col.width) ?? 0);
3102
+ rects2.push({ left: cursor, width });
3103
+ cursor += width + ((col == null ? void 0 : col.space) ?? columns.space);
3104
+ }
3105
+ return rects2;
3106
+ }
3107
+ const space = columns.space;
3108
+ const colWidth = Math.max(
3109
+ 1,
3110
+ Math.floor((contentWidth - space * (count - 1)) / count)
3111
+ );
3112
+ const rects = [];
3113
+ for (let i = 0; i < count; i += 1) {
3114
+ rects.push({ left: contentLeft + i * (colWidth + space), width: colWidth });
3115
+ }
3116
+ return rects;
3117
+ }
3063
3118
  function clampPageOffset(value, limit) {
3064
3119
  if (!Number.isFinite(value)) {
3065
3120
  return 0;
@@ -3779,7 +3834,8 @@ function createEditorDocument(blocks, pageSettings, sections, styles, metadata,
3779
3834
  width: pageSettings.width,
3780
3835
  height: pageSettings.height,
3781
3836
  orientation: pageSettings.orientation,
3782
- margins: { ...pageSettings.margins }
3837
+ margins: { ...pageSettings.margins },
3838
+ ...pageSettings.columns ? { columns: pageSettings.columns } : {}
3783
3839
  } : {
3784
3840
  width: DEFAULT_EDITOR_PAGE_SETTINGS.width,
3785
3841
  height: DEFAULT_EDITOR_PAGE_SETTINGS.height,
@@ -4455,9 +4511,9 @@ class MenuRegistry {
4455
4511
  }
4456
4512
  }
4457
4513
  const defaultMenuRegistry = new MenuRegistry();
4458
- 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(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"aria-hidden=true><g fill=currentColor><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25>`), _tmpl$3$k = /* @__PURE__ */ template(`<i>`);
4459
- const FootnoteIcon = () => _tmpl$$P();
4460
- const SpecialIndentFirstLineIcon = () => _tmpl$2$w();
4514
+ var _tmpl$$Q = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$x = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"aria-hidden=true><g fill=currentColor><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25>`), _tmpl$3$l = /* @__PURE__ */ template(`<i>`);
4515
+ const FootnoteIcon = () => _tmpl$$Q();
4516
+ const SpecialIndentFirstLineIcon = () => _tmpl$2$x();
4461
4517
  const CUSTOM_ICONS = {
4462
4518
  footnote: FootnoteIcon,
4463
4519
  specialIndentFirstLine: SpecialIndentFirstLineIcon
@@ -4472,7 +4528,7 @@ function ToolIcon(props) {
4472
4528
  },
4473
4529
  get fallback() {
4474
4530
  return (() => {
4475
- var _el$3 = _tmpl$3$k();
4531
+ var _el$3 = _tmpl$3$l();
4476
4532
  createRenderEffect(() => setAttribute(_el$3, "data-lucide", props.name));
4477
4533
  return _el$3;
4478
4534
  })();
@@ -4822,7 +4878,7 @@ const defaultMenuItems = [
4822
4878
  }
4823
4879
  ];
4824
4880
  defaultMenuItems.forEach((item) => defaultMenuRegistry.register(item));
4825
- 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$j = /* @__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>`);
4881
+ var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$f = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$e = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$7 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
4826
4882
  function Menubar(props) {
4827
4883
  const [activeMenu, setActiveMenu] = createSignal(null);
4828
4884
  const menuItems = () => (props.registry ?? defaultMenuRegistry).getItems();
@@ -4889,13 +4945,13 @@ function Menubar(props) {
4889
4945
  });
4890
4946
  const topLevelItems = () => pruneTree(menuTree());
4891
4947
  return (() => {
4892
- var _el$ = _tmpl$$O();
4948
+ var _el$ = _tmpl$$P();
4893
4949
  insert(_el$, createComponent(For, {
4894
4950
  get each() {
4895
4951
  return topLevelItems();
4896
4952
  },
4897
4953
  children: (topLevel) => (() => {
4898
- var _el$2 = _tmpl$3$j(), _el$3 = _el$2.firstChild;
4954
+ var _el$2 = _tmpl$3$k(), _el$3 = _el$2.firstChild;
4899
4955
  _el$2.addEventListener("mouseenter", () => {
4900
4956
  if (activeMenu() && activeMenu() !== topLevel.id) {
4901
4957
  setActiveMenu(topLevel.id);
@@ -4915,7 +4971,7 @@ function Menubar(props) {
4915
4971
  return activeMenu() === topLevel.id;
4916
4972
  },
4917
4973
  get children() {
4918
- var _el$4 = _tmpl$2$v();
4974
+ var _el$4 = _tmpl$2$w();
4919
4975
  insert(_el$4, createComponent(For, {
4920
4976
  get each() {
4921
4977
  return topLevel.children;
@@ -4954,7 +5010,7 @@ function MenuNode(props) {
4954
5010
  } = props;
4955
5011
  const isSeparator = (_a = node.item) == null ? void 0 : _a.separator;
4956
5012
  if (isSeparator) {
4957
- return _tmpl$4$e();
5013
+ return _tmpl$4$f();
4958
5014
  }
4959
5015
  const hasChildren = node.children.length > 0;
4960
5016
  const [showSub, setShowSub] = createSignal(false);
@@ -4989,7 +5045,7 @@ function MenuNode(props) {
4989
5045
  return icon();
4990
5046
  },
4991
5047
  get children() {
4992
- var _el$8 = _tmpl$5$d();
5048
+ var _el$8 = _tmpl$5$e();
4993
5049
  insert(_el$8, createComponent(ToolIcon, {
4994
5050
  get name() {
4995
5051
  return icon();
@@ -5005,7 +5061,7 @@ function MenuNode(props) {
5005
5061
  return (_a2 = node.item) == null ? void 0 : _a2.shortcut;
5006
5062
  },
5007
5063
  get children() {
5008
- var _el$0 = _tmpl$6$6();
5064
+ var _el$0 = _tmpl$6$7();
5009
5065
  insert(_el$0, () => node.item.shortcut);
5010
5066
  return _el$0;
5011
5067
  }
@@ -5042,10 +5098,10 @@ function MenuNode(props) {
5042
5098
  })();
5043
5099
  }
5044
5100
  delegateEvents(["click"]);
5045
- var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5101
+ var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
5046
5102
  function TitleBar(props) {
5047
5103
  return (() => {
5048
- var _el$ = _tmpl$$N(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5104
+ var _el$ = _tmpl$$O(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
5049
5105
  insert(_el$3, () => props.children);
5050
5106
  return _el$;
5051
5107
  })();
@@ -13102,6 +13158,13 @@ function estimateTextBoxAutoFitHeight(textBox, styles, measurer, pageIndex, tota
13102
13158
  );
13103
13159
  }
13104
13160
  function projectBlocksLayout(context2) {
13161
+ const columns = context2.pageSettings.columns;
13162
+ if (columns && columns.count > 1) {
13163
+ return projectColumnedBlocksLayout(context2, columns.count);
13164
+ }
13165
+ return projectColumnTrackLayout(context2);
13166
+ }
13167
+ function projectColumnTrackLayout(context2) {
13105
13168
  var _a, _b;
13106
13169
  const {
13107
13170
  blocks,
@@ -13115,9 +13178,10 @@ function projectBlocksLayout(context2) {
13115
13178
  existingPages = [],
13116
13179
  measurer = domTextMeasurer,
13117
13180
  reservedHeightByPageIndex,
13118
- defaultTabStop
13181
+ defaultTabStop,
13182
+ contentWidthOverride
13119
13183
  } = context2;
13120
- const contentWidth = getPageContentWidth(pageSettings);
13184
+ const contentWidth = contentWidthOverride ?? getPageContentWidth(pageSettings);
13121
13185
  const pages = [...existingPages];
13122
13186
  const currentPage = pages[pages.length - 1];
13123
13187
  let currentBlocks = currentPage ? [...currentPage.blocks] : [];
@@ -13678,6 +13742,82 @@ function projectBlocksLayout(context2) {
13678
13742
  }
13679
13743
  return pages;
13680
13744
  }
13745
+ const MAX_COLUMN_BALANCE_ITERATIONS = 100;
13746
+ function projectColumnedBlocksLayout(context2, count) {
13747
+ var _a, _b;
13748
+ const { pageSettings, maxPageHeight, pageOffset = 0, existingPages = [] } = context2;
13749
+ const colWidth = ((_a = getPageColumnRects(pageSettings)[0]) == null ? void 0 : _a.width) ?? getPageContentWidth(pageSettings);
13750
+ const runTracks = (blocks, trackHeight) => projectColumnTrackLayout({
13751
+ ...context2,
13752
+ blocks,
13753
+ maxPageHeight: trackHeight,
13754
+ contentWidthOverride: colWidth,
13755
+ pageOffset: 0,
13756
+ existingPages: [],
13757
+ reservedHeightByPageIndex: void 0
13758
+ });
13759
+ let tracks = runTracks(context2.blocks, maxPageHeight);
13760
+ if (tracks.length > 1 || tracks.length === 1 && count > 1) {
13761
+ const trailingStart = Math.floor((tracks.length - 1) / count) * count;
13762
+ const trailingTracks = tracks.slice(trailingStart);
13763
+ const firstTrailingBlock = (_b = trailingTracks[0]) == null ? void 0 : _b.blocks[0];
13764
+ const prevTrack = trailingStart > 0 ? tracks[trailingStart - 1] : void 0;
13765
+ const prevLastBlock = prevTrack == null ? void 0 : prevTrack.blocks[prevTrack.blocks.length - 1];
13766
+ const cleanBoundary = firstTrailingBlock != null && (prevLastBlock == null || prevLastBlock.globalIndex !== firstTrailingBlock.globalIndex);
13767
+ if (cleanBoundary) {
13768
+ const startIndex = firstTrailingBlock.globalIndex;
13769
+ const sourceSubset = context2.blocks.slice(startIndex);
13770
+ const sumHeight = trailingTracks.reduce(
13771
+ (sum, track) => sum + track.height,
13772
+ 0
13773
+ );
13774
+ let target = Math.max(24, Math.ceil(sumHeight / count));
13775
+ let balanced = runTracks(sourceSubset, target);
13776
+ for (let iteration = 0; balanced.length > count && target < maxPageHeight && iteration < MAX_COLUMN_BALANCE_ITERATIONS; iteration += 1) {
13777
+ target = Math.min(maxPageHeight, Math.ceil(target * 1.05) + 4);
13778
+ balanced = runTracks(sourceSubset, target);
13779
+ }
13780
+ if (balanced.length <= count) {
13781
+ tracks = [...tracks.slice(0, trailingStart), ...balanced];
13782
+ }
13783
+ }
13784
+ }
13785
+ const pages = [...existingPages];
13786
+ const startPageIndex = existingPages.length > 0 ? existingPages[existingPages.length - 1].index + 1 : pageOffset;
13787
+ const physicalPageCount = Math.ceil(tracks.length / count);
13788
+ for (let p = 0; p < physicalPageCount; p += 1) {
13789
+ const pageIndex = startPageIndex + p;
13790
+ const pageTracks = tracks.slice(p * count, p * count + count);
13791
+ const blocks = [];
13792
+ let height = 0;
13793
+ pageTracks.forEach((track, columnIndex) => {
13794
+ for (const block of track.blocks) {
13795
+ block.columnIndex = columnIndex;
13796
+ blocks.push(block);
13797
+ }
13798
+ height = Math.max(height, track.height);
13799
+ });
13800
+ pages.push({
13801
+ id: `page:${pageIndex + 1}`,
13802
+ index: pageIndex,
13803
+ height,
13804
+ maxHeight: maxPageHeight,
13805
+ blocks,
13806
+ pageSettings
13807
+ });
13808
+ }
13809
+ if (pages.length === 0) {
13810
+ pages.push({
13811
+ id: `page:${startPageIndex + 1}`,
13812
+ index: startPageIndex,
13813
+ height: 0,
13814
+ maxHeight: maxPageHeight,
13815
+ blocks: [],
13816
+ pageSettings
13817
+ });
13818
+ }
13819
+ return pages;
13820
+ }
13681
13821
  function getProjectedBlocksHeight(blocks) {
13682
13822
  if (!blocks || blocks.length === 0) {
13683
13823
  return 0;
@@ -16644,9 +16784,18 @@ function buildCanvasLayoutSnapshot(options) {
16644
16784
  const collectParagraphBlock = (zone, blocks, startTop, options2 = {}) => {
16645
16785
  var _a;
16646
16786
  let cursorY = startTop;
16647
- const blockContentLeft = options2.contentLeft ?? contentLeft;
16648
- const blockContentWidth = options2.contentWidth ?? contentWidth;
16787
+ let blockContentLeft = options2.contentLeft ?? contentLeft;
16788
+ let blockContentWidth = options2.contentWidth ?? contentWidth;
16789
+ const columnRects = getPageColumnRects(page.pageSettings);
16790
+ let lastColumnIndex;
16649
16791
  for (const block of blocks) {
16792
+ if (block.columnIndex !== void 0 && block.columnIndex !== lastColumnIndex) {
16793
+ lastColumnIndex = block.columnIndex;
16794
+ const rect = columnRects[block.columnIndex] ?? columnRects[0];
16795
+ blockContentLeft = pageRect.left + rect.left;
16796
+ blockContentWidth = rect.width;
16797
+ cursorY = startTop;
16798
+ }
16650
16799
  const blockFootnoteId = ((_a = options2.footnoteIdForBlock) == null ? void 0 : _a.call(options2, block)) ?? options2.footnoteId;
16651
16800
  if (block.sourceBlock.type === "paragraph" && block.layout) {
16652
16801
  const paragraphNode = block.sourceBlock;
@@ -17011,7 +17160,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
17011
17160
  );
17012
17161
  return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
17013
17162
  }
17014
- var _tmpl$$M = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$u = /* @__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$d = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$c = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
17163
+ var _tmpl$$N = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
17015
17164
  function OutlinePanel(props) {
17016
17165
  const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
17017
17166
  const [items, setItems] = createSignal([]);
@@ -17079,13 +17228,13 @@ function OutlinePanel(props) {
17079
17228
  }
17080
17229
  });
17081
17230
  return (() => {
17082
- var _el$ = _tmpl$3$i(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
17231
+ var _el$ = _tmpl$3$j(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
17083
17232
  insert(_el$2, createComponent(Show, {
17084
17233
  get when() {
17085
17234
  return !collapsed();
17086
17235
  },
17087
17236
  get children() {
17088
- var _el$3 = _tmpl$$M();
17237
+ var _el$3 = _tmpl$$N();
17089
17238
  insert(_el$3, () => t("menu.view.outline") || "Outline");
17090
17239
  return _el$3;
17091
17240
  }
@@ -17096,14 +17245,14 @@ function OutlinePanel(props) {
17096
17245
  return !collapsed();
17097
17246
  },
17098
17247
  get children() {
17099
- var _el$6 = _tmpl$2$u();
17248
+ var _el$6 = _tmpl$2$v();
17100
17249
  insert(_el$6, createComponent(Show, {
17101
17250
  get when() {
17102
17251
  return items().length > 0;
17103
17252
  },
17104
17253
  get fallback() {
17105
17254
  return (() => {
17106
- var _el$7 = _tmpl$4$d();
17255
+ var _el$7 = _tmpl$4$e();
17107
17256
  insert(_el$7, () => t("outline.empty"));
17108
17257
  return _el$7;
17109
17258
  })();
@@ -17114,7 +17263,7 @@ function OutlinePanel(props) {
17114
17263
  return items();
17115
17264
  },
17116
17265
  children: (item) => (() => {
17117
- var _el$8 = _tmpl$5$c();
17266
+ var _el$8 = _tmpl$5$d();
17118
17267
  _el$8.$$click = () => props.onNavigate(item.anchor);
17119
17268
  insert(_el$8, () => item.text);
17120
17269
  createRenderEffect((_p$) => {
@@ -17153,7 +17302,7 @@ function OutlinePanel(props) {
17153
17302
  })();
17154
17303
  }
17155
17304
  delegateEvents(["click"]);
17156
- 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>`);
17305
+ var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-overflow-manager style="display:flex;align-items:center;flex:1 1 0%;min-width:0;position:relative;margin-right:8px"><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-toolbar-more-measure"aria-hidden=true tabindex=-1 style=position:absolute;visibility:hidden;pointer-events:none;right:0><i data-lucide=ellipsis></i></button><div style="display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;overflow:hidden"></div><div style=flex-shrink:0;padding-left:8px;padding-right:16px;align-items:center><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"data-testid=editor-toolbar-overflow-dropdown><i data-lucide=ellipsis></i></button></div><div class="oasis-editor-toolbar-overflow-dropdown-menu oasis-editor-toolbar-overflow-menu"style="flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;background:var(--oasis-paper);border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:calc(100vw - 16px);overflow-x:hidden;overflow-y:auto">`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
17157
17306
  function ToolbarOverflowManager(props) {
17158
17307
  const [overflowCount, setOverflowCount] = createSignal(0);
17159
17308
  const [menuOpen, setMenuOpen] = createSignal(false);
@@ -17296,7 +17445,7 @@ function ToolbarOverflowManager(props) {
17296
17445
  };
17297
17446
  };
17298
17447
  return (() => {
17299
- 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;
17448
+ var _el$ = _tmpl$$M(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
17300
17449
  var _ref$ = containerRef;
17301
17450
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
17302
17451
  var _ref$2 = moreMeasureRef;
@@ -17308,7 +17457,7 @@ function ToolbarOverflowManager(props) {
17308
17457
  return items();
17309
17458
  },
17310
17459
  children: (item) => (() => {
17311
- var _el$7 = _tmpl$2$t();
17460
+ var _el$7 = _tmpl$2$u();
17312
17461
  insert(_el$7, item);
17313
17462
  return _el$7;
17314
17463
  })()
@@ -17384,12 +17533,12 @@ function resolveLabel(item, api) {
17384
17533
  if (item.labelKey) return api.t(item.labelKey);
17385
17534
  return void 0;
17386
17535
  }
17387
- var _tmpl$$K = /* @__PURE__ */ template(`<span>`), _tmpl$2$s = /* @__PURE__ */ template(`<button type=button>`);
17536
+ var _tmpl$$L = /* @__PURE__ */ template(`<span>`), _tmpl$2$t = /* @__PURE__ */ template(`<button type=button>`);
17388
17537
  function Button$1(props) {
17389
17538
  const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "aria-label", "class", "classList"]);
17390
17539
  const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
17391
17540
  return (() => {
17392
- var _el$ = _tmpl$2$s();
17541
+ var _el$ = _tmpl$2$t();
17393
17542
  spread(_el$, mergeProps({
17394
17543
  get ["class"]() {
17395
17544
  return `oasis-editor-tool-button ${local.class || ""}`;
@@ -17425,7 +17574,7 @@ function Button$1(props) {
17425
17574
  return local.label;
17426
17575
  },
17427
17576
  get children() {
17428
- var _el$2 = _tmpl$$K();
17577
+ var _el$2 = _tmpl$$L();
17429
17578
  insert(_el$2, () => local.label);
17430
17579
  return _el$2;
17431
17580
  }
@@ -17507,7 +17656,7 @@ function useDismiss(options) {
17507
17656
  });
17508
17657
  });
17509
17658
  }
17510
- var _tmpl$$J = /* @__PURE__ */ template(`<div>`);
17659
+ var _tmpl$$K = /* @__PURE__ */ template(`<div>`);
17511
17660
  function Popover(props) {
17512
17661
  let anchorRef;
17513
17662
  let panelRef;
@@ -17524,7 +17673,7 @@ function Popover(props) {
17524
17673
  closeOnEscape: props.closeOnEscape
17525
17674
  });
17526
17675
  const panel = (portalled) => (() => {
17527
- var _el$ = _tmpl$$J();
17676
+ var _el$ = _tmpl$$K();
17528
17677
  addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
17529
17678
  var _ref$ = panelRef;
17530
17679
  typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
@@ -17576,12 +17725,12 @@ function Popover(props) {
17576
17725
  }
17577
17726
  })];
17578
17727
  }
17579
- var _tmpl$$I = /* @__PURE__ */ template(`<div>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$h = /* @__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>`);
17728
+ var _tmpl$$J = /* @__PURE__ */ template(`<div>`), _tmpl$2$s = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$i = /* @__PURE__ */ template(`<i>`), _tmpl$4$d = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$c = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$6 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
17580
17729
  function Menu(props) {
17581
17730
  const [open, setOpen] = createSignal(false);
17582
17731
  const ariaLabel = () => props.tooltip || props.label || "";
17583
17732
  return (() => {
17584
- var _el$ = _tmpl$2$r();
17733
+ var _el$ = _tmpl$2$s();
17585
17734
  insert(_el$, createComponent(Popover, {
17586
17735
  get open() {
17587
17736
  return open();
@@ -17596,7 +17745,7 @@ function Menu(props) {
17596
17745
  },
17597
17746
  onPanelMouseLeave: void 0,
17598
17747
  trigger: (api) => (() => {
17599
- var _el$3 = _tmpl$6$5();
17748
+ var _el$3 = _tmpl$6$6();
17600
17749
  _el$3.$$click = () => api.toggle();
17601
17750
  use((el) => api.ref(el), _el$3);
17602
17751
  insert(_el$3, createComponent(Show, {
@@ -17604,7 +17753,7 @@ function Menu(props) {
17604
17753
  return props.icon;
17605
17754
  },
17606
17755
  get children() {
17607
- var _el$4 = _tmpl$3$h();
17756
+ var _el$4 = _tmpl$3$i();
17608
17757
  createRenderEffect(() => setAttribute(_el$4, "data-lucide", props.icon));
17609
17758
  return _el$4;
17610
17759
  }
@@ -17614,7 +17763,7 @@ function Menu(props) {
17614
17763
  return props.label;
17615
17764
  },
17616
17765
  get children() {
17617
- var _el$5 = _tmpl$4$c();
17766
+ var _el$5 = _tmpl$4$d();
17618
17767
  insert(_el$5, () => props.label);
17619
17768
  return _el$5;
17620
17769
  }
@@ -17624,7 +17773,7 @@ function Menu(props) {
17624
17773
  return !props.hideChevron;
17625
17774
  },
17626
17775
  get children() {
17627
- return _tmpl$5$b();
17776
+ return _tmpl$5$c();
17628
17777
  }
17629
17778
  }), null);
17630
17779
  createRenderEffect((_p$) => {
@@ -17647,7 +17796,7 @@ function Menu(props) {
17647
17796
  return _el$3;
17648
17797
  })(),
17649
17798
  get children() {
17650
- var _el$2 = _tmpl$$I();
17799
+ var _el$2 = _tmpl$$J();
17651
17800
  _el$2.$$click = (event) => {
17652
17801
  const el = event.target;
17653
17802
  if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
@@ -17662,7 +17811,7 @@ function Menu(props) {
17662
17811
  })();
17663
17812
  }
17664
17813
  delegateEvents(["click"]);
17665
- var _tmpl$$H = /* @__PURE__ */ template(`<select>`);
17814
+ var _tmpl$$I = /* @__PURE__ */ template(`<select>`);
17666
17815
  function Select(props) {
17667
17816
  let selectRef;
17668
17817
  const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value"]);
@@ -17678,7 +17827,7 @@ function Select(props) {
17678
17827
  }
17679
17828
  });
17680
17829
  return (() => {
17681
- var _el$ = _tmpl$$H();
17830
+ var _el$ = _tmpl$$I();
17682
17831
  var _ref$ = selectRef;
17683
17832
  typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
17684
17833
  spread(_el$, mergeProps({
@@ -17705,15 +17854,15 @@ function Select(props) {
17705
17854
  return _el$;
17706
17855
  })();
17707
17856
  }
17708
- var _tmpl$$G = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
17857
+ var _tmpl$$H = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
17709
17858
  function Separator(props) {
17710
17859
  return (() => {
17711
- var _el$ = _tmpl$$G();
17860
+ var _el$ = _tmpl$$H();
17712
17861
  createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
17713
17862
  return _el$;
17714
17863
  })();
17715
17864
  }
17716
- 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>`);
17865
+ var _tmpl$$G = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu><i data-lucide=chevron-down>`);
17717
17866
  function SplitButton(props) {
17718
17867
  return createComponent(Popover, {
17719
17868
  get open() {
@@ -17732,7 +17881,7 @@ function SplitButton(props) {
17732
17881
  return props.onPanelMouseLeave;
17733
17882
  },
17734
17883
  trigger: (api) => (() => {
17735
- var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
17884
+ var _el$ = _tmpl$$G(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
17736
17885
  use((el) => api.ref(el), _el$);
17737
17886
  _el$2.$$click = () => props.onMain();
17738
17887
  insert(_el$2, () => props.mainContent);
@@ -17770,7 +17919,7 @@ function SplitButton(props) {
17770
17919
  });
17771
17920
  }
17772
17921
  delegateEvents(["click"]);
17773
- 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$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$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>`);
17922
+ var _tmpl$$F = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$r = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch></span><span>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-theme-grid>`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-standard-grid>`), _tmpl$5$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$6$5 = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$8$1 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$0 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
17774
17923
  const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
17775
17924
  function ColorPicker(props) {
17776
17925
  const [isOpen, setIsOpen] = createSignal(false);
@@ -17835,7 +17984,7 @@ function ColorPicker(props) {
17835
17984
  return clearLabel();
17836
17985
  },
17837
17986
  get children() {
17838
- var _el$ = _tmpl$2$q(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
17987
+ var _el$ = _tmpl$2$r(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
17839
17988
  _el$.$$click = () => applyColor(null);
17840
17989
  insert(_el$2, createComponent(Show, {
17841
17990
  get when() {
@@ -17845,7 +17994,7 @@ function ColorPicker(props) {
17845
17994
  return _tmpl$8$1();
17846
17995
  },
17847
17996
  get children() {
17848
- return _tmpl$$E();
17997
+ return _tmpl$$F();
17849
17998
  }
17850
17999
  }));
17851
18000
  insert(_el$4, clearLabel);
@@ -17853,7 +18002,7 @@ function ColorPicker(props) {
17853
18002
  return _el$;
17854
18003
  }
17855
18004
  }), (() => {
17856
- var _el$5 = _tmpl$3$g(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
18005
+ var _el$5 = _tmpl$3$h(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
17857
18006
  insert(_el$6, () => props.themeColorsLabel);
17858
18007
  insert(_el$7, createComponent(For, {
17859
18008
  get each() {
@@ -17893,7 +18042,7 @@ function ColorPicker(props) {
17893
18042
  }));
17894
18043
  return _el$5;
17895
18044
  })(), (() => {
17896
- var _el$8 = _tmpl$4$b(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
18045
+ var _el$8 = _tmpl$4$c(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
17897
18046
  insert(_el$9, () => props.standardColorsLabel);
17898
18047
  insert(_el$0, createComponent(For, {
17899
18048
  get each() {
@@ -17930,13 +18079,13 @@ function ColorPicker(props) {
17930
18079
  },
17931
18080
  get children() {
17932
18081
  return [(() => {
17933
- var _el$1 = _tmpl$5$a(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
18082
+ var _el$1 = _tmpl$5$b(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
17934
18083
  _el$1.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
17935
18084
  insert(_el$11, () => props.moreColorsLabel);
17936
18085
  createRenderEffect(() => setAttribute(_el$1, "data-testid", `${props.testId}-more-colors`));
17937
18086
  return _el$1;
17938
18087
  })(), (() => {
17939
- var _el$12 = _tmpl$6$4();
18088
+ var _el$12 = _tmpl$6$5();
17940
18089
  _el$12.$$input = (event) => applyColor(event.currentTarget.value);
17941
18090
  var _ref$ = customColorInputRef;
17942
18091
  typeof _ref$ === "function" ? use(_ref$, _el$12) : customColorInputRef = _el$12;
@@ -17958,7 +18107,7 @@ function ColorPicker(props) {
17958
18107
  });
17959
18108
  }
17960
18109
  delegateEvents(["click", "input"]);
17961
- 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$f = /* @__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>`);
18110
+ var _tmpl$$E = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$q = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$a = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
17962
18111
  function GridPicker(props) {
17963
18112
  const [isOpen, setIsOpen] = createSignal(false);
17964
18113
  const [hover, setHover] = createSignal({
@@ -18032,7 +18181,7 @@ function GridPicker(props) {
18032
18181
  return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
18033
18182
  };
18034
18183
  return (() => {
18035
- var _el$ = _tmpl$3$f();
18184
+ var _el$ = _tmpl$3$g();
18036
18185
  insert(_el$, createComponent(Popover, {
18037
18186
  get open() {
18038
18187
  return isOpen();
@@ -18044,7 +18193,7 @@ function GridPicker(props) {
18044
18193
  col: 0
18045
18194
  }),
18046
18195
  trigger: (api) => (() => {
18047
- var _el$4 = _tmpl$4$a(), _el$5 = _el$4.firstChild;
18196
+ var _el$4 = _tmpl$4$b(), _el$5 = _el$4.firstChild;
18048
18197
  _el$4.$$click = () => api.toggle();
18049
18198
  use((el) => api.ref(el), _el$4);
18050
18199
  createRenderEffect((_p$) => {
@@ -18066,11 +18215,11 @@ function GridPicker(props) {
18066
18215
  })(),
18067
18216
  get children() {
18068
18217
  return [(() => {
18069
- var _el$2 = _tmpl$$D();
18218
+ var _el$2 = _tmpl$$E();
18070
18219
  insert(_el$2, statusLabel);
18071
18220
  return _el$2;
18072
18221
  })(), (() => {
18073
- var _el$3 = _tmpl$2$p();
18222
+ var _el$3 = _tmpl$2$q();
18074
18223
  insert(_el$3, createComponent(For, {
18075
18224
  get each() {
18076
18225
  return rows();
@@ -18080,7 +18229,7 @@ function GridPicker(props) {
18080
18229
  return cols();
18081
18230
  },
18082
18231
  children: (c) => (() => {
18083
- var _el$6 = _tmpl$5$9();
18232
+ var _el$6 = _tmpl$5$a();
18084
18233
  _el$6.$$click = () => selectGridSize(r, c);
18085
18234
  _el$6.$$mousedown = (event) => event.preventDefault();
18086
18235
  _el$6.addEventListener("mouseenter", () => setHover({
@@ -18170,7 +18319,7 @@ const DEFAULT_PALETTE = {
18170
18319
  standardColors: STANDARD_COLORS,
18171
18320
  allowCustom: true
18172
18321
  };
18173
- var _tmpl$$C = /* @__PURE__ */ template(`<option value>`), _tmpl$2$o = /* @__PURE__ */ template(`<option>`);
18322
+ var _tmpl$$D = /* @__PURE__ */ template(`<option value>`), _tmpl$2$p = /* @__PURE__ */ template(`<option>`);
18174
18323
  function renderMenuContent(content, api) {
18175
18324
  if (content.kind === "custom") {
18176
18325
  return content.render(api);
@@ -18343,7 +18492,7 @@ function RenderSelect(props) {
18343
18492
  return props.item.placeholder !== void 0;
18344
18493
  },
18345
18494
  get children() {
18346
- var _el$ = _tmpl$$C();
18495
+ var _el$ = _tmpl$$D();
18347
18496
  insert(_el$, () => props.item.placeholder);
18348
18497
  return _el$;
18349
18498
  }
@@ -18352,7 +18501,7 @@ function RenderSelect(props) {
18352
18501
  return props.item.options(props.api);
18353
18502
  },
18354
18503
  children: (option) => (() => {
18355
- var _el$2 = _tmpl$2$o();
18504
+ var _el$2 = _tmpl$2$p();
18356
18505
  insert(_el$2, () => option.label);
18357
18506
  createRenderEffect(() => _el$2.value = option.value);
18358
18507
  return _el$2;
@@ -18475,12 +18624,12 @@ function registerToolbarRenderer(type, component) {
18475
18624
  function resolveRenderer(type) {
18476
18625
  return TOOLBAR_RENDERERS[type] ?? customRenderers.get(type);
18477
18626
  }
18478
- var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
18627
+ var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
18479
18628
  function ToolbarItemRenderer(props) {
18480
18629
  const binding = bindItem(props.item, props.api);
18481
18630
  const component = () => resolveRenderer(props.item.type);
18482
18631
  return (() => {
18483
- var _el$ = _tmpl$$B();
18632
+ var _el$ = _tmpl$$C();
18484
18633
  insert(_el$, createComponent(Show, {
18485
18634
  get when() {
18486
18635
  return component();
@@ -18621,7 +18770,7 @@ function buildRibbonGroups(items, tab) {
18621
18770
  });
18622
18771
  return Array.from(groups.values()).sort((a, b) => a.order - b.order);
18623
18772
  }
18624
- 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>`);
18773
+ var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$o = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
18625
18774
  function RibbonTabs(props) {
18626
18775
  const tabs = RIBBON_TAB_DEFINITIONS;
18627
18776
  const moveTab = (current, delta) => {
@@ -18630,11 +18779,11 @@ function RibbonTabs(props) {
18630
18779
  if (next) props.setActiveTab(next.id);
18631
18780
  };
18632
18781
  return (() => {
18633
- var _el$ = _tmpl$$A();
18782
+ var _el$ = _tmpl$$B();
18634
18783
  insert(_el$, createComponent(For, {
18635
18784
  each: tabs,
18636
18785
  children: (tab) => (() => {
18637
- var _el$2 = _tmpl$2$n();
18786
+ var _el$2 = _tmpl$2$o();
18638
18787
  _el$2.$$keydown = (event) => {
18639
18788
  if (event.key === "ArrowRight") {
18640
18789
  event.preventDefault();
@@ -18676,10 +18825,10 @@ function RibbonTabs(props) {
18676
18825
  })();
18677
18826
  }
18678
18827
  delegateEvents(["click", "keydown"]);
18679
- var _tmpl$$z = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
18828
+ var _tmpl$$A = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
18680
18829
  function RibbonRow(props) {
18681
18830
  return (() => {
18682
- var _el$ = _tmpl$$z();
18831
+ var _el$ = _tmpl$$A();
18683
18832
  insert(_el$, createComponent(For, {
18684
18833
  get each() {
18685
18834
  return props.items;
@@ -18694,10 +18843,10 @@ function RibbonRow(props) {
18694
18843
  return _el$;
18695
18844
  })();
18696
18845
  }
18697
- 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>`);
18846
+ var _tmpl$$z = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group><div class=oasis-editor-ribbon-group-rows></div><div class=oasis-editor-ribbon-group-label>`);
18698
18847
  function RibbonGroup(props) {
18699
18848
  return (() => {
18700
- var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18849
+ var _el$ = _tmpl$$z(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
18701
18850
  insert(_el$2, createComponent(RibbonRow, {
18702
18851
  get items() {
18703
18852
  return props.group.rows[1];
@@ -18727,11 +18876,11 @@ function RibbonGroup(props) {
18727
18876
  return _el$;
18728
18877
  })();
18729
18878
  }
18730
- var _tmpl$$x = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
18879
+ var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
18731
18880
  function RibbonPanel(props) {
18732
18881
  const groups = () => buildRibbonGroups(props.items(), props.activeTab());
18733
18882
  return (() => {
18734
- var _el$ = _tmpl$$x();
18883
+ var _el$ = _tmpl$$y();
18735
18884
  insert(_el$, createComponent(For, {
18736
18885
  get each() {
18737
18886
  return groups();
@@ -18755,7 +18904,7 @@ function RibbonPanel(props) {
18755
18904
  return _el$;
18756
18905
  })();
18757
18906
  }
18758
- var _tmpl$$w = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$m = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
18907
+ var _tmpl$$x = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
18759
18908
  const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
18760
18909
  function Toolbar(props) {
18761
18910
  const api = createToolbarApi(props.host);
@@ -18785,7 +18934,7 @@ function Toolbar(props) {
18785
18934
  })
18786
18935
  });
18787
18936
  return (() => {
18788
- var _el$ = _tmpl$$w();
18937
+ var _el$ = _tmpl$$x();
18789
18938
  _el$.$$mousedown = (event) => {
18790
18939
  if (shouldAllowNativeMouseDown(event.target)) {
18791
18940
  return;
@@ -18806,7 +18955,7 @@ function Toolbar(props) {
18806
18955
  return renderItems();
18807
18956
  }
18808
18957
  }) : (() => {
18809
- var _el$2 = _tmpl$2$m();
18958
+ var _el$2 = _tmpl$2$n();
18810
18959
  insert(_el$2, renderItems);
18811
18960
  return _el$2;
18812
18961
  })();
@@ -19135,10 +19284,10 @@ function createLayoutIdentityStabilizer() {
19135
19284
  return { pages };
19136
19285
  };
19137
19286
  }
19138
- 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">`);
19287
+ var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-page-break style="display:flex;align-items:center;justify-content:center;margin:16px 0;position:relative;user-select:none"><div style="position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--oasis-toolbar-border, #e0e3e7)"></div><div style="background:var(--oasis-bg, #f6f8fb);padding:0 12px;color:var(--oasis-text-muted, #5f6368);font-size:12px;font-family:var(--oasis-font-ui, sans-serif);z-index:1">`);
19139
19288
  function PageBreak(props) {
19140
19289
  return (() => {
19141
- var _el$ = _tmpl$$v(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
19290
+ var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
19142
19291
  insert(_el$3, () => t("metric.pageBreak") || "Page Break");
19143
19292
  return _el$;
19144
19293
  })();
@@ -19488,13 +19637,37 @@ function createCanvasPageRenderer(options) {
19488
19637
  }
19489
19638
  ctx.restore();
19490
19639
  }
19640
+ const columns = page.pageSettings.columns;
19641
+ const columnRects = columns && columns.count > 1 ? getPageColumnRects(page.pageSettings) : null;
19491
19642
  if (state.showMargins) {
19492
19643
  const contentHeight = Math.max(24, Math.floor(zoneBodyBottom - bodyTop));
19493
19644
  ctx.save();
19494
19645
  ctx.strokeStyle = "#d1d5db";
19495
19646
  ctx.lineWidth = 1;
19496
19647
  ctx.setLineDash([5, 5]);
19497
- ctx.strokeRect(marginX, bodyTop, bodyWidth, contentHeight);
19648
+ if (columnRects) {
19649
+ for (const rect of columnRects) {
19650
+ ctx.strokeRect(rect.left, bodyTop, rect.width, contentHeight);
19651
+ }
19652
+ } else {
19653
+ ctx.strokeRect(marginX, bodyTop, bodyWidth, contentHeight);
19654
+ }
19655
+ ctx.restore();
19656
+ }
19657
+ if (columnRects && (columns == null ? void 0 : columns.separator)) {
19658
+ const contentHeight = Math.max(24, Math.floor(zoneBodyBottom - bodyTop));
19659
+ ctx.save();
19660
+ ctx.strokeStyle = "#9ca3af";
19661
+ ctx.lineWidth = 1;
19662
+ for (let i = 0; i < columnRects.length - 1; i += 1) {
19663
+ const rect = columnRects[i];
19664
+ const next = columnRects[i + 1];
19665
+ const ruleX = Math.round((rect.left + rect.width + next.left) / 2) + 0.5;
19666
+ ctx.beginPath();
19667
+ ctx.moveTo(ruleX, bodyTop);
19668
+ ctx.lineTo(ruleX, bodyTop + contentHeight);
19669
+ ctx.stroke();
19670
+ }
19498
19671
  ctx.restore();
19499
19672
  }
19500
19673
  const inHeaderFooterMode = activeZone === "header" || activeZone === "footer";
@@ -19518,17 +19691,41 @@ function createCanvasPageRenderer(options) {
19518
19691
  ctx.restore();
19519
19692
  ctx.save();
19520
19693
  ctx.globalAlpha = bodyAlpha;
19521
- renderBlockList(
19522
- ctx,
19523
- state,
19524
- page.blocks,
19525
- marginX,
19526
- bodyTop,
19527
- bodyWidth,
19528
- page.index,
19529
- onUpdate,
19530
- page.pageSettings
19531
- );
19694
+ if (columnRects && page.blocks.some((b) => b.columnIndex !== void 0)) {
19695
+ const byColumn = /* @__PURE__ */ new Map();
19696
+ for (const block of page.blocks) {
19697
+ const column = block.columnIndex ?? 0;
19698
+ const bucket = byColumn.get(column) ?? [];
19699
+ bucket.push(block);
19700
+ byColumn.set(column, bucket);
19701
+ }
19702
+ for (const [column, columnBlocks] of byColumn) {
19703
+ const rect = columnRects[column] ?? columnRects[0];
19704
+ renderBlockList(
19705
+ ctx,
19706
+ state,
19707
+ columnBlocks,
19708
+ rect.left,
19709
+ bodyTop,
19710
+ rect.width,
19711
+ page.index,
19712
+ onUpdate,
19713
+ page.pageSettings
19714
+ );
19715
+ }
19716
+ } else {
19717
+ renderBlockList(
19718
+ ctx,
19719
+ state,
19720
+ page.blocks,
19721
+ marginX,
19722
+ bodyTop,
19723
+ bodyWidth,
19724
+ page.index,
19725
+ onUpdate,
19726
+ page.pageSettings
19727
+ );
19728
+ }
19532
19729
  ctx.restore();
19533
19730
  if (page.footnoteBlocks && page.footnoteBlocks.length > 0 && page.footnoteTop !== void 0) {
19534
19731
  ctx.save();
@@ -19607,7 +19804,7 @@ function createCanvasPageRenderer(options) {
19607
19804
  }
19608
19805
  };
19609
19806
  }
19610
- 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>`);
19807
+ var _tmpl$$v = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$m = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`);
19611
19808
  const canvasTextMeasurer = {
19612
19809
  composeMeasuredParagraphLines: (options) => domTextMeasurer.composeMeasuredParagraphLines(options),
19613
19810
  resolveRenderedLineHeightPx: (styles, lineHeightMultiple) => domTextMeasurer.resolveRenderedLineHeightPx(styles, lineHeightMultiple)
@@ -19676,7 +19873,7 @@ function CanvasEditorSurface(props) {
19676
19873
  return layout;
19677
19874
  });
19678
19875
  return (() => {
19679
- var _el$ = _tmpl$$u();
19876
+ var _el$ = _tmpl$$v();
19680
19877
  insert(_el$, createComponent(Index, {
19681
19878
  get each() {
19682
19879
  return documentLayout().pages;
@@ -19688,7 +19885,7 @@ function CanvasEditorSurface(props) {
19688
19885
  // inserting an image that triggers re-pagination in a narrow viewport),
19689
19886
  // causing "Failed to execute 'insertBefore'" errors.
19690
19887
  (() => {
19691
- var _el$2 = _tmpl$2$l();
19888
+ var _el$2 = _tmpl$2$m();
19692
19889
  insert(_el$2, createComponent(Show, {
19693
19890
  when: index > 0,
19694
19891
  get children() {
@@ -19761,7 +19958,7 @@ function CanvasPage(props) {
19761
19958
  });
19762
19959
  onCleanup(() => renderer.dispose());
19763
19960
  return (() => {
19764
- var _el$3 = _tmpl$3$e(), _el$4 = _el$3.firstChild;
19961
+ var _el$3 = _tmpl$3$f(), _el$4 = _el$3.firstChild;
19765
19962
  addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
19766
19963
  addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
19767
19964
  addEventListener(_el$3, "click", props.onSurfaceClick, true);
@@ -20099,7 +20296,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
20099
20296
  pushSide(-1);
20100
20297
  return ticks;
20101
20298
  }
20102
- 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>`);
20299
+ var _tmpl$$u = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler data-testid=editor-horizontal-ruler role=presentation><div class=oasis-editor-horizontal-ruler-track><div class=oasis-editor-horizontal-ruler-page><div class=oasis-editor-horizontal-ruler-margin style=left:0px></div><div class=oasis-editor-horizontal-ruler-margin></div><div class=oasis-editor-horizontal-ruler-content></div><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-first-line"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-hanging"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-left-box"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-right-indent">`), _tmpl$2$l = /* @__PURE__ */ template(`<div>`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
20103
20300
  function getActivePageSettings(state) {
20104
20301
  var _a;
20105
20302
  const idx = getActiveSectionIndex(state);
@@ -20302,7 +20499,7 @@ function HorizontalRuler(props) {
20302
20499
  }
20303
20500
  };
20304
20501
  return (() => {
20305
- 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;
20502
+ var _el$ = _tmpl$$u(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling;
20306
20503
  var _ref$ = pageRef;
20307
20504
  typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
20308
20505
  insert(_el$3, createComponent(For, {
@@ -20310,7 +20507,7 @@ function HorizontalRuler(props) {
20310
20507
  return ticks();
20311
20508
  },
20312
20509
  children: (tick) => [(() => {
20313
- var _el$11 = _tmpl$2$k();
20510
+ var _el$11 = _tmpl$2$l();
20314
20511
  createRenderEffect((_p$) => {
20315
20512
  var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${tick.x}px`;
20316
20513
  _v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
@@ -20322,7 +20519,7 @@ function HorizontalRuler(props) {
20322
20519
  });
20323
20520
  return _el$11;
20324
20521
  })(), memo(() => memo(() => !!tick.label)() && (() => {
20325
- var _el$12 = _tmpl$3$d();
20522
+ var _el$12 = _tmpl$3$e();
20326
20523
  insert(_el$12, () => tick.label);
20327
20524
  createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${tick.x}px`));
20328
20525
  return _el$12;
@@ -20399,10 +20596,10 @@ function HorizontalRuler(props) {
20399
20596
  })();
20400
20597
  }
20401
20598
  delegateEvents(["pointerdown"]);
20402
- var _tmpl$$s = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
20599
+ var _tmpl$$t = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
20403
20600
  function CaretOverlay(props) {
20404
20601
  return (() => {
20405
- var _el$ = _tmpl$$s();
20602
+ var _el$ = _tmpl$$t();
20406
20603
  createRenderEffect((_p$) => {
20407
20604
  var _v$ = !!props.active, _v$2 = {
20408
20605
  left: `${props.left}px`,
@@ -20423,16 +20620,16 @@ function CaretOverlay(props) {
20423
20620
  return _el$;
20424
20621
  })();
20425
20622
  }
20426
- 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>`);
20623
+ var _tmpl$$s = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$k = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
20427
20624
  function SelectionOverlay(props) {
20428
20625
  return (() => {
20429
- var _el$ = _tmpl$$r();
20626
+ var _el$ = _tmpl$$s();
20430
20627
  insert(_el$, createComponent(Index, {
20431
20628
  get each() {
20432
20629
  return props.boxes;
20433
20630
  },
20434
20631
  children: (box) => (() => {
20435
- var _el$2 = _tmpl$2$j();
20632
+ var _el$2 = _tmpl$2$k();
20436
20633
  createRenderEffect((_p$) => {
20437
20634
  var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
20438
20635
  _v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
@@ -20452,7 +20649,7 @@ function SelectionOverlay(props) {
20452
20649
  return _el$;
20453
20650
  })();
20454
20651
  }
20455
- 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>`);
20652
+ var _tmpl$$r = /* @__PURE__ */ template(`<div class=oasis-editor-revision-overlay data-testid=editor-revision-overlay><div class=oasis-editor-revision-overlay-content><span class=oasis-editor-revision-overlay-author><strong>:</strong> </span><span class=oasis-editor-revision-overlay-date></span></div><div class=oasis-editor-revision-overlay-arrow>`);
20456
20653
  function RevisionOverlay(props) {
20457
20654
  const formattedDate = () => {
20458
20655
  try {
@@ -20463,7 +20660,7 @@ function RevisionOverlay(props) {
20463
20660
  };
20464
20661
  const label = () => props.box.type === "insert" ? "Inserido por" : "Excluído por";
20465
20662
  return (() => {
20466
- var _el$ = _tmpl$$q(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
20663
+ var _el$ = _tmpl$$r(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
20467
20664
  _el$4.nextSibling;
20468
20665
  var _el$7 = _el$3.nextSibling;
20469
20666
  insert(_el$4, label, _el$5);
@@ -20481,7 +20678,7 @@ function RevisionOverlay(props) {
20481
20678
  return _el$;
20482
20679
  })();
20483
20680
  }
20484
- 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>`);
20681
+ var _tmpl$$q = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$j = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$d = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$a = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=oasis-editor-comment-popup data-testid=editor-comment-popup><div class=oasis-editor-comment-popup-header><span class=oasis-editor-comment-popup-author></span></div><div class=oasis-editor-comment-popup-body>`);
20485
20682
  function CommentHighlightOverlay(props) {
20486
20683
  const [activeCommentId, setActiveCommentId] = createSignal(null);
20487
20684
  const activeComment = createMemo(() => {
@@ -20508,13 +20705,13 @@ function CommentHighlightOverlay(props) {
20508
20705
  }
20509
20706
  };
20510
20707
  return (() => {
20511
- var _el$ = _tmpl$$p();
20708
+ var _el$ = _tmpl$$q();
20512
20709
  insert(_el$, createComponent(For, {
20513
20710
  get each() {
20514
20711
  return props.boxes();
20515
20712
  },
20516
20713
  children: (box) => (() => {
20517
- var _el$2 = _tmpl$2$i();
20714
+ var _el$2 = _tmpl$2$j();
20518
20715
  _el$2.$$click = () => setActiveCommentId(box.commentId);
20519
20716
  _el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
20520
20717
  createRenderEffect((_p$) => {
@@ -20546,7 +20743,7 @@ function CommentHighlightOverlay(props) {
20546
20743
  const comment = activeComment();
20547
20744
  const anchor = popupAnchor();
20548
20745
  return (() => {
20549
- var _el$3 = _tmpl$5$8(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
20746
+ var _el$3 = _tmpl$5$9(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
20550
20747
  _el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
20551
20748
  insert(_el$5, () => comment.author || "—");
20552
20749
  insert(_el$4, createComponent(Show, {
@@ -20554,7 +20751,7 @@ function CommentHighlightOverlay(props) {
20554
20751
  return comment.date !== void 0;
20555
20752
  },
20556
20753
  get children() {
20557
- var _el$6 = _tmpl$3$c();
20754
+ var _el$6 = _tmpl$3$d();
20558
20755
  insert(_el$6, () => formattedDate(comment.date));
20559
20756
  return _el$6;
20560
20757
  }
@@ -20564,7 +20761,7 @@ function CommentHighlightOverlay(props) {
20564
20761
  return comment.resolved;
20565
20762
  },
20566
20763
  get children() {
20567
- return _tmpl$4$9();
20764
+ return _tmpl$4$a();
20568
20765
  }
20569
20766
  }), null);
20570
20767
  insert(_el$8, () => comment.text);
@@ -20586,7 +20783,7 @@ function CommentHighlightOverlay(props) {
20586
20783
  })();
20587
20784
  }
20588
20785
  delegateEvents(["click"]);
20589
- 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>`);
20786
+ var _tmpl$$p = /* @__PURE__ */ template(`<div class=oasis-editor-floating-toolbar data-testid=editor-floating-table-toolbar><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group>`);
20590
20787
  function FloatingTableToolbar(props) {
20591
20788
  const host = () => props.host();
20592
20789
  const run = (command, payload) => host().commands.execute(command, payload);
@@ -20667,7 +20864,7 @@ function FloatingTableToolbar(props) {
20667
20864
  return document.body;
20668
20865
  },
20669
20866
  get children() {
20670
- var _el$ = _tmpl$$o(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
20867
+ var _el$ = _tmpl$$p(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
20671
20868
  _el$.$$mousedown = (event) => event.preventDefault();
20672
20869
  insert(_el$2, createComponent(Button$1, {
20673
20870
  icon: "combine",
@@ -20827,7 +21024,7 @@ function FloatingTableToolbar(props) {
20827
21024
  });
20828
21025
  }
20829
21026
  delegateEvents(["mousedown"]);
20830
- var _tmpl$$n = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$h = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$b = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$8 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$7 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-anchor data-testid=editor-layout-options-anchor><svg viewBox="0 0 24 24"fill=none aria-hidden=true><rect x=3 y=4 width=10 height=10 rx=1.5 fill=#1a73e8></rect><rect x=3 y=17 width=18 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=5 width=6 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=9 width=6 height=2 rx=1 fill=#9aa0a6>`), _tmpl$7$1 = /* @__PURE__ */ template(`<div class=oasis-editor-layout-options-popup data-testid=editor-layout-options-popup><div class=oasis-editor-layout-options-popup-header><span class=oasis-editor-layout-options-title></span><button type=button class=oasis-editor-layout-options-close>×</button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid><button type=button class=oasis-editor-layout-options-cell data-testid=editor-layout-options-inline><svg viewBox="0 0 40 32"fill=none aria-hidden=true><rect x=4 y=7 width=9 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=4 width=11 height=11 rx=1.5 fill=#1a73e8></rect><rect x=28 y=7 width=8 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=20 width=32 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=26 width=32 height=2 rx=1 fill=#9aa0a6></rect></svg></button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid></div><div class=oasis-editor-layout-options-radios><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position></label><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-cell>`);
21027
+ var _tmpl$$o = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$i = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$c = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$9 = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$8 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-anchor data-testid=editor-layout-options-anchor><svg viewBox="0 0 24 24"fill=none aria-hidden=true><rect x=3 y=4 width=10 height=10 rx=1.5 fill=#1a73e8></rect><rect x=3 y=17 width=18 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=5 width=6 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=9 width=6 height=2 rx=1 fill=#9aa0a6>`), _tmpl$7$1 = /* @__PURE__ */ template(`<div class=oasis-editor-layout-options-popup data-testid=editor-layout-options-popup><div class=oasis-editor-layout-options-popup-header><span class=oasis-editor-layout-options-title></span><button type=button class=oasis-editor-layout-options-close>×</button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid><button type=button class=oasis-editor-layout-options-cell data-testid=editor-layout-options-inline><svg viewBox="0 0 40 32"fill=none aria-hidden=true><rect x=4 y=7 width=9 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=4 width=11 height=11 rx=1.5 fill=#1a73e8></rect><rect x=28 y=7 width=8 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=20 width=32 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=26 width=32 height=2 rx=1 fill=#9aa0a6></rect></svg></button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid></div><div class=oasis-editor-layout-options-radios><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position></label><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-cell>`);
20831
21028
  const WRAP_OPTIONS = [{
20832
21029
  preset: "square",
20833
21030
  labelKey: "layoutOptions.square"
@@ -20849,14 +21046,14 @@ const WRAP_OPTIONS = [{
20849
21046
  }];
20850
21047
  function WrapIcon(props) {
20851
21048
  const line = (x, y, w) => (() => {
20852
- var _el$ = _tmpl$$n();
21049
+ var _el$ = _tmpl$$o();
20853
21050
  setAttribute(_el$, "x", x);
20854
21051
  setAttribute(_el$, "y", y);
20855
21052
  setAttribute(_el$, "width", w);
20856
21053
  return _el$;
20857
21054
  })();
20858
21055
  const box = (x, y, w, h, fill = "#1a73e8") => (() => {
20859
- var _el$2 = _tmpl$2$h();
21056
+ var _el$2 = _tmpl$2$i();
20860
21057
  setAttribute(_el$2, "x", x);
20861
21058
  setAttribute(_el$2, "y", y);
20862
21059
  setAttribute(_el$2, "width", w);
@@ -20865,7 +21062,7 @@ function WrapIcon(props) {
20865
21062
  return _el$2;
20866
21063
  })();
20867
21064
  return (() => {
20868
- var _el$3 = _tmpl$5$7();
21065
+ var _el$3 = _tmpl$5$8();
20869
21066
  insert(_el$3, createComponent(Show, {
20870
21067
  get when() {
20871
21068
  return props.preset === "square";
@@ -20879,7 +21076,7 @@ function WrapIcon(props) {
20879
21076
  return props.preset === "tight";
20880
21077
  },
20881
21078
  get children() {
20882
- return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$b()];
21079
+ return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$c()];
20883
21080
  }
20884
21081
  }), null);
20885
21082
  insert(_el$3, createComponent(Show, {
@@ -20887,7 +21084,7 @@ function WrapIcon(props) {
20887
21084
  return props.preset === "through";
20888
21085
  },
20889
21086
  get children() {
20890
- return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$8()];
21087
+ return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$9()];
20891
21088
  }
20892
21089
  }), null);
20893
21090
  insert(_el$3, createComponent(Show, {
@@ -20976,7 +21173,7 @@ function FloatingLayoutOptions(props) {
20976
21173
  },
20977
21174
  get children() {
20978
21175
  return [(() => {
20979
- var _el$6 = _tmpl$6$3();
21176
+ var _el$6 = _tmpl$6$4();
20980
21177
  _el$6.$$click = () => setOpen((value) => !value);
20981
21178
  _el$6.$$mousedown = (event) => event.preventDefault();
20982
21179
  createRenderEffect((_p$) => {
@@ -31045,11 +31242,41 @@ function parseImportedStyles(stylesXml, theme) {
31045
31242
  }
31046
31243
  return emptyOrUndefined(styles);
31047
31244
  }
31245
+ function isXmlTrue(value) {
31246
+ return value === "1" || value === "true" || value === "on";
31247
+ }
31248
+ function parseColumns(sectPr) {
31249
+ const cols = getFirstChildByTagNameNS(sectPr, WORD_NS, "cols");
31250
+ if (!cols) {
31251
+ return void 0;
31252
+ }
31253
+ const count = Number.parseInt(getAttributeValue(cols, "num") ?? "1", 10);
31254
+ if (!Number.isFinite(count) || count <= 1) {
31255
+ return void 0;
31256
+ }
31257
+ const space = twipsToPx(getAttributeValue(cols, "space"), 0);
31258
+ const sepAttr = getAttributeValue(cols, "sep");
31259
+ const equalWidthAttr = getAttributeValue(cols, "equalWidth");
31260
+ const colChildren = getChildrenByTagNameNS(cols, WORD_NS, "col");
31261
+ const explicit = colChildren.map((col) => ({
31262
+ width: twipsToPx(getAttributeValue(col, "w"), 0),
31263
+ space: twipsToPx(getAttributeValue(col, "space"), space)
31264
+ }));
31265
+ const equalWidth = equalWidthAttr == null ? true : isXmlTrue(equalWidthAttr);
31266
+ return {
31267
+ count,
31268
+ space,
31269
+ ...isXmlTrue(sepAttr) ? { separator: true } : {},
31270
+ ...equalWidth ? {} : { equalWidth: false },
31271
+ ...!equalWidth && explicit.length > 0 ? { columns: explicit } : {}
31272
+ };
31273
+ }
31048
31274
  function parseSectionProperties(sectPr) {
31049
31275
  const pageSize = getFirstChildByTagNameNS(sectPr, WORD_NS, "pgSz");
31050
31276
  const pageMargins = getFirstChildByTagNameNS(sectPr, WORD_NS, "pgMar");
31277
+ const columns = parseColumns(sectPr);
31051
31278
  let pageSettings;
31052
- if (pageSize || pageMargins) {
31279
+ if (pageSize || pageMargins || columns) {
31053
31280
  const width = twipsToPx(getAttributeValue(pageSize, "w"), 816);
31054
31281
  const height = twipsToPx(getAttributeValue(pageSize, "h"), 1056);
31055
31282
  const orientationValue = getAttributeValue(pageSize, "orient");
@@ -31065,7 +31292,8 @@ function parseSectionProperties(sectPr) {
31065
31292
  header: twipsToPx(getAttributeValue(pageMargins, "header"), 48),
31066
31293
  footer: twipsToPx(getAttributeValue(pageMargins, "footer"), 48),
31067
31294
  gutter: twipsToPx(getAttributeValue(pageMargins, "gutter"), 0)
31068
- }
31295
+ },
31296
+ ...columns ? { columns } : {}
31069
31297
  };
31070
31298
  }
31071
31299
  const parseSectionReferences = (localName) => {
@@ -31118,7 +31346,8 @@ function parsePageSettings(body) {
31118
31346
  WORD_NS,
31119
31347
  "pgMar"
31120
31348
  );
31121
- if (!pageSize && !pageMargins) {
31349
+ const columns = parseColumns(sectionProperties);
31350
+ if (!pageSize && !pageMargins && !columns) {
31122
31351
  return void 0;
31123
31352
  }
31124
31353
  const width = twipsToPx(getAttributeValue(pageSize, "w"), 816);
@@ -31136,7 +31365,8 @@ function parsePageSettings(body) {
31136
31365
  header: twipsToPx(getAttributeValue(pageMargins, "header"), 48),
31137
31366
  footer: twipsToPx(getAttributeValue(pageMargins, "footer"), 48),
31138
31367
  gutter: twipsToPx(getAttributeValue(pageMargins, "gutter"), 0)
31139
- }
31368
+ },
31369
+ ...columns ? { columns } : {}
31140
31370
  };
31141
31371
  }
31142
31372
  function applyDocGridLinePitch(blocks, linePitchPx, mode, docGridType, settings) {
@@ -34158,7 +34388,7 @@ function importDocxInWorker(buffer, options = {}) {
34158
34388
  const worker = new Worker(
34159
34389
  new URL(
34160
34390
  /* @vite-ignore */
34161
- "" + new URL("assets/importDocxWorker-cjz15bhS.js", import.meta.url).href,
34391
+ "" + new URL("assets/importDocxWorker-D4P4_drI.js", import.meta.url).href,
34162
34392
  import.meta.url
34163
34393
  ),
34164
34394
  {
@@ -34790,10 +35020,10 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
34790
35020
  nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
34791
35021
  return { width: nextWidth, height: nextHeight };
34792
35022
  }
34793
- var _tmpl$$m = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$g = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$a = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
35023
+ var _tmpl$$n = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$h = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$b = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
34794
35024
  function ResizeHandlesOverlay(props) {
34795
35025
  return (() => {
34796
- var _el$ = _tmpl$2$g();
35026
+ var _el$ = _tmpl$2$h();
34797
35027
  _el$.$$mousedown = (event) => {
34798
35028
  if (props.readOnly || !props.box() || !props.onBodyMouseDown) {
34799
35029
  return;
@@ -34809,7 +35039,7 @@ function ResizeHandlesOverlay(props) {
34809
35039
  return [createComponent(For, {
34810
35040
  each: RESIZE_HANDLE_DIRECTIONS,
34811
35041
  children: (direction) => (() => {
34812
- var _el$3 = _tmpl$3$a();
35042
+ var _el$3 = _tmpl$3$b();
34813
35043
  _el$3.$$mousedown = (event) => {
34814
35044
  if (!props.box()) {
34815
35045
  return;
@@ -34824,7 +35054,7 @@ function ResizeHandlesOverlay(props) {
34824
35054
  return props.onRotateStart;
34825
35055
  },
34826
35056
  get children() {
34827
- var _el$2 = _tmpl$$m();
35057
+ var _el$2 = _tmpl$$n();
34828
35058
  _el$2.$$mousedown = (event) => {
34829
35059
  var _a;
34830
35060
  if (!props.box()) {
@@ -34865,7 +35095,7 @@ function ResizeHandlesOverlay(props) {
34865
35095
  })();
34866
35096
  }
34867
35097
  delegateEvents(["mousedown"]);
34868
- var _tmpl$$l = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none></div></div><div class=oasis-editor-statusbar data-testid=editor-statusbar><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span><span class=oasis-editor-statusbar-item>: 100%`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$4$7 = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`), _tmpl$5$6 = /* @__PURE__ */ template(`<span>`);
35098
+ var _tmpl$$m = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none></div></div><div class=oasis-editor-statusbar data-testid=editor-statusbar><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span><span class=oasis-editor-statusbar-item>: 100%`), _tmpl$2$g = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$3$a = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$4$8 = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`);
34869
35099
  function OasisEditorEditor(props) {
34870
35100
  const layout = () => props.layout ?? {};
34871
35101
  const overlays = () => props.overlays;
@@ -34953,7 +35183,7 @@ function OasisEditorEditor(props) {
34953
35183
  queueMicrotask(recomputeViewportPageIndex);
34954
35184
  });
34955
35185
  return (() => {
34956
- var _el$ = _tmpl$$l(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$2.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
35186
+ var _el$ = _tmpl$$m(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$2.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
34957
35187
  insert(_el$, createComponent(Show, {
34958
35188
  get when() {
34959
35189
  return memo(() => !!layout().showHorizontalRuler)() && overlays().toolbarHost;
@@ -35209,7 +35439,7 @@ function OasisEditorEditor(props) {
35209
35439
  const isDone = progress().phase === "done";
35210
35440
  const isError = progress().phase === "error";
35211
35441
  return (() => {
35212
- var _el$11 = _tmpl$2$f(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
35442
+ var _el$11 = _tmpl$2$g(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
35213
35443
  _el$11.classList.toggle("oasis-editor-import-overlay-done", !!isDone);
35214
35444
  _el$11.classList.toggle("oasis-editor-import-overlay-error", !!isError);
35215
35445
  setAttribute(_el$11, "aria-busy", !isDone && !isError);
@@ -35222,11 +35452,11 @@ function OasisEditorEditor(props) {
35222
35452
  _el$16.classList.toggle("oasis-editor-import-progress-bar-done", !!isDone);
35223
35453
  _el$16.classList.toggle("oasis-editor-import-progress-bar-error", !!isError);
35224
35454
  insert(_el$17, isDone ? (() => {
35225
- var _el$18 = _tmpl$3$9();
35455
+ var _el$18 = _tmpl$3$a();
35226
35456
  insert(_el$18, () => t("import.phase.done"));
35227
35457
  return _el$18;
35228
35458
  })() : isError ? (() => {
35229
- var _el$19 = _tmpl$4$7();
35459
+ var _el$19 = _tmpl$4$8();
35230
35460
  insert(_el$19, () => t("import.phase.error"));
35231
35461
  return _el$19;
35232
35462
  })() : [memo(() => Math.round(progress().progress)), "%"]);
@@ -35259,7 +35489,7 @@ function OasisEditorEditor(props) {
35259
35489
  return createComponent(Show, {
35260
35490
  when: key,
35261
35491
  get children() {
35262
- var _el$20 = _tmpl$5$6();
35492
+ var _el$20 = _tmpl$5$7();
35263
35493
  insert(_el$20, () => t(key));
35264
35494
  createRenderEffect(() => className(_el$20, `oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${status.replace("...", "ing").replace(".", "")}`));
35265
35495
  return _el$20;
@@ -35291,11 +35521,11 @@ function OasisEditorEditor(props) {
35291
35521
  })();
35292
35522
  }
35293
35523
  delegateEvents(["mousedown", "contextmenu", "input", "keydown"]);
35294
- var _tmpl$$k = /* @__PURE__ */ template(`<button>`);
35524
+ var _tmpl$$l = /* @__PURE__ */ template(`<button>`);
35295
35525
  function FloatingActionButton(props) {
35296
35526
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "class", "classList"]);
35297
35527
  return (() => {
35298
- var _el$ = _tmpl$$k();
35528
+ var _el$ = _tmpl$$l();
35299
35529
  spread(_el$, mergeProps({
35300
35530
  get type() {
35301
35531
  return local.type ?? "button";
@@ -35324,7 +35554,7 @@ function FloatingActionButton(props) {
35324
35554
  return _el$;
35325
35555
  })();
35326
35556
  }
35327
- var _tmpl$$j = /* @__PURE__ */ template(`<aside>`), _tmpl$2$e = /* @__PURE__ */ template(`<div>`);
35557
+ var _tmpl$$k = /* @__PURE__ */ template(`<aside>`), _tmpl$2$f = /* @__PURE__ */ template(`<div>`);
35328
35558
  function SidePanel(props) {
35329
35559
  const [local, others] = splitProps(props, ["mode", "width", "class", "classList", "children", "style"]);
35330
35560
  const width = () => {
@@ -35334,7 +35564,7 @@ function SidePanel(props) {
35334
35564
  return local.width ?? "360px";
35335
35565
  };
35336
35566
  return (() => {
35337
- var _el$ = _tmpl$$j();
35567
+ var _el$ = _tmpl$$k();
35338
35568
  spread(_el$, mergeProps({
35339
35569
  get ["class"]() {
35340
35570
  return `oasis-editor-plugin-side-panel ${local.class ?? ""}`;
@@ -35359,7 +35589,7 @@ function SidePanel(props) {
35359
35589
  function SidePanelHeader(props) {
35360
35590
  const [local, others] = splitProps(props, ["class", "children"]);
35361
35591
  return (() => {
35362
- var _el$2 = _tmpl$2$e();
35592
+ var _el$2 = _tmpl$2$f();
35363
35593
  spread(_el$2, mergeProps({
35364
35594
  get ["class"]() {
35365
35595
  return `oasis-editor-plugin-side-panel-header ${local.class ?? ""}`;
@@ -35372,7 +35602,7 @@ function SidePanelHeader(props) {
35372
35602
  function SidePanelBody(props) {
35373
35603
  const [local, others] = splitProps(props, ["class", "children"]);
35374
35604
  return (() => {
35375
- var _el$3 = _tmpl$2$e();
35605
+ var _el$3 = _tmpl$2$f();
35376
35606
  spread(_el$3, mergeProps({
35377
35607
  get ["class"]() {
35378
35608
  return `oasis-editor-plugin-side-panel-body ${local.class ?? ""}`;
@@ -35385,7 +35615,7 @@ function SidePanelBody(props) {
35385
35615
  function SidePanelFooter(props) {
35386
35616
  const [local, others] = splitProps(props, ["class", "children"]);
35387
35617
  return (() => {
35388
- var _el$4 = _tmpl$2$e();
35618
+ var _el$4 = _tmpl$2$f();
35389
35619
  spread(_el$4, mergeProps({
35390
35620
  get ["class"]() {
35391
35621
  return `oasis-editor-plugin-side-panel-footer ${local.class ?? ""}`;
@@ -35395,11 +35625,11 @@ function SidePanelFooter(props) {
35395
35625
  return _el$4;
35396
35626
  })();
35397
35627
  }
35398
- var _tmpl$$i = /* @__PURE__ */ template(`<button>`);
35628
+ var _tmpl$$j = /* @__PURE__ */ template(`<button>`);
35399
35629
  function IconButton(props) {
35400
35630
  const [local, others] = splitProps(props, ["type", "icon", "label", "active", "variant", "size", "class", "classList"]);
35401
35631
  return (() => {
35402
- var _el$ = _tmpl$$i();
35632
+ var _el$ = _tmpl$$j();
35403
35633
  spread(_el$, mergeProps({
35404
35634
  get type() {
35405
35635
  return local.type ?? "button";
@@ -35430,7 +35660,7 @@ function IconButton(props) {
35430
35660
  return _el$;
35431
35661
  })();
35432
35662
  }
35433
- var _tmpl$$h = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$8 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$6 = /* @__PURE__ */ template(`<span class=oasis-editor-plugin-side-panel-icon>`), _tmpl$5$5 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title><span>`);
35663
+ var _tmpl$$i = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$e = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$9 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$7 = /* @__PURE__ */ template(`<span class=oasis-editor-plugin-side-panel-icon>`), _tmpl$5$6 = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title><span>`);
35434
35664
  const EMPTY_SNAPSHOT = {
35435
35665
  floatingActions: [],
35436
35666
  sidePanels: [],
@@ -35461,7 +35691,7 @@ function PluginUiHost(props) {
35461
35691
  return groupActionsByPlacement(actions());
35462
35692
  },
35463
35693
  children: (group) => (() => {
35464
- var _el$ = _tmpl$$h();
35694
+ var _el$ = _tmpl$$i();
35465
35695
  insert(_el$, createComponent(For, {
35466
35696
  get each() {
35467
35697
  return group.actions;
@@ -35490,7 +35720,7 @@ function PluginUiHost(props) {
35490
35720
  })()
35491
35721
  });
35492
35722
  return (() => {
35493
- var _el$2 = _tmpl$2$d(), _el$3 = _el$2.firstChild;
35723
+ var _el$2 = _tmpl$2$e(), _el$3 = _el$2.firstChild;
35494
35724
  insert(_el$3, resolvedChildren);
35495
35725
  insert(_el$2, createComponent(Show, {
35496
35726
  get when() {
@@ -35503,7 +35733,7 @@ function PluginUiHost(props) {
35503
35733
  return overlayPanel();
35504
35734
  },
35505
35735
  children: (panel) => (() => {
35506
- var _el$4 = _tmpl$3$8();
35736
+ var _el$4 = _tmpl$3$9();
35507
35737
  insert(_el$4, () => renderPanel(props.editor, panel()));
35508
35738
  return _el$4;
35509
35739
  })()
@@ -35554,13 +35784,13 @@ function renderPanel(editor, panel) {
35554
35784
  return [createComponent(SidePanelHeader, {
35555
35785
  get children() {
35556
35786
  return [(() => {
35557
- var _el$5 = _tmpl$5$5(), _el$7 = _el$5.firstChild;
35787
+ var _el$5 = _tmpl$5$6(), _el$7 = _el$5.firstChild;
35558
35788
  insert(_el$5, createComponent(Show, {
35559
35789
  get when() {
35560
35790
  return panel.icon;
35561
35791
  },
35562
35792
  get children() {
35563
- var _el$6 = _tmpl$4$6();
35793
+ var _el$6 = _tmpl$4$7();
35564
35794
  insert(_el$6, createComponent(ToolIcon, {
35565
35795
  get name() {
35566
35796
  return panel.icon;
@@ -35609,7 +35839,7 @@ function groupActionsByPlacement(actions) {
35609
35839
  actions: groupActions
35610
35840
  }));
35611
35841
  }
35612
- var _tmpl$$g = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
35842
+ var _tmpl$$h = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
35613
35843
  function DocumentShell(props) {
35614
35844
  let surfaceEl;
35615
35845
  let viewportEl;
@@ -35732,7 +35962,7 @@ function DocumentShell(props) {
35732
35962
  return props.runtimeEditor;
35733
35963
  },
35734
35964
  get children() {
35735
- var _el$ = _tmpl$$g(), _el$2 = _el$.firstChild;
35965
+ var _el$ = _tmpl$$h(), _el$2 = _el$.firstChild;
35736
35966
  insert(_el$, createComponent(Show, {
35737
35967
  get when() {
35738
35968
  return memo(() => !!props.showChrome)() && props.showOutline;
@@ -35789,10 +36019,10 @@ function DocumentShell(props) {
35789
36019
  }
35790
36020
  })];
35791
36021
  }
35792
- var _tmpl$$f = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">`);
36022
+ var _tmpl$$g = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$d = /* @__PURE__ */ template(`<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">`);
35793
36023
  function InlineShell(props) {
35794
36024
  return (() => {
35795
- var _el$ = _tmpl$2$c();
36025
+ var _el$ = _tmpl$2$d();
35796
36026
  insert(_el$, createComponent(Show, {
35797
36027
  get when() {
35798
36028
  return memo(() => !!props.showChrome)() && props.showToolbar;
@@ -35819,7 +36049,7 @@ function InlineShell(props) {
35819
36049
  return props.runtimeEditor;
35820
36050
  },
35821
36051
  get children() {
35822
- var _el$2 = _tmpl$$f(), _el$3 = _el$2.firstChild;
36052
+ var _el$2 = _tmpl$$g(), _el$3 = _el$2.firstChild;
35823
36053
  insert(_el$3, createComponent(OasisEditorEditor, {
35824
36054
  state: () => props.state,
35825
36055
  get layout() {
@@ -35858,16 +36088,16 @@ function InlineShell(props) {
35858
36088
  return _el$;
35859
36089
  })();
35860
36090
  }
35861
- var _tmpl$$e = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
36091
+ var _tmpl$$f = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
35862
36092
  function BalloonShell(props) {
35863
36093
  return (() => {
35864
- var _el$ = _tmpl$2$b();
36094
+ var _el$ = _tmpl$2$c();
35865
36095
  insert(_el$, createComponent(PluginUiHost, {
35866
36096
  get editor() {
35867
36097
  return props.runtimeEditor;
35868
36098
  },
35869
36099
  get children() {
35870
- var _el$2 = _tmpl$$e(), _el$3 = _el$2.firstChild;
36100
+ var _el$2 = _tmpl$$f(), _el$3 = _el$2.firstChild;
35871
36101
  insert(_el$3, createComponent(OasisEditorEditor, {
35872
36102
  state: () => props.state,
35873
36103
  get layout() {
@@ -35906,7 +36136,7 @@ function BalloonShell(props) {
35906
36136
  return _el$;
35907
36137
  })();
35908
36138
  }
35909
- var _tmpl$$d = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$a = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>`);
36139
+ var _tmpl$$e = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>`);
35910
36140
  function Dialog(props) {
35911
36141
  let dialogRef;
35912
36142
  const fallbackTitleId = createUniqueId();
@@ -35930,7 +36160,7 @@ function Dialog(props) {
35930
36160
  return props.isOpen;
35931
36161
  },
35932
36162
  get children() {
35933
- var _el$ = _tmpl$2$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
36163
+ var _el$ = _tmpl$2$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
35934
36164
  _el$.$$click = () => {
35935
36165
  if (props.closeOnOverlayClick ?? true) {
35936
36166
  props.onClose();
@@ -35947,7 +36177,7 @@ function Dialog(props) {
35947
36177
  return props.footer;
35948
36178
  },
35949
36179
  get children() {
35950
- var _el$7 = _tmpl$$d();
36180
+ var _el$7 = _tmpl$$e();
35951
36181
  insert(_el$7, () => props.footer);
35952
36182
  return _el$7;
35953
36183
  }
@@ -35976,7 +36206,7 @@ function Dialog(props) {
35976
36206
  });
35977
36207
  }
35978
36208
  delegateEvents(["click"]);
35979
- var _tmpl$$c = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$9 = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$7 = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
36209
+ var _tmpl$$d = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$a = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$8 = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
35980
36210
  function findEnabledItem(items, startIndex, direction) {
35981
36211
  if (!items.length) return void 0;
35982
36212
  for (let step = 0; step < items.length; step += 1) {
@@ -36027,7 +36257,7 @@ function Tabs(props) {
36027
36257
  selectItem(findEnabledItem(items(), currentIndex + direction, direction), true);
36028
36258
  };
36029
36259
  return (() => {
36030
- var _el$ = _tmpl$$c(), _el$2 = _el$.firstChild;
36260
+ var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild;
36031
36261
  _el$2.$$keydown = handleKeyDown;
36032
36262
  insert(_el$2, createComponent(For, {
36033
36263
  get each() {
@@ -36037,7 +36267,7 @@ function Tabs(props) {
36037
36267
  const tabId = `${baseId}-${item.id}-tab`;
36038
36268
  const panelId = `${baseId}-${item.id}-panel`;
36039
36269
  return (() => {
36040
- var _el$3 = _tmpl$2$9();
36270
+ var _el$3 = _tmpl$2$a();
36041
36271
  _el$3.$$click = () => selectItem(item);
36042
36272
  use((element) => {
36043
36273
  tabRefs[index()] = element;
@@ -36072,7 +36302,7 @@ function Tabs(props) {
36072
36302
  return items();
36073
36303
  },
36074
36304
  children: (item) => (() => {
36075
- var _el$4 = _tmpl$3$7();
36305
+ var _el$4 = _tmpl$3$8();
36076
36306
  insert(_el$4, () => item.panel);
36077
36307
  createRenderEffect((_p$) => {
36078
36308
  var _a, _b;
@@ -36104,12 +36334,12 @@ function Tabs(props) {
36104
36334
  })();
36105
36335
  }
36106
36336
  delegateEvents(["keydown", "click"]);
36107
- var _tmpl$$b = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
36337
+ var _tmpl$$c = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
36108
36338
  function Button(props) {
36109
36339
  const [local, others] = splitProps(props, ["type", "variant", "size", "icon", "iconPosition", "fullWidth", "class", "classList", "children"]);
36110
36340
  const iconPosition = () => local.iconPosition ?? "start";
36111
36341
  return (() => {
36112
- var _el$ = _tmpl$$b(), _el$2 = _el$.firstChild;
36342
+ var _el$ = _tmpl$$c(), _el$2 = _el$.firstChild;
36113
36343
  spread(_el$, mergeProps({
36114
36344
  get type() {
36115
36345
  return local.type ?? "button";
@@ -36154,7 +36384,7 @@ function Button(props) {
36154
36384
  return _el$;
36155
36385
  })();
36156
36386
  }
36157
- var _tmpl$$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$6 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$5 = /* @__PURE__ */ template(`<label><input class=oasis-editor-ui-input>`);
36387
+ var _tmpl$$b = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$7 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$6 = /* @__PURE__ */ template(`<label><input class=oasis-editor-ui-input>`);
36158
36388
  function TextField(props) {
36159
36389
  const fallbackId = createUniqueId();
36160
36390
  const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
@@ -36162,13 +36392,13 @@ function TextField(props) {
36162
36392
  const descriptionId = () => `${id()}-description`;
36163
36393
  const errorId = () => `${id()}-error`;
36164
36394
  return (() => {
36165
- var _el$ = _tmpl$4$5(), _el$3 = _el$.firstChild;
36395
+ var _el$ = _tmpl$4$6(), _el$3 = _el$.firstChild;
36166
36396
  insert(_el$, createComponent(Show, {
36167
36397
  get when() {
36168
36398
  return local.label;
36169
36399
  },
36170
36400
  get children() {
36171
- var _el$2 = _tmpl$$a();
36401
+ var _el$2 = _tmpl$$b();
36172
36402
  insert(_el$2, () => local.label);
36173
36403
  return _el$2;
36174
36404
  }
@@ -36193,7 +36423,7 @@ function TextField(props) {
36193
36423
  return local.description;
36194
36424
  },
36195
36425
  get children() {
36196
- var _el$4 = _tmpl$2$8();
36426
+ var _el$4 = _tmpl$2$9();
36197
36427
  insert(_el$4, () => local.description);
36198
36428
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
36199
36429
  return _el$4;
@@ -36204,7 +36434,7 @@ function TextField(props) {
36204
36434
  return local.error;
36205
36435
  },
36206
36436
  get children() {
36207
- var _el$5 = _tmpl$3$6();
36437
+ var _el$5 = _tmpl$3$7();
36208
36438
  insert(_el$5, () => local.error);
36209
36439
  createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
36210
36440
  return _el$5;
@@ -36223,7 +36453,7 @@ function TextField(props) {
36223
36453
  })();
36224
36454
  }
36225
36455
  delegateEvents(["input"]);
36226
- var _tmpl$$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$7 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$5 = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`);
36456
+ var _tmpl$$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$6 = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`);
36227
36457
  function Checkbox(props) {
36228
36458
  const fallbackId = createUniqueId();
36229
36459
  const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
@@ -36231,7 +36461,7 @@ function Checkbox(props) {
36231
36461
  const descriptionId = () => `${id()}-description`;
36232
36462
  const errorId = () => `${id()}-error`;
36233
36463
  return (() => {
36234
- var _el$ = _tmpl$3$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
36464
+ var _el$ = _tmpl$3$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
36235
36465
  _el$2.addEventListener("change", (event) => {
36236
36466
  var _a;
36237
36467
  return (_a = local.onChange) == null ? void 0 : _a.call(local, event.currentTarget.checked);
@@ -36253,7 +36483,7 @@ function Checkbox(props) {
36253
36483
  return local.description;
36254
36484
  },
36255
36485
  get children() {
36256
- var _el$5 = _tmpl$$9();
36486
+ var _el$5 = _tmpl$$a();
36257
36487
  insert(_el$5, () => local.description);
36258
36488
  createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
36259
36489
  return _el$5;
@@ -36264,7 +36494,7 @@ function Checkbox(props) {
36264
36494
  return local.error;
36265
36495
  },
36266
36496
  get children() {
36267
- var _el$6 = _tmpl$2$7();
36497
+ var _el$6 = _tmpl$2$8();
36268
36498
  insert(_el$6, () => local.error);
36269
36499
  createRenderEffect(() => setAttribute(_el$6, "id", errorId()));
36270
36500
  return _el$6;
@@ -36282,7 +36512,7 @@ function Checkbox(props) {
36282
36512
  return _el$;
36283
36513
  })();
36284
36514
  }
36285
- var _tmpl$$8 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$6 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$4 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$4 = /* @__PURE__ */ template(`<label><select class=oasis-editor-ui-select>`), _tmpl$5$4 = /* @__PURE__ */ template(`<option>`);
36515
+ var _tmpl$$9 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$2$7 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$5 = /* @__PURE__ */ template(`<label><select class=oasis-editor-ui-select>`), _tmpl$5$5 = /* @__PURE__ */ template(`<option>`);
36286
36516
  function SelectField(props) {
36287
36517
  const fallbackId = createUniqueId();
36288
36518
  const [local, others] = splitProps(props, ["label", "description", "error", "options", "onChange", "class", "id"]);
@@ -36290,13 +36520,13 @@ function SelectField(props) {
36290
36520
  const descriptionId = () => `${id()}-description`;
36291
36521
  const errorId = () => `${id()}-error`;
36292
36522
  return (() => {
36293
- var _el$ = _tmpl$4$4(), _el$3 = _el$.firstChild;
36523
+ var _el$ = _tmpl$4$5(), _el$3 = _el$.firstChild;
36294
36524
  insert(_el$, createComponent(Show, {
36295
36525
  get when() {
36296
36526
  return local.label;
36297
36527
  },
36298
36528
  get children() {
36299
- var _el$2 = _tmpl$$8();
36529
+ var _el$2 = _tmpl$$9();
36300
36530
  insert(_el$2, () => local.label);
36301
36531
  return _el$2;
36302
36532
  }
@@ -36321,7 +36551,7 @@ function SelectField(props) {
36321
36551
  return local.options;
36322
36552
  },
36323
36553
  children: (option) => (() => {
36324
- var _el$6 = _tmpl$5$4();
36554
+ var _el$6 = _tmpl$5$5();
36325
36555
  insert(_el$6, () => option.label);
36326
36556
  createRenderEffect(() => _el$6.disabled = option.disabled);
36327
36557
  createRenderEffect(() => _el$6.value = option.value);
@@ -36333,7 +36563,7 @@ function SelectField(props) {
36333
36563
  return local.description;
36334
36564
  },
36335
36565
  get children() {
36336
- var _el$4 = _tmpl$2$6();
36566
+ var _el$4 = _tmpl$2$7();
36337
36567
  insert(_el$4, () => local.description);
36338
36568
  createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
36339
36569
  return _el$4;
@@ -36344,7 +36574,7 @@ function SelectField(props) {
36344
36574
  return local.error;
36345
36575
  },
36346
36576
  get children() {
36347
- var _el$5 = _tmpl$3$4();
36577
+ var _el$5 = _tmpl$3$5();
36348
36578
  insert(_el$5, () => local.error);
36349
36579
  createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
36350
36580
  return _el$5;
@@ -36362,11 +36592,11 @@ function SelectField(props) {
36362
36592
  return _el$;
36363
36593
  })();
36364
36594
  }
36365
- var _tmpl$$7 = /* @__PURE__ */ template(`<div>`);
36595
+ var _tmpl$$8 = /* @__PURE__ */ template(`<div>`);
36366
36596
  function DialogFooter(props) {
36367
36597
  const [local, others] = splitProps(props, ["align", "class", "classList", "children"]);
36368
36598
  return (() => {
36369
- var _el$ = _tmpl$$7();
36599
+ var _el$ = _tmpl$$8();
36370
36600
  spread(_el$, mergeProps({
36371
36601
  get ["class"]() {
36372
36602
  return `oasis-editor-ui-dialog-footer ${local.class ?? ""}`;
@@ -36642,7 +36872,7 @@ const UNDERLINE_STYLE_OPTIONS = [
36642
36872
  }
36643
36873
  }
36644
36874
  ];
36645
- var _tmpl$$6 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$3 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$3 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$2 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
36875
+ var _tmpl$$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$6 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$4 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$4 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
36646
36876
  const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
36647
36877
  const UNDERLINE_BUTTON_TOOLTIP = `${t("toolbar.underline")} (${mod$1}+U)`;
36648
36878
  const TEST_ID = "editor-toolbar-underline";
@@ -36692,14 +36922,14 @@ function UnderlineControl(props) {
36692
36922
  panelRole: "menu",
36693
36923
  get mainContent() {
36694
36924
  return (() => {
36695
- var _el$5 = _tmpl$3$3(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
36925
+ var _el$5 = _tmpl$3$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
36696
36926
  createRenderEffect(() => setAttribute(_el$7, "data-style", indicatorStyle()));
36697
36927
  return _el$5;
36698
36928
  })();
36699
36929
  },
36700
36930
  get children() {
36701
36931
  return [(() => {
36702
- var _el$ = _tmpl$$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
36932
+ var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
36703
36933
  _el$.$$click = () => {
36704
36934
  removeUnderline();
36705
36935
  setOpen(false);
@@ -36707,13 +36937,13 @@ function UnderlineControl(props) {
36707
36937
  insert(_el$3, () => t("toolbar.underlineRemove"));
36708
36938
  return _el$;
36709
36939
  })(), (() => {
36710
- var _el$4 = _tmpl$2$5();
36940
+ var _el$4 = _tmpl$2$6();
36711
36941
  insert(_el$4, createComponent(For, {
36712
36942
  each: UNDERLINE_STYLE_OPTIONS,
36713
36943
  children: (option) => {
36714
36944
  const isActive = () => active() && activeStyleValue() === option.value.toLowerCase();
36715
36945
  return (() => {
36716
- var _el$8 = _tmpl$5$3(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
36946
+ var _el$8 = _tmpl$5$4(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
36717
36947
  _el$8.$$click = () => {
36718
36948
  applyUnderlineStyle(option.value);
36719
36949
  setOpen(false);
@@ -36724,7 +36954,7 @@ function UnderlineControl(props) {
36724
36954
  },
36725
36955
  get fallback() {
36726
36956
  return (() => {
36727
- var _el$10 = _tmpl$6$2();
36957
+ var _el$10 = _tmpl$6$3();
36728
36958
  createRenderEffect((_$p) => style(_el$10, option.preview.borderStyle === "wavy" ? void 0 : {
36729
36959
  "border-bottom-style": option.preview.borderStyle,
36730
36960
  "border-bottom-width": option.preview.borderBottomWidth ?? "1px"
@@ -36733,7 +36963,7 @@ function UnderlineControl(props) {
36733
36963
  })();
36734
36964
  },
36735
36965
  get children() {
36736
- var _el$0 = _tmpl$4$3();
36966
+ var _el$0 = _tmpl$4$4();
36737
36967
  createRenderEffect(() => _el$0.innerHTML = option.preview.svg);
36738
36968
  return _el$0;
36739
36969
  }
@@ -36762,7 +36992,7 @@ function UnderlineControl(props) {
36762
36992
  });
36763
36993
  }
36764
36994
  delegateEvents(["click"]);
36765
- var _tmpl$$5 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$4 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$2 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$2 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$2 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$1 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>`);
36995
+ var _tmpl$$6 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$5 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$3 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$3 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$2 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>`);
36766
36996
  function ListOptionsControl(props) {
36767
36997
  const api = props.api;
36768
36998
  return createComponent(Menu, {
@@ -36783,27 +37013,27 @@ function ListOptionsControl(props) {
36783
37013
  },
36784
37014
  get children() {
36785
37015
  return [(() => {
36786
- var _el$4 = _tmpl$$5();
37016
+ var _el$4 = _tmpl$$6();
36787
37017
  insert(_el$4, () => t("toolbar.formatDecimal"));
36788
37018
  return _el$4;
36789
37019
  })(), (() => {
36790
- var _el$5 = _tmpl$2$4();
37020
+ var _el$5 = _tmpl$2$5();
36791
37021
  insert(_el$5, () => t("toolbar.formatLowerLetter"));
36792
37022
  return _el$5;
36793
37023
  })(), (() => {
36794
- var _el$6 = _tmpl$3$2();
37024
+ var _el$6 = _tmpl$3$3();
36795
37025
  insert(_el$6, () => t("toolbar.formatUpperLetter"));
36796
37026
  return _el$6;
36797
37027
  })(), (() => {
36798
- var _el$7 = _tmpl$4$2();
37028
+ var _el$7 = _tmpl$4$3();
36799
37029
  insert(_el$7, () => t("toolbar.formatLowerRoman"));
36800
37030
  return _el$7;
36801
37031
  })(), (() => {
36802
- var _el$8 = _tmpl$5$2();
37032
+ var _el$8 = _tmpl$5$3();
36803
37033
  insert(_el$8, () => t("toolbar.formatUpperRoman"));
36804
37034
  return _el$8;
36805
37035
  })(), (() => {
36806
- var _el$9 = _tmpl$6$1();
37036
+ var _el$9 = _tmpl$6$2();
36807
37037
  insert(_el$9, () => t("toolbar.formatBullet"));
36808
37038
  return _el$9;
36809
37039
  })()];
@@ -36816,7 +37046,7 @@ function ListOptionsControl(props) {
36816
37046
  }
36817
37047
  });
36818
37048
  }
36819
- var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0.5 step=0.05 data-testid=editor-line-spacing-dialog-line-height>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-before></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-after>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`), _tmpl$4$1 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary"data-testid=editor-line-spacing-dialog-cancel>`), _tmpl$5$1 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary"data-testid=editor-line-spacing-dialog-apply>`);
37049
+ var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0.5 step=0.05 data-testid=editor-line-spacing-dialog-line-height>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-before></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-after>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`), _tmpl$4$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary"data-testid=editor-line-spacing-dialog-cancel>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary"data-testid=editor-line-spacing-dialog-apply>`);
36820
37050
  function LineSpacingDialog(props) {
36821
37051
  const [lineHeight, setLineHeight] = createSignal("");
36822
37052
  const [spacingBefore, setSpacingBefore] = createSignal("");
@@ -36859,12 +37089,12 @@ function LineSpacingDialog(props) {
36859
37089
  },
36860
37090
  get footer() {
36861
37091
  return [(() => {
36862
- var _el$14 = _tmpl$4$1();
37092
+ var _el$14 = _tmpl$4$2();
36863
37093
  addEventListener(_el$14, "click", props.onClose, true);
36864
37094
  insert(_el$14, () => t("generic.cancel"));
36865
37095
  return _el$14;
36866
37096
  })(), (() => {
36867
- var _el$15 = _tmpl$5$1();
37097
+ var _el$15 = _tmpl$5$2();
36868
37098
  _el$15.$$click = handleApply;
36869
37099
  insert(_el$15, () => t("generic.apply"));
36870
37100
  return _el$15;
@@ -36872,13 +37102,13 @@ function LineSpacingDialog(props) {
36872
37102
  },
36873
37103
  get children() {
36874
37104
  return [(() => {
36875
- var _el$ = _tmpl$$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
37105
+ var _el$ = _tmpl$$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
36876
37106
  insert(_el$3, () => t("lineSpacing.lineSpacingLabel"));
36877
37107
  _el$4.$$input = (e) => setLineHeight(e.currentTarget.value);
36878
37108
  createRenderEffect(() => _el$4.value = lineHeight());
36879
37109
  return _el$;
36880
37110
  })(), (() => {
36881
- var _el$5 = _tmpl$2$3(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
37111
+ var _el$5 = _tmpl$2$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
36882
37112
  insert(_el$7, () => t("lineSpacing.spacingBeforeLabel"));
36883
37113
  _el$8.$$input = (e) => setSpacingBefore(e.currentTarget.value);
36884
37114
  insert(_el$0, () => t("lineSpacing.spacingAfterLabel"));
@@ -36887,7 +37117,7 @@ function LineSpacingDialog(props) {
36887
37117
  createRenderEffect(() => _el$1.value = spacingAfter());
36888
37118
  return _el$5;
36889
37119
  })(), (() => {
36890
- var _el$10 = _tmpl$3$1(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild;
37120
+ var _el$10 = _tmpl$3$2(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild;
36891
37121
  insert(_el$11, () => t("lineSpacing.preview"));
36892
37122
  insert(_el$12, () => t("lineSpacing.previewText"), _el$13);
36893
37123
  insert(_el$12, () => t("lineSpacing.previewText"), null);
@@ -36898,7 +37128,7 @@ function LineSpacingDialog(props) {
36898
37128
  });
36899
37129
  }
36900
37130
  delegateEvents(["input", "click"]);
36901
- var _tmpl$$3 = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$2 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-line-spacing-button"aria-haspopup=menu data-testid=editor-toolbar-line-spacing><span class=oasis-editor-line-spacing-icon aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="4 7 7 4 10 7"></polyline><line x1=7 y1=4 x2=7 y2=20></line><polyline points="4 17 7 20 10 17"></polyline><line x1=13 y1=6 x2=21 y2=6></line><line x1=13 y1=12 x2=21 y2=12></line><line x1=13 y1=18 x2=21 y2=18>`), _tmpl$5 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">`), _tmpl$6 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`);
37131
+ var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$3 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$1 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-line-spacing-button"aria-haspopup=menu data-testid=editor-toolbar-line-spacing><span class=oasis-editor-line-spacing-icon aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="4 7 7 4 10 7"></polyline><line x1=7 y1=4 x2=7 y2=20></line><polyline points="4 17 7 20 10 17"></polyline><line x1=13 y1=6 x2=21 y2=6></line><line x1=13 y1=12 x2=21 y2=12></line><line x1=13 y1=18 x2=21 y2=18>`), _tmpl$5$1 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">`), _tmpl$6$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`);
36902
37132
  const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
36903
37133
  function formatPreset(value) {
36904
37134
  return value.toFixed(value === Math.floor(value) ? 1 : 2);
@@ -36955,7 +37185,7 @@ function LineSpacingButton(props) {
36955
37185
  api.focusEditor();
36956
37186
  };
36957
37187
  return (() => {
36958
- var _el$ = _tmpl$3();
37188
+ var _el$ = _tmpl$3$1();
36959
37189
  insert(_el$, createComponent(Popover, {
36960
37190
  get open() {
36961
37191
  return isOpen();
@@ -36964,7 +37194,7 @@ function LineSpacingButton(props) {
36964
37194
  panelRole: "menu",
36965
37195
  panelClass: "oasis-editor-toolbar-dropdown-menu oasis-editor-line-spacing-menu",
36966
37196
  trigger: (popover) => (() => {
36967
- var _el$6 = _tmpl$4();
37197
+ var _el$6 = _tmpl$4$1();
36968
37198
  _el$6.$$click = () => popover.toggle();
36969
37199
  use((el) => popover.ref(el), _el$6);
36970
37200
  createRenderEffect((_p$) => {
@@ -36992,14 +37222,14 @@ function LineSpacingButton(props) {
36992
37222
  return lh !== null && approxEqual(lh, value);
36993
37223
  };
36994
37224
  return (() => {
36995
- var _el$7 = _tmpl$6(), _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
37225
+ var _el$7 = _tmpl$6$1(), _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling;
36996
37226
  _el$7.$$click = () => applyPreset(value);
36997
37227
  insert(_el$8, createComponent(Show, {
36998
37228
  get when() {
36999
37229
  return isActive();
37000
37230
  },
37001
37231
  get children() {
37002
- return _tmpl$5();
37232
+ return _tmpl$5$1();
37003
37233
  }
37004
37234
  }));
37005
37235
  insert(_el$0, label);
@@ -37019,8 +37249,8 @@ function LineSpacingButton(props) {
37019
37249
  return _el$7;
37020
37250
  })();
37021
37251
  }
37022
- }), _tmpl$$3(), (() => {
37023
- var _el$3 = _tmpl$2$2(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
37252
+ }), _tmpl$$4(), (() => {
37253
+ var _el$3 = _tmpl$2$3(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
37024
37254
  _el$3.$$click = openDialog;
37025
37255
  insert(_el$5, () => t("metric.lineSpacingOptions"));
37026
37256
  return _el$3;
@@ -37052,7 +37282,7 @@ function LineSpacingButton(props) {
37052
37282
  })();
37053
37283
  }
37054
37284
  delegateEvents(["click"]);
37055
- var _tmpl$$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-spacing-after min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-left min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-first-line step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-hanging min=0 step=1></label><label class=oasis-editor-tool-color><span></span><input type=color class=oasis-editor-tool-color-input data-testid=editor-toolbar-paragraph-shading>`);
37285
+ var _tmpl$$3 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-spacing-after min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-left min=0 step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-first-line step=1></label><label class=oasis-editor-tool-metric><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-indent-hanging min=0 step=1></label><label class=oasis-editor-tool-color><span></span><input type=color class=oasis-editor-tool-color-input data-testid=editor-toolbar-paragraph-shading>`);
37056
37286
  const numValue = (api, command) => {
37057
37287
  const value = api.commands.state(command).value;
37058
37288
  return value == null ? "" : String(value);
@@ -37071,7 +37301,7 @@ function MetricGroup(props) {
37071
37301
  keepMounted: true,
37072
37302
  get children() {
37073
37303
  return [(() => {
37074
- var _el$ = _tmpl$$2();
37304
+ var _el$ = _tmpl$$3();
37075
37305
  insert(_el$, createComponent(Button$1, {
37076
37306
  icon: "file-up",
37077
37307
  get active() {
@@ -37096,7 +37326,7 @@ function MetricGroup(props) {
37096
37326
  }), null);
37097
37327
  return _el$;
37098
37328
  })(), (() => {
37099
- var _el$2 = _tmpl$2$1(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
37329
+ var _el$2 = _tmpl$2$2(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
37100
37330
  insert(_el$4, () => t("metric.after"));
37101
37331
  addEventListener(_el$5, "change", onNumber("setSpacingAfter"));
37102
37332
  insert(_el$7, () => t("metric.indent"));
@@ -37141,7 +37371,7 @@ function MetricGroup(props) {
37141
37371
  });
37142
37372
  }
37143
37373
  delegateEvents(["input"]);
37144
- var _tmpl$$1 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-badge data-testid=editor-table-selection-label>`);
37374
+ var _tmpl$$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-badge data-testid=editor-table-selection-label>`);
37145
37375
  function TableGroup(props) {
37146
37376
  const api = props.api;
37147
37377
  const disabled = (command) => !api.commands.state(command).isEnabled;
@@ -37157,7 +37387,7 @@ function TableGroup(props) {
37157
37387
  keepMounted: true,
37158
37388
  get children() {
37159
37389
  return [(() => {
37160
- var _el$ = _tmpl$$1();
37390
+ var _el$ = _tmpl$$2();
37161
37391
  insert(_el$, createComponent(Button$1, {
37162
37392
  icon: "combine",
37163
37393
  "data-testid": "editor-toolbar-merge-table",
@@ -37182,7 +37412,7 @@ function TableGroup(props) {
37182
37412
  }), null);
37183
37413
  return _el$;
37184
37414
  })(), (() => {
37185
- var _el$2 = _tmpl$$1();
37415
+ var _el$2 = _tmpl$$2();
37186
37416
  insert(_el$2, createComponent(Button$1, {
37187
37417
  icon: "columns",
37188
37418
  "data-testid": "editor-toolbar-insert-table-column-before",
@@ -37218,7 +37448,7 @@ function TableGroup(props) {
37218
37448
  }), null);
37219
37449
  return _el$2;
37220
37450
  })(), (() => {
37221
- var _el$3 = _tmpl$$1();
37451
+ var _el$3 = _tmpl$$2();
37222
37452
  insert(_el$3, createComponent(Button$1, {
37223
37453
  icon: "rows",
37224
37454
  "data-testid": "editor-toolbar-insert-table-row-before",
@@ -37254,7 +37484,7 @@ function TableGroup(props) {
37254
37484
  }), null);
37255
37485
  return _el$3;
37256
37486
  })(), (() => {
37257
- var _el$4 = _tmpl$$1();
37487
+ var _el$4 = _tmpl$$2();
37258
37488
  insert(_el$4, createComponent(Button$1, {
37259
37489
  icon: "palette",
37260
37490
  "data-testid": "editor-toolbar-table-shading",
@@ -37284,7 +37514,7 @@ function TableGroup(props) {
37284
37514
  }), null);
37285
37515
  return _el$4;
37286
37516
  })(), (() => {
37287
- var _el$5 = _tmpl$$1();
37517
+ var _el$5 = _tmpl$$2();
37288
37518
  insert(_el$5, createComponent(Button$1, {
37289
37519
  icon: "maximize",
37290
37520
  "data-testid": "editor-toolbar-table-width-100",
@@ -37295,7 +37525,7 @@ function TableGroup(props) {
37295
37525
  }));
37296
37526
  return _el$5;
37297
37527
  })(), (() => {
37298
- var _el$6 = _tmpl$$1();
37528
+ var _el$6 = _tmpl$$2();
37299
37529
  insert(_el$6, createComponent(Button$1, {
37300
37530
  icon: "align-left",
37301
37531
  "data-testid": "editor-toolbar-table-align-left",
@@ -37337,7 +37567,7 @@ function TableGroup(props) {
37337
37567
  return selectionLabel();
37338
37568
  },
37339
37569
  children: (label) => (() => {
37340
- var _el$7 = _tmpl$2();
37570
+ var _el$7 = _tmpl$2$1();
37341
37571
  insert(_el$7, label);
37342
37572
  return _el$7;
37343
37573
  })()
@@ -37345,7 +37575,7 @@ function TableGroup(props) {
37345
37575
  }
37346
37576
  });
37347
37577
  }
37348
- var _tmpl$ = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
37578
+ var _tmpl$$1 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
37349
37579
  function SectionGroup(props) {
37350
37580
  const api = props.api;
37351
37581
  return createComponent(Menu, {
@@ -37359,7 +37589,7 @@ function SectionGroup(props) {
37359
37589
  keepMounted: true,
37360
37590
  get children() {
37361
37591
  return [(() => {
37362
- var _el$ = _tmpl$();
37592
+ var _el$ = _tmpl$$1();
37363
37593
  insert(_el$, createComponent(Button$1, {
37364
37594
  icon: "rectangle-vertical",
37365
37595
  get active() {
@@ -37390,7 +37620,7 @@ function SectionGroup(props) {
37390
37620
  }), null);
37391
37621
  return _el$;
37392
37622
  })(), (() => {
37393
- var _el$2 = _tmpl$();
37623
+ var _el$2 = _tmpl$$1();
37394
37624
  insert(_el$2, createComponent(Button$1, {
37395
37625
  icon: "scissors",
37396
37626
  "data-testid": "editor-toolbar-section-break-next",
@@ -37412,6 +37642,202 @@ function SectionGroup(props) {
37412
37642
  }
37413
37643
  });
37414
37644
  }
37645
+ const CM_TO_PX = 96 / 2.54;
37646
+ function cmToPx(cm) {
37647
+ return Math.round(cm * CM_TO_PX);
37648
+ }
37649
+ function pxToCm(px) {
37650
+ return Math.round(px / CM_TO_PX * 100) / 100;
37651
+ }
37652
+ const MARGIN_PRESETS = [
37653
+ {
37654
+ id: "normal",
37655
+ labelKey: "section.marginPreset.normal",
37656
+ top: 2.5,
37657
+ bottom: 2.5,
37658
+ left: 3,
37659
+ right: 3
37660
+ },
37661
+ {
37662
+ id: "narrow",
37663
+ labelKey: "section.marginPreset.narrow",
37664
+ top: 1.27,
37665
+ bottom: 1.27,
37666
+ left: 1.27,
37667
+ right: 1.27
37668
+ },
37669
+ {
37670
+ id: "moderate",
37671
+ labelKey: "section.marginPreset.moderate",
37672
+ top: 2.54,
37673
+ bottom: 2.54,
37674
+ left: 1.91,
37675
+ right: 1.91
37676
+ },
37677
+ {
37678
+ id: "wide",
37679
+ labelKey: "section.marginPreset.wide",
37680
+ top: 2.54,
37681
+ bottom: 2.54,
37682
+ left: 5.08,
37683
+ right: 5.08
37684
+ },
37685
+ {
37686
+ id: "mirrored",
37687
+ labelKey: "section.marginPreset.mirrored",
37688
+ top: 2.54,
37689
+ bottom: 2.54,
37690
+ left: 3.18,
37691
+ right: 2.54
37692
+ }
37693
+ ];
37694
+ function presetMarginsPx(preset) {
37695
+ return {
37696
+ top: cmToPx(preset.top),
37697
+ bottom: cmToPx(preset.bottom),
37698
+ left: cmToPx(preset.left),
37699
+ right: cmToPx(preset.right)
37700
+ };
37701
+ }
37702
+ function marginsMatchPreset(margins, preset) {
37703
+ const target = presetMarginsPx(preset);
37704
+ return Math.abs(margins.top - target.top) <= 1 && Math.abs(margins.bottom - target.bottom) <= 1 && Math.abs(margins.left - target.left) <= 1 && Math.abs(margins.right - target.right) <= 1;
37705
+ }
37706
+ var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>`), _tmpl$4 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>`), _tmpl$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>`), _tmpl$6 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
37707
+ const FIELDS = [{
37708
+ key: "top",
37709
+ labelKey: "section.marginField.top"
37710
+ }, {
37711
+ key: "bottom",
37712
+ labelKey: "section.marginField.bottom"
37713
+ }, {
37714
+ key: "left",
37715
+ labelKey: "section.marginField.left"
37716
+ }, {
37717
+ key: "right",
37718
+ labelKey: "section.marginField.right"
37719
+ }];
37720
+ function formatCm(cm) {
37721
+ return t("section.marginValue", [String(cm).replace(".", t("number.decimalSeparator"))]);
37722
+ }
37723
+ function MarginsGroup(props) {
37724
+ const api = props.api;
37725
+ const [showCustom, setShowCustom] = createSignal(false);
37726
+ const [draft, setDraft] = createSignal({});
37727
+ const current = createMemo(() => api.commands.state("setPageMargins").value);
37728
+ const activePresetId = createMemo(() => {
37729
+ var _a;
37730
+ const margins = current();
37731
+ if (!margins) return void 0;
37732
+ return (_a = MARGIN_PRESETS.find((preset) => marginsMatchPreset(margins, preset))) == null ? void 0 : _a.id;
37733
+ });
37734
+ const applyPreset = (preset) => {
37735
+ api.commands.execute("setPageMargins", presetMarginsPx(preset));
37736
+ api.focusEditor();
37737
+ };
37738
+ const openCustom = () => {
37739
+ const margins = current();
37740
+ setDraft({
37741
+ top: margins ? String(pxToCm(margins.top)) : "",
37742
+ bottom: margins ? String(pxToCm(margins.bottom)) : "",
37743
+ left: margins ? String(pxToCm(margins.left)) : "",
37744
+ right: margins ? String(pxToCm(margins.right)) : ""
37745
+ });
37746
+ setShowCustom((v) => !v);
37747
+ };
37748
+ const applyCustom = () => {
37749
+ const d = draft();
37750
+ const payload = {};
37751
+ for (const {
37752
+ key
37753
+ } of FIELDS) {
37754
+ const raw = d[key];
37755
+ if (raw == null || raw === "") continue;
37756
+ const cm = Number(raw.replace(",", "."));
37757
+ if (Number.isFinite(cm) && cm >= 0) payload[key] = cmToPx(cm);
37758
+ }
37759
+ if (Object.keys(payload).length > 0) {
37760
+ api.commands.execute("setPageMargins", payload);
37761
+ }
37762
+ api.focusEditor();
37763
+ };
37764
+ return createComponent(Menu, {
37765
+ icon: "square-dashed",
37766
+ get label() {
37767
+ return t("section.margins");
37768
+ },
37769
+ testId: "editor-toolbar-margins-dropdown",
37770
+ get tooltip() {
37771
+ return t("section.margins");
37772
+ },
37773
+ panelClass: "oasis-editor-toolbar-panel oasis-editor-margins-panel",
37774
+ keepMounted: true,
37775
+ get children() {
37776
+ return [(() => {
37777
+ var _el$ = _tmpl$();
37778
+ insert(_el$, createComponent(For, {
37779
+ each: MARGIN_PRESETS,
37780
+ children: (preset) => (() => {
37781
+ var _el$9 = _tmpl$5(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
37782
+ _el$9.$$click = () => applyPreset(preset);
37783
+ insert(_el$0, () => t(preset.labelKey));
37784
+ insert(_el$1, () => `${t("section.marginField.top")} ${formatCm(preset.top)} ${t("section.marginField.bottom")} ${formatCm(preset.bottom)}`, _el$10);
37785
+ insert(_el$1, () => `${t("section.marginField.left")} ${formatCm(preset.left)} ${t("section.marginField.right")} ${formatCm(preset.right)}`, null);
37786
+ createRenderEffect((_p$) => {
37787
+ var _v$ = !!(activePresetId() === preset.id), _v$2 = `editor-toolbar-margins-${preset.id}`;
37788
+ _v$ !== _p$.e && _el$9.classList.toggle("oasis-editor-margins-item-active", _p$.e = _v$);
37789
+ _v$2 !== _p$.t && setAttribute(_el$9, "data-testid", _p$.t = _v$2);
37790
+ return _p$;
37791
+ }, {
37792
+ e: void 0,
37793
+ t: void 0
37794
+ });
37795
+ return _el$9;
37796
+ })()
37797
+ }));
37798
+ return _el$;
37799
+ })(), (() => {
37800
+ var _el$2 = _tmpl$3(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
37801
+ _el$3.$$click = openCustom;
37802
+ insert(_el$5, () => t("section.marginPreset.custom"));
37803
+ insert(_el$2, createComponent(Show, {
37804
+ get when() {
37805
+ return showCustom();
37806
+ },
37807
+ get children() {
37808
+ var _el$6 = _tmpl$2();
37809
+ insert(_el$6, createComponent(For, {
37810
+ each: FIELDS,
37811
+ children: (field) => (() => {
37812
+ var _el$11 = _tmpl$6(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
37813
+ insert(_el$12, () => t(field.labelKey));
37814
+ _el$13.$$input = (e) => setDraft((d) => ({
37815
+ ...d,
37816
+ [field.key]: e.currentTarget.value
37817
+ }));
37818
+ createRenderEffect(() => _el$13.value = draft()[field.key] ?? "");
37819
+ return _el$11;
37820
+ })()
37821
+ }));
37822
+ return _el$6;
37823
+ }
37824
+ }), null);
37825
+ return _el$2;
37826
+ })(), createComponent(Show, {
37827
+ get when() {
37828
+ return showCustom();
37829
+ },
37830
+ get children() {
37831
+ var _el$7 = _tmpl$4(), _el$8 = _el$7.firstChild;
37832
+ _el$8.$$click = applyCustom;
37833
+ insert(_el$8, () => t("section.marginApply"));
37834
+ return _el$7;
37835
+ }
37836
+ })];
37837
+ }
37838
+ });
37839
+ }
37840
+ delegateEvents(["click", "input"]);
37415
37841
  const mod = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
37416
37842
  const documentStyles = (api) => api.commands.state("documentStyles").value ?? [];
37417
37843
  const fontFamilyOptions = (api) => {
@@ -37555,6 +37981,7 @@ const RIBBON_PLACEMENTS = {
37555
37981
  "sep-metrics": { tab: "layout", group: "paragraph", row: 2 },
37556
37982
  "editor-toolbar-table": { tab: "layout", group: "table", row: 1 },
37557
37983
  "sep-table": { tab: "layout", group: "table", row: 2 },
37984
+ "editor-toolbar-margins": { tab: "layout", group: "section", row: 1 },
37558
37985
  "editor-toolbar-section": { tab: "layout", group: "section", row: 1 }
37559
37986
  };
37560
37987
  function withDefaultRibbonPlacement(items) {
@@ -38057,6 +38484,11 @@ function createDefaultToolbarPreset() {
38057
38484
  id: "sep-table",
38058
38485
  isVisible: (api) => api.commands.state("tableContext").isActive
38059
38486
  });
38487
+ items.push({
38488
+ type: "custom",
38489
+ id: "editor-toolbar-margins",
38490
+ render: (api) => MarginsGroup({ api })
38491
+ });
38060
38492
  items.push({
38061
38493
  type: "custom",
38062
38494
  id: "editor-toolbar-section",
@@ -38171,7 +38603,7 @@ export {
38171
38603
  imageExtensionFromMime as Z,
38172
38604
  pxToPt as _,
38173
38605
  getParagraphLength as a,
38174
- Show as a$,
38606
+ CaretOverlay as a$,
38175
38607
  buildCanvasTableLayout as a0,
38176
38608
  resolveFloatingObjectRect as a1,
38177
38609
  getTextBoxFloatingGeometry as a2,
@@ -38182,33 +38614,33 @@ export {
38182
38614
  DEFAULT_FONT_SIZE_PX as a7,
38183
38615
  isDoubleUnderlineStyle as a8,
38184
38616
  isWavyUnderlineStyle as a9,
38185
- formatFontSizePt as aA,
38186
- listKindForTag as aB,
38187
- isParagraphTag as aC,
38188
- collectInlineRuns as aD,
38189
- parseParagraphStyle as aE,
38190
- t as aF,
38191
- preciseFontModeVersion as aG,
38192
- isPreciseFontModeEnabled as aH,
38193
- togglePreciseFontMode as aI,
38194
- nextFontSizePt as aJ,
38195
- previousFontSizePt as aK,
38196
- fontSizePtToPx as aL,
38197
- createDefaultToolbarPreset as aM,
38198
- defaultMenuItems as aN,
38199
- MenuRegistry as aO,
38200
- createToolbarRegistry as aP,
38201
- Editor as aQ,
38202
- resolveCommandRef as aR,
38203
- commandRefName as aS,
38204
- InlineShell as aT,
38205
- BalloonShell as aU,
38206
- DocumentShell as aV,
38207
- createMemo as aW,
38208
- getCaretRectFromSnapshot as aX,
38209
- getParagraphRectFromSnapshot as aY,
38210
- createComponent as aZ,
38211
- CaretOverlay as a_,
38617
+ parseFontSizePtToPx as aA,
38618
+ formatFontSizePt as aB,
38619
+ listKindForTag as aC,
38620
+ isParagraphTag as aD,
38621
+ collectInlineRuns as aE,
38622
+ parseParagraphStyle as aF,
38623
+ t as aG,
38624
+ preciseFontModeVersion as aH,
38625
+ isPreciseFontModeEnabled as aI,
38626
+ togglePreciseFontMode as aJ,
38627
+ nextFontSizePt as aK,
38628
+ previousFontSizePt as aL,
38629
+ fontSizePtToPx as aM,
38630
+ createDefaultToolbarPreset as aN,
38631
+ defaultMenuItems as aO,
38632
+ MenuRegistry as aP,
38633
+ createToolbarRegistry as aQ,
38634
+ Editor as aR,
38635
+ resolveCommandRef as aS,
38636
+ commandRefName as aT,
38637
+ InlineShell as aU,
38638
+ BalloonShell as aV,
38639
+ DocumentShell as aW,
38640
+ createMemo as aX,
38641
+ getCaretRectFromSnapshot as aY,
38642
+ getParagraphRectFromSnapshot as aZ,
38643
+ createComponent as a_,
38212
38644
  underlineStyleLineWidthPx as aa,
38213
38645
  underlineStyleDashArray as ab,
38214
38646
  getListLabelInset as ac,
@@ -38224,98 +38656,99 @@ export {
38224
38656
  projectDocumentLayout as am,
38225
38657
  getPageHeaderZoneTop as an,
38226
38658
  getPageBodyTop as ao,
38227
- findFootnoteReference as ap,
38228
- FOOTNOTE_MARKER_GUTTER_PX as aq,
38229
- resolveImporterForFile as ar,
38230
- createEditorStateFromDocument as as,
38231
- getDocumentParagraphsCanonical as at,
38232
- getToolbarStyleState as au,
38233
- STANDARD_FONT_SIZES_PT as av,
38234
- fontSizePxToPt as aw,
38235
- probeLocalFontFamilies as ax,
38236
- createInitialEditorState as ay,
38237
- parseFontSizePtToPx as az,
38659
+ getPageColumnRects as ap,
38660
+ findFootnoteReference as aq,
38661
+ FOOTNOTE_MARKER_GUTTER_PX as ar,
38662
+ resolveImporterForFile as as,
38663
+ createEditorStateFromDocument as at,
38664
+ getDocumentParagraphsCanonical as au,
38665
+ getToolbarStyleState as av,
38666
+ STANDARD_FONT_SIZES_PT as aw,
38667
+ fontSizePxToPt as ax,
38668
+ probeLocalFontFamilies as ay,
38669
+ createInitialEditorState as az,
38238
38670
  createEditorRun as b,
38239
- RIBBON_TAB_DEFINITIONS as b$,
38240
- createRenderEffect as b0,
38241
- style as b1,
38242
- setAttribute as b2,
38243
- setStyleProperty as b3,
38244
- memo as b4,
38245
- template as b5,
38246
- insert as b6,
38247
- use as b7,
38248
- addEventListener as b8,
38249
- Dialog as b9,
38250
- applyStoredPreciseFontPreference as bA,
38251
- getWelcomeSeen as bB,
38252
- isLocalFontAccessSupported as bC,
38253
- EDITOR_SCROLL_PADDING_PX as bD,
38254
- Toolbar as bE,
38255
- OasisEditorLoading as bF,
38256
- createEditorLogger as bG,
38257
- getCachedCanvasImage as bH,
38258
- registerDomStatsSurface as bI,
38259
- Button as bJ,
38260
- Checkbox as bK,
38261
- ColorPicker as bL,
38262
- CommandRegistry as bM,
38263
- DEFAULT_PALETTE as bN,
38264
- DialogFooter as bO,
38265
- FloatingActionButton as bP,
38266
- GridPicker as bQ,
38267
- IconButton as bR,
38268
- Menu as bS,
38269
- OASIS_BUILTIN_COMMANDS as bT,
38270
- OASIS_MENU_ITEMS as bU,
38271
- OASIS_TOOLBAR_ITEMS as bV,
38272
- OasisEditorAppLazy as bW,
38273
- OasisEditorContainer as bX,
38274
- PluginCollection as bY,
38275
- Popover as bZ,
38276
- RIBBON_TABS as b_,
38277
- delegateEvents as ba,
38278
- className as bb,
38279
- For as bc,
38280
- UNDERLINE_STYLE_OPTIONS as bd,
38281
- Tabs as be,
38282
- measureParagraphMinContentWidthPx as bf,
38283
- getEditableBlocksForZone as bg,
38284
- findParagraphLocation as bh,
38285
- createSectionBoundaryParagraph as bi,
38286
- normalizePageSettings as bj,
38287
- DEFAULT_EDITOR_PAGE_SETTINGS as bk,
38288
- markStart as bl,
38289
- markEnd as bm,
38290
- getParagraphEntries as bn,
38291
- getParagraphById as bo,
38292
- PluginUiHost as bp,
38293
- OasisEditorEditor as bq,
38294
- perfTimer as br,
38295
- OasisBrandMark as bs,
38296
- setPreciseFontPreference as bt,
38297
- setWelcomeSeen as bu,
38298
- enablePreciseFontMode as bv,
38299
- createOasisEditorClient as bw,
38300
- setLocale as bx,
38301
- startLongTaskObserver as by,
38302
- installGlobalReport as bz,
38671
+ RIBBON_TABS as b$,
38672
+ Show as b0,
38673
+ createRenderEffect as b1,
38674
+ style as b2,
38675
+ setAttribute as b3,
38676
+ setStyleProperty as b4,
38677
+ memo as b5,
38678
+ template as b6,
38679
+ insert as b7,
38680
+ use as b8,
38681
+ addEventListener as b9,
38682
+ installGlobalReport as bA,
38683
+ applyStoredPreciseFontPreference as bB,
38684
+ getWelcomeSeen as bC,
38685
+ isLocalFontAccessSupported as bD,
38686
+ EDITOR_SCROLL_PADDING_PX as bE,
38687
+ Toolbar as bF,
38688
+ OasisEditorLoading as bG,
38689
+ createEditorLogger as bH,
38690
+ getCachedCanvasImage as bI,
38691
+ registerDomStatsSurface as bJ,
38692
+ Button as bK,
38693
+ Checkbox as bL,
38694
+ ColorPicker as bM,
38695
+ CommandRegistry as bN,
38696
+ DEFAULT_PALETTE as bO,
38697
+ DialogFooter as bP,
38698
+ FloatingActionButton as bQ,
38699
+ GridPicker as bR,
38700
+ IconButton as bS,
38701
+ Menu as bT,
38702
+ OASIS_BUILTIN_COMMANDS as bU,
38703
+ OASIS_MENU_ITEMS as bV,
38704
+ OASIS_TOOLBAR_ITEMS as bW,
38705
+ OasisEditorAppLazy as bX,
38706
+ OasisEditorContainer as bY,
38707
+ PluginCollection as bZ,
38708
+ Popover as b_,
38709
+ Dialog as ba,
38710
+ delegateEvents as bb,
38711
+ className as bc,
38712
+ For as bd,
38713
+ UNDERLINE_STYLE_OPTIONS as be,
38714
+ Tabs as bf,
38715
+ measureParagraphMinContentWidthPx as bg,
38716
+ getEditableBlocksForZone as bh,
38717
+ findParagraphLocation as bi,
38718
+ createSectionBoundaryParagraph as bj,
38719
+ normalizePageSettings as bk,
38720
+ DEFAULT_EDITOR_PAGE_SETTINGS as bl,
38721
+ markStart as bm,
38722
+ markEnd as bn,
38723
+ getParagraphEntries as bo,
38724
+ getParagraphById as bp,
38725
+ PluginUiHost as bq,
38726
+ OasisEditorEditor as br,
38727
+ perfTimer as bs,
38728
+ OasisBrandMark as bt,
38729
+ setPreciseFontPreference as bu,
38730
+ setWelcomeSeen as bv,
38731
+ enablePreciseFontMode as bw,
38732
+ createOasisEditorClient as bx,
38733
+ setLocale as by,
38734
+ startLongTaskObserver as bz,
38303
38735
  createEditorParagraphFromRuns as c,
38304
- Select as c0,
38305
- SelectField as c1,
38306
- Separator as c2,
38307
- SidePanel as c3,
38308
- SidePanelBody as c4,
38309
- SidePanelFooter as c5,
38310
- SidePanelHeader as c6,
38311
- SplitButton as c7,
38312
- TextField as c8,
38313
- Button$1 as c9,
38314
- createEditorCommandBus as ca,
38315
- createOasisEditor as cb,
38316
- createOasisEditorContainer as cc,
38317
- mount as cd,
38318
- registerToolbarRenderer as ce,
38736
+ RIBBON_TAB_DEFINITIONS as c0,
38737
+ Select as c1,
38738
+ SelectField as c2,
38739
+ Separator as c3,
38740
+ SidePanel as c4,
38741
+ SidePanelBody as c5,
38742
+ SidePanelFooter as c6,
38743
+ SidePanelHeader as c7,
38744
+ SplitButton as c8,
38745
+ TextField as c9,
38746
+ Button$1 as ca,
38747
+ createEditorCommandBus as cb,
38748
+ createOasisEditor as cc,
38749
+ createOasisEditorContainer as cd,
38750
+ mount as ce,
38751
+ registerToolbarRenderer as cf,
38319
38752
  getDocumentSections as d,
38320
38753
  createEditorStyledRun as e,
38321
38754
  getParagraphText as f,