@editora/core 1.0.2 → 1.0.4

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 (133) hide show
  1. package/README.md +42 -4
  2. package/dist/{A11yCheckerPlugin.native-CZKpi3uF.mjs → A11yCheckerPlugin.native-BRdGYMju.mjs} +225 -173
  3. package/dist/AnchorPlugin.native-C1Rw5m04.mjs +404 -0
  4. package/dist/BackgroundColorPlugin.native-BE-p9DRd.mjs +489 -0
  5. package/dist/ChecklistPlugin.native-nuSSEFNI.mjs +309 -0
  6. package/dist/ClearFormattingPlugin.native-Bq_XcTh2.mjs +140 -0
  7. package/dist/CodePlugin.native-0Zari_zp.mjs +2041 -0
  8. package/dist/CodeSamplePlugin.native-B-KS1pOl.mjs +384 -0
  9. package/dist/CommentsPlugin.native-tMnWn8a2.mjs +723 -0
  10. package/dist/DirectionPlugin.native-CDnbdNyl.mjs +130 -0
  11. package/dist/{EmbedIframePlugin.native-ifr9KLdN.mjs → EmbedIframePlugin.native-CSWIB1jm.mjs} +154 -50
  12. package/dist/{EmojisPlugin.native-D6mJSnSR.mjs → EmojisPlugin.native-DxTm_DL-.mjs} +156 -103
  13. package/dist/FontFamilyPlugin.native-j8hMTbg4.mjs +158 -0
  14. package/dist/FontSizePlugin.native-B_jCh7dY.mjs +286 -0
  15. package/dist/FootnotePlugin.native-D730OGRm.mjs +425 -0
  16. package/dist/HistoryPlugin.native-DCrPdeSW.mjs +257 -0
  17. package/dist/IndentPlugin.native-BHixp8sP.mjs +150 -0
  18. package/dist/LineHeightPlugin.native-CM7iXdQj.mjs +151 -0
  19. package/dist/{LinkPlugin.native-BdAOV-iu.mjs → LinkPlugin.native-CS2g-G18.mjs} +128 -53
  20. package/dist/{ListPlugin.native-CLFU5AUQ.mjs → ListPlugin.native-V7EZC1lM.mjs} +59 -12
  21. package/dist/MathPlugin.native-KUxz0o8C.mjs +251 -0
  22. package/dist/MediaManagerPlugin.native-CgP5iInD.mjs +970 -0
  23. package/dist/MergeTagPlugin.native-CU9LtsfD.mjs +416 -0
  24. package/dist/PageBreakPlugin.native-CGiQxXqR.mjs +297 -0
  25. package/dist/{PrintPlugin.native-BUpm52VJ.mjs → PrintPlugin.native-7qt5v7L5.mjs} +10 -10
  26. package/dist/{SpecialCharactersPlugin.native-x7a2SWXc.mjs → SpecialCharactersPlugin.native-DANrbExJ.mjs} +143 -97
  27. package/dist/SpellCheckPlugin.native-C8bPvRHy.mjs +1019 -0
  28. package/dist/StrikethroughPlugin.native-0Be7j49s.mjs +73 -0
  29. package/dist/{TablePlugin.native-EEWXn1-s.mjs → TablePlugin.native-DrHX-efe.mjs} +149 -145
  30. package/dist/TemplatePlugin.native-4lKEm-WY.mjs +578 -0
  31. package/dist/TextAlignmentPlugin.native-sM_1s00t.mjs +108 -0
  32. package/dist/{TextColorPlugin.native-D6SmTglm.mjs → TextColorPlugin.native-Clgtb50j.mjs} +173 -92
  33. package/dist/colorSelectionApply-CK1My9N2.mjs +67 -0
  34. package/dist/core.css +1 -1
  35. package/dist/editora.min.js +31 -29
  36. package/dist/editora.umd.js +31 -29
  37. package/dist/index-CqWQFb3D.js +10 -0
  38. package/dist/index-OwnkG39N.mjs +2227 -0
  39. package/dist/index.cjs.js +14 -18
  40. package/dist/index.esm.js +204 -521
  41. package/dist/plugin-loader.js +26 -26
  42. package/dist/webcomponent-core.js +1286 -295
  43. package/dist/webcomponent-core.min.css +1 -1
  44. package/dist/webcomponent-core.min.js +116 -106
  45. package/dist/webcomponent.cjs.js +1 -1
  46. package/dist/webcomponent.esm.js +1 -1
  47. package/dist/webcomponent.js +1252 -261
  48. package/dist/webcomponent.min.css +1 -1
  49. package/dist/webcomponent.min.js +2980 -1488
  50. package/index.d.ts +355 -0
  51. package/package.json +21 -19
  52. package/LICENSE +0 -21
  53. package/dist/A11yCheckerPlugin.native-CZKpi3uF.mjs.map +0 -1
  54. package/dist/AnchorPlugin.native-7es9PVZ9.mjs +0 -340
  55. package/dist/AnchorPlugin.native-7es9PVZ9.mjs.map +0 -1
  56. package/dist/BackgroundColorPlugin.native-Dip5uqTg.mjs +0 -449
  57. package/dist/BackgroundColorPlugin.native-Dip5uqTg.mjs.map +0 -1
  58. package/dist/BlockquotePlugin.native-JFmOLsxN.mjs.map +0 -1
  59. package/dist/BoldPlugin.native-BAzzoqU5.mjs.map +0 -1
  60. package/dist/CapitalizationPlugin.native-DOMsh5R7.mjs.map +0 -1
  61. package/dist/ChecklistPlugin.native-Dccs3nLe.mjs +0 -153
  62. package/dist/ChecklistPlugin.native-Dccs3nLe.mjs.map +0 -1
  63. package/dist/ClearFormattingPlugin.native-BZPDHswo.mjs +0 -27
  64. package/dist/ClearFormattingPlugin.native-BZPDHswo.mjs.map +0 -1
  65. package/dist/CodePlugin.native-DD9xFIid.mjs +0 -1679
  66. package/dist/CodePlugin.native-DD9xFIid.mjs.map +0 -1
  67. package/dist/CodeSamplePlugin.native-DMbEdO9j.mjs +0 -326
  68. package/dist/CodeSamplePlugin.native-DMbEdO9j.mjs.map +0 -1
  69. package/dist/CommentsPlugin.native-2zQV8Ia4.mjs +0 -473
  70. package/dist/CommentsPlugin.native-2zQV8Ia4.mjs.map +0 -1
  71. package/dist/DirectionPlugin.native-Be7wCzkI.mjs +0 -59
  72. package/dist/DirectionPlugin.native-Be7wCzkI.mjs.map +0 -1
  73. package/dist/DocumentManagerPlugin.native-BvZL5CSG.mjs.map +0 -1
  74. package/dist/EmbedIframePlugin.native-ifr9KLdN.mjs.map +0 -1
  75. package/dist/EmojisPlugin.native-D6mJSnSR.mjs.map +0 -1
  76. package/dist/FontFamilyPlugin.native-BzS_9qbM.mjs +0 -106
  77. package/dist/FontFamilyPlugin.native-BzS_9qbM.mjs.map +0 -1
  78. package/dist/FontSizePlugin.native-DkLMLPue.mjs +0 -186
  79. package/dist/FontSizePlugin.native-DkLMLPue.mjs.map +0 -1
  80. package/dist/FootnotePlugin.native-BciVc9W6.mjs +0 -128
  81. package/dist/FootnotePlugin.native-BciVc9W6.mjs.map +0 -1
  82. package/dist/FullscreenPlugin.native-ChXyxeNw.mjs.map +0 -1
  83. package/dist/HeadingPlugin.native-DrLYwQnQ.mjs.map +0 -1
  84. package/dist/HistoryPlugin.native-DoDRifCf.mjs +0 -89
  85. package/dist/HistoryPlugin.native-DoDRifCf.mjs.map +0 -1
  86. package/dist/IndentPlugin.native-CbFugPoi.mjs +0 -133
  87. package/dist/IndentPlugin.native-CbFugPoi.mjs.map +0 -1
  88. package/dist/ItalicPlugin.native-CQjjDyUL.mjs.map +0 -1
  89. package/dist/LineHeightPlugin.native-CWQT2FIa.mjs +0 -73
  90. package/dist/LineHeightPlugin.native-CWQT2FIa.mjs.map +0 -1
  91. package/dist/LinkPlugin.native-BdAOV-iu.mjs.map +0 -1
  92. package/dist/ListPlugin.native-CLFU5AUQ.mjs.map +0 -1
  93. package/dist/MathPlugin.native-DE_ii-LA.mjs +0 -182
  94. package/dist/MathPlugin.native-DE_ii-LA.mjs.map +0 -1
  95. package/dist/MediaManagerPlugin.native-DaYFDzNM.mjs +0 -533
  96. package/dist/MediaManagerPlugin.native-DaYFDzNM.mjs.map +0 -1
  97. package/dist/MergeTagPlugin.native-CrxyThyn.mjs +0 -178
  98. package/dist/MergeTagPlugin.native-CrxyThyn.mjs.map +0 -1
  99. package/dist/PageBreakPlugin.native-DDjcDyRW.mjs +0 -172
  100. package/dist/PageBreakPlugin.native-DDjcDyRW.mjs.map +0 -1
  101. package/dist/PreviewPlugin.native-DBvfpmIv.mjs.map +0 -1
  102. package/dist/PrintPlugin.native-BUpm52VJ.mjs.map +0 -1
  103. package/dist/SpecialCharactersPlugin.native-x7a2SWXc.mjs.map +0 -1
  104. package/dist/SpellCheckPlugin.native-B7yTh0iE.mjs +0 -465
  105. package/dist/SpellCheckPlugin.native-B7yTh0iE.mjs.map +0 -1
  106. package/dist/StrikethroughPlugin.native-ChaZLaXw.mjs +0 -43
  107. package/dist/StrikethroughPlugin.native-ChaZLaXw.mjs.map +0 -1
  108. package/dist/TablePlugin.native-EEWXn1-s.mjs.map +0 -1
  109. package/dist/TemplatePlugin.native-BlSn1c9h.mjs +0 -564
  110. package/dist/TemplatePlugin.native-BlSn1c9h.mjs.map +0 -1
  111. package/dist/TextAlignmentPlugin.native-CQIs1m7R.mjs +0 -97
  112. package/dist/TextAlignmentPlugin.native-CQIs1m7R.mjs.map +0 -1
  113. package/dist/TextColorPlugin.native-D6SmTglm.mjs.map +0 -1
  114. package/dist/UnderlinePlugin.native-QpIcK4L2.mjs.map +0 -1
  115. package/dist/documentManager-irzj9n3V.mjs.map +0 -1
  116. package/dist/editorContainerHelpers-C7kdWnS0.mjs.map +0 -1
  117. package/dist/editora.min.js.map +0 -1
  118. package/dist/editora.umd.js.map +0 -1
  119. package/dist/index-BF5RBhL9.js +0 -4
  120. package/dist/index-BF5RBhL9.js.map +0 -1
  121. package/dist/index-BPsf460l.mjs +0 -1243
  122. package/dist/index-BPsf460l.mjs.map +0 -1
  123. package/dist/index.cjs.js.map +0 -1
  124. package/dist/index.es-CuicffkQ.mjs.map +0 -1
  125. package/dist/index.esm.js.map +0 -1
  126. package/dist/plugin-loader.js.map +0 -1
  127. package/dist/purify.es-CKpwg8Tk.mjs.map +0 -1
  128. package/dist/webcomponent-core.js.map +0 -1
  129. package/dist/webcomponent-core.min.js.map +0 -1
  130. package/dist/webcomponent.cjs.js.map +0 -1
  131. package/dist/webcomponent.esm.js.map +0 -1
  132. package/dist/webcomponent.js.map +0 -1
  133. package/dist/webcomponent.min.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const h = {
1
+ const u = {
2
2
  all: {
3
3
  name: "All",
4
4
  characters: [
@@ -438,35 +438,72 @@ const h = {
438
438
  "↓": "down arrow",
439
439
  "↔": "left right arrow"
440
440
  };
441
- let u = !1;
442
- const m = () => {
441
+ let g = !1;
442
+ const x = '[data-theme="dark"], .dark, .editora-theme-dark', m = () => {
443
+ const a = window.getSelection();
444
+ if (!a || a.rangeCount === 0) return null;
445
+ const e = a.anchorNode, r = e instanceof HTMLElement ? e : e == null ? void 0 : e.parentElement;
446
+ return (r == null ? void 0 : r.closest(".rte-content, .editora-content")) || null;
447
+ }, v = (a) => {
448
+ const e = a || m();
449
+ return e ? !!e.closest(x) : !1;
450
+ }, y = () => {
443
451
  if (typeof document == "undefined") return;
444
- const c = "special-characters-plugin-styles";
445
- if (document.getElementById(c)) return;
446
- const a = document.createElement("style");
447
- a.id = c, a.textContent = `
452
+ const a = "special-characters-plugin-styles";
453
+ if (document.getElementById(a)) return;
454
+ const e = document.createElement("style");
455
+ e.id = a, e.textContent = `
448
456
  .special-characters-overlay {
457
+ --rte-sc-overlay-bg: rgba(15, 23, 36, 0.56);
458
+ --rte-sc-dialog-bg: #ffffff;
459
+ --rte-sc-dialog-text: #101828;
460
+ --rte-sc-border: #d6dbe4;
461
+ --rte-sc-subtle-bg: #f7f9fc;
462
+ --rte-sc-subtle-hover: #eef2f7;
463
+ --rte-sc-muted-text: #5f6b7d;
464
+ --rte-sc-accent: #1f75fe;
465
+ --rte-sc-accent-strong: #165fd6;
466
+ --rte-sc-ring: rgba(31, 117, 254, 0.18);
449
467
  position: fixed;
450
468
  top: 0;
451
469
  left: 0;
452
470
  right: 0;
453
471
  bottom: 0;
454
- background-color: rgba(0, 0, 0, 0.5);
472
+ background-color: var(--rte-sc-overlay-bg);
473
+ backdrop-filter: blur(2px);
455
474
  display: flex;
456
475
  align-items: center;
457
476
  justify-content: center;
458
477
  z-index: 10000;
478
+ padding: 16px;
479
+ box-sizing: border-box;
480
+ }
481
+
482
+ .special-characters-overlay.rte-ui-theme-dark {
483
+ --rte-sc-overlay-bg: rgba(2, 8, 20, 0.72);
484
+ --rte-sc-dialog-bg: #202938;
485
+ --rte-sc-dialog-text: #e8effc;
486
+ --rte-sc-border: #49566c;
487
+ --rte-sc-subtle-bg: #2a3444;
488
+ --rte-sc-subtle-hover: #344256;
489
+ --rte-sc-muted-text: #a5b1c5;
490
+ --rte-sc-accent: #58a6ff;
491
+ --rte-sc-accent-strong: #4598f4;
492
+ --rte-sc-ring: rgba(88, 166, 255, 0.22);
459
493
  }
460
494
 
461
495
  .special-characters-dialog {
462
- background: white;
463
- border-radius: 8px;
464
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
496
+ background: var(--rte-sc-dialog-bg);
497
+ color: var(--rte-sc-dialog-text);
498
+ border: 1px solid var(--rte-sc-border);
499
+ border-radius: 12px;
500
+ box-shadow: 0 24px 48px rgba(10, 15, 24, 0.28);
465
501
  max-width: 800px;
466
502
  width: 90%;
467
503
  max-height: 80vh;
468
504
  display: flex;
469
505
  flex-direction: column;
506
+ overflow: hidden;
470
507
  }
471
508
 
472
509
  .special-characters-header {
@@ -474,14 +511,15 @@ const m = () => {
474
511
  justify-content: space-between;
475
512
  align-items: center;
476
513
  padding: 16px 20px;
477
- border-bottom: 1px solid #e1e5e9;
514
+ border-bottom: 1px solid var(--rte-sc-border);
515
+ background: linear-gradient(180deg, rgba(127, 154, 195, 0.08) 0%, rgba(127, 154, 195, 0) 100%);
478
516
  }
479
517
 
480
518
  .special-characters-header h2 {
481
519
  margin: 0;
482
520
  font-size: 18px;
483
521
  font-weight: 600;
484
- color: #1a202c;
522
+ color: var(--rte-sc-dialog-text);
485
523
  }
486
524
 
487
525
  .special-characters-close {
@@ -489,19 +527,20 @@ const m = () => {
489
527
  border: none;
490
528
  font-size: 24px;
491
529
  cursor: pointer;
492
- color: #718096;
530
+ color: var(--rte-sc-muted-text);
493
531
  padding: 0;
494
532
  width: 32px;
495
533
  height: 32px;
496
534
  display: flex;
497
535
  align-items: center;
498
536
  justify-content: center;
499
- border-radius: 4px;
537
+ border-radius: 8px;
538
+ transition: background-color 0.16s ease, color 0.16s ease;
500
539
  }
501
540
 
502
541
  .special-characters-close:hover {
503
- background-color: #f7fafc;
504
- color: #2d3748;
542
+ background-color: var(--rte-sc-subtle-hover);
543
+ color: var(--rte-sc-dialog-text);
505
544
  }
506
545
 
507
546
  .special-characters-content {
@@ -524,27 +563,31 @@ const m = () => {
524
563
  .special-characters-search-input {
525
564
  width: 100%;
526
565
  padding: 10px 12px;
527
- border: 1px solid #e1e5e9;
528
- border-radius: 6px;
566
+ border: 1px solid var(--rte-sc-border);
567
+ border-radius: 8px;
529
568
  font-size: 14px;
530
- color: #2d3748;
531
- background-color: #ffffff;
569
+ color: var(--rte-sc-dialog-text);
570
+ background-color: var(--rte-sc-subtle-bg);
532
571
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
533
572
  box-sizing: border-box;
534
573
  }
535
574
 
575
+ .special-characters-search-input::placeholder {
576
+ color: var(--rte-sc-muted-text);
577
+ }
578
+
536
579
  .special-characters-search-input:focus {
537
580
  outline: none;
538
- border-color: #4299e1;
539
- box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
581
+ border-color: var(--rte-sc-accent);
582
+ box-shadow: 0 0 0 3px var(--rte-sc-ring);
540
583
  }
541
584
 
542
585
  .special-characters-tabs {
543
586
  display: flex;
544
587
  flex-direction: column;
545
588
  width: 180px;
546
- border-right: 1px solid #e1e5e9;
547
- background-color: #f8fafc;
589
+ border-right: 1px solid var(--rte-sc-border);
590
+ background-color: var(--rte-sc-subtle-bg);
548
591
  }
549
592
 
550
593
  .special-characters-tab {
@@ -554,19 +597,19 @@ const m = () => {
554
597
  text-align: left;
555
598
  cursor: pointer;
556
599
  font-size: 14px;
557
- color: #4a5568;
558
- border-bottom: 1px solid #e1e5e9;
600
+ color: var(--rte-sc-muted-text);
601
+ border-bottom: 1px solid var(--rte-sc-border);
559
602
  transition: all 0.2s ease;
560
603
  }
561
604
 
562
605
  .special-characters-tab:hover {
563
- background-color: #edf2f7;
564
- color: #2d3748;
606
+ background-color: var(--rte-sc-subtle-hover);
607
+ color: var(--rte-sc-dialog-text);
565
608
  }
566
609
 
567
610
  .special-characters-tab.active {
568
- background-color: #4299e1;
569
- color: white;
611
+ background-color: var(--rte-sc-accent);
612
+ color: #fff;
570
613
  font-weight: 500;
571
614
  }
572
615
 
@@ -584,19 +627,19 @@ const m = () => {
584
627
  display: flex;
585
628
  align-items: center;
586
629
  justify-content: center;
587
- border: 1px solid #e1e5e9;
588
- background: white;
589
- border-radius: 4px;
630
+ border: 1px solid var(--rte-sc-border);
631
+ background: var(--rte-sc-subtle-bg);
632
+ border-radius: 8px;
590
633
  cursor: pointer;
591
634
  font-size: 18px;
592
635
  transition: all 0.2s ease;
593
- color: #2d3748;
636
+ color: var(--rte-sc-dialog-text);
594
637
  }
595
638
 
596
639
  .special-characters-item:hover {
597
- background-color: #4299e1;
598
- border-color: #4299e1;
599
- color: white;
640
+ background-color: var(--rte-sc-accent);
641
+ border-color: var(--rte-sc-accent);
642
+ color: #fff;
600
643
  transform: scale(1.05);
601
644
  }
602
645
 
@@ -607,12 +650,12 @@ const m = () => {
607
650
  .special-characters-no-results {
608
651
  grid-column: 1 / -1;
609
652
  text-align: center;
610
- color: #718096;
653
+ color: var(--rte-sc-muted-text);
611
654
  font-size: 14px;
612
655
  padding: 40px 20px;
613
- background-color: #f8fafc;
614
- border-radius: 6px;
615
- border: 1px solid #e1e5e9;
656
+ background-color: var(--rte-sc-subtle-bg);
657
+ border-radius: 8px;
658
+ border: 1px solid var(--rte-sc-border);
616
659
  }
617
660
 
618
661
  @media (max-width: 768px) {
@@ -628,92 +671,92 @@ const m = () => {
628
671
  .special-characters-tabs {
629
672
  width: 100%;
630
673
  border-right: none;
631
- border-bottom: 1px solid #e1e5e9;
674
+ border-bottom: 1px solid var(--rte-sc-border);
632
675
  flex-direction: row;
633
676
  overflow-x: auto;
634
677
  }
635
678
 
636
679
  .special-characters-tab {
637
680
  border-bottom: none;
638
- border-right: 1px solid #e1e5e9;
681
+ border-right: 1px solid var(--rte-sc-border);
639
682
  white-space: nowrap;
640
683
  }
641
684
  }
642
- `, document.head.appendChild(a);
643
- }, x = (c) => {
644
- const a = window.getSelection();
645
- if (a && a.rangeCount > 0) {
646
- const t = a.getRangeAt(0);
647
- t.deleteContents();
648
- const r = document.createTextNode(c);
649
- t.insertNode(r), t.setStartAfter(r), t.setEndAfter(r), a.removeAllRanges(), a.addRange(t);
685
+ `, document.head.appendChild(e);
686
+ }, w = (a) => {
687
+ const e = window.getSelection();
688
+ if (e && e.rangeCount > 0) {
689
+ const r = e.getRangeAt(0);
690
+ r.deleteContents();
691
+ const c = document.createTextNode(a);
692
+ r.insertNode(c), r.setStartAfter(c), r.setEndAfter(c), e.removeAllRanges(), e.addRange(r);
650
693
  }
651
- }, b = () => {
652
- if (typeof window == "undefined" || u) return;
653
- u = !0, m();
654
- let c = "all", a = "";
655
- const t = document.createElement("div");
656
- t.className = "special-characters-overlay";
657
- const r = document.createElement("div");
658
- r.className = "special-characters-dialog";
659
- const l = () => {
660
- const o = h[c].characters.filter((e) => {
661
- if (!a.trim()) return !0;
662
- const s = a.toLowerCase();
663
- return e.toLowerCase().includes(s) || (f[e] || "").toLowerCase().includes(s);
694
+ }, k = (a) => {
695
+ if (typeof window == "undefined" || g) return;
696
+ g = !0, y();
697
+ let e = "all", r = "";
698
+ const c = document.createElement("div");
699
+ c.className = "special-characters-overlay", v(a) && c.classList.add("rte-ui-theme-dark");
700
+ const s = document.createElement("div");
701
+ s.className = "special-characters-dialog", s.setAttribute("role", "dialog"), s.setAttribute("aria-modal", "true");
702
+ const d = () => {
703
+ const o = u[e].characters.filter((t) => {
704
+ if (!r.trim()) return !0;
705
+ const i = r.toLowerCase();
706
+ return t.toLowerCase().includes(i) || (f[t] || "").toLowerCase().includes(i);
664
707
  });
665
- r.innerHTML = `
708
+ s.innerHTML = `
666
709
  <div class="special-characters-header">
667
710
  <h2>Insert Special Characters</h2>
668
711
  <button class="special-characters-close">×</button>
669
712
  </div>
670
713
  <div class="special-characters-content">
671
714
  <div class="special-characters-tabs">
672
- ${Object.keys(h).map((e) => `
673
- <button class="special-characters-tab ${c === e ? "active" : ""}" data-category="${e}">
674
- ${h[e].name}
715
+ ${Object.keys(u).map((t) => `
716
+ <button class="special-characters-tab ${e === t ? "active" : ""}" data-category="${t}">
717
+ ${u[t].name}
675
718
  </button>
676
719
  `).join("")}
677
720
  </div>
678
721
  <div class="special-characters-main-content">
679
722
  <div class="special-characters-search">
680
- <input type="text" placeholder="Search characters..." value="${a}" class="special-characters-search-input">
723
+ <input type="text" placeholder="Search characters..." value="${r}" class="special-characters-search-input">
681
724
  </div>
682
725
  <div class="special-characters-grid">
683
- ${o.length > 0 ? o.map((e) => `
684
- <button class="special-characters-item" data-char="${e}" title="${f[e] || e}">
685
- ${e}
726
+ ${o.length > 0 ? o.map((t) => `
727
+ <button class="special-characters-item" data-char="${t}" title="${f[t] || t}">
728
+ ${t}
686
729
  </button>
687
- `).join("") : `<div class="special-characters-no-results">No characters found for "${a}"</div>`}
730
+ `).join("") : `<div class="special-characters-no-results">No characters found for "${r}"</div>`}
688
731
  </div>
689
732
  </div>
690
733
  </div>
691
734
  `;
692
- const d = r.querySelector(".special-characters-close");
693
- d == null || d.addEventListener("click", n), r.querySelectorAll(".special-characters-tab").forEach((e) => {
694
- e.addEventListener("click", (s) => {
695
- const i = s.target.getAttribute("data-category");
696
- i && (c = i, l());
735
+ const p = s.querySelector(".special-characters-close");
736
+ p == null || p.addEventListener("click", l), s.querySelectorAll(".special-characters-tab").forEach((t) => {
737
+ t.addEventListener("click", (i) => {
738
+ const n = i.target.getAttribute("data-category");
739
+ n && (e = n, d());
697
740
  });
698
741
  });
699
- const p = r.querySelector(".special-characters-search-input");
700
- p == null || p.addEventListener("input", (e) => {
701
- a = e.target.value, l();
702
- }), r.querySelectorAll(".special-characters-item").forEach((e) => {
703
- e.addEventListener("click", (s) => {
704
- const i = s.target.getAttribute("data-char");
705
- i && (x(i), n());
742
+ const h = s.querySelector(".special-characters-search-input");
743
+ h == null || h.addEventListener("input", (t) => {
744
+ r = t.target.value, d();
745
+ }), s.querySelectorAll(".special-characters-item").forEach((t) => {
746
+ t.addEventListener("click", (i) => {
747
+ const n = i.target.getAttribute("data-char");
748
+ n && (w(n), l());
706
749
  });
707
750
  });
708
- }, n = () => {
709
- t.parentNode && t.parentNode.removeChild(t), u = !1, document.removeEventListener("keydown", g);
710
- }, g = (o) => {
711
- o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), n());
751
+ }, l = () => {
752
+ c.parentNode && c.parentNode.removeChild(c), g = !1, document.removeEventListener("keydown", b);
753
+ }, b = (o) => {
754
+ o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), l());
712
755
  };
713
- t.addEventListener("click", (o) => {
714
- o.target === t && n();
715
- }), document.addEventListener("keydown", g), l(), t.appendChild(r), document.body.appendChild(t);
716
- }, v = () => ({
756
+ c.addEventListener("click", (o) => {
757
+ o.target === c && l();
758
+ }), document.addEventListener("keydown", b), d(), c.appendChild(s), document.body.appendChild(c);
759
+ }, C = () => ({
717
760
  name: "specialCharacters",
718
761
  toolbar: [{
719
762
  label: "Special Characters",
@@ -721,11 +764,14 @@ const m = () => {
721
764
  icon: '<svg width="24" height="24" focusable="false"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"></path></svg>'
722
765
  }],
723
766
  commands: {
724
- insertSpecialCharacter: () => (b(), !0)
767
+ insertSpecialCharacter: (a, e) => {
768
+ const r = (e == null ? void 0 : e.contentElement) instanceof HTMLElement ? e.contentElement : m();
769
+ return k(r), !0;
770
+ }
725
771
  },
726
772
  keymap: {}
727
773
  });
728
774
  export {
729
- v as SpecialCharactersPlugin
775
+ C as SpecialCharactersPlugin
730
776
  };
731
- //# sourceMappingURL=SpecialCharactersPlugin.native-x7a2SWXc.mjs.map
777
+ //# sourceMappingURL=SpecialCharactersPlugin.native-DANrbExJ.mjs.map