@stll/folio-vue 0.26.0 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/SplitCellDialog-DfMw2Ev2.cjs +15 -0
  2. package/dist/{SplitCellDialog-CWvjxbog.js → SplitCellDialog-bNeugz_3.js} +1181 -1207
  3. package/dist/{ListButtons-1YJNViXB.js → StylePicker-DfIQUq6G.js} +1095 -1106
  4. package/dist/StylePicker-ynX3GzFu.cjs +4 -0
  5. package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +2 -2
  6. package/dist/components/DocxEditor/pagedEditorRef.d.ts +1 -1
  7. package/dist/components/DocxEditor/types.d.ts +10 -10
  8. package/dist/components/DocxEditor.vue.d.ts +5 -5
  9. package/dist/components/InlineHeaderFooterEditor.vue.d.ts +2 -2
  10. package/dist/components/OutlineToggleButton.vue.d.ts +21 -0
  11. package/dist/components/ReviewControls.vue.d.ts +2 -2
  12. package/dist/components/Toolbar.vue.d.ts +9 -9
  13. package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +2 -2
  14. package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +2 -2
  15. package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +2 -2
  16. package/dist/components/dialogs/PageSetupDialog.vue.d.ts +2 -2
  17. package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +2 -2
  18. package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +2 -2
  19. package/dist/components/dialogs/WatermarkDialog.vue.d.ts +2 -2
  20. package/dist/components/sidebar/CommentCard.vue.d.ts +2 -2
  21. package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +2 -2
  22. package/dist/components/sidebar/cardStyles.d.ts +1 -1
  23. package/dist/components/tableStylePresets.d.ts +1 -1
  24. package/dist/components/ui/Button.vue.d.ts +1 -1
  25. package/dist/components/ui/FontSizePicker.vue.d.ts +1 -1
  26. package/dist/components/ui/HorizontalRuler.vue.d.ts +2 -2
  27. package/dist/components/ui/HyperlinkPopup.vue.d.ts +4 -4
  28. package/dist/components/ui/Input.vue.d.ts +1 -1
  29. package/dist/components/ui/ListButtons.vue.d.ts +1 -1
  30. package/dist/components/ui/OutlineRail.vue.d.ts +1 -1
  31. package/dist/components/ui/TableMoreDropdown.vue.d.ts +1 -1
  32. package/dist/components/ui/TableToolbar.vue.d.ts +1 -1
  33. package/dist/components/ui/VerticalRuler.vue.d.ts +2 -2
  34. package/dist/components/ui/icon-paths.json.d.ts +18 -6
  35. package/dist/composables/useAutoSave.d.ts +1 -1
  36. package/dist/composables/useClipboard.d.ts +2 -2
  37. package/dist/composables/useCommentLifecycle.d.ts +1 -1
  38. package/dist/composables/useCommentManagement.d.ts +1 -1
  39. package/dist/composables/useContextMenus.d.ts +2 -2
  40. package/dist/composables/useDocxEditor.d.ts +4 -4
  41. package/dist/composables/useDocxEditorRefApi.d.ts +5 -5
  42. package/dist/composables/useFindReplace.d.ts +2 -2
  43. package/dist/composables/useFixedDropdown.d.ts +1 -1
  44. package/dist/composables/useFormattingActions.d.ts +1 -1
  45. package/dist/composables/useHistory.d.ts +1 -1
  46. package/dist/composables/useHyperlinkManagement.d.ts +1 -1
  47. package/dist/composables/useImageActions.d.ts +1 -1
  48. package/dist/composables/useOutlineSidebar.d.ts +1 -1
  49. package/dist/composables/usePageSetupControls.d.ts +1 -1
  50. package/dist/composables/usePagesPointer.d.ts +3 -3
  51. package/dist/composables/useParagraphStyleOptions.d.ts +1 -1
  52. package/dist/composables/useSelectionHighlight.d.ts +1 -1
  53. package/dist/composables/useSelectionSync.d.ts +1 -1
  54. package/dist/composables/useToolbarDropdowns.d.ts +1 -1
  55. package/dist/composables/useToolbarFontSize.d.ts +1 -1
  56. package/dist/composables/useTrackedChanges.d.ts +1 -1
  57. package/dist/composables/useVisualLineNavigation.d.ts +1 -1
  58. package/dist/composables/useZoom.d.ts +1 -1
  59. package/dist/composables.cjs +2 -2
  60. package/dist/composables.js +65 -71
  61. package/dist/dialogs.cjs +1 -1
  62. package/dist/dialogs.js +1 -2
  63. package/dist/folio-vue.css +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.d.ts +4 -4
  66. package/dist/index.js +4831 -4865
  67. package/dist/messages/ar.cjs +1 -1
  68. package/dist/messages/ar.js +1 -2
  69. package/dist/messages/cs.cjs +1 -1
  70. package/dist/messages/cs.js +1 -2
  71. package/dist/messages/de.cjs +1 -1
  72. package/dist/messages/de.js +1 -2
  73. package/dist/messages/en.cjs +1 -1
  74. package/dist/messages/en.js +1 -2
  75. package/dist/messages/es.cjs +1 -1
  76. package/dist/messages/es.js +1 -2
  77. package/dist/messages/et.cjs +1 -1
  78. package/dist/messages/et.js +1 -2
  79. package/dist/messages/fr.cjs +1 -1
  80. package/dist/messages/fr.js +1 -2
  81. package/dist/messages/he.cjs +1 -1
  82. package/dist/messages/he.js +1 -2
  83. package/dist/messages/hi.cjs +1 -1
  84. package/dist/messages/hi.js +1 -2
  85. package/dist/messages/hu.cjs +1 -1
  86. package/dist/messages/hu.js +1 -2
  87. package/dist/messages/locales.js +1 -2
  88. package/dist/messages/lt.cjs +1 -1
  89. package/dist/messages/lt.js +1 -2
  90. package/dist/messages/lv.cjs +1 -1
  91. package/dist/messages/lv.js +1 -2
  92. package/dist/messages/pl.cjs +1 -1
  93. package/dist/messages/pl.js +1 -2
  94. package/dist/messages/pt-BR.cjs +1 -1
  95. package/dist/messages/pt-BR.js +1 -2
  96. package/dist/messages/sk.cjs +1 -1
  97. package/dist/messages/sk.js +1 -2
  98. package/dist/messages/tr.cjs +1 -1
  99. package/dist/messages/tr.js +1 -2
  100. package/dist/messages/zh-CN.cjs +1 -1
  101. package/dist/messages/zh-CN.js +1 -2
  102. package/dist/{rolldown-runtime-C6qsp3rV.cjs → rolldown-runtime-CYJQrBu7.cjs} +1 -1
  103. package/dist/ui.cjs +1 -1
  104. package/dist/ui.d.ts +1 -1
  105. package/dist/ui.js +21 -27
  106. package/dist/useZoom-Bwnae1jX.cjs +1 -0
  107. package/dist/{useZoom-C_sQUu4b.js → useZoom-CX0mrPQY.js} +372 -386
  108. package/dist/utils/viewportPosition.d.ts +1 -1
  109. package/package.json +13 -13
  110. package/dist/ListButtons-Cw5RTKNt.cjs +0 -4
  111. package/dist/SplitCellDialog-Dpp-FPQ6.cjs +0 -15
  112. package/dist/useZoom-CbH76z8x.cjs +0 -1
@@ -1,111 +1,111 @@
1
1
  import { computed as e, inject as t, onBeforeUnmount as n, onMounted as r, onScopeDispose as i, provide as a, reactive as o, ref as s, shallowRef as c, toValue as l, watch as u, watchEffect as d } from "vue";
