@editora/plugins 1.0.22 → 1.1.0

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 (103) hide show
  1. package/README.md +1 -1
  2. package/dist/{CodePlugin.native-CKJo7IFG.js → CodePlugin.native-BwhZsI5v.js} +11 -11
  3. package/dist/{CodePlugin.native-D8gGxB8i.mjs → CodePlugin.native-CojLCp6C.mjs} +61 -53
  4. package/dist/MediaManagerPlugin.native-CycfjOi4.js +1841 -0
  5. package/dist/MediaManagerPlugin.native-DZrmcmnm.mjs +4688 -0
  6. package/dist/a11y-checker.cjs.js +3 -3
  7. package/dist/a11y-checker.esm.js +6 -4
  8. package/dist/anchor.cjs.js +4 -4
  9. package/dist/anchor.esm.js +19 -18
  10. package/dist/anchoredPopover-BNJ8e7j-.mjs +128 -0
  11. package/dist/anchoredPopover-Cygmit_o.js +1 -0
  12. package/dist/approval-workflow.cjs.js +7 -7
  13. package/dist/approval-workflow.esm.js +55 -54
  14. package/dist/background-color.cjs.js +2 -2
  15. package/dist/background-color.esm.js +72 -67
  16. package/dist/blocks-library.cjs.js +18 -19
  17. package/dist/blocks-library.esm.js +41 -42
  18. package/dist/citations.cjs.js +4 -4
  19. package/dist/citations.esm.js +50 -50
  20. package/dist/code-sample.cjs.js +10 -10
  21. package/dist/code-sample.esm.js +4 -4
  22. package/dist/code.cjs.js +1 -1
  23. package/dist/code.esm.js +1 -1
  24. package/dist/comments.cjs.js +23 -11
  25. package/dist/comments.esm.js +167 -149
  26. package/dist/conditional-content.cjs.js +2 -2
  27. package/dist/conditional-content.esm.js +2 -2
  28. package/dist/confirmDialog-D3S8BhIM.js +42 -0
  29. package/dist/confirmDialog-DR4c8j6S.mjs +87 -0
  30. package/dist/content-rules.cjs.js +6 -6
  31. package/dist/content-rules.esm.js +51 -51
  32. package/dist/data-binding.cjs.js +2 -2
  33. package/dist/data-binding.esm.js +2 -2
  34. package/dist/dialogHelpers-BbwpIXD9.mjs +183 -0
  35. package/dist/dialogHelpers-BxSQ7A6M.js +12 -0
  36. package/dist/document-manager.cjs.js +1 -1
  37. package/dist/document-manager.esm.js +1 -1
  38. package/dist/{documentManager-BL98a7YZ.mjs → documentManager-BFjGIeI8.mjs} +793 -781
  39. package/dist/{documentManager-r8t7yZEd.js → documentManager-C9d17K5W.js} +10 -10
  40. package/dist/embed-iframe.cjs.js +6 -6
  41. package/dist/embed-iframe.esm.js +6 -6
  42. package/dist/emojis.cjs.js +5 -5
  43. package/dist/emojis.esm.js +3 -3
  44. package/dist/enterprise.cjs.js +1 -1
  45. package/dist/enterprise.esm.js +12 -12
  46. package/dist/format-painter.cjs.js +1 -1
  47. package/dist/format-painter.esm.js +172 -151
  48. package/dist/heading.cjs.js +1 -1
  49. package/dist/heading.esm.js +96 -83
  50. package/dist/history.cjs.js +1 -1
  51. package/dist/history.esm.js +176 -97
  52. package/dist/{index-D5xugkYA.js → index-CtR8olYy.js} +2 -2
  53. package/dist/{index-B-VitI3v.mjs → index-Du_Ljqfz.mjs} +36 -35
  54. package/dist/index.cjs.js +1 -1
  55. package/dist/index.esm.js +90 -83
  56. package/dist/katex-Cc3-mvOY.js +257 -0
  57. package/dist/katex-DoRnZ_sp.mjs +11682 -0
  58. package/dist/katex.min--Ws3c9be.mjs +5 -0
  59. package/dist/katex.min-Dk2VscxB.js +2 -0
  60. package/dist/link.cjs.js +3 -3
  61. package/dist/link.esm.js +3 -3
  62. package/dist/list.cjs.js +1 -1
  63. package/dist/list.esm.js +140 -52
  64. package/dist/math.cjs.js +14 -14
  65. package/dist/math.esm.js +149 -136
  66. package/dist/media-manager.cjs.js +1 -619
  67. package/dist/media-manager.esm.js +30 -1017
  68. package/dist/mentions.cjs.js +12 -12
  69. package/dist/mentions.esm.js +149 -143
  70. package/dist/merge-tag.cjs.js +5 -3
  71. package/dist/merge-tag.esm.js +5 -3
  72. package/dist/notify-BkbzMopb.js +32 -0
  73. package/dist/notify-zOp-mUOJ.mjs +59 -0
  74. package/dist/pii-redaction.cjs.js +1 -1
  75. package/dist/pii-redaction.esm.js +1 -1
  76. package/dist/preview.cjs.js +1 -1
  77. package/dist/preview.esm.js +1 -1
  78. package/dist/shared-config.cjs.js +1 -1
  79. package/dist/shared-config.esm.js +14 -14
  80. package/dist/slash-commands.cjs.js +5 -5
  81. package/dist/slash-commands.esm.js +259 -236
  82. package/dist/smart-paste.cjs.js +1 -1
  83. package/dist/smart-paste.esm.js +1 -1
  84. package/dist/special-characters.cjs.js +3 -3
  85. package/dist/special-characters.esm.js +3 -3
  86. package/dist/spell-check.cjs.js +9 -9
  87. package/dist/spell-check.esm.js +288 -251
  88. package/dist/table.cjs.js +14 -14
  89. package/dist/table.esm.js +175 -154
  90. package/dist/template.cjs.js +5 -3
  91. package/dist/template.esm.js +15 -13
  92. package/dist/text-color.cjs.js +4 -4
  93. package/dist/text-color.esm.js +38 -34
  94. package/dist/translation-workflow.cjs.js +9 -9
  95. package/dist/translation-workflow.esm.js +98 -95
  96. package/dist/version-diff.cjs.js +4 -4
  97. package/dist/version-diff.esm.js +36 -36
  98. package/index.d.ts +183 -2
  99. package/package.json +6 -5
  100. package/dist/anchoredPopover-Bg-ey7Yo.js +0 -1
  101. package/dist/anchoredPopover-D_JbjvdA.mjs +0 -111
  102. package/dist/dialogHelpers-5d5BuOCW.mjs +0 -39
  103. package/dist/dialogHelpers-zU6zpMIA.js +0 -12
