@stll/folio-vue 0.23.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.
- package/README.md +24 -0
- package/dist/ListButtons-B8HxA64I.cjs +4 -0
- package/dist/{ListButtons-DjLPhg8p.js → ListButtons-BeELtp_-.js} +201 -188
- package/dist/{SplitCellDialog-Id6nLwrR.js → SplitCellDialog-CSqbtDum.js} +748 -732
- package/dist/SplitCellDialog-DzKBu09z.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 +73 -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 +11 -4
- package/dist/components/DocxEditor.vue.d.ts +58 -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 +20 -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 +3 -0
- package/dist/composables/useDocxEditorRefApi.d.ts +3 -0
- package/dist/composables/useFindReplace.d.ts +5 -1
- package/dist/composables/useFontLifecycle.d.ts +1 -0
- package/dist/composables.cjs +2 -2
- package/dist/composables.js +45 -44
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +2 -5
- package/dist/folio-vue.css +1 -156
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1456 -1409
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/useFindReplace-BbW0xWo7.js +74 -0
- package/dist/useFindReplace-neQmDh2i.cjs +1 -0
- package/dist/useZoom-B1miNAf_.cjs +1 -0
- package/dist/{useZoom-D8Wi1XkB.js → useZoom-Bw5gp69V.js} +262 -252
- package/dist/utils/embeddedFonts.d.ts +1 -1
- package/package.json +22 -10
- 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-CkbPWZ64.cjs +0 -1
package/dist/composables.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { t as e } from "./useFindReplace-
|
|
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-
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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"))
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
190
|
-
return R(
|
|
190
|
+
function B(e) {
|
|
191
|
+
return z(R(e));
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function V() {
|
|
193
194
|
let e = window.getSelection();
|
|
194
195
|
return e !== null && !e.isCollapsed && e.rangeCount > 0;
|
|
195
196
|
}
|
|
196
|
-
function
|
|
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
|
|
201
|
-
function
|
|
202
|
-
|
|
201
|
+
var U = "docx-selection-styles", W = null;
|
|
202
|
+
function G() {
|
|
203
|
+
W &&= (W.remove(), null), document.getElementById(U)?.remove();
|
|
203
204
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
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
|
-
|
|
268
|
+
W = document.createElement("style"), W.id = U, W.textContent = t, document.head.appendChild(W);
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
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
|
|
275
|
+
function J() {
|
|
275
276
|
return window.getSelection()?.toString() ?? "";
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
-
let { containerRef: t, enabled: n = !0, config: r =
|
|
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 =
|
|
281
|
-
s.value = n, c.value = r, u.value = a, l.value = i && a && e ?
|
|
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 && (
|
|
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
|
|
325
|
-
let e = new
|
|
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 =
|
|
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
|
|
366
|
-
let t =
|
|
366
|
+
function Z(e) {
|
|
367
|
+
let t = k();
|
|
367
368
|
function n(t) {
|
|
368
369
|
let n = e.value;
|
|
369
|
-
return n ?
|
|
370
|
+
return n ? M(n, t) : null;
|
|
370
371
|
}
|
|
371
372
|
function r(t) {
|
|
372
373
|
let n = e.value;
|
|
373
|
-
return n ?
|
|
374
|
+
return n ? A(n, t) : null;
|
|
374
375
|
}
|
|
375
376
|
function i(e, t) {
|
|
376
|
-
return
|
|
377
|
+
return j(e, t);
|
|
377
378
|
}
|
|
378
379
|
function a(n, r) {
|
|
379
|
-
return
|
|
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,
|
|
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-
|
|
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-
|
|
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-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 };
|