@bobfrankston/rmfmail 1.0.655 → 1.0.657

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 (280) hide show
  1. package/bin/build-tinymce.js +42 -0
  2. package/bin/mailx.js +54 -23
  3. package/bin/mailx.js.map +1 -1
  4. package/bin/mailx.ts +45 -20
  5. package/client/compose/editor.js +7 -1
  6. package/client/compose/editor.js.map +1 -1
  7. package/client/compose/editor.ts +7 -1
  8. package/client/lib/rmf-tiny.js +21 -3
  9. package/client/lib/tinymce/CHANGELOG.md +3991 -0
  10. package/client/lib/tinymce/README.md +77 -0
  11. package/client/lib/tinymce/bower.json +27 -0
  12. package/client/lib/tinymce/composer.json +52 -0
  13. package/client/lib/tinymce/icons/default/icons.js +270 -0
  14. package/client/lib/tinymce/icons/default/icons.min.js +1 -0
  15. package/client/lib/tinymce/icons/default/index.js +7 -0
  16. package/client/lib/tinymce/license.md +9 -0
  17. package/client/lib/tinymce/models/dom/index.js +7 -0
  18. package/client/lib/tinymce/models/dom/model.js +8994 -0
  19. package/client/lib/tinymce/models/dom/model.min.js +1 -0
  20. package/client/lib/tinymce/notices.txt +21 -0
  21. package/client/lib/tinymce/package.json +32 -0
  22. package/client/lib/tinymce/plugins/accordion/index.js +7 -0
  23. package/client/lib/tinymce/plugins/accordion/plugin.js +1373 -0
  24. package/client/lib/tinymce/plugins/accordion/plugin.min.js +1 -0
  25. package/client/lib/tinymce/plugins/advlist/index.js +7 -0
  26. package/client/lib/tinymce/plugins/advlist/plugin.js +473 -0
  27. package/client/lib/tinymce/plugins/advlist/plugin.min.js +1 -0
  28. package/client/lib/tinymce/plugins/anchor/index.js +7 -0
  29. package/client/lib/tinymce/plugins/anchor/plugin.js +237 -0
  30. package/client/lib/tinymce/plugins/anchor/plugin.min.js +1 -0
  31. package/client/lib/tinymce/plugins/autolink/index.js +7 -0
  32. package/client/lib/tinymce/plugins/autolink/plugin.js +315 -0
  33. package/client/lib/tinymce/plugins/autolink/plugin.min.js +1 -0
  34. package/client/lib/tinymce/plugins/autoresize/index.js +7 -0
  35. package/client/lib/tinymce/plugins/autoresize/plugin.js +221 -0
  36. package/client/lib/tinymce/plugins/autoresize/plugin.min.js +1 -0
  37. package/client/lib/tinymce/plugins/autosave/index.js +7 -0
  38. package/client/lib/tinymce/plugins/autosave/plugin.js +249 -0
  39. package/client/lib/tinymce/plugins/autosave/plugin.min.js +1 -0
  40. package/client/lib/tinymce/plugins/charmap/index.js +7 -0
  41. package/client/lib/tinymce/plugins/charmap/plugin.js +997 -0
  42. package/client/lib/tinymce/plugins/charmap/plugin.min.js +1 -0
  43. package/client/lib/tinymce/plugins/code/index.js +7 -0
  44. package/client/lib/tinymce/plugins/code/plugin.js +98 -0
  45. package/client/lib/tinymce/plugins/code/plugin.min.js +1 -0
  46. package/client/lib/tinymce/plugins/codesample/index.js +7 -0
  47. package/client/lib/tinymce/plugins/codesample/plugin.js +3655 -0
  48. package/client/lib/tinymce/plugins/codesample/plugin.min.js +9 -0
  49. package/client/lib/tinymce/plugins/directionality/index.js +7 -0
  50. package/client/lib/tinymce/plugins/directionality/plugin.js +670 -0
  51. package/client/lib/tinymce/plugins/directionality/plugin.min.js +1 -0
  52. package/client/lib/tinymce/plugins/emoticons/index.js +7 -0
  53. package/client/lib/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
  54. package/client/lib/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
  55. package/client/lib/tinymce/plugins/emoticons/js/emojis.js +1 -0
  56. package/client/lib/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
  57. package/client/lib/tinymce/plugins/emoticons/plugin.js +809 -0
  58. package/client/lib/tinymce/plugins/emoticons/plugin.min.js +1 -0
  59. package/client/lib/tinymce/plugins/fullscreen/index.js +7 -0
  60. package/client/lib/tinymce/plugins/fullscreen/plugin.js +1607 -0
  61. package/client/lib/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  62. package/client/lib/tinymce/plugins/help/index.js +7 -0
  63. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
  64. package/client/lib/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +93 -0
  65. package/client/lib/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
  66. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
  67. package/client/lib/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
  68. package/client/lib/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
  69. package/client/lib/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
  70. package/client/lib/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
  71. package/client/lib/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
  72. package/client/lib/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
  73. package/client/lib/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
  74. package/client/lib/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
  75. package/client/lib/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
  76. package/client/lib/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +93 -0
  77. package/client/lib/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
  78. package/client/lib/tinymce/plugins/help/js/i18n/keynav/he-IL.js +93 -0
  79. package/client/lib/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
  80. package/client/lib/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
  81. package/client/lib/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
  82. package/client/lib/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +93 -0
  83. package/client/lib/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
  84. package/client/lib/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
  85. package/client/lib/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
  86. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
  87. package/client/lib/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
  88. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +93 -0
  89. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
  90. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
  91. package/client/lib/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +93 -0
  92. package/client/lib/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
  93. package/client/lib/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
  94. package/client/lib/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
  95. package/client/lib/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +93 -0
  96. package/client/lib/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +93 -0
  97. package/client/lib/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
  98. package/client/lib/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
  99. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
  100. package/client/lib/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
  101. package/client/lib/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
  102. package/client/lib/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +93 -0
  103. package/client/lib/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
  104. package/client/lib/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +93 -0
  105. package/client/lib/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
  106. package/client/lib/tinymce/plugins/help/js/i18n/keynav/th-TH.js +93 -0
  107. package/client/lib/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
  108. package/client/lib/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
  109. package/client/lib/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
  110. package/client/lib/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
  111. package/client/lib/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +87 -0
  112. package/client/lib/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +93 -0
  113. package/client/lib/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
  114. package/client/lib/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
  115. package/client/lib/tinymce/plugins/help/plugin.js +827 -0
  116. package/client/lib/tinymce/plugins/help/plugin.min.js +1 -0
  117. package/client/lib/tinymce/plugins/image/index.js +7 -0
  118. package/client/lib/tinymce/plugins/image/plugin.js +1692 -0
  119. package/client/lib/tinymce/plugins/image/plugin.min.js +1 -0
  120. package/client/lib/tinymce/plugins/importcss/index.js +7 -0
  121. package/client/lib/tinymce/plugins/importcss/plugin.js +401 -0
  122. package/client/lib/tinymce/plugins/importcss/plugin.min.js +1 -0
  123. package/client/lib/tinymce/plugins/insertdatetime/index.js +7 -0
  124. package/client/lib/tinymce/plugins/insertdatetime/plugin.js +187 -0
  125. package/client/lib/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
  126. package/client/lib/tinymce/plugins/link/index.js +7 -0
  127. package/client/lib/tinymce/plugins/link/plugin.js +1711 -0
  128. package/client/lib/tinymce/plugins/link/plugin.min.js +1 -0
  129. package/client/lib/tinymce/plugins/lists/index.js +7 -0
  130. package/client/lib/tinymce/plugins/lists/plugin.js +602 -0
  131. package/client/lib/tinymce/plugins/lists/plugin.min.js +1 -0
  132. package/client/lib/tinymce/plugins/media/index.js +7 -0
  133. package/client/lib/tinymce/plugins/media/plugin.js +1442 -0
  134. package/client/lib/tinymce/plugins/media/plugin.min.js +1 -0
  135. package/client/lib/tinymce/plugins/nonbreaking/index.js +7 -0
  136. package/client/lib/tinymce/plugins/nonbreaking/plugin.js +128 -0
  137. package/client/lib/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
  138. package/client/lib/tinymce/plugins/pagebreak/index.js +7 -0
  139. package/client/lib/tinymce/plugins/pagebreak/plugin.js +123 -0
  140. package/client/lib/tinymce/plugins/pagebreak/plugin.min.js +1 -0
  141. package/client/lib/tinymce/plugins/preview/index.js +7 -0
  142. package/client/lib/tinymce/plugins/preview/plugin.js +878 -0
  143. package/client/lib/tinymce/plugins/preview/plugin.min.js +1 -0
  144. package/client/lib/tinymce/plugins/quickbars/index.js +7 -0
  145. package/client/lib/tinymce/plugins/quickbars/plugin.js +654 -0
  146. package/client/lib/tinymce/plugins/quickbars/plugin.min.js +1 -0
  147. package/client/lib/tinymce/plugins/save/index.js +7 -0
  148. package/client/lib/tinymce/plugins/save/plugin.js +136 -0
  149. package/client/lib/tinymce/plugins/save/plugin.min.js +1 -0
  150. package/client/lib/tinymce/plugins/searchreplace/index.js +7 -0
  151. package/client/lib/tinymce/plugins/searchreplace/plugin.js +1367 -0
  152. package/client/lib/tinymce/plugins/searchreplace/plugin.min.js +1 -0
  153. package/client/lib/tinymce/plugins/table/index.js +7 -0
  154. package/client/lib/tinymce/plugins/table/plugin.js +4011 -0
  155. package/client/lib/tinymce/plugins/table/plugin.min.js +1 -0
  156. package/client/lib/tinymce/plugins/visualblocks/index.js +7 -0
  157. package/client/lib/tinymce/plugins/visualblocks/plugin.js +106 -0
  158. package/client/lib/tinymce/plugins/visualblocks/plugin.min.js +1 -0
  159. package/client/lib/tinymce/plugins/visualchars/index.js +7 -0
  160. package/client/lib/tinymce/plugins/visualchars/plugin.js +808 -0
  161. package/client/lib/tinymce/plugins/visualchars/plugin.min.js +1 -0
  162. package/client/lib/tinymce/plugins/wordcount/index.js +7 -0
  163. package/client/lib/tinymce/plugins/wordcount/plugin.js +586 -0
  164. package/client/lib/tinymce/plugins/wordcount/plugin.min.js +1 -0
  165. package/client/lib/tinymce/skins/content/dark/content.css +75 -0
  166. package/client/lib/tinymce/skins/content/dark/content.js +10 -0
  167. package/client/lib/tinymce/skins/content/dark/content.min.css +10 -0
  168. package/client/lib/tinymce/skins/content/dark/content.min.ts +3 -0
  169. package/client/lib/tinymce/skins/content/dark/content.ts +3 -0
  170. package/client/lib/tinymce/skins/content/default/content.css +70 -0
  171. package/client/lib/tinymce/skins/content/default/content.js +10 -0
  172. package/client/lib/tinymce/skins/content/default/content.min.css +10 -0
  173. package/client/lib/tinymce/skins/content/default/content.min.ts +3 -0
  174. package/client/lib/tinymce/skins/content/default/content.ts +3 -0
  175. package/client/lib/tinymce/skins/content/document/content.css +75 -0
  176. package/client/lib/tinymce/skins/content/document/content.js +10 -0
  177. package/client/lib/tinymce/skins/content/document/content.min.css +10 -0
  178. package/client/lib/tinymce/skins/content/document/content.min.ts +3 -0
  179. package/client/lib/tinymce/skins/content/document/content.ts +3 -0
  180. package/client/lib/tinymce/skins/content/tinymce-5/content.css +70 -0
  181. package/client/lib/tinymce/skins/content/tinymce-5/content.js +10 -0
  182. package/client/lib/tinymce/skins/content/tinymce-5/content.min.css +10 -0
  183. package/client/lib/tinymce/skins/content/tinymce-5/content.min.ts +3 -0
  184. package/client/lib/tinymce/skins/content/tinymce-5/content.ts +3 -0
  185. package/client/lib/tinymce/skins/content/tinymce-5-dark/content.css +75 -0
  186. package/client/lib/tinymce/skins/content/tinymce-5-dark/content.js +10 -0
  187. package/client/lib/tinymce/skins/content/tinymce-5-dark/content.min.css +10 -0
  188. package/client/lib/tinymce/skins/content/tinymce-5-dark/content.min.ts +3 -0
  189. package/client/lib/tinymce/skins/content/tinymce-5-dark/content.ts +3 -0
  190. package/client/lib/tinymce/skins/content/writer/content.css +71 -0
  191. package/client/lib/tinymce/skins/content/writer/content.js +10 -0
  192. package/client/lib/tinymce/skins/content/writer/content.min.css +10 -0
  193. package/client/lib/tinymce/skins/content/writer/content.min.ts +3 -0
  194. package/client/lib/tinymce/skins/content/writer/content.ts +3 -0
  195. package/client/lib/tinymce/skins/ui/oxide/content.css +1322 -0
  196. package/client/lib/tinymce/skins/ui/oxide/content.inline.css +1316 -0
  197. package/client/lib/tinymce/skins/ui/oxide/content.inline.js +10 -0
  198. package/client/lib/tinymce/skins/ui/oxide/content.inline.min.css +10 -0
  199. package/client/lib/tinymce/skins/ui/oxide/content.inline.min.ts +136 -0
  200. package/client/lib/tinymce/skins/ui/oxide/content.inline.ts +136 -0
  201. package/client/lib/tinymce/skins/ui/oxide/content.js +10 -0
  202. package/client/lib/tinymce/skins/ui/oxide/content.min.css +10 -0
  203. package/client/lib/tinymce/skins/ui/oxide/content.min.ts +136 -0
  204. package/client/lib/tinymce/skins/ui/oxide/content.ts +136 -0
  205. package/client/lib/tinymce/skins/ui/oxide/skin.css +7109 -0
  206. package/client/lib/tinymce/skins/ui/oxide/skin.js +1 -0
  207. package/client/lib/tinymce/skins/ui/oxide/skin.min.css +1 -0
  208. package/client/lib/tinymce/skins/ui/oxide/skin.min.ts +637 -0
  209. package/client/lib/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  210. package/client/lib/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
  211. package/client/lib/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  212. package/client/lib/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +9 -0
  213. package/client/lib/tinymce/skins/ui/oxide/skin.shadowdom.ts +9 -0
  214. package/client/lib/tinymce/skins/ui/oxide/skin.ts +637 -0
  215. package/client/lib/tinymce/skins/ui/oxide-dark/content.css +1310 -0
  216. package/client/lib/tinymce/skins/ui/oxide-dark/content.inline.css +1316 -0
  217. package/client/lib/tinymce/skins/ui/oxide-dark/content.inline.js +10 -0
  218. package/client/lib/tinymce/skins/ui/oxide-dark/content.inline.min.css +10 -0
  219. package/client/lib/tinymce/skins/ui/oxide-dark/content.inline.min.ts +136 -0
  220. package/client/lib/tinymce/skins/ui/oxide-dark/content.inline.ts +136 -0
  221. package/client/lib/tinymce/skins/ui/oxide-dark/content.js +10 -0
  222. package/client/lib/tinymce/skins/ui/oxide-dark/content.min.css +10 -0
  223. package/client/lib/tinymce/skins/ui/oxide-dark/content.min.ts +136 -0
  224. package/client/lib/tinymce/skins/ui/oxide-dark/content.ts +136 -0
  225. package/client/lib/tinymce/skins/ui/oxide-dark/skin.css +7112 -0
  226. package/client/lib/tinymce/skins/ui/oxide-dark/skin.js +1 -0
  227. package/client/lib/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  228. package/client/lib/tinymce/skins/ui/oxide-dark/skin.min.ts +637 -0
  229. package/client/lib/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  230. package/client/lib/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
  231. package/client/lib/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  232. package/client/lib/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +9 -0
  233. package/client/lib/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +9 -0
  234. package/client/lib/tinymce/skins/ui/oxide-dark/skin.ts +637 -0
  235. package/client/lib/tinymce/skins/ui/tinymce-5/content.css +1322 -0
  236. package/client/lib/tinymce/skins/ui/tinymce-5/content.inline.css +1316 -0
  237. package/client/lib/tinymce/skins/ui/tinymce-5/content.inline.js +10 -0
  238. package/client/lib/tinymce/skins/ui/tinymce-5/content.inline.min.css +10 -0
  239. package/client/lib/tinymce/skins/ui/tinymce-5/content.inline.min.ts +136 -0
  240. package/client/lib/tinymce/skins/ui/tinymce-5/content.inline.ts +136 -0
  241. package/client/lib/tinymce/skins/ui/tinymce-5/content.js +10 -0
  242. package/client/lib/tinymce/skins/ui/tinymce-5/content.min.css +10 -0
  243. package/client/lib/tinymce/skins/ui/tinymce-5/content.min.ts +136 -0
  244. package/client/lib/tinymce/skins/ui/tinymce-5/content.ts +136 -0
  245. package/client/lib/tinymce/skins/ui/tinymce-5/skin.css +7228 -0
  246. package/client/lib/tinymce/skins/ui/tinymce-5/skin.js +1 -0
  247. package/client/lib/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
  248. package/client/lib/tinymce/skins/ui/tinymce-5/skin.min.ts +638 -0
  249. package/client/lib/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
  250. package/client/lib/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
  251. package/client/lib/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  252. package/client/lib/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +9 -0
  253. package/client/lib/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +9 -0
  254. package/client/lib/tinymce/skins/ui/tinymce-5/skin.ts +638 -0
  255. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.css +1310 -0
  256. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1316 -0
  257. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.inline.js +10 -0
  258. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +10 -0
  259. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +136 -0
  260. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +136 -0
  261. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.js +10 -0
  262. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.min.css +10 -0
  263. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.min.ts +136 -0
  264. package/client/lib/tinymce/skins/ui/tinymce-5-dark/content.ts +136 -0
  265. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.css +7228 -0
  266. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
  267. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  268. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +638 -0
  269. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
  270. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
  271. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  272. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +9 -0
  273. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +9 -0
  274. package/client/lib/tinymce/skins/ui/tinymce-5-dark/skin.ts +638 -0
  275. package/client/lib/tinymce/themes/silver/index.js +7 -0
  276. package/client/lib/tinymce/themes/silver/theme.js +34829 -0
  277. package/client/lib/tinymce/themes/silver/theme.min.js +1 -0
  278. package/client/lib/tinymce/tinymce.js +41682 -0
  279. package/client/lib/tinymce/tinymce.min.js +10 -0
  280. package/package.json +5 -2
