create-nextjs-cms 0.5.56 → 0.5.58

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 (337) hide show
  1. package/package.json +4 -4
  2. package/templates/default/CHANGELOG.md +140 -140
  3. package/templates/default/_gitignore +1 -0
  4. package/templates/default/app/(rootLayout)/admins/page.tsx +7 -2
  5. package/templates/default/app/(rootLayout)/advanced/page.tsx +8 -2
  6. package/templates/default/app/(rootLayout)/browse/[section]/[page]/page.tsx +17 -3
  7. package/templates/default/app/(rootLayout)/categorized/[section]/page.tsx +9 -1
  8. package/templates/default/app/(rootLayout)/dashboard-new/page.tsx +7 -0
  9. package/templates/default/app/(rootLayout)/edit/[section]/[itemId]/page.tsx +11 -1
  10. package/templates/default/app/(rootLayout)/layout.tsx +8 -1
  11. package/templates/default/app/(rootLayout)/new/[section]/page.tsx +9 -1
  12. package/templates/default/app/(rootLayout)/section/[section]/page.tsx +10 -1
  13. package/templates/default/app/(rootLayout)/settings/page.tsx +7 -1
  14. package/templates/default/app/api/trpc/[trpc]/route.ts +1 -1
  15. package/templates/default/app/api/video/route.ts +1 -1
  16. package/templates/default/app/layout.tsx +1 -1
  17. package/templates/default/app/providers.tsx +4 -4
  18. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/LICENSE +191 -0
  19. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/README.md +118 -0
  20. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/build.js +38 -0
  21. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/check.js +14 -0
  22. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/channel.js +177 -0
  23. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/colour.js +195 -0
  24. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/composite.js +212 -0
  25. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/constructor.js +499 -0
  26. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.d.ts +1971 -0
  27. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.js +16 -0
  28. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/input.js +809 -0
  29. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/is.js +143 -0
  30. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/libvips.js +207 -0
  31. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/operation.js +1016 -0
  32. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/output.js +1666 -0
  33. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/resize.js +595 -0
  34. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/sharp.js +121 -0
  35. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/utility.js +291 -0
  36. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/package.json +202 -0
  37. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/binding.gyp +298 -0
  38. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.cc +1130 -0
  39. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.h +402 -0
  40. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.cc +346 -0
  41. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.h +90 -0
  42. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.cc +499 -0
  43. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.h +137 -0
  44. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.cc +1814 -0
  45. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.h +408 -0
  46. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/sharp.cc +43 -0
  47. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.cc +186 -0
  48. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.h +62 -0
  49. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.cc +288 -0
  50. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.h +22 -0
  51. package/templates/default/components/BrowsePage.tsx +4 -4
  52. package/templates/default/components/DashboardNewPage.tsx +252 -0
  53. package/templates/default/components/LogPage.tsx +2 -3
  54. package/templates/default/components/SettingsPage.tsx +1 -1
  55. package/templates/default/components/form/Form.tsx +5 -5
  56. package/templates/default/components/form/helpers/util.ts +5 -5
  57. package/templates/default/dynamic-schemas/schema.ts +381 -381
  58. package/templates/default/next-env.d.ts +1 -1
  59. package/templates/default/next.config.ts +24 -0
  60. package/templates/default/package.json +23 -17
  61. package/templates/default/{middleware.ts → proxy.ts} +3 -4
  62. package/templates/default/test/prize.section.ts +58 -0
  63. package/templates/default/tsconfig.json +6 -3
  64. package/templates/default/app/api/placeholder/route.ts +0 -7
  65. package/templates/default/components/form/helpers/_section-hot-reload.js +0 -11
  66. package/templates/default/public/tinymce/CHANGELOG.md +0 -3940
  67. package/templates/default/public/tinymce/README.md +0 -77
  68. package/templates/default/public/tinymce/bower.json +0 -27
  69. package/templates/default/public/tinymce/composer.json +0 -52
  70. package/templates/default/public/tinymce/icons/default/icons.js +0 -239
  71. package/templates/default/public/tinymce/icons/default/icons.min.js +0 -1
  72. package/templates/default/public/tinymce/icons/default/index.js +0 -7
  73. package/templates/default/public/tinymce/license.md +0 -9
  74. package/templates/default/public/tinymce/models/dom/index.js +0 -7
  75. package/templates/default/public/tinymce/models/dom/model.js +0 -8980
  76. package/templates/default/public/tinymce/models/dom/model.min.js +0 -1
  77. package/templates/default/public/tinymce/notices.txt +0 -21
  78. package/templates/default/public/tinymce/package.json +0 -32
  79. package/templates/default/public/tinymce/plugins/accordion/index.js +0 -7
  80. package/templates/default/public/tinymce/plugins/accordion/plugin.js +0 -1373
  81. package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +0 -1
  82. package/templates/default/public/tinymce/plugins/advlist/index.js +0 -7
  83. package/templates/default/public/tinymce/plugins/advlist/plugin.js +0 -473
  84. package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +0 -1
  85. package/templates/default/public/tinymce/plugins/anchor/index.js +0 -7
  86. package/templates/default/public/tinymce/plugins/anchor/plugin.js +0 -237
  87. package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +0 -1
  88. package/templates/default/public/tinymce/plugins/autolink/index.js +0 -7
  89. package/templates/default/public/tinymce/plugins/autolink/plugin.js +0 -315
  90. package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +0 -1
  91. package/templates/default/public/tinymce/plugins/autoresize/index.js +0 -7
  92. package/templates/default/public/tinymce/plugins/autoresize/plugin.js +0 -221
  93. package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +0 -1
  94. package/templates/default/public/tinymce/plugins/autosave/index.js +0 -7
  95. package/templates/default/public/tinymce/plugins/autosave/plugin.js +0 -249
  96. package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +0 -1
  97. package/templates/default/public/tinymce/plugins/charmap/index.js +0 -7
  98. package/templates/default/public/tinymce/plugins/charmap/plugin.js +0 -997
  99. package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +0 -1
  100. package/templates/default/public/tinymce/plugins/code/index.js +0 -7
  101. package/templates/default/public/tinymce/plugins/code/plugin.js +0 -98
  102. package/templates/default/public/tinymce/plugins/code/plugin.min.js +0 -1
  103. package/templates/default/public/tinymce/plugins/codesample/index.js +0 -7
  104. package/templates/default/public/tinymce/plugins/codesample/plugin.js +0 -3655
  105. package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +0 -9
  106. package/templates/default/public/tinymce/plugins/directionality/index.js +0 -7
  107. package/templates/default/public/tinymce/plugins/directionality/plugin.js +0 -634
  108. package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +0 -1
  109. package/templates/default/public/tinymce/plugins/emoticons/index.js +0 -7
  110. package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
  111. package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -1
  112. package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +0 -1
  113. package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +0 -1
  114. package/templates/default/public/tinymce/plugins/emoticons/plugin.js +0 -809
  115. package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +0 -1
  116. package/templates/default/public/tinymce/plugins/fullscreen/index.js +0 -7
  117. package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +0 -1607
  118. package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +0 -1
  119. package/templates/default/public/tinymce/plugins/help/index.js +0 -7
  120. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -93
  121. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +0 -93
  122. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -93
  123. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -93
  124. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -93
  125. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +0 -93
  126. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +0 -93
  127. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +0 -93
  128. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +0 -93
  129. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +0 -93
  130. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -93
  131. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -93
  132. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -93
  133. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +0 -93
  134. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -93
  135. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he-IL.js +0 -93
  136. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -93
  137. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -93
  138. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -93
  139. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +0 -93
  140. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -93
  141. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +0 -93
  142. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +0 -93
  143. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -93
  144. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -93
  145. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +0 -93
  146. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -93
  147. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -93
  148. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +0 -93
  149. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -93
  150. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -93
  151. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -93
  152. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +0 -93
  153. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +0 -93
  154. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -93
  155. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -93
  156. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -93
  157. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -93
  158. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -93
  159. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +0 -93
  160. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -93
  161. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +0 -93
  162. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -93
  163. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th-TH.js +0 -93
  164. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -93
  165. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -93
  166. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -93
  167. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -93
  168. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +0 -87
  169. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +0 -93
  170. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -87
  171. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -93
  172. package/templates/default/public/tinymce/plugins/help/plugin.js +0 -826
  173. package/templates/default/public/tinymce/plugins/help/plugin.min.js +0 -1
  174. package/templates/default/public/tinymce/plugins/image/index.js +0 -7
  175. package/templates/default/public/tinymce/plugins/image/plugin.js +0 -1691
  176. package/templates/default/public/tinymce/plugins/image/plugin.min.js +0 -1
  177. package/templates/default/public/tinymce/plugins/importcss/index.js +0 -7
  178. package/templates/default/public/tinymce/plugins/importcss/plugin.js +0 -401
  179. package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +0 -1
  180. package/templates/default/public/tinymce/plugins/insertdatetime/index.js +0 -7
  181. package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +0 -187
  182. package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +0 -1
  183. package/templates/default/public/tinymce/plugins/link/index.js +0 -7
  184. package/templates/default/public/tinymce/plugins/link/plugin.js +0 -1709
  185. package/templates/default/public/tinymce/plugins/link/plugin.min.js +0 -1
  186. package/templates/default/public/tinymce/plugins/lists/index.js +0 -7
  187. package/templates/default/public/tinymce/plugins/lists/plugin.js +0 -602
  188. package/templates/default/public/tinymce/plugins/lists/plugin.min.js +0 -1
  189. package/templates/default/public/tinymce/plugins/media/index.js +0 -7
  190. package/templates/default/public/tinymce/plugins/media/plugin.js +0 -1442
  191. package/templates/default/public/tinymce/plugins/media/plugin.min.js +0 -1
  192. package/templates/default/public/tinymce/plugins/nonbreaking/index.js +0 -7
  193. package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +0 -128
  194. package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +0 -1
  195. package/templates/default/public/tinymce/plugins/pagebreak/index.js +0 -7
  196. package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +0 -123
  197. package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +0 -1
  198. package/templates/default/public/tinymce/plugins/preview/index.js +0 -7
  199. package/templates/default/public/tinymce/plugins/preview/plugin.js +0 -843
  200. package/templates/default/public/tinymce/plugins/preview/plugin.min.js +0 -1
  201. package/templates/default/public/tinymce/plugins/quickbars/index.js +0 -7
  202. package/templates/default/public/tinymce/plugins/quickbars/plugin.js +0 -654
  203. package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +0 -1
  204. package/templates/default/public/tinymce/plugins/save/index.js +0 -7
  205. package/templates/default/public/tinymce/plugins/save/plugin.js +0 -136
  206. package/templates/default/public/tinymce/plugins/save/plugin.min.js +0 -1
  207. package/templates/default/public/tinymce/plugins/searchreplace/index.js +0 -7
  208. package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +0 -1367
  209. package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +0 -1
  210. package/templates/default/public/tinymce/plugins/table/index.js +0 -7
  211. package/templates/default/public/tinymce/plugins/table/plugin.js +0 -4008
  212. package/templates/default/public/tinymce/plugins/table/plugin.min.js +0 -1
  213. package/templates/default/public/tinymce/plugins/visualblocks/index.js +0 -7
  214. package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +0 -106
  215. package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +0 -1
  216. package/templates/default/public/tinymce/plugins/visualchars/index.js +0 -7
  217. package/templates/default/public/tinymce/plugins/visualchars/plugin.js +0 -808
  218. package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +0 -1
  219. package/templates/default/public/tinymce/plugins/wordcount/index.js +0 -7
  220. package/templates/default/public/tinymce/plugins/wordcount/plugin.js +0 -480
  221. package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +0 -1
  222. package/templates/default/public/tinymce/skins/content/dark/content.css +0 -75
  223. package/templates/default/public/tinymce/skins/content/dark/content.js +0 -10
  224. package/templates/default/public/tinymce/skins/content/dark/content.min.css +0 -10
  225. package/templates/default/public/tinymce/skins/content/dark/content.min.ts +0 -3
  226. package/templates/default/public/tinymce/skins/content/dark/content.ts +0 -3
  227. package/templates/default/public/tinymce/skins/content/default/content.css +0 -70
  228. package/templates/default/public/tinymce/skins/content/default/content.js +0 -10
  229. package/templates/default/public/tinymce/skins/content/default/content.min.css +0 -10
  230. package/templates/default/public/tinymce/skins/content/default/content.min.ts +0 -3
  231. package/templates/default/public/tinymce/skins/content/default/content.ts +0 -3
  232. package/templates/default/public/tinymce/skins/content/document/content.css +0 -75
  233. package/templates/default/public/tinymce/skins/content/document/content.js +0 -10
  234. package/templates/default/public/tinymce/skins/content/document/content.min.css +0 -10
  235. package/templates/default/public/tinymce/skins/content/document/content.min.ts +0 -3
  236. package/templates/default/public/tinymce/skins/content/document/content.ts +0 -3
  237. package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +0 -70
  238. package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +0 -10
  239. package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +0 -10
  240. package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.ts +0 -3
  241. package/templates/default/public/tinymce/skins/content/tinymce-5/content.ts +0 -3
  242. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +0 -75
  243. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +0 -10
  244. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -10
  245. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.ts +0 -3
  246. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.ts +0 -3
  247. package/templates/default/public/tinymce/skins/content/writer/content.css +0 -71
  248. package/templates/default/public/tinymce/skins/content/writer/content.js +0 -10
  249. package/templates/default/public/tinymce/skins/content/writer/content.min.css +0 -10
  250. package/templates/default/public/tinymce/skins/content/writer/content.min.ts +0 -3
  251. package/templates/default/public/tinymce/skins/content/writer/content.ts +0 -3
  252. package/templates/default/public/tinymce/skins/ui/oxide/content.css +0 -1037
  253. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +0 -1031
  254. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +0 -10
  255. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +0 -10
  256. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.ts +0 -116
  257. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.ts +0 -116
  258. package/templates/default/public/tinymce/skins/ui/oxide/content.js +0 -10
  259. package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +0 -10
  260. package/templates/default/public/tinymce/skins/ui/oxide/content.min.ts +0 -116
  261. package/templates/default/public/tinymce/skins/ui/oxide/content.ts +0 -116
  262. package/templates/default/public/tinymce/skins/ui/oxide/skin.css +0 -5615
  263. package/templates/default/public/tinymce/skins/ui/oxide/skin.js +0 -1
  264. package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +0 -1
  265. package/templates/default/public/tinymce/skins/ui/oxide/skin.min.ts +0 -507
  266. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
  267. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -1
  268. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
  269. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +0 -9
  270. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.ts +0 -9
  271. package/templates/default/public/tinymce/skins/ui/oxide/skin.ts +0 -507
  272. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +0 -1025
  273. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +0 -1031
  274. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +0 -10
  275. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -10
  276. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.ts +0 -116
  277. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.ts +0 -116
  278. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +0 -10
  279. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +0 -10
  280. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.ts +0 -116
  281. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.ts +0 -116
  282. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +0 -5618
  283. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +0 -1
  284. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
  285. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.ts +0 -507
  286. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
  287. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -1
  288. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
  289. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +0 -9
  290. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +0 -9
  291. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.ts +0 -507
  292. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +0 -1037
  293. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +0 -1031
  294. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +0 -10
  295. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -10
  296. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.ts +0 -116
  297. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.ts +0 -116
  298. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +0 -10
  299. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +0 -10
  300. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.ts +0 -116
  301. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.ts +0 -116
  302. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +0 -5734
  303. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +0 -1
  304. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
  305. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.ts +0 -508
  306. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
  307. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -1
  308. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
  309. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +0 -9
  310. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +0 -9
  311. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.ts +0 -508
  312. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +0 -1025
  313. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -1031
  314. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -10
  315. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -10
  316. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +0 -116
  317. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +0 -116
  318. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +0 -10
  319. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -10
  320. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.ts +0 -116
  321. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.ts +0 -116
  322. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -5734
  323. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -1
  324. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
  325. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +0 -508
  326. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
  327. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -1
  328. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
  329. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +0 -9
  330. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +0 -9
  331. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.ts +0 -508
  332. package/templates/default/public/tinymce/themes/silver/index.js +0 -7
  333. package/templates/default/public/tinymce/themes/silver/theme.js +0 -34748
  334. package/templates/default/public/tinymce/themes/silver/theme.min.js +0 -1
  335. package/templates/default/public/tinymce/tinymce.d.ts +0 -3413
  336. package/templates/default/public/tinymce/tinymce.js +0 -41518
  337. package/templates/default/public/tinymce/tinymce.min.js +0 -10
