@ckeditor/ckeditor5-emoji 0.0.0-nightly-20250217.0 → 0.0.1

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 (406) hide show
  1. package/LICENSE.md +5 -16
  2. package/README.md +3 -30
  3. package/package.json +5 -58
  4. package/CHANGELOG.md +0 -4
  5. package/build/emoji.js +0 -5
  6. package/build/translations/af.js +0 -1
  7. package/build/translations/ar.js +0 -1
  8. package/build/translations/ast.js +0 -1
  9. package/build/translations/az.js +0 -1
  10. package/build/translations/bg.js +0 -1
  11. package/build/translations/bn.js +0 -1
  12. package/build/translations/bs.js +0 -1
  13. package/build/translations/ca.js +0 -1
  14. package/build/translations/cs.js +0 -1
  15. package/build/translations/da.js +0 -1
  16. package/build/translations/de-ch.js +0 -1
  17. package/build/translations/de.js +0 -1
  18. package/build/translations/el.js +0 -1
  19. package/build/translations/en-au.js +0 -1
  20. package/build/translations/en-gb.js +0 -1
  21. package/build/translations/eo.js +0 -1
  22. package/build/translations/es-co.js +0 -1
  23. package/build/translations/es.js +0 -1
  24. package/build/translations/et.js +0 -1
  25. package/build/translations/eu.js +0 -1
  26. package/build/translations/fa.js +0 -1
  27. package/build/translations/fi.js +0 -1
  28. package/build/translations/fr.js +0 -1
  29. package/build/translations/gl.js +0 -1
  30. package/build/translations/gu.js +0 -1
  31. package/build/translations/he.js +0 -1
  32. package/build/translations/hi.js +0 -1
  33. package/build/translations/hr.js +0 -1
  34. package/build/translations/hu.js +0 -1
  35. package/build/translations/hy.js +0 -1
  36. package/build/translations/id.js +0 -1
  37. package/build/translations/it.js +0 -1
  38. package/build/translations/ja.js +0 -1
  39. package/build/translations/jv.js +0 -1
  40. package/build/translations/kk.js +0 -1
  41. package/build/translations/km.js +0 -1
  42. package/build/translations/kn.js +0 -1
  43. package/build/translations/ko.js +0 -1
  44. package/build/translations/ku.js +0 -1
  45. package/build/translations/lt.js +0 -1
  46. package/build/translations/lv.js +0 -1
  47. package/build/translations/ms.js +0 -1
  48. package/build/translations/nb.js +0 -1
  49. package/build/translations/ne.js +0 -1
  50. package/build/translations/nl.js +0 -1
  51. package/build/translations/no.js +0 -1
  52. package/build/translations/oc.js +0 -1
  53. package/build/translations/pl.js +0 -1
  54. package/build/translations/pt-br.js +0 -1
  55. package/build/translations/pt.js +0 -1
  56. package/build/translations/ro.js +0 -1
  57. package/build/translations/ru.js +0 -1
  58. package/build/translations/si.js +0 -1
  59. package/build/translations/sk.js +0 -1
  60. package/build/translations/sl.js +0 -1
  61. package/build/translations/sq.js +0 -1
  62. package/build/translations/sr-latn.js +0 -1
  63. package/build/translations/sr.js +0 -1
  64. package/build/translations/sv.js +0 -1
  65. package/build/translations/th.js +0 -1
  66. package/build/translations/ti.js +0 -1
  67. package/build/translations/tk.js +0 -1
  68. package/build/translations/tr.js +0 -1
  69. package/build/translations/tt.js +0 -1
  70. package/build/translations/ug.js +0 -1
  71. package/build/translations/uk.js +0 -1
  72. package/build/translations/ur.js +0 -1
  73. package/build/translations/uz.js +0 -1
  74. package/build/translations/vi.js +0 -1
  75. package/build/translations/zh-cn.js +0 -1
  76. package/build/translations/zh.js +0 -1
  77. package/ckeditor5-metadata.json +0 -45
  78. package/dist/index-content.css +0 -4
  79. package/dist/index-editor.css +0 -111
  80. package/dist/index.css +0 -143
  81. package/dist/index.css.map +0 -1
  82. package/dist/index.js +0 -1698
  83. package/dist/index.js.map +0 -1
  84. package/dist/translations/af.d.ts +0 -8
  85. package/dist/translations/af.js +0 -5
  86. package/dist/translations/af.umd.js +0 -11
  87. package/dist/translations/ar.d.ts +0 -8
  88. package/dist/translations/ar.js +0 -5
  89. package/dist/translations/ar.umd.js +0 -11
  90. package/dist/translations/ast.d.ts +0 -8
  91. package/dist/translations/ast.js +0 -5
  92. package/dist/translations/ast.umd.js +0 -11
  93. package/dist/translations/az.d.ts +0 -8
  94. package/dist/translations/az.js +0 -5
  95. package/dist/translations/az.umd.js +0 -11
  96. package/dist/translations/bg.d.ts +0 -8
  97. package/dist/translations/bg.js +0 -5
  98. package/dist/translations/bg.umd.js +0 -11
  99. package/dist/translations/bn.d.ts +0 -8
  100. package/dist/translations/bn.js +0 -5
  101. package/dist/translations/bn.umd.js +0 -11
  102. package/dist/translations/bs.d.ts +0 -8
  103. package/dist/translations/bs.js +0 -5
  104. package/dist/translations/bs.umd.js +0 -11
  105. package/dist/translations/ca.d.ts +0 -8
  106. package/dist/translations/ca.js +0 -5
  107. package/dist/translations/ca.umd.js +0 -11
  108. package/dist/translations/cs.d.ts +0 -8
  109. package/dist/translations/cs.js +0 -5
  110. package/dist/translations/cs.umd.js +0 -11
  111. package/dist/translations/da.d.ts +0 -8
  112. package/dist/translations/da.js +0 -5
  113. package/dist/translations/da.umd.js +0 -11
  114. package/dist/translations/de-ch.d.ts +0 -8
  115. package/dist/translations/de-ch.js +0 -5
  116. package/dist/translations/de-ch.umd.js +0 -11
  117. package/dist/translations/de.d.ts +0 -8
  118. package/dist/translations/de.js +0 -5
  119. package/dist/translations/de.umd.js +0 -11
  120. package/dist/translations/el.d.ts +0 -8
  121. package/dist/translations/el.js +0 -5
  122. package/dist/translations/el.umd.js +0 -11
  123. package/dist/translations/en-au.d.ts +0 -8
  124. package/dist/translations/en-au.js +0 -5
  125. package/dist/translations/en-au.umd.js +0 -11
  126. package/dist/translations/en-gb.d.ts +0 -8
  127. package/dist/translations/en-gb.js +0 -5
  128. package/dist/translations/en-gb.umd.js +0 -11
  129. package/dist/translations/en.d.ts +0 -8
  130. package/dist/translations/en.js +0 -5
  131. package/dist/translations/en.umd.js +0 -11
  132. package/dist/translations/eo.d.ts +0 -8
  133. package/dist/translations/eo.js +0 -5
  134. package/dist/translations/eo.umd.js +0 -11
  135. package/dist/translations/es-co.d.ts +0 -8
  136. package/dist/translations/es-co.js +0 -5
  137. package/dist/translations/es-co.umd.js +0 -11
  138. package/dist/translations/es.d.ts +0 -8
  139. package/dist/translations/es.js +0 -5
  140. package/dist/translations/es.umd.js +0 -11
  141. package/dist/translations/et.d.ts +0 -8
  142. package/dist/translations/et.js +0 -5
  143. package/dist/translations/et.umd.js +0 -11
  144. package/dist/translations/eu.d.ts +0 -8
  145. package/dist/translations/eu.js +0 -5
  146. package/dist/translations/eu.umd.js +0 -11
  147. package/dist/translations/fa.d.ts +0 -8
  148. package/dist/translations/fa.js +0 -5
  149. package/dist/translations/fa.umd.js +0 -11
  150. package/dist/translations/fi.d.ts +0 -8
  151. package/dist/translations/fi.js +0 -5
  152. package/dist/translations/fi.umd.js +0 -11
  153. package/dist/translations/fr.d.ts +0 -8
  154. package/dist/translations/fr.js +0 -5
  155. package/dist/translations/fr.umd.js +0 -11
  156. package/dist/translations/gl.d.ts +0 -8
  157. package/dist/translations/gl.js +0 -5
  158. package/dist/translations/gl.umd.js +0 -11
  159. package/dist/translations/gu.d.ts +0 -8
  160. package/dist/translations/gu.js +0 -5
  161. package/dist/translations/gu.umd.js +0 -11
  162. package/dist/translations/he.d.ts +0 -8
  163. package/dist/translations/he.js +0 -5
  164. package/dist/translations/he.umd.js +0 -11
  165. package/dist/translations/hi.d.ts +0 -8
  166. package/dist/translations/hi.js +0 -5
  167. package/dist/translations/hi.umd.js +0 -11
  168. package/dist/translations/hr.d.ts +0 -8
  169. package/dist/translations/hr.js +0 -5
  170. package/dist/translations/hr.umd.js +0 -11
  171. package/dist/translations/hu.d.ts +0 -8
  172. package/dist/translations/hu.js +0 -5
  173. package/dist/translations/hu.umd.js +0 -11
  174. package/dist/translations/hy.d.ts +0 -8
  175. package/dist/translations/hy.js +0 -5
  176. package/dist/translations/hy.umd.js +0 -11
  177. package/dist/translations/id.d.ts +0 -8
  178. package/dist/translations/id.js +0 -5
  179. package/dist/translations/id.umd.js +0 -11
  180. package/dist/translations/it.d.ts +0 -8
  181. package/dist/translations/it.js +0 -5
  182. package/dist/translations/it.umd.js +0 -11
  183. package/dist/translations/ja.d.ts +0 -8
  184. package/dist/translations/ja.js +0 -5
  185. package/dist/translations/ja.umd.js +0 -11
  186. package/dist/translations/jv.d.ts +0 -8
  187. package/dist/translations/jv.js +0 -5
  188. package/dist/translations/jv.umd.js +0 -11
  189. package/dist/translations/kk.d.ts +0 -8
  190. package/dist/translations/kk.js +0 -5
  191. package/dist/translations/kk.umd.js +0 -11
  192. package/dist/translations/km.d.ts +0 -8
  193. package/dist/translations/km.js +0 -5
  194. package/dist/translations/km.umd.js +0 -11
  195. package/dist/translations/kn.d.ts +0 -8
  196. package/dist/translations/kn.js +0 -5
  197. package/dist/translations/kn.umd.js +0 -11
  198. package/dist/translations/ko.d.ts +0 -8
  199. package/dist/translations/ko.js +0 -5
  200. package/dist/translations/ko.umd.js +0 -11
  201. package/dist/translations/ku.d.ts +0 -8
  202. package/dist/translations/ku.js +0 -5
  203. package/dist/translations/ku.umd.js +0 -11
  204. package/dist/translations/lt.d.ts +0 -8
  205. package/dist/translations/lt.js +0 -5
  206. package/dist/translations/lt.umd.js +0 -11
  207. package/dist/translations/lv.d.ts +0 -8
  208. package/dist/translations/lv.js +0 -5
  209. package/dist/translations/lv.umd.js +0 -11
  210. package/dist/translations/ms.d.ts +0 -8
  211. package/dist/translations/ms.js +0 -5
  212. package/dist/translations/ms.umd.js +0 -11
  213. package/dist/translations/nb.d.ts +0 -8
  214. package/dist/translations/nb.js +0 -5
  215. package/dist/translations/nb.umd.js +0 -11
  216. package/dist/translations/ne.d.ts +0 -8
  217. package/dist/translations/ne.js +0 -5
  218. package/dist/translations/ne.umd.js +0 -11
  219. package/dist/translations/nl.d.ts +0 -8
  220. package/dist/translations/nl.js +0 -5
  221. package/dist/translations/nl.umd.js +0 -11
  222. package/dist/translations/no.d.ts +0 -8
  223. package/dist/translations/no.js +0 -5
  224. package/dist/translations/no.umd.js +0 -11
  225. package/dist/translations/oc.d.ts +0 -8
  226. package/dist/translations/oc.js +0 -5
  227. package/dist/translations/oc.umd.js +0 -11
  228. package/dist/translations/pl.d.ts +0 -8
  229. package/dist/translations/pl.js +0 -5
  230. package/dist/translations/pl.umd.js +0 -11
  231. package/dist/translations/pt-br.d.ts +0 -8
  232. package/dist/translations/pt-br.js +0 -5
  233. package/dist/translations/pt-br.umd.js +0 -11
  234. package/dist/translations/pt.d.ts +0 -8
  235. package/dist/translations/pt.js +0 -5
  236. package/dist/translations/pt.umd.js +0 -11
  237. package/dist/translations/ro.d.ts +0 -8
  238. package/dist/translations/ro.js +0 -5
  239. package/dist/translations/ro.umd.js +0 -11
  240. package/dist/translations/ru.d.ts +0 -8
  241. package/dist/translations/ru.js +0 -5
  242. package/dist/translations/ru.umd.js +0 -11
  243. package/dist/translations/si.d.ts +0 -8
  244. package/dist/translations/si.js +0 -5
  245. package/dist/translations/si.umd.js +0 -11
  246. package/dist/translations/sk.d.ts +0 -8
  247. package/dist/translations/sk.js +0 -5
  248. package/dist/translations/sk.umd.js +0 -11
  249. package/dist/translations/sl.d.ts +0 -8
  250. package/dist/translations/sl.js +0 -5
  251. package/dist/translations/sl.umd.js +0 -11
  252. package/dist/translations/sq.d.ts +0 -8
  253. package/dist/translations/sq.js +0 -5
  254. package/dist/translations/sq.umd.js +0 -11
  255. package/dist/translations/sr-latn.d.ts +0 -8
  256. package/dist/translations/sr-latn.js +0 -5
  257. package/dist/translations/sr-latn.umd.js +0 -11
  258. package/dist/translations/sr.d.ts +0 -8
  259. package/dist/translations/sr.js +0 -5
  260. package/dist/translations/sr.umd.js +0 -11
  261. package/dist/translations/sv.d.ts +0 -8
  262. package/dist/translations/sv.js +0 -5
  263. package/dist/translations/sv.umd.js +0 -11
  264. package/dist/translations/th.d.ts +0 -8
  265. package/dist/translations/th.js +0 -5
  266. package/dist/translations/th.umd.js +0 -11
  267. package/dist/translations/ti.d.ts +0 -8
  268. package/dist/translations/ti.js +0 -5
  269. package/dist/translations/ti.umd.js +0 -11
  270. package/dist/translations/tk.d.ts +0 -8
  271. package/dist/translations/tk.js +0 -5
  272. package/dist/translations/tk.umd.js +0 -11
  273. package/dist/translations/tr.d.ts +0 -8
  274. package/dist/translations/tr.js +0 -5
  275. package/dist/translations/tr.umd.js +0 -11
  276. package/dist/translations/tt.d.ts +0 -8
  277. package/dist/translations/tt.js +0 -5
  278. package/dist/translations/tt.umd.js +0 -11
  279. package/dist/translations/ug.d.ts +0 -8
  280. package/dist/translations/ug.js +0 -5
  281. package/dist/translations/ug.umd.js +0 -11
  282. package/dist/translations/uk.d.ts +0 -8
  283. package/dist/translations/uk.js +0 -5
  284. package/dist/translations/uk.umd.js +0 -11
  285. package/dist/translations/ur.d.ts +0 -8
  286. package/dist/translations/ur.js +0 -5
  287. package/dist/translations/ur.umd.js +0 -11
  288. package/dist/translations/uz.d.ts +0 -8
  289. package/dist/translations/uz.js +0 -5
  290. package/dist/translations/uz.umd.js +0 -11
  291. package/dist/translations/vi.d.ts +0 -8
  292. package/dist/translations/vi.js +0 -5
  293. package/dist/translations/vi.umd.js +0 -11
  294. package/dist/translations/zh-cn.d.ts +0 -8
  295. package/dist/translations/zh-cn.js +0 -5
  296. package/dist/translations/zh-cn.umd.js +0 -11
  297. package/dist/translations/zh.d.ts +0 -8
  298. package/dist/translations/zh.js +0 -5
  299. package/dist/translations/zh.umd.js +0 -11
  300. package/lang/contexts.json +0 -24
  301. package/lang/translations/af.po +0 -100
  302. package/lang/translations/ar.po +0 -100
  303. package/lang/translations/ast.po +0 -100
  304. package/lang/translations/az.po +0 -100
  305. package/lang/translations/bg.po +0 -100
  306. package/lang/translations/bn.po +0 -100
  307. package/lang/translations/bs.po +0 -100
  308. package/lang/translations/ca.po +0 -100
  309. package/lang/translations/cs.po +0 -100
  310. package/lang/translations/da.po +0 -100
  311. package/lang/translations/de-ch.po +0 -100
  312. package/lang/translations/de.po +0 -100
  313. package/lang/translations/el.po +0 -100
  314. package/lang/translations/en-au.po +0 -100
  315. package/lang/translations/en-gb.po +0 -100
  316. package/lang/translations/en.po +0 -100
  317. package/lang/translations/eo.po +0 -100
  318. package/lang/translations/es-co.po +0 -100
  319. package/lang/translations/es.po +0 -100
  320. package/lang/translations/et.po +0 -100
  321. package/lang/translations/eu.po +0 -100
  322. package/lang/translations/fa.po +0 -100
  323. package/lang/translations/fi.po +0 -100
  324. package/lang/translations/fr.po +0 -100
  325. package/lang/translations/gl.po +0 -100
  326. package/lang/translations/gu.po +0 -100
  327. package/lang/translations/he.po +0 -100
  328. package/lang/translations/hi.po +0 -100
  329. package/lang/translations/hr.po +0 -100
  330. package/lang/translations/hu.po +0 -100
  331. package/lang/translations/hy.po +0 -100
  332. package/lang/translations/id.po +0 -100
  333. package/lang/translations/it.po +0 -100
  334. package/lang/translations/ja.po +0 -100
  335. package/lang/translations/jv.po +0 -100
  336. package/lang/translations/kk.po +0 -100
  337. package/lang/translations/km.po +0 -100
  338. package/lang/translations/kn.po +0 -100
  339. package/lang/translations/ko.po +0 -100
  340. package/lang/translations/ku.po +0 -100
  341. package/lang/translations/lt.po +0 -100
  342. package/lang/translations/lv.po +0 -100
  343. package/lang/translations/ms.po +0 -100
  344. package/lang/translations/nb.po +0 -100
  345. package/lang/translations/ne.po +0 -100
  346. package/lang/translations/nl.po +0 -100
  347. package/lang/translations/no.po +0 -100
  348. package/lang/translations/oc.po +0 -100
  349. package/lang/translations/pl.po +0 -100
  350. package/lang/translations/pt-br.po +0 -100
  351. package/lang/translations/pt.po +0 -100
  352. package/lang/translations/ro.po +0 -100
  353. package/lang/translations/ru.po +0 -100
  354. package/lang/translations/si.po +0 -100
  355. package/lang/translations/sk.po +0 -100
  356. package/lang/translations/sl.po +0 -100
  357. package/lang/translations/sq.po +0 -100
  358. package/lang/translations/sr-latn.po +0 -100
  359. package/lang/translations/sr.po +0 -100
  360. package/lang/translations/sv.po +0 -100
  361. package/lang/translations/th.po +0 -100
  362. package/lang/translations/ti.po +0 -100
  363. package/lang/translations/tk.po +0 -100
  364. package/lang/translations/tr.po +0 -100
  365. package/lang/translations/tt.po +0 -100
  366. package/lang/translations/ug.po +0 -100
  367. package/lang/translations/uk.po +0 -100
  368. package/lang/translations/ur.po +0 -100
  369. package/lang/translations/uz.po +0 -100
  370. package/lang/translations/vi.po +0 -100
  371. package/lang/translations/zh-cn.po +0 -100
  372. package/lang/translations/zh.po +0 -100
  373. package/src/augmentation.d.ts +0 -25
  374. package/src/augmentation.js +0 -5
  375. package/src/emoji.d.ts +0 -32
  376. package/src/emoji.js +0 -38
  377. package/src/emojicommand.d.ts +0 -24
  378. package/src/emojicommand.js +0 -33
  379. package/src/emojiconfig.d.ts +0 -98
  380. package/src/emojiconfig.js +0 -5
  381. package/src/emojimention.d.ts +0 -75
  382. package/src/emojimention.js +0 -210
  383. package/src/emojipicker.d.ts +0 -97
  384. package/src/emojipicker.js +0 -255
  385. package/src/emojirepository.d.ts +0 -169
  386. package/src/emojirepository.js +0 -290
  387. package/src/emojiutils.d.ts +0 -58
  388. package/src/emojiutils.js +0 -141
  389. package/src/index.d.ts +0 -15
  390. package/src/index.js +0 -14
  391. package/src/ui/emojicategoriesview.d.ts +0 -68
  392. package/src/ui/emojicategoriesview.js +0 -131
  393. package/src/ui/emojigridview.d.ts +0 -140
  394. package/src/ui/emojigridview.js +0 -183
  395. package/src/ui/emojipickerview.d.ts +0 -91
  396. package/src/ui/emojipickerview.js +0 -173
  397. package/src/ui/emojisearchview.d.ts +0 -51
  398. package/src/ui/emojisearchview.js +0 -89
  399. package/src/ui/emojitoneview.d.ts +0 -46
  400. package/src/ui/emojitoneview.js +0 -89
  401. package/src/utils/isemojisupported.d.ts +0 -11
  402. package/src/utils/isemojisupported.js +0 -68
  403. package/theme/emojicategories.css +0 -29
  404. package/theme/emojigrid.css +0 -55
  405. package/theme/emojipicker.css +0 -32
  406. package/theme/emojitone.css +0 -21
