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