@editora/core 1.0.8 → 1.0.9

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 (88) hide show
  1. package/README.md +5 -0
  2. package/dist/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-58d12bed.mjs} +23 -12
  3. package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-289a112a.mjs} +112 -102
  4. package/dist/{ApprovalWorkflowPlugin.native-C3jtAYjG.mjs → ApprovalWorkflowPlugin.native-449ce66c.mjs} +79 -40
  5. package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-8aceb5cc.mjs} +16 -9
  6. package/dist/{BlockquotePlugin.native-JFmOLsxN.mjs → BlockquotePlugin.native-3541c714.mjs} +3 -2
  7. package/dist/{BlocksLibraryPlugin.native-HMWKxWNs.mjs → BlocksLibraryPlugin.native-1cc51e63.mjs} +119 -60
  8. package/dist/{BoldPlugin.native-BAzzoqU5.mjs → BoldPlugin.native-f9d7f8e4.mjs} +1 -1
  9. package/dist/{CapitalizationPlugin.native-DOMsh5R7.mjs → CapitalizationPlugin.native-42c135dc.mjs} +3 -2
  10. package/dist/{ChecklistPlugin.native-nuSSEFNI.mjs → ChecklistPlugin.native-3b397ee9.mjs} +43 -22
  11. package/dist/{CitationsPlugin.native-BnU0qCwR.mjs → CitationsPlugin.native-169fb1e8.mjs} +137 -69
  12. package/dist/{ClearFormattingPlugin.native-Bq_XcTh2.mjs → ClearFormattingPlugin.native-77baa514.mjs} +11 -6
  13. package/dist/{CodePlugin.native-DlpTPdkd.mjs → CodePlugin.native-989cf0aa.mjs} +629 -580
  14. package/dist/{CodeSamplePlugin.native-CgGoH-X4.mjs → CodeSamplePlugin.native-6cc0148e.mjs} +19 -10
  15. package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-03659874.mjs} +55 -28
  16. package/dist/{ConditionalContentPlugin.native-CfhY46rU.mjs → ConditionalContentPlugin.native-4983143a.mjs} +108 -51
  17. package/dist/{ContentRulesPlugin.native-nBLQ8QFZ.mjs → ContentRulesPlugin.native-63ed405b.mjs} +100 -50
  18. package/dist/{DataBindingPlugin.native-jQ1JPRTp.mjs → DataBindingPlugin.native-427e9d75.mjs} +79 -40
  19. package/dist/{DirectionPlugin.native-CDnbdNyl.mjs → DirectionPlugin.native-4e742f42.mjs} +19 -10
  20. package/dist/{DocSchemaPlugin.native-CHOge18O.mjs → DocSchemaPlugin.native-8e41eda0.mjs} +115 -58
  21. package/dist/{DocumentManagerPlugin.native-C2cs_1w4.mjs → DocumentManagerPlugin.native-e69895ad.mjs} +4 -4
  22. package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-55209c87.mjs} +70 -70
  23. package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-65c5ac47.mjs} +11 -6
  24. package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-f9bc255a.mjs} +7 -4
  25. package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-f5647872.mjs} +19 -10
  26. package/dist/{FootnotePlugin.native-D730OGRm.mjs → FootnotePlugin.native-494657b3.mjs} +77 -39
  27. package/dist/{FullscreenPlugin.native-ChXyxeNw.mjs → FullscreenPlugin.native-87ce92e9.mjs} +1 -1
  28. package/dist/{HeadingPlugin.native-DrLYwQnQ.mjs → HeadingPlugin.native-e38c4a16.mjs} +1 -1
  29. package/dist/{HistoryPlugin.native-TDnVMsEO.mjs → HistoryPlugin.native-92ed4be4.mjs} +43 -22
  30. package/dist/{IndentPlugin.native-BHixp8sP.mjs → IndentPlugin.native-e4ee902b.mjs} +23 -12
  31. package/dist/{ItalicPlugin.native-CQjjDyUL.mjs → ItalicPlugin.native-7c95cfbc.mjs} +1 -1
  32. package/dist/{LineHeightPlugin.native-CM7iXdQj.mjs → LineHeightPlugin.native-5668f78c.mjs} +19 -10
  33. package/dist/{LinkPlugin.native-DYCIcdTm.mjs → LinkPlugin.native-6df29111.mjs} +9 -5
  34. package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-fe2e115a.mjs} +9 -5
  35. package/dist/{MathPlugin.native-f_mDp8VL.mjs → MathPlugin.native-735bbac2.mjs} +9 -5
  36. package/dist/{MediaManagerPlugin.native-BiXiK8FC.mjs → MediaManagerPlugin.native-3cf48a00.mjs} +219 -207
  37. package/dist/{MentionPlugin.native-BMDlOqur.mjs → MentionPlugin.native-3b1e8c05.mjs} +89 -45
  38. package/dist/{MergeTagPlugin.native-C3eOfEgw.mjs → MergeTagPlugin.native-31cf7d48.mjs} +51 -26
  39. package/dist/{PIIRedactionPlugin.native-DcsjmtV1.mjs → PIIRedactionPlugin.native-7ab10b9f.mjs} +107 -54
  40. package/dist/{PageBreakPlugin.native-DijGuHJZ.mjs → PageBreakPlugin.native-1794c5fb.mjs} +31 -16
  41. package/dist/{PreviewPlugin.native-WuIwOAOR.mjs → PreviewPlugin.native-f7b67cc0.mjs} +11 -6
  42. package/dist/{PrintPlugin.native-7qt5v7L5.mjs → PrintPlugin.native-f6a168c2.mjs} +5 -3
  43. package/dist/{SlashCommandsPlugin.native-CmxvMEaE.mjs → SlashCommandsPlugin.native-8d45e511.mjs} +72 -37
  44. package/dist/{SmartPastePlugin.native-BOKKtF07.mjs → SmartPastePlugin.native-a6c5efec.mjs} +99 -50
  45. package/dist/{SpecialCharactersPlugin.native-CZDato89.mjs → SpecialCharactersPlugin.native-7f06d4ba.mjs} +17 -9
  46. package/dist/{SpellCheckPlugin.native-BZB9AewP.mjs → SpellCheckPlugin.native-04e20834.mjs} +41 -21
  47. package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-905e9501.mjs} +9 -5
  48. package/dist/{TablePlugin.native-DrHX-efe.mjs → TablePlugin.native-7d5458c1.mjs} +58 -30
  49. package/dist/{TemplatePlugin.native-CrpfKRJ8.mjs → TemplatePlugin.native-580f0f63.mjs} +32 -17
  50. package/dist/{TextAlignmentPlugin.native-sM_1s00t.mjs → TextAlignmentPlugin.native-9357b3ed.mjs} +11 -6
  51. package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-d53ed459.mjs} +26 -14
  52. package/dist/{TrackChangesPlugin.native-Bghu2q4a.mjs → TrackChangesPlugin.native-e96da509.mjs} +115 -58
  53. package/dist/{TranslationWorkflowPlugin.native-Bz6jDGvj.mjs → TranslationWorkflowPlugin.native-4e711b1e.mjs} +160 -91
  54. package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-8080c998.mjs} +1 -1
  55. package/dist/{VersionDiffPlugin.native-Bvxgy--t.mjs → VersionDiffPlugin.native-5bbeff85.mjs} +51 -26
  56. package/dist/_commonjsHelpers-69d58be2.mjs +31 -0
  57. package/dist/{anchoredPopover-Bxds0VoB.mjs → anchoredPopover-5cca53ba.mjs} +1 -1
  58. package/dist/documentManager-8327fb6e.mjs +9166 -0
  59. package/dist/{editorContainerHelpers-C7kdWnS0.mjs → editorContainerHelpers-69585c07.mjs} +3 -2
  60. package/dist/editora.min.js +14 -13
  61. package/dist/editora.umd.js +14 -13
  62. package/dist/{html2canvas.esm-AYkPY5LS.mjs → html2canvas.esm-c51cb3b9.mjs} +978 -894
  63. package/dist/index-072ef022.js +11 -0
  64. package/dist/index-49d31221.mjs +16860 -0
  65. package/dist/{index-DqC57IEH.mjs → index-7da30697.mjs} +163 -124
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.es-b47a189f.mjs +5782 -0
  68. package/dist/index.esm.js +12 -7
  69. package/dist/{jspdf.es.min-BJGtOnRT.mjs → jspdf.es.min-780c82db.mjs} +4808 -3784
  70. package/dist/plugin-loader.js +67 -67
  71. package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-3bdbcfc5.mjs} +20 -10
  72. package/dist/style.css +1 -0
  73. package/dist/webcomponent-core.js +164 -125
  74. package/dist/webcomponent-core.min.css +1 -1
  75. package/dist/webcomponent-core.min.js +18 -17
  76. package/dist/webcomponent.cjs.js +1 -1
  77. package/dist/webcomponent.esm.js +1 -1
  78. package/dist/webcomponent.js +226 -187
  79. package/dist/webcomponent.min.css +1 -1
  80. package/dist/webcomponent.min.js +1324 -1117
  81. package/package.json +11 -5
  82. package/LICENSE +0 -21
  83. package/dist/_commonjsHelpers-DOllISpa.mjs +0 -32
  84. package/dist/core.css +0 -1
  85. package/dist/documentManager-vQ1VkbUY.mjs +0 -8418
  86. package/dist/index-BslAFzmv.mjs +0 -16544
  87. package/dist/index-D1LOqg5C.js +0 -10
  88. package/dist/index.es-BYD2KEo6.mjs +0 -6666
