@editora/core 1.0.9 → 1.0.10

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 (99) hide show
  1. package/README.md +1 -1
  2. package/dist/{A11yCheckerPlugin.native-58d12bed.mjs → A11yCheckerPlugin.native-BRdGYMju.mjs} +12 -23
  3. package/dist/{AnchorPlugin.native-289a112a.mjs → AnchorPlugin.native-BcYGEtd9.mjs} +102 -112
  4. package/dist/{ApprovalWorkflowPlugin.native-449ce66c.mjs → ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs} +173 -209
  5. package/dist/{BackgroundColorPlugin.native-8aceb5cc.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs} +9 -16
  6. package/dist/BlockquotePlugin.native-57_Xcjl1.mjs +212 -0
  7. package/dist/{BlocksLibraryPlugin.native-1cc51e63.mjs → BlocksLibraryPlugin.native-5sdsXsiE.mjs} +149 -205
  8. package/dist/{BoldPlugin.native-f9d7f8e4.mjs → BoldPlugin.native-CSh_LiIJ.mjs} +11 -7
  9. package/dist/CapitalizationPlugin.native-DLV4oPmB.mjs +159 -0
  10. package/dist/ChecklistPlugin.native-BS-kMz9O.mjs +371 -0
  11. package/dist/{CitationsPlugin.native-169fb1e8.mjs → CitationsPlugin.native-DQgoCd1B.mjs} +196 -261
  12. package/dist/ClearFormattingPlugin.native-DIS6AN2t.mjs +172 -0
  13. package/dist/CodePlugin.native-C5l1IeSS.mjs +4570 -0
  14. package/dist/{CodeSamplePlugin.native-6cc0148e.mjs → CodeSamplePlugin.native-CgGoH-X4.mjs} +10 -19
  15. package/dist/{CommentsPlugin.native-03659874.mjs → CommentsPlugin.native-DPSqTkiv.mjs} +28 -55
  16. package/dist/{ConditionalContentPlugin.native-4983143a.mjs → ConditionalContentPlugin.native-CfhY46rU.mjs} +51 -108
  17. package/dist/{ContentRulesPlugin.native-63ed405b.mjs → ContentRulesPlugin.native-vPx5nC73.mjs} +153 -200
  18. package/dist/{DataBindingPlugin.native-427e9d75.mjs → DataBindingPlugin.native-BoXwghTz.mjs} +88 -124
  19. package/dist/DirectionPlugin.native-Bl-QLFzO.mjs +153 -0
  20. package/dist/{DocSchemaPlugin.native-8e41eda0.mjs → DocSchemaPlugin.native-DUSVRHqT.mjs} +112 -166
  21. package/dist/{DocumentManagerPlugin.native-e69895ad.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs} +4 -4
  22. package/dist/EmbedIframePlugin.native-BF_-LjTq.mjs +740 -0
  23. package/dist/{EmojisPlugin.native-65c5ac47.mjs → EmojisPlugin.native-CitxxlWX.mjs} +6 -11
  24. package/dist/{FontFamilyPlugin.native-f9bc255a.mjs → FontFamilyPlugin.native-j8hMTbg4.mjs} +4 -7
  25. package/dist/{FontSizePlugin.native-f5647872.mjs → FontSizePlugin.native-B_jCh7dY.mjs} +10 -19
  26. package/dist/{FootnotePlugin.native-494657b3.mjs → FootnotePlugin.native-D730OGRm.mjs} +39 -77
  27. package/dist/{FullscreenPlugin.native-87ce92e9.mjs → FullscreenPlugin.native-ChXyxeNw.mjs} +1 -1
  28. package/dist/HeadingPlugin.native-DZdvubrQ.mjs +249 -0
  29. package/dist/{HistoryPlugin.native-92ed4be4.mjs → HistoryPlugin.native-D2wl32jV.mjs} +107 -143
  30. package/dist/{IndentPlugin.native-e4ee902b.mjs → IndentPlugin.native-BHixp8sP.mjs} +12 -23
  31. package/dist/{ItalicPlugin.native-7c95cfbc.mjs → ItalicPlugin.native-CmnlwFHB.mjs} +15 -11
  32. package/dist/{LineHeightPlugin.native-5668f78c.mjs → LineHeightPlugin.native-CM7iXdQj.mjs} +10 -19
  33. package/dist/{LinkPlugin.native-6df29111.mjs → LinkPlugin.native-DYCIcdTm.mjs} +5 -9
  34. package/dist/{ListPlugin.native-fe2e115a.mjs → ListPlugin.native-V7EZC1lM.mjs} +5 -9
  35. package/dist/MathPlugin.native-NwWPHVmj.mjs +369 -0
  36. package/dist/{MediaManagerPlugin.native-3cf48a00.mjs → MediaManagerPlugin.native-eOsTJFpw.mjs} +11 -21
  37. package/dist/{MentionPlugin.native-3b1e8c05.mjs → MentionPlugin.native-BMDlOqur.mjs} +45 -89
  38. package/dist/MergeTagPlugin.native-BzRVoD9-.mjs +580 -0
  39. package/dist/{PIIRedactionPlugin.native-7ab10b9f.mjs → PIIRedactionPlugin.native-g7j4jOmm.mjs} +210 -260
  40. package/dist/{PageBreakPlugin.native-1794c5fb.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +16 -31
  41. package/dist/{PreviewPlugin.native-f7b67cc0.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +6 -11
  42. package/dist/{PrintPlugin.native-f6a168c2.mjs → PrintPlugin.native-7qt5v7L5.mjs} +3 -5
  43. package/dist/{SlashCommandsPlugin.native-8d45e511.mjs → SlashCommandsPlugin.native-BiN6ODw5.mjs} +36 -71
  44. package/dist/{SmartPastePlugin.native-a6c5efec.mjs → SmartPastePlugin.native-CZAEHkyt.mjs} +173 -219
  45. package/dist/{SpecialCharactersPlugin.native-7f06d4ba.mjs → SpecialCharactersPlugin.native-DaG4b19I.mjs} +101 -85
  46. package/dist/{SpellCheckPlugin.native-04e20834.mjs → SpellCheckPlugin.native-BZB9AewP.mjs} +21 -41
  47. package/dist/{StrikethroughPlugin.native-905e9501.mjs → StrikethroughPlugin.native-V0TL4F48.mjs} +12 -30
  48. package/dist/{TablePlugin.native-7d5458c1.mjs → TablePlugin.native-DrHX-efe.mjs} +30 -58
  49. package/dist/TemplatePlugin.native-DLjFUaPW.mjs +1150 -0
  50. package/dist/{TextAlignmentPlugin.native-9357b3ed.mjs → TextAlignmentPlugin.native-sM_1s00t.mjs} +6 -11
  51. package/dist/{TextColorPlugin.native-d53ed459.mjs → TextColorPlugin.native-Bwl_bSmc.mjs} +14 -26
  52. package/dist/{TrackChangesPlugin.native-e96da509.mjs → TrackChangesPlugin.native-Bghu2q4a.mjs} +58 -115
  53. package/dist/{TranslationWorkflowPlugin.native-4e711b1e.mjs → TranslationWorkflowPlugin.native-DdF16tgT.mjs} +191 -257
  54. package/dist/{UnderlinePlugin.native-8080c998.mjs → UnderlinePlugin.native-DZzg23rv.mjs} +8 -4
  55. package/dist/{VersionDiffPlugin.native-5bbeff85.mjs → VersionDiffPlugin.native-Bvxgy--t.mjs} +26 -51
  56. package/dist/_commonjsHelpers-DOllISpa.mjs +32 -0
  57. package/dist/{anchoredPopover-5cca53ba.mjs → anchoredPopover-Bxds0VoB.mjs} +1 -1
  58. package/dist/core.css +1 -0
  59. package/dist/documentManager-vQ1VkbUY.mjs +8418 -0
  60. package/dist/{editorContainerHelpers-69585c07.mjs → editorContainerHelpers-C7kdWnS0.mjs} +2 -3
  61. package/dist/editora.min.js +13 -14
  62. package/dist/editora.umd.js +13 -14
  63. package/dist/{html2canvas.esm-c51cb3b9.mjs → html2canvas.esm-AYkPY5LS.mjs} +894 -978
  64. package/dist/index-BslAFzmv.mjs +16544 -0
  65. package/dist/index-CPMGUZfB.js +10 -0
  66. package/dist/{index-7da30697.mjs → index-DBoj6QfW.mjs} +127 -164
  67. package/dist/index.cjs.js +1 -1
  68. package/dist/index.es-BYD2KEo6.mjs +6666 -0
  69. package/dist/index.esm.js +7 -12
  70. package/dist/inlineFormatting-DJ0-NZtx.mjs +97 -0
  71. package/dist/{jspdf.es.min-780c82db.mjs → jspdf.es.min-BJGtOnRT.mjs} +3784 -4808
  72. package/dist/plugin-loader.js +67 -67
  73. package/dist/{purify.es-3bdbcfc5.mjs → purify.es-CKpwg8Tk.mjs} +10 -20
  74. package/dist/webcomponent-core.js +131 -168
  75. package/dist/webcomponent-core.min.css +1 -1
  76. package/dist/webcomponent-core.min.js +139 -63
  77. package/dist/webcomponent.cjs.js +1 -1
  78. package/dist/webcomponent.esm.js +1 -1
  79. package/dist/webcomponent.js +191 -228
  80. package/dist/webcomponent.min.css +1 -1
  81. package/dist/webcomponent.min.js +1240 -1344
  82. package/package.json +1 -1
  83. package/dist/BlockquotePlugin.native-3541c714.mjs +0 -49
  84. package/dist/CapitalizationPlugin.native-42c135dc.mjs +0 -80
  85. package/dist/ChecklistPlugin.native-3b397ee9.mjs +0 -330
  86. package/dist/ClearFormattingPlugin.native-77baa514.mjs +0 -145
  87. package/dist/CodePlugin.native-989cf0aa.mjs +0 -2740
  88. package/dist/DirectionPlugin.native-4e742f42.mjs +0 -139
  89. package/dist/EmbedIframePlugin.native-55209c87.mjs +0 -568
  90. package/dist/HeadingPlugin.native-e38c4a16.mjs +0 -64
  91. package/dist/MathPlugin.native-735bbac2.mjs +0 -296
  92. package/dist/MergeTagPlugin.native-31cf7d48.mjs +0 -584
  93. package/dist/TemplatePlugin.native-580f0f63.mjs +0 -617
  94. package/dist/_commonjsHelpers-69d58be2.mjs +0 -31
  95. package/dist/documentManager-8327fb6e.mjs +0 -9166
  96. package/dist/index-072ef022.js +0 -11
  97. package/dist/index-49d31221.mjs +0 -16860
  98. package/dist/index.es-b47a189f.mjs +0 -5782
  99. package/dist/style.css +0 -1
@@ -1,4 +1,4 @@
1
- import { f as q, g as X } from "./editorContainerHelpers-69585c07.mjs";
1
+ import { f as q, g as X } from "./editorContainerHelpers-C7kdWnS0.mjs";
2
2
  let h = null, m = null, R = null, x = null, I = null, M = null, S = null;
3
3
  const C = '[data-theme="dark"], .dark, .editora-theme-dark';
4
4
  let w = !1, v = null, V = 0, L = 0, E = !1, k = 0, A = 0, B = 0, D = 0;
@@ -7,8 +7,7 @@ const _ = () => {
7
7
  if (!t)
8
8
  return alert("Please place your cursor in the editor before inserting a table"), !1;
9
9
  const n = window.getSelection();
10
- if (!n || n.rangeCount === 0)
11
- return;
10
+ if (!n || n.rangeCount === 0) return;
12
11
  const l = n.getRangeAt(0), r = document.createElement("table");
13
12
  r.className = "rte-table";
14
13
  const o = document.createElement("thead"), a = document.createElement("tr");
@@ -36,8 +35,7 @@ const _ = () => {
36
35
  }, P = () => {
37
36
  var a;
38
37
  const e = p();
39
- if (!e)
40
- return;
38
+ if (!e) return;
41
39
  const { table: t, rowIndex: n } = e, l = document.createElement("tr"), r = ((a = t.rows[0]) == null ? void 0 : a.cells.length) || 0;
42
40
  for (let s = 0; s < r; s++) {
43
41
  const i = document.createElement("td"), d = document.createElement("p");
@@ -48,8 +46,7 @@ const _ = () => {
48
46
  }, z = () => {
49
47
  var o;
50
48
  const e = p();
51
- if (!e)
52
- return;
49
+ if (!e) return;
53
50
  const { table: t, rowIndex: n } = e, l = document.createElement("tr"), r = ((o = t.rows[0]) == null ? void 0 : o.cells.length) || 0;
54
51
  for (let a = 0; a < r; a++) {
55
52
  const s = document.createElement("td"), i = document.createElement("p");
@@ -58,8 +55,7 @@ const _ = () => {
58
55
  n >= t.rows.length - 1 ? t.appendChild(l) : t.insertBefore(l, t.rows[n + 1]), g();
59
56
  }, W = () => {
60
57
  const e = p();
61
- if (!e)
62
- return;
58
+ if (!e) return;
63
59
  const { table: t, colIndex: n } = e;
64
60
  for (let l = 0; l < t.rows.length; l++) {
65
61
  const r = t.rows[l], o = document.createElement("td"), a = document.createElement("p");
@@ -68,8 +64,7 @@ const _ = () => {
68
64
  g();
69
65
  }, T = () => {
70
66
  const e = p();
71
- if (!e)
72
- return;
67
+ if (!e) return;
73
68
  const { table: t, colIndex: n } = e;
74
69
  for (let l = 0; l < t.rows.length; l++) {
75
70
  const r = t.rows[l], o = document.createElement("td"), a = document.createElement("p");
@@ -78,14 +73,12 @@ const _ = () => {
78
73
  g();
79
74
  }, O = () => {
80
75
  const e = p();
81
- if (!e || e.rowCount <= 1)
82
- return;
76
+ if (!e || e.rowCount <= 1) return;
83
77
  const { table: t, rowIndex: n } = e;
84
78
  t.deleteRow(n), g();
85
79
  }, K = () => {
86
80
  const e = p();
87
- if (!e || e.cellCount <= 1)
88
- return;
81
+ if (!e || e.cellCount <= 1) return;
89
82
  const { table: t, colIndex: n } = e;
90
83
  for (let l = 0; l < t.rows.length; l++) {
91
84
  const r = t.rows[l];
@@ -95,8 +88,7 @@ const _ = () => {
95
88
  }, Y = () => {
96
89
  var o;
97
90
  const e = p();
98
- if (!e)
99
- return;
91
+ if (!e) return;
100
92
  const { table: t, rowIndex: n } = e, l = t.rows[n];
101
93
  if (((o = l.parentElement) == null ? void 0 : o.tagName.toLowerCase()) === "thead") {
102
94
  const a = t.querySelector("tbody") || t.appendChild(document.createElement("tbody")), s = t.querySelector("thead");
@@ -109,8 +101,7 @@ const _ = () => {
109
101
  }, F = () => {
110
102
  var l;
111
103
  const e = p();
112
- if (!e)
113
- return;
104
+ if (!e) return;
114
105
  const { table: t, colIndex: n } = e;
115
106
  for (let r = 0; r < t.rows.length; r++) {
116
107
  const o = t.rows[r].cells[n];
@@ -127,34 +118,27 @@ const _ = () => {
127
118
  g();
128
119
  }, U = () => {
129
120
  const e = p();
130
- if (!e)
131
- return;
121
+ if (!e) return;
132
122
  e.table.remove(), document.dispatchEvent(new CustomEvent("tableDeleted"));
133
123
  }, j = () => {
134
124
  var u, b;
135
125
  const e = window.getSelection();
136
- if (!e || e.rangeCount === 0)
137
- return;
126
+ if (!e || e.rangeCount === 0) return;
138
127
  const n = e.getRangeAt(0).startContainer;
139
- if (!(n.nodeType === Node.TEXT_NODE ? (u = n.parentElement) == null ? void 0 : u.closest("table") : n.closest("table")))
140
- return;
128
+ if (!(n.nodeType === Node.TEXT_NODE ? (u = n.parentElement) == null ? void 0 : u.closest("table") : n.closest("table"))) return;
141
129
  let r = null;
142
- if (n.nodeType === Node.TEXT_NODE ? r = (b = n.parentElement) == null ? void 0 : b.closest("td, th") : n.nodeType === Node.ELEMENT_NODE && (r = n.closest("td, th")), !r)
143
- return;
130
+ if (n.nodeType === Node.TEXT_NODE ? r = (b = n.parentElement) == null ? void 0 : b.closest("td, th") : n.nodeType === Node.ELEMENT_NODE && (r = n.closest("td, th")), !r) return;
144
131
  const o = r.parentElement;
145
- if (!o)
146
- return;
132
+ if (!o) return;
147
133
  let a = -1;
148
134
  for (let f = 0; f < o.cells.length; f++)
149
135
  if (o.cells[f] === r) {
150
136
  a = f;
151
137
  break;
152
138
  }
153
- if (a === -1 || a === o.cells.length - 1)
154
- return;
139
+ if (a === -1 || a === o.cells.length - 1) return;
155
140
  const s = o.cells[a + 1];
156
- if (!s)
157
- return;
141
+ if (!s) return;
158
142
  const i = parseInt(r.getAttribute("colspan") || "1"), d = parseInt(s.getAttribute("colspan") || "1");
159
143
  r.setAttribute("colspan", String(i + d)), Array.from(s.childNodes).forEach((f) => {
160
144
  r.appendChild(f);
@@ -163,12 +147,10 @@ const _ = () => {
163
147
  function p() {
164
148
  var i, d, c;
165
149
  const e = window.getSelection();
166
- if (!e || e.rangeCount === 0)
167
- return null;
150
+ if (!e || e.rangeCount === 0) return null;
168
151
  const n = e.getRangeAt(0).startContainer;
169
152
  let l = n.nodeType === Node.TEXT_NODE ? (i = n.parentElement) == null ? void 0 : i.closest("table") : n.closest("table");
170
- if (!l)
171
- return null;
153
+ if (!l) return null;
172
154
  const r = l;
173
155
  let o = 0, a = 0;
174
156
  const s = n.nodeType === Node.TEXT_NODE ? (d = n.parentElement) == null ? void 0 : d.closest("td, th") : n.closest("td, th");
@@ -194,11 +176,9 @@ function p() {
194
176
  };
195
177
  }
196
178
  function g() {
197
- if (!h || !m)
198
- return;
179
+ if (!h || !m) return;
199
180
  const e = p();
200
- if (!e)
201
- return;
181
+ if (!e) return;
202
182
  const t = e.rowCount > 1, n = e.cellCount > 1;
203
183
  N(t, n);
204
184
  }
@@ -218,8 +198,7 @@ function G() {
218
198
  }, document.addEventListener("selectionchange", R), document.addEventListener("mousedown", x), document.addEventListener("tableDeleted", I), window.addEventListener("scroll", M, !0), window.addEventListener("resize", S);
219
199
  }
220
200
  function H(e) {
221
- if (!h)
222
- return;
201
+ if (!h) return;
223
202
  const t = e.getBoundingClientRect(), n = h.getBoundingClientRect(), l = n.height || 40, r = n.width || 280, o = 10;
224
203
  let a = t.top - l - o, s = t.left + t.width / 2 - r / 2;
225
204
  a < o && (a = t.bottom + o), s < o && (s = o);
@@ -246,8 +225,7 @@ function y() {
246
225
  m = null;
247
226
  }
248
227
  function N(e, t) {
249
- if (!h)
250
- return;
228
+ if (!h) return;
251
229
  const n = h.querySelector('[data-action="deleteRow"]'), l = h.querySelector('[data-action="deleteColumn"]');
252
230
  n && (n.disabled = !e), l && (l.disabled = !t);
253
231
  }
@@ -371,12 +349,10 @@ function $(e) {
371
349
  const n = e.querySelector(".table-resize-handle");
372
350
  n && n.remove();
373
351
  const l = e.querySelector("thead tr, tbody tr:first-child");
374
- if (!l)
375
- return;
352
+ if (!l) return;
376
353
  const r = l.querySelectorAll("td, th");
377
354
  r.forEach((a, s) => {
378
- if (s === r.length - 1)
379
- return;
355
+ if (s === r.length - 1) return;
380
356
  const i = document.createElement("div");
381
357
  i.className = "resize-handle", i.style.cssText = `
382
358
  position: absolute;
@@ -402,13 +378,11 @@ function $(e) {
402
378
  }), e.appendChild(o);
403
379
  }
404
380
  function ee(e, t) {
405
- if (w = !0, v = t, V = e.clientX, !m)
406
- return;
381
+ if (w = !0, v = t, V = e.clientX, !m) return;
407
382
  const n = m.querySelector("thead tr, tbody tr:first-child");
408
383
  n && n.cells[t] && (L = n.cells[t].offsetWidth), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
409
384
  const l = (o) => {
410
- if (!w || v === null || !m)
411
- return;
385
+ if (!w || v === null || !m) return;
412
386
  const a = o.clientX - V, s = Math.max(50, L + a);
413
387
  m.querySelectorAll("tr").forEach((d) => {
414
388
  d.cells[v] && (d.cells[v].style.width = s + "px");
@@ -419,12 +393,10 @@ function ee(e, t) {
419
393
  document.addEventListener("mousemove", l), document.addEventListener("mouseup", r);
420
394
  }
421
395
  function te(e) {
422
- if (!m)
423
- return;
396
+ if (!m) return;
424
397
  E = !0, k = e.clientX, A = e.clientY, B = m.offsetWidth, D = m.offsetHeight, document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none";
425
398
  const t = (l) => {
426
- if (!E || !m)
427
- return;
399
+ if (!E || !m) return;
428
400
  const r = l.clientX - k, o = l.clientY - A, a = Math.max(200, B + r), s = Math.max(100, D + o);
429
401
  m.style.width = a + "px", m.style.height = s + "px";
430
402
  }, n = () => {
@@ -520,4 +492,4 @@ export {
520
492
  F as toggleHeaderColumnCommand,
521
493
  Y as toggleHeaderRowCommand
522
494
  };
523
- //# sourceMappingURL=TablePlugin.native-7d5458c1.mjs.map
495
+ //# sourceMappingURL=TablePlugin.native-DrHX-efe.mjs.map