2
- import { CANONICAL_GAP as f, canonicalRefusalMessage as p, usesCanonicalSession as m } from "@stll/folio-core/types/canonicalCapabilities";
3
- import { TRANSACTION_LAYOUT_TIMING as h, browserClock as g, createLayoutScheduler as _ } from "@stll/folio-core/controller/layoutScheduler";
4
- import { CanonicalSessionRefusalError as v, collectRemoteSelections as ee, createHiddenEditorManager as y, createHiddenEditorState as b } from "@stll/folio-core/controller/hiddenEditorManager";
5
- import { cloneDocumentWithParagraphPropertySources as te } from "@stll/folio-core/docx/document-clone";
6
- import { getMargins as ne, getPageSize as re, twipsToPixels as ie } from "@stll/folio-core/paged-layout/sectionGeometry";
7
- import { getEditorScrollRoot as x, scrollEditorBy as S } from "@stll/folio-core/paged-layout/editorScrollRoot";
8
- import { createAnonymizationDecorationsPlugin as ae } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
9
- import { autocompleteSuggestionPlugin as oe } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
10
- import { getEditorReadOnlyReason as se } from "@stll/folio-core/managers/EditorModeManager";
11
- import { createTemplateDirectivesPlugin as ce } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
12
- import { createDefaultFindOptions as le, replaceEligibility as ue } from "@stll/folio-core/utils/findReplace";
13
- import { createSuggestionModePlugin as de, setSuggestionMode as fe } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
14
- import { getFootnoteText as C } from "@stll/folio-core/docx/storyPlainText";
15
- import { FOLIO_DOCX_SERIALIZATION_MODE as pe, createFolioEditor as me } from "@stll/folio-core/controller/folioEditor";
16
- import { createFolioEditorEmitter as he } from "@stll/folio-core/controller/folioEditorEvents";
17
- import { prepareCanonicalDocxInput as w } from "@stll/folio-core/docx/canonicalSessionInput";
18
- import { CanonicalSaveDiagnosticError as ge, serializeCanonicalSave as _e } from "@stll/folio-core/docx/canonicalSave";
19
- import { loadCollaborationModules as ve } from "@stll/folio-core/controller/collaborationModules";
20
- import { createHeaderFooterEditorManager as ye } from "@stll/folio-core/controller/headerFooterEditorManager";
21
- import { createNoteEditorManager as be } from "@stll/folio-core/controller/noteEditorManager";
22
- import { runLayoutPipeline as xe } from "@stll/folio-core/controller/layoutPipeline";
23
- import { createHyphenationReadiness as Se } from "@stll/folio-core/controller/hyphenationReadiness";
24
- import { readFontSetSignature as Ce, waitForInitialLayoutFonts as we, watchLayoutFontLoads as Te } from "@stll/folio-core/controller/fontReadiness";
25
- import { createLayoutSession as Ee } from "@stll/folio-core/controller/layoutSession";
26
- import { parseDocx as De } from "@stll/folio-core/docx/parser";
27
- import { convertHeaderFooterPmDocToContent as T, convertHeaderFooterToContent as Oe } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
28
- import { resolveSectionHeaderFooterRefs as ke } from "@stll/folio-core/layout-engine";
29
- import { LayoutPainter as Ae } from "@stll/folio-core/layout-painter";
30
- import { LayoutSelectionGate as je } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
31
- import { fromProseDoc as Me } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
32
- import { createNoteReferenceFollower as Ne, withoutUnreferencedNotes as Pe } from "@stll/folio-core/prosemirror/noteReferenceReview";
33
- import { ExtensionManager as Fe } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
34
- import { getChangedParagraphIds as Ie, hasStructuralChanges as Le, hasUntrackedChanges as Re, repackWithEditorSectionRemovals as ze } from "@stll/folio-core/prosemirror/extensions/features/ParagraphChangeTrackerExtension";
35
- import { createStarterKit as Be } from "@stll/folio-core/prosemirror/extensions/StarterKit";
36
- import { createTemplatePreviewValuesPlugin as Ve } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
37
- import { templateSlashMenuPlugin as He } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
38
- import { resolveHeaderFooterContent as Ue } from "@stll/folio-core/utils/headerFooter";
39
- import { FindReplaceManager as We } from "@stll/folio-core/managers/FindReplaceManager";
40
- import { findInDisplayedDocument as Ge, resolveFindMatchRange as E } from "@stll/folio-core/prosemirror/findReplaceSelection";
41
- import { createFindSearchKey as Ke, sameFindSearchKey as qe } from "@stll/folio-core/utils/findSearchKey";
42
- import { createFindMatchView as Je, getRenderedSearchStories as Ye } from "@stll/folio-core/utils/findMatchView";
43
- import { MIN_CELL_WIDTH_TWIPS as Xe, MIN_ROW_HEIGHT_TWIPS as D, TWIPS_PER_PIXEL as O, commitColumnResize as Ze, commitRightEdgeResize as Qe, commitRowResize as $e, readColumnWidthAt as et, readColumnWidths as tt, readRowHeight as nt } from "@stll/folio-core/prosemirror/tableResize";
44
- import { extractTrackedChanges as rt } from "@stll/folio-core/prosemirror/utils/extractTrackedChanges";
45
- import { ZOOM_MAX as it, ZOOM_MIN as at, ZOOM_STEP as k } from "@stll/folio-core/utils/zoom";
2
+ import { CanonicalSessionRefusalError as f, collectRemoteSelections as p, createHiddenEditorManager as m, createHiddenEditorState as h } from "@stll/folio-core/controller/hiddenEditorManager";
3
+ import { cloneDocumentWithParagraphPropertySources as g } from "@stll/folio-core/docx/document-clone";
4
+ import { getEditorReadOnlyReason as ee } from "@stll/folio-core/managers/EditorModeManager";
5
+ import { getEditorScrollRoot as _, scrollEditorBy as v } from "@stll/folio-core/paged-layout/editorScrollRoot";
6
+ import { getMargins as te, getPageSize as y, twipsToPixels as b } from "@stll/folio-core/paged-layout/sectionGeometry";
7
+ import { CANONICAL_GAP as x, canonicalRefusalMessage as ne, usesCanonicalSession as re } from "@stll/folio-core/types/canonicalCapabilities";
8
+ import { createSuggestionModePlugin as ie, setSuggestionMode as S } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
9
+ import { loadCollaborationModules as ae } from "@stll/folio-core/controller/collaborationModules";
10
+ import { FOLIO_DOCX_SERIALIZATION_MODE as C, createFolioEditor as oe } from "@stll/folio-core/controller/folioEditor";
11
+ import { createFolioEditorEmitter as se } from "@stll/folio-core/controller/folioEditorEvents";
12
+ import { readFontSetSignature as ce, waitForInitialLayoutFonts as w, watchLayoutFontLoads as le } from "@stll/folio-core/controller/fontReadiness";
13
+ import { createHeaderFooterEditorManager as ue } from "@stll/folio-core/controller/headerFooterEditorManager";
14
+ import { createHyphenationReadiness as de } from "@stll/folio-core/controller/hyphenationReadiness";
15
+ import { runLayoutPipeline as fe } from "@stll/folio-core/controller/layoutPipeline";
16
+ import { TRANSACTION_LAYOUT_TIMING as T, browserClock as pe, createLayoutScheduler as me } from "@stll/folio-core/controller/layoutScheduler";
17
+ import { createLayoutSession as he } from "@stll/folio-core/controller/layoutSession";
18
+ import { createNoteEditorManager as ge } from "@stll/folio-core/controller/noteEditorManager";
19
+ import { CanonicalSaveDiagnosticError as _e, serializeCanonicalSave as ve } from "@stll/folio-core/docx/canonicalSave";
20
+ import { prepareCanonicalDocxInput as ye } from "@stll/folio-core/docx/canonicalSessionInput";
21
+ import { parseDocx as be } from "@stll/folio-core/docx/parser";
22
+ import { getFootnoteText as xe } from "@stll/folio-core/docx/storyPlainText";
23
+ import { convertHeaderFooterPmDocToContent as Se, convertHeaderFooterToContent as Ce } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
24
+ import { resolveSectionHeaderFooterRefs as we } from "@stll/folio-core/layout-engine";
25
+ import { LayoutPainter as Te, releaseDisplayPageResources as Ee } from "@stll/folio-core/layout-painter";
26
+ import { LayoutSelectionGate as De } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
27
+ import { fromProseDoc as Oe } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
28
+ import { ExtensionManager as ke } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
29
+ import { getChangedParagraphIds as Ae, hasStructuralChanges as je, hasUntrackedChanges as Me, repackWithEditorSectionRemovals as Ne } from "@stll/folio-core/prosemirror/extensions/features/ParagraphChangeTrackerExtension";
30
+ import { createStarterKit as Pe } from "@stll/folio-core/prosemirror/extensions/StarterKit";
31
+ import { createNoteReferenceFollower as Fe, withoutUnreferencedNotes as Ie } from "@stll/folio-core/prosemirror/noteReferenceReview";
32
+ import { createAnonymizationDecorationsPlugin as Le } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
33
+ import { autocompleteSuggestionPlugin as Re } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
34
+ import { createTemplateDirectivesPlugin as ze } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
35
+ import { createTemplatePreviewValuesPlugin as Be } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
36
+ import { templateSlashMenuPlugin as Ve } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
37
+ import { resolveHeaderFooterContent as He } from "@stll/folio-core/utils/headerFooter";
38
+ import { FindReplaceManager as Ue } from "@stll/folio-core/managers/FindReplaceManager";
39
+ import { findInDisplayedDocument as We, resolveFindMatchRange as Ge } from "@stll/folio-core/prosemirror/findReplaceSelection";
40
+ import { createFindMatchView as Ke, getRenderedSearchStories as E } from "@stll/folio-core/utils/findMatchView";
41
+ import { createDefaultFindOptions as qe, replaceEligibility as Je } from "@stll/folio-core/utils/findReplace";
42
+ import { createFindSearchKey as Ye, sameFindSearchKey as Xe } from "@stll/folio-core/utils/findSearchKey";
43
+ import { MIN_CELL_WIDTH_TWIPS as Ze, MIN_ROW_HEIGHT_TWIPS as D, TWIPS_PER_PIXEL as O, clampRowResizeDelta as Qe, commitColumnResize as $e, commitRightEdgeResize as et, commitRowResize as tt, readColumnWidthAt as nt, readColumnWidths as rt, readRowHeight as it } from "@stll/folio-core/prosemirror/tableResize";
44
+ import { extractTrackedChanges as at } from "@stll/folio-core/prosemirror/utils/extractTrackedChanges";
45
+ import { ZOOM_MAX as ot, ZOOM_MIN as k, ZOOM_STEP as A } from "@stll/folio-core/utils/zoom";
46
46
  //#region src/utils/colorMode.ts
