create-nextjs-cms 0.5.55 → 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 (341) 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/(auth)/auth/login/LoginPage.tsx +14 -11
  5. package/templates/default/app/(rootLayout)/admins/page.tsx +7 -2
  6. package/templates/default/app/(rootLayout)/advanced/page.tsx +8 -2
  7. package/templates/default/app/(rootLayout)/browse/[section]/[page]/page.tsx +17 -3
  8. package/templates/default/app/(rootLayout)/categorized/[section]/page.tsx +9 -1
  9. package/templates/default/app/(rootLayout)/dashboard-new/page.tsx +7 -0
  10. package/templates/default/app/(rootLayout)/edit/[section]/[itemId]/page.tsx +11 -1
  11. package/templates/default/app/(rootLayout)/layout.tsx +8 -1
  12. package/templates/default/app/(rootLayout)/new/[section]/page.tsx +9 -1
  13. package/templates/default/app/(rootLayout)/section/[section]/page.tsx +10 -1
  14. package/templates/default/app/(rootLayout)/settings/page.tsx +7 -1
  15. package/templates/default/app/api/trpc/[trpc]/route.ts +1 -1
  16. package/templates/default/app/api/video/route.ts +1 -1
  17. package/templates/default/app/layout.tsx +5 -3
  18. package/templates/default/app/providers.tsx +10 -9
  19. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/LICENSE +191 -0
  20. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/README.md +118 -0
  21. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/build.js +38 -0
  22. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/check.js +14 -0
  23. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/channel.js +177 -0
  24. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/colour.js +195 -0
  25. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/composite.js +212 -0
  26. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/constructor.js +499 -0
  27. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.d.ts +1971 -0
  28. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.js +16 -0
  29. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/input.js +809 -0
  30. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/is.js +143 -0
  31. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/libvips.js +207 -0
  32. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/operation.js +1016 -0
  33. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/output.js +1666 -0
  34. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/resize.js +595 -0
  35. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/sharp.js +121 -0
  36. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/utility.js +291 -0
  37. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/package.json +202 -0
  38. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/binding.gyp +298 -0
  39. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.cc +1130 -0
  40. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.h +402 -0
  41. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.cc +346 -0
  42. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.h +90 -0
  43. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.cc +499 -0
  44. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.h +137 -0
  45. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.cc +1814 -0
  46. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.h +408 -0
  47. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/sharp.cc +43 -0
  48. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.cc +186 -0
  49. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.h +62 -0
  50. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.cc +288 -0
  51. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.h +22 -0
  52. package/templates/default/components/BrowsePage.tsx +4 -4
  53. package/templates/default/components/DashboardNewPage.tsx +252 -0
  54. package/templates/default/components/Layout.tsx +2 -2
  55. package/templates/default/components/LogPage.tsx +2 -3
  56. package/templates/default/components/NavbarAlt.tsx +5 -5
  57. package/templates/default/components/SettingsPage.tsx +1 -1
  58. package/templates/default/components/Sidebar.tsx +7 -7
  59. package/templates/default/components/form/Form.tsx +5 -5
  60. package/templates/default/components/form/helpers/util.ts +5 -5
  61. package/templates/default/dynamic-schemas/schema.ts +381 -381
  62. package/templates/default/next-env.d.ts +1 -1
  63. package/templates/default/next.config.ts +24 -0
  64. package/templates/default/package.json +23 -17
  65. package/templates/default/{middleware.ts → proxy.ts} +3 -4
  66. package/templates/default/test/prize.section.ts +58 -0
  67. package/templates/default/tsconfig.json +6 -3
  68. package/templates/default/app/api/placeholder/route.ts +0 -7
  69. package/templates/default/components/form/helpers/_section-hot-reload.js +0 -11
  70. package/templates/default/public/tinymce/CHANGELOG.md +0 -3940
  71. package/templates/default/public/tinymce/README.md +0 -77
  72. package/templates/default/public/tinymce/bower.json +0 -27
  73. package/templates/default/public/tinymce/composer.json +0 -52
  74. package/templates/default/public/tinymce/icons/default/icons.js +0 -239
  75. package/templates/default/public/tinymce/icons/default/icons.min.js +0 -1
  76. package/templates/default/public/tinymce/icons/default/index.js +0 -7
  77. package/templates/default/public/tinymce/license.md +0 -9
  78. package/templates/default/public/tinymce/models/dom/index.js +0 -7
  79. package/templates/default/public/tinymce/models/dom/model.js +0 -8980
  80. package/templates/default/public/tinymce/models/dom/model.min.js +0 -1
  81. package/templates/default/public/tinymce/notices.txt +0 -21
  82. package/templates/default/public/tinymce/package.json +0 -32
  83. package/templates/default/public/tinymce/plugins/accordion/index.js +0 -7
  84. package/templates/default/public/tinymce/plugins/accordion/plugin.js +0 -1373
  85. package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +0 -1
  86. package/templates/default/public/tinymce/plugins/advlist/index.js +0 -7
  87. package/templates/default/public/tinymce/plugins/advlist/plugin.js +0 -473
  88. package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +0 -1
  89. package/templates/default/public/tinymce/plugins/anchor/index.js +0 -7
  90. package/templates/default/public/tinymce/plugins/anchor/plugin.js +0 -237
  91. package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +0 -1
  92. package/templates/default/public/tinymce/plugins/autolink/index.js +0 -7
  93. package/templates/default/public/tinymce/plugins/autolink/plugin.js +0 -315
  94. package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +0 -1
  95. package/templates/default/public/tinymce/plugins/autoresize/index.js +0 -7
  96. package/templates/default/public/tinymce/plugins/autoresize/plugin.js +0 -221
  97. package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +0 -1
  98. package/templates/default/public/tinymce/plugins/autosave/index.js +0 -7
  99. package/templates/default/public/tinymce/plugins/autosave/plugin.js +0 -249
  100. package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +0 -1
  101. package/templates/default/public/tinymce/plugins/charmap/index.js +0 -7
  102. package/templates/default/public/tinymce/plugins/charmap/plugin.js +0 -997
  103. package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +0 -1
  104. package/templates/default/public/tinymce/plugins/code/index.js +0 -7
  105. package/templates/default/public/tinymce/plugins/code/plugin.js +0 -98
  106. package/templates/default/public/tinymce/plugins/code/plugin.min.js +0 -1
  107. package/templates/default/public/tinymce/plugins/codesample/index.js +0 -7
  108. package/templates/default/public/tinymce/plugins/codesample/plugin.js +0 -3655
  109. package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +0 -9
  110. package/templates/default/public/tinymce/plugins/directionality/index.js +0 -7
  111. package/templates/default/public/tinymce/plugins/directionality/plugin.js +0 -634
  112. package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +0 -1
  113. package/templates/default/public/tinymce/plugins/emoticons/index.js +0 -7
  114. package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
  115. package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -1
  116. package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +0 -1
  117. package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +0 -1
  118. package/templates/default/public/tinymce/plugins/emoticons/plugin.js +0 -809
  119. package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +0 -1
  120. package/templates/default/public/tinymce/plugins/fullscreen/index.js +0 -7
  121. package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +0 -1607
  122. package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +0 -1
  123. package/templates/default/public/tinymce/plugins/help/index.js +0 -7
  124. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -93
  125. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +0 -93
  126. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -93
  127. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -93
  128. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -93
  129. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +0 -93
  130. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +0 -93
  131. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +0 -93
  132. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +0 -93
  133. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +0 -93
  134. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -93
  135. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -93
  136. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -93
  137. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +0 -93
  138. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -93
  139. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he-IL.js +0 -93
  140. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -93
  141. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -93
  142. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -93
  143. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +0 -93
  144. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -93
  145. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +0 -93
  146. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +0 -93
  147. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -93
  148. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -93
  149. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +0 -93
  150. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -93
  151. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -93
  152. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +0 -93
  153. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -93
  154. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -93
  155. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -93
  156. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +0 -93
  157. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +0 -93
  158. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -93
  159. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -93
  160. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -93
  161. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -93
  162. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -93
  163. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +0 -93
  164. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -93
  165. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +0 -93
  166. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -93
  167. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th-TH.js +0 -93
  168. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -93
  169. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -93
  170. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -93
  171. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -93
  172. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +0 -87
  173. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +0 -93
  174. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -87
  175. package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -93
  176. package/templates/default/public/tinymce/plugins/help/plugin.js +0 -826
  177. package/templates/default/public/tinymce/plugins/help/plugin.min.js +0 -1
  178. package/templates/default/public/tinymce/plugins/image/index.js +0 -7
  179. package/templates/default/public/tinymce/plugins/image/plugin.js +0 -1691
  180. package/templates/default/public/tinymce/plugins/image/plugin.min.js +0 -1
  181. package/templates/default/public/tinymce/plugins/importcss/index.js +0 -7
  182. package/templates/default/public/tinymce/plugins/importcss/plugin.js +0 -401
  183. package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +0 -1
  184. package/templates/default/public/tinymce/plugins/insertdatetime/index.js +0 -7
  185. package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +0 -187
  186. package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +0 -1
  187. package/templates/default/public/tinymce/plugins/link/index.js +0 -7
  188. package/templates/default/public/tinymce/plugins/link/plugin.js +0 -1709
  189. package/templates/default/public/tinymce/plugins/link/plugin.min.js +0 -1
  190. package/templates/default/public/tinymce/plugins/lists/index.js +0 -7
  191. package/templates/default/public/tinymce/plugins/lists/plugin.js +0 -602
  192. package/templates/default/public/tinymce/plugins/lists/plugin.min.js +0 -1
  193. package/templates/default/public/tinymce/plugins/media/index.js +0 -7
  194. package/templates/default/public/tinymce/plugins/media/plugin.js +0 -1442
  195. package/templates/default/public/tinymce/plugins/media/plugin.min.js +0 -1
  196. package/templates/default/public/tinymce/plugins/nonbreaking/index.js +0 -7
  197. package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +0 -128
  198. package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +0 -1
  199. package/templates/default/public/tinymce/plugins/pagebreak/index.js +0 -7
  200. package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +0 -123
  201. package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +0 -1
  202. package/templates/default/public/tinymce/plugins/preview/index.js +0 -7
  203. package/templates/default/public/tinymce/plugins/preview/plugin.js +0 -843
  204. package/templates/default/public/tinymce/plugins/preview/plugin.min.js +0 -1
  205. package/templates/default/public/tinymce/plugins/quickbars/index.js +0 -7
  206. package/templates/default/public/tinymce/plugins/quickbars/plugin.js +0 -654
  207. package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +0 -1
  208. package/templates/default/public/tinymce/plugins/save/index.js +0 -7
  209. package/templates/default/public/tinymce/plugins/save/plugin.js +0 -136
  210. package/templates/default/public/tinymce/plugins/save/plugin.min.js +0 -1
  211. package/templates/default/public/tinymce/plugins/searchreplace/index.js +0 -7
  212. package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +0 -1367
  213. package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +0 -1
  214. package/templates/default/public/tinymce/plugins/table/index.js +0 -7
  215. package/templates/default/public/tinymce/plugins/table/plugin.js +0 -4008
  216. package/templates/default/public/tinymce/plugins/table/plugin.min.js +0 -1
  217. package/templates/default/public/tinymce/plugins/visualblocks/index.js +0 -7
  218. package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +0 -106
  219. package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +0 -1
  220. package/templates/default/public/tinymce/plugins/visualchars/index.js +0 -7
  221. package/templates/default/public/tinymce/plugins/visualchars/plugin.js +0 -808
  222. package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +0 -1
  223. package/templates/default/public/tinymce/plugins/wordcount/index.js +0 -7
  224. package/templates/default/public/tinymce/plugins/wordcount/plugin.js +0 -480
  225. package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +0 -1
  226. package/templates/default/public/tinymce/skins/content/dark/content.css +0 -75
  227. package/templates/default/public/tinymce/skins/content/dark/content.js +0 -10
  228. package/templates/default/public/tinymce/skins/content/dark/content.min.css +0 -10
  229. package/templates/default/public/tinymce/skins/content/dark/content.min.ts +0 -3
  230. package/templates/default/public/tinymce/skins/content/dark/content.ts +0 -3
  231. package/templates/default/public/tinymce/skins/content/default/content.css +0 -70
  232. package/templates/default/public/tinymce/skins/content/default/content.js +0 -10
  233. package/templates/default/public/tinymce/skins/content/default/content.min.css +0 -10
  234. package/templates/default/public/tinymce/skins/content/default/content.min.ts +0 -3
  235. package/templates/default/public/tinymce/skins/content/default/content.ts +0 -3
  236. package/templates/default/public/tinymce/skins/content/document/content.css +0 -75
  237. package/templates/default/public/tinymce/skins/content/document/content.js +0 -10
  238. package/templates/default/public/tinymce/skins/content/document/content.min.css +0 -10
  239. package/templates/default/public/tinymce/skins/content/document/content.min.ts +0 -3
  240. package/templates/default/public/tinymce/skins/content/document/content.ts +0 -3
  241. package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +0 -70
  242. package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +0 -10
  243. package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +0 -10
  244. package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.ts +0 -3
  245. package/templates/default/public/tinymce/skins/content/tinymce-5/content.ts +0 -3
  246. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +0 -75
  247. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +0 -10
  248. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -10
  249. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.ts +0 -3
  250. package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.ts +0 -3
  251. package/templates/default/public/tinymce/skins/content/writer/content.css +0 -71
  252. package/templates/default/public/tinymce/skins/content/writer/content.js +0 -10
  253. package/templates/default/public/tinymce/skins/content/writer/content.min.css +0 -10
  254. package/templates/default/public/tinymce/skins/content/writer/content.min.ts +0 -3
  255. package/templates/default/public/tinymce/skins/content/writer/content.ts +0 -3
  256. package/templates/default/public/tinymce/skins/ui/oxide/content.css +0 -1037
  257. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +0 -1031
  258. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +0 -10
  259. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +0 -10
  260. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.ts +0 -116
  261. package/templates/default/public/tinymce/skins/ui/oxide/content.inline.ts +0 -116
  262. package/templates/default/public/tinymce/skins/ui/oxide/content.js +0 -10
  263. package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +0 -10
  264. package/templates/default/public/tinymce/skins/ui/oxide/content.min.ts +0 -116
  265. package/templates/default/public/tinymce/skins/ui/oxide/content.ts +0 -116
  266. package/templates/default/public/tinymce/skins/ui/oxide/skin.css +0 -5615
  267. package/templates/default/public/tinymce/skins/ui/oxide/skin.js +0 -1
  268. package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +0 -1
  269. package/templates/default/public/tinymce/skins/ui/oxide/skin.min.ts +0 -507
  270. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
  271. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -1
  272. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
  273. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +0 -9
  274. package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.ts +0 -9
  275. package/templates/default/public/tinymce/skins/ui/oxide/skin.ts +0 -507
  276. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +0 -1025
  277. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +0 -1031
  278. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +0 -10
  279. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -10
  280. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.ts +0 -116
  281. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.ts +0 -116
  282. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +0 -10
  283. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +0 -10
  284. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.ts +0 -116
  285. package/templates/default/public/tinymce/skins/ui/oxide-dark/content.ts +0 -116
  286. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +0 -5618
  287. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +0 -1
  288. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
  289. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.ts +0 -507
  290. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
  291. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -1
  292. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
  293. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +0 -9
  294. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +0 -9
  295. package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.ts +0 -507
  296. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +0 -1037
  297. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +0 -1031
  298. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +0 -10
  299. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -10
  300. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.ts +0 -116
  301. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.ts +0 -116
  302. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +0 -10
  303. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +0 -10
  304. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.ts +0 -116
  305. package/templates/default/public/tinymce/skins/ui/tinymce-5/content.ts +0 -116
  306. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +0 -5734
  307. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +0 -1
  308. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
  309. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.ts +0 -508
  310. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
  311. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -1
  312. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
  313. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +0 -9
  314. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +0 -9
  315. package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.ts +0 -508
  316. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +0 -1025
  317. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -1031
  318. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -10
  319. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -10
  320. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +0 -116
  321. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +0 -116
  322. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +0 -10
  323. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -10
  324. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.ts +0 -116
  325. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.ts +0 -116
  326. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -5734
  327. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -1
  328. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
  329. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +0 -508
  330. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
  331. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -1
  332. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
  333. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +0 -9
  334. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +0 -9
  335. package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.ts +0 -508
  336. package/templates/default/public/tinymce/themes/silver/index.js +0 -7
  337. package/templates/default/public/tinymce/themes/silver/theme.js +0 -34748
  338. package/templates/default/public/tinymce/themes/silver/theme.min.js +0 -1
  339. package/templates/default/public/tinymce/tinymce.d.ts +0 -3413
  340. package/templates/default/public/tinymce/tinymce.js +0 -41518
  341. package/templates/default/public/tinymce/tinymce.min.js +0 -10
