@editora/core 1.0.19 → 1.0.21

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 (28) hide show
  1. package/dist/{A11yCheckerPlugin.native-DIKuCeFw.mjs → A11yCheckerPlugin.native-qW_njhLY.mjs} +2 -2
  2. package/dist/{AnchorPlugin.native-DXZdK3zr.mjs → AnchorPlugin.native-Drmxhy98.mjs} +37 -37
  3. package/dist/{BlockquotePlugin.native-57_Xcjl1.mjs → BlockquotePlugin.native-D8jjGd0c.mjs} +19 -19
  4. package/dist/{CapitalizationPlugin.native-C-HRbXGh.mjs → CapitalizationPlugin.native-Mh-kUy-x.mjs} +17 -17
  5. package/dist/{ChecklistPlugin.native-NVrBUkaL.mjs → ChecklistPlugin.native-DLedNLsb.mjs} +31 -31
  6. package/dist/{CodePlugin.native-BcVqm5MS.mjs → CodePlugin.native-AoJ_idGz.mjs} +5 -5
  7. package/dist/{CodePlugin.native-Rgxx2Igx.mjs → CodePlugin.native-CEgR1DWC.mjs} +5 -5
  8. package/dist/{CollaborationPlugin.native-oSybCGPW.mjs → CollaborationPlugin.native-Bl3R9CRI.mjs} +1406 -1295
  9. package/dist/{CommentsPlugin.native-CLip9wAO.mjs → CommentsPlugin.native-DncTHiEe.mjs} +2 -2
  10. package/dist/{DirectionPlugin.native-Bl-QLFzO.mjs → DirectionPlugin.native-B-Zj-EAt.mjs} +33 -33
  11. package/dist/{FontFamilyPlugin.native-M3cNQ0KA.mjs → FontFamilyPlugin.native-DLq9x046.mjs} +32 -32
  12. package/dist/{PreviewPlugin.native-Dyht8mGi.mjs → PreviewPlugin.native-Dv5OsffK.mjs} +4 -4
  13. package/dist/{SpellCheckPlugin.native-Bef2oTLB.mjs → SpellCheckPlugin.native-BGm2qPfn.mjs} +20 -20
  14. package/dist/{TemplatePlugin.native-BDV2eik2.mjs → TemplatePlugin.native-Dwk8TgxI.mjs} +32 -32
  15. package/dist/editora.min.js +3 -3
  16. package/dist/editora.umd.js +5 -5
  17. package/dist/{index-DeUjxpKd.mjs → index-6i4_TH66.mjs} +136 -133
  18. package/dist/{index-CclXYzUB.js → index-Ct3Aik7_.js} +3 -3
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.esm.js +2 -2
  21. package/dist/plugin-loader.js +11 -11
  22. package/dist/webcomponent-core.js +154 -151
  23. package/dist/webcomponent-core.min.js +19 -19
  24. package/dist/webcomponent.cjs.js +1 -1
  25. package/dist/webcomponent.esm.js +1 -1
  26. package/dist/webcomponent.js +34 -31
  27. package/dist/webcomponent.min.js +212 -212
  28. package/package.json +1 -1