@@ -1,809 +0,0 @@
1
- /**
2
- * TinyMCE version 8.3.1 (2025-12-17)
3
- */
4
-
5
- (function () {
6
- 'use strict';
7
-
8
- var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
-
10
- /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
- const isSimpleType = (type) => (value) => typeof value === type;
12
- const eq = (t) => (a) => t === a;
13
- const isNull = eq(null);
14
- const isUndefined = eq(undefined);
15
- const isNullable = (a) => a === null || a === undefined;
16
- const isNonNullable = (a) => !isNullable(a);
17
- const isFunction = isSimpleType('function');
18
-
19
- const noop = () => { };
20
- const constant = (value) => {
21
- return () => {
22
- return value;
23
- };
24
- };
25
- const never = constant(false);
26
-
27
- /**
28
- * The `Optional` type represents a value (of any type) that potentially does
29
- * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
30
- * value does exist) or a `None` (in which case the value does not exist). This
31
- * module defines a whole lot of FP-inspired utility functions for dealing with
32
- * `Optional` objects.
33
- *
34
- * Comparison with null or undefined:
35
- * - We don't get fancy null coalescing operators with `Optional`
36
- * - We do get fancy helper functions with `Optional`
37
- * - `Optional` support nesting, and allow for the type to still be nullable (or
38
- * another `Optional`)
39
- * - There is no option to turn off strict-optional-checks like there is for
40
- * strict-null-checks
41
- */
42
- class Optional {
43
- tag;
44
- value;
45
- // Sneaky optimisation: every instance of Optional.none is identical, so just
46
- // reuse the same object
47
- static singletonNone = new Optional(false);
48
- // The internal representation has a `tag` and a `value`, but both are
49
- // private: able to be console.logged, but not able to be accessed by code
50
- constructor(tag, value) {
51
- this.tag = tag;
52
- this.value = value;
53
- }
54
- // --- Identities ---
55
- /**
56
- * Creates a new `Optional<T>` that **does** contain a value.
57
- */
58
- static some(value) {
59
- return new Optional(true, value);
60
- }
61
- /**
62
- * Create a new `Optional<T>` that **does not** contain a value. `T` can be
63
- * any type because we don't actually have a `T`.
64
- */
65
- static none() {
66
- return Optional.singletonNone;
67
- }
68
- /**
69
- * Perform a transform on an `Optional` type. Regardless of whether this
70
- * `Optional` contains a value or not, `fold` will return a value of type `U`.
71
- * If this `Optional` does not contain a value, the `U` will be created by
72
- * calling `onNone`. If this `Optional` does contain a value, the `U` will be
73
- * created by calling `onSome`.
74
- *
75
- * For the FP enthusiasts in the room, this function:
76
- * 1. Could be used to implement all of the functions below
77
- * 2. Forms a catamorphism
78
- */
79
- fold(onNone, onSome) {
80
- if (this.tag) {
81
- return onSome(this.value);
82
- }
83
- else {
84
- return onNone();
85
- }
86
- }
87
- /**
88
- * Determine if this `Optional` object contains a value.
89
- */
90
- isSome() {
91
- return this.tag;
92
- }
93
- /**
94
- * Determine if this `Optional` object **does not** contain a value.
95
- */
96
- isNone() {
97
- return !this.tag;
98
- }
99
- // --- Functor (name stolen from Haskell / maths) ---
100
- /**
101
- * Perform a transform on an `Optional` object, **if** there is a value. If
102
- * you provide a function to turn a T into a U, this is the function you use
103
- * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
104
- * a value then the output will also contain a value (that value being the
105
- * output of `mapper(this.value)`), and if this **does not** contain a value
106
- * then neither will the output.
107
- */
108
- map(mapper) {
109
- if (this.tag) {
110
- return Optional.some(mapper(this.value));
111
- }
112
- else {
113
- return Optional.none();
114
- }
115
- }
116
- // --- Monad (name stolen from Haskell / maths) ---
117
- /**
118
- * Perform a transform on an `Optional` object, **if** there is a value.
119
- * Unlike `map`, here the transform itself also returns an `Optional`.
120
- */
121
- bind(binder) {
122
- if (this.tag) {
123
- return binder(this.value);
124
- }
125
- else {
126
- return Optional.none();
127
- }
128
- }
129
- // --- Traversable (name stolen from Haskell / maths) ---
130
- /**
131
- * For a given predicate, this function finds out if there **exists** a value
132
- * inside this `Optional` object that meets the predicate. In practice, this
133
- * means that for `Optional`s that do not contain a value it returns false (as
134
- * no predicate-meeting value exists).
135
- */
136
- exists(predicate) {
137
- return this.tag && predicate(this.value);
138
- }
139
- /**
140
- * For a given predicate, this function finds out if **all** the values inside
141
- * this `Optional` object meet the predicate. In practice, this means that
142
- * for `Optional`s that do not contain a value it returns true (as all 0
143
- * objects do meet the predicate).
144
- */
145
- forall(predicate) {
146
- return !this.tag || predicate(this.value);
147
- }
148
- filter(predicate) {
149
- if (!this.tag || predicate(this.value)) {
150
- return this;
151
- }
152
- else {
153
- return Optional.none();
154
- }
155
- }
156
- // --- Getters ---
157
- /**
158
- * Get the value out of the inside of the `Optional` object, using a default
159
- * `replacement` value if the provided `Optional` object does not contain a
160
- * value.
161
- */
162
- getOr(replacement) {
163
- return this.tag ? this.value : replacement;
164
- }
165
- /**
166
- * Get the value out of the inside of the `Optional` object, using a default
167
- * `replacement` value if the provided `Optional` object does not contain a
168
- * value. Unlike `getOr`, in this method the `replacement` object is also
169
- * `Optional` - meaning that this method will always return an `Optional`.
170
- */
171
- or(replacement) {
172
- return this.tag ? this : replacement;
173
- }
174
- /**
175
- * Get the value out of the inside of the `Optional` object, using a default
176
- * `replacement` value if the provided `Optional` object does not contain a
177
- * value. Unlike `getOr`, in this method the `replacement` value is
178
- * "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
179
- * pass a function which (if called) will **return** the `value` you want to
180
- * use.
181
- */
182
- getOrThunk(thunk) {
183
- return this.tag ? this.value : thunk();
184
- }
185
- /**
186
- * Get the value out of the inside of the `Optional` object, using a default
187
- * `replacement` value if the provided Optional object does not contain a
188
- * value.
189
- *
190
- * Unlike `or`, in this method the `replacement` value is "thunked" - that is
191
- * to say that you don't pass a value to `orThunk`, you pass a function which
192
- * (if called) will **return** the `value` you want to use.
193
- *
194
- * Unlike `getOrThunk`, in this method the `replacement` value is also
195
- * `Optional`, meaning that this method will always return an `Optional`.
196
- */
197
- orThunk(thunk) {
198
- return this.tag ? this : thunk();
199
- }
200
- /**
201
- * Get the value out of the inside of the `Optional` object, throwing an
202
- * exception if the provided `Optional` object does not contain a value.
203
- *
204
- * WARNING:
205
- * You should only be using this function if you know that the `Optional`
206
- * object **is not** empty (otherwise you're throwing exceptions in production
207
- * code, which is bad).
208
- *
209
- * In tests this is more acceptable.
210
- *
211
- * Prefer other methods to this, such as `.each`.
212
- */
213
- getOrDie(message) {
214
- if (!this.tag) {
215
- throw new Error(message ?? 'Called getOrDie on None');
216
- }
217
- else {
218
- return this.value;
219
- }
220
- }
221
- // --- Interop with null and undefined ---
222
- /**
223
- * Creates an `Optional` value from a nullable (or undefined-able) input.
224
- * Null, or undefined, is converted to `None`, and anything else is converted
225
- * to `Some`.
226
- */
227
- static from(value) {
228
- return isNonNullable(value) ? Optional.some(value) : Optional.none();
229
- }
230
- /**
231
- * Converts an `Optional` to a nullable type, by getting the value if it
232
- * exists, or returning `null` if it does not.
233
- */
234
- getOrNull() {
235
- return this.tag ? this.value : null;
236
- }
237
- /**
238
- * Converts an `Optional` to an undefined-able type, by getting the value if
239
- * it exists, or returning `undefined` if it does not.
240
- */
241
- getOrUndefined() {
242
- return this.value;
243
- }
244
- // --- Utilities ---
245
- /**
246
- * If the `Optional` contains a value, perform an action on that value.
247
- * Unlike the rest of the methods on this type, `.each` has side-effects. If
248
- * you want to transform an `Optional<T>` **into** something, then this is not
249
- * the method for you. If you want to use an `Optional<T>` to **do**
250
- * something, then this is the method for you - provided you're okay with not
251
- * doing anything in the case where the `Optional` doesn't have a value inside
252
- * it. If you're not sure whether your use-case fits into transforming
253
- * **into** something or **doing** something, check whether it has a return
254
- * value. If it does, you should be performing a transform.
255
- */
256
- each(worker) {
257
- if (this.tag) {
258
- worker(this.value);
259
- }
260
- }
261
- /**
262
- * Turn the `Optional` object into an array that contains all of the values
263
- * stored inside the `Optional`. In practice, this means the output will have
264
- * either 0 or 1 elements.
265
- */
266
- toArray() {
267
- return this.tag ? [this.value] : [];
268
- }
269
- /**
270
- * Turn the `Optional` object into a string for debugging or printing. Not
271
- * recommended for production code, but good for debugging. Also note that
272
- * these days an `Optional` object can be logged to the console directly, and
273
- * its inner value (if it exists) will be visible.
274
- */
275
- toString() {
276
- return this.tag ? `some(${this.value})` : 'none()';
277
- }
278
- }
279
-
280
- const nativeSlice = Array.prototype.slice;
281
- const exists = (xs, pred) => {
282
- for (let i = 0, len = xs.length; i < len; i++) {
283
- const x = xs[i];
284
- if (pred(x, i)) {
285
- return true;
286
- }
287
- }
288
- return false;
289
- };
290
- const map$1 = (xs, f) => {
291
- // pre-allocating array size when it's guaranteed to be known
292
- // http://jsperf.com/push-allocated-vs-dynamic/22
293
- const len = xs.length;
294
- const r = new Array(len);
295
- for (let i = 0; i < len; i++) {
296
- const x = xs[i];
297
- r[i] = f(x, i);
298
- }
299
- return r;
300
- };
301
- // Unwound implementing other functions in terms of each.
302
- // The code size is roughly the same, and it should allow for better optimisation.
303
- // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {
304
- const each$1 = (xs, f) => {
305
- for (let i = 0, len = xs.length; i < len; i++) {
306
- const x = xs[i];
307
- f(x, i);
308
- }
309
- };
310
- isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
311
-
312
- // There are many variations of Object iteration that are faster than the 'for-in' style:
313
- // http://jsperf.com/object-keys-iteration/107
314
- //
315
- // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
316
- const keys = Object.keys;
317
- const hasOwnProperty = Object.hasOwnProperty;
318
- const each = (obj, f) => {
319
- const props = keys(obj);
320
- for (let k = 0, len = props.length; k < len; k++) {
321
- const i = props[k];
322
- const x = obj[i];
323
- f(x, i);
324
- }
325
- };
326
- const map = (obj, f) => {
327
- return tupleMap(obj, (x, i) => ({
328
- k: i,
329
- v: f(x, i)
330
- }));
331
- };
332
- const tupleMap = (obj, f) => {
333
- const r = {};
334
- each(obj, (x, i) => {
335
- const tuple = f(x, i);
336
- r[tuple.k] = tuple.v;
337
- });
338
- return r;
339
- };
340
- const has = (obj, key) => hasOwnProperty.call(obj, key);
341
-
342
- const Cell = (initial) => {
343
- let value = initial;
344
- const get = () => {
345
- return value;
346
- };
347
- const set = (v) => {
348
- value = v;
349
- };
350
- return {
351
- get,
352
- set
353
- };
354
- };
355
-
356
- const shallow = (old, nu) => {
357
- return nu;
358
- };
359
- const baseMerge = (merger) => {
360
- return (...objects) => {
361
- if (objects.length === 0) {
362
- throw new Error(`Can't merge zero objects`);
363
- }
364
- const ret = {};
365
- for (let j = 0; j < objects.length; j++) {
366
- const curObject = objects[j];
367
- for (const key in curObject) {
368
- if (has(curObject, key)) {
369
- ret[key] = merger(ret[key], curObject[key]);
370
- }
371
- }
372
- }
373
- return ret;
374
- };
375
- };
376
- const merge = baseMerge(shallow);
377
-
378
- const singleton = (doRevoke) => {
379
- const subject = Cell(Optional.none());
380
- const revoke = () => subject.get().each(doRevoke);
381
- const clear = () => {
382
- revoke();
383
- subject.set(Optional.none());
384
- };
385
- const isSet = () => subject.get().isSome();
386
- const get = () => subject.get();
387
- const set = (s) => {
388
- revoke();
389
- subject.set(Optional.some(s));
390
- };
391
- return {
392
- clear,
393
- isSet,
394
- get,
395
- set
396
- };
397
- };
398
- const value = () => {
399
- const subject = singleton(noop);
400
- const on = (f) => subject.get().each(f);
401
- return {
402
- ...subject,
403
- on
404
- };
405
- };
406
-
407
- const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
408
- const contains = (str, substr, start = 0, end) => {
409
- const idx = str.indexOf(substr, start);
410
- if (idx !== -1) {
411
- return isUndefined(end) ? true : idx + substr.length <= end;
412
- }
413
- else {
414
- return false;
415
- }
416
- };
417
- /** Does 'str' start with 'prefix'?
418
- * Note: all strings start with the empty string.
419
- * More formally, for all strings x, startsWith(x, "").
420
- * This is so that for all strings x and y, startsWith(y + x, y)
421
- */
422
- const startsWith = (str, prefix) => {
423
- return checkRange(str, prefix, 0);
424
- };
425
-
426
- // Run a function fn after rate ms. If another invocation occurs
427
- // during the time it is waiting, reschedule the function again
428
- // with the new arguments.
429
- const last = (fn, rate) => {
430
- let timer = null;
431
- const cancel = () => {
432
- if (!isNull(timer)) {
433
- clearTimeout(timer);
434
- timer = null;
435
- }
436
- };
437
- const throttle = (...args) => {
438
- cancel();
439
- timer = setTimeout(() => {
440
- timer = null;
441
- fn.apply(null, args);
442
- }, rate);
443
- };
444
- return {
445
- cancel,
446
- throttle
447
- };
448
- };
449
-
450
- const insertEmoticon = (editor, ch) => {
451
- editor.insertContent(ch);
452
- };
453
-
454
- var global = tinymce.util.Tools.resolve('tinymce.Resource');
455
-
456
- const DEFAULT_ID = 'tinymce.plugins.emoticons';
457
- const option = (name) => (editor) => editor.options.get(name);
458
- const register$2 = (editor, pluginUrl) => {
459
- const registerOption = editor.options.register;
460
- registerOption('emoticons_database', {
461
- processor: 'string',
462
- default: 'emojis'
463
- });
464
- registerOption('emoticons_database_url', {
465
- processor: 'string',
466
- default: `${pluginUrl}/js/${getEmojiDatabase(editor)}${editor.suffix}.js`
467
- });
468
- registerOption('emoticons_database_id', {
469
- processor: 'string',
470
- default: DEFAULT_ID
471
- });
472
- registerOption('emoticons_append', {
473
- processor: 'object',
474
- default: {}
475
- });
476
- registerOption('emoticons_images_url', {
477
- processor: 'string',
478
- default: 'https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.1.0/72x72/'
479
- });
480
- };
481
- const getEmojiDatabase = option('emoticons_database');
482
- const getEmojiDatabaseUrl = option('emoticons_database_url');
483
- const getEmojiDatabaseId = option('emoticons_database_id');
484
- const getAppendedEmoji = option('emoticons_append');
485
- const getEmojiImageUrl = option('emoticons_images_url');
486
-
487
- const ALL_CATEGORY = 'All';
488
- const categoryNameMap = {
489
- symbols: 'Symbols',
490
- people: 'People',
491
- animals_and_nature: 'Animals and Nature',
492
- food_and_drink: 'Food and Drink',
493
- activity: 'Activity',
494
- travel_and_places: 'Travel and Places',
495
- objects: 'Objects',
496
- flags: 'Flags',
497
- user: 'User Defined'
498
- };
499
- const translateCategory = (categories, name) => has(categories, name) ? categories[name] : name;
500
- const getUserDefinedEmoji = (editor) => {
501
- const userDefinedEmoticons = getAppendedEmoji(editor);
502
- return map(userDefinedEmoticons, (value) =>
503
- // Set some sane defaults for the custom emoji entry
504
- ({ keywords: [], category: 'user', ...value }));
505
- };
506
- // TODO: Consider how to share this loading across different editors
507
- const initDatabase = (editor, databaseUrl, databaseId) => {
508
- const categories = value();
509
- const all = value();
510
- const emojiImagesUrl = getEmojiImageUrl(editor);
511
- const getEmoji = (lib) => {
512
- // Note: This is a little hacky, but the database doesn't provide a way for us to tell what sort of database is being used
513
- if (startsWith(lib.char, '<img')) {
514
- return lib.char.replace(/src="([^"]+)"/, (match, url) => `src="${emojiImagesUrl}${url}"`);
515
- }
516
- else {
517
- return lib.char;
518
- }
519
- };
520
- const processEmojis = (emojis) => {
521
- const cats = {};
522
- const everything = [];
523
- each(emojis, (lib, title) => {
524
- const entry = {
525
- // Omitting fitzpatrick_scale
526
- title,
527
- keywords: lib.keywords,
528
- char: getEmoji(lib),
529
- category: translateCategory(categoryNameMap, lib.category)
530
- };
531
- const current = cats[entry.category] !== undefined ? cats[entry.category] : [];
532
- cats[entry.category] = current.concat([entry]);
533
- everything.push(entry);
534
- });
535
- categories.set(cats);
536
- all.set(everything);
537
- };
538
- editor.on('init', () => {
539
- global.load(databaseId, databaseUrl).then((emojis) => {
540
- const userEmojis = getUserDefinedEmoji(editor);
541
- processEmojis(merge(emojis, userEmojis));
542
- }, (err) => {
543
- // eslint-disable-next-line no-console
544
- console.log(`Failed to load emojis: ${err}`);
545
- categories.set({});
546
- all.set([]);
547
- });
548
- });
549
- const listCategory = (category) => {
550
- if (category === ALL_CATEGORY) {
551
- return listAll();
552
- }
553
- return categories.get().bind((cats) => Optional.from(cats[category])).getOr([]);
554
- };
555
- const listAll = () => all.get().getOr([]);
556
- const listCategories = () =>
557
- // TODO: Category key order should be adjusted to match the standard
558
- [ALL_CATEGORY].concat(keys(categories.get().getOr({})));
559
- const waitForLoad = () => {
560
- if (hasLoaded()) {
561
- return Promise.resolve(true);
562
- }
563
- else {
564
- return new Promise((resolve, reject) => {
565
- let numRetries = 15;
566
- const interval = setInterval(() => {
567
- if (hasLoaded()) {
568
- clearInterval(interval);
569
- resolve(true);
570
- }
571
- else {
572
- numRetries--;
573
- if (numRetries < 0) {
574
- // eslint-disable-next-line no-console
575
- console.log('Could not load emojis from url: ' + databaseUrl);
576
- clearInterval(interval);
577
- reject(false);
578
- }
579
- }
580
- }, 100);
581
- });
582
- }
583
- };
584
- const hasLoaded = () => categories.isSet() && all.isSet();
585
- return {
586
- listCategories,
587
- hasLoaded,
588
- waitForLoad,
589
- listAll,
590
- listCategory
591
- };
592
- };
593
-
594
- const emojiMatches = (emoji, lowerCasePattern) => contains(emoji.title.toLowerCase(), lowerCasePattern) ||
595
- exists(emoji.keywords, (k) => contains(k.toLowerCase(), lowerCasePattern));
596
- const emojisFrom = (list, pattern, maxResults) => {
597
- const matches = [];
598
- const lowerCasePattern = pattern.toLowerCase();
599
- const reachedLimit = maxResults.fold(() => never, (max) => (size) => size >= max);
600
- for (let i = 0; i < list.length; i++) {
601
- // TODO: more intelligent search by showing title matches at the top, keyword matches after that (use two arrays and concat at the end)
602
- if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) {
603
- matches.push({
604
- value: list[i].char,
605
- text: list[i].title,
606
- icon: list[i].char
607
- });
608
- if (reachedLimit(matches.length)) {
609
- break;
610
- }
611
- }
612
- }
613
- return matches;
614
- };
615
-
616
- const patternName = 'pattern';
617
- const open = (editor, database) => {
618
- const initialState = {
619
- pattern: '',
620
- results: emojisFrom(database.listAll(), '', Optional.some(300))
621
- };
622
- const currentTab = Cell(ALL_CATEGORY);
623
- const scan = (dialogApi) => {
624
- const dialogData = dialogApi.getData();
625
- const category = currentTab.get();
626
- const candidates = database.listCategory(category);
627
- const results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Optional.some(300) : Optional.none());
628
- dialogApi.setData({
629
- results
630
- });
631
- };
632
- const updateFilter = last((dialogApi) => {
633
- scan(dialogApi);
634
- }, 200);
635
- const searchField = {
636
- label: 'Search',
637
- type: 'input',
638
- name: patternName
639
- };
640
- const resultsField = {
641
- type: 'collection',
642
- name: 'results'
643
- // TODO TINY-3229 implement collection columns properly
644
- // columns: 'auto'
645
- };
646
- const getInitialState = () => {
647
- const body = {
648
- type: 'tabpanel',
649
- // All tabs have the same fields.
650
- tabs: map$1(database.listCategories(), (cat) => ({
651
- title: cat,
652
- name: cat,
653
- items: [searchField, resultsField]
654
- }))
655
- };
656
- return {
657
- title: 'Emojis',
658
- size: 'normal',
659
- body,
660
- initialData: initialState,
661
- onTabChange: (dialogApi, details) => {
662
- currentTab.set(details.newTabName);
663
- updateFilter.throttle(dialogApi);
664
- },
665
- onChange: updateFilter.throttle,
666
- onAction: (dialogApi, actionData) => {
667
- if (actionData.name === 'results') {
668
- insertEmoticon(editor, actionData.value);
669
- dialogApi.close();
670
- }
671
- },
672
- buttons: [
673
- {
674
- type: 'cancel',
675
- text: 'Close',
676
- primary: true
677
- }
678
- ]
679
- };
680
- };
681
- const dialogApi = editor.windowManager.open(getInitialState());
682
- dialogApi.focus(patternName);
683
- if (!database.hasLoaded()) {
684
- dialogApi.block('Loading emojis...');
685
- database.waitForLoad().then(() => {
686
- dialogApi.redial(getInitialState());
687
- updateFilter.throttle(dialogApi);
688
- dialogApi.focus(patternName);
689
- dialogApi.unblock();
690
- }).catch((_err) => {
691
- dialogApi.redial({
692
- title: 'Emojis',
693
- body: {
694
- type: 'panel',
695
- items: [
696
- {
697
- type: 'alertbanner',
698
- level: 'error',
699
- icon: 'warning',
700
- text: 'Could not load emojis'
701
- }
702
- ]
703
- },
704
- buttons: [
705
- {
706
- type: 'cancel',
707
- text: 'Close',
708
- primary: true
709
- }
710
- ],
711
- initialData: {
712
- pattern: '',
713
- results: []
714
- }
715
- });
716
- dialogApi.focus(patternName);
717
- dialogApi.unblock();
718
- });
719
- }
720
- };
721
-
722
- const register$1 = (editor, database) => {
723
- editor.addCommand('mceEmoticons', () => open(editor, database));
724
- };
725
-
726
- const setup = (editor) => {
727
- editor.on('PreInit', () => {
728
- editor.parser.addAttributeFilter('data-emoticon', (nodes) => {
729
- each$1(nodes, (node) => {
730
- node.attr('data-mce-resize', 'false');
731
- node.attr('data-mce-placeholder', '1');
732
- });
733
- });
734
- });
735
- };
736
-
737
- const init = (editor, database) => {
738
- editor.ui.registry.addAutocompleter('emoticons', {
739
- trigger: ':',
740
- columns: 'auto',
741
- minChars: 2,
742
- fetch: (pattern, maxResults) => database.waitForLoad().then(() => {
743
- const candidates = database.listAll();
744
- return emojisFrom(candidates, pattern, Optional.some(maxResults));
745
- }),
746
- onAction: (autocompleteApi, rng, value) => {
747
- editor.selection.setRng(rng);
748
- editor.insertContent(value);
749
- autocompleteApi.hide();
750
- }
751
- });
752
- };
753
-
754
- const onSetupEditable = (editor) => (api) => {
755
- const nodeChanged = () => {
756
- api.setEnabled(editor.selection.isEditable());
757
- };
758
- editor.on('NodeChange', nodeChanged);
759
- nodeChanged();
760
- return () => {
761
- editor.off('NodeChange', nodeChanged);
762
- };
763
- };
764
- const register = (editor) => {
765
- const onAction = () => editor.execCommand('mceEmoticons');
766
- editor.ui.registry.addButton('emoticons', {
767
- tooltip: 'Emojis',
768
- icon: 'emoji',
769
- onAction,
770
- onSetup: onSetupEditable(editor)
771
- });
772
- editor.ui.registry.addMenuItem('emoticons', {
773
- text: 'Emojis...',
774
- icon: 'emoji',
775
- onAction,
776
- onSetup: onSetupEditable(editor)
777
- });
778
- };
779
-
780
- /**
781
- * This class contains all core logic for the emoticons plugin.
782
- *
783
- * @class tinymce.emoticons.Plugin
784
- * @private
785
- */
786
- var Plugin = () => {
787
- global$1.add('emoticons', (editor, pluginUrl) => {
788
- register$2(editor, pluginUrl);
789
- const databaseUrl = getEmojiDatabaseUrl(editor);
790
- const databaseId = getEmojiDatabaseId(editor);
791
- const database = initDatabase(editor, databaseUrl, databaseId);
792
- register$1(editor, database);
793
- register(editor);
794
- init(editor, database);
795
- setup(editor);
796
- return {
797
- getAllEmojis: () => database.waitForLoad().then(() => database.listAll())
798
- };
799
- });
800
- };
801
-
802
- Plugin();
803
- /** *****
804
- * DO NOT EXPORT ANYTHING
805
- *
806
- * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
807
- *******/
808
-
809
- })();