@stll/folio-vue 0.24.0 → 0.25.0

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 (113) hide show
  1. package/dist/ListButtons-B8HxA64I.cjs +4 -0
  2. package/dist/{ListButtons-DjLPhg8p.js → ListButtons-BeELtp_-.js} +201 -188
  3. package/dist/{SplitCellDialog-Id6nLwrR.js → SplitCellDialog-CSqbtDum.js} +748 -732
  4. package/dist/SplitCellDialog-DzKBu09z.cjs +15 -0
  5. package/dist/components/AnonymizationRectsOverlay.vue.d.ts +20 -0
  6. package/dist/components/AutocompleteCaretOverlay.vue.d.ts +4 -0
  7. package/dist/components/AutocompleteSuggestionOverlay.vue.d.ts +11 -0
  8. package/dist/components/CommentMarginMarkers.vue.d.ts +16 -0
  9. package/dist/components/ContentControlWidgetsOverlay.vue.d.ts +8 -0
  10. package/dist/components/DecorationLayer.vue.d.ts +12 -0
  11. package/dist/components/DocumentName.vue.d.ts +13 -0
  12. package/dist/components/DocumentOutline.vue.d.ts +28 -0
  13. package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +73 -0
  14. package/dist/components/DocxEditor/DocxEditorMenuBar.vue.d.ts +39 -0
  15. package/dist/components/DocxEditor/DocxEditorOverlays.vue.d.ts +42 -0
  16. package/dist/components/DocxEditor/types.d.ts +9 -2
  17. package/dist/components/DocxEditor.vue.d.ts +58 -0
  18. package/dist/components/EditingModeDropdown.vue.d.ts +11 -0
  19. package/dist/components/EditorToolbar.vue.d.ts +30 -0
  20. package/dist/components/FormattingBar.vue.d.ts +20 -0
  21. package/dist/components/HeaderFooterSelectionOverlay.vue.d.ts +12 -0
  22. package/dist/components/ImageContextMenu.vue.d.ts +24 -0
  23. package/dist/components/ImageSelectionOverlay.vue.d.ts +21 -0
  24. package/dist/components/InlineHeaderFooterEditor.vue.d.ts +15 -0
  25. package/dist/components/MenuBar.vue.d.ts +18 -0
  26. package/dist/components/PageIndicator.vue.d.ts +8 -0
  27. package/dist/components/PassageHighlightOverlay.vue.d.ts +16 -0
  28. package/dist/components/PrintButton.vue.d.ts +16 -0
  29. package/dist/components/ReviewControls.vue.d.ts +17 -0
  30. package/dist/components/TemplateDirectivesOverlay.vue.d.ts +15 -0
  31. package/dist/components/TextContextMenu.vue.d.ts +46 -0
  32. package/dist/components/TitleBar.vue.d.ts +17 -0
  33. package/dist/components/Toolbar.vue.d.ts +139 -0
  34. package/dist/components/UnifiedSidebar.vue.d.ts +55 -0
  35. package/dist/components/dialogs/FindReplaceDialog.vue.d.ts +20 -0
  36. package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +15 -0
  37. package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +30 -0
  38. package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +29 -0
  39. package/dist/components/dialogs/ImagePropertiesDialog.vue.d.ts +13 -0
  40. package/dist/components/dialogs/InsertImageDialog.vue.d.ts +21 -0
  41. package/dist/components/dialogs/InsertSymbolDialog.vue.d.ts +12 -0
  42. package/dist/components/dialogs/InsertTableDialog.vue.d.ts +22 -0
  43. package/dist/components/dialogs/PageSetupDialog.vue.d.ts +14 -0
  44. package/dist/components/dialogs/PasteSpecialDialog.vue.d.ts +16 -0
  45. package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +12 -0
  46. package/dist/components/dialogs/SplitCellDialog.vue.d.ts +22 -0
  47. package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +15 -0
  48. package/dist/components/dialogs/WatermarkDialog.vue.d.ts +14 -0
  49. package/dist/components/dialogs/index.d.ts +13 -13
  50. package/dist/components/sidebar/AddCommentCard.vue.d.ts +9 -0
  51. package/dist/components/sidebar/Avatar.vue.d.ts +10 -0
  52. package/dist/components/sidebar/CommentCard.vue.d.ts +21 -0
  53. package/dist/components/sidebar/ReplyInput.vue.d.ts +7 -0
  54. package/dist/components/sidebar/ReplyThread.vue.d.ts +8 -0
  55. package/dist/components/sidebar/ResolvedCommentMarker.vue.d.ts +11 -0
  56. package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +20 -0
  57. package/dist/components/ui/AlignmentButtons.vue.d.ts +15 -0
  58. package/dist/components/ui/Button.vue.d.ts +30 -0
  59. package/dist/components/ui/Checkbox.vue.d.ts +11 -0
  60. package/dist/components/ui/ColorPicker.vue.d.ts +30 -0
  61. package/dist/components/ui/DatePickerPopover.vue.d.ts +13 -0
  62. package/dist/components/ui/Dialog.vue.d.ts +28 -0
  63. package/dist/components/ui/FontPicker.vue.d.ts +21 -0
  64. package/dist/components/ui/FontSizePicker.vue.d.ts +27 -0
  65. package/dist/components/ui/HorizontalRuler.vue.d.ts +39 -0
  66. package/dist/components/ui/HyperlinkPopup.vue.d.ts +21 -0
  67. package/dist/components/ui/IconGridDropdown.vue.d.ts +32 -0
  68. package/dist/components/ui/ImageTransformDropdown.vue.d.ts +11 -0
  69. package/dist/components/ui/ImageWrapDropdown.vue.d.ts +15 -0
  70. package/dist/components/ui/Input.vue.d.ts +17 -0
  71. package/dist/components/ui/LineSpacingPicker.vue.d.ts +20 -0
  72. package/dist/components/ui/ListButtons.vue.d.ts +30 -0
  73. package/dist/components/ui/MaterialSymbol.vue.d.ts +13 -0
  74. package/dist/components/ui/MenuDropdown.vue.d.ts +42 -0
  75. package/dist/components/ui/OutlineRail.vue.d.ts +19 -0
  76. package/dist/components/ui/Popover.vue.d.ts +40 -0
  77. package/dist/components/ui/Select.vue.d.ts +15 -0
  78. package/dist/components/ui/StylePicker.vue.d.ts +16 -0
  79. package/dist/components/ui/TableBorderColorPicker.vue.d.ts +14 -0
  80. package/dist/components/ui/TableBorderPicker.vue.d.ts +11 -0
  81. package/dist/components/ui/TableBorderWidthPicker.vue.d.ts +10 -0
  82. package/dist/components/ui/TableCellFillPicker.vue.d.ts +14 -0
  83. package/dist/components/ui/TableGridInline.vue.d.ts +14 -0
  84. package/dist/components/ui/TableGridPicker.vue.d.ts +18 -0
  85. package/dist/components/ui/TableMoreDropdown.vue.d.ts +51 -0
  86. package/dist/components/ui/TableStyleGallery.vue.d.ts +10 -0
  87. package/dist/components/ui/TableToolbar.vue.d.ts +61 -0
  88. package/dist/components/ui/VerticalRuler.vue.d.ts +20 -0
  89. package/dist/components/ui/ZoomControl.vue.d.ts +12 -0
  90. package/dist/components/ui/icon-paths.json.d.ts +276 -0
  91. package/dist/composables/useDocxEditor.d.ts +2 -0
  92. package/dist/composables/useDocxEditorRefApi.d.ts +3 -0
  93. package/dist/composables/useFindReplace.d.ts +5 -1
  94. package/dist/composables.cjs +2 -2
  95. package/dist/composables.js +45 -44
  96. package/dist/dialogs.cjs +1 -1
  97. package/dist/dialogs.js +2 -5
  98. package/dist/folio-vue.css +1 -1
  99. package/dist/index.cjs +1 -1
  100. package/dist/index.d.ts +2 -0
  101. package/dist/index.js +1611 -1564
  102. package/dist/ui.cjs +1 -1
  103. package/dist/ui.js +2 -2
  104. package/dist/useFindReplace-BbW0xWo7.js +74 -0
  105. package/dist/useFindReplace-neQmDh2i.cjs +1 -0
  106. package/dist/useZoom-B1miNAf_.cjs +1 -0
  107. package/dist/{useZoom-BA92aWwm.js → useZoom-Bw5gp69V.js} +206 -203
  108. package/package.json +13 -2
  109. package/dist/ListButtons-DIWR-Q8d.cjs +0 -4
  110. package/dist/SplitCellDialog-B_z6ynxm.cjs +0 -15
  111. package/dist/useFindReplace-CL8Rbc3y.js +0 -59
  112. package/dist/useFindReplace-ZCrdvwEk.cjs +0 -1
  113. package/dist/useZoom-Bv8t7dYu.cjs +0 -1
