@stll/folio-vue 0.31.0 → 0.32.1

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.
@@ -1,4 +1,4 @@
1
- import { A as e, D as t, F as n, O as r, y as i } from "./SplitCellDialog-DULmbU_P.js";
1
+ import { A as e, D as t, I as n, O as r, y as i } from "./SplitCellDialog-BczVYfpm.js";
2
2
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
3
3
  import { DISPLAY_MODES as I } from "@stll/folio-core/managers/EditorModeManager";
4
4
  import { PANEL_METRICS as L } from "@stll/folio-core/panel-layout";
@@ -6,16 +6,16 @@ import { NO_LIST_STATE as ee, listStateLevel as R } from "@stll/folio-core/prose
6
6
  import { executeEditorCommand as z } from "@stll/folio-core/prosemirror/executeEditorCommand";
7
7
  import { getTableContext as B } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
8
8
  import { extractSelectionContext as te } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
9
- import { redoDepth as ne, undoDepth as V } from "prosemirror-history";
10
- import { getFindParagraphText as H } from "@stll/folio-core/utils/findReplace";
11
- import { clearFormatting as re } from "@stll/folio-core/prosemirror/commands/formatting";
9
+ import { getFindParagraphText as V } from "@stll/folio-core/utils/findReplace";
10
+ import { clearFormatting as H } from "@stll/folio-core/prosemirror/commands/formatting";
12
11
  import { sliceText as U } from "@stll/folio-core/utils/sliceText";
13
- import { createRenderedDomContext as ie } from "@stll/folio-core/render-dom/RenderedDomContext";
14
- import { commentAnchorSelector as W, indexCommentAnchors as ae } from "@stll/folio-core/render-dom/commentAnchorAttributes";
15
- import { pixelsToTwips as G, twipsToPixels as K } from "@stll/folio-core/utils/units";
16
- import { onDocumentPointerDown as q } from "@stll/folio-core/utils/documentPointerDown";
17
- import { clampRulerValue as J, createRulerControl as Y, getHorizontalRulerBounds as oe, getVerticalRulerBounds as X } from "@stll/folio-core/utils/rulerControl";
18
- import { resolveSidebarItemPositions as Z } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
12
+ import { createRenderedDomContext as ne } from "@stll/folio-core/render-dom/RenderedDomContext";
13
+ import { commentAnchorSelector as W, indexCommentAnchors as G } from "@stll/folio-core/render-dom/commentAnchorAttributes";
14
+ import { pixelsToTwips as re, twipsToPixels as K } from "@stll/folio-core/utils/units";
15
+ import { redoDepth as q, undoDepth as ie } from "prosemirror-history";
16
+ import { onDocumentPointerDown as J } from "@stll/folio-core/utils/documentPointerDown";
17
+ import { clampRulerValue as Y, createRulerControl as X, getHorizontalRulerBounds as ae, getVerticalRulerBounds as Z } from "@stll/folio-core/utils/rulerControl";
18
+ import { resolveSidebarItemPositions as oe } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
19
19
  // src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
20
20
  var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
21
21
  __name: "CommentMarginMarkers",