@@ -1,173 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module emoji/ui/emojipickerview
7
- */
8
- import { FocusCycler, SearchInfoView, View } from 'ckeditor5/src/ui.js';
9
- import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';
10
- import EmojiGridView from './emojigridview.js';
11
- import EmojiCategoriesView from './emojicategoriesview.js';
12
- import EmojiSearchView from './emojisearchview.js';
13
- import EmojiToneView from './emojitoneview.js';
14
- /**
15
- * A view that glues pieces of the emoji panel together.
16
- */
17
- export default class EmojiPickerView extends View {
18
- /**
19
- * @inheritDoc
20
- */
21
- constructor(locale, { emojiCategories, getEmojiByQuery, skinTone, skinTones }) {
22
- super(locale);
23
- const categoryName = emojiCategories[0].title;
24
- this.gridView = new EmojiGridView(locale, {
25
- categoryName,
26
- emojiCategories,
27
- getEmojiByQuery,
28
- skinTone
29
- });
30
- this.infoView = new SearchInfoView();
31
- this.searchView = new EmojiSearchView(locale, {
32
- gridView: this.gridView,
33
- resultsView: this.infoView
34
- });
35
- this.categoriesView = new EmojiCategoriesView(locale, {
36
- emojiCategories,
37
- categoryName
38
- });
39
- this.toneView = new EmojiToneView(locale, {
40
- skinTone,
41
- skinTones
42
- });
43
- this.items = this.createCollection([
44
- this.searchView,
45
- this.toneView,
46
- this.categoriesView,
47
- this.gridView,
48
- this.infoView
49
- ]);
50
- this.focusTracker = new FocusTracker();
51
- this.keystrokes = new KeystrokeHandler();
52
- this.focusCycler = new FocusCycler({
53
- focusables: this.items,
54
- focusTracker: this.focusTracker,
55
- keystrokeHandler: this.keystrokes,
56
- actions: {
57
- focusPrevious: 'shift + tab',
58
- focusNext: 'tab'
59
- }
60
- });
61
- this.setTemplate({
62
- tag: 'div',
63
- children: [
64
- {
65
- tag: 'div',
66
- children: [
67
- this.searchView,
68
- this.toneView
69
- ],
70
- attributes: {
71
- class: ['ck', 'ck-emoji__search']
72
- }
73
- },
74
- this.categoriesView,
75
- this.gridView,
76
- {
77
- tag: 'div',
78
- children: [
79
- this.infoView
80
- ],
81
- attributes: {
82
- class: ['ck', 'ck-search__results']
83
- }
84
- }
85
- ],
86
- attributes: {
87
- tabindex: '-1',
88
- class: ['ck', 'ck-emoji', 'ck-search']
89
- }
90
- });
91
- this._setupEventListeners();
92
- }
93
- /**
94
- * @inheritDoc
95
- */
96
- render() {
97
- super.render();
98
- this.focusTracker.add(this.searchView.element);
99
- this.focusTracker.add(this.toneView.element);
100
- this.focusTracker.add(this.categoriesView.element);
101
- this.focusTracker.add(this.gridView.element);
102
- this.focusTracker.add(this.infoView.element);
103
- // Start listening for the keystrokes coming from #element.
104
- this.keystrokes.listenTo(this.element);
105
- }
106
- /**
107
- * @inheritDoc
108
- */
109
- destroy() {
110
- super.destroy();
111
- this.focusTracker.destroy();
112
- this.keystrokes.destroy();
113
- }
114
- /**
115
- * Focuses the search input.
116
- */
117
- focus() {
118
- this.searchView.focus();
119
- }
120
- /**
121
- * Initializes interactions between sub-views.
122
- */
123
- _setupEventListeners() {
124
- const t = this.locale.t;
125
- // Disable the category switcher when filtering by a query.
126
- this.searchView.on('search', (evt, data) => {
127
- if (data.query) {
128
- this.categoriesView.disableCategories();
129
- }
130
- else {
131
- this.categoriesView.enableCategories();
132
- }
133
- });
134
- // Show a user-friendly message depending on the search query.
135
- this.searchView.on('search', (evt, data) => {
136
- if (data.query.length === 1) {
137
- this.infoView.set({
138
- primaryText: t('Keep on typing to see the emoji.'),
139
- secondaryText: t('The query must contain at least two characters.'),
140
- isVisible: true
141
- });
142
- }
143
- else if (!data.resultsCount) {
144
- this.infoView.set({
145
- primaryText: t('No emojis were found matching "%0".', data.query),
146
- secondaryText: t('Please try a different phrase or check the spelling.'),
147
- isVisible: true
148
- });
149
- }
150
- else {
151
- this.infoView.set({
152
- isVisible: false
153
- });
154
- }
155
- });
156
- // Emit an update event to react to balloon dimensions changes.
157
- this.searchView.on('search', () => {
158
- this.fire('update');
159
- this.gridView.element.scrollTo(0, 0);
160
- });
161
- // Update the grid of emojis when the selected category is changed.
162
- this.categoriesView.on('change:categoryName', (ev, args, categoryName) => {
163
- this.gridView.categoryName = categoryName;
164
- this.searchView.search('');
165
- });
166
- // Update the grid of emojis when the selected skin tone is changed.
167
- // In such a case, the displayed emoji should use an updated skin tone value.
168
- this.toneView.on('change:skinTone', (evt, propertyName, newValue) => {
169
- this.gridView.skinTone = newValue;
170
- this.searchView.search(this.searchView.getInputValue());
171
- });
172
- }
173
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { SearchTextView, View, type SearchInfoView } from 'ckeditor5/src/ui.js';
6
- import type { Locale } from 'ckeditor5/src/utils.js';
7
- import type EmojiGridView from './emojigridview.js';
8
- /**
9
- * A view responsible for providing an input element that allows filtering emoji by the provided query.
10
- */
11
- export default class EmojiSearchView extends View {
12
- /**
13
- * The find in text input view that stores the searched string.
14
- */
15
- readonly inputView: SearchTextView;
16
- /**
17
- * An instance of the `EmojiGridView`.
18
- */
19
- readonly gridView: EmojiGridView;
20
- /**
21
- * @inheritDoc
22
- */
23
- constructor(locale: Locale, { gridView, resultsView }: {
24
- gridView: EmojiGridView;
25
- resultsView: SearchInfoView;
26
- });
27
- /**
28
- * @inheritDoc
29
- */
30
- destroy(): void;
31
- /**
32
- * Searches the {@link #gridView} for the given query.
33
- *
34
- * @param query The search query string.
35
- */
36
- search(query: string): void;
37
- /**
38
- * Allows defining the default value in the search text field.
39
- *
40
- * @param value The new value.
41
- */
42
- setInputValue(value: string): void;
43
- /**
44
- * Returns an input provided by a user in the search text field.
45
- */
46
- getInputValue(): string;
47
- /**
48
- * @inheritDoc
49
- */
50
- focus(): void;
51
- }
@@ -1,89 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module emoji/ui/emojisearchview
7
- */
8
- import { escapeRegExp } from 'lodash-es';
9
- import { createLabeledInputText, SearchTextView, View } from 'ckeditor5/src/ui.js';
10
- /**
11
- * A view responsible for providing an input element that allows filtering emoji by the provided query.
12
- */
13
- export default class EmojiSearchView extends View {
14
- /**
15
- * @inheritDoc
16
- */
17
- constructor(locale, { gridView, resultsView }) {
18
- super(locale);
19
- this.gridView = gridView;
20
- const t = locale.t;
21
- this.inputView = new SearchTextView(this.locale, {
22
- queryView: {
23
- label: t('Find an emoji (min. 2 characters)'),
24
- creator: createLabeledInputText
25
- },
26
- filteredView: this.gridView,
27
- infoView: {
28
- instance: resultsView
29
- }
30
- });
31
- this.setTemplate({
32
- tag: 'div',
33
- attributes: {
34
- class: [
35
- 'ck',
36
- 'ck-search'
37
- ],
38
- tabindex: '-1'
39
- },
40
- children: [
41
- this.inputView.queryView
42
- ]
43
- });
44
- // Pass through the `search` event to handle it by a parent view.
45
- this.inputView.delegate('search').to(this);
46
- }
47
- /**
48
- * @inheritDoc
49
- */
50
- destroy() {
51
- super.destroy();
52
- this.inputView.destroy();
53
- }
54
- /**
55
- * Searches the {@link #gridView} for the given query.
56
- *
57
- * @param query The search query string.
58
- */
59
- search(query) {
60
- const regExp = query ? new RegExp(escapeRegExp(query), 'ig') : null;
61
- const filteringResults = this.gridView.filter(regExp);
62
- this.inputView.fire('search', { query, ...filteringResults });
63
- }
64
- /**
65
- * Allows defining the default value in the search text field.
66
- *
67
- * @param value The new value.
68
- */
69
- setInputValue(value) {
70
- if (!value) {
71
- this.inputView.queryView.fieldView.reset();
72
- }
73
- else {
74
- this.inputView.queryView.fieldView.value = value;
75
- }
76
- }
77
- /**
78
- * Returns an input provided by a user in the search text field.
79
- */
80
- getInputValue() {
81
- return this.inputView.queryView.fieldView.element.value;
82
- }
83
- /**
84
- * @inheritDoc
85
- */
86
- focus() {
87
- this.inputView.focus();
88
- }
89
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module emoji/ui/emojitoneview
7
- */
8
- import { View, type DropdownView } from 'ckeditor5/src/ui.js';
9
- import { type Locale } from 'ckeditor5/src/utils.js';
10
- import type { SkinToneId } from '../emojiconfig.js';
11
- import type { SkinTone } from '../emojirepository.js';
12
- import '../../theme/emojitone.css';
13
- /**
14
- * A view responsible for selecting a skin tone for an emoji.
15
- */
16
- export default class EmojiToneView extends View {
17
- /**
18
- * Active skin tone.
19
- *
20
- * @observable
21
- */
22
- skinTone: SkinToneId;
23
- /**
24
- * A dropdown element for selecting an active skin tone.
25
- */
26
- readonly dropdownView: DropdownView;
27
- /**
28
- * An array of available skin tones.
29
- */
30
- private readonly _skinTones;
31
- /**
32
- * @inheritDoc
33
- */
34
- constructor(locale: Locale, { skinTone, skinTones }: {
35
- skinTone: SkinToneId;
36
- skinTones: Array<SkinTone>;
37
- });
38
- /**
39
- * @inheritDoc
40
- */
41
- focus(): void;
42
- /**
43
- * Helper method for receiving an object describing the active skin tone.
44
- */
45
- private _getSkinTone;
46
- }
@@ -1,89 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module emoji/ui/emojitoneview
7
- */
8
- import { createDropdown, addListToDropdown, View, ViewModel } from 'ckeditor5/src/ui.js';
9
- import { Collection } from 'ckeditor5/src/utils.js';
10
- import '../../theme/emojitone.css';
11
- /**
12
- * A view responsible for selecting a skin tone for an emoji.
13
- */
14
- export default class EmojiToneView extends View {
15
- /**
16
- * @inheritDoc
17
- */
18
- constructor(locale, { skinTone, skinTones }) {
19
- super(locale);
20
- this.set('skinTone', skinTone);
21
- this._skinTones = skinTones;
22
- const t = locale.t;
23
- const accessibleLabel = t('Select skin tone');
24
- const dropdownView = createDropdown(locale);
25
- const itemDefinitions = new Collection();
26
- for (const { id, icon, tooltip } of this._skinTones) {
27
- const def = {
28
- type: 'button',
29
- model: new ViewModel({
30
- value: id,
31
- label: icon,
32
- ariaLabel: tooltip,
33
- tooltip,
34
- tooltipPosition: 'e',
35
- role: 'menuitemradio',
36
- withText: true,
37
- // To improve accessibility, disconnect a button and its label connection so that screen
38
- // readers can read the `[aria-label]` attribute directly from the more descriptive button.
39
- ariaLabelledBy: undefined
40
- })
41
- };
42
- def.model.bind('isOn').to(this, 'skinTone', value => value === id);
43
- itemDefinitions.add(def);
44
- }
45
- addListToDropdown(dropdownView, itemDefinitions, {
46
- ariaLabel: accessibleLabel,
47
- role: 'menu'
48
- });
49
- dropdownView.buttonView.set({
50
- label: this._getSkinTone().icon,
51
- ariaLabel: accessibleLabel,
52
- ariaLabelledBy: undefined,
53
- isOn: false,
54
- withText: true,
55
- tooltip: accessibleLabel
56
- });
57
- this.dropdownView = dropdownView;
58
- // Execute command when an item from the dropdown is selected.
59
- this.listenTo(dropdownView, 'execute', evt => {
60
- this.skinTone = evt.source.value;
61
- });
62
- dropdownView.buttonView.bind('label').to(this, 'skinTone', () => {
63
- return this._getSkinTone().icon;
64
- });
65
- dropdownView.buttonView.bind('ariaLabel').to(this, 'skinTone', () => {
66
- // Render a current state, but also what the dropdown does.
67
- return `${this._getSkinTone().tooltip}, ${accessibleLabel}`;
68
- });
69
- this.setTemplate({
70
- tag: 'div',
71
- attributes: {
72
- class: ['ck', 'ck-emoji__skin-tone']
73
- },
74
- children: [dropdownView]
75
- });
76
- }
77
- /**
78
- * @inheritDoc
79
- */
80
- focus() {
81
- this.dropdownView.buttonView.focus();
82
- }
83
- /**
84
- * Helper method for receiving an object describing the active skin tone.
85
- */
86
- _getSkinTone() {
87
- return this._skinTones.find(tone => tone.id === this.skinTone);
88
- }
89
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2023, Koala Interactive SAS
3
- * For licensing, see https://github.com/koala-interactive/is-emoji-supported/blob/master/LICENSE.md
4
- */
5
- /**
6
- * @module emoji/utils/isemojisupported
7
- */
8
- /**
9
- * Checks if the two pixels parts are the same using canvas.
10
- */
11
- export default function isEmojiSupported(unicode: string): boolean;
@@ -1,68 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2023, Koala Interactive SAS
3
- * For licensing, see https://github.com/koala-interactive/is-emoji-supported/blob/master/LICENSE.md
4
- */
5
- /**
6
- * @module emoji/utils/isemojisupported
7
- */
8
- /**
9
- * Checks if the two pixels parts are the same using canvas.
10
- */
11
- export default function isEmojiSupported(unicode) {
12
- const ctx = getCanvas();
13
- /* istanbul ignore next -- @preserve */
14
- if (!ctx) {
15
- return false;
16
- }
17
- const CANVAS_HEIGHT = 25;
18
- const CANVAS_WIDTH = 20;
19
- const textSize = Math.floor(CANVAS_HEIGHT / 2);
20
- // Initialize canvas context.
21
- ctx.font = textSize + 'px Arial, Sans-Serif';
22
- ctx.textBaseline = 'top';
23
- ctx.canvas.width = CANVAS_WIDTH * 2;
24
- ctx.canvas.height = CANVAS_HEIGHT;
25
- ctx.clearRect(0, 0, CANVAS_WIDTH * 2, CANVAS_HEIGHT);
26
- // Draw in red on the left.
27
- ctx.fillStyle = '#FF0000';
28
- ctx.fillText(unicode, 0, 22);
29
- // Draw in blue on right.
30
- ctx.fillStyle = '#0000FF';
31
- ctx.fillText(unicode, CANVAS_WIDTH, 22);
32
- const a = ctx.getImageData(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT).data;
33
- const count = a.length;
34
- let i = 0;
35
- // Search the first visible pixel.
36
- for (; i < count && !a[i + 3]; i += 4)
37
- ;
38
- // No visible pixel.
39
- /* istanbul ignore next -- @preserve */
40
- if (i >= count) {
41
- return false;
42
- }
43
- // Emoji has immutable color, so we check the color of the emoji in two different colors.
44
- // the result show be the same.
45
- const x = CANVAS_WIDTH + ((i / 4) % CANVAS_WIDTH);
46
- const y = Math.floor(i / 4 / CANVAS_WIDTH);
47
- const b = ctx.getImageData(x, y, 1, 1).data;
48
- if (a[i] !== b[0] || a[i + 2] !== b[2]) {
49
- return false;
50
- }
51
- //Some emojis consist of different ones, so they will show multiple characters if they are not supported.
52
- /* istanbul ignore next -- @preserve */
53
- if (ctx.measureText(unicode).width >= CANVAS_WIDTH) {
54
- return false;
55
- }
56
- // Supported.
57
- return true;
58
- }
59
- ;
60
- function getCanvas() {
61
- try {
62
- return document.createElement('canvas').getContext('2d', { willReadFrequently: true });
63
- }
64
- catch {
65
- /* istanbul ignore next -- @preserve */
66
- return null;
67
- }
68
- }
@@ -1,29 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
- .ck.ck-emoji__categories-list {
7
- display: flex;
8
- justify-content: space-between;
9
- margin: 0 var(--ck-spacing-large);
10
-
11
- > .ck.ck-button.ck-button_with-text {
12
- border-width: 0;
13
- border-bottom-width: 2px;
14
- border-bottom-style: solid;
15
- border-bottom-color: transparent;
16
- padding: 0;
17
- font-size: var(--ck-font-size-big);
18
- min-width: var(--ck-font-size-big);
19
- min-height: var(--ck-font-size-big);
20
-
21
- &.ck-emoji__category-item.ck-on {
22
- border-bottom-color: var(--ck-color-base-active);
23
- }
24
-
25
- > span {
26
- margin: auto;
27
- }
28
- }
29
- }
@@ -1,55 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
- :root {
7
- --ck-emoji-grid-tile-size: 27px;
8
- }
9
-
10
- .ck.ck-emoji {
11
- & .ck.ck-emoji__tiles {
12
- max-width: 100%;
13
- max-height: min(265px, 40vh);
14
-
15
- overflow-y: auto;
16
- overflow-x: hidden;
17
- border-top: 1px solid var(--ck-color-base-border);
18
-
19
- & .ck-emoji__grid {
20
- display: grid;
21
- grid-template-columns: repeat(auto-fill, minmax(var(--ck-emoji-grid-tile-size), 1fr));
22
- margin: var(--ck-spacing-standard) var(--ck-spacing-large);
23
- grid-gap: var(--ck-spacing-small);
24
- }
25
-
26
- & .ck-emoji__tile {
27
- width: var(--ck-emoji-grid-tile-size);
28
- height: var(--ck-emoji-grid-tile-size);
29
- min-width: var(--ck-emoji-grid-tile-size);
30
- min-height: var(--ck-emoji-grid-tile-size);
31
- font-size: 1.5em;
32
- padding: 0;
33
- transition: .2s ease box-shadow;
34
- border: 0;
35
-
36
- @media (prefers-reduced-motion: reduce) {
37
- transition: none;
38
- }
39
-
40
- &:focus:not(.ck-disabled),
41
- &:hover:not(.ck-disabled) {
42
- /* Disable the default .ck-button's border ring. */
43
- border: 0;
44
- box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);
45
- }
46
-
47
- /* Make sure the glyph is rendered in the center of the button */
48
- & .ck-button__label {
49
- line-height: var(--ck-emoji-grid-tile-size);
50
- width: 100%;
51
- text-align: center;
52
- }
53
- }
54
- }
55
- }
@@ -1,32 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
- .ck.ck-emoji {
7
- width: 320px;
8
- }
9
-
10
- .ck .ck.ck-emoji__search {
11
- display: flex;
12
- padding: var(--ck-spacing-large);
13
- padding-bottom: var(--ck-spacing-medium);
14
- justify-content: space-between;
15
- align-items: center;
16
- }
17
-
18
- /*
19
- * Classes used by the "fake visual selection" displayed in the content when an input
20
- * in the emoji picker UI has focus (the browser does not render the native selection in this state).
21
- */
22
- .ck .ck-fake-emoji-selection {
23
- background: var(--ck-color-link-fake-selection);
24
- }
25
-
26
- /* A collapsed fake visual selection. */
27
- .ck .ck-fake-emoji-selection_collapsed {
28
- height: 100%;
29
- border-right: 1px solid var(--ck-color-base-text);
30
- margin-right: -1px;
31
- outline: solid 1px hsla(0, 0%, 100%, .5);
32
- }
@@ -1,21 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
- .ck.ck-emoji__skin-tone {
7
- margin-left: var(--ck-spacing-standard);
8
-
9
- > .ck.ck-dropdown {
10
-
11
- .ck.ck-list__item {
12
- min-width: 1em;
13
- }
14
-
15
- .ck-button.ck-dropdown__button {
16
- .ck-button__label {
17
- width: initial;
18
- }
19
- }
20
- }
21
- }