@harbour-enterprises/superdoc 0.10.34 → 0.10.35
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/{index-BXKGjuVW.cjs → index-C4-w9MLl.cjs} +1 -1
- package/dist/chunks/{index-C3fK1Y-u.es.js → index-CdQWSv8b.es.js} +1 -1
- package/dist/chunks/{index-CqRwYOdx.cjs → index-ChNh-3hE.cjs} +1 -1
- package/dist/chunks/{index-B_4G-Rse.es.js → index-DOBxSDrW.es.js} +2 -2
- package/dist/chunks/{super-editor.es-C8dsGkpp.es.js → super-editor.es-Dkwq9xo6.es.js} +64 -45
- package/dist/chunks/{super-editor.es-mU7XJaA2.cjs → super-editor.es-GMoDySBi.cjs} +5 -5
- package/dist/chunks/{url-6Xu7gR4T.cjs → url-CzUL97Mg.cjs} +1 -1
- package/dist/chunks/{url-D6ObD5O4.es.js → url-Dsvro-99.es.js} +1 -1
- package/dist/chunks/{xml-js-BYiAO46K.es.js → xml-js-Buzt-6J1.es.js} +303 -296
- package/dist/chunks/xml-js-zfoNze4t.cjs +10 -0
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{converter-BoD3UL-D.js → converter-DgikIv5V.js} +7 -6
- package/dist/super-editor/chunks/{docx-zipper-CdQcoemq.js → docx-zipper-DzgWW0Ro.js} +1 -1
- package/dist/super-editor/chunks/{editor-BOOEq-l-.js → editor-CmKj3RqN.js} +40 -37
- package/dist/super-editor/chunks/{toolbar-MODX2iiO.js → toolbar-D3QDJobB.js} +2 -2
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/helpers.d.ts +5 -1
- package/dist/super-editor/core/super-converter/helpers.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +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/extensions/line-height/line-height.d.ts.map +1 -1
- package/dist/super-editor/extensions/linked-styles/linked-styles.d.ts +2 -5
- package/dist/super-editor/extensions/linked-styles/linked-styles.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +396 -381
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +5 -5
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +421 -402
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-zhwNEV5e.cjs +0 -10
package/dist/superdoc.umd.js
CHANGED
|
@@ -16673,9 +16673,9 @@ Actual: ` + p3.attribValue
|
|
|
16673
16673
|
}
|
|
16674
16674
|
function Tp$1(r22, e, t = null, n = r22) {
|
|
16675
16675
|
let i3 = cf$2(r22, e), s = i3 && ff$1(n, e);
|
|
16676
|
-
return s ? i3.map(wo$
|
|
16676
|
+
return s ? i3.map(wo$3).concat({ type: e, attrs: t }).concat(s.map(wo$3)) : null;
|
|
16677
16677
|
}
|
|
16678
|
-
function wo$
|
|
16678
|
+
function wo$3(r22) {
|
|
16679
16679
|
return { type: r22, attrs: null };
|
|
16680
16680
|
}
|
|
16681
16681
|
function cf$2(r22, e) {
|
|
@@ -18403,9 +18403,9 @@ Actual: ` + p3.attribValue
|
|
|
18403
18403
|
const Hf$2 = (r22) => {
|
|
18404
18404
|
const e = Number(r22).toString(16);
|
|
18405
18405
|
return e.length === 1 ? "0" + e : e;
|
|
18406
|
-
}, Vf$1 = (r22) => "#" + r22.match(/\d+/g).map(Hf$2).join(""), zp$1 = (r22, e) => {
|
|
18407
|
-
let [
|
|
18408
|
-
return Number.isNaN(
|
|
18406
|
+
}, Vf$1 = (r22) => "#" + r22.match(/\d+/g).map(Hf$2).join(""), zp$1 = (r22, e, t = "", n = false) => {
|
|
18407
|
+
let [i3, s] = Lf$1(r22);
|
|
18408
|
+
return Number.isNaN(i3) || i3 === 0 ? {} : t === "atLeast" && i3 < 1 ? {} : (s = s || e, i3 += s ? 4 : 0.2, n ? { "line-height": `${i3}${s}` } : `line-height: ${i3}${s}`);
|
|
18409
18409
|
}, zf$1 = (r22, e) => {
|
|
18410
18410
|
const t = new Uint8Array(r22), n = e.replace(/[-{}]/g, "");
|
|
18411
18411
|
if (n.length !== 32) {
|
|
@@ -21984,7 +21984,7 @@ Actual: ` + p3.attribValue
|
|
|
21984
21984
|
})
|
|
21985
21985
|
};
|
|
21986
21986
|
}
|
|
21987
|
-
function ko$
|
|
21987
|
+
function ko$2(r22, e) {
|
|
21988
21988
|
return lu$2(r22, e);
|
|
21989
21989
|
}
|
|
21990
21990
|
function Vd$2(r22) {
|
|
@@ -22011,8 +22011,8 @@ Actual: ` + p3.attribValue
|
|
|
22011
22011
|
};
|
|
22012
22012
|
return {
|
|
22013
22013
|
text: cu$2,
|
|
22014
|
-
image: (i3) => ko$
|
|
22015
|
-
signature: (i3) => ko$
|
|
22014
|
+
image: (i3) => ko$2(i3, e),
|
|
22015
|
+
signature: (i3) => ko$2(i3, t),
|
|
22016
22016
|
checkbox: jd$2,
|
|
22017
22017
|
html: Hd$2,
|
|
22018
22018
|
link: Vd$2
|
|
@@ -22741,7 +22741,8 @@ Actual: ` + p3.attribValue
|
|
|
22741
22741
|
...v,
|
|
22742
22742
|
attrs: {
|
|
22743
22743
|
textAlign: ee2?.attrs.textAlign || Z3?.attrs.textAlign || null,
|
|
22744
|
-
rsidRDefault: q3?.["w:rsidRDefault"] || null
|
|
22744
|
+
rsidRDefault: q3?.["w:rsidRDefault"] || null,
|
|
22745
|
+
styleId: w
|
|
22745
22746
|
},
|
|
22746
22747
|
content: gu$1(v.content)
|
|
22747
22748
|
}), N3.push(v), I3 = n;
|
|
@@ -23822,7 +23823,7 @@ Actual: ` + p3.attribValue
|
|
|
23822
23823
|
return;
|
|
23823
23824
|
}
|
|
23824
23825
|
}
|
|
23825
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.10.
|
|
23826
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.10.35") {
|
|
23826
23827
|
const n = "docProps/custom.xml";
|
|
23827
23828
|
e[n] || (e[n] = Bu$2());
|
|
23828
23829
|
const i3 = e["docProps/custom.xml"];
|
|
@@ -24083,7 +24084,7 @@ Actual: ` + p3.attribValue
|
|
|
24083
24084
|
function Bu$2() {
|
|
24084
24085
|
return Wf$2;
|
|
24085
24086
|
}
|
|
24086
|
-
function ku$2(r22 = 2, e = "0.10.
|
|
24087
|
+
function ku$2(r22 = 2, e = "0.10.35") {
|
|
24087
24088
|
return {
|
|
24088
24089
|
type: "element",
|
|
24089
24090
|
name: "property",
|
|
@@ -29482,7 +29483,7 @@ Actual: ` + p3.attribValue
|
|
|
29482
29483
|
return false;
|
|
29483
29484
|
return true;
|
|
29484
29485
|
}
|
|
29485
|
-
let wo$
|
|
29486
|
+
let wo$2 = class wo2 {
|
|
29486
29487
|
constructor(e, n) {
|
|
29487
29488
|
this.toDOM = e, this.spec = n || nn$2, this.side = this.spec.side || 0;
|
|
29488
29489
|
}
|
|
@@ -29575,7 +29576,7 @@ Actual: ` + p3.attribValue
|
|
|
29575
29576
|
widget's current document position.
|
|
29576
29577
|
*/
|
|
29577
29578
|
static widget(e, n, r) {
|
|
29578
|
-
return new $3(e, e, new wo$
|
|
29579
|
+
return new $3(e, e, new wo$2(n, r));
|
|
29579
29580
|
}
|
|
29580
29581
|
/**
|
|
29581
29582
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -29609,7 +29610,7 @@ Actual: ` + p3.attribValue
|
|
|
29609
29610
|
@internal
|
|
29610
29611
|
*/
|
|
29611
29612
|
get widget() {
|
|
29612
|
-
return this.type instanceof wo$
|
|
29613
|
+
return this.type instanceof wo$2;
|
|
29613
29614
|
}
|
|
29614
29615
|
};
|
|
29615
29616
|
const Sn$2 = [], nn$2 = {};
|
|
@@ -31098,7 +31099,7 @@ Actual: ` + p3.attribValue
|
|
|
31098
31099
|
}, jm = (t) => $m(Hm(Bm(Vm(t)))), Wm = () => ({
|
|
31099
31100
|
mapping: /* @__PURE__ */ new Map(),
|
|
31100
31101
|
isOMark: /* @__PURE__ */ new Map()
|
|
31101
|
-
}), ko$
|
|
31102
|
+
}), ko$1 = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
|
|
31102
31103
|
e.sv.get(t.id.client) > t.id.clock && !T__namespace.isDeleted(e.ds, t.id), Um = [{ light: "#ecd44433", dark: "#ecd444" }], qm = (t, e, n) => {
|
|
31103
31104
|
if (!t.has(n)) {
|
|
31104
31105
|
if (t.size < e.length) {
|
|
@@ -31358,7 +31359,7 @@ Actual: ` + p3.attribValue
|
|
|
31358
31359
|
}, c3 = T__namespace.typeListToArraySnapshot(
|
|
31359
31360
|
i3,
|
|
31360
31361
|
new T__namespace.Snapshot(n.ds, e.sv)
|
|
31361
|
-
).map((u) => !u._item.deleted || ko$
|
|
31362
|
+
).map((u) => !u._item.deleted || ko$1(u._item, e) || ko$1(u._item, n) ? or$1(
|
|
31362
31363
|
u,
|
|
31363
31364
|
this.prosemirrorView.state.schema,
|
|
31364
31365
|
{ mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
|
|
@@ -31498,11 +31499,11 @@ Actual: ` + p3.attribValue
|
|
|
31498
31499
|
r === void 0 || o === void 0 ? t.toArray().forEach(a) : T__namespace.typeListToArraySnapshot(t, new T__namespace.Snapshot(o.ds, r.sv)).forEach(a);
|
|
31499
31500
|
try {
|
|
31500
31501
|
const l = t.getAttributes(r);
|
|
31501
|
-
r !== void 0 && (ko$
|
|
31502
|
+
r !== void 0 && (ko$1(
|
|
31502
31503
|
/** @type {Y.Item} */
|
|
31503
31504
|
t._item,
|
|
31504
31505
|
r
|
|
31505
|
-
) ? ko$
|
|
31506
|
+
) ? ko$1(
|
|
31506
31507
|
/** @type {Y.Item} */
|
|
31507
31508
|
t._item,
|
|
31508
31509
|
o
|
|
@@ -36583,7 +36584,7 @@ Actual: ` + p3.attribValue
|
|
|
36583
36584
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
36584
36585
|
*/
|
|
36585
36586
|
processCollaborationMigrations() {
|
|
36586
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.
|
|
36587
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.35"), !this.options.ydoc) return;
|
|
36587
36588
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
36588
36589
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
36589
36590
|
const o = ol$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
|
|
@@ -37105,7 +37106,7 @@ Actual: ` + p3.attribValue
|
|
|
37105
37106
|
lineHeight: {
|
|
37106
37107
|
default: null,
|
|
37107
37108
|
parseDOM: (t) => t.style.lineHeight,
|
|
37108
|
-
renderDOM: (t) => t.lineHeight ? { style: zp$1(t.lineHeight, this.options.defaults.unit) } : {}
|
|
37109
|
+
renderDOM: (t) => t.lineHeight ? { style: zp$1(t.lineHeight, this.options.defaults.unit, t.spacing?.lineRule) } : {}
|
|
37109
37110
|
}
|
|
37110
37111
|
}
|
|
37111
37112
|
}
|
|
@@ -38429,7 +38430,7 @@ Actual: ` + p3.attribValue
|
|
|
38429
38430
|
const o = t.converter?.linkedStyles || [];
|
|
38430
38431
|
return {
|
|
38431
38432
|
styles: o,
|
|
38432
|
-
decorations: dl$1(t.state
|
|
38433
|
+
decorations: dl$1(t.state, o)
|
|
38433
38434
|
};
|
|
38434
38435
|
},
|
|
38435
38436
|
apply(e, n, r, o) {
|
|
@@ -38437,7 +38438,7 @@ Actual: ` + p3.attribValue
|
|
|
38437
38438
|
let i3 = n.decorations || L.empty;
|
|
38438
38439
|
if (e.docChanged) {
|
|
38439
38440
|
const s = ao$2.getState(t.state).styles;
|
|
38440
|
-
i3 = dl$1(o
|
|
38441
|
+
i3 = dl$1(o, s);
|
|
38441
38442
|
}
|
|
38442
38443
|
return { ...n, decorations: i3 };
|
|
38443
38444
|
}
|
|
@@ -38450,47 +38451,50 @@ Actual: ` + p3.attribValue
|
|
|
38450
38451
|
}), dl$1 = (t, e) => {
|
|
38451
38452
|
const n = [];
|
|
38452
38453
|
let r = null;
|
|
38453
|
-
|
|
38454
|
-
|
|
38455
|
-
|
|
38456
|
-
|
|
38457
|
-
|
|
38458
|
-
const l = i0$1(a, o);
|
|
38454
|
+
const o = t?.doc;
|
|
38455
|
+
return o.descendants((i3, s) => {
|
|
38456
|
+
const { name: a } = i3.type;
|
|
38457
|
+
if (i3?.attrs?.styleId && (r = i3.attrs.styleId), a === "paragraph" && !i3.attrs?.styleId && (r = null), a !== "text") return;
|
|
38458
|
+
const l = s0$1(r, e);
|
|
38459
38459
|
if (!l) return;
|
|
38460
|
-
const
|
|
38461
|
-
|
|
38462
|
-
|
|
38463
|
-
|
|
38460
|
+
const d = t.doc.resolve(s).parent, u = i0$1(l, i3, d);
|
|
38461
|
+
if (!u) return;
|
|
38462
|
+
const f3 = $$1.inline(s, s + i3.nodeSize, { style: u });
|
|
38463
|
+
n.push(f3);
|
|
38464
|
+
}), L.create(o, n);
|
|
38465
|
+
}, i0$1 = (t, e, n, r = true) => {
|
|
38464
38466
|
if (!t?.definition?.styles) return "";
|
|
38465
|
-
const
|
|
38466
|
-
return Object.entries(t.definition.styles).forEach(([
|
|
38467
|
-
const
|
|
38468
|
-
|
|
38469
|
-
if (
|
|
38470
|
-
Object.entries(
|
|
38471
|
-
const
|
|
38472
|
-
|
|
38467
|
+
const o = {};
|
|
38468
|
+
return Object.entries(t.definition.styles).forEach(([i3, s]) => {
|
|
38469
|
+
const a = Qa$2(i3), l = [];
|
|
38470
|
+
e?.marks?.forEach((f3) => {
|
|
38471
|
+
if (f3.type.name === "textStyle") {
|
|
38472
|
+
Object.entries(f3.attrs).forEach(([p3, h3]) => {
|
|
38473
|
+
const m = Qa$2(p3);
|
|
38474
|
+
h3 && l.push({ key: m, value: h3 });
|
|
38473
38475
|
});
|
|
38474
38476
|
return;
|
|
38475
38477
|
}
|
|
38476
|
-
|
|
38477
|
-
})
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38478
|
+
l.push({ key: f3.type.name, value: f3.attrs[a] });
|
|
38479
|
+
});
|
|
38480
|
+
const c3 = l.find((f3) => f3.key === a), d = Object.keys(n?.attrs.indent || {}), u = Object.keys(n?.attrs.spacing || {});
|
|
38481
|
+
if (!c3)
|
|
38482
|
+
if (a === "spacing" && r && !u) {
|
|
38483
|
+
const f3 = a0$1(s);
|
|
38484
|
+
Object.entries(f3).forEach(([p3, h3]) => {
|
|
38485
|
+
o[p3] = h3;
|
|
38482
38486
|
});
|
|
38483
|
-
} else if (
|
|
38484
|
-
const { leftIndent:
|
|
38485
|
-
|
|
38486
|
-
} else
|
|
38487
|
-
}), Object.entries(
|
|
38487
|
+
} else if (a === "indent" && r && !d) {
|
|
38488
|
+
const { leftIndent: f3, rightIndent: p3, firstLine: h3 } = s;
|
|
38489
|
+
f3 && (o["margin-left"] = f3 + "px"), p3 && (o["margin-right"] = p3 + "px"), h3 && (o["text-indent"] = h3 + "px");
|
|
38490
|
+
} else a === "bold" ? o["font-weight"] = "bold" : o[a] = s;
|
|
38491
|
+
}), Object.entries(o).map(([i3, s]) => `${i3}: ${s}`).join(";");
|
|
38488
38492
|
}, s0$1 = (t, e = []) => e.find((n) => n.id === t), a0$1 = (t) => {
|
|
38489
|
-
const { lineSpaceBefore: e, lineSpaceAfter: n, line: r } = t;
|
|
38493
|
+
const { lineSpaceBefore: e, lineSpaceAfter: n, line: r, lineRule: o } = t;
|
|
38490
38494
|
return {
|
|
38491
38495
|
"margin-top": e + "px",
|
|
38492
38496
|
"margin-bottom": n + "px",
|
|
38493
|
-
...zp$1(r, "")
|
|
38497
|
+
...zp$1(r, "", o, true)
|
|
38494
38498
|
};
|
|
38495
38499
|
}, l0$1 = (t) => {
|
|
38496
38500
|
const { lineSpaceBefore: e, lineSpaceAfter: n, line: r } = t;
|
|
@@ -47485,7 +47489,7 @@ ${t}
|
|
|
47485
47489
|
this.elHandlersMap.has(t) && (this.elHandlersMap.delete(t), this.observer.unobserve(t));
|
|
47486
47490
|
}
|
|
47487
47491
|
}
|
|
47488
|
-
const bo = new Zc(), wo = /* @__PURE__ */ defineComponent({
|
|
47492
|
+
const bo = new Zc(), wo$1 = /* @__PURE__ */ defineComponent({
|
|
47489
47493
|
name: "ResizeObserver",
|
|
47490
47494
|
props: {
|
|
47491
47495
|
onResize: Function
|
|
@@ -48401,8 +48405,8 @@ ${t}
|
|
|
48401
48405
|
function Hf() {
|
|
48402
48406
|
return [];
|
|
48403
48407
|
}
|
|
48404
|
-
var jf = Object.prototype, Wf = jf.propertyIsEnumerable, ko
|
|
48405
|
-
return e == null ? [] : (e = Object(e), Nf(ko
|
|
48408
|
+
var jf = Object.prototype, Wf = jf.propertyIsEnumerable, ko = Object.getOwnPropertySymbols, Kf = ko ? function(e) {
|
|
48409
|
+
return e == null ? [] : (e = Object(e), Nf(ko(e), function(t) {
|
|
48406
48410
|
return Wf.call(e, t);
|
|
48407
48411
|
}));
|
|
48408
48412
|
} : Hf;
|
|
@@ -49679,7 +49683,7 @@ ${t}
|
|
|
49679
49683
|
style: this.containerStyle,
|
|
49680
49684
|
onScroll: this.handleScroll,
|
|
49681
49685
|
onWheel: this.onWheel
|
|
49682
|
-
}, h(wo, {
|
|
49686
|
+
}, h(wo$1, {
|
|
49683
49687
|
onResize: this.handleContentResize
|
|
49684
49688
|
}, {
|
|
49685
49689
|
default: () => h("div", {
|
|
@@ -49709,7 +49713,7 @@ ${t}
|
|
|
49709
49713
|
onMousedown: this.handleXScrollMouseDown
|
|
49710
49714
|
}) : null
|
|
49711
49715
|
}))]);
|
|
49712
|
-
}, p3 = this.container ? h$1() : h(wo, {
|
|
49716
|
+
}, p3 = this.container ? h$1() : h(wo$1, {
|
|
49713
49717
|
onResize: this.handleContainerResize
|
|
49714
49718
|
}, {
|
|
49715
49719
|
default: h$1
|
|
@@ -52668,133 +52672,133 @@ ${t}
|
|
|
52668
52672
|
var Ve = (t) => {
|
|
52669
52673
|
throw TypeError(t);
|
|
52670
52674
|
};
|
|
52671
|
-
var mt = (t,
|
|
52672
|
-
var He = (t,
|
|
52673
|
-
var Se = (t,
|
|
52674
|
-
var W = (t,
|
|
52675
|
+
var mt = (t, l, o) => l in t ? ut(t, l, { enumerable: true, configurable: true, writable: true, value: o }) : t[l] = o;
|
|
52676
|
+
var He = (t, l, o) => mt(t, typeof l != "symbol" ? l + "" : l, o), je = (t, l, o) => l.has(t) || Ve("Cannot " + o);
|
|
52677
|
+
var Se = (t, l, o) => (je(t, l, "read from private field"), o ? o.call(t) : l.get(t)), Be = (t, l, o) => l.has(t) ? Ve("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(t) : l.set(t, o);
|
|
52678
|
+
var W = (t, l, o) => (je(t, l, "access private method"), o);
|
|
52675
52679
|
var Je = { exports: {} };
|
|
52676
52680
|
(function(t) {
|
|
52677
|
-
var
|
|
52681
|
+
var l = Object.prototype.hasOwnProperty, o = "~";
|
|
52678
52682
|
function n() {
|
|
52679
52683
|
}
|
|
52680
52684
|
Object.create && (n.prototype = /* @__PURE__ */ Object.create(null), new n().__proto__ || (o = false));
|
|
52681
|
-
function e(
|
|
52682
|
-
this.fn =
|
|
52685
|
+
function e(s, r, d) {
|
|
52686
|
+
this.fn = s, this.context = r, this.once = d || false;
|
|
52683
52687
|
}
|
|
52684
|
-
function i3(
|
|
52685
|
-
if (typeof
|
|
52688
|
+
function i3(s, r, d, c3, b) {
|
|
52689
|
+
if (typeof d != "function")
|
|
52686
52690
|
throw new TypeError("The listener must be a function");
|
|
52687
|
-
var y = new e(
|
|
52688
|
-
return
|
|
52691
|
+
var y = new e(d, c3 || s, b), h3 = o ? o + r : r;
|
|
52692
|
+
return s._events[h3] ? s._events[h3].fn ? s._events[h3] = [s._events[h3], y] : s._events[h3].push(y) : (s._events[h3] = y, s._eventsCount++), s;
|
|
52689
52693
|
}
|
|
52690
|
-
function
|
|
52691
|
-
--
|
|
52694
|
+
function u(s, r) {
|
|
52695
|
+
--s._eventsCount === 0 ? s._events = new n() : delete s._events[r];
|
|
52692
52696
|
}
|
|
52693
|
-
function
|
|
52697
|
+
function a() {
|
|
52694
52698
|
this._events = new n(), this._eventsCount = 0;
|
|
52695
52699
|
}
|
|
52696
|
-
|
|
52697
|
-
var
|
|
52698
|
-
if (this._eventsCount === 0) return
|
|
52699
|
-
for (
|
|
52700
|
-
|
|
52701
|
-
return Object.getOwnPropertySymbols ?
|
|
52702
|
-
},
|
|
52703
|
-
var
|
|
52704
|
-
if (!
|
|
52705
|
-
if (
|
|
52706
|
-
for (var b = 0, y =
|
|
52707
|
-
h3[b] =
|
|
52700
|
+
a.prototype.eventNames = function() {
|
|
52701
|
+
var r = [], d, c3;
|
|
52702
|
+
if (this._eventsCount === 0) return r;
|
|
52703
|
+
for (c3 in d = this._events)
|
|
52704
|
+
l.call(d, c3) && r.push(o ? c3.slice(1) : c3);
|
|
52705
|
+
return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(d)) : r;
|
|
52706
|
+
}, a.prototype.listeners = function(r) {
|
|
52707
|
+
var d = o ? o + r : r, c3 = this._events[d];
|
|
52708
|
+
if (!c3) return [];
|
|
52709
|
+
if (c3.fn) return [c3.fn];
|
|
52710
|
+
for (var b = 0, y = c3.length, h3 = new Array(y); b < y; b++)
|
|
52711
|
+
h3[b] = c3[b].fn;
|
|
52708
52712
|
return h3;
|
|
52709
|
-
},
|
|
52710
|
-
var
|
|
52711
|
-
return
|
|
52712
|
-
},
|
|
52713
|
-
var E3 = o ? o +
|
|
52713
|
+
}, a.prototype.listenerCount = function(r) {
|
|
52714
|
+
var d = o ? o + r : r, c3 = this._events[d];
|
|
52715
|
+
return c3 ? c3.fn ? 1 : c3.length : 0;
|
|
52716
|
+
}, a.prototype.emit = function(r, d, c3, b, y, h3) {
|
|
52717
|
+
var E3 = o ? o + r : r;
|
|
52714
52718
|
if (!this._events[E3]) return false;
|
|
52715
|
-
var
|
|
52716
|
-
if (
|
|
52717
|
-
switch (
|
|
52719
|
+
var v = this._events[E3], D3 = arguments.length, L3, p3;
|
|
52720
|
+
if (v.fn) {
|
|
52721
|
+
switch (v.once && this.removeListener(r, v.fn, void 0, true), D3) {
|
|
52718
52722
|
case 1:
|
|
52719
|
-
return
|
|
52723
|
+
return v.fn.call(v.context), true;
|
|
52720
52724
|
case 2:
|
|
52721
|
-
return
|
|
52725
|
+
return v.fn.call(v.context, d), true;
|
|
52722
52726
|
case 3:
|
|
52723
|
-
return
|
|
52727
|
+
return v.fn.call(v.context, d, c3), true;
|
|
52724
52728
|
case 4:
|
|
52725
|
-
return
|
|
52729
|
+
return v.fn.call(v.context, d, c3, b), true;
|
|
52726
52730
|
case 5:
|
|
52727
|
-
return
|
|
52731
|
+
return v.fn.call(v.context, d, c3, b, y), true;
|
|
52728
52732
|
case 6:
|
|
52729
|
-
return
|
|
52733
|
+
return v.fn.call(v.context, d, c3, b, y, h3), true;
|
|
52730
52734
|
}
|
|
52731
52735
|
for (p3 = 1, L3 = new Array(D3 - 1); p3 < D3; p3++)
|
|
52732
52736
|
L3[p3 - 1] = arguments[p3];
|
|
52733
|
-
|
|
52737
|
+
v.fn.apply(v.context, L3);
|
|
52734
52738
|
} else {
|
|
52735
|
-
var C =
|
|
52739
|
+
var C = v.length, F3;
|
|
52736
52740
|
for (p3 = 0; p3 < C; p3++)
|
|
52737
|
-
switch (
|
|
52741
|
+
switch (v[p3].once && this.removeListener(r, v[p3].fn, void 0, true), D3) {
|
|
52738
52742
|
case 1:
|
|
52739
|
-
|
|
52743
|
+
v[p3].fn.call(v[p3].context);
|
|
52740
52744
|
break;
|
|
52741
52745
|
case 2:
|
|
52742
|
-
|
|
52746
|
+
v[p3].fn.call(v[p3].context, d);
|
|
52743
52747
|
break;
|
|
52744
52748
|
case 3:
|
|
52745
|
-
|
|
52749
|
+
v[p3].fn.call(v[p3].context, d, c3);
|
|
52746
52750
|
break;
|
|
52747
52751
|
case 4:
|
|
52748
|
-
|
|
52752
|
+
v[p3].fn.call(v[p3].context, d, c3, b);
|
|
52749
52753
|
break;
|
|
52750
52754
|
default:
|
|
52751
52755
|
if (!L3) for (F3 = 1, L3 = new Array(D3 - 1); F3 < D3; F3++)
|
|
52752
52756
|
L3[F3 - 1] = arguments[F3];
|
|
52753
|
-
|
|
52757
|
+
v[p3].fn.apply(v[p3].context, L3);
|
|
52754
52758
|
}
|
|
52755
52759
|
}
|
|
52756
52760
|
return true;
|
|
52757
|
-
},
|
|
52758
|
-
return i3(this,
|
|
52759
|
-
},
|
|
52760
|
-
return i3(this,
|
|
52761
|
-
},
|
|
52762
|
-
var y = o ? o +
|
|
52761
|
+
}, a.prototype.on = function(r, d, c3) {
|
|
52762
|
+
return i3(this, r, d, c3, false);
|
|
52763
|
+
}, a.prototype.once = function(r, d, c3) {
|
|
52764
|
+
return i3(this, r, d, c3, true);
|
|
52765
|
+
}, a.prototype.removeListener = function(r, d, c3, b) {
|
|
52766
|
+
var y = o ? o + r : r;
|
|
52763
52767
|
if (!this._events[y]) return this;
|
|
52764
|
-
if (!
|
|
52765
|
-
return
|
|
52768
|
+
if (!d)
|
|
52769
|
+
return u(this, y), this;
|
|
52766
52770
|
var h3 = this._events[y];
|
|
52767
52771
|
if (h3.fn)
|
|
52768
|
-
h3.fn ===
|
|
52772
|
+
h3.fn === d && (!b || h3.once) && (!c3 || h3.context === c3) && u(this, y);
|
|
52769
52773
|
else {
|
|
52770
|
-
for (var E3 = 0,
|
|
52771
|
-
(h3[E3].fn !==
|
|
52772
|
-
|
|
52774
|
+
for (var E3 = 0, v = [], D3 = h3.length; E3 < D3; E3++)
|
|
52775
|
+
(h3[E3].fn !== d || b && !h3[E3].once || c3 && h3[E3].context !== c3) && v.push(h3[E3]);
|
|
52776
|
+
v.length ? this._events[y] = v.length === 1 ? v[0] : v : u(this, y);
|
|
52773
52777
|
}
|
|
52774
52778
|
return this;
|
|
52775
|
-
},
|
|
52776
|
-
var
|
|
52777
|
-
return
|
|
52778
|
-
},
|
|
52779
|
+
}, a.prototype.removeAllListeners = function(r) {
|
|
52780
|
+
var d;
|
|
52781
|
+
return r ? (d = o ? o + r : r, this._events[d] && u(this, d)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
52782
|
+
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = o, a.EventEmitter = a, t.exports = a;
|
|
52779
52783
|
})(Je);
|
|
52780
52784
|
var Pt = Je.exports;
|
|
52781
52785
|
const Vt = /* @__PURE__ */ Mo$2(Pt);
|
|
52782
52786
|
function jt(t) {
|
|
52783
|
-
let
|
|
52784
|
-
for (;
|
|
52785
|
-
const o = window.getComputedStyle(
|
|
52786
|
-
if (/(auto|scroll)/.test(o) &&
|
|
52787
|
-
return
|
|
52788
|
-
|
|
52787
|
+
let l = t;
|
|
52788
|
+
for (; l; ) {
|
|
52789
|
+
const o = window.getComputedStyle(l).overflowY;
|
|
52790
|
+
if (/(auto|scroll)/.test(o) && l.scrollHeight > l.clientHeight)
|
|
52791
|
+
return l;
|
|
52792
|
+
l = l.parentElement;
|
|
52789
52793
|
}
|
|
52790
52794
|
return document.scrollingElement || document.documentElement;
|
|
52791
52795
|
}
|
|
52792
|
-
function Ut(t,
|
|
52796
|
+
function Ut(t, l = { behavior: "smooth", block: "start" }) {
|
|
52793
52797
|
if (!t) return;
|
|
52794
52798
|
const o = jt(t), n = o.getBoundingClientRect(), i3 = t.getBoundingClientRect().top - n.top + o.scrollTop;
|
|
52795
52799
|
o.scrollTo({
|
|
52796
|
-
top:
|
|
52797
|
-
behavior:
|
|
52800
|
+
top: l.block === "start" ? i3 : i3 - o.clientHeight + t.offsetHeight,
|
|
52801
|
+
behavior: l.behavior
|
|
52798
52802
|
});
|
|
52799
52803
|
}
|
|
52800
52804
|
const _ = (t) => {
|
|
@@ -52804,7 +52808,7 @@ ${t}
|
|
|
52804
52808
|
throw new Error("Toolbar button item needs either icon or label - " + t.name);
|
|
52805
52809
|
if (!t.name)
|
|
52806
52810
|
throw new Error("Invalid toolbar item name - " + t.name);
|
|
52807
|
-
const o = ref(Aa$2()), n = t.type, e = ref(t.name), i3 = t.command,
|
|
52811
|
+
const o = ref(Aa$2()), n = t.type, e = ref(t.name), i3 = t.command, u = ref(t.icon), a = ref(t.group || "center"), s = ref(t.allowWithoutEditor), r = ref(t.attributes || {}), d = t.disabled || false, c3 = ref(t.disabled), b = ref(false), y = ref(false), h3 = ref(t.style), E3 = ref(t.isNarrow), v = ref(t.isWide), D3 = ref(t.minWidth), L3 = ref(t.suppressActiveHighlight || false), p3 = ref(t.argument), C = ref(null), F3 = ref(null), z = ref(t.iconColor), B = ref(t.hasCaret), q3 = ref(t.dropdownStyles), ve2 = ref(t.tooltip), ge2 = ref(t.tooltipVisible), ce2 = ref(t.tooltipTimeout), de2 = ref(t.defaultLabel), T3 = ref(t.label), M3 = ref(t.hideLabel), H3 = ref(t.inlineTextInputVisible), R = ref(t.hasInlineTextInput), X3 = ref(t.markName), Z3 = ref(t.labelAttr), ae2 = ref(t.selectedValue), ue2 = ref(t.dropdownValueKey), Ce2 = ref([]);
|
|
52808
52812
|
if (t.options) {
|
|
52809
52813
|
if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
|
|
52810
52814
|
Ce2.value.push(...t.options);
|
|
@@ -52814,9 +52818,9 @@ ${t}
|
|
|
52814
52818
|
}, Fe2 = () => {
|
|
52815
52819
|
xe2(), b.value = false;
|
|
52816
52820
|
}, Ie2 = (te2) => {
|
|
52817
|
-
|
|
52821
|
+
c3.value = te2;
|
|
52818
52822
|
}, _e2 = () => {
|
|
52819
|
-
|
|
52823
|
+
c3.value = d;
|
|
52820
52824
|
}, ee2 = t.onActivate || (() => null), xe2 = t.onDeactivate || (() => null), Le2 = () => {
|
|
52821
52825
|
const te2 = {};
|
|
52822
52826
|
return Object.keys(me2).forEach((ye2) => {
|
|
@@ -52827,24 +52831,24 @@ ${t}
|
|
|
52827
52831
|
name: e,
|
|
52828
52832
|
type: n,
|
|
52829
52833
|
command: i3,
|
|
52830
|
-
icon:
|
|
52831
|
-
tooltip:
|
|
52832
|
-
group:
|
|
52833
|
-
attributes:
|
|
52834
|
-
disabled:
|
|
52834
|
+
icon: u,
|
|
52835
|
+
tooltip: ve2,
|
|
52836
|
+
group: a,
|
|
52837
|
+
attributes: r,
|
|
52838
|
+
disabled: c3,
|
|
52835
52839
|
active: b,
|
|
52836
52840
|
expand: y,
|
|
52837
52841
|
nestedOptions: Ce2,
|
|
52838
52842
|
style: h3,
|
|
52839
52843
|
isNarrow: E3,
|
|
52840
|
-
isWide:
|
|
52844
|
+
isWide: v,
|
|
52841
52845
|
minWidth: D3,
|
|
52842
52846
|
argument: p3,
|
|
52843
52847
|
parentItem: F3,
|
|
52844
52848
|
iconColor: z,
|
|
52845
52849
|
hasCaret: B,
|
|
52846
52850
|
dropdownStyles: q3,
|
|
52847
|
-
tooltipVisible:
|
|
52851
|
+
tooltipVisible: ge2,
|
|
52848
52852
|
tooltipTimeout: ce2,
|
|
52849
52853
|
defaultLabel: de2,
|
|
52850
52854
|
label: T3,
|
|
@@ -52854,7 +52858,7 @@ ${t}
|
|
|
52854
52858
|
markName: X3,
|
|
52855
52859
|
labelAttr: Z3,
|
|
52856
52860
|
childItem: C,
|
|
52857
|
-
allowWithoutEditor:
|
|
52861
|
+
allowWithoutEditor: s,
|
|
52858
52862
|
dropdownValueKey: ue2,
|
|
52859
52863
|
selectedValue: ae2
|
|
52860
52864
|
};
|
|
@@ -52871,29 +52875,29 @@ ${t}
|
|
|
52871
52875
|
}, qt = { class: "alignment-buttons" }, Gt = ["innerHTML"], Kt = ["innerHTML"], Xt = ["innerHTML"], Zt = ["innerHTML"], Yt = {
|
|
52872
52876
|
__name: "AlignmentButtons",
|
|
52873
52877
|
emits: ["select"],
|
|
52874
|
-
setup(t, { emit:
|
|
52875
|
-
const o =
|
|
52878
|
+
setup(t, { emit: l }) {
|
|
52879
|
+
const o = l, n = (e) => {
|
|
52876
52880
|
o("select", e);
|
|
52877
52881
|
};
|
|
52878
52882
|
return (e, i3) => (openBlock(), createElementBlock("div", qt, [
|
|
52879
52883
|
createBaseVNode("div", {
|
|
52880
52884
|
class: "button-icon",
|
|
52881
|
-
onClick: i3[0] || (i3[0] = (
|
|
52885
|
+
onClick: i3[0] || (i3[0] = (u) => n("left")),
|
|
52882
52886
|
innerHTML: unref(Ur).alignLeft
|
|
52883
52887
|
}, null, 8, Gt),
|
|
52884
52888
|
createBaseVNode("div", {
|
|
52885
52889
|
class: "button-icon",
|
|
52886
|
-
onClick: i3[1] || (i3[1] = (
|
|
52890
|
+
onClick: i3[1] || (i3[1] = (u) => n("center")),
|
|
52887
52891
|
innerHTML: unref(Ur).alignCenter
|
|
52888
52892
|
}, null, 8, Kt),
|
|
52889
52893
|
createBaseVNode("div", {
|
|
52890
52894
|
class: "button-icon",
|
|
52891
|
-
onClick: i3[2] || (i3[2] = (
|
|
52895
|
+
onClick: i3[2] || (i3[2] = (u) => n("right")),
|
|
52892
52896
|
innerHTML: unref(Ur).alignRight
|
|
52893
52897
|
}, null, 8, Xt),
|
|
52894
52898
|
createBaseVNode("div", {
|
|
52895
52899
|
class: "button-icon",
|
|
52896
|
-
onClick: i3[3] || (i3[3] = (
|
|
52900
|
+
onClick: i3[3] || (i3[3] = (u) => n("justify")),
|
|
52897
52901
|
innerHTML: unref(Ur).alignJustify
|
|
52898
52902
|
}, null, 8, Zt)
|
|
52899
52903
|
]));
|
|
@@ -52936,28 +52940,28 @@ ${t}
|
|
|
52936
52940
|
}
|
|
52937
52941
|
},
|
|
52938
52942
|
emits: ["submit", "cancel"],
|
|
52939
|
-
setup(t, { emit:
|
|
52940
|
-
const o =
|
|
52941
|
-
if (e?.$submit instanceof Function && e.$submit(),
|
|
52942
|
-
o("submit", { text:
|
|
52943
|
+
setup(t, { emit: l }) {
|
|
52944
|
+
const o = l, n = t, { proxy: e } = getCurrentInstance(), i3 = () => {
|
|
52945
|
+
if (e?.$submit instanceof Function && e.$submit(), r.value && c3.value) {
|
|
52946
|
+
o("submit", { text: s.value, href: d.value });
|
|
52943
52947
|
return;
|
|
52944
|
-
} else if (!
|
|
52945
|
-
o("submit", { text:
|
|
52948
|
+
} else if (!r.value) {
|
|
52949
|
+
o("submit", { text: s.value, href: null });
|
|
52946
52950
|
return;
|
|
52947
52951
|
}
|
|
52948
|
-
console.debug("[LinkInput] Invalid URL in handleSubmit"),
|
|
52949
|
-
},
|
|
52950
|
-
o("submit", { text:
|
|
52951
|
-
},
|
|
52952
|
-
const p3 =
|
|
52953
|
-
return
|
|
52954
|
-
}), b = computed(() => h3.value ? "Apply" : "Remove"), y = computed(() => !
|
|
52955
|
-
window.open(
|
|
52952
|
+
console.debug("[LinkInput] Invalid URL in handleSubmit"), a.value = true;
|
|
52953
|
+
}, u = () => {
|
|
52954
|
+
o("submit", { text: s.value, href: null });
|
|
52955
|
+
}, a = ref(false), s = ref(n.initialText), r = ref(n.href), d = computed(() => r.value?.startsWith("http") ? r.value : "http://" + r.value), c3 = computed(() => {
|
|
52956
|
+
const p3 = d.value.split(".").filter(Boolean);
|
|
52957
|
+
return d.value.includes(".") && p3.length > 1;
|
|
52958
|
+
}), b = computed(() => h3.value ? "Apply" : "Remove"), y = computed(() => !c3.value), h3 = computed(() => !E3.value), E3 = computed(() => n.href && !r.value), v = computed(() => n.href.startsWith("#")), D3 = () => {
|
|
52959
|
+
window.open(d.value, "_blank");
|
|
52956
52960
|
};
|
|
52957
52961
|
watch(
|
|
52958
52962
|
() => n.href,
|
|
52959
52963
|
(p3) => {
|
|
52960
|
-
|
|
52964
|
+
r.value = p3;
|
|
52961
52965
|
}
|
|
52962
52966
|
);
|
|
52963
52967
|
const L3 = () => {
|
|
@@ -52967,8 +52971,8 @@ ${t}
|
|
|
52967
52971
|
return onMounted(() => {
|
|
52968
52972
|
n.showInput && L3();
|
|
52969
52973
|
}), (p3, C) => (openBlock(), createElementBlock("div", Qt, [
|
|
52970
|
-
t.href ?
|
|
52971
|
-
t.showInput && !
|
|
52974
|
+
t.href ? v.value ? (openBlock(), createElementBlock("div", tn, "Page anchor")) : (openBlock(), createElementBlock("div", nn, "Edit link")) : (openBlock(), createElementBlock("div", en, "Add link")),
|
|
52975
|
+
t.showInput && !v.value ? (openBlock(), createElementBlock("div", on$1, [
|
|
52972
52976
|
createBaseVNode("div", sn, [
|
|
52973
52977
|
createBaseVNode("div", {
|
|
52974
52978
|
class: "input-icon",
|
|
@@ -52977,17 +52981,17 @@ ${t}
|
|
|
52977
52981
|
withDirectives(createBaseVNode("input", {
|
|
52978
52982
|
type: "text",
|
|
52979
52983
|
placeholder: "Type or paste a link",
|
|
52980
|
-
class: normalizeClass({ error:
|
|
52981
|
-
"onUpdate:modelValue": C[0] || (C[0] = (F3) =>
|
|
52984
|
+
class: normalizeClass({ error: a.value }),
|
|
52985
|
+
"onUpdate:modelValue": C[0] || (C[0] = (F3) => r.value = F3),
|
|
52982
52986
|
onKeydown: [
|
|
52983
52987
|
withKeys(withModifiers(i3, ["stop", "prevent"]), ["enter"]),
|
|
52984
|
-
C[1] || (C[1] = (F3) =>
|
|
52988
|
+
C[1] || (C[1] = (F3) => a.value = false)
|
|
52985
52989
|
]
|
|
52986
52990
|
}, null, 42, an), [
|
|
52987
|
-
[vModelText,
|
|
52991
|
+
[vModelText, r.value]
|
|
52988
52992
|
]),
|
|
52989
52993
|
createBaseVNode("div", {
|
|
52990
|
-
class: normalizeClass(["open-link-icon", { disabled: !
|
|
52994
|
+
class: normalizeClass(["open-link-icon", { disabled: !c3.value }]),
|
|
52991
52995
|
innerHTML: unref(Ur).openLink,
|
|
52992
52996
|
onClick: D3
|
|
52993
52997
|
}, null, 10, rn)
|
|
@@ -52996,7 +53000,7 @@ ${t}
|
|
|
52996
53000
|
t.href ? (openBlock(), createElementBlock("button", {
|
|
52997
53001
|
key: 0,
|
|
52998
53002
|
class: "remove-btn",
|
|
52999
|
-
onClick:
|
|
53003
|
+
onClick: u
|
|
53000
53004
|
}, [
|
|
53001
53005
|
createBaseVNode("div", {
|
|
53002
53006
|
class: "remove-btn__icon",
|
|
@@ -53010,14 +53014,14 @@ ${t}
|
|
|
53010
53014
|
onClick: i3
|
|
53011
53015
|
}, toDisplayString(b.value), 3)) : createCommentVNode("", true)
|
|
53012
53016
|
])
|
|
53013
|
-
])) :
|
|
53017
|
+
])) : v.value ? (openBlock(), createElementBlock("div", un, [
|
|
53014
53018
|
createBaseVNode("a", {
|
|
53015
53019
|
onClick: C[2] || (C[2] = withModifiers((...F3) => t.goToAnchor && t.goToAnchor(...F3), ["stop", "prevent"]))
|
|
53016
53020
|
}, "Go to " + toDisplayString(t.href.startsWith("#_") ? t.href.substring(2) : t.href), 1)
|
|
53017
53021
|
])) : createCommentVNode("", true)
|
|
53018
53022
|
]));
|
|
53019
53023
|
}
|
|
53020
|
-
}, pn = /* @__PURE__ */ Pk(mn, [["__scopeId", "data-v-6990d5b2"]]), fn = { class: "document-mode" }, hn = ["onClick"],
|
|
53024
|
+
}, pn = /* @__PURE__ */ Pk(mn, [["__scopeId", "data-v-6990d5b2"]]), fn = { class: "document-mode" }, hn = ["onClick"], vn = { class: "document-mode-column icon-column" }, gn = ["innerHTML"], yn = { class: "document-mode-column text-column" }, bn = { class: "document-mode-type" }, kn = { class: "document-mode-description" }, wn = {
|
|
53021
53025
|
__name: "DocumentMode",
|
|
53022
53026
|
props: {
|
|
53023
53027
|
options: {
|
|
@@ -53025,29 +53029,29 @@ ${t}
|
|
|
53025
53029
|
}
|
|
53026
53030
|
},
|
|
53027
53031
|
emits: ["select"],
|
|
53028
|
-
setup(t, { emit:
|
|
53029
|
-
const o =
|
|
53032
|
+
setup(t, { emit: l }) {
|
|
53033
|
+
const o = l, n = (e) => {
|
|
53030
53034
|
o("select", e);
|
|
53031
53035
|
};
|
|
53032
53036
|
return (e, i3) => (openBlock(), createElementBlock("div", fn, [
|
|
53033
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(t.options, (
|
|
53034
|
-
class: normalizeClass(["option-item", { disabled:
|
|
53035
|
-
onClick: (
|
|
53037
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(t.options, (u) => (openBlock(), createElementBlock("div", {
|
|
53038
|
+
class: normalizeClass(["option-item", { disabled: u.disabled }]),
|
|
53039
|
+
onClick: (a) => n(u)
|
|
53036
53040
|
}, [
|
|
53037
|
-
createBaseVNode("div",
|
|
53041
|
+
createBaseVNode("div", vn, [
|
|
53038
53042
|
createBaseVNode("div", {
|
|
53039
53043
|
class: "icon-column__icon",
|
|
53040
|
-
innerHTML:
|
|
53041
|
-
}, null, 8,
|
|
53044
|
+
innerHTML: u.icon
|
|
53045
|
+
}, null, 8, gn)
|
|
53042
53046
|
]),
|
|
53043
53047
|
createBaseVNode("div", yn, [
|
|
53044
|
-
createBaseVNode("div", bn, toDisplayString(
|
|
53045
|
-
createBaseVNode("div",
|
|
53048
|
+
createBaseVNode("div", bn, toDisplayString(u.label), 1),
|
|
53049
|
+
createBaseVNode("div", kn, toDisplayString(u.description), 1)
|
|
53046
53050
|
])
|
|
53047
53051
|
], 10, hn))), 256))
|
|
53048
53052
|
]));
|
|
53049
53053
|
}
|
|
53050
|
-
}, Cn = /* @__PURE__ */ Pk(
|
|
53054
|
+
}, Cn = /* @__PURE__ */ Pk(wn, [["__scopeId", "data-v-f86e1477"]]), _n = {
|
|
53051
53055
|
key: 0,
|
|
53052
53056
|
class: "linked-style-buttons"
|
|
53053
53057
|
}, xn = ["onClick"], En = {
|
|
@@ -53059,19 +53063,19 @@ ${t}
|
|
|
53059
53063
|
}
|
|
53060
53064
|
},
|
|
53061
53065
|
emits: ["select"],
|
|
53062
|
-
setup(t, { emit:
|
|
53063
|
-
const o =
|
|
53066
|
+
setup(t, { emit: l }) {
|
|
53067
|
+
const o = l, n = t, e = (i3) => {
|
|
53064
53068
|
o("select", i3);
|
|
53065
53069
|
};
|
|
53066
|
-
return (i3,
|
|
53067
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(oC)(t.editor), (
|
|
53070
|
+
return (i3, u) => n.editor ? (openBlock(), createElementBlock("div", _n, [
|
|
53071
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(oC)(t.editor), (a) => (openBlock(), createElementBlock("div", {
|
|
53068
53072
|
class: "style-item",
|
|
53069
|
-
onClick: (
|
|
53073
|
+
onClick: (s) => e(a)
|
|
53070
53074
|
}, [
|
|
53071
53075
|
createBaseVNode("div", {
|
|
53072
53076
|
class: "style-name",
|
|
53073
|
-
style: normalizeStyle(unref(i0$1)(
|
|
53074
|
-
}, toDisplayString(
|
|
53077
|
+
style: normalizeStyle(unref(i0$1)(a, null, false))
|
|
53078
|
+
}, toDisplayString(a.definition.attrs.name), 5)
|
|
53075
53079
|
], 8, xn))), 256))
|
|
53076
53080
|
])) : createCommentVNode("", true);
|
|
53077
53081
|
}
|
|
@@ -53088,31 +53092,31 @@ ${t}
|
|
|
53088
53092
|
}
|
|
53089
53093
|
},
|
|
53090
53094
|
emits: ["select"],
|
|
53091
|
-
setup(t, { emit:
|
|
53092
|
-
const o =
|
|
53093
|
-
o("select",
|
|
53095
|
+
setup(t, { emit: l }) {
|
|
53096
|
+
const o = l, n = t, e = computed(() => (a) => n.activeColor.value ? n.activeColor.value.toUpperCase() === a.value : false), i3 = (a, s) => s === 5 || ["#FFFFFF", "#FAFF09"].includes(a) ? { color: "#000" } : { color: "#FFF" }, u = (a) => {
|
|
53097
|
+
o("select", a.value);
|
|
53094
53098
|
};
|
|
53095
53099
|
return onMounted(() => {
|
|
53096
|
-
if (!n.icons.every((
|
|
53097
|
-
}), (
|
|
53100
|
+
if (!n.icons.every((s) => Array.isArray(s))) throw new Error("icon props must be 2d array");
|
|
53101
|
+
}), (a, s) => (openBlock(true), createElementBlock(Fragment, null, renderList(t.icons, (r, d) => (openBlock(), createElementBlock("div", {
|
|
53098
53102
|
class: "option-row",
|
|
53099
|
-
key:
|
|
53103
|
+
key: d
|
|
53100
53104
|
}, [
|
|
53101
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
53105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(r, (c3, b) => (openBlock(), createElementBlock("div", {
|
|
53102
53106
|
class: "option",
|
|
53103
53107
|
key: b,
|
|
53104
|
-
onClick: withModifiers((y) =>
|
|
53108
|
+
onClick: withModifiers((y) => u(c3), ["stop", "prevent"])
|
|
53105
53109
|
}, [
|
|
53106
53110
|
createBaseVNode("div", {
|
|
53107
53111
|
class: "option__icon",
|
|
53108
|
-
innerHTML:
|
|
53109
|
-
style: normalizeStyle(
|
|
53112
|
+
innerHTML: c3.icon,
|
|
53113
|
+
style: normalizeStyle(c3.style)
|
|
53110
53114
|
}, null, 12, Tn),
|
|
53111
|
-
e.value(
|
|
53115
|
+
e.value(c3) ? (openBlock(), createElementBlock("div", {
|
|
53112
53116
|
key: 0,
|
|
53113
53117
|
class: "option__check",
|
|
53114
53118
|
innerHTML: unref(Ur).colorOptionCheck,
|
|
53115
|
-
style: normalizeStyle(i3(
|
|
53119
|
+
style: normalizeStyle(i3(c3.value, b))
|
|
53116
53120
|
}, null, 12, Fn)) : createCommentVNode("", true)
|
|
53117
53121
|
], 8, An))), 128))
|
|
53118
53122
|
]))), 128));
|
|
@@ -53134,8 +53138,8 @@ ${t}
|
|
|
53134
53138
|
}
|
|
53135
53139
|
},
|
|
53136
53140
|
emits: ["select", "clickoutside"],
|
|
53137
|
-
setup(t, { emit:
|
|
53138
|
-
const o =
|
|
53141
|
+
setup(t, { emit: l }) {
|
|
53142
|
+
const o = l, n = (e) => {
|
|
53139
53143
|
o("select", e);
|
|
53140
53144
|
};
|
|
53141
53145
|
return (e, i3) => (openBlock(), createElementBlock("div", Ln, [
|
|
@@ -53156,8 +53160,8 @@ ${t}
|
|
|
53156
53160
|
}
|
|
53157
53161
|
}, Dn = /* @__PURE__ */ Pk(Mn, [["__scopeId", "data-v-fa2949d8"]]), $n = (t) => {
|
|
53158
53162
|
t.expand.value = false;
|
|
53159
|
-
}, f = (t,
|
|
53160
|
-
label:
|
|
53163
|
+
}, f = (t, l = null) => ({
|
|
53164
|
+
label: l,
|
|
53161
53165
|
icon: Ur.colorOption,
|
|
53162
53166
|
value: t,
|
|
53163
53167
|
style: {
|
|
@@ -53165,15 +53169,15 @@ ${t}
|
|
|
53165
53169
|
boxShadow: "0 0 5px 1px rgba(0, 0, 0, 0.1)",
|
|
53166
53170
|
borderRadius: "50%"
|
|
53167
53171
|
}
|
|
53168
|
-
}), Ne = (t,
|
|
53172
|
+
}), Ne = (t, l, o = []) => {
|
|
53169
53173
|
const n = (e) => {
|
|
53170
|
-
|
|
53174
|
+
l.iconColor.value = e, t.emitCommand({ item: l, argument: e }), $n(l);
|
|
53171
53175
|
};
|
|
53172
53176
|
return h("div", {}, [
|
|
53173
53177
|
h(Dn, {
|
|
53174
53178
|
icons: Qe,
|
|
53175
53179
|
customIcons: o,
|
|
53176
|
-
activeColor:
|
|
53180
|
+
activeColor: l.iconColor,
|
|
53177
53181
|
onSelect: n
|
|
53178
53182
|
})
|
|
53179
53183
|
]);
|
|
@@ -53253,34 +53257,34 @@ ${t}
|
|
|
53253
53257
|
], Hn = () => Qe.flat().map((t) => t.value), Bn = { class: "toolbar-table-grid-wrapper" }, Rn = ["data-cols", "data-rows", "onClick"], On = { class: "toolbar-table-grid-value" }, Nn = {
|
|
53254
53258
|
__name: "TableGrid",
|
|
53255
53259
|
emits: ["select", "clickoutside"],
|
|
53256
|
-
setup(t, { emit:
|
|
53257
|
-
const o =
|
|
53258
|
-
let
|
|
53259
|
-
if (!!
|
|
53260
|
+
setup(t, { emit: l }) {
|
|
53261
|
+
const o = l, n = ref(0), e = ref(0), i3 = (a) => {
|
|
53262
|
+
let s = a.target;
|
|
53263
|
+
if (!!s.dataset.grid)
|
|
53260
53264
|
return;
|
|
53261
|
-
let
|
|
53265
|
+
let c3 = [...s.parentElement.querySelectorAll("[data-item]")], b = parseInt(s.dataset.cols, 10), y = parseInt(s.dataset.rows, 10);
|
|
53262
53266
|
e.value = b, n.value = y;
|
|
53263
|
-
for (let h3 = 0; h3 <
|
|
53264
|
-
let E3 =
|
|
53265
|
-
|
|
53267
|
+
for (let h3 = 0; h3 < c3.length; h3++) {
|
|
53268
|
+
let E3 = c3[h3], v = parseInt(E3.dataset.cols, 10), D3 = parseInt(E3.dataset.rows, 10);
|
|
53269
|
+
v <= b && D3 <= y ? E3.classList.add("selected") : E3.classList.remove("selected");
|
|
53266
53270
|
}
|
|
53267
|
-
},
|
|
53268
|
-
o("select", { cols:
|
|
53271
|
+
}, u = ({ cols: a, rows: s }) => {
|
|
53272
|
+
o("select", { cols: a, rows: s });
|
|
53269
53273
|
};
|
|
53270
|
-
return (
|
|
53274
|
+
return (a, s) => (openBlock(), createElementBlock("div", Bn, [
|
|
53271
53275
|
createBaseVNode("div", {
|
|
53272
53276
|
class: "toolbar-table-grid",
|
|
53273
53277
|
onMouseover: i3,
|
|
53274
53278
|
"data-grid": "true"
|
|
53275
53279
|
}, [
|
|
53276
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(5, (
|
|
53277
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(5, (
|
|
53280
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(5, (r) => (openBlock(), createElementBlock(Fragment, { key: r }, [
|
|
53281
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(5, (d) => createBaseVNode("div", {
|
|
53278
53282
|
class: "toolbar-table-grid__item",
|
|
53279
|
-
key: `${
|
|
53280
|
-
"data-cols":
|
|
53281
|
-
"data-rows":
|
|
53283
|
+
key: `${r}_${d}`,
|
|
53284
|
+
"data-cols": d,
|
|
53285
|
+
"data-rows": r,
|
|
53282
53286
|
"data-item": "true",
|
|
53283
|
-
onClick: withModifiers((
|
|
53287
|
+
onClick: withModifiers((c3) => u({ cols: d, rows: r }), ["stop", "prevent"])
|
|
53284
53288
|
}, null, 8, Rn)), 64))
|
|
53285
53289
|
], 64))), 64))
|
|
53286
53290
|
], 32),
|
|
@@ -53295,36 +53299,36 @@ ${t}
|
|
|
53295
53299
|
}
|
|
53296
53300
|
},
|
|
53297
53301
|
emits: ["select"],
|
|
53298
|
-
setup(t, { emit:
|
|
53299
|
-
const o =
|
|
53302
|
+
setup(t, { emit: l }) {
|
|
53303
|
+
const o = l, n = (e) => {
|
|
53300
53304
|
o("select", { command: e.command });
|
|
53301
53305
|
};
|
|
53302
53306
|
return (e, i3) => (openBlock(), createElementBlock("div", Wn, [
|
|
53303
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(t.options, (
|
|
53304
|
-
class: normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border":
|
|
53305
|
-
onClick: (
|
|
53307
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(t.options, (u) => (openBlock(), createElementBlock("div", {
|
|
53308
|
+
class: normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": u.bottomBorder }]),
|
|
53309
|
+
onClick: (a) => n(u)
|
|
53306
53310
|
}, [
|
|
53307
53311
|
createBaseVNode("div", Vn, [
|
|
53308
53312
|
createBaseVNode("div", {
|
|
53309
53313
|
class: "toolbar-table-actions__icon-wrapper",
|
|
53310
|
-
innerHTML:
|
|
53314
|
+
innerHTML: u.icon
|
|
53311
53315
|
}, null, 8, jn)
|
|
53312
53316
|
]),
|
|
53313
|
-
createBaseVNode("div", Un, toDisplayString(
|
|
53317
|
+
createBaseVNode("div", Un, toDisplayString(u.label), 1)
|
|
53314
53318
|
], 10, Pn))), 256))
|
|
53315
53319
|
]));
|
|
53316
53320
|
}
|
|
53317
53321
|
}, Gn = /* @__PURE__ */ Pk(qn, [["__scopeId", "data-v-9a702d7f"]]), Kn = `<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>
|
|
53318
53322
|
`, le = (t) => {
|
|
53319
53323
|
t.expand.value = false;
|
|
53320
|
-
}, Xn = (t,
|
|
53324
|
+
}, Xn = (t, l = false, o, n, e) => {
|
|
53321
53325
|
const i3 = _({
|
|
53322
53326
|
type: "button",
|
|
53323
53327
|
name: "bold",
|
|
53324
53328
|
command: "toggleBold",
|
|
53325
53329
|
icon: e.bold,
|
|
53326
53330
|
tooltip: "Bold"
|
|
53327
|
-
}),
|
|
53331
|
+
}), u = _({
|
|
53328
53332
|
type: "dropdown",
|
|
53329
53333
|
name: "fontFamily",
|
|
53330
53334
|
tooltip: "Font",
|
|
@@ -53372,10 +53376,10 @@ ${t}
|
|
|
53372
53376
|
}
|
|
53373
53377
|
],
|
|
53374
53378
|
onActivate: ({ fontFamily: m }) => {
|
|
53375
|
-
m && (
|
|
53379
|
+
m && (u.label.value = m);
|
|
53376
53380
|
},
|
|
53377
|
-
onDeactivate: () =>
|
|
53378
|
-
}),
|
|
53381
|
+
onDeactivate: () => u.label.value = u.defaultLabel.value
|
|
53382
|
+
}), a = _({
|
|
53379
53383
|
type: "dropdown",
|
|
53380
53384
|
dropdownStyles: {
|
|
53381
53385
|
padding: 0,
|
|
@@ -53404,7 +53408,7 @@ ${t}
|
|
|
53404
53408
|
[
|
|
53405
53409
|
h(de, {
|
|
53406
53410
|
handleClose: () => {
|
|
53407
|
-
le(
|
|
53411
|
+
le(a);
|
|
53408
53412
|
},
|
|
53409
53413
|
selectedText: m,
|
|
53410
53414
|
editor: t.activeEditor,
|
|
@@ -53416,7 +53420,7 @@ ${t}
|
|
|
53416
53420
|
}
|
|
53417
53421
|
}
|
|
53418
53422
|
]
|
|
53419
|
-
}),
|
|
53423
|
+
}), s = _({
|
|
53420
53424
|
type: "dropdown",
|
|
53421
53425
|
name: "fontSize",
|
|
53422
53426
|
defaultLabel: "12",
|
|
@@ -53448,22 +53452,22 @@ ${t}
|
|
|
53448
53452
|
{ label: "96", key: "96pt" }
|
|
53449
53453
|
],
|
|
53450
53454
|
onActivate: ({ fontSize: m }) => {
|
|
53451
|
-
if (!m) return
|
|
53455
|
+
if (!m) return s.label.value = s.defaultLabel.value;
|
|
53452
53456
|
let S3 = B0(m, 12);
|
|
53453
|
-
S3 < 8 && (S3 = 8), S3 > 96 && (S3 = 96),
|
|
53457
|
+
S3 < 8 && (S3 = 8), S3 > 96 && (S3 = 96), s.label.value = String(S3);
|
|
53454
53458
|
},
|
|
53455
|
-
onDeactivate: () =>
|
|
53456
|
-
}),
|
|
53459
|
+
onDeactivate: () => s.label.value = s.defaultLabel.value
|
|
53460
|
+
}), r = _({
|
|
53457
53461
|
type: "separator",
|
|
53458
53462
|
name: "separator",
|
|
53459
53463
|
isNarrow: true
|
|
53460
|
-
}),
|
|
53464
|
+
}), d = _({
|
|
53461
53465
|
type: "button",
|
|
53462
53466
|
name: "italic",
|
|
53463
53467
|
command: "toggleItalic",
|
|
53464
53468
|
icon: e.italic,
|
|
53465
53469
|
tooltip: "Italic"
|
|
53466
|
-
}),
|
|
53470
|
+
}), c3 = _({
|
|
53467
53471
|
type: "button",
|
|
53468
53472
|
name: "underline",
|
|
53469
53473
|
command: "toggleUnderline",
|
|
@@ -53548,12 +53552,12 @@ ${t}
|
|
|
53548
53552
|
})
|
|
53549
53553
|
]);
|
|
53550
53554
|
}
|
|
53551
|
-
const
|
|
53555
|
+
const v = _({
|
|
53552
53556
|
type: "options",
|
|
53553
53557
|
name: "linkInput",
|
|
53554
53558
|
command: "toggleLink"
|
|
53555
53559
|
});
|
|
53556
|
-
h$1.childItem =
|
|
53560
|
+
h$1.childItem = v, v.parentItem = h$1;
|
|
53557
53561
|
const D3 = _({
|
|
53558
53562
|
type: "button",
|
|
53559
53563
|
name: "image",
|
|
@@ -53708,13 +53712,13 @@ ${t}
|
|
|
53708
53712
|
justify: e.alignJustify
|
|
53709
53713
|
}, se2 = P[A] ?? P.left;
|
|
53710
53714
|
m.icon.value = se2;
|
|
53711
|
-
},
|
|
53715
|
+
}, ve2 = _({
|
|
53712
53716
|
type: "button",
|
|
53713
53717
|
name: "list",
|
|
53714
53718
|
command: "toggleBulletList",
|
|
53715
53719
|
icon: e.bulletList,
|
|
53716
53720
|
tooltip: "Bullet list"
|
|
53717
|
-
}),
|
|
53721
|
+
}), ge2 = _({
|
|
53718
53722
|
type: "button",
|
|
53719
53723
|
name: "numberedlist",
|
|
53720
53724
|
command: "toggleOrderedList",
|
|
@@ -53835,8 +53839,8 @@ ${t}
|
|
|
53835
53839
|
});
|
|
53836
53840
|
[
|
|
53837
53841
|
i3,
|
|
53838
|
-
|
|
53839
|
-
|
|
53842
|
+
d,
|
|
53843
|
+
c3,
|
|
53840
53844
|
de$12,
|
|
53841
53845
|
ce2,
|
|
53842
53846
|
// search,
|
|
@@ -54005,35 +54009,35 @@ ${t}
|
|
|
54005
54009
|
// toggleTrackChangesOriginal,
|
|
54006
54010
|
// toggleTrackChangesFinal,
|
|
54007
54011
|
M3,
|
|
54008
|
-
d,
|
|
54009
|
-
c3,
|
|
54010
|
-
a,
|
|
54011
|
-
c3,
|
|
54012
|
-
i3,
|
|
54013
54012
|
u,
|
|
54014
54013
|
r,
|
|
54014
|
+
s,
|
|
54015
|
+
r,
|
|
54016
|
+
i3,
|
|
54017
|
+
d,
|
|
54018
|
+
c3,
|
|
54015
54019
|
y,
|
|
54016
54020
|
b,
|
|
54017
|
-
|
|
54021
|
+
r,
|
|
54018
54022
|
h$1,
|
|
54019
54023
|
D3,
|
|
54020
54024
|
L3,
|
|
54021
54025
|
C,
|
|
54022
|
-
|
|
54026
|
+
r,
|
|
54023
54027
|
B,
|
|
54024
|
-
ge2,
|
|
54025
54028
|
ve2,
|
|
54029
|
+
ge2,
|
|
54026
54030
|
ce2,
|
|
54027
54031
|
de$12,
|
|
54028
54032
|
re2,
|
|
54029
|
-
|
|
54033
|
+
r,
|
|
54030
54034
|
be2,
|
|
54031
|
-
|
|
54035
|
+
r,
|
|
54032
54036
|
me2,
|
|
54033
54037
|
Fe2,
|
|
54034
54038
|
Te2,
|
|
54035
54039
|
ye2,
|
|
54036
|
-
|
|
54040
|
+
a,
|
|
54037
54041
|
T3,
|
|
54038
54042
|
ee2
|
|
54039
54043
|
// search,
|
|
@@ -54045,7 +54049,7 @@ ${t}
|
|
|
54045
54049
|
O = O.filter((A) => !S3.includes(A.name.value));
|
|
54046
54050
|
}
|
|
54047
54051
|
const Pe2 = [X3, ue2, Ce2];
|
|
54048
|
-
|
|
54052
|
+
l || (n === "viewer" && Pe2.push(Z3, ae2), O = O.filter((m) => !Pe2.includes(m)));
|
|
54049
54053
|
const rt2 = [H3, T3, ee2].map((m) => m.name), ct2 = (m) => rt2.includes(m.name), Ee2 = [], De2 = [];
|
|
54050
54054
|
let $e2 = st2 + it2;
|
|
54051
54055
|
return O.forEach((m) => {
|
|
@@ -54073,86 +54077,86 @@ ${t}
|
|
|
54073
54077
|
}, Zn = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"], Yn = () => {
|
|
54074
54078
|
let t = document.createElement("input");
|
|
54075
54079
|
t.type = "file";
|
|
54076
|
-
let
|
|
54077
|
-
return t.accept =
|
|
54080
|
+
let l = Zn;
|
|
54081
|
+
return t.accept = l.join(","), () => new Promise((n, e) => {
|
|
54078
54082
|
t.onchange = async () => {
|
|
54079
54083
|
const i3 = t.files;
|
|
54080
54084
|
if (!i3) return n(null);
|
|
54081
|
-
const
|
|
54082
|
-
return n(
|
|
54085
|
+
const u = i3.item(0);
|
|
54086
|
+
return n(u ? { file: u } : null);
|
|
54083
54087
|
}, t.oncancel = () => n(null), t.onerror = e, t.click();
|
|
54084
54088
|
});
|
|
54085
|
-
}, Jn = (t) => new Promise((
|
|
54089
|
+
}, Jn = (t) => new Promise((l, o) => {
|
|
54086
54090
|
let n = new FileReader();
|
|
54087
|
-
n.onload = (e) =>
|
|
54088
|
-
}), Qn = (t,
|
|
54091
|
+
n.onload = (e) => l(e.target.result), n.onerror = o, setTimeout(() => n.readAsDataURL(t), 250);
|
|
54092
|
+
}), Qn = (t, l) => new Promise((o, n) => {
|
|
54089
54093
|
const e = new window.Image();
|
|
54090
54094
|
e.onload = () => {
|
|
54091
|
-
const i3 = document.createElement("canvas"), { width:
|
|
54095
|
+
const i3 = document.createElement("canvas"), { width: u, height: a } = eo(
|
|
54092
54096
|
e.width,
|
|
54093
54097
|
e.height,
|
|
54094
|
-
|
|
54098
|
+
l
|
|
54095
54099
|
);
|
|
54096
|
-
if (i3.width =
|
|
54097
|
-
const
|
|
54098
|
-
o(
|
|
54100
|
+
if (i3.width = u, i3.height = a, i3.getContext("2d").drawImage(e, 0, 0, u, a), typeof t == "string") {
|
|
54101
|
+
const r = i3.toDataURL();
|
|
54102
|
+
o(r);
|
|
54099
54103
|
} else
|
|
54100
|
-
i3.toBlob((
|
|
54101
|
-
const
|
|
54104
|
+
i3.toBlob((r) => {
|
|
54105
|
+
const d = new File([r], t.name, {
|
|
54102
54106
|
type: t.type,
|
|
54103
54107
|
lastModified: Date.now()
|
|
54104
54108
|
});
|
|
54105
|
-
o({ file:
|
|
54109
|
+
o({ file: d, width: u, height: a });
|
|
54106
54110
|
});
|
|
54107
54111
|
}, e.onerror = (i3) => n(i3), e.src = typeof t == "string" ? t : URL.createObjectURL(t);
|
|
54108
|
-
}), eo = (t,
|
|
54112
|
+
}), eo = (t, l, o) => {
|
|
54109
54113
|
const { width: n, height: e } = o.getMaxContentSize();
|
|
54110
|
-
if (!n || !e) return { width: t, height:
|
|
54111
|
-
let i3 = t,
|
|
54112
|
-
const
|
|
54113
|
-
return
|
|
54114
|
-
}, to = async ({ editor: t, view:
|
|
54114
|
+
if (!n || !e) return { width: t, height: l };
|
|
54115
|
+
let i3 = t, u = l;
|
|
54116
|
+
const a = t / l;
|
|
54117
|
+
return l > e && (u = e, i3 = Math.round(e * a)), i3 > n && (i3 = n, u = Math.round(n / a)), { width: i3, height: u };
|
|
54118
|
+
}, to = async ({ editor: t, view: l, file: o }) => {
|
|
54115
54119
|
let n = typeof t.options.handleImageUpload == "function" ? t.options.handleImageUpload : Jn;
|
|
54116
54120
|
if ((o.size / (1024 * 1024)).toFixed(4) > 5) {
|
|
54117
54121
|
window.alert("Image size must be less than 5MB");
|
|
54118
54122
|
return;
|
|
54119
54123
|
}
|
|
54120
|
-
let i3,
|
|
54124
|
+
let i3, u;
|
|
54121
54125
|
try {
|
|
54122
|
-
const
|
|
54123
|
-
i3 =
|
|
54124
|
-
} catch (
|
|
54125
|
-
console.warn("Error processing image:",
|
|
54126
|
+
const c3 = await Qn(o, t);
|
|
54127
|
+
i3 = c3.width, u = c3.height, o = c3.file;
|
|
54128
|
+
} catch (c3) {
|
|
54129
|
+
console.warn("Error processing image:", c3);
|
|
54126
54130
|
return;
|
|
54127
54131
|
}
|
|
54128
|
-
let
|
|
54129
|
-
|
|
54130
|
-
let
|
|
54132
|
+
let a = {}, { tr: s, schema: r } = l.state;
|
|
54133
|
+
s.selection.empty || s.deleteSelection();
|
|
54134
|
+
let d = {
|
|
54131
54135
|
type: "add",
|
|
54132
|
-
pos:
|
|
54133
|
-
id:
|
|
54136
|
+
pos: s.selection.from,
|
|
54137
|
+
id: a
|
|
54134
54138
|
};
|
|
54135
|
-
|
|
54136
|
-
(
|
|
54137
|
-
let b = o.name.replace(" ", "_"), y = aC(
|
|
54139
|
+
s.setMeta(To$1, d), l.dispatch(s), n(o).then(
|
|
54140
|
+
(c3) => {
|
|
54141
|
+
let b = o.name.replace(" ", "_"), y = aC(l.state, a);
|
|
54138
54142
|
if (y == null)
|
|
54139
54143
|
return;
|
|
54140
|
-
let h3 = { type: "remove", id:
|
|
54144
|
+
let h3 = { type: "remove", id: a }, E3 = `word/media/${b}`, v = r.nodes.image.create({
|
|
54141
54145
|
src: E3,
|
|
54142
|
-
size: { width: i3, height:
|
|
54146
|
+
size: { width: i3, height: u }
|
|
54143
54147
|
});
|
|
54144
|
-
t.storage.image.media = Object.assign(t.storage.image.media, { [E3]:
|
|
54145
|
-
|
|
54148
|
+
t.storage.image.media = Object.assign(t.storage.image.media, { [E3]: c3 }), t.options.ydoc && t.commands.addImageToCollaboration({ mediaPath: E3, fileData: c3 }), l.dispatch(
|
|
54149
|
+
l.state.tr.replaceWith(y, y, v).setMeta(To$1, h3)
|
|
54146
54150
|
);
|
|
54147
54151
|
},
|
|
54148
54152
|
() => {
|
|
54149
|
-
let
|
|
54150
|
-
|
|
54153
|
+
let c3 = { type: "remove", id: a };
|
|
54154
|
+
l.dispatch(s.setMeta(To$1, c3));
|
|
54151
54155
|
}
|
|
54152
54156
|
);
|
|
54153
54157
|
};
|
|
54154
54158
|
var I, et, he, ze, tt, nt, We, ot, fe;
|
|
54155
|
-
class
|
|
54159
|
+
class wo extends Vt {
|
|
54156
54160
|
constructor(o) {
|
|
54157
54161
|
super();
|
|
54158
54162
|
Be(this, I);
|
|
@@ -54174,8 +54178,8 @@ ${t}
|
|
|
54174
54178
|
o22.onActivate({ zoom: n22 }), this.emit("superdoc-command", { item: o22, argument: n22 });
|
|
54175
54179
|
const e = document.querySelector(this.superdoc.config.selector)?.querySelector(".layers");
|
|
54176
54180
|
if (!e) return;
|
|
54177
|
-
const i3 = typeof screen.orientation < "u",
|
|
54178
|
-
i3 &&
|
|
54181
|
+
const i3 = typeof screen.orientation < "u", u = window.matchMedia("(max-width: 834px)").matches;
|
|
54182
|
+
i3 && u ? (e.style.transformOrigin = "0 0", e.style.transform = `scale(${parseInt(n22) / 100})`) : e.style.zoom = parseInt(n22) / 100, this.superdoc.superdocStore.activeZoom = parseInt(n22);
|
|
54179
54183
|
},
|
|
54180
54184
|
setDocumentMode: ({ item: o22, argument: n22 }) => {
|
|
54181
54185
|
n22 && this.emit("superdoc-command", { item: o22, argument: n22 });
|
|
@@ -54209,13 +54213,13 @@ ${t}
|
|
|
54209
54213
|
},
|
|
54210
54214
|
increaseTextIndent: ({ item: o22, argument: n22 }) => {
|
|
54211
54215
|
let e = o22.command, { state: i3 } = this.activeEditor;
|
|
54212
|
-
if (He$2((
|
|
54216
|
+
if (He$2((a) => a.type.name === "listItem")(i3.selection))
|
|
54213
54217
|
return this.activeEditor.commands.increaseListIndent();
|
|
54214
54218
|
e in this.activeEditor.commands && this.activeEditor.commands[e](n22);
|
|
54215
54219
|
},
|
|
54216
54220
|
decreaseTextIndent: ({ item: o22, argument: n22 }) => {
|
|
54217
54221
|
let e = o22.command, { state: i3 } = this.activeEditor;
|
|
54218
|
-
if (He$2((
|
|
54222
|
+
if (He$2((a) => a.type.name === "listItem")(i3.selection))
|
|
54219
54223
|
return this.activeEditor.commands.decreaseListIndent();
|
|
54220
54224
|
e in this.activeEditor.commands && this.activeEditor.commands[e](n22);
|
|
54221
54225
|
},
|
|
@@ -54235,8 +54239,8 @@ ${t}
|
|
|
54235
54239
|
let e = o22.command;
|
|
54236
54240
|
if (e in this.activeEditor.commands) {
|
|
54237
54241
|
this.activeEditor.commands[e](n22);
|
|
54238
|
-
const { view: i3 } = this.activeEditor,
|
|
54239
|
-
i3.updateState(
|
|
54242
|
+
const { view: i3 } = this.activeEditor, u = i3.state.selection.$to.pos, a = new tt$3(i3.state.doc.resolve(u)), s = i3.state.tr.setSelection(a), r = i3.state.apply(s);
|
|
54243
|
+
i3.updateState(r), setTimeout(() => {
|
|
54240
54244
|
i3.focus();
|
|
54241
54245
|
}, 100);
|
|
54242
54246
|
}
|
|
@@ -54295,10 +54299,25 @@ ${t}
|
|
|
54295
54299
|
this.toolbarItems.forEach((e) => {
|
|
54296
54300
|
if (e.resetDisabled(), e.name.value === "linkedStyles")
|
|
54297
54301
|
return this.activeEditor && !oC(this.activeEditor).length ? e.deactivate() : e.activate();
|
|
54298
|
-
const i3 = o.find((
|
|
54302
|
+
const i3 = o.find((s) => s.name === e.name.value);
|
|
54299
54303
|
i3 ? e.activate(i3.attrs) : e.deactivate();
|
|
54300
|
-
const
|
|
54301
|
-
|
|
54304
|
+
const u = o.find((s) => s.name === "styleId");
|
|
54305
|
+
if (u?.attrs.styleId) {
|
|
54306
|
+
const s = {
|
|
54307
|
+
fontSize: "font-size",
|
|
54308
|
+
fontFamily: "font-family",
|
|
54309
|
+
bold: "bold",
|
|
54310
|
+
textAlign: "textAlign"
|
|
54311
|
+
}, r = this.activeEditor.converter?.linkedStyles.find((d) => d.id === u.attrs.styleId);
|
|
54312
|
+
if (s[e.name.value] in r?.definition.styles) {
|
|
54313
|
+
const d = {
|
|
54314
|
+
[e.name.value]: r?.definition.styles[s[e.name.value]]
|
|
54315
|
+
};
|
|
54316
|
+
e.activate(d);
|
|
54317
|
+
}
|
|
54318
|
+
}
|
|
54319
|
+
const a = o.find((s) => s.name === "spacing");
|
|
54320
|
+
e.name.value === "lineHeight" && (i3?.attrs?.lineHeight || a) && (e.selectedValue.value = i3?.attrs?.lineHeight || a.attrs?.spacing?.line || ""), e.name.value === "tableActions" && (e.disabled.value = !n);
|
|
54302
54321
|
});
|
|
54303
54322
|
}
|
|
54304
54323
|
/**
|
|
@@ -54328,31 +54347,31 @@ ${t}
|
|
|
54328
54347
|
I = /* @__PURE__ */ new WeakSet(), et = function() {
|
|
54329
54348
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
54330
54349
|
}, he = /* @__PURE__ */ new WeakMap(), ze = function(o, n, e = false) {
|
|
54331
|
-
const i3 = document.documentElement.clientWidth, { defaultItems:
|
|
54332
|
-
let
|
|
54333
|
-
...
|
|
54334
|
-
...
|
|
54350
|
+
const i3 = document.documentElement.clientWidth, { defaultItems: u, overflowItems: a } = Xn(o, e, i3, this.role, n);
|
|
54351
|
+
let s = [
|
|
54352
|
+
...u.map((d) => d.name.value),
|
|
54353
|
+
...a.map((d) => d.name.value)
|
|
54335
54354
|
];
|
|
54336
|
-
this.config.groups && (
|
|
54337
|
-
const
|
|
54338
|
-
this.toolbarItems =
|
|
54355
|
+
this.config.groups && (s = Object.values(this.config.groups).flatMap((d) => d));
|
|
54356
|
+
const r = u.filter((d) => s.includes(d.name.value)).filter((d) => !this.config.excludeItems.includes(d.name.value));
|
|
54357
|
+
this.toolbarItems = r, this.overflowItems = a.filter((d) => s.includes(d.name.value));
|
|
54339
54358
|
}, tt = function() {
|
|
54340
54359
|
if (!this.activeEditor || !this.activeEditor.converter) return;
|
|
54341
|
-
const { typeface: o = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, e = this.toolbarItems.find((
|
|
54360
|
+
const { typeface: o = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, e = this.toolbarItems.find((u) => u.name.value === "fontSize");
|
|
54342
54361
|
e && (e.defaultLabel.value = n);
|
|
54343
|
-
const i3 = this.toolbarItems.find((
|
|
54362
|
+
const i3 = this.toolbarItems.find((u) => u.name.value === "fontFamily");
|
|
54344
54363
|
i3 && (i3.defaultLabel.value = o);
|
|
54345
54364
|
}, nt = function() {
|
|
54346
54365
|
if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
|
|
54347
|
-
const o = this.toolbarItems.find((
|
|
54348
|
-
const
|
|
54349
|
-
return
|
|
54350
|
-
}, []),
|
|
54366
|
+
const o = this.toolbarItems.find((a) => a.name.value === "highlight"), n = Hn(), e = 7, i3 = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, s, r) => {
|
|
54367
|
+
const d = Math.floor(r / e);
|
|
54368
|
+
return a[d] || (a[d] = []), n.includes(s) || a[d].push(f(s)), a;
|
|
54369
|
+
}, []), u = {
|
|
54351
54370
|
key: "color",
|
|
54352
54371
|
type: "render",
|
|
54353
54372
|
render: () => Ne(this, o, i3)
|
|
54354
54373
|
};
|
|
54355
|
-
o.nestedOptions.value = [
|
|
54374
|
+
o.nestedOptions.value = [u];
|
|
54356
54375
|
}, We = function() {
|
|
54357
54376
|
this.activeEditor = null, this.toolbarItems.forEach((o) => {
|
|
54358
54377
|
const { allowWithoutEditor: n } = o;
|
|
@@ -54365,36 +54384,36 @@ ${t}
|
|
|
54365
54384
|
let i3 = o.command;
|
|
54366
54385
|
i3 in this.activeEditor?.commands && (this.activeEditor.commands[i3](n), typeof e == "function" && e(n), this.updateToolbarState());
|
|
54367
54386
|
};
|
|
54368
|
-
function no(t,
|
|
54369
|
-
if (!t.value || !
|
|
54370
|
-
const o =
|
|
54387
|
+
function no(t, l) {
|
|
54388
|
+
if (!t.value || !l?.value?.options?.scale) return;
|
|
54389
|
+
const o = l.value.options.scale, n = t.value.getBoundingClientRect(), e = t.value.querySelectorAll(".pagination-break-wrapper");
|
|
54371
54390
|
let i3;
|
|
54372
|
-
e.forEach((
|
|
54373
|
-
const
|
|
54374
|
-
if (i3 || (i3 =
|
|
54375
|
-
const
|
|
54376
|
-
|
|
54391
|
+
e.forEach((u) => {
|
|
54392
|
+
const s = (u.getBoundingClientRect().left - n.left) / o * -1 + 1;
|
|
54393
|
+
if (i3 || (i3 = s), s !== i3) {
|
|
54394
|
+
const r = s - i3;
|
|
54395
|
+
u.style.transform = `translateX(${r}px)`;
|
|
54377
54396
|
}
|
|
54378
54397
|
});
|
|
54379
54398
|
}
|
|
54380
|
-
const oo = (t,
|
|
54381
|
-
const o = t.clientY, n = t.clientX, { view: e } =
|
|
54382
|
-
let
|
|
54399
|
+
const oo = (t, l) => {
|
|
54400
|
+
const o = t.clientY, n = t.clientX, { view: e } = l, i3 = e.dom.getBoundingClientRect();
|
|
54401
|
+
let u = {
|
|
54383
54402
|
left: 0,
|
|
54384
54403
|
top: o
|
|
54385
|
-
},
|
|
54386
|
-
n > i3.right ? (
|
|
54387
|
-
const
|
|
54388
|
-
if (
|
|
54389
|
-
let
|
|
54390
|
-
if (
|
|
54391
|
-
const b = e.state.doc.resolve(
|
|
54392
|
-
|
|
54404
|
+
}, a = false;
|
|
54405
|
+
n > i3.right ? (u.left = i3.left + i3.width - 1, a = true) : n < i3.left && (u.left = i3.left);
|
|
54406
|
+
const s = e.posAtCoords(u)?.pos;
|
|
54407
|
+
if (s) {
|
|
54408
|
+
let r = s;
|
|
54409
|
+
if (a) {
|
|
54410
|
+
const b = e.state.doc.resolve(s).textOffset, y = e.state.doc.nodeAt(s), E3 = y?.text?.charAt(b);
|
|
54411
|
+
r = y?.isText && E3 !== " " ? s - 1 : s;
|
|
54393
54412
|
}
|
|
54394
|
-
const
|
|
54395
|
-
tt$3.create(e.state.doc,
|
|
54413
|
+
const d = e.state.tr.setSelection(
|
|
54414
|
+
tt$3.create(e.state.doc, r)
|
|
54396
54415
|
);
|
|
54397
|
-
e.dispatch(
|
|
54416
|
+
e.dispatch(d), e.focus();
|
|
54398
54417
|
}
|
|
54399
54418
|
}, io = { class: "numbering" }, Ae = 200, so = "flex-end", lo = {
|
|
54400
54419
|
__name: "Ruler",
|
|
@@ -54413,13 +54432,13 @@ ${t}
|
|
|
54413
54432
|
}
|
|
54414
54433
|
},
|
|
54415
54434
|
emits: ["margin-change"],
|
|
54416
|
-
setup(t, { emit:
|
|
54417
|
-
const o =
|
|
54418
|
-
let
|
|
54435
|
+
setup(t, { emit: l }) {
|
|
54436
|
+
const o = l, n = t, e = ref(null), i3 = ref([]), u = ref("#CCCCCC"), a = ref("#2563EB66"), s = ref(null), r = ref(null), d = ref(false), c3 = ref(null), b = reactive({ side: "left", x: 0 }), y = reactive({ side: "right", x: 0 }), h3 = ref(false), E3 = ref(0);
|
|
54437
|
+
let v = 0;
|
|
54419
54438
|
const D3 = () => {
|
|
54420
54439
|
if (n.editor.options.mode !== "docx") return;
|
|
54421
54440
|
const T3 = [], { pageMargins: M3, pageSize: H3 } = n.editor.getPageStyles();
|
|
54422
|
-
|
|
54441
|
+
s.value = H3, r.value = M3, y.x = H3.width * 96 - M3.right * 96, b.x = M3.left * 96;
|
|
54423
54442
|
for (let R = 0; R < H3.width; R++) {
|
|
54424
54443
|
const Z3 = `${5.5}px`, ae2 = H3.width - R;
|
|
54425
54444
|
if (T3.push(...L3(1, "main", "20%", Z3, R)), T3.push(...L3(3, "eighth", "10%", Z3)), T3.push(...L3(1, "half", "40%", Z3)), ae2 <= 0.5) break;
|
|
@@ -54447,33 +54466,33 @@ ${t}
|
|
|
54447
54466
|
if (!e.value) return;
|
|
54448
54467
|
const H3 = e.value.parentElement.querySelector(".super-editor").getBoundingClientRect();
|
|
54449
54468
|
return {
|
|
54450
|
-
left: `${
|
|
54469
|
+
left: `${c3.value.x}px`,
|
|
54451
54470
|
minHeight: `${H3.height}px`
|
|
54452
54471
|
};
|
|
54453
54472
|
}), z = (T3) => {
|
|
54454
|
-
|
|
54473
|
+
d.value = true, ve2();
|
|
54455
54474
|
const M3 = T3.currentTarget.id;
|
|
54456
|
-
|
|
54475
|
+
c3.value = M3 === "left-margin-handle" ? b : y, E3.value = c3.value.x, v = T3.clientX - c3.value.x, h3.value = true;
|
|
54457
54476
|
}, B = (T3) => {
|
|
54458
|
-
if (!
|
|
54459
|
-
const M3 = T3.clientX -
|
|
54460
|
-
|
|
54477
|
+
if (!d.value) return;
|
|
54478
|
+
const M3 = T3.clientX - v;
|
|
54479
|
+
c3.value.x = M3, c3.value.side === "left" ? M3 <= 0 ? c3.value.x = 0 : M3 >= y.x - Ae && (c3.value.x = y.x - Ae) : M3 >= s.value.width * 96 ? c3.value.x = s.value.width * 96 : M3 <= b.x + Ae && (c3.value.x = b.x + Ae);
|
|
54461
54480
|
}, q3 = () => {
|
|
54462
|
-
if (
|
|
54481
|
+
if (d.value = false, h3.value = false, ge2(), c3.value && c3.value.x !== E3.value) {
|
|
54463
54482
|
const T3 = ce2();
|
|
54464
54483
|
o("margin-change", {
|
|
54465
|
-
side:
|
|
54484
|
+
side: c3.value.side,
|
|
54466
54485
|
value: T3
|
|
54467
54486
|
});
|
|
54468
54487
|
}
|
|
54469
|
-
}, ge2 = () => {
|
|
54470
|
-
d.value = l.value;
|
|
54471
54488
|
}, ve2 = () => {
|
|
54472
|
-
|
|
54473
|
-
},
|
|
54489
|
+
u.value = a.value;
|
|
54490
|
+
}, ge2 = () => {
|
|
54491
|
+
u.value = "#CCC";
|
|
54492
|
+
}, ce2 = () => c3.value.side === "left" ? c3.value.x / 96 : (s.value.width * 96 - c3.value.x) / 96, de2 = computed(() => ({
|
|
54474
54493
|
"--alignment": so,
|
|
54475
|
-
"--ruler-handle-color":
|
|
54476
|
-
"--ruler-handle-active-color":
|
|
54494
|
+
"--ruler-handle-color": u.value,
|
|
54495
|
+
"--ruler-handle-active-color": a.value
|
|
54477
54496
|
}));
|
|
54478
54497
|
return onMounted(() => {
|
|
54479
54498
|
i3.value = D3(), window.addEventListener("mousemove", B), window.addEventListener("mouseup", q3);
|
|
@@ -54551,18 +54570,18 @@ ${t}
|
|
|
54551
54570
|
"comments-loaded",
|
|
54552
54571
|
"selection-update"
|
|
54553
54572
|
],
|
|
54554
|
-
setup(t, { emit:
|
|
54555
|
-
const o =
|
|
54556
|
-
let
|
|
54557
|
-
const
|
|
54558
|
-
clearTimeout(
|
|
54559
|
-
},
|
|
54573
|
+
setup(t, { emit: l }) {
|
|
54574
|
+
const o = l, n = t, e = ref(false), i3 = shallowRef(null), u = ref(null), a = ref(null);
|
|
54575
|
+
let s;
|
|
54576
|
+
const r = () => {
|
|
54577
|
+
clearTimeout(s);
|
|
54578
|
+
}, d = (p3, C = 10, F3 = 500) => {
|
|
54560
54579
|
const z = p3.getMap("meta"), B = () => {
|
|
54561
54580
|
const q3 = z.get("docx");
|
|
54562
|
-
q3 ? (
|
|
54581
|
+
q3 ? (r(), h3({ content: q3 })) : C > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${C}`), s = setTimeout(B, F3), C--) : console.warn("Failed to load docx data from meta map.");
|
|
54563
54582
|
};
|
|
54564
54583
|
B();
|
|
54565
|
-
},
|
|
54584
|
+
}, c3 = async () => {
|
|
54566
54585
|
try {
|
|
54567
54586
|
const [p3, C, F3, z] = await qi$1.loadXmlData(n.fileSource);
|
|
54568
54587
|
return { content: p3, media: C, mediaFiles: F3, fonts: z };
|
|
@@ -54571,12 +54590,12 @@ ${t}
|
|
|
54571
54590
|
}
|
|
54572
54591
|
}, b = async () => {
|
|
54573
54592
|
if (n.fileSource) {
|
|
54574
|
-
const p3 = await
|
|
54593
|
+
const p3 = await c3();
|
|
54575
54594
|
return h3(p3);
|
|
54576
54595
|
} else if (n.options.ydoc && n.options.collaborationProvider) {
|
|
54577
54596
|
delete n.options.content;
|
|
54578
54597
|
const p3 = n.options.ydoc, C = n.options.collaborationProvider, F3 = () => {
|
|
54579
|
-
|
|
54598
|
+
d(p3), C.off("synced", F3);
|
|
54580
54599
|
};
|
|
54581
54600
|
C.on("synced", F3);
|
|
54582
54601
|
}
|
|
@@ -54586,7 +54605,7 @@ ${t}
|
|
|
54586
54605
|
}, h3 = async ({ content: p3, media: C = {}, mediaFiles: F3 = {}, fonts: z = {} } = {}) => {
|
|
54587
54606
|
i3.value = new qi$1({
|
|
54588
54607
|
mode: "docx",
|
|
54589
|
-
element:
|
|
54608
|
+
element: a.value,
|
|
54590
54609
|
fileSource: n.fileSource,
|
|
54591
54610
|
extensions: y(),
|
|
54592
54611
|
externalExtensions: n.options.externalExtensions,
|
|
@@ -54597,7 +54616,7 @@ ${t}
|
|
|
54597
54616
|
fonts: z,
|
|
54598
54617
|
...n.options
|
|
54599
54618
|
}), i3.value.on("paginationUpdate", () => {
|
|
54600
|
-
no(
|
|
54619
|
+
no(a, i3);
|
|
54601
54620
|
}), i3.value.on("collaborationReady", () => {
|
|
54602
54621
|
setTimeout(() => {
|
|
54603
54622
|
e.value = true;
|
|
@@ -54605,9 +54624,9 @@ ${t}
|
|
|
54605
54624
|
});
|
|
54606
54625
|
}, E3 = (p3) => {
|
|
54607
54626
|
o("editor-keydown", { editor: i3.value });
|
|
54608
|
-
},
|
|
54627
|
+
}, v = (p3) => {
|
|
54609
54628
|
o("editor-click", { editor: i3.value });
|
|
54610
|
-
let C =
|
|
54629
|
+
let C = a.value?.querySelector(".ProseMirror");
|
|
54611
54630
|
if (!C || !i3.value)
|
|
54612
54631
|
return;
|
|
54613
54632
|
!C.contains(p3.target) && i3.value.isEditable && i3.value.view?.focus();
|
|
@@ -54623,7 +54642,7 @@ ${t}
|
|
|
54623
54642
|
i3.value?.updatePageStyle({ pageMargins: B });
|
|
54624
54643
|
};
|
|
54625
54644
|
return onBeforeUnmount(() => {
|
|
54626
|
-
|
|
54645
|
+
r(), i3.value?.destroy(), i3.value = null;
|
|
54627
54646
|
}), (p3, C) => (openBlock(), createElementBlock("div", ro, [
|
|
54628
54647
|
t.options.rulers && i3.value ? (openBlock(), createBlock(ao, {
|
|
54629
54648
|
key: 0,
|
|
@@ -54634,14 +54653,14 @@ ${t}
|
|
|
54634
54653
|
createBaseVNode("div", {
|
|
54635
54654
|
class: "super-editor",
|
|
54636
54655
|
ref_key: "editorWrapper",
|
|
54637
|
-
ref:
|
|
54656
|
+
ref: u,
|
|
54638
54657
|
onKeydown: E3,
|
|
54639
|
-
onClick:
|
|
54658
|
+
onClick: v,
|
|
54640
54659
|
onMousedown: D3
|
|
54641
54660
|
}, [
|
|
54642
54661
|
createBaseVNode("div", {
|
|
54643
54662
|
ref_key: "editorElem",
|
|
54644
|
-
ref:
|
|
54663
|
+
ref: a,
|
|
54645
54664
|
class: "editor-element super-editor__element"
|
|
54646
54665
|
}, null, 512)
|
|
54647
54666
|
], 544),
|
|
@@ -54715,16 +54734,16 @@ ${t}
|
|
|
54715
54734
|
}
|
|
54716
54735
|
},
|
|
54717
54736
|
emits: ["update:modelValue", "focus", "blur"],
|
|
54718
|
-
setup(t, { emit:
|
|
54719
|
-
const o =
|
|
54737
|
+
setup(t, { emit: l }) {
|
|
54738
|
+
const o = l, n = t, e = shallowRef(), i3 = ref(null), u = ref(false), a = ({ editor: y, transaction: h3 }) => {
|
|
54720
54739
|
const E3 = y.getHTML();
|
|
54721
54740
|
o("update:modelValue", E3);
|
|
54722
|
-
},
|
|
54723
|
-
|
|
54724
|
-
},
|
|
54725
|
-
|
|
54726
|
-
},
|
|
54727
|
-
Zw.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction =
|
|
54741
|
+
}, s = ({ editor: y, transaction: h3 }) => {
|
|
54742
|
+
u.value = true, b(), o("focus", { editor: y, transaction: h3 });
|
|
54743
|
+
}, r = ({ editor: y, transaction: h3 }) => {
|
|
54744
|
+
u.value = false, o("blur", { editor: y, transaction: h3 });
|
|
54745
|
+
}, d = async () => {
|
|
54746
|
+
Zw.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction = a, n.options.onFocus = s, n.options.onBlur = r, e.value = new qi$1({
|
|
54728
54747
|
mode: "text",
|
|
54729
54748
|
content: document.getElementById("currentContent"),
|
|
54730
54749
|
element: i3.value,
|
|
@@ -54732,18 +54751,18 @@ ${t}
|
|
|
54732
54751
|
users: n.users,
|
|
54733
54752
|
...n.options
|
|
54734
54753
|
});
|
|
54735
|
-
},
|
|
54736
|
-
|
|
54754
|
+
}, c3 = () => {
|
|
54755
|
+
u.value = true, e.value?.view?.focus();
|
|
54737
54756
|
}, b = () => {
|
|
54738
54757
|
e.value?.setOptions({ users: n.users });
|
|
54739
54758
|
};
|
|
54740
54759
|
return onMounted(() => {
|
|
54741
|
-
|
|
54760
|
+
d();
|
|
54742
54761
|
}), onBeforeUnmount(() => {
|
|
54743
54762
|
e.value?.destroy(), e.value = null;
|
|
54744
54763
|
}), (y, h3) => (openBlock(), createElementBlock("div", {
|
|
54745
|
-
class: normalizeClass(["super-editor super-input", { "super-input-active":
|
|
54746
|
-
onClick: withModifiers(
|
|
54764
|
+
class: normalizeClass(["super-editor super-input", { "super-input-active": u.value }]),
|
|
54765
|
+
onClick: withModifiers(c3, ["stop", "prevent"])
|
|
54747
54766
|
}, [
|
|
54748
54767
|
createBaseVNode("div", {
|
|
54749
54768
|
id: "currentContent",
|
|
@@ -69718,7 +69737,7 @@ ${style2}
|
|
|
69718
69737
|
this.config.colors = shuffleArray(this.config.colors);
|
|
69719
69738
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
69720
69739
|
this.colorIndex = 0;
|
|
69721
|
-
this.version = "0.10.
|
|
69740
|
+
this.version = "0.10.35";
|
|
69722
69741
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
69723
69742
|
this.superdocId = config.superdocId || v4();
|
|
69724
69743
|
this.colors = this.config.colors;
|
|
@@ -69903,7 +69922,7 @@ ${style2}
|
|
|
69903
69922
|
aiApiKey: this.config.modules?.ai?.apiKey,
|
|
69904
69923
|
...moduleConfig
|
|
69905
69924
|
};
|
|
69906
|
-
this.toolbar = new
|
|
69925
|
+
this.toolbar = new wo(config);
|
|
69907
69926
|
this.toolbar.on("superdoc-command", this.onToolbarCommand.bind(this));
|
|
69908
69927
|
this.toolbar.on("ai-highlight", ({ type, data }) => {
|
|
69909
69928
|
this.emit("ai-highlight", { type, data });
|