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