@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
@@ -24,23 +24,29 @@ function de(e) {
24
24
  };
25
25
  }
26
26
  function N(e, i = !0) {
27
- if ((e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
27
+ if ((e == null ? void 0 : e.contentElement) instanceof HTMLElement)
28
+ return e.contentElement;
28
29
  if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
29
30
  const r = e.editorElement;
30
- if (r.matches($)) return r;
31
+ if (r.matches($))
32
+ return r;
31
33
  const o = r.querySelector($);
32
- if (o instanceof HTMLElement) return o;
34
+ if (o instanceof HTMLElement)
35
+ return o;
33
36
  }
34
37
  const t = window.getSelection();
35
38
  if (t && t.rangeCount > 0) {
36
39
  const r = t.getRangeAt(0).startContainer, o = r.nodeType === Node.ELEMENT_NODE ? r : r.parentElement, f = o == null ? void 0 : o.closest($);
37
- if (f) return f;
40
+ if (f)
41
+ return f;
38
42
  }
39
43
  const n = document.activeElement;
40
44
  if (n) {
41
- if (n.matches($)) return n;
45
+ if (n.matches($))
46
+ return n;
42
47
  const r = n.closest($);
43
- if (r) return r;
48
+ if (r)
49
+ return r;
44
50
  }
45
51
  return D && D.isConnected ? D : i ? document.querySelector($) : null;
46
52
  }
@@ -48,15 +54,18 @@ function O(e) {
48
54
  return e.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") || e;
49
55
  }
50
56
  function P(e) {
51
- if (!e) return !1;
57
+ if (!e)
58
+ return !1;
52
59
  const i = e.getAttribute("data-theme") || e.getAttribute("theme");
53
- if (i && i.toLowerCase() === "dark") return !0;
60
+ if (i && i.toLowerCase() === "dark")
61
+ return !0;
54
62
  const t = e.classList;
55
63
  return t.contains("dark") || t.contains("editora-theme-dark") || t.contains("rte-theme-dark");
56
64
  }
57
65
  function Q(e) {
58
66
  const i = O(e);
59
- if (P(i)) return !0;
67
+ if (P(i))
68
+ return !0;
60
69
  const t = i.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
61
70
  return !!(P(t) || P(document.documentElement) || P(document.body));
62
71
  }
@@ -86,7 +95,8 @@ function Z(e, i, t) {
86
95
  let n = te(e);
87
96
  if (t && (n = n.replace(/[ \t]+/g, " ").replace(/\n{3,}/g, `
88
97
 
89
- `).trim()), !n) return [];
98
+ `).trim()), !n)
99
+ return [];
90
100
  if (i === "line")
91
101
  return n.split(`
92
102
  `);
@@ -101,10 +111,13 @@ function Z(e, i, t) {
101
111
  }), r;
102
112
  }
103
113
  function ue(e, i, t) {
104
- if (e.length === 0) return "";
105
- if (i === "line") return e.join(`
114
+ if (e.length === 0)
115
+ return "";
116
+ if (i === "line")
117
+ return e.join(`
106
118
  `);
107
- if (t) return e.join(" ");
119
+ if (t)
120
+ return e.join(" ");
108
121
  let n = "";
109
122
  for (let r = 0; r < e.length; r += 1) {
110
123
  const o = e[r];
@@ -215,7 +228,8 @@ function ge(e) {
215
228
  return o || f;
216
229
  }
217
230
  function ye() {
218
- if (typeof document == "undefined" || document.getElementById(J)) return;
231
+ if (typeof document == "undefined" || document.getElementById(J))
232
+ return;
219
233
  const e = document.createElement("style");
220
234
  e.id = J, e.textContent = `
221
235
  .${l} {
@@ -517,14 +531,18 @@ function ye() {
517
531
  `, document.head.appendChild(e);
518
532
  }
519
533
  async function ke(e, i, t) {
520
- if (t != null) return t;
534
+ if (t != null)
535
+ return t;
521
536
  if (typeof i.getBaselineHtml == "function") {
522
537
  const o = O(e), f = await Promise.resolve(i.getBaselineHtml({ editor: e, editorRoot: o }));
523
- if (typeof f == "string") return f;
538
+ if (typeof f == "string")
539
+ return f;
524
540
  }
525
541
  const n = w.get(e);
526
- if (typeof n == "string") return n;
527
- if (typeof i.baselineHtml == "string") return i.baselineHtml;
542
+ if (typeof n == "string")
543
+ return n;
544
+ if (typeof i.baselineHtml == "string")
545
+ return i.baselineHtml;
528
546
  const r = W(e);
529
547
  return w.set(e, r), r;
530
548
  }
@@ -535,11 +553,13 @@ function xe(e) {
535
553
  i == null || i.focus();
536
554
  }
537
555
  function $e(e, i) {
538
- if (e.key !== "Tab") return;
556
+ if (e.key !== "Tab")
557
+ return;
539
558
  const t = Array.from(i.querySelectorAll(
540
559
  'button:not([disabled]), select:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
541
560
  )).filter((f) => !f.hasAttribute("disabled"));
542
- if (t.length === 0) return;
561
+ if (t.length === 0)
562
+ return;
543
563
  const n = t[0], r = t[t.length - 1], o = document.activeElement;
544
564
  e.shiftKey && o === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && o === r && (e.preventDefault(), n.focus());
545
565
  }
@@ -639,7 +659,8 @@ function ie(e, i, t) {
639
659
  } catch (Se) {
640
660
  E = (Y = w.get(e)) != null ? Y : W(e);
641
661
  }
642
- if (v !== L || !n.isConnected) return;
662
+ if (v !== L || !n.isConnected)
663
+ return;
643
664
  const oe = X(E), se = X(y), ae = Z(oe, f, g), le = Z(se, f, g), C = he(
644
665
  ae,
645
666
  le,
@@ -703,15 +724,18 @@ function ie(e, i, t) {
703
724
  }
704
725
  function we(e) {
705
726
  V = e, !H && (H = (i) => {
706
- if (!ge(i)) return;
727
+ if (!ge(i))
728
+ return;
707
729
  if (document.querySelector(`.${l}`)) {
708
730
  i.preventDefault();
709
731
  return;
710
732
  }
711
733
  const t = i.target;
712
- if (!!(t != null && t.closest("input, textarea, select"))) return;
734
+ if (!!(t != null && t.closest("input, textarea, select")))
735
+ return;
713
736
  const r = N(void 0, !1);
714
- if (!r || r.getAttribute("contenteditable") === "false") return;
737
+ if (!r || r.getAttribute("contenteditable") === "false")
738
+ return;
715
739
  i.preventDefault(), i.stopPropagation();
716
740
  const o = R.get(r) || V || e;
717
741
  ie(r, o);
@@ -751,7 +775,8 @@ const Me = (e = {}) => {
751
775
  },
752
776
  setVersionDiffBaseline: (t, n) => {
753
777
  const r = N(n);
754
- if (!r) return !1;
778
+ if (!r)
779
+ return !1;
755
780
  R.set(r, i);
756
781
  const o = typeof t == "string" ? t : typeof (t == null ? void 0 : t.html) == "string" ? t.html : r.innerHTML;
757
782
  return w.set(r, o), !0;
@@ -773,4 +798,4 @@ const Me = (e = {}) => {
773
798
  export {
774
799
  Me as VersionDiffPlugin
775
800
  };
776
- //# sourceMappingURL=VersionDiffPlugin.native-Bvxgy--t.mjs.map
801
+ //# sourceMappingURL=VersionDiffPlugin.native-5bbeff85.mjs.map
@@ -0,0 +1,31 @@
1
+ var u = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : {};
2
+ function f(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ function s(e) {
6
+ if (e.__esModule)
7
+ return e;
8
+ var r = e.default;
9
+ if (typeof r == "function") {
10
+ var t = function o() {
11
+ return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
12
+ };
13
+ t.prototype = r.prototype;
14
+ } else
15
+ t = {};
16
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
17
+ var n = Object.getOwnPropertyDescriptor(e, o);
18
+ Object.defineProperty(t, o, n.get ? n : {
19
+ enumerable: !0,
20
+ get: function() {
21
+ return e[o];
22
+ }
23
+ });
24
+ }), t;
25
+ }
26
+ export {
27
+ f as a,
28
+ u as c,
29
+ s as g
30
+ };
31
+ //# sourceMappingURL=_commonjsHelpers-69d58be2.mjs.map
@@ -107,4 +107,4 @@ export {
107
107
  N as a,
108
108
  T as b
109
109
  };
110
- //# sourceMappingURL=anchoredPopover-Bxds0VoB.mjs.map
110
+ //# sourceMappingURL=anchoredPopover-5cca53ba.mjs.map