@harbour-enterprises/superdoc 0.10.59 → 0.10.60
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-zactM06E.es.js → super-editor.es-DAV8U40w.es.js} +6040 -6014
- package/dist/chunks/{super-editor.es-dV6e-64I.cjs → super-editor.es-DvpcRZuO.cjs} +90 -89
- package/dist/style.css +1 -1
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{converter-Cs71TBnr.js → converter-CRhbK35g.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-6jKpuHRM.js → docx-zipper-CjdcrQqy.js} +1 -1
- package/dist/super-editor/chunks/{editor-D2wFJ3Vj.js → editor-DSBSUAKo.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-BdbU1Nep.js → toolbar-Ce8rK_DP.js} +2 -2
- package/dist/super-editor/components/toolbar/color-dropdown-helpers.d.ts +1 -1
- package/dist/super-editor/components/toolbar/color-dropdown-helpers.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/use-toolbar-item.d.ts +1 -0
- package/dist/super-editor/components/toolbar/use-toolbar-item.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 +564 -538
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +8 -8
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +1230 -1204
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
1
|
+
var mt = Object.defineProperty;
|
|
2
2
|
var Ve = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var He = (t, l, o) =>
|
|
5
|
+
var pt = (t, l, o) => l in t ? mt(t, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[l] = o;
|
|
6
|
+
var He = (t, l, o) => pt(t, typeof l != "symbol" ? l + "" : l, o), je = (t, l, o) => l.has(t) || Ve("Cannot " + o);
|
|
7
7
|
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);
|
|
8
8
|
var W = (t, l, o) => (je(t, l, "access private method"), o);
|
|
9
|
-
import { _ as K, a as Ke, b as
|
|
10
|
-
import { C as
|
|
11
|
-
import { a1 as
|
|
12
|
-
import { O as
|
|
13
|
-
import { ref as
|
|
14
|
-
import { t as G, s as Nt, T as zt, N as Y } from "./chunks/toolbar-
|
|
9
|
+
import { _ as K, a as Ke, b as ft, I as Re, f as ht, c as Ue, d as gt, i as vt, u as yt, r as bt, E as Oe, e as wt, P as kt, h as Ct, M as _t, j as xt, A as Et, N as St } from "./chunks/editor-DSBSUAKo.js";
|
|
10
|
+
import { C as Lo, T as Mo, l as Do, n as $o, k as Ho, m as Bo } from "./chunks/editor-DSBSUAKo.js";
|
|
11
|
+
import { a1 as At, y as Tt, a3 as Ft, T as Xe, a as It } from "./chunks/converter-CRhbK35g.js";
|
|
12
|
+
import { O as Oo } from "./chunks/converter-CRhbK35g.js";
|
|
13
|
+
import { ref as y, createElementBlock as k, openBlock as w, createElementVNode as _, unref as D, getCurrentInstance as Lt, computed as j, watch as Mt, onMounted as we, createCommentVNode as Q, withDirectives as Dt, withKeys as $t, normalizeClass as ne, withModifiers as be, vModelText as Ht, createTextVNode as Ze, toDisplayString as oe, Fragment as U, renderList as ee, normalizeStyle as J, createVNode as V, h as N, createApp as Bt, reactive as qe, onUnmounted as Rt, shallowRef as Ye, onBeforeUnmount as Je, createBlock as Ot } from "vue";
|
|
14
|
+
import { t as G, s as Nt, T as zt, N as Y } from "./chunks/toolbar-Ce8rK_DP.js";
|
|
15
15
|
import Wt from "./ai-writer.es.js";
|
|
16
|
-
import { D as
|
|
17
|
-
import { createZip as
|
|
18
|
-
var
|
|
16
|
+
import { D as zo } from "./chunks/docx-zipper-CjdcrQqy.js";
|
|
17
|
+
import { createZip as Po } from "./file-zipper.es.js";
|
|
18
|
+
var Qe = { exports: {} };
|
|
19
19
|
(function(t) {
|
|
20
20
|
var l = Object.prototype.hasOwnProperty, o = "~";
|
|
21
21
|
function n() {
|
|
@@ -24,104 +24,104 @@ var Je = { exports: {} };
|
|
|
24
24
|
function e(s, r, d) {
|
|
25
25
|
this.fn = s, this.context = r, this.once = d || !1;
|
|
26
26
|
}
|
|
27
|
-
function i(s, r, d,
|
|
27
|
+
function i(s, r, d, u, b) {
|
|
28
28
|
if (typeof d != "function")
|
|
29
29
|
throw new TypeError("The listener must be a function");
|
|
30
|
-
var
|
|
31
|
-
return s._events[h] ? s._events[h].fn ? s._events[h] = [s._events[h],
|
|
30
|
+
var v = new e(d, u || s, b), h = o ? o + r : r;
|
|
31
|
+
return s._events[h] ? s._events[h].fn ? s._events[h] = [s._events[h], v] : s._events[h].push(v) : (s._events[h] = v, s._eventsCount++), s;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function c(s, r) {
|
|
34
34
|
--s._eventsCount === 0 ? s._events = new n() : delete s._events[r];
|
|
35
35
|
}
|
|
36
36
|
function a() {
|
|
37
37
|
this._events = new n(), this._eventsCount = 0;
|
|
38
38
|
}
|
|
39
39
|
a.prototype.eventNames = function() {
|
|
40
|
-
var r = [], d,
|
|
40
|
+
var r = [], d, u;
|
|
41
41
|
if (this._eventsCount === 0) return r;
|
|
42
|
-
for (
|
|
43
|
-
l.call(d,
|
|
42
|
+
for (u in d = this._events)
|
|
43
|
+
l.call(d, u) && r.push(o ? u.slice(1) : u);
|
|
44
44
|
return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(d)) : r;
|
|
45
45
|
}, a.prototype.listeners = function(r) {
|
|
46
|
-
var d = o ? o + r : r,
|
|
47
|
-
if (!
|
|
48
|
-
if (
|
|
49
|
-
for (var b = 0,
|
|
50
|
-
h[b] =
|
|
46
|
+
var d = o ? o + r : r, u = this._events[d];
|
|
47
|
+
if (!u) return [];
|
|
48
|
+
if (u.fn) return [u.fn];
|
|
49
|
+
for (var b = 0, v = u.length, h = new Array(v); b < v; b++)
|
|
50
|
+
h[b] = u[b].fn;
|
|
51
51
|
return h;
|
|
52
52
|
}, a.prototype.listenerCount = function(r) {
|
|
53
|
-
var d = o ? o + r : r,
|
|
54
|
-
return
|
|
55
|
-
}, a.prototype.emit = function(r, d,
|
|
53
|
+
var d = o ? o + r : r, u = this._events[d];
|
|
54
|
+
return u ? u.fn ? 1 : u.length : 0;
|
|
55
|
+
}, a.prototype.emit = function(r, d, u, b, v, h) {
|
|
56
56
|
var E = o ? o + r : r;
|
|
57
57
|
if (!this._events[E]) return !1;
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
switch (
|
|
58
|
+
var g = this._events[E], $ = arguments.length, L, p;
|
|
59
|
+
if (g.fn) {
|
|
60
|
+
switch (g.once && this.removeListener(r, g.fn, void 0, !0), $) {
|
|
61
61
|
case 1:
|
|
62
|
-
return
|
|
62
|
+
return g.fn.call(g.context), !0;
|
|
63
63
|
case 2:
|
|
64
|
-
return
|
|
64
|
+
return g.fn.call(g.context, d), !0;
|
|
65
65
|
case 3:
|
|
66
|
-
return
|
|
66
|
+
return g.fn.call(g.context, d, u), !0;
|
|
67
67
|
case 4:
|
|
68
|
-
return
|
|
68
|
+
return g.fn.call(g.context, d, u, b), !0;
|
|
69
69
|
case 5:
|
|
70
|
-
return
|
|
70
|
+
return g.fn.call(g.context, d, u, b, v), !0;
|
|
71
71
|
case 6:
|
|
72
|
-
return
|
|
72
|
+
return g.fn.call(g.context, d, u, b, v, h), !0;
|
|
73
73
|
}
|
|
74
|
-
for (p = 1, L = new Array(
|
|
74
|
+
for (p = 1, L = new Array($ - 1); p < $; p++)
|
|
75
75
|
L[p - 1] = arguments[p];
|
|
76
|
-
|
|
76
|
+
g.fn.apply(g.context, L);
|
|
77
77
|
} else {
|
|
78
|
-
var C =
|
|
78
|
+
var C = g.length, F;
|
|
79
79
|
for (p = 0; p < C; p++)
|
|
80
|
-
switch (
|
|
80
|
+
switch (g[p].once && this.removeListener(r, g[p].fn, void 0, !0), $) {
|
|
81
81
|
case 1:
|
|
82
|
-
|
|
82
|
+
g[p].fn.call(g[p].context);
|
|
83
83
|
break;
|
|
84
84
|
case 2:
|
|
85
|
-
|
|
85
|
+
g[p].fn.call(g[p].context, d);
|
|
86
86
|
break;
|
|
87
87
|
case 3:
|
|
88
|
-
|
|
88
|
+
g[p].fn.call(g[p].context, d, u);
|
|
89
89
|
break;
|
|
90
90
|
case 4:
|
|
91
|
-
|
|
91
|
+
g[p].fn.call(g[p].context, d, u, b);
|
|
92
92
|
break;
|
|
93
93
|
default:
|
|
94
|
-
if (!L) for (F = 1, L = new Array(
|
|
94
|
+
if (!L) for (F = 1, L = new Array($ - 1); F < $; F++)
|
|
95
95
|
L[F - 1] = arguments[F];
|
|
96
|
-
|
|
96
|
+
g[p].fn.apply(g[p].context, L);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return !0;
|
|
100
|
-
}, a.prototype.on = function(r, d,
|
|
101
|
-
return i(this, r, d,
|
|
102
|
-
}, a.prototype.once = function(r, d,
|
|
103
|
-
return i(this, r, d,
|
|
104
|
-
}, a.prototype.removeListener = function(r, d,
|
|
105
|
-
var
|
|
106
|
-
if (!this._events[
|
|
100
|
+
}, a.prototype.on = function(r, d, u) {
|
|
101
|
+
return i(this, r, d, u, !1);
|
|
102
|
+
}, a.prototype.once = function(r, d, u) {
|
|
103
|
+
return i(this, r, d, u, !0);
|
|
104
|
+
}, a.prototype.removeListener = function(r, d, u, b) {
|
|
105
|
+
var v = o ? o + r : r;
|
|
106
|
+
if (!this._events[v]) return this;
|
|
107
107
|
if (!d)
|
|
108
|
-
return
|
|
109
|
-
var h = this._events[
|
|
108
|
+
return c(this, v), this;
|
|
109
|
+
var h = this._events[v];
|
|
110
110
|
if (h.fn)
|
|
111
|
-
h.fn === d && (!b || h.once) && (!
|
|
111
|
+
h.fn === d && (!b || h.once) && (!u || h.context === u) && c(this, v);
|
|
112
112
|
else {
|
|
113
|
-
for (var E = 0,
|
|
114
|
-
(h[E].fn !== d || b && !h[E].once ||
|
|
115
|
-
|
|
113
|
+
for (var E = 0, g = [], $ = h.length; E < $; E++)
|
|
114
|
+
(h[E].fn !== d || b && !h[E].once || u && h[E].context !== u) && g.push(h[E]);
|
|
115
|
+
g.length ? this._events[v] = g.length === 1 ? g[0] : g : c(this, v);
|
|
116
116
|
}
|
|
117
117
|
return this;
|
|
118
118
|
}, a.prototype.removeAllListeners = function(r) {
|
|
119
119
|
var d;
|
|
120
|
-
return r ? (d = o ? o + r : r, this._events[d] &&
|
|
120
|
+
return r ? (d = o ? o + r : r, this._events[d] && c(this, d)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
121
121
|
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = o, a.EventEmitter = a, t.exports = a;
|
|
122
|
-
})(
|
|
123
|
-
var Pt =
|
|
124
|
-
const Vt = /* @__PURE__ */
|
|
122
|
+
})(Qe);
|
|
123
|
+
var Pt = Qe.exports;
|
|
124
|
+
const Vt = /* @__PURE__ */ At(Pt);
|
|
125
125
|
function jt(t) {
|
|
126
126
|
let l = t;
|
|
127
127
|
for (; l; ) {
|
|
@@ -140,75 +140,76 @@ function Ut(t, l = { behavior: "smooth", block: "start" }) {
|
|
|
140
140
|
behavior: l.behavior
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const x = (t) => {
|
|
144
144
|
if (!["button", "options", "separator", "dropdown", "overflow"].includes(t.type))
|
|
145
145
|
throw new Error("Invalid toolbar item type - " + t.type);
|
|
146
146
|
if (t.type === "button" && !t.defaultLabel && !t.icon)
|
|
147
147
|
throw new Error("Toolbar button item needs either icon or label - " + t.name);
|
|
148
148
|
if (!t.name)
|
|
149
149
|
throw new Error("Invalid toolbar item name - " + t.name);
|
|
150
|
-
const o =
|
|
150
|
+
const o = y(Tt()), n = t.type, e = y(t.name), i = t.command, c = t.noArgumentCommand, a = y(t.icon), s = y(t.group || "center"), r = y(t.allowWithoutEditor), d = y(t.attributes || {}), u = t.disabled || !1, b = y(t.disabled), v = y(!1), h = y(!1), E = y(t.style), g = y(t.isNarrow), $ = y(t.isWide), L = y(t.minWidth), p = y(t.suppressActiveHighlight || !1), C = y(t.argument), F = y(null), z = y(null), B = y(t.iconColor), q = y(t.hasCaret), ve = y(t.dropdownStyles), ye = y(t.tooltip), ue = y(t.tooltipVisible), me = y(t.tooltipTimeout), T = y(t.defaultLabel), M = y(t.label), H = y(t.hideLabel), R = y(t.inlineTextInputVisible), X = y(t.hasInlineTextInput), Z = y(t.markName), re = y(t.labelAttr), pe = y(t.selectedValue), Te = y(t.dropdownValueKey), ke = y([]);
|
|
151
151
|
if (t.options) {
|
|
152
152
|
if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
|
|
153
|
-
|
|
153
|
+
ke.value.push(...t.options);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
xe(),
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
const
|
|
165
|
-
return Object.keys(
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
},
|
|
155
|
+
const Fe = (se) => {
|
|
156
|
+
_e(se), !p.value && (v.value = !0);
|
|
157
|
+
}, Ie = () => {
|
|
158
|
+
xe(), v.value = !1;
|
|
159
|
+
}, Ce = (se) => {
|
|
160
|
+
b.value = se;
|
|
161
|
+
}, ie = () => {
|
|
162
|
+
b.value = u;
|
|
163
|
+
}, _e = t.onActivate || (() => null), xe = t.onDeactivate || (() => null), Le = () => {
|
|
164
|
+
const se = {};
|
|
165
|
+
return Object.keys(ce).forEach((te) => {
|
|
166
|
+
ce[te].value !== void 0 && (se[te] = ce[te].value);
|
|
167
|
+
}), se;
|
|
168
|
+
}, ce = {
|
|
169
169
|
id: o,
|
|
170
170
|
name: e,
|
|
171
171
|
type: n,
|
|
172
172
|
command: i,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
173
|
+
noArgumentCommand: c,
|
|
174
|
+
icon: a,
|
|
175
|
+
tooltip: ye,
|
|
176
|
+
group: s,
|
|
177
|
+
attributes: d,
|
|
178
|
+
disabled: b,
|
|
179
|
+
active: v,
|
|
180
|
+
expand: h,
|
|
181
|
+
nestedOptions: ke,
|
|
182
|
+
style: E,
|
|
183
|
+
isNarrow: g,
|
|
184
|
+
isWide: $,
|
|
185
|
+
minWidth: L,
|
|
186
|
+
argument: C,
|
|
187
|
+
parentItem: z,
|
|
188
|
+
iconColor: B,
|
|
189
|
+
hasCaret: q,
|
|
190
|
+
dropdownStyles: ve,
|
|
191
|
+
tooltipVisible: ue,
|
|
192
|
+
tooltipTimeout: me,
|
|
193
|
+
defaultLabel: T,
|
|
194
|
+
label: M,
|
|
195
|
+
hideLabel: H,
|
|
196
|
+
inlineTextInputVisible: R,
|
|
197
|
+
hasInlineTextInput: X,
|
|
198
|
+
markName: Z,
|
|
199
|
+
labelAttr: re,
|
|
200
|
+
childItem: F,
|
|
201
|
+
allowWithoutEditor: r,
|
|
202
|
+
dropdownValueKey: Te,
|
|
203
|
+
selectedValue: pe
|
|
203
204
|
};
|
|
204
205
|
return {
|
|
205
|
-
...
|
|
206
|
+
...ce,
|
|
206
207
|
unref: Le,
|
|
207
|
-
activate:
|
|
208
|
-
deactivate:
|
|
209
|
-
setDisabled:
|
|
210
|
-
resetDisabled:
|
|
211
|
-
onActivate:
|
|
208
|
+
activate: Fe,
|
|
209
|
+
deactivate: Ie,
|
|
210
|
+
setDisabled: Ce,
|
|
211
|
+
resetDisabled: ie,
|
|
212
|
+
onActivate: _e,
|
|
212
213
|
onDeactivate: xe
|
|
213
214
|
};
|
|
214
215
|
}, qt = { class: "alignment-buttons" }, Gt = ["innerHTML"], Kt = ["innerHTML"], Xt = ["innerHTML"], Zt = ["innerHTML"], Yt = {
|
|
@@ -218,26 +219,26 @@ const _ = (t) => {
|
|
|
218
219
|
const o = l, n = (e) => {
|
|
219
220
|
o("select", e);
|
|
220
221
|
};
|
|
221
|
-
return (e, i) => (
|
|
222
|
-
|
|
222
|
+
return (e, i) => (w(), k("div", qt, [
|
|
223
|
+
_("div", {
|
|
223
224
|
class: "button-icon",
|
|
224
|
-
onClick: i[0] || (i[0] = (
|
|
225
|
-
innerHTML:
|
|
225
|
+
onClick: i[0] || (i[0] = (c) => n("left")),
|
|
226
|
+
innerHTML: D(G).alignLeft
|
|
226
227
|
}, null, 8, Gt),
|
|
227
|
-
|
|
228
|
+
_("div", {
|
|
228
229
|
class: "button-icon",
|
|
229
|
-
onClick: i[1] || (i[1] = (
|
|
230
|
-
innerHTML:
|
|
230
|
+
onClick: i[1] || (i[1] = (c) => n("center")),
|
|
231
|
+
innerHTML: D(G).alignCenter
|
|
231
232
|
}, null, 8, Kt),
|
|
232
|
-
|
|
233
|
+
_("div", {
|
|
233
234
|
class: "button-icon",
|
|
234
|
-
onClick: i[2] || (i[2] = (
|
|
235
|
-
innerHTML:
|
|
235
|
+
onClick: i[2] || (i[2] = (c) => n("right")),
|
|
236
|
+
innerHTML: D(G).alignRight
|
|
236
237
|
}, null, 8, Xt),
|
|
237
|
-
|
|
238
|
+
_("div", {
|
|
238
239
|
class: "button-icon",
|
|
239
|
-
onClick: i[3] || (i[3] = (
|
|
240
|
-
innerHTML:
|
|
240
|
+
onClick: i[3] || (i[3] = (c) => n("justify")),
|
|
241
|
+
innerHTML: D(G).alignJustify
|
|
241
242
|
}, null, 8, Zt)
|
|
242
243
|
]));
|
|
243
244
|
}
|
|
@@ -280,8 +281,8 @@ const _ = (t) => {
|
|
|
280
281
|
},
|
|
281
282
|
emits: ["submit", "cancel"],
|
|
282
283
|
setup(t, { emit: l }) {
|
|
283
|
-
const o = l, n = t, { proxy: e } =
|
|
284
|
-
if (e?.$submit instanceof Function && e.$submit(), r.value &&
|
|
284
|
+
const o = l, n = t, { proxy: e } = Lt(), i = () => {
|
|
285
|
+
if (e?.$submit instanceof Function && e.$submit(), r.value && u.value) {
|
|
285
286
|
o("submit", { text: s.value, href: d.value });
|
|
286
287
|
return;
|
|
287
288
|
} else if (!r.value) {
|
|
@@ -289,15 +290,15 @@ const _ = (t) => {
|
|
|
289
290
|
return;
|
|
290
291
|
}
|
|
291
292
|
console.debug("[LinkInput] Invalid URL in handleSubmit"), a.value = !0;
|
|
292
|
-
},
|
|
293
|
+
}, c = () => {
|
|
293
294
|
o("submit", { text: s.value, href: null });
|
|
294
|
-
}, a =
|
|
295
|
+
}, a = y(!1), s = y(n.initialText), r = y(n.href), d = j(() => r.value?.startsWith("http") ? r.value : "http://" + r.value), u = j(() => {
|
|
295
296
|
const p = d.value.split(".").filter(Boolean);
|
|
296
297
|
return d.value.includes(".") && p.length > 1;
|
|
297
|
-
}), b = j(() => h.value ? "Apply" : "Remove"),
|
|
298
|
+
}), b = j(() => h.value ? "Apply" : "Remove"), v = j(() => !u.value), h = j(() => !E.value), E = j(() => n.href && !r.value), g = j(() => n.href.startsWith("#")), $ = () => {
|
|
298
299
|
window.open(d.value, "_blank");
|
|
299
300
|
};
|
|
300
|
-
|
|
301
|
+
Mt(
|
|
301
302
|
() => n.href,
|
|
302
303
|
(p) => {
|
|
303
304
|
r.value = p;
|
|
@@ -309,58 +310,58 @@ const _ = (t) => {
|
|
|
309
310
|
};
|
|
310
311
|
return we(() => {
|
|
311
312
|
n.showInput && L();
|
|
312
|
-
}), (p, C) => (
|
|
313
|
-
t.href ?
|
|
314
|
-
t.showInput && !
|
|
315
|
-
|
|
316
|
-
|
|
313
|
+
}), (p, C) => (w(), k("div", Qt, [
|
|
314
|
+
t.href ? g.value ? (w(), k("div", tn, "Page anchor")) : (w(), k("div", nn, "Edit link")) : (w(), k("div", en, "Add link")),
|
|
315
|
+
t.showInput && !g.value ? (w(), k("div", on, [
|
|
316
|
+
_("div", sn, [
|
|
317
|
+
_("div", {
|
|
317
318
|
class: "input-icon",
|
|
318
|
-
innerHTML:
|
|
319
|
+
innerHTML: D(G).linkInput
|
|
319
320
|
}, null, 8, ln),
|
|
320
|
-
|
|
321
|
+
Dt(_("input", {
|
|
321
322
|
type: "text",
|
|
322
323
|
placeholder: "Type or paste a link",
|
|
323
|
-
class:
|
|
324
|
+
class: ne({ error: a.value }),
|
|
324
325
|
"onUpdate:modelValue": C[0] || (C[0] = (F) => r.value = F),
|
|
325
326
|
onKeydown: [
|
|
326
|
-
|
|
327
|
+
$t(be(i, ["stop", "prevent"]), ["enter"]),
|
|
327
328
|
C[1] || (C[1] = (F) => a.value = !1)
|
|
328
329
|
]
|
|
329
330
|
}, null, 42, an), [
|
|
330
|
-
[
|
|
331
|
+
[Ht, r.value]
|
|
331
332
|
]),
|
|
332
|
-
|
|
333
|
-
class:
|
|
334
|
-
innerHTML:
|
|
335
|
-
onClick:
|
|
333
|
+
_("div", {
|
|
334
|
+
class: ne(["open-link-icon", { disabled: !u.value }]),
|
|
335
|
+
innerHTML: D(G).openLink,
|
|
336
|
+
onClick: $
|
|
336
337
|
}, null, 10, rn)
|
|
337
338
|
]),
|
|
338
|
-
|
|
339
|
-
t.href ? (
|
|
339
|
+
_("div", cn, [
|
|
340
|
+
t.href ? (w(), k("button", {
|
|
340
341
|
key: 0,
|
|
341
342
|
class: "remove-btn",
|
|
342
|
-
onClick:
|
|
343
|
+
onClick: c
|
|
343
344
|
}, [
|
|
344
|
-
|
|
345
|
+
_("div", {
|
|
345
346
|
class: "remove-btn__icon",
|
|
346
|
-
innerHTML:
|
|
347
|
+
innerHTML: D(G).removeLink
|
|
347
348
|
}, null, 8, dn),
|
|
348
|
-
C[3] || (C[3] =
|
|
349
|
-
])) :
|
|
350
|
-
h.value ? (
|
|
349
|
+
C[3] || (C[3] = Ze(" Remove "))
|
|
350
|
+
])) : Q("", !0),
|
|
351
|
+
h.value ? (w(), k("button", {
|
|
351
352
|
key: 1,
|
|
352
|
-
class:
|
|
353
|
+
class: ne(["submit-btn", { "disable-btn": v.value }]),
|
|
353
354
|
onClick: i
|
|
354
|
-
},
|
|
355
|
+
}, oe(b.value), 3)) : Q("", !0)
|
|
355
356
|
])
|
|
356
|
-
])) :
|
|
357
|
-
|
|
358
|
-
onClick: C[2] || (C[2] =
|
|
359
|
-
}, "Go to " +
|
|
360
|
-
])) :
|
|
357
|
+
])) : g.value ? (w(), k("div", un, [
|
|
358
|
+
_("a", {
|
|
359
|
+
onClick: C[2] || (C[2] = be((...F) => t.goToAnchor && t.goToAnchor(...F), ["stop", "prevent"]))
|
|
360
|
+
}, "Go to " + oe(t.href.startsWith("#_") ? t.href.substring(2) : t.href), 1)
|
|
361
|
+
])) : Q("", !0)
|
|
361
362
|
]));
|
|
362
363
|
}
|
|
363
|
-
}, pn = /* @__PURE__ */ K(mn, [["__scopeId", "data-v-6990d5b2"]]), fn = { class: "document-mode" }, hn = ["onClick"],
|
|
364
|
+
}, pn = /* @__PURE__ */ K(mn, [["__scopeId", "data-v-6990d5b2"]]), fn = { class: "document-mode" }, hn = ["onClick"], gn = { class: "document-mode-column icon-column" }, vn = ["innerHTML"], yn = { class: "document-mode-column text-column" }, bn = { class: "document-mode-type" }, wn = { class: "document-mode-description" }, kn = {
|
|
364
365
|
__name: "DocumentMode",
|
|
365
366
|
props: {
|
|
366
367
|
options: {
|
|
@@ -372,25 +373,25 @@ const _ = (t) => {
|
|
|
372
373
|
const o = l, n = (e) => {
|
|
373
374
|
o("select", e);
|
|
374
375
|
};
|
|
375
|
-
return (e, i) => (
|
|
376
|
-
(
|
|
377
|
-
class:
|
|
378
|
-
onClick: (a) => n(
|
|
376
|
+
return (e, i) => (w(), k("div", fn, [
|
|
377
|
+
(w(!0), k(U, null, ee(t.options, (c) => (w(), k("div", {
|
|
378
|
+
class: ne(["option-item", { disabled: c.disabled }]),
|
|
379
|
+
onClick: (a) => n(c)
|
|
379
380
|
}, [
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
_("div", gn, [
|
|
382
|
+
_("div", {
|
|
382
383
|
class: "icon-column__icon",
|
|
383
|
-
innerHTML:
|
|
384
|
-
}, null, 8,
|
|
384
|
+
innerHTML: c.icon
|
|
385
|
+
}, null, 8, vn)
|
|
385
386
|
]),
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
_("div", yn, [
|
|
388
|
+
_("div", bn, oe(c.label), 1),
|
|
389
|
+
_("div", wn, oe(c.description), 1)
|
|
389
390
|
])
|
|
390
391
|
], 10, hn))), 256))
|
|
391
392
|
]));
|
|
392
393
|
}
|
|
393
|
-
}, Cn = /* @__PURE__ */ K(
|
|
394
|
+
}, Cn = /* @__PURE__ */ K(kn, [["__scopeId", "data-v-f86e1477"]]), _n = {
|
|
394
395
|
key: 0,
|
|
395
396
|
class: "linked-style-buttons"
|
|
396
397
|
}, xn = ["onClick"], En = {
|
|
@@ -406,17 +407,17 @@ const _ = (t) => {
|
|
|
406
407
|
const o = l, n = t, e = (i) => {
|
|
407
408
|
o("select", i);
|
|
408
409
|
};
|
|
409
|
-
return (i,
|
|
410
|
-
(
|
|
410
|
+
return (i, c) => n.editor ? (w(), k("div", _n, [
|
|
411
|
+
(w(!0), k(U, null, ee(D(Ke)(t.editor), (a) => (w(), k("div", {
|
|
411
412
|
class: "style-item",
|
|
412
413
|
onClick: (s) => e(a)
|
|
413
414
|
}, [
|
|
414
|
-
|
|
415
|
+
_("div", {
|
|
415
416
|
class: "style-name",
|
|
416
|
-
style: J(
|
|
417
|
-
},
|
|
417
|
+
style: J(D(ft)(a, null, !1))
|
|
418
|
+
}, oe(a.definition.attrs.name), 5)
|
|
418
419
|
], 8, xn))), 256))
|
|
419
|
-
])) :
|
|
420
|
+
])) : Q("", !0);
|
|
420
421
|
}
|
|
421
422
|
}, Sn = /* @__PURE__ */ K(En, [["__scopeId", "data-v-97e3296a"]]), An = ["onClick"], Tn = ["innerHTML"], Fn = ["innerHTML"], In = {
|
|
422
423
|
__name: "IconGridRow",
|
|
@@ -432,35 +433,36 @@ const _ = (t) => {
|
|
|
432
433
|
},
|
|
433
434
|
emits: ["select"],
|
|
434
435
|
setup(t, { emit: l }) {
|
|
435
|
-
const o = l, n = t, e = j(() => (a) => n.activeColor.value ? n.activeColor.value.toUpperCase() === a.value : !1), i = (a, s) => s === 5 || ["#FFFFFF", "#FAFF09"].includes(a) ? { color: "#000" } : { color: "#FFF" },
|
|
436
|
+
const o = l, n = t, e = j(() => (a) => n.activeColor.value ? n.activeColor.value.toUpperCase() === a.value : !1), i = (a, s) => s === 5 || ["#FFFFFF", "#FAFF09"].includes(a) ? { color: "#000" } : { color: "#FFF" }, c = (a) => {
|
|
436
437
|
o("select", a.value);
|
|
437
438
|
};
|
|
438
439
|
return we(() => {
|
|
439
440
|
if (!n.icons.every((s) => Array.isArray(s))) throw new Error("icon props must be 2d array");
|
|
440
|
-
}), (a, s) => (
|
|
441
|
+
}), (a, s) => (w(!0), k(U, null, ee(t.icons, (r, d) => (w(), k("div", {
|
|
441
442
|
class: "option-row",
|
|
442
443
|
key: d
|
|
443
444
|
}, [
|
|
444
|
-
(
|
|
445
|
+
(w(!0), k(U, null, ee(r, (u, b) => (w(), k("div", {
|
|
445
446
|
class: "option",
|
|
446
447
|
key: b,
|
|
447
|
-
onClick:
|
|
448
|
+
onClick: be((v) => c(u), ["stop", "prevent"])
|
|
448
449
|
}, [
|
|
449
|
-
|
|
450
|
+
_("div", {
|
|
450
451
|
class: "option__icon",
|
|
451
|
-
innerHTML:
|
|
452
|
-
style: J(
|
|
452
|
+
innerHTML: u.icon,
|
|
453
|
+
style: J(u.style)
|
|
453
454
|
}, null, 12, Tn),
|
|
454
|
-
e.value(
|
|
455
|
+
e.value(u) ? (w(), k("div", {
|
|
455
456
|
key: 0,
|
|
456
457
|
class: "option__check",
|
|
457
|
-
innerHTML:
|
|
458
|
-
style: J(i(
|
|
459
|
-
}, null, 12, Fn)) :
|
|
458
|
+
innerHTML: D(G).colorOptionCheck,
|
|
459
|
+
style: J(i(u.value, b))
|
|
460
|
+
}, null, 12, Fn)) : Q("", !0)
|
|
460
461
|
], 8, An))), 128))
|
|
461
462
|
]))), 128));
|
|
462
463
|
}
|
|
463
|
-
}, Ge = /* @__PURE__ */ K(In, [["__scopeId", "data-v-6a2a9a40"]]), Ln =
|
|
464
|
+
}, Ge = /* @__PURE__ */ K(In, [["__scopeId", "data-v-6a2a9a40"]]), Ln = `<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>
|
|
465
|
+
`, Mn = { class: "options-grid-wrap" }, Dn = ["innerHTML"], $n = { class: "option-grid-ctn" }, Hn = {
|
|
464
466
|
__name: "IconGrid",
|
|
465
467
|
props: {
|
|
466
468
|
icons: {
|
|
@@ -474,6 +476,10 @@ const _ = (t) => {
|
|
|
474
476
|
activeColor: {
|
|
475
477
|
type: Object,
|
|
476
478
|
required: !1
|
|
479
|
+
},
|
|
480
|
+
hasNoneIcon: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
required: !1
|
|
477
483
|
}
|
|
478
484
|
},
|
|
479
485
|
emits: ["select", "clickoutside"],
|
|
@@ -481,23 +487,36 @@ const _ = (t) => {
|
|
|
481
487
|
const o = l, n = (e) => {
|
|
482
488
|
o("select", e);
|
|
483
489
|
};
|
|
484
|
-
return (e, i) => (
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
"
|
|
488
|
-
|
|
489
|
-
},
|
|
490
|
-
|
|
491
|
-
|
|
490
|
+
return (e, i) => (w(), k("div", Mn, [
|
|
491
|
+
t.hasNoneIcon ? (w(), k("div", {
|
|
492
|
+
key: 0,
|
|
493
|
+
class: "none-option",
|
|
494
|
+
onClick: i[0] || (i[0] = (c) => n("none"))
|
|
495
|
+
}, [
|
|
496
|
+
_("span", {
|
|
497
|
+
innerHTML: D(Ln),
|
|
498
|
+
class: "none-icon"
|
|
499
|
+
}, null, 8, Dn),
|
|
500
|
+
i[1] || (i[1] = Ze(" None "))
|
|
501
|
+
])) : Q("", !0),
|
|
502
|
+
_("div", $n, [
|
|
492
503
|
V(Ge, {
|
|
493
|
-
icons: t.
|
|
504
|
+
icons: t.icons,
|
|
494
505
|
"active-color": t.activeColor,
|
|
495
506
|
onSelect: n
|
|
496
|
-
}, null, 8, ["icons", "active-color"])
|
|
497
|
-
|
|
507
|
+
}, null, 8, ["icons", "active-color"]),
|
|
508
|
+
t.customIcons.flat().length ? (w(), k(U, { key: 0 }, [
|
|
509
|
+
i[2] || (i[2] = _("span", { class: "option-grid-ctn__subtitle" }, "Custom colors", -1)),
|
|
510
|
+
V(Ge, {
|
|
511
|
+
icons: t.customIcons,
|
|
512
|
+
"active-color": t.activeColor,
|
|
513
|
+
onSelect: n
|
|
514
|
+
}, null, 8, ["icons", "active-color"])
|
|
515
|
+
], 64)) : Q("", !0)
|
|
516
|
+
])
|
|
498
517
|
]));
|
|
499
518
|
}
|
|
500
|
-
},
|
|
519
|
+
}, Bn = /* @__PURE__ */ K(Hn, [["__scopeId", "data-v-47b783db"]]), Rn = (t) => {
|
|
501
520
|
t.expand.value = !1;
|
|
502
521
|
}, f = (t, l = null) => ({
|
|
503
522
|
label: l,
|
|
@@ -508,19 +527,20 @@ const _ = (t) => {
|
|
|
508
527
|
boxShadow: "0 0 5px 1px rgba(0, 0, 0, 0.1)",
|
|
509
528
|
borderRadius: "50%"
|
|
510
529
|
}
|
|
511
|
-
}), Ne = (t, l, o = []) => {
|
|
512
|
-
const
|
|
513
|
-
l.iconColor.value =
|
|
530
|
+
}), Ne = (t, l, o = [], n = !1) => {
|
|
531
|
+
const e = (i) => {
|
|
532
|
+
l.iconColor.value = i, t.emitCommand({ item: l, argument: i }), Rn(l);
|
|
514
533
|
};
|
|
515
534
|
return N("div", {}, [
|
|
516
|
-
N(
|
|
517
|
-
icons:
|
|
535
|
+
N(Bn, {
|
|
536
|
+
icons: et,
|
|
518
537
|
customIcons: o,
|
|
519
538
|
activeColor: l.iconColor,
|
|
520
|
-
|
|
539
|
+
hasNoneIcon: n,
|
|
540
|
+
onSelect: e
|
|
521
541
|
})
|
|
522
542
|
]);
|
|
523
|
-
},
|
|
543
|
+
}, et = [
|
|
524
544
|
[
|
|
525
545
|
f("#111111"),
|
|
526
546
|
f("#333333"),
|
|
@@ -593,44 +613,44 @@ const _ = (t) => {
|
|
|
593
613
|
f("#DFCDF2"),
|
|
594
614
|
f("#A91DFF")
|
|
595
615
|
]
|
|
596
|
-
],
|
|
616
|
+
], On = () => et.flat().map((t) => t.value), Nn = { class: "toolbar-table-grid-wrapper" }, zn = ["data-cols", "data-rows", "onClick"], Wn = { class: "toolbar-table-grid-value" }, Pn = {
|
|
597
617
|
__name: "TableGrid",
|
|
598
618
|
emits: ["select", "clickoutside"],
|
|
599
619
|
setup(t, { emit: l }) {
|
|
600
|
-
const o = l, n =
|
|
620
|
+
const o = l, n = y(0), e = y(0), i = (a) => {
|
|
601
621
|
let s = a.target;
|
|
602
622
|
if (!!s.dataset.grid)
|
|
603
623
|
return;
|
|
604
|
-
let
|
|
605
|
-
e.value = b, n.value =
|
|
606
|
-
for (let h = 0; h <
|
|
607
|
-
let E =
|
|
608
|
-
|
|
624
|
+
let u = [...s.parentElement.querySelectorAll("[data-item]")], b = parseInt(s.dataset.cols, 10), v = parseInt(s.dataset.rows, 10);
|
|
625
|
+
e.value = b, n.value = v;
|
|
626
|
+
for (let h = 0; h < u.length; h++) {
|
|
627
|
+
let E = u[h], g = parseInt(E.dataset.cols, 10), $ = parseInt(E.dataset.rows, 10);
|
|
628
|
+
g <= b && $ <= v ? E.classList.add("selected") : E.classList.remove("selected");
|
|
609
629
|
}
|
|
610
|
-
},
|
|
630
|
+
}, c = ({ cols: a, rows: s }) => {
|
|
611
631
|
o("select", { cols: a, rows: s });
|
|
612
632
|
};
|
|
613
|
-
return (a, s) => (
|
|
614
|
-
|
|
633
|
+
return (a, s) => (w(), k("div", Nn, [
|
|
634
|
+
_("div", {
|
|
615
635
|
class: "toolbar-table-grid",
|
|
616
636
|
onMouseover: i,
|
|
617
637
|
"data-grid": "true"
|
|
618
638
|
}, [
|
|
619
|
-
(
|
|
620
|
-
(
|
|
639
|
+
(w(), k(U, null, ee(5, (r) => (w(), k(U, { key: r }, [
|
|
640
|
+
(w(), k(U, null, ee(5, (d) => _("div", {
|
|
621
641
|
class: "toolbar-table-grid__item",
|
|
622
642
|
key: `${r}_${d}`,
|
|
623
643
|
"data-cols": d,
|
|
624
644
|
"data-rows": r,
|
|
625
645
|
"data-item": "true",
|
|
626
|
-
onClick:
|
|
627
|
-
}, null, 8,
|
|
646
|
+
onClick: be((u) => c({ cols: d, rows: r }), ["stop", "prevent"])
|
|
647
|
+
}, null, 8, zn)), 64))
|
|
628
648
|
], 64))), 64))
|
|
629
649
|
], 32),
|
|
630
|
-
|
|
650
|
+
_("div", Wn, oe(n.value) + " x " + oe(e.value), 1)
|
|
631
651
|
]));
|
|
632
652
|
}
|
|
633
|
-
},
|
|
653
|
+
}, Vn = /* @__PURE__ */ K(Pn, [["__scopeId", "data-v-06352ab9"]]), jn = { class: "toolbar-table-actions" }, Un = ["onClick"], qn = { class: "toolbar-table-actions__icon" }, Gn = ["innerHTML"], Kn = { class: "toolbar-table-actions__label" }, Xn = {
|
|
634
654
|
__name: "TableActions",
|
|
635
655
|
props: {
|
|
636
656
|
options: {
|
|
@@ -642,32 +662,32 @@ const _ = (t) => {
|
|
|
642
662
|
const o = l, n = (e) => {
|
|
643
663
|
o("select", { command: e.command });
|
|
644
664
|
};
|
|
645
|
-
return (e, i) => (
|
|
646
|
-
(
|
|
647
|
-
class:
|
|
648
|
-
onClick: (a) => n(
|
|
665
|
+
return (e, i) => (w(), k("div", jn, [
|
|
666
|
+
(w(!0), k(U, null, ee(t.options, (c) => (w(), k("div", {
|
|
667
|
+
class: ne(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": c.bottomBorder }]),
|
|
668
|
+
onClick: (a) => n(c)
|
|
649
669
|
}, [
|
|
650
|
-
|
|
651
|
-
|
|
670
|
+
_("div", qn, [
|
|
671
|
+
_("div", {
|
|
652
672
|
class: "toolbar-table-actions__icon-wrapper",
|
|
653
|
-
innerHTML:
|
|
654
|
-
}, null, 8,
|
|
673
|
+
innerHTML: c.icon
|
|
674
|
+
}, null, 8, Gn)
|
|
655
675
|
]),
|
|
656
|
-
|
|
657
|
-
], 10,
|
|
676
|
+
_("div", Kn, oe(c.label), 1)
|
|
677
|
+
], 10, Un))), 256))
|
|
658
678
|
]));
|
|
659
679
|
}
|
|
660
|
-
},
|
|
661
|
-
`,
|
|
680
|
+
}, Zn = /* @__PURE__ */ K(Xn, [["__scopeId", "data-v-9a702d7f"]]), Yn = `<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>
|
|
681
|
+
`, ae = (t) => {
|
|
662
682
|
t.expand.value = !1;
|
|
663
|
-
},
|
|
664
|
-
const i =
|
|
683
|
+
}, Jn = (t, l = !1, o, n, e) => {
|
|
684
|
+
const i = x({
|
|
665
685
|
type: "button",
|
|
666
686
|
name: "bold",
|
|
667
687
|
command: "toggleBold",
|
|
668
688
|
icon: e.bold,
|
|
669
689
|
tooltip: "Bold"
|
|
670
|
-
}),
|
|
690
|
+
}), c = x({
|
|
671
691
|
type: "dropdown",
|
|
672
692
|
name: "fontFamily",
|
|
673
693
|
tooltip: "Font",
|
|
@@ -715,10 +735,10 @@ const _ = (t) => {
|
|
|
715
735
|
}
|
|
716
736
|
],
|
|
717
737
|
onActivate: ({ fontFamily: m }) => {
|
|
718
|
-
m && (
|
|
738
|
+
m && (c.label.value = m);
|
|
719
739
|
},
|
|
720
|
-
onDeactivate: () =>
|
|
721
|
-
}), a =
|
|
740
|
+
onDeactivate: () => c.label.value = c.defaultLabel.value
|
|
741
|
+
}), a = x({
|
|
722
742
|
type: "dropdown",
|
|
723
743
|
dropdownStyles: {
|
|
724
744
|
padding: 0,
|
|
@@ -738,8 +758,8 @@ const _ = (t) => {
|
|
|
738
758
|
render: () => {
|
|
739
759
|
let m = "";
|
|
740
760
|
if (t.activeEditor) {
|
|
741
|
-
const { state: A } = t.activeEditor, { from: P, to:
|
|
742
|
-
m =
|
|
761
|
+
const { state: A } = t.activeEditor, { from: P, to: le, empty: ut } = A.selection;
|
|
762
|
+
m = ut ? "" : A.doc.textBetween(P, le);
|
|
743
763
|
}
|
|
744
764
|
return N(
|
|
745
765
|
"div",
|
|
@@ -747,7 +767,7 @@ const _ = (t) => {
|
|
|
747
767
|
[
|
|
748
768
|
N(Wt, {
|
|
749
769
|
handleClose: () => {
|
|
750
|
-
|
|
770
|
+
ae(a);
|
|
751
771
|
},
|
|
752
772
|
selectedText: m,
|
|
753
773
|
editor: t.activeEditor,
|
|
@@ -760,7 +780,7 @@ const _ = (t) => {
|
|
|
760
780
|
}
|
|
761
781
|
}
|
|
762
782
|
]
|
|
763
|
-
}), s =
|
|
783
|
+
}), s = x({
|
|
764
784
|
type: "dropdown",
|
|
765
785
|
name: "fontSize",
|
|
766
786
|
defaultLabel: "12",
|
|
@@ -797,23 +817,23 @@ const _ = (t) => {
|
|
|
797
817
|
S < 8 && (S = 8), S > 96 && (S = 96), s.label.value = String(S);
|
|
798
818
|
},
|
|
799
819
|
onDeactivate: () => s.label.value = s.defaultLabel.value
|
|
800
|
-
}), r =
|
|
820
|
+
}), r = x({
|
|
801
821
|
type: "separator",
|
|
802
822
|
name: "separator",
|
|
803
823
|
isNarrow: !0
|
|
804
|
-
}), d =
|
|
824
|
+
}), d = x({
|
|
805
825
|
type: "button",
|
|
806
826
|
name: "italic",
|
|
807
827
|
command: "toggleItalic",
|
|
808
828
|
icon: e.italic,
|
|
809
829
|
tooltip: "Italic"
|
|
810
|
-
}),
|
|
830
|
+
}), u = x({
|
|
811
831
|
type: "button",
|
|
812
832
|
name: "underline",
|
|
813
833
|
command: "toggleUnderline",
|
|
814
834
|
icon: e.underline,
|
|
815
835
|
tooltip: "Underline"
|
|
816
|
-
}), b =
|
|
836
|
+
}), b = x({
|
|
817
837
|
type: "dropdown",
|
|
818
838
|
name: "highlight",
|
|
819
839
|
icon: e.highlight,
|
|
@@ -822,19 +842,20 @@ const _ = (t) => {
|
|
|
822
842
|
labelAttr: "color",
|
|
823
843
|
tooltip: "Highlight color",
|
|
824
844
|
command: "setHighlight",
|
|
845
|
+
noArgumentCommand: "unsetHighlight",
|
|
825
846
|
suppressActiveHighlight: !0,
|
|
826
847
|
options: [
|
|
827
848
|
{
|
|
828
849
|
key: "color",
|
|
829
850
|
type: "render",
|
|
830
|
-
render: () => Ne(t, b)
|
|
851
|
+
render: () => Ne(t, b, [], !0)
|
|
831
852
|
}
|
|
832
853
|
],
|
|
833
854
|
onActivate: ({ color: m }) => {
|
|
834
855
|
b.iconColor.value = m || "";
|
|
835
856
|
},
|
|
836
857
|
onDeactivate: () => b.iconColor.value = ""
|
|
837
|
-
}),
|
|
858
|
+
}), v = x({
|
|
838
859
|
type: "dropdown",
|
|
839
860
|
name: "color",
|
|
840
861
|
icon: e.color,
|
|
@@ -848,14 +869,14 @@ const _ = (t) => {
|
|
|
848
869
|
{
|
|
849
870
|
key: "color",
|
|
850
871
|
type: "render",
|
|
851
|
-
render: () => Ne(t,
|
|
872
|
+
render: () => Ne(t, v)
|
|
852
873
|
}
|
|
853
874
|
],
|
|
854
875
|
onActivate: ({ color: m }) => {
|
|
855
|
-
|
|
876
|
+
v.iconColor.value = m;
|
|
856
877
|
},
|
|
857
|
-
onDeactivate: () =>
|
|
858
|
-
}), h =
|
|
878
|
+
onDeactivate: () => v.iconColor.value = "#000"
|
|
879
|
+
}), h = x({
|
|
859
880
|
type: "dropdown",
|
|
860
881
|
name: "link",
|
|
861
882
|
markName: "link",
|
|
@@ -879,33 +900,33 @@ const _ = (t) => {
|
|
|
879
900
|
return N("div", {}, [
|
|
880
901
|
N(pn, {
|
|
881
902
|
onSubmit: ({ href: A }) => {
|
|
882
|
-
|
|
903
|
+
ae(m), m.attributes.value.link = { href: A };
|
|
883
904
|
const P = { ...m, command: "toggleLink" };
|
|
884
905
|
t.emitCommand({ item: P, argument: { href: A, text: "" } }), A || (m.active.value = !1);
|
|
885
906
|
},
|
|
886
907
|
href: m.attributes.value.href,
|
|
887
908
|
goToAnchor: () => {
|
|
888
|
-
if (
|
|
889
|
-
const A = m.attributes.value?.href?.slice(1),
|
|
890
|
-
|
|
909
|
+
if (ae(m), !t.activeEditor || !m.attributes.value?.href) return;
|
|
910
|
+
const A = m.attributes.value?.href?.slice(1), le = t.activeEditor.element.querySelector(`a[name='${A}']`);
|
|
911
|
+
le && Ut(le);
|
|
891
912
|
}
|
|
892
913
|
})
|
|
893
914
|
]);
|
|
894
915
|
}
|
|
895
|
-
const
|
|
916
|
+
const g = x({
|
|
896
917
|
type: "options",
|
|
897
918
|
name: "linkInput",
|
|
898
919
|
command: "toggleLink"
|
|
899
920
|
});
|
|
900
|
-
h.childItem =
|
|
901
|
-
const
|
|
921
|
+
h.childItem = g, g.parentItem = h;
|
|
922
|
+
const $ = x({
|
|
902
923
|
type: "button",
|
|
903
924
|
name: "image",
|
|
904
925
|
command: "startImageUpload",
|
|
905
926
|
icon: e.image,
|
|
906
927
|
tooltip: "Image",
|
|
907
928
|
disabled: !1
|
|
908
|
-
}), L =
|
|
929
|
+
}), L = x({
|
|
909
930
|
type: "dropdown",
|
|
910
931
|
name: "table",
|
|
911
932
|
icon: e.table,
|
|
@@ -924,14 +945,14 @@ const _ = (t) => {
|
|
|
924
945
|
});
|
|
925
946
|
function p(m) {
|
|
926
947
|
return N("div", {}, [
|
|
927
|
-
N(
|
|
948
|
+
N(Vn, {
|
|
928
949
|
onSelect: (A) => {
|
|
929
|
-
t.emitCommand({ item: m, argument: A }),
|
|
950
|
+
t.emitCommand({ item: m, argument: A }), ae(m);
|
|
930
951
|
}
|
|
931
952
|
})
|
|
932
953
|
]);
|
|
933
954
|
}
|
|
934
|
-
const C =
|
|
955
|
+
const C = x({
|
|
935
956
|
type: "dropdown",
|
|
936
957
|
name: "tableActions",
|
|
937
958
|
command: "executeTableCommand",
|
|
@@ -1004,16 +1025,16 @@ const _ = (t) => {
|
|
|
1004
1025
|
}
|
|
1005
1026
|
];
|
|
1006
1027
|
function z(m) {
|
|
1007
|
-
return N(
|
|
1028
|
+
return N(Zn, {
|
|
1008
1029
|
options: F,
|
|
1009
1030
|
onSelect: (S) => {
|
|
1010
|
-
|
|
1031
|
+
ae(m);
|
|
1011
1032
|
const { command: A } = S;
|
|
1012
1033
|
t.emitCommand({ item: m, argument: { command: A } });
|
|
1013
1034
|
}
|
|
1014
1035
|
});
|
|
1015
1036
|
}
|
|
1016
|
-
const B =
|
|
1037
|
+
const B = x({
|
|
1017
1038
|
type: "dropdown",
|
|
1018
1039
|
name: "textAlign",
|
|
1019
1040
|
tooltip: "Alignment",
|
|
@@ -1029,7 +1050,7 @@ const _ = (t) => {
|
|
|
1029
1050
|
render: () => N("div", {}, [
|
|
1030
1051
|
N(Jt, {
|
|
1031
1052
|
onSelect: (S) => {
|
|
1032
|
-
|
|
1053
|
+
ae(B);
|
|
1033
1054
|
const A = { ...B, command: "setTextAlign" };
|
|
1034
1055
|
A.command = "setTextAlign", t.emitCommand({ item: A, argument: S }), q(B, S);
|
|
1035
1056
|
}
|
|
@@ -1050,41 +1071,41 @@ const _ = (t) => {
|
|
|
1050
1071
|
right: e.alignRight,
|
|
1051
1072
|
center: e.alignCenter,
|
|
1052
1073
|
justify: e.alignJustify
|
|
1053
|
-
},
|
|
1054
|
-
m.icon.value =
|
|
1055
|
-
}, ve =
|
|
1074
|
+
}, le = P[A] ?? P.left;
|
|
1075
|
+
m.icon.value = le;
|
|
1076
|
+
}, ve = x({
|
|
1056
1077
|
type: "button",
|
|
1057
1078
|
name: "list",
|
|
1058
1079
|
command: "toggleBulletList",
|
|
1059
1080
|
icon: e.bulletList,
|
|
1060
1081
|
tooltip: "Bullet list"
|
|
1061
|
-
}),
|
|
1082
|
+
}), ye = x({
|
|
1062
1083
|
type: "button",
|
|
1063
1084
|
name: "numberedlist",
|
|
1064
1085
|
command: "toggleOrderedList",
|
|
1065
1086
|
icon: e.numberedList,
|
|
1066
1087
|
tooltip: "Numbered list"
|
|
1067
|
-
}),
|
|
1088
|
+
}), ue = x({
|
|
1068
1089
|
type: "button",
|
|
1069
1090
|
name: "indentleft",
|
|
1070
1091
|
command: "decreaseTextIndent",
|
|
1071
1092
|
icon: e.indentLeft,
|
|
1072
1093
|
tooltip: "Left indent",
|
|
1073
1094
|
disabled: !1
|
|
1074
|
-
}),
|
|
1095
|
+
}), me = x({
|
|
1075
1096
|
type: "button",
|
|
1076
1097
|
name: "indentright",
|
|
1077
1098
|
command: "increaseTextIndent",
|
|
1078
1099
|
icon: e.indentRight,
|
|
1079
1100
|
tooltip: "Right indent",
|
|
1080
1101
|
disabled: !1
|
|
1081
|
-
}), T =
|
|
1102
|
+
}), T = x({
|
|
1082
1103
|
type: "overflow",
|
|
1083
1104
|
name: "overflow",
|
|
1084
1105
|
command: "toggleOverflow",
|
|
1085
1106
|
icon: e.overflow,
|
|
1086
1107
|
disabled: !1
|
|
1087
|
-
}), M =
|
|
1108
|
+
}), M = x({
|
|
1088
1109
|
type: "dropdown",
|
|
1089
1110
|
name: "zoom",
|
|
1090
1111
|
allowWithoutEditor: !0,
|
|
@@ -1108,7 +1129,7 @@ const _ = (t) => {
|
|
|
1108
1129
|
onActivate: ({ zoom: m }) => {
|
|
1109
1130
|
m && (M.label.value = m);
|
|
1110
1131
|
}
|
|
1111
|
-
}), H =
|
|
1132
|
+
}), H = x({
|
|
1112
1133
|
type: "button",
|
|
1113
1134
|
name: "undo",
|
|
1114
1135
|
disabled: !0,
|
|
@@ -1119,7 +1140,7 @@ const _ = (t) => {
|
|
|
1119
1140
|
onDeactivate: () => {
|
|
1120
1141
|
H.disabled.value = !t.undoDepth;
|
|
1121
1142
|
}
|
|
1122
|
-
}), R =
|
|
1143
|
+
}), R = x({
|
|
1123
1144
|
type: "button",
|
|
1124
1145
|
disabled: !0,
|
|
1125
1146
|
name: "redo",
|
|
@@ -1130,7 +1151,7 @@ const _ = (t) => {
|
|
|
1130
1151
|
onDeactivate: () => {
|
|
1131
1152
|
R.disabled.value = !t.redoDepth;
|
|
1132
1153
|
}
|
|
1133
|
-
}), X =
|
|
1154
|
+
}), X = x({
|
|
1134
1155
|
type: "button",
|
|
1135
1156
|
disabled: !1,
|
|
1136
1157
|
name: "toggleTrackChanges",
|
|
@@ -1138,7 +1159,7 @@ const _ = (t) => {
|
|
|
1138
1159
|
command: "toggleTrackChanges",
|
|
1139
1160
|
icon: e.trackChanges,
|
|
1140
1161
|
group: "left"
|
|
1141
|
-
}), Z =
|
|
1162
|
+
}), Z = x({
|
|
1142
1163
|
type: "button",
|
|
1143
1164
|
disabled: !1,
|
|
1144
1165
|
name: "acceptTrackedChangeBySelection",
|
|
@@ -1146,7 +1167,7 @@ const _ = (t) => {
|
|
|
1146
1167
|
command: "acceptTrackedChangeBySelection",
|
|
1147
1168
|
icon: e.trackChangesAccept,
|
|
1148
1169
|
group: "left"
|
|
1149
|
-
}),
|
|
1170
|
+
}), re = x({
|
|
1150
1171
|
type: "button",
|
|
1151
1172
|
disabled: !1,
|
|
1152
1173
|
name: "rejectTrackedChangeOnSelection",
|
|
@@ -1154,7 +1175,7 @@ const _ = (t) => {
|
|
|
1154
1175
|
command: "rejectTrackedChangeOnSelection",
|
|
1155
1176
|
icon: e.trackChangesReject,
|
|
1156
1177
|
group: "left"
|
|
1157
|
-
}),
|
|
1178
|
+
}), pe = x({
|
|
1158
1179
|
type: "button",
|
|
1159
1180
|
disabled: !1,
|
|
1160
1181
|
name: "toggleTrackChangesShowOriginal",
|
|
@@ -1162,7 +1183,7 @@ const _ = (t) => {
|
|
|
1162
1183
|
command: "toggleTrackChangesShowOriginal",
|
|
1163
1184
|
icon: e.trackChangesOriginal,
|
|
1164
1185
|
group: "left"
|
|
1165
|
-
}),
|
|
1186
|
+
}), Te = x({
|
|
1166
1187
|
type: "button",
|
|
1167
1188
|
disabled: !1,
|
|
1168
1189
|
name: "toggleTrackChangesShowFinal",
|
|
@@ -1170,7 +1191,7 @@ const _ = (t) => {
|
|
|
1170
1191
|
command: "toggleTrackChangesShowFinal",
|
|
1171
1192
|
icon: e.trackChangesFinal,
|
|
1172
1193
|
group: "left"
|
|
1173
|
-
}),
|
|
1194
|
+
}), ke = x({
|
|
1174
1195
|
type: "button",
|
|
1175
1196
|
name: "clearFormatting",
|
|
1176
1197
|
command: "clearFormat",
|
|
@@ -1180,26 +1201,26 @@ const _ = (t) => {
|
|
|
1180
1201
|
[
|
|
1181
1202
|
i,
|
|
1182
1203
|
d,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1204
|
+
u,
|
|
1205
|
+
me,
|
|
1206
|
+
ue,
|
|
1186
1207
|
// search,
|
|
1187
1208
|
T
|
|
1188
1209
|
].map((m) => m.name);
|
|
1189
|
-
const Fe =
|
|
1210
|
+
const Fe = x({
|
|
1190
1211
|
type: "button",
|
|
1191
1212
|
name: "copyFormat",
|
|
1192
1213
|
tooltip: "Format painter",
|
|
1193
1214
|
icon: e.copyFormat,
|
|
1194
1215
|
command: "copyFormat"
|
|
1195
|
-
}), Ie = (m, S) => m === "editor" ? S : m === "suggester" ? S.filter((A) => A.value === "suggesting") : S.filter((A) => A.value === "viewing"),
|
|
1216
|
+
}), Ie = (m, S) => m === "editor" ? S : m === "suggester" ? S.filter((A) => A.value === "suggesting") : S.filter((A) => A.value === "viewing"), Ce = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", ie = x({
|
|
1196
1217
|
type: "dropdown",
|
|
1197
1218
|
name: "documentMode",
|
|
1198
1219
|
command: "setDocumentMode",
|
|
1199
1220
|
allowWithoutEditor: !0,
|
|
1200
1221
|
icon: e.documentMode,
|
|
1201
|
-
defaultLabel:
|
|
1202
|
-
label:
|
|
1222
|
+
defaultLabel: Ce(n),
|
|
1223
|
+
label: Ce(n),
|
|
1203
1224
|
hasCaret: n === "editor",
|
|
1204
1225
|
isWide: !0,
|
|
1205
1226
|
style: { display: "flex", justifyContent: "flex-end" },
|
|
@@ -1214,10 +1235,10 @@ const _ = (t) => {
|
|
|
1214
1235
|
options: [
|
|
1215
1236
|
{
|
|
1216
1237
|
type: "render",
|
|
1217
|
-
render: () =>
|
|
1238
|
+
render: () => xe(ie)
|
|
1218
1239
|
}
|
|
1219
1240
|
]
|
|
1220
|
-
}),
|
|
1241
|
+
}), _e = [
|
|
1221
1242
|
{
|
|
1222
1243
|
label: "Editing",
|
|
1223
1244
|
value: "editing",
|
|
@@ -1237,24 +1258,24 @@ const _ = (t) => {
|
|
|
1237
1258
|
description: "View clean version of document only"
|
|
1238
1259
|
}
|
|
1239
1260
|
];
|
|
1240
|
-
function
|
|
1241
|
-
const S = Ie(n,
|
|
1261
|
+
function xe(m) {
|
|
1262
|
+
const S = Ie(n, _e);
|
|
1242
1263
|
return N(Cn, {
|
|
1243
1264
|
options: S,
|
|
1244
1265
|
onSelect: (A) => {
|
|
1245
|
-
|
|
1246
|
-
const { label: P, icon:
|
|
1247
|
-
|
|
1266
|
+
ae(m);
|
|
1267
|
+
const { label: P, icon: le } = A;
|
|
1268
|
+
ie.label.value = P, ie.icon.value = le, t.emitCommand({ item: ie, argument: P });
|
|
1248
1269
|
}
|
|
1249
1270
|
});
|
|
1250
1271
|
}
|
|
1251
|
-
const
|
|
1272
|
+
const Le = x({
|
|
1252
1273
|
type: "button",
|
|
1253
1274
|
name: "pageBreakTool",
|
|
1254
1275
|
command: "insertPageBreak",
|
|
1255
1276
|
icon: e.pageBreak,
|
|
1256
1277
|
tooltip: "Insert page break"
|
|
1257
|
-
}),
|
|
1278
|
+
}), ce = /* @__PURE__ */ new Map([
|
|
1258
1279
|
["separator", 20],
|
|
1259
1280
|
["zoom", 71],
|
|
1260
1281
|
["fontFamily", 118],
|
|
@@ -1264,13 +1285,13 @@ const _ = (t) => {
|
|
|
1264
1285
|
["documentMode", 47],
|
|
1265
1286
|
["ai", 32],
|
|
1266
1287
|
["default", 32]
|
|
1267
|
-
]),
|
|
1288
|
+
]), se = x({
|
|
1268
1289
|
type: "button",
|
|
1269
1290
|
name: "ruler",
|
|
1270
1291
|
command: "toggleRuler",
|
|
1271
1292
|
icon: e.ruler,
|
|
1272
1293
|
tooltip: "Show or hide ruler"
|
|
1273
|
-
}),
|
|
1294
|
+
}), te = x({
|
|
1274
1295
|
type: "dropdown",
|
|
1275
1296
|
name: "linkedStyles",
|
|
1276
1297
|
command: "setLinkedStyle",
|
|
@@ -1291,8 +1312,8 @@ const _ = (t) => {
|
|
|
1291
1312
|
key: "linkedStyle",
|
|
1292
1313
|
render: () => {
|
|
1293
1314
|
const m = (S) => {
|
|
1294
|
-
|
|
1295
|
-
const A = { ...
|
|
1315
|
+
ae(te);
|
|
1316
|
+
const A = { ...te, command: "setLinkedStyle" };
|
|
1296
1317
|
t.emitCommand({ item: A, argument: S });
|
|
1297
1318
|
};
|
|
1298
1319
|
return N("div", {}, [
|
|
@@ -1305,15 +1326,15 @@ const _ = (t) => {
|
|
|
1305
1326
|
}
|
|
1306
1327
|
],
|
|
1307
1328
|
onActivate: () => {
|
|
1308
|
-
|
|
1329
|
+
te.disabled.value = !1;
|
|
1309
1330
|
},
|
|
1310
1331
|
onDeactivate: () => {
|
|
1311
|
-
|
|
1332
|
+
te.disabled.value = !0;
|
|
1312
1333
|
}
|
|
1313
|
-
}),
|
|
1334
|
+
}), fe = (m, S) => {
|
|
1314
1335
|
if (S.value.toString() === m)
|
|
1315
|
-
return N("div", { innerHTML:
|
|
1316
|
-
},
|
|
1336
|
+
return N("div", { innerHTML: Yn, class: "dropdown-select-icon" });
|
|
1337
|
+
}, de = x({
|
|
1317
1338
|
type: "dropdown",
|
|
1318
1339
|
name: "lineHeight",
|
|
1319
1340
|
tooltip: "Line height",
|
|
@@ -1327,59 +1348,59 @@ const _ = (t) => {
|
|
|
1327
1348
|
dropdownValueKey: "key",
|
|
1328
1349
|
selectedValue: "1",
|
|
1329
1350
|
options: [
|
|
1330
|
-
{ label: "1,0", key: "1", icon: () =>
|
|
1331
|
-
{ label: "1,15", key: "1.15", icon: () =>
|
|
1332
|
-
{ label: "1,5", key: "1.5", icon: () =>
|
|
1333
|
-
{ label: "2,0", key: "2", icon: () =>
|
|
1334
|
-
{ label: "2,5", key: "2.5", icon: () =>
|
|
1335
|
-
{ label: "3,0", key: "3", icon: () =>
|
|
1351
|
+
{ label: "1,0", key: "1", icon: () => fe("1", de.selectedValue) },
|
|
1352
|
+
{ label: "1,15", key: "1.15", icon: () => fe("1.15", de.selectedValue) },
|
|
1353
|
+
{ label: "1,5", key: "1.5", icon: () => fe("1.5", de.selectedValue) },
|
|
1354
|
+
{ label: "2,0", key: "2", icon: () => fe("2", de.selectedValue) },
|
|
1355
|
+
{ label: "2,5", key: "2.5", icon: () => fe("2.5", de.selectedValue) },
|
|
1356
|
+
{ label: "3,0", key: "3", icon: () => fe("3", de.selectedValue) }
|
|
1336
1357
|
]
|
|
1337
1358
|
}), Me = {
|
|
1338
1359
|
sm: 768,
|
|
1339
1360
|
md: 1024,
|
|
1340
1361
|
xl: 1410
|
|
1341
|
-
},
|
|
1362
|
+
}, st = 120, lt = 32, at = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"], rt = ["zoom", "fontFamily", "fontSize", "redo"];
|
|
1342
1363
|
let O = [
|
|
1343
1364
|
H,
|
|
1344
1365
|
R,
|
|
1345
1366
|
// Dev - tracked changes
|
|
1346
1367
|
// toggleTrackChanges,
|
|
1347
1368
|
Z,
|
|
1348
|
-
|
|
1369
|
+
re,
|
|
1349
1370
|
// toggleTrackChangesOriginal,
|
|
1350
1371
|
// toggleTrackChangesFinal,
|
|
1351
1372
|
M,
|
|
1352
|
-
|
|
1373
|
+
c,
|
|
1353
1374
|
r,
|
|
1354
1375
|
s,
|
|
1355
1376
|
r,
|
|
1356
1377
|
i,
|
|
1357
1378
|
d,
|
|
1358
|
-
|
|
1359
|
-
|
|
1379
|
+
u,
|
|
1380
|
+
v,
|
|
1360
1381
|
b,
|
|
1361
1382
|
r,
|
|
1362
1383
|
h,
|
|
1363
|
-
|
|
1384
|
+
$,
|
|
1364
1385
|
L,
|
|
1365
1386
|
C,
|
|
1366
1387
|
r,
|
|
1367
1388
|
B,
|
|
1368
1389
|
ve,
|
|
1369
|
-
|
|
1370
|
-
|
|
1390
|
+
ye,
|
|
1391
|
+
ue,
|
|
1392
|
+
me,
|
|
1371
1393
|
de,
|
|
1372
|
-
re,
|
|
1373
1394
|
r,
|
|
1374
|
-
|
|
1395
|
+
te,
|
|
1375
1396
|
r,
|
|
1376
|
-
|
|
1397
|
+
Le,
|
|
1377
1398
|
Fe,
|
|
1378
|
-
|
|
1379
|
-
|
|
1399
|
+
ke,
|
|
1400
|
+
se,
|
|
1380
1401
|
a,
|
|
1381
1402
|
T,
|
|
1382
|
-
|
|
1403
|
+
ie
|
|
1383
1404
|
// search,
|
|
1384
1405
|
];
|
|
1385
1406
|
if (t.config?.superdoc?.config?.modules?.ai || (O = O.filter((m) => m.name.value !== "ai")), o <= Me.md && (O = O.filter((m) => m.type !== "separator")), t.config.pagination || (O = O.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
|
|
@@ -1388,24 +1409,24 @@ const _ = (t) => {
|
|
|
1388
1409
|
const S = ["ruler", "zoom", "undo", "redo"];
|
|
1389
1410
|
O = O.filter((A) => !S.includes(A.name.value));
|
|
1390
1411
|
}
|
|
1391
|
-
const Pe = [X,
|
|
1392
|
-
l || (n === "viewer" && Pe.push(Z,
|
|
1393
|
-
const
|
|
1394
|
-
let $e =
|
|
1412
|
+
const Pe = [X, pe, Te];
|
|
1413
|
+
l || (n === "viewer" && Pe.push(Z, re), O = O.filter((m) => !Pe.includes(m)));
|
|
1414
|
+
const ct = [H, T, ie].map((m) => m.name), dt = (m) => ct.includes(m.name), Ee = [], De = [];
|
|
1415
|
+
let $e = lt + st;
|
|
1395
1416
|
return O.forEach((m) => {
|
|
1396
|
-
const S =
|
|
1397
|
-
if (o < Me.xl &&
|
|
1417
|
+
const S = ce.get(m.name.value) || ce.get("default");
|
|
1418
|
+
if (o < Me.xl && at.includes(m.name.value)) {
|
|
1398
1419
|
if (Ee.push(m), m.name.value === "linkedStyles") {
|
|
1399
1420
|
const A = O.findIndex((P) => P.name.value === "linkedStyles");
|
|
1400
1421
|
O.splice(A + 1, 1);
|
|
1401
1422
|
}
|
|
1402
1423
|
return;
|
|
1403
1424
|
}
|
|
1404
|
-
if (o < Me.sm &&
|
|
1425
|
+
if (o < Me.sm && rt.includes(m.name.value)) {
|
|
1405
1426
|
Ee.push(m);
|
|
1406
1427
|
return;
|
|
1407
1428
|
}
|
|
1408
|
-
if (
|
|
1429
|
+
if (dt(m)) {
|
|
1409
1430
|
De.push(m), $e += S;
|
|
1410
1431
|
return;
|
|
1411
1432
|
}
|
|
@@ -1414,30 +1435,30 @@ const _ = (t) => {
|
|
|
1414
1435
|
defaultItems: De,
|
|
1415
1436
|
overflowItems: Ee.filter((m) => m.type !== "separator")
|
|
1416
1437
|
};
|
|
1417
|
-
},
|
|
1438
|
+
}, Qn = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"], eo = () => {
|
|
1418
1439
|
let t = document.createElement("input");
|
|
1419
1440
|
t.type = "file";
|
|
1420
|
-
let l =
|
|
1441
|
+
let l = Qn;
|
|
1421
1442
|
return t.accept = l.join(","), () => new Promise((n, e) => {
|
|
1422
1443
|
t.onchange = async () => {
|
|
1423
1444
|
const i = t.files;
|
|
1424
1445
|
if (!i) return n(null);
|
|
1425
|
-
const
|
|
1426
|
-
return n(
|
|
1446
|
+
const c = i.item(0);
|
|
1447
|
+
return n(c ? { file: c } : null);
|
|
1427
1448
|
}, t.oncancel = () => n(null), t.onerror = e, t.click();
|
|
1428
1449
|
});
|
|
1429
|
-
},
|
|
1450
|
+
}, to = (t) => new Promise((l, o) => {
|
|
1430
1451
|
let n = new FileReader();
|
|
1431
1452
|
n.onload = (e) => l(e.target.result), n.onerror = o, setTimeout(() => n.readAsDataURL(t), 250);
|
|
1432
|
-
}),
|
|
1453
|
+
}), no = (t, l) => new Promise((o, n) => {
|
|
1433
1454
|
const e = new window.Image();
|
|
1434
1455
|
e.onload = () => {
|
|
1435
|
-
const i = document.createElement("canvas"), { width:
|
|
1456
|
+
const i = document.createElement("canvas"), { width: c, height: a } = oo(
|
|
1436
1457
|
e.width,
|
|
1437
1458
|
e.height,
|
|
1438
1459
|
l
|
|
1439
1460
|
);
|
|
1440
|
-
if (i.width =
|
|
1461
|
+
if (i.width = c, i.height = a, i.getContext("2d").drawImage(e, 0, 0, c, a), typeof t == "string") {
|
|
1441
1462
|
const r = i.toDataURL();
|
|
1442
1463
|
o(r);
|
|
1443
1464
|
} else
|
|
@@ -1446,27 +1467,27 @@ const _ = (t) => {
|
|
|
1446
1467
|
type: t.type,
|
|
1447
1468
|
lastModified: Date.now()
|
|
1448
1469
|
});
|
|
1449
|
-
o({ file: d, width:
|
|
1470
|
+
o({ file: d, width: c, height: a });
|
|
1450
1471
|
});
|
|
1451
1472
|
}, e.onerror = (i) => n(i), e.src = typeof t == "string" ? t : URL.createObjectURL(t);
|
|
1452
|
-
}),
|
|
1473
|
+
}), oo = (t, l, o) => {
|
|
1453
1474
|
const { width: n, height: e } = o.getMaxContentSize();
|
|
1454
1475
|
if (!n || !e) return { width: t, height: l };
|
|
1455
|
-
let i = t,
|
|
1476
|
+
let i = t, c = l;
|
|
1456
1477
|
const a = t / l;
|
|
1457
|
-
return l > e && (
|
|
1458
|
-
},
|
|
1459
|
-
let n = typeof t.options.handleImageUpload == "function" ? t.options.handleImageUpload :
|
|
1478
|
+
return l > e && (c = e, i = Math.round(e * a)), i > n && (i = n, c = Math.round(n / a)), { width: i, height: c };
|
|
1479
|
+
}, io = async ({ editor: t, view: l, file: o }) => {
|
|
1480
|
+
let n = typeof t.options.handleImageUpload == "function" ? t.options.handleImageUpload : to;
|
|
1460
1481
|
if ((o.size / (1024 * 1024)).toFixed(4) > 5) {
|
|
1461
1482
|
window.alert("Image size must be less than 5MB");
|
|
1462
1483
|
return;
|
|
1463
1484
|
}
|
|
1464
|
-
let i,
|
|
1485
|
+
let i, c;
|
|
1465
1486
|
try {
|
|
1466
|
-
const
|
|
1467
|
-
i =
|
|
1468
|
-
} catch (
|
|
1469
|
-
console.warn("Error processing image:",
|
|
1487
|
+
const u = await no(o, t);
|
|
1488
|
+
i = u.width, c = u.height, o = u.file;
|
|
1489
|
+
} catch (u) {
|
|
1490
|
+
console.warn("Error processing image:", u);
|
|
1470
1491
|
return;
|
|
1471
1492
|
}
|
|
1472
1493
|
let a = {}, { tr: s, schema: r } = l.state;
|
|
@@ -1477,26 +1498,26 @@ const _ = (t) => {
|
|
|
1477
1498
|
id: a
|
|
1478
1499
|
};
|
|
1479
1500
|
s.setMeta(Re, d), l.dispatch(s), n(o).then(
|
|
1480
|
-
(
|
|
1481
|
-
let b = o.name.replace(" ", "_"),
|
|
1482
|
-
if (
|
|
1501
|
+
(u) => {
|
|
1502
|
+
let b = o.name.replace(" ", "_"), v = ht(l.state, a);
|
|
1503
|
+
if (v == null)
|
|
1483
1504
|
return;
|
|
1484
|
-
let h = { type: "remove", id: a }, E = `word/media/${b}`,
|
|
1505
|
+
let h = { type: "remove", id: a }, E = `word/media/${b}`, g = r.nodes.image.create({
|
|
1485
1506
|
src: E,
|
|
1486
|
-
size: { width: i, height:
|
|
1507
|
+
size: { width: i, height: c }
|
|
1487
1508
|
});
|
|
1488
|
-
t.storage.image.media = Object.assign(t.storage.image.media, { [E]:
|
|
1489
|
-
l.state.tr.replaceWith(
|
|
1509
|
+
t.storage.image.media = Object.assign(t.storage.image.media, { [E]: u }), t.options.ydoc && t.commands.addImageToCollaboration({ mediaPath: E, fileData: u }), l.dispatch(
|
|
1510
|
+
l.state.tr.replaceWith(v, v, g).setMeta(Re, h)
|
|
1490
1511
|
);
|
|
1491
1512
|
},
|
|
1492
1513
|
() => {
|
|
1493
|
-
let
|
|
1494
|
-
l.dispatch(s.setMeta(Re,
|
|
1514
|
+
let u = { type: "remove", id: a };
|
|
1515
|
+
l.dispatch(s.setMeta(Re, u));
|
|
1495
1516
|
}
|
|
1496
1517
|
);
|
|
1497
1518
|
};
|
|
1498
|
-
var I,
|
|
1499
|
-
class
|
|
1519
|
+
var I, tt, ge, ze, nt, ot, We, it, he;
|
|
1520
|
+
class xo extends Vt {
|
|
1500
1521
|
constructor(o) {
|
|
1501
1522
|
super();
|
|
1502
1523
|
Be(this, I);
|
|
@@ -1513,40 +1534,40 @@ class wo extends Vt {
|
|
|
1513
1534
|
aiApiKey: null,
|
|
1514
1535
|
aiEndpoint: null
|
|
1515
1536
|
});
|
|
1516
|
-
Be(this,
|
|
1537
|
+
Be(this, ge, {
|
|
1517
1538
|
setZoom: ({ item: o, argument: n }) => {
|
|
1518
1539
|
if (!n) return;
|
|
1519
1540
|
o.onActivate({ zoom: n }), this.emit("superdoc-command", { item: o, argument: n });
|
|
1520
1541
|
const e = document.querySelector(this.superdoc.config.selector)?.querySelector(".layers");
|
|
1521
1542
|
if (!e) return;
|
|
1522
|
-
const i = typeof screen.orientation < "u",
|
|
1523
|
-
i &&
|
|
1543
|
+
const i = typeof screen.orientation < "u", c = window.matchMedia("(max-width: 834px)").matches;
|
|
1544
|
+
i && c ? (e.style.transformOrigin = "0 0", e.style.transform = `scale(${parseInt(n) / 100})`) : e.style.zoom = parseInt(n) / 100, this.superdoc.superdocStore.activeZoom = parseInt(n);
|
|
1524
1545
|
},
|
|
1525
1546
|
setDocumentMode: ({ item: o, argument: n }) => {
|
|
1526
1547
|
n && this.emit("superdoc-command", { item: o, argument: n });
|
|
1527
1548
|
},
|
|
1528
1549
|
setFontSize: ({ item: o, argument: n }) => {
|
|
1529
|
-
W(this, I,
|
|
1550
|
+
W(this, I, he).call(this, { item: o, argument: n }, () => {
|
|
1530
1551
|
this.activeEditor?.commands.setFieldAnnotationsFontSize(n, !0);
|
|
1531
1552
|
});
|
|
1532
1553
|
},
|
|
1533
1554
|
setFontFamily: ({ item: o, argument: n }) => {
|
|
1534
|
-
W(this, I,
|
|
1555
|
+
W(this, I, he).call(this, { item: o, argument: n }, () => {
|
|
1535
1556
|
this.activeEditor?.commands.setFieldAnnotationsFontFamily(n, !0);
|
|
1536
1557
|
});
|
|
1537
1558
|
},
|
|
1538
1559
|
setColor: ({ item: o, argument: n }) => {
|
|
1539
|
-
W(this, I,
|
|
1560
|
+
W(this, I, he).call(this, { item: o, argument: n });
|
|
1540
1561
|
},
|
|
1541
1562
|
setHighlight: ({ item: o, argument: n }) => {
|
|
1542
|
-
W(this, I,
|
|
1563
|
+
W(this, I, he).call(this, { item: o, argument: n });
|
|
1543
1564
|
},
|
|
1544
1565
|
toggleRuler: ({ item: o, argument: n }) => {
|
|
1545
1566
|
this.superdoc.toggleRuler();
|
|
1546
1567
|
},
|
|
1547
1568
|
startImageUpload: async ({ item: o, argument: n }) => {
|
|
1548
|
-
let i = await
|
|
1549
|
-
i?.file &&
|
|
1569
|
+
let i = await eo()();
|
|
1570
|
+
i?.file && io({
|
|
1550
1571
|
editor: this.activeEditor,
|
|
1551
1572
|
view: this.activeEditor.view,
|
|
1552
1573
|
file: i.file
|
|
@@ -1580,7 +1601,7 @@ class wo extends Vt {
|
|
|
1580
1601
|
let e = o.command;
|
|
1581
1602
|
if (e in this.activeEditor.commands) {
|
|
1582
1603
|
this.activeEditor.commands[e](n);
|
|
1583
|
-
const { view: i } = this.activeEditor,
|
|
1604
|
+
const { view: i } = this.activeEditor, c = i.state.selection.$to.pos, a = new Xe(i.state.doc.resolve(c)), s = i.state.tr.setSelection(a), r = i.state.apply(s);
|
|
1584
1605
|
i.updateState(r), setTimeout(() => {
|
|
1585
1606
|
i.focus();
|
|
1586
1607
|
}, 100);
|
|
@@ -1588,7 +1609,7 @@ class wo extends Vt {
|
|
|
1588
1609
|
this.updateToolbarState();
|
|
1589
1610
|
},
|
|
1590
1611
|
insertTable: ({ item: o, argument: n }) => {
|
|
1591
|
-
W(this, I,
|
|
1612
|
+
W(this, I, he).call(this, { item: o, argument: n });
|
|
1592
1613
|
},
|
|
1593
1614
|
executeTableCommand: ({ item: o, argument: n }) => {
|
|
1594
1615
|
if (!n) return;
|
|
@@ -1602,20 +1623,20 @@ class wo extends Vt {
|
|
|
1602
1623
|
this.config = { ...this.config, ...o }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = o.documentMode || "editing", this.isDev = o.isDev || !1, this.superdoc = o.superdoc, this.role = o.role || "editor", this.config.editor && (this.config.mode = this.config.editor.options.mode), this.config.icons = {
|
|
1603
1624
|
...G,
|
|
1604
1625
|
...o.icons
|
|
1605
|
-
}, !this.config.selector && this.config.element && (this.config.selector = this.config.element), W(this, I,
|
|
1626
|
+
}, !this.config.selector && this.config.element && (this.config.selector = this.config.element), W(this, I, tt).call(this), W(this, I, ze).call(this, this, this.config.icons, o.isDev);
|
|
1606
1627
|
let n = null;
|
|
1607
1628
|
if (this.config.selector && (this.config.selector.startsWith("#") || this.config.selector.startsWith(".") ? n = document.querySelector(this.config.selector) : n = document.getElementById(this.config.selector), !n)) {
|
|
1608
1629
|
console.warn(`[super-toolbar 🎨] Element not found: ${this.config.selector}`);
|
|
1609
1630
|
return;
|
|
1610
1631
|
}
|
|
1611
|
-
this.app = Bt(zt), this.app.directive("click-outside",
|
|
1632
|
+
this.app = Bt(zt), this.app.directive("click-outside", Ft), this.app.config.globalProperties.$toolbar = this, n && (this.toolbar = this.app.mount(n)), this.activeEditor = o.editor || null, this.updateToolbarState();
|
|
1612
1633
|
}
|
|
1613
1634
|
log(...o) {
|
|
1614
1635
|
console.debug("[🎨 super-toolbar]", ...o);
|
|
1615
1636
|
}
|
|
1616
1637
|
setZoom(o) {
|
|
1617
1638
|
const e = [...this.toolbarItems, ...this.overflowItems].find((i) => i.name.value === "zoom");
|
|
1618
|
-
Se(this,
|
|
1639
|
+
Se(this, ge).setZoom({ item: e, argument: o });
|
|
1619
1640
|
}
|
|
1620
1641
|
/**
|
|
1621
1642
|
* The toolbar expects an active Super Editor instance.
|
|
@@ -1632,24 +1653,24 @@ class wo extends Vt {
|
|
|
1632
1653
|
* @param {Object} marks
|
|
1633
1654
|
*/
|
|
1634
1655
|
updateToolbarState() {
|
|
1635
|
-
if (W(this, I,
|
|
1656
|
+
if (W(this, I, it).call(this), W(this, I, nt).call(this), W(this, I, ot).call(this), !this.activeEditor || this.documentMode === "viewing") {
|
|
1636
1657
|
W(this, I, We).call(this);
|
|
1637
1658
|
return;
|
|
1638
1659
|
}
|
|
1639
|
-
const o =
|
|
1660
|
+
const o = gt(this.activeEditor), n = vt(this.activeEditor.state);
|
|
1640
1661
|
this.toolbarItems.forEach((e) => {
|
|
1641
1662
|
if (e.resetDisabled(), e.name.value === "linkedStyles")
|
|
1642
1663
|
return this.activeEditor && !Ke(this.activeEditor).length ? e.deactivate() : e.activate();
|
|
1643
1664
|
const i = o.find((s) => s.name === e.name.value);
|
|
1644
1665
|
i ? e.activate(i.attrs) : e.deactivate();
|
|
1645
|
-
const
|
|
1646
|
-
if (
|
|
1666
|
+
const c = o.find((s) => s.name === "styleId");
|
|
1667
|
+
if (c?.attrs.styleId) {
|
|
1647
1668
|
const s = {
|
|
1648
1669
|
fontSize: "font-size",
|
|
1649
1670
|
fontFamily: "font-family",
|
|
1650
1671
|
bold: "bold",
|
|
1651
1672
|
textAlign: "textAlign"
|
|
1652
|
-
}, r = this.activeEditor.converter?.linkedStyles.find((d) => d.id ===
|
|
1673
|
+
}, r = this.activeEditor.converter?.linkedStyles.find((d) => d.id === c.attrs.styleId);
|
|
1653
1674
|
if (s[e.name.value] in r?.definition.styles) {
|
|
1654
1675
|
const d = {
|
|
1655
1676
|
[e.name.value]: r?.definition.styles[s[e.name.value]]
|
|
@@ -1677,8 +1698,8 @@ class wo extends Vt {
|
|
|
1677
1698
|
this.activeEditor?.focus();
|
|
1678
1699
|
const { command: e } = o;
|
|
1679
1700
|
if (e) {
|
|
1680
|
-
if (this.log("(emmitCommand) Command:", e, o, n), e in Se(this,
|
|
1681
|
-
return Se(this,
|
|
1701
|
+
if (this.log("(emmitCommand) Command:", e, o, n), e in Se(this, ge))
|
|
1702
|
+
return Se(this, ge)[e]({ item: o, argument: n });
|
|
1682
1703
|
if (e in this.activeEditor?.commands)
|
|
1683
1704
|
this.activeEditor.commands[e](n), this.updateToolbarState();
|
|
1684
1705
|
else
|
|
@@ -1686,78 +1707,83 @@ class wo extends Vt {
|
|
|
1686
1707
|
}
|
|
1687
1708
|
}
|
|
1688
1709
|
}
|
|
1689
|
-
I = new WeakSet(),
|
|
1710
|
+
I = new WeakSet(), tt = function() {
|
|
1690
1711
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
1691
|
-
},
|
|
1692
|
-
const i = document.documentElement.clientWidth, { defaultItems:
|
|
1712
|
+
}, ge = new WeakMap(), ze = function(o, n, e = !1) {
|
|
1713
|
+
const i = document.documentElement.clientWidth, { defaultItems: c, overflowItems: a } = Jn(o, e, i, this.role, n);
|
|
1693
1714
|
let s = [
|
|
1694
|
-
...
|
|
1715
|
+
...c.map((d) => d.name.value),
|
|
1695
1716
|
...a.map((d) => d.name.value)
|
|
1696
1717
|
];
|
|
1697
1718
|
this.config.groups && (s = Object.values(this.config.groups).flatMap((d) => d));
|
|
1698
|
-
const r =
|
|
1719
|
+
const r = c.filter((d) => s.includes(d.name.value)).filter((d) => !this.config.excludeItems.includes(d.name.value));
|
|
1699
1720
|
this.toolbarItems = r, this.overflowItems = a.filter((d) => s.includes(d.name.value));
|
|
1700
|
-
},
|
|
1721
|
+
}, nt = function() {
|
|
1701
1722
|
if (!this.activeEditor || !this.activeEditor.converter) return;
|
|
1702
|
-
const { typeface: o = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, e = this.toolbarItems.find((
|
|
1723
|
+
const { typeface: o = "Arial", fontSizePt: n = 12 } = this.activeEditor.converter.getDocumentDefaultStyles() ?? {}, e = this.toolbarItems.find((c) => c.name.value === "fontSize");
|
|
1703
1724
|
e && (e.defaultLabel.value = n);
|
|
1704
|
-
const i = this.toolbarItems.find((
|
|
1725
|
+
const i = this.toolbarItems.find((c) => c.name.value === "fontFamily");
|
|
1705
1726
|
i && (i.defaultLabel.value = o);
|
|
1706
|
-
},
|
|
1727
|
+
}, ot = function() {
|
|
1707
1728
|
if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
|
|
1708
|
-
const o = this.toolbarItems.find((a) => a.name.value === "highlight"), n =
|
|
1729
|
+
const o = this.toolbarItems.find((a) => a.name.value === "highlight"), n = On(), e = 7, i = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, s, r) => {
|
|
1709
1730
|
const d = Math.floor(r / e);
|
|
1710
1731
|
return a[d] || (a[d] = []), n.includes(s) || a[d].push(f(s)), a;
|
|
1711
|
-
}, []),
|
|
1732
|
+
}, []), c = {
|
|
1712
1733
|
key: "color",
|
|
1713
1734
|
type: "render",
|
|
1714
|
-
render: () => Ne(this, o, i)
|
|
1735
|
+
render: () => Ne(this, o, i, !0)
|
|
1715
1736
|
};
|
|
1716
|
-
o.nestedOptions.value = [
|
|
1737
|
+
o.nestedOptions.value = [c];
|
|
1717
1738
|
}, We = function() {
|
|
1718
1739
|
this.activeEditor = null, this.toolbarItems.forEach((o) => {
|
|
1719
1740
|
const { allowWithoutEditor: n } = o;
|
|
1720
1741
|
n.value || o.setDisabled(!0);
|
|
1721
1742
|
});
|
|
1722
|
-
},
|
|
1723
|
-
this.activeEditor && (this.undoDepth =
|
|
1724
|
-
},
|
|
1743
|
+
}, it = function() {
|
|
1744
|
+
this.activeEditor && (this.undoDepth = yt(this.activeEditor.state), this.redoDepth = bt(this.activeEditor.state));
|
|
1745
|
+
}, he = function({ item: o, argument: n }, e) {
|
|
1725
1746
|
if (!n || !this.activeEditor) return;
|
|
1726
1747
|
let i = o.command;
|
|
1748
|
+
const c = o.noArgumentCommand;
|
|
1749
|
+
if (n === "none" && c in this.activeEditor?.commands) {
|
|
1750
|
+
this.activeEditor.commands[c](), this.updateToolbarState();
|
|
1751
|
+
return;
|
|
1752
|
+
}
|
|
1727
1753
|
i in this.activeEditor?.commands && (this.activeEditor.commands[i](n), typeof e == "function" && e(n), this.updateToolbarState());
|
|
1728
1754
|
};
|
|
1729
|
-
function
|
|
1755
|
+
function so(t, l) {
|
|
1730
1756
|
if (!t.value || !l?.value?.options?.scale) return;
|
|
1731
1757
|
const o = l.value.options.scale, n = t.value.getBoundingClientRect(), e = t.value.querySelectorAll(".pagination-break-wrapper");
|
|
1732
1758
|
let i;
|
|
1733
|
-
e.forEach((
|
|
1734
|
-
const s = (
|
|
1759
|
+
e.forEach((c) => {
|
|
1760
|
+
const s = (c.getBoundingClientRect().left - n.left) / o * -1 + 1;
|
|
1735
1761
|
if (i || (i = s), s !== i) {
|
|
1736
1762
|
const r = s - i;
|
|
1737
|
-
|
|
1763
|
+
c.style.transform = `translateX(${r}px)`;
|
|
1738
1764
|
}
|
|
1739
1765
|
});
|
|
1740
1766
|
}
|
|
1741
|
-
const
|
|
1767
|
+
const lo = (t, l) => {
|
|
1742
1768
|
const o = t.clientY, n = t.clientX, { view: e } = l, i = e.dom.getBoundingClientRect();
|
|
1743
|
-
let
|
|
1769
|
+
let c = {
|
|
1744
1770
|
left: 0,
|
|
1745
1771
|
top: o
|
|
1746
1772
|
}, a = !1;
|
|
1747
|
-
n > i.right ? (
|
|
1748
|
-
const s = e.posAtCoords(
|
|
1773
|
+
n > i.right ? (c.left = i.left + i.width - 1, a = !0) : n < i.left && (c.left = i.left);
|
|
1774
|
+
const s = e.posAtCoords(c)?.pos;
|
|
1749
1775
|
if (s) {
|
|
1750
1776
|
let r = s;
|
|
1751
1777
|
if (a) {
|
|
1752
|
-
const b = e.state.doc.resolve(s).textOffset,
|
|
1753
|
-
r =
|
|
1778
|
+
const b = e.state.doc.resolve(s).textOffset, v = e.state.doc.nodeAt(s), E = v?.text?.charAt(b);
|
|
1779
|
+
r = v?.isText && E !== " " ? s - 1 : s;
|
|
1754
1780
|
}
|
|
1755
1781
|
const d = e.state.tr.setSelection(
|
|
1756
1782
|
Xe.create(e.state.doc, r)
|
|
1757
1783
|
);
|
|
1758
1784
|
e.dispatch(d), e.focus();
|
|
1759
1785
|
}
|
|
1760
|
-
},
|
|
1786
|
+
}, ao = { class: "numbering" }, Ae = 200, ro = "flex-end", co = {
|
|
1761
1787
|
__name: "Ruler",
|
|
1762
1788
|
props: {
|
|
1763
1789
|
orientation: {
|
|
@@ -1775,25 +1801,25 @@ const oo = (t, l) => {
|
|
|
1775
1801
|
},
|
|
1776
1802
|
emits: ["margin-change"],
|
|
1777
1803
|
setup(t, { emit: l }) {
|
|
1778
|
-
const o = l, n = t, e =
|
|
1779
|
-
let
|
|
1780
|
-
const
|
|
1804
|
+
const o = l, n = t, e = y(null), i = y([]), c = y("#CCCCCC"), a = y("#2563EB66"), s = y(null), r = y(null), d = y(!1), u = y(null), b = qe({ side: "left", x: 0 }), v = qe({ side: "right", x: 0 }), h = y(!1), E = y(0);
|
|
1805
|
+
let g = 0;
|
|
1806
|
+
const $ = () => {
|
|
1781
1807
|
if (n.editor.options.mode !== "docx") return;
|
|
1782
1808
|
const T = [], { pageMargins: M, pageSize: H } = n.editor.getPageStyles();
|
|
1783
|
-
s.value = H, r.value = M,
|
|
1809
|
+
s.value = H, r.value = M, v.x = H.width * 96 - M.right * 96, b.x = M.left * 96;
|
|
1784
1810
|
for (let R = 0; R < H.width; R++) {
|
|
1785
|
-
const Z = `${5.5}px`,
|
|
1786
|
-
if (T.push(...L(1, "main", "20%", Z, R)), T.push(...L(3, "eighth", "10%", Z)), T.push(...L(1, "half", "40%", Z)),
|
|
1811
|
+
const Z = `${5.5}px`, re = H.width - R;
|
|
1812
|
+
if (T.push(...L(1, "main", "20%", Z, R)), T.push(...L(3, "eighth", "10%", Z)), T.push(...L(1, "half", "40%", Z)), re <= 0.5) break;
|
|
1787
1813
|
T.push(...L(3, "eighth", "10%", Z));
|
|
1788
1814
|
}
|
|
1789
1815
|
return T;
|
|
1790
|
-
}, L = (T, M, H, R, X) => Array.from({ length: T }, (Z,
|
|
1791
|
-
const
|
|
1816
|
+
}, L = (T, M, H, R, X) => Array.from({ length: T }, (Z, re) => {
|
|
1817
|
+
const pe = {
|
|
1792
1818
|
className: `${M}-unit ruler-section`,
|
|
1793
1819
|
height: H,
|
|
1794
1820
|
margin: R
|
|
1795
1821
|
};
|
|
1796
|
-
return X !== void 0 && (
|
|
1822
|
+
return X !== void 0 && (pe.numbering = X), pe;
|
|
1797
1823
|
}), p = j(() => (T) => ({
|
|
1798
1824
|
width: "1px",
|
|
1799
1825
|
minWidth: "1px",
|
|
@@ -1803,87 +1829,87 @@ const oo = (t, l) => {
|
|
|
1803
1829
|
marginLeft: T.numbering === 0 ? null : T.margin,
|
|
1804
1830
|
marginRight: T.margin
|
|
1805
1831
|
})), C = j(() => (T) => ({
|
|
1806
|
-
left: `${(T === "left" ? b :
|
|
1832
|
+
left: `${(T === "left" ? b : v).x}px`
|
|
1807
1833
|
})), F = j(() => {
|
|
1808
1834
|
if (!e.value) return;
|
|
1809
1835
|
const H = e.value.parentElement.querySelector(".super-editor").getBoundingClientRect();
|
|
1810
1836
|
return {
|
|
1811
|
-
left: `${
|
|
1837
|
+
left: `${u.value.x}px`,
|
|
1812
1838
|
minHeight: `${H.height}px`
|
|
1813
1839
|
};
|
|
1814
1840
|
}), z = (T) => {
|
|
1815
1841
|
d.value = !0, ve();
|
|
1816
1842
|
const M = T.currentTarget.id;
|
|
1817
|
-
|
|
1843
|
+
u.value = M === "left-margin-handle" ? b : v, E.value = u.value.x, g = T.clientX - u.value.x, h.value = !0;
|
|
1818
1844
|
}, B = (T) => {
|
|
1819
1845
|
if (!d.value) return;
|
|
1820
|
-
const M = T.clientX -
|
|
1821
|
-
|
|
1846
|
+
const M = T.clientX - g;
|
|
1847
|
+
u.value.x = M, u.value.side === "left" ? M <= 0 ? u.value.x = 0 : M >= v.x - Ae && (u.value.x = v.x - Ae) : M >= s.value.width * 96 ? u.value.x = s.value.width * 96 : M <= b.x + Ae && (u.value.x = b.x + Ae);
|
|
1822
1848
|
}, q = () => {
|
|
1823
|
-
if (d.value = !1, h.value = !1,
|
|
1824
|
-
const T =
|
|
1849
|
+
if (d.value = !1, h.value = !1, ye(), u.value && u.value.x !== E.value) {
|
|
1850
|
+
const T = ue();
|
|
1825
1851
|
o("margin-change", {
|
|
1826
|
-
side:
|
|
1852
|
+
side: u.value.side,
|
|
1827
1853
|
value: T
|
|
1828
1854
|
});
|
|
1829
1855
|
}
|
|
1830
1856
|
}, ve = () => {
|
|
1831
|
-
|
|
1832
|
-
},
|
|
1833
|
-
|
|
1834
|
-
},
|
|
1835
|
-
"--alignment":
|
|
1836
|
-
"--ruler-handle-color":
|
|
1857
|
+
c.value = a.value;
|
|
1858
|
+
}, ye = () => {
|
|
1859
|
+
c.value = "#CCC";
|
|
1860
|
+
}, ue = () => u.value.side === "left" ? u.value.x / 96 : (s.value.width * 96 - u.value.x) / 96, me = j(() => ({
|
|
1861
|
+
"--alignment": ro,
|
|
1862
|
+
"--ruler-handle-color": c.value,
|
|
1837
1863
|
"--ruler-handle-active-color": a.value
|
|
1838
1864
|
}));
|
|
1839
1865
|
return we(() => {
|
|
1840
|
-
i.value =
|
|
1866
|
+
i.value = $(), window.addEventListener("mousemove", B), window.addEventListener("mouseup", q);
|
|
1841
1867
|
}), Rt(() => {
|
|
1842
1868
|
window.removeEventListener("mousemove", B), window.removeEventListener("mouseup", q);
|
|
1843
|
-
}), (T, M) => (
|
|
1869
|
+
}), (T, M) => (w(), k("div", {
|
|
1844
1870
|
class: "ruler",
|
|
1845
1871
|
ref_key: "ruler",
|
|
1846
1872
|
ref: e,
|
|
1847
|
-
style: J(
|
|
1873
|
+
style: J(me.value)
|
|
1848
1874
|
}, [
|
|
1849
|
-
|
|
1875
|
+
_("div", {
|
|
1850
1876
|
class: "margin-handle handle-left",
|
|
1851
1877
|
id: "left-margin-handle",
|
|
1852
1878
|
onMousedown: z,
|
|
1853
1879
|
style: J(C.value("left"))
|
|
1854
1880
|
}, null, 36),
|
|
1855
|
-
|
|
1881
|
+
_("div", {
|
|
1856
1882
|
class: "margin-handle handle-right",
|
|
1857
1883
|
id: "right-margin-handle",
|
|
1858
1884
|
onMousedown: z,
|
|
1859
1885
|
style: J(C.value("right"))
|
|
1860
1886
|
}, null, 36),
|
|
1861
|
-
h.value ? (
|
|
1887
|
+
h.value ? (w(), k("div", {
|
|
1862
1888
|
key: 0,
|
|
1863
1889
|
class: "vertical-indicator",
|
|
1864
1890
|
style: J(F.value)
|
|
1865
|
-
}, null, 4)) :
|
|
1866
|
-
(
|
|
1867
|
-
class:
|
|
1891
|
+
}, null, 4)) : Q("", !0),
|
|
1892
|
+
(w(!0), k(U, null, ee(i.value, (H) => (w(), k("div", {
|
|
1893
|
+
class: ne(H.className),
|
|
1868
1894
|
style: J(p.value(H))
|
|
1869
1895
|
}, [
|
|
1870
|
-
|
|
1871
|
-
(
|
|
1872
|
-
class:
|
|
1896
|
+
_("div", ao, oe(H.numbering), 1),
|
|
1897
|
+
(w(!0), k(U, null, ee(H.elements, (R) => (w(), k("div", {
|
|
1898
|
+
class: ne(R.className),
|
|
1873
1899
|
style: J(p.value(R))
|
|
1874
1900
|
}, [
|
|
1875
|
-
(
|
|
1876
|
-
class:
|
|
1901
|
+
(w(!0), k(U, null, ee(R.elements, (X) => (w(), k("div", {
|
|
1902
|
+
class: ne(X.className),
|
|
1877
1903
|
style: J(p.value(X))
|
|
1878
1904
|
}, null, 6))), 256))
|
|
1879
1905
|
], 6))), 256))
|
|
1880
1906
|
], 6))), 256))
|
|
1881
1907
|
], 4));
|
|
1882
1908
|
}
|
|
1883
|
-
},
|
|
1909
|
+
}, uo = /* @__PURE__ */ K(co, [["__scopeId", "data-v-ad77036c"]]), mo = { class: "super-editor-container" }, po = {
|
|
1884
1910
|
key: 1,
|
|
1885
1911
|
class: "placeholder-editor"
|
|
1886
|
-
},
|
|
1912
|
+
}, fo = { class: "placeholder-title" }, ho = {
|
|
1887
1913
|
__name: "SuperEditor",
|
|
1888
1914
|
props: {
|
|
1889
1915
|
documentId: {
|
|
@@ -1913,7 +1939,7 @@ const oo = (t, l) => {
|
|
|
1913
1939
|
"selection-update"
|
|
1914
1940
|
],
|
|
1915
1941
|
setup(t, { emit: l }) {
|
|
1916
|
-
const o = l, n = t, e =
|
|
1942
|
+
const o = l, n = t, e = y(!1), i = Ye(null), c = y(null), a = y(null);
|
|
1917
1943
|
let s;
|
|
1918
1944
|
const r = () => {
|
|
1919
1945
|
clearTimeout(s);
|
|
@@ -1923,7 +1949,7 @@ const oo = (t, l) => {
|
|
|
1923
1949
|
q ? (r(), h({ content: q })) : C > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${C}`), s = setTimeout(B, F), C--) : console.warn("Failed to load docx data from meta map.");
|
|
1924
1950
|
};
|
|
1925
1951
|
B();
|
|
1926
|
-
},
|
|
1952
|
+
}, u = async () => {
|
|
1927
1953
|
try {
|
|
1928
1954
|
const [p, C, F, z] = await Oe.loadXmlData(n.fileSource);
|
|
1929
1955
|
return { content: p, media: C, mediaFiles: F, fonts: z };
|
|
@@ -1932,7 +1958,7 @@ const oo = (t, l) => {
|
|
|
1932
1958
|
}
|
|
1933
1959
|
}, b = async () => {
|
|
1934
1960
|
if (n.fileSource) {
|
|
1935
|
-
const p = await
|
|
1961
|
+
const p = await u();
|
|
1936
1962
|
return h(p);
|
|
1937
1963
|
} else if (n.options.ydoc && n.options.collaborationProvider) {
|
|
1938
1964
|
delete n.options.content;
|
|
@@ -1941,15 +1967,15 @@ const oo = (t, l) => {
|
|
|
1941
1967
|
};
|
|
1942
1968
|
C.on("synced", F);
|
|
1943
1969
|
}
|
|
1944
|
-
},
|
|
1945
|
-
const p =
|
|
1970
|
+
}, v = () => {
|
|
1971
|
+
const p = wt();
|
|
1946
1972
|
return n.options.pagination ? p : p.filter((C) => C.name !== "pagination");
|
|
1947
1973
|
}, h = async ({ content: p, media: C = {}, mediaFiles: F = {}, fonts: z = {} } = {}) => {
|
|
1948
1974
|
i.value = new Oe({
|
|
1949
1975
|
mode: "docx",
|
|
1950
1976
|
element: a.value,
|
|
1951
1977
|
fileSource: n.fileSource,
|
|
1952
|
-
extensions:
|
|
1978
|
+
extensions: v(),
|
|
1953
1979
|
externalExtensions: n.options.externalExtensions,
|
|
1954
1980
|
documentId: n.documentId,
|
|
1955
1981
|
content: p,
|
|
@@ -1958,7 +1984,7 @@ const oo = (t, l) => {
|
|
|
1958
1984
|
fonts: z,
|
|
1959
1985
|
...n.options
|
|
1960
1986
|
}), i.value.on("paginationUpdate", () => {
|
|
1961
|
-
|
|
1987
|
+
so(a, i);
|
|
1962
1988
|
}), i.value.on("collaborationReady", () => {
|
|
1963
1989
|
setTimeout(() => {
|
|
1964
1990
|
e.value = !0;
|
|
@@ -1966,7 +1992,7 @@ const oo = (t, l) => {
|
|
|
1966
1992
|
});
|
|
1967
1993
|
}, E = (p) => {
|
|
1968
1994
|
o("editor-keydown", { editor: i.value });
|
|
1969
|
-
},
|
|
1995
|
+
}, g = (p) => {
|
|
1970
1996
|
o("editor-click", { editor: i.value });
|
|
1971
1997
|
let C = a.value?.querySelector(".ProseMirror");
|
|
1972
1998
|
if (!C || !i.value)
|
|
@@ -1976,92 +2002,92 @@ const oo = (t, l) => {
|
|
|
1976
2002
|
we(() => {
|
|
1977
2003
|
b(), (n.options?.suppressSkeletonLoader || !n.options?.collaborationProvider) && (e.value = !0);
|
|
1978
2004
|
});
|
|
1979
|
-
const
|
|
1980
|
-
p.target.classList.contains("ProseMirror") ||
|
|
2005
|
+
const $ = (p) => {
|
|
2006
|
+
p.target.classList.contains("ProseMirror") || lo(p, i.value);
|
|
1981
2007
|
}, L = ({ side: p, value: C }) => {
|
|
1982
2008
|
if (!i.value) return;
|
|
1983
2009
|
const F = i.value.getPageStyles(), { pageMargins: z } = F, B = { ...z, [p]: C };
|
|
1984
2010
|
i.value?.updatePageStyle({ pageMargins: B });
|
|
1985
2011
|
};
|
|
1986
|
-
return
|
|
2012
|
+
return Je(() => {
|
|
1987
2013
|
r(), i.value?.destroy(), i.value = null;
|
|
1988
|
-
}), (p, C) => (
|
|
1989
|
-
t.options.rulers && i.value ? (
|
|
2014
|
+
}), (p, C) => (w(), k("div", mo, [
|
|
2015
|
+
t.options.rulers && i.value ? (w(), Ot(uo, {
|
|
1990
2016
|
key: 0,
|
|
1991
2017
|
class: "ruler",
|
|
1992
2018
|
editor: i.value,
|
|
1993
2019
|
onMarginChange: L
|
|
1994
|
-
}, null, 8, ["editor"])) :
|
|
1995
|
-
|
|
2020
|
+
}, null, 8, ["editor"])) : Q("", !0),
|
|
2021
|
+
_("div", {
|
|
1996
2022
|
class: "super-editor",
|
|
1997
2023
|
ref_key: "editorWrapper",
|
|
1998
|
-
ref:
|
|
2024
|
+
ref: c,
|
|
1999
2025
|
onKeydown: E,
|
|
2000
|
-
onClick:
|
|
2001
|
-
onMousedown:
|
|
2026
|
+
onClick: g,
|
|
2027
|
+
onMousedown: $
|
|
2002
2028
|
}, [
|
|
2003
|
-
|
|
2029
|
+
_("div", {
|
|
2004
2030
|
ref_key: "editorElem",
|
|
2005
2031
|
ref: a,
|
|
2006
2032
|
class: "editor-element super-editor__element"
|
|
2007
2033
|
}, null, 512)
|
|
2008
2034
|
], 544),
|
|
2009
|
-
e.value ?
|
|
2010
|
-
|
|
2011
|
-
V(
|
|
2035
|
+
e.value ? Q("", !0) : (w(), k("div", po, [
|
|
2036
|
+
_("div", fo, [
|
|
2037
|
+
V(D(Y), {
|
|
2012
2038
|
text: "",
|
|
2013
2039
|
style: { width: "60%" }
|
|
2014
2040
|
})
|
|
2015
2041
|
]),
|
|
2016
|
-
V(
|
|
2042
|
+
V(D(Y), {
|
|
2017
2043
|
text: "",
|
|
2018
2044
|
repeat: 6
|
|
2019
2045
|
}),
|
|
2020
|
-
V(
|
|
2046
|
+
V(D(Y), {
|
|
2021
2047
|
text: "",
|
|
2022
2048
|
style: { width: "60%" }
|
|
2023
2049
|
}),
|
|
2024
|
-
V(
|
|
2050
|
+
V(D(Y), {
|
|
2025
2051
|
text: "",
|
|
2026
2052
|
repeat: 6,
|
|
2027
2053
|
style: { width: "30%", display: "block", margin: "20px" }
|
|
2028
2054
|
}),
|
|
2029
|
-
V(
|
|
2055
|
+
V(D(Y), {
|
|
2030
2056
|
text: "",
|
|
2031
2057
|
style: { width: "60%" }
|
|
2032
2058
|
}),
|
|
2033
|
-
V(
|
|
2059
|
+
V(D(Y), {
|
|
2034
2060
|
text: "",
|
|
2035
2061
|
repeat: 5
|
|
2036
2062
|
}),
|
|
2037
|
-
V(
|
|
2063
|
+
V(D(Y), {
|
|
2038
2064
|
text: "",
|
|
2039
2065
|
style: { width: "30%" }
|
|
2040
2066
|
}),
|
|
2041
|
-
V(
|
|
2067
|
+
V(D(Y), {
|
|
2042
2068
|
text: "",
|
|
2043
2069
|
style: { "margin-top": "50px" }
|
|
2044
2070
|
}),
|
|
2045
|
-
V(
|
|
2071
|
+
V(D(Y), {
|
|
2046
2072
|
text: "",
|
|
2047
2073
|
repeat: 6
|
|
2048
2074
|
}),
|
|
2049
|
-
V(
|
|
2075
|
+
V(D(Y), {
|
|
2050
2076
|
text: "",
|
|
2051
2077
|
style: { width: "70%" }
|
|
2052
2078
|
})
|
|
2053
2079
|
]))
|
|
2054
2080
|
]));
|
|
2055
2081
|
}
|
|
2056
|
-
},
|
|
2082
|
+
}, Eo = /* @__PURE__ */ K(ho, [["__scopeId", "data-v-ff8f86f4"]]), So = {
|
|
2057
2083
|
__name: "BasicUpload",
|
|
2058
2084
|
emits: ["file-change"],
|
|
2059
2085
|
setup(t, { emit: l }) {
|
|
2060
2086
|
const o = l, n = (e) => {
|
|
2061
2087
|
o("file-change", e.target.files[0]);
|
|
2062
2088
|
};
|
|
2063
|
-
return (e, i) => (
|
|
2064
|
-
|
|
2089
|
+
return (e, i) => (w(), k("div", null, [
|
|
2090
|
+
_("input", {
|
|
2065
2091
|
type: "file",
|
|
2066
2092
|
id: "fileInput",
|
|
2067
2093
|
onChange: n,
|
|
@@ -2069,7 +2095,7 @@ const oo = (t, l) => {
|
|
|
2069
2095
|
}, null, 32)
|
|
2070
2096
|
]));
|
|
2071
2097
|
}
|
|
2072
|
-
},
|
|
2098
|
+
}, go = ["innerHTML"], vo = {
|
|
2073
2099
|
__name: "SuperInput",
|
|
2074
2100
|
props: {
|
|
2075
2101
|
modelValue: {
|
|
@@ -2093,74 +2119,74 @@ const oo = (t, l) => {
|
|
|
2093
2119
|
},
|
|
2094
2120
|
emits: ["update:modelValue", "focus", "blur"],
|
|
2095
2121
|
setup(t, { emit: l }) {
|
|
2096
|
-
const o = l, n = t, e =
|
|
2097
|
-
const E =
|
|
2122
|
+
const o = l, n = t, e = Ye(), i = y(null), c = y(!1), a = ({ editor: v, transaction: h }) => {
|
|
2123
|
+
const E = v.getHTML();
|
|
2098
2124
|
o("update:modelValue", E);
|
|
2099
|
-
}, s = ({ editor:
|
|
2100
|
-
|
|
2101
|
-
}, r = ({ editor:
|
|
2102
|
-
|
|
2125
|
+
}, s = ({ editor: v, transaction: h }) => {
|
|
2126
|
+
c.value = !0, b(), o("focus", { editor: v, transaction: h });
|
|
2127
|
+
}, r = ({ editor: v, transaction: h }) => {
|
|
2128
|
+
c.value = !1, o("blur", { editor: v, transaction: h });
|
|
2103
2129
|
}, d = async () => {
|
|
2104
2130
|
kt.options.placeholder = n.placeholder || "Type something...", n.options.onTransaction = a, n.options.onFocus = s, n.options.onBlur = r, e.value = new Oe({
|
|
2105
2131
|
mode: "text",
|
|
2106
2132
|
content: document.getElementById("currentContent"),
|
|
2107
2133
|
element: i.value,
|
|
2108
|
-
extensions:
|
|
2134
|
+
extensions: Ct(),
|
|
2109
2135
|
users: n.users,
|
|
2110
2136
|
...n.options
|
|
2111
2137
|
});
|
|
2112
|
-
},
|
|
2113
|
-
|
|
2138
|
+
}, u = () => {
|
|
2139
|
+
c.value = !0, e.value?.view?.focus();
|
|
2114
2140
|
}, b = () => {
|
|
2115
2141
|
e.value?.setOptions({ users: n.users });
|
|
2116
2142
|
};
|
|
2117
2143
|
return we(() => {
|
|
2118
2144
|
d();
|
|
2119
|
-
}),
|
|
2145
|
+
}), Je(() => {
|
|
2120
2146
|
e.value?.destroy(), e.value = null;
|
|
2121
|
-
}), (
|
|
2122
|
-
class:
|
|
2123
|
-
onClick:
|
|
2147
|
+
}), (v, h) => (w(), k("div", {
|
|
2148
|
+
class: ne(["super-editor super-input", { "super-input-active": c.value }]),
|
|
2149
|
+
onClick: be(u, ["stop", "prevent"])
|
|
2124
2150
|
}, [
|
|
2125
|
-
|
|
2151
|
+
_("div", {
|
|
2126
2152
|
id: "currentContent",
|
|
2127
2153
|
style: { display: "none" },
|
|
2128
2154
|
innerHTML: t.modelValue
|
|
2129
|
-
}, null, 8,
|
|
2130
|
-
|
|
2155
|
+
}, null, 8, go),
|
|
2156
|
+
_("div", {
|
|
2131
2157
|
ref_key: "editorElem",
|
|
2132
2158
|
ref: i,
|
|
2133
2159
|
class: "editor-element super-editor__element"
|
|
2134
2160
|
}, null, 512)
|
|
2135
2161
|
], 2));
|
|
2136
2162
|
}
|
|
2137
|
-
},
|
|
2138
|
-
Node:
|
|
2139
|
-
Attribute:
|
|
2140
|
-
Extension:
|
|
2141
|
-
Plugin:
|
|
2142
|
-
Mark:
|
|
2163
|
+
}, Ao = /* @__PURE__ */ K(vo, [["__scopeId", "data-v-4d5cff52"]]), To = {
|
|
2164
|
+
Node: St,
|
|
2165
|
+
Attribute: Et,
|
|
2166
|
+
Extension: xt,
|
|
2167
|
+
Plugin: It,
|
|
2168
|
+
Mark: _t
|
|
2143
2169
|
};
|
|
2144
2170
|
export {
|
|
2145
2171
|
Wt as AIWriter,
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2172
|
+
So as BasicUpload,
|
|
2173
|
+
Lo as CommentsPluginKey,
|
|
2174
|
+
zo as DocxZipper,
|
|
2149
2175
|
Oe as Editor,
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2176
|
+
To as Extensions,
|
|
2177
|
+
Oo as SuperConverter,
|
|
2178
|
+
Eo as SuperEditor,
|
|
2179
|
+
Ao as SuperInput,
|
|
2180
|
+
xo as SuperToolbar,
|
|
2155
2181
|
zt as Toolbar,
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2182
|
+
Mo as TrackChangesBasePluginKey,
|
|
2183
|
+
Po as createZip,
|
|
2184
|
+
Do as fieldAnnotationHelpers,
|
|
2185
|
+
gt as getActiveFormatting,
|
|
2186
|
+
oo as getAllowedImageDimensions,
|
|
2187
|
+
$o as getMarksFromSelection,
|
|
2188
|
+
Ct as getRichTextExtensions,
|
|
2189
|
+
wt as getStarterExtensions,
|
|
2190
|
+
Ho as helpers,
|
|
2191
|
+
Bo as trackChangesHelpers
|
|
2166
2192
|
};
|