@@ -1 +0,0 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>undefined===e;const r=e=>"function"==typeof e;const n=e=>()=>e,s=e=>e,o=n(!1);class i{tag;value;static singletonNone=new i(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new i(!0,e)}static none(){return i.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?i.some(e(this.value)):i.none()}bind(e){return this.tag?e(this.value):i.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:i.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return null==e?i.none():i.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const a=Array.prototype.indexOf,c=(e,t)=>((e,t,r)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n))return i.some(s);if(r(s,n))break}return i.none()})(e,t,o);r(Array.from)&&Array.from;const u=Object.keys,l=(e,t)=>{const r=[];return((e,t)=>{const r=u(e);for(let n=0,s=r.length;n<s;n++){const s=r[n];t(e[s],s)}})(e,((e,n)=>{r.push(t(e,n))})),r},d=(e,r,n=0,s)=>{const o=e.indexOf(r,n);return-1!==o&&(!!t(s)||o+r.length<=s)},m=()=>h(0,0),h=(e,t)=>({major:e,minor:t}),g={nu:h,detect:(e,t)=>{const r=String(t).toLowerCase();return 0===e.length?m():((e,t)=>{const r=((e,t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(n.test(t))return n}})(e,t);if(!r)return{major:0,minor:0};const n=e=>Number(t.replace(r,"$"+e));return h(n(1),n(2))})(e,r)},unknown:m},v=(e,t)=>{const r=String(t).toLowerCase();return c(e,(e=>e.search(r)))},p=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,f=e=>t=>d(t,e),w=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>d(e,"edge/")&&d(e,"chrome")&&d(e,"safari")&&d(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,p],search:e=>d(e,"chrome")&&!d(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>d(e,"msie")||d(e,"trident")},{name:"Opera",versionRegexes:[p,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:f("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:f("firefox")},{name:"Safari",versionRegexes:[p,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(d(e,"safari")||d(e,"mobile/"))&&d(e,"applewebkit")}],y=[{name:"Windows",search:f("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>d(e,"iphone")||d(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:f("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:f("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:f("linux"),versionRegexes:[]},{name:"Solaris",search:f("sunos"),versionRegexes:[]},{name:"FreeBSD",search:f("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:f("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],x={browsers:n(w),oses:n(y)},S="Edge",b="Chromium",O="Opera",A="Firefox",C="Safari",R=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isEdge:n(S),isChromium:n(b),isIE:n("IE"),isOpera:n(O),isFirefox:n(A),isSafari:n(C)}},k=()=>R({current:void 0,version:g.unknown()}),D=R,E=(n(S),n(b),n("IE"),n(O),n(A),n(C),"Windows"),I="Android",T="Linux",L="macOS",P="Solaris",$="FreeBSD",_="ChromeOS",B=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isWindows:n(E),isiOS:n("iOS"),isAndroid:n(I),isMacOS:n(L),isLinux:n(T),isSolaris:n(P),isFreeBSD:n($),isChromeOS:n(_)}},N=()=>B({current:void 0,version:g.unknown()}),F=B,M=(n(E),n("iOS"),n(I),n(T),n(L),n(P),n($),n(_),(e,t,r)=>{const s=x.browsers(),o=x.oses(),a=t.bind((e=>((e,t)=>((e,t)=>{for(let r=0;r<e.length;r++){const n=t(e[r]);if(n.isSome())return n}return i.none()})(t.brands,(t=>{const r=t.brand.toLowerCase();return c(e,(e=>r===e.brand?.toLowerCase())).map((e=>({current:e.name,version:g.nu(parseInt(t.version,10),0)})))})))(s,e))).orThunk((()=>((e,t)=>v(e,t).map((e=>{const r=g.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(s,e))).fold(k,D),u=((e,t)=>v(e,t).map((e=>{const r=g.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(o,e).fold(N,F),l=((e,t,r,s)=>{const o=e.isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),c=a||s("(pointer:coarse)"),u=o||!i&&a&&s("(min-device-width:768px)"),l=i||a&&!u,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!l&&!u&&!d;return{isiPad:n(o),isiPhone:n(i),isTablet:n(u),isPhone:n(l),isTouch:n(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:n(d),isDesktop:n(m)}})(u,a,e,r);return{browser:a,os:u,deviceType:l}}),j=e=>window.matchMedia(e).matches;let U=(e=>{let t,r=!1;return(...n)=>(r||(r=!0,t=e.apply(null,n)),t)})((()=>M(window.navigator.userAgent,i.from(window.navigator.userAgentData),j)));const W=()=>U();var K=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),V=tinymce.util.Tools.resolve("tinymce.util.Tools");const z=e=>t=>t.options.get(e),Y=z("content_style"),q=z("content_css_cors"),G=z("body_class"),H=z("body_id"),J=e=>{var t;return((e,t)=>{const r=e.length,n=new Array(r);for(let s=0;s<r;s++){const r=e[s];n[s]=t(r)}return n})(((e,t)=>{const n=[],s=r(t)?e=>((e,t)=>{for(let r=0,n=e.length;r<n;r++)if(t(e[r]))return!0;return!1})(n,(r=>t(r,e))):e=>((e,t)=>((e,t)=>a.call(e,t))(e,t)>-1)(n,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];s(r)||n.push(r)}return n})((t=e.schema.getComponentUrls(),l(t,s))),(t=>{const r=l(K.ScriptLoader.getScriptAttributes(t),((t,r)=>` ${e.dom.encode(r)}="${e.dom.encode(t)}"`));return`<script src="${e.dom.encode(t)}"${r.join("")}><\/script>`})).join("")},Q=e=>{const t=(e=>{let t="";const r=e.dom.encode,n=Y(e)??"";t+=`<base href="${r(e.documentBaseURI.getURI())}">`;const s=q(e)?' crossorigin="anonymous"':"";V.each(e.contentCSS,(n=>{t+='<link type="text/css" rel="stylesheet" href="'+r(e.documentBaseURI.toAbsolute(n))+'"'+s+">"})),n&&(t+='<style type="text/css">'+n+"</style>"),t+=J(e);const o=H(e),i=G(e),a=e.getBody().dir,c=a?' dir="'+r(a)+'"':"";return"<!DOCTYPE html><html><head>"+t+'</head><body id="'+r(o)+'" class="mce-content-body '+r(i)+'"'+c+">"+e.getContent()+(()=>{const e=W().os.isMacOS()||W().os.isiOS();return`<script>(${(e=>{document.addEventListener("click",(t=>{for(let r=t.target;r;r=r.parentNode)if("A"===r.nodeName){const n=r.getAttribute("href");if(n&&n.startsWith("#")){t.preventDefault();const e=document.getElementById(n.substring(1));return void(e&&e.scrollIntoView({behavior:"smooth"}))}(e?t.metaKey:t.ctrlKey&&!t.altKey)||t.preventDefault()}}),!1)}).toString()})(${e})<\/script>`})()+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{Q(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t,context:"any"}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t,context:"any"})})(e)}))}();
@@ -1,7 +0,0 @@
1
- // Exports the "quickbars" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/quickbars')
5
- // ES2015:
6
- // import 'tinymce/plugins/quickbars'
7
- require('./plugin.js');
@@ -1,654 +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 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 = (type) => (value) => typeOf(value) === type;
36
- const isSimpleType = (type) => (value) => typeof value === type;
37
- const isString = isType('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
-
43
- const constant = (value) => {
44
- return () => {
45
- return value;
46
- };
47
- };
48
- const never = constant(false);
49
-
50
- /**
51
- * The `Optional` type represents a value (of any type) that potentially does
52
- * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
53
- * value does exist) or a `None` (in which case the value does not exist). This
54
- * module defines a whole lot of FP-inspired utility functions for dealing with
55
- * `Optional` objects.
56
- *
57
- * Comparison with null or undefined:
58
- * - We don't get fancy null coalescing operators with `Optional`
59
- * - We do get fancy helper functions with `Optional`
60
- * - `Optional` support nesting, and allow for the type to still be nullable (or
61
- * another `Optional`)
62
- * - There is no option to turn off strict-optional-checks like there is for
63
- * strict-null-checks
64
- */
65
- class Optional {
66
- tag;
67
- value;
68
- // Sneaky optimisation: every instance of Optional.none is identical, so just
69
- // reuse the same object
70
- static singletonNone = new Optional(false);
71
- // The internal representation has a `tag` and a `value`, but both are
72
- // private: able to be console.logged, but not able to be accessed by code
73
- constructor(tag, value) {
74
- this.tag = tag;
75
- this.value = value;
76
- }
77
- // --- Identities ---
78
- /**
79
- * Creates a new `Optional<T>` that **does** contain a value.
80
- */
81
- static some(value) {
82
- return new Optional(true, value);
83
- }
84
- /**
85
- * Create a new `Optional<T>` that **does not** contain a value. `T` can be
86
- * any type because we don't actually have a `T`.
87
- */
88
- static none() {
89
- return Optional.singletonNone;
90
- }
91
- /**
92
- * Perform a transform on an `Optional` type. Regardless of whether this
93
- * `Optional` contains a value or not, `fold` will return a value of type `U`.
94
- * If this `Optional` does not contain a value, the `U` will be created by
95
- * calling `onNone`. If this `Optional` does contain a value, the `U` will be
96
- * created by calling `onSome`.
97
- *
98
- * For the FP enthusiasts in the room, this function:
99
- * 1. Could be used to implement all of the functions below
100
- * 2. Forms a catamorphism
101
- */
102
- fold(onNone, onSome) {
103
- if (this.tag) {
104
- return onSome(this.value);
105
- }
106
- else {
107
- return onNone();
108
- }
109
- }
110
- /**
111
- * Determine if this `Optional` object contains a value.
112
- */
113
- isSome() {
114
- return this.tag;
115
- }
116
- /**
117
- * Determine if this `Optional` object **does not** contain a value.
118
- */
119
- isNone() {
120
- return !this.tag;
121
- }
122
- // --- Functor (name stolen from Haskell / maths) ---
123
- /**
124
- * Perform a transform on an `Optional` object, **if** there is a value. If
125
- * you provide a function to turn a T into a U, this is the function you use
126
- * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
127
- * a value then the output will also contain a value (that value being the
128
- * output of `mapper(this.value)`), and if this **does not** contain a value
129
- * then neither will the output.
130
- */
131
- map(mapper) {
132
- if (this.tag) {
133
- return Optional.some(mapper(this.value));
134
- }
135
- else {
136
- return Optional.none();
137
- }
138
- }
139
- // --- Monad (name stolen from Haskell / maths) ---
140
- /**
141
- * Perform a transform on an `Optional` object, **if** there is a value.
142
- * Unlike `map`, here the transform itself also returns an `Optional`.
143
- */
144
- bind(binder) {
145
- if (this.tag) {
146
- return binder(this.value);
147
- }
148
- else {
149
- return Optional.none();
150
- }
151
- }
152
- // --- Traversable (name stolen from Haskell / maths) ---
153
- /**
154
- * For a given predicate, this function finds out if there **exists** a value
155
- * inside this `Optional` object that meets the predicate. In practice, this
156
- * means that for `Optional`s that do not contain a value it returns false (as
157
- * no predicate-meeting value exists).
158
- */
159
- exists(predicate) {
160
- return this.tag && predicate(this.value);
161
- }
162
- /**
163
- * For a given predicate, this function finds out if **all** the values inside
164
- * this `Optional` object meet the predicate. In practice, this means that
165
- * for `Optional`s that do not contain a value it returns true (as all 0
166
- * objects do meet the predicate).
167
- */
168
- forall(predicate) {
169
- return !this.tag || predicate(this.value);
170
- }
171
- filter(predicate) {
172
- if (!this.tag || predicate(this.value)) {
173
- return this;
174
- }
175
- else {
176
- return Optional.none();
177
- }
178
- }
179
- // --- Getters ---
180
- /**
181
- * Get the value out of the inside of the `Optional` object, using a default
182
- * `replacement` value if the provided `Optional` object does not contain a
183
- * value.
184
- */
185
- getOr(replacement) {
186
- return this.tag ? this.value : replacement;
187
- }
188
- /**
189
- * Get the value out of the inside of the `Optional` object, using a default
190
- * `replacement` value if the provided `Optional` object does not contain a
191
- * value. Unlike `getOr`, in this method the `replacement` object is also
192
- * `Optional` - meaning that this method will always return an `Optional`.
193
- */
194
- or(replacement) {
195
- return this.tag ? this : replacement;
196
- }
197
- /**
198
- * Get the value out of the inside of the `Optional` object, using a default
199
- * `replacement` value if the provided `Optional` object does not contain a
200
- * value. Unlike `getOr`, in this method the `replacement` value is
201
- * "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
202
- * pass a function which (if called) will **return** the `value` you want to
203
- * use.
204
- */
205
- getOrThunk(thunk) {
206
- return this.tag ? this.value : thunk();
207
- }
208
- /**
209
- * Get the value out of the inside of the `Optional` object, using a default
210
- * `replacement` value if the provided Optional object does not contain a
211
- * value.
212
- *
213
- * Unlike `or`, in this method the `replacement` value is "thunked" - that is
214
- * to say that you don't pass a value to `orThunk`, you pass a function which
215
- * (if called) will **return** the `value` you want to use.
216
- *
217
- * Unlike `getOrThunk`, in this method the `replacement` value is also
218
- * `Optional`, meaning that this method will always return an `Optional`.
219
- */
220
- orThunk(thunk) {
221
- return this.tag ? this : thunk();
222
- }
223
- /**
224
- * Get the value out of the inside of the `Optional` object, throwing an
225
- * exception if the provided `Optional` object does not contain a value.
226
- *
227
- * WARNING:
228
- * You should only be using this function if you know that the `Optional`
229
- * object **is not** empty (otherwise you're throwing exceptions in production
230
- * code, which is bad).
231
- *
232
- * In tests this is more acceptable.
233
- *
234
- * Prefer other methods to this, such as `.each`.
235
- */
236
- getOrDie(message) {
237
- if (!this.tag) {
238
- throw new Error(message ?? 'Called getOrDie on None');
239
- }
240
- else {
241
- return this.value;
242
- }
243
- }
244
- // --- Interop with null and undefined ---
245
- /**
246
- * Creates an `Optional` value from a nullable (or undefined-able) input.
247
- * Null, or undefined, is converted to `None`, and anything else is converted
248
- * to `Some`.
249
- */
250
- static from(value) {
251
- return isNonNullable(value) ? Optional.some(value) : Optional.none();
252
- }
253
- /**
254
- * Converts an `Optional` to a nullable type, by getting the value if it
255
- * exists, or returning `null` if it does not.
256
- */
257
- getOrNull() {
258
- return this.tag ? this.value : null;
259
- }
260
- /**
261
- * Converts an `Optional` to an undefined-able type, by getting the value if
262
- * it exists, or returning `undefined` if it does not.
263
- */
264
- getOrUndefined() {
265
- return this.value;
266
- }
267
- // --- Utilities ---
268
- /**
269
- * If the `Optional` contains a value, perform an action on that value.
270
- * Unlike the rest of the methods on this type, `.each` has side-effects. If
271
- * you want to transform an `Optional<T>` **into** something, then this is not
272
- * the method for you. If you want to use an `Optional<T>` to **do**
273
- * something, then this is the method for you - provided you're okay with not
274
- * doing anything in the case where the `Optional` doesn't have a value inside
275
- * it. If you're not sure whether your use-case fits into transforming
276
- * **into** something or **doing** something, check whether it has a return
277
- * value. If it does, you should be performing a transform.
278
- */
279
- each(worker) {
280
- if (this.tag) {
281
- worker(this.value);
282
- }
283
- }
284
- /**
285
- * Turn the `Optional` object into an array that contains all of the values
286
- * stored inside the `Optional`. In practice, this means the output will have
287
- * either 0 or 1 elements.
288
- */
289
- toArray() {
290
- return this.tag ? [this.value] : [];
291
- }
292
- /**
293
- * Turn the `Optional` object into a string for debugging or printing. Not
294
- * recommended for production code, but good for debugging. Also note that
295
- * these days an `Optional` object can be logged to the console directly, and
296
- * its inner value (if it exists) will be visible.
297
- */
298
- toString() {
299
- return this.tag ? `some(${this.value})` : 'none()';
300
- }
301
- }
302
-
303
- /**
304
- * Adds two numbers, and wrap to a range.
305
- * If the result overflows to the right, snap to the left.
306
- * If the result overflows to the left, snap to the right.
307
- */
308
- // the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result
309
- const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;
310
-
311
- /**
312
- * Generate a unique identifier.
313
- *
314
- * The unique portion of the identifier only contains an underscore
315
- * and digits, so that it may safely be used within HTML attributes.
316
- *
317
- * The chance of generating a non-unique identifier has been minimized
318
- * by combining the current time, a random number and a one-up counter.
319
- *
320
- * generate :: String -> String
321
- */
322
- let unique = 0;
323
- const generate = (prefix) => {
324
- const date = new Date();
325
- const time = date.getTime();
326
- const random$1 = Math.floor(random() * 1000000000);
327
- unique++;
328
- return prefix + '_' + random$1 + unique + String(time);
329
- };
330
-
331
- const insertTable = (editor, columns, rows) => {
332
- editor.execCommand('mceInsertTable', false, { rows, columns });
333
- };
334
- const insertBlob = (editor, base64, blob) => {
335
- const blobCache = editor.editorUpload.blobCache;
336
- const blobInfo = blobCache.create(generate('mceu'), blob, base64);
337
- blobCache.add(blobInfo);
338
- editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
339
- };
340
-
341
- const blobToBase64 = (blob) => {
342
- return new Promise((resolve) => {
343
- const reader = new FileReader();
344
- reader.onloadend = () => {
345
- resolve(reader.result.split(',')[1]);
346
- };
347
- reader.readAsDataURL(blob);
348
- });
349
- };
350
-
351
- var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
352
-
353
- const pickFile = (editor) => new Promise((resolve) => {
354
- let resolved = false;
355
- const fileInput = document.createElement('input');
356
- fileInput.type = 'file';
357
- fileInput.accept = 'image/*';
358
- fileInput.style.position = 'fixed';
359
- fileInput.style.left = '0';
360
- fileInput.style.top = '0';
361
- fileInput.style.opacity = '0.001';
362
- document.body.appendChild(fileInput);
363
- const resolveFileInput = (value) => {
364
- if (!resolved) {
365
- fileInput.parentNode?.removeChild(fileInput);
366
- resolved = true;
367
- resolve(value);
368
- }
369
- };
370
- const changeHandler = (e) => {
371
- resolveFileInput(Array.prototype.slice.call(e.target.files));
372
- };
373
- fileInput.addEventListener('input', changeHandler);
374
- fileInput.addEventListener('change', changeHandler);
375
- const cancelHandler = (e) => {
376
- const cleanup = () => {
377
- resolveFileInput([]);
378
- };
379
- if (!resolved) {
380
- if (e.type === 'focusin') {
381
- // Chrome will fire `focusin` before the input `change` event
382
- global.setEditorTimeout(editor, cleanup, 1000);
383
- }
384
- else {
385
- cleanup();
386
- }
387
- }
388
- editor.off('focusin remove', cancelHandler);
389
- };
390
- editor.on('focusin remove', cancelHandler);
391
- fileInput.click();
392
- });
393
-
394
- const register$1 = (editor) => {
395
- editor.on('PreInit', () => {
396
- if (!editor.queryCommandSupported('QuickbarInsertImage')) {
397
- editor.addCommand('QuickbarInsertImage', () => {
398
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
399
- pickFile(editor).then((files) => {
400
- if (files.length > 0) {
401
- const blob = files[0];
402
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
403
- blobToBase64(blob).then((base64) => {
404
- insertBlob(editor, base64, blob);
405
- });
406
- }
407
- });
408
- });
409
- }
410
- });
411
- };
412
-
413
- const option = (name) => (editor) => editor.options.get(name);
414
- const register = (editor) => {
415
- const registerOption = editor.options.register;
416
- const toolbarProcessor = (defaultValue) => (value) => {
417
- const valid = isBoolean(value) || isString(value);
418
- if (valid) {
419
- if (isBoolean(value)) {
420
- return { value: value ? defaultValue : '', valid };
421
- }
422
- else {
423
- return { value: value.trim(), valid };
424
- }
425
- }
426
- else {
427
- return { valid: false, message: 'Must be a boolean or string.' };
428
- }
429
- };
430
- const defaultSelectionToolbar = 'bold italic | quicklink h2 h3 blockquote';
431
- registerOption('quickbars_selection_toolbar', {
432
- processor: toolbarProcessor(defaultSelectionToolbar),
433
- default: defaultSelectionToolbar
434
- });
435
- const defaultInsertToolbar = 'quickimage quicktable';
436
- registerOption('quickbars_insert_toolbar', {
437
- processor: toolbarProcessor(defaultInsertToolbar),
438
- default: defaultInsertToolbar
439
- });
440
- const defaultImageToolbar = 'alignleft aligncenter alignright';
441
- registerOption('quickbars_image_toolbar', {
442
- processor: toolbarProcessor(defaultImageToolbar),
443
- default: defaultImageToolbar
444
- });
445
- };
446
- const getTextSelectionToolbarItems = option('quickbars_selection_toolbar');
447
- const getInsertToolbarItems = option('quickbars_insert_toolbar');
448
- const getImageToolbarItems = option('quickbars_image_toolbar');
449
-
450
- const setupButtons = (editor) => {
451
- editor.ui.registry.addButton('quickimage', {
452
- icon: 'image',
453
- tooltip: 'Insert image',
454
- onAction: () => editor.execCommand('QuickbarInsertImage')
455
- });
456
- editor.ui.registry.addButton('quicktable', {
457
- icon: 'table',
458
- tooltip: 'Insert table',
459
- onAction: () => {
460
- insertTable(editor, 2, 2);
461
- }
462
- });
463
- };
464
-
465
- const fromHtml = (html, scope) => {
466
- const doc = scope || document;
467
- const div = doc.createElement('div');
468
- div.innerHTML = html;
469
- if (!div.hasChildNodes() || div.childNodes.length > 1) {
470
- const message = 'HTML does not have a single root node';
471
- // eslint-disable-next-line no-console
472
- console.error(message, html);
473
- throw new Error(message);
474
- }
475
- return fromDom(div.childNodes[0]);
476
- };
477
- const fromTag = (tag, scope) => {
478
- const doc = scope || document;
479
- const node = doc.createElement(tag);
480
- return fromDom(node);
481
- };
482
- const fromText = (text, scope) => {
483
- const doc = scope || document;
484
- const node = doc.createTextNode(text);
485
- return fromDom(node);
486
- };
487
- const fromDom = (node) => {
488
- // TODO: Consider removing this check, but left atm for safety
489
- if (node === null || node === undefined) {
490
- throw new Error('Node cannot be null or undefined');
491
- }
492
- return {
493
- dom: node
494
- };
495
- };
496
- const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
497
- // tslint:disable-next-line:variable-name
498
- const SugarElement = {
499
- fromHtml,
500
- fromTag,
501
- fromText,
502
- fromDom,
503
- fromPoint
504
- };
505
-
506
- const ELEMENT = 1;
507
-
508
- const is = (element, selector) => {
509
- const dom = element.dom;
510
- if (dom.nodeType !== ELEMENT) {
511
- return false;
512
- }
513
- else {
514
- const elem = dom;
515
- if (elem.matches !== undefined) {
516
- return elem.matches(selector);
517
- }
518
- else if (elem.msMatchesSelector !== undefined) {
519
- return elem.msMatchesSelector(selector);
520
- }
521
- else if (elem.webkitMatchesSelector !== undefined) {
522
- return elem.webkitMatchesSelector(selector);
523
- }
524
- else if (elem.mozMatchesSelector !== undefined) {
525
- // cast to any as mozMatchesSelector doesn't exist in TS DOM lib
526
- return elem.mozMatchesSelector(selector);
527
- }
528
- else {
529
- throw new Error('Browser lacks native selectors');
530
- } // unfortunately we can't throw this on startup :(
531
- }
532
- };
533
-
534
- const name = (element) => {
535
- const r = element.dom.nodeName;
536
- return r.toLowerCase();
537
- };
538
-
539
- const has$1 = (element, key) => {
540
- const dom = element.dom;
541
- // return false for non-element nodes, no point in throwing an error
542
- return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
543
- };
544
-
545
- var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {
546
- if (is(scope, a)) {
547
- return Optional.some(scope);
548
- }
549
- else if (isFunction(isRoot) && isRoot(scope)) {
550
- return Optional.none();
551
- }
552
- else {
553
- return ancestor(scope, a, isRoot);
554
- }
555
- };
556
-
557
- const ancestor$1 = (scope, predicate, isRoot) => {
558
- let element = scope.dom;
559
- const stop = isFunction(isRoot) ? isRoot : never;
560
- while (element.parentNode) {
561
- element = element.parentNode;
562
- const el = SugarElement.fromDom(element);
563
- if (predicate(el)) {
564
- return Optional.some(el);
565
- }
566
- else if (stop(el)) {
567
- break;
568
- }
569
- }
570
- return Optional.none();
571
- };
572
- const closest$2 = (scope, predicate, isRoot) => {
573
- // This is required to avoid ClosestOrAncestor passing the predicate to itself
574
- const is = (s, test) => test(s);
575
- return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
576
- };
577
-
578
- const ancestor = (scope, selector, isRoot) => ancestor$1(scope, (e) => is(e, selector), isRoot);
579
- // Returns Some(closest ancestor element (sugared)) matching 'selector' up to isRoot, or None() otherwise
580
- const closest$1 = (scope, selector, isRoot) => {
581
- const is$1 = (element, selector) => is(element, selector);
582
- return ClosestOrAncestor(is$1, ancestor, scope, selector, isRoot);
583
- };
584
-
585
- // IE11 Can return undefined for a classList on elements such as math, so we make sure it's not undefined before attempting to use it.
586
- const supports = (element) => element.dom.classList !== undefined;
587
-
588
- const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);
589
-
590
- const closest = (scope, predicate, isRoot) => closest$2(scope, predicate, isRoot).isSome();
591
-
592
- const addToEditor$1 = (editor) => {
593
- const insertToolbarItems = getInsertToolbarItems(editor);
594
- if (insertToolbarItems.length > 0) {
595
- editor.ui.registry.addContextToolbar('quickblock', {
596
- predicate: (node) => {
597
- const sugarNode = SugarElement.fromDom(node);
598
- const textBlockElementsMap = editor.schema.getTextBlockElements();
599
- const isRoot = (elem) => elem.dom === editor.getBody();
600
- return !has$1(sugarNode, 'data-mce-bogus') && closest$1(sugarNode, 'table,[data-mce-bogus="all"]', isRoot).fold(() => closest(sugarNode, (elem) => name(elem) in textBlockElementsMap && editor.dom.isEmpty(elem.dom), isRoot), never);
601
- },
602
- items: insertToolbarItems,
603
- position: 'line',
604
- scope: 'editor'
605
- });
606
- }
607
- };
608
-
609
- const addToEditor = (editor) => {
610
- const isEditable = (node) => editor.dom.isEditable(node);
611
- const isInEditableContext = (el) => isEditable(el.parentElement);
612
- const isImage = (node) => {
613
- const isImageFigure = node.nodeName === 'FIGURE' && /image/i.test(node.className);
614
- const isImage = node.nodeName === 'IMG' || isImageFigure;
615
- const isPagebreak = has(SugarElement.fromDom(node), 'mce-pagebreak');
616
- return isImage && isInEditableContext(node) && !isPagebreak;
617
- };
618
- const imageToolbarItems = getImageToolbarItems(editor);
619
- if (imageToolbarItems.length > 0) {
620
- editor.ui.registry.addContextToolbar('imageselection', {
621
- predicate: isImage,
622
- items: imageToolbarItems,
623
- position: 'node'
624
- });
625
- }
626
- const textToolbarItems = getTextSelectionToolbarItems(editor);
627
- if (textToolbarItems.length > 0) {
628
- editor.ui.registry.addContextToolbar('textselection', {
629
- predicate: (node) => !isImage(node) && !editor.selection.isCollapsed() && isEditable(node),
630
- items: textToolbarItems,
631
- position: 'selection',
632
- scope: 'editor'
633
- });
634
- }
635
- };
636
-
637
- var Plugin = () => {
638
- global$1.add('quickbars', (editor) => {
639
- register(editor);
640
- register$1(editor);
641
- setupButtons(editor);
642
- addToEditor$1(editor);
643
- addToEditor(editor);
644
- });
645
- };
646
-
647
- Plugin();
648
- /** *****
649
- * DO NOT EXPORT ANYTHING
650
- *
651
- * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
652
- *******/
653
-
654
- })();