@harbour-enterprises/superdoc 0.12.5 → 0.12.6
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/chunks/{super-editor.es-Bqp77LuU.cjs → super-editor.es-D0Bj3H0y.cjs} +74 -74
- package/dist/chunks/{super-editor.es-uFc1kYwr.es.js → super-editor.es-DdXT1Lwa.es.js} +4015 -4005
- package/dist/style.css +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-Cid1Ewvn.js → converter-BvrQjifE.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CldOGPZ9.js → docx-zipper-BQzDBjLr.js} +1 -1
- package/dist/super-editor/chunks/{editor-DfsXlTev.js → editor-yOwh2oO-.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-1h7-NG3P.js → toolbar-ByMDVR2X.js} +964 -958
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +1 -1
- package/dist/super-editor/super-editor.es.js +242 -238
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +3 -3
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +1520 -1510
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var Ge = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ze = (e, s, t) =>
|
|
7
|
-
var Te = (e, s, t) => (
|
|
8
|
-
var N = (e, s, t) => (
|
|
9
|
-
import { _ as q, a as
|
|
10
|
-
import { C as
|
|
11
|
-
import { a1 as
|
|
12
|
-
import { O as
|
|
13
|
-
import { ref as h, createElementBlock as k, openBlock as C, createElementVNode as _, unref as M, getCurrentInstance as
|
|
14
|
-
import { t as Z, s as
|
|
15
|
-
import
|
|
16
|
-
import { D as
|
|
17
|
-
import { createZip as
|
|
18
|
-
var
|
|
5
|
+
var kt = (e, s, t) => s in e ? Ct(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var ze = (e, s, t) => kt(e, typeof s != "symbol" ? s + "" : s, t), Ke = (e, s, t) => s.has(e) || Ge("Cannot " + t);
|
|
7
|
+
var Te = (e, s, t) => (Ke(e, s, "read from private field"), t ? t.call(e) : s.get(e)), Re = (e, s, t) => s.has(e) ? Ge("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t);
|
|
8
|
+
var N = (e, s, t) => (Ke(e, s, "access private method"), t);
|
|
9
|
+
import { _ as q, a as Je, b as _t, I as Oe, f as xt, c as Xe, d as St, i as Et, u as At, r as Tt, E as Ne, e as Ft, P as It, h as Lt, M as Mt, j as Dt, A as Bt, N as Ht } from "./chunks/editor-yOwh2oO-.js";
|
|
10
|
+
import { C as Po, T as jo, l as Uo, n as qo, k as Go, m as Ko } from "./chunks/editor-yOwh2oO-.js";
|
|
11
|
+
import { a1 as $t, E as zt, a4 as Rt, T as Qe, a as Ot } from "./chunks/converter-BvrQjifE.js";
|
|
12
|
+
import { O as Zo } from "./chunks/converter-BvrQjifE.js";
|
|
13
|
+
import { ref as h, createElementBlock as k, openBlock as C, createElementVNode as _, unref as M, getCurrentInstance as Nt, computed as j, watch as Wt, onMounted as Ce, createCommentVNode as ee, withDirectives as et, withKeys as tt, normalizeClass as te, withModifiers as he, vModelText as nt, createTextVNode as ot, toDisplayString as ie, Fragment as U, renderList as ne, normalizeStyle as Q, createVNode as P, h as $, createApp as Vt, reactive as Ze, onUnmounted as Pt, shallowRef as it, onBeforeUnmount as st, createBlock as jt } from "vue";
|
|
14
|
+
import { t as Z, s as Ut, T as qt, N as J } from "./chunks/toolbar-ByMDVR2X.js";
|
|
15
|
+
import Gt from "./ai-writer.es.js";
|
|
16
|
+
import { D as Jo } from "./chunks/docx-zipper-BQzDBjLr.js";
|
|
17
|
+
import { createZip as ei } from "./file-zipper.es.js";
|
|
18
|
+
var at = { exports: {} };
|
|
19
19
|
(function(e) {
|
|
20
20
|
var s = Object.prototype.hasOwnProperty, t = "~";
|
|
21
21
|
function n() {
|
|
@@ -119,10 +119,10 @@ var st = { exports: {} };
|
|
|
119
119
|
var u;
|
|
120
120
|
return d ? (u = t ? t + d : d, this._events[u] && c(this, u)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
121
121
|
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = t, a.EventEmitter = a, e.exports = a;
|
|
122
|
-
})(
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
function
|
|
122
|
+
})(at);
|
|
123
|
+
var Kt = at.exports;
|
|
124
|
+
const Xt = /* @__PURE__ */ $t(Kt);
|
|
125
|
+
function Zt(e) {
|
|
126
126
|
let s = e;
|
|
127
127
|
for (; s; ) {
|
|
128
128
|
const t = window.getComputedStyle(s).overflowY;
|
|
@@ -132,9 +132,9 @@ function Xt(e) {
|
|
|
132
132
|
}
|
|
133
133
|
return document.scrollingElement || document.documentElement;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Yt(e, s = { behavior: "smooth", block: "start" }) {
|
|
136
136
|
if (!e) return;
|
|
137
|
-
const t =
|
|
137
|
+
const t = Zt(e), n = t.getBoundingClientRect(), i = e.getBoundingClientRect().top - n.top + t.scrollTop;
|
|
138
138
|
t.scrollTo({
|
|
139
139
|
top: s.block === "start" ? i : i - t.clientHeight + e.offsetHeight,
|
|
140
140
|
behavior: s.behavior
|
|
@@ -147,7 +147,7 @@ const x = (e) => {
|
|
|
147
147
|
throw new Error("Toolbar button item needs either icon or label - " + e.name);
|
|
148
148
|
if (!e.name)
|
|
149
149
|
throw new Error("Invalid toolbar item name - " + e.name);
|
|
150
|
-
const t = h(
|
|
150
|
+
const t = h(zt()), n = e.type, o = h(e.name), i = e.command, c = e.noArgumentCommand, a = h(e.icon), l = h(e.group || "center"), d = h(e.allowWithoutEditor), u = h(e.attributes || {}), r = e.disabled || !1, w = h(e.disabled), v = h(!1), b = h(!1), y = h(e.style), g = h(e.isNarrow), L = h(e.isWide), D = h(e.minWidth), p = h(e.suppressActiveHighlight || !1), S = h(e.argument), F = h(null), O = h(null), W = h(e.iconColor), oe = h(e.hasCaret), ue = h(e.dropdownStyles), ve = h(e.tooltip), ge = h(e.tooltipVisible), Y = h(e.tooltipTimeout), T = h(e.defaultLabel), B = h(e.label), H = h(e.hideLabel), z = h(e.inlineTextInputVisible), G = h(e.hasInlineTextInput), K = h(e.markName), ce = h(e.labelAttr), se = h(e.selectedValue), ke = h(e.dropdownValueKey), Ie = h(e.inputRef || null), be = h([]);
|
|
151
151
|
if (e.options) {
|
|
152
152
|
if (!Array.isArray(e.options)) throw new Error("Invalid toolbar item options - " + e.options);
|
|
153
153
|
be.value.push(...e.options);
|
|
@@ -186,7 +186,7 @@ const x = (e) => {
|
|
|
186
186
|
argument: S,
|
|
187
187
|
parentItem: O,
|
|
188
188
|
iconColor: W,
|
|
189
|
-
hasCaret:
|
|
189
|
+
hasCaret: oe,
|
|
190
190
|
dropdownStyles: ue,
|
|
191
191
|
tooltipVisible: ge,
|
|
192
192
|
tooltipTimeout: Y,
|
|
@@ -213,53 +213,53 @@ const x = (e) => {
|
|
|
213
213
|
onActivate: xe,
|
|
214
214
|
onDeactivate: Se
|
|
215
215
|
};
|
|
216
|
-
},
|
|
216
|
+
}, Jt = { class: "alignment-buttons" }, Qt = ["innerHTML"], en = ["innerHTML"], tn = ["innerHTML"], nn = ["innerHTML"], on = {
|
|
217
217
|
__name: "AlignmentButtons",
|
|
218
218
|
emits: ["select"],
|
|
219
219
|
setup(e, { emit: s }) {
|
|
220
220
|
const t = s, n = (o) => {
|
|
221
221
|
t("select", o);
|
|
222
222
|
};
|
|
223
|
-
return (o, i) => (C(), k("div",
|
|
223
|
+
return (o, i) => (C(), k("div", Jt, [
|
|
224
224
|
_("div", {
|
|
225
225
|
class: "button-icon",
|
|
226
226
|
onClick: i[0] || (i[0] = (c) => n("left")),
|
|
227
227
|
innerHTML: M(Z).alignLeft,
|
|
228
228
|
"data-item": "btn-textAlign-option"
|
|
229
|
-
}, null, 8,
|
|
229
|
+
}, null, 8, Qt),
|
|
230
230
|
_("div", {
|
|
231
231
|
class: "button-icon",
|
|
232
232
|
onClick: i[1] || (i[1] = (c) => n("center")),
|
|
233
233
|
innerHTML: M(Z).alignCenter,
|
|
234
234
|
"data-item": "btn-textAlign-option"
|
|
235
|
-
}, null, 8,
|
|
235
|
+
}, null, 8, en),
|
|
236
236
|
_("div", {
|
|
237
237
|
class: "button-icon",
|
|
238
238
|
onClick: i[2] || (i[2] = (c) => n("right")),
|
|
239
239
|
innerHTML: M(Z).alignRight,
|
|
240
240
|
"data-item": "btn-textAlign-option"
|
|
241
|
-
}, null, 8,
|
|
241
|
+
}, null, 8, tn),
|
|
242
242
|
_("div", {
|
|
243
243
|
class: "button-icon",
|
|
244
244
|
onClick: i[3] || (i[3] = (c) => n("justify")),
|
|
245
245
|
innerHTML: M(Z).alignJustify,
|
|
246
246
|
"data-item": "btn-textAlign-option"
|
|
247
|
-
}, null, 8,
|
|
247
|
+
}, null, 8, nn)
|
|
248
248
|
]));
|
|
249
249
|
}
|
|
250
|
-
},
|
|
250
|
+
}, sn = /* @__PURE__ */ q(on, [["__scopeId", "data-v-932a4937"]]), an = { class: "link-input-ctn" }, ln = {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "link-title"
|
|
253
|
-
},
|
|
253
|
+
}, rn = {
|
|
254
254
|
key: 1,
|
|
255
255
|
class: "link-title"
|
|
256
|
-
},
|
|
256
|
+
}, cn = {
|
|
257
257
|
key: 2,
|
|
258
258
|
class: "link-title"
|
|
259
|
-
},
|
|
259
|
+
}, dn = { key: 3 }, un = { class: "input-row" }, mn = ["innerHTML"], pn = ["onKeydown"], fn = ["innerHTML"], hn = { class: "input-row link-buttons" }, vn = ["innerHTML"], gn = {
|
|
260
260
|
key: 4,
|
|
261
261
|
class: "input-row go-to-anchor clickable"
|
|
262
|
-
},
|
|
262
|
+
}, bn = {
|
|
263
263
|
__name: "LinkInput",
|
|
264
264
|
props: {
|
|
265
265
|
initialText: {
|
|
@@ -286,7 +286,7 @@ const x = (e) => {
|
|
|
286
286
|
},
|
|
287
287
|
emits: ["submit", "cancel"],
|
|
288
288
|
setup(e, { emit: s }) {
|
|
289
|
-
const t = s, n = e, { proxy: o } =
|
|
289
|
+
const t = s, n = e, { proxy: o } = Nt(), i = () => {
|
|
290
290
|
if (o?.$submit instanceof Function && o.$submit(), d.value && r.value) {
|
|
291
291
|
t("submit", { text: l.value, href: u.value });
|
|
292
292
|
return;
|
|
@@ -303,7 +303,7 @@ const x = (e) => {
|
|
|
303
303
|
}), w = j(() => b.value ? "Apply" : "Remove"), v = j(() => !r.value), b = j(() => !y.value), y = j(() => n.href && !d.value), g = j(() => n.href.startsWith("#")), L = () => {
|
|
304
304
|
window.open(u.value, "_blank");
|
|
305
305
|
};
|
|
306
|
-
|
|
306
|
+
Wt(
|
|
307
307
|
() => n.href,
|
|
308
308
|
(p) => {
|
|
309
309
|
d.value = p;
|
|
@@ -315,34 +315,34 @@ const x = (e) => {
|
|
|
315
315
|
};
|
|
316
316
|
return Ce(() => {
|
|
317
317
|
n.showInput && D();
|
|
318
|
-
}), (p, S) => (C(), k("div",
|
|
319
|
-
e.href ? g.value ? (C(), k("div",
|
|
320
|
-
e.showInput && !g.value ? (C(), k("div",
|
|
321
|
-
_("div",
|
|
318
|
+
}), (p, S) => (C(), k("div", an, [
|
|
319
|
+
e.href ? g.value ? (C(), k("div", rn, "Page anchor")) : (C(), k("div", cn, "Edit link")) : (C(), k("div", ln, "Add link")),
|
|
320
|
+
e.showInput && !g.value ? (C(), k("div", dn, [
|
|
321
|
+
_("div", un, [
|
|
322
322
|
_("div", {
|
|
323
323
|
class: "input-icon",
|
|
324
324
|
innerHTML: M(Z).linkInput
|
|
325
|
-
}, null, 8,
|
|
326
|
-
|
|
325
|
+
}, null, 8, mn),
|
|
326
|
+
et(_("input", {
|
|
327
327
|
type: "text",
|
|
328
328
|
placeholder: "Type or paste a link",
|
|
329
|
-
class:
|
|
329
|
+
class: te({ error: a.value }),
|
|
330
330
|
"onUpdate:modelValue": S[0] || (S[0] = (F) => d.value = F),
|
|
331
331
|
onKeydown: [
|
|
332
|
-
|
|
332
|
+
tt(he(i, ["stop", "prevent"]), ["enter"]),
|
|
333
333
|
S[1] || (S[1] = (F) => a.value = !1)
|
|
334
334
|
]
|
|
335
|
-
}, null, 42,
|
|
336
|
-
[
|
|
335
|
+
}, null, 42, pn), [
|
|
336
|
+
[nt, d.value]
|
|
337
337
|
]),
|
|
338
338
|
_("div", {
|
|
339
|
-
class:
|
|
339
|
+
class: te(["open-link-icon", { disabled: !r.value }]),
|
|
340
340
|
innerHTML: M(Z).openLink,
|
|
341
341
|
onClick: L,
|
|
342
342
|
"data-item": "btn-link-open"
|
|
343
|
-
}, null, 10,
|
|
343
|
+
}, null, 10, fn)
|
|
344
344
|
]),
|
|
345
|
-
_("div",
|
|
345
|
+
_("div", hn, [
|
|
346
346
|
e.href ? (C(), k("button", {
|
|
347
347
|
key: 0,
|
|
348
348
|
class: "remove-btn",
|
|
@@ -352,24 +352,24 @@ const x = (e) => {
|
|
|
352
352
|
_("div", {
|
|
353
353
|
class: "remove-btn__icon",
|
|
354
354
|
innerHTML: M(Z).removeLink
|
|
355
|
-
}, null, 8,
|
|
356
|
-
S[3] || (S[3] =
|
|
355
|
+
}, null, 8, vn),
|
|
356
|
+
S[3] || (S[3] = ot(" Remove "))
|
|
357
357
|
])) : ee("", !0),
|
|
358
358
|
b.value ? (C(), k("button", {
|
|
359
359
|
key: 1,
|
|
360
|
-
class:
|
|
360
|
+
class: te(["submit-btn", { "disable-btn": v.value }]),
|
|
361
361
|
onClick: i,
|
|
362
362
|
"data-item": "btn-link-apply"
|
|
363
363
|
}, ie(w.value), 3)) : ee("", !0)
|
|
364
364
|
])
|
|
365
|
-
])) : g.value ? (C(), k("div",
|
|
365
|
+
])) : g.value ? (C(), k("div", gn, [
|
|
366
366
|
_("a", {
|
|
367
367
|
onClick: S[2] || (S[2] = he((...F) => e.goToAnchor && e.goToAnchor(...F), ["stop", "prevent"]))
|
|
368
368
|
}, "Go to " + ie(e.href.startsWith("#_") ? e.href.substring(2) : e.href), 1)
|
|
369
369
|
])) : ee("", !0)
|
|
370
370
|
]));
|
|
371
371
|
}
|
|
372
|
-
},
|
|
372
|
+
}, yn = /* @__PURE__ */ q(bn, [["__scopeId", "data-v-04bac853"]]), wn = { class: "document-mode" }, Cn = ["onClick"], kn = { class: "document-mode-column icon-column" }, _n = ["innerHTML"], xn = { class: "document-mode-column text-column" }, Sn = { class: "document-mode-type" }, En = { class: "document-mode-description" }, An = {
|
|
373
373
|
__name: "DocumentMode",
|
|
374
374
|
props: {
|
|
375
375
|
options: {
|
|
@@ -381,34 +381,37 @@ const x = (e) => {
|
|
|
381
381
|
const t = s, n = (o) => {
|
|
382
382
|
t("select", o);
|
|
383
383
|
};
|
|
384
|
-
return (o, i) => (C(), k("div",
|
|
385
|
-
(C(!0), k(U, null,
|
|
386
|
-
class:
|
|
384
|
+
return (o, i) => (C(), k("div", wn, [
|
|
385
|
+
(C(!0), k(U, null, ne(e.options, (c) => (C(), k("div", {
|
|
386
|
+
class: te(["option-item", { disabled: c.disabled }]),
|
|
387
387
|
onClick: (a) => n(c),
|
|
388
388
|
"data-item": "btn-documentMode-option"
|
|
389
389
|
}, [
|
|
390
|
-
_("div",
|
|
390
|
+
_("div", kn, [
|
|
391
391
|
_("div", {
|
|
392
392
|
class: "icon-column__icon",
|
|
393
393
|
innerHTML: c.icon
|
|
394
|
-
}, null, 8,
|
|
394
|
+
}, null, 8, _n)
|
|
395
395
|
]),
|
|
396
|
-
_("div",
|
|
397
|
-
_("div",
|
|
398
|
-
_("div",
|
|
396
|
+
_("div", xn, [
|
|
397
|
+
_("div", Sn, ie(c.label), 1),
|
|
398
|
+
_("div", En, ie(c.description), 1)
|
|
399
399
|
])
|
|
400
|
-
], 10,
|
|
400
|
+
], 10, Cn))), 256))
|
|
401
401
|
]));
|
|
402
402
|
}
|
|
403
|
-
},
|
|
403
|
+
}, Tn = /* @__PURE__ */ q(An, [["__scopeId", "data-v-8afd7fbb"]]), Fn = {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: "linked-style-buttons"
|
|
406
|
-
},
|
|
406
|
+
}, In = ["onClick"], Ln = {
|
|
407
407
|
__name: "LinkedStyle",
|
|
408
408
|
props: {
|
|
409
409
|
editor: {
|
|
410
410
|
type: Object,
|
|
411
411
|
required: !0
|
|
412
|
+
},
|
|
413
|
+
selectedOption: {
|
|
414
|
+
type: String
|
|
412
415
|
}
|
|
413
416
|
},
|
|
414
417
|
emits: ["select"],
|
|
@@ -416,20 +419,20 @@ const x = (e) => {
|
|
|
416
419
|
const t = s, n = e, o = (i) => {
|
|
417
420
|
t("select", i);
|
|
418
421
|
};
|
|
419
|
-
return (i, c) => n.editor ? (C(), k("div",
|
|
420
|
-
(C(!0), k(U, null,
|
|
421
|
-
class: "style-item",
|
|
422
|
+
return (i, c) => n.editor ? (C(), k("div", Fn, [
|
|
423
|
+
(C(!0), k(U, null, ne(M(Je)(e.editor), (a) => (C(), k("div", {
|
|
424
|
+
class: te(["style-item", { selected: e.selectedOption === a.id }]),
|
|
422
425
|
onClick: (l) => o(a)
|
|
423
426
|
}, [
|
|
424
427
|
_("div", {
|
|
425
428
|
class: "style-name",
|
|
426
|
-
style: Q(M(
|
|
429
|
+
style: Q(M(_t)(a, null, !1)),
|
|
427
430
|
"data-item": "btn-linkedStyles-option"
|
|
428
431
|
}, ie(a.definition.attrs.name), 5)
|
|
429
|
-
],
|
|
432
|
+
], 10, In))), 256))
|
|
430
433
|
])) : ee("", !0);
|
|
431
434
|
}
|
|
432
|
-
},
|
|
435
|
+
}, Mn = /* @__PURE__ */ q(Ln, [["__scopeId", "data-v-bf5a8c1e"]]), Dn = ["onClick"], Bn = ["innerHTML"], Hn = ["innerHTML"], $n = {
|
|
433
436
|
__name: "IconGridRow",
|
|
434
437
|
props: {
|
|
435
438
|
icons: {
|
|
@@ -448,11 +451,11 @@ const x = (e) => {
|
|
|
448
451
|
};
|
|
449
452
|
return Ce(() => {
|
|
450
453
|
if (!n.icons.every((l) => Array.isArray(l))) throw new Error("icon props must be 2d array");
|
|
451
|
-
}), (a, l) => (C(!0), k(U, null,
|
|
454
|
+
}), (a, l) => (C(!0), k(U, null, ne(e.icons, (d, u) => (C(), k("div", {
|
|
452
455
|
class: "option-row",
|
|
453
456
|
key: u
|
|
454
457
|
}, [
|
|
455
|
-
(C(!0), k(U, null,
|
|
458
|
+
(C(!0), k(U, null, ne(d, (r, w) => (C(), k("div", {
|
|
456
459
|
class: "option",
|
|
457
460
|
key: w,
|
|
458
461
|
onClick: he((v) => c(r), ["stop", "prevent"])
|
|
@@ -461,18 +464,18 @@ const x = (e) => {
|
|
|
461
464
|
class: "option__icon",
|
|
462
465
|
innerHTML: r.icon,
|
|
463
466
|
style: Q(r.style)
|
|
464
|
-
}, null, 12,
|
|
467
|
+
}, null, 12, Bn),
|
|
465
468
|
o.value(r) ? (C(), k("div", {
|
|
466
469
|
key: 0,
|
|
467
470
|
class: "option__check",
|
|
468
471
|
innerHTML: M(Z).colorOptionCheck,
|
|
469
472
|
style: Q(i(r.value, w))
|
|
470
|
-
}, null, 12,
|
|
471
|
-
], 8,
|
|
473
|
+
}, null, 12, Hn)) : ee("", !0)
|
|
474
|
+
], 8, Dn))), 128))
|
|
472
475
|
]))), 128));
|
|
473
476
|
}
|
|
474
|
-
},
|
|
475
|
-
`,
|
|
477
|
+
}, Ye = /* @__PURE__ */ q($n, [["__scopeId", "data-v-6a2a9a40"]]), zn = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z"/></svg>
|
|
478
|
+
`, Rn = { class: "options-grid-wrap" }, On = ["innerHTML"], Nn = { class: "option-grid-ctn" }, Wn = {
|
|
476
479
|
__name: "IconGrid",
|
|
477
480
|
props: {
|
|
478
481
|
icons: {
|
|
@@ -497,27 +500,27 @@ const x = (e) => {
|
|
|
497
500
|
const t = s, n = (o) => {
|
|
498
501
|
t("select", o);
|
|
499
502
|
};
|
|
500
|
-
return (o, i) => (C(), k("div",
|
|
503
|
+
return (o, i) => (C(), k("div", Rn, [
|
|
501
504
|
e.hasNoneIcon ? (C(), k("div", {
|
|
502
505
|
key: 0,
|
|
503
506
|
class: "none-option",
|
|
504
507
|
onClick: i[0] || (i[0] = (c) => n("none"))
|
|
505
508
|
}, [
|
|
506
509
|
_("span", {
|
|
507
|
-
innerHTML: M(
|
|
510
|
+
innerHTML: M(zn),
|
|
508
511
|
class: "none-icon"
|
|
509
|
-
}, null, 8,
|
|
510
|
-
i[1] || (i[1] =
|
|
512
|
+
}, null, 8, On),
|
|
513
|
+
i[1] || (i[1] = ot(" None "))
|
|
511
514
|
])) : ee("", !0),
|
|
512
|
-
_("div",
|
|
513
|
-
P(
|
|
515
|
+
_("div", Nn, [
|
|
516
|
+
P(Ye, {
|
|
514
517
|
icons: e.icons,
|
|
515
518
|
"active-color": e.activeColor,
|
|
516
519
|
onSelect: n
|
|
517
520
|
}, null, 8, ["icons", "active-color"]),
|
|
518
521
|
e.customIcons.flat().length ? (C(), k(U, { key: 0 }, [
|
|
519
522
|
i[2] || (i[2] = _("span", { class: "option-grid-ctn__subtitle" }, "Custom colors", -1)),
|
|
520
|
-
P(
|
|
523
|
+
P(Ye, {
|
|
521
524
|
icons: e.customIcons,
|
|
522
525
|
"active-color": e.activeColor,
|
|
523
526
|
onSelect: n
|
|
@@ -526,7 +529,7 @@ const x = (e) => {
|
|
|
526
529
|
])
|
|
527
530
|
]));
|
|
528
531
|
}
|
|
529
|
-
},
|
|
532
|
+
}, Vn = /* @__PURE__ */ q(Wn, [["__scopeId", "data-v-47b783db"]]), Pn = (e) => {
|
|
530
533
|
e.expand.value = !1;
|
|
531
534
|
}, f = (e, s = null) => ({
|
|
532
535
|
label: s,
|
|
@@ -539,18 +542,18 @@ const x = (e) => {
|
|
|
539
542
|
}
|
|
540
543
|
}), We = (e, s, t = [], n = !1) => {
|
|
541
544
|
const o = (i) => {
|
|
542
|
-
s.iconColor.value = i, e.emitCommand({ item: s, argument: i }),
|
|
545
|
+
s.iconColor.value = i, e.emitCommand({ item: s, argument: i }), Pn(s);
|
|
543
546
|
};
|
|
544
547
|
return $("div", {}, [
|
|
545
|
-
$(
|
|
546
|
-
icons:
|
|
548
|
+
$(Vn, {
|
|
549
|
+
icons: lt,
|
|
547
550
|
customIcons: t,
|
|
548
551
|
activeColor: s.iconColor,
|
|
549
552
|
hasNoneIcon: n,
|
|
550
553
|
onSelect: o
|
|
551
554
|
})
|
|
552
555
|
]);
|
|
553
|
-
},
|
|
556
|
+
}, lt = [
|
|
554
557
|
[
|
|
555
558
|
f("#111111"),
|
|
556
559
|
f("#333333"),
|
|
@@ -623,7 +626,7 @@ const x = (e) => {
|
|
|
623
626
|
f("#DFCDF2"),
|
|
624
627
|
f("#A91DFF")
|
|
625
628
|
]
|
|
626
|
-
],
|
|
629
|
+
], jn = () => lt.flat().map((e) => e.value), Un = { class: "toolbar-table-grid-wrapper" }, qn = ["data-cols", "data-rows", "onClick"], Gn = { class: "toolbar-table-grid-value" }, Kn = {
|
|
627
630
|
__name: "TableGrid",
|
|
628
631
|
emits: ["select", "clickoutside"],
|
|
629
632
|
setup(e, { emit: s }) {
|
|
@@ -640,27 +643,27 @@ const x = (e) => {
|
|
|
640
643
|
}, c = ({ cols: a, rows: l }) => {
|
|
641
644
|
t("select", { cols: a, rows: l });
|
|
642
645
|
};
|
|
643
|
-
return (a, l) => (C(), k("div",
|
|
646
|
+
return (a, l) => (C(), k("div", Un, [
|
|
644
647
|
_("div", {
|
|
645
648
|
class: "toolbar-table-grid",
|
|
646
649
|
onMouseover: i,
|
|
647
650
|
"data-grid": "true"
|
|
648
651
|
}, [
|
|
649
|
-
(C(), k(U, null,
|
|
650
|
-
(C(), k(U, null,
|
|
652
|
+
(C(), k(U, null, ne(5, (d) => (C(), k(U, { key: d }, [
|
|
653
|
+
(C(), k(U, null, ne(5, (u) => _("div", {
|
|
651
654
|
class: "toolbar-table-grid__item",
|
|
652
655
|
key: `${d}_${u}`,
|
|
653
656
|
"data-cols": u,
|
|
654
657
|
"data-rows": d,
|
|
655
658
|
"data-item": "true",
|
|
656
659
|
onClick: he((r) => c({ cols: u, rows: d }), ["stop", "prevent"])
|
|
657
|
-
}, null, 8,
|
|
660
|
+
}, null, 8, qn)), 64))
|
|
658
661
|
], 64))), 64))
|
|
659
662
|
], 32),
|
|
660
|
-
_("div",
|
|
663
|
+
_("div", Gn, ie(n.value) + " x " + ie(o.value), 1)
|
|
661
664
|
]));
|
|
662
665
|
}
|
|
663
|
-
},
|
|
666
|
+
}, Xn = /* @__PURE__ */ q(Kn, [["__scopeId", "data-v-06352ab9"]]), Zn = { class: "toolbar-table-actions" }, Yn = ["onClick", "data-item"], Jn = { class: "toolbar-table-actions__icon" }, Qn = ["innerHTML"], eo = { class: "toolbar-table-actions__label" }, to = {
|
|
664
667
|
__name: "TableActions",
|
|
665
668
|
props: {
|
|
666
669
|
options: {
|
|
@@ -672,24 +675,24 @@ const x = (e) => {
|
|
|
672
675
|
const t = s, n = (o) => {
|
|
673
676
|
t("select", { command: o.command });
|
|
674
677
|
};
|
|
675
|
-
return (o, i) => (C(), k("div",
|
|
676
|
-
(C(!0), k(U, null,
|
|
677
|
-
class:
|
|
678
|
+
return (o, i) => (C(), k("div", Zn, [
|
|
679
|
+
(C(!0), k(U, null, ne(e.options, (c) => (C(), k("div", {
|
|
680
|
+
class: te(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": c.bottomBorder }]),
|
|
678
681
|
onClick: (a) => n(c),
|
|
679
682
|
"data-item": c.props?.["data-item"] || ""
|
|
680
683
|
}, [
|
|
681
|
-
_("div",
|
|
684
|
+
_("div", Jn, [
|
|
682
685
|
_("div", {
|
|
683
686
|
class: "toolbar-table-actions__icon-wrapper",
|
|
684
687
|
innerHTML: c.icon
|
|
685
|
-
}, null, 8,
|
|
688
|
+
}, null, 8, Qn)
|
|
686
689
|
]),
|
|
687
|
-
_("div",
|
|
688
|
-
], 10,
|
|
690
|
+
_("div", eo, ie(c.label), 1)
|
|
691
|
+
], 10, Yn))), 256))
|
|
689
692
|
]));
|
|
690
693
|
}
|
|
691
|
-
},
|
|
692
|
-
`,
|
|
694
|
+
}, no = /* @__PURE__ */ q(to, [["__scopeId", "data-v-fdbfb4b0"]]), oo = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>
|
|
695
|
+
`, io = { class: "search-input-ctn" }, so = { class: "row" }, ao = ["onKeydown"], lo = {
|
|
693
696
|
__name: "SearchInput",
|
|
694
697
|
props: {
|
|
695
698
|
searchRef: {
|
|
@@ -701,18 +704,18 @@ const x = (e) => {
|
|
|
701
704
|
const t = h(""), n = s, o = () => {
|
|
702
705
|
n("submit", { value: t.value });
|
|
703
706
|
};
|
|
704
|
-
return (i, c) => (C(), k("div",
|
|
705
|
-
_("div",
|
|
706
|
-
|
|
707
|
+
return (i, c) => (C(), k("div", io, [
|
|
708
|
+
_("div", so, [
|
|
709
|
+
et(_("input", {
|
|
707
710
|
ref: e.searchRef,
|
|
708
711
|
"onUpdate:modelValue": c[0] || (c[0] = (a) => t.value = a),
|
|
709
712
|
class: "search-input",
|
|
710
713
|
type: "text",
|
|
711
714
|
name: "search",
|
|
712
715
|
placeholder: "Type search string",
|
|
713
|
-
onKeydown:
|
|
714
|
-
}, null, 40,
|
|
715
|
-
[
|
|
716
|
+
onKeydown: tt(he(o, ["stop", "prevent"]), ["enter"])
|
|
717
|
+
}, null, 40, ao), [
|
|
718
|
+
[nt, t.value]
|
|
716
719
|
])
|
|
717
720
|
]),
|
|
718
721
|
_("div", { class: "row submit" }, [
|
|
@@ -723,7 +726,7 @@ const x = (e) => {
|
|
|
723
726
|
])
|
|
724
727
|
]));
|
|
725
728
|
}
|
|
726
|
-
},
|
|
729
|
+
}, ro = /* @__PURE__ */ q(lo, [["__scopeId", "data-v-af870fbd"]]), co = [
|
|
727
730
|
{
|
|
728
731
|
label: "Georgia",
|
|
729
732
|
key: "Georgia, serif",
|
|
@@ -762,7 +765,7 @@ const x = (e) => {
|
|
|
762
765
|
}
|
|
763
766
|
], re = (e) => {
|
|
764
767
|
e.expand.value = !1;
|
|
765
|
-
},
|
|
768
|
+
}, uo = ({
|
|
766
769
|
superToolbar: e,
|
|
767
770
|
toolbarIcons: s,
|
|
768
771
|
toolbarFonts: t,
|
|
@@ -790,7 +793,7 @@ const x = (e) => {
|
|
|
790
793
|
isWide: !0,
|
|
791
794
|
style: { width: "116px" },
|
|
792
795
|
suppressActiveHighlight: !0,
|
|
793
|
-
options: [...t ||
|
|
796
|
+
options: [...t || co],
|
|
794
797
|
onActivate: ({ fontFamily: m }) => {
|
|
795
798
|
m && (l.label.value = m);
|
|
796
799
|
},
|
|
@@ -815,14 +818,14 @@ const x = (e) => {
|
|
|
815
818
|
render: () => {
|
|
816
819
|
let m = "";
|
|
817
820
|
if (e.activeEditor) {
|
|
818
|
-
const { state: A } = e.activeEditor, { from: V, to: le, empty:
|
|
819
|
-
m =
|
|
821
|
+
const { state: A } = e.activeEditor, { from: V, to: le, empty: wt } = A.selection;
|
|
822
|
+
m = wt ? "" : A.doc.textBetween(V, le);
|
|
820
823
|
}
|
|
821
824
|
return $(
|
|
822
825
|
"div",
|
|
823
826
|
{},
|
|
824
827
|
[
|
|
825
|
-
$(
|
|
828
|
+
$(Gt, {
|
|
826
829
|
handleClose: () => {
|
|
827
830
|
re(d);
|
|
828
831
|
},
|
|
@@ -870,7 +873,7 @@ const x = (e) => {
|
|
|
870
873
|
],
|
|
871
874
|
onActivate: ({ fontSize: m }) => {
|
|
872
875
|
if (!m) return u.label.value = u.defaultLabel.value;
|
|
873
|
-
let E =
|
|
876
|
+
let E = Ut(m, 12);
|
|
874
877
|
E < 8 && (E = 8), E > 96 && (E = 96), u.label.value = String(E);
|
|
875
878
|
},
|
|
876
879
|
onDeactivate: () => u.label.value = u.defaultLabel.value
|
|
@@ -948,7 +951,7 @@ const x = (e) => {
|
|
|
948
951
|
}
|
|
949
952
|
]
|
|
950
953
|
}), D = () => $("div", {}, [
|
|
951
|
-
$(
|
|
954
|
+
$(ro, {
|
|
952
955
|
onSubmit: ({ value: E }) => {
|
|
953
956
|
e.activeEditor.commands.search(E);
|
|
954
957
|
},
|
|
@@ -976,7 +979,7 @@ const x = (e) => {
|
|
|
976
979
|
});
|
|
977
980
|
function S(m) {
|
|
978
981
|
return $("div", {}, [
|
|
979
|
-
$(
|
|
982
|
+
$(yn, {
|
|
980
983
|
onSubmit: ({ href: A }) => {
|
|
981
984
|
re(m), m.attributes.value.link = { href: A };
|
|
982
985
|
const V = { ...m, command: "toggleLink" };
|
|
@@ -986,7 +989,7 @@ const x = (e) => {
|
|
|
986
989
|
goToAnchor: () => {
|
|
987
990
|
if (re(m), !e.activeEditor || !m.attributes.value?.href) return;
|
|
988
991
|
const A = m.attributes.value?.href?.slice(1), le = e.activeEditor.element.querySelector(`a[name='${A}']`);
|
|
989
|
-
le &&
|
|
992
|
+
le && Yt(le);
|
|
990
993
|
}
|
|
991
994
|
})
|
|
992
995
|
]);
|
|
@@ -1017,13 +1020,13 @@ const x = (e) => {
|
|
|
1017
1020
|
{
|
|
1018
1021
|
key: "table",
|
|
1019
1022
|
type: "render",
|
|
1020
|
-
render: () =>
|
|
1023
|
+
render: () => oe(W)
|
|
1021
1024
|
}
|
|
1022
1025
|
]
|
|
1023
1026
|
});
|
|
1024
|
-
function
|
|
1027
|
+
function oe(m) {
|
|
1025
1028
|
return $("div", {}, [
|
|
1026
|
-
$(
|
|
1029
|
+
$(Xn, {
|
|
1027
1030
|
onSelect: (A) => {
|
|
1028
1031
|
e.emitCommand({ item: m, argument: A }), re(m);
|
|
1029
1032
|
}
|
|
@@ -1114,7 +1117,7 @@ const x = (e) => {
|
|
|
1114
1117
|
}
|
|
1115
1118
|
];
|
|
1116
1119
|
function ge(m) {
|
|
1117
|
-
return $(
|
|
1120
|
+
return $(no, {
|
|
1118
1121
|
options: ve,
|
|
1119
1122
|
onSelect: (E) => {
|
|
1120
1123
|
re(m);
|
|
@@ -1137,7 +1140,7 @@ const x = (e) => {
|
|
|
1137
1140
|
{
|
|
1138
1141
|
type: "render",
|
|
1139
1142
|
render: () => $("div", {}, [
|
|
1140
|
-
$(
|
|
1143
|
+
$(sn, {
|
|
1141
1144
|
onSelect: (E) => {
|
|
1142
1145
|
re(Y);
|
|
1143
1146
|
const A = { ...Y, command: "setTextAlign" };
|
|
@@ -1349,7 +1352,7 @@ const x = (e) => {
|
|
|
1349
1352
|
];
|
|
1350
1353
|
function ye(m) {
|
|
1351
1354
|
const E = Se(i, ae);
|
|
1352
|
-
return $(
|
|
1355
|
+
return $(Tn, {
|
|
1353
1356
|
options: E,
|
|
1354
1357
|
onSelect: (A) => {
|
|
1355
1358
|
re(m);
|
|
@@ -1358,7 +1361,7 @@ const x = (e) => {
|
|
|
1358
1361
|
}
|
|
1359
1362
|
});
|
|
1360
1363
|
}
|
|
1361
|
-
const
|
|
1364
|
+
const mt = x({
|
|
1362
1365
|
type: "button",
|
|
1363
1366
|
name: "pageBreakTool",
|
|
1364
1367
|
command: "insertPageBreak",
|
|
@@ -1374,13 +1377,13 @@ const x = (e) => {
|
|
|
1374
1377
|
["documentMode", 47],
|
|
1375
1378
|
["ai", 32],
|
|
1376
1379
|
["default", 32]
|
|
1377
|
-
]),
|
|
1380
|
+
]), pt = x({
|
|
1378
1381
|
type: "button",
|
|
1379
1382
|
name: "ruler",
|
|
1380
1383
|
command: "toggleRuler",
|
|
1381
1384
|
icon: s.ruler,
|
|
1382
1385
|
tooltip: "Show or hide ruler"
|
|
1383
|
-
}), we = x({
|
|
1386
|
+
}), Ue = h(null), we = x({
|
|
1384
1387
|
type: "dropdown",
|
|
1385
1388
|
name: "linkedStyles",
|
|
1386
1389
|
command: "setLinkedStyle",
|
|
@@ -1403,12 +1406,13 @@ const x = (e) => {
|
|
|
1403
1406
|
const m = (E) => {
|
|
1404
1407
|
re(we);
|
|
1405
1408
|
const A = { ...we, command: "setLinkedStyle" };
|
|
1406
|
-
e.emitCommand({ item: A, argument: E });
|
|
1409
|
+
e.emitCommand({ item: A, argument: E }), Ue.value = E.id;
|
|
1407
1410
|
};
|
|
1408
1411
|
return $("div", {}, [
|
|
1409
|
-
$(
|
|
1412
|
+
$(Mn, {
|
|
1410
1413
|
editor: e.activeEditor,
|
|
1411
|
-
onSelect: m
|
|
1414
|
+
onSelect: m,
|
|
1415
|
+
selectedOption: Ue.value
|
|
1412
1416
|
})
|
|
1413
1417
|
]);
|
|
1414
1418
|
}
|
|
@@ -1422,7 +1426,7 @@ const x = (e) => {
|
|
|
1422
1426
|
}
|
|
1423
1427
|
}), me = (m, E) => {
|
|
1424
1428
|
if (E.value.toString() === m)
|
|
1425
|
-
return $("div", { innerHTML:
|
|
1429
|
+
return $("div", { innerHTML: oo, class: "dropdown-select-icon" });
|
|
1426
1430
|
}, de = x({
|
|
1427
1431
|
type: "dropdown",
|
|
1428
1432
|
name: "lineHeight",
|
|
@@ -1448,7 +1452,7 @@ const x = (e) => {
|
|
|
1448
1452
|
sm: 768,
|
|
1449
1453
|
md: 1024,
|
|
1450
1454
|
xl: 1410
|
|
1451
|
-
},
|
|
1455
|
+
}, ft = 120, ht = 32, vt = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"], gt = ["zoom", "fontFamily", "fontSize", "redo"];
|
|
1452
1456
|
let R = [
|
|
1453
1457
|
se,
|
|
1454
1458
|
ke,
|
|
@@ -1483,8 +1487,8 @@ const x = (e) => {
|
|
|
1483
1487
|
r,
|
|
1484
1488
|
we,
|
|
1485
1489
|
r,
|
|
1490
|
+
pt,
|
|
1486
1491
|
mt,
|
|
1487
|
-
ut,
|
|
1488
1492
|
xe,
|
|
1489
1493
|
De,
|
|
1490
1494
|
d,
|
|
@@ -1497,24 +1501,24 @@ const x = (e) => {
|
|
|
1497
1501
|
const E = ["ruler", "zoom", "undo", "redo"];
|
|
1498
1502
|
R = R.filter((A) => !E.includes(A.name.value));
|
|
1499
1503
|
}
|
|
1500
|
-
const
|
|
1501
|
-
c || (i === "viewer" &&
|
|
1502
|
-
const
|
|
1503
|
-
let $e =
|
|
1504
|
+
const qe = [Ie, Le, Me];
|
|
1505
|
+
c || (i === "viewer" && qe.push(be, _e), R = R.filter((m) => !qe.includes(m)));
|
|
1506
|
+
const bt = [L, se, K, X].map((m) => m.name), yt = (m) => bt.includes(m.name), Ae = [], He = [];
|
|
1507
|
+
let $e = ht + ft;
|
|
1504
1508
|
return R.forEach((m) => {
|
|
1505
1509
|
const E = je.get(m.name.value) || je.get("default");
|
|
1506
|
-
if (o < Be.xl &&
|
|
1510
|
+
if (o < Be.xl && vt.includes(m.name.value) && n) {
|
|
1507
1511
|
if (Ae.push(m), m.name.value === "linkedStyles") {
|
|
1508
1512
|
const A = R.findIndex((V) => V.name.value === "linkedStyles");
|
|
1509
1513
|
R.splice(A + 1, 1);
|
|
1510
1514
|
}
|
|
1511
1515
|
return;
|
|
1512
1516
|
}
|
|
1513
|
-
if (o < Be.sm &&
|
|
1517
|
+
if (o < Be.sm && gt.includes(m.name.value) && n) {
|
|
1514
1518
|
Ae.push(m);
|
|
1515
1519
|
return;
|
|
1516
1520
|
}
|
|
1517
|
-
if (
|
|
1521
|
+
if (yt(m)) {
|
|
1518
1522
|
He.push(m), $e += E;
|
|
1519
1523
|
return;
|
|
1520
1524
|
}
|
|
@@ -1523,10 +1527,10 @@ const x = (e) => {
|
|
|
1523
1527
|
defaultItems: He,
|
|
1524
1528
|
overflowItems: Ae.filter((m) => m.type !== "separator")
|
|
1525
1529
|
};
|
|
1526
|
-
},
|
|
1530
|
+
}, mo = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"], po = () => {
|
|
1527
1531
|
let e = document.createElement("input");
|
|
1528
1532
|
e.type = "file";
|
|
1529
|
-
let s =
|
|
1533
|
+
let s = mo;
|
|
1530
1534
|
return e.accept = s.join(","), () => new Promise((n, o) => {
|
|
1531
1535
|
e.onchange = async () => {
|
|
1532
1536
|
const i = e.files;
|
|
@@ -1535,13 +1539,13 @@ const x = (e) => {
|
|
|
1535
1539
|
return n(c ? { file: c } : null);
|
|
1536
1540
|
}, e.oncancel = () => n(null), e.onerror = o, e.click();
|
|
1537
1541
|
});
|
|
1538
|
-
},
|
|
1542
|
+
}, fo = (e) => new Promise((s, t) => {
|
|
1539
1543
|
let n = new FileReader();
|
|
1540
1544
|
n.onload = (o) => s(o.target.result), n.onerror = t, setTimeout(() => n.readAsDataURL(e), 250);
|
|
1541
|
-
}),
|
|
1545
|
+
}), ho = (e, s) => new Promise((t, n) => {
|
|
1542
1546
|
const o = new window.Image();
|
|
1543
1547
|
o.onload = () => {
|
|
1544
|
-
const i = document.createElement("canvas"), { width: c, height: a } =
|
|
1548
|
+
const i = document.createElement("canvas"), { width: c, height: a } = vo(
|
|
1545
1549
|
o.width,
|
|
1546
1550
|
o.height,
|
|
1547
1551
|
s
|
|
@@ -1558,21 +1562,21 @@ const x = (e) => {
|
|
|
1558
1562
|
t({ file: u, width: c, height: a });
|
|
1559
1563
|
});
|
|
1560
1564
|
}, o.onerror = (i) => n(i), o.src = typeof e == "string" ? e : URL.createObjectURL(e);
|
|
1561
|
-
}),
|
|
1565
|
+
}), vo = (e, s, t) => {
|
|
1562
1566
|
const { width: n, height: o } = t.getMaxContentSize();
|
|
1563
1567
|
if (!n || !o) return { width: e, height: s };
|
|
1564
1568
|
let i = e, c = s;
|
|
1565
1569
|
const a = e / s;
|
|
1566
1570
|
return s > o && (c = o, i = Math.round(o * a)), i > n && (i = n, c = Math.round(n / a)), { width: i, height: c };
|
|
1567
|
-
},
|
|
1568
|
-
let n = typeof e.options.handleImageUpload == "function" ? e.options.handleImageUpload :
|
|
1571
|
+
}, go = async ({ editor: e, view: s, file: t }) => {
|
|
1572
|
+
let n = typeof e.options.handleImageUpload == "function" ? e.options.handleImageUpload : fo;
|
|
1569
1573
|
if ((t.size / (1024 * 1024)).toFixed(4) > 5) {
|
|
1570
1574
|
window.alert("Image size must be less than 5MB");
|
|
1571
1575
|
return;
|
|
1572
1576
|
}
|
|
1573
1577
|
let i, c;
|
|
1574
1578
|
try {
|
|
1575
|
-
const r = await
|
|
1579
|
+
const r = await ho(t, e);
|
|
1576
1580
|
i = r.width, c = r.height, t = r.file;
|
|
1577
1581
|
} catch (r) {
|
|
1578
1582
|
console.warn("Error processing image:", r);
|
|
@@ -1587,7 +1591,7 @@ const x = (e) => {
|
|
|
1587
1591
|
};
|
|
1588
1592
|
l.setMeta(Oe, u), s.dispatch(l), n(t).then(
|
|
1589
1593
|
(r) => {
|
|
1590
|
-
let w = t.name.replace(" ", "_"), v =
|
|
1594
|
+
let w = t.name.replace(" ", "_"), v = xt(s.state, a);
|
|
1591
1595
|
if (v == null)
|
|
1592
1596
|
return;
|
|
1593
1597
|
let b = { type: "remove", id: a }, y = `word/media/${w}`, g = d.nodes.image.create({
|
|
@@ -1604,8 +1608,8 @@ const x = (e) => {
|
|
|
1604
1608
|
}
|
|
1605
1609
|
);
|
|
1606
1610
|
};
|
|
1607
|
-
var I,
|
|
1608
|
-
class
|
|
1611
|
+
var I, rt, fe, Ve, ct, dt, Pe, ut, pe;
|
|
1612
|
+
class $o extends Xt {
|
|
1609
1613
|
/**
|
|
1610
1614
|
* Creates a new SuperToolbar instance
|
|
1611
1615
|
* @param {ToolbarConfig} config - The configuration for the toolbar
|
|
@@ -1730,8 +1734,8 @@ class Ho extends Kt {
|
|
|
1730
1734
|
* @returns {Promise<void>}
|
|
1731
1735
|
*/
|
|
1732
1736
|
startImageUpload: async (t = null) => {
|
|
1733
|
-
let o = await
|
|
1734
|
-
o?.file &&
|
|
1737
|
+
let o = await po()();
|
|
1738
|
+
o?.file && go({
|
|
1735
1739
|
editor: this.activeEditor,
|
|
1736
1740
|
view: this.activeEditor.view,
|
|
1737
1741
|
file: o.file
|
|
@@ -1746,7 +1750,7 @@ class Ho extends Kt {
|
|
|
1746
1750
|
*/
|
|
1747
1751
|
increaseTextIndent: ({ item: t, argument: n }) => {
|
|
1748
1752
|
let o = t.command, { state: i } = this.activeEditor;
|
|
1749
|
-
if (
|
|
1753
|
+
if (Xe((a) => a.type.name === "listItem")(i.selection))
|
|
1750
1754
|
return this.activeEditor.commands.increaseListIndent();
|
|
1751
1755
|
o in this.activeEditor.commands && this.activeEditor.commands[o](n);
|
|
1752
1756
|
},
|
|
@@ -1759,7 +1763,7 @@ class Ho extends Kt {
|
|
|
1759
1763
|
*/
|
|
1760
1764
|
decreaseTextIndent: ({ item: t, argument: n }) => {
|
|
1761
1765
|
let o = t.command, { state: i } = this.activeEditor;
|
|
1762
|
-
if (
|
|
1766
|
+
if (Xe((a) => a.type.name === "listItem")(i.selection))
|
|
1763
1767
|
return this.activeEditor.commands.decreaseListIndent();
|
|
1764
1768
|
o in this.activeEditor.commands && this.activeEditor.commands[o](n);
|
|
1765
1769
|
},
|
|
@@ -1807,7 +1811,7 @@ class Ho extends Kt {
|
|
|
1807
1811
|
let o = t.command;
|
|
1808
1812
|
if (o in this.activeEditor.commands) {
|
|
1809
1813
|
this.activeEditor.commands[o](n);
|
|
1810
|
-
const { view: i } = this.activeEditor, c = i.state.selection.$to.pos, a = new
|
|
1814
|
+
const { view: i } = this.activeEditor, c = i.state.selection.$to.pos, a = new Qe(i.state.doc.resolve(c)), l = i.state.tr.setSelection(a), d = i.state.apply(l);
|
|
1811
1815
|
i.updateState(d), setTimeout(() => {
|
|
1812
1816
|
i.focus();
|
|
1813
1817
|
}, 100);
|
|
@@ -1854,13 +1858,13 @@ class Ho extends Kt {
|
|
|
1854
1858
|
this.config = { ...this.config, ...t }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = t.documentMode || "editing", this.isDev = t.isDev || !1, this.superdoc = t.superdoc, this.role = t.role || "editor", this.toolbarContainer = null, this.config.editor && (this.config.mode = this.config.editor.options.mode), this.config.icons = {
|
|
1855
1859
|
...Z,
|
|
1856
1860
|
...t.icons
|
|
1857
|
-
}, this.config.hideButtons = t.hideButtons ?? !0, this.config.responsiveToContainer = t.responsiveToContainer ?? !1, !this.config.selector && this.config.element && (this.config.selector = this.config.element), this.toolbarContainer = this.getElementBySelector(this.config.selector), this.toolbarContainer && (N(this, I,
|
|
1861
|
+
}, this.config.hideButtons = t.hideButtons ?? !0, this.config.responsiveToContainer = t.responsiveToContainer ?? !1, !this.config.selector && this.config.element && (this.config.selector = this.config.element), this.toolbarContainer = this.getElementBySelector(this.config.selector), this.toolbarContainer && (N(this, I, rt).call(this), N(this, I, Ve).call(this, {
|
|
1858
1862
|
superToolbar: this,
|
|
1859
1863
|
icons: this.config.icons,
|
|
1860
1864
|
fonts: this.config.fonts,
|
|
1861
1865
|
hideButtons: this.config.hideButtons,
|
|
1862
1866
|
isDev: t.isDev
|
|
1863
|
-
}), this.app =
|
|
1867
|
+
}), this.app = Vt(qt), this.app.directive("click-outside", Rt), this.app.config.globalProperties.$toolbar = this, this.toolbarContainer && (this.toolbar = this.app.mount(this.toolbarContainer)), this.activeEditor = t.editor || null, this.updateToolbarState());
|
|
1864
1868
|
}
|
|
1865
1869
|
getElementBySelector(t) {
|
|
1866
1870
|
let n = null;
|
|
@@ -1913,14 +1917,14 @@ class Ho extends Kt {
|
|
|
1913
1917
|
* @returns {void}
|
|
1914
1918
|
*/
|
|
1915
1919
|
updateToolbarState() {
|
|
1916
|
-
if (N(this, I,
|
|
1920
|
+
if (N(this, I, ut).call(this), N(this, I, ct).call(this), N(this, I, dt).call(this), !this.activeEditor || this.documentMode === "viewing") {
|
|
1917
1921
|
N(this, I, Pe).call(this);
|
|
1918
1922
|
return;
|
|
1919
1923
|
}
|
|
1920
|
-
const t =
|
|
1924
|
+
const t = St(this.activeEditor), n = Et(this.activeEditor.state);
|
|
1921
1925
|
this.toolbarItems.forEach((o) => {
|
|
1922
1926
|
if (o.resetDisabled(), o.name.value === "linkedStyles")
|
|
1923
|
-
return this.activeEditor && !
|
|
1927
|
+
return this.activeEditor && !Je(this.activeEditor).length ? o.deactivate() : o.activate();
|
|
1924
1928
|
const i = t.find((l) => l.name === o.name.value);
|
|
1925
1929
|
i ? o.activate(i.attrs) : o.deactivate();
|
|
1926
1930
|
const c = t.find((l) => l.name === "styleId");
|
|
@@ -1983,7 +1987,7 @@ I = new WeakSet(), /**
|
|
|
1983
1987
|
* @private
|
|
1984
1988
|
* @returns {void}
|
|
1985
1989
|
*/
|
|
1986
|
-
|
|
1990
|
+
rt = function() {
|
|
1987
1991
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
1988
1992
|
}, fe = new WeakMap(), /**
|
|
1989
1993
|
* Create toolbar items based on configuration
|
|
@@ -2001,7 +2005,7 @@ Ve = function({
|
|
|
2001
2005
|
hideButtons: i,
|
|
2002
2006
|
isDev: c = !1
|
|
2003
2007
|
} = {}) {
|
|
2004
|
-
const a = document.documentElement.clientWidth, l = this.toolbarContainer.offsetWidth, d = this.config.responsiveToContainer ? l : a, { defaultItems: u, overflowItems: r } =
|
|
2008
|
+
const a = document.documentElement.clientWidth, l = this.toolbarContainer.offsetWidth, d = this.config.responsiveToContainer ? l : a, { defaultItems: u, overflowItems: r } = uo({
|
|
2005
2009
|
superToolbar: t,
|
|
2006
2010
|
toolbarIcons: n,
|
|
2007
2011
|
toolbarFonts: o,
|
|
@@ -2023,7 +2027,7 @@ Ve = function({
|
|
|
2023
2027
|
* @private
|
|
2024
2028
|
* @returns {void}
|
|
2025
2029
|
*/
|
|
2026
|
-
|
|
2030
|
+
ct = function() {
|
|
2027
2031
|
if (!this.activeEditor || !this.activeEditor.converter) return;
|
|
2028
2032
|
const { typeface: t = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, o = this.toolbarItems.find((c) => c.name.value === "fontSize");
|
|
2029
2033
|
o && (o.defaultLabel.value = n);
|
|
@@ -2034,9 +2038,9 @@ rt = function() {
|
|
|
2034
2038
|
* @private
|
|
2035
2039
|
* @returns {void}
|
|
2036
2040
|
*/
|
|
2037
|
-
|
|
2041
|
+
dt = function() {
|
|
2038
2042
|
if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
|
|
2039
|
-
const t = this.toolbarItems.find((a) => a.name.value === "highlight"), n =
|
|
2043
|
+
const t = this.toolbarItems.find((a) => a.name.value === "highlight"), n = jn(), o = 7, i = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, l, d) => {
|
|
2040
2044
|
const u = Math.floor(d / o);
|
|
2041
2045
|
return a[u] || (a[u] = []), n.includes(l) || a[u].push(f(l)), a;
|
|
2042
2046
|
}, []), c = {
|
|
@@ -2060,8 +2064,8 @@ Pe = function() {
|
|
|
2060
2064
|
* @private
|
|
2061
2065
|
* @returns {void}
|
|
2062
2066
|
*/
|
|
2063
|
-
|
|
2064
|
-
this.activeEditor && (this.undoDepth =
|
|
2067
|
+
ut = function() {
|
|
2068
|
+
this.activeEditor && (this.undoDepth = At(this.activeEditor.state), this.redoDepth = Tt(this.activeEditor.state));
|
|
2065
2069
|
}, /**
|
|
2066
2070
|
* Run a command that requires an argument
|
|
2067
2071
|
* @private
|
|
@@ -2082,7 +2086,7 @@ pe = function({ item: t, argument: n, noArgumentCallback: o = !1 }, i) {
|
|
|
2082
2086
|
}
|
|
2083
2087
|
c in this.activeEditor?.commands && (this.activeEditor.commands[c](n), typeof i == "function" && i(n), this.updateToolbarState());
|
|
2084
2088
|
};
|
|
2085
|
-
function
|
|
2089
|
+
function bo(e, s) {
|
|
2086
2090
|
if (!e.value || !s?.value?.options?.scale) return;
|
|
2087
2091
|
const t = s.value.options.scale, n = e.value.getBoundingClientRect(), o = e.value.querySelectorAll(".pagination-break-wrapper");
|
|
2088
2092
|
let i;
|
|
@@ -2094,7 +2098,7 @@ function go(e, s) {
|
|
|
2094
2098
|
}
|
|
2095
2099
|
});
|
|
2096
2100
|
}
|
|
2097
|
-
const
|
|
2101
|
+
const yo = (e, s) => {
|
|
2098
2102
|
const t = e.clientY, n = e.clientX, { view: o } = s, i = o.dom.getBoundingClientRect();
|
|
2099
2103
|
let c = {
|
|
2100
2104
|
left: 0,
|
|
@@ -2109,11 +2113,11 @@ const bo = (e, s) => {
|
|
|
2109
2113
|
d = v?.isText && y !== " " ? l - 1 : l;
|
|
2110
2114
|
}
|
|
2111
2115
|
const u = o.state.tr.setSelection(
|
|
2112
|
-
|
|
2116
|
+
Qe.create(o.state.doc, d)
|
|
2113
2117
|
);
|
|
2114
2118
|
o.dispatch(u), o.focus();
|
|
2115
2119
|
}
|
|
2116
|
-
},
|
|
2120
|
+
}, wo = { class: "numbering" }, Fe = 200, Co = "flex-end", ko = {
|
|
2117
2121
|
__name: "Ruler",
|
|
2118
2122
|
props: {
|
|
2119
2123
|
orientation: {
|
|
@@ -2131,7 +2135,7 @@ const bo = (e, s) => {
|
|
|
2131
2135
|
},
|
|
2132
2136
|
emits: ["margin-change"],
|
|
2133
2137
|
setup(e, { emit: s }) {
|
|
2134
|
-
const t = s, n = e, o = h(null), i = h([]), c = h("#CCCCCC"), a = h("#2563EB66"), l = h(null), d = h(null), u = h(!1), r = h(null), w =
|
|
2138
|
+
const t = s, n = e, o = h(null), i = h([]), c = h("#CCCCCC"), a = h("#2563EB66"), l = h(null), d = h(null), u = h(!1), r = h(null), w = Ze({ side: "left", x: 0 }), v = Ze({ side: "right", x: 0 }), b = h(!1), y = h(0);
|
|
2135
2139
|
let g = 0;
|
|
2136
2140
|
const L = () => {
|
|
2137
2141
|
if (n.editor.options.mode !== "docx") return;
|
|
@@ -2175,7 +2179,7 @@ const bo = (e, s) => {
|
|
|
2175
2179
|
if (!u.value) return;
|
|
2176
2180
|
const B = T.clientX - g;
|
|
2177
2181
|
r.value.x = B, r.value.side === "left" ? B <= 0 ? r.value.x = 0 : B >= v.x - Fe && (r.value.x = v.x - Fe) : B >= l.value.width * 96 ? r.value.x = l.value.width * 96 : B <= w.x + Fe && (r.value.x = w.x + Fe);
|
|
2178
|
-
},
|
|
2182
|
+
}, oe = () => {
|
|
2179
2183
|
if (u.value = !1, b.value = !1, ve(), r.value && r.value.x !== y.value) {
|
|
2180
2184
|
const T = ge();
|
|
2181
2185
|
t("margin-change", {
|
|
@@ -2188,14 +2192,14 @@ const bo = (e, s) => {
|
|
|
2188
2192
|
}, ve = () => {
|
|
2189
2193
|
c.value = "#CCC";
|
|
2190
2194
|
}, ge = () => r.value.side === "left" ? r.value.x / 96 : (l.value.width * 96 - r.value.x) / 96, Y = j(() => ({
|
|
2191
|
-
"--alignment":
|
|
2195
|
+
"--alignment": Co,
|
|
2192
2196
|
"--ruler-handle-color": c.value,
|
|
2193
2197
|
"--ruler-handle-active-color": a.value
|
|
2194
2198
|
}));
|
|
2195
2199
|
return Ce(() => {
|
|
2196
|
-
i.value = L(), window.addEventListener("mousemove", W), window.addEventListener("mouseup",
|
|
2197
|
-
}),
|
|
2198
|
-
window.removeEventListener("mousemove", W), window.removeEventListener("mouseup",
|
|
2200
|
+
i.value = L(), window.addEventListener("mousemove", W), window.addEventListener("mouseup", oe);
|
|
2201
|
+
}), Pt(() => {
|
|
2202
|
+
window.removeEventListener("mousemove", W), window.removeEventListener("mouseup", oe);
|
|
2199
2203
|
}), (T, B) => (C(), k("div", {
|
|
2200
2204
|
class: "ruler",
|
|
2201
2205
|
ref_key: "ruler",
|
|
@@ -2219,27 +2223,27 @@ const bo = (e, s) => {
|
|
|
2219
2223
|
class: "vertical-indicator",
|
|
2220
2224
|
style: Q(F.value)
|
|
2221
2225
|
}, null, 4)) : ee("", !0),
|
|
2222
|
-
(C(!0), k(U, null,
|
|
2223
|
-
class:
|
|
2226
|
+
(C(!0), k(U, null, ne(i.value, (H) => (C(), k("div", {
|
|
2227
|
+
class: te(H.className),
|
|
2224
2228
|
style: Q(p.value(H))
|
|
2225
2229
|
}, [
|
|
2226
|
-
_("div",
|
|
2227
|
-
(C(!0), k(U, null,
|
|
2228
|
-
class:
|
|
2230
|
+
_("div", wo, ie(H.numbering), 1),
|
|
2231
|
+
(C(!0), k(U, null, ne(H.elements, (z) => (C(), k("div", {
|
|
2232
|
+
class: te(z.className),
|
|
2229
2233
|
style: Q(p.value(z))
|
|
2230
2234
|
}, [
|
|
2231
|
-
(C(!0), k(U, null,
|
|
2232
|
-
class:
|
|
2235
|
+
(C(!0), k(U, null, ne(z.elements, (G) => (C(), k("div", {
|
|
2236
|
+
class: te(G.className),
|
|
2233
2237
|
style: Q(p.value(G))
|
|
2234
2238
|
}, null, 6))), 256))
|
|
2235
2239
|
], 6))), 256))
|
|
2236
2240
|
], 6))), 256))
|
|
2237
2241
|
], 4));
|
|
2238
2242
|
}
|
|
2239
|
-
},
|
|
2243
|
+
}, _o = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-ad77036c"]]), xo = { class: "super-editor-container" }, So = {
|
|
2240
2244
|
key: 1,
|
|
2241
2245
|
class: "placeholder-editor"
|
|
2242
|
-
},
|
|
2246
|
+
}, Eo = { class: "placeholder-title" }, Ao = {
|
|
2243
2247
|
__name: "SuperEditor",
|
|
2244
2248
|
props: {
|
|
2245
2249
|
documentId: {
|
|
@@ -2269,14 +2273,14 @@ const bo = (e, s) => {
|
|
|
2269
2273
|
"selection-update"
|
|
2270
2274
|
],
|
|
2271
2275
|
setup(e, { emit: s }) {
|
|
2272
|
-
const t = s, n = e, o = h(!1), i =
|
|
2276
|
+
const t = s, n = e, o = h(!1), i = it(null), c = h(null), a = h(null);
|
|
2273
2277
|
let l;
|
|
2274
2278
|
const d = () => {
|
|
2275
2279
|
clearTimeout(l);
|
|
2276
2280
|
}, u = (p, S = 10, F = 500) => {
|
|
2277
2281
|
const O = p.getMap("meta"), W = () => {
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2282
|
+
const oe = O.get("docx");
|
|
2283
|
+
oe ? (d(), b({ content: oe })) : S > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${S}`), l = setTimeout(W, F), S--) : console.warn("Failed to load docx data from meta map.");
|
|
2280
2284
|
};
|
|
2281
2285
|
W();
|
|
2282
2286
|
}, r = async () => {
|
|
@@ -2298,7 +2302,7 @@ const bo = (e, s) => {
|
|
|
2298
2302
|
S.on("synced", F);
|
|
2299
2303
|
}
|
|
2300
2304
|
}, v = () => {
|
|
2301
|
-
const p =
|
|
2305
|
+
const p = Ft();
|
|
2302
2306
|
return n.options.pagination ? p : p.filter((S) => S.name !== "pagination");
|
|
2303
2307
|
}, b = async ({ content: p, media: S = {}, mediaFiles: F = {}, fonts: O = {} } = {}) => {
|
|
2304
2308
|
i.value = new Ne({
|
|
@@ -2314,7 +2318,7 @@ const bo = (e, s) => {
|
|
|
2314
2318
|
fonts: O,
|
|
2315
2319
|
...n.options
|
|
2316
2320
|
}), i.value.on("paginationUpdate", () => {
|
|
2317
|
-
|
|
2321
|
+
bo(a, i);
|
|
2318
2322
|
}), i.value.on("collaborationReady", () => {
|
|
2319
2323
|
setTimeout(() => {
|
|
2320
2324
|
o.value = !0;
|
|
@@ -2333,16 +2337,16 @@ const bo = (e, s) => {
|
|
|
2333
2337
|
w(), (n.options?.suppressSkeletonLoader || !n.options?.collaborationProvider) && (o.value = !0);
|
|
2334
2338
|
});
|
|
2335
2339
|
const L = (p) => {
|
|
2336
|
-
p.target.classList.contains("ProseMirror") ||
|
|
2340
|
+
p.target.classList.contains("ProseMirror") || yo(p, i.value);
|
|
2337
2341
|
}, D = ({ side: p, value: S }) => {
|
|
2338
2342
|
if (!i.value) return;
|
|
2339
2343
|
const F = i.value.getPageStyles(), { pageMargins: O } = F, W = { ...O, [p]: S };
|
|
2340
2344
|
i.value?.updatePageStyle({ pageMargins: W });
|
|
2341
2345
|
};
|
|
2342
|
-
return
|
|
2346
|
+
return st(() => {
|
|
2343
2347
|
d(), i.value?.destroy(), i.value = null;
|
|
2344
|
-
}), (p, S) => (C(), k("div",
|
|
2345
|
-
e.options.rulers && i.value ? (C(),
|
|
2348
|
+
}), (p, S) => (C(), k("div", xo, [
|
|
2349
|
+
e.options.rulers && i.value ? (C(), jt(_o, {
|
|
2346
2350
|
key: 0,
|
|
2347
2351
|
class: "ruler",
|
|
2348
2352
|
editor: i.value,
|
|
@@ -2362,8 +2366,8 @@ const bo = (e, s) => {
|
|
|
2362
2366
|
class: "editor-element super-editor__element"
|
|
2363
2367
|
}, null, 512)
|
|
2364
2368
|
], 544),
|
|
2365
|
-
o.value ? ee("", !0) : (C(), k("div",
|
|
2366
|
-
_("div",
|
|
2369
|
+
o.value ? ee("", !0) : (C(), k("div", So, [
|
|
2370
|
+
_("div", Eo, [
|
|
2367
2371
|
P(M(J), {
|
|
2368
2372
|
text: "",
|
|
2369
2373
|
style: { width: "60%" }
|
|
@@ -2409,7 +2413,7 @@ const bo = (e, s) => {
|
|
|
2409
2413
|
]))
|
|
2410
2414
|
]));
|
|
2411
2415
|
}
|
|
2412
|
-
},
|
|
2416
|
+
}, zo = /* @__PURE__ */ q(Ao, [["__scopeId", "data-v-ff8f86f4"]]), Ro = {
|
|
2413
2417
|
__name: "BasicUpload",
|
|
2414
2418
|
emits: ["file-change"],
|
|
2415
2419
|
setup(e, { emit: s }) {
|
|
@@ -2425,7 +2429,7 @@ const bo = (e, s) => {
|
|
|
2425
2429
|
}, null, 32)
|
|
2426
2430
|
]));
|
|
2427
2431
|
}
|
|
2428
|
-
},
|
|
2432
|
+
}, To = ["innerHTML"], Fo = {
|
|
2429
2433
|
__name: "SuperInput",
|
|
2430
2434
|
props: {
|
|
2431
2435
|
modelValue: {
|
|
@@ -2449,7 +2453,7 @@ const bo = (e, s) => {
|
|
|
2449
2453
|
},
|
|
2450
2454
|
emits: ["update:modelValue", "focus", "blur"],
|
|
2451
2455
|
setup(e, { emit: s }) {
|
|
2452
|
-
const t = s, n = e, o =
|
|
2456
|
+
const t = s, n = e, o = it(), i = h(null), c = h(!1), a = ({ editor: v, transaction: b }) => {
|
|
2453
2457
|
const y = v.getHTML();
|
|
2454
2458
|
t("update:modelValue", y);
|
|
2455
2459
|
}, l = ({ editor: v, transaction: b }) => {
|
|
@@ -2457,11 +2461,11 @@ const bo = (e, s) => {
|
|
|
2457
2461
|
}, d = ({ editor: v, transaction: b }) => {
|
|
2458
2462
|
c.value = !1, t("blur", { editor: v, transaction: b });
|
|
2459
2463
|
}, u = async () => {
|
|
2460
|
-
|
|
2464
|
+
It.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction = a, n.options.onFocus = l, n.options.onBlur = d, o.value = new Ne({
|
|
2461
2465
|
mode: "text",
|
|
2462
2466
|
content: document.getElementById("currentContent"),
|
|
2463
2467
|
element: i.value,
|
|
2464
|
-
extensions:
|
|
2468
|
+
extensions: Lt(),
|
|
2465
2469
|
users: n.users,
|
|
2466
2470
|
...n.options
|
|
2467
2471
|
});
|
|
@@ -2472,17 +2476,17 @@ const bo = (e, s) => {
|
|
|
2472
2476
|
};
|
|
2473
2477
|
return Ce(() => {
|
|
2474
2478
|
u();
|
|
2475
|
-
}),
|
|
2479
|
+
}), st(() => {
|
|
2476
2480
|
o.value?.destroy(), o.value = null;
|
|
2477
2481
|
}), (v, b) => (C(), k("div", {
|
|
2478
|
-
class:
|
|
2482
|
+
class: te(["super-editor super-input", { "super-input-active": c.value }]),
|
|
2479
2483
|
onClick: he(r, ["stop", "prevent"])
|
|
2480
2484
|
}, [
|
|
2481
2485
|
_("div", {
|
|
2482
2486
|
id: "currentContent",
|
|
2483
2487
|
style: { display: "none" },
|
|
2484
2488
|
innerHTML: e.modelValue
|
|
2485
|
-
}, null, 8,
|
|
2489
|
+
}, null, 8, To),
|
|
2486
2490
|
_("div", {
|
|
2487
2491
|
ref_key: "editorElem",
|
|
2488
2492
|
ref: i,
|
|
@@ -2490,33 +2494,33 @@ const bo = (e, s) => {
|
|
|
2490
2494
|
}, null, 512)
|
|
2491
2495
|
], 2));
|
|
2492
2496
|
}
|
|
2493
|
-
},
|
|
2494
|
-
Node:
|
|
2495
|
-
Attribute:
|
|
2496
|
-
Extension:
|
|
2497
|
-
Plugin:
|
|
2498
|
-
Mark:
|
|
2497
|
+
}, Oo = /* @__PURE__ */ q(Fo, [["__scopeId", "data-v-4d5cff52"]]), No = {
|
|
2498
|
+
Node: Ht,
|
|
2499
|
+
Attribute: Bt,
|
|
2500
|
+
Extension: Dt,
|
|
2501
|
+
Plugin: Ot,
|
|
2502
|
+
Mark: Mt
|
|
2499
2503
|
};
|
|
2500
2504
|
export {
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
+
Gt as AIWriter,
|
|
2506
|
+
Ro as BasicUpload,
|
|
2507
|
+
Po as CommentsPluginKey,
|
|
2508
|
+
Jo as DocxZipper,
|
|
2505
2509
|
Ne as Editor,
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2510
|
+
No as Extensions,
|
|
2511
|
+
Zo as SuperConverter,
|
|
2512
|
+
zo as SuperEditor,
|
|
2513
|
+
Oo as SuperInput,
|
|
2514
|
+
$o as SuperToolbar,
|
|
2515
|
+
qt as Toolbar,
|
|
2516
|
+
jo as TrackChangesBasePluginKey,
|
|
2517
|
+
ei as createZip,
|
|
2518
|
+
Uo as fieldAnnotationHelpers,
|
|
2519
|
+
St as getActiveFormatting,
|
|
2520
|
+
vo as getAllowedImageDimensions,
|
|
2521
|
+
qo as getMarksFromSelection,
|
|
2522
|
+
Lt as getRichTextExtensions,
|
|
2523
|
+
Ft as getStarterExtensions,
|
|
2524
|
+
Go as helpers,
|
|
2525
|
+
Ko as trackChangesHelpers
|
|
2522
2526
|
};
|