@harbour-enterprises/superdoc 0.10.1 → 0.10.3

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