@editora/plugins 1.0.7 → 1.0.9
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.
- package/LICENSE +21 -0
- package/README.md +72 -4
- package/dist/_commonjsHelpers-BH3jXuIh.js +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.mjs +33 -0
- package/dist/anchor.cjs.js +11 -11
- package/dist/anchor.esm.js +130 -107
- package/dist/anchoredPopover-BzqGPOAE.js +1 -0
- package/dist/anchoredPopover-Dts0IrgU.mjs +106 -0
- package/dist/approval-workflow.cjs.js +447 -0
- package/dist/approval-workflow.esm.js +1070 -0
- package/dist/background-color.cjs.js +3 -3
- package/dist/background-color.esm.js +116 -119
- package/dist/blocks-library.cjs.js +442 -0
- package/dist/blocks-library.esm.js +1317 -0
- package/dist/citations.cjs.js +548 -0
- package/dist/citations.esm.js +1457 -0
- package/dist/code.cjs.js +82 -102
- package/dist/code.esm.js +1172 -662
- package/dist/comments.cjs.js +10 -10
- package/dist/comments.esm.js +195 -177
- package/dist/conditional-content.cjs.js +626 -0
- package/dist/conditional-content.esm.js +1360 -0
- package/dist/content-rules.cjs.js +408 -0
- package/dist/content-rules.esm.js +1093 -0
- package/dist/data-binding.cjs.js +321 -0
- package/dist/data-binding.esm.js +913 -0
- package/dist/doc-schema.cjs.js +398 -0
- package/dist/doc-schema.esm.js +1310 -0
- package/dist/document-manager.cjs.js +1 -1
- package/dist/document-manager.esm.js +1 -1
- package/dist/documentManager-CTqRftU8.mjs +8369 -0
- package/dist/documentManager-Jf0RbSks.js +17 -0
- package/dist/embed-iframe.cjs.js +2 -2
- package/dist/embed-iframe.esm.js +8 -5
- package/dist/emojis.cjs.js +64 -39
- package/dist/emojis.esm.js +133 -104
- package/dist/enterprise.cjs.js +1 -0
- package/dist/enterprise.esm.js +56 -0
- package/dist/html2canvas.esm-B5qzocYs.js +5 -0
- package/dist/html2canvas.esm-BWVIUcAF.mjs +4802 -0
- package/dist/{index-Bskk414V.mjs → index-BFsKNTTj.mjs} +50 -50
- package/dist/index-CvJk4DKa.js +221 -0
- package/dist/index-D3CycEFU.mjs +16543 -0
- package/dist/index-tqLTHcO6.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-Cz1qItab.js → index.es-CE_A4QSm.js} +5 -5
- package/dist/{index.es-DEcRmSTY.mjs → index.es-DQ78mYYo.mjs} +4 -3
- package/dist/index.esm.js +111 -75
- package/dist/jspdf.es.min-BoS80556.js +77 -0
- package/dist/jspdf.es.min-DQCoX5yh.mjs +7889 -0
- package/dist/link.cjs.js +6 -6
- package/dist/link.esm.js +41 -39
- package/dist/math.cjs.js +21 -21
- package/dist/math.esm.js +151 -112
- package/dist/media-manager.cjs.js +15 -15
- package/dist/media-manager.esm.js +227 -206
- package/dist/mentions.cjs.js +105 -0
- package/dist/mentions.esm.js +726 -0
- package/dist/merge-tag.cjs.js +44 -12
- package/dist/merge-tag.esm.js +368 -241
- package/dist/page-break.cjs.js +2 -2
- package/dist/page-break.esm.js +85 -77
- package/dist/pii-redaction.cjs.js +436 -0
- package/dist/pii-redaction.esm.js +1377 -0
- package/dist/preview.cjs.js +3 -3
- package/dist/preview.esm.js +29 -29
- package/dist/slash-commands.cjs.js +90 -0
- package/dist/slash-commands.esm.js +752 -0
- package/dist/smart-paste.cjs.js +398 -0
- package/dist/smart-paste.esm.js +1388 -0
- package/dist/special-characters.cjs.js +83 -45
- package/dist/special-characters.esm.js +149 -100
- package/dist/spell-check.cjs.js +9 -9
- package/dist/spell-check.esm.js +235 -216
- package/dist/template.cjs.js +14 -14
- package/dist/template.esm.js +157 -131
- package/dist/text-color.cjs.js +9 -9
- package/dist/text-color.esm.js +131 -115
- package/dist/track-changes.cjs.js +77 -0
- package/dist/track-changes.esm.js +755 -0
- package/dist/translation-workflow.cjs.js +626 -0
- package/dist/translation-workflow.esm.js +1718 -0
- package/dist/version-diff.cjs.js +362 -0
- package/dist/version-diff.esm.js +768 -0
- package/index.d.ts +849 -1
- package/package.json +105 -6
- package/dist/colorSelectionApply-C0iOfMWb.js +0 -1
- package/dist/colorSelectionApply-D8r_gV32.mjs +0 -63
- package/dist/documentManager-DRUc1-Cs.mjs +0 -37581
- package/dist/documentManager-_tQQfQi9.js +0 -317
- package/dist/index-D3pJyAsj.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g={all:{name:"All",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₴","₵","₶","₷","₹","₺","₼","₽","₾","₿",'"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟","‟","„","©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁇","⁈","⁉","+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≈","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≠","≡","≢","≣","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},currency:{name:"Currency",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₵","₶","₷","₼","₾","₿"]},text:{name:"Text",characters:["©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂"]},quotation:{name:"Quotation",characters:['"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟"]},mathematical:{name:"Mathematical",characters:["+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≢","≣","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿"]},"extended-latin":{name:"Extended Latin",characters:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ"]},symbols:{name:"Symbols",characters:["¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃"]},arrows:{name:"Arrows",characters:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]}},x={"€":"euro","£":"pound","¥":"yen","¢":"cent","₹":"rupee","₽":"ruble","₩":"won","₿":"bitcoin",'"':"quote","'":"apostrophe","«":"left angle quote","»":"right angle quote","„":"low quote","©":"copyright","®":"registered","™":"trademark","°":"degree","§":"section","¶":"paragraph","†":"dagger","‡":"double dagger","•":"bullet","‰":"per mille","′":"prime","″":"double prime","+":"plus","-":"minus","×":"multiplication","÷":"division","=":"equals","≠":"not equal","≈":"approximately","≡":"identical","≤":"less or equal","≥":"greater or equal","±":"plus minus",À:"a grave",Á:"a acute",Â:"a circumflex",Ã:"a tilde",Ä:"a diaeresis",Ç:"c cedilla","←":"left arrow","↑":"up arrow","→":"right arrow","↓":"down arrow","↔":"left right arrow"};let u=!1;const C='[data-theme="dark"], .dark, .editora-theme-dark',k=()=>{const t=window.getSelection();if(!t||t.rangeCount===0)return null;const e=t.anchorNode;return(e instanceof HTMLElement?e:e?.parentElement)?.closest(".rte-content, .editora-content")||null},E=t=>{const e=t||k();return e?!!e.closest(C):!1},z=()=>{if(typeof document>"u")return;const t="special-characters-plugin-styles";if(document.getElementById(t))return;const e=document.createElement("style");e.id=t,e.textContent=`
|
|
2
2
|
.special-characters-overlay {
|
|
3
3
|
--rte-sc-overlay-bg: rgba(15, 23, 36, 0.56);
|
|
4
4
|
--rte-sc-dialog-bg: #ffffff;
|
|
@@ -10,6 +10,26 @@
|
|
|
10
10
|
--rte-sc-accent: #1f75fe;
|
|
11
11
|
--rte-sc-accent-strong: #165fd6;
|
|
12
12
|
--rte-sc-ring: rgba(31, 117, 254, 0.18);
|
|
13
|
+
--rte-picker-dialog-width: min(640px, 96vw);
|
|
14
|
+
--rte-picker-dialog-max-height: min(560px, 86vh);
|
|
15
|
+
--rte-picker-dialog-radius: 12px;
|
|
16
|
+
--rte-picker-search-wrap-padding: 12px;
|
|
17
|
+
--rte-picker-search-height: 38px;
|
|
18
|
+
--rte-picker-search-font-size: 13px;
|
|
19
|
+
--rte-picker-search-radius: 8px;
|
|
20
|
+
--rte-picker-tabs-width: 156px;
|
|
21
|
+
--rte-picker-tab-padding-y: 10px;
|
|
22
|
+
--rte-picker-tab-padding-x: 12px;
|
|
23
|
+
--rte-picker-tab-font-size: 13px;
|
|
24
|
+
--rte-picker-grid-padding: 12px;
|
|
25
|
+
--rte-picker-grid-gap: 6px;
|
|
26
|
+
--rte-picker-cell-size: 34px;
|
|
27
|
+
--rte-picker-cell-font-size: 17px;
|
|
28
|
+
--rte-picker-cell-radius: 7px;
|
|
29
|
+
--rte-picker-mobile-tab-min-width: 82px;
|
|
30
|
+
--rte-picker-mobile-cell-size: 32px;
|
|
31
|
+
--rte-picker-mobile-grid-gap: 5px;
|
|
32
|
+
--rte-picker-mobile-dialog-max-height: 88vh;
|
|
13
33
|
position: fixed;
|
|
14
34
|
top: 0;
|
|
15
35
|
left: 0;
|
|
@@ -42,11 +62,10 @@
|
|
|
42
62
|
background: var(--rte-sc-dialog-bg);
|
|
43
63
|
color: var(--rte-sc-dialog-text);
|
|
44
64
|
border: 1px solid var(--rte-sc-border);
|
|
45
|
-
border-radius:
|
|
65
|
+
border-radius: var(--rte-picker-dialog-radius);
|
|
46
66
|
box-shadow: 0 24px 48px rgba(10, 15, 24, 0.28);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
max-height: 80vh;
|
|
67
|
+
width: var(--rte-picker-dialog-width);
|
|
68
|
+
max-height: var(--rte-picker-dialog-max-height);
|
|
50
69
|
display: flex;
|
|
51
70
|
flex-direction: column;
|
|
52
71
|
overflow: hidden;
|
|
@@ -100,18 +119,20 @@
|
|
|
100
119
|
display: flex;
|
|
101
120
|
flex-direction: column;
|
|
102
121
|
overflow: hidden;
|
|
122
|
+
min-width: 0;
|
|
103
123
|
}
|
|
104
124
|
|
|
105
125
|
.special-characters-search {
|
|
106
|
-
padding:
|
|
126
|
+
padding: var(--rte-picker-search-wrap-padding) var(--rte-picker-search-wrap-padding) 0 var(--rte-picker-search-wrap-padding);
|
|
107
127
|
}
|
|
108
128
|
|
|
109
129
|
.special-characters-search-input {
|
|
110
130
|
width: 100%;
|
|
111
|
-
|
|
131
|
+
height: var(--rte-picker-search-height);
|
|
132
|
+
padding: 8px 12px;
|
|
112
133
|
border: 1px solid var(--rte-sc-border);
|
|
113
|
-
border-radius:
|
|
114
|
-
font-size:
|
|
134
|
+
border-radius: var(--rte-picker-search-radius);
|
|
135
|
+
font-size: var(--rte-picker-search-font-size);
|
|
115
136
|
color: var(--rte-sc-dialog-text);
|
|
116
137
|
background-color: var(--rte-sc-subtle-bg);
|
|
117
138
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
@@ -131,21 +152,23 @@
|
|
|
131
152
|
.special-characters-tabs {
|
|
132
153
|
display: flex;
|
|
133
154
|
flex-direction: column;
|
|
134
|
-
width:
|
|
155
|
+
width: var(--rte-picker-tabs-width);
|
|
135
156
|
border-right: 1px solid var(--rte-sc-border);
|
|
136
157
|
background-color: var(--rte-sc-subtle-bg);
|
|
158
|
+
overflow-y: auto;
|
|
137
159
|
}
|
|
138
160
|
|
|
139
161
|
.special-characters-tab {
|
|
140
|
-
padding:
|
|
162
|
+
padding: var(--rte-picker-tab-padding-y) var(--rte-picker-tab-padding-x);
|
|
141
163
|
border: none;
|
|
142
164
|
background: none;
|
|
143
165
|
text-align: left;
|
|
144
166
|
cursor: pointer;
|
|
145
|
-
font-size:
|
|
167
|
+
font-size: var(--rte-picker-tab-font-size);
|
|
146
168
|
color: var(--rte-sc-muted-text);
|
|
147
169
|
border-bottom: 1px solid var(--rte-sc-border);
|
|
148
170
|
transition: all 0.2s ease;
|
|
171
|
+
line-height: 1.25;
|
|
149
172
|
}
|
|
150
173
|
|
|
151
174
|
.special-characters-tab:hover {
|
|
@@ -160,24 +183,25 @@
|
|
|
160
183
|
}
|
|
161
184
|
|
|
162
185
|
.special-characters-grid {
|
|
163
|
-
padding:
|
|
186
|
+
padding: var(--rte-picker-grid-padding);
|
|
164
187
|
overflow-y: auto;
|
|
165
188
|
display: grid;
|
|
166
|
-
grid-template-columns: repeat(auto-fill, minmax(
|
|
167
|
-
gap:
|
|
189
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--rte-picker-cell-size), 1fr));
|
|
190
|
+
gap: var(--rte-picker-grid-gap);
|
|
191
|
+
contain: content;
|
|
168
192
|
}
|
|
169
193
|
|
|
170
194
|
.special-characters-item {
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
195
|
+
width: var(--rte-picker-cell-size);
|
|
196
|
+
height: var(--rte-picker-cell-size);
|
|
173
197
|
display: flex;
|
|
174
198
|
align-items: center;
|
|
175
199
|
justify-content: center;
|
|
176
200
|
border: 1px solid var(--rte-sc-border);
|
|
177
201
|
background: var(--rte-sc-subtle-bg);
|
|
178
|
-
border-radius:
|
|
202
|
+
border-radius: var(--rte-picker-cell-radius);
|
|
179
203
|
cursor: pointer;
|
|
180
|
-
font-size:
|
|
204
|
+
font-size: var(--rte-picker-cell-font-size);
|
|
181
205
|
transition: all 0.2s ease;
|
|
182
206
|
color: var(--rte-sc-dialog-text);
|
|
183
207
|
}
|
|
@@ -206,8 +230,8 @@
|
|
|
206
230
|
|
|
207
231
|
@media (max-width: 768px) {
|
|
208
232
|
.special-characters-dialog {
|
|
209
|
-
width:
|
|
210
|
-
max-height:
|
|
233
|
+
width: 96%;
|
|
234
|
+
max-height: var(--rte-picker-mobile-dialog-max-height);
|
|
211
235
|
}
|
|
212
236
|
|
|
213
237
|
.special-characters-content {
|
|
@@ -226,32 +250,46 @@
|
|
|
226
250
|
border-bottom: none;
|
|
227
251
|
border-right: 1px solid var(--rte-sc-border);
|
|
228
252
|
white-space: nowrap;
|
|
253
|
+
min-width: var(--rte-picker-mobile-tab-min-width);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.special-characters-grid {
|
|
257
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--rte-picker-mobile-cell-size), 1fr));
|
|
258
|
+
gap: var(--rte-picker-mobile-grid-gap);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.special-characters-item {
|
|
262
|
+
width: var(--rte-picker-mobile-cell-size);
|
|
263
|
+
height: var(--rte-picker-mobile-cell-size);
|
|
264
|
+
font-size: 16px;
|
|
229
265
|
}
|
|
230
266
|
}
|
|
231
|
-
`,document.head.appendChild(e)},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
267
|
+
`,document.head.appendChild(e)},S=t=>{const e=window.getSelection();if(e&&e.rangeCount>0){const a=e.getRangeAt(0);a.deleteContents();const c=document.createTextNode(t);a.insertNode(c),a.setStartAfter(c),a.setEndAfter(c),e.removeAllRanges(),e.addRange(a)}},L=t=>{if(typeof window>"u"||u)return;u=!0,z();let e="all",a="",c=null;const i=document.createElement("div");i.className="special-characters-overlay",E(t)&&i.classList.add("rte-ui-theme-dark");const s=document.createElement("div");s.className="special-characters-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.innerHTML=`
|
|
268
|
+
<div class="special-characters-header">
|
|
269
|
+
<h2>Insert Special Characters</h2>
|
|
270
|
+
<button class="special-characters-close">×</button>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="special-characters-content">
|
|
273
|
+
<div class="special-characters-tabs">
|
|
274
|
+
${Object.keys(g).map(r=>`
|
|
275
|
+
<button class="special-characters-tab ${e===r?"active":""}" data-category="${r}">
|
|
276
|
+
${g[r].name}
|
|
277
|
+
</button>
|
|
278
|
+
`).join("")}
|
|
235
279
|
</div>
|
|
236
|
-
<div class="special-characters-content">
|
|
237
|
-
<div class="special-characters-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</div>
|
|
244
|
-
<div class="special-characters-main-content">
|
|
245
|
-
<div class="special-characters-search">
|
|
246
|
-
<input type="text" placeholder="Search characters..." value="${r}" class="special-characters-search-input">
|
|
247
|
-
</div>
|
|
248
|
-
<div class="special-characters-grid">
|
|
249
|
-
${s.length>0?s.map(t=>`
|
|
250
|
-
<button class="special-characters-item" data-char="${t}" title="${g[t]||t}">
|
|
251
|
-
${t}
|
|
252
|
-
</button>
|
|
253
|
-
`).join(""):`<div class="special-characters-no-results">No characters found for "${r}"</div>`}
|
|
254
|
-
</div>
|
|
280
|
+
<div class="special-characters-main-content">
|
|
281
|
+
<div class="special-characters-search">
|
|
282
|
+
<input
|
|
283
|
+
type="text"
|
|
284
|
+
placeholder="Search characters..."
|
|
285
|
+
class="special-characters-search-input"
|
|
286
|
+
>
|
|
255
287
|
</div>
|
|
288
|
+
<div class="special-characters-grid"></div>
|
|
256
289
|
</div>
|
|
257
|
-
|
|
290
|
+
</div>
|
|
291
|
+
`;const b=s.querySelector(".special-characters-tabs"),d=s.querySelector(".special-characters-grid"),m=s.querySelector(".special-characters-search-input"),w=s.querySelector(".special-characters-close"),y=()=>g[e].characters.filter(r=>{if(!a.trim())return!0;const o=a.toLowerCase();return r.toLowerCase().includes(o)||(x[r]||"").toLowerCase().includes(o)}),v=()=>{b?.querySelectorAll(".special-characters-tab").forEach(r=>{r.classList.toggle("active",r.getAttribute("data-category")===e)})},h=()=>{if(!d)return;const r=y();if(r.length===0){d.innerHTML=`<div class="special-characters-no-results">No characters found for "${a}"</div>`;return}d.innerHTML=r.map(o=>`
|
|
292
|
+
<button class="special-characters-item" data-char="${o}" title="${x[o]||o}">
|
|
293
|
+
${o}
|
|
294
|
+
</button>
|
|
295
|
+
`).join("")},p=()=>{c!==null&&(window.clearTimeout(c),c=null),i.parentNode&&i.parentNode.removeChild(i),u=!1,document.removeEventListener("keydown",f,!0)},f=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation(),p())};w?.addEventListener("click",p),b?.addEventListener("click",r=>{const l=r.target.closest(".special-characters-tab");if(!l)return;const n=l.getAttribute("data-category");!n||e===n||(e=n,v(),h())}),m?.addEventListener("input",r=>{a=r.target.value,c!==null&&window.clearTimeout(c),c=window.setTimeout(()=>{c=null,h()},90)}),d?.addEventListener("click",r=>{const l=r.target.closest(".special-characters-item");if(!l)return;const n=l.getAttribute("data-char");n&&(S(n),p())}),i.addEventListener("click",r=>{r.target===i&&p()}),document.addEventListener("keydown",f,!0),v(),h(),i.appendChild(s),document.body.appendChild(i),requestAnimationFrame(()=>m?.focus())},T=()=>({name:"specialCharacters",toolbar:[{label:"Special Characters",command:"insertSpecialCharacter",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>'}],commands:{insertSpecialCharacter:(t,e)=>{const a=e?.contentElement instanceof HTMLElement?e.contentElement:k();return L(a),!0}},keymap:{}});exports.SpecialCharactersPlugin=T;
|