@stll/folio-vue 0.34.3 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DocxEditor.vue.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +321 -319
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -100,9 +100,11 @@ import { buildPositionalText as Zr } from "@stll/folio-core/ai-suggestions/text-
|
|
|
100
100
|
import { setAISuggestionsMeta as Qr, setFocusedSuggestionMeta as $r } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
|
|
101
101
|
import { getFolioCaretViewportRect as ei, getFolioSelectionViewportRect as ti } from "@stll/folio-core/paged-layout/selectionViewportRect";
|
|
102
102
|
import { createAICitationDecorationsPlugin as ni, setAICitationsMeta as ri, setActiveCitationMeta as ii } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
103
|
-
import {
|
|
103
|
+
import { configureTiffDecoding as ai } from "@stll/folio-core/tiff-decoding";
|
|
104
|
+
import { HYPHENATION_DICTIONARY_IDS as oi, HyphenationDictionaryError as si, configureHyphenationAssets as ci, preloadHyphenationDictionaries as li } from "@stll/folio-core/hyphenation";
|
|
105
|
+
import { fromMarkdown as ui, toMarkdown as di, toMarkdownResult as fi } from "@stll/folio-core/markdown";
|
|
104
106
|
// src/composables/documentChrome.ts
|
|
105
|
-
var
|
|
107
|
+
var pi = (e) => {
|
|
106
108
|
if (!e) return {
|
|
107
109
|
sectionProperties: null,
|
|
108
110
|
watermark: void 0,
|
|
@@ -116,20 +118,20 @@ var ci = (e) => {
|
|
|
116
118
|
};
|
|
117
119
|
};
|
|
118
120
|
// src/composables/commentMarks.ts
|
|
119
|
-
function
|
|
121
|
+
function mi(e, t) {
|
|
120
122
|
let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
|
|
121
123
|
return n === r ? null : {
|
|
122
124
|
from: n,
|
|
123
125
|
to: r
|
|
124
126
|
};
|
|
125
127
|
}
|
|
126
|
-
function
|
|
128
|
+
function hi({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
|
|
127
129
|
let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
|
|
128
|
-
return i ?
|
|
130
|
+
return i ? mi(e, i) : null;
|
|
129
131
|
}
|
|
130
132
|
// src/composables/useCommentLifecycle.ts
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
+
var gi = 408, _i = 12;
|
|
134
|
+
function vi(e) {
|
|
133
135
|
let t = P(!1), n = P(null), r = P(null), i = P(null), a = P(null);
|
|
134
136
|
function o(t) {
|
|
135
137
|
let n = e.editorView.value, r = e.pagesContainer.value;
|
|
@@ -162,7 +164,7 @@ function pi(e) {
|
|
|
162
164
|
r.value = null;
|
|
163
165
|
return;
|
|
164
166
|
}
|
|
165
|
-
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left +
|
|
167
|
+
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + _i : l.width / 2 + gi;
|
|
166
168
|
r.value = {
|
|
167
169
|
top: c.top - l.top,
|
|
168
170
|
left: Math.max(16, Math.min(d, l.width - 16)),
|
|
@@ -173,7 +175,7 @@ function pi(e) {
|
|
|
173
175
|
function c() {
|
|
174
176
|
let s = e.editorView.value;
|
|
175
177
|
if (!s) return;
|
|
176
|
-
let c = r.value, l = s.state.selection, u =
|
|
178
|
+
let c = r.value, l = s.state.selection, u = hi({
|
|
177
179
|
docSize: s.state.doc.content.size,
|
|
178
180
|
capturedRange: c ? {
|
|
179
181
|
from: c.from,
|
|
@@ -210,7 +212,7 @@ function pi(e) {
|
|
|
210
212
|
};
|
|
211
213
|
}
|
|
212
214
|
// src/composables/useCommentManagement.ts
|
|
213
|
-
function
|
|
215
|
+
function yi(e) {
|
|
214
216
|
let t = Nt(), n = P([]), r = P(!1);
|
|
215
217
|
function i() {
|
|
216
218
|
r.value = !0;
|
|
@@ -401,7 +403,7 @@ function mi(e) {
|
|
|
401
403
|
};
|
|
402
404
|
}
|
|
403
405
|
// src/utils/imageClipboard.ts
|
|
404
|
-
function
|
|
406
|
+
function bi(e, t) {
|
|
405
407
|
let n = e.state.doc.nodeAt(t);
|
|
406
408
|
if (!n || n.type.name !== "image") return;
|
|
407
409
|
let r = n.attrs.src;
|
|
@@ -415,7 +417,7 @@ function hi(e, t) {
|
|
|
415
417
|
e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
416
418
|
});
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function xi(e) {
|
|
419
421
|
return new Promise((t, n) => {
|
|
420
422
|
let r = new FileReader();
|
|
421
423
|
r.onload = () => {
|
|
@@ -423,7 +425,7 @@ function gi(e) {
|
|
|
423
425
|
}, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
|
|
424
426
|
});
|
|
425
427
|
}
|
|
426
|
-
function
|
|
428
|
+
function Si(e) {
|
|
427
429
|
return new Promise((t) => {
|
|
428
430
|
let n = new Image();
|
|
429
431
|
n.onload = () => t({
|
|
@@ -435,7 +437,7 @@ function _i(e) {
|
|
|
435
437
|
}), n.src = e;
|
|
436
438
|
});
|
|
437
439
|
}
|
|
438
|
-
function
|
|
440
|
+
function Ci(e, t, n, r) {
|
|
439
441
|
let i = e.state.schema.nodes.image;
|
|
440
442
|
if (!i) return;
|
|
441
443
|
let a = i.create({
|
|
@@ -448,21 +450,21 @@ function vi(e, t, n, r) {
|
|
|
448
450
|
}), o = e.state.tr.replaceSelectionWith(a);
|
|
449
451
|
e.dispatch(o);
|
|
450
452
|
}
|
|
451
|
-
async function
|
|
453
|
+
async function wi(e) {
|
|
452
454
|
try {
|
|
453
455
|
let t = await navigator.clipboard.read();
|
|
454
456
|
for (let n of t) {
|
|
455
457
|
let t = n.types.find((e) => e.startsWith("image/"));
|
|
456
458
|
if (t) {
|
|
457
|
-
let r = await
|
|
458
|
-
a > 612 && (o = Math.round(612 / a * o), a = 612),
|
|
459
|
+
let r = await xi(await n.getType(t)), i = await Si(r), a = i.width, o = i.height;
|
|
460
|
+
a > 612 && (o = Math.round(612 / a * o), a = 612), Ci(e, r, a, o);
|
|
459
461
|
return;
|
|
460
462
|
}
|
|
461
463
|
if (n.types.includes("text/html")) {
|
|
462
464
|
let t = await n.getType("text/html"), r = await Xt(t), i = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(r)?.groups?.src;
|
|
463
465
|
if (i) {
|
|
464
466
|
let t = /data-width="(?<w>\d+)"/u.exec(r)?.groups?.w, n = /data-height="(?<h>\d+)"/u.exec(r)?.groups?.h, a = t ? Number(t) : 200, o = n ? Number(n) : 200;
|
|
465
|
-
|
|
467
|
+
Ci(e, i, a || 200, o || 200);
|
|
466
468
|
return;
|
|
467
469
|
}
|
|
468
470
|
}
|
|
@@ -483,14 +485,14 @@ async function yi(e) {
|
|
|
483
485
|
}
|
|
484
486
|
}
|
|
485
487
|
}
|
|
486
|
-
function
|
|
488
|
+
function Ti(e, t) {
|
|
487
489
|
let n = e.state.doc.nodeAt(t);
|
|
488
490
|
if (!n || n.type.name !== "image") return;
|
|
489
491
|
let r = document.createElement("input");
|
|
490
492
|
r.type = "file", r.accept = "image/*", r.onchange = async () => {
|
|
491
493
|
let i = r.files?.[0];
|
|
492
494
|
if (!i) return;
|
|
493
|
-
let a = await
|
|
495
|
+
let a = await xi(i), o = await Si(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);
|
|
494
496
|
try {
|
|
495
497
|
let r = e.state.tr.setNodeMarkup(t, void 0, {
|
|
496
498
|
...n.attrs,
|
|
@@ -504,7 +506,7 @@ function bi(e, t) {
|
|
|
504
506
|
}, r.click();
|
|
505
507
|
}
|
|
506
508
|
// src/composables/useContextMenus.ts
|
|
507
|
-
var
|
|
509
|
+
var Ei = /* @__PURE__ */ new Set([
|
|
508
510
|
"inline",
|
|
509
511
|
"square",
|
|
510
512
|
"tight",
|
|
@@ -513,16 +515,16 @@ var xi = /* @__PURE__ */ new Set([
|
|
|
513
515
|
"behind",
|
|
514
516
|
"inFront"
|
|
515
517
|
]);
|
|
516
|
-
function
|
|
517
|
-
return typeof e == "string" &&
|
|
518
|
+
function Di(e) {
|
|
519
|
+
return typeof e == "string" && Ei.has(e);
|
|
518
520
|
}
|
|
519
|
-
function
|
|
520
|
-
return
|
|
521
|
+
function Oi(e) {
|
|
522
|
+
return Di(e) ? e : "inline";
|
|
521
523
|
}
|
|
522
|
-
function
|
|
524
|
+
function ki(e) {
|
|
523
525
|
return e === "left" || e === "right" || e === "none" ? e : null;
|
|
524
526
|
}
|
|
525
|
-
function
|
|
527
|
+
function Ai(e) {
|
|
526
528
|
let { t } = u(), n = P({
|
|
527
529
|
isOpen: !1,
|
|
528
530
|
position: {
|
|
@@ -597,7 +599,7 @@ function Ti(e) {
|
|
|
597
599
|
r.value = c(o, i, {
|
|
598
600
|
x: t.clientX,
|
|
599
601
|
y: t.clientY
|
|
600
|
-
},
|
|
602
|
+
}, Oi(s.attrs.wrapType), ki(s.attrs.cssFloat)), n.value.isOpen = !1;
|
|
601
603
|
return;
|
|
602
604
|
}
|
|
603
605
|
}
|
|
@@ -633,7 +635,7 @@ function Ti(e) {
|
|
|
633
635
|
o && o.type.name === "image" && (r.value = c(a.element, a.pmPos, {
|
|
634
636
|
x: t.clientX,
|
|
635
637
|
y: t.clientY
|
|
636
|
-
},
|
|
638
|
+
}, Oi(o.attrs.wrapType), ki(o.attrs.cssFloat)), n.value.isOpen = !1);
|
|
637
639
|
}
|
|
638
640
|
function f(t) {
|
|
639
641
|
let n = e.editorView.value, i = r.value;
|
|
@@ -656,7 +658,7 @@ function Ti(e) {
|
|
|
656
658
|
case "cut":
|
|
657
659
|
if (e.selectedImage.value) {
|
|
658
660
|
let t = e.selectedImage.value.pmPos;
|
|
659
|
-
|
|
661
|
+
bi(n, t);
|
|
660
662
|
let r = n.state.doc.nodeAt(t);
|
|
661
663
|
r && U(n, Jt({
|
|
662
664
|
from: t,
|
|
@@ -666,10 +668,10 @@ function Ti(e) {
|
|
|
666
668
|
} else n.focus(), document.execCommand("cut");
|
|
667
669
|
break;
|
|
668
670
|
case "copy":
|
|
669
|
-
e.selectedImage.value ? (
|
|
671
|
+
e.selectedImage.value ? (bi(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
|
|
670
672
|
break;
|
|
671
673
|
case "paste":
|
|
672
|
-
|
|
674
|
+
wi(n).then(() => e.onPaste?.()).catch(() => void 0);
|
|
673
675
|
break;
|
|
674
676
|
case "pasteAsPlainText":
|
|
675
677
|
navigator.clipboard.readText().then((t) => {
|
|
@@ -694,7 +696,7 @@ function Ti(e) {
|
|
|
694
696
|
e.selectedImage.value && (e.showImageProperties.value = !0);
|
|
695
697
|
break;
|
|
696
698
|
case "replaceImage":
|
|
697
|
-
e.selectedImage.value &&
|
|
699
|
+
e.selectedImage.value && Ti(n, e.selectedImage.value.pmPos);
|
|
698
700
|
break;
|
|
699
701
|
case "deleteImage":
|
|
700
702
|
if (e.selectedImage.value) {
|
|
@@ -739,7 +741,7 @@ function Ti(e) {
|
|
|
739
741
|
};
|
|
740
742
|
}
|
|
741
743
|
// src/composables/useDocumentLifecycle.ts
|
|
742
|
-
function
|
|
744
|
+
function ji(e) {
|
|
743
745
|
async function t(t) {
|
|
744
746
|
e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
|
|
745
747
|
}
|
|
@@ -757,19 +759,19 @@ function Ei(e) {
|
|
|
757
759
|
});
|
|
758
760
|
}
|
|
759
761
|
// src/composables/useDocxEditorRefApi.ts
|
|
760
|
-
var
|
|
762
|
+
var Mi = async (e, t) => {
|
|
761
763
|
let n = await e.saveDocument(t);
|
|
762
764
|
if (!n) return null;
|
|
763
765
|
let r = await n.arrayBuffer();
|
|
764
766
|
return e.clearCommentsDirty(), e.onSave?.(r), r;
|
|
765
767
|
};
|
|
766
|
-
function
|
|
768
|
+
function Ni(e) {
|
|
767
769
|
let t = new hn();
|
|
768
770
|
function n() {
|
|
769
771
|
e.onPrint?.(), window.print();
|
|
770
772
|
}
|
|
771
773
|
function r(t) {
|
|
772
|
-
return
|
|
774
|
+
return Mi({
|
|
773
775
|
clearCommentsDirty: e.clearCommentsDirty,
|
|
774
776
|
onSave: e.onSave,
|
|
775
777
|
saveDocument: e.saveDocument
|
|
@@ -1189,10 +1191,10 @@ function Oi(e) {
|
|
|
1189
1191
|
} };
|
|
1190
1192
|
}
|
|
1191
1193
|
// src/utils/fontFaces.ts
|
|
1192
|
-
function
|
|
1194
|
+
function Pi() {
|
|
1193
1195
|
return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
|
|
1194
1196
|
}
|
|
1195
|
-
async function
|
|
1197
|
+
async function Fi(e, t, n, r) {
|
|
1196
1198
|
let i;
|
|
1197
1199
|
try {
|
|
1198
1200
|
i = new FontFace(t, n, r), e.add(i);
|
|
@@ -1201,26 +1203,26 @@ async function Ai(e, t, n, r) {
|
|
|
1201
1203
|
}
|
|
1202
1204
|
return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
|
|
1203
1205
|
}
|
|
1204
|
-
function
|
|
1205
|
-
let t =
|
|
1206
|
+
function Ii(e) {
|
|
1207
|
+
let t = Pi();
|
|
1206
1208
|
if (t) for (let n of e) t.delete(n);
|
|
1207
1209
|
}
|
|
1208
1210
|
// src/utils/embeddedFonts.ts
|
|
1209
|
-
var
|
|
1211
|
+
var Li = {
|
|
1210
1212
|
faces: [],
|
|
1211
1213
|
familyMap: /* @__PURE__ */ new Map()
|
|
1212
1214
|
};
|
|
1213
|
-
async function
|
|
1214
|
-
let t =
|
|
1215
|
-
if (!t) return
|
|
1215
|
+
async function Ri(e) {
|
|
1216
|
+
let t = Pi();
|
|
1217
|
+
if (!t) return Li;
|
|
1216
1218
|
let n;
|
|
1217
1219
|
try {
|
|
1218
1220
|
n = await rr(e);
|
|
1219
1221
|
} catch {
|
|
1220
|
-
return
|
|
1222
|
+
return Li;
|
|
1221
1223
|
}
|
|
1222
1224
|
return {
|
|
1223
|
-
faces: (await Promise.all(n.map((e) =>
|
|
1225
|
+
faces: (await Promise.all(n.map((e) => Fi(t, e.family, e.bytes, {
|
|
1224
1226
|
weight: String(e.weight),
|
|
1225
1227
|
style: e.style
|
|
1226
1228
|
})))).filter((e) => e !== null),
|
|
@@ -1228,17 +1230,17 @@ async function Ni(e) {
|
|
|
1228
1230
|
};
|
|
1229
1231
|
}
|
|
1230
1232
|
// src/utils/hostFonts.ts
|
|
1231
|
-
function
|
|
1233
|
+
function zi(e) {
|
|
1232
1234
|
return typeof e == "string" && e.trim().length > 0;
|
|
1233
1235
|
}
|
|
1234
|
-
function
|
|
1235
|
-
return typeof e != "object" || !e ? !1 :
|
|
1236
|
+
function Bi(e) {
|
|
1237
|
+
return typeof e != "object" || !e ? !1 : zi(Reflect.get(e, "family")) && zi(Reflect.get(e, "src"));
|
|
1236
1238
|
}
|
|
1237
|
-
function
|
|
1239
|
+
function Vi(e) {
|
|
1238
1240
|
if (!e) return [];
|
|
1239
1241
|
let t = [];
|
|
1240
1242
|
for (let n of e) {
|
|
1241
|
-
if (!
|
|
1243
|
+
if (!Bi(n)) continue;
|
|
1242
1244
|
let e = { display: "swap" };
|
|
1243
1245
|
(typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
|
|
1244
1246
|
family: n.family.trim(),
|
|
@@ -1248,19 +1250,19 @@ function Ii(e) {
|
|
|
1248
1250
|
}
|
|
1249
1251
|
return t;
|
|
1250
1252
|
}
|
|
1251
|
-
async function
|
|
1252
|
-
let t =
|
|
1253
|
+
async function Hi(e) {
|
|
1254
|
+
let t = Pi();
|
|
1253
1255
|
if (!t) return [];
|
|
1254
|
-
let n =
|
|
1255
|
-
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) =>
|
|
1256
|
+
let n = Vi(e);
|
|
1257
|
+
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => Fi(t, e, n, r)))).filter((e) => e !== null);
|
|
1256
1258
|
}
|
|
1257
1259
|
// src/composables/useFontLifecycle.ts
|
|
1258
|
-
var
|
|
1259
|
-
loadEmbedded:
|
|
1260
|
-
loadHost:
|
|
1261
|
-
remove:
|
|
1260
|
+
var Ui = {
|
|
1261
|
+
loadEmbedded: Ri,
|
|
1262
|
+
loadHost: Hi,
|
|
1263
|
+
remove: Ii
|
|
1262
1264
|
};
|
|
1263
|
-
function
|
|
1265
|
+
function Wi(e, t = Ui) {
|
|
1264
1266
|
R(() => e.isReady.value ? e.sourceBuffer() : null, (n, r, i) => {
|
|
1265
1267
|
if (!n) return;
|
|
1266
1268
|
let a = !1, o = [], s = !1;
|
|
@@ -1283,7 +1285,7 @@ function zi(e, t = Ri) {
|
|
|
1283
1285
|
}, { immediate: !0 });
|
|
1284
1286
|
}
|
|
1285
1287
|
// src/composables/useFormattingActions.ts
|
|
1286
|
-
function
|
|
1288
|
+
function Gi(e) {
|
|
1287
1289
|
let t = () => e.activeView?.value ?? e.editorView.value;
|
|
1288
1290
|
function n() {
|
|
1289
1291
|
let e = t();
|
|
@@ -1329,7 +1331,7 @@ function Bi(e) {
|
|
|
1329
1331
|
};
|
|
1330
1332
|
}
|
|
1331
1333
|
// src/composables/useHyperlinkManagement.ts
|
|
1332
|
-
function
|
|
1334
|
+
function Ki(e) {
|
|
1333
1335
|
let t = P(null);
|
|
1334
1336
|
function n(t) {
|
|
1335
1337
|
let n = e.editorView.value;
|
|
@@ -1379,7 +1381,7 @@ function Vi(e) {
|
|
|
1379
1381
|
};
|
|
1380
1382
|
}
|
|
1381
1383
|
// src/composables/useImageActions.ts
|
|
1382
|
-
function
|
|
1384
|
+
function qi(e) {
|
|
1383
1385
|
let t = Se(null), n = P(!1), r = S(() => {
|
|
1384
1386
|
e.stateTick.value;
|
|
1385
1387
|
let n = e.editorView.value, r = t.value;
|
|
@@ -1425,7 +1427,7 @@ function Hi(e) {
|
|
|
1425
1427
|
};
|
|
1426
1428
|
}
|
|
1427
1429
|
// src/composables/useKeyboardShortcuts.ts
|
|
1428
|
-
function
|
|
1430
|
+
function Ji(e) {
|
|
1429
1431
|
function t(t) {
|
|
1430
1432
|
if (Ke(t, {
|
|
1431
1433
|
scope: e.scope(),
|
|
@@ -1440,7 +1442,7 @@ function Ui(e) {
|
|
|
1440
1442
|
return ve(() => window.addEventListener("keydown", t)), _e(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
|
|
1441
1443
|
}
|
|
1442
1444
|
// src/composables/useOutlineSidebar.ts
|
|
1443
|
-
function
|
|
1445
|
+
function Yi(e) {
|
|
1444
1446
|
function t() {
|
|
1445
1447
|
let t = e.editorView.value;
|
|
1446
1448
|
t && (e.outlineHeadings.value = hr(t.state.doc, it(t.state)));
|
|
@@ -1473,7 +1475,7 @@ function Wi(e) {
|
|
|
1473
1475
|
};
|
|
1474
1476
|
}
|
|
1475
1477
|
// src/composables/usePageSetupControls.ts
|
|
1476
|
-
function
|
|
1478
|
+
function Xi(e) {
|
|
1477
1479
|
function t(t) {
|
|
1478
1480
|
if (e.readOnly.value) return;
|
|
1479
1481
|
let n = e.applySectionProperties?.(t);
|
|
@@ -1542,33 +1544,33 @@ function Gi(e) {
|
|
|
1542
1544
|
};
|
|
1543
1545
|
}
|
|
1544
1546
|
// src/utils/textSelection.ts
|
|
1545
|
-
var
|
|
1546
|
-
function
|
|
1547
|
-
return !e || e.length === 0 ? !1 :
|
|
1547
|
+
var Zi = /[\p{L}\p{N}\p{M}_''-]/u, Qi = /\s/;
|
|
1548
|
+
function $i(e) {
|
|
1549
|
+
return !e || e.length === 0 ? !1 : Zi.test(e);
|
|
1548
1550
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return !e || e.length === 0 ? !1 :
|
|
1551
|
+
function ea(e) {
|
|
1552
|
+
return !e || e.length === 0 ? !1 : Qi.test(e);
|
|
1551
1553
|
}
|
|
1552
|
-
function
|
|
1554
|
+
function ta(e, t) {
|
|
1553
1555
|
if (!e || e.length === 0) return [0, 0];
|
|
1554
1556
|
t = Math.max(0, Math.min(t, e.length - 1));
|
|
1555
1557
|
let n = e[t];
|
|
1556
|
-
if (
|
|
1558
|
+
if (ea(n)) {
|
|
1557
1559
|
let n = t, r = t;
|
|
1558
|
-
for (; n > 0 &&
|
|
1559
|
-
for (; r < e.length &&
|
|
1560
|
+
for (; n > 0 && ea(e[n - 1]);) n--;
|
|
1561
|
+
for (; r < e.length && ea(e[r]);) r++;
|
|
1560
1562
|
return [n, r];
|
|
1561
1563
|
}
|
|
1562
|
-
if (
|
|
1564
|
+
if ($i(n)) {
|
|
1563
1565
|
let n = t, r = t;
|
|
1564
|
-
for (; n > 0 &&
|
|
1565
|
-
for (; r < e.length &&
|
|
1566
|
+
for (; n > 0 && $i(e[n - 1]);) n--;
|
|
1567
|
+
for (; r < e.length && $i(e[r]);) r++;
|
|
1566
1568
|
return [n, r];
|
|
1567
1569
|
}
|
|
1568
1570
|
return [t, t + 1];
|
|
1569
1571
|
}
|
|
1570
1572
|
// src/utils/domQueries.ts
|
|
1571
|
-
function
|
|
1573
|
+
function na(e, t, n) {
|
|
1572
1574
|
let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span${Tt}`)) : Fe(e);
|
|
1573
1575
|
for (let e of r) {
|
|
1574
1576
|
let n = Dt(e) ?? NaN, r = Et(e) ?? NaN;
|
|
@@ -1576,24 +1578,24 @@ function Zi(e, t, n) {
|
|
|
1576
1578
|
}
|
|
1577
1579
|
return null;
|
|
1578
1580
|
}
|
|
1579
|
-
function
|
|
1581
|
+
function ra(e, t) {
|
|
1580
1582
|
e && Er(e, t);
|
|
1581
1583
|
}
|
|
1582
|
-
function
|
|
1584
|
+
function ia(e, t, n, r) {
|
|
1583
1585
|
if (!e || !t) return null;
|
|
1584
1586
|
let i = Cr(e, n, r, 1);
|
|
1585
1587
|
return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
|
|
1586
1588
|
}
|
|
1587
|
-
function
|
|
1589
|
+
function aa(e, t, n, r) {
|
|
1588
1590
|
if (!e) return;
|
|
1589
|
-
let i =
|
|
1591
|
+
let i = na(e, t, r);
|
|
1590
1592
|
if (!i) return;
|
|
1591
|
-
let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] =
|
|
1593
|
+
let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] = ta(a, t - o), l = o + s, u = o + c;
|
|
1592
1594
|
l < u && n(l, u);
|
|
1593
1595
|
}
|
|
1594
|
-
function
|
|
1596
|
+
function oa(e, t, n, r) {
|
|
1595
1597
|
if (!e) return;
|
|
1596
|
-
let i =
|
|
1598
|
+
let i = na(e, t, r);
|
|
1597
1599
|
if (!i) return;
|
|
1598
1600
|
let a = i.closest(".layout-paragraph");
|
|
1599
1601
|
if (!a) return;
|
|
@@ -1601,11 +1603,11 @@ function ta(e, t, n, r) {
|
|
|
1601
1603
|
!Number.isNaN(o) && !Number.isNaN(s) && o < s && n(o, s);
|
|
1602
1604
|
}
|
|
1603
1605
|
// src/utils/listItems.ts
|
|
1604
|
-
var
|
|
1606
|
+
var sa = (e, t) => t > 0 ? e[t - 1] : void 0, ca = ({ clientX: e, clientY: t, viewport: n }) => ({
|
|
1605
1607
|
left: e - n.left,
|
|
1606
1608
|
top: t - n.top
|
|
1607
|
-
}),
|
|
1608
|
-
function
|
|
1609
|
+
}), la = 500;
|
|
1610
|
+
function ua(t) {
|
|
1609
1611
|
let n = P(null), r = null;
|
|
1610
1612
|
function i() {
|
|
1611
1613
|
r !== null && (clearTimeout(r), r = null);
|
|
@@ -1623,7 +1625,7 @@ function aa(t) {
|
|
|
1623
1625
|
visible: !1
|
|
1624
1626
|
}), m = null;
|
|
1625
1627
|
function h(e, n) {
|
|
1626
|
-
return
|
|
1628
|
+
return ia(t.pagesRef.value, t.editorView.value, e, n);
|
|
1627
1629
|
}
|
|
1628
1630
|
function g() {
|
|
1629
1631
|
let e = a.value;
|
|
@@ -1649,13 +1651,13 @@ function aa(t) {
|
|
|
1649
1651
|
} catch {}
|
|
1650
1652
|
}
|
|
1651
1653
|
function y(e) {
|
|
1652
|
-
|
|
1654
|
+
ra(t.pagesRef.value, e);
|
|
1653
1655
|
}
|
|
1654
1656
|
function ee(e) {
|
|
1655
|
-
|
|
1657
|
+
aa(t.pagesRef.value, e, v, a.value?.position);
|
|
1656
1658
|
}
|
|
1657
1659
|
function te(e) {
|
|
1658
|
-
|
|
1660
|
+
oa(t.pagesRef.value, e, v, a.value?.position);
|
|
1659
1661
|
}
|
|
1660
1662
|
function ne(e) {
|
|
1661
1663
|
let n = t.editorView.value;
|
|
@@ -1697,7 +1699,7 @@ function aa(t) {
|
|
|
1697
1699
|
}, yr));
|
|
1698
1700
|
return;
|
|
1699
1701
|
}
|
|
1700
|
-
let u =
|
|
1702
|
+
let u = ca({
|
|
1701
1703
|
clientX: c.clientX,
|
|
1702
1704
|
clientY: c.clientY,
|
|
1703
1705
|
viewport: s.getBoundingClientRect()
|
|
@@ -1734,7 +1736,7 @@ function aa(t) {
|
|
|
1734
1736
|
if (a && a.state.selection.from !== a.state.selection.to) return;
|
|
1735
1737
|
let o = t.pagesViewportRef.value;
|
|
1736
1738
|
if (!o) return;
|
|
1737
|
-
let s = r.getBoundingClientRect(), c =
|
|
1739
|
+
let s = r.getBoundingClientRect(), c = ca({
|
|
1738
1740
|
clientX: s.left,
|
|
1739
1741
|
clientY: s.bottom,
|
|
1740
1742
|
viewport: o.getBoundingClientRect()
|
|
@@ -1765,7 +1767,7 @@ function aa(t) {
|
|
|
1765
1767
|
if (!l?.package) return;
|
|
1766
1768
|
let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = pn(l.package), p = f.hasTitlePg && d === 1, m = fn(f, c, p);
|
|
1767
1769
|
if (!m) {
|
|
1768
|
-
let e = t.layout.value?.pages, n = e === void 0 ? void 0 :
|
|
1770
|
+
let e = t.layout.value?.pages, n = e === void 0 ? void 0 : sa(e, d)?.sectionIndex, r = gr({
|
|
1769
1771
|
document: l,
|
|
1770
1772
|
position: c,
|
|
1771
1773
|
referenceType: p ? "first" : "default",
|
|
@@ -1786,7 +1788,7 @@ function aa(t) {
|
|
|
1786
1788
|
position: c,
|
|
1787
1789
|
rId: h,
|
|
1788
1790
|
targetRect: {
|
|
1789
|
-
...
|
|
1791
|
+
...ca({
|
|
1790
1792
|
clientX: _.left,
|
|
1791
1793
|
clientY: _.top,
|
|
1792
1794
|
viewport: v
|
|
@@ -1844,7 +1846,7 @@ function aa(t) {
|
|
|
1844
1846
|
...e,
|
|
1845
1847
|
pageNumber: t,
|
|
1846
1848
|
targetRect: {
|
|
1847
|
-
...
|
|
1849
|
+
...ca({
|
|
1848
1850
|
clientX: i.left,
|
|
1849
1851
|
clientY: i.top,
|
|
1850
1852
|
viewport: s
|
|
@@ -1883,7 +1885,7 @@ function aa(t) {
|
|
|
1883
1885
|
return;
|
|
1884
1886
|
}
|
|
1885
1887
|
let h = Date.now();
|
|
1886
|
-
if (h - o <
|
|
1888
|
+
if (h - o < la && s === m ? c++ : c = 1, o = h, s = m, c === 2) ee(m);
|
|
1887
1889
|
else if (c >= 3) te(m), c = 0;
|
|
1888
1890
|
else if (e.shiftKey) {
|
|
1889
1891
|
let { from: e } = f.state.selection;
|
|
@@ -1955,18 +1957,18 @@ function aa(t) {
|
|
|
1955
1957
|
};
|
|
1956
1958
|
}
|
|
1957
1959
|
// src/composables/usePortalClass.ts
|
|
1958
|
-
var
|
|
1959
|
-
function
|
|
1960
|
-
be(
|
|
1960
|
+
var da = Symbol("docx-portal-class");
|
|
1961
|
+
function fa(e) {
|
|
1962
|
+
be(da, S(() => ({
|
|
1961
1963
|
"ep-root": !0,
|
|
1962
1964
|
dark: !!L(e)
|
|
1963
1965
|
})));
|
|
1964
1966
|
}
|
|
1965
|
-
function
|
|
1966
|
-
return me(
|
|
1967
|
+
function pa() {
|
|
1968
|
+
return me(da, S(() => ({ "ep-root": !0 })));
|
|
1967
1969
|
}
|
|
1968
1970
|
// src/composables/useRemoteSelectionSync.ts
|
|
1969
|
-
var
|
|
1971
|
+
var ma = (e) => {
|
|
1970
1972
|
let t = new Dr(), n = null, r = () => {
|
|
1971
1973
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
1972
1974
|
let r = e.pagesRef.value;
|
|
@@ -1990,7 +1992,7 @@ var la = (e) => {
|
|
|
1990
1992
|
], i, { flush: "post" }), ye(() => {
|
|
1991
1993
|
a(), r();
|
|
1992
1994
|
});
|
|
1993
|
-
},
|
|
1995
|
+
}, ha = (e) => {
|
|
1994
1996
|
let t = new Or(), n = null, r = () => {
|
|
1995
1997
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
1996
1998
|
let r = e.pagesRef.value;
|
|
@@ -2041,25 +2043,25 @@ var la = (e) => {
|
|
|
2041
2043
|
clearOverlay: r,
|
|
2042
2044
|
updateSelectionOverlay: i
|
|
2043
2045
|
};
|
|
2044
|
-
},
|
|
2046
|
+
}, ga = 3e3, _a = (e = en) => {
|
|
2045
2047
|
let t = P(null), n = null, r = () => {
|
|
2046
2048
|
n !== null && e.clearTimer(n), n = null, t.value = null;
|
|
2047
2049
|
};
|
|
2048
2050
|
return ye(r), {
|
|
2049
2051
|
message: t,
|
|
2050
2052
|
show: (i) => {
|
|
2051
|
-
r(), t.value = i, n = e.setTimer(r,
|
|
2053
|
+
r(), t.value = i, n = e.setTimer(r, ga);
|
|
2052
2054
|
}
|
|
2053
2055
|
};
|
|
2054
|
-
},
|
|
2056
|
+
}, va = () => pe("div", {
|
|
2055
2057
|
class: "docx-editor-vue__loading",
|
|
2056
2058
|
"aria-busy": "true"
|
|
2057
|
-
}, [pe("progress", { "aria-hidden": "true" })]),
|
|
2059
|
+
}, [pe("progress", { "aria-hidden": "true" })]), ya = [
|
|
2058
2060
|
"data-folio-anonymization-label",
|
|
2059
2061
|
"data-folio-anonymization-canonical",
|
|
2060
2062
|
"data-folio-anonymization-selected",
|
|
2061
2063
|
"title"
|
|
2062
|
-
],
|
|
2064
|
+
], ba = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2063
2065
|
__name: "AnonymizationRectsOverlay",
|
|
2064
2066
|
props: {
|
|
2065
2067
|
getHighlights: { type: Function },
|
|
@@ -2174,13 +2176,13 @@ var la = (e) => {
|
|
|
2174
2176
|
width: `${n.width}px`,
|
|
2175
2177
|
height: `${n.height}px`
|
|
2176
2178
|
})
|
|
2177
|
-
}, null, 14,
|
|
2179
|
+
}, null, 14, ya))), 128))], 64))), 128))], 512));
|
|
2178
2180
|
}
|
|
2179
|
-
}), [["__scopeId", "data-v-1260b607"]]),
|
|
2181
|
+
}), [["__scopeId", "data-v-1260b607"]]), xa = {
|
|
2180
2182
|
key: 0,
|
|
2181
2183
|
class: "folio-autocomplete-overlay",
|
|
2182
2184
|
"data-folio-autocomplete-overlay": ""
|
|
2183
|
-
},
|
|
2185
|
+
}, Sa = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2184
2186
|
__name: "AutocompleteCaretOverlay",
|
|
2185
2187
|
props: {
|
|
2186
2188
|
caret: {},
|
|
@@ -2188,7 +2190,7 @@ var la = (e) => {
|
|
|
2188
2190
|
isStreaming: { type: Boolean }
|
|
2189
2191
|
},
|
|
2190
2192
|
setup(e) {
|
|
2191
|
-
return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div",
|
|
2193
|
+
return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div", xa, [D("span", {
|
|
2192
2194
|
class: "folio-autocomplete-ghost",
|
|
2193
2195
|
style: M({
|
|
2194
2196
|
left: `${e.caret.x}px`,
|
|
@@ -2201,7 +2203,7 @@ var la = (e) => {
|
|
|
2201
2203
|
"aria-hidden": "true"
|
|
2202
2204
|
}, "stella", 2)], 4)])) : T("", !0);
|
|
2203
2205
|
}
|
|
2204
|
-
}), [["__scopeId", "data-v-39deaa80"]]),
|
|
2206
|
+
}), [["__scopeId", "data-v-39deaa80"]]), Ca = 48, wa = /* @__PURE__ */ A({
|
|
2205
2207
|
__name: "AutocompleteSuggestionOverlay",
|
|
2206
2208
|
props: {
|
|
2207
2209
|
getPagesContainer: { type: Function },
|
|
@@ -2220,7 +2222,7 @@ var la = (e) => {
|
|
|
2220
2222
|
let c = r.querySelector(".layout-page-content");
|
|
2221
2223
|
if (!c) return;
|
|
2222
2224
|
let l = (c.getBoundingClientRect().right - a.left) / i;
|
|
2223
|
-
return Math.max(
|
|
2225
|
+
return Math.max(Ca, l - t);
|
|
2224
2226
|
}
|
|
2225
2227
|
}, s = () => {
|
|
2226
2228
|
let e = t.getPagesContainer();
|
|
@@ -2270,7 +2272,7 @@ var la = (e) => {
|
|
|
2270
2272
|
t.editorState,
|
|
2271
2273
|
t.zoom,
|
|
2272
2274
|
r.value
|
|
2273
|
-
], () => c()), (e, t) => (N(), w(
|
|
2275
|
+
], () => c()), (e, t) => (N(), w(Sa, {
|
|
2274
2276
|
caret: n.value?.caret ?? null,
|
|
2275
2277
|
text: n.value?.text ?? "",
|
|
2276
2278
|
"is-streaming": n.value?.isStreaming ?? !1
|
|
@@ -2280,14 +2282,14 @@ var la = (e) => {
|
|
|
2280
2282
|
"is-streaming"
|
|
2281
2283
|
]));
|
|
2282
2284
|
}
|
|
2283
|
-
}),
|
|
2285
|
+
}), Ta = ["aria-label"], Ea = {
|
|
2284
2286
|
key: 0,
|
|
2285
2287
|
class: "content-control-picker__items",
|
|
2286
2288
|
role: "menu"
|
|
2287
|
-
},
|
|
2289
|
+
}, Da = {
|
|
2288
2290
|
key: 0,
|
|
2289
2291
|
class: "content-control-picker__empty"
|
|
2290
|
-
},
|
|
2292
|
+
}, Oa = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2291
2293
|
__name: "ContentControlWidgetsOverlay",
|
|
2292
2294
|
props: {
|
|
2293
2295
|
eventRoot: {},
|
|
@@ -2295,7 +2297,7 @@ var la = (e) => {
|
|
|
2295
2297
|
},
|
|
2296
2298
|
emits: ["refused"],
|
|
2297
2299
|
setup(e, { emit: t }) {
|
|
2298
|
-
let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o =
|
|
2300
|
+
let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o = pa(), s = t, c = new Nr({ onRefused: (e) => s("refused", r($(e))) }), l = Se(c.getSnapshot()), f = c.subscribe(() => {
|
|
2299
2301
|
l.value = c.getSnapshot();
|
|
2300
2302
|
});
|
|
2301
2303
|
R([() => n.view, () => n.eventRoot], ([e, t]) => c.bind(e, t), { immediate: !0 }), _e(() => {
|
|
@@ -2315,7 +2317,7 @@ var la = (e) => {
|
|
|
2315
2317
|
"aria-label": l.value.status === "dropdown" ? L(r)("contentControlDropdownAriaLabel") : L(r)("contentControlDateAriaLabel"),
|
|
2316
2318
|
onMousedown: t[1] ||= z(() => {}, ["stop"]),
|
|
2317
2319
|
onPointerdown: t[2] ||= z(() => {}, ["stop"])
|
|
2318
|
-
}, [l.value.status === "dropdown" ? (N(), E("div",
|
|
2320
|
+
}, [l.value.status === "dropdown" ? (N(), E("div", Ea, [l.value.items.length === 0 ? (N(), E("div", Da, I(L(r)("contentControlDropdownNoOptions")), 1)) : (N(!0), E(x, { key: 1 }, F(l.value.items, (e) => (N(), w(L(i), {
|
|
2319
2321
|
key: `${e.value}::${e.displayText}`,
|
|
2320
2322
|
"class-name": "content-control-picker__item",
|
|
2321
2323
|
type: "button",
|
|
@@ -2332,9 +2334,9 @@ var la = (e) => {
|
|
|
2332
2334
|
value: l.value.currentValue,
|
|
2333
2335
|
"default-open": !0,
|
|
2334
2336
|
onChange: m
|
|
2335
|
-
}, null, 8, ["value"])) : T("", !0)], 46,
|
|
2337
|
+
}, null, 8, ["value"])) : T("", !0)], 46, Ta))]));
|
|
2336
2338
|
}
|
|
2337
|
-
}), [["__scopeId", "data-v-5367d712"]]),
|
|
2339
|
+
}), [["__scopeId", "data-v-5367d712"]]), ka = /* @__PURE__ */ A({
|
|
2338
2340
|
__name: "DecorationLayer",
|
|
2339
2341
|
props: {
|
|
2340
2342
|
getView: { type: Function },
|
|
@@ -2446,7 +2448,7 @@ var la = (e) => {
|
|
|
2446
2448
|
"aria-hidden": "true"
|
|
2447
2449
|
}, null, 512));
|
|
2448
2450
|
}
|
|
2449
|
-
}),
|
|
2451
|
+
}), Aa = ({ surface: e, available: t, navRef: n, onClose: r }) => {
|
|
2450
2452
|
let i = S(() => we(e) === "expanded" && we(t));
|
|
2451
2453
|
R(i, async (e, t, i) => {
|
|
2452
2454
|
if (!e || typeof document > "u") return;
|
|
@@ -2462,18 +2464,18 @@ var la = (e) => {
|
|
|
2462
2464
|
immediate: !0,
|
|
2463
2465
|
flush: "post"
|
|
2464
2466
|
});
|
|
2465
|
-
},
|
|
2467
|
+
}, ja = [
|
|
2466
2468
|
"aria-label",
|
|
2467
2469
|
"data-folio-outline-surface",
|
|
2468
2470
|
"tabindex"
|
|
2469
|
-
],
|
|
2471
|
+
], Ma = [
|
|
2470
2472
|
"aria-label",
|
|
2471
2473
|
"aria-expanded",
|
|
2472
2474
|
"title"
|
|
2473
|
-
],
|
|
2475
|
+
], Na = {
|
|
2474
2476
|
key: 1,
|
|
2475
2477
|
class: "folio-outline-header"
|
|
2476
|
-
},
|
|
2478
|
+
}, Pa = { class: "folio-outline-heading-row" }, Fa = { class: "folio-outline-title" }, Ia = ["aria-label", "title"], La = { class: "folio-outline-depth-control" }, Ra = ["aria-label", "value"], za = { value: 2 }, Ba = { value: 3 }, Va = { value: "all" }, Ha = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2477
2479
|
__name: "DocumentOutline",
|
|
2478
2480
|
props: {
|
|
2479
2481
|
headings: {},
|
|
@@ -2501,7 +2503,7 @@ var la = (e) => {
|
|
|
2501
2503
|
rail: Ze.outlineRailWidth,
|
|
2502
2504
|
expanded: Ze.outlineColumnWidth
|
|
2503
2505
|
}, r = e, i = t, { t: a } = u(), { OutlineRail: o } = d(), s = P(null);
|
|
2504
|
-
|
|
2506
|
+
Aa({
|
|
2505
2507
|
surface: () => r.surface,
|
|
2506
2508
|
available: () => r.available,
|
|
2507
2509
|
navRef: s,
|
|
@@ -2551,7 +2553,7 @@ var la = (e) => {
|
|
|
2551
2553
|
name: "view_column",
|
|
2552
2554
|
size: 16,
|
|
2553
2555
|
"aria-hidden": "true"
|
|
2554
|
-
})], 8,
|
|
2556
|
+
})], 8, Ma)) : (N(), E("div", Na, [D("div", Pa, [D("span", Fa, I(L(a)("editor.outlineTitle")), 1), e.surface === "expanded" ? (N(), E("button", {
|
|
2555
2557
|
key: 0,
|
|
2556
2558
|
type: "button",
|
|
2557
2559
|
class: "folio-outline-icon-button",
|
|
@@ -2563,15 +2565,15 @@ var la = (e) => {
|
|
|
2563
2565
|
name: "close",
|
|
2564
2566
|
size: 16,
|
|
2565
2567
|
"aria-hidden": "true"
|
|
2566
|
-
})], 8,
|
|
2568
|
+
})], 8, Ia)) : T("", !0)]), D("label", La, [D("span", null, I(L(a)("editor.outlineDepthLabel")), 1), D("select", {
|
|
2567
2569
|
"aria-label": L(a)("editor.outlineDepthLabel"),
|
|
2568
2570
|
value: e.outlineDepth,
|
|
2569
2571
|
onChange: l
|
|
2570
2572
|
}, [
|
|
2571
|
-
D("option",
|
|
2572
|
-
D("option",
|
|
2573
|
-
D("option",
|
|
2574
|
-
], 40,
|
|
2573
|
+
D("option", za, I(L(a)("editor.outlineDepthTwo")), 1),
|
|
2574
|
+
D("option", Ba, I(L(a)("editor.outlineDepthThree")), 1),
|
|
2575
|
+
D("option", Va, I(L(a)("editor.outlineDepthAll")), 1)
|
|
2576
|
+
], 40, Ra)])])), O(L(o), {
|
|
2575
2577
|
items: h.value,
|
|
2576
2578
|
"get-scroll-container": e.getScrollContainer,
|
|
2577
2579
|
"resolve-pct": _,
|
|
@@ -2588,9 +2590,9 @@ var la = (e) => {
|
|
|
2588
2590
|
"presentation",
|
|
2589
2591
|
"panel-width",
|
|
2590
2592
|
"aria-label"
|
|
2591
|
-
])], 14,
|
|
2593
|
+
])], 14, ja)) : T("", !0);
|
|
2592
2594
|
}
|
|
2593
|
-
}), [["__scopeId", "data-v-23e73f91"]]),
|
|
2595
|
+
}), [["__scopeId", "data-v-23e73f91"]]), Ua = /* @__PURE__ */ A({
|
|
2594
2596
|
__name: "DocxEditorDialogs",
|
|
2595
2597
|
props: {
|
|
2596
2598
|
search: {},
|
|
@@ -2694,10 +2696,10 @@ var la = (e) => {
|
|
|
2694
2696
|
}, null, 8, ["is-open", "current-watermark"])) : T("", !0)
|
|
2695
2697
|
], 64));
|
|
2696
2698
|
}
|
|
2697
|
-
}),
|
|
2699
|
+
}), Wa = {
|
|
2698
2700
|
key: 0,
|
|
2699
2701
|
class: "docx-editor-vue__title-bar"
|
|
2700
|
-
},
|
|
2702
|
+
}, Ga = { class: "docx-editor-vue__title-bar-left" }, Ka = { class: "docx-editor-vue__title-bar-center" }, qa = { class: "docx-editor-vue__title-bar-right" }, Ja = /* @__PURE__ */ A({
|
|
2701
2703
|
__name: "DocxEditorMenuBar",
|
|
2702
2704
|
props: {
|
|
2703
2705
|
showMenuBar: {
|
|
@@ -2729,9 +2731,9 @@ var la = (e) => {
|
|
|
2729
2731
|
],
|
|
2730
2732
|
setup(e, { emit: t }) {
|
|
2731
2733
|
let n = t;
|
|
2732
|
-
return (t, r) => e.showMenuBar ? (N(), E("div",
|
|
2733
|
-
D("div",
|
|
2734
|
-
D("div",
|
|
2734
|
+
return (t, r) => e.showMenuBar ? (N(), E("div", Wa, [
|
|
2735
|
+
D("div", Ga, [xe(t.$slots, "title-bar-left")]),
|
|
2736
|
+
D("div", Ka, [O(ce, {
|
|
2735
2737
|
"model-value": e.documentName,
|
|
2736
2738
|
editable: e.documentNameEditable,
|
|
2737
2739
|
"onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
|
|
@@ -2746,28 +2748,28 @@ var la = (e) => {
|
|
|
2746
2748
|
"show-help-menu",
|
|
2747
2749
|
"show-table-insert"
|
|
2748
2750
|
])]),
|
|
2749
|
-
D("div",
|
|
2751
|
+
D("div", qa, [xe(t.$slots, "title-bar-right")])
|
|
2750
2752
|
])) : T("", !0);
|
|
2751
2753
|
}
|
|
2752
|
-
}),
|
|
2754
|
+
}), Ya = ["aria-label"], Xa = { class: "image-ctx-menu__icon" }, Za = { class: "image-ctx-menu__label" }, Qa = {
|
|
2753
2755
|
key: 1,
|
|
2754
2756
|
class: "image-ctx-menu__divider",
|
|
2755
2757
|
role: "separator"
|
|
2756
|
-
},
|
|
2758
|
+
}, $a = [
|
|
2757
2759
|
"data-wrap-type",
|
|
2758
2760
|
"data-current",
|
|
2759
2761
|
"data-disabled",
|
|
2760
2762
|
"disabled",
|
|
2761
2763
|
"title",
|
|
2762
2764
|
"onClick"
|
|
2763
|
-
],
|
|
2765
|
+
], eo = { class: "image-ctx-menu__icon" }, to = { class: "image-ctx-menu__label" }, no = ["aria-label"], ro = ["disabled", "onClick"], io = { class: "image-ctx-menu__label" }, ao = {
|
|
2764
2766
|
key: 0,
|
|
2765
2767
|
class: "image-ctx-menu__shortcut"
|
|
2766
|
-
},
|
|
2768
|
+
}, oo = {
|
|
2767
2769
|
key: 0,
|
|
2768
2770
|
class: "image-ctx-menu__divider",
|
|
2769
2771
|
role: "separator"
|
|
2770
|
-
},
|
|
2772
|
+
}, so = 18, co = 260, lo = 10, uo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2771
2773
|
__name: "ImageContextMenu",
|
|
2772
2774
|
props: {
|
|
2773
2775
|
state: {},
|
|
@@ -2788,7 +2790,7 @@ var la = (e) => {
|
|
|
2788
2790
|
function i() {
|
|
2789
2791
|
r("open-properties"), r("close");
|
|
2790
2792
|
}
|
|
2791
|
-
let { t: a } = u(), o =
|
|
2793
|
+
let { t: a } = u(), o = pa(), s = Bt, c = S(() => n.state ? Ht(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), l = {
|
|
2792
2794
|
inline: "wrap_text",
|
|
2793
2795
|
squareLeft: "format_image_left",
|
|
2794
2796
|
squareRight: "format_image_right",
|
|
@@ -2801,11 +2803,11 @@ var la = (e) => {
|
|
|
2801
2803
|
let f = S(() => {
|
|
2802
2804
|
if (!n.state) return {};
|
|
2803
2805
|
let e = Bt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
2804
|
-
return typeof window < "u" && (t +
|
|
2806
|
+
return typeof window < "u" && (t + co > window.innerWidth && (t = window.innerWidth - co - lo), r + e > window.innerHeight && (r = window.innerHeight - e - lo), t < lo && (t = lo), r < lo && (r = lo)), {
|
|
2805
2807
|
position: "fixed",
|
|
2806
2808
|
left: `${t}px`,
|
|
2807
2809
|
top: `${r}px`,
|
|
2808
|
-
minWidth: `${
|
|
2810
|
+
minWidth: `${co}px`,
|
|
2809
2811
|
zIndex: 400
|
|
2810
2812
|
};
|
|
2811
2813
|
});
|
|
@@ -2847,11 +2849,11 @@ var la = (e) => {
|
|
|
2847
2849
|
"data-action": "open-properties",
|
|
2848
2850
|
onMousedown: n[1] ||= z(() => {}, ["prevent"]),
|
|
2849
2851
|
onClick: i
|
|
2850
|
-
}, [D("span",
|
|
2852
|
+
}, [D("span", Xa, [O(m, {
|
|
2851
2853
|
name: "settings",
|
|
2852
|
-
size:
|
|
2853
|
-
})]), D("span",
|
|
2854
|
-
e.canOpenProperties ? (N(), E("div",
|
|
2854
|
+
size: so
|
|
2855
|
+
})]), D("span", Za, I(L(a)("imageWrap.menu.imageProperties")), 1)], 32)) : T("", !0),
|
|
2856
|
+
e.canOpenProperties ? (N(), E("div", Qa)) : T("", !0),
|
|
2855
2857
|
(N(!0), E(x, null, F(L(s), (e) => (N(), E("button", {
|
|
2856
2858
|
key: e.choice,
|
|
2857
2859
|
type: "button",
|
|
@@ -2865,17 +2867,17 @@ var la = (e) => {
|
|
|
2865
2867
|
onMousedown: n[2] ||= z(() => {}, ["prevent"]),
|
|
2866
2868
|
onClick: (t) => h(e)
|
|
2867
2869
|
}, [
|
|
2868
|
-
D("span",
|
|
2870
|
+
D("span", eo, [O(m, {
|
|
2869
2871
|
name: d(e.iconHint),
|
|
2870
|
-
size:
|
|
2872
|
+
size: so
|
|
2871
2873
|
}, null, 8, ["name"])]),
|
|
2872
|
-
D("span",
|
|
2874
|
+
D("span", to, I(L(a)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
|
|
2873
2875
|
e.choice === c.value ? (N(), E("span", {
|
|
2874
2876
|
key: 0,
|
|
2875
2877
|
class: "image-ctx-menu__current-dot",
|
|
2876
2878
|
"aria-label": L(a)("imageWrap.menu.ariaLabel")
|
|
2877
|
-
}, "●", 8,
|
|
2878
|
-
], 42,
|
|
2879
|
+
}, "●", 8, no)) : T("", !0)
|
|
2880
|
+
], 42, $a))), 128)),
|
|
2879
2881
|
e.textActions && e.textActions.length > 0 ? (N(), E(x, { key: 2 }, [n[5] ||= D("div", {
|
|
2880
2882
|
class: "image-ctx-menu__divider",
|
|
2881
2883
|
role: "separator"
|
|
@@ -2886,16 +2888,16 @@ var la = (e) => {
|
|
|
2886
2888
|
disabled: e.disabled,
|
|
2887
2889
|
onMousedown: n[3] ||= z(() => {}, ["prevent"]),
|
|
2888
2890
|
onClick: (t) => g(e)
|
|
2889
|
-
}, [D("span",
|
|
2890
|
-
], 46,
|
|
2891
|
+
}, [D("span", io, I(e.label), 1), e.shortcut ? (N(), E("span", ao, I(e.shortcut), 1)) : T("", !0)], 40, ro), e.dividerAfter ? (N(), E("div", oo)) : T("", !0)], 64))), 128))], 64)) : T("", !0)
|
|
2892
|
+
], 46, Ya)) : T("", !0)]));
|
|
2891
2893
|
}
|
|
2892
|
-
}), [["__scopeId", "data-v-96099b5d"]]),
|
|
2894
|
+
}), [["__scopeId", "data-v-96099b5d"]]), fo = ["disabled", "onMousedown"], po = {
|
|
2893
2895
|
key: 0,
|
|
2894
2896
|
class: "ctx-menu__icon"
|
|
2895
|
-
},
|
|
2897
|
+
}, mo = { class: "ctx-menu__label" }, ho = {
|
|
2896
2898
|
key: 1,
|
|
2897
2899
|
class: "ctx-menu__shortcut"
|
|
2898
|
-
},
|
|
2900
|
+
}, go = 220, _o = 32, vo = 10, yo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2899
2901
|
__name: "TextContextMenu",
|
|
2900
2902
|
props: {
|
|
2901
2903
|
isOpen: { type: Boolean },
|
|
@@ -2913,7 +2915,7 @@ var la = (e) => {
|
|
|
2913
2915
|
setup(e, { emit: t }) {
|
|
2914
2916
|
let n = e, r = ({ node: e }) => e;
|
|
2915
2917
|
r.props = ["node"];
|
|
2916
|
-
let i = t, { t: a } = u(), o =
|
|
2918
|
+
let i = t, { t: a } = u(), o = pa(), s = P(null), c = S(() => {
|
|
2917
2919
|
let e = [], t = n.customItems ?? [];
|
|
2918
2920
|
for (let [n, r] of t.entries()) e.push({
|
|
2919
2921
|
id: `custom-${r.id}`,
|
|
@@ -3067,8 +3069,8 @@ var la = (e) => {
|
|
|
3067
3069
|
action: "setNumberingValue"
|
|
3068
3070
|
}), e;
|
|
3069
3071
|
}), l = S(() => {
|
|
3070
|
-
let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r *
|
|
3071
|
-
return typeof window < "u" && (e +
|
|
3072
|
+
let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r * _o + i * 9;
|
|
3073
|
+
return typeof window < "u" && (e + go + vo > window.innerWidth && (e = window.innerWidth - go - vo), t + a + vo > window.innerHeight && (t = window.innerHeight - a - vo)), {
|
|
3072
3074
|
position: "fixed",
|
|
3073
3075
|
left: `${e}px`,
|
|
3074
3076
|
top: `${t}px`,
|
|
@@ -3106,12 +3108,12 @@ var la = (e) => {
|
|
|
3106
3108
|
disabled: e.disabled,
|
|
3107
3109
|
onMousedown: z((t) => d(e.action), ["prevent"])
|
|
3108
3110
|
}, [
|
|
3109
|
-
e.icon ? (N(), E("span",
|
|
3110
|
-
D("span",
|
|
3111
|
-
e.shortcut ? (N(), E("span",
|
|
3112
|
-
], 42,
|
|
3111
|
+
e.icon ? (N(), E("span", po, [O(r, { node: e.icon }, null, 8, ["node"])])) : T("", !0),
|
|
3112
|
+
D("span", mo, I(e.label), 1),
|
|
3113
|
+
e.shortcut ? (N(), E("span", ho, I(e.shortcut), 1)) : T("", !0)
|
|
3114
|
+
], 42, fo))), 128))], 38)) : T("", !0)]));
|
|
3113
3115
|
}
|
|
3114
|
-
}), [["__scopeId", "data-v-7eae304c"]]),
|
|
3116
|
+
}), [["__scopeId", "data-v-7eae304c"]]), bo = /* @__PURE__ */ A({
|
|
3115
3117
|
__name: "DocxEditorOverlays",
|
|
3116
3118
|
props: {
|
|
3117
3119
|
readOnly: { type: Boolean },
|
|
@@ -3130,7 +3132,7 @@ var la = (e) => {
|
|
|
3130
3132
|
],
|
|
3131
3133
|
setup(e, { emit: t }) {
|
|
3132
3134
|
let n = t;
|
|
3133
|
-
return (t, r) => (N(), E(x, null, [O(
|
|
3135
|
+
return (t, r) => (N(), E(x, null, [O(yo, {
|
|
3134
3136
|
"is-open": e.contextMenu.isOpen,
|
|
3135
3137
|
position: e.contextMenu.position,
|
|
3136
3138
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -3154,7 +3156,7 @@ var la = (e) => {
|
|
|
3154
3156
|
"can-split-cell",
|
|
3155
3157
|
"list-numbering",
|
|
3156
3158
|
"custom-items"
|
|
3157
|
-
]), O(
|
|
3159
|
+
]), O(uo, {
|
|
3158
3160
|
state: e.imageContextMenu,
|
|
3159
3161
|
"text-actions": e.imageContextMenuTextActions,
|
|
3160
3162
|
"can-open-properties": e.canOpenImageProperties,
|
|
@@ -3168,7 +3170,7 @@ var la = (e) => {
|
|
|
3168
3170
|
"can-open-properties"
|
|
3169
3171
|
])], 64));
|
|
3170
3172
|
}
|
|
3171
|
-
}),
|
|
3173
|
+
}), xo = /* @__PURE__ */ A({
|
|
3172
3174
|
__name: "HeaderFooterSelectionOverlay",
|
|
3173
3175
|
props: {
|
|
3174
3176
|
pagesContainer: {},
|
|
@@ -3218,7 +3220,7 @@ var la = (e) => {
|
|
|
3218
3220
|
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Le(t.hiddenContainer);
|
|
3219
3221
|
}), (e, t) => null;
|
|
3220
3222
|
}
|
|
3221
|
-
}),
|
|
3223
|
+
}), So = { class: "hf-editor-label" }, Co = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3222
3224
|
__name: "InlineHeaderFooterEditor",
|
|
3223
3225
|
props: {
|
|
3224
3226
|
edit: {},
|
|
@@ -3261,7 +3263,7 @@ var la = (e) => {
|
|
|
3261
3263
|
class: "hf-inline-editor",
|
|
3262
3264
|
style: M(c.value),
|
|
3263
3265
|
role: "presentation"
|
|
3264
|
-
}, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span",
|
|
3266
|
+
}, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span", So, I(s.value), 1), D("div", {
|
|
3265
3267
|
class: "hf-options",
|
|
3266
3268
|
onMousedown: n[5] ||= z(() => {}, ["stop"])
|
|
3267
3269
|
}, [O(L(i), {
|
|
@@ -3311,7 +3313,7 @@ var la = (e) => {
|
|
|
3311
3313
|
})
|
|
3312
3314
|
], 2)) : T("", !0)], 32)], 2)], 4));
|
|
3313
3315
|
}
|
|
3314
|
-
}), [["__scopeId", "data-v-74134c4e"]]),
|
|
3316
|
+
}), [["__scopeId", "data-v-74134c4e"]]), wo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3315
3317
|
__name: "PageIndicator",
|
|
3316
3318
|
props: {
|
|
3317
3319
|
currentPage: {},
|
|
@@ -3330,10 +3332,10 @@ var la = (e) => {
|
|
|
3330
3332
|
total: e.totalPages
|
|
3331
3333
|
})), 5));
|
|
3332
3334
|
}
|
|
3333
|
-
}), [["__scopeId", "data-v-d6c69c2c"]]),
|
|
3335
|
+
}), [["__scopeId", "data-v-d6c69c2c"]]), To = {
|
|
3334
3336
|
class: "folio-passage-highlight-overlay",
|
|
3335
3337
|
"data-folio-passage-highlight-overlay": ""
|
|
3336
|
-
},
|
|
3338
|
+
}, Eo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3337
3339
|
__name: "PassageHighlightOverlay",
|
|
3338
3340
|
props: {
|
|
3339
3341
|
range: {},
|
|
@@ -3380,7 +3382,7 @@ var la = (e) => {
|
|
|
3380
3382
|
t.measures
|
|
3381
3383
|
], () => a(), { immediate: !0 }), _e(() => {
|
|
3382
3384
|
r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
|
|
3383
|
-
}), (e, t) => (N(), E("div",
|
|
3385
|
+
}), (e, t) => (N(), E("div", To, [(N(!0), E(x, null, F(n.value, (e, t) => (N(), E("span", {
|
|
3384
3386
|
key: `${t}:${e.left}:${e.top}`,
|
|
3385
3387
|
class: "folio-passage-highlight",
|
|
3386
3388
|
style: M({
|
|
@@ -3392,7 +3394,7 @@ var la = (e) => {
|
|
|
3392
3394
|
})
|
|
3393
3395
|
}, null, 4))), 128))]));
|
|
3394
3396
|
}
|
|
3395
|
-
}), [["__scopeId", "data-v-cb52fdae"]]),
|
|
3397
|
+
}), [["__scopeId", "data-v-cb52fdae"]]), Do = ["data-folio-block-id"], Oo = ["data-folio-block-id", "title"], ko = 2.5, Ao = 5, jo = 6, Mo = 2, No = 2, Po = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3396
3398
|
__name: "TemplateDirectivesOverlay",
|
|
3397
3399
|
props: {
|
|
3398
3400
|
getView: { type: Function },
|
|
@@ -3406,19 +3408,19 @@ var la = (e) => {
|
|
|
3406
3408
|
setup(e) {
|
|
3407
3409
|
let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
|
|
3408
3410
|
function a(e) {
|
|
3409
|
-
let t = e -
|
|
3410
|
-
return t <= 0 ? 0 : Math.floor(t /
|
|
3411
|
+
let t = e - jo - ko - Mo;
|
|
3412
|
+
return t <= 0 ? 0 : Math.floor(t / Ao);
|
|
3411
3413
|
}
|
|
3412
3414
|
function o(e, t, n) {
|
|
3413
3415
|
let r = a(n), i = Math.min(Math.max(0, e), r);
|
|
3414
|
-
return t -
|
|
3416
|
+
return t - jo - ko - (r - i) * Ao;
|
|
3415
3417
|
}
|
|
3416
3418
|
function s(e, t) {
|
|
3417
|
-
if (t.length === 0) return e.bottom - e.top >=
|
|
3419
|
+
if (t.length === 0) return e.bottom - e.top >= No ? [e] : [];
|
|
3418
3420
|
let n = [];
|
|
3419
3421
|
for (let r of t) {
|
|
3420
3422
|
let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
|
|
3421
|
-
i - t >=
|
|
3423
|
+
i - t >= No && n.push({
|
|
3422
3424
|
top: t,
|
|
3423
3425
|
bottom: i
|
|
3424
3426
|
});
|
|
@@ -3580,10 +3582,10 @@ var la = (e) => {
|
|
|
3580
3582
|
position: "absolute",
|
|
3581
3583
|
left: `${t.railX * e.zoom}px`,
|
|
3582
3584
|
top: `${n.top * e.zoom}px`,
|
|
3583
|
-
width: `${
|
|
3585
|
+
width: `${ko * e.zoom}px`,
|
|
3584
3586
|
height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
|
|
3585
3587
|
})
|
|
3586
|
-
}, null, 14,
|
|
3588
|
+
}, null, 14, Do))), 128))], 64))), 128)), (N(!0), E(x, null, F(p.value, (t, n) => (N(), E(x, { key: `d:${n}` }, [(N(!0), E(x, null, F(t.rects, (r, i) => (N(), E("span", {
|
|
3587
3589
|
key: `d:${n}:${i}`,
|
|
3588
3590
|
class: j(le(t.range)),
|
|
3589
3591
|
"data-folio-block-id": se(t.range),
|
|
@@ -3595,14 +3597,14 @@ var la = (e) => {
|
|
|
3595
3597
|
width: `${(r.width + 2) * e.zoom}px`,
|
|
3596
3598
|
height: `${Math.max(0, r.height - 2) * e.zoom}px`
|
|
3597
3599
|
})
|
|
3598
|
-
}, null, 14,
|
|
3600
|
+
}, null, 14, Oo))), 128))], 64))), 128))], 32));
|
|
3599
3601
|
}
|
|
3600
|
-
}), [["__scopeId", "data-v-62b2d0a0"]]),
|
|
3602
|
+
}), [["__scopeId", "data-v-62b2d0a0"]]), Fo = [
|
|
3601
3603
|
"href",
|
|
3602
3604
|
"rel",
|
|
3603
3605
|
"target",
|
|
3604
3606
|
"title"
|
|
3605
|
-
],
|
|
3607
|
+
], Io = ["title"], Lo = ["title"], Ro = ["title"], zo = { class: "docx-hyperlink-popup__edit-row" }, Bo = ["placeholder", "onKeydown"], Vo = { class: "docx-hyperlink-popup__edit-row" }, Ho = ["onKeydown"], Uo = ["disabled"], Wo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3606
3608
|
__name: "HyperlinkPopup",
|
|
3607
3609
|
props: {
|
|
3608
3610
|
data: {},
|
|
@@ -3651,21 +3653,21 @@ var la = (e) => {
|
|
|
3651
3653
|
class: j(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
|
|
3652
3654
|
style: M(d.value),
|
|
3653
3655
|
onMousedown: i[6] ||= z(() => {}, ["stop"])
|
|
3654
|
-
}, [o.value ? (N(), E(x, { key: 1 }, [D("div",
|
|
3656
|
+
}, [o.value ? (N(), E(x, { key: 1 }, [D("div", zo, [Oe(D("input", {
|
|
3655
3657
|
class: "docx-hyperlink-popup__input",
|
|
3656
3658
|
placeholder: L(n)("displayText"),
|
|
3657
3659
|
"onUpdate:modelValue": i[2] ||= (e) => s.value = e,
|
|
3658
3660
|
onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[3] ||= ke((e) => t.$emit("close"), ["esc"])]
|
|
3659
|
-
}, null, 40,
|
|
3661
|
+
}, null, 40, Bo), [[Te, s.value]])]), D("div", Vo, [Oe(D("input", {
|
|
3660
3662
|
class: "docx-hyperlink-popup__input",
|
|
3661
3663
|
placeholder: "https://...",
|
|
3662
3664
|
"onUpdate:modelValue": i[4] ||= (e) => c.value = e,
|
|
3663
3665
|
onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[5] ||= ke((e) => t.$emit("close"), ["esc"])]
|
|
3664
|
-
}, null, 40,
|
|
3666
|
+
}, null, 40, Ho), [[Te, c.value]]), D("button", {
|
|
3665
3667
|
class: "docx-hyperlink-popup__apply",
|
|
3666
3668
|
disabled: !c.value.trim(),
|
|
3667
3669
|
onClick: z(g, ["prevent"])
|
|
3668
|
-
}, I(L(n)("common.apply")), 9,
|
|
3670
|
+
}, I(L(n)("common.apply")), 9, Uo)])], 64)) : (N(), E(x, { key: 0 }, [
|
|
3669
3671
|
i[10] ||= de("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-a7918e6a><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-a7918e6a><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-a7918e6a></circle><path d=\"M2 12h20\" data-v-a7918e6a></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-a7918e6a></path></svg></span>", 1),
|
|
3670
3672
|
D("a", {
|
|
3671
3673
|
class: "docx-hyperlink-popup__url",
|
|
@@ -3674,7 +3676,7 @@ var la = (e) => {
|
|
|
3674
3676
|
target: L(r).target,
|
|
3675
3677
|
title: e.data.href,
|
|
3676
3678
|
onClick: i[0] ||= z((n) => t.$emit("navigate", e.data.href), ["prevent"])
|
|
3677
|
-
}, I(e.data.href), 9,
|
|
3679
|
+
}, I(e.data.href), 9, Fo),
|
|
3678
3680
|
i[11] ||= D("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
|
|
3679
3681
|
D("button", {
|
|
3680
3682
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -3696,7 +3698,7 @@ var la = (e) => {
|
|
|
3696
3698
|
height: "13",
|
|
3697
3699
|
rx: "2",
|
|
3698
3700
|
ry: "2"
|
|
3699
|
-
}), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8,
|
|
3701
|
+
}), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Io),
|
|
3700
3702
|
e.readOnly ? T("", !0) : (N(), E("button", {
|
|
3701
3703
|
key: 0,
|
|
3702
3704
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -3711,40 +3713,40 @@ var la = (e) => {
|
|
|
3711
3713
|
"stroke-width": "2",
|
|
3712
3714
|
"stroke-linecap": "round",
|
|
3713
3715
|
"stroke-linejoin": "round"
|
|
3714
|
-
}, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("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,
|
|
3716
|
+
}, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("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, Lo)),
|
|
3715
3717
|
e.readOnly ? T("", !0) : (N(), E("button", {
|
|
3716
3718
|
key: 1,
|
|
3717
3719
|
class: "docx-hyperlink-popup__btn",
|
|
3718
3720
|
title: L(n)("removeLink"),
|
|
3719
3721
|
onClick: i[1] ||= z((e) => t.$emit("remove"), ["prevent"])
|
|
3720
|
-
}, [...i[9] ||= [de("<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-a7918e6a><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-a7918e6a></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-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8,
|
|
3722
|
+
}, [...i[9] ||= [de("<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-a7918e6a><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-a7918e6a></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-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8, Ro))
|
|
3721
3723
|
], 64))], 38)) : T("", !0);
|
|
3722
3724
|
}
|
|
3723
|
-
}), [["__scopeId", "data-v-a7918e6a"]]),
|
|
3725
|
+
}), [["__scopeId", "data-v-a7918e6a"]]), Go = ["data-folio-locale-pending", "aria-busy"], Ko = {
|
|
3724
3726
|
key: 0,
|
|
3725
3727
|
class: "docx-editor-vue__locale-loading docx-editor-vue__error",
|
|
3726
3728
|
role: "alert"
|
|
3727
|
-
},
|
|
3729
|
+
}, qo = { class: "docx-editor-vue__toolbar-shell" }, Jo = {
|
|
3728
3730
|
key: 2,
|
|
3729
3731
|
class: "docx-editor-vue__error"
|
|
3730
|
-
},
|
|
3732
|
+
}, Yo = {
|
|
3731
3733
|
key: 3,
|
|
3732
3734
|
class: "docx-editor-vue__loading"
|
|
3733
|
-
},
|
|
3735
|
+
}, Xo = {
|
|
3734
3736
|
key: 4,
|
|
3735
3737
|
class: "docx-editor-vue__placeholder"
|
|
3736
|
-
},
|
|
3738
|
+
}, Zo = {
|
|
3737
3739
|
key: 5,
|
|
3738
3740
|
class: "docx-editor-vue__notice",
|
|
3739
3741
|
role: "status"
|
|
3740
|
-
},
|
|
3742
|
+
}, Qo = [
|
|
3741
3743
|
"data-folio-panel-tier",
|
|
3742
3744
|
"data-folio-outline",
|
|
3743
3745
|
"data-folio-comments"
|
|
3744
|
-
],
|
|
3746
|
+
], $o = {
|
|
3745
3747
|
key: 1,
|
|
3746
3748
|
class: "docx-editor-vue__ruler-v"
|
|
3747
|
-
},
|
|
3749
|
+
}, es = {
|
|
3748
3750
|
class: "docx-editor-vue__editor-content-wrapper",
|
|
3749
3751
|
style: {
|
|
3750
3752
|
position: "relative",
|
|
@@ -3752,11 +3754,11 @@ var la = (e) => {
|
|
|
3752
3754
|
flexDirection: "column",
|
|
3753
3755
|
minHeight: "100%"
|
|
3754
3756
|
}
|
|
3755
|
-
},
|
|
3757
|
+
}, ts = {
|
|
3756
3758
|
"data-testid": "selection-overlay",
|
|
3757
3759
|
class: "docx-editor-vue__decoration-origin",
|
|
3758
3760
|
"aria-hidden": "true"
|
|
3759
|
-
},
|
|
3761
|
+
}, ns = ["aria-label"], rs = { class: "docx-editor-vue__note-editor-header" }, is = ["aria-label"], as = ["aria-label"], os = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3760
3762
|
__name: "DocxEditor",
|
|
3761
3763
|
props: {
|
|
3762
3764
|
documentBuffer: { default: null },
|
|
@@ -3908,11 +3910,11 @@ var la = (e) => {
|
|
|
3908
3910
|
}), u = k(() => import("./VerticalRuler-D973NTMv.js").then((e) => e.n)), d = k(() => import("./ImageSelectionOverlay-DULrvfOJ.js")), f = e, p = f.plugins ?? [], h = i;
|
|
3909
3911
|
g(f.components);
|
|
3910
3912
|
let _ = n();
|
|
3911
|
-
|
|
3913
|
+
fa(_);
|
|
3912
3914
|
function y(e) {
|
|
3913
3915
|
f.onChange?.(e), h("change", e), h("update:document", e);
|
|
3914
3916
|
}
|
|
3915
|
-
let { message: ee, show: te } =
|
|
3917
|
+
let { message: ee, show: te } = _a();
|
|
3916
3918
|
function oe(e) {
|
|
3917
3919
|
Me.is(e) && te(bt(e.ground, F)), f.onError?.(e), h("error", e);
|
|
3918
3920
|
}
|
|
@@ -3926,7 +3928,7 @@ var la = (e) => {
|
|
|
3926
3928
|
e !== null && f.onReadonlyEditAttempt?.(e);
|
|
3927
3929
|
}
|
|
3928
3930
|
function ge() {
|
|
3929
|
-
|
|
3931
|
+
fi(Ue(b.value));
|
|
3930
3932
|
}
|
|
3931
3933
|
function ye(e) {
|
|
3932
3934
|
le.value = e;
|
|
@@ -3943,7 +3945,7 @@ var la = (e) => {
|
|
|
3943
3945
|
function qt(e) {
|
|
3944
3946
|
f.enableWheelZoom !== !1 && Wt(e);
|
|
3945
3947
|
}
|
|
3946
|
-
|
|
3948
|
+
Ji({
|
|
3947
3949
|
showFindReplace: ct,
|
|
3948
3950
|
showHyperlink: ut,
|
|
3949
3951
|
handleZoomKeyDown: Gt,
|
|
@@ -4015,14 +4017,14 @@ var la = (e) => {
|
|
|
4015
4017
|
function On() {
|
|
4016
4018
|
Y.value && (Be(), ze(), Sn());
|
|
4017
4019
|
}
|
|
4018
|
-
|
|
4020
|
+
Wi({
|
|
4019
4021
|
isReady: $t,
|
|
4020
4022
|
sourceBuffer: () => an.value,
|
|
4021
4023
|
fonts: () => f.fonts,
|
|
4022
4024
|
remeasure: On,
|
|
4023
4025
|
setEmbeddedFontFamilies: Cn
|
|
4024
4026
|
});
|
|
4025
|
-
let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } =
|
|
4027
|
+
let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } = qi({
|
|
4026
4028
|
editorView: X,
|
|
4027
4029
|
zoom: K,
|
|
4028
4030
|
stateTick: H,
|
|
@@ -4031,7 +4033,7 @@ var la = (e) => {
|
|
|
4031
4033
|
R(kn, (e) => {
|
|
4032
4034
|
e && (Pn.value = !0);
|
|
4033
4035
|
}, { flush: "sync" });
|
|
4034
|
-
let Fn =
|
|
4036
|
+
let Fn = ha({
|
|
4035
4037
|
editorView: Y,
|
|
4036
4038
|
hiddenContainer: Ke,
|
|
4037
4039
|
pagesRef: B,
|
|
@@ -4041,18 +4043,18 @@ var la = (e) => {
|
|
|
4041
4043
|
syncCoordinator: ln,
|
|
4042
4044
|
imageInteracting: An
|
|
4043
4045
|
});
|
|
4044
|
-
|
|
4046
|
+
ma({
|
|
4045
4047
|
pagesRef: B,
|
|
4046
4048
|
remoteSelections: Xt,
|
|
4047
4049
|
syncCoordinator: ln,
|
|
4048
4050
|
zoom: K
|
|
4049
4051
|
});
|
|
4050
|
-
let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } =
|
|
4052
|
+
let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } = Ki({
|
|
4051
4053
|
editorView: X,
|
|
4052
4054
|
getCommands: xn
|
|
4053
4055
|
}), Hn = r({ runCommand: (e, t) => {
|
|
4054
4056
|
e === Y.value ? J.executeCommand(t) : U(e, t);
|
|
4055
|
-
} }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } =
|
|
4057
|
+
} }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } = ua({
|
|
4056
4058
|
editorView: Y,
|
|
4057
4059
|
pagesRef: B,
|
|
4058
4060
|
pagesViewportRef: tt,
|
|
@@ -4098,7 +4100,7 @@ var la = (e) => {
|
|
|
4098
4100
|
R(Wn, (e) => {
|
|
4099
4101
|
Pt.value = e?.rId ?? null, e && Fn.clearOverlay();
|
|
4100
4102
|
}, { immediate: !0 });
|
|
4101
|
-
let ar =
|
|
4103
|
+
let ar = Yi({
|
|
4102
4104
|
editorView: Y,
|
|
4103
4105
|
showOutline: kt,
|
|
4104
4106
|
showSidebar: W,
|
|
@@ -4106,7 +4108,7 @@ var la = (e) => {
|
|
|
4106
4108
|
activeSidebarItem: Nt,
|
|
4107
4109
|
extractCommentsAndChanges: () => {},
|
|
4108
4110
|
scrollToVisiblePosition: Jn
|
|
4109
|
-
}), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } =
|
|
4111
|
+
}), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } = Ai({
|
|
4110
4112
|
editorView: X,
|
|
4111
4113
|
selectedImage: kn,
|
|
4112
4114
|
zoom: K,
|
|
@@ -4121,7 +4123,7 @@ var la = (e) => {
|
|
|
4121
4123
|
onCopy: () => f.onCopy?.(),
|
|
4122
4124
|
onCut: () => f.onCut?.(),
|
|
4123
4125
|
onPaste: () => f.onPaste?.()
|
|
4124
|
-
}), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z =
|
|
4126
|
+
}), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z = yi({
|
|
4125
4127
|
editor: J,
|
|
4126
4128
|
editorView: Y,
|
|
4127
4129
|
getDocument: pn,
|
|
@@ -4135,7 +4137,7 @@ var la = (e) => {
|
|
|
4135
4137
|
reLayout: Sn,
|
|
4136
4138
|
readOnly: () => A.value,
|
|
4137
4139
|
onReadOnlyEditAttempt: me
|
|
4138
|
-
}), gr = Z.comments, Q =
|
|
4140
|
+
}), gr = Z.comments, Q = vi({
|
|
4139
4141
|
editorView: Y,
|
|
4140
4142
|
pagesViewport: tt,
|
|
4141
4143
|
pagesContainer: B,
|
|
@@ -4183,7 +4185,7 @@ var la = (e) => {
|
|
|
4183
4185
|
function wr(e) {
|
|
4184
4186
|
navigator.clipboard?.writeText(e), In.value = null;
|
|
4185
4187
|
}
|
|
4186
|
-
let Tr = S(() =>
|
|
4188
|
+
let Tr = S(() => pi(rn.value)), Er = S(() => Tr.value.sectionProperties), Dr = S(() => Tr.value.watermark), Or = S(() => Tr.value.styles), kr = S(() => {
|
|
4187
4189
|
H.value;
|
|
4188
4190
|
let e = X.value;
|
|
4189
4191
|
if (!e) return {};
|
|
@@ -4256,7 +4258,7 @@ var la = (e) => {
|
|
|
4256
4258
|
transform: K.value === 1 ? void 0 : `scale(${K.value})`,
|
|
4257
4259
|
transformOrigin: "top center",
|
|
4258
4260
|
transition: "transform 0.2s ease"
|
|
4259
|
-
})), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } =
|
|
4261
|
+
})), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } = Gi({
|
|
4260
4262
|
editorView: X,
|
|
4261
4263
|
getDocument: Tn
|
|
4262
4264
|
});
|
|
@@ -4297,7 +4299,7 @@ var la = (e) => {
|
|
|
4297
4299
|
let e = Y.value;
|
|
4298
4300
|
e && (pt(e, { title: F("toolbar.tableOfContents") }), e.focus());
|
|
4299
4301
|
}
|
|
4300
|
-
let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange:
|
|
4302
|
+
let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange: ci, handleFirstLineIndentChange: li, handleTabStopRemove: ui } = Xi({
|
|
4301
4303
|
editorView: X,
|
|
4302
4304
|
getDocument: pn,
|
|
4303
4305
|
readOnly: A,
|
|
@@ -4308,7 +4310,7 @@ var la = (e) => {
|
|
|
4308
4310
|
let t = J.applyCanonicalSectionProperties(e);
|
|
4309
4311
|
return t === null ? "unhandled" : t.status;
|
|
4310
4312
|
}
|
|
4311
|
-
}),
|
|
4313
|
+
}), di = S(() => {
|
|
4312
4314
|
H.value;
|
|
4313
4315
|
let e = X.value, t = e ? yt(e.state).paragraphFormatting : {};
|
|
4314
4316
|
return {
|
|
@@ -4319,10 +4321,10 @@ var la = (e) => {
|
|
|
4319
4321
|
tabs: t.tabs ?? null
|
|
4320
4322
|
};
|
|
4321
4323
|
});
|
|
4322
|
-
function
|
|
4324
|
+
function fi(e) {
|
|
4323
4325
|
b.value !== e && (b.value = e, f.onModeChange?.(e), h("mode-change", e));
|
|
4324
4326
|
}
|
|
4325
|
-
function
|
|
4327
|
+
function mi(e) {
|
|
4326
4328
|
switch (e) {
|
|
4327
4329
|
case "find":
|
|
4328
4330
|
case "findReplace":
|
|
@@ -4362,15 +4364,15 @@ var la = (e) => {
|
|
|
4362
4364
|
}
|
|
4363
4365
|
h("menu-action", e);
|
|
4364
4366
|
}
|
|
4365
|
-
function
|
|
4367
|
+
function hi(e) {
|
|
4366
4368
|
if (A.value) return;
|
|
4367
4369
|
let t = pn();
|
|
4368
4370
|
t && J.applyCanonicalOperations(je(t, e)) && (_n(), Sn());
|
|
4369
4371
|
}
|
|
4370
|
-
function
|
|
4372
|
+
function gi(e, t) {
|
|
4371
4373
|
$r(e, t);
|
|
4372
4374
|
}
|
|
4373
|
-
function
|
|
4375
|
+
function _i(e) {
|
|
4374
4376
|
let t = X.value, n = xn().setNumberingValue;
|
|
4375
4377
|
!A.value && t && n && (U(t, n(e)), t.focus());
|
|
4376
4378
|
}
|
|
@@ -4379,7 +4381,7 @@ var la = (e) => {
|
|
|
4379
4381
|
t && n && (U(t, n(e)), t.focus());
|
|
4380
4382
|
}
|
|
4381
4383
|
let xi = P(!1);
|
|
4382
|
-
|
|
4384
|
+
ji({
|
|
4383
4385
|
documentBuffer: () => f.documentBuffer ?? null,
|
|
4384
4386
|
document: () => f.document ?? null,
|
|
4385
4387
|
loadDocumentBuffer: un,
|
|
@@ -4430,7 +4432,7 @@ var la = (e) => {
|
|
|
4430
4432
|
let n = J.on("selectionChange", () => {
|
|
4431
4433
|
H.value++, Q.updateFloatingButton();
|
|
4432
4434
|
}), r = J.on("docChange", () => {
|
|
4433
|
-
H.value++,
|
|
4435
|
+
H.value++, Ti.searchText.value && Ti.scheduleSearch(), ar.recomputeHeadingsIfOpen();
|
|
4434
4436
|
}), i = J.on("layoutComplete", () => {
|
|
4435
4437
|
H.value++, requestAnimationFrame(Vr);
|
|
4436
4438
|
}), a = Hn.install(), o = St(() => f.onFontsLoaded?.());
|
|
@@ -4438,7 +4440,7 @@ var la = (e) => {
|
|
|
4438
4440
|
t.disconnect(), n(), r(), i(), a(), o();
|
|
4439
4441
|
});
|
|
4440
4442
|
});
|
|
4441
|
-
let
|
|
4443
|
+
let Ti = a({
|
|
4442
4444
|
editorView: Y,
|
|
4443
4445
|
pagesRef: B,
|
|
4444
4446
|
getDocument: () => {
|
|
@@ -4468,13 +4470,13 @@ var la = (e) => {
|
|
|
4468
4470
|
}
|
|
4469
4471
|
});
|
|
4470
4472
|
R(nn, () => {
|
|
4471
|
-
|
|
4473
|
+
Ti.searchText.value && Ti.scheduleSearch();
|
|
4472
4474
|
}), R(gr, () => {
|
|
4473
|
-
|
|
4475
|
+
Ti.searchText.value && Ti.scheduleSearch();
|
|
4474
4476
|
}), R($t, (e) => {
|
|
4475
|
-
e ||
|
|
4477
|
+
e || Ti.clear();
|
|
4476
4478
|
});
|
|
4477
|
-
let { exposed:
|
|
4479
|
+
let { exposed: Ei } = Ni({
|
|
4478
4480
|
getReadOnlyReason: () => de.value,
|
|
4479
4481
|
markupView: C,
|
|
4480
4482
|
editor: J,
|
|
@@ -4519,27 +4521,27 @@ var la = (e) => {
|
|
|
4519
4521
|
closeNoteStory: yn,
|
|
4520
4522
|
getHeaderFooterView: gn,
|
|
4521
4523
|
setZoom: Vt,
|
|
4522
|
-
search:
|
|
4524
|
+
search: Ti,
|
|
4523
4525
|
openFindReplace: () => {
|
|
4524
4526
|
ct.value = !0;
|
|
4525
4527
|
},
|
|
4526
4528
|
onPrint: f.onPrint,
|
|
4527
4529
|
onSave: f.onSave
|
|
4528
|
-
}),
|
|
4530
|
+
}), Di = S(() => {
|
|
4529
4531
|
H.value;
|
|
4530
|
-
let e =
|
|
4532
|
+
let e = Ei.getEditorRef();
|
|
4531
4533
|
return {
|
|
4532
4534
|
canUndo: e?.canUndo() ?? !1,
|
|
4533
4535
|
canRedo: e?.canRedo() ?? !1
|
|
4534
4536
|
};
|
|
4535
4537
|
});
|
|
4536
|
-
function
|
|
4537
|
-
|
|
4538
|
+
function Oi() {
|
|
4539
|
+
Ei.undo(), X.value?.focus();
|
|
4538
4540
|
}
|
|
4539
|
-
function
|
|
4540
|
-
|
|
4541
|
+
function ki() {
|
|
4542
|
+
Ei.redo(), X.value?.focus();
|
|
4541
4543
|
}
|
|
4542
|
-
return t(
|
|
4544
|
+
return t(Ei), (t, n) => (N(), E("div", {
|
|
4543
4545
|
ref_key: "rootRef",
|
|
4544
4546
|
ref: Re,
|
|
4545
4547
|
class: j([
|
|
@@ -4555,15 +4557,15 @@ var la = (e) => {
|
|
|
4555
4557
|
"data-folio-locale-pending": !we.value || void 0,
|
|
4556
4558
|
"aria-busy": L(Ce).type === "loading" || void 0
|
|
4557
4559
|
}, [
|
|
4558
|
-
L(Ce).type === "failed" ? (N(), E("div",
|
|
4560
|
+
L(Ce).type === "failed" ? (N(), E("div", Ko, I(L(Ce).error.message), 1)) : we.value ? T("", !0) : (N(), w(L(va), {
|
|
4559
4561
|
key: 1,
|
|
4560
4562
|
class: "docx-editor-vue__locale-loading"
|
|
4561
4563
|
})),
|
|
4562
|
-
D("div",
|
|
4564
|
+
D("div", qo, [O(Ja, {
|
|
4563
4565
|
"show-table-insert": f.showTableInsert !== !1,
|
|
4564
4566
|
onRename: n[0] ||= (e) => h("rename", e),
|
|
4565
|
-
onMenuAction:
|
|
4566
|
-
onInsertTable:
|
|
4567
|
+
onMenuAction: mi,
|
|
4568
|
+
onInsertTable: gi
|
|
4567
4569
|
}, {
|
|
4568
4570
|
"title-bar-left": De(() => [xe(t.$slots, "title-bar-left", {}, void 0, !0)]),
|
|
4569
4571
|
"title-bar-right": De(() => [xe(t.$slots, "title-bar-right", {}, void 0, !0)]),
|
|
@@ -4573,10 +4575,10 @@ var la = (e) => {
|
|
|
4573
4575
|
view: X.value,
|
|
4574
4576
|
"get-commands": L(xn),
|
|
4575
4577
|
"state-tick": H.value,
|
|
4576
|
-
"can-undo":
|
|
4577
|
-
"can-redo":
|
|
4578
|
-
"on-undo":
|
|
4579
|
-
"on-redo":
|
|
4578
|
+
"can-undo": Di.value.canUndo,
|
|
4579
|
+
"can-redo": Di.value.canRedo,
|
|
4580
|
+
"on-undo": Oi,
|
|
4581
|
+
"on-redo": ki,
|
|
4580
4582
|
"zoom-percent": L(zt),
|
|
4581
4583
|
"is-min-zoom": L(q),
|
|
4582
4584
|
"is-max-zoom": L(Bt),
|
|
@@ -4605,7 +4607,7 @@ var la = (e) => {
|
|
|
4605
4607
|
onZoomOut: L(Ut),
|
|
4606
4608
|
onZoomSet: L(Vt),
|
|
4607
4609
|
onToggleSidebar: Ur,
|
|
4608
|
-
onModeChange:
|
|
4610
|
+
onModeChange: fi,
|
|
4609
4611
|
onToggleTrackChanges: ge,
|
|
4610
4612
|
"onUpdate:displayMode": ye,
|
|
4611
4613
|
onImageProperties: n[6] ||= (e) => mt.value = !0,
|
|
@@ -4633,8 +4635,8 @@ var la = (e) => {
|
|
|
4633
4635
|
}, null, 8, ["node"])) : T("", !0)], !0)]),
|
|
4634
4636
|
key: "0"
|
|
4635
4637
|
} : void 0]), 1040, /* @__PURE__ */ "view.get-commands.state-tick.can-undo.can-redo.zoom-percent.is-min-zoom.is-max-zoom.zoom-presets.show-zoom-control.editor-mode.show-review-controls.track-changes-on.display-mode.read-only.comments-sidebar-open.outline-drawer.outline-drawer-open.comment-count.image-context.theme.onApplyStyle.onZoomIn.onZoomOut.onZoomSet.onImageWrapType.onImageTransform".split("."))) : T("", !0)]),
|
|
4636
|
-
O(
|
|
4637
|
-
search: L(
|
|
4638
|
+
O(Ua, {
|
|
4639
|
+
search: L(Ti),
|
|
4638
4640
|
"show-find-replace": ct.value,
|
|
4639
4641
|
"onUpdate:showFindReplace": n[7] ||= (e) => ct.value = e,
|
|
4640
4642
|
"show-hyperlink": ut.value,
|
|
@@ -4662,8 +4664,8 @@ var la = (e) => {
|
|
|
4662
4664
|
onHyperlinkRemove: L(Rn),
|
|
4663
4665
|
onPageSetupApply: L(ni),
|
|
4664
4666
|
onTablePropertiesApply: bi,
|
|
4665
|
-
onWatermarkApply:
|
|
4666
|
-
onNumberingValueApply:
|
|
4667
|
+
onWatermarkApply: hi,
|
|
4668
|
+
onNumberingValueApply: _i
|
|
4667
4669
|
}, null, 8, [
|
|
4668
4670
|
"search",
|
|
4669
4671
|
"show-find-replace",
|
|
@@ -4685,14 +4687,14 @@ var la = (e) => {
|
|
|
4685
4687
|
"onHyperlinkRemove",
|
|
4686
4688
|
"onPageSetupApply"
|
|
4687
4689
|
]),
|
|
4688
|
-
L(tn) ? (N(), E("div",
|
|
4690
|
+
L(tn) ? (N(), E("div", Jo, I(L(tn)), 1)) : we.value && Dn.value ? (N(), E("div", Yo, [xe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (N(), w(Te, {
|
|
4689
4691
|
key: 0,
|
|
4690
4692
|
node: e.loadingIndicator
|
|
4691
|
-
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div",
|
|
4693
|
+
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div", Xo, [xe(t.$slots, "placeholder", {}, () => [e.placeholder ? (N(), w(Te, {
|
|
4692
4694
|
key: 0,
|
|
4693
4695
|
node: e.placeholder
|
|
4694
4696
|
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe("No document loaded")], 64))], !0)])) : T("", !0),
|
|
4695
|
-
L(ee) ? (N(), E("div",
|
|
4697
|
+
L(ee) ? (N(), E("div", Zo, I(L(ee)), 1)) : T("", !0),
|
|
4696
4698
|
D("div", { class: j(["docx-editor-vue__hidden-pm-wrapper", L(Ie)]) }, [D("div", {
|
|
4697
4699
|
ref_key: "hiddenPmRef",
|
|
4698
4700
|
ref: Ke,
|
|
@@ -4712,7 +4714,7 @@ var la = (e) => {
|
|
|
4712
4714
|
"data-folio-outline": $.value.outline,
|
|
4713
4715
|
"data-folio-comments": $.value.comments
|
|
4714
4716
|
}, [
|
|
4715
|
-
$.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(
|
|
4717
|
+
$.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(Ha, {
|
|
4716
4718
|
key: 0,
|
|
4717
4719
|
headings: Rt.value,
|
|
4718
4720
|
available: Lt.value.length > 1,
|
|
@@ -4758,18 +4760,18 @@ var la = (e) => {
|
|
|
4758
4760
|
zoom: L(K),
|
|
4759
4761
|
unit: e.rulerUnit ?? "inch",
|
|
4760
4762
|
editable: !A.value,
|
|
4761
|
-
"indent-left":
|
|
4762
|
-
"indent-right":
|
|
4763
|
-
"first-line-indent":
|
|
4764
|
-
"hanging-indent":
|
|
4763
|
+
"indent-left": di.value.indentLeft,
|
|
4764
|
+
"indent-right": di.value.indentRight,
|
|
4765
|
+
"first-line-indent": di.value.firstLineIndent,
|
|
4766
|
+
"hanging-indent": di.value.hangingIndent,
|
|
4765
4767
|
"show-first-line-indent": !0,
|
|
4766
|
-
"tab-stops":
|
|
4768
|
+
"tab-stops": di.value.tabs,
|
|
4767
4769
|
onLeftMarginChange: L(ri),
|
|
4768
4770
|
onRightMarginChange: L(ii),
|
|
4769
4771
|
onIndentLeftChange: L(si),
|
|
4770
|
-
onIndentRightChange: L(
|
|
4771
|
-
onFirstLineIndentChange: L(
|
|
4772
|
-
onTabStopRemove: L(
|
|
4772
|
+
onIndentRightChange: L(ci),
|
|
4773
|
+
onFirstLineIndentChange: L(li),
|
|
4774
|
+
onTabStopRemove: L(ui)
|
|
4773
4775
|
}, null, 8, [
|
|
4774
4776
|
"section-props",
|
|
4775
4777
|
"zoom",
|
|
@@ -4787,7 +4789,7 @@ var la = (e) => {
|
|
|
4787
4789
|
"onFirstLineIndentChange",
|
|
4788
4790
|
"onTabStopRemove"
|
|
4789
4791
|
])], 4)) : T("", !0),
|
|
4790
|
-
ot.value && !A.value ? (N(), E("div",
|
|
4792
|
+
ot.value && !A.value ? (N(), E("div", $o, [O(L(u), {
|
|
4791
4793
|
"section-props": Er.value,
|
|
4792
4794
|
zoom: L(K),
|
|
4793
4795
|
unit: e.rulerUnit ?? "inch",
|
|
@@ -4815,14 +4817,14 @@ var la = (e) => {
|
|
|
4815
4817
|
onDblclick: n[27] ||= (...e) => L(Qn) && L(Qn)(...e),
|
|
4816
4818
|
onContextmenu: n[28] ||= z((...e) => L(ur) && L(ur)(...e), ["prevent"])
|
|
4817
4819
|
}, [
|
|
4818
|
-
D("div",
|
|
4820
|
+
D("div", es, [
|
|
4819
4821
|
D("div", {
|
|
4820
4822
|
ref_key: "pagesRef",
|
|
4821
4823
|
ref: B,
|
|
4822
4824
|
class: j(["docx-editor-vue__pages paged-editor__pages", L(Wn) ? `paged-editor--hf-editing paged-editor--editing-${L(Wn).position}` : ""]),
|
|
4823
4825
|
style: M(qr.value)
|
|
4824
4826
|
}, null, 6),
|
|
4825
|
-
O(
|
|
4827
|
+
O(xo, {
|
|
4826
4828
|
"editor-view": rr(),
|
|
4827
4829
|
"hidden-container": Je.value,
|
|
4828
4830
|
"pages-container": B.value,
|
|
@@ -4835,8 +4837,8 @@ var la = (e) => {
|
|
|
4835
4837
|
"selection",
|
|
4836
4838
|
"zoom"
|
|
4837
4839
|
]),
|
|
4838
|
-
D("div",
|
|
4839
|
-
O(
|
|
4840
|
+
D("div", ts, [
|
|
4841
|
+
O(ba, {
|
|
4840
4842
|
"get-highlights": wn,
|
|
4841
4843
|
"get-pages-container": () => B.value,
|
|
4842
4844
|
"editor-state": L(Yt),
|
|
@@ -4862,7 +4864,7 @@ var la = (e) => {
|
|
|
4862
4864
|
"selected-canonical",
|
|
4863
4865
|
"selection-seq"
|
|
4864
4866
|
]),
|
|
4865
|
-
O(
|
|
4867
|
+
O(Eo, {
|
|
4866
4868
|
range: at.value,
|
|
4867
4869
|
"get-pages-container": () => B.value,
|
|
4868
4870
|
zoom: L(K),
|
|
@@ -4877,7 +4879,7 @@ var la = (e) => {
|
|
|
4877
4879
|
"blocks",
|
|
4878
4880
|
"measures"
|
|
4879
4881
|
]),
|
|
4880
|
-
f.showTemplateDirectives ? (N(), w(
|
|
4882
|
+
f.showTemplateDirectives ? (N(), w(Po, {
|
|
4881
4883
|
key: 0,
|
|
4882
4884
|
"get-view": () => L(Y),
|
|
4883
4885
|
"get-pages-container": () => B.value,
|
|
@@ -4895,7 +4897,7 @@ var la = (e) => {
|
|
|
4895
4897
|
"blocks",
|
|
4896
4898
|
"measures"
|
|
4897
4899
|
])) : T("", !0),
|
|
4898
|
-
O(
|
|
4900
|
+
O(wa, {
|
|
4899
4901
|
"get-pages-container": () => B.value,
|
|
4900
4902
|
"editor-state": L(Yt),
|
|
4901
4903
|
zoom: L(K),
|
|
@@ -4910,7 +4912,7 @@ var la = (e) => {
|
|
|
4910
4912
|
"suggestion",
|
|
4911
4913
|
"editor-position-at"
|
|
4912
4914
|
]),
|
|
4913
|
-
O(
|
|
4915
|
+
O(ka, {
|
|
4914
4916
|
"get-view": () => L(Y),
|
|
4915
4917
|
"get-pages-container": () => B.value,
|
|
4916
4918
|
zoom: L(K),
|
|
@@ -4925,7 +4927,7 @@ var la = (e) => {
|
|
|
4925
4927
|
])
|
|
4926
4928
|
])
|
|
4927
4929
|
]),
|
|
4928
|
-
L(Wn) ? (N(), w(
|
|
4930
|
+
L(Wn) ? (N(), w(Co, {
|
|
4929
4931
|
key: 0,
|
|
4930
4932
|
edit: L(Wn),
|
|
4931
4933
|
"get-view": rr,
|
|
@@ -4940,15 +4942,15 @@ var la = (e) => {
|
|
|
4940
4942
|
class: "docx-editor-vue__note-editor",
|
|
4941
4943
|
"aria-label": En.value,
|
|
4942
4944
|
onKeydown: n[17] ||= ke(z((...e) => L(yn) && L(yn)(...e), ["stop", "prevent"]), ["esc"])
|
|
4943
|
-
}, [D("header",
|
|
4945
|
+
}, [D("header", rs, [D("span", null, I(En.value), 1), D("button", {
|
|
4944
4946
|
type: "button",
|
|
4945
4947
|
"aria-label": L(F)("common.closeDialog"),
|
|
4946
4948
|
onClick: n[16] ||= (...e) => L(yn) && L(yn)(...e)
|
|
4947
|
-
}, " × ", 8,
|
|
4949
|
+
}, " × ", 8, is)]), D("div", {
|
|
4948
4950
|
ref_key: "notePmRef",
|
|
4949
4951
|
ref: Ft,
|
|
4950
4952
|
class: "docx-editor-vue__note-editor-host"
|
|
4951
|
-
}, null, 512)], 40,
|
|
4953
|
+
}, null, 512)], 40, ns), [[Ee, L(Qt)]]),
|
|
4952
4954
|
Pn.value ? (N(), w(L(d), {
|
|
4953
4955
|
key: 1,
|
|
4954
4956
|
"image-info": L(kn),
|
|
@@ -4964,7 +4966,7 @@ var la = (e) => {
|
|
|
4964
4966
|
"view",
|
|
4965
4967
|
"onContextMenu"
|
|
4966
4968
|
])) : T("", !0),
|
|
4967
|
-
O(
|
|
4969
|
+
O(Wo, {
|
|
4968
4970
|
data: L(In),
|
|
4969
4971
|
"read-only": A.value,
|
|
4970
4972
|
onNavigate: L(zn),
|
|
@@ -4989,7 +4991,7 @@ var la = (e) => {
|
|
|
4989
4991
|
}),
|
|
4990
4992
|
"aria-label": L(Un).type === "row" ? "Insert row" : "Insert column",
|
|
4991
4993
|
onMousedown: n[22] ||= (...e) => L($n) && L($n)(...e)
|
|
4992
|
-
}, " + ", 44,
|
|
4994
|
+
}, " + ", 44, as)) : T("", !0),
|
|
4993
4995
|
O(ne, {
|
|
4994
4996
|
comments: L(gr),
|
|
4995
4997
|
"pages-container": B.value,
|
|
@@ -5067,7 +5069,7 @@ var la = (e) => {
|
|
|
5067
5069
|
size: 18
|
|
5068
5070
|
})], 36)) : T("", !0)
|
|
5069
5071
|
], 36),
|
|
5070
|
-
L(Gn).totalPages > 1 ? (N(), w(
|
|
5072
|
+
L(Gn).totalPages > 1 ? (N(), w(wo, {
|
|
5071
5073
|
key: 2,
|
|
5072
5074
|
"current-page": L(Gn).currentPage,
|
|
5073
5075
|
"total-pages": L(Gn).totalPages,
|
|
@@ -5085,8 +5087,8 @@ var la = (e) => {
|
|
|
5085
5087
|
"aria-hidden": "true",
|
|
5086
5088
|
onMousedown: z(Hr, ["prevent"])
|
|
5087
5089
|
}, null, 32)) : T("", !0)
|
|
5088
|
-
], 8,
|
|
5089
|
-
O(
|
|
5090
|
+
], 8, Qo),
|
|
5091
|
+
O(bo, {
|
|
5090
5092
|
"read-only": A.value,
|
|
5091
5093
|
"context-menu": L(or),
|
|
5092
5094
|
"image-context-menu": L(sr),
|
|
@@ -5108,7 +5110,7 @@ var la = (e) => {
|
|
|
5108
5110
|
"onContextMenuAction",
|
|
5109
5111
|
"onImageWrapSelect"
|
|
5110
5112
|
]),
|
|
5111
|
-
O(
|
|
5113
|
+
O(Oa, {
|
|
5112
5114
|
"event-root": A.value ? null : B.value,
|
|
5113
5115
|
view: L(Y),
|
|
5114
5116
|
onRefused: L(te)
|
|
@@ -5117,38 +5119,38 @@ var la = (e) => {
|
|
|
5117
5119
|
"view",
|
|
5118
5120
|
"onRefused"
|
|
5119
5121
|
])
|
|
5120
|
-
], 14,
|
|
5122
|
+
], 14, Go));
|
|
5121
5123
|
}
|
|
5122
5124
|
}), [["__scopeId", "data-v-a7b741c3"]]);
|
|
5123
5125
|
// src/utils/listState.ts
|
|
5124
|
-
function
|
|
5126
|
+
function ss() {
|
|
5125
5127
|
return V;
|
|
5126
5128
|
}
|
|
5127
5129
|
// src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
|
|
5128
|
-
var
|
|
5130
|
+
var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
5129
5131
|
"disabled",
|
|
5130
5132
|
"title",
|
|
5131
5133
|
"aria-label"
|
|
5132
|
-
],
|
|
5134
|
+
], ds = [
|
|
5133
5135
|
"disabled",
|
|
5134
5136
|
"title",
|
|
5135
5137
|
"aria-label"
|
|
5136
|
-
],
|
|
5138
|
+
], fs = ["aria-label"], ps = [
|
|
5137
5139
|
"disabled",
|
|
5138
5140
|
"title",
|
|
5139
5141
|
"aria-label",
|
|
5140
5142
|
"aria-pressed"
|
|
5141
|
-
],
|
|
5143
|
+
], ms = [
|
|
5142
5144
|
"disabled",
|
|
5143
5145
|
"title",
|
|
5144
5146
|
"aria-label",
|
|
5145
5147
|
"aria-pressed"
|
|
5146
|
-
],
|
|
5148
|
+
], hs = [
|
|
5147
5149
|
"disabled",
|
|
5148
5150
|
"title",
|
|
5149
5151
|
"aria-label",
|
|
5150
5152
|
"aria-pressed"
|
|
5151
|
-
],
|
|
5153
|
+
], gs = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
5152
5154
|
__name: "FormattingBar",
|
|
5153
5155
|
props: {
|
|
5154
5156
|
currentFormatting: {},
|
|
@@ -5190,7 +5192,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5190
5192
|
"redo"
|
|
5191
5193
|
],
|
|
5192
5194
|
setup(e, { emit: t }) {
|
|
5193
|
-
let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ??
|
|
5195
|
+
let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ?? ss()), l = S(() => {
|
|
5194
5196
|
let e = o.value.color;
|
|
5195
5197
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
5196
5198
|
}), f = S(() => ht(c.value) > 0 || (o.value.indentLeft ?? 0) > 0);
|
|
@@ -5220,7 +5222,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5220
5222
|
}, [O(m, {
|
|
5221
5223
|
name: "undo",
|
|
5222
5224
|
size: 18
|
|
5223
|
-
})], 40,
|
|
5225
|
+
})], 40, us), D("button", {
|
|
5224
5226
|
type: "button",
|
|
5225
5227
|
class: "docx-formatting-bar__btn",
|
|
5226
5228
|
disabled: e.disabled || !e.canRedo,
|
|
@@ -5230,7 +5232,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5230
5232
|
}, [O(m, {
|
|
5231
5233
|
name: "redo",
|
|
5232
5234
|
size: 18
|
|
5233
|
-
})], 40,
|
|
5235
|
+
})], 40, ds)], 8, ls),
|
|
5234
5236
|
r[13] ||= D("span", {
|
|
5235
5237
|
class: "docx-formatting-bar__divider",
|
|
5236
5238
|
role: "separator"
|
|
@@ -5261,7 +5263,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5261
5263
|
}, [O(m, {
|
|
5262
5264
|
name: "format_bold",
|
|
5263
5265
|
size: 18
|
|
5264
|
-
})], 42,
|
|
5266
|
+
})], 42, ps),
|
|
5265
5267
|
D("button", {
|
|
5266
5268
|
type: "button",
|
|
5267
5269
|
class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.italic }]),
|
|
@@ -5273,7 +5275,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5273
5275
|
}, [O(m, {
|
|
5274
5276
|
name: "format_italic",
|
|
5275
5277
|
size: 18
|
|
5276
|
-
})], 42,
|
|
5278
|
+
})], 42, ms),
|
|
5277
5279
|
D("button", {
|
|
5278
5280
|
type: "button",
|
|
5279
5281
|
class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.underline }]),
|
|
@@ -5285,8 +5287,8 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5285
5287
|
}, [O(m, {
|
|
5286
5288
|
name: "format_underlined",
|
|
5287
5289
|
size: 18
|
|
5288
|
-
})], 42,
|
|
5289
|
-
], 8,
|
|
5290
|
+
})], 42, hs)
|
|
5291
|
+
], 8, fs),
|
|
5290
5292
|
e.showTextColorPicker ? (N(), E(x, { key: 1 }, [r[12] ||= D("span", {
|
|
5291
5293
|
class: "docx-formatting-bar__divider",
|
|
5292
5294
|
role: "separator"
|
|
@@ -5328,9 +5330,9 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5328
5330
|
"disabled",
|
|
5329
5331
|
"can-outdent"
|
|
5330
5332
|
])) : T("", !0)
|
|
5331
|
-
], 10,
|
|
5333
|
+
], 10, cs));
|
|
5332
5334
|
}
|
|
5333
|
-
}), [["__scopeId", "data-v-ad0aef02"]]),
|
|
5335
|
+
}), [["__scopeId", "data-v-ad0aef02"]]), _s = [
|
|
5334
5336
|
{
|
|
5335
5337
|
value: .5,
|
|
5336
5338
|
label: "50%"
|
|
@@ -5355,7 +5357,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5355
5357
|
value: 2,
|
|
5356
5358
|
label: "200%"
|
|
5357
5359
|
}
|
|
5358
|
-
],
|
|
5360
|
+
], vs = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
5359
5361
|
__name: "ZoomControl",
|
|
5360
5362
|
props: {
|
|
5361
5363
|
value: { default: 1 },
|
|
@@ -5372,7 +5374,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5372
5374
|
},
|
|
5373
5375
|
emits: ["change"],
|
|
5374
5376
|
setup(e, { emit: t }) {
|
|
5375
|
-
let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ??
|
|
5377
|
+
let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ?? _s), o = S(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = S(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = S(() => o.value ? String(o.value.value) : String(r.value)), l = S(() => {
|
|
5376
5378
|
let e = a.value.map((e) => ({
|
|
5377
5379
|
value: String(e.value),
|
|
5378
5380
|
label: e.label
|
|
@@ -5400,7 +5402,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5400
5402
|
"disabled"
|
|
5401
5403
|
]));
|
|
5402
5404
|
}
|
|
5403
|
-
}), [["__scopeId", "data-v-8169335f"]]),
|
|
5405
|
+
}), [["__scopeId", "data-v-8169335f"]]), ys = (e, n, r = {}) => {
|
|
5404
5406
|
let { colorMode: a = i, locale: o = "en", ...s } = r;
|
|
5405
5407
|
return new Promise((r, i) => {
|
|
5406
5408
|
let c = P(null), l = null, u = !1, d = P(J(o) !== void 0), f = {
|
|
@@ -5428,7 +5430,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5428
5430
|
s.onError?.(e), u || (u = !0, l?.unmount(), l = null, i(e));
|
|
5429
5431
|
};
|
|
5430
5432
|
l = C({ setup() {
|
|
5431
|
-
return () => d.value ? pe(
|
|
5433
|
+
return () => d.value ? pe(os, {
|
|
5432
5434
|
...s,
|
|
5433
5435
|
documentBuffer: e,
|
|
5434
5436
|
ref: c,
|
|
@@ -5436,7 +5438,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5436
5438
|
u || (u = !0, r(f));
|
|
5437
5439
|
},
|
|
5438
5440
|
onError: p
|
|
5439
|
-
}) : pe(
|
|
5441
|
+
}) : pe(va, {
|
|
5440
5442
|
class: s.className,
|
|
5441
5443
|
style: s.style
|
|
5442
5444
|
});
|
|
@@ -5447,4 +5449,4 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
|
|
|
5447
5449
|
});
|
|
5448
5450
|
});
|
|
5449
5451
|
};
|
|
5450
|
-
export {
|
|
5452
|
+
export { Sa as AutocompleteCaretOverlay, qr as DEFAULT_AI_SUGGESTION_PRESETS, Wr as DOCUMENT_PRESET_VERSION, Gr as DOCUMENT_STYLE_SET_VERSION, os as DocxEditor, h as FolioUIProvider, gs as FormattingBar, oi as HYPHENATION_DICTIONARY_IDS, si as HyphenationDictionaryError, Vr as STELLA_STYLE_SET_NAME, vs as ZoomControl, Jr as applySuggestions, Zr as buildPositionalText, sn as clearTemplateSlashMenu, t as colorModePlugin, ci as configureHyphenationAssets, ai as configureTiffDecoding, cn as consumeTemplateSlashQuery, ni as createAICitationDecorationsPlugin, Kr as createDocx, Ir as createEmptyDocument, _n as createFolioAIEditSnapshot, Hr as createStellaStyleDocumentPreset, Ur as createStellaStyleSet, i as defaultColorMode, _ as defaultLocale, Xn as deriveBlockId, xn as diffWordSegments, Lr as extractDocumentStyleSet, Rr as extractDocumentStyleSetFromDocx, ui as fromMarkdown, kt as getDocumentWatermark, ei as getFolioCaretViewportRect, Zn as getFolioParaIdFromBlockId, ti as getFolioSelectionViewportRect, nn as getTemplateDirectives, ln as getTemplateSlashMenu, Tn as hashFolioAIBlockText, y as i18nPlugin, H as insertImageFromFile, ct as insertPageBreakInView, ut as insertTableInView, ft as insertTableOfContentsInView, zr as inspectDocumentStyles, Br as inspectDocumentStylesFromDocx, $n as isFolioBlockId, er as isSequentialFolioBlockId, Yr as isSuggestionStale, X as normalizeFolioAIBlockText, li as preloadHyphenationDictionaries, l as provideColorMode, f as provideLocale, ys as renderAsync, un as resetTemplateSlashQuery, Xr as resolveSuggestionAnchor, an as scanDirectives, Tr as scrollFolioPositionIntoView, ri as setAICitationsMeta, Qr as setAISuggestionsMeta, ii as setActiveCitationMeta, jt as setDocumentWatermark, $r as setFocusedSuggestionMeta, on as setTemplatePreviewValues, dn as templateSlashMenuKey, di as toMarkdown, fi as toMarkdownResult, n as useColorMode, u as useTranslation, c as useWheelZoom };
|