47
- var A = "(prefers-color-scheme: dark)";
48
- function ot() {
47
+ var st = "(prefers-color-scheme: dark)";
48
+ function j() {
49
49
  return typeof window < "u" && typeof window.matchMedia == "function";
50
50
  }
51
- function j(e, t) {
51
+ function M(e, t) {
52
52
  return e === "dark" || e === "system" && t;
53
53
  }
54
- function M(e) {
55
- if (!ot()) return () => {};
56
- let t = window.matchMedia(A);
54
+ function N(e) {
55
+ if (!j()) return () => {};
56
+ let t = window.matchMedia(st);
57
57
  e(t.matches);
58
58
  let n = (t) => e(t.matches);
59
59
  return t.addEventListener("change", n), () => t.removeEventListener("change", n);
60
60
  }
61
61
  //#endregion
62
62
  //#region src/composables/useColorMode.ts
63
- var N = "light", P = Symbol("folioColorMode"), F = (t = N) => {
64
- a(P, e(() => l(t)));
65
- }, I = { install(t, n = N) {
66
- t.provide(P, e(() => l(n)));
63
+ var P = "light", F = Symbol("folioColorMode"), I = (t = P) => {
64
+ a(F, e(() => l(t)));
65
+ }, ct = { install(t, n = P) {
66
+ t.provide(F, e(() => l(n)));
67
67
  } };
68
- function st() {
69
- let n = t(P, e(() => N)), i = s(!1), a = s(!1);
68
+ function L() {
69
+ let n = t(F, e(() => P)), i = s(!1), a = s(!1);
70
70
  return r(() => {
71
71
  i.value = !0;
72
72
  }), d((e) => {
73
- !i.value || n.value !== "system" || e(M((e) => {
73
+ i.value && n.value === "system" && e(N((e) => {
74
74
  a.value = e;
75
75
  }));
76
- }), e(() => j(n.value, i.value && a.value));
76
+ }), e(() => M(n.value, i.value && a.value));
77
77
  }
78
78
  //#endregion
79
79
  //#region src/composables/useDocxEditor.ts
80
- var ct = 24, lt = "User", ut = 250, dt = [], ft = [];
81
- function pt(e) {
80
+ var lt = 24, ut = "User", dt = 250, ft = [], pt = [];
81
+ function mt(e) {
82
82
  let t = e?.columnCount ?? 1;
83
83
  if (t <= 1) return;
84
84
  let n = {
85
85
  count: t,
86
- gap: ie(e?.columnSpace ?? 720),
86
+ gap: b(e?.columnSpace ?? 720),
87
87
  equalWidth: e?.equalWidth ?? !0
88
88
  };
89
89
  return e?.separator !== void 0 && (n.separator = e.separator), n;
90
90
  }
91
- function mt(e, t, n, r, i, a) {
91
+ function ht(e, t, n, r, i, a) {
92
92
  if (!e) return;
93
93
  let o = t ? {
94
94
  ...a,
95
95
  rId: t
96
96
  } : a, s = t ? n?.getView(t) : null;
97
- return s ? T(s.state.doc, r, i, o) : Oe(e, r, i, o);
97
+ return s ? Se(s.state.doc, r, i, o) : Ce(e, r, i, o);
98
98
  }
99
- function ht(e, t, n, r, i) {
99
+ function gt(e, t, n, r, i) {
100
100
  if (!e || e.size === 0) return;
101
101
  let a = /* @__PURE__ */ new Map();
102
102
  for (let [o, s] of e) {
103
- let e = mt(s, o, t, n, r, i);
103
+ let e = ht(s, o, t, n, r, i);
104
104
  e && a.set(o, e);
105
105
  }
106
106
  return a.size > 0 ? a : void 0;
107
107
  }
108
- function gt(e, t, n) {
108
+ function _t(e, t, n) {
109
109
  let r = /* @__PURE__ */ new Map();
110
110
  if (!n || !n.package.footnotes) return r;
111
111
  let i = /* @__PURE__ */ new Map();
@@ -119,7 +119,7 @@ function gt(e, t, n) {
119
119
  e.push({
120
120
  displayNumber: String(o),
121
121
  noteId: n,
122
- text: C(r),
122
+ text: xe(r),
123
123
  ...a ? { content: {
124
124
  blocks: a.blocks,
125
125
  measures: a.measures,
@@ -131,7 +131,7 @@ function gt(e, t, n) {
131
131
  }
132
132
  return r;
133
133
  }
134
- var L = /* @__PURE__ */ new Set([
134
+ var R = /* @__PURE__ */ new Set([
135
135
  "black",
136
136
  "blue",
137
137
  "cyan",
@@ -150,48 +150,48 @@ var L = /* @__PURE__ */ new Set([
150
150
  "white",
151
151
  "yellow"
152
152
  ]);
153
- function _t(e) {
153
+ function vt(e) {
154
154
  let t = [], n = (e, r) => {
155
- for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !L.has(String(i.attrs.color)) && t.push(`${r}.marks[${n}]=${JSON.stringify(i.attrs)}`);
155
+ for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !R.has(String(i.attrs.color)) && t.push(`${r}.marks[${n}]=${JSON.stringify(i.attrs)}`);
156
156
  e.forEach((e, t, i) => {
157
157
  n(e, `${r}.content[${i}]`);
158
158
  });
159
159
  };
160
160
  return n(e, "doc"), t.join("; ");
161
161
  }
162
- function R(e) {
163
- let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: o = !1, experimentalSession: d, pageGap: ie = ct, pageRenderer: x, markupView: S = "all-markup", showCommentHighlights: se = !0, showMarginGuides: le, marginGuideColor: ue, password: C, editorMode: T, author: Oe, externalPlugins: We = [], historyShortcuts: Ge = "editor", collaboration: E, onAnonymizationMatchesChange: Ke, showTemplateDirectives: qe, onSlashMenuChange: Je, onSlashMenuKeyAction: Ye, onChange: Xe, onError: D, onSelectionUpdate: O, onEditorViewReady: Ze, onCopy: Qe, onCut: $e, onPaste: et, onReadOnlyEditAttempt: tt, featureFlags: nt, onSelectiveSaveTripwire: rt } = e, it = n ?? t, at = () => l(Oe) ?? lt, k = c(null), A = 0, ot = !1, j = 0, M = !1, N = c(null), P = c(null), F = c(null), I = c([]), st = c(null), L = c(null), R = c(null), vt = c([]), yt = c([]), z = s(!1), B = s(null), V = s(!1), H = () => m(l(d), f.authorityRouting), U = (e) => H() ? te(e) : e, bt = (e, t) => {
162
+ function yt(e) {
163
+ let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: o = !1, experimentalSession: d, pageGap: ee = lt, pageRenderer: _, markupView: v = "all-markup", showCommentHighlights: b = !0, showMarginGuides: xe, marginGuideColor: Se, password: Ce, editorMode: Ue, author: We, externalPlugins: Ge = [], historyShortcuts: Ke = "editor", collaboration: E, onAnonymizationMatchesChange: qe, showTemplateDirectives: Je, onSlashMenuChange: Ye, onSlashMenuKeyAction: Xe, onChange: Ze, onError: D, onSelectionUpdate: O, onEditorViewReady: Qe, onCopy: $e, onCut: et, onPaste: tt, onReadOnlyEditAttempt: nt, featureFlags: rt, onSelectiveSaveTripwire: it } = e, at = n ?? t, ot = () => l(We) ?? ut, k = c(null), A = 0, st = !1, j = 0, M = !1, N = c(null), P = c(null), F = c(null), I = c([]), ct = c(null), L = c(null), R = c(null), yt = c([]), bt = c([]), z = s(!1), B = s(null), V = s(!1), H = () => re(l(d), x.authorityRouting), U = (e) => H() ? g(e) : e, xt = (e, t) => {
164
164
  if (!H()) return !1;
165
- let n = new v({
165
+ let n = new f({
166
166
  gap: e,
167
- message: p(e, t)
167
+ message: ne(e, t)
168
168
  });
169
169
  return D?.(n), !0;
170
- }, W = new Fe(Be({ historyShortcuts: Ge }));
170
+ }, W = new ke(Pe({ historyShortcuts: Ke }));
171
171
  W.buildSchema(), W.initializeRuntime();
172
- let xt = de(!1), St = [xt], Ct = oe({ keymap: !0 }), wt = ae({ onMatchesChange: (e) => Ke?.(e) }), Tt = ce(), Et = He({
173
- onChange: (e) => Je?.(e),
174
- onKeyAction: (e) => Ye?.(e) ?? !1
175
- }), Dt = Ve(), Ot = () => l(qe) === !0;
176
- function kt() {
172
+ let St = ie(!1), Ct = [St], wt = Re({ keymap: !0 }), Tt = Le({ onMatchesChange: (e) => qe?.(e) }), Et = ze(), Dt = Ve({
173
+ onChange: (e) => Ye?.(e),
174
+ onKeyAction: (e) => Xe?.(e) ?? !1
175
+ }), Ot = Be(), kt = () => l(Je) === !0;
176
+ function At() {
177
177
  return [
178
- Ct,
179
- xt,
180
- ...We,
181
- ...l(E)?.plugins ?? [],
182
178
  wt,
183
- ...Ot() ? [Tt, Et] : [],
184
- Dt
179
+ St,
180
+ ...Ge,
181
+ ...l(E)?.plugins ?? [],
182
+ Tt,
183
+ ...kt() ? [Et, Dt] : [],
184
+ Ot
185
185
  ];
186
186
  }
187
- let G = he(), K = new je(), q = Ee(), At = Se({
187
+ let G = se(), K = new De(), q = he(), jt = de({
188
188
  relayout: () => {
189
189
  let e = N.value?.state ?? q.lastEditorState;
190
190
  e && Z(e, { reason: "hyphenation-ready" });
191
191
  },
192
192
  onError: (e) => D?.(e)
193
193
  });
194
- i(At.cancel), i(Te({
194
+ i(jt.cancel), i(le({
195
195
  measuredFontSet: () => q.lastMeasureInputs?.fontSet ?? null,
196
196
  relayout: () => {
197
197
  if (M) return;
@@ -199,17 +199,17 @@ function R(e) {
199
199
  e && Z(e, { reason: "font-ready" });
200
200
  }
201
201
  }));
202
- let jt = new Ae({
203
- pageGap: ie,
202
+ let Mt = new Te({
203
+ pageGap: ee,
204
204
  showShadow: !0
205
- }), J = ye({
206
- getHost: () => it.value,
205
+ }), J = ue({
206
+ getHost: () => at.value,
207
207
  getReadOnly: () => l(o),
208
208
  getDocument: () => $.api.getCanonicalDocument() ?? k.value,
209
209
  getCanonicalApi: () => $.api,
210
210
  getExperimentalSession: () => l(d),
211
211
  onSessionRefusal: (e, t, n) => {
212
- B.value = e, D?.(n ?? new v({
212
+ B.value = e, D?.(n ?? new f({
213
213
  gap: t,
214
214
  message: e
215
215
  }));
@@ -217,9 +217,9 @@ function R(e) {
217
217
  getStyles: () => k.value?.package.styles ?? null,
218
218
  getTheme: () => k.value?.package.theme ?? null,
219
219
  onTransaction: ({ rId: e, kind: t, view: n, docChanged: r, selectionChanged: i }) => {
220
- if (r && (V.value = !0, Pt.schedule()), r || i) {
220
+ if (r && (V.value = !0, Ft.schedule()), r || i) {
221
221
  let { from: r, to: i } = n.state.selection;
222
- st.value = {
222
+ ct.value = {
223
223
  from: r,
224
224
  kind: t,
225
225
  rId: e,
@@ -231,14 +231,14 @@ function R(e) {
231
231
  }
232
232
  K.requestRender();
233
233
  }
234
- }), Mt = { current: null }, Y = be({
234
+ }), Nt = { current: null }, Y = ge({
235
235
  getHost: () => r?.value ?? null,
236
- getPlugins: () => St,
236
+ getPlugins: () => Ct,
237
237
  getDocument: () => $.api.getCanonicalDocument() ?? k.value,
238
238
  getCanonicalApi: () => $.api,
239
239
  getExperimentalSession: () => l(d),
240
240
  onSessionRefusal: (e, t, n) => {
241
- B.value = e, D?.(n ?? new v({
241
+ B.value = e, D?.(n ?? new f({
242
242
  gap: t,
243
243
  message: e
244
244
  }));
@@ -250,10 +250,10 @@ function R(e) {
250
250
  V.value = !0;
251
251
  let e = k.value;
252
252
  if (e) {
253
- let t = $.api.getCanonicalDocument() ?? Mt.current?.snapshotDocument(e) ?? e;
254
- k.value = t, Xe?.(U(t)), G.emit("docChange", U(t));
253
+ let t = $.api.getCanonicalDocument() ?? Nt.current?.snapshotDocument(e) ?? e;
254
+ k.value = t, Ze?.(U(t)), G.emit("docChange", U(t));
255
255
  }
256
- Pt.schedule();
256
+ Ft.schedule();
257
257
  }
258
258
  if (e || t) {
259
259
  O?.(n.state);
@@ -265,40 +265,40 @@ function R(e) {
265
265
  }
266
266
  }
267
267
  });
268
- Mt.current = Y;
268
+ Nt.current = Y;
269
269
  let X = () => {
270
270
  J.sync(), Y.sync();
271
271
  };
272
272
  u(() => l(d), X);
273
- function Nt(e) {
274
- e.layout && (R.value = e.layout), e.blocks && (vt.value = e.blocks), e.measures && (yt.value = e.measures), e.blockLookup && jt.setBlockLookup(e.blockLookup), e.layout && G.emit("layoutComplete", e.layout);
273
+ function Pt(e) {
274
+ e.layout && (R.value = e.layout), e.blocks && (yt.value = e.blocks), e.measures && (bt.value = e.measures), e.blockLookup && Mt.setBlockLookup(e.blockLookup), e.layout && G.emit("layoutComplete", e.layout);
275
275
  }
276
276
  function Z(e, t = {}) {
277
277
  if (M) return;
278
- let n = a.value, r = n instanceof HTMLDivElement ? n : null, i = k.value, o = i?.package.document, s = o?.sections?.[0]?.properties ?? o?.finalSectionProperties ?? null, c = re(s), u = ne(s), d = pt(s), f = c.w - u.left - u.right, p = i?.package.styles ?? null, m = i?.package.theme ?? null, h = i?.package.settings?.defaultTabStop, g = i?.package.settings?.mirrorMargins === !0, _ = Ue(i?.package);
278
+ let n = a.value, r = n instanceof HTMLDivElement ? n : null, i = k.value, o = i?.package.document, s = o?.sections?.[0]?.properties ?? o?.finalSectionProperties ?? null, c = y(s), u = te(s), d = mt(s), f = c.w - u.left - u.right, p = i?.package.styles ?? null, m = i?.package.theme ?? null, h = i?.package.settings?.defaultTabStop, g = i?.package.settings?.mirrorMargins === !0, x = He(i?.package);
279
279
  try {
280
- Nt(xe({
280
+ Pt(fe({
281
281
  contentWidth: f,
282
282
  columns: d,
283
283
  pageSize: c,
284
284
  margins: u,
285
- pageGap: ie,
286
- showMarginGuides: l(le) === !0,
287
- marginGuideColor: l(ue),
285
+ pageGap: ee,
286
+ showMarginGuides: l(xe) === !0,
287
+ marginGuideColor: l(Se),
288
288
  ...(() => {
289
- let e = l(x);
289
+ let e = l(_);
290
290
  return e === void 0 ? {} : { pageRenderer: e };
291
291
  })(),
292
292
  syncCoordinator: K,
293
- headerContent: _.headerContent,
294
- footerContent: _.footerContent,
295
- firstPageHeaderContent: _.firstPageHeaderContent,
296
- firstPageFooterContent: _.firstPageFooterContent,
297
- headerContentRId: _.activeHeaderRId,
298
- footerContentRId: _.activeFooterRId,
299
- firstPageHeaderContentRId: _.activeFirstHeaderRId,
300
- firstPageFooterContentRId: _.activeFirstFooterRId,
301
- sectionHeaderFooterRefs: ke(i),
293
+ headerContent: x.headerContent,
294
+ footerContent: x.footerContent,
295
+ firstPageHeaderContent: x.firstPageHeaderContent,
296
+ firstPageFooterContent: x.firstPageFooterContent,
297
+ headerContentRId: x.activeHeaderRId,
298
+ footerContentRId: x.activeFooterRId,
299
+ firstPageHeaderContentRId: x.activeFirstHeaderRId,
300
+ firstPageFooterContentRId: x.activeFirstFooterRId,
301
+ sectionHeaderFooterRefs: we(i),
302
302
  theme: m,
303
303
  sectionProperties: s,
304
304
  document: i,
@@ -307,70 +307,70 @@ function R(e) {
307
307
  styles: p,
308
308
  layout: R.value,
309
309
  hfPMs: J,
310
- painter: jt,
310
+ painter: Mt,
311
311
  pagesContainer: r,
312
312
  session: q,
313
- renderHfFromContentOrPm: mt,
314
- renderHeaderFooterContentByRId: ht,
315
- readFontSetSignature: Ce,
316
- buildFootnoteRenderItems: gt,
317
- describeInvalidHighlightMarks: _t,
318
- emptyTemplatePreviewEntries: dt,
319
- emptyTemplatePreviewHidden: ft,
320
- hyphenationReadiness: At,
321
- markupView: l(S),
322
- showCommentHighlights: l(se)
313
+ renderHfFromContentOrPm: ht,
314
+ renderHeaderFooterContentByRId: gt,
315
+ readFontSetSignature: ce,
316
+ buildFootnoteRenderItems: _t,
317
+ describeInvalidHighlightMarks: vt,
318
+ emptyTemplatePreviewEntries: ft,
319
+ emptyTemplatePreviewHidden: pt,
320
+ hyphenationReadiness: jt,
321
+ markupView: l(v),
322
+ showCommentHighlights: l(b)
323
323
  }, e, t));
324
324
  } catch (e) {
325
325
  let t = e instanceof Error ? e : Error(String(e));
326
326
  D?.(t);
327
327
  }
328
328
  }
329
- let Pt = _({
329
+ let Ft = me({
330
330
  readState: () => N.value?.state ?? null,
331
331
  runLayout: (e, t) => Z(e, t),
332
- ...h,
333
- clock: g
334
- }), Q = null, Ft = Ne();
335
- function It() {
332
+ ...T,
333
+ clock: pe
334
+ }), Q = null, It = Fe();
335
+ function Lt() {
336
336
  Q !== null && (window.clearTimeout(Q), Q = null);
337
337
  let e = N.value, t = k.value;
338
- if (!(!e || !t)) try {
338
+ if (e && t) try {
339
339
  let n = $.api.getCanonicalDocument();
340
340
  if (!n && H()) return;
341
- let r = n ?? Ft.reconcile(Me(e.state.doc, t, { stylesheetSource: { type: "package" } }), e.state.doc);
342
- k.value = r, X(), Xe?.(U(r)), G.emit("docChange", U(r));
341
+ let r = n ?? It.reconcile(Oe(e.state.doc, t, { stylesheetSource: { type: "package" } }), e.state.doc);
342
+ k.value = r, X(), Ze?.(U(r)), G.emit("docChange", U(r));
343
343
  } catch (e) {
344
344
  D?.(e instanceof Error ? e : Error(String(e)));
345
345
  }
346
346
  }
347
- function Lt() {
347
+ function Rt() {
348
348
  Q !== null && window.clearTimeout(Q), Q = window.setTimeout(() => {
349
- Q = null, It();
350
- }, ut);
349
+ Q = null, Lt();
350
+ }, dt);
351
351
  }
352
- let $ = y({
352
+ let $ = m({
353
353
  getHost: () => t.value,
354
354
  getDocument: () => k.value,
355
355
  getStyles: () => k.value?.package.styles ?? null,
356
356
  getExtensionManager: () => W,
357
- getExternalPlugins: kt,
357
+ getExternalPlugins: At,
358
358
  getCollaboration: () => l(E),
359
359
  getCollaborationModules: () => F.value,
360
360
  getPrecomputedInitialState: () => null,
361
361
  getReadOnly: () => l(o),
362
362
  getExperimentalSession: () => l(d),
363
- getEditingMode: () => l(T) ?? "editing",
364
- getSuggestionAuthor: at,
363
+ getEditingMode: () => l(Ue) ?? "editing",
364
+ getSuggestionAuthor: ot,
365
365
  onSessionRefusal: (e, t, n) => {
366
- D?.(n ?? new v({
366
+ D?.(n ?? new f({
367
367
  gap: t,
368
368
  message: e
369
369
  }));
370
370
  },
371
371
  getDocumentIdentity: () => String(A),
372
372
  getDocumentContext: () => k.value,
373
- onTransaction: zt,
373
+ onTransaction: Bt,
374
374
  onSelectionChange: (e) => {
375
375
  P.value = e, O?.(e), G.emit("selectionChange", {
376
376
  from: e.selection.from,
@@ -378,20 +378,20 @@ function R(e) {
378
378
  });
379
379
  },
380
380
  onKeyDown: () => !1,
381
- onCopy: () => Qe?.(),
382
- onCut: () => $e?.(),
383
- onPaste: () => et?.(),
384
- onReadOnlyEditAttempt: () => tt?.(),
385
- onEditorViewReady: Bt,
381
+ onCopy: () => $e?.(),
382
+ onCut: () => et?.(),
383
+ onPaste: () => tt?.(),
384
+ onReadOnlyEditAttempt: () => nt?.(),
385
+ onEditorViewReady: Vt,
386
386
  onEditorViewDestroy: () => {
387
- N.value = null, z.value = !1, Ze?.(null);
387
+ N.value = null, z.value = !1, Qe?.(null);
388
388
  },
389
389
  onRemoteSelectionsChange: (e) => {
390
390
  I.value = e;
391
391
  }
392
- }), Rt = () => {
392
+ }), zt = () => {
393
393
  let e = l(E)?.awareness, t = F.value, n = $.getView();
394
- I.value = e && t && n ? ee(n.state, e, t) : [];
394
+ I.value = e && t && n ? p(n.state, e, t) : [];
395
395
  };
396
396
  u(() => l(E), (e, t, n) => {
397
397
  if (I.value = [], !e) {
@@ -401,8 +401,8 @@ function R(e) {
401
401
  let r = !1;
402
402
  n(() => {
403
403
  r = !0;
404
- }), F.value = null, ve().then((e) => {
405
- r || (F.value = e, $.retryViewCreation(), $.syncExternalDocument(), Rt());
404
+ }), F.value = null, ae().then((e) => {
405
+ r || (F.value = e, $.retryViewCreation(), $.syncExternalDocument(), zt());
406
406
  }, (e) => {
407
407
  r || (F.value = null, D?.(e instanceof Error ? e : Error(String(e))));
408
408
  });
@@ -411,90 +411,87 @@ function R(e) {
411
411
  modules: F.value,
412
412
  view: N.value
413
413
  }), ({ awareness: e, modules: t, view: n }, r, i) => {
414
- if (!e || !t || !n) {
415
- I.value = [];
416
- return;
417
- }
418
- e.on("change", Rt), Rt(), i(() => {
419
- e.off("change", Rt), I.value = [];
420
- });
414
+ !e || !t || !n ? I.value = [] : (e.on("change", zt), zt(), i(() => {
415
+ e.off("change", zt), I.value = [];
416
+ }));
421
417
  }, { flush: "post" });
422
- function zt({ newState: e, docChanged: t, transactions: n }) {
418
+ function Bt({ newState: e, docChanged: t, transactions: n }) {
423
419
  P.value = e;
424
420
  let r = n[0]?.before;
425
- if (t && r && Ft.noteBase(r), t) {
421
+ if (t && r && It.noteBase(r), t) {
426
422
  let e = $.api.getCanonicalDocument();
427
- e && (k.value = e, X()), V.value = !0, K.incrementStateSeq(), Pt.schedule(), Lt();
423
+ e && (k.value = e, X()), V.value = !0, K.incrementStateSeq(), Ft.schedule(), Rt();
428
424
  }
429
425
  K.requestRender();
430
426
  }
431
- function Bt(e) {
427
+ function Vt(e) {
432
428
  N.value = e, P.value = e.state, z.value = !0;
433
429
  let t = k.value, n = A, r = ++j;
434
430
  M = !0;
435
431
  let i = () => {
436
- j === r && (M = !1, !(ot || A !== n || $.getView() !== e) && (Z(e.state, { reason: "initial" }), K.requestRender()));
432
+ j === r && (M = !1, !(st || A !== n || $.getView() !== e) && (Z(e.state, { reason: "initial" }), K.requestRender()));
437
433
  };
438
- we(t, e.state.doc).then(i, i), Ut(e), Ze?.(e), l(o) || requestAnimationFrame(() => {
434
+ w(t, e.state.doc).then(i, i), Wt(e), Qe?.(e), l(o) || requestAnimationFrame(() => {
439
435
  N.value === e && e.focus();
440
436
  });
441
437
  }
442
- let Vt = {
443
- getDocx: async (e) => (await Xt(e))?.buffer ?? null,
444
- loadDocument: Yt,
445
- loadDocx: Jt
446
- }, Ht = me({
438
+ let Ht = {
439
+ getDocx: async (e) => (await Zt(e))?.buffer ?? null,
440
+ loadDocument: Xt,
441
+ loadDocx: Yt
442
+ }, Ut = oe({
447
443
  getEditorApi: () => $.api,
448
444
  getLayout: () => R.value,
449
445
  runLayout: (e, t) => Z(e, t),
450
- getDocumentIO: () => Vt,
446
+ getDocumentIO: () => Ht,
451
447
  emitter: G
452
448
  });
453
- function Ut(e) {
454
- fe(l(T) === "suggesting", e.state, e.dispatch, at());
449
+ function Wt(e) {
450
+ let t = l(Ue) === "suggesting";
451
+ S(t, e.state, e.dispatch, ot());
455
452
  }
456
- u([() => l(T), at], () => {
457
- Ht.setCanonicalMode(l(T) === "suggesting" ? {
453
+ u([() => l(Ue), ot], () => {
454
+ Ut.setCanonicalMode(l(Ue) === "suggesting" ? {
458
455
  type: "suggesting",
459
- author: at()
456
+ author: ot()
460
457
  } : { type: "editing" });
461
458
  let e = N.value;
462
- e && Ut(e);
459
+ e && Wt(e);
463
460
  for (let e of Y.listStories()) {
464
461
  let t = Y.getView(e);
465
- t && Ut(t);
462
+ t && Wt(t);
466
463
  }
467
464
  }), u(() => l(o), (e) => {
468
- $.syncEditable(), e && rn(), J.sync();
465
+ $.syncEditable(), e && an(), J.sync();
469
466
  });
470
- function Wt(e) {
471
- let t = Ot();
472
- if (t === e.state.plugins.includes(Tt)) return;
473
- let n = e.state.plugins.filter((e) => e !== Tt && e !== Et);
467
+ function Gt(e) {
468
+ let t = kt();
469
+ if (t === e.state.plugins.includes(Et)) return;
470
+ let n = e.state.plugins.filter((e) => e !== Et && e !== Dt);
474
471
  if (t) {
475
- let e = n.indexOf(Dt), t = e === -1 ? n.length : e;
476
- n.splice(t, 0, Tt, Et);
472
+ let e = n.indexOf(Ot), t = e === -1 ? n.length : e;
473
+ n.splice(t, 0, Et, Dt);
477
474
  }
478
475
  e.updateState(e.state.reconfigure({ plugins: n }));
479
476
  }
480
- u(() => Ot(), () => {
477
+ u(() => kt(), () => {
481
478
  let e = N.value;
482
- e && Wt(e);
479
+ e && Gt(e);
483
480
  });
484
- function Gt() {
485
- $.ensureView();
486
- }
487
481
  function Kt() {
488
- A += 1, V.value = !1, st.value = null, L.value = null, Y.activate(null), Pt.dispose(), $.destroyView(), H() && $.ensureView(), X(), $.ensureView(), $.getView() || qt();
482
+ $.ensureView();
489
483
  }
490
484
  function qt() {
485
+ A += 1, V.value = !1, ct.value = null, L.value = null, Y.activate(null), Ft.dispose(), $.destroyView(), H() && $.ensureView(), X(), $.ensureView(), $.getView() || Jt();
486
+ }
487
+ function Jt() {
491
488
  let e = k.value;
492
- if (!(!e || l(E))) try {
493
- let t = b({
489
+ if (e && !l(E)) try {
490
+ let t = h({
494
491
  document: e,
495
492
  styles: e.package.styles ?? null,
496
493
  manager: W,
497
- externalPlugins: kt(),
494
+ externalPlugins: At(),
498
495
  collaborationModules: null,
499
496
  reason: "mount"
500
497
  });
@@ -502,9 +499,9 @@ function R(e) {
502
499
  let n = A, r = ++j;
503
500
  M = !0;
504
501
  let i = () => {
505
- j === r && (M = !1, !(ot || A !== n || k.value !== e || $.getView()) && Z(t, { reason: "initial" }));
502
+ j === r && (M = !1, !(st || A !== n || k.value !== e || $.getView()) && Z(t, { reason: "initial" }));
506
503
  };
507
- we(e, t.doc).then(i, i);
504
+ w(e, t.doc).then(i, i);
508
505
  } catch (e) {
509
506
  D?.(e instanceof Error ? e : Error(String(e)));
510
507
  }
@@ -512,86 +509,86 @@ function R(e) {
512
509
  u([
513
510
  t,
514
511
  a,
515
- it,
512
+ at,
516
513
  ...r ? [r] : []
517
514
  ], () => {
518
- t.value && k.value && !$.getView() && Gt(), X();
515
+ t.value && k.value && !$.getView() && Kt(), X();
519
516
  }, { flush: "post" });
520
- async function Jt(e) {
517
+ async function Yt(e) {
521
518
  B.value = null, z.value = !1;
522
519
  try {
523
520
  let t = e;
524
521
  if (H()) {
525
- let n = await w(e);
522
+ let n = await ye(e);
526
523
  if (n.isErr()) throw n.error;
527
524
  t = n.value;
528
525
  }
529
- let n = await De(t, { password: l(C) });
530
- k.value = n, Kt();
526
+ let n = await be(t, { password: l(Ce) });
527
+ k.value = n, qt();
531
528
  } catch (e) {
532
529
  let t = e instanceof Error ? e : Error(String(e));
533
530
  B.value = t.message, D?.(t);
534
531
  }
535
532
  }
536
- function Yt(e) {
537
- B.value = null, k.value = e, Ft.reset(), Kt();
533
+ function Xt(e) {
534
+ B.value = null, k.value = e, It.reset(), qt();
538
535
  }
539
- async function Xt(e) {
536
+ async function Zt(e) {
540
537
  let t = N.value, n = k.value;
541
538
  if (!t || !n) return null;
542
539
  try {
543
540
  let t = $.api.captureCanonicalSave();
544
541
  if (t) {
545
- let n = await _e({
542
+ let n = await ve({
546
543
  snapshot: t,
547
544
  options: e,
548
- featureFlags: l(nt)
545
+ featureFlags: l(rt)
549
546
  });
550
- for (let t of n.diagnostics) e?.onDiagnostic || D?.(new ge({
551
- gap: f.save,
547
+ for (let t of n.diagnostics) e?.onDiagnostic || D?.(new _e({
548
+ gap: x.save,
552
549
  diagnostic: t,
553
550
  message: `Canonical save used a fidelity fallback: ${t.type} (${t.part}).`
554
551
  }));
555
- return n.tripwireResult && rt?.(n.tripwireResult), n;
552
+ return n.tripwireResult && it?.(n.tripwireResult), n;
556
553
  }
557
554
  } catch (e) {
558
555
  return D?.(e instanceof Error ? e : Error(String(e))), null;
559
556
  }
560
557
  if (H()) return null;
561
- Q !== null && It();
562
- let r = Y.snapshotDocument(J.snapshotDocument(n)), i = t.state, a = Pe(Me(i.doc, r, { stylesheetSource: { type: "package" } })), { resolveSelectiveSaveFlags: o } = await import("@stll/folio-core/docx/selectiveSaveFlags"), s = o(l(nt)), c = a.originalBuffer ?? null, u = s.selectiveSave && e?.mode !== pe.full, d = u || s.selectiveSaveTripwire, { repackDocx: p, createDocx: m } = await import("@stll/folio-core/docx/rezip"), h = null;
558
+ Q !== null && Lt();
559
+ let r = Y.snapshotDocument(J.snapshotDocument(n)), i = t.state, a = Ie(Oe(i.doc, r, { stylesheetSource: { type: "package" } })), { resolveSelectiveSaveFlags: o } = await import("@stll/folio-core/docx/selectiveSaveFlags"), s = o(l(rt)), c = a.originalBuffer ?? null, u = s.selectiveSave && e?.mode !== C.full, d = u || s.selectiveSaveTripwire, { repackDocx: f, createDocx: p } = await import("@stll/folio-core/docx/rezip"), m = null;
563
560
  if (d && c) {
564
561
  let { attemptSelectiveSave: e } = await import("@stll/folio-core/docx/selectiveSave");
565
- h = await e(a, c, {
566
- changedParaIds: Ie(i),
567
- structuralChange: Le(i),
568
- hasUntrackedChanges: Re(i),
562
+ m = await e(a, c, {
563
+ changedParaIds: Ae(i),
564
+ structuralChange: je(i),
565
+ hasUntrackedChanges: Me(i),
569
566
  maxBytes: s.selectiveSaveMaxBytes
570
567
  });
571
568
  }
572
- let g = u ? h : null, _ = null, v = () => ze({
569
+ let h = u ? m : null, g = null, ee = () => Ne({
573
570
  state: i,
574
571
  document: a,
575
- repack: () => p(a)
572
+ repack: () => f(a)
576
573
  });
577
- if (!g) _ = c ? await v() : await m(a), g = _;
574
+ if (!h) g = c ? await ee() : await p(a), h = g;
578
575
  else if (s.selectiveSaveTripwire) try {
579
- _ = await v();
576
+ g = await ee();
580
577
  } catch {}
581
- if (s.selectiveSaveTripwire && _ && rt) try {
578
+ if (s.selectiveSaveTripwire && g && it) try {
582
579
  let { compareSelectiveVsFull: e } = await import("@stll/folio-core/docx/selectiveSaveTripwire");
583
- rt(await e(h, _));
580
+ it(await e(m, g));
584
581
  } catch {}
585
582
  return {
586
- buffer: g,
583
+ buffer: h,
587
584
  document: a
588
585
  };
589
586
  }
590
- async function Zt(e) {
591
- let t = N.value, n = t?.state, r = await Xt({ mode: e?.selective === !1 ? pe.full : pe.preferSelective });
587
+ async function Qt(e) {
588
+ let t = N.value, n = t?.state, r = await Zt({ mode: e?.selective === !1 ? C.full : C.preferSelective });
592
589
  return r ? (N.value === t && t?.state.doc === n?.doc && (r.version === void 0 || $.api.isCanonicalSaveCurrent(r.version)) && (k.value = r.document, X(), V.value = !1), new Blob([r.buffer], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" })) : null;
593
590
  }
594
- function Qt() {
591
+ function $t() {
595
592
  let e = $.api.getCanonicalDocument();
596
593
  if (e) return e;
597
594
  if (H()) return null;
@@ -600,186 +597,182 @@ function R(e) {
600
597
  let n = $.api.getDocument() ?? t;
601
598
  return U(Y.snapshotDocument(J.snapshotDocument(n)));
602
599
  }
603
- function $t(e) {
604
- bt(f.modelEdits, "Direct document model changes are unavailable in this session.") || (k.value = e, X(), L.value && !Y.getView(L.value) && (L.value = null));
605
- }
606
600
  function en(e) {
601
+ xt(x.modelEdits, "Direct document model changes are unavailable in this session.") || (k.value = e, X(), L.value && !Y.getView(L.value) && (L.value = null));
602
+ }
603
+ function tn(e) {
607
604
  return J.getView(e);
608
605
  }
609
- function tn() {
606
+ function nn() {
610
607
  X();
611
608
  }
612
- function nn(e) {
609
+ function rn(e) {
613
610
  let t = Y.activate(e);
614
- t && (Ut(t), L.value = e, requestAnimationFrame(() => t.focus()));
611
+ t && (Wt(t), L.value = e, requestAnimationFrame(() => t.focus()));
615
612
  }
616
- function rn() {
613
+ function an() {
617
614
  Y.activate(null), L.value = null;
618
615
  }
619
- function an() {
616
+ function on() {
620
617
  let e = L.value;
621
618
  return e ? Y.getView(e) : null;
622
619
  }
623
- function on() {
620
+ function sn() {
624
621
  return W.getCommands();
625
622
  }
626
- function sn() {
627
- let e = an();
623
+ function cn() {
624
+ let e = on();
628
625
  e ? e.focus() : N.value?.focus();
629
626
  }
630
- function cn() {
627
+ function ln() {
631
628
  let e = N.value;
632
629
  e && Z(e.state, { reason: "manual" });
633
630
  }
634
631
  u([
635
- () => l(le),
636
- () => l(ue),
637
- () => l(x),
638
- () => l(S),
639
- () => l(se)
640
- ], () => cn());
641
- function ln() {
642
- ot = !0, j += 1, M = !1, Pt.dispose(), Q !== null && (window.clearTimeout(Q), Q = null), $.destroyView(), I.value = [], J.destroy(), Y.destroy(), W.destroy(), P.value = null, R.value = null, k.value = null, z.value = !1;
643
- }
644
- return i(ln), {
632
+ () => l(xe),
633
+ () => l(Se),
634
+ () => l(_),
635
+ () => l(v),
636
+ () => l(b)
637
+ ], () => ln());
638
+ function un() {
639
+ st = !0, a.value && Ee(a.value), j += 1, M = !1, Ft.dispose(), Q !== null && (window.clearTimeout(Q), Q = null), $.destroyView(), I.value = [], J.destroy(), Y.destroy(), W.destroy(), P.value = null, R.value = null, k.value = null, z.value = !1;
640
+ }
641
+ return i(un), {
645
642
  setEmbeddedFontFamilies: (e) => {
646
- if (e) {
647
- q.embeddedFontFamilyMap = new Map(e);
648
- return;
649
- }
650
- delete q.embeddedFontFamilyMap;
643
+ e ? q.embeddedFontFamilyMap = new Map(e) : delete q.embeddedFontFamilyMap;
651
644
  },
652
- editor: Ht,
645
+ editor: Ut,
653
646
  editorView: N,
654
647
  editorState: P,
655
648
  remoteSelections: I,
656
- headerFooterSelection: st,
649
+ headerFooterSelection: ct,
657
650
  activeNoteStory: L,
658
651
  isReady: z,
659
652
  isDirty: V,
660
653
  parseError: B,
661
654
  layout: R,
662
- blocks: vt,
663
- measures: yt,
655
+ blocks: yt,
656
+ measures: bt,
664
657
  syncCoordinator: K,
665
- loadBuffer: Jt,
666
- loadDocument: Yt,
667
- save: Zt,
668
- getDocument: Qt,
669
- setDocument: $t,
670
- getHeaderFooterView: en,
671
- syncHeaderFooterViews: tn,
672
- openNoteStory: nn,
673
- closeNoteStory: rn,
674
- getActiveNoteView: an,
675
- getCommands: on,
676
- focus: sn,
677
- reLayout: cn,
678
- destroy: ln
658
+ loadBuffer: Yt,
659
+ loadDocument: Xt,
660
+ save: Qt,
661
+ getDocument: $t,
662
+ setDocument: en,
663
+ getHeaderFooterView: tn,
664
+ syncHeaderFooterViews: nn,
665
+ openNoteStory: rn,
666
+ closeNoteStory: an,
667
+ getActiveNoteView: on,
668
+ getCommands: sn,
669
+ focus: cn,
670
+ reLayout: ln,
671
+ destroy: un
679
672
  };
680
673
  }
681
674
  //#endregion
682
675
  //#region src/composables/useFindReplace.ts
683
- function vt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot: l, revealComment: d, displayMode: f, readOnly: p, onReadonlyEditAttempt: m, onResultChange: h }) {
684
- let g = new We(), _ = s(""), v = s(""), ee = o(le()), y = c([]), b = s(-1), te = e(() => y.value.at(b.value) ?? null), ne = () => se({
676
+ function bt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot: l, revealComment: d, displayMode: f, readOnly: p, onReadonlyEditAttempt: m, onResultChange: h }) {
677
+ let g = new Ue(), _ = s(""), v = s(""), te = o(qe()), y = c([]), b = s(-1), x = e(() => y.value.at(b.value) ?? null), ne = () => ee({
685
678
  editingMode: t.value?.editable === !1 ? "viewing" : "editing",
686
679
  readOnlyProp: p.value,
687
680
  displayMode: f.value
688
681
  }), re = e(ne), ie = e(() => {
689
- let e = te.value;
690
- return ne() === null && !!t.value && !!e && ce() && ue(e).status === "allowed";
691
- }), x = null, S, ae = null, oe = (e) => {
682
+ let e = x.value;
683
+ return ne() === null && !!t.value && !!e && se() && Je(e).status === "allowed";
684
+ }), S = null, ae, C = null, oe = (e) => {
692
685
  let n = t.value?.state.doc;
693
686
  return {
694
687
  query: _.value,
695
688
  options: {
696
- ...ee,
689
+ ...te,
697
690
  displayMode: f.value,
698
691
  includeComments: !!l
699
692
  },
700
693
  document: e,
701
694
  ...n ? { bodyVersion: n } : {},
702
- context: { renderedStories: Ye(a.value) }
695
+ context: { renderedStories: E(a.value) }
703
696
  };
704
- }, ce = () => {
697
+ }, se = () => {
705
698
  let e = r();
706
- return !!e && qe(ae, Ke(oe(e)));
707
- }, de = () => g.getResult(), fe = () => h(de()), C = () => {
708
- clearTimeout(S), S = void 0;
709
- }, pe = () => {
710
- C(), g.clear(), x?.destroy(), x = null, y.value = [], ae = null, b.value = -1;
711
- }, me = () => {
712
- pe(), _.value = "", fe();
713
- }, he = (e) => (b.value = e, x?.navigate(e, d), fe(), !0), w = (e = "query") => {
714
- C();
699
+ return !!e && Xe(C, Ye(oe(e)));
700
+ }, ce = () => g.getResult(), w = () => h(ce()), le = () => {
701
+ clearTimeout(ae), ae = void 0;
702
+ }, ue = () => {
703
+ le(), g.clear(), S?.destroy(), S = null, y.value = [], C = null, b.value = -1;
704
+ }, de = () => {
705
+ ue(), _.value = "", w();
706
+ }, fe = (e) => (b.value = e, S?.navigate(e, d), w(), !0), T = (e = "query") => {
707
+ le();
715
708
  let i = r(), o = n.value, s = t.value?.state.doc;
716
- if (!i || !_.value.trim()) return me(), [];
717
- let c = oe(i), u = Ge({
709
+ if (!i || !_.value.trim()) return de(), [];
710
+ let c = oe(i), u = We({
718
711
  document: c.document,
719
712
  state: t.value?.state ?? null,
720
713
  searchText: c.query,
721
714
  options: c.options,
722
715
  context: c.context
723
716
  });
724
- if (u === null) return pe(), fe(), [];
725
- let d = Ke(c), f = e === "refresh" && ae?.query === d.query, p = g.setMatches(u, f ? g.getResult()?.currentIndex ?? 0 : 0);
726
- return ae = d, y.value = u, b.value = u.length > 0 ? p.currentIndex : -1, x?.destroy(), x = o ? Je({
717
+ if (u === null) return ue(), w(), [];
718
+ let d = Ye(c), f = e === "refresh" && C?.query === d.query, p = g.setMatches(u, f ? g.getResult()?.currentIndex ?? 0 : 0);
719
+ return C = d, y.value = u, b.value = u.length > 0 ? p.currentIndex : -1, S?.destroy(), S = o ? Ke({
727
720
  container: o,
728
721
  document: i,
729
722
  bodyDoc: s,
730
723
  matches: u,
731
724
  commentRoot: l?.value ?? void 0,
732
725
  layout: a.value
733
- }) : null, x?.paint(b.value), u.at(0) && !f ? he(0) : fe(), u;
734
- }, ge = () => {
735
- C(), S = setTimeout(() => w("refresh"), 120);
736
- }, _e = (e, t) => (_.value = e, Object.assign(ee, le(), t), w(), de()), ve = (e) => {
726
+ }) : null, S?.paint(b.value), u.at(0) && !f ? fe(0) : w(), u;
727
+ }, pe = () => {
728
+ le(), ae = setTimeout(() => T("refresh"), 120);
729
+ }, me = (e, t) => (_.value = e, Object.assign(te, qe(), t), T(), ce()), he = (e) => {
737
730
  let t = g.goTo(e);
738
- return t ? he(t.index) : !1;
739
- }, ye = (e) => {
731
+ return t ? fe(t.index) : !1;
732
+ }, ge = (e) => {
740
733
  let t = g.navigate(e);
741
- return t ? (he(t.index), t.match) : null;
742
- }, be = () => ce() ? !1 : (w("refresh"), !0), xe = () => {
734
+ return t ? (fe(t.index), t.match) : null;
735
+ }, _e = () => !se() && (T("refresh"), !0), ve = () => {
743
736
  let e = ne();
744
- return e === null ? !1 : (m?.(e), !0);
737
+ return e !== null && (m?.(e), !0);
745
738
  };
746
739
  return u(f, () => {
747
- _.value.trim() && w();
740
+ _.value.trim() && T();
748
741
  }), i(() => {
749
- C(), x?.destroy();
742
+ le(), S?.destroy();
750
743
  }), {
751
744
  searchText: _,
752
745
  replaceText: v,
753
- options: ee,
746
+ options: te,
754
747
  matches: y,
755
748
  currentIndex: b,
756
- currentMatch: te,
749
+ currentMatch: x,
757
750
  canReplaceCurrent: ie,
758
751
  replacementRefusal: re,
759
- performSearch: w,
760
- scheduleSearch: ge,
761
- find: _e,
762
- getFindResult: de,
763
- goToMatch: ve,
764
- findNext: () => ye("next"),
765
- findPrevious: () => ye("previous"),
752
+ performSearch: T,
753
+ scheduleSearch: pe,
754
+ find: me,
755
+ getFindResult: ce,
756
+ goToMatch: he,
757
+ findNext: () => ge("next"),
758
+ findPrevious: () => ge("previous"),
766
759
  replaceCurrent: () => {
767
760
  let e = t.value;
768
- if (!e || xe() || be()) return !1;
769
- let n = te.value;
761
+ if (!e || ve() || _e()) return !1;
762
+ let n = x.value;
770
763
  if (!ie.value || !e || !n) return !1;
771
764
  if (n.text === v.value) return !0;
772
- let r = E(e.state.doc, n);
773
- return r ? (e.dispatch(e.state.tr.insertText(v.value, r.from, r.to)), w(), !0) : !1;
765
+ let r = Ge(e.state.doc, n);
766
+ return r ? (e.dispatch(e.state.tr.insertText(v.value, r.from, r.to)), T("refresh"), !0) : !1;
774
767
  },
775
768
  replaceAll: () => {
776
769
  let e = t.value, n = y.value.length;
777
- if (!e || xe() || be()) return {
770
+ if (!e || ve() || _e()) return {
778
771
  replacedCount: 0,
779
772
  skippedCount: n
780
773
  };
781
- let r = y.value.filter((e) => ue(e).status === "allowed"), i = r.filter((e) => e.text === v.value).length, a = r.filter((e) => e.text !== v.value).flatMap((t) => {
782
- let n = E(e.state.doc, t);
774
+ let r = y.value.filter((e) => Je(e).status === "allowed"), i = r.filter((e) => e.text === v.value).length, a = r.filter((e) => e.text !== v.value).flatMap((t) => {
775
+ let n = Ge(e.state.doc, t);
783
776
  return n ? [n] : [];
784
777
  }).toSorted((e, t) => t.from - e.from), o = a.length + i, s = {
785
778
  replacedCount: o,
@@ -788,12 +781,12 @@ function vt({ editorView: t, pagesRef: n, getDocument: r, layout: a, commentRoot
788
781
  if (!a.length) return s;
789
782
  let c = e.state.tr;
790
783
  for (let e of a) c = c.insertText(v.value, e.from, e.to);
791
- return e.dispatch(c), w(), s;
784
+ return e.dispatch(c), T(), s;
792
785
  },
793
- clear: me
786
+ clear: de
794
787
  };
795
788
  }
796
- function yt(e, t) {
789
+ function z(e, t) {
797
790
  if (t < e.top + 40) {
798
791
  let n = Math.max(0, e.top + 40 - t);
799
792
  return -Math.min(12, n / 40 * 12);
@@ -806,10 +799,10 @@ function yt(e, t) {
806
799
  }
807
800
  //#endregion
808
801
  //#region src/composables/useDragAutoScroll.ts
809
- function z({ pagesContainer: e, onScrollExtendSelection: t }) {
802
+ function B({ pagesContainer: e, onScrollExtendSelection: t }) {
810
803
  let n = null, r = 0, a = 0, o = !1;
811
804
  function s() {
812
- return x(e.value);
805
+ return _(e.value);
813
806
  }
814
807
  function c() {
815
808
  o = !1, n !== null && (cancelAnimationFrame(n), n = null);
@@ -818,8 +811,8 @@ function z({ pagesContainer: e, onScrollExtendSelection: t }) {
818
811
  if (!o) return;
819
812
  let e = s();
820
813
  if (!e) return;
821
- let i = yt(e.getBoundingClientRect(), a);
822
- i !== 0 && (S(e, i), t(r, a)), n = requestAnimationFrame(l);
814
+ let i = z(e.getBoundingClientRect(), a);
815
+ i !== 0 && (v(e, i), t(r, a)), n = requestAnimationFrame(l);
823
816
  }
824
817
  function u() {
825
818
  o || (o = !0, n = requestAnimationFrame(l));
@@ -839,7 +832,7 @@ function z({ pagesContainer: e, onScrollExtendSelection: t }) {
839
832
  }
840
833
  //#endregion
841
834
  //#region src/composables/useTableResize.ts
842
- function B() {
835
+ function V() {
843
836
  let e = {
844
837
  active: !1,
845
838
  startX: 0,
@@ -857,7 +850,8 @@ function B() {
857
850
  rowIndex: 0,
858
851
  isEdge: !1,
859
852
  tablePmStart: 0,
860
- origHeight: 0
853
+ origHeight: 0,
854
+ minimumHeight: D
861
855
  }, n = {
862
856
  active: !1,
863
857
  startX: 0,
@@ -871,7 +865,7 @@ function B() {
871
865
  }
872
866
  function a(i, a) {
873
867
  let o = i.target;
874
- return o instanceof HTMLElement ? o.classList.contains("layout-table-resize-handle") ? (i.preventDefault(), i.stopPropagation(), r = a, e.active = !0, e.startX = i.clientX, e.handle = o, o.classList.add("dragging"), e.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), e.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), V(a, e), !0) : o.classList.contains("layout-table-row-resize-handle") || o.classList.contains("layout-table-edge-handle-bottom") ? (i.preventDefault(), i.stopPropagation(), r = a, t.active = !0, t.startY = i.clientY, t.handle = o, t.isEdge = o.dataset.isEdge === "bottom", o.classList.add("dragging"), t.rowIndex = parseInt(o.dataset.rowIndex ?? "0", 10), t.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), H(a, t, o), !0) : o.classList.contains("layout-table-edge-handle-right") ? (i.preventDefault(), i.stopPropagation(), r = a, n.active = !0, n.startX = i.clientX, n.handle = o, o.classList.add("dragging"), n.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), n.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), U(a, n), !0) : !1 : !1;
868
+ return o instanceof HTMLElement ? o.classList.contains("layout-table-resize-handle") ? (i.preventDefault(), i.stopPropagation(), r = a, e.active = !0, e.startX = i.clientX, e.handle = o, o.classList.add("dragging"), e.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), e.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), H(a, e), !0) : o.classList.contains("layout-table-row-resize-handle") || o.classList.contains("layout-table-edge-handle-bottom") ? (i.preventDefault(), i.stopPropagation(), r = a, t.active = !0, t.startY = i.clientY, t.handle = o, t.isEdge = o.dataset.isEdge === "bottom", o.classList.add("dragging"), t.rowIndex = parseInt(o.dataset.rowIndex ?? "0", 10), t.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), U(a, t, o), !0) : o.classList.contains("layout-table-edge-handle-right") ? (i.preventDefault(), i.stopPropagation(), r = a, n.active = !0, n.startX = i.clientX, n.handle = o, o.classList.add("dragging"), n.columnIndex = parseInt(o.dataset.columnIndex ?? "0", 10), n.tablePmStart = parseInt(o.dataset.tablePmStart ?? "0", 10), xt(a, n), !0) : !1 : !1;
875
869
  }
876
870
  function o(r) {
877
871
  if (e.active && e.handle) {
@@ -879,47 +873,39 @@ function B() {
879
873
  let t = r.clientX - e.startX, n = parseFloat(e.handle.style.left);
880
874
  e.handle.style.left = `${n + t}px`, e.startX = r.clientX;
881
875
  let i = Math.round(t * O), a = e.origWidths.left + i, o = e.origWidths.right - i;
882
- a >= Xe && o >= Xe && (e.origWidths = {
876
+ a >= Ze && o >= Ze && (e.origWidths = {
883
877
  left: a,
884
878
  right: o
885
879
  });
886
- return;
887
- }
888
- if (t.active && t.handle) {
880
+ } else if (t.active && t.handle) {
889
881
  r.preventDefault();
890
882
  let e = r.clientY - t.startY, n = parseFloat(t.handle.style.top);
891
- t.handle.style.top = `${n + e}px`, t.startY = r.clientY;
892
- let i = Math.round(e * O), a = t.origHeight + i;
893
- a >= D && (t.origHeight = a);
894
- return;
895
- }
896
- if (n.active && n.handle) {
883
+ t.startY = r.clientY;
884
+ let i = Math.round(e * O), a = Qe({
885
+ currentHeight: t.origHeight,
886
+ delta: i,
887
+ minimumHeight: t.minimumHeight
888
+ });
889
+ t.handle.style.top = `${n + a / O}px`, t.origHeight += a;
890
+ } else if (n.active && n.handle) {
897
891
  r.preventDefault();
898
892
  let e = r.clientX - n.startX, t = parseFloat(n.handle.style.left);
899
893
  n.handle.style.left = `${t + e}px`, n.startX = r.clientX;
900
894
  let i = Math.round(e * O), a = n.origWidth + i;
901
- a >= Xe && (n.origWidth = a);
895
+ a >= Ze && (n.origWidth = a);
902
896
  }
903
897
  }
904
898
  function s(i) {
905
- if (e.active) {
906
- e.active = !1, e.handle?.classList.remove("dragging"), r && Ze(r, {
907
- pmStart: e.tablePmStart,
908
- colIdx: e.columnIndex,
909
- newLeft: e.origWidths.left,
910
- newRight: e.origWidths.right
911
- }), e.handle = null;
912
- return;
913
- }
914
- if (t.active) {
915
- t.active = !1, t.handle?.classList.remove("dragging"), r && $e(r, {
916
- pmStart: t.tablePmStart,
917
- rowIdx: t.rowIndex,
918
- newHeight: t.origHeight
919
- }), t.handle = null;
920
- return;
921
- }
922
- n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r && Qe(r, {
899
+ e.active ? (e.active = !1, e.handle?.classList.remove("dragging"), r && $e(r, {
900
+ pmStart: e.tablePmStart,
901
+ colIdx: e.columnIndex,
902
+ newLeft: e.origWidths.left,
903
+ newRight: e.origWidths.right
904
+ }), e.handle = null) : t.active ? (t.active = !1, t.handle?.classList.remove("dragging"), r && tt(r, {
905
+ pmStart: t.tablePmStart,
906
+ rowIdx: t.rowIndex,
907
+ newHeight: t.origHeight
908
+ }), t.handle = null) : n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r && et(r, {
923
909
  pmStart: n.tablePmStart,
924
910
  colIdx: n.columnIndex,
925
911
  newWidth: n.origWidth
@@ -936,31 +922,31 @@ function B() {
936
922
  isResizing: i
937
923
  };
938
924
  }
939
- function V(e, t) {
940
- let n = tt(e, t.tablePmStart, t.columnIndex);
925
+ function H(e, t) {
926
+ let n = rt(e, t.tablePmStart, t.columnIndex);
941
927
  n && (t.origWidths = n);
942
928
  }
943
- function H(e, t, n) {
944
- let r = nt(e, t.tablePmStart, t.rowIndex);
945
- if (r != null) {
946
- t.origHeight = r;
947
- return;
948
- }
949
- let i = n.closest(".layout-table")?.querySelector(`[data-row-index="${t.rowIndex}"]`), a = i ? i.getBoundingClientRect().height : 30;
950
- t.origHeight = Math.round(a * O);
929
+ function U(e, t, n) {
930
+ let r = it(e, t.tablePmStart, t.rowIndex);
931
+ if (r != null) t.origHeight = r;
932
+ else {
933
+ let e = n.closest(".layout-table")?.querySelector(`[data-row-index="${t.rowIndex}"]`), r = e ? e.getBoundingClientRect().height : 30;
934
+ t.origHeight = Math.round(r * O);
935
+ }
936
+ t.minimumHeight = Math.min(D, t.origHeight);
951
937
  }
952
- function U(e, t) {
953
- let n = et(e, t.tablePmStart, t.columnIndex);
938
+ function xt(e, t) {
939
+ let n = nt(e, t.tablePmStart, t.columnIndex);
954
940
  n != null && (t.origWidth = n);
955
941
  }
956
942
  //#endregion
957
943
  //#region src/composables/useTrackedChanges.ts
958
- function bt(t, n) {
959
- return e(() => (n.value, rt(t.value?.state ?? null)));
944
+ function W(t, n) {
945
+ return e(() => (n.value, at(t.value?.state ?? null)));
960
946
  }
961
947
  //#endregion
962
948
  //#region src/composables/useZoom.ts
963
- var W = at, xt = it, St = [
949
+ var St = k, Ct = ot, wt = [
964
950
  .5,
965
951
  .75,
966
952
  1,
@@ -968,16 +954,16 @@ var W = at, xt = it, St = [
968
954
  1.5,
969
955
  2
970
956
  ];
971
- function Ct(t = 1) {
972
- let i = s(Math.max(W, Math.min(xt, t))), a = e(() => Math.round(i.value * 100)), o = e(() => i.value <= W), c = e(() => i.value >= xt);
957
+ function Tt(t = 1) {
958
+ let i = s(Math.max(St, Math.min(Ct, t))), a = e(() => Math.round(i.value * 100)), o = e(() => i.value <= St), c = e(() => i.value >= Ct);
973
959
  function l(e) {
974
- i.value = Math.max(W, Math.min(xt, Math.round(e * 100) / 100));
960
+ i.value = Math.max(St, Math.min(Ct, Math.round(e * 100) / 100));
975
961
  }
976
962
  function u() {
977
- l(i.value + k);
963
+ l(i.value + A);
978
964
  }
979
965
  function d() {
980
- l(i.value - k);
966
+ l(i.value - A);
981
967
  }
982
968
  function f() {
983
969
  l(1);
@@ -1003,8 +989,8 @@ function Ct(t = 1) {
1003
989
  handleWheel: p,
1004
990
  handleKeyDown: m,
1005
991
  installShortcuts: h,
1006
- ZOOM_PRESETS: St
992
+ ZOOM_PRESETS: wt
1007
993
  };
1008
994
  }
1009
995
  //#endregion
1010
- export { z as a, I as c, st as d, B as i, N as l, rt as n, vt as o, bt as r, R as s, Ct as t, F as u };
996
+ export { B as a, ct as c, L as d, V as i, P as l, at as n, bt as o, W as r, yt as s, Tt as t, I as u };