@@ -33,7 +33,7 @@ var se = ["title", "onClick"], ce = /*#__PURE__*/ e(/* @__PURE__ */ p({
33
33
  if (t.sidebarOpen) return [];
34
34
  let e = t.pagesContainer;
35
35
  if (!e) return [];
36
- let n = e.getBoundingClientRect(), r = ae(e), i = [];
36
+ let n = e.getBoundingClientRect(), r = G(e), i = [];
37
37
  for (let a of t.comments) {
38
38
  if (a.parentId != null) continue;
39
39
  let o = r.get(String(a.id));
@@ -521,7 +521,7 @@ function Ae(e) {
521
521
  }
522
522
  let l;
523
523
  return y(() => {
524
- l = q(document, c);
524
+ l = J(document, c);
525
525
  }), v(() => l?.()), {
526
526
  openDropdown: t,
527
527
  dropdownMenuStyle: a,
@@ -1019,7 +1019,7 @@ var Fe = ["title", "onClick"], Ie = {
1019
1019
  "image-transform"
1020
1020
  ],
1021
1021
  setup(e, { emit: t }) {
1022
- let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Se), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), L = S(null), { openDropdown: B, dropdownMenuStyle: H, toggleDropdown: U, recomputeDropdownPos: ie } = Ae({
1022
+ let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Se), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), L = S(null), { openDropdown: B, dropdownMenuStyle: V, toggleDropdown: U, recomputeDropdownPos: ne } = Ae({
1023
1023
  zoom: L,
1024
1024
  style: A,
1025
1025
  font: j,
@@ -1041,32 +1041,32 @@ var Fe = ["title", "onClick"], Ie = {
1041
1041
  inInsertion: !1,
1042
1042
  inDeletion: !1
1043
1043
  };
1044
- }), ae = o(() => {
1044
+ }), G = o(() => {
1045
1045
  let e = W.value.textFormatting.fontFamily;
1046
1046
  return e?.ascii || e?.hAnsi || "Arial";
1047
- }), G = o(() => {
1047
+ }), re = o(() => {
1048
1048
  let e = W.value.textFormatting.fontSize;
1049
1049
  return e ? e / 2 : 11;
1050
- }), K = o(() => W.value.paragraphFormatting.alignment || "left"), q = o(() => {
1050
+ }), K = o(() => W.value.paragraphFormatting.alignment || "left"), J = o(() => {
1051
1051
  switch (K.value) {
1052
1052
  case "center": return "format_align_center";
1053
1053
  case "right": return "format_align_right";
1054
1054
  case "both": return "format_align_justify";
1055
1055
  default: return "format_align_left";
1056
1056
  }
1057
- }), { resolvedParagraphStyles: J, currentStyleLabel: Y } = ke({
1057
+ }), { resolvedParagraphStyles: Y, currentStyleLabel: X } = ke({
1058
1058
  documentStyles: () => m.documentStyles,
1059
1059
  currentStyleId: () => W.value.paragraphFormatting.styleId || "Normal",
1060
1060
  t: h
1061
- }), oe = o(() => {
1061
+ }), ae = o(() => {
1062
1062
  if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
1063
1063
  let e = m.view;
1064
- return e ? V(e.state) > 0 : !1;
1065
- }), X = o(() => {
1064
+ return e ? ie(e.state) > 0 : !1;
1065
+ }), Z = o(() => {
1066
1066
  if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
1067
1067
  let e = m.view;
1068
- return e ? ne(e.state) > 0 : !1;
1069
- }), Z = o(() => {
1068
+ return e ? q(e.state) > 0 : !1;
1069
+ }), oe = o(() => {
1070
1070
  let e = W.value, t = R(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
1071
1071
  return t || n;
1072
1072
  }), se = o(() => {
@@ -1118,9 +1118,9 @@ var Fe = ["title", "onClick"], Ie = {
1118
1118
  $("setFontFamily", e);
1119
1119
  }
1120
1120
  let { onSizeFocus: me, onSizeInput: he, commitFontSize: ge, pickFontSize: _e, increaseFontSize: be, decreaseFontSize: Ce } = je({
1121
- currentFontSize: G,
1121
+ currentFontSize: re,
1122
1122
  openDropdown: B,
1123
- recomputeDropdownPos: ie,
1123
+ recomputeDropdownPos: ne,
1124
1124
  execCommand: $
1125
1125
  });
1126
1126
  function we(e) {
@@ -1128,7 +1128,7 @@ var Fe = ["title", "onClick"], Ie = {
1128
1128
  }
1129
1129
  function Te() {
1130
1130
  let e = m.view;
1131
- e && (z(e, re), e.hasFocus() || e.focus());
1131
+ e && (z(e, H), e.hasFocus() || e.focus());
1132
1132
  }
1133
1133
  function Ee(e) {
1134
1134
  $("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
@@ -1147,13 +1147,13 @@ var Fe = ["title", "onClick"], Ie = {
1147
1147
  u("button", {
1148
1148
  title: O(h)("undoShortcut"),
1149
1149
  "aria-label": O(h)("undo"),
1150
- disabled: !oe.value,
1150
+ disabled: !ae.value,
1151
1151
  onMousedown: F(de, ["prevent"])
1152
1152
  }, [f(r, { name: "undo" })], 40, it),
1153
1153
  u("button", {
1154
1154
  title: O(h)("redoShortcut"),
1155
1155
  "aria-label": O(h)("redo"),
1156
- disabled: !X.value,
1156
+ disabled: !Z.value,
1157
1157
  onMousedown: F(fe, ["prevent"])
1158
1158
  }, [f(r, { name: "redo" })], 40, at),
1159
1159
  n[43] ||= u("span", { class: "divider" }, null, -1),
@@ -1188,7 +1188,7 @@ var Fe = ["title", "onClick"], Ie = {
1188
1188
  }, " + ", 40, ct),
1189
1189
  O(B) === "zoom" ? (b(), l("div", {
1190
1190
  key: 0,
1191
- style: _(O(H)),
1191
+ style: _(O(V)),
1192
1192
  class: "toolbar-dropdown__menu zoom-menu"
1193
1193
  }, [(b(!0), l(a, null, C(D.value, (e) => (b(), l("button", {
1194
1194
  key: e,
@@ -1207,15 +1207,15 @@ var Fe = ["title", "onClick"], Ie = {
1207
1207
  "aria-expanded": O(B) === "style",
1208
1208
  "aria-haspopup": "listbox",
1209
1209
  title: O(h)("styles.selectAriaLabel")
1210
- }, [d(E(O(Y)) + " ", 1), f(r, {
1210
+ }, [d(E(O(X)) + " ", 1), f(r, {
1211
1211
  class: "chevron",
1212
1212
  name: "arrow_drop_down",
1213
1213
  size: 16
1214
1214
  })], 40, ut), O(B) === "style" ? (b(), l("div", {
1215
1215
  key: 0,
1216
- style: _(O(H)),
1216
+ style: _(O(V)),
1217
1217
  class: "toolbar-dropdown__menu style-menu"
1218
- }, [(b(!0), l(a, null, C(O(J), (e) => (b(), l("button", {
1218
+ }, [(b(!0), l(a, null, C(O(Y), (e) => (b(), l("button", {
1219
1219
  key: e.id,
1220
1220
  class: g(["toolbar-dropdown__item", { active: (W.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1221
1221
  onMousedown: F((t) => De(e.id), ["prevent"])
@@ -1231,17 +1231,17 @@ var Fe = ["title", "onClick"], Ie = {
1231
1231
  "aria-expanded": O(B) === "font",
1232
1232
  "aria-haspopup": "listbox",
1233
1233
  title: O(h)("font.selectAriaLabel")
1234
- }, [d(E(ae.value) + " ", 1), f(r, {
1234
+ }, [d(E(G.value) + " ", 1), f(r, {
1235
1235
  class: "chevron",
1236
1236
  name: "arrow_drop_down",
1237
1237
  size: 16
1238
1238
  })], 40, ft), O(B) === "font" ? (b(), l("div", {
1239
1239
  key: 0,
1240
- style: _(O(H)),
1240
+ style: _(O(V)),
1241
1241
  class: "toolbar-dropdown__menu font-menu"
1242
1242
  }, [(b(!0), l(a, null, C(ue.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", pt, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
1243
1243
  key: e.name,
1244
- class: g(["toolbar-dropdown__item", { active: ae.value === e.name }]),
1244
+ class: g(["toolbar-dropdown__item", { active: G.value === e.name }]),
1245
1245
  style: _({ fontFamily: e.fontFamily }),
1246
1246
  onMousedown: F((t) => pe(e.name), ["prevent"])
1247
1247
  }, E(e.name), 47, mt))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
@@ -1258,7 +1258,7 @@ var Fe = ["title", "onClick"], Ie = {
1258
1258
  u("input", {
1259
1259
  class: "size-trigger size-input",
1260
1260
  type: "text",
1261
- value: G.value,
1261
+ value: re.value,
1262
1262
  title: O(h)("fontSize"),
1263
1263
  onMousedown: n[6] ||= F(() => {}, ["stop"]),
1264
1264
  onFocus: n[7] ||= (...e) => O(me) && O(me)(...e),
@@ -1279,11 +1279,11 @@ var Fe = ["title", "onClick"], Ie = {
1279
1279
  }, " + ", 40, _t),
1280
1280
  O(B) === "size" ? (b(), l("div", {
1281
1281
  key: 0,
1282
- style: _(O(H)),
1282
+ style: _(O(V)),
1283
1283
  class: "toolbar-dropdown__menu size-menu"
1284
1284
  }, [(b(!0), l(a, null, C(O(ye), (e) => (b(), l("button", {
1285
1285
  key: e,
1286
- class: g(["toolbar-dropdown__item", { active: G.value === e }]),
1286
+ class: g(["toolbar-dropdown__item", { active: re.value === e }]),
1287
1287
  onMousedown: F((t) => O(_e)(e), ["prevent"])
1288
1288
  }, E(e), 43, vt))), 128))], 4)) : c("", !0)
1289
1289
  ], 512),
@@ -1352,13 +1352,13 @@ var Fe = ["title", "onClick"], Ie = {
1352
1352
  "aria-expanded": O(B) === "align",
1353
1353
  "aria-haspopup": "listbox",
1354
1354
  title: O(h)("alignmentGroup")
1355
- }, [f(r, { name: q.value }, null, 8, ["name"]), f(r, {
1355
+ }, [f(r, { name: J.value }, null, 8, ["name"]), f(r, {
1356
1356
  class: "chevron",
1357
1357
  name: "arrow_drop_down",
1358
1358
  size: 16
1359
1359
  })], 40, Et), O(B) === "align" ? (b(), l("div", {
1360
1360
  key: 0,
1361
- style: _(O(H)),
1361
+ style: _(O(V)),
1362
1362
  class: "toolbar-dropdown__menu align-strip"
1363
1363
  }, [
1364
1364
  u("button", {
@@ -1417,7 +1417,7 @@ var Fe = ["title", "onClick"], Ie = {
1417
1417
  u("button", {
1418
1418
  title: O(h)("decreaseIndent"),
1419
1419
  "aria-label": O(h)("decreaseIndent"),
1420
- disabled: !Z.value,
1420
+ disabled: !oe.value,
1421
1421
  onMousedown: n[28] ||= F((e) => $("outdent"), ["prevent"])
1422
1422
  }, [f(r, { name: "format_indent_decrease" })], 40, Nt),
1423
1423
  u("button", {
@@ -1441,7 +1441,7 @@ var Fe = ["title", "onClick"], Ie = {
1441
1441
  size: 16
1442
1442
  })], 40, Ft), O(B) === "spacing" ? (b(), l("div", {
1443
1443
  key: 0,
1444
- style: _(O(H)),
1444
+ style: _(O(V)),
1445
1445
  class: "toolbar-dropdown__menu"
1446
1446
  }, [(b(!0), l(a, null, C(O(xe), (e) => (b(), l("button", {
1447
1447
  key: e.value,
@@ -1546,7 +1546,7 @@ var Fe = ["title", "onClick"], Ie = {
1546
1546
  return K(e) * r.zoom;
1547
1547
  }
1548
1548
  function w(e) {
1549
- return Math.round(G(e / r.zoom));
1549
+ return Math.round(re(e / r.zoom));
1550
1550
  }
1551
1551
  let T = o(() => r.sectionProps?.pageWidth ?? Zt), D = o(() => r.sectionProps?.marginLeft ?? Qt), k = o(() => r.sectionProps?.marginRight ?? Qt), A = o(() => x(T.value)), j = o(() => x(D.value)), M = o(() => x(k.value)), N = o(() => x(r.indentLeft)), P = o(() => x(r.indentRight)), I = o(() => r.hangingIndent ? -r.firstLineIndent : r.firstLineIndent), L = o(() => x(I.value)), ee = o(() => j.value + N.value), R = o(() => A.value - M.value - P.value), z = o(() => j.value + N.value + L.value), B = o(() => ({
1552
1552
  position: "relative",
@@ -1566,7 +1566,7 @@ var Fe = ["title", "onClick"], Ie = {
1566
1566
  borderRight: "1px solid var(--doc-shadow-subtle)",
1567
1567
  cursor: r.editable ? "ew-resize" : "default",
1568
1568
  zIndex: 1
1569
- })), ne = o(() => ({
1569
+ })), V = o(() => ({
1570
1570
  position: "absolute",
1571
1571
  top: 0,
1572
1572
  right: 0,
@@ -1576,44 +1576,44 @@ var Fe = ["title", "onClick"], Ie = {
1576
1576
  borderLeft: "1px solid var(--doc-shadow-subtle)",
1577
1577
  cursor: r.editable ? "ew-resize" : "default",
1578
1578
  zIndex: 1
1579
- })), V = o(() => oe({
1579
+ })), H = o(() => ae({
1580
1580
  pageWidth: T.value,
1581
1581
  leftMargin: D.value,
1582
1582
  rightMargin: k.value,
1583
1583
  leftIndent: r.indentLeft,
1584
1584
  rightIndent: r.indentRight
1585
- })), H = o(() => ({
1586
- leftMargin: Y({
1585
+ })), U = o(() => ({
1586
+ leftMargin: X({
1587
1587
  value: D.value,
1588
- ...V.value.leftMargin,
1588
+ ...H.value.leftMargin,
1589
1589
  unit: r.unit,
1590
1590
  onChange: r.editable ? (e) => Q("leftMargin", e) : void 0
1591
1591
  }),
1592
- rightMargin: Y({
1592
+ rightMargin: X({
1593
1593
  value: k.value,
1594
- ...V.value.rightMargin,
1594
+ ...H.value.rightMargin,
1595
1595
  unit: r.unit,
1596
1596
  onChange: r.editable ? (e) => Q("rightMargin", e) : void 0
1597
1597
  }),
1598
- firstLineIndent: Y({
1598
+ firstLineIndent: X({
1599
1599
  value: r.hangingIndent ? -r.firstLineIndent : r.firstLineIndent,
1600
- ...V.value.firstLineIndent,
1600
+ ...H.value.firstLineIndent,
1601
1601
  unit: r.unit,
1602
1602
  onChange: r.editable ? (e) => Q("firstLineIndent", e) : void 0
1603
1603
  }),
1604
- leftIndent: Y({
1604
+ leftIndent: X({
1605
1605
  value: r.indentLeft,
1606
- ...V.value.leftIndent,
1606
+ ...H.value.leftIndent,
1607
1607
  unit: r.unit,
1608
1608
  onChange: r.editable ? (e) => Q("leftIndent", e) : void 0
1609
1609
  }),
1610
- rightIndent: Y({
1610
+ rightIndent: X({
1611
1611
  value: r.indentRight,
1612
- ...V.value.rightIndent,
1612
+ ...H.value.rightIndent,
1613
1613
  unit: r.unit,
1614
1614
  onChange: r.editable ? (e) => Q("rightIndent", e) : void 0
1615
1615
  })
1616
- })), re = o(() => {
1616
+ })), ne = o(() => {
1617
1617
  let e = [];
1618
1618
  if (r.unit === "inch") {
1619
1619
  let t = $t / 8, n = Math.ceil(T.value / t);
@@ -1656,21 +1656,21 @@ var Fe = ["title", "onClick"], Ie = {
1656
1656
  }
1657
1657
  }
1658
1658
  return e;
1659
- }), U = o(() => r.tabStops?.length ? r.tabStops.map((e) => {
1659
+ }), W = o(() => r.tabStops?.length ? r.tabStops.map((e) => {
1660
1660
  let t = e.position;
1661
1661
  return {
1662
1662
  px: x(D.value + t),
1663
1663
  twips: t,
1664
- label: ie(t)
1664
+ label: G(t)
1665
1665
  };
1666
1666
  }) : []);
1667
- function ie(e) {
1667
+ function G(e) {
1668
1668
  return r.unit === "cm" ? (e / en).toFixed(1) + " cm" : (e / $t).toFixed(2) + "\"";
1669
1669
  }
1670
- function W(e) {
1670
+ function q(e) {
1671
1671
  return p.value === e ? rn : h.value === e ? nn : tn;
1672
1672
  }
1673
- function ae(e, t, n) {
1673
+ function ie(e, t, n) {
1674
1674
  return {
1675
1675
  position: "absolute",
1676
1676
  left: t - an + "px",
@@ -1681,7 +1681,7 @@ var Fe = ["title", "onClick"], Ie = {
1681
1681
  ...e === "down" ? { top: 0 } : { bottom: 0 }
1682
1682
  };
1683
1683
  }
1684
- function q(e, t) {
1684
+ function J(e, t) {
1685
1685
  return e === "down" ? {
1686
1686
  position: "absolute",
1687
1687
  top: "1px",
@@ -1704,9 +1704,9 @@ var Fe = ["title", "onClick"], Ie = {
1704
1704
  transition: "border-bottom-color 0.1s"
1705
1705
  };
1706
1706
  }
1707
- let X = 0;
1708
- function Z(e, t) {
1709
- r.editable && (p.value = e, e === "leftMargin" ? X = D.value : e === "rightMargin" ? X = k.value : e === "leftIndent" ? X = r.indentLeft : e === "rightIndent" ? X = r.indentRight : e === "firstLineIndent" && (X = r.firstLineIndent), g.value = t.clientX - (f.value?.getBoundingClientRect().left ?? 0), y.value = ie(X), document.addEventListener("mousemove", se), document.addEventListener("mouseup", ce));
1707
+ let Z = 0;
1708
+ function oe(e, t) {
1709
+ r.editable && (p.value = e, e === "leftMargin" ? Z = D.value : e === "rightMargin" ? Z = k.value : e === "leftIndent" ? Z = r.indentLeft : e === "rightIndent" ? Z = r.indentRight : e === "firstLineIndent" && (Z = r.firstLineIndent), g.value = t.clientX - (f.value?.getBoundingClientRect().left ?? 0), y.value = G(Z), document.addEventListener("mousemove", se), document.addEventListener("mouseup", ce));
1710
1710
  }
1711
1711
  function se(e) {
1712
1712
  if (!p.value || !f.value) return;
@@ -1715,27 +1715,27 @@ var Fe = ["title", "onClick"], Ie = {
1715
1715
  let n = e.clientX - t.left;
1716
1716
  g.value = n;
1717
1717
  let r = w(n), i = le(p.value, r);
1718
- y.value = ie(i), Q(p.value, i);
1718
+ y.value = G(i), Q(p.value, i);
1719
1719
  }
1720
1720
  function ce(e) {
1721
1721
  p.value = null, document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", ce);
1722
1722
  }
1723
1723
  function le(e, t) {
1724
- if (e === "leftMargin") return J(t, V.value.leftMargin);
1724
+ if (e === "leftMargin") return Y(t, H.value.leftMargin);
1725
1725
  if (e === "rightMargin") {
1726
1726
  let e = T.value - t;
1727
- return J(e, V.value.rightMargin);
1727
+ return Y(e, H.value.rightMargin);
1728
1728
  }
1729
1729
  if (e === "firstLineIndent") {
1730
1730
  let e = t - (D.value + r.indentLeft);
1731
- return J(e, V.value.firstLineIndent);
1731
+ return Y(e, H.value.firstLineIndent);
1732
1732
  }
1733
1733
  if (e === "leftIndent") {
1734
1734
  let e = t - D.value;
1735
- return J(e, V.value.leftIndent);
1735
+ return Y(e, H.value.leftIndent);
1736
1736
  }
1737
1737
  let n = T.value - k.value - t;
1738
- return J(n, V.value.rightIndent);
1738
+ return Y(n, H.value.rightIndent);
1739
1739
  }
1740
1740
  function Q(e, t) {
1741
1741
  switch (e) {
@@ -1767,22 +1767,22 @@ var Fe = ["title", "onClick"], Ie = {
1767
1767
  u("div", m({
1768
1768
  class: "docx-horizontal-ruler__margin",
1769
1769
  style: te.value
1770
- }, H.value.leftMargin.attributes, {
1771
- "aria-label": H.value.leftMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.left")}` : void 0,
1772
- "aria-orientation": H.value.leftMargin.attributes.role ? "horizontal" : void 0,
1773
- onKeydown: n[0] ||= (...e) => H.value.leftMargin.onKeyDown && H.value.leftMargin.onKeyDown(...e),
1774
- onMousedown: n[1] ||= F((t) => e.editable ? Z("leftMargin", t) : null, ["prevent", "stop"])
1770
+ }, U.value.leftMargin.attributes, {
1771
+ "aria-label": U.value.leftMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.left")}` : void 0,
1772
+ "aria-orientation": U.value.leftMargin.attributes.role ? "horizontal" : void 0,
1773
+ onKeydown: n[0] ||= (...e) => U.value.leftMargin.onKeyDown && U.value.leftMargin.onKeyDown(...e),
1774
+ onMousedown: n[1] ||= F((t) => e.editable ? oe("leftMargin", t) : null, ["prevent", "stop"])
1775
1775
  }), null, 16, Wt),
1776
1776
  u("div", m({
1777
1777
  class: "docx-horizontal-ruler__margin",
1778
- style: ne.value
1779
- }, H.value.rightMargin.attributes, {
1780
- "aria-label": H.value.rightMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.right")}` : void 0,
1781
- "aria-orientation": H.value.rightMargin.attributes.role ? "horizontal" : void 0,
1782
- onKeydown: n[2] ||= (...e) => H.value.rightMargin.onKeyDown && H.value.rightMargin.onKeyDown(...e),
1783
- onMousedown: n[3] ||= F((t) => e.editable ? Z("rightMargin", t) : null, ["prevent", "stop"])
1778
+ style: V.value
1779
+ }, U.value.rightMargin.attributes, {
1780
+ "aria-label": U.value.rightMargin.attributes.role ? `${O(s)("dialogs.pageSetup.margins")}: ${O(s)("dialogs.pageSetup.right")}` : void 0,
1781
+ "aria-orientation": U.value.rightMargin.attributes.role ? "horizontal" : void 0,
1782
+ onKeydown: n[2] ||= (...e) => U.value.rightMargin.onKeyDown && U.value.rightMargin.onKeyDown(...e),
1783
+ onMousedown: n[3] ||= F((t) => e.editable ? oe("rightMargin", t) : null, ["prevent", "stop"])
1784
1784
  }), null, 16, Gt),
1785
- u("div", Kt, [(b(!0), l(a, null, C(re.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1785
+ u("div", Kt, [(b(!0), l(a, null, C(ne.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1786
1786
  class: "docx-horizontal-ruler__tick-line",
1787
1787
  style: _({
1788
1788
  left: e.position + "px",
@@ -1796,40 +1796,40 @@ var Fe = ["title", "onClick"], Ie = {
1796
1796
  e.showFirstLineIndent ? (b(), l("div", m({
1797
1797
  key: 0,
1798
1798
  class: "docx-ruler-indent",
1799
- style: ae("down", z.value, p.value === "firstLineIndent"),
1800
- onMousedown: n[4] ||= F((t) => e.editable ? Z("firstLineIndent", t) : null, ["prevent", "stop"]),
1799
+ style: ie("down", z.value, p.value === "firstLineIndent"),
1800
+ onMousedown: n[4] ||= F((t) => e.editable ? oe("firstLineIndent", t) : null, ["prevent", "stop"]),
1801
1801
  onMouseenter: n[5] ||= (e) => h.value = "firstLineIndent"
1802
- }, H.value.firstLineIndent.attributes, {
1803
- "aria-label": H.value.firstLineIndent.attributes.role ? O(s)("ruler.firstLineIndent") : void 0,
1804
- "aria-orientation": H.value.firstLineIndent.attributes.role ? "horizontal" : void 0,
1805
- onKeydown: n[6] ||= (...e) => H.value.firstLineIndent.onKeyDown && H.value.firstLineIndent.onKeyDown(...e),
1802
+ }, U.value.firstLineIndent.attributes, {
1803
+ "aria-label": U.value.firstLineIndent.attributes.role ? O(s)("ruler.firstLineIndent") : void 0,
1804
+ "aria-orientation": U.value.firstLineIndent.attributes.role ? "horizontal" : void 0,
1805
+ onKeydown: n[6] ||= (...e) => U.value.firstLineIndent.onKeyDown && U.value.firstLineIndent.onKeyDown(...e),
1806
1806
  onMouseleave: n[7] ||= (e) => h.value = null
1807
- }), [u("div", { style: _(q("down", W("firstLineIndent"))) }, null, 4)], 16, qt)) : c("", !0),
1807
+ }), [u("div", { style: _(J("down", q("firstLineIndent"))) }, null, 4)], 16, qt)) : c("", !0),
1808
1808
  e.editable ? (b(), l("div", m({
1809
1809
  key: 1,
1810
1810
  class: "docx-ruler-indent",
1811
- style: ae("up", ee.value, p.value === "leftIndent"),
1812
- onMousedown: n[8] ||= F((e) => Z("leftIndent", e), ["prevent", "stop"]),
1811
+ style: ie("up", ee.value, p.value === "leftIndent"),
1812
+ onMousedown: n[8] ||= F((e) => oe("leftIndent", e), ["prevent", "stop"]),
1813
1813
  onMouseenter: n[9] ||= (e) => h.value = "leftIndent"
1814
- }, H.value.leftIndent.attributes, {
1815
- "aria-label": H.value.leftIndent.attributes.role ? O(s)("ruler.leftIndent") : void 0,
1816
- "aria-orientation": H.value.leftIndent.attributes.role ? "horizontal" : void 0,
1817
- onKeydown: n[10] ||= (...e) => H.value.leftIndent.onKeyDown && H.value.leftIndent.onKeyDown(...e),
1814
+ }, U.value.leftIndent.attributes, {
1815
+ "aria-label": U.value.leftIndent.attributes.role ? O(s)("ruler.leftIndent") : void 0,
1816
+ "aria-orientation": U.value.leftIndent.attributes.role ? "horizontal" : void 0,
1817
+ onKeydown: n[10] ||= (...e) => U.value.leftIndent.onKeyDown && U.value.leftIndent.onKeyDown(...e),
1818
1818
  onMouseleave: n[11] ||= (e) => h.value = null
1819
- }), [u("div", { style: _(q("up", W("leftIndent"))) }, null, 4)], 16, Jt)) : c("", !0),
1819
+ }), [u("div", { style: _(J("up", q("leftIndent"))) }, null, 4)], 16, Jt)) : c("", !0),
1820
1820
  e.editable ? (b(), l("div", m({
1821
1821
  key: 2,
1822
1822
  class: "docx-ruler-indent",
1823
- style: ae("down", R.value, p.value === "rightIndent"),
1824
- onMousedown: n[12] ||= F((e) => Z("rightIndent", e), ["prevent", "stop"]),
1823
+ style: ie("down", R.value, p.value === "rightIndent"),
1824
+ onMousedown: n[12] ||= F((e) => oe("rightIndent", e), ["prevent", "stop"]),
1825
1825
  onMouseenter: n[13] ||= (e) => h.value = "rightIndent"
1826
- }, H.value.rightIndent.attributes, {
1827
- "aria-label": H.value.rightIndent.attributes.role ? O(s)("ruler.rightIndent") : void 0,
1828
- "aria-orientation": H.value.rightIndent.attributes.role ? "horizontal" : void 0,
1829
- onKeydown: n[14] ||= (...e) => H.value.rightIndent.onKeyDown && H.value.rightIndent.onKeyDown(...e),
1826
+ }, U.value.rightIndent.attributes, {
1827
+ "aria-label": U.value.rightIndent.attributes.role ? O(s)("ruler.rightIndent") : void 0,
1828
+ "aria-orientation": U.value.rightIndent.attributes.role ? "horizontal" : void 0,
1829
+ onKeydown: n[14] ||= (...e) => U.value.rightIndent.onKeyDown && U.value.rightIndent.onKeyDown(...e),
1830
1830
  onMouseleave: n[15] ||= (e) => h.value = null
1831
- }), [u("div", { style: _(q("down", W("rightIndent"))) }, null, 4)], 16, Yt)) : c("", !0),
1832
- (b(!0), l(a, null, C(U.value, (e, n) => (b(), l("div", {
1831
+ }), [u("div", { style: _(J("down", q("rightIndent"))) }, null, 4)], 16, Yt)) : c("", !0),
1832
+ (b(!0), l(a, null, C(W.value, (e, n) => (b(), l("div", {
1833
1833
  key: n,
1834
1834
  class: "docx-horizontal-ruler__tab",
1835
1835
  style: _({ left: e.px + "px" }),
@@ -2661,7 +2661,7 @@ var Fe = ["title", "onClick"], Ie = {
2661
2661
  return K(e) * r.zoom;
2662
2662
  }
2663
2663
  function h(e) {
2664
- return Math.round(G(e / r.zoom));
2664
+ return Math.round(re(e / r.zoom));
2665
2665
  }
2666
2666
  let g = o(() => r.sectionProps?.pageHeight ?? nr), y = o(() => r.sectionProps?.marginTop ?? rr), x = o(() => r.sectionProps?.marginBottom ?? rr), w = o(() => p(g.value)), T = o(() => p(y.value)), D = o(() => p(x.value)), k = o(() => ({
2667
2667
  position: "relative",
@@ -2671,18 +2671,18 @@ var Fe = ["title", "onClick"], Ie = {
2671
2671
  overflow: "visible",
2672
2672
  userSelect: "none",
2673
2673
  cursor: d.value ? "ns-resize" : "default"
2674
- })), A = o(() => X({
2674
+ })), A = o(() => Z({
2675
2675
  pageHeight: g.value,
2676
2676
  topMargin: y.value,
2677
2677
  bottomMargin: x.value
2678
2678
  })), j = o(() => ({
2679
- topMargin: Y({
2679
+ topMargin: X({
2680
2680
  value: y.value,
2681
2681
  ...A.value.topMargin,
2682
2682
  unit: r.unit,
2683
2683
  onChange: r.editable ? (e) => s("top-margin-change", e) : void 0
2684
2684
  }),
2685
- bottomMargin: Y({
2685
+ bottomMargin: X({
2686
2686
  value: x.value,
2687
2687
  ...A.value.bottomMargin,
2688
2688
  unit: r.unit,
@@ -2763,7 +2763,7 @@ var Fe = ["title", "onClick"], Ie = {
2763
2763
  }
2764
2764
  function R(e) {
2765
2765
  if (!d.value) return;
2766
- let t = e.clientY - I, n = h(d.value === "topMargin" ? t : -t), r = J(L + n, A.value[d.value]);
2766
+ let t = e.clientY - I, n = h(d.value === "topMargin" ? t : -t), r = Y(L + n, A.value[d.value]);
2767
2767
  d.value === "topMargin" ? s("top-margin-change", r) : s("bottom-margin-change", r);
2768
2768
  }
2769
2769
  function z() {
@@ -3041,7 +3041,7 @@ var _r = /* @__PURE__ */ p({
3041
3041
  }, null, 8, ["name"]), u("div", Tr, [u("div", Er, E(t.author || "Unknown"), 1), u("div", Dr, E(O(fr)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, [(b(!0), l(a, null, C(t.content, (e, n) => (b(), l(a, { key: n }, [u("span", {
3042
3042
  "data-find-comment-id": t.id,
3043
3043
  "data-find-comment-paragraph": n
3044
- }, E(O(H)(e)), 9, Or), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
3044
+ }, E(O(V)(e)), 9, Or), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
3045
3045
  }
3046
3046
  }), [["__scopeId", "data-v-3ab28dc9"]]), Ar = ["data-comment-id"], jr = {
3047
3047
  key: 0,
@@ -3115,7 +3115,7 @@ var _r = /* @__PURE__ */ p({
3115
3115
  u("div", Rr, [(b(!0), l(a, null, C(e.comment.content, (t, r) => (b(), l(a, { key: r }, [u("span", {
3116
3116
  "data-find-comment-id": e.comment.id,
3117
3117
  "data-find-comment-paragraph": r
3118
- }, E(O(H)(t)), 9, zr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
3118
+ }, E(O(V)(t)), 9, zr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
3119
3119
  f(kr, {
3120
3120
  replies: e.replies,
3121
3121
  "is-expanded": e.expanded
@@ -3359,7 +3359,7 @@ var _r = /* @__PURE__ */ p({
3359
3359
  w.value = /* @__PURE__ */ new Map();
3360
3360
  return;
3361
3361
  }
3362
- let r = e.getBoundingClientRect(), a = ae(e), o = /* @__PURE__ */ new Map();
3362
+ let r = e.getBoundingClientRect(), a = G(e), o = /* @__PURE__ */ new Map();
3363
3363
  for (let t of e.querySelectorAll(".docx-insertion[data-revision-id]")) {
3364
3364
  let e = t.dataset.revisionId;
3365
3365
  e && !o.has(e) && o.set(e, t);
@@ -3392,10 +3392,10 @@ var _r = /* @__PURE__ */ p({
3392
3392
  t && u.set(t, e.offsetHeight);
3393
3393
  }
3394
3394
  let f = /* @__PURE__ */ new Map();
3395
- for (let { item: n, y: r } of Z({
3395
+ for (let { item: n, y: r } of oe({
3396
3396
  items: t,
3397
3397
  anchorPositions: c,
3398
- renderedDomContext: ie(e),
3398
+ renderedDomContext: ne(e),
3399
3399
  zoom: 1,
3400
3400
  cardHeights: u,
3401
3401
  lastKnown: k
@@ -3416,7 +3416,7 @@ var _r = /* @__PURE__ */ p({
3416
3416
  R.value = null;
3417
3417
  return;
3418
3418
  }
3419
- let e = x.value?.offsetParent, t = K(n.pagesContainer);
3419
+ let e = x.value?.offsetParent, t = ie(n.pagesContainer);
3420
3420
  if (!(e instanceof HTMLElement) || !t) return;
3421
3421
  let r = e.getBoundingClientRect(), a = t.getBoundingClientRect(), o = Math.max(0, Math.min(L.drawerWidth, t.clientWidth - 16));
3422
3422
  B.value = {
@@ -3425,14 +3425,14 @@ var _r = /* @__PURE__ */ p({
3425
3425
  height: t.clientHeight
3426
3426
  }, R.value = a.left + t.clientWidth - r.left - o;
3427
3427
  }
3428
- let ne = o(() => ({
3428
+ let V = o(() => ({
3429
3429
  position: "sticky",
3430
3430
  top: 0,
3431
3431
  maxHeight: B.value.height || void 0,
3432
3432
  overflowY: "auto",
3433
3433
  paddingBlock: L.commentsGap + "px",
3434
3434
  boxSizing: "border-box"
3435
- })), V = o(() => {
3435
+ })), H = o(() => {
3436
3436
  let e = f.value;
3437
3437
  if (!e) return "";
3438
3438
  if (e.startsWith("comment-")) {
@@ -3447,7 +3447,7 @@ var _r = /* @__PURE__ */ p({
3447
3447
  `;
3448
3448
  }
3449
3449
  return "";
3450
- }), H = o(() => {
3450
+ }), U = o(() => {
3451
3451
  let e = i.value, t = e ? R.value !== null : w.value.size > 0 || h.value.length === 0, r = e ? R.value : n.columnStart ?? null;
3452
3452
  return {
3453
3453
  position: "absolute",
@@ -3477,10 +3477,10 @@ var _r = /* @__PURE__ */ p({
3477
3477
  transition: "top 0.15s ease"
3478
3478
  };
3479
3479
  }
3480
- let U = !1;
3481
- function G() {
3482
- U || (U = !0, requestAnimationFrame(() => {
3483
- U = !1, I();
3480
+ let K = !1;
3481
+ function q() {
3482
+ K || (K = !0, requestAnimationFrame(() => {
3483
+ K = !1, I();
3484
3484
  }));
3485
3485
  }
3486
3486
  j(() => [
@@ -3493,8 +3493,8 @@ var _r = /* @__PURE__ */ p({
3493
3493
  n.addCommentYPosition,
3494
3494
  n.surface,
3495
3495
  n.isOpen
3496
- ], () => G(), { immediate: !0 });
3497
- function K(e) {
3496
+ ], () => q(), { immediate: !0 });
3497
+ function ie(e) {
3498
3498
  let t = e?.parentElement ?? null;
3499
3499
  for (; t;) {
3500
3500
  let e = getComputedStyle(t).overflowY;
@@ -3503,16 +3503,16 @@ var _r = /* @__PURE__ */ p({
3503
3503
  }
3504
3504
  return null;
3505
3505
  }
3506
- let q = null;
3507
- function J() {
3508
- q && q.removeEventListener("scroll", G), q = K(n.pagesContainer), q && (q.addEventListener("scroll", G, { passive: !0 }), A?.observe(q));
3506
+ let J = null;
3507
+ function Y() {
3508
+ J && J.removeEventListener("scroll", q), J = ie(n.pagesContainer), J && (J.addEventListener("scroll", q, { passive: !0 }), A?.observe(J));
3509
3509
  }
3510
3510
  return y(() => {
3511
- N = new ResizeObserver(() => G()), G(), n.pagesContainer && (A = new ResizeObserver(() => G()), A.observe(n.pagesContainer), J()), window.addEventListener("resize", G);
3511
+ N = new ResizeObserver(() => q()), q(), n.pagesContainer && (A = new ResizeObserver(() => q()), A.observe(n.pagesContainer), Y()), window.addEventListener("resize", q);
3512
3512
  }), j(() => n.pagesContainer, (e) => {
3513
- A?.disconnect(), A = null, e && (A = new ResizeObserver(() => G()), A.observe(e)), J(), G();
3513
+ A?.disconnect(), A = null, e && (A = new ResizeObserver(() => q()), A.observe(e)), Y(), q();
3514
3514
  }), v(() => {
3515
- A?.disconnect(), N?.disconnect(), q && q.removeEventListener("scroll", G), window.removeEventListener("resize", G);
3515
+ A?.disconnect(), N?.disconnect(), J && J.removeEventListener("scroll", q), window.removeEventListener("resize", q);
3516
3516
  }), j(() => n.isOpen && i.value, (e, t, n) => {
3517
3517
  if (!e || typeof document > "u") return;
3518
3518
  let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -3526,8 +3526,8 @@ var _r = /* @__PURE__ */ p({
3526
3526
  }, {
3527
3527
  immediate: !0,
3528
3528
  flush: "post"
3529
- }), (t, n) => (b(), l(a, null, [V.value ? (b(), s(T("style"), { key: 0 }, {
3530
- default: M(() => [d(E(V.value), 1)]),
3529
+ }), (t, n) => (b(), l(a, null, [H.value ? (b(), s(T("style"), { key: 0 }, {
3530
+ default: M(() => [d(E(H.value), 1)]),
3531
3531
  _: 1
3532
3532
  })) : c("", !0), e.isOpen ? (b(), l("aside", {
3533
3533
  key: 1,
@@ -3537,12 +3537,12 @@ var _r = /* @__PURE__ */ p({
3537
3537
  "data-folio-comments-surface": e.surface ?? "column",
3538
3538
  "data-testid": "folio-comments",
3539
3539
  tabindex: i.value ? -1 : void 0,
3540
- style: _(H.value),
3540
+ style: _(U.value),
3541
3541
  onMousedown: m
3542
3542
  }, [u("div", {
3543
3543
  class: "unified-sidebar__inner",
3544
3544
  "data-folio-scroll": i.value ? "" : void 0,
3545
- style: _(i.value ? ne.value : { minHeight: ee.value + "px" })
3545
+ style: _(i.value ? V.value : { minHeight: ee.value + "px" })
3546
3546
  }, [(b(!0), l(a, null, C(O(h), (e) => (b(), l("div", {
3547
3547
  key: e.id,
3548
3548
  class: "unified-sidebar__card-slot",