@stll/folio-vue 0.19.0 → 0.20.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/components/DocxEditor/types.d.ts +9 -1
- package/dist/composables/useDocxEditor.d.ts +3 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +691 -689
- package/dist/useZoom-BIGvxjCH.cjs +1 -0
- package/dist/{useZoom-0VagXQvX.js → useZoom-C8y44V_P.js} +246 -246
- package/package.json +2 -2
- package/dist/useZoom-CXzIpaf0.cjs +0 -1
|
@@ -16,58 +16,58 @@ import { browserClock as de, createLayoutScheduler as fe } from "@stll/folio-cor
|
|
|
16
16
|
import { createLayoutSession as pe } from "@stll/folio-core/controller/layoutSession";
|
|
17
17
|
import { parseDocx as me } from "@stll/folio-core/docx/parser";
|
|
18
18
|
import { getFootnoteText as he } from "@stll/folio-core/docx/footnoteParser";
|
|
19
|
-
import { convertHeaderFooterPmDocToContent as
|
|
20
|
-
import { resolveSectionHeaderFooterRefs as
|
|
21
|
-
import { LayoutPainter as
|
|
22
|
-
import { LayoutSelectionGate as
|
|
23
|
-
import { getTransactionsDirtyRange as
|
|
24
|
-
import { fromProseDoc as
|
|
25
|
-
import { ExtensionManager as
|
|
26
|
-
import { getChangedParagraphIds as
|
|
27
|
-
import { createStarterKit as
|
|
28
|
-
import { createTemplatePreviewValuesPlugin as
|
|
29
|
-
import { templateSlashMenuPlugin as
|
|
30
|
-
import { resolveHeaderFooterContent as
|
|
31
|
-
import { findVerticalScrollParent as
|
|
32
|
-
import { MIN_CELL_WIDTH_TWIPS as
|
|
33
|
-
import { extractTrackedChanges as
|
|
34
|
-
import { ZOOM_MAX as
|
|
19
|
+
import { convertHeaderFooterPmDocToContent as ge, convertHeaderFooterToContent as _e } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
|
|
20
|
+
import { resolveSectionHeaderFooterRefs as ve } from "@stll/folio-core/layout-engine";
|
|
21
|
+
import { LayoutPainter as ye } from "@stll/folio-core/layout-painter";
|
|
22
|
+
import { LayoutSelectionGate as be } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
|
|
23
|
+
import { getTransactionsDirtyRange as xe } from "@stll/folio-core/paged-layout/transactionDirtyRange";
|
|
24
|
+
import { fromProseDoc as Se } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
|
|
25
|
+
import { ExtensionManager as Ce } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
|
|
26
|
+
import { getChangedParagraphIds as we, hasStructuralChanges as Te, hasUntrackedChanges as Ee } from "@stll/folio-core/prosemirror/extensions/features/ParagraphChangeTrackerExtension";
|
|
27
|
+
import { createStarterKit as De } from "@stll/folio-core/prosemirror/extensions/StarterKit";
|
|
28
|
+
import { createTemplatePreviewValuesPlugin as Oe } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
29
|
+
import { templateSlashMenuPlugin as ke } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
30
|
+
import { resolveHeaderFooterContent as Ae } from "@stll/folio-core/utils/headerFooter";
|
|
31
|
+
import { findVerticalScrollParent as je } from "@stll/folio-core/utils/findVerticalScrollParent";
|
|
32
|
+
import { MIN_CELL_WIDTH_TWIPS as y, MIN_ROW_HEIGHT_TWIPS as b, TWIPS_PER_PIXEL as x, commitColumnResize as Me, commitRightEdgeResize as S, commitRowResize as Ne, readColumnWidthAt as Pe, readColumnWidths as Fe, readRowHeight as Ie } from "@stll/folio-core/prosemirror/tableResize";
|
|
33
|
+
import { extractTrackedChanges as C } from "@stll/folio-core/prosemirror/utils/extractTrackedChanges";
|
|
34
|
+
import { ZOOM_MAX as w, ZOOM_MIN as T, ZOOM_STEP as E } from "@stll/folio-core/utils/zoom";
|
|
35
35
|
//#region src/utils/colorMode.ts
|
|
36
|
-
var
|
|
37
|
-
function
|
|
36
|
+
var Le = "(prefers-color-scheme: dark)";
|
|
37
|
+
function Re() {
|
|
38
38
|
return typeof window < "u" && typeof window.matchMedia == "function";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ze(e, t) {
|
|
41
41
|
return e === "dark" || e === "system" && t;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
if (!
|
|
45
|
-
let t = window.matchMedia(
|
|
43
|
+
function Be(e) {
|
|
44
|
+
if (!Re()) return () => {};
|
|
45
|
+
let t = window.matchMedia(Le);
|
|
46
46
|
e(t.matches);
|
|
47
47
|
let n = (t) => e(t.matches);
|
|
48
48
|
return t.addEventListener("change", n), () => t.removeEventListener("change", n);
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/composables/useColorMode.ts
|
|
52
|
-
var
|
|
53
|
-
a(
|
|
54
|
-
},
|
|
55
|
-
t.provide(
|
|
52
|
+
var D = "light", O = Symbol("folioColorMode"), k = (t = D) => {
|
|
53
|
+
a(O, e(() => c(t)));
|
|
54
|
+
}, A = { install(t, n = D) {
|
|
55
|
+
t.provide(O, e(() => c(n)));
|
|
56
56
|
} };
|
|
57
|
-
function
|
|
58
|
-
let n = t(
|
|
57
|
+
function j() {
|
|
58
|
+
let n = t(O, e(() => D)), i = o(!1), a = o(!1);
|
|
59
59
|
return r(() => {
|
|
60
60
|
i.value = !0;
|
|
61
61
|
}), u((e) => {
|
|
62
|
-
!i.value || n.value !== "system" || e(
|
|
62
|
+
!i.value || n.value !== "system" || e(Be((e) => {
|
|
63
63
|
a.value = e;
|
|
64
64
|
}));
|
|
65
|
-
}), e(() =>
|
|
65
|
+
}), e(() => ze(n.value, i.value && a.value));
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/composables/useDocxEditor.ts
|
|
69
|
-
var
|
|
70
|
-
function
|
|
69
|
+
var Ve = 24, He = 32, Ue = 96, We = 250, Ge = [], Ke = [];
|
|
70
|
+
function qe(e) {
|
|
71
71
|
let t = e?.columnCount ?? 1;
|
|
72
72
|
if (t <= 1) return;
|
|
73
73
|
let n = {
|
|
@@ -77,24 +77,24 @@ function Ye(e) {
|
|
|
77
77
|
};
|
|
78
78
|
return e?.separator !== void 0 && (n.separator = e.separator), n;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Je(e, t, n, r, i, a) {
|
|
81
81
|
if (!e) return;
|
|
82
82
|
let o = t ? {
|
|
83
83
|
...a,
|
|
84
84
|
rId: t
|
|
85
85
|
} : a, s = t ? n?.getView(t) : null;
|
|
86
|
-
return s ?
|
|
86
|
+
return s ? ge(s.state.doc, r, i, o) : _e(e, r, i, o);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ye(e, t, n, r, i) {
|
|
89
89
|
if (!e || e.size === 0) return;
|
|
90
90
|
let a = /* @__PURE__ */ new Map();
|
|
91
91
|
for (let [o, s] of e) {
|
|
92
|
-
let e =
|
|
92
|
+
let e = Je(s, o, t, n, r, i);
|
|
93
93
|
e && a.set(o, e);
|
|
94
94
|
}
|
|
95
95
|
return a.size > 0 ? a : void 0;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Xe(e, t, n) {
|
|
98
98
|
let r = /* @__PURE__ */ new Map();
|
|
99
99
|
if (!n || !n.package.footnotes) return r;
|
|
100
100
|
let i = /* @__PURE__ */ new Map();
|
|
@@ -120,7 +120,7 @@ function Qe(e, t, n) {
|
|
|
120
120
|
}
|
|
121
121
|
return r;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
123
|
+
var M = /* @__PURE__ */ new Set([
|
|
124
124
|
"black",
|
|
125
125
|
"blue",
|
|
126
126
|
"cyan",
|
|
@@ -139,61 +139,61 @@ var A = /* @__PURE__ */ new Set([
|
|
|
139
139
|
"white",
|
|
140
140
|
"yellow"
|
|
141
141
|
]);
|
|
142
|
-
function
|
|
142
|
+
function Ze(e) {
|
|
143
143
|
let t = [], n = (e, r) => {
|
|
144
|
-
for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !
|
|
144
|
+
for (let [n, i] of e.marks.entries()) i.type.name === "highlight" && !M.has(String(i.attrs.color)) && t.push(`${r}.marks[${n}]=${JSON.stringify(i.attrs)}`);
|
|
145
145
|
e.forEach((e, t, i) => {
|
|
146
146
|
n(e, `${r}.content[${i}]`);
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
return n(e, "doc"), t.join("; ");
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Qe() {
|
|
152
152
|
return typeof document > "u" || !("fonts" in document) || document.fonts.status === "loaded";
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: u = !1, pageGap: p =
|
|
156
|
-
|
|
157
|
-
let tt = ee(!1), nt = [tt], rt = h({ keymap: !0 }), it = m({ onMatchesChange: (e) =>
|
|
158
|
-
onChange: (e) =>
|
|
159
|
-
onKeyAction: (e) =>
|
|
160
|
-
}),
|
|
161
|
-
function
|
|
154
|
+
function N(e) {
|
|
155
|
+
let { hiddenContainer: t, hiddenHeaderFooterContainer: n, noteEditorContainer: r, pagesContainer: a, readOnly: u = !1, pageGap: p = Ve, pageRenderer: he, showMarginGuides: ge, marginGuideColor: _e, password: je, editorMode: y, author: b, externalPlugins: x = [], historyShortcuts: Me = "editor", collaboration: S, onAnonymizationMatchesChange: Ne, showTemplateDirectives: Pe, onSlashMenuChange: Fe, onSlashMenuKeyAction: Ie, onChange: C, onError: w, onSelectionUpdate: T, onEditorViewReady: E, onCopy: Le, onCut: Re, onPaste: ze, onReadOnlyEditAttempt: Be, featureFlags: D, onSelectiveSaveTripwire: O } = e, k = n ?? t, A = s(null), j = 0, M = s(null), N = s(null), P = s(null), F = s([]), I = s(null), L = s(null), R = s(null), $e = s([]), et = s([]), z = o(!1), B = o(null), V = o(!1), H = new Ce(De({ historyShortcuts: Me }));
|
|
156
|
+
H.buildSchema(), H.initializeRuntime();
|
|
157
|
+
let tt = ee(!1), nt = [tt], rt = h({ keymap: !0 }), it = m({ onMatchesChange: (e) => Ne?.(e) }), U = g(), at = ke({
|
|
158
|
+
onChange: (e) => Fe?.(e),
|
|
159
|
+
onKeyAction: (e) => Ie?.(e) ?? !1
|
|
160
|
+
}), ot = Oe(), st = () => c(Pe) === !0;
|
|
161
|
+
function ct() {
|
|
162
162
|
return [
|
|
163
163
|
rt,
|
|
164
164
|
tt,
|
|
165
165
|
...x,
|
|
166
166
|
...c(S)?.plugins ?? [],
|
|
167
167
|
it,
|
|
168
|
-
...
|
|
169
|
-
|
|
168
|
+
...st() ? [U, at] : [],
|
|
169
|
+
ot
|
|
170
170
|
];
|
|
171
171
|
}
|
|
172
|
-
let W = ne(), G = new
|
|
172
|
+
let W = ne(), G = new be(), lt = pe(), ut = ue({
|
|
173
173
|
relayout: () => {
|
|
174
|
-
let e =
|
|
174
|
+
let e = M.value?.state ?? lt.lastEditorState;
|
|
175
175
|
e && J(e, { reason: "hyphenation-ready" });
|
|
176
176
|
},
|
|
177
177
|
onError: (e) => w?.(e)
|
|
178
178
|
});
|
|
179
|
-
i(
|
|
180
|
-
let
|
|
179
|
+
i(ut.cancel);
|
|
180
|
+
let dt = new ye({
|
|
181
181
|
pageGap: p,
|
|
182
182
|
showShadow: !0
|
|
183
183
|
}), K = ie({
|
|
184
|
-
getHost: () =>
|
|
185
|
-
getDocument: () =>
|
|
186
|
-
getStyles: () =>
|
|
187
|
-
getTheme: () =>
|
|
184
|
+
getHost: () => k.value,
|
|
185
|
+
getDocument: () => A.value,
|
|
186
|
+
getStyles: () => A.value?.package.styles ?? null,
|
|
187
|
+
getTheme: () => A.value?.package.theme ?? null,
|
|
188
188
|
onTransaction: ({ rId: e, kind: t, view: n, docChanged: r, selectionChanged: i }) => {
|
|
189
189
|
if (r) {
|
|
190
|
-
|
|
191
|
-
let e =
|
|
190
|
+
V.value = !0;
|
|
191
|
+
let e = M.value;
|
|
192
192
|
e && Y.schedule(e.state, null);
|
|
193
193
|
}
|
|
194
194
|
if (r || i) {
|
|
195
195
|
let { from: r, to: i } = n.state.selection;
|
|
196
|
-
|
|
196
|
+
I.value = {
|
|
197
197
|
from: r,
|
|
198
198
|
kind: t,
|
|
199
199
|
rId: e,
|
|
@@ -205,21 +205,21 @@ function j(e) {
|
|
|
205
205
|
}
|
|
206
206
|
G.requestRender();
|
|
207
207
|
}
|
|
208
|
-
}),
|
|
208
|
+
}), ft = { current: null }, q = ae({
|
|
209
209
|
getHost: () => r?.value ?? null,
|
|
210
210
|
getPlugins: () => nt,
|
|
211
|
-
getDocument: () =>
|
|
212
|
-
getStyles: () =>
|
|
213
|
-
getTheme: () =>
|
|
211
|
+
getDocument: () => A.value,
|
|
212
|
+
getStyles: () => A.value?.package.styles ?? null,
|
|
213
|
+
getTheme: () => A.value?.package.theme ?? null,
|
|
214
214
|
onTransaction: ({ docChanged: e, selectionChanged: t, view: n }) => {
|
|
215
215
|
if (e) {
|
|
216
|
-
|
|
217
|
-
let e =
|
|
216
|
+
V.value = !0;
|
|
217
|
+
let e = A.value;
|
|
218
218
|
if (e) {
|
|
219
|
-
let t =
|
|
220
|
-
|
|
219
|
+
let t = ft.current?.snapshotDocument(e) ?? e;
|
|
220
|
+
A.value = t, C?.(t), W.emit("docChange", t);
|
|
221
221
|
}
|
|
222
|
-
let t =
|
|
222
|
+
let t = M.value;
|
|
223
223
|
t && Y.schedule(t.state, null);
|
|
224
224
|
}
|
|
225
225
|
if (e || t) {
|
|
@@ -232,21 +232,21 @@ function j(e) {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
|
-
|
|
236
|
-
function
|
|
237
|
-
e.layout && (
|
|
235
|
+
ft.current = q;
|
|
236
|
+
function pt(e) {
|
|
237
|
+
e.layout && (R.value = e.layout), e.blocks && ($e.value = e.blocks), e.measures && (et.value = e.measures), e.blockLookup && dt.setBlockLookup(e.blockLookup), e.layout && W.emit("layoutComplete", e.layout);
|
|
238
238
|
}
|
|
239
239
|
function J(e, t = {}) {
|
|
240
|
-
let n = a.value, r = n instanceof HTMLDivElement ? n : null, i =
|
|
240
|
+
let n = a.value, r = n instanceof HTMLDivElement ? n : null, i = A.value, o = i?.package.document, s = o?.sections?.[0]?.properties ?? o?.finalSectionProperties ?? null, l = f(s), u = d(s), m = qe(s), h = l.w - u.left - u.right, g = i?.package.styles ?? null, ee = i?.package.theme ?? null, te = i?.package.settings?.defaultTabStop, _ = i?.package.settings?.mirrorMargins === !0, v = Ae(i?.package);
|
|
241
241
|
try {
|
|
242
|
-
|
|
242
|
+
pt(le({
|
|
243
243
|
contentWidth: h,
|
|
244
244
|
columns: m,
|
|
245
245
|
pageSize: l,
|
|
246
246
|
margins: u,
|
|
247
247
|
pageGap: p,
|
|
248
|
-
showMarginGuides: c(
|
|
249
|
-
marginGuideColor: c(
|
|
248
|
+
showMarginGuides: c(ge) === !0,
|
|
249
|
+
marginGuideColor: c(_e),
|
|
250
250
|
...(() => {
|
|
251
251
|
let e = c(he);
|
|
252
252
|
return e === void 0 ? {} : { pageRenderer: e };
|
|
@@ -260,26 +260,26 @@ function j(e) {
|
|
|
260
260
|
footerContentRId: v.activeFooterRId,
|
|
261
261
|
firstPageHeaderContentRId: v.activeFirstHeaderRId,
|
|
262
262
|
firstPageFooterContentRId: v.activeFirstFooterRId,
|
|
263
|
-
sectionHeaderFooterRefs:
|
|
263
|
+
sectionHeaderFooterRefs: ve(i),
|
|
264
264
|
theme: ee,
|
|
265
265
|
sectionProperties: s,
|
|
266
266
|
document: i,
|
|
267
267
|
defaultTabStop: te,
|
|
268
268
|
mirrorMargins: _,
|
|
269
269
|
styles: g,
|
|
270
|
-
layout:
|
|
270
|
+
layout: R.value,
|
|
271
271
|
hfPMs: K,
|
|
272
|
-
painter:
|
|
272
|
+
painter: dt,
|
|
273
273
|
pagesContainer: r,
|
|
274
|
-
session:
|
|
275
|
-
renderHfFromContentOrPm:
|
|
276
|
-
renderHeaderFooterContentByRId:
|
|
277
|
-
documentFontsAreLoaded:
|
|
278
|
-
buildFootnoteRenderItems:
|
|
279
|
-
describeInvalidHighlightMarks:
|
|
280
|
-
emptyTemplatePreviewEntries:
|
|
281
|
-
emptyTemplatePreviewHidden:
|
|
282
|
-
hyphenationReadiness:
|
|
274
|
+
session: lt,
|
|
275
|
+
renderHfFromContentOrPm: Je,
|
|
276
|
+
renderHeaderFooterContentByRId: Ye,
|
|
277
|
+
documentFontsAreLoaded: Qe,
|
|
278
|
+
buildFootnoteRenderItems: Xe,
|
|
279
|
+
describeInvalidHighlightMarks: Ze,
|
|
280
|
+
emptyTemplatePreviewEntries: Ge,
|
|
281
|
+
emptyTemplatePreviewHidden: Ke,
|
|
282
|
+
hyphenationReadiness: ut
|
|
283
283
|
}, e, t));
|
|
284
284
|
} catch (e) {
|
|
285
285
|
let t = e instanceof Error ? e : Error(String(e));
|
|
@@ -288,40 +288,40 @@ function j(e) {
|
|
|
288
288
|
}
|
|
289
289
|
let Y = fe({
|
|
290
290
|
runLayout: (e, t) => J(e, t),
|
|
291
|
-
debounceMs:
|
|
292
|
-
maxDelayMs:
|
|
291
|
+
debounceMs: He,
|
|
292
|
+
maxDelayMs: Ue,
|
|
293
293
|
clock: de
|
|
294
294
|
}), X = null;
|
|
295
|
-
function
|
|
295
|
+
function mt() {
|
|
296
296
|
X !== null && (window.clearTimeout(X), X = null);
|
|
297
|
-
let e =
|
|
297
|
+
let e = M.value, t = A.value;
|
|
298
298
|
if (!(!e || !t)) try {
|
|
299
|
-
let n =
|
|
300
|
-
|
|
299
|
+
let n = Se(e.state.doc, t);
|
|
300
|
+
A.value = n, K.sync(), q.sync(), C?.(n), W.emit("docChange", n);
|
|
301
301
|
} catch (e) {
|
|
302
302
|
w?.(e instanceof Error ? e : Error(String(e)));
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function ht() {
|
|
306
306
|
X !== null && window.clearTimeout(X), X = window.setTimeout(() => {
|
|
307
|
-
X = null,
|
|
308
|
-
},
|
|
307
|
+
X = null, mt();
|
|
308
|
+
}, We);
|
|
309
309
|
}
|
|
310
310
|
let Z = se({
|
|
311
311
|
getHost: () => t.value,
|
|
312
|
-
getDocument: () =>
|
|
313
|
-
getStyles: () =>
|
|
314
|
-
getExtensionManager: () =>
|
|
315
|
-
getExternalPlugins:
|
|
312
|
+
getDocument: () => A.value,
|
|
313
|
+
getStyles: () => A.value?.package.styles ?? null,
|
|
314
|
+
getExtensionManager: () => H,
|
|
315
|
+
getExternalPlugins: ct,
|
|
316
316
|
getCollaboration: () => c(S),
|
|
317
|
-
getCollaborationModules: () =>
|
|
317
|
+
getCollaborationModules: () => P.value,
|
|
318
318
|
getPrecomputedInitialState: () => null,
|
|
319
319
|
getReadOnly: () => c(u),
|
|
320
|
-
getDocumentIdentity: () => String(
|
|
321
|
-
getDocumentContext: () =>
|
|
322
|
-
onTransaction:
|
|
320
|
+
getDocumentIdentity: () => String(j),
|
|
321
|
+
getDocumentContext: () => A.value,
|
|
322
|
+
onTransaction: gt,
|
|
323
323
|
onSelectionChange: (e) => {
|
|
324
|
-
|
|
324
|
+
N.value = e, T?.(e), W.emit("selectionChange", {
|
|
325
325
|
from: e.selection.from,
|
|
326
326
|
to: e.selection.to
|
|
327
327
|
});
|
|
@@ -331,107 +331,107 @@ function j(e) {
|
|
|
331
331
|
onCut: () => Re?.(),
|
|
332
332
|
onPaste: () => ze?.(),
|
|
333
333
|
onReadOnlyEditAttempt: () => Be?.(),
|
|
334
|
-
onEditorViewReady:
|
|
334
|
+
onEditorViewReady: _t,
|
|
335
335
|
onEditorViewDestroy: () => {
|
|
336
|
-
|
|
336
|
+
M.value = null, z.value = !1, E?.(null);
|
|
337
337
|
},
|
|
338
338
|
onRemoteSelectionsChange: (e) => {
|
|
339
|
-
|
|
339
|
+
F.value = e;
|
|
340
340
|
}
|
|
341
341
|
}), Q = () => {
|
|
342
|
-
let e = c(S)?.awareness, t =
|
|
343
|
-
|
|
342
|
+
let e = c(S)?.awareness, t = P.value, n = Z.getView();
|
|
343
|
+
F.value = e && t && n ? oe(n.state, e, t) : [];
|
|
344
344
|
};
|
|
345
345
|
l(() => c(S), (e, t, n) => {
|
|
346
|
-
if (
|
|
347
|
-
|
|
346
|
+
if (F.value = [], !e) {
|
|
347
|
+
P.value = null, Z.retryViewCreation(), Z.syncExternalDocument();
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
350
|
let r = !1;
|
|
351
351
|
n(() => {
|
|
352
352
|
r = !0;
|
|
353
|
-
}),
|
|
354
|
-
r || (
|
|
353
|
+
}), P.value = null, re().then((e) => {
|
|
354
|
+
r || (P.value = e, Z.retryViewCreation(), Z.syncExternalDocument(), Q());
|
|
355
355
|
}, (e) => {
|
|
356
|
-
r || (
|
|
356
|
+
r || (P.value = null, w?.(e instanceof Error ? e : Error(String(e))));
|
|
357
357
|
});
|
|
358
358
|
}, { immediate: !0 }), l(() => ({
|
|
359
359
|
awareness: c(S)?.awareness,
|
|
360
|
-
modules:
|
|
361
|
-
view:
|
|
360
|
+
modules: P.value,
|
|
361
|
+
view: M.value
|
|
362
362
|
}), ({ awareness: e, modules: t, view: n }, r, i) => {
|
|
363
363
|
if (!e || !t || !n) {
|
|
364
|
-
|
|
364
|
+
F.value = [];
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
367
|
e.on("change", Q), Q(), i(() => {
|
|
368
|
-
e.off("change", Q),
|
|
368
|
+
e.off("change", Q), F.value = [];
|
|
369
369
|
});
|
|
370
370
|
}, { flush: "post" });
|
|
371
|
-
function
|
|
372
|
-
|
|
371
|
+
function gt({ transactions: e, newState: t, docChanged: n }) {
|
|
372
|
+
N.value = t, n && (V.value = !0, G.incrementStateSeq(), Y.schedule(t, xe(e)), ht()), G.requestRender();
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
function _t(e) {
|
|
375
|
+
M.value = e, N.value = e.state, z.value = !0, J(e.state, { reason: "initial" }), G.requestRender(), $(e), E?.(e), c(u) || requestAnimationFrame(() => {
|
|
376
|
+
M.value === e && e.focus();
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
let
|
|
380
|
-
getDocx: async (e) => (await
|
|
381
|
-
loadDocument:
|
|
382
|
-
loadDocx:
|
|
383
|
-
},
|
|
379
|
+
let vt = {
|
|
380
|
+
getDocx: async (e) => (await Et(e))?.buffer ?? null,
|
|
381
|
+
loadDocument: Tt,
|
|
382
|
+
loadDocx: wt
|
|
383
|
+
}, yt = v({
|
|
384
384
|
getEditorApi: () => Z.api,
|
|
385
|
-
getLayout: () =>
|
|
385
|
+
getLayout: () => R.value,
|
|
386
386
|
runLayout: (e, t) => J(e, t),
|
|
387
|
-
getDocumentIO: () =>
|
|
387
|
+
getDocumentIO: () => vt,
|
|
388
388
|
emitter: W
|
|
389
389
|
});
|
|
390
390
|
function $(e) {
|
|
391
|
-
te(c(
|
|
391
|
+
te(c(y) === "suggesting", e.state, e.dispatch, c(b));
|
|
392
392
|
}
|
|
393
|
-
l([() => c(
|
|
394
|
-
let e =
|
|
393
|
+
l([() => c(y), () => c(b)], () => {
|
|
394
|
+
let e = M.value;
|
|
395
395
|
e && $(e);
|
|
396
396
|
for (let e of q.listStories()) {
|
|
397
397
|
let t = q.getView(e);
|
|
398
398
|
t && $(t);
|
|
399
399
|
}
|
|
400
400
|
}), l(() => c(u), (e) => {
|
|
401
|
-
Z.syncEditable(), e &&
|
|
401
|
+
Z.syncEditable(), e && Nt();
|
|
402
402
|
});
|
|
403
|
-
function
|
|
404
|
-
let t =
|
|
405
|
-
if (t === e.state.plugins.includes(
|
|
406
|
-
let n = e.state.plugins.filter((e) => e !==
|
|
403
|
+
function bt(e) {
|
|
404
|
+
let t = st();
|
|
405
|
+
if (t === e.state.plugins.includes(U)) return;
|
|
406
|
+
let n = e.state.plugins.filter((e) => e !== U && e !== at);
|
|
407
407
|
if (t) {
|
|
408
|
-
let e = n.indexOf(
|
|
409
|
-
n.splice(t, 0,
|
|
408
|
+
let e = n.indexOf(ot), t = e === -1 ? n.length : e;
|
|
409
|
+
n.splice(t, 0, U, at);
|
|
410
410
|
}
|
|
411
411
|
e.updateState(e.state.reconfigure({ plugins: n }));
|
|
412
412
|
}
|
|
413
|
-
l(() =>
|
|
414
|
-
let e =
|
|
415
|
-
e &&
|
|
413
|
+
l(() => st(), () => {
|
|
414
|
+
let e = M.value;
|
|
415
|
+
e && bt(e);
|
|
416
416
|
});
|
|
417
|
-
function bt() {
|
|
418
|
-
Z.ensureView();
|
|
419
|
-
}
|
|
420
417
|
function xt() {
|
|
421
|
-
|
|
418
|
+
Z.ensureView();
|
|
422
419
|
}
|
|
423
420
|
function St() {
|
|
424
|
-
|
|
421
|
+
j += 1, V.value = !1, I.value = null, L.value = null, q.activate(null), Y.dispose(), Z.destroyView(), K.sync(), q.sync(), Z.ensureView(), Z.getView() || Ct();
|
|
422
|
+
}
|
|
423
|
+
function Ct() {
|
|
424
|
+
let e = A.value;
|
|
425
425
|
if (!(!e || c(S))) try {
|
|
426
426
|
let t = ce({
|
|
427
427
|
document: e,
|
|
428
428
|
styles: e.package.styles ?? null,
|
|
429
|
-
manager:
|
|
430
|
-
externalPlugins:
|
|
429
|
+
manager: H,
|
|
430
|
+
externalPlugins: ct(),
|
|
431
431
|
collaborationModules: null,
|
|
432
432
|
reason: "mount"
|
|
433
433
|
});
|
|
434
|
-
|
|
434
|
+
N.value = t, J(t, { reason: "initial" });
|
|
435
435
|
} catch (e) {
|
|
436
436
|
w?.(e instanceof Error ? e : Error(String(e)));
|
|
437
437
|
}
|
|
@@ -439,34 +439,34 @@ function j(e) {
|
|
|
439
439
|
l([
|
|
440
440
|
t,
|
|
441
441
|
a,
|
|
442
|
-
|
|
442
|
+
k,
|
|
443
443
|
...r ? [r] : []
|
|
444
444
|
], () => {
|
|
445
|
-
t.value &&
|
|
445
|
+
t.value && A.value && !Z.getView() && xt(), K.sync(), q.sync();
|
|
446
446
|
}, { flush: "post" });
|
|
447
|
-
async function
|
|
448
|
-
|
|
447
|
+
async function wt(e) {
|
|
448
|
+
B.value = null, z.value = !1;
|
|
449
449
|
try {
|
|
450
|
-
let t = await me(e, { password: c(
|
|
451
|
-
|
|
450
|
+
let t = await me(e, { password: c(je) });
|
|
451
|
+
A.value = t, St();
|
|
452
452
|
} catch (e) {
|
|
453
453
|
let t = e instanceof Error ? e : Error(String(e));
|
|
454
|
-
|
|
454
|
+
B.value = t.message, w?.(t);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
457
|
+
function Tt(e) {
|
|
458
|
+
B.value = null, A.value = e, St();
|
|
459
459
|
}
|
|
460
|
-
async function
|
|
461
|
-
let t =
|
|
460
|
+
async function Et(e) {
|
|
461
|
+
let t = M.value, n = A.value;
|
|
462
462
|
if (!t || !n) return null;
|
|
463
|
-
let r = q.snapshotDocument(K.snapshotDocument(n)), i = t.state, { resolveSelectiveSaveFlags: a } = await import("@stll/folio-core/docx/selectiveSaveFlags"), o = a(c(
|
|
463
|
+
let r = q.snapshotDocument(K.snapshotDocument(n)), i = t.state, { resolveSelectiveSaveFlags: a } = await import("@stll/folio-core/docx/selectiveSaveFlags"), o = a(c(D)), s = Se(i.doc, r), l = s.originalBuffer ?? null, u = o.selectiveSave && e?.mode !== _.full, d = u || o.selectiveSaveTripwire, { repackDocx: f, createDocx: p } = await import("@stll/folio-core/docx/rezip"), m = null;
|
|
464
464
|
if (d && l) {
|
|
465
465
|
let { attemptSelectiveSave: e } = await import("@stll/folio-core/docx/selectiveSave");
|
|
466
466
|
m = await e(s, l, {
|
|
467
|
-
changedParaIds:
|
|
468
|
-
structuralChange:
|
|
469
|
-
hasUntrackedChanges:
|
|
467
|
+
changedParaIds: we(i),
|
|
468
|
+
structuralChange: Te(i),
|
|
469
|
+
hasUntrackedChanges: Ee(i),
|
|
470
470
|
maxBytes: o.selectiveSaveMaxBytes
|
|
471
471
|
});
|
|
472
472
|
}
|
|
@@ -475,93 +475,93 @@ function j(e) {
|
|
|
475
475
|
else if (o.selectiveSaveTripwire) try {
|
|
476
476
|
g = await f(s);
|
|
477
477
|
} catch {}
|
|
478
|
-
if (o.selectiveSaveTripwire && g &&
|
|
478
|
+
if (o.selectiveSaveTripwire && g && O) try {
|
|
479
479
|
let { compareSelectiveVsFull: e } = await import("@stll/folio-core/docx/selectiveSaveTripwire");
|
|
480
|
-
|
|
480
|
+
O(await e(m, g));
|
|
481
481
|
} catch {}
|
|
482
482
|
return {
|
|
483
483
|
buffer: h,
|
|
484
484
|
document: s
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
|
-
async function
|
|
488
|
-
let t = await
|
|
489
|
-
return t ? (
|
|
487
|
+
async function Dt(e) {
|
|
488
|
+
let t = await Et({ mode: e?.selective === !1 ? _.full : _.preferSelective });
|
|
489
|
+
return t ? (A.value = t.document, K.sync(), q.sync(), V.value = !1, new Blob([t.buffer], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" })) : null;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
let e =
|
|
491
|
+
function Ot() {
|
|
492
|
+
let e = A.value;
|
|
493
493
|
return e ? q.snapshotDocument(K.snapshotDocument(e)) : null;
|
|
494
494
|
}
|
|
495
|
-
function Ot(e) {
|
|
496
|
-
O.value = e, K.sync(), q.sync(), P.value && !q.getView(P.value) && (P.value = null);
|
|
497
|
-
}
|
|
498
495
|
function kt(e) {
|
|
496
|
+
A.value = e, K.sync(), q.sync(), L.value && !q.getView(L.value) && (L.value = null);
|
|
497
|
+
}
|
|
498
|
+
function At(e) {
|
|
499
499
|
return K.getView(e);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function jt() {
|
|
502
502
|
K.sync();
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Mt(e) {
|
|
505
505
|
let t = q.activate(e);
|
|
506
|
-
t && ($(t),
|
|
507
|
-
}
|
|
508
|
-
function Mt() {
|
|
509
|
-
q.activate(null), P.value = null;
|
|
506
|
+
t && ($(t), L.value = e, requestAnimationFrame(() => t.focus()));
|
|
510
507
|
}
|
|
511
508
|
function Nt() {
|
|
512
|
-
|
|
513
|
-
return e ? q.getView(e) : null;
|
|
509
|
+
q.activate(null), L.value = null;
|
|
514
510
|
}
|
|
515
511
|
function Pt() {
|
|
516
|
-
|
|
512
|
+
let e = L.value;
|
|
513
|
+
return e ? q.getView(e) : null;
|
|
517
514
|
}
|
|
518
515
|
function Ft() {
|
|
519
|
-
|
|
520
|
-
e ? e.focus() : k.value?.focus();
|
|
516
|
+
return H.getCommands();
|
|
521
517
|
}
|
|
522
518
|
function It() {
|
|
523
|
-
let e =
|
|
519
|
+
let e = Pt();
|
|
520
|
+
e ? e.focus() : M.value?.focus();
|
|
521
|
+
}
|
|
522
|
+
function Lt() {
|
|
523
|
+
let e = M.value;
|
|
524
524
|
e && J(e.state, { reason: "manual" });
|
|
525
525
|
}
|
|
526
526
|
l([
|
|
527
|
-
() => c(y),
|
|
528
527
|
() => c(ge),
|
|
528
|
+
() => c(_e),
|
|
529
529
|
() => c(he)
|
|
530
|
-
], () =>
|
|
531
|
-
function
|
|
532
|
-
Y.dispose(), X !== null && (window.clearTimeout(X), X = null), Z.destroyView(),
|
|
533
|
-
}
|
|
534
|
-
return i(
|
|
535
|
-
editor:
|
|
536
|
-
editorView:
|
|
537
|
-
editorState:
|
|
538
|
-
remoteSelections:
|
|
539
|
-
headerFooterSelection:
|
|
540
|
-
activeNoteStory:
|
|
541
|
-
isReady:
|
|
542
|
-
isDirty:
|
|
543
|
-
parseError:
|
|
544
|
-
layout:
|
|
545
|
-
blocks:
|
|
546
|
-
measures:
|
|
530
|
+
], () => Lt());
|
|
531
|
+
function Rt() {
|
|
532
|
+
Y.dispose(), X !== null && (window.clearTimeout(X), X = null), Z.destroyView(), F.value = [], K.destroy(), q.destroy(), H.destroy(), N.value = null, R.value = null, A.value = null, z.value = !1;
|
|
533
|
+
}
|
|
534
|
+
return i(Rt), {
|
|
535
|
+
editor: yt,
|
|
536
|
+
editorView: M,
|
|
537
|
+
editorState: N,
|
|
538
|
+
remoteSelections: F,
|
|
539
|
+
headerFooterSelection: I,
|
|
540
|
+
activeNoteStory: L,
|
|
541
|
+
isReady: z,
|
|
542
|
+
isDirty: V,
|
|
543
|
+
parseError: B,
|
|
544
|
+
layout: R,
|
|
545
|
+
blocks: $e,
|
|
546
|
+
measures: et,
|
|
547
547
|
syncCoordinator: G,
|
|
548
|
-
loadBuffer:
|
|
549
|
-
loadDocument:
|
|
550
|
-
save:
|
|
551
|
-
getDocument:
|
|
552
|
-
setDocument:
|
|
553
|
-
getHeaderFooterView:
|
|
554
|
-
syncHeaderFooterViews:
|
|
555
|
-
openNoteStory:
|
|
556
|
-
closeNoteStory:
|
|
557
|
-
getActiveNoteView:
|
|
558
|
-
getCommands:
|
|
559
|
-
focus:
|
|
560
|
-
reLayout:
|
|
561
|
-
destroy:
|
|
548
|
+
loadBuffer: wt,
|
|
549
|
+
loadDocument: Tt,
|
|
550
|
+
save: Dt,
|
|
551
|
+
getDocument: Ot,
|
|
552
|
+
setDocument: kt,
|
|
553
|
+
getHeaderFooterView: At,
|
|
554
|
+
syncHeaderFooterViews: jt,
|
|
555
|
+
openNoteStory: Mt,
|
|
556
|
+
closeNoteStory: Nt,
|
|
557
|
+
getActiveNoteView: Pt,
|
|
558
|
+
getCommands: Ft,
|
|
559
|
+
focus: It,
|
|
560
|
+
reLayout: Lt,
|
|
561
|
+
destroy: Rt
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function P(e, t) {
|
|
565
565
|
if (t < e.top + 40) {
|
|
566
566
|
let n = Math.max(0, e.top + 40 - t);
|
|
567
567
|
return -Math.min(12, n / 40 * 12);
|
|
@@ -574,12 +574,12 @@ function M(e, t) {
|
|
|
574
574
|
}
|
|
575
575
|
//#endregion
|
|
576
576
|
//#region src/composables/useDragAutoScroll.ts
|
|
577
|
-
function
|
|
577
|
+
function F({ pagesContainer: e, onScrollExtendSelection: t }) {
|
|
578
578
|
let n = null, r = 0, a = 0, o = !1, s = null;
|
|
579
579
|
function c() {
|
|
580
580
|
if (s) return s;
|
|
581
581
|
let t = e.value;
|
|
582
|
-
return t ? (s =
|
|
582
|
+
return t ? (s = je(t), s) : null;
|
|
583
583
|
}
|
|
584
584
|
function l() {
|
|
585
585
|
o = !1, n !== null && (cancelAnimationFrame(n), n = null);
|
|
@@ -588,7 +588,7 @@ function N({ pagesContainer: e, onScrollExtendSelection: t }) {
|
|
|
588
588
|
if (!o) return;
|
|
589
589
|
let e = c();
|
|
590
590
|
if (!e) return;
|
|
591
|
-
let i =
|
|
591
|
+
let i = P(e.getBoundingClientRect(), a);
|
|
592
592
|
i !== 0 && (e.scrollTop += i, t(r, a)), n = requestAnimationFrame(u);
|
|
593
593
|
}
|
|
594
594
|
function d() {
|
|
@@ -609,7 +609,7 @@ function N({ pagesContainer: e, onScrollExtendSelection: t }) {
|
|
|
609
609
|
}
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/composables/useTableResize.ts
|
|
612
|
-
function
|
|
612
|
+
function I() {
|
|
613
613
|
let e = {
|
|
614
614
|
active: !1,
|
|
615
615
|
startX: 0,
|
|
@@ -641,7 +641,7 @@ function P() {
|
|
|
641
641
|
}
|
|
642
642
|
function a(i, a) {
|
|
643
643
|
let o = i.target;
|
|
644
|
-
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),
|
|
644
|
+
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), L(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), R(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), $e(a, n), !0) : !1 : !1;
|
|
645
645
|
}
|
|
646
646
|
function o(r) {
|
|
647
647
|
if (e.active && e.handle) {
|
|
@@ -649,7 +649,7 @@ function P() {
|
|
|
649
649
|
let t = r.clientX - e.startX, n = parseFloat(e.handle.style.left);
|
|
650
650
|
e.handle.style.left = `${n + t}px`, e.startX = r.clientX;
|
|
651
651
|
let i = Math.round(t * x), a = e.origWidths.left + i, o = e.origWidths.right - i;
|
|
652
|
-
a >=
|
|
652
|
+
a >= y && o >= y && (e.origWidths = {
|
|
653
653
|
left: a,
|
|
654
654
|
right: o
|
|
655
655
|
});
|
|
@@ -660,7 +660,7 @@ function P() {
|
|
|
660
660
|
let e = r.clientY - t.startY, n = parseFloat(t.handle.style.top);
|
|
661
661
|
t.handle.style.top = `${n + e}px`, t.startY = r.clientY;
|
|
662
662
|
let i = Math.round(e * x), a = t.origHeight + i;
|
|
663
|
-
a >=
|
|
663
|
+
a >= b && (t.origHeight = a);
|
|
664
664
|
return;
|
|
665
665
|
}
|
|
666
666
|
if (n.active && n.handle) {
|
|
@@ -668,12 +668,12 @@ function P() {
|
|
|
668
668
|
let e = r.clientX - n.startX, t = parseFloat(n.handle.style.left);
|
|
669
669
|
n.handle.style.left = `${t + e}px`, n.startX = r.clientX;
|
|
670
670
|
let i = Math.round(e * x), a = n.origWidth + i;
|
|
671
|
-
a >=
|
|
671
|
+
a >= y && (n.origWidth = a);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
function s(i) {
|
|
675
675
|
if (e.active) {
|
|
676
|
-
e.active = !1, e.handle?.classList.remove("dragging"), r &&
|
|
676
|
+
e.active = !1, e.handle?.classList.remove("dragging"), r && Me(r, {
|
|
677
677
|
pmStart: e.tablePmStart,
|
|
678
678
|
colIdx: e.columnIndex,
|
|
679
679
|
newLeft: e.origWidths.left,
|
|
@@ -689,7 +689,7 @@ function P() {
|
|
|
689
689
|
}), t.handle = null;
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
692
|
-
n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r &&
|
|
692
|
+
n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r && S(r, {
|
|
693
693
|
pmStart: n.tablePmStart,
|
|
694
694
|
colIdx: n.columnIndex,
|
|
695
695
|
newWidth: n.origWidth
|
|
@@ -706,12 +706,12 @@ function P() {
|
|
|
706
706
|
isResizing: i
|
|
707
707
|
};
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function L(e, t) {
|
|
710
710
|
let n = Fe(e, t.tablePmStart, t.columnIndex);
|
|
711
711
|
n && (t.origWidths = n);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
let r =
|
|
713
|
+
function R(e, t, n) {
|
|
714
|
+
let r = Ie(e, t.tablePmStart, t.rowIndex);
|
|
715
715
|
if (r != null) {
|
|
716
716
|
t.origHeight = r;
|
|
717
717
|
return;
|
|
@@ -719,18 +719,18 @@ function I(e, t, n) {
|
|
|
719
719
|
let i = n.closest(".layout-table")?.querySelector(`[data-row-index="${t.rowIndex}"]`), a = i ? i.getBoundingClientRect().height : 30;
|
|
720
720
|
t.origHeight = Math.round(a * x);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function $e(e, t) {
|
|
723
723
|
let n = Pe(e, t.tablePmStart, t.columnIndex);
|
|
724
724
|
n != null && (t.origWidth = n);
|
|
725
725
|
}
|
|
726
726
|
//#endregion
|
|
727
727
|
//#region src/composables/useTrackedChanges.ts
|
|
728
|
-
function
|
|
729
|
-
return e(() => (n.value,
|
|
728
|
+
function et(t, n) {
|
|
729
|
+
return e(() => (n.value, C(t.value?.state ?? null)));
|
|
730
730
|
}
|
|
731
731
|
//#endregion
|
|
732
732
|
//#region src/composables/useZoom.ts
|
|
733
|
-
var z =
|
|
733
|
+
var z = T, B = w, V = [
|
|
734
734
|
.5,
|
|
735
735
|
.75,
|
|
736
736
|
1,
|
|
@@ -738,16 +738,16 @@ var z = Ie, B = T, V = [
|
|
|
738
738
|
1.5,
|
|
739
739
|
2
|
|
740
740
|
];
|
|
741
|
-
function
|
|
741
|
+
function H(t = 1) {
|
|
742
742
|
let i = o(Math.max(z, Math.min(B, t))), a = e(() => Math.round(i.value * 100)), s = e(() => i.value <= z), c = e(() => i.value >= B);
|
|
743
743
|
function l(e) {
|
|
744
744
|
i.value = Math.max(z, Math.min(B, Math.round(e * 100) / 100));
|
|
745
745
|
}
|
|
746
746
|
function u() {
|
|
747
|
-
l(i.value +
|
|
747
|
+
l(i.value + E);
|
|
748
748
|
}
|
|
749
749
|
function d() {
|
|
750
|
-
l(i.value -
|
|
750
|
+
l(i.value - E);
|
|
751
751
|
}
|
|
752
752
|
function f() {
|
|
753
753
|
l(1);
|
|
@@ -777,4 +777,4 @@ function tt(t = 1) {
|
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
779
|
//#endregion
|
|
780
|
-
export {
|
|
780
|
+
export { F as a, D as c, I as i, k as l, C as n, N as o, et as r, A as s, H as t, j as u };
|