@@ -1,19 +1,19 @@
1
- const H = ".rte-content, .editora-content";
2
- const T = "__editoraCommandEditorRoot", d = /* @__PURE__ */ new Map(), m = {};
3
- let b = !1, c = null;
4
- function _(t) {
1
+ const O = ".rte-content, .editora-content";
2
+ const w = "__editoraCommandEditorRoot", f = /* @__PURE__ */ new Map(), p = {};
3
+ let b = !1, u = null;
4
+ function U(t) {
5
5
  if (!t) return null;
6
6
  const e = t.querySelector('[contenteditable="true"]');
7
7
  return e instanceof HTMLElement ? e : null;
8
8
  }
9
- function R() {
9
+ function X() {
10
10
  if (typeof window > "u") return null;
11
- const t = window[T];
11
+ const t = window[w];
12
12
  if (!(t instanceof HTMLElement)) return null;
13
- window[T] = null;
13
+ window[w] = null;
14
14
  const e = t.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") || (t.matches("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") ? t : null);
15
15
  if (e) {
16
- const o = _(e);
16
+ const o = U(e);
17
17
  if (o) return o;
18
18
  if (e.getAttribute("contenteditable") === "true") return e;
19
19
  }
@@ -22,13 +22,13 @@ function R() {
22
22
  const n = t.closest('[contenteditable="true"]');
23
23
  return n instanceof HTMLElement ? n : null;
24
24
  }
25
- function I(t) {
25
+ function z(t) {
26
26
  return t ? t.nodeType === Node.ELEMENT_NODE ? t : t.parentElement : null;
27
27
  }
28
- function s(t) {
29
- const e = I(t);
28
+ function m(t) {
29
+ const e = z(t);
30
30
  if (!e) return null;
31
- const n = e.closest(H);
31
+ const n = e.closest(O);
32
32
  if (n) return n;
33
33
  const o = e.closest('[contenteditable="true"]');
34
34
  if (!o) return null;
@@ -37,58 +37,126 @@ function s(t) {
37
37
  i.getAttribute("contenteditable") === "true" && (r = i), i = i.parentElement;
38
38
  return r;
39
39
  }
40
- function p() {
41
- const t = R();
40
+ function H() {
41
+ const t = X();
42
42
  if (t && document.contains(t))
43
43
  return t;
44
44
  const e = window.getSelection();
45
45
  if (e && e.rangeCount > 0) {
46
- const i = s(e.getRangeAt(0).startContainer);
46
+ const i = m(e.getRangeAt(0).startContainer);
47
47
  if (i) return i;
48
48
  }
49
49
  const n = document.activeElement;
50
50
  if (n) {
51
- const i = s(n);
51
+ const i = m(n);
52
52
  if (i) return i;
53
53
  }
54
- if (c?.isConnected) return c;
55
- const o = Array.from(d.keys()).find((i) => i.isConnected);
54
+ if (u?.isConnected) return u;
55
+ const o = Array.from(f.keys()).find((i) => i.isConnected);
56
56
  if (o) return o;
57
- const r = document.querySelector(H);
57
+ const r = document.querySelector(O);
58
58
  return r || document.querySelector('[contenteditable="true"]');
59
59
  }
60
- function h() {
61
- for (const t of d.keys())
62
- t.isConnected || (d.delete(t), c === t && (c = null));
60
+ function R() {
61
+ for (const t of f.keys())
62
+ t.isConnected || (f.delete(t), u === t && (u = null));
63
63
  }
64
- function f(t) {
65
- h();
66
- let e = d.get(t);
67
- return e || (e = { undoStack: [], redoStack: [] }, d.set(t, e)), e;
64
+ function M(t) {
65
+ R();
66
+ let e = f.get(t);
67
+ return e || (e = { undoStack: [], redoStack: [] }, f.set(t, e)), e;
68
68
  }
69
- function a(t) {
69
+ function g(t) {
70
70
  t && t.dispatchEvent(new Event("input", { bubbles: !0 }));
71
71
  }
72
- function l(t, e) {
72
+ function B(t) {
73
+ return t === "insertText" || t === "insertCompositionText" ? "insert" : t === "deleteContentBackward" || t === "deleteContentForward" ? "delete" : null;
74
+ }
75
+ function T(t) {
76
+ if (!t) return;
77
+ const e = f.get(t)?.undoStack, n = e && e[e.length - 1];
78
+ n && (n.closed = !0);
79
+ }
80
+ function y(t) {
81
+ const e = document.createElement("div");
82
+ return e.innerHTML = t, (e.textContent ?? "").replace(/\u00a0/g, " ");
83
+ }
84
+ function Z(t, e) {
85
+ const n = y(t), o = y(e), r = Math.min(n.length, o.length);
86
+ let i = 0;
87
+ for (; i < r && n.charCodeAt(i) === o.charCodeAt(i); ) i++;
88
+ let c = 0;
89
+ for (; c < r - i && n.charCodeAt(n.length - 1 - c) === o.charCodeAt(o.length - 1 - c); )
90
+ c++;
91
+ return { start: i, beforeEnd: n.length - c, afterEnd: o.length - c };
92
+ }
93
+ function q(t, e) {
94
+ const n = window.getSelection();
95
+ if (!n) return;
96
+ const o = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
97
+ let r = Math.max(0, e), i = null, c = null;
98
+ for (; i = o.nextNode(); ) {
99
+ const s = i;
100
+ if (c = s, r <= s.data.length) {
101
+ const E = document.createRange();
102
+ E.setStart(s, r), E.collapse(!0), n.removeAllRanges(), n.addRange(E);
103
+ return;
104
+ }
105
+ r -= s.data.length;
106
+ }
107
+ const d = document.createRange();
108
+ c ? d.setStart(c, c.data.length) : d.selectNodeContents(t), d.collapse(!0), n.removeAllRanges(), n.addRange(d);
109
+ }
110
+ function L(t, e, n, o) {
111
+ const r = document.activeElement, i = t.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor");
112
+ if (!(!r || r === document.body || t.contains(r) || !!i?.contains(r))) return;
113
+ const d = Z(e, n);
114
+ q(t, o === "undo" ? d.beforeEnd : d.afterEnd), t.contains(document.activeElement) || t.focus({ preventScroll: !0 });
115
+ }
116
+ let k = !1;
117
+ function W() {
118
+ k || typeof document > "u" || (k = !0, document.addEventListener(
119
+ "pointerdown",
120
+ (t) => T(m(t.target)),
121
+ !0
122
+ ), document.addEventListener(
123
+ "keydown",
124
+ (t) => {
125
+ /^(Arrow(Left|Right|Up|Down)|Home|End|Page(Up|Down)|Tab)$/.test(t.key) && T(m(t.target));
126
+ },
127
+ !0
128
+ ));
129
+ }
130
+ function h(t, e) {
73
131
  if (!t) return;
74
- const n = f(t);
75
- n.undoStack.push(e), n.redoStack.length = 0, n.undoStack.length > 100 && n.undoStack.splice(0, n.undoStack.length - 100), c = t;
132
+ const n = M(t);
133
+ n.undoStack.push(e), n.redoStack.length = 0, n.undoStack.length > 200 && n.undoStack.splice(0, n.undoStack.length - 200);
134
+ let o = 0;
135
+ n.undoStack.forEach((i) => {
136
+ o += (i.beforeHTML?.length ?? 0) + (i.afterHTML?.length ?? 0);
137
+ });
138
+ let r = 0;
139
+ for (; o > 4e7 && n.undoStack.length - r > 1; ) {
140
+ const i = n.undoStack[r];
141
+ o -= (i.beforeHTML?.length ?? 0) + (i.afterHTML?.length ?? 0), r += 1;
142
+ }
143
+ r > 0 && n.undoStack.splice(0, r), u = t;
76
144
  }
77
- function S(t, e = "undo") {
78
- if (h(), t?.isConnected)
145
+ function D(t, e = "undo") {
146
+ if (R(), t?.isConnected)
79
147
  return t;
80
- const n = p();
148
+ const n = H();
81
149
  if (n?.isConnected)
82
150
  return n;
83
- if (c?.isConnected)
84
- return c;
151
+ if (u?.isConnected)
152
+ return u;
85
153
  const o = (r) => e === "undo" ? r.undoStack.length > 0 : r.redoStack.length > 0;
86
- for (const [r, i] of d.entries())
154
+ for (const [r, i] of f.entries())
87
155
  if (r.isConnected && o(i))
88
156
  return r;
89
157
  return null;
90
158
  }
91
- function y(t) {
159
+ function v(t) {
92
160
  const e = {};
93
161
  for (const r of t.getAttributeNames()) {
94
162
  const i = t.getAttribute(r);
@@ -102,98 +170,109 @@ function y(t) {
102
170
  checked: o ? t.checked : null
103
171
  };
104
172
  }
105
- function g(t, e) {
173
+ function x(t, e) {
106
174
  const n = new Set(t.getAttributeNames());
107
175
  Object.keys(e.attributes).forEach((o) => n.delete(o)), n.forEach((o) => t.removeAttribute(o)), Object.entries(e.attributes).forEach(([o, r]) => {
108
176
  t.setAttribute(o, r);
109
177
  }), t.innerHTML !== e.innerHTML && (t.innerHTML = e.innerHTML), e.value !== null && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) && (t.value = e.value), e.checked !== null && t instanceof HTMLInputElement && (t.checked = e.checked);
110
178
  }
111
- function u(t, e) {
112
- if (m[t] = e, typeof window > "u") return;
179
+ function a(t, e) {
180
+ if (p[t] = e, typeof window > "u") return;
113
181
  const n = window.registerEditorCommand;
114
182
  typeof n == "function" ? n(t, e) : (window.registerEditorCommand = (o, r) => {
115
- m[o] = r;
183
+ p[o] = r;
116
184
  }, window.registerEditorCommand(t, e));
117
185
  }
118
- const w = (t, ...e) => {
119
- const n = m[t];
186
+ const _ = (t, ...e) => {
187
+ const n = p[t];
120
188
  return n ? n(...e) : !1;
121
189
  };
122
- function E() {
123
- b || typeof window > "u" || (b = !0, window.execEditorCommand || (window.execEditorCommand = w), window.executeEditorCommand || (window.executeEditorCommand = w), u("undo", A), u("redo", L), u("setAttribute", k), u("setText", v), u("autoFixA11y", x), u("recordDomTransaction", O), u("undoDom", M), u("redoDom", C));
124
- }
125
- const A = () => {
126
- const t = p();
127
- return M(t ?? void 0);
128
- }, L = () => {
129
- const t = p();
130
- return C(t ?? void 0);
131
- }, k = (t, e, n) => {
190
+ function C() {
191
+ b || typeof window > "u" || (b = !0, W(), window.execEditorCommand || (window.execEditorCommand = _), window.executeEditorCommand || (window.executeEditorCommand = _), a("undo", I), a("redo", N), a("setAttribute", P), a("setText", G), a("autoFixA11y", Y), a("recordDomTransaction", F), a("undoDom", A), a("redoDom", S));
192
+ }
193
+ const I = () => {
194
+ const t = H();
195
+ return A(t ?? void 0);
196
+ }, N = () => {
197
+ const t = H();
198
+ return S(t ?? void 0);
199
+ }, P = (t, e, n) => {
132
200
  if (!(t instanceof HTMLElement)) return;
133
- const o = s(t), r = t.hasAttribute(e), i = t.getAttribute(e);
134
- t.setAttribute(e, n), l(o, {
201
+ const o = m(t), r = t.hasAttribute(e), i = t.getAttribute(e);
202
+ t.setAttribute(e, n), h(o, {
135
203
  undo: () => {
136
204
  t.isConnected && (r && i !== null ? t.setAttribute(e, i) : t.removeAttribute(e));
137
205
  },
138
206
  redo: () => {
139
207
  t.isConnected && t.setAttribute(e, n);
140
208
  }
141
- }), a(o);
142
- }, v = (t, e) => {
209
+ }), g(o);
210
+ }, G = (t, e) => {
143
211
  if (!(t instanceof HTMLElement)) return;
144
- const n = s(t), o = t.textContent ?? "";
145
- t.textContent = e, l(n, {
212
+ const n = m(t), o = t.textContent ?? "";
213
+ t.textContent = e, h(n, {
146
214
  undo: () => {
147
215
  t.isConnected && (t.textContent = o);
148
216
  },
149
217
  redo: () => {
150
218
  t.isConnected && (t.textContent = e);
151
219
  }
152
- }), a(n);
153
- }, x = (t) => {
220
+ }), g(n);
221
+ }, Y = (t) => {
154
222
  const e = t?.element;
155
223
  if (!(e instanceof HTMLElement)) return;
156
- const n = s(e), o = window.a11yRuleRegistry?.find((D) => D.id === t.rule);
224
+ const n = m(e), o = window.a11yRuleRegistry?.find((c) => c.id === t.rule);
157
225
  if (!o || typeof o.fix != "function") return;
158
- const r = y(e);
226
+ const r = v(e);
159
227
  o.fix(t);
160
- const i = y(e);
161
- l(n, {
228
+ const i = v(e);
229
+ h(n, {
162
230
  undo: () => {
163
- e.isConnected && g(e, r);
231
+ e.isConnected && x(e, r);
164
232
  },
165
233
  redo: () => {
166
- e.isConnected && g(e, i);
234
+ e.isConnected && x(e, i);
167
235
  }
168
- }), a(n);
169
- }, O = (t, e, n) => {
236
+ }), g(n);
237
+ }, F = (t, e, n, o) => {
170
238
  if (!(t instanceof HTMLElement)) return !1;
171
- const o = typeof n == "string" ? n : t.innerHTML;
172
- if (e === o) return !1;
173
- const r = f(t).undoStack.slice(-1)[0];
174
- return r && r.beforeHTML === e && r.afterHTML === o ? !1 : (l(t, {
175
- beforeHTML: e,
176
- afterHTML: o,
239
+ const r = typeof n == "string" ? n : t.innerHTML;
240
+ if (e === r) return !1;
241
+ const i = M(t), c = i.undoStack[i.undoStack.length - 1];
242
+ if (c && c.beforeHTML === e && c.afterHTML === r)
243
+ return !1;
244
+ const d = Date.now(), s = o?.selectionCollapsed === !1 ? null : B(o?.inputType), E = s === "insert" && typeof o?.data == "string" && /\s/.test(o.data);
245
+ if (s && c && c.group === s && !c.closed && c.afterHTML === e && d - (c.updatedAt ?? 0) <= 1e3 && d - (c.startedAt ?? 0) <= 8e3)
246
+ return c.afterHTML = r, c.updatedAt = d, E && (c.closed = !0), i.redoStack.length = 0, u = t, !0;
247
+ const l = {
248
+ // A step that starts where the one before it ended shares its string, instead of holding a second copy of the document.
249
+ beforeHTML: c && c.afterHTML === e ? c.afterHTML : e,
250
+ afterHTML: r,
251
+ group: s ?? void 0,
252
+ startedAt: d,
253
+ updatedAt: d,
254
+ closed: E,
177
255
  undo: () => {
178
- t.isConnected && (t.innerHTML = e);
256
+ t.isConnected && (t.innerHTML = l.beforeHTML, L(t, l.beforeHTML, l.afterHTML, "undo"));
179
257
  },
180
258
  redo: () => {
181
- t.isConnected && (t.innerHTML = o);
259
+ t.isConnected && (t.innerHTML = l.afterHTML, L(t, l.beforeHTML, l.afterHTML, "redo"));
182
260
  }
183
- }), !0);
184
- }, M = (t) => {
185
- const e = S(t, "undo");
261
+ };
262
+ return h(t, l), !0;
263
+ }, A = (t) => {
264
+ const e = D(t, "undo");
186
265
  if (!e) return !1;
187
- const n = f(e), o = n.undoStack.pop();
188
- return o ? (o.undo(), n.redoStack.push(o), c = e, a(e), !0) : !1;
189
- }, C = (t) => {
190
- const e = S(t, "redo");
266
+ const n = M(e), o = n.undoStack.pop();
267
+ return o ? (o.undo(), n.redoStack.push(o), T(e), u = e, g(e), !0) : !1;
268
+ }, S = (t) => {
269
+ const e = D(t, "redo");
191
270
  if (!e) return !1;
192
- const n = f(e), o = n.redoStack.pop();
193
- return o ? (o.redo(), n.undoStack.push(o), c = e, a(e), !0) : !1;
271
+ const n = M(e), o = n.redoStack.pop();
272
+ return o ? (o.redo(), n.undoStack.push(o), T(e), u = e, g(e), !0) : !1;
194
273
  };
195
- typeof window < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", E, { once: !0 }) : E());
196
- const N = () => (E(), {
274
+ typeof window < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", C, { once: !0 }) : C());
275
+ const j = () => (C(), {
197
276
  name: "history",
198
277
  toolbar: [
199
278
  {
@@ -212,14 +291,14 @@ const N = () => (E(), {
212
291
  }
213
292
  ],
214
293
  commands: {
215
- undo: A,
216
- redo: L,
217
- setAttribute: k,
218
- setText: v,
219
- autoFixA11y: x,
220
- recordDomTransaction: O,
221
- undoDom: M,
222
- redoDom: C
294
+ undo: I,
295
+ redo: N,
296
+ setAttribute: P,
297
+ setText: G,
298
+ autoFixA11y: Y,
299
+ recordDomTransaction: F,
300
+ undoDom: A,
301
+ redoDom: S
223
302
  },
224
303
  keymap: {
225
304
  "Mod-z": "undo",
@@ -231,5 +310,5 @@ const N = () => (E(), {
231
310
  }
232
311
  });
233
312
  export {
234
- N as HistoryPlugin
313
+ j as HistoryPlugin
235
314
  };
@@ -1,4 +1,4 @@
1
- "use strict";const p=require("./sanitizeHtml-CDoBlNTk.js"),l=require("./shared-config.cjs.js"),u="rte-document-manager-styles",m=`
1
+ "use strict";const l=require("./notify-BkbzMopb.js"),m=require("./sanitizeHtml-CDoBlNTk.js"),d=require("./shared-config.cjs.js"),s="rte-document-manager-styles",f=`
2
2
  .rte-toolbar-button[data-busy="true"],
3
3
  .rte-docmgr-toolbar-button[data-busy="true"] {
4
4
  position: relative;
@@ -27,4 +27,4 @@
27
27
  @keyframes rte-docmgr-spin {
28
28
  to { transform: rotate(360deg); }
29
29
  }
30
- `;function f(){if(typeof document>"u"||document.getElementById(u))return;const n=document.createElement("style");n.id=u,n.textContent=m,document.head.appendChild(n)}async function s(n){f();const e=typeof window<"u"?window.__editoraLastCommandButton:null;e&&(e.disabled=!0,e.setAttribute("data-busy","true"),e.setAttribute("aria-busy","true"));try{return await n()}finally{e&&(e.disabled=!1,e.removeAttribute("data-busy"),e.removeAttribute("aria-busy"))}}const h=()=>({name:"document-manager",toolbar:[{label:"Import Word",command:"importWord",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"></path><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"></path></svg>',type:"button"},{label:"Export Word",command:"exportWord",icon:'<svg width="24" height="24" focusable="false"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"},{label:"Export PDF",command:"exportPdf",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"></path><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"}],commands:{importWord:()=>{const n=()=>{const o=window.getSelection();if(o&&o.rangeCount>0){let i=o.getRangeAt(0).startContainer;for(;i&&i!==document.body;){if(i.nodeType===Node.ELEMENT_NODE){const a=i;if(a.getAttribute("contenteditable")==="true")return a}i=i.parentNode}}const r=document.activeElement;if(r?.getAttribute("contenteditable")==="true")return r;const t=r?.closest('[contenteditable="true"]');return t||document.querySelector('[contenteditable="true"]')},e=document.createElement("input");return e.type="file",e.accept=".docx",e.onchange=async o=>{const r=o.target.files?.[0];if(r)try{const t=n();if(t){const{importFromWord:i}=await Promise.resolve().then(()=>require("./documentManager-r8t7yZEd.js")),a=await i(r);t.innerHTML=p.sanitizeHtml(a),t.dispatchEvent(new Event("input",{bubbles:!0}))}}catch(t){console.error("Import failed:",t),alert("Failed to import Word document. Please check the console for details.")}},e.click(),!0},exportWord:async()=>{const n=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};return s(async()=>{try{const e=n();if(e){const o=e.innerHTML,{exportToWord:r}=await Promise.resolve().then(()=>require("./documentManager-r8t7yZEd.js"));await r(o,"document.docx")}return!0}catch(e){return console.error("Export failed:",e),alert("Failed to export to Word. Please check the console for details."),!1}})},exportPdf:async()=>{const n=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};return s(async()=>{try{const e=n();if(e){const o=e.innerHTML,{exportToPdf:r}=await Promise.resolve().then(()=>require("./documentManager-r8t7yZEd.js"));await r(o,"document.pdf",e)}else console.error("PDF Export: No editor element found"),alert("No active editor found. Please click in the editor area first.");return!0}catch(e){return console.error("PDF Export: Export failed:",e),alert("Failed to export to PDF. Please check the console for details."),!1}})}},keymap:{}}),b={apiEndpoints:{exportWord:"/documents/export-word"},headers:{},useClientSideFallback:!0};let d={...b};function g(n){d={...d,...n}}function c(){return{...d}}function v(n){const e=c(),o=l.getGlobalApiConfig(),r=e.apiUrl||o.apiUrl;return l.buildApiUrl(r,e.apiEndpoints[n])}function y(){const n=l.getGlobalApiHeaders(),o=c().headers||{};return{...n,...o}}exports.DocumentManagerPlugin=h;exports.getApiHeaders=y;exports.getApiUrl=v;exports.getDocumentManagerConfig=c;exports.setDocumentManagerConfig=g;
30
+ `;function h(){if(typeof document>"u"||document.getElementById(s))return;const n=document.createElement("style");n.id=s,n.textContent=f,document.head.appendChild(n)}async function p(n){h();const e=typeof window<"u"?window.__editoraLastCommandButton:null;e&&(e.disabled=!0,e.setAttribute("data-busy","true"),e.setAttribute("aria-busy","true"));try{return await n()}finally{e&&(e.disabled=!1,e.removeAttribute("data-busy"),e.removeAttribute("aria-busy"))}}const b=()=>({name:"document-manager",toolbar:[{label:"Import Word",command:"importWord",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"></path><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"></path></svg>',type:"button"},{label:"Export Word",command:"exportWord",icon:'<svg width="24" height="24" focusable="false"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"},{label:"Export PDF",command:"exportPdf",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"></path><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"}],commands:{importWord:()=>{const n=()=>{const o=window.getSelection();if(o&&o.rangeCount>0){let i=o.getRangeAt(0).startContainer;for(;i&&i!==document.body;){if(i.nodeType===Node.ELEMENT_NODE){const a=i;if(a.getAttribute("contenteditable")==="true")return a}i=i.parentNode}}const r=document.activeElement;if(r?.getAttribute("contenteditable")==="true")return r;const t=r?.closest('[contenteditable="true"]');return t||document.querySelector('[contenteditable="true"]')},e=document.createElement("input");return e.type="file",e.accept=".docx",e.onchange=async o=>{const r=o.target.files?.[0];if(r)try{const t=n();if(t){const{importFromWord:i}=await Promise.resolve().then(()=>require("./documentManager-C9d17K5W.js")),a=await i(r);t.innerHTML=m.sanitizeHtml(a),t.dispatchEvent(new Event("input",{bubbles:!0}))}}catch(t){console.error("Import failed:",t),l.notify("Failed to import Word document. Please check the console for details.","error")}},e.click(),!0},exportWord:async()=>{const n=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};return p(async()=>{try{const e=n();if(e){const o=e.innerHTML,{exportToWord:r}=await Promise.resolve().then(()=>require("./documentManager-C9d17K5W.js"));await r(o,"document.docx")}return!0}catch(e){return console.error("Export failed:",e),l.notify("Failed to export to Word. Please check the console for details.","error"),!1}})},exportPdf:async()=>{const n=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};return p(async()=>{try{const e=n();if(e){const o=e.innerHTML,{exportToPdf:r}=await Promise.resolve().then(()=>require("./documentManager-C9d17K5W.js"));await r(o,"document.pdf",e)}else console.error("PDF Export: No editor element found"),l.notify("No active editor found. Please click in the editor area first.");return!0}catch(e){return console.error("PDF Export: Export failed:",e),l.notify("Failed to export to PDF. Please check the console for details.","error"),!1}})}},keymap:{}}),g={apiEndpoints:{exportWord:"/documents/export-word"},headers:{},useClientSideFallback:!0};let c={...g};function v(n){c={...c,...n}}function u(){return{...c}}function y(n){const e=u(),o=d.getGlobalApiConfig(),r=e.apiUrl??o.apiUrl;return d.buildApiUrl(r,e.apiEndpoints[n])}function E(){const n=d.getGlobalApiHeaders(),o=u().headers||{};return{...n,...o}}exports.DocumentManagerPlugin=b;exports.getApiHeaders=E;exports.getApiUrl=y;exports.getDocumentManagerConfig=u;exports.setDocumentManagerConfig=v;
@@ -1,6 +1,7 @@
1
- import { s } from "./sanitizeHtml-CtLy8um-.mjs";
2
- import { getGlobalApiConfig as p, buildApiUrl as m, getGlobalApiHeaders as f } from "./shared-config.esm.js";
3
- const d = "rte-document-manager-styles", b = `
1
+ import { n as l } from "./notify-zOp-mUOJ.mjs";
2
+ import { s as p } from "./sanitizeHtml-CtLy8um-.mjs";
3
+ import { getGlobalApiConfig as m, buildApiUrl as f, getGlobalApiHeaders as b } from "./shared-config.esm.js";
4
+ const c = "rte-document-manager-styles", h = `
4
5
  .rte-toolbar-button[data-busy="true"],
5
6
  .rte-docmgr-toolbar-button[data-busy="true"] {
6
7
  position: relative;
@@ -30,13 +31,13 @@ const d = "rte-document-manager-styles", b = `
30
31
  to { transform: rotate(360deg); }
31
32
  }
32
33
  `;
33
- function h() {
34
- if (typeof document > "u" || document.getElementById(d)) return;
34
+ function g() {
35
+ if (typeof document > "u" || document.getElementById(c)) return;
35
36
  const n = document.createElement("style");
36
- n.id = d, n.textContent = b, document.head.appendChild(n);
37
+ n.id = c, n.textContent = h, document.head.appendChild(n);
37
38
  }
38
- async function c(n) {
39
- h();
39
+ async function u(n) {
40
+ g();
40
41
  const t = typeof window < "u" ? window.__editoraLastCommandButton : null;
41
42
  t && (t.disabled = !0, t.setAttribute("data-busy", "true"), t.setAttribute("aria-busy", "true"));
42
43
  try {
@@ -45,7 +46,7 @@ async function c(n) {
45
46
  t && (t.disabled = !1, t.removeAttribute("data-busy"), t.removeAttribute("aria-busy"));
46
47
  }
47
48
  }
48
- const E = () => ({
49
+ const w = () => ({
49
50
  name: "document-manager",
50
51
  toolbar: [
51
52
  {
@@ -94,11 +95,11 @@ const E = () => ({
94
95
  try {
95
96
  const e = n();
96
97
  if (e) {
97
- const { importFromWord: a } = await import("./documentManager-BL98a7YZ.mjs"), i = await a(r);
98
- e.innerHTML = s(i), e.dispatchEvent(new Event("input", { bubbles: !0 }));
98
+ const { importFromWord: a } = await import("./documentManager-BFjGIeI8.mjs"), i = await a(r);
99
+ e.innerHTML = p(i), e.dispatchEvent(new Event("input", { bubbles: !0 }));
99
100
  }
100
101
  } catch (e) {
101
- console.error("Import failed:", e), alert("Failed to import Word document. Please check the console for details.");
102
+ console.error("Import failed:", e), l("Failed to import Word document. Please check the console for details.", "error");
102
103
  }
103
104
  }, t.click(), !0;
104
105
  },
@@ -116,16 +117,16 @@ const E = () => ({
116
117
  const o = document.activeElement;
117
118
  return o?.getAttribute("contenteditable") === "true" ? o : o?.closest('[contenteditable="true"]') || document.querySelector('[contenteditable="true"]');
118
119
  };
119
- return c(async () => {
120
+ return u(async () => {
120
121
  try {
121
122
  const t = n();
122
123
  if (t) {
123
- const o = t.innerHTML, { exportToWord: r } = await import("./documentManager-BL98a7YZ.mjs");
124
+ const o = t.innerHTML, { exportToWord: r } = await import("./documentManager-BFjGIeI8.mjs");
124
125
  await r(o, "document.docx");
125
126
  }
126
127
  return !0;
127
128
  } catch (t) {
128
- return console.error("Export failed:", t), alert("Failed to export to Word. Please check the console for details."), !1;
129
+ return console.error("Export failed:", t), l("Failed to export to Word. Please check the console for details.", "error"), !1;
129
130
  }
130
131
  });
131
132
  },
@@ -143,23 +144,23 @@ const E = () => ({
143
144
  const o = document.activeElement;
144
145
  return o?.getAttribute("contenteditable") === "true" ? o : o?.closest('[contenteditable="true"]') || document.querySelector('[contenteditable="true"]');
145
146
  };
146
- return c(async () => {
147
+ return u(async () => {
147
148
  try {
148
149
  const t = n();
149
150
  if (t) {
150
- const o = t.innerHTML, { exportToPdf: r } = await import("./documentManager-BL98a7YZ.mjs");
151
+ const o = t.innerHTML, { exportToPdf: r } = await import("./documentManager-BFjGIeI8.mjs");
151
152
  await r(o, "document.pdf", t);
152
153
  } else
153
- console.error("PDF Export: No editor element found"), alert("No active editor found. Please click in the editor area first.");
154
+ console.error("PDF Export: No editor element found"), l("No active editor found. Please click in the editor area first.");
154
155
  return !0;
155
156
  } catch (t) {
156
- return console.error("PDF Export: Export failed:", t), alert("Failed to export to PDF. Please check the console for details."), !1;
157
+ return console.error("PDF Export: Export failed:", t), l("Failed to export to PDF. Please check the console for details.", "error"), !1;
157
158
  }
158
159
  });
159
160
  }
160
161
  },
161
162
  keymap: {}
162
- }), g = {
163
+ }), v = {
163
164
  apiEndpoints: {
164
165
  exportWord: "/documents/export-word"
165
166
  },
@@ -171,25 +172,25 @@ const E = () => ({
171
172
  useClientSideFallback: !0
172
173
  // Enable fallback by default
173
174
  };
174
- let l = { ...g };
175
- function A(n) {
176
- l = { ...l, ...n };
175
+ let d = { ...v };
176
+ function x(n) {
177
+ d = { ...d, ...n };
177
178
  }
178
- function u() {
179
- return { ...l };
179
+ function s() {
180
+ return { ...d };
180
181
  }
181
- function w(n) {
182
- const t = u(), o = p(), r = t.apiUrl || o.apiUrl;
183
- return m(r, t.apiEndpoints[n]);
182
+ function C(n) {
183
+ const t = s(), o = m(), r = t.apiUrl ?? o.apiUrl;
184
+ return f(r, t.apiEndpoints[n]);
184
185
  }
185
- function x() {
186
- const n = f(), o = u().headers || {};
186
+ function M() {
187
+ const n = b(), o = s().headers || {};
187
188
  return { ...n, ...o };
188
189
  }
189
190
  export {
190
- E as D,
191
- w as a,
192
- x as b,
193
- u as g,
194
- A as s
191
+ w as D,
192
+ C as a,
193
+ M as b,
194
+ s as g,
195
+ x as s
195
196
  };
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./heading.cjs.js"),r=require("./bold.cjs.js"),o=require("./italic.cjs.js"),u=require("./underline.cjs.js"),a=require("./strikethrough.cjs.js"),g=require("./list.cjs.js"),s=require("./checklist.cjs.js"),P=require("./history.cjs.js"),c=require("./link.cjs.js"),m=require("./blockquote.cjs.js"),C=require("./clear-formatting.cjs.js"),d=require("./CodePlugin.native-CKJo7IFG.js"),q=require("./table.cjs.js"),p=require("./font-size.cjs.js"),h=require("./format-painter.cjs.js"),k=require("./font-family.cjs.js"),f=require("./text-alignment.cjs.js"),T=require("./text-color.cjs.js"),M=require("./background-color.cjs.js"),b=require("./line-height.cjs.js"),S=require("./indent.cjs.js"),A=require("./direction.cjs.js"),D=require("./capitalization.cjs.js"),F=require("./math.cjs.js"),y=require("./special-characters.cjs.js"),B=require("./emojis.cjs.js"),E=require("./embed-iframe.cjs.js"),I=require("./anchor.cjs.js"),v=require("./mentions.cjs.js"),L=require("./track-changes.cjs.js"),w=require("./version-diff.cjs.js"),H=require("./conditional-content.cjs.js"),z=require("./data-binding.cjs.js"),R=require("./content-rules.cjs.js"),x=require("./citations.cjs.js"),G=require("./approval-workflow.cjs.js"),W=require("./pii-redaction.cjs.js"),_=require("./smart-paste.cjs.js"),j=require("./blocks-library.cjs.js"),U=require("./doc-schema.cjs.js"),N=require("./translation-workflow.cjs.js"),V=require("./slash-commands.cjs.js"),n=require("./media-manager.cjs.js"),t=require("./index-D5xugkYA.js"),O=require("./preview.cjs.js"),J=require("./fullscreen.cjs.js"),K=require("./print.cjs.js"),Q=require("./page-break.cjs.js"),X=require("./footnote.cjs.js"),Y=require("./code-sample.cjs.js"),Z=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),$=require("./comments.cjs.js"),ee=require("./collaboration.cjs.js"),ie=require("./spell-check.cjs.js"),ne=require("./a11y-checker.cjs.js"),i=require("./shared-config.cjs.js");exports.HeadingPlugin=l.HeadingPlugin;exports.BoldPlugin=r.BoldPlugin;exports.ItalicPlugin=o.ItalicPlugin;exports.UnderlinePlugin=u.UnderlinePlugin;exports.StrikethroughPlugin=a.StrikethroughPlugin;exports.ListPlugin=g.ListPlugin;exports.ChecklistPlugin=s.ChecklistPlugin;exports.HistoryPlugin=P.HistoryPlugin;exports.LinkPlugin=c.LinkPlugin;exports.BlockquotePlugin=m.BlockquotePlugin;exports.ClearFormattingPlugin=C.ClearFormattingPlugin;exports.CodePlugin=d.CodePlugin;exports.TablePlugin=q.TablePlugin;exports.FontSizePlugin=p.FontSizePlugin;exports.FormatPainterPlugin=h.FormatPainterPlugin;exports.FontFamilyPlugin=k.FontFamilyPlugin;exports.TextAlignmentPlugin=f.TextAlignmentPlugin;exports.TextColorPlugin=T.TextColorPlugin;exports.BackgroundColorPlugin=M.BackgroundColorPlugin;exports.LineHeightPlugin=b.LineHeightPlugin;exports.IndentPlugin=S.IndentPlugin;exports.DirectionPlugin=A.DirectionPlugin;exports.CapitalizationPlugin=D.CapitalizationPlugin;exports.MathPlugin=F.MathPlugin;exports.SpecialCharactersPlugin=y.SpecialCharactersPlugin;exports.EmojisPlugin=B.EmojisPlugin;exports.EmbedIframePlugin=E.EmbedIframePlugin;exports.AnchorPlugin=I.AnchorPlugin;exports.MentionPlugin=v.MentionPlugin;exports.TrackChangesPlugin=L.TrackChangesPlugin;exports.VersionDiffPlugin=w.VersionDiffPlugin;exports.ConditionalContentPlugin=H.ConditionalContentPlugin;exports.DataBindingPlugin=z.DataBindingPlugin;exports.ContentRulesPlugin=R.ContentRulesPlugin;exports.CitationsPlugin=x.CitationsPlugin;exports.ApprovalWorkflowPlugin=G.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=W.PIIRedactionPlugin;exports.SmartPastePlugin=_.SmartPastePlugin;exports.BlocksLibraryPlugin=j.BlocksLibraryPlugin;exports.DocSchemaPlugin=U.DocSchemaPlugin;exports.TranslationWorkflowPlugin=N.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=V.SlashCommandsPlugin;exports.MediaManagerPlugin=n.MediaManagerPlugin;exports.getMediaManagerConfig=n.getMediaManagerConfig;exports.setMediaManagerConfig=n.setMediaManagerConfig;exports.DocumentManagerPlugin=t.DocumentManagerPlugin;exports.getDocumentManagerConfig=t.getDocumentManagerConfig;exports.setDocumentManagerConfig=t.setDocumentManagerConfig;exports.PreviewPlugin=O.PreviewPlugin;exports.FullscreenPlugin=J.FullscreenPlugin;exports.PrintPlugin=K.PrintPlugin;exports.PageBreakPlugin=Q.PageBreakPlugin;exports.FootnotePlugin=X.FootnotePlugin;exports.CodeSamplePlugin=Y.CodeSamplePlugin;exports.MergeTagPlugin=Z.MergeTagPlugin;exports.PREDEFINED_TEMPLATES=e.PREDEFINED_TEMPLATES;exports.TemplatePlugin=e.TemplatePlugin;exports.addCustomTemplate=e.addCustomTemplate;exports.getAllTemplates=e.getAllTemplates;exports.getTemplateCategories=e.getTemplateCategories;exports.getTemplatesByCategory=e.getTemplatesByCategory;exports.sanitizeTemplate=e.sanitizeTemplate;exports.searchTemplates=e.searchTemplates;exports.validateTemplate=e.validateTemplate;exports.CommentsPlugin=$.CommentsPlugin;exports.CollaborationPlugin=ee.CollaborationPlugin;exports.SpellCheckPlugin=ie.SpellCheckPlugin;exports.A11yCheckerPlugin=ne.A11yCheckerPlugin;exports.buildApiUrl=i.buildApiUrl;exports.getGlobalApiConfig=i.getGlobalApiConfig;exports.getGlobalApiHeaders=i.getGlobalApiHeaders;exports.setGlobalApiConfig=i.setGlobalApiConfig;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./heading.cjs.js"),l=require("./bold.cjs.js"),o=require("./italic.cjs.js"),a=require("./underline.cjs.js"),u=require("./strikethrough.cjs.js"),g=require("./list.cjs.js"),s=require("./checklist.cjs.js"),P=require("./history.cjs.js"),c=require("./link.cjs.js"),m=require("./blockquote.cjs.js"),d=require("./clear-formatting.cjs.js"),C=require("./CodePlugin.native-BwhZsI5v.js"),q=require("./table.cjs.js"),p=require("./font-size.cjs.js"),h=require("./format-painter.cjs.js"),k=require("./font-family.cjs.js"),f=require("./text-alignment.cjs.js"),M=require("./text-color.cjs.js"),T=require("./background-color.cjs.js"),b=require("./line-height.cjs.js"),S=require("./indent.cjs.js"),A=require("./direction.cjs.js"),v=require("./capitalization.cjs.js"),D=require("./math.cjs.js"),B=require("./special-characters.cjs.js"),E=require("./emojis.cjs.js"),F=require("./embed-iframe.cjs.js"),y=require("./anchor.cjs.js"),I=require("./mentions.cjs.js"),L=require("./track-changes.cjs.js"),R=require("./version-diff.cjs.js"),w=require("./conditional-content.cjs.js"),H=require("./data-binding.cjs.js"),z=require("./content-rules.cjs.js"),U=require("./citations.cjs.js"),x=require("./approval-workflow.cjs.js"),G=require("./pii-redaction.cjs.js"),W=require("./smart-paste.cjs.js"),_=require("./blocks-library.cjs.js"),j=require("./doc-schema.cjs.js"),N=require("./translation-workflow.cjs.js"),V=require("./slash-commands.cjs.js"),i=require("./MediaManagerPlugin.native-CycfjOi4.js"),O=require("./media-manager.cjs.js"),r=require("./index-CtR8olYy.js"),J=require("./preview.cjs.js"),K=require("./fullscreen.cjs.js"),Q=require("./print.cjs.js"),X=require("./page-break.cjs.js"),Y=require("./footnote.cjs.js"),Z=require("./code-sample.cjs.js"),$=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),ee=require("./comments.cjs.js"),ie=require("./collaboration.cjs.js"),ne=require("./spell-check.cjs.js"),re=require("./a11y-checker.cjs.js"),n=require("./shared-config.cjs.js");exports.HeadingPlugin=t.HeadingPlugin;exports.BoldPlugin=l.BoldPlugin;exports.ItalicPlugin=o.ItalicPlugin;exports.UnderlinePlugin=a.UnderlinePlugin;exports.StrikethroughPlugin=u.StrikethroughPlugin;exports.ListPlugin=g.ListPlugin;exports.ChecklistPlugin=s.ChecklistPlugin;exports.HistoryPlugin=P.HistoryPlugin;exports.LinkPlugin=c.LinkPlugin;exports.BlockquotePlugin=m.BlockquotePlugin;exports.ClearFormattingPlugin=d.ClearFormattingPlugin;exports.CodePlugin=C.CodePlugin;exports.TablePlugin=q.TablePlugin;exports.FontSizePlugin=p.FontSizePlugin;exports.FormatPainterPlugin=h.FormatPainterPlugin;exports.FontFamilyPlugin=k.FontFamilyPlugin;exports.TextAlignmentPlugin=f.TextAlignmentPlugin;exports.TextColorPlugin=M.TextColorPlugin;exports.BackgroundColorPlugin=T.BackgroundColorPlugin;exports.LineHeightPlugin=b.LineHeightPlugin;exports.IndentPlugin=S.IndentPlugin;exports.DirectionPlugin=A.DirectionPlugin;exports.CapitalizationPlugin=v.CapitalizationPlugin;exports.MathPlugin=D.MathPlugin;exports.SpecialCharactersPlugin=B.SpecialCharactersPlugin;exports.EmojisPlugin=E.EmojisPlugin;exports.EmbedIframePlugin=F.EmbedIframePlugin;exports.AnchorPlugin=y.AnchorPlugin;exports.MentionPlugin=I.MentionPlugin;exports.TrackChangesPlugin=L.TrackChangesPlugin;exports.VersionDiffPlugin=R.VersionDiffPlugin;exports.ConditionalContentPlugin=w.ConditionalContentPlugin;exports.DataBindingPlugin=H.DataBindingPlugin;exports.ContentRulesPlugin=z.ContentRulesPlugin;exports.CitationsPlugin=U.CitationsPlugin;exports.ApprovalWorkflowPlugin=x.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=G.PIIRedactionPlugin;exports.SmartPastePlugin=W.SmartPastePlugin;exports.BlocksLibraryPlugin=_.BlocksLibraryPlugin;exports.DocSchemaPlugin=j.DocSchemaPlugin;exports.TranslationWorkflowPlugin=N.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=V.SlashCommandsPlugin;exports.MediaManagerPlugin=i.MediaManagerPlugin;exports.MediaUploadError=i.MediaUploadError;exports.createBase64Provider=i.createBase64Provider;exports.createCallbackProvider=i.createCallbackProvider;exports.createRestProvider=i.createRestProvider;exports.getMediaManagerConfig=i.getMediaManagerConfig;exports.parseEmbedUrl=i.parseEmbedUrl;exports.setMediaManagerConfig=i.setMediaManagerConfig;exports.mediaSlashItems=O.mediaSlashItems;exports.DocumentManagerPlugin=r.DocumentManagerPlugin;exports.getDocumentManagerConfig=r.getDocumentManagerConfig;exports.setDocumentManagerConfig=r.setDocumentManagerConfig;exports.PreviewPlugin=J.PreviewPlugin;exports.FullscreenPlugin=K.FullscreenPlugin;exports.PrintPlugin=Q.PrintPlugin;exports.PageBreakPlugin=X.PageBreakPlugin;exports.FootnotePlugin=Y.FootnotePlugin;exports.CodeSamplePlugin=Z.CodeSamplePlugin;exports.MergeTagPlugin=$.MergeTagPlugin;exports.PREDEFINED_TEMPLATES=e.PREDEFINED_TEMPLATES;exports.TemplatePlugin=e.TemplatePlugin;exports.addCustomTemplate=e.addCustomTemplate;exports.getAllTemplates=e.getAllTemplates;exports.getTemplateCategories=e.getTemplateCategories;exports.getTemplatesByCategory=e.getTemplatesByCategory;exports.sanitizeTemplate=e.sanitizeTemplate;exports.searchTemplates=e.searchTemplates;exports.validateTemplate=e.validateTemplate;exports.CommentsPlugin=ee.CommentsPlugin;exports.CollaborationPlugin=ie.CollaborationPlugin;exports.SpellCheckPlugin=ne.SpellCheckPlugin;exports.A11yCheckerPlugin=re.A11yCheckerPlugin;exports.buildApiUrl=n.buildApiUrl;exports.getGlobalApiConfig=n.getGlobalApiConfig;exports.getGlobalApiHeaders=n.getGlobalApiHeaders;exports.setGlobalApiConfig=n.setGlobalApiConfig;