@stll/folio-vue 0.17.1 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ListButtons-BlOX6_s_.js → ListButtons-0NZvOgUE.js} +334 -343
- package/dist/ListButtons-C7LKOgVn.cjs +4 -0
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +459 -449
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/ListButtons-R-0VECMy.cjs +0 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
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-
|
|
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-0NZvOgUE.js";
|
|
3
3
|
import { t as ae } from "./zIndex-Ei9BbHSW.js";
|
|
4
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-CBI44HNj.js";
|
|
5
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";
|
|
@@ -34,60 +34,60 @@ import { HeaderFooterSelectionOverlay as tn } from "@stll/folio-core/render-dom/
|
|
|
34
34
|
import { getTemplateDirectives as nn, getTemplateDirectives as rn, scanDirectives as an } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
|
|
35
35
|
import { closeHistory as on, redo as sn, undo as cn } from "prosemirror-history";
|
|
36
36
|
import { clearFormatting as ln } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import { isKeydownInShortcutScope as
|
|
63
|
-
import { collectHeadings as
|
|
64
|
-
import { clickToPositionInHfSlot as
|
|
65
|
-
import { findNoteStoryForTarget as
|
|
66
|
-
import { TABLE_INSERT_HIDE_DELAY_MS as
|
|
67
|
-
import { createCellDragTracker as
|
|
68
|
-
import { RemoteSelectionOverlay as
|
|
69
|
-
import { BodySelectionOverlay as
|
|
70
|
-
import { createEmptyDocument as
|
|
71
|
-
import { extractDocumentStyleSet as
|
|
72
|
-
import { STELLA_STYLE_SET_NAME as
|
|
73
|
-
import { DOCUMENT_PRESET_VERSION as
|
|
74
|
-
import { createDocx as
|
|
75
|
-
import { DEFAULT_AI_SUGGESTION_PRESETS as
|
|
76
|
-
import { applySuggestions as
|
|
77
|
-
import { isSuggestionStale as
|
|
78
|
-
import { buildPositionalText as
|
|
79
|
-
import { setAISuggestionsMeta as
|
|
80
|
-
import { scrollFolioPositionIntoView as
|
|
81
|
-
import { getFolioCaretViewportRect as
|
|
82
|
-
import { createAICitationDecorationsPlugin as
|
|
83
|
-
import { fromMarkdown as
|
|
37
|
+
import { anchorTargetAttrs as un, sanitizeExternalUrl as dn, windowFeaturesFor as fn } from "@stll/folio-core/utils/urlSecurity";
|
|
38
|
+
import { PENDING_COMMENT_ID as pn, createCommentIdAllocator as mn, seedCommentAllocator as hn } from "@stll/folio-core/prosemirror/commentIdAllocator";
|
|
39
|
+
import { createComment as gn } from "@stll/folio-core/prosemirror/commentOps";
|
|
40
|
+
import { acceptAIEditRevision as _n, acceptChange as vn, acceptSuggestion as yn, findAIEditRevisionRange as bn, findSuggestionRange as Q, getSuggestions as xn, rejectAIEditRevision as $, rejectChange as Sn, rejectSuggestion as Cn } from "@stll/folio-core/prosemirror/commands/comments";
|
|
41
|
+
import { makeRevisionInfo as wn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
|
|
42
|
+
import { findPageIndexContainingPmPos as Tn } from "@stll/folio-core/layout-engine";
|
|
43
|
+
import { proseDocToBlocks as En } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
|
|
44
|
+
import { setTemplatePreviewValues as Dn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
45
|
+
import { clearTemplateSlashMenu as On, consumeTemplateSlashQuery as kn, getTemplateSlashMenu as An, resetTemplateSlashQuery as jn, templateSlashMenuKey as Mn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
46
|
+
import { createEmptyHeaderFooter as Nn, pickActiveHeaderFooterRId as Pn, removeHeaderFooter as Fn, resolveHeaderFooterContent as In, saveHeaderFooterContent as Ln } from "@stll/folio-core/utils/headerFooter";
|
|
47
|
+
import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Rn, applyFolioAIEditOperations as zn, applyFolioAIEditOperations as Bn, applyFolioDocumentOperations as Vn, assertSupportedFolioDocumentOperationVersion as Hn, createFolioAIEditSnapshot as Un, createFolioAIEditSnapshot as Wn, createFolioAIEditSnapshotWithStyleResolver as Gn, diffWordSegments as Kn, getCommentAnchorsFromDoc as qn, getFolioDocumentOperationIssues as Jn, getTrackedChangesFromDoc as Yn, hashFolioAIBlockText as Xn, normalizeFolioAIBlockText as Zn } from "@stll/folio-core/ai-edits";
|
|
48
|
+
import { findParagraphFragmentsByParaId as Qn, flashParagraphElements as $n } from "@stll/folio-core/paged-layout/paragraphFlash";
|
|
49
|
+
import { onPaintedLayoutChange as er, readBlockRects as tr } from "@stll/folio-core/paged-layout/blockGeometry";
|
|
50
|
+
import { blockSdtAttrsToSdtProperties as nr, findBlockSdtMatch as rr, findBlockSdtMatches as ir, removeContentControlTr as ar, setContentControlContentTr as or, setContentControlValueTr as sr } from "@stll/folio-core/prosemirror/commands/contentControls";
|
|
51
|
+
import { setContentControlContentBlocksTr as cr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
|
|
52
|
+
import { clampRangeToDocSize as lr, resolveFolioAIBlockRange as ur, resolveFolioAITextRange as dr, resolvePassageRange as fr } from "@stll/folio-core/ai-edits/blockRange";
|
|
53
|
+
import { deriveBlockId as pr, getFolioParaIdFromBlockId as mr, getFolioParaIdFromBlockId as hr, isFolioBlockId as gr, isSequentialFolioBlockId as _r } from "@stll/folio-core/types/block-id";
|
|
54
|
+
import { getPageTextFromLayout as vr } from "@stll/folio-core/paged-layout/pageText";
|
|
55
|
+
import { applyStyle as yr, removeTabStop as br, setIndentFirstLine as xr, setIndentLeft as Sr, setIndentRight as Cr } from "@stll/folio-core/prosemirror/commands/paragraph";
|
|
56
|
+
import { getCachedNumberingMap as wr } from "@stll/folio-core/docx";
|
|
57
|
+
import { insertPageBreak as Tr } from "@stll/folio-core/prosemirror/commands/pageBreak";
|
|
58
|
+
import { insertSectionBreakContinuous as Er, insertSectionBreakNextPage as Dr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
|
|
59
|
+
import { setEmbeddedFontFamilyMap as Or } from "@stll/folio-core/utils/fontResolver";
|
|
60
|
+
import { buildEmbeddedFontFamilyMap as kr, extractEmbeddedFonts as Ar } from "@stll/folio-core/fonts/embeddedFonts";
|
|
61
|
+
import { editHyperlinkAtCursor as jr, removeHyperlinkAtCursor as Mr } from "@stll/folio-core/prosemirror/commands/hyperlink";
|
|
62
|
+
import { isKeydownInShortcutScope as Nr } from "@stll/folio-core/managers/editorShortcuts";
|
|
63
|
+
import { collectHeadings as Pr } from "@stll/folio-core/utils/headingCollector";
|
|
64
|
+
import { clickToPositionInHfSlot as Fr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
|
|
65
|
+
import { findNoteStoryForTarget as Ir } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
|
|
66
|
+
import { TABLE_INSERT_HIDE_DELAY_MS as Lr, detectTableInsertHover as Rr } from "@stll/folio-core/layout-bridge/tableInsertHover";
|
|
67
|
+
import { createCellDragTracker as zr, findCellPosFromPmPos as Br } from "@stll/folio-core/prosemirror/cellDragSelection";
|
|
68
|
+
import { RemoteSelectionOverlay as Vr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
|
|
69
|
+
import { BodySelectionOverlay as Hr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
|
|
70
|
+
import { createEmptyDocument as Ur } from "@stll/folio-core/utils/createDocument";
|
|
71
|
+
import { extractDocumentStyleSet as Wr, extractDocumentStyleSetFromDocx as Gr, inspectDocumentStyles as Kr, inspectDocumentStylesFromDocx as qr } from "@stll/folio-core/style-sets/extract";
|
|
72
|
+
import { STELLA_STYLE_SET_NAME as Jr, createStellaStyleDocumentPreset as Yr, createStellaStyleSet as Xr } from "@stll/folio-core/style-sets/stellaStyle";
|
|
73
|
+
import { DOCUMENT_PRESET_VERSION as Zr, DOCUMENT_STYLE_SET_VERSION as Qr } from "@stll/folio-core/style-sets/types";
|
|
74
|
+
import { createDocx as $r } from "@stll/folio-core/docx/rezip";
|
|
75
|
+
import { DEFAULT_AI_SUGGESTION_PRESETS as ei } from "@stll/folio-core/ai-suggestions/types";
|
|
76
|
+
import { applySuggestions as ti } from "@stll/folio-core/ai-suggestions/apply";
|
|
77
|
+
import { isSuggestionStale as ni, resolveSuggestionAnchor as ri } from "@stll/folio-core/ai-suggestions/conflict";
|
|
78
|
+
import { buildPositionalText as ii } from "@stll/folio-core/ai-suggestions/text-positions";
|
|
79
|
+
import { setAISuggestionsMeta as ai, setFocusedSuggestionMeta as oi } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
|
|
80
|
+
import { scrollFolioPositionIntoView as si } from "@stll/folio-core/paged-layout/scrollToPmPosition";
|
|
81
|
+
import { getFolioCaretViewportRect as ci, getFolioSelectionViewportRect as li } from "@stll/folio-core/paged-layout/selectionViewportRect";
|
|
82
|
+
import { createAICitationDecorationsPlugin as ui, setAICitationsMeta as di, setActiveCitationMeta as fi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
83
|
+
import { fromMarkdown as pi, toMarkdown as mi, toMarkdownResult as hi } from "@stll/folio-core/markdown";
|
|
84
84
|
//#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
85
|
-
var
|
|
85
|
+
var gi = [
|
|
86
86
|
"data-folio-anonymization-label",
|
|
87
87
|
"data-folio-anonymization-canonical",
|
|
88
88
|
"data-folio-anonymization-selected",
|
|
89
89
|
"title"
|
|
90
|
-
],
|
|
90
|
+
], _i = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
91
91
|
__name: "AnonymizationRectsOverlay",
|
|
92
92
|
props: {
|
|
93
93
|
getView: { type: Function },
|
|
@@ -204,12 +204,12 @@ var mi = [
|
|
|
204
204
|
width: `${n.width}px`,
|
|
205
205
|
height: `${n.height}px`
|
|
206
206
|
})
|
|
207
|
-
}, null, 14,
|
|
207
|
+
}, null, 14, gi))), 128))], 64))), 128))], 512));
|
|
208
208
|
}
|
|
209
|
-
}), [["__scopeId", "data-v-df8fe7df"]]),
|
|
209
|
+
}), [["__scopeId", "data-v-df8fe7df"]]), vi = {
|
|
210
210
|
class: "folio-passage-highlight-overlay",
|
|
211
211
|
"data-folio-passage-highlight-overlay": ""
|
|
212
|
-
},
|
|
212
|
+
}, yi = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
213
213
|
__name: "PassageHighlightOverlay",
|
|
214
214
|
props: {
|
|
215
215
|
range: {},
|
|
@@ -256,7 +256,7 @@ var mi = [
|
|
|
256
256
|
t.measures
|
|
257
257
|
], () => a(), { immediate: !0 }), z(() => {
|
|
258
258
|
r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
|
|
259
|
-
}), (e, t) => (V(), N("div",
|
|
259
|
+
}), (e, t) => (V(), N("div", vi, [(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
262
|
style: R({
|
|
@@ -268,11 +268,11 @@ var mi = [
|
|
|
268
268
|
})
|
|
269
269
|
}, null, 4))), 128))]));
|
|
270
270
|
}
|
|
271
|
-
}), [["__scopeId", "data-v-bde9f41b"]]),
|
|
271
|
+
}), [["__scopeId", "data-v-bde9f41b"]]), bi = {
|
|
272
272
|
key: 0,
|
|
273
273
|
class: "folio-autocomplete-overlay",
|
|
274
274
|
"data-folio-autocomplete-overlay": ""
|
|
275
|
-
},
|
|
275
|
+
}, xi = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
276
276
|
__name: "AutocompleteCaretOverlay",
|
|
277
277
|
props: {
|
|
278
278
|
caret: {},
|
|
@@ -280,7 +280,7 @@ var mi = [
|
|
|
280
280
|
isStreaming: { type: Boolean }
|
|
281
281
|
},
|
|
282
282
|
setup(e) {
|
|
283
|
-
return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div",
|
|
283
|
+
return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", bi, [P("span", {
|
|
284
284
|
class: "folio-autocomplete-ghost",
|
|
285
285
|
style: R({
|
|
286
286
|
left: `${e.caret.x}px`,
|
|
@@ -293,7 +293,7 @@ var mi = [
|
|
|
293
293
|
"aria-hidden": "true"
|
|
294
294
|
}, "stella", 2)], 4)])) : M("", !0);
|
|
295
295
|
}
|
|
296
|
-
}), [["__scopeId", "data-v-00299904"]]),
|
|
296
|
+
}), [["__scopeId", "data-v-00299904"]]), Si = 48, Ci = /* @__PURE__ */ I({
|
|
297
297
|
__name: "AutocompleteSuggestionOverlay",
|
|
298
298
|
props: {
|
|
299
299
|
getPagesContainer: { type: Function },
|
|
@@ -310,7 +310,7 @@ var mi = [
|
|
|
310
310
|
let c = r.querySelector(".layout-page-content");
|
|
311
311
|
if (!c) return;
|
|
312
312
|
let l = (c.getBoundingClientRect().right - a.left) / i;
|
|
313
|
-
return Math.max(
|
|
313
|
+
return Math.max(Si, l - t);
|
|
314
314
|
}
|
|
315
315
|
}, s = () => {
|
|
316
316
|
let e = t.getPagesContainer(), r = t.editorState;
|
|
@@ -359,7 +359,7 @@ var mi = [
|
|
|
359
359
|
t.editorState,
|
|
360
360
|
t.zoom,
|
|
361
361
|
r.value
|
|
362
|
-
], () => c()), (e, t) => (V(), j(
|
|
362
|
+
], () => c()), (e, t) => (V(), j(xi, {
|
|
363
363
|
caret: n.value?.caret ?? null,
|
|
364
364
|
text: n.value?.text ?? "",
|
|
365
365
|
"is-streaming": n.value?.isStreaming ?? !1
|
|
@@ -369,33 +369,33 @@ var mi = [
|
|
|
369
369
|
"is-streaming"
|
|
370
370
|
]));
|
|
371
371
|
}
|
|
372
|
-
}),
|
|
373
|
-
function
|
|
374
|
-
je(
|
|
372
|
+
}), wi = Symbol("docx-portal-class");
|
|
373
|
+
function Ti(e) {
|
|
374
|
+
je(wi, k(() => ({
|
|
375
375
|
"ep-root": !0,
|
|
376
376
|
dark: !!G(e)
|
|
377
377
|
})));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return De(
|
|
379
|
+
function Ei() {
|
|
380
|
+
return De(wi, k(() => ({ "ep-root": !0 })));
|
|
381
381
|
}
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
384
|
-
var
|
|
384
|
+
var Di = ["aria-label"], Oi = {
|
|
385
385
|
key: 0,
|
|
386
386
|
class: "content-control-picker__items",
|
|
387
387
|
role: "menu"
|
|
388
|
-
},
|
|
388
|
+
}, ki = {
|
|
389
389
|
key: 0,
|
|
390
390
|
class: "content-control-picker__empty"
|
|
391
|
-
},
|
|
391
|
+
}, Ai = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
392
392
|
__name: "ContentControlWidgetsOverlay",
|
|
393
393
|
props: {
|
|
394
394
|
eventRoot: {},
|
|
395
395
|
view: {}
|
|
396
396
|
},
|
|
397
397
|
setup(e) {
|
|
398
|
-
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o =
|
|
398
|
+
let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = Ei(), s = new jt(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
|
|
399
399
|
c.value = s.getSnapshot();
|
|
400
400
|
});
|
|
401
401
|
K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), z(() => {
|
|
@@ -413,8 +413,9 @@ var Ti = ["aria-label"], Ei = {
|
|
|
413
413
|
style: R(u.value),
|
|
414
414
|
role: "dialog",
|
|
415
415
|
"aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
|
|
416
|
-
onMousedown: t[1] ||= q(() => {}, ["stop"])
|
|
417
|
-
|
|
416
|
+
onMousedown: t[1] ||= q(() => {}, ["stop"]),
|
|
417
|
+
onPointerdown: t[2] ||= q(() => {}, ["stop"])
|
|
418
|
+
}, [c.value.status === "dropdown" ? (V(), N("div", Oi, [c.value.items.length === 0 ? (V(), N("div", ki, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
|
|
418
419
|
key: `${e.value}::${e.displayText}`,
|
|
419
420
|
"class-name": "content-control-picker__item",
|
|
420
421
|
type: "button",
|
|
@@ -431,9 +432,9 @@ var Ti = ["aria-label"], Ei = {
|
|
|
431
432
|
value: c.value.currentValue,
|
|
432
433
|
"default-open": !0,
|
|
433
434
|
onChange: d
|
|
434
|
-
}, null, 8, ["value"])) : M("", !0)], 46,
|
|
435
|
+
}, null, 8, ["value"])) : M("", !0)], 46, Di))]));
|
|
435
436
|
}
|
|
436
|
-
}), [["__scopeId", "data-v-
|
|
437
|
+
}), [["__scopeId", "data-v-f88b41c9"]]), ji = /* @__PURE__ */ I({
|
|
437
438
|
__name: "DecorationLayer",
|
|
438
439
|
props: {
|
|
439
440
|
getView: { type: Function },
|
|
@@ -545,10 +546,10 @@ var Ti = ["aria-label"], Ei = {
|
|
|
545
546
|
"aria-hidden": "true"
|
|
546
547
|
}, null, 512));
|
|
547
548
|
}
|
|
548
|
-
}),
|
|
549
|
+
}), Mi = { class: "doc-outline__header" }, Ni = { class: "doc-outline__body" }, Pi = {
|
|
549
550
|
key: 0,
|
|
550
551
|
class: "doc-outline__empty"
|
|
551
|
-
},
|
|
552
|
+
}, Fi = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
552
553
|
__name: "DocumentOutline",
|
|
553
554
|
props: {
|
|
554
555
|
isOpen: { type: Boolean },
|
|
@@ -577,7 +578,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
577
578
|
role: "navigation",
|
|
578
579
|
"aria-label": "Document outline",
|
|
579
580
|
onMousedown: n[1] ||= q(() => {}, ["stop"])
|
|
580
|
-
}, [P("div",
|
|
581
|
+
}, [P("div", Mi, [P("button", {
|
|
581
582
|
class: "doc-outline__back",
|
|
582
583
|
title: "Close outline",
|
|
583
584
|
"aria-label": "Close outline",
|
|
@@ -585,7 +586,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
585
586
|
}, [F(i, {
|
|
586
587
|
name: "arrow_back",
|
|
587
588
|
size: 20
|
|
588
|
-
})]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div",
|
|
589
|
+
})]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Ni, [e.headings.length === 0 ? (V(), N("div", Pi, "No headings found")) : (V(), j(G(r), {
|
|
589
590
|
key: 1,
|
|
590
591
|
items: o.value,
|
|
591
592
|
"get-scroll-container": e.getScrollContainer ?? (() => null),
|
|
@@ -593,7 +594,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
593
594
|
"aria-label": "Document outline"
|
|
594
595
|
}, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
|
|
595
596
|
}
|
|
596
|
-
}), [["__scopeId", "data-v-0797b3b1"]]),
|
|
597
|
+
}), [["__scopeId", "data-v-0797b3b1"]]), Ii = /* @__PURE__ */ I({
|
|
597
598
|
__name: "DocxEditorDialogs",
|
|
598
599
|
props: {
|
|
599
600
|
view: {},
|
|
@@ -686,10 +687,10 @@ var Ti = ["aria-label"], Ei = {
|
|
|
686
687
|
}, null, 8, ["is-open", "current-watermark"])
|
|
687
688
|
], 64));
|
|
688
689
|
}
|
|
689
|
-
}),
|
|
690
|
+
}), Li = {
|
|
690
691
|
key: 0,
|
|
691
692
|
class: "docx-editor-vue__title-bar"
|
|
692
|
-
},
|
|
693
|
+
}, Ri = { class: "docx-editor-vue__title-bar-left" }, zi = { class: "docx-editor-vue__title-bar-center" }, Bi = { class: "docx-editor-vue__title-bar-right" }, Vi = /* @__PURE__ */ I({
|
|
693
694
|
__name: "DocxEditorMenuBar",
|
|
694
695
|
props: {
|
|
695
696
|
showMenuBar: {
|
|
@@ -721,9 +722,9 @@ var Ti = ["aria-label"], Ei = {
|
|
|
721
722
|
],
|
|
722
723
|
setup(e, { emit: t }) {
|
|
723
724
|
let n = t;
|
|
724
|
-
return (t, r) => e.showMenuBar ? (V(), N("div",
|
|
725
|
-
P("div",
|
|
726
|
-
P("div",
|
|
725
|
+
return (t, r) => e.showMenuBar ? (V(), N("div", Li, [
|
|
726
|
+
P("div", Ri, [Me(t.$slots, "title-bar-left")]),
|
|
727
|
+
P("div", zi, [F(_, {
|
|
727
728
|
"model-value": e.documentName,
|
|
728
729
|
editable: e.documentNameEditable,
|
|
729
730
|
"onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
|
|
@@ -738,28 +739,28 @@ var Ti = ["aria-label"], Ei = {
|
|
|
738
739
|
"show-help-menu",
|
|
739
740
|
"show-table-insert"
|
|
740
741
|
])]),
|
|
741
|
-
P("div",
|
|
742
|
+
P("div", Bi, [Me(t.$slots, "title-bar-right")])
|
|
742
743
|
])) : M("", !0);
|
|
743
744
|
}
|
|
744
|
-
}),
|
|
745
|
+
}), Hi = ["aria-label"], Ui = { class: "image-ctx-menu__icon" }, Wi = { class: "image-ctx-menu__label" }, Gi = {
|
|
745
746
|
key: 1,
|
|
746
747
|
class: "image-ctx-menu__divider",
|
|
747
748
|
role: "separator"
|
|
748
|
-
},
|
|
749
|
+
}, Ki = [
|
|
749
750
|
"data-wrap-type",
|
|
750
751
|
"data-current",
|
|
751
752
|
"data-disabled",
|
|
752
753
|
"disabled",
|
|
753
754
|
"title",
|
|
754
755
|
"onClick"
|
|
755
|
-
],
|
|
756
|
+
], qi = { class: "image-ctx-menu__icon" }, Ji = { class: "image-ctx-menu__label" }, Yi = ["aria-label"], Xi = ["disabled", "onClick"], Zi = { class: "image-ctx-menu__label" }, Qi = {
|
|
756
757
|
key: 0,
|
|
757
758
|
class: "image-ctx-menu__shortcut"
|
|
758
|
-
},
|
|
759
|
+
}, $i = {
|
|
759
760
|
key: 0,
|
|
760
761
|
class: "image-ctx-menu__divider",
|
|
761
762
|
role: "separator"
|
|
762
|
-
},
|
|
763
|
+
}, ea = 18, ta = 260, na = 10, ra = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
763
764
|
__name: "ImageContextMenu",
|
|
764
765
|
props: {
|
|
765
766
|
state: {},
|
|
@@ -780,7 +781,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
780
781
|
function o() {
|
|
781
782
|
a("open-properties"), a("close");
|
|
782
783
|
}
|
|
783
|
-
let { t: s } = r(), c =
|
|
784
|
+
let { t: s } = r(), c = Ei(), l = Ft, u = k(() => n.state ? Lt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
|
|
784
785
|
inline: "wrap_text",
|
|
785
786
|
squareLeft: "format_image_left",
|
|
786
787
|
squareRight: "format_image_right",
|
|
@@ -793,11 +794,11 @@ var Ti = ["aria-label"], Ei = {
|
|
|
793
794
|
let p = k(() => {
|
|
794
795
|
if (!n.state) return {};
|
|
795
796
|
let e = Ft.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
796
|
-
return typeof window < "u" && (t +
|
|
797
|
+
return typeof window < "u" && (t + ta > window.innerWidth && (t = window.innerWidth - ta - na), r + e > window.innerHeight && (r = window.innerHeight - e - na), t < na && (t = na), r < na && (r = na)), {
|
|
797
798
|
position: "fixed",
|
|
798
799
|
left: `${t}px`,
|
|
799
800
|
top: `${r}px`,
|
|
800
|
-
minWidth: `${
|
|
801
|
+
minWidth: `${ta}px`,
|
|
801
802
|
zIndex: 400
|
|
802
803
|
};
|
|
803
804
|
});
|
|
@@ -839,11 +840,11 @@ var Ti = ["aria-label"], Ei = {
|
|
|
839
840
|
"data-action": "open-properties",
|
|
840
841
|
onMousedown: n[1] ||= q(() => {}, ["prevent"]),
|
|
841
842
|
onClick: o
|
|
842
|
-
}, [P("span",
|
|
843
|
+
}, [P("span", Ui, [F(i, {
|
|
843
844
|
name: "settings",
|
|
844
|
-
size:
|
|
845
|
-
})]), P("span",
|
|
846
|
-
e.canOpenProperties ? (V(), N("div",
|
|
845
|
+
size: ea
|
|
846
|
+
})]), P("span", Wi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
|
|
847
|
+
e.canOpenProperties ? (V(), N("div", Gi)) : M("", !0),
|
|
847
848
|
(V(!0), N(D, null, U(G(l), (e) => (V(), N("button", {
|
|
848
849
|
key: e.choice,
|
|
849
850
|
type: "button",
|
|
@@ -857,17 +858,17 @@ var Ti = ["aria-label"], Ei = {
|
|
|
857
858
|
onMousedown: n[2] ||= q(() => {}, ["prevent"]),
|
|
858
859
|
onClick: (t) => h(e)
|
|
859
860
|
}, [
|
|
860
|
-
P("span",
|
|
861
|
+
P("span", qi, [F(i, {
|
|
861
862
|
name: f(e.iconHint),
|
|
862
|
-
size:
|
|
863
|
+
size: ea
|
|
863
864
|
}, null, 8, ["name"])]),
|
|
864
|
-
P("span",
|
|
865
|
+
P("span", Ji, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
|
|
865
866
|
e.choice === u.value ? (V(), N("span", {
|
|
866
867
|
key: 0,
|
|
867
868
|
class: "image-ctx-menu__current-dot",
|
|
868
869
|
"aria-label": G(s)("imageWrap.menu.ariaLabel")
|
|
869
|
-
}, "●", 8,
|
|
870
|
-
], 42,
|
|
870
|
+
}, "●", 8, Yi)) : M("", !0)
|
|
871
|
+
], 42, Ki))), 128)),
|
|
871
872
|
e.textActions && e.textActions.length > 0 ? (V(), N(D, { key: 2 }, [n[5] ||= P("div", {
|
|
872
873
|
class: "image-ctx-menu__divider",
|
|
873
874
|
role: "separator"
|
|
@@ -878,16 +879,16 @@ var Ti = ["aria-label"], Ei = {
|
|
|
878
879
|
disabled: e.disabled,
|
|
879
880
|
onMousedown: n[3] ||= q(() => {}, ["prevent"]),
|
|
880
881
|
onClick: (t) => g(e)
|
|
881
|
-
}, [P("span",
|
|
882
|
-
], 46,
|
|
882
|
+
}, [P("span", Zi, W(e.label), 1), e.shortcut ? (V(), N("span", Qi, W(e.shortcut), 1)) : M("", !0)], 40, Xi), e.dividerAfter ? (V(), N("div", $i)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
|
|
883
|
+
], 46, Hi)) : M("", !0)]));
|
|
883
884
|
}
|
|
884
|
-
}), [["__scopeId", "data-v-fc8f35bc"]]),
|
|
885
|
+
}), [["__scopeId", "data-v-fc8f35bc"]]), ia = ["disabled", "onMousedown"], aa = {
|
|
885
886
|
key: 0,
|
|
886
887
|
class: "ctx-menu__icon"
|
|
887
|
-
},
|
|
888
|
+
}, oa = { class: "ctx-menu__label" }, sa = {
|
|
888
889
|
key: 1,
|
|
889
890
|
class: "ctx-menu__shortcut"
|
|
890
|
-
},
|
|
891
|
+
}, ca = 220, la = 32, ua = 10, da = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
891
892
|
__name: "TextContextMenu",
|
|
892
893
|
props: {
|
|
893
894
|
isOpen: { type: Boolean },
|
|
@@ -904,7 +905,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
904
905
|
setup(e, { emit: t }) {
|
|
905
906
|
let n = e, i = ({ node: e }) => e;
|
|
906
907
|
i.props = ["node"];
|
|
907
|
-
let a = t, { t: o } = r(), s =
|
|
908
|
+
let a = t, { t: o } = r(), s = Ei(), c = H(null), l = k(() => {
|
|
908
909
|
let e = [], t = n.customItems ?? [];
|
|
909
910
|
for (let [n, r] of t.entries()) e.push({
|
|
910
911
|
id: `custom-${r.id}`,
|
|
@@ -1040,8 +1041,8 @@ var Ti = ["aria-label"], Ei = {
|
|
|
1040
1041
|
action: "deleteTable"
|
|
1041
1042
|
}), e;
|
|
1042
1043
|
}), u = k(() => {
|
|
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 *
|
|
1044
|
-
return typeof window < "u" && (e +
|
|
1044
|
+
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 * la + i * 9;
|
|
1045
|
+
return typeof window < "u" && (e + ca + ua > window.innerWidth && (e = window.innerWidth - ca - ua), t + a + ua > window.innerHeight && (t = window.innerHeight - a - ua)), {
|
|
1045
1046
|
position: "fixed",
|
|
1046
1047
|
left: `${e}px`,
|
|
1047
1048
|
top: `${t}px`,
|
|
@@ -1079,12 +1080,12 @@ var Ti = ["aria-label"], Ei = {
|
|
|
1079
1080
|
disabled: e.disabled,
|
|
1080
1081
|
onMousedown: q((t) => d(e.action), ["prevent"])
|
|
1081
1082
|
}, [
|
|
1082
|
-
e.icon ? (V(), N("span",
|
|
1083
|
-
P("span",
|
|
1084
|
-
e.shortcut ? (V(), N("span",
|
|
1085
|
-
], 42,
|
|
1083
|
+
e.icon ? (V(), N("span", aa, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
|
|
1084
|
+
P("span", oa, W(e.label), 1),
|
|
1085
|
+
e.shortcut ? (V(), N("span", sa, W(e.shortcut), 1)) : M("", !0)
|
|
1086
|
+
], 42, ia))), 128))], 38)) : M("", !0)]));
|
|
1086
1087
|
}
|
|
1087
|
-
}), [["__scopeId", "data-v-c1416e84"]]),
|
|
1088
|
+
}), [["__scopeId", "data-v-c1416e84"]]), fa = /* @__PURE__ */ I({
|
|
1088
1089
|
__name: "DocxEditorOverlays",
|
|
1089
1090
|
props: {
|
|
1090
1091
|
readOnly: { type: Boolean },
|
|
@@ -1103,7 +1104,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
1103
1104
|
],
|
|
1104
1105
|
setup(e, { emit: t }) {
|
|
1105
1106
|
let n = t;
|
|
1106
|
-
return (t, r) => (V(), N(D, null, [F(
|
|
1107
|
+
return (t, r) => (V(), N(D, null, [F(da, {
|
|
1107
1108
|
"is-open": e.contextMenu.isOpen,
|
|
1108
1109
|
position: e.contextMenu.position,
|
|
1109
1110
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -1125,7 +1126,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
1125
1126
|
"can-merge-cells",
|
|
1126
1127
|
"can-split-cell",
|
|
1127
1128
|
"custom-items"
|
|
1128
|
-
]), F(
|
|
1129
|
+
]), F(ra, {
|
|
1129
1130
|
state: e.imageContextMenu,
|
|
1130
1131
|
"text-actions": e.imageContextMenuTextActions,
|
|
1131
1132
|
"can-open-properties": e.canOpenImageProperties,
|
|
@@ -1142,7 +1143,7 @@ var Ti = ["aria-label"], Ei = {
|
|
|
1142
1143
|
});
|
|
1143
1144
|
//#endregion
|
|
1144
1145
|
//#region src/composables/imageOverlayRect.ts
|
|
1145
|
-
function
|
|
1146
|
+
function pa(e) {
|
|
1146
1147
|
let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
|
|
1147
1148
|
return {
|
|
1148
1149
|
left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
|
|
@@ -1153,13 +1154,13 @@ function da(e) {
|
|
|
1153
1154
|
}
|
|
1154
1155
|
//#endregion
|
|
1155
1156
|
//#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
1156
|
-
var
|
|
1157
|
+
var ma = ["data-handle", "onMousedown"], ha = ["title"], ga = {
|
|
1157
1158
|
key: 0,
|
|
1158
1159
|
class: "image-overlay__dim"
|
|
1159
|
-
},
|
|
1160
|
+
}, _a = {
|
|
1160
1161
|
key: 1,
|
|
1161
1162
|
class: "image-overlay__dim image-overlay__dim--rotate"
|
|
1162
|
-
},
|
|
1163
|
+
}, va = 4, ya = 15, ba = 250, xa = 700, Sa = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1163
1164
|
__name: "ImageSelectionOverlay",
|
|
1164
1165
|
props: {
|
|
1165
1166
|
imageInfo: {},
|
|
@@ -1212,7 +1213,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1212
1213
|
return;
|
|
1213
1214
|
}
|
|
1214
1215
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
1215
|
-
p.value =
|
|
1216
|
+
p.value = pa({
|
|
1216
1217
|
imageRect: r,
|
|
1217
1218
|
parentRect: n,
|
|
1218
1219
|
scrollLeft: t.scrollLeft,
|
|
@@ -1230,10 +1231,10 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1230
1231
|
let o = a - r;
|
|
1231
1232
|
S();
|
|
1232
1233
|
let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
|
|
1233
|
-
n = c === t ? n + 1 : 0, t = c, !(o >=
|
|
1234
|
+
n = c === t ? n + 1 : 0, t = c, !(o >= ba && n >= 2) && o < xa && (e = requestAnimationFrame(i));
|
|
1234
1235
|
};
|
|
1235
1236
|
e = requestAnimationFrame(i);
|
|
1236
|
-
let a = setTimeout(S,
|
|
1237
|
+
let a = setTimeout(S, ba);
|
|
1237
1238
|
oe = () => {
|
|
1238
1239
|
cancelAnimationFrame(e), clearTimeout(a);
|
|
1239
1240
|
};
|
|
@@ -1401,7 +1402,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1401
1402
|
}
|
|
1402
1403
|
function xe(e) {
|
|
1403
1404
|
let t = ye(e.clientX, e.clientY) - he, n = ge + t;
|
|
1404
|
-
e.shiftKey || (n = Math.round(n /
|
|
1405
|
+
e.shiftKey || (n = Math.round(n / ya) * ya), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
|
|
1405
1406
|
}
|
|
1406
1407
|
function Se() {
|
|
1407
1408
|
document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Se), l.value = !1, a("interact-end");
|
|
@@ -1422,7 +1423,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1422
1423
|
if (!i.imageInfo || !p.value) return;
|
|
1423
1424
|
let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
|
|
1424
1425
|
let s = e.clientX - t, l = e.clientY - n;
|
|
1425
|
-
if (!(!o && Math.sqrt(s * s + l * l) <
|
|
1426
|
+
if (!(!o && Math.sqrt(s * s + l * l) < va)) {
|
|
1426
1427
|
if (!o) {
|
|
1427
1428
|
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
1429
|
let e = i.zoom;
|
|
@@ -1501,19 +1502,19 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1501
1502
|
style: R(e.style),
|
|
1502
1503
|
"data-handle": e.pos,
|
|
1503
1504
|
onMousedown: q((t) => de(t, e.pos), ["prevent", "stop"])
|
|
1504
|
-
}, null, 44,
|
|
1505
|
+
}, null, 44, ma))), 128)),
|
|
1505
1506
|
r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
|
|
1506
1507
|
P("div", {
|
|
1507
1508
|
class: "image-overlay__rotate-handle",
|
|
1508
1509
|
style: R({ left: `${C.value / 2 - 7}px` }),
|
|
1509
1510
|
title: G(n)("imageOverlay.rotate"),
|
|
1510
1511
|
onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
|
|
1511
|
-
}, null, 44,
|
|
1512
|
-
s.value ? (V(), N("div",
|
|
1513
|
-
l.value ? (V(), N("div",
|
|
1512
|
+
}, null, 44, ha),
|
|
1513
|
+
s.value ? (V(), N("div", ga, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
|
|
1514
|
+
l.value ? (V(), N("div", _a, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
|
|
1514
1515
|
], 36)) : M("", !0);
|
|
1515
1516
|
}
|
|
1516
|
-
}), [["__scopeId", "data-v-4c3d1a1d"]]),
|
|
1517
|
+
}), [["__scopeId", "data-v-4c3d1a1d"]]), Ca = /* @__PURE__ */ I({
|
|
1517
1518
|
__name: "HeaderFooterSelectionOverlay",
|
|
1518
1519
|
props: {
|
|
1519
1520
|
pagesContainer: {},
|
|
@@ -1563,7 +1564,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1563
1564
|
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Qt(t.hiddenContainer);
|
|
1564
1565
|
}), (e, t) => null;
|
|
1565
1566
|
}
|
|
1566
|
-
}),
|
|
1567
|
+
}), wa = { class: "hf-editor-label" }, Ta = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1567
1568
|
__name: "InlineHeaderFooterEditor",
|
|
1568
1569
|
props: {
|
|
1569
1570
|
edit: {},
|
|
@@ -1606,7 +1607,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1606
1607
|
class: "hf-inline-editor",
|
|
1607
1608
|
style: R(l.value),
|
|
1608
1609
|
role: "presentation"
|
|
1609
|
-
}, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span",
|
|
1610
|
+
}, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", wa, W(c.value), 1), P("div", {
|
|
1610
1611
|
class: "hf-options",
|
|
1611
1612
|
onMousedown: n[5] ||= q(() => {}, ["stop"])
|
|
1612
1613
|
}, [F(G(a), {
|
|
@@ -1656,7 +1657,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1656
1657
|
})
|
|
1657
1658
|
], 2)) : M("", !0)], 32)], 2)], 4));
|
|
1658
1659
|
}
|
|
1659
|
-
}), [["__scopeId", "data-v-a0bd3730"]]),
|
|
1660
|
+
}), [["__scopeId", "data-v-a0bd3730"]]), Ea = ["title", "aria-label"], Da = /* @__PURE__ */ I({
|
|
1660
1661
|
__name: "OutlineToggleButton",
|
|
1661
1662
|
props: {
|
|
1662
1663
|
leftOffset: {},
|
|
@@ -1679,9 +1680,9 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1679
1680
|
}, [F(i, {
|
|
1680
1681
|
name: "format_list_bulleted",
|
|
1681
1682
|
size: 20
|
|
1682
|
-
})], 44,
|
|
1683
|
+
})], 44, Ea));
|
|
1683
1684
|
}
|
|
1684
|
-
}),
|
|
1685
|
+
}), Oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1685
1686
|
__name: "PageIndicator",
|
|
1686
1687
|
props: {
|
|
1687
1688
|
currentPage: {},
|
|
@@ -1700,7 +1701,7 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1700
1701
|
total: e.totalPages
|
|
1701
1702
|
})), 5));
|
|
1702
1703
|
}
|
|
1703
|
-
}), [["__scopeId", "data-v-f1904974"]]),
|
|
1704
|
+
}), [["__scopeId", "data-v-f1904974"]]), ka = ["data-folio-block-id"], Aa = ["data-folio-block-id", "title"], ja = 2.5, Ma = 5, Na = 6, Pa = 2, Fa = 2, Ia = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1704
1705
|
__name: "TemplateDirectivesOverlay",
|
|
1705
1706
|
props: {
|
|
1706
1707
|
getView: { type: Function },
|
|
@@ -1714,19 +1715,19 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1714
1715
|
setup(e) {
|
|
1715
1716
|
let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
|
|
1716
1717
|
function a(e) {
|
|
1717
|
-
let t = e -
|
|
1718
|
-
return t <= 0 ? 0 : Math.floor(t /
|
|
1718
|
+
let t = e - Na - ja - Pa;
|
|
1719
|
+
return t <= 0 ? 0 : Math.floor(t / Ma);
|
|
1719
1720
|
}
|
|
1720
1721
|
function o(e, t, n) {
|
|
1721
1722
|
let r = a(n), i = Math.min(Math.max(0, e), r);
|
|
1722
|
-
return t -
|
|
1723
|
+
return t - Na - ja - (r - i) * Ma;
|
|
1723
1724
|
}
|
|
1724
1725
|
function s(e, t) {
|
|
1725
|
-
if (t.length === 0) return e.bottom - e.top >=
|
|
1726
|
+
if (t.length === 0) return e.bottom - e.top >= Fa ? [e] : [];
|
|
1726
1727
|
let n = [];
|
|
1727
1728
|
for (let r of t) {
|
|
1728
1729
|
let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
|
|
1729
|
-
i - t >=
|
|
1730
|
+
i - t >= Fa && n.push({
|
|
1730
1731
|
top: t,
|
|
1731
1732
|
bottom: i
|
|
1732
1733
|
});
|
|
@@ -1888,10 +1889,10 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1888
1889
|
position: "absolute",
|
|
1889
1890
|
left: `${t.railX * e.zoom}px`,
|
|
1890
1891
|
top: `${n.top * e.zoom}px`,
|
|
1891
|
-
width: `${
|
|
1892
|
+
width: `${ja * e.zoom}px`,
|
|
1892
1893
|
height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
|
|
1893
1894
|
})
|
|
1894
|
-
}, null, 14,
|
|
1895
|
+
}, null, 14, ka))), 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
1896
|
key: `d:${n}:${i}`,
|
|
1896
1897
|
class: L(se(t.range)),
|
|
1897
1898
|
"data-folio-block-id": S(t.range),
|
|
@@ -1903,9 +1904,14 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1903
1904
|
width: `${(r.width + 2) * e.zoom}px`,
|
|
1904
1905
|
height: `${Math.max(0, r.height - 2) * e.zoom}px`
|
|
1905
1906
|
})
|
|
1906
|
-
}, null, 14,
|
|
1907
|
+
}, null, 14, Aa))), 128))], 64))), 128))], 32));
|
|
1907
1908
|
}
|
|
1908
|
-
}), [["__scopeId", "data-v-101928bf"]]),
|
|
1909
|
+
}), [["__scopeId", "data-v-101928bf"]]), La = [
|
|
1910
|
+
"href",
|
|
1911
|
+
"rel",
|
|
1912
|
+
"target",
|
|
1913
|
+
"title"
|
|
1914
|
+
], Ra = ["title"], za = ["title"], Ba = ["title"], Va = { class: "docx-hyperlink-popup__edit-row" }, Ha = ["placeholder", "onKeydown"], Ua = { class: "docx-hyperlink-popup__edit-row" }, Wa = ["onKeydown"], Ga = ["disabled"], Ka = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
1909
1915
|
__name: "HyperlinkPopup",
|
|
1910
1916
|
props: {
|
|
1911
1917
|
data: {},
|
|
@@ -1919,68 +1925,70 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1919
1925
|
"close"
|
|
1920
1926
|
],
|
|
1921
1927
|
setup(e, { emit: t }) {
|
|
1922
|
-
let { t: n } = r(), i =
|
|
1923
|
-
left: (
|
|
1924
|
-
top: (
|
|
1928
|
+
let { t: n } = r(), i = un(void 0), a = e, o = t, s = H(!1), c = H(""), l = H(""), u = H(null), d = k(() => ({
|
|
1929
|
+
left: (a.data?.position.left ?? 0) + "px",
|
|
1930
|
+
top: (a.data?.position.top ?? 0) + "px"
|
|
1925
1931
|
}));
|
|
1926
|
-
K(() =>
|
|
1927
|
-
|
|
1932
|
+
K(() => a.data?.href, () => {
|
|
1933
|
+
s.value = !1;
|
|
1928
1934
|
});
|
|
1929
|
-
let
|
|
1930
|
-
function p() {
|
|
1931
|
-
f &&= (clearTimeout(f), null), d &&= (document.removeEventListener("mousedown", d), null);
|
|
1932
|
-
}
|
|
1933
|
-
K(() => i.data, (e) => {
|
|
1934
|
-
p(), e && (d = (e) => {
|
|
1935
|
-
let t = l.value, n = e.target;
|
|
1936
|
-
t && n instanceof Node && !t.contains(n) && a("close");
|
|
1937
|
-
}, f = setTimeout(() => {
|
|
1938
|
-
d && document.addEventListener("mousedown", d);
|
|
1939
|
-
}, 0));
|
|
1940
|
-
}, { immediate: !0 }), z(p);
|
|
1935
|
+
let f = null, p = null;
|
|
1941
1936
|
function m() {
|
|
1942
|
-
|
|
1937
|
+
p &&= (clearTimeout(p), null), f &&= (document.removeEventListener("mousedown", f), null);
|
|
1943
1938
|
}
|
|
1939
|
+
K(() => a.data, (e) => {
|
|
1940
|
+
m(), e && (f = (e) => {
|
|
1941
|
+
let t = u.value, n = e.target;
|
|
1942
|
+
t && n instanceof Node && !t.contains(n) && o("close");
|
|
1943
|
+
}, p = setTimeout(() => {
|
|
1944
|
+
f && document.addEventListener("mousedown", f);
|
|
1945
|
+
}, 0));
|
|
1946
|
+
}, { immediate: !0 }), z(m);
|
|
1944
1947
|
function h() {
|
|
1945
|
-
c.value
|
|
1948
|
+
a.data && (c.value = a.data.displayText, l.value = a.data.href, s.value = !0);
|
|
1946
1949
|
}
|
|
1947
1950
|
function g() {
|
|
1948
|
-
|
|
1951
|
+
l.value.trim() && (o("edit", c.value, l.value), s.value = !1);
|
|
1952
|
+
}
|
|
1953
|
+
function _() {
|
|
1954
|
+
a.data && (o("copy", a.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(a.data.href).catch(() => {}));
|
|
1949
1955
|
}
|
|
1950
1956
|
return (t, r) => e.data ? (V(), N("div", {
|
|
1951
1957
|
key: 0,
|
|
1952
1958
|
ref_key: "popupRef",
|
|
1953
|
-
ref:
|
|
1954
|
-
class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit":
|
|
1955
|
-
style: R(
|
|
1959
|
+
ref: u,
|
|
1960
|
+
class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
|
|
1961
|
+
style: R(d.value),
|
|
1956
1962
|
onMousedown: r[6] ||= q(() => {}, ["stop"])
|
|
1957
|
-
}, [
|
|
1963
|
+
}, [s.value ? (V(), N(D, { key: 1 }, [P("div", Va, [Le(P("input", {
|
|
1958
1964
|
class: "docx-hyperlink-popup__input",
|
|
1959
1965
|
placeholder: G(n)("displayText"),
|
|
1960
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
1961
|
-
onKeydown: [Re(q(
|
|
1962
|
-
}, null, 40,
|
|
1966
|
+
"onUpdate:modelValue": r[2] ||= (e) => c.value = e,
|
|
1967
|
+
onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
|
|
1968
|
+
}, null, 40, Ha), [[Pe, c.value]])]), P("div", Ua, [Le(P("input", {
|
|
1963
1969
|
class: "docx-hyperlink-popup__input",
|
|
1964
1970
|
placeholder: "https://...",
|
|
1965
|
-
"onUpdate:modelValue": r[4] ||= (e) =>
|
|
1966
|
-
onKeydown: [Re(q(
|
|
1967
|
-
}, null, 40,
|
|
1971
|
+
"onUpdate:modelValue": r[4] ||= (e) => l.value = e,
|
|
1972
|
+
onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
|
|
1973
|
+
}, null, 40, Wa), [[Pe, l.value]]), P("button", {
|
|
1968
1974
|
class: "docx-hyperlink-popup__apply",
|
|
1969
|
-
disabled: !
|
|
1970
|
-
onClick: q(
|
|
1971
|
-
}, W(G(n)("common.apply")), 9,
|
|
1972
|
-
r[10] ||= we("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-
|
|
1975
|
+
disabled: !l.value.trim(),
|
|
1976
|
+
onClick: q(g, ["prevent"])
|
|
1977
|
+
}, W(G(n)("common.apply")), 9, Ga)])], 64)) : (V(), N(D, { key: 0 }, [
|
|
1978
|
+
r[10] ||= we("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-370ef571><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-370ef571><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-370ef571></circle><path d=\"M2 12h20\" data-v-370ef571></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-370ef571></path></svg></span>", 1),
|
|
1973
1979
|
P("a", {
|
|
1974
1980
|
class: "docx-hyperlink-popup__url",
|
|
1975
1981
|
href: e.data.href,
|
|
1982
|
+
rel: G(i).rel,
|
|
1983
|
+
target: G(i).target,
|
|
1976
1984
|
title: e.data.href,
|
|
1977
1985
|
onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
|
|
1978
|
-
}, W(e.data.href), 9,
|
|
1986
|
+
}, W(e.data.href), 9, La),
|
|
1979
1987
|
r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
|
|
1980
1988
|
P("button", {
|
|
1981
1989
|
class: "docx-hyperlink-popup__btn",
|
|
1982
1990
|
title: G(n)("copyLink"),
|
|
1983
|
-
onClick: q(
|
|
1991
|
+
onClick: q(_, ["prevent"])
|
|
1984
1992
|
}, [...r[7] ||= [P("svg", {
|
|
1985
1993
|
width: "18",
|
|
1986
1994
|
height: "18",
|
|
@@ -1997,12 +2005,12 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
1997
2005
|
height: "13",
|
|
1998
2006
|
rx: "2",
|
|
1999
2007
|
ry: "2"
|
|
2000
|
-
}), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8,
|
|
2008
|
+
}), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Ra),
|
|
2001
2009
|
e.readOnly ? M("", !0) : (V(), N("button", {
|
|
2002
2010
|
key: 0,
|
|
2003
2011
|
class: "docx-hyperlink-popup__btn",
|
|
2004
2012
|
title: G(n)("editLink"),
|
|
2005
|
-
onClick: q(
|
|
2013
|
+
onClick: q(h, ["prevent"])
|
|
2006
2014
|
}, [...r[8] ||= [P("svg", {
|
|
2007
2015
|
width: "18",
|
|
2008
2016
|
height: "18",
|
|
@@ -2012,43 +2020,43 @@ var fa = ["data-handle", "onMousedown"], pa = ["title"], ma = {
|
|
|
2012
2020
|
"stroke-width": "2",
|
|
2013
2021
|
"stroke-linecap": "round",
|
|
2014
2022
|
"stroke-linejoin": "round"
|
|
2015
|
-
}, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8,
|
|
2023
|
+
}, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, za)),
|
|
2016
2024
|
e.readOnly ? M("", !0) : (V(), N("button", {
|
|
2017
2025
|
key: 1,
|
|
2018
2026
|
class: "docx-hyperlink-popup__btn",
|
|
2019
2027
|
title: G(n)("removeLink"),
|
|
2020
2028
|
onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
|
|
2021
|
-
}, [...r[9] ||= [we("<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-
|
|
2029
|
+
}, [...r[9] ||= [we("<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-370ef571><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-370ef571></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-370ef571></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-370ef571></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-370ef571></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-370ef571></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-370ef571></line></svg>", 1)]], 8, Ba))
|
|
2022
2030
|
], 64))], 38)) : M("", !0);
|
|
2023
2031
|
}
|
|
2024
|
-
}), [["__scopeId", "data-v-
|
|
2032
|
+
}), [["__scopeId", "data-v-370ef571"]]);
|
|
2025
2033
|
//#endregion
|
|
2026
2034
|
//#region src/composables/commentMarks.ts
|
|
2027
|
-
function
|
|
2035
|
+
function qa(e, t) {
|
|
2028
2036
|
let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
|
|
2029
2037
|
return n === r ? null : {
|
|
2030
2038
|
from: n,
|
|
2031
2039
|
to: r
|
|
2032
2040
|
};
|
|
2033
2041
|
}
|
|
2034
|
-
function
|
|
2042
|
+
function Ja({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
|
|
2035
2043
|
let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
|
|
2036
|
-
return i ?
|
|
2044
|
+
return i ? qa(e, i) : null;
|
|
2037
2045
|
}
|
|
2038
|
-
function
|
|
2039
|
-
let i = e.state.schema.marks.comment, a =
|
|
2046
|
+
function Ya(e, t, n, r) {
|
|
2047
|
+
let i = e.state.schema.marks.comment, a = qa(e.state.doc.content.size, t);
|
|
2040
2048
|
if (!i || !a) return !1;
|
|
2041
2049
|
let o = e.state.tr;
|
|
2042
|
-
return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId:
|
|
2050
|
+
return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: pn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Nt.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
|
|
2043
2051
|
}
|
|
2044
|
-
function
|
|
2045
|
-
let n = e.state.schema.marks.comment, r =
|
|
2046
|
-
!n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId:
|
|
2052
|
+
function Xa(e, t) {
|
|
2053
|
+
let n = e.state.schema.marks.comment, r = qa(e.state.doc.content.size, t);
|
|
2054
|
+
!n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: pn })));
|
|
2047
2055
|
}
|
|
2048
2056
|
//#endregion
|
|
2049
2057
|
//#region src/composables/useCommentLifecycle.ts
|
|
2050
|
-
var
|
|
2051
|
-
function
|
|
2058
|
+
var Za = 408, Qa = 12;
|
|
2059
|
+
function $a(e) {
|
|
2052
2060
|
let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
|
|
2053
2061
|
function o(t) {
|
|
2054
2062
|
let n = e.editorView.value, r = e.pagesContainer.value;
|
|
@@ -2081,7 +2089,7 @@ function Za(e) {
|
|
|
2081
2089
|
r.value = null;
|
|
2082
2090
|
return;
|
|
2083
2091
|
}
|
|
2084
|
-
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left +
|
|
2092
|
+
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Qa : l.width / 2 + Za;
|
|
2085
2093
|
r.value = {
|
|
2086
2094
|
top: c.top - l.top,
|
|
2087
2095
|
left: Math.max(16, Math.min(d, l.width - 16)),
|
|
@@ -2092,7 +2100,7 @@ function Za(e) {
|
|
|
2092
2100
|
function c() {
|
|
2093
2101
|
let s = e.editorView.value;
|
|
2094
2102
|
if (!s) return;
|
|
2095
|
-
let c = r.value, l = s.state.selection, u =
|
|
2103
|
+
let c = r.value, l = s.state.selection, u = Ja({
|
|
2096
2104
|
docSize: s.state.doc.content.size,
|
|
2097
2105
|
capturedRange: c ? {
|
|
2098
2106
|
from: c.from,
|
|
@@ -2111,7 +2119,7 @@ function Za(e) {
|
|
|
2111
2119
|
r.value = null;
|
|
2112
2120
|
return;
|
|
2113
2121
|
}
|
|
2114
|
-
if (!
|
|
2122
|
+
if (!Ya(s, u, pn, { selectEnd: !0 })) {
|
|
2115
2123
|
r.value = null, i.value = null;
|
|
2116
2124
|
return;
|
|
2117
2125
|
}
|
|
@@ -2124,11 +2132,11 @@ function Za(e) {
|
|
|
2124
2132
|
let n = e.editorView.value, r = i.value;
|
|
2125
2133
|
if (!n || !r) return !1;
|
|
2126
2134
|
let a = e.createComment(t);
|
|
2127
|
-
return
|
|
2135
|
+
return Ya(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
|
|
2128
2136
|
}
|
|
2129
2137
|
function d() {
|
|
2130
2138
|
let t = e.editorView.value;
|
|
2131
|
-
t && i.value &&
|
|
2139
|
+
t && i.value && Xa(t, i.value), l();
|
|
2132
2140
|
}
|
|
2133
2141
|
return {
|
|
2134
2142
|
isAddingComment: t,
|
|
@@ -2142,8 +2150,8 @@ function Za(e) {
|
|
|
2142
2150
|
}
|
|
2143
2151
|
//#endregion
|
|
2144
2152
|
//#region src/composables/useCommentManagement.ts
|
|
2145
|
-
function
|
|
2146
|
-
let t =
|
|
2153
|
+
function eo(e) {
|
|
2154
|
+
let t = mn(), n = H([]), r = H(!1);
|
|
2147
2155
|
function i() {
|
|
2148
2156
|
r.value = !0;
|
|
2149
2157
|
}
|
|
@@ -2158,12 +2166,12 @@ function Qa(e) {
|
|
|
2158
2166
|
i(), c([...s.value, e]);
|
|
2159
2167
|
}
|
|
2160
2168
|
function u(n, r, i) {
|
|
2161
|
-
return
|
|
2169
|
+
return hn(t, s.value, e.editorView.value), gn(t, n, i ?? e.author(), r);
|
|
2162
2170
|
}
|
|
2163
2171
|
function d() {
|
|
2164
2172
|
if (a(), o.value) return;
|
|
2165
2173
|
let n = e.getDocument()?.package.document.comments;
|
|
2166
|
-
|
|
2174
|
+
hn(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
|
|
2167
2175
|
}
|
|
2168
2176
|
function f(e, t) {
|
|
2169
2177
|
l(u(t, e));
|
|
@@ -2188,7 +2196,7 @@ function Qa(e) {
|
|
|
2188
2196
|
}
|
|
2189
2197
|
function _(t, n) {
|
|
2190
2198
|
let r = e.editorView.value;
|
|
2191
|
-
r && (n ?
|
|
2199
|
+
r && (n ? _n : $)(t)(r.state, r.dispatch);
|
|
2192
2200
|
}
|
|
2193
2201
|
function v(e) {
|
|
2194
2202
|
_(e, !0);
|
|
@@ -2198,11 +2206,11 @@ function Qa(e) {
|
|
|
2198
2206
|
}
|
|
2199
2207
|
function b(t, n) {
|
|
2200
2208
|
let r = e.editorView.value;
|
|
2201
|
-
r &&
|
|
2209
|
+
r && vn(t, n)(r.state, r.dispatch);
|
|
2202
2210
|
}
|
|
2203
2211
|
function x(t, n) {
|
|
2204
2212
|
let r = e.editorView.value;
|
|
2205
|
-
r &&
|
|
2213
|
+
r && Sn(t, n)(r.state, r.dispatch);
|
|
2206
2214
|
}
|
|
2207
2215
|
return {
|
|
2208
2216
|
comments: s,
|
|
@@ -2225,8 +2233,8 @@ function Qa(e) {
|
|
|
2225
2233
|
}
|
|
2226
2234
|
//#endregion
|
|
2227
2235
|
//#region src/utils/imageClipboard.ts
|
|
2228
|
-
function
|
|
2229
|
-
let r =
|
|
2236
|
+
function to(e, t, n) {
|
|
2237
|
+
let r = wn(e.state), i = e.state.schema.marks.insertion;
|
|
2230
2238
|
if (!r || !i) return;
|
|
2231
2239
|
let a = t.selection.from, o = a - n.nodeSize;
|
|
2232
2240
|
o < 0 || t.addMark(o, a, i.create({
|
|
@@ -2235,7 +2243,7 @@ function $a(e, t, n) {
|
|
|
2235
2243
|
date: r.date
|
|
2236
2244
|
}));
|
|
2237
2245
|
}
|
|
2238
|
-
function
|
|
2246
|
+
function no(e, t) {
|
|
2239
2247
|
let n = e.state.doc.nodeAt(t);
|
|
2240
2248
|
if (!n || n.type.name !== "image") return;
|
|
2241
2249
|
let r = n.attrs.src;
|
|
@@ -2249,7 +2257,7 @@ function eo(e, t) {
|
|
|
2249
2257
|
e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
2250
2258
|
});
|
|
2251
2259
|
}
|
|
2252
|
-
function
|
|
2260
|
+
function ro(e) {
|
|
2253
2261
|
return new Promise((t, n) => {
|
|
2254
2262
|
let r = new FileReader();
|
|
2255
2263
|
r.onload = () => {
|
|
@@ -2257,7 +2265,7 @@ function to(e) {
|
|
|
2257
2265
|
}, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
|
|
2258
2266
|
});
|
|
2259
2267
|
}
|
|
2260
|
-
function
|
|
2268
|
+
function io(e) {
|
|
2261
2269
|
return new Promise((t) => {
|
|
2262
2270
|
let n = new Image();
|
|
2263
2271
|
n.onload = () => t({
|
|
@@ -2269,7 +2277,7 @@ function no(e) {
|
|
|
2269
2277
|
}), n.src = e;
|
|
2270
2278
|
});
|
|
2271
2279
|
}
|
|
2272
|
-
function
|
|
2280
|
+
function ao(e, t, n, r) {
|
|
2273
2281
|
let i = e.state.schema.nodes.image;
|
|
2274
2282
|
if (!i) return;
|
|
2275
2283
|
let a = i.create({
|
|
@@ -2280,23 +2288,23 @@ function ro(e, t, n, r) {
|
|
|
2280
2288
|
wrapType: "inline",
|
|
2281
2289
|
displayMode: "inline"
|
|
2282
2290
|
}), o = e.state.tr.replaceSelectionWith(a);
|
|
2283
|
-
|
|
2291
|
+
to(e, o, a), e.dispatch(o);
|
|
2284
2292
|
}
|
|
2285
|
-
async function
|
|
2293
|
+
async function oo(e) {
|
|
2286
2294
|
try {
|
|
2287
2295
|
let t = await navigator.clipboard.read();
|
|
2288
2296
|
for (let n of t) {
|
|
2289
2297
|
let t = n.types.find((e) => e.startsWith("image/"));
|
|
2290
2298
|
if (t) {
|
|
2291
|
-
let r = await
|
|
2292
|
-
a > 612 && (o = Math.round(612 / a * o), a = 612),
|
|
2299
|
+
let r = await ro(await n.getType(t)), i = await io(r), a = i.width, o = i.height;
|
|
2300
|
+
a > 612 && (o = Math.round(612 / a * o), a = 612), ao(e, r, a, o);
|
|
2293
2301
|
return;
|
|
2294
2302
|
}
|
|
2295
2303
|
if (n.types.includes("text/html")) {
|
|
2296
2304
|
let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
|
|
2297
2305
|
if (r) {
|
|
2298
2306
|
let n = /data-width="(?<w>\d+)"/u.exec(t)?.groups?.w, i = /data-height="(?<h>\d+)"/u.exec(t)?.groups?.h, a = n ? Number(n) : 200, o = i ? Number(i) : 200;
|
|
2299
|
-
|
|
2307
|
+
ao(e, r, a || 200, o || 200);
|
|
2300
2308
|
return;
|
|
2301
2309
|
}
|
|
2302
2310
|
}
|
|
@@ -2317,14 +2325,14 @@ async function io(e) {
|
|
|
2317
2325
|
}
|
|
2318
2326
|
}
|
|
2319
2327
|
}
|
|
2320
|
-
function
|
|
2328
|
+
function so(e, t) {
|
|
2321
2329
|
let n = e.state.doc.nodeAt(t);
|
|
2322
2330
|
if (!n || n.type.name !== "image") return;
|
|
2323
2331
|
let r = document.createElement("input");
|
|
2324
2332
|
r.type = "file", r.accept = "image/*", r.onchange = async () => {
|
|
2325
2333
|
let i = r.files?.[0];
|
|
2326
2334
|
if (!i) return;
|
|
2327
|
-
let a = await
|
|
2335
|
+
let a = await ro(i), o = await io(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
|
|
2328
2336
|
try {
|
|
2329
2337
|
let r = e.state.tr.setNodeMarkup(t, void 0, {
|
|
2330
2338
|
...n.attrs,
|
|
@@ -2339,7 +2347,7 @@ function ao(e, t) {
|
|
|
2339
2347
|
}
|
|
2340
2348
|
//#endregion
|
|
2341
2349
|
//#region src/composables/useContextMenus.ts
|
|
2342
|
-
var
|
|
2350
|
+
var co = /* @__PURE__ */ new Set([
|
|
2343
2351
|
"inline",
|
|
2344
2352
|
"square",
|
|
2345
2353
|
"tight",
|
|
@@ -2348,16 +2356,16 @@ var oo = /* @__PURE__ */ new Set([
|
|
|
2348
2356
|
"behind",
|
|
2349
2357
|
"inFront"
|
|
2350
2358
|
]);
|
|
2351
|
-
function
|
|
2352
|
-
return typeof e == "string" &&
|
|
2359
|
+
function lo(e) {
|
|
2360
|
+
return typeof e == "string" && co.has(e);
|
|
2353
2361
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return
|
|
2362
|
+
function uo(e) {
|
|
2363
|
+
return lo(e) ? e : "inline";
|
|
2356
2364
|
}
|
|
2357
|
-
function
|
|
2365
|
+
function fo(e) {
|
|
2358
2366
|
return e === "left" || e === "right" || e === "none" ? e : null;
|
|
2359
2367
|
}
|
|
2360
|
-
function
|
|
2368
|
+
function po(e) {
|
|
2361
2369
|
let { t } = r(), n = H({
|
|
2362
2370
|
isOpen: !1,
|
|
2363
2371
|
position: {
|
|
@@ -2431,7 +2439,7 @@ function uo(e) {
|
|
|
2431
2439
|
i.value = l(o, a, {
|
|
2432
2440
|
x: t.clientX,
|
|
2433
2441
|
y: t.clientY
|
|
2434
|
-
},
|
|
2442
|
+
}, uo(s.attrs.wrapType), fo(s.attrs.cssFloat)), n.value.isOpen = !1;
|
|
2435
2443
|
return;
|
|
2436
2444
|
}
|
|
2437
2445
|
}
|
|
@@ -2466,7 +2474,7 @@ function uo(e) {
|
|
|
2466
2474
|
!o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
|
|
2467
2475
|
x: t.clientX,
|
|
2468
2476
|
y: t.clientY
|
|
2469
|
-
},
|
|
2477
|
+
}, uo(o.attrs.wrapType), fo(o.attrs.cssFloat)), n.value.isOpen = !1);
|
|
2470
2478
|
}
|
|
2471
2479
|
function f(t) {
|
|
2472
2480
|
let n = e.editorView.value, r = i.value;
|
|
@@ -2490,16 +2498,16 @@ function uo(e) {
|
|
|
2490
2498
|
case "cut":
|
|
2491
2499
|
if (e.selectedImage.value) {
|
|
2492
2500
|
let t = e.selectedImage.value.pmPos;
|
|
2493
|
-
|
|
2501
|
+
no(n, t);
|
|
2494
2502
|
let r = n.state.doc.nodeAt(t);
|
|
2495
2503
|
r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
|
|
2496
2504
|
} else n.focus(), document.execCommand("cut");
|
|
2497
2505
|
break;
|
|
2498
2506
|
case "copy":
|
|
2499
|
-
e.selectedImage.value ? (
|
|
2507
|
+
e.selectedImage.value ? (no(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
|
|
2500
2508
|
break;
|
|
2501
2509
|
case "paste":
|
|
2502
|
-
|
|
2510
|
+
oo(n).then(() => e.onPaste?.()).catch(() => void 0);
|
|
2503
2511
|
break;
|
|
2504
2512
|
case "pasteAsPlainText":
|
|
2505
2513
|
navigator.clipboard.readText().then((t) => {
|
|
@@ -2520,7 +2528,7 @@ function uo(e) {
|
|
|
2520
2528
|
e.selectedImage.value && (e.showImageProperties.value = !0);
|
|
2521
2529
|
break;
|
|
2522
2530
|
case "replaceImage":
|
|
2523
|
-
e.selectedImage.value &&
|
|
2531
|
+
e.selectedImage.value && so(n, e.selectedImage.value.pmPos);
|
|
2524
2532
|
break;
|
|
2525
2533
|
case "deleteImage":
|
|
2526
2534
|
if (e.selectedImage.value) {
|
|
@@ -2558,7 +2566,7 @@ function uo(e) {
|
|
|
2558
2566
|
}
|
|
2559
2567
|
//#endregion
|
|
2560
2568
|
//#region src/composables/useDocumentLifecycle.ts
|
|
2561
|
-
function
|
|
2569
|
+
function mo(e) {
|
|
2562
2570
|
async function t(t) {
|
|
2563
2571
|
e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
|
|
2564
2572
|
}
|
|
@@ -2577,19 +2585,19 @@ function fo(e) {
|
|
|
2577
2585
|
}
|
|
2578
2586
|
//#endregion
|
|
2579
2587
|
//#region src/composables/useDocxEditorRefApi.ts
|
|
2580
|
-
var
|
|
2588
|
+
var ho = Date.now(), go = async (e, t) => {
|
|
2581
2589
|
let n = await e.saveDocument(t);
|
|
2582
2590
|
if (!n) return null;
|
|
2583
2591
|
let r = await n.arrayBuffer();
|
|
2584
2592
|
return e.clearCommentsDirty(), e.onSave?.(r), r;
|
|
2585
2593
|
};
|
|
2586
|
-
function
|
|
2594
|
+
function _o(e) {
|
|
2587
2595
|
let t = [];
|
|
2588
2596
|
function n() {
|
|
2589
2597
|
e.onPrint?.(), window.print();
|
|
2590
2598
|
}
|
|
2591
2599
|
function r(t) {
|
|
2592
|
-
return
|
|
2600
|
+
return go({
|
|
2593
2601
|
clearCommentsDirty: e.clearCommentsDirty,
|
|
2594
2602
|
onSave: e.onSave,
|
|
2595
2603
|
saveDocument: e.saveDocument
|
|
@@ -2598,11 +2606,11 @@ function ho(e) {
|
|
|
2598
2606
|
function i(t, n) {
|
|
2599
2607
|
let r = e.pagesRef.value;
|
|
2600
2608
|
if (!r) return !1;
|
|
2601
|
-
let i =
|
|
2609
|
+
let i = Qn(r, t), a = i.at(0);
|
|
2602
2610
|
return a ? (a.scrollIntoView({
|
|
2603
2611
|
block: "center",
|
|
2604
2612
|
behavior: "smooth"
|
|
2605
|
-
}), n?.highlight &&
|
|
2613
|
+
}), n?.highlight && $n(i, n.highlight), !0) : !1;
|
|
2606
2614
|
}
|
|
2607
2615
|
function a() {
|
|
2608
2616
|
return e.zoom.value;
|
|
@@ -2630,9 +2638,9 @@ function ho(e) {
|
|
|
2630
2638
|
}
|
|
2631
2639
|
function f(t) {
|
|
2632
2640
|
let n = e.editorView.value, r = e.pagesRef.value, i = e.scrollRootRef.value;
|
|
2633
|
-
return !n || !r || !i ? /* @__PURE__ */ new Map() :
|
|
2641
|
+
return !n || !r || !i ? /* @__PURE__ */ new Map() : tr({
|
|
2634
2642
|
blockIds: t,
|
|
2635
|
-
snapshot:
|
|
2643
|
+
snapshot: Wn(n.state.doc),
|
|
2636
2644
|
pagesContainer: r,
|
|
2637
2645
|
scrollRoot: i
|
|
2638
2646
|
});
|
|
@@ -2642,7 +2650,7 @@ function ho(e) {
|
|
|
2642
2650
|
}
|
|
2643
2651
|
function m(t) {
|
|
2644
2652
|
let n = e.pagesRef.value;
|
|
2645
|
-
return n ?
|
|
2653
|
+
return n ? er(n, t) : () => {};
|
|
2646
2654
|
}
|
|
2647
2655
|
function h() {
|
|
2648
2656
|
return o ??= {
|
|
@@ -2672,7 +2680,7 @@ function ho(e) {
|
|
|
2672
2680
|
getPageNumberForPmPos: (t) => {
|
|
2673
2681
|
let n = e.layout.value;
|
|
2674
2682
|
if (!n) return null;
|
|
2675
|
-
let r =
|
|
2683
|
+
let r = Tn(n, t);
|
|
2676
2684
|
return r == null ? null : r + 1;
|
|
2677
2685
|
},
|
|
2678
2686
|
getBlockRect: p,
|
|
@@ -2687,7 +2695,7 @@ function ho(e) {
|
|
|
2687
2695
|
function _() {
|
|
2688
2696
|
let t = e.layout.value, n = e.editorView.value;
|
|
2689
2697
|
if (!t || !n) return 0;
|
|
2690
|
-
let r =
|
|
2698
|
+
let r = Tn(t, n.state.selection.from);
|
|
2691
2699
|
return r == null ? 0 : r + 1;
|
|
2692
2700
|
}
|
|
2693
2701
|
function v(t) {
|
|
@@ -2722,10 +2730,10 @@ function ho(e) {
|
|
|
2722
2730
|
ensureEditorView: () => e.editor.ensureView(),
|
|
2723
2731
|
createAIEditSnapshot: () => {
|
|
2724
2732
|
let t = e.editorView.value;
|
|
2725
|
-
return t ?
|
|
2733
|
+
return t ? Gn(t.state.doc, He(t.state)) : null;
|
|
2726
2734
|
},
|
|
2727
2735
|
applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
|
|
2728
|
-
|
|
2736
|
+
Hn(r.version);
|
|
2729
2737
|
let a = e.editorView.value;
|
|
2730
2738
|
if (!a) {
|
|
2731
2739
|
let e = "committed";
|
|
@@ -2735,11 +2743,11 @@ function ho(e) {
|
|
|
2735
2743
|
reason: "unsupportedBlock"
|
|
2736
2744
|
}));
|
|
2737
2745
|
return {
|
|
2738
|
-
version:
|
|
2746
|
+
version: Rn,
|
|
2739
2747
|
status: e,
|
|
2740
2748
|
applied: [],
|
|
2741
2749
|
skipped: t,
|
|
2742
|
-
issues:
|
|
2750
|
+
issues: Jn(r.operations, t),
|
|
2743
2751
|
receipts: [],
|
|
2744
2752
|
undoHandle: null
|
|
2745
2753
|
};
|
|
@@ -2751,7 +2759,7 @@ function ho(e) {
|
|
|
2751
2759
|
dispatch: (e) => {
|
|
2752
2760
|
a.dispatch(on(e)), c.state = a.state;
|
|
2753
2761
|
}
|
|
2754
|
-
}, l =
|
|
2762
|
+
}, l = Vn({
|
|
2755
2763
|
view: c,
|
|
2756
2764
|
snapshot: n,
|
|
2757
2765
|
batch: r,
|
|
@@ -2759,7 +2767,7 @@ function ho(e) {
|
|
|
2759
2767
|
createCommentId: (t) => e.createAIEditComment(t, i),
|
|
2760
2768
|
createUndoHandle: () => ({
|
|
2761
2769
|
type: "documentOperationUndo",
|
|
2762
|
-
id: `vue-${String(
|
|
2770
|
+
id: `vue-${String(ho++)}`
|
|
2763
2771
|
})
|
|
2764
2772
|
});
|
|
2765
2773
|
return l.undoHandle !== null && t.push({
|
|
@@ -2797,7 +2805,7 @@ function ho(e) {
|
|
|
2797
2805
|
},
|
|
2798
2806
|
applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
|
|
2799
2807
|
let a = e.editorView.value;
|
|
2800
|
-
return a ?
|
|
2808
|
+
return a ? Bn({
|
|
2801
2809
|
view: a,
|
|
2802
2810
|
snapshot: t,
|
|
2803
2811
|
operations: n,
|
|
@@ -2814,26 +2822,26 @@ function ho(e) {
|
|
|
2814
2822
|
},
|
|
2815
2823
|
acceptAIEditOperation: (t) => {
|
|
2816
2824
|
let n = e.editorView.value;
|
|
2817
|
-
return n ?
|
|
2825
|
+
return n ? _n(t)(n.state, n.dispatch) : !1;
|
|
2818
2826
|
},
|
|
2819
2827
|
rejectAIEditOperation: (t) => {
|
|
2820
2828
|
let n = e.editorView.value;
|
|
2821
|
-
return n ?
|
|
2829
|
+
return n ? $(t)(n.state, n.dispatch) : !1;
|
|
2822
2830
|
},
|
|
2823
2831
|
undo: s,
|
|
2824
2832
|
redo: c,
|
|
2825
2833
|
scrollToAIEditOperation: (t) => {
|
|
2826
2834
|
let n = e.editorView.value;
|
|
2827
2835
|
if (!n) return !1;
|
|
2828
|
-
let r =
|
|
2836
|
+
let r = bn(n.state, t);
|
|
2829
2837
|
if (!r) return !1;
|
|
2830
|
-
let { from: i, to: a } =
|
|
2838
|
+
let { from: i, to: a } = lr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
|
|
2831
2839
|
return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
2832
2840
|
},
|
|
2833
2841
|
scrollToBlock: (t, n) => {
|
|
2834
2842
|
let r = e.editorView.value;
|
|
2835
2843
|
if (!r) return !1;
|
|
2836
|
-
let i =
|
|
2844
|
+
let i = ur({
|
|
2837
2845
|
blockId: t,
|
|
2838
2846
|
doc: r.state.doc,
|
|
2839
2847
|
snapshot: n
|
|
@@ -2845,7 +2853,7 @@ function ho(e) {
|
|
|
2845
2853
|
highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
|
|
2846
2854
|
let a = e.editorView.value;
|
|
2847
2855
|
if (!a) return "none";
|
|
2848
|
-
let o =
|
|
2856
|
+
let o = fr({
|
|
2849
2857
|
blockId: t,
|
|
2850
2858
|
text: n,
|
|
2851
2859
|
doc: a.state.doc,
|
|
@@ -2853,13 +2861,13 @@ function ho(e) {
|
|
|
2853
2861
|
});
|
|
2854
2862
|
if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
|
|
2855
2863
|
e.setPassageHighlight(null);
|
|
2856
|
-
let s =
|
|
2864
|
+
let s = ur({
|
|
2857
2865
|
blockId: t,
|
|
2858
2866
|
doc: a.state.doc,
|
|
2859
2867
|
snapshot: r
|
|
2860
2868
|
});
|
|
2861
2869
|
if (s === null) return "none";
|
|
2862
|
-
let c =
|
|
2870
|
+
let c = hr(t);
|
|
2863
2871
|
if (c !== null && i(c, { highlight: {} })) return "block";
|
|
2864
2872
|
let { from: l, to: u } = s, d = a.state.doc.resolve(l), f = a.state.doc.resolve(u);
|
|
2865
2873
|
return a.dispatch(a.state.tr.setSelection(Z.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
|
|
@@ -2870,11 +2878,11 @@ function ho(e) {
|
|
|
2870
2878
|
showInDocument: (t, n) => {
|
|
2871
2879
|
let r = e.editorView.value;
|
|
2872
2880
|
if (!r) return !1;
|
|
2873
|
-
let i = t.type === "textRange" ?
|
|
2881
|
+
let i = t.type === "textRange" ? dr({
|
|
2874
2882
|
range: t,
|
|
2875
2883
|
doc: r.state.doc,
|
|
2876
2884
|
snapshot: n
|
|
2877
|
-
}) :
|
|
2885
|
+
}) : ur({
|
|
2878
2886
|
blockId: t.blockId,
|
|
2879
2887
|
doc: r.state.doc,
|
|
2880
2888
|
snapshot: n
|
|
@@ -2885,7 +2893,7 @@ function ho(e) {
|
|
|
2885
2893
|
},
|
|
2886
2894
|
getSuggestions: () => {
|
|
2887
2895
|
let t = e.editorView.value;
|
|
2888
|
-
return t ?
|
|
2896
|
+
return t ? xn(t.state) : [];
|
|
2889
2897
|
},
|
|
2890
2898
|
acceptSuggestion: (t, n) => {
|
|
2891
2899
|
let r = e.editorView.value;
|
|
@@ -2893,7 +2901,7 @@ function ho(e) {
|
|
|
2893
2901
|
accepted: !1,
|
|
2894
2902
|
appliedAs: null
|
|
2895
2903
|
};
|
|
2896
|
-
let i =
|
|
2904
|
+
let i = xn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = yn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
|
|
2897
2905
|
return {
|
|
2898
2906
|
accepted: a,
|
|
2899
2907
|
appliedAs: a ? i : null
|
|
@@ -2901,23 +2909,23 @@ function ho(e) {
|
|
|
2901
2909
|
},
|
|
2902
2910
|
rejectSuggestion: (t) => {
|
|
2903
2911
|
let n = e.editorView.value;
|
|
2904
|
-
return n ?
|
|
2912
|
+
return n ? Cn(t)(n.state, n.dispatch) : !1;
|
|
2905
2913
|
},
|
|
2906
2914
|
scrollToSuggestion: (t) => {
|
|
2907
2915
|
let n = e.editorView.value;
|
|
2908
2916
|
if (!n) return !1;
|
|
2909
|
-
let r =
|
|
2917
|
+
let r = Q(n.state, t);
|
|
2910
2918
|
if (!r) return !1;
|
|
2911
|
-
let { from: i, to: a } =
|
|
2919
|
+
let { from: i, to: a } = lr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
|
|
2912
2920
|
return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
2913
2921
|
},
|
|
2914
2922
|
getTrackedChanges: () => {
|
|
2915
2923
|
let t = e.editorView.value;
|
|
2916
|
-
return t ?
|
|
2924
|
+
return t ? Yn(t.state.doc) : [];
|
|
2917
2925
|
},
|
|
2918
2926
|
getCommentAnchors: () => {
|
|
2919
2927
|
let t = e.editorView.value;
|
|
2920
|
-
return t ?
|
|
2928
|
+
return t ? qn(t.state.doc) : [];
|
|
2921
2929
|
},
|
|
2922
2930
|
getSelectionText: () => {
|
|
2923
2931
|
let t = e.editorView.value;
|
|
@@ -2925,22 +2933,22 @@ function ho(e) {
|
|
|
2925
2933
|
},
|
|
2926
2934
|
getPageText: (t) => {
|
|
2927
2935
|
let n = e.editorView.value;
|
|
2928
|
-
return n ?
|
|
2936
|
+
return n ? vr(e.layout.value, n.state.doc, t) : null;
|
|
2929
2937
|
},
|
|
2930
2938
|
getTargetPage: (t, n) => {
|
|
2931
2939
|
let r = e.editorView.value, i = e.layout.value;
|
|
2932
2940
|
if (!r || !i) return null;
|
|
2933
|
-
let a = t.type === "textRange" ?
|
|
2941
|
+
let a = t.type === "textRange" ? dr({
|
|
2934
2942
|
range: t,
|
|
2935
2943
|
doc: r.state.doc,
|
|
2936
2944
|
snapshot: n
|
|
2937
|
-
}) :
|
|
2945
|
+
}) : ur({
|
|
2938
2946
|
blockId: t.blockId,
|
|
2939
2947
|
doc: r.state.doc,
|
|
2940
2948
|
snapshot: n
|
|
2941
2949
|
});
|
|
2942
2950
|
if (a === null) return null;
|
|
2943
|
-
let o =
|
|
2951
|
+
let o = Tn(i, a.from);
|
|
2944
2952
|
return o == null ? null : o + 1;
|
|
2945
2953
|
},
|
|
2946
2954
|
getBlockRect: p,
|
|
@@ -2949,8 +2957,8 @@ function ho(e) {
|
|
|
2949
2957
|
onLayoutChange: m,
|
|
2950
2958
|
getContentControls: (t = {}) => {
|
|
2951
2959
|
let n = e.editorView.value;
|
|
2952
|
-
return n ?
|
|
2953
|
-
properties:
|
|
2960
|
+
return n ? ir(n.state.doc, t).map((e) => ({
|
|
2961
|
+
properties: nr(e.node),
|
|
2954
2962
|
path: e.path,
|
|
2955
2963
|
pmPos: e.pos
|
|
2956
2964
|
})) : [];
|
|
@@ -2958,7 +2966,7 @@ function ho(e) {
|
|
|
2958
2966
|
scrollToContentControl: (t) => {
|
|
2959
2967
|
let n = e.editorView.value;
|
|
2960
2968
|
if (!n) return !1;
|
|
2961
|
-
let r =
|
|
2969
|
+
let r = rr(n.state.doc, t);
|
|
2962
2970
|
if (!r) return !1;
|
|
2963
2971
|
let i = r.pos + 1, a = n.state.doc.resolve(i);
|
|
2964
2972
|
return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
|
|
@@ -2966,26 +2974,26 @@ function ho(e) {
|
|
|
2966
2974
|
setContentControlContent: (t, n, r = {}) => {
|
|
2967
2975
|
let i = e.editorView.value;
|
|
2968
2976
|
if (!i) return !1;
|
|
2969
|
-
let a = typeof n == "string" ?
|
|
2977
|
+
let a = typeof n == "string" ? or(i.state, t, n, r) : cr(i.state, t, n, r);
|
|
2970
2978
|
return a ? (i.dispatch(a), !0) : !1;
|
|
2971
2979
|
},
|
|
2972
2980
|
setContentControlValue: (t, n, r = {}) => {
|
|
2973
2981
|
let i = e.editorView.value;
|
|
2974
2982
|
if (!i) return !1;
|
|
2975
|
-
let a =
|
|
2983
|
+
let a = sr(i.state, t, n, r);
|
|
2976
2984
|
return a ? (i.dispatch(a), !0) : !1;
|
|
2977
2985
|
},
|
|
2978
2986
|
removeContentControl: (t, n = {}) => {
|
|
2979
2987
|
let r = e.editorView.value;
|
|
2980
2988
|
if (!r) return !1;
|
|
2981
|
-
let i =
|
|
2989
|
+
let i = ar(r.state, t, n);
|
|
2982
2990
|
return i ? (r.dispatch(i), !0) : !1;
|
|
2983
2991
|
}
|
|
2984
2992
|
} };
|
|
2985
2993
|
}
|
|
2986
2994
|
//#endregion
|
|
2987
2995
|
//#region src/composables/useFormattingActions.ts
|
|
2988
|
-
function
|
|
2996
|
+
function vo(e) {
|
|
2989
2997
|
let t = () => e.activeView?.value ?? e.editorView.value;
|
|
2990
2998
|
function n() {
|
|
2991
2999
|
let e = t();
|
|
@@ -2996,24 +3004,24 @@ function go(e) {
|
|
|
2996
3004
|
if (!r) return;
|
|
2997
3005
|
let i = e.getDocument(), a = i?.package?.styles;
|
|
2998
3006
|
if (a) {
|
|
2999
|
-
let e = ze(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ?
|
|
3007
|
+
let e = ze(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? wr(i.package.numbering) : null };
|
|
3000
3008
|
t.paragraphFormatting && (o.paragraphFormatting = t.paragraphFormatting), t.runFormatting && (o.runFormatting = t.runFormatting);
|
|
3001
3009
|
let s = e.getStyle(n)?.name;
|
|
3002
|
-
s && (o.styleName = s),
|
|
3003
|
-
} else
|
|
3010
|
+
s && (o.styleName = s), yr(n, o)(r.state, (e) => r.dispatch(e));
|
|
3011
|
+
} else yr(n)(r.state, (e) => r.dispatch(e));
|
|
3004
3012
|
r.focus();
|
|
3005
3013
|
}
|
|
3006
3014
|
function i() {
|
|
3007
3015
|
let t = e.editorView.value;
|
|
3008
|
-
t && (
|
|
3016
|
+
t && (Tr(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
3009
3017
|
}
|
|
3010
3018
|
function a() {
|
|
3011
3019
|
let t = e.editorView.value;
|
|
3012
|
-
t && (
|
|
3020
|
+
t && (Dr(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
3013
3021
|
}
|
|
3014
3022
|
function o() {
|
|
3015
3023
|
let t = e.editorView.value;
|
|
3016
|
-
t && (
|
|
3024
|
+
t && (Er(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
3017
3025
|
}
|
|
3018
3026
|
function s(e) {
|
|
3019
3027
|
let n = t();
|
|
@@ -3032,10 +3040,10 @@ function go(e) {
|
|
|
3032
3040
|
}
|
|
3033
3041
|
//#endregion
|
|
3034
3042
|
//#region src/utils/fontFaces.ts
|
|
3035
|
-
function
|
|
3043
|
+
function yo() {
|
|
3036
3044
|
return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
|
|
3037
3045
|
}
|
|
3038
|
-
async function
|
|
3046
|
+
async function bo(e, t, n, r) {
|
|
3039
3047
|
let i;
|
|
3040
3048
|
try {
|
|
3041
3049
|
i = new FontFace(t, n, r), e.add(i);
|
|
@@ -3044,46 +3052,46 @@ async function vo(e, t, n, r) {
|
|
|
3044
3052
|
}
|
|
3045
3053
|
return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
|
|
3046
3054
|
}
|
|
3047
|
-
function
|
|
3048
|
-
let t =
|
|
3055
|
+
function xo(e) {
|
|
3056
|
+
let t = yo();
|
|
3049
3057
|
if (t) for (let n of e) t.delete(n);
|
|
3050
3058
|
}
|
|
3051
3059
|
//#endregion
|
|
3052
3060
|
//#region src/utils/embeddedFonts.ts
|
|
3053
|
-
var
|
|
3061
|
+
var So = {
|
|
3054
3062
|
faces: [],
|
|
3055
3063
|
familyMap: /* @__PURE__ */ new Map()
|
|
3056
3064
|
};
|
|
3057
|
-
async function
|
|
3058
|
-
let t =
|
|
3059
|
-
if (!t) return
|
|
3065
|
+
async function Co(e) {
|
|
3066
|
+
let t = yo();
|
|
3067
|
+
if (!t) return So;
|
|
3060
3068
|
let n;
|
|
3061
3069
|
try {
|
|
3062
|
-
n = await
|
|
3070
|
+
n = await Ar(e);
|
|
3063
3071
|
} catch {
|
|
3064
|
-
return
|
|
3072
|
+
return So;
|
|
3065
3073
|
}
|
|
3066
3074
|
return {
|
|
3067
|
-
faces: (await Promise.all(n.map((e) =>
|
|
3075
|
+
faces: (await Promise.all(n.map((e) => bo(t, e.family, e.bytes, {
|
|
3068
3076
|
weight: String(e.weight),
|
|
3069
3077
|
style: e.style
|
|
3070
3078
|
})))).filter((e) => e !== null),
|
|
3071
|
-
familyMap:
|
|
3079
|
+
familyMap: kr(n)
|
|
3072
3080
|
};
|
|
3073
3081
|
}
|
|
3074
3082
|
//#endregion
|
|
3075
3083
|
//#region src/utils/hostFonts.ts
|
|
3076
|
-
function
|
|
3084
|
+
function wo(e) {
|
|
3077
3085
|
return typeof e == "string" && e.trim().length > 0;
|
|
3078
3086
|
}
|
|
3079
|
-
function
|
|
3080
|
-
return typeof e != "object" || !e ? !1 :
|
|
3087
|
+
function To(e) {
|
|
3088
|
+
return typeof e != "object" || !e ? !1 : wo(Reflect.get(e, "family")) && wo(Reflect.get(e, "src"));
|
|
3081
3089
|
}
|
|
3082
|
-
function
|
|
3090
|
+
function Eo(e) {
|
|
3083
3091
|
if (!e) return [];
|
|
3084
3092
|
let t = [];
|
|
3085
3093
|
for (let n of e) {
|
|
3086
|
-
if (!
|
|
3094
|
+
if (!To(n)) continue;
|
|
3087
3095
|
let e = { display: "swap" };
|
|
3088
3096
|
(typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
|
|
3089
3097
|
family: n.family.trim(),
|
|
@@ -3093,20 +3101,20 @@ function wo(e) {
|
|
|
3093
3101
|
}
|
|
3094
3102
|
return t;
|
|
3095
3103
|
}
|
|
3096
|
-
async function
|
|
3097
|
-
let t =
|
|
3104
|
+
async function Do(e) {
|
|
3105
|
+
let t = yo();
|
|
3098
3106
|
if (!t) return [];
|
|
3099
|
-
let n =
|
|
3100
|
-
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) =>
|
|
3107
|
+
let n = Eo(e);
|
|
3108
|
+
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => bo(t, e, n, r)))).filter((e) => e !== null);
|
|
3101
3109
|
}
|
|
3102
3110
|
//#endregion
|
|
3103
3111
|
//#region src/composables/useFontLifecycle.ts
|
|
3104
|
-
var
|
|
3105
|
-
loadEmbedded:
|
|
3106
|
-
loadHost:
|
|
3107
|
-
remove:
|
|
3112
|
+
var Oo = {
|
|
3113
|
+
loadEmbedded: Co,
|
|
3114
|
+
loadHost: Do,
|
|
3115
|
+
remove: xo
|
|
3108
3116
|
};
|
|
3109
|
-
function
|
|
3117
|
+
function ko(e, t = Oo) {
|
|
3110
3118
|
K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
|
|
3111
3119
|
if (!n) return;
|
|
3112
3120
|
let a = !1, o = [];
|
|
@@ -3115,9 +3123,9 @@ function Do(e, t = Eo) {
|
|
|
3115
3123
|
t.remove(n);
|
|
3116
3124
|
return;
|
|
3117
3125
|
}
|
|
3118
|
-
o = n, !(n.length === 0 && r.size === 0) && (
|
|
3126
|
+
o = n, !(n.length === 0 && r.size === 0) && (Or(r.size > 0 ? r : null), e.remeasure());
|
|
3119
3127
|
}), i(() => {
|
|
3120
|
-
a = !0, t.remove(o),
|
|
3128
|
+
a = !0, t.remove(o), Or(null);
|
|
3121
3129
|
});
|
|
3122
3130
|
}, { immediate: !0 }), K(e.fonts, (n, r, i) => {
|
|
3123
3131
|
if (!n || n.length === 0) return;
|
|
@@ -3135,7 +3143,7 @@ function Do(e, t = Eo) {
|
|
|
3135
3143
|
}
|
|
3136
3144
|
//#endregion
|
|
3137
3145
|
//#region src/composables/useHyperlinkManagement.ts
|
|
3138
|
-
function
|
|
3146
|
+
function Ao(e) {
|
|
3139
3147
|
let t = H(null);
|
|
3140
3148
|
function n(e, t) {
|
|
3141
3149
|
t(e.state, (t) => e.dispatch(t), e);
|
|
@@ -3162,19 +3170,21 @@ function Oo(e) {
|
|
|
3162
3170
|
r && n(t, r()), t.focus();
|
|
3163
3171
|
}
|
|
3164
3172
|
function a(e) {
|
|
3165
|
-
let n =
|
|
3166
|
-
|
|
3173
|
+
let n = dn(e);
|
|
3174
|
+
if (!n) return;
|
|
3175
|
+
let r = un(void 0);
|
|
3176
|
+
window.open(n, r.target, fn(r)), t.value = null;
|
|
3167
3177
|
}
|
|
3168
3178
|
function o(n, r) {
|
|
3169
3179
|
let i = e.editorView.value;
|
|
3170
|
-
i && (
|
|
3180
|
+
i && (jr(i, {
|
|
3171
3181
|
displayText: n,
|
|
3172
3182
|
href: r
|
|
3173
3183
|
}), t.value = null, i.focus());
|
|
3174
3184
|
}
|
|
3175
3185
|
function s() {
|
|
3176
3186
|
let n = e.editorView.value;
|
|
3177
|
-
n && (
|
|
3187
|
+
n && (Mr(n, { popupHref: t.value?.href }), t.value = null, n.focus());
|
|
3178
3188
|
}
|
|
3179
3189
|
return {
|
|
3180
3190
|
hyperlinkPopupData: t,
|
|
@@ -3187,7 +3197,7 @@ function Oo(e) {
|
|
|
3187
3197
|
}
|
|
3188
3198
|
//#endregion
|
|
3189
3199
|
//#region src/composables/useImageActions.ts
|
|
3190
|
-
function
|
|
3200
|
+
function jo(e) {
|
|
3191
3201
|
let t = Ne(null), n = H(!1), r = k(() => {
|
|
3192
3202
|
e.stateTick.value;
|
|
3193
3203
|
let n = e.editorView.value, r = t.value;
|
|
@@ -3237,9 +3247,9 @@ function ko(e) {
|
|
|
3237
3247
|
}
|
|
3238
3248
|
//#endregion
|
|
3239
3249
|
//#region src/composables/useKeyboardShortcuts.ts
|
|
3240
|
-
function
|
|
3250
|
+
function Mo(e) {
|
|
3241
3251
|
function t(t) {
|
|
3242
|
-
if (
|
|
3252
|
+
if (Nr(t, {
|
|
3243
3253
|
scope: e.scope(),
|
|
3244
3254
|
roots: e.roots.map((e) => e.value)
|
|
3245
3255
|
}) && (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey)) {
|
|
@@ -3255,10 +3265,10 @@ function Ao(e) {
|
|
|
3255
3265
|
}
|
|
3256
3266
|
//#endregion
|
|
3257
3267
|
//#region src/composables/useOutlineSidebar.ts
|
|
3258
|
-
function
|
|
3268
|
+
function No(e) {
|
|
3259
3269
|
function t() {
|
|
3260
3270
|
let t = e.editorView.value;
|
|
3261
|
-
t && (e.outlineHeadings.value =
|
|
3271
|
+
t && (e.outlineHeadings.value = Pr(t.state.doc, Ve(t.state)));
|
|
3262
3272
|
}
|
|
3263
3273
|
function n() {
|
|
3264
3274
|
e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
|
|
@@ -3289,7 +3299,7 @@ function jo(e) {
|
|
|
3289
3299
|
}
|
|
3290
3300
|
//#endregion
|
|
3291
3301
|
//#region src/composables/usePageSetupControls.ts
|
|
3292
|
-
function
|
|
3302
|
+
function Po(e) {
|
|
3293
3303
|
function t(t) {
|
|
3294
3304
|
if (e.readOnly.value) return;
|
|
3295
3305
|
let n = e.getDocument();
|
|
@@ -3317,19 +3327,19 @@ function Mo(e) {
|
|
|
3317
3327
|
}
|
|
3318
3328
|
function s(t) {
|
|
3319
3329
|
let n = e.editorView.value;
|
|
3320
|
-
n &&
|
|
3330
|
+
n && Sr(t)(n.state, n.dispatch);
|
|
3321
3331
|
}
|
|
3322
3332
|
function c(t) {
|
|
3323
3333
|
let n = e.editorView.value;
|
|
3324
|
-
n &&
|
|
3334
|
+
n && Cr(t)(n.state, n.dispatch);
|
|
3325
3335
|
}
|
|
3326
3336
|
function l(t) {
|
|
3327
3337
|
let n = e.editorView.value;
|
|
3328
|
-
n && (t < 0 ?
|
|
3338
|
+
n && (t < 0 ? xr(-t, !0)(n.state, n.dispatch) : xr(t, !1)(n.state, n.dispatch));
|
|
3329
3339
|
}
|
|
3330
3340
|
function u(t) {
|
|
3331
3341
|
let n = e.editorView.value;
|
|
3332
|
-
n &&
|
|
3342
|
+
n && br(t)(n.state, n.dispatch);
|
|
3333
3343
|
}
|
|
3334
3344
|
return {
|
|
3335
3345
|
handlePageSetupApply: t,
|
|
@@ -3345,34 +3355,34 @@ function Mo(e) {
|
|
|
3345
3355
|
}
|
|
3346
3356
|
//#endregion
|
|
3347
3357
|
//#region src/utils/textSelection.ts
|
|
3348
|
-
var
|
|
3349
|
-
function
|
|
3350
|
-
return !e || e.length === 0 ? !1 :
|
|
3358
|
+
var Fo = /[\p{L}\p{N}\p{M}_''-]/u, Io = /\s/;
|
|
3359
|
+
function Lo(e) {
|
|
3360
|
+
return !e || e.length === 0 ? !1 : Fo.test(e);
|
|
3351
3361
|
}
|
|
3352
|
-
function
|
|
3353
|
-
return !e || e.length === 0 ? !1 :
|
|
3362
|
+
function Ro(e) {
|
|
3363
|
+
return !e || e.length === 0 ? !1 : Io.test(e);
|
|
3354
3364
|
}
|
|
3355
|
-
function
|
|
3365
|
+
function zo(e, t) {
|
|
3356
3366
|
if (!e || e.length === 0) return [0, 0];
|
|
3357
3367
|
t = Math.max(0, Math.min(t, e.length - 1));
|
|
3358
3368
|
let n = e[t];
|
|
3359
|
-
if (
|
|
3369
|
+
if (Ro(n)) {
|
|
3360
3370
|
let n = t, r = t;
|
|
3361
|
-
for (; n > 0 &&
|
|
3362
|
-
for (; r < e.length &&
|
|
3371
|
+
for (; n > 0 && Ro(e[n - 1]);) n--;
|
|
3372
|
+
for (; r < e.length && Ro(e[r]);) r++;
|
|
3363
3373
|
return [n, r];
|
|
3364
3374
|
}
|
|
3365
|
-
if (
|
|
3375
|
+
if (Lo(n)) {
|
|
3366
3376
|
let n = t, r = t;
|
|
3367
|
-
for (; n > 0 &&
|
|
3368
|
-
for (; r < e.length &&
|
|
3377
|
+
for (; n > 0 && Lo(e[n - 1]);) n--;
|
|
3378
|
+
for (; r < e.length && Lo(e[r]);) r++;
|
|
3369
3379
|
return [n, r];
|
|
3370
3380
|
}
|
|
3371
3381
|
return [t, t + 1];
|
|
3372
3382
|
}
|
|
3373
3383
|
//#endregion
|
|
3374
3384
|
//#region src/utils/domQueries.ts
|
|
3375
|
-
function
|
|
3385
|
+
function Bo(e, t, n) {
|
|
3376
3386
|
let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Zt(e);
|
|
3377
3387
|
for (let e of r) {
|
|
3378
3388
|
let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
|
|
@@ -3380,7 +3390,7 @@ function Ro(e, t, n) {
|
|
|
3380
3390
|
}
|
|
3381
3391
|
return null;
|
|
3382
3392
|
}
|
|
3383
|
-
function
|
|
3393
|
+
function Vo(e, t, n) {
|
|
3384
3394
|
if (!e || !t) return;
|
|
3385
3395
|
let r = Xt(e, n);
|
|
3386
3396
|
if (!r) for (let t of Zt(e)) {
|
|
@@ -3397,21 +3407,21 @@ function zo(e, t, n) {
|
|
|
3397
3407
|
behavior: "smooth"
|
|
3398
3408
|
});
|
|
3399
3409
|
}
|
|
3400
|
-
function
|
|
3410
|
+
function Ho(e, t, n, r) {
|
|
3401
3411
|
if (!e || !t) return null;
|
|
3402
3412
|
let i = Ut(e, n, r, 1);
|
|
3403
3413
|
return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
|
|
3404
3414
|
}
|
|
3405
|
-
function
|
|
3415
|
+
function Uo(e, t, n, r) {
|
|
3406
3416
|
if (!e) return;
|
|
3407
|
-
let i =
|
|
3417
|
+
let i = Bo(e, t, r);
|
|
3408
3418
|
if (!i) return;
|
|
3409
|
-
let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] =
|
|
3419
|
+
let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = zo(a, t - o), l = o + s, u = o + c;
|
|
3410
3420
|
l < u && n(l, u);
|
|
3411
3421
|
}
|
|
3412
|
-
function
|
|
3422
|
+
function Wo(e, t, n, r) {
|
|
3413
3423
|
if (!e) return;
|
|
3414
|
-
let i =
|
|
3424
|
+
let i = Bo(e, t, r);
|
|
3415
3425
|
if (!i) return;
|
|
3416
3426
|
let a = i.closest(".layout-paragraph");
|
|
3417
3427
|
if (!a) return;
|
|
@@ -3420,7 +3430,7 @@ function Ho(e, t, n, r) {
|
|
|
3420
3430
|
}
|
|
3421
3431
|
//#endregion
|
|
3422
3432
|
//#region src/composables/usePagesPointer.ts
|
|
3423
|
-
var
|
|
3433
|
+
var Go = 500, Ko = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentChange: r, reLayout: i, setDocument: a, syncHfPMs: o }) => {
|
|
3424
3434
|
let s = e.value, c = t();
|
|
3425
3435
|
if (!c?.package || !s?.rId) {
|
|
3426
3436
|
e.value = null;
|
|
@@ -3436,21 +3446,21 @@ var Uo = 500, Wo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentCh
|
|
|
3436
3446
|
e.value = null;
|
|
3437
3447
|
return;
|
|
3438
3448
|
}
|
|
3439
|
-
let d =
|
|
3449
|
+
let d = Ln({
|
|
3440
3450
|
document: c,
|
|
3441
3451
|
position: s.position,
|
|
3442
3452
|
isFirstPage: s.isFirstPage,
|
|
3443
3453
|
activeRId: s.rId,
|
|
3444
|
-
blocks:
|
|
3454
|
+
blocks: En(l.state.doc, u.content)
|
|
3445
3455
|
});
|
|
3446
3456
|
e.value = null, d && (a(d), o(), i(), r(d));
|
|
3447
3457
|
};
|
|
3448
|
-
function
|
|
3458
|
+
function qo(e) {
|
|
3449
3459
|
let t = H(null), n = null;
|
|
3450
3460
|
function r() {
|
|
3451
3461
|
n !== null && (clearTimeout(n), n = null);
|
|
3452
3462
|
}
|
|
3453
|
-
let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u =
|
|
3463
|
+
let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = zr(), d = S({
|
|
3454
3464
|
pagesContainer: e.pagesRef,
|
|
3455
3465
|
onScrollExtendSelection: (e, t) => {
|
|
3456
3466
|
if (!c || l === null) return;
|
|
@@ -3463,7 +3473,7 @@ function Go(e) {
|
|
|
3463
3473
|
visible: !1
|
|
3464
3474
|
}), p = null;
|
|
3465
3475
|
function m(t, n) {
|
|
3466
|
-
return
|
|
3476
|
+
return Ho(e.pagesRef.value, e.editorView.value, t, n);
|
|
3467
3477
|
}
|
|
3468
3478
|
function h() {
|
|
3469
3479
|
let t = i.value;
|
|
@@ -3476,7 +3486,7 @@ function Go(e) {
|
|
|
3476
3486
|
function g(t, n) {
|
|
3477
3487
|
let r = i.value, a = e.pagesRef.value, o = h();
|
|
3478
3488
|
if (r?.rId && a && o !== e.editorView.value) {
|
|
3479
|
-
let e =
|
|
3489
|
+
let e = Fr(a, r.position, r.rId, t, n);
|
|
3480
3490
|
return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
|
|
3481
3491
|
}
|
|
3482
3492
|
return m(t, n);
|
|
@@ -3489,13 +3499,13 @@ function Go(e) {
|
|
|
3489
3499
|
} catch {}
|
|
3490
3500
|
}
|
|
3491
3501
|
function v(t) {
|
|
3492
|
-
|
|
3502
|
+
Vo(e.pagesRef.value, e.pagesViewportRef.value, t);
|
|
3493
3503
|
}
|
|
3494
3504
|
function y(t) {
|
|
3495
|
-
|
|
3505
|
+
Uo(e.pagesRef.value, t, _, i.value?.position);
|
|
3496
3506
|
}
|
|
3497
3507
|
function b(t) {
|
|
3498
|
-
|
|
3508
|
+
Wo(e.pagesRef.value, t, _, i.value?.position);
|
|
3499
3509
|
}
|
|
3500
3510
|
function x(t) {
|
|
3501
3511
|
let n = e.editorView.value;
|
|
@@ -3524,7 +3534,7 @@ function Go(e) {
|
|
|
3524
3534
|
if (!o) return;
|
|
3525
3535
|
let s = e.pagesViewportRef.value;
|
|
3526
3536
|
if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
|
|
3527
|
-
let l =
|
|
3537
|
+
let l = Rr({
|
|
3528
3538
|
mouseX: a.clientX,
|
|
3529
3539
|
mouseY: a.clientY,
|
|
3530
3540
|
pagesContainer: o,
|
|
@@ -3534,7 +3544,7 @@ function Go(e) {
|
|
|
3534
3544
|
if (!l) {
|
|
3535
3545
|
n === null && (n = setTimeout(() => {
|
|
3536
3546
|
t.value = null, n = null;
|
|
3537
|
-
},
|
|
3547
|
+
}, Lr));
|
|
3538
3548
|
return;
|
|
3539
3549
|
}
|
|
3540
3550
|
let u = e.zoom.value || 1, d = s.getBoundingClientRect();
|
|
@@ -3585,7 +3595,7 @@ function Go(e) {
|
|
|
3585
3595
|
if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
|
|
3586
3596
|
let n = t.target;
|
|
3587
3597
|
if (n.closest(".docx-editor-vue__note-editor")) return;
|
|
3588
|
-
let r =
|
|
3598
|
+
let r = Ir(n);
|
|
3589
3599
|
if (r) {
|
|
3590
3600
|
t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
|
|
3591
3601
|
return;
|
|
@@ -3595,11 +3605,11 @@ function Go(e) {
|
|
|
3595
3605
|
if (!s) return;
|
|
3596
3606
|
let c = a ? "header" : "footer", l = e.getDocument();
|
|
3597
3607
|
if (!l?.package) return;
|
|
3598
|
-
let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f =
|
|
3608
|
+
let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = In(l.package), p = f.hasTitlePg && d === 1, m = Pn(f, c, p);
|
|
3599
3609
|
if (!m) {
|
|
3600
|
-
let t =
|
|
3610
|
+
let t = Nn(l, c, p);
|
|
3601
3611
|
if (!t) return;
|
|
3602
|
-
e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f =
|
|
3612
|
+
e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = In(t.package), m = Pn(f, c, p);
|
|
3603
3613
|
}
|
|
3604
3614
|
if (!m) return;
|
|
3605
3615
|
let h = m, g = e.pagesViewportRef.value;
|
|
@@ -3619,7 +3629,7 @@ function Go(e) {
|
|
|
3619
3629
|
}, requestAnimationFrame(() => {
|
|
3620
3630
|
let n = e.getHfPmView(h);
|
|
3621
3631
|
if (!n) return;
|
|
3622
|
-
let r =
|
|
3632
|
+
let r = Fr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
|
|
3623
3633
|
if (r !== null) {
|
|
3624
3634
|
let e = Math.max(0, Math.min(r, n.state.doc.content.size));
|
|
3625
3635
|
n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
|
|
@@ -3628,7 +3638,7 @@ function Go(e) {
|
|
|
3628
3638
|
});
|
|
3629
3639
|
}
|
|
3630
3640
|
function ie() {
|
|
3631
|
-
|
|
3641
|
+
Ko({
|
|
3632
3642
|
editState: i,
|
|
3633
3643
|
getDocument: e.getDocument,
|
|
3634
3644
|
getHfPmView: e.getHfPmView,
|
|
@@ -3644,7 +3654,7 @@ function Go(e) {
|
|
|
3644
3654
|
i.value = null;
|
|
3645
3655
|
return;
|
|
3646
3656
|
}
|
|
3647
|
-
let r =
|
|
3657
|
+
let r = Fn({
|
|
3648
3658
|
document: t,
|
|
3649
3659
|
position: n.position,
|
|
3650
3660
|
activeRId: n.rId
|
|
@@ -3705,12 +3715,12 @@ function Go(e) {
|
|
|
3705
3715
|
return;
|
|
3706
3716
|
}
|
|
3707
3717
|
let v = Date.now();
|
|
3708
|
-
if (v - a <
|
|
3718
|
+
if (v - a < Go && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
|
|
3709
3719
|
else if (s >= 3) b(m), s = 0;
|
|
3710
3720
|
else if (t.shiftKey) {
|
|
3711
3721
|
let { from: e } = f.state.selection;
|
|
3712
3722
|
_(e, m);
|
|
3713
|
-
} else _(m), l = m, c = !0, u.begin(
|
|
3723
|
+
} else _(m), l = m, c = !0, u.begin(Br(f, m));
|
|
3714
3724
|
f.focus();
|
|
3715
3725
|
}
|
|
3716
3726
|
function se(e) {
|
|
@@ -3778,8 +3788,8 @@ function Go(e) {
|
|
|
3778
3788
|
}
|
|
3779
3789
|
//#endregion
|
|
3780
3790
|
//#region src/composables/useRemoteSelectionSync.ts
|
|
3781
|
-
var
|
|
3782
|
-
let t = new
|
|
3791
|
+
var Jo = (e) => {
|
|
3792
|
+
let t = new Vr(), n = null, r = () => {
|
|
3783
3793
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
3784
3794
|
let r = e.pagesRef.value;
|
|
3785
3795
|
r && t.clear(r);
|
|
@@ -3802,8 +3812,8 @@ var Ko = (e) => {
|
|
|
3802
3812
|
], i, { flush: "post" }), B(() => {
|
|
3803
3813
|
a(), r();
|
|
3804
3814
|
});
|
|
3805
|
-
},
|
|
3806
|
-
let t = new
|
|
3815
|
+
}, Yo = (e) => {
|
|
3816
|
+
let t = new Hr(), n = null, r = () => {
|
|
3807
3817
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
3808
3818
|
let r = e.pagesRef.value;
|
|
3809
3819
|
r && t.clear(r);
|
|
@@ -3854,22 +3864,22 @@ var Ko = (e) => {
|
|
|
3854
3864
|
clearOverlay: r,
|
|
3855
3865
|
updateSelectionOverlay: i
|
|
3856
3866
|
};
|
|
3857
|
-
},
|
|
3867
|
+
}, Xo = { class: "docx-editor-vue__toolbar-shell" }, Zo = {
|
|
3858
3868
|
key: 0,
|
|
3859
3869
|
class: "docx-editor-vue__error"
|
|
3860
|
-
},
|
|
3870
|
+
}, Qo = {
|
|
3861
3871
|
key: 1,
|
|
3862
3872
|
class: "docx-editor-vue__loading"
|
|
3863
|
-
},
|
|
3873
|
+
}, $o = {
|
|
3864
3874
|
key: 2,
|
|
3865
3875
|
class: "docx-editor-vue__placeholder"
|
|
3866
|
-
},
|
|
3876
|
+
}, es = { class: "docx-editor-vue__editor-area" }, ts = {
|
|
3867
3877
|
key: 0,
|
|
3868
3878
|
class: "docx-editor-vue__ruler-h"
|
|
3869
|
-
},
|
|
3879
|
+
}, ns = {
|
|
3870
3880
|
key: 1,
|
|
3871
3881
|
class: "docx-editor-vue__ruler-v"
|
|
3872
|
-
},
|
|
3882
|
+
}, rs = {
|
|
3873
3883
|
class: "docx-editor-vue__editor-content-wrapper",
|
|
3874
3884
|
style: {
|
|
3875
3885
|
position: "relative",
|
|
@@ -3877,11 +3887,11 @@ var Ko = (e) => {
|
|
|
3877
3887
|
flexDirection: "column",
|
|
3878
3888
|
minHeight: "100%"
|
|
3879
3889
|
}
|
|
3880
|
-
},
|
|
3890
|
+
}, is = {
|
|
3881
3891
|
"data-testid": "selection-overlay",
|
|
3882
3892
|
class: "docx-editor-vue__decoration-origin",
|
|
3883
3893
|
"aria-hidden": "true"
|
|
3884
|
-
},
|
|
3894
|
+
}, as = ["aria-label"], os = { class: "docx-editor-vue__note-editor-header" }, ss = ["aria-label"], cs = ["aria-label"], ls = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
3885
3895
|
__name: "DocxEditor",
|
|
3886
3896
|
props: {
|
|
3887
3897
|
documentBuffer: { default: null },
|
|
@@ -4008,7 +4018,7 @@ var Ko = (e) => {
|
|
|
4008
4018
|
let o = e, s = o.plugins ?? [], c = n;
|
|
4009
4019
|
a(o.components);
|
|
4010
4020
|
let l = fe();
|
|
4011
|
-
|
|
4021
|
+
Ti(l);
|
|
4012
4022
|
function u(e) {
|
|
4013
4023
|
o.onChange?.(e), c("change", e), c("update:document", e);
|
|
4014
4024
|
}
|
|
@@ -4029,7 +4039,7 @@ var Ko = (e) => {
|
|
|
4029
4039
|
function Je(e) {
|
|
4030
4040
|
o.enableWheelZoom !== !1 && Ue(e);
|
|
4031
4041
|
}
|
|
4032
|
-
|
|
4042
|
+
Mo({
|
|
4033
4043
|
showFindReplace: E,
|
|
4034
4044
|
showHyperlink: _e,
|
|
4035
4045
|
handleZoomKeyDown: We,
|
|
@@ -4090,18 +4100,18 @@ var Ko = (e) => {
|
|
|
4090
4100
|
function Nt() {
|
|
4091
4101
|
J.value && (it(), rt(), At());
|
|
4092
4102
|
}
|
|
4093
|
-
|
|
4103
|
+
ko({
|
|
4094
4104
|
isReady: pt,
|
|
4095
4105
|
getDocument: Y,
|
|
4096
4106
|
fonts: () => o.fonts,
|
|
4097
4107
|
remeasure: Nt
|
|
4098
4108
|
});
|
|
4099
|
-
let { selectedImage: Z, imageInteracting: Pt, imageToolbarContext: Ft, handleToolbarImageWrap: It, handleImageTransform: Lt } =
|
|
4109
|
+
let { selectedImage: Z, imageInteracting: Pt, imageToolbarContext: Ft, handleToolbarImageWrap: It, handleImageTransform: Lt } = jo({
|
|
4100
4110
|
editorView: X,
|
|
4101
4111
|
zoom: B,
|
|
4102
4112
|
stateTick: T,
|
|
4103
4113
|
getCommands: kt
|
|
4104
|
-
}), Rt =
|
|
4114
|
+
}), Rt = Yo({
|
|
4105
4115
|
editorView: J,
|
|
4106
4116
|
hiddenContainer: C,
|
|
4107
4117
|
pagesRef: w,
|
|
@@ -4110,16 +4120,16 @@ var Ko = (e) => {
|
|
|
4110
4120
|
syncCoordinator: yt,
|
|
4111
4121
|
imageInteracting: Pt
|
|
4112
4122
|
});
|
|
4113
|
-
|
|
4123
|
+
Jo({
|
|
4114
4124
|
pagesRef: w,
|
|
4115
4125
|
remoteSelections: lt,
|
|
4116
4126
|
syncCoordinator: yt,
|
|
4117
4127
|
zoom: B
|
|
4118
4128
|
});
|
|
4119
|
-
let { hyperlinkPopupData: zt, handleHyperlinkSubmit: Bt, handleHyperlinkRemove: Ut, handleHyperlinkPopupNavigate: Wt, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } =
|
|
4129
|
+
let { hyperlinkPopupData: zt, handleHyperlinkSubmit: Bt, handleHyperlinkRemove: Ut, handleHyperlinkPopupNavigate: Wt, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } = Ao({
|
|
4120
4130
|
editorView: X,
|
|
4121
4131
|
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 } =
|
|
4132
|
+
}), 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 } = qo({
|
|
4123
4133
|
editorView: J,
|
|
4124
4134
|
pagesRef: w,
|
|
4125
4135
|
pagesViewportRef: pe,
|
|
@@ -4157,7 +4167,7 @@ var Ko = (e) => {
|
|
|
4157
4167
|
K(Yt, (e) => {
|
|
4158
4168
|
I.value = e?.rId ?? null, e && Rt.clearOverlay();
|
|
4159
4169
|
}, { immediate: !0 });
|
|
4160
|
-
let un =
|
|
4170
|
+
let un = No({
|
|
4161
4171
|
editorView: J,
|
|
4162
4172
|
showOutline: O,
|
|
4163
4173
|
showSidebar: A,
|
|
@@ -4165,7 +4175,7 @@ var Ko = (e) => {
|
|
|
4165
4175
|
activeSidebarItem: we,
|
|
4166
4176
|
extractCommentsAndChanges: () => {},
|
|
4167
4177
|
scrollToVisiblePosition: $t
|
|
4168
|
-
}), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } =
|
|
4178
|
+
}), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } = po({
|
|
4169
4179
|
editorView: X,
|
|
4170
4180
|
selectedImage: Z,
|
|
4171
4181
|
zoom: B,
|
|
@@ -4179,7 +4189,7 @@ var Ko = (e) => {
|
|
|
4179
4189
|
onCopy: () => o.onCopy?.(),
|
|
4180
4190
|
onCut: () => o.onCut?.(),
|
|
4181
4191
|
onPaste: () => o.onPaste?.()
|
|
4182
|
-
}), yn = le(J, T), bn = k(() => yn.value.entries), Q =
|
|
4192
|
+
}), yn = le(J, T), bn = k(() => yn.value.entries), Q = eo({
|
|
4183
4193
|
editorView: J,
|
|
4184
4194
|
getDocument: Y,
|
|
4185
4195
|
author: () => o.author,
|
|
@@ -4188,7 +4198,7 @@ var Ko = (e) => {
|
|
|
4188
4198
|
o.onCommentsChange?.(e), c("comments-change", e);
|
|
4189
4199
|
},
|
|
4190
4200
|
reLayout: At
|
|
4191
|
-
}), xn = Q.comments, $ =
|
|
4201
|
+
}), xn = Q.comments, $ = $a({
|
|
4192
4202
|
editorView: J,
|
|
4193
4203
|
pagesViewport: pe,
|
|
4194
4204
|
pagesContainer: w,
|
|
@@ -4232,7 +4242,7 @@ var Ko = (e) => {
|
|
|
4232
4242
|
transform: B.value === 1 ? void 0 : `scale(${B.value})`,
|
|
4233
4243
|
transformOrigin: "top center",
|
|
4234
4244
|
transition: "transform 0.2s ease"
|
|
4235
|
-
})), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } =
|
|
4245
|
+
})), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } = vo({
|
|
4236
4246
|
editorView: X,
|
|
4237
4247
|
getDocument: Y
|
|
4238
4248
|
});
|
|
@@ -4273,7 +4283,7 @@ var Ko = (e) => {
|
|
|
4273
4283
|
let e = J.value;
|
|
4274
4284
|
e && (Ze(e, { title: te("toolbar.tableOfContents") }), e.focus());
|
|
4275
4285
|
}
|
|
4276
|
-
let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } =
|
|
4286
|
+
let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } = Po({
|
|
4277
4287
|
editorView: J,
|
|
4278
4288
|
getDocument: Y,
|
|
4279
4289
|
readOnly: f,
|
|
@@ -4352,7 +4362,7 @@ var Ko = (e) => {
|
|
|
4352
4362
|
!t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
|
|
4353
4363
|
}
|
|
4354
4364
|
let $n = H(!1);
|
|
4355
|
-
|
|
4365
|
+
mo({
|
|
4356
4366
|
documentBuffer: () => o.documentBuffer ?? null,
|
|
4357
4367
|
document: () => o.document ?? null,
|
|
4358
4368
|
loadDocumentBuffer: bt,
|
|
@@ -4381,7 +4391,7 @@ var Ko = (e) => {
|
|
|
4381
4391
|
er.value = !1;
|
|
4382
4392
|
return;
|
|
4383
4393
|
}
|
|
4384
|
-
S.value = !0, un.recomputeHeadingsIfOpen(), Q.seedFromDocument();
|
|
4394
|
+
me.value && (me.value.scrollTop = 0, me.value.scrollLeft = 0), S.value = !0, un.recomputeHeadingsIfOpen(), Q.seedFromDocument();
|
|
4385
4395
|
let t = Y();
|
|
4386
4396
|
t && o.onCompatibilityChange?.(tt(t)), o.autoOpenReviewSidebar !== !1 && !$n.value && (xn.value.length > 0 || bn.value.length > 0) && ($n.value = !0, A.value = !0), nr(), c("ready");
|
|
4387
4397
|
}), Ae(() => {
|
|
@@ -4396,7 +4406,7 @@ var Ko = (e) => {
|
|
|
4396
4406
|
e(), t(), n(), r(), i();
|
|
4397
4407
|
});
|
|
4398
4408
|
});
|
|
4399
|
-
let { exposed: rr } =
|
|
4409
|
+
let { exposed: rr } = _o({
|
|
4400
4410
|
editor: Xe,
|
|
4401
4411
|
editorView: J,
|
|
4402
4412
|
isDirty: mt,
|
|
@@ -4445,7 +4455,7 @@ var Ko = (e) => {
|
|
|
4445
4455
|
]),
|
|
4446
4456
|
style: R(e.style)
|
|
4447
4457
|
}, [
|
|
4448
|
-
P("div",
|
|
4458
|
+
P("div", Xo, [F(Vi, {
|
|
4449
4459
|
"show-table-insert": o.showTableInsert !== !1,
|
|
4450
4460
|
onRename: n[0] ||= (e) => c("rename", e),
|
|
4451
4461
|
onMenuAction: Yn,
|
|
@@ -4536,7 +4546,7 @@ var Ko = (e) => {
|
|
|
4536
4546
|
"onImageWrapType",
|
|
4537
4547
|
"onImageTransform"
|
|
4538
4548
|
])) : M("", !0)]),
|
|
4539
|
-
F(
|
|
4549
|
+
F(Ii, {
|
|
4540
4550
|
"show-find-replace": E.value,
|
|
4541
4551
|
"onUpdate:showFindReplace": n[8] ||= (e) => E.value = e,
|
|
4542
4552
|
"show-hyperlink": _e.value,
|
|
@@ -4584,10 +4594,10 @@ var Ko = (e) => {
|
|
|
4584
4594
|
"onHyperlinkRemove",
|
|
4585
4595
|
"onPageSetupApply"
|
|
4586
4596
|
]),
|
|
4587
|
-
G(ht) ? (V(), N("div",
|
|
4597
|
+
G(ht) ? (V(), N("div", Zo, W(G(ht)), 1)) : Mt.value ? (V(), N("div", Qo, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
|
|
4588
4598
|
key: 0,
|
|
4589
4599
|
node: e.loadingIndicator
|
|
4590
|
-
}, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div",
|
|
4600
|
+
}, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", $o, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
|
|
4591
4601
|
key: 0,
|
|
4592
4602
|
node: e.placeholder
|
|
4593
4603
|
}, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
|
|
@@ -4606,8 +4616,8 @@ var Ko = (e) => {
|
|
|
4606
4616
|
ref: me,
|
|
4607
4617
|
class: "docx-editor-vue__editor-scroll",
|
|
4608
4618
|
onScroll: tr
|
|
4609
|
-
}, [P("div",
|
|
4610
|
-
ge.value && !f.value ? (V(), N("div",
|
|
4619
|
+
}, [P("div", es, [
|
|
4620
|
+
ge.value && !f.value ? (V(), N("div", ts, [F(ne, {
|
|
4611
4621
|
"section-props": Cn.value,
|
|
4612
4622
|
zoom: G(B),
|
|
4613
4623
|
unit: e.rulerUnit ?? "inch",
|
|
@@ -4641,7 +4651,7 @@ var Ko = (e) => {
|
|
|
4641
4651
|
"onFirstLineIndentChange",
|
|
4642
4652
|
"onTabStopRemove"
|
|
4643
4653
|
])])) : M("", !0),
|
|
4644
|
-
ge.value && !f.value ? (V(), N("div",
|
|
4654
|
+
ge.value && !f.value ? (V(), N("div", ns, [F(v, {
|
|
4645
4655
|
"section-props": Cn.value,
|
|
4646
4656
|
zoom: G(B),
|
|
4647
4657
|
unit: e.rulerUnit ?? "inch",
|
|
@@ -4667,14 +4677,14 @@ var Ko = (e) => {
|
|
|
4667
4677
|
onDblclick: n[28] ||= (...e) => G(rn) && G(rn)(...e),
|
|
4668
4678
|
onContextmenu: n[29] ||= q((...e) => G(hn) && G(hn)(...e), ["prevent"])
|
|
4669
4679
|
}, [
|
|
4670
|
-
P("div",
|
|
4680
|
+
P("div", rs, [
|
|
4671
4681
|
P("div", {
|
|
4672
4682
|
ref_key: "pagesRef",
|
|
4673
4683
|
ref: w,
|
|
4674
4684
|
class: L(["docx-editor-vue__pages paged-editor__pages", G(Yt) ? `paged-editor--hf-editing paged-editor--editing-${G(Yt).position}` : ""]),
|
|
4675
4685
|
style: R(kn.value)
|
|
4676
4686
|
}, null, 6),
|
|
4677
|
-
F(
|
|
4687
|
+
F(Ca, {
|
|
4678
4688
|
"editor-view": cn(),
|
|
4679
4689
|
"hidden-container": ue.value,
|
|
4680
4690
|
"pages-container": w.value,
|
|
@@ -4687,8 +4697,8 @@ var Ko = (e) => {
|
|
|
4687
4697
|
"selection",
|
|
4688
4698
|
"zoom"
|
|
4689
4699
|
]),
|
|
4690
|
-
P("div",
|
|
4691
|
-
F(
|
|
4700
|
+
P("div", is, [
|
|
4701
|
+
F(_i, {
|
|
4692
4702
|
"get-view": () => G(J),
|
|
4693
4703
|
"get-pages-container": () => w.value,
|
|
4694
4704
|
"editor-state": G(st),
|
|
@@ -4711,7 +4721,7 @@ var Ko = (e) => {
|
|
|
4711
4721
|
"selected-canonical",
|
|
4712
4722
|
"selection-seq"
|
|
4713
4723
|
]),
|
|
4714
|
-
F(
|
|
4724
|
+
F(yi, {
|
|
4715
4725
|
range: he.value,
|
|
4716
4726
|
"get-pages-container": () => w.value,
|
|
4717
4727
|
zoom: G(B),
|
|
@@ -4726,7 +4736,7 @@ var Ko = (e) => {
|
|
|
4726
4736
|
"blocks",
|
|
4727
4737
|
"measures"
|
|
4728
4738
|
]),
|
|
4729
|
-
o.showTemplateDirectives ? (V(), j(
|
|
4739
|
+
o.showTemplateDirectives ? (V(), j(Ia, {
|
|
4730
4740
|
key: 0,
|
|
4731
4741
|
"get-view": () => G(J),
|
|
4732
4742
|
"get-pages-container": () => w.value,
|
|
@@ -4744,7 +4754,7 @@ var Ko = (e) => {
|
|
|
4744
4754
|
"blocks",
|
|
4745
4755
|
"measures"
|
|
4746
4756
|
])) : M("", !0),
|
|
4747
|
-
F(
|
|
4757
|
+
F(Ci, {
|
|
4748
4758
|
"get-pages-container": () => w.value,
|
|
4749
4759
|
"editor-state": G(st),
|
|
4750
4760
|
zoom: G(B),
|
|
@@ -4755,7 +4765,7 @@ var Ko = (e) => {
|
|
|
4755
4765
|
"zoom",
|
|
4756
4766
|
"sync-coordinator"
|
|
4757
4767
|
]),
|
|
4758
|
-
F(
|
|
4768
|
+
F(ji, {
|
|
4759
4769
|
"get-view": () => G(J),
|
|
4760
4770
|
"get-pages-container": () => w.value,
|
|
4761
4771
|
zoom: G(B),
|
|
@@ -4770,7 +4780,7 @@ var Ko = (e) => {
|
|
|
4770
4780
|
])
|
|
4771
4781
|
])
|
|
4772
4782
|
]),
|
|
4773
|
-
G(Yt) ? (V(), j(
|
|
4783
|
+
G(Yt) ? (V(), j(Ta, {
|
|
4774
4784
|
key: 0,
|
|
4775
4785
|
edit: G(Yt),
|
|
4776
4786
|
"get-view": cn,
|
|
@@ -4785,16 +4795,16 @@ var Ko = (e) => {
|
|
|
4785
4795
|
class: "docx-editor-vue__note-editor",
|
|
4786
4796
|
"aria-label": jt.value,
|
|
4787
4797
|
onKeydown: n[16] ||= Re(q((...e) => G(Dt) && G(Dt)(...e), ["stop", "prevent"]), ["esc"])
|
|
4788
|
-
}, [P("header",
|
|
4798
|
+
}, [P("header", os, [P("span", null, W(jt.value), 1), P("button", {
|
|
4789
4799
|
type: "button",
|
|
4790
4800
|
"aria-label": G(te)("common.closeDialog"),
|
|
4791
4801
|
onClick: n[15] ||= (...e) => G(Dt) && G(Dt)(...e)
|
|
4792
|
-
}, " × ", 8,
|
|
4802
|
+
}, " × ", 8, ss)]), P("div", {
|
|
4793
4803
|
ref_key: "notePmRef",
|
|
4794
4804
|
ref: Ee,
|
|
4795
4805
|
class: "docx-editor-vue__note-editor-host"
|
|
4796
|
-
}, null, 512)], 40,
|
|
4797
|
-
F(
|
|
4806
|
+
}, null, 512)], 40, as), [[Fe, G(ft)]]),
|
|
4807
|
+
F(Sa, {
|
|
4798
4808
|
"image-info": G(Z),
|
|
4799
4809
|
zoom: G(B),
|
|
4800
4810
|
view: X.value,
|
|
@@ -4808,7 +4818,7 @@ var Ko = (e) => {
|
|
|
4808
4818
|
"view",
|
|
4809
4819
|
"onContextMenu"
|
|
4810
4820
|
]),
|
|
4811
|
-
F(
|
|
4821
|
+
F(Ka, {
|
|
4812
4822
|
data: G(zt),
|
|
4813
4823
|
"read-only": f.value,
|
|
4814
4824
|
onNavigate: G(Wt),
|
|
@@ -4833,7 +4843,7 @@ var Ko = (e) => {
|
|
|
4833
4843
|
}),
|
|
4834
4844
|
"aria-label": G(Jt).type === "row" ? "Insert row" : "Insert column",
|
|
4835
4845
|
onMousedown: n[21] ||= (...e) => G(an) && G(an)(...e)
|
|
4836
|
-
}, " + ", 44,
|
|
4846
|
+
}, " + ", 44, cs)) : M("", !0),
|
|
4837
4847
|
F(g, {
|
|
4838
4848
|
comments: G(xn),
|
|
4839
4849
|
"pages-container": w.value,
|
|
@@ -4912,12 +4922,12 @@ var Ko = (e) => {
|
|
|
4912
4922
|
size: 18
|
|
4913
4923
|
})], 36)) : M("", !0)
|
|
4914
4924
|
], 544),
|
|
4915
|
-
O.value ? M("", !0) : (V(), j(
|
|
4925
|
+
O.value ? M("", !0) : (V(), j(Da, {
|
|
4916
4926
|
key: 2,
|
|
4917
4927
|
"left-offset": 12,
|
|
4918
4928
|
onToggle: G(un).handleToggleOutline
|
|
4919
4929
|
}, null, 8, ["onToggle"])),
|
|
4920
|
-
G(Xt).totalPages > 1 ? (V(), j(
|
|
4930
|
+
G(Xt).totalPages > 1 ? (V(), j(Oa, {
|
|
4921
4931
|
key: 3,
|
|
4922
4932
|
"current-page": G(Xt).currentPage,
|
|
4923
4933
|
"total-pages": G(Xt).totalPages,
|
|
@@ -4927,7 +4937,7 @@ var Ko = (e) => {
|
|
|
4927
4937
|
"total-pages",
|
|
4928
4938
|
"visible"
|
|
4929
4939
|
])) : M("", !0),
|
|
4930
|
-
F(
|
|
4940
|
+
F(Fi, {
|
|
4931
4941
|
"is-open": O.value,
|
|
4932
4942
|
headings: ke.value,
|
|
4933
4943
|
"get-scroll-container": () => w.value,
|
|
@@ -4940,7 +4950,7 @@ var Ko = (e) => {
|
|
|
4940
4950
|
"onNavigate"
|
|
4941
4951
|
])
|
|
4942
4952
|
])], 544),
|
|
4943
|
-
F(
|
|
4953
|
+
F(fa, {
|
|
4944
4954
|
"read-only": f.value,
|
|
4945
4955
|
"context-menu": G(dn),
|
|
4946
4956
|
"image-context-menu": G(fn),
|
|
@@ -4962,16 +4972,16 @@ var Ko = (e) => {
|
|
|
4962
4972
|
"onContextMenuAction",
|
|
4963
4973
|
"onImageWrapSelect"
|
|
4964
4974
|
]),
|
|
4965
|
-
F(
|
|
4975
|
+
F(Ai, {
|
|
4966
4976
|
"event-root": f.value ? null : w.value,
|
|
4967
4977
|
view: G(J)
|
|
4968
4978
|
}, null, 8, ["event-root", "view"])
|
|
4969
4979
|
], 6));
|
|
4970
4980
|
}
|
|
4971
|
-
}), [["__scopeId", "data-v-
|
|
4981
|
+
}), [["__scopeId", "data-v-9d162cf9"]]);
|
|
4972
4982
|
//#endregion
|
|
4973
4983
|
//#region src/utils/listState.ts
|
|
4974
|
-
function
|
|
4984
|
+
function us() {
|
|
4975
4985
|
return {
|
|
4976
4986
|
type: "none",
|
|
4977
4987
|
level: 0,
|
|
@@ -4980,30 +4990,30 @@ function cs() {
|
|
|
4980
4990
|
}
|
|
4981
4991
|
//#endregion
|
|
4982
4992
|
//#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
|
|
4983
|
-
var
|
|
4993
|
+
var ds = ["aria-label"], fs = ["aria-label"], ps = [
|
|
4984
4994
|
"disabled",
|
|
4985
4995
|
"title",
|
|
4986
4996
|
"aria-label"
|
|
4987
|
-
],
|
|
4997
|
+
], ms = [
|
|
4988
4998
|
"disabled",
|
|
4989
4999
|
"title",
|
|
4990
5000
|
"aria-label"
|
|
4991
|
-
],
|
|
5001
|
+
], hs = ["aria-label"], gs = [
|
|
4992
5002
|
"disabled",
|
|
4993
5003
|
"title",
|
|
4994
5004
|
"aria-label",
|
|
4995
5005
|
"aria-pressed"
|
|
4996
|
-
],
|
|
5006
|
+
], _s = [
|
|
4997
5007
|
"disabled",
|
|
4998
5008
|
"title",
|
|
4999
5009
|
"aria-label",
|
|
5000
5010
|
"aria-pressed"
|
|
5001
|
-
],
|
|
5011
|
+
], vs = [
|
|
5002
5012
|
"disabled",
|
|
5003
5013
|
"title",
|
|
5004
5014
|
"aria-label",
|
|
5005
5015
|
"aria-pressed"
|
|
5006
|
-
],
|
|
5016
|
+
], ys = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
5007
5017
|
__name: "FormattingBar",
|
|
5008
5018
|
props: {
|
|
5009
5019
|
currentFormatting: {},
|
|
@@ -5045,7 +5055,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5045
5055
|
"redo"
|
|
5046
5056
|
],
|
|
5047
5057
|
setup(e, { emit: t }) {
|
|
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 ??
|
|
5058
|
+
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 ?? us()), d = k(() => {
|
|
5049
5059
|
let e = c.value.color;
|
|
5050
5060
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
5051
5061
|
}), f = k(() => {
|
|
@@ -5078,7 +5088,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5078
5088
|
}, [F(i, {
|
|
5079
5089
|
name: "undo",
|
|
5080
5090
|
size: 18
|
|
5081
|
-
})], 40,
|
|
5091
|
+
})], 40, ps), P("button", {
|
|
5082
5092
|
type: "button",
|
|
5083
5093
|
class: "docx-formatting-bar__btn",
|
|
5084
5094
|
disabled: e.disabled || !e.canRedo,
|
|
@@ -5088,7 +5098,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5088
5098
|
}, [F(i, {
|
|
5089
5099
|
name: "redo",
|
|
5090
5100
|
size: 18
|
|
5091
|
-
})], 40,
|
|
5101
|
+
})], 40, ms)], 8, fs),
|
|
5092
5102
|
r[13] ||= P("span", {
|
|
5093
5103
|
class: "docx-formatting-bar__divider",
|
|
5094
5104
|
role: "separator"
|
|
@@ -5119,7 +5129,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5119
5129
|
}, [F(i, {
|
|
5120
5130
|
name: "format_bold",
|
|
5121
5131
|
size: 18
|
|
5122
|
-
})], 42,
|
|
5132
|
+
})], 42, gs),
|
|
5123
5133
|
P("button", {
|
|
5124
5134
|
type: "button",
|
|
5125
5135
|
class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
|
|
@@ -5131,7 +5141,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5131
5141
|
}, [F(i, {
|
|
5132
5142
|
name: "format_italic",
|
|
5133
5143
|
size: 18
|
|
5134
|
-
})], 42,
|
|
5144
|
+
})], 42, _s),
|
|
5135
5145
|
P("button", {
|
|
5136
5146
|
type: "button",
|
|
5137
5147
|
class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
|
|
@@ -5143,8 +5153,8 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5143
5153
|
}, [F(i, {
|
|
5144
5154
|
name: "format_underlined",
|
|
5145
5155
|
size: 18
|
|
5146
|
-
})], 42,
|
|
5147
|
-
], 8,
|
|
5156
|
+
})], 42, vs)
|
|
5157
|
+
], 8, hs),
|
|
5148
5158
|
e.showTextColorPicker ? (V(), N(D, { key: 1 }, [r[12] ||= P("span", {
|
|
5149
5159
|
class: "docx-formatting-bar__divider",
|
|
5150
5160
|
role: "separator"
|
|
@@ -5186,9 +5196,9 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5186
5196
|
"disabled",
|
|
5187
5197
|
"can-outdent"
|
|
5188
5198
|
])) : M("", !0)
|
|
5189
|
-
], 10,
|
|
5199
|
+
], 10, ds));
|
|
5190
5200
|
}
|
|
5191
|
-
}), [["__scopeId", "data-v-fc03de2e"]]),
|
|
5201
|
+
}), [["__scopeId", "data-v-fc03de2e"]]), bs = [
|
|
5192
5202
|
{
|
|
5193
5203
|
value: .5,
|
|
5194
5204
|
label: "50%"
|
|
@@ -5213,7 +5223,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5213
5223
|
value: 2,
|
|
5214
5224
|
label: "200%"
|
|
5215
5225
|
}
|
|
5216
|
-
],
|
|
5226
|
+
], xs = /*#__PURE__*/ t(/* @__PURE__ */ I({
|
|
5217
5227
|
__name: "ZoomControl",
|
|
5218
5228
|
props: {
|
|
5219
5229
|
value: { default: 1 },
|
|
@@ -5230,7 +5240,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5230
5240
|
},
|
|
5231
5241
|
emits: ["change"],
|
|
5232
5242
|
setup(e, { emit: t }) {
|
|
5233
|
-
let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ??
|
|
5243
|
+
let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? bs), 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(() => {
|
|
5234
5244
|
let e = a.value.map((e) => ({
|
|
5235
5245
|
value: String(e.value),
|
|
5236
5246
|
label: e.label
|
|
@@ -5258,7 +5268,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5258
5268
|
"disabled"
|
|
5259
5269
|
]));
|
|
5260
5270
|
}
|
|
5261
|
-
}), [["__scopeId", "data-v-8079e07f"]]),
|
|
5271
|
+
}), [["__scopeId", "data-v-8079e07f"]]), Ss = (e, t, n = {}) => {
|
|
5262
5272
|
let { colorMode: r = oe, locale: i = "en", ...a } = n;
|
|
5263
5273
|
return new Promise((n, o) => {
|
|
5264
5274
|
let s = H(null), c = null, l = !1, d = {
|
|
@@ -5284,7 +5294,7 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5284
5294
|
}
|
|
5285
5295
|
};
|
|
5286
5296
|
c = A({ setup() {
|
|
5287
|
-
return () => Ee(
|
|
5297
|
+
return () => Ee(ls, {
|
|
5288
5298
|
...a,
|
|
5289
5299
|
documentBuffer: e,
|
|
5290
5300
|
ref: s,
|
|
@@ -5299,4 +5309,4 @@ var ls = ["aria-label"], us = ["aria-label"], ds = [
|
|
|
5299
5309
|
});
|
|
5300
5310
|
};
|
|
5301
5311
|
//#endregion
|
|
5302
|
-
export {
|
|
5312
|
+
export { xi as AutocompleteCaretOverlay, ei as DEFAULT_AI_SUGGESTION_PRESETS, bt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Zr as DOCUMENT_PRESET_VERSION, Qr as DOCUMENT_STYLE_SET_VERSION, ls as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, ys 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, Jr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, xs as ZoomControl, xt as acceptAutocompleteSuggestion, St as acceptAutocompleteWord, ht as anonymizationDecorationsKey, Y as appendAutocompleteToken, zn as applyFolioAIEditOperations, ti as applySuggestions, Ct as autocompleteSuggestionKey, wt as autocompleteSuggestionPlugin, ii as buildPositionalText, Tt as clearAutocompleteSuggestion, On as clearTemplateSlashMenu, ue as colorModePlugin, kn as consumeTemplateSlashQuery, ui as createAICitationDecorationsPlugin, $r as createDocx, Ur as createEmptyDocument, Un as createFolioAIEditSnapshot, Yr as createStellaStyleDocumentPreset, Xr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, pr as deriveBlockId, Kn as diffWordSegments, Wr as extractDocumentStyleSet, Gr as extractDocumentStyleSetFromDocx, Et as finishAutocompleteSuggestion, pi as fromMarkdown, gt as getAnonymizationMatches, Dt as getAutocompleteSuggestion, st as getDocumentWatermark, ci as getFolioCaretViewportRect, mr as getFolioParaIdFromBlockId, li as getFolioSelectionViewportRect, nn as getTemplateDirectives, An as getTemplateSlashMenu, Xn as hashFolioAIBlockText, u as i18nPlugin, We as insertImageFromFile, Ke as insertPageBreakInView, Je as insertTableInView, Xe as insertTableOfContentsInView, Kr as inspectDocumentStyles, qr as inspectDocumentStylesFromDocx, gr as isFolioBlockId, _r as isSequentialFolioBlockId, ni as isSuggestionStale, Zn as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, Ss as renderAsync, jn as resetTemplateSlashQuery, ri as resolveSuggestionAnchor, an as scanDirectives, si as scrollFolioPositionIntoView, di as setAICitationsMeta, ai as setAISuggestionsMeta, fi as setActiveCitationMeta, vt as setAnonymizationTermsMeta, lt as setDocumentWatermark, oi as setFocusedSuggestionMeta, Dn as setTemplatePreviewValues, kt as shouldTriggerAutocomplete, At as startAutocompleteSuggestion, Mn as templateSlashMenuKey, mi as toMarkdown, hi as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };
|