@stll/folio-vue 0.15.2 → 0.16.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 +7 -0
- package/dist/composables/useDocxEditor.d.ts +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +595 -594
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-D2wgbGwH.js";
|
|
2
2
|
import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-BlOX6_s_.js";
|
|
3
3
|
import { t as ae } from "./zIndex-Ei9BbHSW.js";
|
|
4
|
-
import { a as S, c as
|
|
5
|
-
import { FindReplaceDialog as
|
|
6
|
-
import { Fragment as
|
|
4
|
+
import { a as S, c as oe, i as se, l as C, o as ce, r as le, s as ue, t as de, u as fe } from "./useZoom-KiURxHZu.js";
|
|
5
|
+
import { FindReplaceDialog as w, FootnotePropertiesDialog as pe, HyperlinkDialog as me, ImagePositionDialog as he, ImagePropertiesDialog as ge, InsertImageDialog as T, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as Se } from "./dialogs.js";
|
|
6
|
+
import { Fragment as D, Teleport as O, computed as k, createApp as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as Ce, createStaticVNode as we, createTextVNode as Te, createVNode as F, defineComponent as I, h as Ee, inject as De, mergeProps as Oe, nextTick as ke, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as z, onMounted as Ae, onScopeDispose as B, openBlock as V, provide as je, ref as H, renderList as U, renderSlot as Me, shallowRef as Ne, toDisplayString as W, unref as G, vModelText as Pe, vShow as Fe, watch as K, withCtx as Ie, withDirectives as Le, withKeys as Re, withModifiers as q } from "vue";
|
|
7
7
|
import { createStyleResolver as ze, extractSelectionState as Be, getSelectedText as Ve, insertImageFromFile as He, insertImageFromFile as Ue, insertPageBreakInView as We, insertPageBreakInView as Ge, insertTableInView as Ke, insertTableInView as qe, insertTableOfContentsInView as Je, insertTableOfContentsInView as Ye, schema as Xe } from "@stll/folio-core/prosemirror";
|
|
8
8
|
import { expectTableAttrs as Ze } from "@stll/folio-core/prosemirror/attrs";
|
|
9
9
|
import { getTableContext as Qe } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
@@ -13,15 +13,15 @@ import { resolveActiveEditorStory as tt } from "@stll/folio-core/controller/acti
|
|
|
13
13
|
import { clearAllCaches as nt, resetCanvasContext as rt } from "@stll/folio-core/layout-bridge/engine/measuring";
|
|
14
14
|
import { onFontsLoaded as it } from "@stll/folio-core/utils/fontLoader";
|
|
15
15
|
import { twipsToPixels as at } from "@stll/folio-core/paged-layout/sectionGeometry";
|
|
16
|
-
import { getDocumentWatermark as
|
|
16
|
+
import { getDocumentWatermark as ot, getDocumentWatermark as st, setDocumentWatermark as J, setDocumentWatermark as ct } from "@stll/folio-core/watermark";
|
|
17
17
|
import { createLatestRequestGate as lt } from "@stll/folio-core/controller/latestRequestGate";
|
|
18
18
|
import { measureDirectiveGutter as ut, projectRangesToRects as dt } from "@stll/folio-core/paged-layout/rangeProjection";
|
|
19
19
|
import { prefersReducedMotionBehavior as ft } from "@stll/folio-core/paged-layout/scrollNavigation";
|
|
20
20
|
import { anonymizationDecorationsKey as pt, getAnonymizationMatches as mt, getAnonymizationMatches as ht, setAnonymizationTermsMeta as gt, slugAnonymizationLabel as _t } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
|
|
21
|
-
import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as vt, acceptAutocompleteSuggestion as yt, acceptAutocompleteWord as bt, appendAutocompleteToken as xt, autocompleteSuggestionKey as
|
|
21
|
+
import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as vt, acceptAutocompleteSuggestion as yt, acceptAutocompleteWord as bt, appendAutocompleteToken as xt, autocompleteSuggestionKey as St, autocompleteSuggestionPlugin as Y, clearAutocompleteSuggestion as Ct, finishAutocompleteSuggestion as wt, getAutocompleteSuggestion as Tt, getAutocompleteSuggestion as Et, shouldTriggerAutocomplete as Dt, startAutocompleteSuggestion as Ot } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
|
|
22
22
|
import { createRenderedDomContext as kt } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
23
|
-
import { ContentControlWidgetController as
|
|
24
|
-
import { NodeSelection as
|
|
23
|
+
import { ContentControlWidgetController as At } from "@stll/folio-core/controller/contentControlWidgetController";
|
|
24
|
+
import { NodeSelection as X, Selection as jt, TextSelection as Z } from "prosemirror-state";
|
|
25
25
|
import { pixelsToEmu as Mt } from "@stll/folio-core/utils/units";
|
|
26
26
|
import { IMAGE_LAYOUT_OPTIONS as Nt, captureInlinePositionEmu as Pt, deriveLayoutChoice as Ft, findImageElement as It, isImageLayoutOptionEnabled as Lt, toolbarValueToLayoutTarget as Rt } from "@stll/folio-core/layout-painter/imageLayout";
|
|
27
27
|
import { isTrackChangesMode as zt, toggledTrackChangesMode as Bt } from "@stll/folio-core/managers/EditorModeManager";
|
|
@@ -36,10 +36,10 @@ import { closeHistory as rn, redo as an, undo as on } from "prosemirror-history"
|
|
|
36
36
|
import { clearFormatting as sn } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
37
37
|
import { PENDING_COMMENT_ID as cn, createCommentIdAllocator as ln, seedCommentAllocator as un } from "@stll/folio-core/prosemirror/commentIdAllocator";
|
|
38
38
|
import { createComment as dn } from "@stll/folio-core/prosemirror/commentOps";
|
|
39
|
-
import { acceptAIEditRevision as fn, acceptChange as pn, acceptSuggestion as mn, findAIEditRevisionRange as hn, findSuggestionRange as gn, getSuggestions as _n, rejectAIEditRevision as vn, rejectChange as yn, rejectSuggestion as
|
|
40
|
-
import { makeRevisionInfo as
|
|
41
|
-
import { findPageIndexContainingPmPos as
|
|
42
|
-
import { proseDocToBlocks as
|
|
39
|
+
import { acceptAIEditRevision as fn, acceptChange as pn, acceptSuggestion as mn, findAIEditRevisionRange as hn, findSuggestionRange as gn, getSuggestions as _n, rejectAIEditRevision as vn, rejectChange as yn, rejectSuggestion as bn } from "@stll/folio-core/prosemirror/commands/comments";
|
|
40
|
+
import { makeRevisionInfo as Q } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
|
|
41
|
+
import { findPageIndexContainingPmPos as xn } from "@stll/folio-core/layout-engine";
|
|
42
|
+
import { proseDocToBlocks as $ } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
|
|
43
43
|
import { setTemplatePreviewValues as Sn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
44
44
|
import { clearTemplateSlashMenu as Cn, consumeTemplateSlashQuery as wn, getTemplateSlashMenu as Tn, resetTemplateSlashQuery as En, templateSlashMenuKey as Dn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
45
45
|
import { createEmptyHeaderFooter as On, pickActiveHeaderFooterRId as kn, removeHeaderFooter as An, resolveHeaderFooterContent as jn, saveHeaderFooterContent as Mn } from "@stll/folio-core/utils/headerFooter";
|
|
@@ -181,23 +181,23 @@ var di = [
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
return
|
|
184
|
+
return Ae(() => {
|
|
185
185
|
document.addEventListener("click", u), o();
|
|
186
|
-
}),
|
|
186
|
+
}), z(() => {
|
|
187
187
|
i.invalidate(), document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
|
|
188
188
|
}), (t, i) => (V(), N("div", {
|
|
189
189
|
ref_key: "rootRef",
|
|
190
190
|
ref: n,
|
|
191
191
|
class: "folio-anonymization-overlay",
|
|
192
192
|
"data-folio-anonymization-overlay": ""
|
|
193
|
-
}, [(V(!0), N(
|
|
193
|
+
}, [(V(!0), N(D, null, U(r.value, (t) => (V(), N(D, { key: `${t.label}:${t.canonical}` }, [(V(!0), N(D, null, U(t.rects, (n, r) => (V(), N("span", {
|
|
194
194
|
key: `${t.canonical}:${r}:${n.left}:${n.top}`,
|
|
195
|
-
class:
|
|
195
|
+
class: L(["folio-anonymization-term", `folio-anonymization-term--${G(_t)(t.label)}`]),
|
|
196
196
|
"data-folio-anonymization-label": t.label,
|
|
197
197
|
"data-folio-anonymization-canonical": t.canonical,
|
|
198
198
|
"data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
|
|
199
199
|
title: `Anonymized: ${t.canonical}`,
|
|
200
|
-
style:
|
|
200
|
+
style: R({
|
|
201
201
|
position: "absolute",
|
|
202
202
|
left: `${n.left}px`,
|
|
203
203
|
top: `${n.top}px`,
|
|
@@ -254,12 +254,12 @@ var di = [
|
|
|
254
254
|
t.layout,
|
|
255
255
|
t.blocks,
|
|
256
256
|
t.measures
|
|
257
|
-
], () => a(), { immediate: !0 }),
|
|
257
|
+
], () => a(), { immediate: !0 }), z(() => {
|
|
258
258
|
r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
|
|
259
|
-
}), (e, t) => (V(), N("div", pi, [(V(!0), N(
|
|
259
|
+
}), (e, t) => (V(), N("div", pi, [(V(!0), N(D, null, U(n.value, (e, t) => (V(), N("span", {
|
|
260
260
|
key: `${t}:${e.left}:${e.top}`,
|
|
261
261
|
class: "folio-passage-highlight",
|
|
262
|
-
style:
|
|
262
|
+
style: R({
|
|
263
263
|
position: "absolute",
|
|
264
264
|
left: `${e.left}px`,
|
|
265
265
|
top: `${e.top}px`,
|
|
@@ -282,14 +282,14 @@ var di = [
|
|
|
282
282
|
setup(e) {
|
|
283
283
|
return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", hi, [P("span", {
|
|
284
284
|
class: "folio-autocomplete-ghost",
|
|
285
|
-
style:
|
|
285
|
+
style: R({
|
|
286
286
|
left: `${e.caret.x}px`,
|
|
287
287
|
top: `${e.caret.y}px`,
|
|
288
288
|
lineHeight: `${e.caret.lineHeight}px`,
|
|
289
289
|
maxWidth: e.caret.maxWidth === void 0 ? void 0 : `${e.caret.maxWidth}px`
|
|
290
290
|
})
|
|
291
291
|
}, [Te(W(e.text), 1), P("span", {
|
|
292
|
-
class:
|
|
292
|
+
class: L(["folio-autocomplete-caret", { "folio-autocomplete-caret--streaming": e.isStreaming }]),
|
|
293
293
|
"aria-hidden": "true"
|
|
294
294
|
}, "stella", 2)], 4)])) : M("", !0);
|
|
295
295
|
}
|
|
@@ -349,11 +349,11 @@ var di = [
|
|
|
349
349
|
i = null, s();
|
|
350
350
|
});
|
|
351
351
|
};
|
|
352
|
-
return
|
|
352
|
+
return Ae(() => {
|
|
353
353
|
a = t.syncCoordinator.onRender(() => {
|
|
354
354
|
r.value += 1;
|
|
355
355
|
}), c();
|
|
356
|
-
}),
|
|
356
|
+
}), z(() => {
|
|
357
357
|
i !== null && (cancelAnimationFrame(i), i = null), a?.();
|
|
358
358
|
}), K(() => [
|
|
359
359
|
t.editorState,
|
|
@@ -371,13 +371,13 @@ var di = [
|
|
|
371
371
|
}
|
|
372
372
|
}), yi = Symbol("docx-portal-class");
|
|
373
373
|
function bi(e) {
|
|
374
|
-
je(yi,
|
|
374
|
+
je(yi, k(() => ({
|
|
375
375
|
"ep-root": !0,
|
|
376
376
|
dark: !!G(e)
|
|
377
377
|
})));
|
|
378
378
|
}
|
|
379
379
|
function xi() {
|
|
380
|
-
return De(yi,
|
|
380
|
+
return De(yi, k(() => ({ "ep-root": !0 })));
|
|
381
381
|
}
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -395,26 +395,26 @@ var Si = ["aria-label"], Ci = {
|
|
|
395
395
|
view: {}
|
|
396
396
|
},
|
|
397
397
|
setup(e) {
|
|
398
|
-
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = xi(), s = new
|
|
398
|
+
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = xi(), s = new At(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
|
|
399
399
|
c.value = s.getSnapshot();
|
|
400
400
|
});
|
|
401
|
-
K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }),
|
|
401
|
+
K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), z(() => {
|
|
402
402
|
l(), s.destroy();
|
|
403
403
|
});
|
|
404
|
-
let u =
|
|
404
|
+
let u = k(() => c.value.status === "closed" ? {} : {
|
|
405
405
|
insetInlineStart: `${c.value.position.x}px`,
|
|
406
406
|
top: `${c.value.position.y}px`
|
|
407
407
|
}), d = (e) => {
|
|
408
408
|
e && s.pickDate(e);
|
|
409
409
|
};
|
|
410
|
-
return (e, t) => (V(), j(
|
|
410
|
+
return (e, t) => (V(), j(O, { to: "body" }, [c.value.status === "closed" ? M("", !0) : (V(), N("div", {
|
|
411
411
|
key: 0,
|
|
412
|
-
class:
|
|
413
|
-
style:
|
|
412
|
+
class: L(["content-control-picker", G(o)]),
|
|
413
|
+
style: R(u.value),
|
|
414
414
|
role: "dialog",
|
|
415
415
|
"aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
|
|
416
416
|
onMousedown: t[1] ||= q(() => {}, ["stop"])
|
|
417
|
-
}, [c.value.status === "dropdown" ? (V(), N("div", Ci, [c.value.items.length === 0 ? (V(), N("div", wi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(
|
|
417
|
+
}, [c.value.status === "dropdown" ? (V(), N("div", Ci, [c.value.items.length === 0 ? (V(), N("div", wi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
|
|
418
418
|
key: `${e.value}::${e.displayText}`,
|
|
419
419
|
"class-name": "content-control-picker__item",
|
|
420
420
|
type: "button",
|
|
@@ -451,11 +451,11 @@ var Si = ["aria-label"], Ci = {
|
|
|
451
451
|
!e || !r || !a || t.syncCoordinator.isSafeToRender() && s(e, r, a, t.zoom);
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
Ae(() => {
|
|
455
455
|
a = t.syncCoordinator.onRender(() => {
|
|
456
456
|
r.value++;
|
|
457
457
|
}), o();
|
|
458
|
-
}),
|
|
458
|
+
}), z(() => {
|
|
459
459
|
i !== null && (cancelAnimationFrame(i), i = null), a?.();
|
|
460
460
|
}), K(() => [
|
|
461
461
|
t.zoom,
|
|
@@ -559,7 +559,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
559
559
|
},
|
|
560
560
|
emits: ["close", "navigate"],
|
|
561
561
|
setup(e, { emit: t }) {
|
|
562
|
-
let n = e, { OutlineRail: r } = h(), a =
|
|
562
|
+
let n = e, { OutlineRail: r } = h(), a = k(() => n.headings.length ? Math.min(...n.headings.map((e) => e.level)) : 0), o = k(() => n.headings.map((e) => ({
|
|
563
563
|
id: String(e.pmPos),
|
|
564
564
|
label: e.text || "(untitled)",
|
|
565
565
|
level: e.level - a.value
|
|
@@ -570,7 +570,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
570
570
|
return (t, n) => e.isOpen ? (V(), N("nav", {
|
|
571
571
|
key: 0,
|
|
572
572
|
class: "doc-outline",
|
|
573
|
-
style:
|
|
573
|
+
style: R({
|
|
574
574
|
left: e.leftOffset + "px",
|
|
575
575
|
top: e.topPx + "px"
|
|
576
576
|
}),
|
|
@@ -628,7 +628,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
628
628
|
],
|
|
629
629
|
setup(e, { emit: t }) {
|
|
630
630
|
let n = t;
|
|
631
|
-
return (t, r) => (V(), N(
|
|
631
|
+
return (t, r) => (V(), N(D, null, [
|
|
632
632
|
F(f, {
|
|
633
633
|
"is-open": e.showFindReplace,
|
|
634
634
|
view: e.view,
|
|
@@ -780,7 +780,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
780
780
|
function o() {
|
|
781
781
|
a("open-properties"), a("close");
|
|
782
782
|
}
|
|
783
|
-
let { t: s } = r(), c = xi(), l = Nt, u =
|
|
783
|
+
let { t: s } = r(), c = xi(), l = Nt, u = k(() => n.state ? Ft(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
|
|
784
784
|
inline: "wrap_text",
|
|
785
785
|
squareLeft: "format_image_left",
|
|
786
786
|
squareRight: "format_image_right",
|
|
@@ -790,7 +790,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
790
790
|
function f(e) {
|
|
791
791
|
return d[e];
|
|
792
792
|
}
|
|
793
|
-
let p =
|
|
793
|
+
let p = k(() => {
|
|
794
794
|
if (!n.state) return {};
|
|
795
795
|
let e = Nt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
796
796
|
return typeof window < "u" && (t + Xi > window.innerWidth && (t = window.innerWidth - Xi - Zi), r + e > window.innerHeight && (r = window.innerHeight - e - Zi), t < Zi && (t = Zi), r < Zi && (r = Zi)), {
|
|
@@ -816,18 +816,18 @@ var Si = ["aria-label"], Ci = {
|
|
|
816
816
|
function v(e) {
|
|
817
817
|
e.key === "Escape" && (e.preventDefault(), a("close"));
|
|
818
818
|
}
|
|
819
|
-
return (t, n) => (V(), j(
|
|
819
|
+
return (t, n) => (V(), j(O, { to: "body" }, [e.state && e.state.open ? (V(), N("div", {
|
|
820
820
|
key: 0,
|
|
821
821
|
class: "image-ctx-menu-backdrop",
|
|
822
822
|
onMousedown: _,
|
|
823
823
|
onContextmenu: n[0] ||= q((e) => t.$emit("close"), ["prevent"])
|
|
824
824
|
}, null, 32)) : M("", !0), e.state && e.state.open ? (V(), N("div", {
|
|
825
825
|
key: 1,
|
|
826
|
-
class:
|
|
826
|
+
class: L(["image-ctx-menu", G(c)]),
|
|
827
827
|
role: "menu",
|
|
828
828
|
"aria-label": G(s)("imageWrap.menu.ariaLabel"),
|
|
829
829
|
"data-testid": "image-context-menu",
|
|
830
|
-
style:
|
|
830
|
+
style: R(p.value),
|
|
831
831
|
onContextmenu: n[4] ||= q(() => {}, ["prevent"]),
|
|
832
832
|
onKeydown: v
|
|
833
833
|
}, [
|
|
@@ -844,11 +844,11 @@ var Si = ["aria-label"], Ci = {
|
|
|
844
844
|
size: Yi
|
|
845
845
|
})]), P("span", zi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
|
|
846
846
|
e.canOpenProperties ? (V(), N("div", Bi)) : M("", !0),
|
|
847
|
-
(V(!0), N(
|
|
847
|
+
(V(!0), N(D, null, U(G(l), (e) => (V(), N("button", {
|
|
848
848
|
key: e.choice,
|
|
849
849
|
type: "button",
|
|
850
850
|
role: "menuitem",
|
|
851
|
-
class:
|
|
851
|
+
class: L(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
|
|
852
852
|
"data-wrap-type": e.choice,
|
|
853
853
|
"data-current": e.choice === u.value ? "true" : "false",
|
|
854
854
|
"data-disabled": m(e) ? "false" : "true",
|
|
@@ -868,10 +868,10 @@ var Si = ["aria-label"], Ci = {
|
|
|
868
868
|
"aria-label": G(s)("imageWrap.menu.ariaLabel")
|
|
869
869
|
}, "●", 8, Wi)) : M("", !0)
|
|
870
870
|
], 42, Vi))), 128)),
|
|
871
|
-
e.textActions && e.textActions.length > 0 ? (V(), N(
|
|
871
|
+
e.textActions && e.textActions.length > 0 ? (V(), N(D, { key: 2 }, [n[5] ||= P("div", {
|
|
872
872
|
class: "image-ctx-menu__divider",
|
|
873
873
|
role: "separator"
|
|
874
|
-
}, null, -1), (V(!0), N(
|
|
874
|
+
}, null, -1), (V(!0), N(D, null, U(e.textActions, (e, t) => (V(), N(D, { key: `${e.action}-${t}` }, [P("button", {
|
|
875
875
|
type: "button",
|
|
876
876
|
role: "menuitem",
|
|
877
877
|
class: "image-ctx-menu__item image-ctx-menu__item--text",
|
|
@@ -904,7 +904,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
904
904
|
setup(e, { emit: t }) {
|
|
905
905
|
let n = e, i = ({ node: e }) => e;
|
|
906
906
|
i.props = ["node"];
|
|
907
|
-
let a = t, { t: o } = r(), s = xi(), c = H(null), l =
|
|
907
|
+
let a = t, { t: o } = r(), s = xi(), c = H(null), l = k(() => {
|
|
908
908
|
let e = [], t = n.customItems ?? [];
|
|
909
909
|
for (let [n, r] of t.entries()) e.push({
|
|
910
910
|
id: `custom-${r.id}`,
|
|
@@ -1039,7 +1039,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
1039
1039
|
label: o("table.deleteTable"),
|
|
1040
1040
|
action: "deleteTable"
|
|
1041
1041
|
}), e;
|
|
1042
|
-
}), u =
|
|
1042
|
+
}), u = k(() => {
|
|
1043
1043
|
let e = n.position.x, t = n.position.y, r = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = r * ia + i * 9;
|
|
1044
1044
|
return typeof window < "u" && (e + ra + aa > window.innerWidth && (e = window.innerWidth - ra - aa), t + a + aa > window.innerHeight && (t = window.innerHeight - a - aa)), {
|
|
1045
1045
|
position: "fixed",
|
|
@@ -1055,8 +1055,8 @@ var Si = ["aria-label"], Ci = {
|
|
|
1055
1055
|
e.key === "Escape" && a("close");
|
|
1056
1056
|
}
|
|
1057
1057
|
return K(() => n.isOpen, (e) => {
|
|
1058
|
-
e &&
|
|
1059
|
-
}), (t, n) => (V(), j(
|
|
1058
|
+
e && ke(() => c.value?.focus());
|
|
1059
|
+
}), (t, n) => (V(), j(O, { to: "body" }, [e.isOpen ? (V(), N("div", {
|
|
1060
1060
|
key: 0,
|
|
1061
1061
|
class: "ctx-menu-backdrop",
|
|
1062
1062
|
onMousedown: n[0] ||= (e) => t.$emit("close"),
|
|
@@ -1065,13 +1065,13 @@ var Si = ["aria-label"], Ci = {
|
|
|
1065
1065
|
key: 1,
|
|
1066
1066
|
ref_key: "menuRef",
|
|
1067
1067
|
ref: c,
|
|
1068
|
-
class:
|
|
1069
|
-
style:
|
|
1068
|
+
class: L(["ctx-menu", G(s)]),
|
|
1069
|
+
style: R(u.value),
|
|
1070
1070
|
onContextmenu: n[2] ||= q(() => {}, ["prevent"]),
|
|
1071
1071
|
onKeydown: f
|
|
1072
|
-
}, [(V(!0), N(
|
|
1072
|
+
}, [(V(!0), N(D, null, U(l.value, (e, t) => (V(), N("button", {
|
|
1073
1073
|
key: e.id || t,
|
|
1074
|
-
class:
|
|
1074
|
+
class: L(["ctx-menu__item", {
|
|
1075
1075
|
"ctx-menu__item--disabled": e.disabled,
|
|
1076
1076
|
"ctx-menu__item--divider": e.divider,
|
|
1077
1077
|
"ctx-menu__item--emphasis": e.emphasis
|
|
@@ -1103,7 +1103,7 @@ var Si = ["aria-label"], Ci = {
|
|
|
1103
1103
|
],
|
|
1104
1104
|
setup(e, { emit: t }) {
|
|
1105
1105
|
let n = t;
|
|
1106
|
-
return (t, r) => (V(), N(
|
|
1106
|
+
return (t, r) => (V(), N(D, null, [F(oa, {
|
|
1107
1107
|
"is-open": e.contextMenu.isOpen,
|
|
1108
1108
|
position: e.contextMenu.position,
|
|
1109
1109
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -1222,9 +1222,9 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1222
1222
|
zoom: i.zoom
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
-
let
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1225
|
+
let oe = null;
|
|
1226
|
+
function se() {
|
|
1227
|
+
oe?.();
|
|
1228
1228
|
let e = 0, t = "", n = 0, r = 0, i = (a) => {
|
|
1229
1229
|
r === 0 && (r = a);
|
|
1230
1230
|
let o = a - r;
|
|
@@ -1234,7 +1234,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1234
1234
|
};
|
|
1235
1235
|
e = requestAnimationFrame(i);
|
|
1236
1236
|
let a = setTimeout(S, ha);
|
|
1237
|
-
|
|
1237
|
+
oe = () => {
|
|
1238
1238
|
cancelAnimationFrame(e), clearTimeout(a);
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
@@ -1243,9 +1243,9 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1243
1243
|
p.value = null;
|
|
1244
1244
|
return;
|
|
1245
1245
|
}
|
|
1246
|
-
|
|
1246
|
+
se(), n(() => oe?.());
|
|
1247
1247
|
}, { immediate: !0 }), K(() => i.zoom, () => {
|
|
1248
|
-
i.imageInfo &&
|
|
1248
|
+
i.imageInfo && se();
|
|
1249
1249
|
}), K(() => i.imageInfo, (e, t, n) => {
|
|
1250
1250
|
if (!i.imageInfo) return;
|
|
1251
1251
|
let r = () => {
|
|
@@ -1253,10 +1253,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1253
1253
|
}, a = o.value?.closest(".docx-editor-vue__pages-viewport");
|
|
1254
1254
|
a?.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r, { passive: !0 });
|
|
1255
1255
|
let s = null, c = !1;
|
|
1256
|
-
|
|
1256
|
+
ke(() => {
|
|
1257
1257
|
if (c || !i.imageInfo) return;
|
|
1258
1258
|
let e = re();
|
|
1259
|
-
e && (s = new MutationObserver(() =>
|
|
1259
|
+
e && (s = new MutationObserver(() => se()), s.observe(e, {
|
|
1260
1260
|
attributes: !0,
|
|
1261
1261
|
attributeFilter: ["style"]
|
|
1262
1262
|
}));
|
|
@@ -1264,7 +1264,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1264
1264
|
c = !0, a?.removeEventListener("scroll", r), window.removeEventListener("resize", r), s?.disconnect(), b && cancelAnimationFrame(b);
|
|
1265
1265
|
});
|
|
1266
1266
|
}, { immediate: !0 });
|
|
1267
|
-
let
|
|
1267
|
+
let C = k(() => s.value ? u.value : p.value?.width || 0), ce = k(() => s.value ? d.value : p.value?.height || 0), le = k(() => {
|
|
1268
1268
|
let e = p.value;
|
|
1269
1269
|
if (!e) return {
|
|
1270
1270
|
position: "absolute",
|
|
@@ -1285,8 +1285,8 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1285
1285
|
zIndex: ae.imageOverlay,
|
|
1286
1286
|
pointerEvents: "auto"
|
|
1287
1287
|
};
|
|
1288
|
-
}),
|
|
1289
|
-
let e =
|
|
1288
|
+
}), ue = k(() => {
|
|
1289
|
+
let e = C.value, t = ce.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
|
|
1290
1290
|
return [
|
|
1291
1291
|
{
|
|
1292
1292
|
pos: "nw",
|
|
@@ -1354,10 +1354,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
];
|
|
1356
1356
|
});
|
|
1357
|
-
function
|
|
1358
|
-
!i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove",
|
|
1357
|
+
function de(e, t) {
|
|
1358
|
+
!i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", fe), document.addEventListener("mouseup", w));
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function fe(e) {
|
|
1361
1361
|
let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Ut(m, n, r, _, v, a);
|
|
1362
1362
|
u.value = Math.round(o.width), d.value = Math.round(o.height);
|
|
1363
1363
|
let s = y;
|
|
@@ -1371,70 +1371,70 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1371
1371
|
};
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
document.removeEventListener("mousemove",
|
|
1374
|
+
function w() {
|
|
1375
|
+
document.removeEventListener("mousemove", fe), document.removeEventListener("mouseup", w), s.value = !1, y = null, a("interact-end");
|
|
1376
1376
|
let e = i.view, t = i.imageInfo;
|
|
1377
1377
|
if (!e || !t) {
|
|
1378
1378
|
S();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
let n = Kt(e, t.pmPos, u.value, d.value);
|
|
1382
|
-
n !== null && Ce(n),
|
|
1382
|
+
n !== null && Ce(n), ke(() => S());
|
|
1383
1383
|
}
|
|
1384
|
-
let
|
|
1385
|
-
function
|
|
1384
|
+
let pe = 0, me = 0, he = 0, ge = 0, T = null, E = null;
|
|
1385
|
+
function _e(e) {
|
|
1386
1386
|
if (!e) return 0;
|
|
1387
1387
|
let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
|
|
1388
1388
|
return t ? parseFloat(t) : 0;
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function ve(e, t) {
|
|
1391
1391
|
let n = /scaleX\(-1\)/.test(e || ""), r = /scaleY\(-1\)/.test(e || ""), i = [], a = (t % 360 + 360) % 360;
|
|
1392
1392
|
return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1395
|
-
return Math.atan2(e -
|
|
1394
|
+
function ye(e, t) {
|
|
1395
|
+
return Math.atan2(e - pe, -(t - me)) * 180 / Math.PI;
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function be(e) {
|
|
1398
1398
|
if (!i.imageInfo) return;
|
|
1399
1399
|
let t = i.imageInfo.element.getBoundingClientRect();
|
|
1400
|
-
|
|
1400
|
+
pe = t.left + t.width / 2, me = t.top + t.height / 2, T = ne(te(i.view, i.imageInfo.pmPos)), ge = _e(T), E = i.imageInfo.element.querySelector("img"), he = ye(e.clientX, e.clientY), f.value = ge, l.value = !0, a("interact-start"), document.addEventListener("mousemove", xe), document.addEventListener("mouseup", Se);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
let t =
|
|
1404
|
-
e.shiftKey || (n = Math.round(n / ma) * ma), f.value = (n % 360 + 360) % 360,
|
|
1402
|
+
function xe(e) {
|
|
1403
|
+
let t = ye(e.clientX, e.clientY) - he, n = ge + t;
|
|
1404
|
+
e.shiftKey || (n = Math.round(n / ma) * ma), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
document.removeEventListener("mousemove",
|
|
1406
|
+
function Se() {
|
|
1407
|
+
document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Se), l.value = !1, a("interact-end");
|
|
1408
1408
|
let e = i.view, t = i.imageInfo;
|
|
1409
1409
|
try {
|
|
1410
1410
|
let n = e && t ? te(e, t.pmPos) : null;
|
|
1411
1411
|
e && t && n && (e.dispatch(e.state.tr.setNodeMarkup(t.pmPos, void 0, {
|
|
1412
1412
|
...n.attrs,
|
|
1413
|
-
transform:
|
|
1413
|
+
transform: ve(ne(n), f.value)
|
|
1414
1414
|
})), Ce(t.pmPos));
|
|
1415
1415
|
} catch {} finally {
|
|
1416
|
-
|
|
1416
|
+
E && (E.style.transform = ""), E = null, T = null;
|
|
1417
1417
|
}
|
|
1418
|
-
|
|
1418
|
+
ke(() => S());
|
|
1419
1419
|
}
|
|
1420
|
-
let
|
|
1421
|
-
function
|
|
1420
|
+
let O = null;
|
|
1421
|
+
function A(e) {
|
|
1422
1422
|
if (!i.imageInfo || !p.value) return;
|
|
1423
1423
|
let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
|
|
1424
1424
|
let s = e.clientX - t, l = e.clientY - n;
|
|
1425
1425
|
if (!(!o && Math.sqrt(s * s + l * l) < pa)) {
|
|
1426
1426
|
if (!o) {
|
|
1427
|
-
o = !0, c.value = !0, a("interact-start"),
|
|
1427
|
+
o = !0, c.value = !0, a("interact-start"), O = document.createElement("div"), O.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
|
|
1428
1428
|
let e = i.zoom;
|
|
1429
|
-
|
|
1429
|
+
O.style.width = `${r.width * e}px`, O.style.height = `${r.height * e}px`, document.body.appendChild(O);
|
|
1430
1430
|
}
|
|
1431
|
-
if (
|
|
1431
|
+
if (O) {
|
|
1432
1432
|
let t = i.zoom;
|
|
1433
|
-
|
|
1433
|
+
O.style.left = `${e.clientX - r.width * t / 2}px`, O.style.top = `${e.clientY - r.height * t / 2}px`;
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
}, l = (e) => {
|
|
1437
|
-
document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), x = null, ee = null,
|
|
1437
|
+
document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), x = null, ee = null, O &&= (O.remove(), null), c.value = !1, o && (a("interact-end"), j(e.clientX, e.clientY));
|
|
1438
1438
|
};
|
|
1439
1439
|
x = s, ee = l, document.addEventListener("mousemove", s), document.addEventListener("mouseup", l);
|
|
1440
1440
|
}
|
|
@@ -1469,45 +1469,45 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1469
1469
|
if (a == null || a < 0) return;
|
|
1470
1470
|
s = Gt(n, r.pmPos, a);
|
|
1471
1471
|
}
|
|
1472
|
-
s !== null && Ce(s),
|
|
1472
|
+
s !== null && Ce(s), ke(() => S());
|
|
1473
1473
|
}
|
|
1474
1474
|
function Ce(e) {
|
|
1475
1475
|
let t = i.view;
|
|
1476
1476
|
if (t) try {
|
|
1477
|
-
let n =
|
|
1477
|
+
let n = X.create(t.state.doc, e);
|
|
1478
1478
|
t.dispatch(t.state.tr.setSelection(n));
|
|
1479
1479
|
} catch {}
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1482
|
-
document.removeEventListener("mousemove",
|
|
1481
|
+
return z(() => {
|
|
1482
|
+
document.removeEventListener("mousemove", fe), document.removeEventListener("mouseup", w), document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Se), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), O &&= (O.remove(), null), b && cancelAnimationFrame(b), oe?.();
|
|
1483
1483
|
}), (t, r) => e.imageInfo ? (V(), N("div", {
|
|
1484
1484
|
key: 0,
|
|
1485
1485
|
ref_key: "overlayRootRef",
|
|
1486
1486
|
ref: o,
|
|
1487
1487
|
class: "image-overlay",
|
|
1488
|
-
style:
|
|
1488
|
+
style: R(le.value),
|
|
1489
1489
|
onMousedown: r[3] ||= q(() => {}, ["stop"])
|
|
1490
1490
|
}, [
|
|
1491
1491
|
r[4] ||= P("div", { class: "image-overlay__border" }, null, -1),
|
|
1492
1492
|
P("div", {
|
|
1493
1493
|
class: "image-overlay__body",
|
|
1494
|
-
style:
|
|
1495
|
-
onMousedown: r[0] ||= q((e) =>
|
|
1494
|
+
style: R({ cursor: c.value ? "grabbing" : "grab" }),
|
|
1495
|
+
onMousedown: r[0] ||= q((e) => A(e), ["prevent", "stop"]),
|
|
1496
1496
|
onContextmenu: r[1] ||= q((e) => t.$emit("context-menu", e), ["prevent", "stop"])
|
|
1497
1497
|
}, null, 36),
|
|
1498
|
-
(V(!0), N(
|
|
1498
|
+
(V(!0), N(D, null, U(ue.value, (e) => (V(), N("div", {
|
|
1499
1499
|
key: e.pos,
|
|
1500
1500
|
class: "image-overlay__handle",
|
|
1501
|
-
style:
|
|
1501
|
+
style: R(e.style),
|
|
1502
1502
|
"data-handle": e.pos,
|
|
1503
|
-
onMousedown: q((t) =>
|
|
1503
|
+
onMousedown: q((t) => de(t, e.pos), ["prevent", "stop"])
|
|
1504
1504
|
}, null, 44, la))), 128)),
|
|
1505
1505
|
r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
|
|
1506
1506
|
P("div", {
|
|
1507
1507
|
class: "image-overlay__rotate-handle",
|
|
1508
|
-
style:
|
|
1508
|
+
style: R({ left: `${C.value / 2 - 7}px` }),
|
|
1509
1509
|
title: G(n)("imageOverlay.rotate"),
|
|
1510
|
-
onMousedown: r[2] ||= q((e) =>
|
|
1510
|
+
onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
|
|
1511
1511
|
}, null, 44, ua),
|
|
1512
1512
|
s.value ? (V(), N("div", da, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
|
|
1513
1513
|
l.value ? (V(), N("div", fa, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
|
|
@@ -1559,7 +1559,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1559
1559
|
i = null, r();
|
|
1560
1560
|
});
|
|
1561
1561
|
}, o = typeof window > "u" ? null : window;
|
|
1562
|
-
return o?.addEventListener("scroll", a, !0),
|
|
1562
|
+
return o?.addEventListener("scroll", a, !0), B(() => {
|
|
1563
1563
|
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Xt(t.hiddenContainer);
|
|
1564
1564
|
}), (e, t) => null;
|
|
1565
1565
|
}
|
|
@@ -1571,7 +1571,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1571
1571
|
},
|
|
1572
1572
|
emits: ["close", "remove"],
|
|
1573
1573
|
setup(e, { emit: t }) {
|
|
1574
|
-
let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = H(!1), c =
|
|
1574
|
+
let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = H(!1), c = k(() => n.edit.position === "header" ? o("headerFooter.header") : o("headerFooter.footer")), l = k(() => ({
|
|
1575
1575
|
position: "absolute",
|
|
1576
1576
|
top: `${n.edit.targetRect?.top ?? 0}px`,
|
|
1577
1577
|
left: `${n.edit.targetRect?.left ?? 0}px`,
|
|
@@ -1593,20 +1593,20 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1593
1593
|
}, d = (e) => {
|
|
1594
1594
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), i("close"));
|
|
1595
1595
|
}, f = null;
|
|
1596
|
-
return
|
|
1596
|
+
return Ae(() => {
|
|
1597
1597
|
document.addEventListener("keydown", d, !0);
|
|
1598
1598
|
let e = 0, t = () => {
|
|
1599
1599
|
let r = n.getView();
|
|
1600
1600
|
r && !r.hasFocus() && r.focus(), e++, e < 30 && (f = requestAnimationFrame(t));
|
|
1601
1601
|
};
|
|
1602
1602
|
f = requestAnimationFrame(t);
|
|
1603
|
-
}),
|
|
1603
|
+
}), z(() => {
|
|
1604
1604
|
document.removeEventListener("keydown", d, !0), f !== null && cancelAnimationFrame(f);
|
|
1605
1605
|
}), (t, n) => (V(), N("div", {
|
|
1606
1606
|
class: "hf-inline-editor",
|
|
1607
|
-
style:
|
|
1607
|
+
style: R(l.value),
|
|
1608
1608
|
role: "presentation"
|
|
1609
|
-
}, [P("div", { class:
|
|
1609
|
+
}, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", ya, W(c.value), 1), P("div", {
|
|
1610
1610
|
class: "hf-options",
|
|
1611
1611
|
onMousedown: n[5] ||= q(() => {}, ["stop"])
|
|
1612
1612
|
}, [F(G(a), {
|
|
@@ -1619,7 +1619,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1619
1619
|
_: 1
|
|
1620
1620
|
}), s.value ? (V(), N("div", {
|
|
1621
1621
|
key: 0,
|
|
1622
|
-
class:
|
|
1622
|
+
class: L(["hf-options-dropdown", { "hf-options-dropdown--up": e.edit.position === "footer" }])
|
|
1623
1623
|
}, [
|
|
1624
1624
|
F(G(a), {
|
|
1625
1625
|
variant: "ghost",
|
|
@@ -1668,7 +1668,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1668
1668
|
return (n, r) => (V(), N("button", {
|
|
1669
1669
|
type: "button",
|
|
1670
1670
|
class: "docx-outline-toggle docx-editor-vue__outline-toggle",
|
|
1671
|
-
style:
|
|
1671
|
+
style: R({
|
|
1672
1672
|
left: e.leftOffset + "px",
|
|
1673
1673
|
top: e.topPx + "px"
|
|
1674
1674
|
}),
|
|
@@ -1692,7 +1692,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1692
1692
|
let { t } = r();
|
|
1693
1693
|
return (n, r) => (V(), N("div", {
|
|
1694
1694
|
class: "docx-editor-vue__page-indicator",
|
|
1695
|
-
style:
|
|
1695
|
+
style: R({ opacity: +!!e.visible }),
|
|
1696
1696
|
"aria-live": "polite",
|
|
1697
1697
|
role: "status"
|
|
1698
1698
|
}, W(G(t)("viewer.pageIndicator", {
|
|
@@ -1824,15 +1824,15 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1824
1824
|
t.blocks,
|
|
1825
1825
|
t.measures
|
|
1826
1826
|
], () => y());
|
|
1827
|
-
let x =
|
|
1827
|
+
let x = k(() => c(f.value)), ee = k(() => m.value ? d(x.value, p.value, m.value) : []), te = k(() => {
|
|
1828
1828
|
let e = /* @__PURE__ */ new Map();
|
|
1829
1829
|
for (let t of x.value) e.set(t.openerFrom, t.blockId), e.set(t.closerFrom, t.blockId);
|
|
1830
1830
|
return e;
|
|
1831
|
-
}), ne =
|
|
1831
|
+
}), ne = k(() => {
|
|
1832
1832
|
let e = /* @__PURE__ */ new Map();
|
|
1833
1833
|
for (let t of x.value) e.set(t.closerFrom, l(t.kind, t.openerExpr));
|
|
1834
1834
|
return e;
|
|
1835
|
-
}), re =
|
|
1835
|
+
}), re = k(() => u(x.value, h.value));
|
|
1836
1836
|
function ie(e) {
|
|
1837
1837
|
return e === g.value || e === re.value;
|
|
1838
1838
|
}
|
|
@@ -1842,10 +1842,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1842
1842
|
function S(e) {
|
|
1843
1843
|
return e.block ? te.value.get(e.from) : void 0;
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function oe(e) {
|
|
1846
1846
|
return e.block ? ne.value.get(e.from) : void 0;
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function se(e) {
|
|
1849
1849
|
let t = S(e), n = t !== void 0 && ie(t);
|
|
1850
1850
|
return [
|
|
1851
1851
|
"folio-template-directive",
|
|
@@ -1854,49 +1854,49 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1854
1854
|
{ "folio-template-directive--active": n }
|
|
1855
1855
|
];
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function C(e) {
|
|
1858
1858
|
if (!(e instanceof HTMLElement)) return null;
|
|
1859
1859
|
let t = e.dataset.folioBlockId;
|
|
1860
1860
|
return t === void 0 ? null : Number(t);
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
let t =
|
|
1862
|
+
function ce(e) {
|
|
1863
|
+
let t = C(e.target);
|
|
1864
1864
|
t !== null && (g.value = t);
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
let t =
|
|
1866
|
+
function le(e) {
|
|
1867
|
+
let t = C(e.target);
|
|
1868
1868
|
if (t === null) return;
|
|
1869
|
-
let n =
|
|
1869
|
+
let n = C(e.relatedTarget);
|
|
1870
1870
|
n !== t && g.value === t && (g.value = n);
|
|
1871
1871
|
}
|
|
1872
|
-
return
|
|
1872
|
+
return Ae(() => y()), z(() => {
|
|
1873
1873
|
_.invalidate(), v !== null && (cancelAnimationFrame(v), v = null);
|
|
1874
1874
|
}), (t, n) => (V(), N("div", {
|
|
1875
1875
|
class: "folio-template-directives-overlay",
|
|
1876
1876
|
"data-folio-template-directives-overlay": "",
|
|
1877
|
-
onPointerover:
|
|
1878
|
-
onPointerout:
|
|
1879
|
-
}, [(V(!0), N(
|
|
1877
|
+
onPointerover: ce,
|
|
1878
|
+
onPointerout: le
|
|
1879
|
+
}, [(V(!0), N(D, null, U(ee.value, (t) => (V(), N(D, { key: `rail:${t.blockId}` }, [(V(!0), N(D, null, U(t.segments, (n, r) => (V(), N("div", {
|
|
1880
1880
|
key: `rail:${t.blockId}:${r}`,
|
|
1881
|
-
class:
|
|
1881
|
+
class: L([
|
|
1882
1882
|
"folio-template-band-rail",
|
|
1883
1883
|
`folio-template-band-rail--${t.kind}`,
|
|
1884
1884
|
{ "folio-template-band-rail--active": ie(t.blockId) }
|
|
1885
1885
|
]),
|
|
1886
1886
|
"data-folio-block-id": t.blockId,
|
|
1887
|
-
style:
|
|
1887
|
+
style: R({
|
|
1888
1888
|
position: "absolute",
|
|
1889
1889
|
left: `${t.railX * e.zoom}px`,
|
|
1890
1890
|
top: `${n.top * e.zoom}px`,
|
|
1891
1891
|
width: `${Ea * e.zoom}px`,
|
|
1892
1892
|
height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
|
|
1893
1893
|
})
|
|
1894
|
-
}, null, 14, wa))), 128))], 64))), 128)), (V(!0), N(
|
|
1894
|
+
}, null, 14, wa))), 128))], 64))), 128)), (V(!0), N(D, null, U(p.value, (t, n) => (V(), N(D, { key: `d:${n}` }, [(V(!0), N(D, null, U(t.rects, (r, i) => (V(), N("span", {
|
|
1895
1895
|
key: `d:${n}:${i}`,
|
|
1896
|
-
class:
|
|
1896
|
+
class: L(se(t.range)),
|
|
1897
1897
|
"data-folio-block-id": S(t.range),
|
|
1898
|
-
title:
|
|
1899
|
-
style:
|
|
1898
|
+
title: oe(t.range),
|
|
1899
|
+
style: R({
|
|
1900
1900
|
position: "absolute",
|
|
1901
1901
|
left: `${(r.x - 1) * e.zoom}px`,
|
|
1902
1902
|
top: `${(r.y + 1) * e.zoom}px`,
|
|
@@ -1919,7 +1919,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1919
1919
|
"close"
|
|
1920
1920
|
],
|
|
1921
1921
|
setup(e, { emit: t }) {
|
|
1922
|
-
let { t: n } = r(), i = e, a = t, o = H(!1), s = H(""), c = H(""), l = H(null), u =
|
|
1922
|
+
let { t: n } = r(), i = e, a = t, o = H(!1), s = H(""), c = H(""), l = H(null), u = k(() => ({
|
|
1923
1923
|
left: (i.data?.position.left ?? 0) + "px",
|
|
1924
1924
|
top: (i.data?.position.top ?? 0) + "px"
|
|
1925
1925
|
}));
|
|
@@ -1937,7 +1937,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1937
1937
|
}, f = setTimeout(() => {
|
|
1938
1938
|
d && document.addEventListener("mousedown", d);
|
|
1939
1939
|
}, 0));
|
|
1940
|
-
}, { immediate: !0 }),
|
|
1940
|
+
}, { immediate: !0 }), z(p);
|
|
1941
1941
|
function m() {
|
|
1942
1942
|
i.data && (s.value = i.data.displayText, c.value = i.data.href, o.value = !0);
|
|
1943
1943
|
}
|
|
@@ -1951,10 +1951,10 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1951
1951
|
key: 0,
|
|
1952
1952
|
ref_key: "popupRef",
|
|
1953
1953
|
ref: l,
|
|
1954
|
-
class:
|
|
1955
|
-
style:
|
|
1954
|
+
class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
|
|
1955
|
+
style: R(u.value),
|
|
1956
1956
|
onMousedown: r[6] ||= q(() => {}, ["stop"])
|
|
1957
|
-
}, [o.value ? (V(), N(
|
|
1957
|
+
}, [o.value ? (V(), N(D, { key: 1 }, [P("div", Ia, [Le(P("input", {
|
|
1958
1958
|
class: "docx-hyperlink-popup__input",
|
|
1959
1959
|
placeholder: G(n)("displayText"),
|
|
1960
1960
|
"onUpdate:modelValue": r[2] ||= (e) => s.value = e,
|
|
@@ -1968,7 +1968,7 @@ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
|
|
|
1968
1968
|
class: "docx-hyperlink-popup__apply",
|
|
1969
1969
|
disabled: !c.value.trim(),
|
|
1970
1970
|
onClick: q(h, ["prevent"])
|
|
1971
|
-
}, W(G(n)("common.apply")), 9, Ba)])], 64)) : (V(), N(
|
|
1971
|
+
}, W(G(n)("common.apply")), 9, Ba)])], 64)) : (V(), N(D, { key: 0 }, [
|
|
1972
1972
|
r[10] ||= we("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-366df18c><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-366df18c><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-366df18c></circle><path d=\"M2 12h20\" data-v-366df18c></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-366df18c></path></svg></span>", 1),
|
|
1973
1973
|
P("a", {
|
|
1974
1974
|
class: "docx-hyperlink-popup__url",
|
|
@@ -2150,7 +2150,7 @@ function Ya(e) {
|
|
|
2150
2150
|
function a() {
|
|
2151
2151
|
r.value = !1;
|
|
2152
2152
|
}
|
|
2153
|
-
let o =
|
|
2153
|
+
let o = k(() => e.commentsProp() !== void 0), s = k(() => o.value ? e.commentsProp() ?? [] : n.value);
|
|
2154
2154
|
function c(t) {
|
|
2155
2155
|
o.value || (n.value = t), e.onCommentsChange(t);
|
|
2156
2156
|
}
|
|
@@ -2206,7 +2206,7 @@ function Ya(e) {
|
|
|
2206
2206
|
}
|
|
2207
2207
|
return {
|
|
2208
2208
|
comments: s,
|
|
2209
|
-
commentsDirty:
|
|
2209
|
+
commentsDirty: k(() => r.value),
|
|
2210
2210
|
clearCommentsDirty: a,
|
|
2211
2211
|
createComment: u,
|
|
2212
2212
|
pushComment: l,
|
|
@@ -2226,7 +2226,7 @@ function Ya(e) {
|
|
|
2226
2226
|
//#endregion
|
|
2227
2227
|
//#region src/utils/imageClipboard.ts
|
|
2228
2228
|
function Xa(e, t, n) {
|
|
2229
|
-
let r =
|
|
2229
|
+
let r = Q(e.state), i = e.state.schema.marks.insertion;
|
|
2230
2230
|
if (!r || !i) return;
|
|
2231
2231
|
let a = t.selection.from, o = a - n.nodeSize;
|
|
2232
2232
|
o < 0 || t.addMark(o, a, i.create({
|
|
@@ -2372,7 +2372,7 @@ function so(e) {
|
|
|
2372
2372
|
}), i = H(null), a = H({
|
|
2373
2373
|
from: 0,
|
|
2374
2374
|
to: 0
|
|
2375
|
-
}), o =
|
|
2375
|
+
}), o = k(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), s = k(() => [
|
|
2376
2376
|
{
|
|
2377
2377
|
action: "cut",
|
|
2378
2378
|
label: t("contextMenu.cut"),
|
|
@@ -2417,7 +2417,7 @@ function so(e) {
|
|
|
2417
2417
|
let a = Number(o.dataset.pmStart);
|
|
2418
2418
|
if (!Number.isNaN(a)) {
|
|
2419
2419
|
try {
|
|
2420
|
-
let e =
|
|
2420
|
+
let e = X.create(r.state.doc, a);
|
|
2421
2421
|
r.dispatch(r.state.tr.setSelection(e));
|
|
2422
2422
|
} catch {}
|
|
2423
2423
|
e.selectedImage.value = {
|
|
@@ -2569,8 +2569,8 @@ function co(e) {
|
|
|
2569
2569
|
e && t(e);
|
|
2570
2570
|
}), K(e.document, (e) => {
|
|
2571
2571
|
e && n(e);
|
|
2572
|
-
}),
|
|
2573
|
-
await
|
|
2572
|
+
}), Ae(async () => {
|
|
2573
|
+
await ke();
|
|
2574
2574
|
let r = e.documentBuffer(), i = e.document();
|
|
2575
2575
|
r ? await t(r) : i && n(i);
|
|
2576
2576
|
});
|
|
@@ -2672,7 +2672,7 @@ function fo(e) {
|
|
|
2672
2672
|
getPageNumberForPmPos: (t) => {
|
|
2673
2673
|
let n = e.layout.value;
|
|
2674
2674
|
if (!n) return null;
|
|
2675
|
-
let r =
|
|
2675
|
+
let r = xn(n, t);
|
|
2676
2676
|
return r == null ? null : r + 1;
|
|
2677
2677
|
},
|
|
2678
2678
|
getBlockRect: p,
|
|
@@ -2687,7 +2687,7 @@ function fo(e) {
|
|
|
2687
2687
|
function _() {
|
|
2688
2688
|
let t = e.layout.value, n = e.editorView.value;
|
|
2689
2689
|
if (!t || !n) return 0;
|
|
2690
|
-
let r =
|
|
2690
|
+
let r = xn(t, n.state.selection.from);
|
|
2691
2691
|
return r == null ? 0 : r + 1;
|
|
2692
2692
|
}
|
|
2693
2693
|
function v(t) {
|
|
@@ -2901,7 +2901,7 @@ function fo(e) {
|
|
|
2901
2901
|
},
|
|
2902
2902
|
rejectSuggestion: (t) => {
|
|
2903
2903
|
let n = e.editorView.value;
|
|
2904
|
-
return n ?
|
|
2904
|
+
return n ? bn(t)(n.state, n.dispatch) : !1;
|
|
2905
2905
|
},
|
|
2906
2906
|
scrollToSuggestion: (t) => {
|
|
2907
2907
|
let n = e.editorView.value;
|
|
@@ -2940,7 +2940,7 @@ function fo(e) {
|
|
|
2940
2940
|
snapshot: n
|
|
2941
2941
|
});
|
|
2942
2942
|
if (a === null) return null;
|
|
2943
|
-
let o =
|
|
2943
|
+
let o = xn(i, a.from);
|
|
2944
2944
|
return o == null ? null : o + 1;
|
|
2945
2945
|
},
|
|
2946
2946
|
getBlockRect: p,
|
|
@@ -3188,7 +3188,7 @@ function To(e) {
|
|
|
3188
3188
|
//#endregion
|
|
3189
3189
|
//#region src/composables/useImageActions.ts
|
|
3190
3190
|
function Eo(e) {
|
|
3191
|
-
let t = Ne(null), n = H(!1), r =
|
|
3191
|
+
let t = Ne(null), n = H(!1), r = k(() => {
|
|
3192
3192
|
e.stateTick.value;
|
|
3193
3193
|
let n = e.editorView.value, r = t.value;
|
|
3194
3194
|
if (!n || !r) return null;
|
|
@@ -3251,7 +3251,7 @@ function Do(e) {
|
|
|
3251
3251
|
e.disableFindReplaceShortcuts?.() && (t.key === "f" || t.key === "h") || (t.key === "f" || t.key === "h" ? (t.preventDefault(), e.showFindReplace.value = !0) : t.key === "k" && (t.preventDefault(), e.showHyperlink.value = !0));
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
|
-
return
|
|
3254
|
+
return Ae(() => window.addEventListener("keydown", t)), z(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
|
|
3255
3255
|
}
|
|
3256
3256
|
//#endregion
|
|
3257
3257
|
//#region src/composables/useOutlineSidebar.ts
|
|
@@ -3441,7 +3441,7 @@ var Bo = 500, Vo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentCh
|
|
|
3441
3441
|
position: s.position,
|
|
3442
3442
|
isFirstPage: s.isFirstPage,
|
|
3443
3443
|
activeRId: s.rId,
|
|
3444
|
-
blocks:
|
|
3444
|
+
blocks: $(l.state.doc, u.content)
|
|
3445
3445
|
});
|
|
3446
3446
|
e.value = null, d && (a(d), o(), i(), r(d));
|
|
3447
3447
|
};
|
|
@@ -3651,7 +3651,7 @@ function Ho(e) {
|
|
|
3651
3651
|
});
|
|
3652
3652
|
i.value = null, e.setDocument(r), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(r);
|
|
3653
3653
|
}
|
|
3654
|
-
function
|
|
3654
|
+
function oe(t) {
|
|
3655
3655
|
if (t.button !== 0) {
|
|
3656
3656
|
(t.target instanceof HTMLElement ? t.target : null)?.closest("a[href]") && t.preventDefault();
|
|
3657
3657
|
return;
|
|
@@ -3686,7 +3686,7 @@ function Ho(e) {
|
|
|
3686
3686
|
let n = Number(p.dataset.pmStart);
|
|
3687
3687
|
if (!Number.isNaN(n)) {
|
|
3688
3688
|
try {
|
|
3689
|
-
f.dispatch(f.state.tr.setSelection(
|
|
3689
|
+
f.dispatch(f.state.tr.setSelection(X.create(f.state.doc, n)));
|
|
3690
3690
|
} catch {}
|
|
3691
3691
|
e.selectedImage.value = {
|
|
3692
3692
|
element: p,
|
|
@@ -3713,7 +3713,7 @@ function Ho(e) {
|
|
|
3713
3713
|
} else _(m), l = m, c = !0, u.begin(Fr(f, m));
|
|
3714
3714
|
f.focus();
|
|
3715
3715
|
}
|
|
3716
|
-
function
|
|
3716
|
+
function se(e) {
|
|
3717
3717
|
if (!c || l === null) return;
|
|
3718
3718
|
let t = g(e.clientX, e.clientY);
|
|
3719
3719
|
if (t !== null) {
|
|
@@ -3726,10 +3726,10 @@ function Ho(e) {
|
|
|
3726
3726
|
}
|
|
3727
3727
|
d.updateMousePosition(e.clientX, e.clientY);
|
|
3728
3728
|
}
|
|
3729
|
-
function
|
|
3729
|
+
function C() {
|
|
3730
3730
|
c = !1, u.end(), d.stopAutoScroll();
|
|
3731
3731
|
}
|
|
3732
|
-
function
|
|
3732
|
+
function ce() {
|
|
3733
3733
|
let t = e.pagesViewportRef.value, n = e.layout.value;
|
|
3734
3734
|
if (!t || !n || n.pages.length === 0) return;
|
|
3735
3735
|
let r = t.scrollTop, i = n.pages.length, a = r + t.clientHeight / 2, o = 24, s = 1;
|
|
@@ -3754,10 +3754,10 @@ function Ho(e) {
|
|
|
3754
3754
|
};
|
|
3755
3755
|
}, 600);
|
|
3756
3756
|
}
|
|
3757
|
-
return
|
|
3758
|
-
window.addEventListener("mousemove",
|
|
3759
|
-
}),
|
|
3760
|
-
r(), window.removeEventListener("mousemove",
|
|
3757
|
+
return Ae(() => {
|
|
3758
|
+
window.addEventListener("mousemove", se), window.addEventListener("mouseup", C), e.pagesViewportRef.value?.addEventListener("scroll", ce, { passive: !0 });
|
|
3759
|
+
}), z(() => {
|
|
3760
|
+
r(), window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", C), e.pagesViewportRef.value?.removeEventListener("scroll", ce), p && clearTimeout(p);
|
|
3761
3761
|
}), {
|
|
3762
3762
|
tableInsertButton: t,
|
|
3763
3763
|
hfEdit: i,
|
|
@@ -3766,7 +3766,7 @@ function Ho(e) {
|
|
|
3766
3766
|
setPmSelection: _,
|
|
3767
3767
|
scrollVisiblePositionIntoView: v,
|
|
3768
3768
|
navigateToBookmark: x,
|
|
3769
|
-
handlePagesMouseDown:
|
|
3769
|
+
handlePagesMouseDown: oe,
|
|
3770
3770
|
handlePagesMouseMove: ee,
|
|
3771
3771
|
handlePagesClick: ne,
|
|
3772
3772
|
handlePagesDoubleClick: re,
|
|
@@ -3799,7 +3799,7 @@ var Uo = (e) => {
|
|
|
3799
3799
|
e.pagesRef,
|
|
3800
3800
|
e.remoteSelections,
|
|
3801
3801
|
e.zoom
|
|
3802
|
-
], i, { flush: "post" }),
|
|
3802
|
+
], i, { flush: "post" }), B(() => {
|
|
3803
3803
|
a(), r();
|
|
3804
3804
|
});
|
|
3805
3805
|
}, Wo = (e) => {
|
|
@@ -3848,7 +3848,7 @@ var Uo = (e) => {
|
|
|
3848
3848
|
}));
|
|
3849
3849
|
}, { immediate: !0 });
|
|
3850
3850
|
let o = typeof window > "u" ? null : window;
|
|
3851
|
-
return o?.addEventListener("scroll", i, !0),
|
|
3851
|
+
return o?.addEventListener("scroll", i, !0), B(() => {
|
|
3852
3852
|
a(), r(), o?.removeEventListener("scroll", i, !0), Xt(e.hiddenContainer.value);
|
|
3853
3853
|
}), {
|
|
3854
3854
|
clearOverlay: r,
|
|
@@ -3889,6 +3889,7 @@ var Uo = (e) => {
|
|
|
3889
3889
|
document: { default: null },
|
|
3890
3890
|
onSave: {},
|
|
3891
3891
|
author: { default: "User" },
|
|
3892
|
+
plugins: {},
|
|
3892
3893
|
onChange: {},
|
|
3893
3894
|
onSelectionChange: {},
|
|
3894
3895
|
onSelectionTextChange: {},
|
|
@@ -4004,58 +4005,58 @@ var Uo = (e) => {
|
|
|
4004
4005
|
"comments-change"
|
|
4005
4006
|
],
|
|
4006
4007
|
setup(e, { expose: t, emit: n }) {
|
|
4007
|
-
let o = e, s = n;
|
|
4008
|
+
let o = e, s = o.plugins ?? [], c = n;
|
|
4008
4009
|
a(o.components);
|
|
4009
|
-
let
|
|
4010
|
-
bi(
|
|
4011
|
-
function
|
|
4012
|
-
o.onChange?.(e),
|
|
4010
|
+
let l = fe();
|
|
4011
|
+
bi(l);
|
|
4012
|
+
function u(e) {
|
|
4013
|
+
o.onChange?.(e), c("change", e), c("update:document", e);
|
|
4013
4014
|
}
|
|
4014
|
-
let
|
|
4015
|
-
function
|
|
4016
|
-
|
|
4015
|
+
let d = H(o.mode), f = k(() => o.readOnly || d.value === "viewing"), p = k(() => o.showReviewControls), m = k(() => zt(d.value)), h = H("all-markup");
|
|
4016
|
+
function _() {
|
|
4017
|
+
Jn(Bt(d.value));
|
|
4017
4018
|
}
|
|
4018
|
-
function
|
|
4019
|
-
|
|
4019
|
+
function x(e) {
|
|
4020
|
+
h.value = e;
|
|
4020
4021
|
}
|
|
4021
|
-
let
|
|
4022
|
-
|
|
4023
|
-
let
|
|
4024
|
-
K(
|
|
4025
|
-
e || (
|
|
4022
|
+
let ee = k(() => h.value === "all-markup" ? "" : `folio-root--${h.value}`), { t: te } = r(), re = ({ node: e }) => e;
|
|
4023
|
+
re.props = ["node"];
|
|
4024
|
+
let ae = k(() => o.documentBuffer != null || o.document != null), S = H(!1);
|
|
4025
|
+
K(ae, (e) => {
|
|
4026
|
+
e || (S.value = !1);
|
|
4026
4027
|
});
|
|
4027
|
-
let
|
|
4028
|
-
function
|
|
4029
|
-
o.enableWheelZoom !== !1 &&
|
|
4028
|
+
let oe = H(null), C = H(null), ue = H(null), w = H(null), pe = H(null), me = H(null), he = H(null), ge = k(() => o.showRuler ?? !1), T = H(0), E = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(!1), Se = H(!1), O = H(o.showOutline), A = H(!1), we = H(null), I = H(null), Ee = H(null), De = Ne([]), ke = Ne([]), { zoom: B, zoomPercent: je, isMinZoom: U, isMaxZoom: Pe, setZoom: ze, zoomIn: Ve, zoomOut: He, handleWheel: We, handleKeyDown: Ke, ZOOM_PRESETS: Je } = de(o.initialZoom);
|
|
4029
|
+
function Xe(e) {
|
|
4030
|
+
o.enableWheelZoom !== !1 && We(e);
|
|
4030
4031
|
}
|
|
4031
4032
|
Do({
|
|
4032
|
-
showFindReplace:
|
|
4033
|
-
showHyperlink:
|
|
4034
|
-
handleZoomKeyDown:
|
|
4033
|
+
showFindReplace: E,
|
|
4034
|
+
showHyperlink: _e,
|
|
4035
|
+
handleZoomKeyDown: Ke,
|
|
4035
4036
|
scope: () => o.keyboardShortcuts ?? "document",
|
|
4036
|
-
roots: [
|
|
4037
|
+
roots: [oe]
|
|
4037
4038
|
});
|
|
4038
|
-
let { editor:
|
|
4039
|
+
let { editor: ot, editorView: J, editorState: lt, remoteSelections: ut, headerFooterSelection: dt, activeNoteStory: ft, isReady: pt, isDirty: mt, parseError: ht, layout: gt, blocks: _t, measures: vt, syncCoordinator: yt, loadBuffer: bt, loadDocument: xt, save: St, getDocument: Y, setDocument: Ct, getHeaderFooterView: wt, syncHeaderFooterViews: Tt, openNoteStory: Et, closeNoteStory: Dt, getActiveNoteView: Ot, getCommands: kt, reLayout: At } = ce({
|
|
4039
4040
|
hiddenContainer: C,
|
|
4040
|
-
hiddenHeaderFooterContainer:
|
|
4041
|
-
noteEditorContainer:
|
|
4042
|
-
pagesContainer:
|
|
4043
|
-
readOnly:
|
|
4044
|
-
editorMode:
|
|
4041
|
+
hiddenHeaderFooterContainer: ue,
|
|
4042
|
+
noteEditorContainer: Ee,
|
|
4043
|
+
pagesContainer: w,
|
|
4044
|
+
readOnly: f,
|
|
4045
|
+
editorMode: d,
|
|
4045
4046
|
author: () => o.author,
|
|
4046
4047
|
password: () => o.password,
|
|
4047
4048
|
pageRenderer: () => o.pageRenderer,
|
|
4048
4049
|
showMarginGuides: () => o.showMarginGuides,
|
|
4049
4050
|
marginGuideColor: () => o.marginGuideColor,
|
|
4050
|
-
externalPlugins:
|
|
4051
|
+
externalPlugins: s,
|
|
4051
4052
|
collaboration: () => o.collaboration,
|
|
4052
4053
|
onAnonymizationMatchesChange: (e) => o.onAnonymizationMatchesChange?.(e),
|
|
4053
4054
|
showTemplateDirectives: () => o.showTemplateDirectives,
|
|
4054
4055
|
onSlashMenuChange: (e) => o.onSlashMenuChange?.(e),
|
|
4055
4056
|
onSlashMenuKeyAction: (e) => o.onSlashMenuKeyAction?.(e) ?? !1,
|
|
4056
|
-
onChange:
|
|
4057
|
+
onChange: u,
|
|
4057
4058
|
onError: (e) => {
|
|
4058
|
-
o.onError?.(e),
|
|
4059
|
+
o.onError?.(e), c("error", e);
|
|
4059
4060
|
},
|
|
4060
4061
|
onSelectionUpdate: (e) => {
|
|
4061
4062
|
if (o.onSelectionChange?.(Be(e)), o.onSelectionTextChange) {
|
|
@@ -4075,167 +4076,167 @@ var Uo = (e) => {
|
|
|
4075
4076
|
featureFlags: () => o.featureFlags,
|
|
4076
4077
|
onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
|
|
4077
4078
|
});
|
|
4078
|
-
K(
|
|
4079
|
-
|
|
4079
|
+
K(lt, (e, t) => {
|
|
4080
|
+
he.value !== null && e && t && !e.doc.eq(t.doc) && (he.value = null);
|
|
4080
4081
|
});
|
|
4081
|
-
let X =
|
|
4082
|
+
let X = k(() => tt({
|
|
4082
4083
|
bodyView: J.value,
|
|
4083
|
-
headerFooterView:
|
|
4084
|
-
noteView:
|
|
4085
|
-
}).view),
|
|
4086
|
-
let e =
|
|
4087
|
-
return e ?
|
|
4088
|
-
}),
|
|
4089
|
-
function
|
|
4090
|
-
J.value && (rt(), nt(),
|
|
4084
|
+
headerFooterView: I.value ? wt(I.value) : null,
|
|
4085
|
+
noteView: Ot()
|
|
4086
|
+
}).view), jt = k(() => {
|
|
4087
|
+
let e = ft.value;
|
|
4088
|
+
return e ? te(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
|
|
4089
|
+
}), Z = k(() => !pt.value && ae.value && !(o.preserveDocumentWhileLoading === !0 && S.value));
|
|
4090
|
+
function Mt() {
|
|
4091
|
+
J.value && (rt(), nt(), At());
|
|
4091
4092
|
}
|
|
4092
4093
|
wo({
|
|
4093
|
-
isReady:
|
|
4094
|
+
isReady: pt,
|
|
4094
4095
|
getDocument: Y,
|
|
4095
4096
|
fonts: () => o.fonts,
|
|
4096
|
-
remeasure:
|
|
4097
|
+
remeasure: Mt
|
|
4097
4098
|
});
|
|
4098
|
-
let { selectedImage:
|
|
4099
|
+
let { selectedImage: Nt, imageInteracting: Pt, imageToolbarContext: Ft, handleToolbarImageWrap: It, handleImageTransform: Lt } = Eo({
|
|
4099
4100
|
editorView: X,
|
|
4100
|
-
zoom:
|
|
4101
|
-
stateTick:
|
|
4102
|
-
getCommands:
|
|
4103
|
-
}),
|
|
4101
|
+
zoom: B,
|
|
4102
|
+
stateTick: T,
|
|
4103
|
+
getCommands: kt
|
|
4104
|
+
}), Rt = Wo({
|
|
4104
4105
|
editorView: J,
|
|
4105
4106
|
hiddenContainer: C,
|
|
4106
|
-
pagesRef:
|
|
4107
|
-
zoom:
|
|
4108
|
-
selectedImage:
|
|
4109
|
-
syncCoordinator:
|
|
4110
|
-
imageInteracting:
|
|
4107
|
+
pagesRef: w,
|
|
4108
|
+
zoom: B,
|
|
4109
|
+
selectedImage: Nt,
|
|
4110
|
+
syncCoordinator: yt,
|
|
4111
|
+
imageInteracting: Pt
|
|
4111
4112
|
});
|
|
4112
4113
|
Uo({
|
|
4113
|
-
pagesRef:
|
|
4114
|
-
remoteSelections:
|
|
4115
|
-
syncCoordinator:
|
|
4116
|
-
zoom:
|
|
4114
|
+
pagesRef: w,
|
|
4115
|
+
remoteSelections: ut,
|
|
4116
|
+
syncCoordinator: yt,
|
|
4117
|
+
zoom: B
|
|
4117
4118
|
});
|
|
4118
|
-
let { hyperlinkPopupData:
|
|
4119
|
+
let { hyperlinkPopupData: Vt, handleHyperlinkSubmit: Ht, handleHyperlinkRemove: Ut, handleHyperlinkPopupNavigate: Wt, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } = To({
|
|
4119
4120
|
editorView: X,
|
|
4120
|
-
getCommands:
|
|
4121
|
-
}),
|
|
4121
|
+
getCommands: kt
|
|
4122
|
+
}), qt = se(), { tableInsertButton: Jt, hfEdit: Yt, scrollPageInfo: Xt, resolvePos: Zt, setPmSelection: Qt, scrollVisiblePositionIntoView: $t, handlePagesMouseDown: en, handlePagesMouseMove: tn, handlePagesClick: nn, handlePagesDoubleClick: rn, handleTableInsertClick: an, handleHfSave: on, handleHfRemove: sn } = Ho({
|
|
4122
4123
|
editorView: J,
|
|
4123
|
-
pagesRef:
|
|
4124
|
-
pagesViewportRef:
|
|
4125
|
-
selectedImage:
|
|
4126
|
-
imageInteracting:
|
|
4127
|
-
hyperlinkPopupData:
|
|
4128
|
-
readOnly:
|
|
4129
|
-
showHeaderFooterEditing:
|
|
4130
|
-
zoom:
|
|
4131
|
-
layout:
|
|
4124
|
+
pagesRef: w,
|
|
4125
|
+
pagesViewportRef: pe,
|
|
4126
|
+
selectedImage: Nt,
|
|
4127
|
+
imageInteracting: Pt,
|
|
4128
|
+
hyperlinkPopupData: Vt,
|
|
4129
|
+
readOnly: f,
|
|
4130
|
+
showHeaderFooterEditing: k(() => o.showHeaderFooterEditing),
|
|
4131
|
+
zoom: B,
|
|
4132
|
+
layout: gt,
|
|
4132
4133
|
tableResize: {
|
|
4133
|
-
tryStartResize:
|
|
4134
|
-
isResizing:
|
|
4134
|
+
tryStartResize: qt.tryStartResize,
|
|
4135
|
+
isResizing: k(() => qt.isResizing())
|
|
4135
4136
|
},
|
|
4136
|
-
getCommands:
|
|
4137
|
+
getCommands: kt,
|
|
4137
4138
|
getDocument: Y,
|
|
4138
|
-
getHfPmView:
|
|
4139
|
-
syncHfPMs:
|
|
4140
|
-
setDocument:
|
|
4139
|
+
getHfPmView: wt,
|
|
4140
|
+
syncHfPMs: Tt,
|
|
4141
|
+
setDocument: Ct,
|
|
4141
4142
|
openNoteStory: (e) => {
|
|
4142
|
-
|
|
4143
|
+
Et(e), Rt.clearOverlay();
|
|
4143
4144
|
},
|
|
4144
|
-
closeNoteStory:
|
|
4145
|
-
getActiveNoteView:
|
|
4146
|
-
reLayout:
|
|
4147
|
-
onDocumentChange:
|
|
4148
|
-
clearOverlay:
|
|
4149
|
-
}),
|
|
4150
|
-
let e =
|
|
4145
|
+
closeNoteStory: Dt,
|
|
4146
|
+
getActiveNoteView: Ot,
|
|
4147
|
+
reLayout: At,
|
|
4148
|
+
onDocumentChange: u,
|
|
4149
|
+
clearOverlay: Rt.clearOverlay
|
|
4150
|
+
}), cn = () => Yt.value?.rId ? wt(Yt.value.rId) : null, ln = k(() => {
|
|
4151
|
+
let e = Yt.value, t = dt.value;
|
|
4151
4152
|
return !e?.rId || !t || t.rId !== e.rId ? null : {
|
|
4152
4153
|
...t,
|
|
4153
4154
|
pageNumber: e.pageNumber
|
|
4154
4155
|
};
|
|
4155
4156
|
});
|
|
4156
|
-
K(
|
|
4157
|
-
|
|
4157
|
+
K(Yt, (e) => {
|
|
4158
|
+
I.value = e?.rId ?? null, e && Rt.clearOverlay();
|
|
4158
4159
|
}, { immediate: !0 });
|
|
4159
|
-
let
|
|
4160
|
+
let un = Oo({
|
|
4160
4161
|
editorView: J,
|
|
4161
|
-
showOutline:
|
|
4162
|
-
showSidebar:
|
|
4163
|
-
outlineHeadings:
|
|
4164
|
-
activeSidebarItem:
|
|
4162
|
+
showOutline: O,
|
|
4163
|
+
showSidebar: A,
|
|
4164
|
+
outlineHeadings: ke,
|
|
4165
|
+
activeSidebarItem: we,
|
|
4165
4166
|
extractCommentsAndChanges: () => {},
|
|
4166
|
-
scrollToVisiblePosition:
|
|
4167
|
-
}), { contextMenu:
|
|
4167
|
+
scrollToVisiblePosition: $t
|
|
4168
|
+
}), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } = so({
|
|
4168
4169
|
editorView: X,
|
|
4169
|
-
selectedImage:
|
|
4170
|
-
zoom:
|
|
4171
|
-
showImageProperties:
|
|
4172
|
-
getCommands:
|
|
4173
|
-
clearOverlay:
|
|
4174
|
-
setPmSelection:
|
|
4175
|
-
resolvePos:
|
|
4176
|
-
customContextMenuItems: () =>
|
|
4170
|
+
selectedImage: Nt,
|
|
4171
|
+
zoom: B,
|
|
4172
|
+
showImageProperties: ye,
|
|
4173
|
+
getCommands: kt,
|
|
4174
|
+
clearOverlay: Rt.clearOverlay,
|
|
4175
|
+
setPmSelection: Qt,
|
|
4176
|
+
resolvePos: Zt,
|
|
4177
|
+
customContextMenuItems: () => f.value ? void 0 : o.customContextMenuItems,
|
|
4177
4178
|
onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
|
|
4178
4179
|
onCopy: () => o.onCopy?.(),
|
|
4179
4180
|
onCut: () => o.onCut?.(),
|
|
4180
4181
|
onPaste: () => o.onPaste?.()
|
|
4181
|
-
}),
|
|
4182
|
+
}), yn = le(J, T), bn = k(() => yn.value.entries), Q = Ya({
|
|
4182
4183
|
editorView: J,
|
|
4183
4184
|
getDocument: Y,
|
|
4184
4185
|
author: () => o.author,
|
|
4185
4186
|
commentsProp: () => o.comments,
|
|
4186
4187
|
onCommentsChange: (e) => {
|
|
4187
|
-
o.onCommentsChange?.(e),
|
|
4188
|
+
o.onCommentsChange?.(e), c("comments-change", e);
|
|
4188
4189
|
},
|
|
4189
|
-
reLayout:
|
|
4190
|
-
}),
|
|
4190
|
+
reLayout: At
|
|
4191
|
+
}), xn = Q.comments, $ = Ja({
|
|
4191
4192
|
editorView: J,
|
|
4192
|
-
pagesViewport:
|
|
4193
|
-
pagesContainer:
|
|
4194
|
-
readOnly:
|
|
4193
|
+
pagesViewport: pe,
|
|
4194
|
+
pagesContainer: w,
|
|
4195
|
+
readOnly: f,
|
|
4195
4196
|
createComment: Q.createComment,
|
|
4196
4197
|
pushComment: Q.pushComment,
|
|
4197
|
-
reLayout:
|
|
4198
|
-
showSidebar:
|
|
4198
|
+
reLayout: At,
|
|
4199
|
+
showSidebar: A,
|
|
4199
4200
|
setActiveSidebarItem: (e) => {
|
|
4200
|
-
|
|
4201
|
+
we.value = e;
|
|
4201
4202
|
}
|
|
4202
4203
|
});
|
|
4203
|
-
function
|
|
4204
|
-
navigator.clipboard?.writeText(e),
|
|
4204
|
+
function Sn(e) {
|
|
4205
|
+
navigator.clipboard?.writeText(e), Vt.value = null;
|
|
4205
4206
|
}
|
|
4206
|
-
let
|
|
4207
|
-
|
|
4207
|
+
let Cn = k(() => {
|
|
4208
|
+
T.value;
|
|
4208
4209
|
let e = Y()?.package.document;
|
|
4209
4210
|
return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
|
|
4210
|
-
}),
|
|
4211
|
-
|
|
4211
|
+
}), wn = k(() => {
|
|
4212
|
+
T.value;
|
|
4212
4213
|
let e = Y();
|
|
4213
|
-
return e ?
|
|
4214
|
-
}),
|
|
4215
|
-
|
|
4214
|
+
return e ? st(e) : void 0;
|
|
4215
|
+
}), Tn = k(() => {
|
|
4216
|
+
T.value;
|
|
4216
4217
|
let e = X.value;
|
|
4217
4218
|
if (!e) return {};
|
|
4218
4219
|
let t = Qe(e.state).table;
|
|
4219
4220
|
return t ? Ze(t) : {};
|
|
4220
|
-
}),
|
|
4221
|
-
|
|
4221
|
+
}), En = k(() => {
|
|
4222
|
+
T.value;
|
|
4222
4223
|
let e = {};
|
|
4223
4224
|
o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
|
|
4224
4225
|
let t = Y()?.package.styles?.styles;
|
|
4225
4226
|
return t !== void 0 && (e.documentStyles = t), e;
|
|
4226
|
-
}),
|
|
4227
|
+
}), Dn = k(() => at(Cn.value?.pageWidth ?? 12240) * B.value), On = k(() => {
|
|
4227
4228
|
let e = /* @__PURE__ */ new Set();
|
|
4228
|
-
for (let t of
|
|
4229
|
+
for (let t of xn.value) t.done && e.add(t.id);
|
|
4229
4230
|
return e;
|
|
4230
|
-
}),
|
|
4231
|
-
transform:
|
|
4231
|
+
}), kn = k(() => ({
|
|
4232
|
+
transform: B.value === 1 ? void 0 : `scale(${B.value})`,
|
|
4232
4233
|
transformOrigin: "top center",
|
|
4233
4234
|
transition: "transform 0.2s ease"
|
|
4234
|
-
})), { handleApplyStyle:
|
|
4235
|
+
})), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } = po({
|
|
4235
4236
|
editorView: X,
|
|
4236
4237
|
getDocument: Y
|
|
4237
4238
|
});
|
|
4238
|
-
function
|
|
4239
|
+
function Pn() {
|
|
4239
4240
|
if (o.onInsertImage) {
|
|
4240
4241
|
o.onInsertImage();
|
|
4241
4242
|
return;
|
|
@@ -4248,7 +4249,7 @@ var Uo = (e) => {
|
|
|
4248
4249
|
n && Ue(e, n, () => e.focus()), t.remove();
|
|
4249
4250
|
}), document.body.appendChild(t), t.click();
|
|
4250
4251
|
}
|
|
4251
|
-
function
|
|
4252
|
+
function Fn(e, t) {
|
|
4252
4253
|
if (o.onInsertTable) {
|
|
4253
4254
|
o.onInsertTable(e, t);
|
|
4254
4255
|
return;
|
|
@@ -4256,7 +4257,7 @@ var Uo = (e) => {
|
|
|
4256
4257
|
let n = X.value;
|
|
4257
4258
|
n && (qe(n, e, t), n.focus());
|
|
4258
4259
|
}
|
|
4259
|
-
function
|
|
4260
|
+
function In() {
|
|
4260
4261
|
if (o.onInsertPageBreak) {
|
|
4261
4262
|
o.onInsertPageBreak();
|
|
4262
4263
|
return;
|
|
@@ -4264,7 +4265,7 @@ var Uo = (e) => {
|
|
|
4264
4265
|
let e = J.value;
|
|
4265
4266
|
e && (Ge(e), e.focus());
|
|
4266
4267
|
}
|
|
4267
|
-
function
|
|
4268
|
+
function Ln() {
|
|
4268
4269
|
if (o.onInsertTOC) {
|
|
4269
4270
|
o.onInsertTOC();
|
|
4270
4271
|
return;
|
|
@@ -4272,15 +4273,15 @@ var Uo = (e) => {
|
|
|
4272
4273
|
let e = J.value;
|
|
4273
4274
|
e && (Ye(e), e.focus());
|
|
4274
4275
|
}
|
|
4275
|
-
let { handlePageSetupApply:
|
|
4276
|
+
let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } = ko({
|
|
4276
4277
|
editorView: J,
|
|
4277
4278
|
getDocument: Y,
|
|
4278
|
-
readOnly:
|
|
4279
|
-
stateTick:
|
|
4280
|
-
reLayout:
|
|
4281
|
-
onChange:
|
|
4282
|
-
}),
|
|
4283
|
-
|
|
4279
|
+
readOnly: f,
|
|
4280
|
+
stateTick: T,
|
|
4281
|
+
reLayout: At,
|
|
4282
|
+
onChange: u
|
|
4283
|
+
}), qn = k(() => {
|
|
4284
|
+
T.value;
|
|
4284
4285
|
let e = X.value, t = e ? $e(e.state).paragraphFormatting : {};
|
|
4285
4286
|
return {
|
|
4286
4287
|
indentLeft: t.indentLeft ?? 0,
|
|
@@ -4290,126 +4291,126 @@ var Uo = (e) => {
|
|
|
4290
4291
|
tabs: t.tabs ?? null
|
|
4291
4292
|
};
|
|
4292
4293
|
});
|
|
4293
|
-
function qn(e) {
|
|
4294
|
-
u.value !== e && (u.value = e, o.onModeChange?.(e), s("mode-change", e));
|
|
4295
|
-
}
|
|
4296
4294
|
function Jn(e) {
|
|
4295
|
+
d.value !== e && (d.value = e, o.onModeChange?.(e), c("mode-change", e));
|
|
4296
|
+
}
|
|
4297
|
+
function Yn(e) {
|
|
4297
4298
|
switch (e) {
|
|
4298
4299
|
case "find":
|
|
4299
4300
|
case "findReplace":
|
|
4300
|
-
|
|
4301
|
+
E.value = !0;
|
|
4301
4302
|
break;
|
|
4302
4303
|
case "insertSymbol":
|
|
4303
|
-
|
|
4304
|
+
ve.value = !0;
|
|
4304
4305
|
break;
|
|
4305
4306
|
case "insertHyperlink":
|
|
4306
|
-
|
|
4307
|
+
_e.value = !0;
|
|
4307
4308
|
break;
|
|
4308
4309
|
case "pageSetup":
|
|
4309
|
-
|
|
4310
|
+
be.value = !0;
|
|
4310
4311
|
break;
|
|
4311
4312
|
case "watermark":
|
|
4312
|
-
|
|
4313
|
+
f.value || (Se.value = !0);
|
|
4313
4314
|
break;
|
|
4314
4315
|
case "toggleOutline":
|
|
4315
|
-
|
|
4316
|
+
un.handleToggleOutline();
|
|
4316
4317
|
break;
|
|
4317
4318
|
case "toggleSidebar":
|
|
4318
|
-
|
|
4319
|
+
A.value = !A.value;
|
|
4319
4320
|
break;
|
|
4320
4321
|
case "insertImage":
|
|
4321
|
-
|
|
4322
|
+
Pn();
|
|
4322
4323
|
break;
|
|
4323
4324
|
case "insertPageBreak":
|
|
4324
|
-
|
|
4325
|
+
In();
|
|
4325
4326
|
break;
|
|
4326
4327
|
case "insertSectionBreakNextPage":
|
|
4327
|
-
|
|
4328
|
+
Mn();
|
|
4328
4329
|
break;
|
|
4329
4330
|
case "insertSectionBreakContinuous":
|
|
4330
|
-
|
|
4331
|
+
Nn();
|
|
4331
4332
|
break;
|
|
4332
4333
|
case "insertTOC":
|
|
4333
|
-
|
|
4334
|
+
Ln();
|
|
4334
4335
|
break;
|
|
4335
4336
|
default: break;
|
|
4336
4337
|
}
|
|
4337
|
-
|
|
4338
|
+
c("menu-action", e);
|
|
4338
4339
|
}
|
|
4339
|
-
function
|
|
4340
|
-
if (
|
|
4340
|
+
function Xn(e) {
|
|
4341
|
+
if (f.value) return;
|
|
4341
4342
|
let t = Y();
|
|
4342
4343
|
if (!t) return;
|
|
4343
4344
|
let n = ct(t, e);
|
|
4344
|
-
|
|
4345
|
+
Ct(n), mt.value = !0, T.value++, At(), u(n);
|
|
4345
4346
|
}
|
|
4346
|
-
function
|
|
4347
|
-
|
|
4347
|
+
function Zn(e, t) {
|
|
4348
|
+
Fn(e, t);
|
|
4348
4349
|
}
|
|
4349
|
-
function
|
|
4350
|
-
let t = X.value, n =
|
|
4350
|
+
function Qn(e) {
|
|
4351
|
+
let t = X.value, n = kt().setTableProperties;
|
|
4351
4352
|
!t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
4352
4353
|
}
|
|
4353
|
-
let
|
|
4354
|
+
let $n = H(!1);
|
|
4354
4355
|
co({
|
|
4355
4356
|
documentBuffer: () => o.documentBuffer ?? null,
|
|
4356
4357
|
document: () => o.document ?? null,
|
|
4357
|
-
loadDocumentBuffer:
|
|
4358
|
-
loadDocument:
|
|
4359
|
-
sidebarAutoOpenedRef:
|
|
4358
|
+
loadDocumentBuffer: bt,
|
|
4359
|
+
loadDocument: xt,
|
|
4360
|
+
sidebarAutoOpenedRef: $n
|
|
4360
4361
|
}), K(() => o.mode, (e) => {
|
|
4361
|
-
e && e !==
|
|
4362
|
+
e && e !== d.value && (d.value = e);
|
|
4362
4363
|
}), K(() => o.showOutline, (e) => {
|
|
4363
|
-
|
|
4364
|
+
O.value = !!e, un.recomputeHeadingsIfOpen();
|
|
4364
4365
|
});
|
|
4365
|
-
let
|
|
4366
|
-
function
|
|
4366
|
+
let er = H(!1);
|
|
4367
|
+
function tr(e) {
|
|
4367
4368
|
let t = e.currentTarget;
|
|
4368
4369
|
t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop);
|
|
4369
4370
|
}
|
|
4370
|
-
function
|
|
4371
|
-
if (o.initialScrollTop === void 0 ||
|
|
4372
|
-
|
|
4371
|
+
function nr() {
|
|
4372
|
+
if (o.initialScrollTop === void 0 || er.value) return;
|
|
4373
|
+
er.value = !0;
|
|
4373
4374
|
let e = o.initialScrollTop;
|
|
4374
4375
|
requestAnimationFrame(() => {
|
|
4375
|
-
|
|
4376
|
+
me.value && (me.value.scrollTop = e);
|
|
4376
4377
|
});
|
|
4377
4378
|
}
|
|
4378
|
-
K(
|
|
4379
|
+
K(pt, (e) => {
|
|
4379
4380
|
if (!e) {
|
|
4380
|
-
|
|
4381
|
+
er.value = !1;
|
|
4381
4382
|
return;
|
|
4382
4383
|
}
|
|
4383
|
-
|
|
4384
|
+
S.value = !0, un.recomputeHeadingsIfOpen(), Q.seedFromDocument();
|
|
4384
4385
|
let t = Y();
|
|
4385
|
-
t && o.onCompatibilityChange?.(et(t)), o.autoOpenReviewSidebar !== !1 &&
|
|
4386
|
-
}),
|
|
4387
|
-
let e =
|
|
4388
|
-
|
|
4389
|
-
}), t =
|
|
4390
|
-
|
|
4391
|
-
}), n =
|
|
4392
|
-
|
|
4393
|
-
}), r =
|
|
4394
|
-
|
|
4386
|
+
t && o.onCompatibilityChange?.(et(t)), o.autoOpenReviewSidebar !== !1 && !$n.value && (xn.value.length > 0 || bn.value.length > 0) && ($n.value = !0, A.value = !0), nr(), c("ready");
|
|
4387
|
+
}), Ae(() => {
|
|
4388
|
+
let e = ot.on("selectionChange", () => {
|
|
4389
|
+
T.value++, $.updateFloatingButton();
|
|
4390
|
+
}), t = ot.on("docChange", () => {
|
|
4391
|
+
T.value++, un.recomputeHeadingsIfOpen();
|
|
4392
|
+
}), n = ot.on("layoutComplete", () => {
|
|
4393
|
+
T.value++;
|
|
4394
|
+
}), r = qt.install(), i = it(() => o.onFontsLoaded?.());
|
|
4395
|
+
z(() => {
|
|
4395
4396
|
e(), t(), n(), r(), i();
|
|
4396
4397
|
});
|
|
4397
4398
|
});
|
|
4398
|
-
let { exposed:
|
|
4399
|
-
editor:
|
|
4399
|
+
let { exposed: rr } = fo({
|
|
4400
|
+
editor: ot,
|
|
4400
4401
|
editorView: J,
|
|
4401
|
-
isDirty:
|
|
4402
|
+
isDirty: mt,
|
|
4402
4403
|
commentsDirty: Q.commentsDirty,
|
|
4403
4404
|
clearCommentsDirty: Q.clearCommentsDirty,
|
|
4404
|
-
saveDocument:
|
|
4405
|
-
layout:
|
|
4406
|
-
pagesRef:
|
|
4407
|
-
pagesViewportRef:
|
|
4408
|
-
scrollRootRef:
|
|
4409
|
-
zoom:
|
|
4410
|
-
scrollVisiblePositionIntoView:
|
|
4405
|
+
saveDocument: St,
|
|
4406
|
+
layout: gt,
|
|
4407
|
+
pagesRef: w,
|
|
4408
|
+
pagesViewportRef: pe,
|
|
4409
|
+
scrollRootRef: me,
|
|
4410
|
+
zoom: B,
|
|
4411
|
+
scrollVisiblePositionIntoView: $t,
|
|
4411
4412
|
setPassageHighlight: (e) => {
|
|
4412
|
-
|
|
4413
|
+
he.value = e;
|
|
4413
4414
|
},
|
|
4414
4415
|
author: () => o.author,
|
|
4415
4416
|
createAIEditComment: (e, t) => {
|
|
@@ -4421,34 +4422,34 @@ var Uo = (e) => {
|
|
|
4421
4422
|
focus: () => X.value?.focus(),
|
|
4422
4423
|
getDocument: Y,
|
|
4423
4424
|
getActiveView: () => X.value,
|
|
4424
|
-
closeNoteStory:
|
|
4425
|
-
getHeaderFooterView:
|
|
4426
|
-
setZoom:
|
|
4425
|
+
closeNoteStory: Dt,
|
|
4426
|
+
getHeaderFooterView: wt,
|
|
4427
|
+
setZoom: ze,
|
|
4427
4428
|
openFindReplace: () => {
|
|
4428
|
-
|
|
4429
|
+
E.value = !0;
|
|
4429
4430
|
},
|
|
4430
4431
|
onPrint: o.onPrint,
|
|
4431
4432
|
onSave: o.onSave
|
|
4432
4433
|
});
|
|
4433
|
-
return t(
|
|
4434
|
+
return t(rr), (t, n) => (V(), N("div", {
|
|
4434
4435
|
ref_key: "rootRef",
|
|
4435
|
-
ref:
|
|
4436
|
-
class:
|
|
4436
|
+
ref: oe,
|
|
4437
|
+
class: L([
|
|
4437
4438
|
"docx-editor-vue ep-root paged-editor",
|
|
4438
4439
|
e.className,
|
|
4439
|
-
|
|
4440
|
+
ee.value,
|
|
4440
4441
|
{
|
|
4441
|
-
dark: G(
|
|
4442
|
-
"paged-editor--readonly":
|
|
4442
|
+
dark: G(l),
|
|
4443
|
+
"paged-editor--readonly": f.value
|
|
4443
4444
|
}
|
|
4444
4445
|
]),
|
|
4445
|
-
style:
|
|
4446
|
+
style: R(e.style)
|
|
4446
4447
|
}, [
|
|
4447
4448
|
P("div", Go, [F(Ii, {
|
|
4448
4449
|
"show-table-insert": o.showTableInsert !== !1,
|
|
4449
|
-
onRename: n[0] ||= (e) =>
|
|
4450
|
-
onMenuAction:
|
|
4451
|
-
onInsertTable:
|
|
4450
|
+
onRename: n[0] ||= (e) => c("rename", e),
|
|
4451
|
+
onMenuAction: Yn,
|
|
4452
|
+
onInsertTable: Zn
|
|
4452
4453
|
}, {
|
|
4453
4454
|
"title-bar-left": Ie(() => [Me(t.$slots, "title-bar-left", {}, void 0, !0)]),
|
|
4454
4455
|
"title-bar-right": Ie(() => [Me(t.$slots, "title-bar-right", {}, void 0, !0)]),
|
|
@@ -4456,46 +4457,46 @@ var Uo = (e) => {
|
|
|
4456
4457
|
}, 8, ["show-table-insert"]), e.showToolbar ? (V(), j(ie, Oe({
|
|
4457
4458
|
key: 0,
|
|
4458
4459
|
view: X.value,
|
|
4459
|
-
"get-commands": G(
|
|
4460
|
-
"state-tick":
|
|
4461
|
-
"zoom-percent": G(
|
|
4462
|
-
"is-min-zoom": G(
|
|
4463
|
-
"is-max-zoom": G(
|
|
4464
|
-
"zoom-presets": G(
|
|
4460
|
+
"get-commands": G(kt),
|
|
4461
|
+
"state-tick": T.value,
|
|
4462
|
+
"zoom-percent": G(je),
|
|
4463
|
+
"is-min-zoom": G(U),
|
|
4464
|
+
"is-max-zoom": G(Pe),
|
|
4465
|
+
"zoom-presets": G(Je),
|
|
4465
4466
|
"show-zoom-control": e.showZoomControl,
|
|
4466
|
-
"editor-mode":
|
|
4467
|
-
"show-review-controls":
|
|
4468
|
-
"track-changes-on":
|
|
4469
|
-
"display-mode":
|
|
4470
|
-
"read-only":
|
|
4471
|
-
"comments-sidebar-open":
|
|
4472
|
-
"image-context": G(
|
|
4467
|
+
"editor-mode": d.value,
|
|
4468
|
+
"show-review-controls": p.value,
|
|
4469
|
+
"track-changes-on": m.value,
|
|
4470
|
+
"display-mode": h.value,
|
|
4471
|
+
"read-only": f.value,
|
|
4472
|
+
"comments-sidebar-open": A.value,
|
|
4473
|
+
"image-context": G(Ft),
|
|
4473
4474
|
theme: e.theme ?? null
|
|
4474
|
-
},
|
|
4475
|
-
onFindReplace: n[2] ||= (e) =>
|
|
4476
|
-
onInsertLink: n[3] ||= (e) =>
|
|
4477
|
-
onInsertSymbol: n[4] ||= (e) =>
|
|
4478
|
-
onInsertPageBreak:
|
|
4479
|
-
onPageSetup: n[5] ||= (e) =>
|
|
4480
|
-
onToggleOutline: G(
|
|
4481
|
-
onApplyStyle: G(
|
|
4482
|
-
onZoomIn: G(
|
|
4483
|
-
onZoomOut: G(
|
|
4484
|
-
onZoomSet: G(
|
|
4485
|
-
onToggleSidebar: n[6] ||= (e) =>
|
|
4486
|
-
onModeChange:
|
|
4487
|
-
onToggleTrackChanges:
|
|
4488
|
-
"onUpdate:displayMode":
|
|
4489
|
-
onImageProperties: n[7] ||= (e) =>
|
|
4490
|
-
onImageWrapType: G(
|
|
4491
|
-
onImageTransform: G(
|
|
4475
|
+
}, En.value, {
|
|
4476
|
+
onFindReplace: n[2] ||= (e) => E.value = !0,
|
|
4477
|
+
onInsertLink: n[3] ||= (e) => _e.value = !0,
|
|
4478
|
+
onInsertSymbol: n[4] ||= (e) => ve.value = !0,
|
|
4479
|
+
onInsertPageBreak: In,
|
|
4480
|
+
onPageSetup: n[5] ||= (e) => be.value = !0,
|
|
4481
|
+
onToggleOutline: G(un).handleToggleOutline,
|
|
4482
|
+
onApplyStyle: G(An),
|
|
4483
|
+
onZoomIn: G(Ve),
|
|
4484
|
+
onZoomOut: G(He),
|
|
4485
|
+
onZoomSet: G(ze),
|
|
4486
|
+
onToggleSidebar: n[6] ||= (e) => A.value = !A.value,
|
|
4487
|
+
onModeChange: Jn,
|
|
4488
|
+
onToggleTrackChanges: _,
|
|
4489
|
+
"onUpdate:displayMode": x,
|
|
4490
|
+
onImageProperties: n[7] ||= (e) => ye.value = !0,
|
|
4491
|
+
onImageWrapType: G(It),
|
|
4492
|
+
onImageTransform: G(Lt)
|
|
4492
4493
|
}), Ce({
|
|
4493
4494
|
"table-context": Ie(() => [F(y, {
|
|
4494
4495
|
view: X.value,
|
|
4495
|
-
"get-commands": G(
|
|
4496
|
-
"state-tick":
|
|
4496
|
+
"get-commands": G(kt),
|
|
4497
|
+
"state-tick": T.value,
|
|
4497
4498
|
theme: e.theme ?? null,
|
|
4498
|
-
onOpenTableProperties: n[1] ||= (e) =>
|
|
4499
|
+
onOpenTableProperties: n[1] ||= (e) => xe.value = !0
|
|
4499
4500
|
}, null, 8, [
|
|
4500
4501
|
"view",
|
|
4501
4502
|
"get-commands",
|
|
@@ -4505,7 +4506,7 @@ var Uo = (e) => {
|
|
|
4505
4506
|
_: 2
|
|
4506
4507
|
}, [t.$slots["toolbar-extra"] || e.toolbarExtra ? {
|
|
4507
4508
|
name: "toolbar-extra",
|
|
4508
|
-
fn: Ie(() => [Me(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (V(), j(
|
|
4509
|
+
fn: Ie(() => [Me(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (V(), j(re, {
|
|
4509
4510
|
key: 0,
|
|
4510
4511
|
node: e.toolbarExtra
|
|
4511
4512
|
}, null, 8, ["node"])) : M("", !0)], !0)]),
|
|
@@ -4536,33 +4537,33 @@ var Uo = (e) => {
|
|
|
4536
4537
|
"onImageTransform"
|
|
4537
4538
|
])) : M("", !0)]),
|
|
4538
4539
|
F(ji, {
|
|
4539
|
-
"show-find-replace":
|
|
4540
|
-
"onUpdate:showFindReplace": n[8] ||= (e) =>
|
|
4541
|
-
"show-hyperlink":
|
|
4542
|
-
"onUpdate:showHyperlink": n[9] ||= (e) =>
|
|
4543
|
-
"show-insert-symbol":
|
|
4544
|
-
"onUpdate:showInsertSymbol": n[10] ||= (e) =>
|
|
4545
|
-
"show-image-properties":
|
|
4546
|
-
"onUpdate:showImageProperties": n[11] ||= (e) =>
|
|
4547
|
-
"show-page-setup":
|
|
4548
|
-
"onUpdate:showPageSetup": n[12] ||= (e) =>
|
|
4549
|
-
"show-table-properties":
|
|
4550
|
-
"onUpdate:showTableProperties": n[13] ||= (e) =>
|
|
4551
|
-
"show-watermark":
|
|
4552
|
-
"onUpdate:showWatermark": n[14] ||= (e) =>
|
|
4540
|
+
"show-find-replace": E.value,
|
|
4541
|
+
"onUpdate:showFindReplace": n[8] ||= (e) => E.value = e,
|
|
4542
|
+
"show-hyperlink": _e.value,
|
|
4543
|
+
"onUpdate:showHyperlink": n[9] ||= (e) => _e.value = e,
|
|
4544
|
+
"show-insert-symbol": ve.value,
|
|
4545
|
+
"onUpdate:showInsertSymbol": n[10] ||= (e) => ve.value = e,
|
|
4546
|
+
"show-image-properties": ye.value,
|
|
4547
|
+
"onUpdate:showImageProperties": n[11] ||= (e) => ye.value = e,
|
|
4548
|
+
"show-page-setup": be.value,
|
|
4549
|
+
"onUpdate:showPageSetup": n[12] ||= (e) => be.value = e,
|
|
4550
|
+
"show-table-properties": xe.value,
|
|
4551
|
+
"onUpdate:showTableProperties": n[13] ||= (e) => xe.value = e,
|
|
4552
|
+
"show-watermark": Se.value,
|
|
4553
|
+
"onUpdate:showWatermark": n[14] ||= (e) => Se.value = e,
|
|
4553
4554
|
view: X.value,
|
|
4554
|
-
"scroll-visible-position-into-view": G(
|
|
4555
|
-
bookmarks:
|
|
4556
|
-
"current-watermark":
|
|
4557
|
-
"selected-image-pm-pos": G(
|
|
4558
|
-
"section-properties":
|
|
4559
|
-
"table-properties":
|
|
4560
|
-
onInsertSymbol: G(
|
|
4561
|
-
onHyperlinkSubmit: G(
|
|
4562
|
-
onHyperlinkRemove: G(
|
|
4563
|
-
onPageSetupApply: G(
|
|
4564
|
-
onTablePropertiesApply:
|
|
4565
|
-
onWatermarkApply:
|
|
4555
|
+
"scroll-visible-position-into-view": G($t),
|
|
4556
|
+
bookmarks: De.value,
|
|
4557
|
+
"current-watermark": wn.value,
|
|
4558
|
+
"selected-image-pm-pos": G(Nt)?.pmPos ?? null,
|
|
4559
|
+
"section-properties": Cn.value,
|
|
4560
|
+
"table-properties": Tn.value,
|
|
4561
|
+
onInsertSymbol: G(jn),
|
|
4562
|
+
onHyperlinkSubmit: G(Ht),
|
|
4563
|
+
onHyperlinkRemove: G(Ut),
|
|
4564
|
+
onPageSetupApply: G(Rn),
|
|
4565
|
+
onTablePropertiesApply: Qn,
|
|
4566
|
+
onWatermarkApply: Xn
|
|
4566
4567
|
}, null, 8, [
|
|
4567
4568
|
"show-find-replace",
|
|
4568
4569
|
"show-hyperlink",
|
|
@@ -4583,13 +4584,13 @@ var Uo = (e) => {
|
|
|
4583
4584
|
"onHyperlinkRemove",
|
|
4584
4585
|
"onPageSetupApply"
|
|
4585
4586
|
]),
|
|
4586
|
-
G(
|
|
4587
|
+
G(ht) ? (V(), N("div", Ko, W(G(ht)), 1)) : Z.value ? (V(), N("div", qo, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
|
|
4587
4588
|
key: 0,
|
|
4588
4589
|
node: e.loadingIndicator
|
|
4589
|
-
}, null, 8, ["node"])) : (V(), N(
|
|
4590
|
+
}, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", Jo, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
|
|
4590
4591
|
key: 0,
|
|
4591
4592
|
node: e.placeholder
|
|
4592
|
-
}, null, 8, ["node"])) : (V(), N(
|
|
4593
|
+
}, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
|
|
4593
4594
|
P("div", {
|
|
4594
4595
|
ref_key: "hiddenPmRef",
|
|
4595
4596
|
ref: C,
|
|
@@ -4597,32 +4598,32 @@ var Uo = (e) => {
|
|
|
4597
4598
|
}, null, 512),
|
|
4598
4599
|
P("div", {
|
|
4599
4600
|
ref_key: "hiddenHfPmRef",
|
|
4600
|
-
ref:
|
|
4601
|
+
ref: ue,
|
|
4601
4602
|
class: "docx-editor-vue__hidden-pm paged-editor__hidden-hf-pm"
|
|
4602
4603
|
}, null, 512),
|
|
4603
4604
|
P("div", {
|
|
4604
4605
|
ref_key: "editorScrollRef",
|
|
4605
|
-
ref:
|
|
4606
|
+
ref: me,
|
|
4606
4607
|
class: "docx-editor-vue__editor-scroll",
|
|
4607
|
-
onScroll:
|
|
4608
|
+
onScroll: tr
|
|
4608
4609
|
}, [P("div", Yo, [
|
|
4609
|
-
|
|
4610
|
-
"section-props":
|
|
4611
|
-
zoom: G(
|
|
4610
|
+
ge.value && !f.value ? (V(), N("div", Xo, [F(ne, {
|
|
4611
|
+
"section-props": Cn.value,
|
|
4612
|
+
zoom: G(B),
|
|
4612
4613
|
unit: e.rulerUnit ?? "inch",
|
|
4613
|
-
editable: !
|
|
4614
|
-
"indent-left":
|
|
4615
|
-
"indent-right":
|
|
4616
|
-
"first-line-indent":
|
|
4617
|
-
"hanging-indent":
|
|
4614
|
+
editable: !f.value,
|
|
4615
|
+
"indent-left": qn.value.indentLeft,
|
|
4616
|
+
"indent-right": qn.value.indentRight,
|
|
4617
|
+
"first-line-indent": qn.value.firstLineIndent,
|
|
4618
|
+
"hanging-indent": qn.value.hangingIndent,
|
|
4618
4619
|
"show-first-line-indent": !0,
|
|
4619
|
-
"tab-stops":
|
|
4620
|
-
onLeftMarginChange: G(
|
|
4621
|
-
onRightMarginChange: G(
|
|
4622
|
-
onIndentLeftChange: G(
|
|
4623
|
-
onIndentRightChange: G(
|
|
4624
|
-
onFirstLineIndentChange: G(
|
|
4625
|
-
onTabStopRemove: G(
|
|
4620
|
+
"tab-stops": qn.value.tabs,
|
|
4621
|
+
onLeftMarginChange: G(zn),
|
|
4622
|
+
onRightMarginChange: G(Bn),
|
|
4623
|
+
onIndentLeftChange: G(Un),
|
|
4624
|
+
onIndentRightChange: G(Wn),
|
|
4625
|
+
onFirstLineIndentChange: G(Gn),
|
|
4626
|
+
onTabStopRemove: G(Kn)
|
|
4626
4627
|
}, null, 8, [
|
|
4627
4628
|
"section-props",
|
|
4628
4629
|
"zoom",
|
|
@@ -4640,13 +4641,13 @@ var Uo = (e) => {
|
|
|
4640
4641
|
"onFirstLineIndentChange",
|
|
4641
4642
|
"onTabStopRemove"
|
|
4642
4643
|
])])) : M("", !0),
|
|
4643
|
-
|
|
4644
|
-
"section-props":
|
|
4645
|
-
zoom: G(
|
|
4644
|
+
ge.value && !f.value ? (V(), N("div", Zo, [F(v, {
|
|
4645
|
+
"section-props": Cn.value,
|
|
4646
|
+
zoom: G(B),
|
|
4646
4647
|
unit: e.rulerUnit ?? "inch",
|
|
4647
|
-
editable: !
|
|
4648
|
-
onTopMarginChange: G(
|
|
4649
|
-
onBottomMarginChange: G(
|
|
4648
|
+
editable: !f.value,
|
|
4649
|
+
onTopMarginChange: G(Vn),
|
|
4650
|
+
onBottomMarginChange: G(Hn)
|
|
4650
4651
|
}, null, 8, [
|
|
4651
4652
|
"section-props",
|
|
4652
4653
|
"zoom",
|
|
@@ -4657,28 +4658,28 @@ var Uo = (e) => {
|
|
|
4657
4658
|
])])) : M("", !0),
|
|
4658
4659
|
P("div", {
|
|
4659
4660
|
ref_key: "pagesViewportRef",
|
|
4660
|
-
ref:
|
|
4661
|
+
ref: pe,
|
|
4661
4662
|
class: "docx-editor-vue__pages-viewport",
|
|
4662
|
-
onWheel:
|
|
4663
|
-
onMousedown: n[25] ||= (...e) => G(
|
|
4664
|
-
onMousemove: n[26] ||= (...e) => G(
|
|
4665
|
-
onClick: n[27] ||= (...e) => G(
|
|
4666
|
-
onDblclick: n[28] ||= (...e) => G(
|
|
4667
|
-
onContextmenu: n[29] ||= q((...e) => G(
|
|
4663
|
+
onWheel: Xe,
|
|
4664
|
+
onMousedown: n[25] ||= (...e) => G(en) && G(en)(...e),
|
|
4665
|
+
onMousemove: n[26] ||= (...e) => G(tn) && G(tn)(...e),
|
|
4666
|
+
onClick: n[27] ||= (...e) => G(nn) && G(nn)(...e),
|
|
4667
|
+
onDblclick: n[28] ||= (...e) => G(rn) && G(rn)(...e),
|
|
4668
|
+
onContextmenu: n[29] ||= q((...e) => G(hn) && G(hn)(...e), ["prevent"])
|
|
4668
4669
|
}, [
|
|
4669
4670
|
P("div", Qo, [
|
|
4670
4671
|
P("div", {
|
|
4671
4672
|
ref_key: "pagesRef",
|
|
4672
|
-
ref:
|
|
4673
|
-
class:
|
|
4674
|
-
style:
|
|
4673
|
+
ref: w,
|
|
4674
|
+
class: L(["docx-editor-vue__pages paged-editor__pages", G(Yt) ? `paged-editor--hf-editing paged-editor--editing-${G(Yt).position}` : ""]),
|
|
4675
|
+
style: R(kn.value)
|
|
4675
4676
|
}, null, 6),
|
|
4676
4677
|
F(va, {
|
|
4677
|
-
"editor-view":
|
|
4678
|
-
"hidden-container":
|
|
4679
|
-
"pages-container":
|
|
4680
|
-
selection:
|
|
4681
|
-
zoom: G(
|
|
4678
|
+
"editor-view": cn(),
|
|
4679
|
+
"hidden-container": ue.value,
|
|
4680
|
+
"pages-container": w.value,
|
|
4681
|
+
selection: ln.value,
|
|
4682
|
+
zoom: G(B)
|
|
4682
4683
|
}, null, 8, [
|
|
4683
4684
|
"editor-view",
|
|
4684
4685
|
"hidden-container",
|
|
@@ -4689,12 +4690,12 @@ var Uo = (e) => {
|
|
|
4689
4690
|
P("div", $o, [
|
|
4690
4691
|
F(fi, {
|
|
4691
4692
|
"get-view": () => G(J),
|
|
4692
|
-
"get-pages-container": () =>
|
|
4693
|
-
"editor-state": G(
|
|
4694
|
-
zoom: G(
|
|
4695
|
-
layout: G(
|
|
4696
|
-
blocks: G(
|
|
4697
|
-
measures: G(
|
|
4693
|
+
"get-pages-container": () => w.value,
|
|
4694
|
+
"editor-state": G(lt),
|
|
4695
|
+
zoom: G(B),
|
|
4696
|
+
layout: G(gt),
|
|
4697
|
+
blocks: G(_t),
|
|
4698
|
+
measures: G(vt),
|
|
4698
4699
|
"on-term-click": o.onAnonymizationTermClick,
|
|
4699
4700
|
"selected-canonical": o.selectedAnonymizationCanonical,
|
|
4700
4701
|
"selection-seq": o.anonymizationSelectionSeq
|
|
@@ -4711,12 +4712,12 @@ var Uo = (e) => {
|
|
|
4711
4712
|
"selection-seq"
|
|
4712
4713
|
]),
|
|
4713
4714
|
F(mi, {
|
|
4714
|
-
range:
|
|
4715
|
-
"get-pages-container": () =>
|
|
4716
|
-
zoom: G(
|
|
4717
|
-
layout: G(
|
|
4718
|
-
blocks: G(
|
|
4719
|
-
measures: G(
|
|
4715
|
+
range: he.value,
|
|
4716
|
+
"get-pages-container": () => w.value,
|
|
4717
|
+
zoom: G(B),
|
|
4718
|
+
layout: G(gt),
|
|
4719
|
+
blocks: G(_t),
|
|
4720
|
+
measures: G(vt)
|
|
4720
4721
|
}, null, 8, [
|
|
4721
4722
|
"range",
|
|
4722
4723
|
"get-pages-container",
|
|
@@ -4728,12 +4729,12 @@ var Uo = (e) => {
|
|
|
4728
4729
|
o.showTemplateDirectives ? (V(), j(ja, {
|
|
4729
4730
|
key: 0,
|
|
4730
4731
|
"get-view": () => G(J),
|
|
4731
|
-
"get-pages-container": () =>
|
|
4732
|
-
"editor-state": G(
|
|
4733
|
-
zoom: G(
|
|
4734
|
-
layout: G(
|
|
4735
|
-
blocks: G(
|
|
4736
|
-
measures: G(
|
|
4732
|
+
"get-pages-container": () => w.value,
|
|
4733
|
+
"editor-state": G(lt),
|
|
4734
|
+
zoom: G(B),
|
|
4735
|
+
layout: G(gt),
|
|
4736
|
+
blocks: G(_t),
|
|
4737
|
+
measures: G(vt)
|
|
4737
4738
|
}, null, 8, [
|
|
4738
4739
|
"get-view",
|
|
4739
4740
|
"get-pages-container",
|
|
@@ -4744,10 +4745,10 @@ var Uo = (e) => {
|
|
|
4744
4745
|
"measures"
|
|
4745
4746
|
])) : M("", !0),
|
|
4746
4747
|
F(vi, {
|
|
4747
|
-
"get-pages-container": () =>
|
|
4748
|
-
"editor-state": G(
|
|
4749
|
-
zoom: G(
|
|
4750
|
-
"sync-coordinator": G(
|
|
4748
|
+
"get-pages-container": () => w.value,
|
|
4749
|
+
"editor-state": G(lt),
|
|
4750
|
+
zoom: G(B),
|
|
4751
|
+
"sync-coordinator": G(yt)
|
|
4751
4752
|
}, null, 8, [
|
|
4752
4753
|
"get-pages-container",
|
|
4753
4754
|
"editor-state",
|
|
@@ -4756,10 +4757,10 @@ var Uo = (e) => {
|
|
|
4756
4757
|
]),
|
|
4757
4758
|
F(Ei, {
|
|
4758
4759
|
"get-view": () => G(J),
|
|
4759
|
-
"get-pages-container": () =>
|
|
4760
|
-
zoom: G(
|
|
4761
|
-
"transaction-version":
|
|
4762
|
-
"sync-coordinator": G(
|
|
4760
|
+
"get-pages-container": () => w.value,
|
|
4761
|
+
zoom: G(B),
|
|
4762
|
+
"transaction-version": T.value,
|
|
4763
|
+
"sync-coordinator": G(yt)
|
|
4763
4764
|
}, null, 8, [
|
|
4764
4765
|
"get-view",
|
|
4765
4766
|
"get-pages-container",
|
|
@@ -4769,12 +4770,12 @@ var Uo = (e) => {
|
|
|
4769
4770
|
])
|
|
4770
4771
|
])
|
|
4771
4772
|
]),
|
|
4772
|
-
G(
|
|
4773
|
+
G(Yt) ? (V(), j(ba, {
|
|
4773
4774
|
key: 0,
|
|
4774
|
-
edit: G(
|
|
4775
|
-
"get-view":
|
|
4776
|
-
onClose: G(
|
|
4777
|
-
onRemove: G(
|
|
4775
|
+
edit: G(Yt),
|
|
4776
|
+
"get-view": cn,
|
|
4777
|
+
onClose: G(on),
|
|
4778
|
+
onRemove: G(sn)
|
|
4778
4779
|
}, null, 8, [
|
|
4779
4780
|
"edit",
|
|
4780
4781
|
"onClose",
|
|
@@ -4782,25 +4783,25 @@ var Uo = (e) => {
|
|
|
4782
4783
|
])) : M("", !0),
|
|
4783
4784
|
Le(P("aside", {
|
|
4784
4785
|
class: "docx-editor-vue__note-editor",
|
|
4785
|
-
"aria-label":
|
|
4786
|
-
onKeydown: n[16] ||= Re(q((...e) => G(
|
|
4787
|
-
}, [P("header", ts, [P("span", null, W(
|
|
4786
|
+
"aria-label": jt.value,
|
|
4787
|
+
onKeydown: n[16] ||= Re(q((...e) => G(Dt) && G(Dt)(...e), ["stop", "prevent"]), ["esc"])
|
|
4788
|
+
}, [P("header", ts, [P("span", null, W(jt.value), 1), P("button", {
|
|
4788
4789
|
type: "button",
|
|
4789
|
-
"aria-label": G(
|
|
4790
|
-
onClick: n[15] ||= (...e) => G(
|
|
4790
|
+
"aria-label": G(te)("common.closeDialog"),
|
|
4791
|
+
onClick: n[15] ||= (...e) => G(Dt) && G(Dt)(...e)
|
|
4791
4792
|
}, " × ", 8, ns)]), P("div", {
|
|
4792
4793
|
ref_key: "notePmRef",
|
|
4793
|
-
ref:
|
|
4794
|
+
ref: Ee,
|
|
4794
4795
|
class: "docx-editor-vue__note-editor-host"
|
|
4795
|
-
}, null, 512)], 40, es), [[Fe, G(
|
|
4796
|
+
}, null, 512)], 40, es), [[Fe, G(ft)]]),
|
|
4796
4797
|
F(_a, {
|
|
4797
|
-
"image-info": G(
|
|
4798
|
-
zoom: G(
|
|
4798
|
+
"image-info": G(Nt),
|
|
4799
|
+
zoom: G(B),
|
|
4799
4800
|
view: X.value,
|
|
4800
|
-
onDeselect: n[17] ||= (e) =>
|
|
4801
|
-
onInteractStart: n[18] ||= (e) =>
|
|
4802
|
-
onInteractEnd: n[19] ||= (e) =>
|
|
4803
|
-
onContextMenu: G(
|
|
4801
|
+
onDeselect: n[17] ||= (e) => Nt.value = null,
|
|
4802
|
+
onInteractStart: n[18] ||= (e) => Pt.value = !0,
|
|
4803
|
+
onInteractEnd: n[19] ||= (e) => Pt.value = !1,
|
|
4804
|
+
onContextMenu: G(gn)
|
|
4804
4805
|
}, null, 8, [
|
|
4805
4806
|
"image-info",
|
|
4806
4807
|
"zoom",
|
|
@@ -4808,13 +4809,13 @@ var Uo = (e) => {
|
|
|
4808
4809
|
"onContextMenu"
|
|
4809
4810
|
]),
|
|
4810
4811
|
F(Va, {
|
|
4811
|
-
data: G(
|
|
4812
|
-
"read-only":
|
|
4813
|
-
onNavigate: G(
|
|
4814
|
-
onCopy:
|
|
4815
|
-
onEdit: G(
|
|
4816
|
-
onRemove: G(
|
|
4817
|
-
onClose: n[20] ||= (e) =>
|
|
4812
|
+
data: G(Vt),
|
|
4813
|
+
"read-only": f.value,
|
|
4814
|
+
onNavigate: G(Wt),
|
|
4815
|
+
onCopy: Sn,
|
|
4816
|
+
onEdit: G(Gt),
|
|
4817
|
+
onRemove: G(Kt),
|
|
4818
|
+
onClose: n[20] ||= (e) => Vt.value = null
|
|
4818
4819
|
}, null, 8, [
|
|
4819
4820
|
"data",
|
|
4820
4821
|
"read-only",
|
|
@@ -4822,24 +4823,24 @@ var Uo = (e) => {
|
|
|
4822
4823
|
"onEdit",
|
|
4823
4824
|
"onRemove"
|
|
4824
4825
|
]),
|
|
4825
|
-
G(
|
|
4826
|
+
G(Jt) ? (V(), N("button", {
|
|
4826
4827
|
key: 1,
|
|
4827
4828
|
type: "button",
|
|
4828
4829
|
class: "docx-editor-vue__table-insert-btn",
|
|
4829
|
-
style:
|
|
4830
|
-
left: G(
|
|
4831
|
-
top: G(
|
|
4830
|
+
style: R({
|
|
4831
|
+
left: G(Jt).x + "px",
|
|
4832
|
+
top: G(Jt).y + "px"
|
|
4832
4833
|
}),
|
|
4833
|
-
"aria-label": G(
|
|
4834
|
-
onMousedown: n[21] ||= (...e) => G(
|
|
4834
|
+
"aria-label": G(Jt).type === "row" ? "Insert row" : "Insert column",
|
|
4835
|
+
onMousedown: n[21] ||= (...e) => G(an) && G(an)(...e)
|
|
4835
4836
|
}, " + ", 44, rs)) : M("", !0),
|
|
4836
4837
|
F(g, {
|
|
4837
|
-
comments: G(
|
|
4838
|
-
"pages-container":
|
|
4839
|
-
zoom: G(
|
|
4840
|
-
"page-width-px":
|
|
4841
|
-
"sidebar-open":
|
|
4842
|
-
"resolved-comment-ids":
|
|
4838
|
+
comments: G(xn),
|
|
4839
|
+
"pages-container": w.value,
|
|
4840
|
+
zoom: G(B),
|
|
4841
|
+
"page-width-px": Dn.value,
|
|
4842
|
+
"sidebar-open": A.value,
|
|
4843
|
+
"resolved-comment-ids": On.value,
|
|
4843
4844
|
onMarkerClick: () => {}
|
|
4844
4845
|
}, null, 8, [
|
|
4845
4846
|
"comments",
|
|
@@ -4850,18 +4851,18 @@ var Uo = (e) => {
|
|
|
4850
4851
|
"resolved-comment-ids"
|
|
4851
4852
|
]),
|
|
4852
4853
|
F(b, {
|
|
4853
|
-
"is-open":
|
|
4854
|
-
comments: G(
|
|
4855
|
-
"tracked-changes":
|
|
4854
|
+
"is-open": A.value,
|
|
4855
|
+
comments: G(xn),
|
|
4856
|
+
"tracked-changes": bn.value,
|
|
4856
4857
|
"show-resolved": !0,
|
|
4857
4858
|
"is-adding-comment": G($).isAddingComment.value,
|
|
4858
4859
|
"add-comment-y-position": G($).addCommentYPosition.value,
|
|
4859
|
-
"pages-container":
|
|
4860
|
-
"page-width-px":
|
|
4861
|
-
zoom: G(
|
|
4862
|
-
"active-item-id":
|
|
4863
|
-
onClose: n[22] ||= (e) =>
|
|
4864
|
-
"onUpdate:activeItemId": n[23] ||= (e) =>
|
|
4860
|
+
"pages-container": w.value,
|
|
4861
|
+
"page-width-px": Dn.value,
|
|
4862
|
+
zoom: G(B),
|
|
4863
|
+
"active-item-id": we.value,
|
|
4864
|
+
onClose: n[22] ||= (e) => A.value = !1,
|
|
4865
|
+
"onUpdate:activeItemId": n[23] ||= (e) => we.value = e,
|
|
4865
4866
|
onAddComment: G($).handleAddComment,
|
|
4866
4867
|
onCancelAddComment: G($).handleCancelAddComment,
|
|
4867
4868
|
onCommentReply: G(Q).handleReply,
|
|
@@ -4895,11 +4896,11 @@ var Uo = (e) => {
|
|
|
4895
4896
|
"onRejectChangeById",
|
|
4896
4897
|
"onTrackedChangeReply"
|
|
4897
4898
|
]),
|
|
4898
|
-
G($).floatingCommentButton.value && !
|
|
4899
|
+
G($).floatingCommentButton.value && !f.value ? (V(), N("button", {
|
|
4899
4900
|
key: 2,
|
|
4900
4901
|
type: "button",
|
|
4901
4902
|
class: "docx-editor-vue__add-comment-btn",
|
|
4902
|
-
style:
|
|
4903
|
+
style: R({
|
|
4903
4904
|
top: G($).floatingCommentButton.value.top + "px",
|
|
4904
4905
|
left: G($).floatingCommentButton.value.left + "px"
|
|
4905
4906
|
}),
|
|
@@ -4911,27 +4912,27 @@ var Uo = (e) => {
|
|
|
4911
4912
|
size: 18
|
|
4912
4913
|
})], 36)) : M("", !0)
|
|
4913
4914
|
], 544),
|
|
4914
|
-
|
|
4915
|
+
O.value ? M("", !0) : (V(), j(Sa, {
|
|
4915
4916
|
key: 2,
|
|
4916
4917
|
"left-offset": 12,
|
|
4917
|
-
onToggle: G(
|
|
4918
|
+
onToggle: G(un).handleToggleOutline
|
|
4918
4919
|
}, null, 8, ["onToggle"])),
|
|
4919
|
-
G(
|
|
4920
|
+
G(Xt).totalPages > 1 ? (V(), j(Ca, {
|
|
4920
4921
|
key: 3,
|
|
4921
|
-
"current-page": G(
|
|
4922
|
-
"total-pages": G(
|
|
4923
|
-
visible: G(
|
|
4922
|
+
"current-page": G(Xt).currentPage,
|
|
4923
|
+
"total-pages": G(Xt).totalPages,
|
|
4924
|
+
visible: G(Xt).visible
|
|
4924
4925
|
}, null, 8, [
|
|
4925
4926
|
"current-page",
|
|
4926
4927
|
"total-pages",
|
|
4927
4928
|
"visible"
|
|
4928
4929
|
])) : M("", !0),
|
|
4929
4930
|
F(Ai, {
|
|
4930
|
-
"is-open":
|
|
4931
|
-
headings:
|
|
4932
|
-
"get-scroll-container": () =>
|
|
4933
|
-
onClose: n[30] ||= (e) =>
|
|
4934
|
-
onNavigate: G(
|
|
4931
|
+
"is-open": O.value,
|
|
4932
|
+
headings: ke.value,
|
|
4933
|
+
"get-scroll-container": () => w.value,
|
|
4934
|
+
onClose: n[30] ||= (e) => O.value = !1,
|
|
4935
|
+
onNavigate: G(un).handleOutlineNavigate
|
|
4935
4936
|
}, null, 8, [
|
|
4936
4937
|
"is-open",
|
|
4937
4938
|
"headings",
|
|
@@ -4940,17 +4941,17 @@ var Uo = (e) => {
|
|
|
4940
4941
|
])
|
|
4941
4942
|
])], 544),
|
|
4942
4943
|
F(sa, {
|
|
4943
|
-
"read-only":
|
|
4944
|
-
"context-menu": G(
|
|
4945
|
-
"image-context-menu": G(
|
|
4946
|
-
"image-context-menu-text-actions": G(
|
|
4947
|
-
"custom-text-menu-items": G(
|
|
4948
|
-
"can-open-image-properties": G(
|
|
4949
|
-
onContextMenuAction: G(
|
|
4950
|
-
onCloseContextMenu: n[31] ||= (e) => G(
|
|
4951
|
-
onImageWrapSelect: G(
|
|
4952
|
-
onCloseImageContextMenu: n[32] ||= (e) =>
|
|
4953
|
-
onOpenImageProperties: n[33] ||= (e) =>
|
|
4944
|
+
"read-only": f.value,
|
|
4945
|
+
"context-menu": G(dn),
|
|
4946
|
+
"image-context-menu": G(fn),
|
|
4947
|
+
"image-context-menu-text-actions": G(pn),
|
|
4948
|
+
"custom-text-menu-items": G(mn),
|
|
4949
|
+
"can-open-image-properties": G(Nt) !== null,
|
|
4950
|
+
onContextMenuAction: G(vn),
|
|
4951
|
+
onCloseContextMenu: n[31] ||= (e) => G(dn).isOpen = !1,
|
|
4952
|
+
onImageWrapSelect: G(_n),
|
|
4953
|
+
onCloseImageContextMenu: n[32] ||= (e) => fn.value = null,
|
|
4954
|
+
onOpenImageProperties: n[33] ||= (e) => ye.value = !0
|
|
4954
4955
|
}, null, 8, [
|
|
4955
4956
|
"read-only",
|
|
4956
4957
|
"context-menu",
|
|
@@ -4962,12 +4963,12 @@ var Uo = (e) => {
|
|
|
4962
4963
|
"onImageWrapSelect"
|
|
4963
4964
|
]),
|
|
4964
4965
|
F(Ti, {
|
|
4965
|
-
"event-root":
|
|
4966
|
+
"event-root": f.value ? null : w.value,
|
|
4966
4967
|
view: G(J)
|
|
4967
4968
|
}, null, 8, ["event-root", "view"])
|
|
4968
4969
|
], 6));
|
|
4969
4970
|
}
|
|
4970
|
-
}), [["__scopeId", "data-v-
|
|
4971
|
+
}), [["__scopeId", "data-v-adf3fef8"]]);
|
|
4971
4972
|
//#endregion
|
|
4972
4973
|
//#region src/utils/listState.ts
|
|
4973
4974
|
function as() {
|
|
@@ -5044,10 +5045,10 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5044
5045
|
"redo"
|
|
5045
5046
|
],
|
|
5046
5047
|
setup(e, { emit: t }) {
|
|
5047
|
-
let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c =
|
|
5048
|
+
let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = k(() => a.currentFormatting ?? {}), l = k(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = k(() => c.value.listState ?? as()), d = k(() => {
|
|
5048
5049
|
let e = c.value.color;
|
|
5049
5050
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
5050
|
-
}), f =
|
|
5051
|
+
}), f = k(() => {
|
|
5051
5052
|
let e = u.value;
|
|
5052
5053
|
return e.isInList && e.level > 0 || (c.value.indentLeft ?? 0) > 0;
|
|
5053
5054
|
});
|
|
@@ -5058,7 +5059,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5058
5059
|
});
|
|
5059
5060
|
}
|
|
5060
5061
|
return (t, r) => (V(), N("div", {
|
|
5061
|
-
class:
|
|
5062
|
+
class: L(["docx-formatting-bar", e.className]),
|
|
5062
5063
|
role: "toolbar",
|
|
5063
5064
|
"aria-label": G(s)("formattingToolbar"),
|
|
5064
5065
|
"data-folio-toolbar": "true"
|
|
@@ -5092,7 +5093,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5092
5093
|
class: "docx-formatting-bar__divider",
|
|
5093
5094
|
role: "separator"
|
|
5094
5095
|
}, null, -1),
|
|
5095
|
-
e.showStylePicker ? (V(), N(
|
|
5096
|
+
e.showStylePicker ? (V(), N(D, { key: 0 }, [F(ee, Oe({ value: c.value.styleId ?? "Normal" }, l.value, {
|
|
5096
5097
|
disabled: e.disabled,
|
|
5097
5098
|
onChange: r[2] ||= (e) => o("format", {
|
|
5098
5099
|
type: "applyStyle",
|
|
@@ -5109,7 +5110,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5109
5110
|
}, [
|
|
5110
5111
|
P("button", {
|
|
5111
5112
|
type: "button",
|
|
5112
|
-
class:
|
|
5113
|
+
class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
|
|
5113
5114
|
disabled: e.disabled,
|
|
5114
5115
|
title: G(s)("boldShortcut"),
|
|
5115
5116
|
"aria-label": G(s)("bold"),
|
|
@@ -5121,7 +5122,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5121
5122
|
})], 42, ds),
|
|
5122
5123
|
P("button", {
|
|
5123
5124
|
type: "button",
|
|
5124
|
-
class:
|
|
5125
|
+
class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
|
|
5125
5126
|
disabled: e.disabled,
|
|
5126
5127
|
title: G(s)("italicShortcut"),
|
|
5127
5128
|
"aria-label": G(s)("italic"),
|
|
@@ -5133,7 +5134,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5133
5134
|
})], 42, fs),
|
|
5134
5135
|
P("button", {
|
|
5135
5136
|
type: "button",
|
|
5136
|
-
class:
|
|
5137
|
+
class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
|
|
5137
5138
|
disabled: e.disabled,
|
|
5138
5139
|
title: G(s)("underlineShortcut"),
|
|
5139
5140
|
"aria-label": G(s)("underline"),
|
|
@@ -5144,7 +5145,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5144
5145
|
size: 18
|
|
5145
5146
|
})], 42, ps)
|
|
5146
5147
|
], 8, us),
|
|
5147
|
-
e.showTextColorPicker ? (V(), N(
|
|
5148
|
+
e.showTextColorPicker ? (V(), N(D, { key: 1 }, [r[12] ||= P("span", {
|
|
5148
5149
|
class: "docx-formatting-bar__divider",
|
|
5149
5150
|
role: "separator"
|
|
5150
5151
|
}, null, -1), F(G(n), {
|
|
@@ -5229,7 +5230,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5229
5230
|
},
|
|
5230
5231
|
emits: ["change"],
|
|
5231
5232
|
setup(e, { emit: t }) {
|
|
5232
|
-
let { Select: n } = h(), r = e, i = t, a =
|
|
5233
|
+
let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? hs), o = k(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = k(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = k(() => o.value ? String(o.value.value) : String(r.value)), l = k(() => {
|
|
5233
5234
|
let e = a.value.map((e) => ({
|
|
5234
5235
|
value: String(e.value),
|
|
5235
5236
|
label: e.label
|
|
@@ -5244,7 +5245,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5244
5245
|
Number.isNaN(t) || i("change", t);
|
|
5245
5246
|
}
|
|
5246
5247
|
return (t, r) => (V(), j(G(n), {
|
|
5247
|
-
class:
|
|
5248
|
+
class: L(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
|
|
5248
5249
|
value: c.value,
|
|
5249
5250
|
items: l.value,
|
|
5250
5251
|
disabled: e.disabled,
|
|
@@ -5258,7 +5259,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5258
5259
|
]));
|
|
5259
5260
|
}
|
|
5260
5261
|
}), [["__scopeId", "data-v-8079e07f"]]), _s = (e, t, n = {}) => {
|
|
5261
|
-
let { colorMode: r =
|
|
5262
|
+
let { colorMode: r = oe, locale: i = "en", ...a } = n;
|
|
5262
5263
|
return new Promise((n, o) => {
|
|
5263
5264
|
let s = H(null), c = null, l = !1, d = {
|
|
5264
5265
|
save: async () => {
|
|
@@ -5282,7 +5283,7 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5282
5283
|
l || (l = !0, o(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), c?.unmount(), c = null;
|
|
5283
5284
|
}
|
|
5284
5285
|
};
|
|
5285
|
-
c =
|
|
5286
|
+
c = A({ setup() {
|
|
5286
5287
|
return () => Ee(is, {
|
|
5287
5288
|
...a,
|
|
5288
5289
|
documentBuffer: e,
|
|
@@ -5294,8 +5295,8 @@ var os = ["aria-label"], ss = ["aria-label"], cs = [
|
|
|
5294
5295
|
a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
|
|
5295
5296
|
}
|
|
5296
5297
|
});
|
|
5297
|
-
} }), c.use(u, i), c.use(
|
|
5298
|
+
} }), c.use(u, i), c.use(ue, r), c.mount(t);
|
|
5298
5299
|
});
|
|
5299
5300
|
};
|
|
5300
5301
|
//#endregion
|
|
5301
|
-
export { gi as AutocompleteCaretOverlay, Yr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Kr as DOCUMENT_PRESET_VERSION, qr as DOCUMENT_STYLE_SET_VERSION, is as DocxEditor,
|
|
5302
|
+
export { gi as AutocompleteCaretOverlay, Yr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Kr as DOCUMENT_PRESET_VERSION, qr as DOCUMENT_STYLE_SET_VERSION, is as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, ms as FormattingBar, me as HyperlinkDialog, he as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Ur as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, gs as ZoomControl, yt as acceptAutocompleteSuggestion, bt as acceptAutocompleteWord, pt as anonymizationDecorationsKey, xt as appendAutocompleteToken, Pn as applyFolioAIEditOperations, Xr as applySuggestions, St as autocompleteSuggestionKey, Y as autocompleteSuggestionPlugin, $r as buildPositionalText, Ct as clearAutocompleteSuggestion, Cn as clearTemplateSlashMenu, ue as colorModePlugin, wn as consumeTemplateSlashQuery, ai as createAICitationDecorationsPlugin, Jr as createDocx, Rr as createEmptyDocument, Rn as createFolioAIEditSnapshot, Wr as createStellaStyleDocumentPreset, Gr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, sr as deriveBlockId, Bn as diffWordSegments, zr as extractDocumentStyleSet, Br as extractDocumentStyleSetFromDocx, wt as finishAutocompleteSuggestion, ci as fromMarkdown, mt as getAnonymizationMatches, Tt as getAutocompleteSuggestion, ot as getDocumentWatermark, ri as getFolioCaretViewportRect, cr as getFolioParaIdFromBlockId, ii as getFolioSelectionViewportRect, en as getTemplateDirectives, Tn as getTemplateSlashMenu, Wn as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Vr as inspectDocumentStyles, Hr as inspectDocumentStylesFromDocx, ur as isFolioBlockId, dr as isSequentialFolioBlockId, Zr as isSuggestionStale, Gn as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, _s as renderAsync, En as resetTemplateSlashQuery, Qr as resolveSuggestionAnchor, nn as scanDirectives, ni as scrollFolioPositionIntoView, oi as setAICitationsMeta, ei as setAISuggestionsMeta, si as setActiveCitationMeta, gt as setAnonymizationTermsMeta, J as setDocumentWatermark, ti as setFocusedSuggestionMeta, Sn as setTemplatePreviewValues, Dt as shouldTriggerAutocomplete, Ot as startAutocompleteSuggestion, Dn as templateSlashMenuKey, li as toMarkdown, ui as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };
|