@@ -1,19 +1,20 @@
1
- import { t as e } from "./useFindReplace-CL8Rbc3y.js";
2
- import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./useZoom-BA92aWwm.js";
1
+ import { t as e } from "./useFindReplace-BbW0xWo7.js";
2
+ import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./useZoom-Bw5gp69V.js";
3
3
  import { computed as d, onBeforeUnmount as f, onMounted as p, onScopeDispose as m, ref as h, watch as g } from "vue";
4
4
  import { redo as _, redoDepth as v, undo as y, undoDepth as b } from "prosemirror-history";
5
- import { copyRuns as x, parseClipboardHtml as S, runsToClipboardContent as C } from "@stll/folio-core/utils/clipboard";
6
- import { createSelectionFromDOM as w, getSelectionRuns as T } from "@stll/folio-core/managers/ClipboardManager";
7
- import { TableSelectionManager as E, findTableFromClick as D } from "@stll/folio-core/managers/TableSelectionManager";
8
- import { createVisualLineState as O, findLineElementAtPosition as k, findPositionOnLineAtClientX as A, getCaretClientX as j, handleVisualLineKeyDown as M } from "@stll/folio-core/prosemirror/utils/visualLineNavigation";
5
+ import { readBlobText as x } from "@stll/folio-core/utils/textEncoding";
6
+ import { copyRuns as S, parseClipboardHtml as C, runsToClipboardContent as w } from "@stll/folio-core/utils/clipboard";
7
+ import { createSelectionFromDOM as T, getSelectionRuns as E } from "@stll/folio-core/managers/ClipboardManager";
8
+ import { TableSelectionManager as D, findTableFromClick as O } from "@stll/folio-core/managers/TableSelectionManager";
9
+ import { createVisualLineState as k, findLineElementAtPosition as A, findPositionOnLineAtClientX as j, getCaretClientX as M, handleVisualLineKeyDown as N } from "@stll/folio-core/prosemirror/utils/visualLineNavigation";
9
10
  //#region src/composables/useClipboard.ts
