@editora/core 1.0.26 → 1.0.27

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.
@@ -1,8 +1,8 @@
1
1
  import { n as Z } from "./notify-DCQGpmq-.mjs";
2
2
  import { f as $, g as ee } from "./editorContainerHelpers-C7kdWnS0.mjs";
3
- let h = null, b = null, V = null, B = null, N = null, D = null, q = null;
3
+ let h = null, b = null, N = null, B = null, V = null, D = null, q = null;
4
4
  const H = '[data-theme="dark"], .dark, .editora-theme-dark';
5
- let E = !1, k = null, O = 0, P = 0, R = !1, K = 0, W = 0, _ = 0, X = 0;
5
+ let E = !1, k = null, O = 0, P = 0, R = !1, K = 0, _ = 0, W = 0, X = 0;
6
6
  const te = /* @__PURE__ */ new Set([
7
7
  "DIV",
8
8
  "P",
@@ -31,8 +31,8 @@ function Y(e) {
31
31
  const t = e.parentElement;
32
32
  if (t && t.classList.contains("rte-table-wrapper"))
33
33
  return t;
34
- const n = document.createElement("div");
35
- return n.className = "rte-table-wrapper", t == null || t.insertBefore(n, e), n.appendChild(e), n;
34
+ const n = window.getSelection(), { anchorNode: o, anchorOffset: l, focusNode: r, focusOffset: i } = n != null ? n : {}, a = !!n && !!o && !!r && (e.contains(o) || e.contains(r)), s = document.createElement("div");
35
+ return s.className = "rte-table-wrapper", t == null || t.insertBefore(s, e), s.appendChild(e), a && n && o && r && o.isConnected && r.isConnected && n.setBaseAndExtent(o, l != null ? l : 0, r, i != null ? i : 0), s;
36
36
  }
37
37
  const ne = () => {
38
38
  const e = $(), t = ee(e);
@@ -193,16 +193,17 @@ function w(e, t) {
193
193
  const n = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement;
194
194
  return n ? n.closest(t) : null;
195
195
  }
196
+ const he = ".rte-content, .editora-content";
196
197
  function M(e) {
197
198
  if (!e) return !1;
198
- const t = e.closest("[contenteditable]");
199
- return !t || t.getAttribute("contenteditable") === "false" ? !1 : !t.closest('[data-readonly="true"]');
199
+ const t = e.closest(he), n = e.closest("[contenteditable]");
200
+ return !t || !n || !t.contains(n) || n.getAttribute("contenteditable") === "false" ? !1 : !n.closest('[data-readonly="true"]');
200
201
  }
201
- function he() {
202
+ function be() {
202
203
  const e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0).startContainer : null;
203
204
  return w(t, ".rte-content") || (b ? b.closest(".rte-content") : null);
204
205
  }
205
- function be(e, t, n) {
206
+ function me(e, t, n) {
206
207
  const o = window.execEditorCommand || window.executeEditorCommand;
207
208
  if (typeof o == "function")
208
209
  try {
@@ -211,12 +212,12 @@ function be(e, t, n) {
211
212
  }
212
213
  }
213
214
  function j(e) {
214
- const t = he();
215
+ const t = be();
215
216
  if (t && !M(t)) return;
216
217
  const n = t ? t.innerHTML : "";
217
218
  if (e(), !t) return;
218
219
  const o = t.innerHTML;
219
- o !== n && (be(t, n, o), t.dispatchEvent(new Event("input", { bubbles: !0 })));
220
+ o !== n && (me(t, n, o), t.dispatchEvent(new Event("input", { bubbles: !0 })));
220
221
  }
221
222
  function G(e, t, n) {
222
223
  if (!e.isConnected || e.rows.length === 0) return;
@@ -227,7 +228,7 @@ function G(e, t, n) {
227
228
  const a = window.getSelection();
228
229
  a == null || a.removeAllRanges(), a == null || a.addRange(r);
229
230
  }
230
- const me = () => {
231
+ const fe = () => {
231
232
  const e = window.getSelection();
232
233
  if (!e || e.rangeCount === 0) return;
233
234
  const n = e.getRangeAt(0).startContainer;
@@ -290,14 +291,14 @@ function p() {
290
291
  const t = e.rowCount > 1, n = e.cellCount > 1;
291
292
  J(t, n);
292
293
  }
293
- function fe(e) {
294
+ function pe(e) {
294
295
  var o;
295
296
  const t = window.getSelection();
296
297
  if (!t) return;
297
298
  const n = document.createRange();
298
299
  ((o = e.textContent) != null ? o : "").trim() === "" ? (n.selectNodeContents(e.querySelector("p, div") || e), n.collapse(!0)) : n.selectNodeContents(e), t.removeAllRanges(), t.addRange(n);
299
300
  }
300
- function pe(e) {
301
+ function ge(e) {
301
302
  var s, d;
302
303
  if (e.key !== "Tab" || e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey) return;
303
304
  const t = window.getSelection();
@@ -310,22 +311,22 @@ function pe(e) {
310
311
  (c) => c.closest("table") === o
311
312
  ), i = r.indexOf(n);
312
313
  let a;
313
- e.shiftKey ? a = r[i - 1] : i < r.length - 1 ? a = r[i + 1] : (y("addRowBelow"), a = (d = (s = n.parentElement) == null ? void 0 : s.nextElementSibling) == null ? void 0 : d.querySelector("th, td")), a && (e.preventDefault(), fe(a));
314
+ e.shiftKey ? a = r[i - 1] : i < r.length - 1 ? a = r[i + 1] : (y("addRowBelow"), a = (d = (s = n.parentElement) == null ? void 0 : s.nextElementSibling) == null ? void 0 : d.querySelector("th, td")), a && (e.preventDefault(), pe(a));
314
315
  }
315
- function ge() {
316
- V = () => {
316
+ function we() {
317
+ N = () => {
317
318
  const e = f();
318
- e && M(e.table) ? we(e.table) : T();
319
+ e && M(e.table) ? ve(e.table) : T();
319
320
  }, B = (e) => {
320
321
  const t = w(e.target, "table"), n = w(e.target, ".table-toolbar");
321
322
  !t && !n && T();
322
- }, N = () => {
323
+ }, V = () => {
323
324
  T();
324
325
  }, D = () => {
325
326
  b && h && h.style.display !== "none" && S(b);
326
327
  }, q = () => {
327
328
  b && h && h.style.display !== "none" && S(b);
328
- }, document.addEventListener("selectionchange", V), document.addEventListener("keydown", pe), document.addEventListener("mousedown", B), document.addEventListener("tableDeleted", N), window.addEventListener("scroll", D, !0), window.addEventListener("resize", q);
329
+ }, document.addEventListener("selectionchange", N), document.addEventListener("keydown", ge), document.addEventListener("mousedown", B), document.addEventListener("tableDeleted", V), window.addEventListener("scroll", D, !0), window.addEventListener("resize", q);
329
330
  }
330
331
  function S(e) {
331
332
  if (!h) return;
@@ -337,14 +338,14 @@ function S(e) {
337
338
  const d = window.innerHeight;
338
339
  i + o > d - r && (i = d - o - r), h.style.top = i + "px", h.style.left = a + "px";
339
340
  }
340
- function we(e) {
341
- b = e, h || (h = Ce(), document.body.appendChild(h));
341
+ function ve(e) {
342
+ b = e, h || (h = ye(), document.body.appendChild(h));
342
343
  const t = !!e.closest(H) || document.body.matches(H) || document.documentElement.matches(H);
343
344
  h.classList.toggle("rte-theme-dark", t), h.style.display = "flex", h.style.visibility = "hidden", requestAnimationFrame(() => {
344
345
  S(e), h && (h.style.visibility = "visible");
345
346
  });
346
347
  const n = f();
347
- n && J(n.rowCount > 1, n.cellCount > 1), ye(e);
348
+ n && J(n.rowCount > 1, n.cellCount > 1), ke(e);
348
349
  }
349
350
  const I = /* @__PURE__ */ new Set();
350
351
  function Q() {
@@ -367,7 +368,7 @@ function J(e, t) {
367
368
  n && (n.disabled = !e), o && (o.disabled = !t);
368
369
  }
369
370
  let z = !1;
370
- function ve() {
371
+ function Ce() {
371
372
  if (z || typeof document == "undefined") return;
372
373
  if (document.getElementById("rte-table-toolbar-styles")) {
373
374
  z = !0;
@@ -530,8 +531,8 @@ function ve() {
530
531
  }
531
532
  `, document.head.appendChild(e);
532
533
  }
533
- function Ce() {
534
- ve();
534
+ function ye() {
535
+ Ce();
535
536
  const e = document.createElement("div");
536
537
  e.className = "table-toolbar", e.style.cssText = `
537
538
  position: fixed;
@@ -549,58 +550,58 @@ function Ce() {
549
550
  return u.className = "toolbar-section", c.forEach((C) => u.appendChild(C)), u;
550
551
  }, l = o(
551
552
  t({
552
- icon: xe(),
553
+ icon: He(),
553
554
  title: "Add row above (Ctrl+Shift+R)",
554
555
  action: "addRowAbove"
555
556
  }),
556
557
  t({
557
- icon: He(),
558
+ icon: Re(),
558
559
  title: "Add row below",
559
560
  action: "addRowBelow"
560
561
  }),
561
562
  t({
562
- icon: Re(),
563
+ icon: Te(),
563
564
  title: "Delete row",
564
565
  action: "deleteRow",
565
566
  danger: !0
566
567
  })
567
568
  ), r = o(
568
569
  t({
569
- icon: Te(),
570
+ icon: ze(),
570
571
  title: "Add column left",
571
572
  action: "addColumnLeft"
572
573
  }),
573
574
  t({
574
- icon: ze(),
575
+ icon: Se(),
575
576
  title: "Add column right (Ctrl+Shift+C)",
576
577
  action: "addColumnRight"
577
578
  }),
578
579
  t({
579
- icon: Se(),
580
+ icon: Ie(),
580
581
  title: "Delete column",
581
582
  action: "deleteColumn",
582
583
  danger: !0
583
584
  })
584
585
  ), i = o(
585
586
  t({
586
- icon: Ie(),
587
+ icon: Me(),
587
588
  title: "Toggle header row",
588
589
  action: "toggleHeaderRow"
589
590
  }),
590
591
  t({
591
- icon: Me(),
592
+ icon: Le(),
592
593
  title: "Toggle header column",
593
594
  action: "toggleHeaderColumn"
594
595
  })
595
596
  ), a = o(
596
597
  t({
597
- icon: Ae(),
598
+ icon: Ne(),
598
599
  title: "Merge cells (horizontally)",
599
600
  action: "mergeCells"
600
601
  })
601
602
  ), s = o(
602
603
  t({
603
- icon: Le(),
604
+ icon: Ae(),
604
605
  title: "Delete table",
605
606
  action: "deleteTable",
606
607
  delete: !0
@@ -643,12 +644,12 @@ function y(e) {
643
644
  ue();
644
645
  break;
645
646
  case "mergeCells":
646
- me();
647
+ fe();
647
648
  break;
648
649
  }
649
650
  });
650
651
  }
651
- function ye(e) {
652
+ function ke(e) {
652
653
  const t = Y(e);
653
654
  e.querySelectorAll(".resize-handle").forEach((a) => a.remove());
654
655
  const o = t.querySelector(".table-resize-handle");
@@ -674,17 +675,17 @@ function ye(e) {
674
675
  }), d.addEventListener("mouseleave", () => {
675
676
  E || (d.style.background = "transparent");
676
677
  }), d.addEventListener("mousedown", (u) => {
677
- u.preventDefault(), u.stopPropagation(), ke(u, s);
678
+ u.preventDefault(), u.stopPropagation(), Ee(u, s);
678
679
  });
679
680
  const c = a;
680
681
  c.style.position || (c.style.position = "relative", I.add(c)), a.appendChild(d);
681
682
  });
682
683
  const i = document.createElement("div");
683
684
  i.className = "table-resize-handle", i.addEventListener("mousedown", (a) => {
684
- a.preventDefault(), a.stopPropagation(), Ee(a);
685
+ a.preventDefault(), a.stopPropagation(), xe(a);
685
686
  }), t.appendChild(i);
686
687
  }
687
- function ke(e, t) {
688
+ function Ee(e, t) {
688
689
  if (E = !0, k = t, O = e.clientX, !b) return;
689
690
  const n = b.querySelector("thead tr, tbody tr:first-child");
690
691
  n && n.cells[t] && (P = n.cells[t].offsetWidth), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
@@ -699,64 +700,64 @@ function ke(e, t) {
699
700
  };
700
701
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", l);
701
702
  }
702
- function Ee(e) {
703
+ function xe(e) {
703
704
  if (!b) return;
704
- R = !0, K = e.clientX, W = e.clientY, _ = b.offsetWidth, X = b.offsetHeight, document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none";
705
+ R = !0, K = e.clientX, _ = e.clientY, W = b.offsetWidth, X = b.offsetHeight, document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none";
705
706
  const t = (o) => {
706
707
  if (!R || !b) return;
707
- const l = o.clientX - K, r = o.clientY - W, i = Math.max(200, _ + l), a = Math.max(100, X + r);
708
+ const l = o.clientX - K, r = o.clientY - _, i = Math.max(200, W + l), a = Math.max(100, X + r);
708
709
  b.style.width = i + "px", b.style.height = a + "px";
709
710
  }, n = () => {
710
711
  R = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
711
712
  };
712
713
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
713
714
  }
714
- function xe() {
715
+ function He() {
715
716
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
716
717
  <path d="M2 7h12V5H2v2zm0 4h12V9H2v2zM8 1v3H5v2h3v3h2V6h3V4h-3V1H8z"/>
717
718
  </svg>`;
718
719
  }
719
- function He() {
720
+ function Re() {
720
721
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
721
722
  <path d="M2 3h12V1H2v2zm0 4h12V5H2v2zm6 4v3h3v-2h2v-2h-2v-3h-2v3H5v2h3z"/>
722
723
  </svg>`;
723
724
  }
724
- function Re() {
725
+ function Te() {
725
726
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
726
727
  <path d="M2 5h12v2H2V5zm0 4h12v2H2V9zm4-6v2H4v2h2v2h2V7h2V5H8V3H6z"/>
727
728
  </svg>`;
728
729
  }
729
- function Te() {
730
+ function ze() {
730
731
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
731
732
  <path d="M7 2v12h2V2H7zm4 0v12h2V2h-2zM1 8h3v-3H1v3zm3 2H1v3h3v-3z"/>
732
733
  </svg>`;
733
734
  }
734
- function ze() {
735
+ function Se() {
735
736
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
736
737
  <path d="M2 2v12h2V2H2zm4 0v12h2V2H6zM12 8h3v-3h-3v3zm0 2h3v3h-3v-3z"/>
737
738
  </svg>`;
738
739
  }
739
- function Se() {
740
+ function Ie() {
740
741
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
741
742
  <path d="M5 2v12h2V2H5zm4 0v12h2V2H9zm3 2h3V1h-3v3zm3 2h-3v3h3V6zm0 4h-3v3h3v-3z"/>
742
743
  </svg>`;
743
744
  }
744
- function Ie() {
745
+ function Me() {
745
746
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
746
747
  <path d="M2 2h12v3H2V2zm0 5h12v8H2V7zm2 2v4h2V9H4zm4 0v4h2V9H8zm4 0v4h2V9h-2z"/>
747
748
  </svg>`;
748
749
  }
749
- function Me() {
750
+ function Le() {
750
751
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
751
752
  <path d="M2 2v12h3V2H2zm5 0v12h8V2H7zm2 2h4v2H9V4zm0 4h4v2H9V8zm0 4h4v2H9v-2z"/>
752
753
  </svg>`;
753
754
  }
754
- function Le() {
755
+ function Ae() {
755
756
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
756
757
  <path d="M3 1h10v1H3V1zm1 2v11h8V3H4zM6 5h1v6H6V5zm3 0h1v6H9V5z"/>
757
758
  </svg>`;
758
759
  }
759
- function Ae() {
760
+ function Ne() {
760
761
  return `<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
761
762
  <path d="M2 2h4v3H2V2zm5 0h4v3H7V2zm5 0h2v3h-2V2zm-10 4h4v3H2V6zm5 0h4v3H7V6zm5 0h2v3h-2V6zm-10 4h4v3H2v-3zm5 0h4v3H7v-3zm5 0h2v3h-2v-3z"/>
762
763
  </svg>`;
@@ -764,11 +765,11 @@ function Ae() {
764
765
  if (typeof window != "undefined" && !window.__tablePluginInitialized) {
765
766
  window.__tablePluginInitialized = !0;
766
767
  const e = () => {
767
- ge();
768
+ we();
768
769
  };
769
770
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : setTimeout(e, 100);
770
771
  }
771
- const Ne = () => ({
772
+ const De = () => ({
772
773
  name: "table",
773
774
  toolbar: [
774
775
  {
@@ -788,7 +789,7 @@ const Ne = () => ({
788
789
  }
789
790
  });
790
791
  export {
791
- Ne as TablePlugin,
792
+ De as TablePlugin,
792
793
  le as addColumnLeftCommand,
793
794
  ae as addColumnRightCommand,
794
795
  oe as addRowAboveCommand,
@@ -797,8 +798,8 @@ export {
797
798
  ie as deleteRowCommand,
798
799
  ue as deleteTableCommand,
799
800
  ne as insertTableCommand,
800
- me as mergeCellsCommand,
801
+ fe as mergeCellsCommand,
801
802
  ce as toggleHeaderColumnCommand,
802
803
  se as toggleHeaderRowCommand
803
804
  };
804
- //# sourceMappingURL=TablePlugin.native-CWxEFpV8.mjs.map
805
+ //# sourceMappingURL=TablePlugin.native-1TvjRqv1.mjs.map
package/dist/core.css CHANGED
@@ -1 +1 @@
1
- .rte-table-wrapper{position:relative}.rte-table,table{border-collapse:collapse;width:100%;margin:1rem 0;border:1px solid #ddd;font-size:14px;line-height:1.4;position:relative}.rte-table td,.rte-table th,table td,table th{border:1px solid #ddd;padding:8px 12px;min-width:80px;vertical-align:top;position:relative;user-select:none}.rte-table td:focus,.rte-table th:focus,table td:focus,table th:focus{outline:2px solid #007acc;outline-offset:-2px}.rte-table th,table th{background-color:#f8f9fa;font-weight:600;text-align:left}.rte-table td p,table td p{margin:0;padding:0}.rte-table td p:empty:before,table td p:empty:before{content:"​";display:inline-block}.rte-table td[contenteditable]:empty:before,table td[contenteditable]:empty:before{content:"Type here...";color:#999;font-style:italic;pointer-events:none}.rte-table tr:hover,table tr:hover{background-color:#f8f9fa}.rte-table td.selected,table td.selected{background-color:#e3f2fd;border-color:#2196f3}.table-toolbar{background:#fff;border:1px solid #d0d0d0;border-radius:4px;box-shadow:0 2px 8px #0000001a;padding:4px;display:flex;align-items:center;gap:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;min-width:max-content}.toolbar-section{display:flex;align-items:center;gap:2px}.toolbar-divider{width:1px;height:20px;background:#e0e0e0;margin:0 4px}.toolbar-icon-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid transparent;background:transparent;cursor:pointer;color:#333;border-radius:3px;transition:all .2s ease;flex-shrink:0;font-size:14px;line-height:1}.toolbar-icon-btn svg{width:16px;height:16px}.toolbar-icon-btn:hover:not(:disabled){background:#f0f0f0;border-color:#d0d0d0;color:#06c}.toolbar-icon-btn:active:not(:disabled){background:#e8f0ff;border-color:#06c;transform:scale(.95)}.toolbar-icon-btn:disabled{opacity:.4;cursor:not-allowed;color:#ccc}.toolbar-icon-btn-danger{color:#d32f2f}.toolbar-icon-btn-danger:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-danger:active:not(:disabled){background:#ffebee}.toolbar-icon-btn-delete{color:#d32f2f}.toolbar-icon-btn-delete:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-delete:active:not(:disabled){background:#ffebee}.resize-handle{opacity:0;transition:all .15s ease}.resize-handle:hover{opacity:1}td:hover>.resize-handle,th:hover>.resize-handle{opacity:1}.table-resize-handle{position:absolute;bottom:-4px;right:-4px;width:12px;height:12px;background:transparent;cursor:nwse-resize;z-index:10;transition:background .15s ease}.table-resize-handle:after{content:"";position:absolute;bottom:0;right:0;width:8px;height:8px;background:#0066cc4d;border-bottom:2px solid #0066cc;border-right:2px solid #0066cc;border-radius:0 0 2px;opacity:0;transition:opacity .15s ease}.table-resize-handle:hover:after{opacity:1}.rte-table:hover .table-resize-handle:after,table:hover .table-resize-handle:after{opacity:1}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table,table){border-color:#607088;background:#24303c;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td,.rte-table th,table td,table th){border-color:#607088;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table th,table th){background:linear-gradient(180deg,#3b4553,#333d4a);color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table tr:hover,table tr:hover){background-color:#58a6ff1f}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td.selected,table td.selected){background-color:#58a6ff47;border-color:#79beff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td[contenteditable]:empty:before,table td[contenteditable]:empty:before){color:#94a3b8}:is([data-theme=dark],.dark,.editora-theme-dark) .table-toolbar{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}.table-toolbar.rte-theme-dark{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-divider{background:#4d596b}.table-toolbar.rte-theme-dark .toolbar-divider{background:#4d596b}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn{color:#d7deea;border-color:transparent}.table-toolbar.rte-theme-dark .toolbar-icon-btn{color:#d7deea;border-color:transparent}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg{color:currentColor}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg{color:currentColor}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}.table-toolbar.rte-theme-dark .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}.table-toolbar.rte-theme-dark .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:disabled{color:#7f8ca1}.table-toolbar.rte-theme-dark .toolbar-icon-btn:disabled{color:#7f8ca1}@media(max-width:768px){.rte-table,table{font-size:12px}.rte-table td,.rte-table th,table td,table th{padding:4px 6px;min-width:60px}.table-toolbar{padding:3px;gap:0;max-width:90vw;overflow-x:auto}.toolbar-icon-btn{width:26px;height:26px}.toolbar-divider{height:18px}}@media print{.rte-table,table{border:1px solid #000}.rte-table td,.rte-table th,table td,table th{border:1px solid #000;padding:4px}.table-toolbar{display:none}}
1
+ .rte-table-wrapper{position:relative}.rte-table,table{border-collapse:collapse;width:100%;margin:1rem 0;border:1px solid #ddd;font-size:14px;line-height:1.4;position:relative}.rte-table td,.rte-table th,table td,table th{border:1px solid #ddd;padding:8px 12px;min-width:80px;vertical-align:top;position:relative}.rte-table td:focus,.rte-table th:focus,table td:focus,table th:focus{outline:2px solid #007acc;outline-offset:-2px}.rte-table th,table th{background-color:#f8f9fa;font-weight:600;text-align:left}.rte-table td p,table td p{margin:0;padding:0}.rte-table td p:empty:before,table td p:empty:before{content:"​";display:inline-block}.rte-table td[contenteditable]:empty:before,table td[contenteditable]:empty:before{content:"Type here...";color:#999;font-style:italic;pointer-events:none}.rte-table tr:hover,table tr:hover{background-color:#f8f9fa}.rte-table td.selected,table td.selected{background-color:#e3f2fd;border-color:#2196f3}.table-toolbar{background:#fff;border:1px solid #d0d0d0;border-radius:4px;box-shadow:0 2px 8px #0000001a;padding:4px;display:flex;align-items:center;gap:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;min-width:max-content}.toolbar-section{display:flex;align-items:center;gap:2px}.toolbar-divider{width:1px;height:20px;background:#e0e0e0;margin:0 4px}.toolbar-icon-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid transparent;background:transparent;cursor:pointer;color:#333;border-radius:3px;transition:all .2s ease;flex-shrink:0;font-size:14px;line-height:1}.toolbar-icon-btn svg{width:16px;height:16px}.toolbar-icon-btn:hover:not(:disabled){background:#f0f0f0;border-color:#d0d0d0;color:#06c}.toolbar-icon-btn:active:not(:disabled){background:#e8f0ff;border-color:#06c;transform:scale(.95)}.toolbar-icon-btn:disabled{opacity:.4;cursor:not-allowed;color:#ccc}.toolbar-icon-btn-danger{color:#d32f2f}.toolbar-icon-btn-danger:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-danger:active:not(:disabled){background:#ffebee}.toolbar-icon-btn-delete{color:#d32f2f}.toolbar-icon-btn-delete:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-delete:active:not(:disabled){background:#ffebee}.resize-handle{opacity:0;transition:all .15s ease}.resize-handle:hover{opacity:1}td:hover>.resize-handle,th:hover>.resize-handle{opacity:1}.table-resize-handle{position:absolute;bottom:-4px;right:-4px;width:12px;height:12px;background:transparent;cursor:nwse-resize;z-index:10;transition:background .15s ease}.table-resize-handle:after{content:"";position:absolute;bottom:0;right:0;width:8px;height:8px;background:#0066cc4d;border-bottom:2px solid #0066cc;border-right:2px solid #0066cc;border-radius:0 0 2px;opacity:0;transition:opacity .15s ease}.table-resize-handle:hover:after{opacity:1}.rte-table:hover .table-resize-handle:after,table:hover .table-resize-handle:after{opacity:1}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table,table){border-color:#607088;background:#24303c;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td,.rte-table th,table td,table th){border-color:#607088;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table th,table th){background:linear-gradient(180deg,#3b4553,#333d4a);color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table tr:hover,table tr:hover){background-color:#58a6ff1f}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td.selected,table td.selected){background-color:#58a6ff47;border-color:#79beff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td[contenteditable]:empty:before,table td[contenteditable]:empty:before){color:#94a3b8}:is([data-theme=dark],.dark,.editora-theme-dark) .table-toolbar{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}.table-toolbar.rte-theme-dark{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-divider{background:#4d596b}.table-toolbar.rte-theme-dark .toolbar-divider{background:#4d596b}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn{color:#d7deea;border-color:transparent}.table-toolbar.rte-theme-dark .toolbar-icon-btn{color:#d7deea;border-color:transparent}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg{color:currentColor}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg{color:currentColor}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}.table-toolbar.rte-theme-dark .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}.table-toolbar.rte-theme-dark .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:disabled{color:#7f8ca1}.table-toolbar.rte-theme-dark .toolbar-icon-btn:disabled{color:#7f8ca1}@media(max-width:768px){.rte-table,table{font-size:12px}.rte-table td,.rte-table th,table td,table th{padding:4px 6px;min-width:60px}.table-toolbar{padding:3px;gap:0;max-width:90vw;overflow-x:auto}.toolbar-icon-btn{width:26px;height:26px}.toolbar-divider{height:18px}}@media print{.rte-table,table{border:1px solid #000}.rte-table td,.rte-table th,table td,table th{border:1px solid #000;padding:4px}.table-toolbar{display:none}}
@@ -14,7 +14,7 @@ const r = {
14
14
  lineHeight: () => import("./LineHeightPlugin.native-CM7iXdQj.mjs").then((n) => n.LineHeightPlugin()),
15
15
  capitalization: () => import("./CapitalizationPlugin.native-Mh-kUy-x.mjs").then((n) => n.CapitalizationPlugin()),
16
16
  link: () => import("./LinkPlugin.native-Dt_p6Ukb.mjs").then((n) => n.LinkPlugin()),
17
- table: () => import("./TablePlugin.native-CWxEFpV8.mjs").then((n) => n.TablePlugin()),
17
+ table: () => import("./TablePlugin.native-1TvjRqv1.mjs").then((n) => n.TablePlugin()),
18
18
  trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((n) => n.TrackChangesPlugin()),
19
19
  versionDiff: () => import("./VersionDiffPlugin.native-DJZIzFSK.mjs").then((n) => n.VersionDiffPlugin()),
20
20
  "version-diff": () => import("./VersionDiffPlugin.native-DJZIzFSK.mjs").then((n) => n.VersionDiffPlugin()),