@@ -0,0 +1,670 @@
1
+ /**
2
+ * TinyMCE version 8.5.0 (2026-04-29)
3
+ */
4
+
5
+ (function () {
6
+ 'use strict';
7
+
8
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
+
10
+ /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
+ const hasProto = (v, constructor, predicate) => {
12
+ if (predicate(v, constructor.prototype)) {
13
+ return true;
14
+ }
15
+ else {
16
+ // String-based fallback time
17
+ return v.constructor?.name === constructor.name;
18
+ }
19
+ };
20
+ const typeOf = (x) => {
21
+ const t = typeof x;
22
+ if (x === null) {
23
+ return 'null';
24
+ }
25
+ else if (t === 'object' && Array.isArray(x)) {
26
+ return 'array';
27
+ }
28
+ else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
29
+ return 'string';
30
+ }
31
+ else {
32
+ return t;
33
+ }
34
+ };
35
+ const isType$1 = (type) => (value) => typeOf(value) === type;
36
+ const isSimpleType = (type) => (value) => typeof value === type;
37
+ const isString = isType$1('string');
38
+ const isBoolean = isSimpleType('boolean');
39
+ const isNullable = (a) => a === null || a === undefined;
40
+ const isNonNullable = (a) => !isNullable(a);
41
+ const isFunction = isSimpleType('function');
42
+ const isNumber = isSimpleType('number');
43
+
44
+ /** Compose two unary functions. Similar to compose, but avoids using Function.prototype.apply. */
45
+ const compose1 = (fbc, fab) => (a) => fbc(fab(a));
46
+ const constant = (value) => {
47
+ return () => {
48
+ return value;
49
+ };
50
+ };
51
+ const tripleEquals = (a, b) => {
52
+ return a === b;
53
+ };
54
+ const never = constant(false);
55
+
56
+ /**
57
+ * The `Optional` type represents a value (of any type) that potentially does
58
+ * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
59
+ * value does exist) or a `None` (in which case the value does not exist). This
60
+ * module defines a whole lot of FP-inspired utility functions for dealing with
61
+ * `Optional` objects.
62
+ *
63
+ * Comparison with null or undefined:
64
+ * - We don't get fancy null coalescing operators with `Optional`
65
+ * - We do get fancy helper functions with `Optional`
66
+ * - `Optional` support nesting, and allow for the type to still be nullable (or
67
+ * another `Optional`)
68
+ * - There is no option to turn off strict-optional-checks like there is for
69
+ * strict-null-checks
70
+ */
71
+ class Optional {
72
+ tag;
73
+ value;
74
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
75
+ // reuse the same object
76
+ static singletonNone = new Optional(false);
77
+ // The internal representation has a `tag` and a `value`, but both are
78
+ // private: able to be console.logged, but not able to be accessed by code
79
+ constructor(tag, value) {
80
+ this.tag = tag;
81
+ this.value = value;
82
+ }
83
+ // --- Identities ---
84
+ /**
85
+ * Creates a new `Optional<T>` that **does** contain a value.
86
+ */
87
+ static some(value) {
88
+ return new Optional(true, value);
89
+ }
90
+ /**
91
+ * Create a new `Optional<T>` that **does not** contain a value. `T` can be
92
+ * any type because we don't actually have a `T`.
93
+ */
94
+ static none() {
95
+ return Optional.singletonNone;
96
+ }
97
+ /**
98
+ * Perform a transform on an `Optional` type. Regardless of whether this
99
+ * `Optional` contains a value or not, `fold` will return a value of type `U`.
100
+ * If this `Optional` does not contain a value, the `U` will be created by
101
+ * calling `onNone`. If this `Optional` does contain a value, the `U` will be
102
+ * created by calling `onSome`.
103
+ *
104
+ * For the FP enthusiasts in the room, this function:
105
+ * 1. Could be used to implement all of the functions below
106
+ * 2. Forms a catamorphism
107
+ */
108
+ fold(onNone, onSome) {
109
+ if (this.tag) {
110
+ return onSome(this.value);
111
+ }
112
+ else {
113
+ return onNone();
114
+ }
115
+ }
116
+ /**
117
+ * Determine if this `Optional` object contains a value.
118
+ */
119
+ isSome() {
120
+ return this.tag;
121
+ }
122
+ /**
123
+ * Determine if this `Optional` object **does not** contain a value.
124
+ */
125
+ isNone() {
126
+ return !this.tag;
127
+ }
128
+ // --- Functor (name stolen from Haskell / maths) ---
129
+ /**
130
+ * Perform a transform on an `Optional` object, **if** there is a value. If
131
+ * you provide a function to turn a T into a U, this is the function you use
132
+ * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
133
+ * a value then the output will also contain a value (that value being the
134
+ * output of `mapper(this.value)`), and if this **does not** contain a value
135
+ * then neither will the output.
136
+ */
137
+ map(mapper) {
138
+ if (this.tag) {
139
+ return Optional.some(mapper(this.value));
140
+ }
141
+ else {
142
+ return Optional.none();
143
+ }
144
+ }
145
+ // --- Monad (name stolen from Haskell / maths) ---
146
+ /**
147
+ * Perform a transform on an `Optional` object, **if** there is a value.
148
+ * Unlike `map`, here the transform itself also returns an `Optional`.
149
+ */
150
+ bind(binder) {
151
+ if (this.tag) {
152
+ return binder(this.value);
153
+ }
154
+ else {
155
+ return Optional.none();
156
+ }
157
+ }
158
+ // --- Traversable (name stolen from Haskell / maths) ---
159
+ /**
160
+ * For a given predicate, this function finds out if there **exists** a value
161
+ * inside this `Optional` object that meets the predicate. In practice, this
162
+ * means that for `Optional`s that do not contain a value it returns false (as
163
+ * no predicate-meeting value exists).
164
+ */
165
+ exists(predicate) {
166
+ return this.tag && predicate(this.value);
167
+ }
168
+ /**
169
+ * For a given predicate, this function finds out if **all** the values inside
170
+ * this `Optional` object meet the predicate. In practice, this means that
171
+ * for `Optional`s that do not contain a value it returns true (as all 0
172
+ * objects do meet the predicate).
173
+ */
174
+ forall(predicate) {
175
+ return !this.tag || predicate(this.value);
176
+ }
177
+ filter(predicate) {
178
+ if (!this.tag || predicate(this.value)) {
179
+ return this;
180
+ }
181
+ else {
182
+ return Optional.none();
183
+ }
184
+ }
185
+ // --- Getters ---
186
+ /**
187
+ * Get the value out of the inside of the `Optional` object, using a default
188
+ * `replacement` value if the provided `Optional` object does not contain a
189
+ * value.
190
+ */
191
+ getOr(replacement) {
192
+ return this.tag ? this.value : replacement;
193
+ }
194
+ /**
195
+ * Get the value out of the inside of the `Optional` object, using a default
196
+ * `replacement` value if the provided `Optional` object does not contain a
197
+ * value. Unlike `getOr`, in this method the `replacement` object is also
198
+ * `Optional` - meaning that this method will always return an `Optional`.
199
+ */
200
+ or(replacement) {
201
+ return this.tag ? this : replacement;
202
+ }
203
+ /**
204
+ * Get the value out of the inside of the `Optional` object, using a default
205
+ * `replacement` value if the provided `Optional` object does not contain a
206
+ * value. Unlike `getOr`, in this method the `replacement` value is
207
+ * "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
208
+ * pass a function which (if called) will **return** the `value` you want to
209
+ * use.
210
+ */
211
+ getOrThunk(thunk) {
212
+ return this.tag ? this.value : thunk();
213
+ }
214
+ /**
215
+ * Get the value out of the inside of the `Optional` object, using a default
216
+ * `replacement` value if the provided Optional object does not contain a
217
+ * value.
218
+ *
219
+ * Unlike `or`, in this method the `replacement` value is "thunked" - that is
220
+ * to say that you don't pass a value to `orThunk`, you pass a function which
221
+ * (if called) will **return** the `value` you want to use.
222
+ *
223
+ * Unlike `getOrThunk`, in this method the `replacement` value is also
224
+ * `Optional`, meaning that this method will always return an `Optional`.
225
+ */
226
+ orThunk(thunk) {
227
+ return this.tag ? this : thunk();
228
+ }
229
+ /**
230
+ * Get the value out of the inside of the `Optional` object, throwing an
231
+ * exception if the provided `Optional` object does not contain a value.
232
+ *
233
+ * WARNING:
234
+ * You should only be using this function if you know that the `Optional`
235
+ * object **is not** empty (otherwise you're throwing exceptions in production
236
+ * code, which is bad).
237
+ *
238
+ * In tests this is more acceptable.
239
+ *
240
+ * Prefer other methods to this, such as `.each`.
241
+ */
242
+ getOrDie(message) {
243
+ if (!this.tag) {
244
+ throw new Error(message ?? 'Called getOrDie on None');
245
+ }
246
+ else {
247
+ return this.value;
248
+ }
249
+ }
250
+ // --- Interop with null and undefined ---
251
+ /**
252
+ * Creates an `Optional` value from a nullable (or undefined-able) input.
253
+ * Null, or undefined, is converted to `None`, and anything else is converted
254
+ * to `Some`.
255
+ */
256
+ static from(value) {
257
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
258
+ }
259
+ /**
260
+ * Converts an `Optional` to a nullable type, by getting the value if it
261
+ * exists, or returning `null` if it does not.
262
+ */
263
+ getOrNull() {
264
+ return this.tag ? this.value : null;
265
+ }
266
+ /**
267
+ * Converts an `Optional` to an undefined-able type, by getting the value if
268
+ * it exists, or returning `undefined` if it does not.
269
+ */
270
+ getOrUndefined() {
271
+ return this.value;
272
+ }
273
+ // --- Utilities ---
274
+ /**
275
+ * If the `Optional` contains a value, perform an action on that value.
276
+ * Unlike the rest of the methods on this type, `.each` has side-effects. If
277
+ * you want to transform an `Optional<T>` **into** something, then this is not
278
+ * the method for you. If you want to use an `Optional<T>` to **do**
279
+ * something, then this is the method for you - provided you're okay with not
280
+ * doing anything in the case where the `Optional` doesn't have a value inside
281
+ * it. If you're not sure whether your use-case fits into transforming
282
+ * **into** something or **doing** something, check whether it has a return
283
+ * value. If it does, you should be performing a transform.
284
+ */
285
+ each(worker) {
286
+ if (this.tag) {
287
+ worker(this.value);
288
+ }
289
+ }
290
+ /**
291
+ * Turn the `Optional` object into an array that contains all of the values
292
+ * stored inside the `Optional`. In practice, this means the output will have
293
+ * either 0 or 1 elements.
294
+ */
295
+ toArray() {
296
+ return this.tag ? [this.value] : [];
297
+ }
298
+ /**
299
+ * Turn the `Optional` object into a string for debugging or printing. Not
300
+ * recommended for production code, but good for debugging. Also note that
301
+ * these days an `Optional` object can be logged to the console directly, and
302
+ * its inner value (if it exists) will be visible.
303
+ */
304
+ toString() {
305
+ return this.tag ? `some(${this.value})` : 'none()';
306
+ }
307
+ }
308
+
309
+ const nativeSlice = Array.prototype.slice;
310
+ const map = (xs, f) => {
311
+ // pre-allocating array size when it's guaranteed to be known
312
+ // http://jsperf.com/push-allocated-vs-dynamic/22
313
+ const len = xs.length;
314
+ const r = new Array(len);
315
+ for (let i = 0; i < len; i++) {
316
+ const x = xs[i];
317
+ r[i] = f(x, i);
318
+ }
319
+ return r;
320
+ };
321
+ // Unwound implementing other functions in terms of each.
322
+ // The code size is roughly the same, and it should allow for better optimisation.
323
+ // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {
324
+ const each = (xs, f) => {
325
+ for (let i = 0, len = xs.length; i < len; i++) {
326
+ const x = xs[i];
327
+ f(x, i);
328
+ }
329
+ };
330
+ const filter = (xs, pred) => {
331
+ const r = [];
332
+ for (let i = 0, len = xs.length; i < len; i++) {
333
+ const x = xs[i];
334
+ if (pred(x, i)) {
335
+ r.push(x);
336
+ }
337
+ }
338
+ return r;
339
+ };
340
+ isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
341
+
342
+ /**
343
+ * **Is** the value stored inside this Optional object equal to `rhs`?
344
+ */
345
+ const is$1 = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));
346
+
347
+ const blank = (r) => (s) => s.replace(r, '');
348
+ /** removes all leading and trailing spaces */
349
+ const trim = blank(/^\s+|\s+$/g);
350
+ const isNotEmpty = (s) => s.length > 0;
351
+
352
+ const fromHtml = (html, scope) => {
353
+ const doc = scope || document;
354
+ const div = doc.createElement('div');
355
+ div.innerHTML = html;
356
+ if (!div.hasChildNodes() || div.childNodes.length > 1) {
357
+ const message = 'HTML does not have a single root node';
358
+ // eslint-disable-next-line no-console
359
+ console.error(message, html);
360
+ throw new Error(message);
361
+ }
362
+ return fromDom(div.childNodes[0]);
363
+ };
364
+ const fromTag = (tag, scope) => {
365
+ const doc = scope || document;
366
+ const node = doc.createElement(tag);
367
+ return fromDom(node);
368
+ };
369
+ const fromText = (text, scope) => {
370
+ const doc = scope || document;
371
+ const node = doc.createTextNode(text);
372
+ return fromDom(node);
373
+ };
374
+ const fromDom = (node) => {
375
+ // TODO: Consider removing this check, but left atm for safety
376
+ if (node === null || node === undefined) {
377
+ throw new Error('Node cannot be null or undefined');
378
+ }
379
+ return {
380
+ dom: node
381
+ };
382
+ };
383
+ const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
384
+ // tslint:disable-next-line:variable-name
385
+ const SugarElement = {
386
+ fromHtml,
387
+ fromTag,
388
+ fromText,
389
+ fromDom,
390
+ fromPoint
391
+ };
392
+
393
+ const DOCUMENT_FRAGMENT = 11;
394
+ const ELEMENT = 1;
395
+ const TEXT = 3;
396
+
397
+ const is = (element, selector) => {
398
+ const dom = element.dom;
399
+ if (dom.nodeType !== ELEMENT) {
400
+ return false;
401
+ }
402
+ else {
403
+ const elem = dom;
404
+ if (elem.matches !== undefined) {
405
+ return elem.matches(selector);
406
+ }
407
+ else if (elem.msMatchesSelector !== undefined) {
408
+ return elem.msMatchesSelector(selector);
409
+ }
410
+ else if (elem.webkitMatchesSelector !== undefined) {
411
+ return elem.webkitMatchesSelector(selector);
412
+ }
413
+ else if (elem.mozMatchesSelector !== undefined) {
414
+ // cast to any as mozMatchesSelector doesn't exist in TS DOM lib
415
+ return elem.mozMatchesSelector(selector);
416
+ }
417
+ else {
418
+ throw new Error('Browser lacks native selectors');
419
+ } // unfortunately we can't throw this on startup :(
420
+ }
421
+ };
422
+
423
+ const name = (element) => {
424
+ const r = element.dom.nodeName;
425
+ return r.toLowerCase();
426
+ };
427
+ const type = (element) => element.dom.nodeType;
428
+ const isType = (t) => (element) => type(element) === t;
429
+ const isElement = isType(ELEMENT);
430
+ const isText = isType(TEXT);
431
+ const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
432
+ const isTag = (tag) => (e) => isElement(e) && name(e) === tag;
433
+
434
+ const children$2 = (element) => map(element.dom.childNodes, SugarElement.fromDom);
435
+
436
+ /**
437
+ * Is the element a ShadowRoot?
438
+ *
439
+ * Note: this is insufficient to test if any element is a shadow root, but it is sufficient to differentiate between
440
+ * a Document and a ShadowRoot.
441
+ */
442
+ const isShadowRoot = (dos) => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
443
+ const getRootNode = (e) => SugarElement.fromDom(e.dom.getRootNode());
444
+ /** If this element is in a ShadowRoot, return it. */
445
+ const getShadowRoot = (e) => {
446
+ const r = getRootNode(e);
447
+ return isShadowRoot(r) ? Optional.some(r) : Optional.none();
448
+ };
449
+ /** Return the host of a ShadowRoot.
450
+ *
451
+ * This function will throw if Shadow DOM is unsupported in the browser, or if the host is null.
452
+ * If you actually have a ShadowRoot, this shouldn't happen.
453
+ */
454
+ const getShadowHost = (e) => SugarElement.fromDom(e.dom.host);
455
+
456
+ const rawSet = (dom, key, value) => {
457
+ /*
458
+ * JQuery coerced everything to a string, and silently did nothing on text node/null/undefined.
459
+ *
460
+ * We fail on those invalid cases, only allowing numbers and booleans.
461
+ */
462
+ if (isString(value) || isBoolean(value) || isNumber(value)) {
463
+ dom.setAttribute(key, value + '');
464
+ }
465
+ else {
466
+ // eslint-disable-next-line no-console
467
+ console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
468
+ throw new Error('Attribute value was not simple');
469
+ }
470
+ };
471
+ const set = (element, key, value) => {
472
+ rawSet(element.dom, key, value);
473
+ };
474
+ const get$1 = (element, key) => {
475
+ const v = element.dom.getAttribute(key);
476
+ // undefined is the more appropriate value for JS, and this matches JQuery
477
+ return v === null ? undefined : v;
478
+ };
479
+ const getOpt = (element, key) => Optional.from(get$1(element, key));
480
+ const remove$1 = (element, key) => {
481
+ element.dom.removeAttribute(key);
482
+ };
483
+
484
+ // some elements, such as mathml, don't have style attributes
485
+ // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration
486
+ const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
487
+
488
+ // Node.contains() is very, very, very good performance
489
+ // http://jsperf.com/closest-vs-contains/5
490
+ const inBody = (element) => {
491
+ // Technically this is only required on IE, where contains() returns false for text nodes.
492
+ // But it's cheap enough to run everywhere and Sugar doesn't have platform detection (yet).
493
+ const dom = isText(element) ? element.dom.parentNode : element.dom;
494
+ // use ownerDocument.body to ensure this works inside iframes.
495
+ // Normally contains is bad because an element "contains" itself, but here we want that.
496
+ if (dom === undefined || dom === null || dom.ownerDocument === null) {
497
+ return false;
498
+ }
499
+ const doc = dom.ownerDocument;
500
+ return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));
501
+ };
502
+
503
+ const internalRemove = (dom, property) => {
504
+ /*
505
+ * IE9 and above - MDN doesn't have details, but here's a couple of random internet claims
506
+ *
507
+ * http://help.dottoro.com/ljopsjck.php
508
+ * http://stackoverflow.com/a/7901886/7546
509
+ */
510
+ if (isSupported(dom)) {
511
+ dom.style.removeProperty(property);
512
+ }
513
+ };
514
+ /*
515
+ * NOTE: For certain properties, this returns the "used value" which is subtly different to the "computed value" (despite calling getComputedStyle).
516
+ * Blame CSS 2.0.
517
+ *
518
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value
519
+ */
520
+ const get = (element, property) => {
521
+ const dom = element.dom;
522
+ /*
523
+ * IE9 and above per
524
+ * https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle
525
+ *
526
+ * Not in numerosity, because it doesn't memoize and looking this up dynamically in performance critical code would be horrendous.
527
+ *
528
+ * JQuery has some magic here for IE popups, but we don't really need that.
529
+ * It also uses element.ownerDocument.defaultView to handle iframes but that hasn't been required since FF 3.6.
530
+ */
531
+ const styles = window.getComputedStyle(dom);
532
+ const r = styles.getPropertyValue(property);
533
+ // jquery-ism: If r is an empty string, check that the element is not in a document. If it isn't, return the raw value.
534
+ // Turns out we do this a lot.
535
+ return (r === '' && !inBody(element)) ? getUnsafeProperty(dom, property) : r;
536
+ };
537
+ // removed: support for dom().style[property] where prop is camel case instead of normal property name
538
+ // empty string is what the browsers (IE11 and Chrome) return when the propertyValue doesn't exists.
539
+ const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';
540
+ const remove = (element, property) => {
541
+ const dom = element.dom;
542
+ internalRemove(dom, property);
543
+ if (is$1(getOpt(element, 'style').map(trim), '')) {
544
+ // No more styles left, remove the style attribute as well
545
+ remove$1(element, 'style');
546
+ }
547
+ };
548
+
549
+ const getDirection = (element) => get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
550
+
551
+ const ancestor$1 = (scope, predicate, isRoot) => {
552
+ let element = scope.dom;
553
+ const stop = isFunction(isRoot) ? isRoot : never;
554
+ while (element.parentNode) {
555
+ element = element.parentNode;
556
+ const el = SugarElement.fromDom(element);
557
+ if (predicate(el)) {
558
+ return Optional.some(el);
559
+ }
560
+ else if (stop(el)) {
561
+ break;
562
+ }
563
+ }
564
+ return Optional.none();
565
+ };
566
+
567
+ const ancestor = (scope, selector, isRoot) => ancestor$1(scope, (e) => is(e, selector), isRoot);
568
+
569
+ const children$1 = (scope, predicate) => filter(children$2(scope), predicate);
570
+
571
+ const children = (scope, selector) =>
572
+ // It may surprise you to learn this is exactly what JQuery does
573
+ // TODO: Avoid all the wrapping and unwrapping
574
+ children$1(scope, (e) => is(e, selector));
575
+
576
+ // if the block is a list item, we need to get the parent of the list itself
577
+ const getNormalizedBlock = (element, isListItem) => {
578
+ const normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element);
579
+ return normalizedElement.getOr(element);
580
+ };
581
+ const isListItem = isTag('li');
582
+ const setDirOnElements = (dom, blocks, dir) => {
583
+ each(blocks, (block) => {
584
+ const blockElement = SugarElement.fromDom(block);
585
+ const isBlockElementListItem = isListItem(blockElement);
586
+ const normalizedBlock = getNormalizedBlock(blockElement, isBlockElementListItem);
587
+ const attrDir = get$1(normalizedBlock, 'dir');
588
+ const styleDir = Optional.from(dom.getStyle(normalizedBlock.dom, 'direction', false))
589
+ .filter(isNotEmpty);
590
+ if (attrDir === dir || styleDir.exists((d) => d === dir)) {
591
+ // If already set to given dir, toggle dir off
592
+ remove$1(normalizedBlock, 'dir');
593
+ remove(normalizedBlock, 'direction');
594
+ }
595
+ else if (attrDir !== dir) {
596
+ set(normalizedBlock, 'dir', dir); // Set the dir attribute to the desired direction
597
+ if (styleDir.exists((d) => d !== dir) || getDirection(normalizedBlock) !== dir) {
598
+ // Also set the inline direction style if it was already set or if necessary to override inherited direction
599
+ dom.setStyle(normalizedBlock.dom, 'direction', dir);
600
+ }
601
+ }
602
+ // Remove dir attr and direction style from list children
603
+ if (isBlockElementListItem) {
604
+ const listItems = children(normalizedBlock, 'li[dir],li[style]');
605
+ each(listItems, (listItem) => {
606
+ remove$1(listItem, 'dir');
607
+ dom.setStyle(listItem.dom, 'direction', null);
608
+ });
609
+ }
610
+ });
611
+ };
612
+ const setDir = (editor, dir) => {
613
+ if (editor.selection.isEditable()) {
614
+ setDirOnElements(editor.dom, editor.selection.getSelectedBlocks(), dir);
615
+ editor.nodeChanged();
616
+ }
617
+ };
618
+
619
+ const register$1 = (editor) => {
620
+ editor.addCommand('mceDirectionLTR', () => {
621
+ setDir(editor, 'ltr');
622
+ });
623
+ editor.addCommand('mceDirectionRTL', () => {
624
+ setDir(editor, 'rtl');
625
+ });
626
+ };
627
+
628
+ const register = (editor) => {
629
+ const setupHandler = (dir) => (api) => {
630
+ const nodeChangeHandler = (e) => {
631
+ const block = editor.dom.isBlock(e.element) ? e.element : editor.dom.getParent(e.element, editor.dom.isBlock);
632
+ if (block) {
633
+ const direction = editor.dom.getStyle(block, 'direction') || editor.dom.getAttrib(block, 'dir');
634
+ api.setActive(direction === dir);
635
+ }
636
+ };
637
+ editor.on('NodeChange', nodeChangeHandler);
638
+ return () => editor.off('NodeChange', nodeChangeHandler);
639
+ };
640
+ editor.ui.registry.addToggleButton('ltr', {
641
+ tooltip: 'Left to right',
642
+ icon: 'ltr',
643
+ context: 'editable',
644
+ onAction: () => editor.execCommand('mceDirectionLTR'),
645
+ onSetup: setupHandler('ltr'),
646
+ });
647
+ editor.ui.registry.addToggleButton('rtl', {
648
+ tooltip: 'Right to left',
649
+ icon: 'rtl',
650
+ context: 'editable',
651
+ onAction: () => editor.execCommand('mceDirectionRTL'),
652
+ onSetup: setupHandler('rtl')
653
+ });
654
+ };
655
+
656
+ var Plugin = () => {
657
+ global.add('directionality', (editor) => {
658
+ register$1(editor);
659
+ register(editor);
660
+ });
661
+ };
662
+
663
+ Plugin();
664
+ /** *****
665
+ * DO NOT EXPORT ANYTHING
666
+ *
667
+ * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
668
+ *******/
669
+
670
+ })();
@@ -0,0 +1 @@
1
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,r=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(n=String).prototype.isPrototypeOf(r)||o.constructor?.name===n.name)?"string":e;var r,o,n})(t),o=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(t,e)=>t===e,a=()=>false;class c{tag;value;static singletonNone=new c(!1);constructor(t,e){this.tag=t,this.value=e}static some(t){return new c(!0,t)}static none(){return c.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?c.some(t(this.value)):c.none()}bind(t){return this.tag?t(this.value):c.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:c.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(t??"Called getOrDie on None")}static from(t){return n(t)?c.some(t):c.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const u=(t,e)=>{for(let r=0,o=t.length;r<o;r++)e(t[r],r)};i(Array.from)&&Array.from;const d=(m=/^\s+|\s+$/g,t=>t.replace(m,""));var m;const h=t=>t.length>0,g=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},f=g,y=(t,e)=>{const r=t.dom;if(1!==r.nodeType)return!1;{const t=r;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}},v=t=>e=>(t=>t.dom.nodeType)(e)===t,p=v(1),w=v(3),b=v(11),S=t=>f(t.dom.host),A=(t,e)=>{const r=t.dom.getAttribute(e);return null===r?void 0:r},N=(t,e)=>{t.dom.removeAttribute(e)},T=t=>void 0!==t.style&&i(t.style.getPropertyValue),C=t=>{const e=w(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;const r=e.ownerDocument;return(t=>{const e=(t=>f(t.dom.getRootNode()))(t);return b(r=e)&&n(r.dom.host)?c.some(e):c.none();var r})(f(e)).fold(()=>r.body.contains(e),(o=C,i=S,t=>o(i(t))));var o,i},k=t=>"rtl"===((t,e)=>{const r=t.dom,o=window.getComputedStyle(r).getPropertyValue(e);return""!==o||C(t)?o:((t,e)=>T(t)?t.style.getPropertyValue(e):"")(r,e)})(t,"direction")?"rtl":"ltr",x=(t,e)=>(t=>((t,e)=>{const r=[];for(let o=0,n=t.length;o<n;o++){const n=t[o];e(n,o)&&r.push(n)}return r})(((t,e)=>{const r=t.length,o=new Array(r);for(let n=0;n<r;n++){const r=t[n];o[n]=e(r,n)}return o})(t.dom.childNodes,f),t=>y(t,e)))(t),D=t=>p(t)&&"li"===t.dom.nodeName.toLowerCase();const O=(t,e,n)=>{u(e,e=>{const m=f(e),g=D(m),v=((t,e)=>{return(e?(r=t,o="ol,ul",((t,e,r)=>{let o=t.dom;const n=i(r)?r:a;for(;o.parentNode;){o=o.parentNode;const t=f(o);if(e(t))return c.some(t);if(n(t))break}return c.none()})(r,t=>y(t,o),n)):c.some(t)).getOr(t);var r,o,n})(m,g),p=A(v,"dir"),w=c.from(t.getStyle(v.dom,"direction",!1)).filter(h);if(p===n||w.exists(t=>t===n)?(N(v,"dir"),S="direction",((t,e)=>{T(t)&&t.style.removeProperty(e)})((b=v).dom,S),((t,e,r=l)=>t.exists(t=>r(t,e)))((t=>c.from(A(t,"style")))(b).map(d),"")&&N(b,"style")):p!==n&&(((t,e,n)=>{((t,e,n)=>{if(!(r(n)||o(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(v,"dir",n),(w.exists(t=>t!==n)||k(v)!==n)&&t.setStyle(v.dom,"direction",n)),g){const e=x(v,"li[dir],li[style]");u(e,e=>{N(e,"dir"),t.setStyle(e.dom,"direction",null)})}var b,S})},M=(t,e)=>{t.selection.isEditable()&&(O(t.dom,t.selection.getSelectedBlocks(),e),t.nodeChanged())};t.add("directionality",t=>{(t=>{t.addCommand("mceDirectionLTR",()=>{M(t,"ltr")}),t.addCommand("mceDirectionRTL",()=>{M(t,"rtl")})})(t),(t=>{const e=e=>r=>{const o=o=>{const n=t.dom.isBlock(o.element)?o.element:t.dom.getParent(o.element,t.dom.isBlock);if(n){const o=t.dom.getStyle(n,"direction")||t.dom.getAttrib(n,"dir");r.setActive(o===e)}};return t.on("NodeChange",o),()=>t.off("NodeChange",o)};t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",context:"editable",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:e("ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",context:"editable",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:e("rtl")})})(t)})}();
@@ -0,0 +1,7 @@
1
+ // Exports the "emoticons" plugin for usage with module loaders
2
+ // Usage:
3
+ // CommonJS:
4
+ // require('tinymce/plugins/emoticons')
5
+ // ES2015:
6
+ // import 'tinymce/plugins/emoticons'
7
+ require('./plugin.js');