@@ -28,7 +28,8 @@ const g = /* @__PURE__ */ new Set([
28
28
  if (n.getAttribute("contenteditable") === "true")
29
29
  return n;
30
30
  const t = n.closest('[contenteditable="true"]');
31
- if (t) return t;
31
+ if (t)
32
+ return t;
32
33
  }
33
34
  return document.querySelector('[contenteditable="true"]');
34
35
  }, u = (e) => {
@@ -36,8 +37,10 @@ const g = /* @__PURE__ */ new Set([
36
37
  for (; n && n !== document.body; ) {
37
38
  if (n.nodeType === Node.ELEMENT_NODE) {
38
39
  const t = n;
39
- if (l(t)) return t;
40
- if (t.getAttribute("contenteditable") === "true") break;
40
+ if (l(t))
41
+ return t;
42
+ if (t.getAttribute("contenteditable") === "true")
43
+ break;
41
44
  }
42
45
  n = n.parentNode;
43
46
  }
@@ -54,7 +57,8 @@ const g = /* @__PURE__ */ new Set([
54
57
  {
55
58
  acceptNode: (o) => {
56
59
  const d = o;
57
- if (!l(d)) return NodeFilter.FILTER_SKIP;
60
+ if (!l(d))
61
+ return NodeFilter.FILTER_SKIP;
58
62
  if (typeof e.intersectsNode == "function")
59
63
  return e.intersectsNode(d) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
60
64
  const a = document.createRange();
@@ -67,7 +71,8 @@ const g = /* @__PURE__ */ new Set([
67
71
  i(c), c = s.nextNode();
68
72
  return t.length === 0 && i(u(e.commonAncestorContainer)), t;
69
73
  }, T = (e, n) => {
70
- if (n === e.innerHTML) return;
74
+ if (n === e.innerHTML)
75
+ return;
71
76
  const t = window.execEditorCommand || window.executeEditorCommand;
72
77
  if (typeof t == "function")
73
78
  try {
@@ -76,13 +81,17 @@ const g = /* @__PURE__ */ new Set([
76
81
  }
77
82
  }, f = (e) => {
78
83
  const n = h();
79
- if (!n) return !1;
84
+ if (!n)
85
+ return !1;
80
86
  const t = window.getSelection();
81
- if (!t || t.rangeCount === 0) return !1;
87
+ if (!t || t.rangeCount === 0)
88
+ return !1;
82
89
  const r = t.getRangeAt(0);
83
- if (!n.contains(r.commonAncestorContainer)) return !1;
90
+ if (!n.contains(r.commonAncestorContainer))
91
+ return !1;
84
92
  const i = C(r, n);
85
- if (i.length === 0) return !1;
93
+ if (i.length === 0)
94
+ return !1;
86
95
  const s = n.innerHTML;
87
96
  return i.forEach((c) => {
88
97
  e === "rtl" ? c.setAttribute("dir", "rtl") : c.removeAttribute("dir");
@@ -127,4 +136,4 @@ const g = /* @__PURE__ */ new Set([
127
136
  export {
128
137
  E as DirectionPlugin
129
138
  };
130
- //# sourceMappingURL=DirectionPlugin.native-CDnbdNyl.mjs.map
139
+ //# sourceMappingURL=DirectionPlugin.native-4e742f42.mjs.map
@@ -88,7 +88,8 @@ function pe() {
88
88
  function Oe(e, t, n) {
89
89
  var f, h;
90
90
  const r = n(e.title || "");
91
- if (!r) return null;
91
+ if (!r)
92
+ return null;
92
93
  const s = ye(n(e.id || r)) || `section-${t + 1}`, o = P(Number((f = e.minOccurrences) != null ? f : 1), 0, 20), a = Math.max(1, o), c = P(Number((h = e.maxOccurrences) != null ? h : a), o, 40), i = n(e.placeholder || ""), l = Array.isArray(e.aliases) ? e.aliases.map((b) => n(b)).filter(Boolean) : [], d = [r, ...l].map((b) => ce(b, n)).filter(Boolean);
93
94
  return {
94
95
  id: s,
@@ -103,7 +104,8 @@ function Se(e, t) {
103
104
  const n = Array.isArray(e) && e.length > 0 ? e : pe(), r = [], s = /* @__PURE__ */ new Set();
104
105
  return n.forEach((o, a) => {
105
106
  const c = t(o.label || "");
106
- if (!c) return;
107
+ if (!c)
108
+ return;
107
109
  const i = ye(t(o.id || c)) || `schema-${a + 1}`;
108
110
  let l = i, d = 1;
109
111
  for (; s.has(l); )
@@ -112,7 +114,8 @@ function Se(e, t) {
112
114
  const f = Array.isArray(o.sections) ? o.sections : [], h = [], b = /* @__PURE__ */ new Set();
113
115
  if (f.forEach(($, g) => {
114
116
  const x = Oe($, g, t);
115
- if (!x) return;
117
+ if (!x)
118
+ return;
116
119
  let N = x.id, Ie = 1;
117
120
  for (; b.has(N); )
118
121
  N = `${x.id}-${Ie++}`;
@@ -120,7 +123,8 @@ function Se(e, t) {
120
123
  ...x,
121
124
  id: N
122
125
  });
123
- }), h.length === 0) return;
126
+ }), h.length === 0)
127
+ return;
124
128
  const O = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
125
129
  h.forEach(($, g) => {
126
130
  A.set($.id, g), $.matchKeys.forEach((x) => {
@@ -182,22 +186,28 @@ function le(e) {
182
186
  return e.closest(ie) || e;
183
187
  }
184
188
  function U(e) {
185
- if (!e) return null;
186
- if (e.matches(E)) return e;
189
+ if (!e)
190
+ return null;
191
+ if (e.matches(E))
192
+ return e;
187
193
  const t = e.querySelector(E);
188
194
  return t instanceof HTMLElement ? t : null;
189
195
  }
190
196
  function He() {
191
- if (typeof window == "undefined") return null;
197
+ if (typeof window == "undefined")
198
+ return null;
192
199
  const e = window[fe];
193
- if (!(e instanceof HTMLElement)) return null;
200
+ if (!(e instanceof HTMLElement))
201
+ return null;
194
202
  window[fe] = null;
195
203
  const t = U(e);
196
- if (t) return t;
204
+ if (t)
205
+ return t;
197
206
  const n = e.closest(ie);
198
207
  if (n) {
199
208
  const s = U(n);
200
- if (s) return s;
209
+ if (s)
210
+ return s;
201
211
  }
202
212
  const r = e.closest(E);
203
213
  return r instanceof HTMLElement ? r : null;
@@ -222,7 +232,8 @@ function Y(e) {
222
232
  }
223
233
  function Ne(e) {
224
234
  const t = le(e);
225
- if (Y(t)) return !0;
235
+ if (Y(t))
236
+ return !0;
226
237
  const n = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
227
238
  return Y(n) ? !0 : Y(document.documentElement) || Y(document.body);
228
239
  }
@@ -236,7 +247,8 @@ function Pe(e) {
236
247
  if (!(a.type !== "childList" || a.removedNodes.length === 0))
237
248
  for (let c = 0; c < a.removedNodes.length; c += 1) {
238
249
  const i = a.removedNodes[c];
239
- if (i.nodeType !== Node.ELEMENT_NODE) continue;
250
+ if (i.nodeType !== Node.ELEMENT_NODE)
251
+ continue;
240
252
  const l = i;
241
253
  if ((t = l.matches) != null && t.call(l, E) || (n = l.matches) != null && n.call(l, `.${m}`) || (r = l.querySelector) != null && r.call(l, E) || (s = l.querySelector) != null && s.call(l, `.${m}`))
242
254
  return !0;
@@ -251,29 +263,36 @@ function Q() {
251
263
  }
252
264
  function I(e, t = !0, n = !0) {
253
265
  var c;
254
- if (Q(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
266
+ if (Q(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement)
267
+ return e.contentElement;
255
268
  if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
256
269
  const i = U(e.editorElement);
257
- if (i) return i;
270
+ if (i)
271
+ return i;
258
272
  }
259
273
  const r = He();
260
- if (r) return r;
274
+ if (r)
275
+ return r;
261
276
  const s = window.getSelection();
262
277
  if (s && s.rangeCount > 0) {
263
278
  const i = (c = xe(s.getRangeAt(0).startContainer)) == null ? void 0 : c.closest(
264
279
  E
265
280
  );
266
- if (i) return i;
281
+ if (i)
282
+ return i;
267
283
  }
268
284
  const o = document.activeElement;
269
285
  if (o) {
270
- if (o.matches(E)) return o;
286
+ if (o.matches(E))
287
+ return o;
271
288
  const i = o.closest(E);
272
- if (i) return i;
289
+ if (i)
290
+ return i;
273
291
  }
274
292
  if (n && y && y.isConnected)
275
293
  return y;
276
- if (!t) return null;
294
+ if (!t)
295
+ return null;
277
296
  const a = document.querySelector(E);
278
297
  return a instanceof HTMLElement ? a : null;
279
298
  }
@@ -283,20 +302,24 @@ function _e(e) {
283
302
  const r = t.closest(`.${m}`);
284
303
  if (r) {
285
304
  const o = Array.from(S.entries()).find(([, a]) => a === r);
286
- if (o) return o[0];
305
+ if (o)
306
+ return o[0];
287
307
  }
288
308
  const s = t.closest(E);
289
- if (s) return s;
309
+ if (s)
310
+ return s;
290
311
  }
291
312
  const n = document.activeElement;
292
313
  if (n) {
293
314
  const r = n.closest(`.${m}`);
294
315
  if (r) {
295
316
  const o = Array.from(S.entries()).find(([, a]) => a === r);
296
- if (o) return o[0];
317
+ if (o)
318
+ return o[0];
297
319
  }
298
320
  const s = n.closest(E);
299
- if (s) return s;
321
+ if (s)
322
+ return s;
300
323
  }
301
324
  return null;
302
325
  }
@@ -346,7 +369,8 @@ function Ee(e) {
346
369
  return e.getAttribute("contenteditable") === "false" || e.getAttribute("data-readonly") === "true";
347
370
  }
348
371
  function se(e, t) {
349
- if (!t.classList.contains("show")) return;
372
+ if (!t.classList.contains("show"))
373
+ return;
350
374
  const n = le(e).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 440), s = Math.max(10, window.innerWidth - r - 10), o = Math.min(Math.max(10, n.right - r), s), a = Math.max(10, Math.min(window.innerHeight - 10, n.top + 12));
351
375
  t.style.width = `${r}px`, t.style.left = `${o}px`, t.style.top = `${a}px`, t.style.maxHeight = `${Math.max(260, window.innerHeight - 20)}px`;
352
376
  }
@@ -358,7 +382,8 @@ function qe(e, t) {
358
382
  const n = Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6")), r = [];
359
383
  return n.forEach((s, o) => {
360
384
  const a = t(s.textContent || "");
361
- if (!a) return;
385
+ if (!a)
386
+ return;
362
387
  const c = Number(s.tagName.slice(1)) || 0, i = ce(a, t);
363
388
  r.push({
364
389
  text: a,
@@ -373,7 +398,8 @@ function ve(e, t, n) {
373
398
  return r.forEach((o) => {
374
399
  var f;
375
400
  const a = n(o.textContent || "");
376
- if (!a) return;
401
+ if (!a)
402
+ return;
377
403
  const c = ce(a, n), i = c && t.matchKeyToSection.get(c) || null, l = i && (f = t.orderBySectionId.get(i.id)) != null ? f : null, d = P(Number(o.tagName.slice(1)) || 0, 1, 6);
378
404
  s.push({
379
405
  element: o,
@@ -385,7 +411,8 @@ function ve(e, t, n) {
385
411
  }
386
412
  function ze(e, t = 2) {
387
413
  const n = e.filter((i) => i.section).map((i) => i.level), r = n.length > 0 ? n : e.map((i) => i.level);
388
- if (r.length === 0) return t;
414
+ if (r.length === 0)
415
+ return t;
389
416
  const s = /* @__PURE__ */ new Map();
390
417
  r.forEach((i, l) => {
391
418
  s.has(i) || s.set(i, { count: 0, firstIndex: l });
@@ -400,9 +427,11 @@ function ze(e, t = 2) {
400
427
  function Be(e) {
401
428
  var o;
402
429
  const t = window.getSelection();
403
- if (!t || t.rangeCount === 0) return null;
430
+ if (!t || t.rangeCount === 0)
431
+ return null;
404
432
  const n = t.getRangeAt(0);
405
- if (((o = xe(n.startContainer)) == null ? void 0 : o.closest(E)) !== e) return null;
433
+ if (((o = xe(n.startContainer)) == null ? void 0 : o.closest(E)) !== e)
434
+ return null;
406
435
  if (n.startContainer.nodeType === Node.ELEMENT_NODE) {
407
436
  const a = n.startContainer, c = a.childNodes[n.startOffset] || null;
408
437
  return { parent: a, referenceNode: c };
@@ -461,7 +490,8 @@ function je(e, t, n) {
461
490
  const r = qe(e, n.normalizeText), s = [], o = /* @__PURE__ */ new Map(), a = [];
462
491
  for (let l = 0; l < r.length && !(s.length >= n.maxIssues); l += 1) {
463
492
  const d = r[l];
464
- if (!d.key) continue;
493
+ if (!d.key)
494
+ continue;
465
495
  const f = t.matchKeyToSection.get(d.key);
466
496
  if (f) {
467
497
  o.set(f.id, (o.get(f.id) || 0) + 1), a.push({ section: f, heading: d });
@@ -551,9 +581,11 @@ function D(e) {
551
581
  }
552
582
  function _(e) {
553
583
  const t = S.get(e);
554
- if (!t) return;
584
+ if (!t)
585
+ return;
555
586
  const n = u.get(e) || k;
556
- if (!n) return;
587
+ if (!n)
588
+ return;
557
589
  const r = p(e, n), s = L(n, r.activeSchemaId), o = t.querySelector(".rte-doc-schema-label");
558
590
  o && (o.textContent = n.labels.schemaLabel);
559
591
  const a = t.querySelector('[data-field="schema"]');
@@ -612,7 +644,8 @@ function ke(e, t) {
612
644
  return (typeof t == "boolean" ? t : !n) ? ae(e) : G(e, !1), !0;
613
645
  }
614
646
  function Ue(e, t) {
615
- if (t === e.innerHTML) return;
647
+ if (t === e.innerHTML)
648
+ return;
616
649
  const n = window.execEditorCommand || window.executeEditorCommand;
617
650
  if (typeof n == "function")
618
651
  try {
@@ -625,7 +658,8 @@ function Ge(e) {
625
658
  }
626
659
  function C(e, t, n) {
627
660
  const r = u.get(e) || k;
628
- if (!r) return [];
661
+ if (!r)
662
+ return [];
629
663
  const s = p(e, r), o = S.get(e), a = e.innerHTML;
630
664
  if (!n && s.snapshot === a)
631
665
  return s.issues;
@@ -652,7 +686,8 @@ function C(e, t, n) {
652
686
  }
653
687
  function $e(e) {
654
688
  const t = u.get(e) || k;
655
- if (!t) return;
689
+ if (!t)
690
+ return;
656
691
  de(e);
657
692
  const n = window.setTimeout(() => {
658
693
  te.delete(e), C(e, "realtime", !1);
@@ -661,18 +696,21 @@ function $e(e) {
661
696
  }
662
697
  function Ce(e, t) {
663
698
  const n = u.get(e) || k;
664
- if (!n) return !1;
699
+ if (!n)
700
+ return !1;
665
701
  const r = p(e, n), s = typeof t == "boolean" ? t : !r.realtimeEnabled;
666
702
  return r.realtimeEnabled = s, s ? $e(e) : de(e), _(e), D(e), !0;
667
703
  }
668
704
  function Te(e) {
669
705
  const t = u.get(e) || k;
670
- if (!t) return !1;
706
+ if (!t)
707
+ return !1;
671
708
  const n = p(e, t), r = S.get(e);
672
709
  if (Ee(e))
673
710
  return r && ee(r, t.labels.readonlyMessage), !1;
674
711
  const s = L(t, n.activeSchemaId);
675
- if (!s) return !1;
712
+ if (!s)
713
+ return !1;
676
714
  C(e, "insert-missing-pre", !0);
677
715
  const o = Array.from(
678
716
  new Set(
@@ -699,7 +737,8 @@ function Te(e) {
699
737
  }
700
738
  function Fe(e) {
701
739
  const t = S.get(e);
702
- if (t) return t;
740
+ if (t)
741
+ return t;
703
742
  const n = u.get(e) || k || Z();
704
743
  p(e, n);
705
744
  const r = `rte-doc-schema-panel-${Ae++}`, s = `${r}-schema`, o = document.createElement("section");
@@ -730,7 +769,8 @@ function Fe(e) {
730
769
  <div class="rte-doc-schema-live" aria-live="polite" aria-atomic="true"></div>
731
770
  `, o.addEventListener("click", (a) => {
732
771
  const c = a.target, i = c == null ? void 0 : c.closest("[data-action]");
733
- if (!i) return;
772
+ if (!i)
773
+ return;
734
774
  const l = i.getAttribute("data-action");
735
775
  if (l === "close") {
736
776
  G(e, !0);
@@ -747,9 +787,11 @@ function Fe(e) {
747
787
  l === "toggle-realtime" && Ce(e);
748
788
  }), o.addEventListener("change", (a) => {
749
789
  const c = a.target;
750
- if (!(c instanceof HTMLSelectElement) || c.getAttribute("data-field") !== "schema") return;
790
+ if (!(c instanceof HTMLSelectElement) || c.getAttribute("data-field") !== "schema")
791
+ return;
751
792
  const i = u.get(e) || k;
752
- if (!i) return;
793
+ if (!i)
794
+ return;
753
795
  const l = p(e, i), d = c.value;
754
796
  L(i, d) && (l.activeSchemaId = d, l.snapshot = "", C(e, "schema-change", !0));
755
797
  }), o.addEventListener("keydown", (a) => {
@@ -768,22 +810,27 @@ function Je(e) {
768
810
  k = e, q || (q = (t) => {
769
811
  Q();
770
812
  const n = t.target, r = n == null ? void 0 : n.closest(E);
771
- if (!r) return;
813
+ if (!r)
814
+ return;
772
815
  const s = u.get(r) || e;
773
816
  p(r, s), u.set(r, s), y = r, D(r);
774
817
  const o = S.get(r);
775
818
  o && (oe(o, r), se(r, o), _(r));
776
819
  }, document.addEventListener("focusin", q, !0)), z || (z = (t) => {
777
820
  const n = t.target, r = n == null ? void 0 : n.closest(E);
778
- if (!r) return;
821
+ if (!r)
822
+ return;
779
823
  const s = u.get(r) || k;
780
824
  !s || !p(r, s).realtimeEnabled || $e(r);
781
825
  }, document.addEventListener("input", z, !0)), B || (B = (t) => {
782
- if (t.defaultPrevented) return;
826
+ if (t.defaultPrevented)
827
+ return;
783
828
  const n = t.target;
784
- if (n != null && n.closest(`.${m}`) && t.key !== "Escape") return;
829
+ if (n != null && n.closest(`.${m}`) && t.key !== "Escape")
830
+ return;
785
831
  const r = _e(t);
786
- if (!r) return;
832
+ if (!r)
833
+ return;
787
834
  const s = u.get(r) || k || e;
788
835
  if (p(r, s), u.set(r, s), y = r, t.key === "Escape" && me(r)) {
789
836
  t.preventDefault(), G(r, !0);
@@ -809,7 +856,8 @@ function Xe() {
809
856
  q && (document.removeEventListener("focusin", q, !0), q = null), z && (document.removeEventListener("input", z, !0), z = null), B && (document.removeEventListener("keydown", B, !0), B = null), H && (window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H), H = null), K && (K.disconnect(), K = null), S.forEach((t) => t.remove()), S.clear(), Array.from(ne).forEach((t) => ue(t)), k = null, y = null;
810
857
  }
811
858
  function Ze() {
812
- if (typeof document == "undefined" || document.getElementById(he)) return;
859
+ if (typeof document == "undefined" || document.getElementById(he))
860
+ return;
813
861
  const e = document.createElement("style");
814
862
  e.id = he, e.textContent = `
815
863
  .rte-toolbar-group-items.${v},
@@ -1219,43 +1267,50 @@ const Qe = (e = {}) => {
1219
1267
  commands: {
1220
1268
  docSchema: (r, s) => {
1221
1269
  const o = I(s, !1, !1);
1222
- if (!o) return !1;
1270
+ if (!o)
1271
+ return !1;
1223
1272
  const a = u.get(o) || t;
1224
1273
  return p(o, a), u.set(o, a), y = o, ae(o), !0;
1225
1274
  },
1226
1275
  openDocSchemaPanel: (r, s) => {
1227
1276
  const o = I(s, !1, !1);
1228
- if (!o) return !1;
1277
+ if (!o)
1278
+ return !1;
1229
1279
  const a = u.get(o) || t;
1230
1280
  return p(o, a), u.set(o, a), y = o, ae(o), !0;
1231
1281
  },
1232
1282
  toggleDocSchemaPanel: (r, s) => {
1233
1283
  const o = I(s, !1, !1);
1234
- if (!o) return !1;
1284
+ if (!o)
1285
+ return !1;
1235
1286
  const a = u.get(o) || t;
1236
1287
  return p(o, a), u.set(o, a), y = o, ke(o, typeof r == "boolean" ? r : void 0);
1237
1288
  },
1238
1289
  runDocSchemaValidation: (r, s) => {
1239
1290
  const o = I(s, !1, !1);
1240
- if (!o) return !1;
1291
+ if (!o)
1292
+ return !1;
1241
1293
  const a = u.get(o) || t;
1242
1294
  return p(o, a), u.set(o, a), y = o, C(o, "command", !0), !0;
1243
1295
  },
1244
1296
  insertMissingDocSchemaSections: (r, s) => {
1245
1297
  const o = I(s, !1, !1);
1246
- if (!o) return !1;
1298
+ if (!o)
1299
+ return !1;
1247
1300
  const a = u.get(o) || t;
1248
1301
  return p(o, a), u.set(o, a), y = o, Te(o);
1249
1302
  },
1250
1303
  toggleDocSchemaRealtime: (r, s) => {
1251
1304
  const o = I(s, !1, !1);
1252
- if (!o) return !1;
1305
+ if (!o)
1306
+ return !1;
1253
1307
  const a = u.get(o) || t;
1254
1308
  return p(o, a), u.set(o, a), y = o, Ce(o, typeof r == "boolean" ? r : void 0);
1255
1309
  },
1256
1310
  setDocSchemaMode: (r, s) => {
1257
1311
  const o = I(s, !1, !1);
1258
- if (!o) return !1;
1312
+ if (!o)
1313
+ return !1;
1259
1314
  const a = u.get(o) || t, c = p(o, a);
1260
1315
  u.set(o, a);
1261
1316
  const i = typeof r == "string" ? r : (r == null ? void 0 : r.schemaId) || (r == null ? void 0 : r.id);
@@ -1263,7 +1318,8 @@ const Qe = (e = {}) => {
1263
1318
  },
1264
1319
  setDocSchemaOptions: (r, s) => {
1265
1320
  const o = I(s, !1, !1);
1266
- if (!o || !r || typeof r != "object") return !1;
1321
+ if (!o || !r || typeof r != "object")
1322
+ return !1;
1267
1323
  const a = u.get(o) || t, c = X.get(o) || Re(a), i = {
1268
1324
  ...c,
1269
1325
  ...r,
@@ -1280,7 +1336,8 @@ const Qe = (e = {}) => {
1280
1336
  },
1281
1337
  getDocSchemaState: (r, s) => {
1282
1338
  const o = I(s, !1, !1);
1283
- if (!o) return !1;
1339
+ if (!o)
1340
+ return !1;
1284
1341
  const a = u.get(o) || t;
1285
1342
  p(o, a);
1286
1343
  const c = we(o);
@@ -1322,4 +1379,4 @@ const Qe = (e = {}) => {
1322
1379
  export {
1323
1380
  Qe as DocSchemaPlugin
1324
1381
  };
1325
- //# sourceMappingURL=DocSchemaPlugin.native-CHOge18O.mjs.map
1382
+ //# sourceMappingURL=DocSchemaPlugin.native-8e41eda0.mjs.map
@@ -48,7 +48,7 @@ const c = () => ({
48
48
  try {
49
49
  const r = l();
50
50
  if (r) {
51
- const { importFromWord: d } = await import("./documentManager-vQ1VkbUY.mjs"), a = await d(n);
51
+ const { importFromWord: d } = await import("./documentManager-8327fb6e.mjs"), a = await d(n);
52
52
  r.innerHTML = a, r.dispatchEvent(new Event("input", { bubbles: !0 }));
53
53
  }
54
54
  } catch (r) {
@@ -73,7 +73,7 @@ const c = () => ({
73
73
  try {
74
74
  const t = l();
75
75
  if (t) {
76
- const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-vQ1VkbUY.mjs");
76
+ const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-8327fb6e.mjs");
77
77
  await n(e, "document.docx");
78
78
  }
79
79
  return !0;
@@ -98,7 +98,7 @@ const c = () => ({
98
98
  try {
99
99
  const t = l();
100
100
  if (t) {
101
- const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-vQ1VkbUY.mjs");
101
+ const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-8327fb6e.mjs");
102
102
  await n(e, "document.pdf", t);
103
103
  } else
104
104
  console.error("PDF Export: No editor element found"), alert("No active editor found. Please click in the editor area first.");
@@ -113,4 +113,4 @@ const c = () => ({
113
113
  export {
114
114
  c as DocumentManagerPlugin
115
115
  };
116
- //# sourceMappingURL=DocumentManagerPlugin.native-C2cs_1w4.mjs.map
116
+ //# sourceMappingURL=DocumentManagerPlugin.native-e69895ad.mjs.map