@editora/plugins 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 (105) hide show
  1. package/README.md +30 -5
  2. package/dist/a11y-checker.cjs.js +109 -0
  3. package/dist/a11y-checker.esm.js +509 -0
  4. package/dist/anchor.cjs.js +176 -0
  5. package/dist/anchor.esm.js +400 -0
  6. package/dist/background-color.cjs.js +218 -0
  7. package/dist/background-color.esm.js +482 -0
  8. package/dist/blockquote.cjs.js +1 -0
  9. package/dist/blockquote.esm.js +47 -0
  10. package/dist/bold.cjs.js +1 -0
  11. package/dist/bold.esm.js +44 -0
  12. package/dist/capitalization.cjs.js +1 -0
  13. package/dist/capitalization.esm.js +78 -0
  14. package/dist/checklist.cjs.js +1 -0
  15. package/dist/checklist.esm.js +305 -0
  16. package/dist/clear-formatting.cjs.js +1 -0
  17. package/dist/clear-formatting.esm.js +138 -0
  18. package/dist/code-sample.cjs.js +161 -0
  19. package/dist/code-sample.esm.js +381 -0
  20. package/dist/code.cjs.js +598 -0
  21. package/dist/code.esm.js +2034 -0
  22. package/dist/colorSelectionApply-C0iOfMWb.js +1 -0
  23. package/dist/colorSelectionApply-D8r_gV32.mjs +63 -0
  24. package/dist/comments.cjs.js +354 -0
  25. package/dist/comments.esm.js +692 -0
  26. package/dist/direction.cjs.js +1 -0
  27. package/dist/direction.esm.js +129 -0
  28. package/dist/document-manager.cjs.js +1 -0
  29. package/dist/document-manager.esm.js +6 -0
  30. package/dist/{documentManager-CYC9totK.mjs → documentManager-DRUc1-Cs.mjs} +3 -3
  31. package/dist/{documentManager-BGlu3WRB.js → documentManager-_tQQfQi9.js} +3 -3
  32. package/dist/editorContainerHelpers-C7kdWnS0.mjs +26 -0
  33. package/dist/editorContainerHelpers-CFbfiOJI.js +1 -0
  34. package/dist/embed-iframe.cjs.js +361 -0
  35. package/dist/embed-iframe.esm.js +556 -0
  36. package/dist/emojis.cjs.js +284 -0
  37. package/dist/emojis.esm.js +1080 -0
  38. package/dist/font-family.cjs.js +1 -0
  39. package/dist/font-family.esm.js +152 -0
  40. package/dist/font-size.cjs.js +1 -0
  41. package/dist/font-size.esm.js +278 -0
  42. package/dist/footnote.cjs.js +85 -0
  43. package/dist/footnote.esm.js +397 -0
  44. package/dist/fullscreen.cjs.js +1 -0
  45. package/dist/fullscreen.esm.js +73 -0
  46. package/dist/heading.cjs.js +1 -0
  47. package/dist/heading.esm.js +63 -0
  48. package/dist/history.cjs.js +1 -0
  49. package/dist/history.esm.js +246 -0
  50. package/dist/indent.cjs.js +1 -0
  51. package/dist/indent.esm.js +146 -0
  52. package/dist/index-Bskk414V.mjs +145 -0
  53. package/dist/index-D3pJyAsj.js +1 -0
  54. package/dist/index.cjs.js +1 -1
  55. package/dist/{index.es-B-to-4j4.js → index.es-Cz1qItab.js} +1 -1
  56. package/dist/{index.es-BbXJ7tyO.mjs → index.es-DEcRmSTY.mjs} +1 -1
  57. package/dist/index.esm.js +89 -49
  58. package/dist/italic.cjs.js +1 -0
  59. package/dist/italic.esm.js +40 -0
  60. package/dist/line-height.cjs.js +1 -0
  61. package/dist/line-height.esm.js +145 -0
  62. package/dist/link.cjs.js +138 -0
  63. package/dist/link.esm.js +276 -0
  64. package/dist/list.cjs.js +1 -0
  65. package/dist/list.esm.js +102 -0
  66. package/dist/lite.cjs.js +1 -0
  67. package/dist/lite.esm.js +61 -0
  68. package/dist/math.cjs.js +45 -0
  69. package/dist/math.esm.js +249 -0
  70. package/dist/media-manager.cjs.js +619 -0
  71. package/dist/media-manager.esm.js +994 -0
  72. package/dist/merge-tag.cjs.js +93 -0
  73. package/dist/merge-tag.esm.js +412 -0
  74. package/dist/page-break.cjs.js +72 -0
  75. package/dist/page-break.esm.js +295 -0
  76. package/dist/plugins.css +1 -1
  77. package/dist/preview.cjs.js +230 -0
  78. package/dist/preview.esm.js +321 -0
  79. package/dist/print.cjs.js +254 -0
  80. package/dist/print.esm.js +309 -0
  81. package/dist/purify.es-DHhaBdbu.mjs +470 -0
  82. package/dist/purify.es-T2a3nLiC.js +3 -0
  83. package/dist/shared-config.cjs.js +1 -0
  84. package/dist/shared-config.esm.js +30 -0
  85. package/dist/special-characters.cjs.js +257 -0
  86. package/dist/special-characters.esm.js +772 -0
  87. package/dist/spell-check.cjs.js +512 -0
  88. package/dist/spell-check.esm.js +1013 -0
  89. package/dist/strikethrough.cjs.js +1 -0
  90. package/dist/strikethrough.esm.js +71 -0
  91. package/dist/table.cjs.js +35 -0
  92. package/dist/table.esm.js +477 -0
  93. package/dist/template.cjs.js +356 -0
  94. package/dist/template.esm.js +560 -0
  95. package/dist/text-alignment.cjs.js +1 -0
  96. package/dist/text-alignment.esm.js +105 -0
  97. package/dist/text-color.cjs.js +300 -0
  98. package/dist/text-color.esm.js +507 -0
  99. package/dist/underline.cjs.js +1 -0
  100. package/dist/underline.esm.js +34 -0
  101. package/index.d.ts +62 -0
  102. package/package.json +218 -6
  103. package/LICENSE +0 -21
  104. package/dist/index-BbORIHoM.mjs +0 -11763
  105. package/dist/index-C-OCBS_6.js +0 -3753