10
- function N(e = {}) {
11
+ function P(e = {}) {
11
12
  let { onCopy: t, onCut: n, onPaste: r, cleanWordFormatting: i = !0, editable: a = !0, onError: o } = e, s = h(!1), c = h(null), l = o ? { onError: o } : {};
12
13
  async function u(e) {
13
14
  if (s.value) return !1;
14
15
  s.value = !0;
15
16
  try {
16
- let n = await x(e.runs, l);
17
+ let n = await S(e.runs, l);
17
18
  return n && t?.(e), n;
18
19
  } finally {
19
20
  s.value = !1;
@@ -23,7 +24,7 @@ function N(e = {}) {
23
24
  if (s.value || !a) return !1;
24
25
  s.value = !0;
25
26
  try {
26
- let t = await x(e.runs, l);
27
+ let t = await S(e.runs, l);
27
28
  return t && n?.(e), t;
28
29
  } finally {
29
30
  s.value = !1;
@@ -35,9 +36,9 @@ function N(e = {}) {
35
36
  try {
36
37
  if (navigator.clipboard && navigator.clipboard.read) {
37
38
  let t = await navigator.clipboard.read(), n = "", a = "";
38
- for (let e of t) e.types.includes("text/html") && (n = await (await e.getType("text/html")).text()), e.types.includes("text/plain") && (a = await (await e.getType("text/plain")).text());
39
+ for (let e of t) e.types.includes("text/html") && (n = await x(await e.getType("text/html"))), e.types.includes("text/plain") && (a = await x(await e.getType("text/plain")));
39
40
  e && (n = "");
40
- let o = S(n, a, i);
41
+ let o = C(n, a, i);
41
42
  return c.value = o, r?.(o, e), o;
42
43
  }
43
44
  return null;
@@ -57,7 +58,7 @@ function N(e = {}) {
57
58
  }
58
59
  //#endregion
59
60
  //#region src/composables/useFixedDropdown.ts
60
- function P({ isOpen: e, onClose: t, align: n = "left" }) {
61
+ function F({ isOpen: e, onClose: t, align: n = "left" }) {
61
62
  let r = h(null), i = h(null), a = h({
62
63
  position: "fixed",
63
64
  top: "0px",
@@ -117,7 +118,7 @@ function P({ isOpen: e, onClose: t, align: n = "left" }) {
117
118
  }
118
119
  //#endregion
119
120
  //#region src/composables/useHistory.ts
120
- function F(e, t) {
121
+ function I(e, t) {
121
122
  let n = d(() => {
122
123
  t.value;
123
124
  let n = e.value;
@@ -144,14 +145,14 @@ function F(e, t) {
144
145
  }
145
146
  //#endregion
146
147
  //#region src/utils/selectionHighlight.ts
147
- var I = {
148
+ var L = {
148
149
  backgroundColor: "rgba(26, 115, 232, 0.3)",
149
150
  borderRadius: 0,
150
151
  zIndex: 0,
151
152
  opacity: 1,
152
153
  mixBlendMode: "multiply"
153
154
  };
154
- function L(e) {
155
+ function R(e) {
155
156
  let t = window.getSelection();
156
157
  if (!t || t.rangeCount === 0 || t.isCollapsed) return [];
157
158
  let n = t.getRangeAt(0);
@@ -170,7 +171,7 @@ function L(e) {
170
171
  });
171
172
  return a;
172
173
  }
173
- function R(e, t = 2) {
174
+ function z(e, t = 2) {
174
175
  if (e.length <= 1) return e;
175
176
  let n = [...e].sort((e, n) => Math.abs(e.top - n.top) < t ? e.left - n.left : e.top - n.top), r = n[0];
176
177
  if (!r) return e;
@@ -186,23 +187,23 @@ function R(e, t = 2) {
186
187
  }
187
188
  return i.push(a), i;
188
189
  }
189
- function z(e) {
190
- return R(L(e));
190
+ function B(e) {
191
+ return z(R(e));
191
192
  }
192
- function B() {
193
+ function V() {
193
194
  let e = window.getSelection();
194
195
  return e !== null && !e.isCollapsed && e.rangeCount > 0;
195
196
  }
196
- function V(e) {
197
+ function H(e) {
197
198
  let t = window.getSelection();
198
199
  return !t || t.rangeCount === 0 ? !1 : e.contains(t.getRangeAt(0).commonAncestorContainer);
199
200
  }
200
- var H = "docx-selection-styles", U = null;
201
- function W() {
202
- U &&= (U.remove(), null), document.getElementById(H)?.remove();
201
+ var U = "docx-selection-styles", W = null;
202
+ function G() {
203
+ W &&= (W.remove(), null), document.getElementById(U)?.remove();
203
204
  }
204
- function G(e = I) {
205
- W();
205
+ function K(e = L) {
206
+ G();
206
207
  let t = `
207
208
  /* DOCX Editor Selection Highlighting */
208
209
 
@@ -264,21 +265,21 @@ function G(e = I) {
264
265
  border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
265
266
  }
266
267
  `;
267
- U = document.createElement("style"), U.id = H, U.textContent = t, document.head.appendChild(U);
268
+ W = document.createElement("style"), W.id = U, W.textContent = t, document.head.appendChild(W);
268
269
  }
269
- function K() {
270
- return U !== null || document.getElementById(H) !== null;
270
+ function q() {
271
+ return W !== null || document.getElementById(U) !== null;
271
272
  }
272
273
  //#endregion
273
274
  //#region src/composables/useSelectionHighlight.ts
274
- function q() {
275
+ function J() {
275
276
  return window.getSelection()?.toString() ?? "";
276
277
  }
277
- function J(e) {
278
- let { containerRef: t, enabled: n = !0, config: r = I, useOverlay: i = !1, debounceMs: a = 16, onSelectionChange: o } = e, s = h(!1), c = h(""), l = h([]), u = h(!1), m = null, _ = 0;
278
+ function Y(e) {
279
+ let { containerRef: t, enabled: n = !0, config: r = L, useOverlay: i = !1, debounceMs: a = 16, onSelectionChange: o } = e, s = h(!1), c = h(""), l = h([]), u = h(!1), m = null, _ = 0;
279
280
  function v() {
280
- let e = t.value, n = B(), r = q(), a = e ? V(e) : !1;
281
- s.value = n, c.value = r, u.value = a, l.value = i && a && e ? z(e) : [], o?.(n && a, r);
281
+ let e = t.value, n = V(), r = J(), a = e ? H(e) : !1;
282
+ s.value = n, c.value = r, u.value = a, l.value = i && a && e ? B(e) : [], o?.(n && a, r);
282
283
  }
283
284
  function y() {
284
285
  v();
@@ -307,7 +308,7 @@ function J(e) {
307
308
  return r.borderRadius && (t.borderRadius = `${r.borderRadius}px`), r.borderColor && (t.border = `1px solid ${r.borderColor}`), t;
308
309
  }
309
310
  return p(() => {
310
- n && (K() || G(r), document.addEventListener("selectionchange", b));
311
+ n && (q() || K(r), document.addEventListener("selectionchange", b));
311
312
  }), f(() => {
312
313
  document.removeEventListener("selectionchange", b), m && clearTimeout(m);
313
314
  }), g(t, () => v()), {
@@ -321,8 +322,8 @@ function J(e) {
321
322
  }
322
323
  //#endregion
323
324
  //#region src/composables/useTableSelection.ts
324
- function Y() {
325
- let e = new E(), t = h(null), n = () => {
325
+ function X() {
326
+ let e = new D(), t = h(null), n = () => {
326
327
  let n = e.getSnapshot();
327
328
  t.value = n.tableIndex !== null && n.rowIndex !== null && n.columnIndex !== null ? {
328
329
  tableIndex: n.tableIndex,
@@ -339,7 +340,7 @@ function Y() {
339
340
  });
340
341
  }
341
342
  function a(t, n) {
342
- let r = D(t, n);
343
+ let r = O(t, n);
343
344
  if (!r) {
344
345
  e.clearSelection();
345
346
  return;
@@ -362,21 +363,21 @@ function Y() {
362
363
  }
363
364
  //#endregion
364
365
  //#region src/composables/useVisualLineNavigation.ts
365
- function X(e) {
366
- let t = O();
366
+ function Z(e) {
367
+ let t = k();
367
368
  function n(t) {
368
369
  let n = e.value;
369
- return n ? j(n, t) : null;
370
+ return n ? M(n, t) : null;
370
371
  }
371
372
  function r(t) {
372
373
  let n = e.value;
373
- return n ? k(n, t) : null;
374
+ return n ? A(n, t) : null;
374
375
  }
375
376
  function i(e, t) {
376
- return A(e, t);
377
+ return j(e, t);
377
378
  }
378
379
  function a(n, r) {
379
- return M(t, n, r, e.value);
380
+ return N(t, n, r, e.value);
380
381
  }
381
382
  return {
382
383
  state: t,
@@ -387,4 +388,4 @@ function X(e) {
387
388
  };
388
389
  }
389
390
  //#endregion
390
- export { c as colorModePlugin, w as createSelectionFromDOM, n as defaultColorMode, a as extractTrackedChanges, T as getSelectionRuns, i as provideColorMode, C as runsToClipboardContent, N as useClipboard, u as useColorMode, o as useDocxEditor, t as useDragAutoScroll, e as useFindReplace, P as useFixedDropdown, F as useHistory, J as useSelectionHighlight, r as useTableResize, Y as useTableSelection, s as useTrackedChanges, X as useVisualLineNavigation, l as useWheelZoom, l as useZoom };
391
+ export { c as colorModePlugin, T as createSelectionFromDOM, n as defaultColorMode, a as extractTrackedChanges, E as getSelectionRuns, i as provideColorMode, w as runsToClipboardContent, P as useClipboard, u as useColorMode, o as useDocxEditor, t as useDragAutoScroll, e as useFindReplace, F as useFixedDropdown, I as useHistory, Y as useSelectionHighlight, r as useTableResize, X as useTableSelection, s as useTrackedChanges, Z as useVisualLineNavigation, l as useWheelZoom, l as useZoom };
package/dist/dialogs.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./SplitCellDialog-B_z6ynxm.cjs");var t=e.m,n=e.s,r=e.p,i=e.o,a=e.f,o=e.a,s=e.d,c=e.r,l=e.u,u=e.n,d=e.t,f=e.l,p=e.c;exports.FindReplaceDialog=t,exports.FootnotePropertiesDialog=n,exports.HyperlinkDialog=r,exports.ImagePositionDialog=i,exports.ImagePropertiesDialog=a,exports.InsertImageDialog=o,exports.InsertSymbolDialog=s,exports.InsertTableDialog=c,exports.PageSetupDialog=l,exports.PasteSpecialDialog=u,exports.SplitCellDialog=d,exports.TablePropertiesDialog=f,exports.WatermarkDialog=p;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./SplitCellDialog-DzKBu09z.cjs");exports.FindReplaceDialog=e.m,exports.FootnotePropertiesDialog=e.s,exports.HyperlinkDialog=e.p,exports.ImagePositionDialog=e.o,exports.ImagePropertiesDialog=e.f,exports.InsertImageDialog=e.a,exports.InsertSymbolDialog=e.d,exports.InsertTableDialog=e.r,exports.PageSetupDialog=e.u,exports.PasteSpecialDialog=e.n,exports.SplitCellDialog=e.t,exports.TablePropertiesDialog=e.l,exports.WatermarkDialog=e.c;
package/dist/dialogs.js CHANGED
@@ -1,5 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, l as i, m as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./SplitCellDialog-Id6nLwrR.js";
2
- //#region src/components/dialogs/index.ts
3
- var p = a, m = u, h = c, g = s, _ = r, v = e, y = n, b = l, x = f, S = o, C = d, w = i, T = t;
4
- //#endregion
5
- export { p as FindReplaceDialog, m as FootnotePropertiesDialog, h as HyperlinkDialog, g as ImagePositionDialog, _ as ImagePropertiesDialog, v as InsertImageDialog, y as InsertSymbolDialog, b as InsertTableDialog, x as PageSetupDialog, S as PasteSpecialDialog, C as SplitCellDialog, w as TablePropertiesDialog, T as WatermarkDialog };
1
+ import { a as e, c as t, d as n, f as r, l as i, m as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./SplitCellDialog-CSqbtDum.js";
2
+ export { a as FindReplaceDialog, u as FootnotePropertiesDialog, c as HyperlinkDialog, s as ImagePositionDialog, r as ImagePropertiesDialog, e as InsertImageDialog, n as InsertSymbolDialog, l as InsertTableDialog, f as PageSetupDialog, o as PasteSpecialDialog, d as SplitCellDialog, i as TablePropertiesDialog, t as WatermarkDialog };