@@ -743,7 +743,7 @@ const oe = () => ({
743
743
  // - any other icon reusing the same auto-generated class name would
744
744
  // collide with it. Inlined the one declaration it held (fill="none")
745
745
  // directly on the rect instead, so there's nothing to leak.
746
- icon: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><title>add-comment</title><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><polygon points="17 9 15 9 15 13 11 13 11 15 15 15 15 19 17 19 17 15 21 15 21 13 17 13 17 9"></polygon><rect fill="none" width="32" height="32"></rect></svg>'
746
+ icon: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title>add-comment</title><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><polygon points="17 9 15 9 15 13 11 13 11 15 15 15 15 19 17 19 17 15 21 15 21 13 17 13 17 9"></polygon><rect fill="none" width="32" height="32"></rect></svg>'
747
747
  },
748
748
  {
749
749
  label: "Show / Hide Comments",
@@ -786,4 +786,4 @@ export {
786
786
  Q as replyToComment,
787
787
  X as resolveComment
788
788
  };
789
- //# sourceMappingURL=CommentsPlugin.native-CLip9wAO.mjs.map
789
+ //# sourceMappingURL=CommentsPlugin.native-DncTHiEe.mjs.map
@@ -1,4 +1,4 @@
1
- const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", g = /* @__PURE__ */ new Set([
1
+ const l = '.rte-content, .editora-content, [contenteditable="true"]', g = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", L = /* @__PURE__ */ new Set([
2
2
  "P",
3
3
  "DIV",
4
4
  "H1",
@@ -14,26 +14,26 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
14
14
  "FIGURE",
15
15
  "UL",
16
16
  "OL"
17
- ]), d = (e) => g.has(e.tagName) && e.getAttribute("contenteditable") !== "true", T = (e) => e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null, L = (e) => {
17
+ ]), d = (e) => L.has(e.tagName) && e.getAttribute("contenteditable") !== "true", T = (e) => e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null, C = (e) => {
18
18
  const n = e == null ? void 0 : e.contentElement;
19
19
  if (n instanceof HTMLElement) return n;
20
20
  const t = e == null ? void 0 : e.editorElement;
21
21
  if (t instanceof HTMLElement) {
22
- const r = t.querySelector(l);
23
- if (r instanceof HTMLElement) return r;
22
+ const o = t.querySelector(l);
23
+ if (o instanceof HTMLElement) return o;
24
24
  if (t.getAttribute("contenteditable") === "true") return t;
25
25
  }
26
- const o = window.__editoraCommandEditorRoot;
27
- if (o instanceof HTMLElement) {
28
- const r = o.querySelector(l);
29
- if (r instanceof HTMLElement) return r;
30
- if (o.getAttribute("contenteditable") === "true") return o;
26
+ const r = window.__editoraCommandEditorRoot;
27
+ if (r instanceof HTMLElement) {
28
+ const o = r.querySelector(l);
29
+ if (o instanceof HTMLElement) return o;
30
+ if (r.getAttribute("contenteditable") === "true") return r;
31
31
  }
32
32
  const i = window.getSelection();
33
33
  if (i && i.rangeCount > 0) {
34
- const r = T(i.getRangeAt(0).startContainer), c = r == null ? void 0 : r.closest(l);
34
+ const o = T(i.getRangeAt(0).startContainer), c = o == null ? void 0 : o.closest(l);
35
35
  if (c instanceof HTMLElement) return c;
36
- const f = r == null ? void 0 : r.closest(C), E = f == null ? void 0 : f.querySelector(l);
36
+ const f = o == null ? void 0 : o.closest(g), E = f == null ? void 0 : f.querySelector(l);
37
37
  if (E instanceof HTMLElement) return E;
38
38
  }
39
39
  const a = document.activeElement, s = a instanceof HTMLElement ? a.closest(l) : null;
@@ -53,20 +53,20 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
53
53
  }, u = (e, n) => {
54
54
  const t = w(e, n);
55
55
  if (!t || t === e) return null;
56
- const o = t.closest("li");
57
- return o instanceof HTMLElement && e.contains(o) ? o : t;
56
+ const r = t.closest("li");
57
+ return r instanceof HTMLElement && e.contains(r) ? r : t;
58
58
  }, R = (e, n) => {
59
59
  if (typeof e.intersectsNode == "function")
60
60
  try {
61
61
  return e.intersectsNode(n);
62
- } catch (o) {
62
+ } catch (r) {
63
63
  return !1;
64
64
  }
65
65
  const t = document.createRange();
66
66
  return t.selectNode(n), e.compareBoundaryPoints(Range.END_TO_START, t) < 0 && e.compareBoundaryPoints(Range.START_TO_END, t) > 0;
67
67
  }, p = (e, n) => {
68
- const t = [], o = /* @__PURE__ */ new Set(), i = (r) => {
69
- !r || o.has(r) || r === n || !n.contains(r) || d(r) && (o.add(r), t.push(r));
68
+ const t = [], r = /* @__PURE__ */ new Set(), i = (o) => {
69
+ !o || r.has(o) || o === n || !n.contains(o) || d(o) && (r.add(o), t.push(o));
70
70
  };
71
71
  if (e.collapsed)
72
72
  return i(u(n, e.startContainer)), t;
@@ -75,8 +75,8 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
75
75
  n,
76
76
  NodeFilter.SHOW_ELEMENT,
77
77
  {
78
- acceptNode: (r) => {
79
- const c = r;
78
+ acceptNode: (o) => {
79
+ const c = o;
80
80
  return !d(c) || c.closest("li") && c.tagName !== "LI" ? NodeFilter.FILTER_SKIP : R(e, c) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
81
81
  }
82
82
  }
@@ -84,8 +84,8 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
84
84
  let s = a.nextNode();
85
85
  for (; s; )
86
86
  i(s), s = a.nextNode();
87
- return t.length === 0 && i(u(n, e.commonAncestorContainer)), t.filter((r) => !t.some((c) => c !== r && r.contains(c)));
88
- }, S = (e, n, t) => {
87
+ return t.length === 0 && i(u(n, e.commonAncestorContainer)), t.filter((o) => !t.some((c) => c !== o && o.contains(c)));
88
+ }, M = (e, n, t) => {
89
89
  if (n !== t) {
90
90
  if (typeof window.execEditorCommand == "function") {
91
91
  window.execEditorCommand("recordDomTransaction", e, n, t);
@@ -94,35 +94,35 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
94
94
  if (typeof window.executeEditorCommand == "function")
95
95
  try {
96
96
  window.executeEditorCommand("recordDomTransaction", { editor: e, beforeHTML: n, afterHTML: t });
97
- } catch (o) {
97
+ } catch (r) {
98
98
  }
99
99
  }
100
100
  }, m = (e, n) => {
101
- const t = L(n);
101
+ const t = C(n);
102
102
  if (!t) return !1;
103
- const o = h(t);
104
- if (!o) return !1;
105
- const i = p(o, t);
103
+ const r = h(t);
104
+ if (!r) return !1;
105
+ const i = p(r, t);
106
106
  if (i.length === 0) return !1;
107
107
  const a = t.innerHTML;
108
- i.forEach((r) => {
109
- r.setAttribute("dir", e);
108
+ i.forEach((o) => {
109
+ o.setAttribute("dir", e);
110
110
  });
111
111
  const s = t.innerHTML;
112
- return a === s ? !1 : (S(t, a, s), t.dispatchEvent(new window.Event("input", { bubbles: !0 })), !0);
113
- }, M = () => ({
112
+ return a === s ? !1 : (M(t, a, s), t.dispatchEvent(new window.Event("input", { bubbles: !0 })), !0);
113
+ }, k = () => ({
114
114
  name: "direction",
115
115
  toolbar: [
116
116
  {
117
117
  label: "Left to Right",
118
118
  command: "setDirectionLTR",
119
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M21 18H3M21 18L18 21M21 18L18 15M13 3V12M13 3H7M13 3C13.4596 3 13.9148 3.0776 14.3394 3.22836C14.764 3.37913 15.1499 3.6001 15.4749 3.87868C15.7999 4.15726 16.0577 4.48797 16.2336 4.85195C16.4095 5.21593 16.5 5.60603 16.5 6C16.5 6.39397 16.4095 6.78407 16.2336 7.14805C16.0577 7.51203 15.7999 7.84274 15.4749 8.12132C15.1499 8.3999 14.764 8.62087 14.3394 8.77164C13.9148 8.9224 13.4596 9 13 9V3ZM9 3V12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
119
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M21 18H3M21 18L18 21M21 18L18 15M13 3V12M13 3H7M13 3C13.4596 3 13.9148 3.0776 14.3394 3.22836C14.764 3.37913 15.1499 3.6001 15.4749 3.87868C15.7999 4.15726 16.0577 4.48797 16.2336 4.85195C16.4095 5.21593 16.5 5.60603 16.5 6C16.5 6.39397 16.4095 6.78407 16.2336 7.14805C16.0577 7.51203 15.7999 7.84274 15.4749 8.12132C15.1499 8.3999 14.764 8.62087 14.3394 8.77164C13.9148 8.9224 13.4596 9 13 9V3ZM9 3V12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
120
120
  shortcut: "Mod-Shift-l"
121
121
  },
122
122
  {
123
123
  label: "Right to Left",
124
124
  command: "setDirectionRTL",
125
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M3 18H21M3 18L6 21M3 18L6 15M11 12V3H17M15 3V12M10.5 3C10.0404 3 9.58525 3.0776 9.16061 3.22836C8.73597 3.37913 8.35013 3.6001 8.02513 3.87868C7.70012 4.15726 7.44231 4.48797 7.26642 4.85195C7.09053 5.21593 7 5.60603 7 6C7 6.39397 7.09053 6.78407 7.26642 7.14805C7.44231 7.51203 7.70012 7.84274 8.02513 8.12132C8.35013 8.3999 8.73597 8.62087 9.16061 8.77164C9.58525 8.9224 10.0404 9 10.5 9L10.5 3Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
125
+ icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M3 18H21M3 18L6 21M3 18L6 15M11 12V3H17M15 3V12M10.5 3C10.0404 3 9.58525 3.0776 9.16061 3.22836C8.73597 3.37913 8.35013 3.6001 8.02513 3.87868C7.70012 4.15726 7.44231 4.48797 7.26642 4.85195C7.09053 5.21593 7 5.60603 7 6C7 6.39397 7.09053 6.78407 7.26642 7.14805C7.44231 7.51203 7.70012 7.84274 8.02513 8.12132C8.35013 8.3999 8.73597 8.62087 9.16061 8.77164C9.58525 8.9224 10.0404 9 10.5 9L10.5 3Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
126
126
  shortcut: "Mod-Shift-r"
127
127
  }
128
128
  ],
@@ -148,6 +148,6 @@ const l = '.rte-content, .editora-content, [contenteditable="true"]', C = "[data
148
148
  }
149
149
  });
150
150
  export {
151
- M as DirectionPlugin
151
+ k as DirectionPlugin
152
152
  };
153
- //# sourceMappingURL=DirectionPlugin.native-Bl-QLFzO.mjs.map
153
+ //# sourceMappingURL=DirectionPlugin.native-B-Zj-EAt.mjs.map
@@ -43,7 +43,7 @@ const R = () => ({
43
43
  { label: "Trebuchet MS", value: "Trebuchet MS, sans-serif" },
44
44
  { label: "Impact", value: "Impact, sans-serif" }
45
45
  ],
46
- icon: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M15 4h7v2h-7zm1 4h6v2h-6zm2 4h4v2h-4zM9.307 4l-6 16h2.137l1.875-5h6.363l1.875 5h2.137l-6-16H9.307zm-1.239 9L10.5 6.515 12.932 13H8.068z"></path></g></svg>'
46
+ icon: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g><path d="M15 4h7v2h-7zm1 4h6v2h-6zm2 4h4v2h-4zM9.307 4l-6 16h2.137l1.875-5h6.363l1.875 5h2.137l-6-16H9.307zm-1.239 9L10.5 6.515 12.932 13H8.068z"></path></g></svg>'
47
47
  }
48
48
  ],
49
49
  commands: {
@@ -70,17 +70,17 @@ function m(e) {
70
70
  function f(e) {
71
71
  e && e.dispatchEvent(new Event("input", { bubbles: !0 }));
72
72
  }
73
- function S(e, t) {
74
- var r;
73
+ function A(e, t) {
74
+ var a;
75
75
  const n = document.createElement("span");
76
76
  for (const l of Array.from(e.attributes))
77
77
  l.name === "face" || l.name === "style" || n.setAttribute(l.name, l.value);
78
78
  const o = e.getAttribute("style");
79
79
  for (o && n.setAttribute("style", o), n.style.fontFamily = t, n.classList.add("rte-font-family"); e.firstChild; )
80
80
  n.appendChild(e.firstChild);
81
- (r = e.parentNode) == null || r.replaceChild(n, e);
81
+ (a = e.parentNode) == null || a.replaceChild(n, e);
82
82
  }
83
- function A(e) {
83
+ function S(e) {
84
84
  e.querySelectorAll("span").forEach((n) => {
85
85
  n.childElementCount > 0 || (n.textContent || "").trim().length > 0 || n.remove();
86
86
  });
@@ -93,11 +93,11 @@ function C(e, t, n) {
93
93
  try {
94
94
  e.surroundContents(o);
95
95
  } catch (l) {
96
- const i = e.extractContents();
97
- o.appendChild(i), e.insertNode(o);
96
+ const s = e.extractContents();
97
+ o.appendChild(s), e.insertNode(o);
98
98
  }
99
- const r = document.createRange();
100
- return r.selectNodeContents(o), t.removeAllRanges(), t.addRange(r), !0;
99
+ const a = document.createRange();
100
+ return a.selectNodeContents(o), t.removeAllRanges(), t.addRange(a), !0;
101
101
  }
102
102
  function F(e) {
103
103
  const t = window.getSelection();
@@ -108,40 +108,40 @@ function F(e) {
108
108
  function b(e) {
109
109
  const t = window.getSelection();
110
110
  if (!t || t.rangeCount === 0) return;
111
- const n = t.getRangeAt(0), o = n.cloneRange(), r = m(n.commonAncestorContainer);
111
+ const n = t.getRangeAt(0), o = n.cloneRange(), a = m(n.commonAncestorContainer);
112
112
  if (n.collapsed)
113
113
  return;
114
- const l = n.commonAncestorContainer, i = v(l);
115
- if (i && N(n, i)) {
116
- i.style.fontFamily = e, i.classList.add("rte-font-family");
117
- const a = document.createRange();
118
- a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a), f(r);
114
+ const l = n.commonAncestorContainer, s = v(l);
115
+ if (s && N(n, s)) {
116
+ s.style.fontFamily = e, s.classList.add("rte-font-family");
117
+ const r = document.createRange();
118
+ r.selectNodeContents(s), t.removeAllRanges(), t.addRange(r), f(a);
119
119
  return;
120
120
  }
121
- if (!r) return;
121
+ if (!a) return;
122
122
  const u = new Set(
123
- Array.from(r.querySelectorAll("font[face]"))
123
+ Array.from(a.querySelectorAll("font[face]"))
124
124
  ), d = new Set(
125
125
  Array.from(
126
- r.querySelectorAll("span[style*='font-family']")
126
+ a.querySelectorAll("span[style*='font-family']")
127
127
  )
128
128
  );
129
- r.focus({ preventScroll: !0 });
129
+ a.focus({ preventScroll: !0 });
130
130
  try {
131
131
  document.execCommand("styleWithCSS", !1, "true");
132
- } catch (a) {
132
+ } catch (r) {
133
133
  }
134
- const y = e.split(",").map((a) => a.trim().replace(/^['"]|['"]$/g, "")).filter(Boolean)[0] || "Arial";
135
- let s = document.execCommand("fontName", !1, y), c = !1;
134
+ const y = e.split(",").map((r) => r.trim().replace(/^['"]|['"]$/g, "")).filter(Boolean)[0] || "Arial";
135
+ let i = document.execCommand("fontName", !1, y), c = !1;
136
136
  Array.from(
137
- r.querySelectorAll("font[face]")
138
- ).forEach((a) => {
139
- u.has(a) || (S(a, e), c = !0);
137
+ a.querySelectorAll("font[face]")
138
+ ).forEach((r) => {
139
+ u.has(r) || (A(r, e), c = !0);
140
140
  }), Array.from(
141
- r.querySelectorAll("span[style*='font-family']")
142
- ).forEach((a) => {
143
- d.has(a) || (a.style.fontFamily = e, a.classList.add("rte-font-family"), c = !0);
144
- }), s || (s = C(o, t, e)), (s || c) && (A(r), f(r));
141
+ a.querySelectorAll("span[style*='font-family']")
142
+ ).forEach((r) => {
143
+ d.has(r) || (r.style.fontFamily = e, r.classList.add("rte-font-family"), c = !0);
144
+ }), i || (i = C(o, t, e)), (i || c) && (S(a), f(a));
145
145
  }
146
146
  function v(e) {
147
147
  let t = e;
@@ -156,10 +156,10 @@ function v(e) {
156
156
  return null;
157
157
  }
158
158
  function N(e, t) {
159
- const n = e.startContainer, o = e.endContainer, r = t.contains(n) || n.nodeType === Node.TEXT_NODE && n.parentElement === t, l = t.contains(o) || o.nodeType === Node.TEXT_NODE && o.parentElement === t;
160
- return r && l;
159
+ const n = e.startContainer, o = e.endContainer, a = t.contains(n) || n.nodeType === Node.TEXT_NODE && n.parentElement === t, l = t.contains(o) || o.nodeType === Node.TEXT_NODE && o.parentElement === t;
160
+ return a && l;
161
161
  }
162
162
  export {
163
163
  R as FontFamilyPlugin
164
164
  };
165
- //# sourceMappingURL=FontFamilyPlugin.native-M3cNQ0KA.mjs.map
165
+ //# sourceMappingURL=FontFamilyPlugin.native-DLq9x046.mjs.map
@@ -302,13 +302,13 @@ const w = () => {
302
302
  }), e.addEventListener("click", (o) => {
303
303
  o.target === e && a();
304
304
  }), document.addEventListener("keydown", m), document.body.appendChild(e);
305
- }, E = () => ({
305
+ }, k = () => ({
306
306
  name: "preview",
307
307
  toolbar: [
308
308
  {
309
309
  label: "Preview",
310
310
  command: "togglePreview",
311
- icon: '<svg fill="#000000" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 92 92" enable-background="new 0 0 92 92" xml:space="preserve"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path id="XMLID_1239_" d="M91.3,43.8C90.6,42.8,74.4,19,46,19C17.6,19,1.4,42.8,0.7,43.8c-0.9,1.3-0.9,3.1,0,4.5 C1.4,49.2,17.6,73,46,73c28.4,0,44.6-23.8,45.3-24.8C92.2,46.9,92.2,45.1,91.3,43.8z M46,65C26.7,65,13.5,51.4,9,46 c4.5-5.5,17.6-19,37-19c19.3,0,32.5,13.6,37,19C78.4,51.5,65.3,65,46,65z M48.3,29.6c-4.4-0.6-8.7,0.5-12.3,3.2c0,0,0,0,0,0 c-7.3,5.5-8.8,15.9-3.3,23.2c2.7,3.6,6.5,5.8,10.9,6.5c0.8,0.1,1.6,0.2,2.3,0.2c3.6,0,7-1.2,9.9-3.3c7.3-5.5,8.8-15.9,3.3-23.2 C56.6,32.5,52.7,30.2,48.3,29.6z M52.3,54.5c-2.2,1.7-5,2.4-7.8,2c-2.8-0.4-5.3-1.9-7-4.1C34.1,47.7,35,41,39.7,37.5 c2.2-1.7,5-2.4,7.8-2c2.8,0.4,5.3,1.9,7,4.1C57.9,44.3,57,51,52.3,54.5z M51.9,40c0.8,0.7,1.2,1.8,1.2,2.8c0,1-0.4,2.1-1.2,2.8 c-0.7,0.7-1.8,1.2-2.8,1.2c-1.1,0-2.1-0.4-2.8-1.2c-0.8-0.8-1.2-1.8-1.2-2.8c0-1.1,0.4-2.1,1.2-2.8c0.7-0.8,1.8-1.2,2.8-1.2 C50.2,38.9,51.2,39.3,51.9,40z"></path> </g></svg>'
311
+ icon: '<svg fill="#000000" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 92 92" enable-background="new 0 0 92 92" xml:space="preserve"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M91.3,43.8C90.6,42.8,74.4,19,46,19C17.6,19,1.4,42.8,0.7,43.8c-0.9,1.3-0.9,3.1,0,4.5 C1.4,49.2,17.6,73,46,73c28.4,0,44.6-23.8,45.3-24.8C92.2,46.9,92.2,45.1,91.3,43.8z M46,65C26.7,65,13.5,51.4,9,46 c4.5-5.5,17.6-19,37-19c19.3,0,32.5,13.6,37,19C78.4,51.5,65.3,65,46,65z M48.3,29.6c-4.4-0.6-8.7,0.5-12.3,3.2c0,0,0,0,0,0 c-7.3,5.5-8.8,15.9-3.3,23.2c2.7,3.6,6.5,5.8,10.9,6.5c0.8,0.1,1.6,0.2,2.3,0.2c3.6,0,7-1.2,9.9-3.3c7.3-5.5,8.8-15.9,3.3-23.2 C56.6,32.5,52.7,30.2,48.3,29.6z M52.3,54.5c-2.2,1.7-5,2.4-7.8,2c-2.8-0.4-5.3-1.9-7-4.1C34.1,47.7,35,41,39.7,37.5 c2.2-1.7,5-2.4,7.8-2c2.8,0.4,5.3,1.9,7,4.1C57.9,44.3,57,51,52.3,54.5z M51.9,40c0.8,0.7,1.2,1.8,1.2,2.8c0,1-0.4,2.1-1.2,2.8 c-0.7,0.7-1.8,1.2-2.8,1.2c-1.1,0-2.1-0.4-2.8-1.2c-0.8-0.8-1.2-1.8-1.2-2.8c0-1.1,0.4-2.1,1.2-2.8c0.7-0.8,1.8-1.2,2.8-1.2 C50.2,38.9,51.2,39.3,51.9,40z"></path> </g></svg>'
312
312
  }
313
313
  ],
314
314
  commands: {
@@ -317,6 +317,6 @@ const w = () => {
317
317
  keymap: {}
318
318
  });
319
319
  export {
320
- E as PreviewPlugin
320
+ k as PreviewPlugin
321
321
  };
322
- //# sourceMappingURL=PreviewPlugin.native-Dyht8mGi.mjs.map
322
+ //# sourceMappingURL=PreviewPlugin.native-Dv5OsffK.mjs.map
@@ -10515,7 +10515,7 @@ function C() {
10515
10515
  function h() {
10516
10516
  if (l && document.contains(l))
10517
10517
  return l;
10518
- const e = V();
10518
+ const e = J();
10519
10519
  return e && (l = e), e;
10520
10520
  }
10521
10521
  function W(e) {
@@ -10550,7 +10550,7 @@ function te() {
10550
10550
  const t = u;
10551
10551
  return u = null, l = t, t;
10552
10552
  }
10553
- return V();
10553
+ return J();
10554
10554
  }
10555
10555
  function ie() {
10556
10556
  f += 1, f === 1 && d && d.disconnect();
@@ -10629,7 +10629,7 @@ function de(e) {
10629
10629
  }
10630
10630
  return t;
10631
10631
  }
10632
- const V = () => {
10632
+ const J = () => {
10633
10633
  const e = P();
10634
10634
  if (e && document.contains(e))
10635
10635
  return l = e, e;
@@ -10722,10 +10722,10 @@ function pe(e, t) {
10722
10722
  r.deleteContents(), r.insertNode(i);
10723
10723
  });
10724
10724
  }
10725
- function G(e) {
10725
+ function U(e) {
10726
10726
  q.add(e.toLowerCase()), E(), g();
10727
10727
  }
10728
- function J(e) {
10728
+ function Y(e) {
10729
10729
  z.add(e.toLowerCase()), se(), E(), g();
10730
10730
  }
10731
10731
  function ue(e) {
@@ -10766,14 +10766,14 @@ function he(e, t, r, i, a) {
10766
10766
  }, s.appendChild(n);
10767
10767
  const c = document.createElement("div");
10768
10768
  c.className = "rte-spellcheck-menu-item meta", c.textContent = "Ignore All", c.onclick = () => {
10769
- G(r), s.remove();
10769
+ U(r), s.remove();
10770
10770
  }, s.appendChild(c);
10771
10771
  const k = document.createElement("div");
10772
10772
  k.className = "rte-spellcheck-menu-item positive", k.textContent = "Add to Dictionary", k.onclick = () => {
10773
- J(r), s.remove();
10773
+ Y(r), s.remove();
10774
10774
  }, s.appendChild(k), document.body.appendChild(s);
10775
- const A = s.getBoundingClientRect(), X = window.innerWidth - A.width - 8, Z = window.innerHeight - A.height - 8;
10776
- s.style.left = `${Math.max(8, Math.min(e, X))}px`, s.style.top = `${Math.max(8, Math.min(t, Z))}px`;
10775
+ const A = s.getBoundingClientRect(), Z = window.innerWidth - A.width - 8, G = window.innerHeight - A.height - 8;
10776
+ s.style.left = `${Math.max(8, Math.min(e, Z))}px`, s.style.top = `${Math.max(8, Math.min(t, G))}px`;
10777
10777
  const M = (p) => {
10778
10778
  s.contains(p.target) || (s.remove(), document.removeEventListener("mousedown", M));
10779
10779
  };
@@ -10795,7 +10795,7 @@ function be() {
10795
10795
  function fe(e) {
10796
10796
  return e.closest("[data-editora-editor]") || e.parentElement || e;
10797
10797
  }
10798
- function _() {
10798
+ function I() {
10799
10799
  const e = h();
10800
10800
  if (!e)
10801
10801
  throw new Error("Spell check panel requested without active editor");
@@ -10868,17 +10868,17 @@ function j(e) {
10868
10868
  a.addEventListener("click", () => {
10869
10869
  var n;
10870
10870
  const s = (n = a.closest(".rte-spellcheck-item")) == null ? void 0 : n.getAttribute("data-word");
10871
- s && G(s);
10871
+ s && U(s);
10872
10872
  });
10873
10873
  }), o.querySelectorAll(".add-btn").forEach((a) => {
10874
10874
  a.addEventListener("click", () => {
10875
10875
  var n;
10876
10876
  const s = (n = a.closest(".rte-spellcheck-item")) == null ? void 0 : n.getAttribute("data-word");
10877
- s && J(s);
10877
+ s && Y(s);
10878
10878
  });
10879
10879
  });
10880
10880
  }
10881
- function R() {
10881
+ function _() {
10882
10882
  const e = h();
10883
10883
  e && (d && d.disconnect(), d = new MutationObserver((t) => {
10884
10884
  f > 0 || t.some((r) => r.type === "characterData" || r.type === "childList") && (b && clearTimeout(b), b = window.setTimeout(() => {
@@ -10888,13 +10888,13 @@ function R() {
10888
10888
  ...B
10889
10889
  }));
10890
10890
  }
10891
- function U() {
10891
+ function V() {
10892
10892
  d && (d.disconnect(), d = null), b && (clearTimeout(b), b = null);
10893
10893
  }
10894
- function Y() {
10894
+ function X() {
10895
10895
  document.querySelectorAll(".rte-spellcheck-menu").forEach((e) => e.remove());
10896
10896
  }
10897
- function I() {
10897
+ function R() {
10898
10898
  y || (y = (e) => {
10899
10899
  e.key !== "Escape" || !m || (e.preventDefault(), e.stopPropagation(), N());
10900
10900
  }, document.addEventListener("keydown", y, !0));
@@ -10903,11 +10903,11 @@ function ye() {
10903
10903
  y && (document.removeEventListener("keydown", y, !0), y = null);
10904
10904
  }
10905
10905
  function N() {
10906
- return m && (E(), U(), be(), Y(), o && (o.remove(), o = null), l = null, u = null, m = !1, ye()), !1;
10906
+ return m && (E(), V(), be(), X(), o && (o.remove(), o = null), l = null, u = null, m = !1, ye()), !1;
10907
10907
  }
10908
10908
  function ve() {
10909
10909
  const e = te();
10910
- return e ? m && l && l !== e ? (E(), U(), Y(), o && (o.remove(), o = null), l = e, C(), H(), I(), g(), R(), o = _(), j(), !0) : m ? N() : (l = e, m = !0, C(), H(), I(), g(), R(), o && (o.remove(), o = null), o = _(), j(), !0) : !1;
10910
+ return e ? m && l && l !== e ? (E(), V(), X(), o && (o.remove(), o = null), l = e, C(), H(), R(), g(), _(), o = I(), j(), !0) : m ? N() : (l = e, m = !0, C(), H(), R(), g(), _(), o && (o.remove(), o = null), o = I(), j(), !0) : !1;
10911
10911
  }
10912
10912
  const ke = () => ({
10913
10913
  name: "spellCheck",
@@ -10918,7 +10918,7 @@ const ke = () => ({
10918
10918
  {
10919
10919
  label: "Spell Check",
10920
10920
  command: "toggleSpellCheck",
10921
- icon: '<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M3 12.5L3.84375 9.5M3.84375 9.5L5 5.38889C5 5.38889 5.25 4.5 6 4.5C6.75 4.5 7 5.38889 7 5.38889L8.15625 9.5M3.84375 9.5H8.15625M9 12.5L8.15625 9.5M13 16.8333L15.4615 19.5L21 13.5M12 8.5H15C16.1046 8.5 17 7.60457 17 6.5C17 5.39543 16.1046 4.5 15 4.5H12V8.5ZM12 8.5H16C17.1046 8.5 18 9.39543 18 10.5C18 11.6046 17.1046 12.5 16 12.5H12V8.5Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
10921
+ icon: '<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M3 12.5L3.84375 9.5M3.84375 9.5L5 5.38889C5 5.38889 5.25 4.5 6 4.5C6.75 4.5 7 5.38889 7 5.38889L8.15625 9.5M3.84375 9.5H8.15625M9 12.5L8.15625 9.5M13 16.8333L15.4615 19.5L21 13.5M12 8.5H15C16.1046 8.5 17 7.60457 17 6.5C17 5.39543 16.1046 4.5 15 4.5H12V8.5ZM12 8.5H16C17.1046 8.5 18 9.39543 18 10.5C18 11.6046 17.1046 12.5 16 12.5H12V8.5Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',
10922
10922
  shortcut: "F7"
10923
10923
  }
10924
10924
  ],
@@ -10932,4 +10932,4 @@ const ke = () => ({
10932
10932
  export {
10933
10933
  ke as SpellCheckPlugin
10934
10934
  };
10935
- //# sourceMappingURL=SpellCheckPlugin.native-Bef2oTLB.mjs.map
10935
+ //# sourceMappingURL=SpellCheckPlugin.native-BGm2qPfn.mjs.map