@@ -0,0 +1,772 @@
1
+ const p = {
2
+ all: {
3
+ name: "All",
4
+ characters: [
5
+ "€",
6
+ "£",
7
+ "¥",
8
+ "¢",
9
+ "₹",
10
+ "₽",
11
+ "₩",
12
+ "₿",
13
+ "₺",
14
+ "₴",
15
+ "₦",
16
+ "₨",
17
+ "₪",
18
+ "₫",
19
+ "₭",
20
+ "₮",
21
+ "₯",
22
+ "₰",
23
+ "₱",
24
+ "₲",
25
+ "₳",
26
+ "₴",
27
+ "₵",
28
+ "₶",
29
+ "₷",
30
+ "₹",
31
+ "₺",
32
+ "₼",
33
+ "₽",
34
+ "₾",
35
+ "₿",
36
+ '"',
37
+ "'",
38
+ "«",
39
+ "»",
40
+ "„",
41
+ "‟",
42
+ "‹",
43
+ "›",
44
+ "‚",
45
+ "‛",
46
+ "〝",
47
+ "〞",
48
+ "〟",
49
+ "‟",
50
+ "„",
51
+ "©",
52
+ "®",
53
+ "™",
54
+ "°",
55
+ "§",
56
+ "¶",
57
+ "†",
58
+ "‡",
59
+ "•",
60
+ "‣",
61
+ "⁃",
62
+ "‰",
63
+ "‱",
64
+ "′",
65
+ "″",
66
+ "‴",
67
+ "‵",
68
+ "‶",
69
+ "‷",
70
+ "※",
71
+ "‼",
72
+ "‽",
73
+ "‾",
74
+ "‿",
75
+ "⁀",
76
+ "⁁",
77
+ "⁂",
78
+ "⁃",
79
+ "⁇",
80
+ "⁈",
81
+ "⁉",
82
+ "+",
83
+ "-",
84
+ "×",
85
+ "÷",
86
+ "=",
87
+ "≠",
88
+ "≈",
89
+ "≡",
90
+ "≤",
91
+ "≥",
92
+ "<",
93
+ ">",
94
+ "±",
95
+ "∓",
96
+ "∴",
97
+ "∵",
98
+ "∶",
99
+ "∷",
100
+ "∸",
101
+ "∹",
102
+ "∺",
103
+ "∻",
104
+ "∼",
105
+ "∽",
106
+ "∾",
107
+ "∿",
108
+ "≀",
109
+ "≁",
110
+ "≂",
111
+ "≃",
112
+ "≄",
113
+ "≅",
114
+ "≆",
115
+ "≇",
116
+ "≈",
117
+ "≉",
118
+ "≊",
119
+ "≋",
120
+ "≌",
121
+ "≍",
122
+ "≎",
123
+ "≏",
124
+ "≐",
125
+ "≑",
126
+ "≒",
127
+ "≓",
128
+ "≔",
129
+ "≕",
130
+ "≖",
131
+ "≗",
132
+ "≘",
133
+ "≙",
134
+ "≚",
135
+ "≛",
136
+ "≜",
137
+ "≝",
138
+ "≞",
139
+ "≟",
140
+ "≠",
141
+ "≡",
142
+ "≢",
143
+ "≣",
144
+ "≤",
145
+ "≥",
146
+ "≦",
147
+ "≧",
148
+ "≨",
149
+ "≩",
150
+ "≪",
151
+ "≫",
152
+ "≬",
153
+ "≭",
154
+ "≮",
155
+ "≯",
156
+ "≰",
157
+ "≱",
158
+ "≲",
159
+ "≳",
160
+ "≴",
161
+ "≵",
162
+ "≶",
163
+ "≷",
164
+ "≸",
165
+ "≹",
166
+ "≺",
167
+ "≻",
168
+ "≼",
169
+ "≽",
170
+ "≾",
171
+ "≿",
172
+ "À",
173
+ "Á",
174
+ "Â",
175
+ "Ã",
176
+ "Ä",
177
+ "Å",
178
+ "Æ",
179
+ "Ç",
180
+ "È",
181
+ "É",
182
+ "Ê",
183
+ "Ë",
184
+ "Ì",
185
+ "Í",
186
+ "Î",
187
+ "Ï",
188
+ "Ð",
189
+ "Ñ",
190
+ "Ò",
191
+ "Ó",
192
+ "Ô",
193
+ "Õ",
194
+ "Ö",
195
+ "×",
196
+ "Ø",
197
+ "Ù",
198
+ "Ú",
199
+ "Û",
200
+ "Ü",
201
+ "Ý",
202
+ "Þ",
203
+ "ß",
204
+ "à",
205
+ "á",
206
+ "â",
207
+ "ã",
208
+ "ä",
209
+ "å",
210
+ "æ",
211
+ "ç",
212
+ "è",
213
+ "é",
214
+ "ê",
215
+ "ë",
216
+ "ì",
217
+ "í",
218
+ "î",
219
+ "ï",
220
+ "ð",
221
+ "ñ",
222
+ "ò",
223
+ "ó",
224
+ "ô",
225
+ "õ",
226
+ "ö",
227
+ "÷",
228
+ "ø",
229
+ "ù",
230
+ "ú",
231
+ "û",
232
+ "ü",
233
+ "ý",
234
+ "þ",
235
+ "ÿ",
236
+ "¡",
237
+ "¿",
238
+ "‽",
239
+ "‼",
240
+ "⁇",
241
+ "⁈",
242
+ "⁉",
243
+ "※",
244
+ "‾",
245
+ "‿",
246
+ "⁀",
247
+ "⁁",
248
+ "⁂",
249
+ "⁃",
250
+ "←",
251
+ "↑",
252
+ "→",
253
+ "↓",
254
+ "↔",
255
+ "↕",
256
+ "↖",
257
+ "↗",
258
+ "↘",
259
+ "↙",
260
+ "↚",
261
+ "↛",
262
+ "↜",
263
+ "↝",
264
+ "↞",
265
+ "↟",
266
+ "↠",
267
+ "↡",
268
+ "↢",
269
+ "↣",
270
+ "↤",
271
+ "↥",
272
+ "↦",
273
+ "↧",
274
+ "↨",
275
+ "↩",
276
+ "↪",
277
+ "↫",
278
+ "↬",
279
+ "↭",
280
+ "↮",
281
+ "↯",
282
+ "↰",
283
+ "↱",
284
+ "↲",
285
+ "↳",
286
+ "↴",
287
+ "↵",
288
+ "↶",
289
+ "↷",
290
+ "↸",
291
+ "↹",
292
+ "↺",
293
+ "↻",
294
+ "↼",
295
+ "↽",
296
+ "↾",
297
+ "↿",
298
+ "⇀",
299
+ "⇁",
300
+ "⇂",
301
+ "⇃",
302
+ "⇄",
303
+ "⇅",
304
+ "⇆",
305
+ "⇇",
306
+ "⇈",
307
+ "⇉",
308
+ "⇊",
309
+ "⇋",
310
+ "⇌",
311
+ "⇍",
312
+ "⇎",
313
+ "⇏",
314
+ "⇐",
315
+ "⇑",
316
+ "⇒",
317
+ "⇓",
318
+ "⇔",
319
+ "⇕",
320
+ "⇖",
321
+ "⇗",
322
+ "⇘",
323
+ "⇙",
324
+ "⇚",
325
+ "⇛",
326
+ "⇜",
327
+ "⇝",
328
+ "⇞",
329
+ "⇟",
330
+ "⇠",
331
+ "⇡",
332
+ "⇢",
333
+ "⇣",
334
+ "⇤",
335
+ "⇥",
336
+ "⇦",
337
+ "⇧",
338
+ "⇨",
339
+ "⇩",
340
+ "⇪",
341
+ "⇫",
342
+ "⇬",
343
+ "⇭",
344
+ "⇮",
345
+ "⇯",
346
+ "⇰",
347
+ "⇱",
348
+ "⇲",
349
+ "⇳",
350
+ "⇴",
351
+ "⇵",
352
+ "⇶",
353
+ "⇷",
354
+ "⇸",
355
+ "⇹",
356
+ "⇺",
357
+ "⇻",
358
+ "⇼",
359
+ "⇽",
360
+ "⇾",
361
+ "⇿"
362
+ ]
363
+ },
364
+ currency: {
365
+ name: "Currency",
366
+ characters: ["€", "£", "¥", "¢", "₹", "₽", "₩", "₿", "₺", "₴", "₦", "₨", "₪", "₫", "₭", "₮", "₯", "₰", "₱", "₲", "₳", "₵", "₶", "₷", "₼", "₾", "₿"]
367
+ },
368
+ text: {
369
+ name: "Text",
370
+ characters: ["©", "®", "™", "°", "§", "¶", "†", "‡", "•", "‣", "⁃", "‰", "‱", "′", "″", "‴", "‵", "‶", "‷", "※", "‼", "‽", "‾", "‿", "⁀", "⁁", "⁂"]
371
+ },
372
+ quotation: {
373
+ name: "Quotation",
374
+ characters: ['"', "'", "«", "»", "„", "‟", "‹", "›", "‚", "‛", "〝", "〞", "〟"]
375
+ },
376
+ mathematical: {
377
+ name: "Mathematical",
378
+ characters: ["+", "-", "×", "÷", "=", "≠", "≈", "≡", "≤", "≥", "<", ">", "±", "∓", "∴", "∵", "∶", "∷", "∸", "∹", "∺", "∻", "∼", "∽", "∾", "∿", "≀", "≁", "≂", "≃", "≄", "≅", "≆", "≇", "≉", "≊", "≋", "≌", "≍", "≎", "≏", "≐", "≑", "≒", "≓", "≔", "≕", "≖", "≗", "≘", "≙", "≚", "≛", "≜", "≝", "≞", "≟", "≢", "≣", "≦", "≧", "≨", "≩", "≪", "≫", "≬", "≭", "≮", "≯", "≰", "≱", "≲", "≳", "≴", "≵", "≶", "≷", "≸", "≹", "≺", "≻", "≼", "≽", "≾", "≿"]
379
+ },
380
+ "extended-latin": {
381
+ name: "Extended Latin",
382
+ characters: ["À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ"]
383
+ },
384
+ symbols: {
385
+ name: "Symbols",
386
+ characters: ["¡", "¿", "‽", "‼", "⁇", "⁈", "⁉", "※", "‾", "‿", "⁀", "⁁", "⁂", "⁃"]
387
+ },
388
+ arrows: {
389
+ name: "Arrows",
390
+ characters: ["←", "↑", "→", "↓", "↔", "↕", "↖", "↗", "↘", "↙", "↚", "↛", "↜", "↝", "↞", "↟", "↠", "↡", "↢", "↣", "↤", "↥", "↦", "↧", "↨", "↩", "↪", "↫", "↬", "↭", "↮", "↯", "↰", "↱", "↲", "↳", "↴", "↵", "↶", "↷", "↸", "↹", "↺", "↻", "↼", "↽", "↾", "↿", "⇀", "⇁", "⇂", "⇃", "⇄", "⇅", "⇆", "⇇", "⇈", "⇉", "⇊", "⇋", "⇌", "⇍", "⇎", "⇏", "⇐", "⇑", "⇒", "⇓", "⇔", "⇕", "⇖", "⇗", "⇘", "⇙", "⇚", "⇛", "⇜", "⇝", "⇞", "⇟", "⇠", "⇡", "⇢", "⇣", "⇤", "⇥", "⇦", "⇧", "⇨", "⇩", "⇪", "⇫", "⇬", "⇭", "⇮", "⇯", "⇰", "⇱", "⇲", "⇳", "⇴", "⇵", "⇶", "⇷", "⇸", "⇹", "⇺", "⇻", "⇼", "⇽", "⇾", "⇿"]
391
+ }
392
+ }, g = {
393
+ "€": "euro",
394
+ "£": "pound",
395
+ "¥": "yen",
396
+ "¢": "cent",
397
+ "₹": "rupee",
398
+ "₽": "ruble",
399
+ "₩": "won",
400
+ "₿": "bitcoin",
401
+ '"': "quote",
402
+ "'": "apostrophe",
403
+ "«": "left angle quote",
404
+ "»": "right angle quote",
405
+ "„": "low quote",
406
+ "©": "copyright",
407
+ "®": "registered",
408
+ "™": "trademark",
409
+ "°": "degree",
410
+ "§": "section",
411
+ "¶": "paragraph",
412
+ "†": "dagger",
413
+ "‡": "double dagger",
414
+ "•": "bullet",
415
+ "‰": "per mille",
416
+ "′": "prime",
417
+ "″": "double prime",
418
+ "+": "plus",
419
+ "-": "minus",
420
+ "×": "multiplication",
421
+ "÷": "division",
422
+ "=": "equals",
423
+ "≠": "not equal",
424
+ "≈": "approximately",
425
+ "≡": "identical",
426
+ "≤": "less or equal",
427
+ "≥": "greater or equal",
428
+ "±": "plus minus",
429
+ À: "a grave",
430
+ Á: "a acute",
431
+ Â: "a circumflex",
432
+ Ã: "a tilde",
433
+ Ä: "a diaeresis",
434
+ Ç: "c cedilla",
435
+ "←": "left arrow",
436
+ "↑": "up arrow",
437
+ "→": "right arrow",
438
+ "↓": "down arrow",
439
+ "↔": "left right arrow"
440
+ };
441
+ let h = !1;
442
+ const f = '[data-theme="dark"], .dark, .editora-theme-dark', b = () => {
443
+ const a = window.getSelection();
444
+ if (!a || a.rangeCount === 0) return null;
445
+ const e = a.anchorNode;
446
+ return (e instanceof HTMLElement ? e : e?.parentElement)?.closest(".rte-content, .editora-content") || null;
447
+ }, m = (a) => {
448
+ const e = a || b();
449
+ return e ? !!e.closest(f) : !1;
450
+ }, x = () => {
451
+ if (typeof document > "u") return;
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 = `
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);
467
+ position: fixed;
468
+ top: 0;
469
+ left: 0;
470
+ right: 0;
471
+ bottom: 0;
472
+ background-color: var(--rte-sc-overlay-bg);
473
+ backdrop-filter: blur(2px);
474
+ display: flex;
475
+ align-items: center;
476
+ justify-content: center;
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);
493
+ }
494
+
495
+ .special-characters-dialog {
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);
501
+ max-width: 800px;
502
+ width: 90%;
503
+ max-height: 80vh;
504
+ display: flex;
505
+ flex-direction: column;
506
+ overflow: hidden;
507
+ }
508
+
509
+ .special-characters-header {
510
+ display: flex;
511
+ justify-content: space-between;
512
+ align-items: center;
513
+ padding: 16px 20px;
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%);
516
+ }
517
+
518
+ .special-characters-header h2 {
519
+ margin: 0;
520
+ font-size: 18px;
521
+ font-weight: 600;
522
+ color: var(--rte-sc-dialog-text);
523
+ }
524
+
525
+ .special-characters-close {
526
+ background: none;
527
+ border: none;
528
+ font-size: 24px;
529
+ cursor: pointer;
530
+ color: var(--rte-sc-muted-text);
531
+ padding: 0;
532
+ width: 32px;
533
+ height: 32px;
534
+ display: flex;
535
+ align-items: center;
536
+ justify-content: center;
537
+ border-radius: 8px;
538
+ transition: background-color 0.16s ease, color 0.16s ease;
539
+ }
540
+
541
+ .special-characters-close:hover {
542
+ background-color: var(--rte-sc-subtle-hover);
543
+ color: var(--rte-sc-dialog-text);
544
+ }
545
+
546
+ .special-characters-content {
547
+ display: flex;
548
+ flex: 1;
549
+ overflow: hidden;
550
+ }
551
+
552
+ .special-characters-main-content {
553
+ flex: 1;
554
+ display: flex;
555
+ flex-direction: column;
556
+ overflow: hidden;
557
+ }
558
+
559
+ .special-characters-search {
560
+ padding: 16px 16px 0 16px;
561
+ }
562
+
563
+ .special-characters-search-input {
564
+ width: 100%;
565
+ padding: 10px 12px;
566
+ border: 1px solid var(--rte-sc-border);
567
+ border-radius: 8px;
568
+ font-size: 14px;
569
+ color: var(--rte-sc-dialog-text);
570
+ background-color: var(--rte-sc-subtle-bg);
571
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
572
+ box-sizing: border-box;
573
+ }
574
+
575
+ .special-characters-search-input::placeholder {
576
+ color: var(--rte-sc-muted-text);
577
+ }
578
+
579
+ .special-characters-search-input:focus {
580
+ outline: none;
581
+ border-color: var(--rte-sc-accent);
582
+ box-shadow: 0 0 0 3px var(--rte-sc-ring);
583
+ }
584
+
585
+ .special-characters-tabs {
586
+ display: flex;
587
+ flex-direction: column;
588
+ width: 180px;
589
+ border-right: 1px solid var(--rte-sc-border);
590
+ background-color: var(--rte-sc-subtle-bg);
591
+ }
592
+
593
+ .special-characters-tab {
594
+ padding: 12px 16px;
595
+ border: none;
596
+ background: none;
597
+ text-align: left;
598
+ cursor: pointer;
599
+ font-size: 14px;
600
+ color: var(--rte-sc-muted-text);
601
+ border-bottom: 1px solid var(--rte-sc-border);
602
+ transition: all 0.2s ease;
603
+ }
604
+
605
+ .special-characters-tab:hover {
606
+ background-color: var(--rte-sc-subtle-hover);
607
+ color: var(--rte-sc-dialog-text);
608
+ }
609
+
610
+ .special-characters-tab.active {
611
+ background-color: var(--rte-sc-accent);
612
+ color: #fff;
613
+ font-weight: 500;
614
+ }
615
+
616
+ .special-characters-grid {
617
+ padding: 16px;
618
+ overflow-y: auto;
619
+ display: grid;
620
+ grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
621
+ gap: 8px;
622
+ }
623
+
624
+ .special-characters-item {
625
+ width: 40px;
626
+ height: 40px;
627
+ display: flex;
628
+ align-items: center;
629
+ justify-content: center;
630
+ border: 1px solid var(--rte-sc-border);
631
+ background: var(--rte-sc-subtle-bg);
632
+ border-radius: 8px;
633
+ cursor: pointer;
634
+ font-size: 18px;
635
+ transition: all 0.2s ease;
636
+ color: var(--rte-sc-dialog-text);
637
+ }
638
+
639
+ .special-characters-item:hover {
640
+ background-color: var(--rte-sc-accent);
641
+ border-color: var(--rte-sc-accent);
642
+ color: #fff;
643
+ transform: scale(1.05);
644
+ }
645
+
646
+ .special-characters-item:active {
647
+ transform: scale(0.95);
648
+ }
649
+
650
+ .special-characters-no-results {
651
+ grid-column: 1 / -1;
652
+ text-align: center;
653
+ color: var(--rte-sc-muted-text);
654
+ font-size: 14px;
655
+ padding: 40px 20px;
656
+ background-color: var(--rte-sc-subtle-bg);
657
+ border-radius: 8px;
658
+ border: 1px solid var(--rte-sc-border);
659
+ }
660
+
661
+ @media (max-width: 768px) {
662
+ .special-characters-dialog {
663
+ width: 95%;
664
+ max-height: 90vh;
665
+ }
666
+
667
+ .special-characters-content {
668
+ flex-direction: column;
669
+ }
670
+
671
+ .special-characters-tabs {
672
+ width: 100%;
673
+ border-right: none;
674
+ border-bottom: 1px solid var(--rte-sc-border);
675
+ flex-direction: row;
676
+ overflow-x: auto;
677
+ }
678
+
679
+ .special-characters-tab {
680
+ border-bottom: none;
681
+ border-right: 1px solid var(--rte-sc-border);
682
+ white-space: nowrap;
683
+ }
684
+ }
685
+ `, document.head.appendChild(e);
686
+ }, v = (a) => {
687
+ const e = window.getSelection();
688
+ if (e && e.rangeCount > 0) {
689
+ const t = e.getRangeAt(0);
690
+ t.deleteContents();
691
+ const c = document.createTextNode(a);
692
+ t.insertNode(c), t.setStartAfter(c), t.setEndAfter(c), e.removeAllRanges(), e.addRange(t);
693
+ }
694
+ }, y = (a) => {
695
+ if (typeof window > "u" || h) return;
696
+ h = !0, x();
697
+ let e = "all", t = "";
698
+ const c = document.createElement("div");
699
+ c.className = "special-characters-overlay", m(a) && c.classList.add("rte-ui-theme-dark");
700
+ const o = document.createElement("div");
701
+ o.className = "special-characters-dialog", o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true");
702
+ const d = () => {
703
+ const s = p[e].characters.filter((r) => {
704
+ if (!t.trim()) return !0;
705
+ const n = t.toLowerCase();
706
+ return r.toLowerCase().includes(n) || (g[r] || "").toLowerCase().includes(n);
707
+ });
708
+ o.innerHTML = `
709
+ <div class="special-characters-header">
710
+ <h2>Insert Special Characters</h2>
711
+ <button class="special-characters-close">×</button>
712
+ </div>
713
+ <div class="special-characters-content">
714
+ <div class="special-characters-tabs">
715
+ ${Object.keys(p).map((r) => `
716
+ <button class="special-characters-tab ${e === r ? "active" : ""}" data-category="${r}">
717
+ ${p[r].name}
718
+ </button>
719
+ `).join("")}
720
+ </div>
721
+ <div class="special-characters-main-content">
722
+ <div class="special-characters-search">
723
+ <input type="text" placeholder="Search characters..." value="${t}" class="special-characters-search-input">
724
+ </div>
725
+ <div class="special-characters-grid">
726
+ ${s.length > 0 ? s.map((r) => `
727
+ <button class="special-characters-item" data-char="${r}" title="${g[r] || r}">
728
+ ${r}
729
+ </button>
730
+ `).join("") : `<div class="special-characters-no-results">No characters found for "${t}"</div>`}
731
+ </div>
732
+ </div>
733
+ </div>
734
+ `, o.querySelector(".special-characters-close")?.addEventListener("click", l), o.querySelectorAll(".special-characters-tab").forEach((r) => {
735
+ r.addEventListener("click", (n) => {
736
+ const i = n.target.getAttribute("data-category");
737
+ i && (e = i, d());
738
+ });
739
+ }), o.querySelector(".special-characters-search-input")?.addEventListener("input", (r) => {
740
+ t = r.target.value, d();
741
+ }), o.querySelectorAll(".special-characters-item").forEach((r) => {
742
+ r.addEventListener("click", (n) => {
743
+ const i = n.target.getAttribute("data-char");
744
+ i && (v(i), l());
745
+ });
746
+ });
747
+ }, l = () => {
748
+ c.parentNode && c.parentNode.removeChild(c), h = !1, document.removeEventListener("keydown", u);
749
+ }, u = (s) => {
750
+ s.key === "Escape" && (s.preventDefault(), s.stopPropagation(), l());
751
+ };
752
+ c.addEventListener("click", (s) => {
753
+ s.target === c && l();
754
+ }), document.addEventListener("keydown", u), d(), c.appendChild(o), document.body.appendChild(c);
755
+ }, E = () => ({
756
+ name: "specialCharacters",
757
+ toolbar: [{
758
+ label: "Special Characters",
759
+ command: "insertSpecialCharacter",
760
+ 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>'
761
+ }],
762
+ commands: {
763
+ insertSpecialCharacter: (a, e) => {
764
+ const t = e?.contentElement instanceof HTMLElement ? e.contentElement : b();
765
+ return y(t), !0;
766
+ }
767
+ },
768
+ keymap: {}
769
+ });
770
+ export {
771
+ E as SpecialCharactersPlugin
772
+ };