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
@@ -0,0 +1,288 @@
1
+ /*!
2
+ Copyright 2013 Lovell Fuller and others.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ #include <cmath>
7
+ #include <cstdio>
8
+ #include <string>
9
+
10
+ #include <napi.h>
11
+ #include <vips/vips8>
12
+ #include <vips/vector.h>
13
+
14
+ #include "./common.h"
15
+ #include "./operations.h"
16
+ #include "./utilities.h"
17
+
18
+ /*
19
+ Get and set cache limits
20
+ */
21
+ Napi::Value cache(const Napi::CallbackInfo& info) {
22
+ Napi::Env env = info.Env();
23
+
24
+ // Set memory limit
25
+ if (info[size_t(0)].IsNumber()) {
26
+ vips_cache_set_max_mem(info[size_t(0)].As<Napi::Number>().Int32Value() * 1048576);
27
+ }
28
+ // Set file limit
29
+ if (info[size_t(1)].IsNumber()) {
30
+ vips_cache_set_max_files(info[size_t(1)].As<Napi::Number>().Int32Value());
31
+ }
32
+ // Set items limit
33
+ if (info[size_t(2)].IsNumber()) {
34
+ vips_cache_set_max(info[size_t(2)].As<Napi::Number>().Int32Value());
35
+ }
36
+
37
+ // Get memory stats
38
+ Napi::Object memory = Napi::Object::New(env);
39
+ memory.Set("current", round(vips_tracked_get_mem() / 1048576));
40
+ memory.Set("high", round(vips_tracked_get_mem_highwater() / 1048576));
41
+ memory.Set("max", round(vips_cache_get_max_mem() / 1048576));
42
+ // Get file stats
43
+ Napi::Object files = Napi::Object::New(env);
44
+ files.Set("current", vips_tracked_get_files());
45
+ files.Set("max", vips_cache_get_max_files());
46
+
47
+ // Get item stats
48
+ Napi::Object items = Napi::Object::New(env);
49
+ items.Set("current", vips_cache_get_size());
50
+ items.Set("max", vips_cache_get_max());
51
+
52
+ Napi::Object cache = Napi::Object::New(env);
53
+ cache.Set("memory", memory);
54
+ cache.Set("files", files);
55
+ cache.Set("items", items);
56
+ return cache;
57
+ }
58
+
59
+ /*
60
+ Get and set size of thread pool
61
+ */
62
+ Napi::Value concurrency(const Napi::CallbackInfo& info) {
63
+ // Set concurrency
64
+ if (info[size_t(0)].IsNumber()) {
65
+ vips_concurrency_set(info[size_t(0)].As<Napi::Number>().Int32Value());
66
+ }
67
+ // Get concurrency
68
+ return Napi::Number::New(info.Env(), vips_concurrency_get());
69
+ }
70
+
71
+ /*
72
+ Get internal counters (queued tasks, processing tasks)
73
+ */
74
+ Napi::Value counters(const Napi::CallbackInfo& info) {
75
+ Napi::Object counters = Napi::Object::New(info.Env());
76
+ counters.Set("queue", static_cast<int>(sharp::counterQueue));
77
+ counters.Set("process", static_cast<int>(sharp::counterProcess));
78
+ return counters;
79
+ }
80
+
81
+ /*
82
+ Get and set use of SIMD vector unit instructions
83
+ */
84
+ Napi::Value simd(const Napi::CallbackInfo& info) {
85
+ // Set state
86
+ if (info[size_t(0)].IsBoolean()) {
87
+ vips_vector_set_enabled(info[size_t(0)].As<Napi::Boolean>().Value());
88
+ }
89
+ // Get state
90
+ return Napi::Boolean::New(info.Env(), vips_vector_isenabled());
91
+ }
92
+
93
+ /*
94
+ Get libvips version
95
+ */
96
+ Napi::Value libvipsVersion(const Napi::CallbackInfo& info) {
97
+ Napi::Env env = info.Env();
98
+ Napi::Object version = Napi::Object::New(env);
99
+
100
+ char semver[9];
101
+ std::snprintf(semver, sizeof(semver), "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2));
102
+ version.Set("semver", Napi::String::New(env, semver));
103
+ #ifdef SHARP_USE_GLOBAL_LIBVIPS
104
+ version.Set("isGlobal", Napi::Boolean::New(env, true));
105
+ #else
106
+ version.Set("isGlobal", Napi::Boolean::New(env, false));
107
+ #endif
108
+ #ifdef __EMSCRIPTEN__
109
+ version.Set("isWasm", Napi::Boolean::New(env, true));
110
+ #else
111
+ version.Set("isWasm", Napi::Boolean::New(env, false));
112
+ #endif
113
+ return version;
114
+ }
115
+
116
+ /*
117
+ Get available input/output file/buffer/stream formats
118
+ */
119
+ Napi::Value format(const Napi::CallbackInfo& info) {
120
+ Napi::Env env = info.Env();
121
+ Napi::Object format = Napi::Object::New(env);
122
+ for (std::string const f : {
123
+ "jpeg", "png", "webp", "tiff", "magick", "openslide", "dz",
124
+ "ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k", "jxl", "rad", "dcraw"
125
+ }) {
126
+ // Input
127
+ const VipsObjectClass *oc = vips_class_find("VipsOperation", (f + "load").c_str());
128
+ Napi::Boolean hasInputFile = Napi::Boolean::New(env, oc);
129
+ Napi::Boolean hasInputBuffer =
130
+ Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "load_buffer").c_str()));
131
+ Napi::Object input = Napi::Object::New(env);
132
+ input.Set("file", hasInputFile);
133
+ input.Set("buffer", hasInputBuffer);
134
+ input.Set("stream", hasInputBuffer);
135
+ if (hasInputFile) {
136
+ const VipsForeignClass *fc = VIPS_FOREIGN_CLASS(oc);
137
+ if (fc->suffs) {
138
+ Napi::Array fileSuffix = Napi::Array::New(env);
139
+ const char **suffix = fc->suffs;
140
+ for (int i = 0; *suffix; i++, suffix++) {
141
+ fileSuffix.Set(i, Napi::String::New(env, *suffix));
142
+ }
143
+ input.Set("fileSuffix", fileSuffix);
144
+ }
145
+ }
146
+ // Output
147
+ Napi::Boolean hasOutputFile =
148
+ Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save").c_str()));
149
+ Napi::Boolean hasOutputBuffer =
150
+ Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save_buffer").c_str()));
151
+ Napi::Object output = Napi::Object::New(env);
152
+ output.Set("file", hasOutputFile);
153
+ output.Set("buffer", hasOutputBuffer);
154
+ output.Set("stream", hasOutputBuffer);
155
+ // Other attributes
156
+ Napi::Object container = Napi::Object::New(env);
157
+ container.Set("id", f);
158
+ container.Set("input", input);
159
+ container.Set("output", output);
160
+ // Add to set of formats
161
+ format.Set(f, container);
162
+ }
163
+
164
+ // Raw, uncompressed data
165
+ Napi::Boolean supported = Napi::Boolean::New(env, true);
166
+ Napi::Boolean unsupported = Napi::Boolean::New(env, false);
167
+ Napi::Object rawInput = Napi::Object::New(env);
168
+ rawInput.Set("file", unsupported);
169
+ rawInput.Set("buffer", supported);
170
+ rawInput.Set("stream", supported);
171
+ Napi::Object rawOutput = Napi::Object::New(env);
172
+ rawOutput.Set("file", unsupported);
173
+ rawOutput.Set("buffer", supported);
174
+ rawOutput.Set("stream", supported);
175
+ Napi::Object raw = Napi::Object::New(env);
176
+ raw.Set("id", "raw");
177
+ raw.Set("input", rawInput);
178
+ raw.Set("output", rawOutput);
179
+ format.Set("raw", raw);
180
+
181
+ return format;
182
+ }
183
+
184
+ /*
185
+ (Un)block libvips operations at runtime.
186
+ */
187
+ void block(const Napi::CallbackInfo& info) {
188
+ Napi::Array ops = info[size_t(0)].As<Napi::Array>();
189
+ bool const state = info[size_t(1)].As<Napi::Boolean>().Value();
190
+ for (unsigned int i = 0; i < ops.Length(); i++) {
191
+ vips_operation_block_set(ops.Get(i).As<Napi::String>().Utf8Value().c_str(), state);
192
+ }
193
+ }
194
+
195
+ /*
196
+ Synchronous, internal-only method used by some of the functional tests.
197
+ Calculates the maximum colour distance using the DE2000 algorithm
198
+ between two images of the same dimensions and number of channels.
199
+ */
200
+ Napi::Value _maxColourDistance(const Napi::CallbackInfo& info) {
201
+ Napi::Env env = info.Env();
202
+
203
+ // Open input files
204
+ VImage image1;
205
+ sharp::ImageType imageType1 = sharp::DetermineImageType(info[size_t(0)].As<Napi::String>().Utf8Value().data());
206
+ if (imageType1 != sharp::ImageType::UNKNOWN) {
207
+ try {
208
+ image1 = VImage::new_from_file(info[size_t(0)].As<Napi::String>().Utf8Value().c_str());
209
+ } catch (...) {
210
+ throw Napi::Error::New(env, "Input file 1 has corrupt header");
211
+ }
212
+ } else {
213
+ throw Napi::Error::New(env, "Input file 1 is of an unsupported image format");
214
+ }
215
+ VImage image2;
216
+ sharp::ImageType imageType2 = sharp::DetermineImageType(info[size_t(1)].As<Napi::String>().Utf8Value().data());
217
+ if (imageType2 != sharp::ImageType::UNKNOWN) {
218
+ try {
219
+ image2 = VImage::new_from_file(info[size_t(1)].As<Napi::String>().Utf8Value().c_str());
220
+ } catch (...) {
221
+ throw Napi::Error::New(env, "Input file 2 has corrupt header");
222
+ }
223
+ } else {
224
+ throw Napi::Error::New(env, "Input file 2 is of an unsupported image format");
225
+ }
226
+ // Ensure same number of channels
227
+ if (image1.bands() != image2.bands()) {
228
+ throw Napi::Error::New(env, "mismatchedBands");
229
+ }
230
+ // Ensure same dimensions
231
+ if (image1.width() != image2.width() || image1.height() != image2.height()) {
232
+ throw Napi::Error::New(env, "mismatchedDimensions");
233
+ }
234
+
235
+ double maxColourDistance;
236
+ try {
237
+ // Premultiply and remove alpha
238
+ if (image1.has_alpha()) {
239
+ image1 = image1.premultiply().extract_band(1, VImage::option()->set("n", image1.bands() - 1));
240
+ }
241
+ if (image2.has_alpha()) {
242
+ image2 = image2.premultiply().extract_band(1, VImage::option()->set("n", image2.bands() - 1));
243
+ }
244
+ // Calculate colour distance
245
+ maxColourDistance = image1.dE00(image2).max();
246
+ } catch (vips::VError const &err) {
247
+ throw Napi::Error::New(env, err.what());
248
+ }
249
+
250
+ // Clean up libvips' per-request data and threads
251
+ vips_error_clear();
252
+ vips_thread_shutdown();
253
+
254
+ return Napi::Number::New(env, maxColourDistance);
255
+ }
256
+
257
+ #if defined(__GNUC__)
258
+ // mallctl will be resolved by the runtime linker when jemalloc is being used
259
+ extern "C" {
260
+ int mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) __attribute__((weak));
261
+ }
262
+ Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
263
+ Napi::Env env = info.Env();
264
+ return Napi::Boolean::New(env, mallctl != nullptr);
265
+ }
266
+ #else
267
+ Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
268
+ Napi::Env env = info.Env();
269
+ return Napi::Boolean::New(env, false);
270
+ }
271
+ #endif
272
+
273
+ #if defined(__GNUC__) && defined(__x86_64__)
274
+ // Are SSE 4.2 intrinsics available at runtime?
275
+ Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
276
+ Napi::Env env = info.Env();
277
+ unsigned int eax, ebx, ecx, edx;
278
+ __asm__ __volatile__("cpuid"
279
+ : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
280
+ : "a"(1));
281
+ return Napi::Boolean::New(env, (ecx & 1U << 20) != 0);
282
+ }
283
+ #else
284
+ Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
285
+ Napi::Env env = info.Env();
286
+ return Napi::Boolean::New(env, false);
287
+ }
288
+ #endif
@@ -0,0 +1,22 @@
1
+ /*!
2
+ Copyright 2013 Lovell Fuller and others.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ #ifndef SRC_UTILITIES_H_
7
+ #define SRC_UTILITIES_H_
8
+
9
+ #include <napi.h>
10
+
11
+ Napi::Value cache(const Napi::CallbackInfo& info);
12
+ Napi::Value concurrency(const Napi::CallbackInfo& info);
13
+ Napi::Value counters(const Napi::CallbackInfo& info);
14
+ Napi::Value simd(const Napi::CallbackInfo& info);
15
+ Napi::Value libvipsVersion(const Napi::CallbackInfo& info);
16
+ Napi::Value format(const Napi::CallbackInfo& info);
17
+ void block(const Napi::CallbackInfo& info);
18
+ Napi::Value _maxColourDistance(const Napi::CallbackInfo& info);
19
+ Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info);
20
+ Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info);
21
+
22
+ #endif // SRC_UTILITIES_H_
@@ -31,13 +31,13 @@ export default function BrowsePage({ section, page }: { section: string; page: s
31
31
 
32
32
  return (
33
33
  <div>
34
- <div className='relative z-1 border-b-2 p-8 pt-12 font-extrabold text-foreground'>
35
- <div className='absolute left-0 top-0 z-2 h-4 w-full bg-linear-to-r from-sky-300 via-gray-300 to-blue-400'></div>
34
+ <div className='text-foreground relative z-1 border-b-2 p-8 pt-12 font-extrabold'>
35
+ <div className='absolute top-0 left-0 z-2 h-4 w-full bg-linear-to-r from-sky-300 via-gray-300 to-blue-400'></div>
36
36
  <h1 className='text-3xl'>{data?.section?.title}</h1>
37
37
  </div>
38
38
  <div className='p-4'>
39
39
  {data?.section?.hasSearch ? (
40
- <Card className='mb-4 border border-accent-foreground'>
40
+ <Card className='border-accent-foreground mb-4 border'>
41
41
  <form
42
42
  onSubmit={(event) => {
43
43
  event.preventDefault()
@@ -95,7 +95,7 @@ export default function BrowsePage({ section, page }: { section: string; page: s
95
95
  ))}
96
96
  </div>
97
97
  ) : (
98
- <Alert variant='default' className='my-8 bg-primary text-primary-foreground'>
98
+ <Alert variant='default' className='bg-primary text-primary-foreground my-8'>
99
99
  <AlertDescription className='font-bold'>{getString('noItems')}</AlertDescription>
100
100
  </Alert>
101
101
  )}
@@ -0,0 +1,252 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+ import getString from 'nextjs-cms/translations'
5
+ import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js'
6
+ import { LiveUsersCount } from '@/components/analytics/LiveUsersCount'
7
+ import { TotalPageViews } from '@/components/analytics/TotalPageViews'
8
+ import { TotalSessions } from '@/components/analytics/TotalSessions'
9
+ import { TotalUniqueUsers } from '@/components/analytics/TotalUniqueUsers'
10
+ import ContainerBox from '@/components/ContainerBox'
11
+ import LoadingSpinners from '@/components/LoadingSpinners'
12
+ import { trpc } from '@/app/_trpc/client'
13
+ import Link from 'next/link'
14
+ import { Button } from '@/components/ui/button'
15
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
16
+ import { PlusCircle, FileText, BarChart3, Users, Settings, Eye } from 'lucide-react'
17
+
18
+ ChartJS.register(ArcElement, Tooltip, Legend)
19
+
20
+ const DashboardNewPage = () => {
21
+ // Analytics date range - last 30 days
22
+ const [fromDate, setFromDate] = React.useState<Date | string>('30daysAgo')
23
+ const [toDate, setToDate] = React.useState<Date | string>('today')
24
+
25
+ // Get available sections
26
+ const { data: sectionsData, isLoading: sectionsLoading } = trpc.hasItemsSections.listItems.useQuery({
27
+ section: 'settings', // This might give us section metadata
28
+ page: 1,
29
+ limit: 100,
30
+ })
31
+
32
+ return (
33
+ <div className='w-full'>
34
+ <div className='text-foreground bg-linear-to-r from-sky-200 via-emerald-300 to-blue-600 p-8 font-extrabold dark:from-blue-800 dark:via-amber-700 dark:to-rose-900'>
35
+ <h1 className='text-3xl'>{getString('dashboard')}</h1>
36
+ <p className='mt-2 text-lg opacity-90'>Content Management System Overview</p>
37
+ </div>
38
+
39
+ <div className='flex flex-col gap-6 p-6'>
40
+ {/* Analytics Overview */}
41
+ <div>
42
+ <h2 className='mb-4 flex items-center gap-2 text-2xl font-semibold'>
43
+ <BarChart3 className='h-6 w-6' />
44
+ Analytics Overview
45
+ </h2>
46
+ <div className='sm-sidebar:grid-cols-2 md-sidebar:grid-cols-2 lg-sidebar:grid-cols-4 grid grid-cols-1 gap-4'>
47
+ <LiveUsersCount />
48
+ <TotalPageViews fromDate={fromDate} toDate={toDate} />
49
+ <TotalSessions fromDate={fromDate} toDate={toDate} />
50
+ <TotalUniqueUsers fromDate={fromDate} toDate={toDate} />
51
+ </div>
52
+ </div>
53
+
54
+ {/* Content Statistics */}
55
+ <div>
56
+ <h2 className='mb-4 flex items-center gap-2 text-2xl font-semibold'>
57
+ <FileText className='h-6 w-6' />
58
+ Content Statistics
59
+ </h2>
60
+ <div className='sm-sidebar:grid-cols-2 md-sidebar:grid-cols-3 lg-sidebar:grid-cols-4 grid grid-cols-1 gap-4'>
61
+ <Card>
62
+ <CardHeader className='flex flex-row items-center justify-between space-y-0 pb-2'>
63
+ <CardTitle className='text-sm font-medium'>Total Cars</CardTitle>
64
+ <FileText className='text-muted-foreground h-4 w-4' />
65
+ </CardHeader>
66
+ <CardContent>
67
+ <div className='text-2xl font-bold'>1,234</div>
68
+ <p className='text-muted-foreground text-xs'>+20.1% from last month</p>
69
+ </CardContent>
70
+ </Card>
71
+
72
+ <Card>
73
+ <CardHeader className='flex flex-row items-center justify-between space-y-0 pb-2'>
74
+ <CardTitle className='text-sm font-medium'>Real Estate</CardTitle>
75
+ <FileText className='text-muted-foreground h-4 w-4' />
76
+ </CardHeader>
77
+ <CardContent>
78
+ <div className='text-2xl font-bold'>856</div>
79
+ <p className='text-muted-foreground text-xs'>+15.3% from last month</p>
80
+ </CardContent>
81
+ </Card>
82
+
83
+ <Card>
84
+ <CardHeader className='flex flex-row items-center justify-between space-y-0 pb-2'>
85
+ <CardTitle className='text-sm font-medium'>Jobs</CardTitle>
86
+ <FileText className='text-muted-foreground h-4 w-4' />
87
+ </CardHeader>
88
+ <CardContent>
89
+ <div className='text-2xl font-bold'>432</div>
90
+ <p className='text-muted-foreground text-xs'>+7.2% from last month</p>
91
+ </CardContent>
92
+ </Card>
93
+
94
+ <Card>
95
+ <CardHeader className='flex flex-row items-center justify-between space-y-0 pb-2'>
96
+ <CardTitle className='text-sm font-medium'>Services</CardTitle>
97
+ <FileText className='text-muted-foreground h-4 w-4' />
98
+ </CardHeader>
99
+ <CardContent>
100
+ <div className='text-2xl font-bold'>298</div>
101
+ <p className='text-muted-foreground text-xs'>+12.5% from last month</p>
102
+ </CardContent>
103
+ </Card>
104
+ </div>
105
+ </div>
106
+
107
+ {/* Recent Activity */}
108
+ <div>
109
+ <h2 className='mb-4 text-2xl font-semibold'>Recent Activity</h2>
110
+ <Card>
111
+ <CardHeader>
112
+ <CardTitle>Latest Content Updates</CardTitle>
113
+ <CardDescription>Recently added or modified items across all sections</CardDescription>
114
+ </CardHeader>
115
+ <CardContent>
116
+ <div className='space-y-4'>
117
+ <div className='flex items-center justify-between border-b pb-2'>
118
+ <div>
119
+ <p className='font-medium'>2024 BMW X5 - Cars Section</p>
120
+ <p className='text-muted-foreground text-sm'>Added 2 hours ago</p>
121
+ </div>
122
+ <Button variant='outline' size='sm' asChild>
123
+ <Link href='/browse/cars/1'>
124
+ <Eye className='mr-1 h-4 w-4' />
125
+ View
126
+ </Link>
127
+ </Button>
128
+ </div>
129
+
130
+ <div className='flex items-center justify-between border-b pb-2'>
131
+ <div>
132
+ <p className='font-medium'>3BR Apartment in Downtown - Real Estate</p>
133
+ <p className='text-muted-foreground text-sm'>Added 4 hours ago</p>
134
+ </div>
135
+ <Button variant='outline' size='sm' asChild>
136
+ <Link href='/browse/real-estate/1'>
137
+ <Eye className='mr-1 h-4 w-4' />
138
+ View
139
+ </Link>
140
+ </Button>
141
+ </div>
142
+
143
+ <div className='flex items-center justify-between border-b pb-2'>
144
+ <div>
145
+ <p className='font-medium'>Software Developer Position - Jobs</p>
146
+ <p className='text-muted-foreground text-sm'>Added 6 hours ago</p>
147
+ </div>
148
+ <Button variant='outline' size='sm' asChild>
149
+ <Link href='/browse/jobs/1'>
150
+ <Eye className='mr-1 h-4 w-4' />
151
+ View
152
+ </Link>
153
+ </Button>
154
+ </div>
155
+ </div>
156
+ </CardContent>
157
+ </Card>
158
+ </div>
159
+
160
+ {/* Quick Actions */}
161
+ <div>
162
+ <h2 className='mb-4 text-2xl font-semibold'>Quick Actions</h2>
163
+ <div className='sm-sidebar:grid-cols-2 md-sidebar:grid-cols-3 lg-sidebar:grid-cols-4 grid grid-cols-1 gap-4'>
164
+ <Card className='cursor-pointer transition-shadow hover:shadow-md'>
165
+ <CardHeader>
166
+ <CardTitle className='flex items-center gap-2'>
167
+ <PlusCircle className='h-5 w-5' />
168
+ Add New Car
169
+ </CardTitle>
170
+ <CardDescription>Create a new car listing</CardDescription>
171
+ </CardHeader>
172
+ <CardContent>
173
+ <Button asChild className='w-full'>
174
+ <Link href='/new/cars'>Create Car Listing</Link>
175
+ </Button>
176
+ </CardContent>
177
+ </Card>
178
+
179
+ <Card className='cursor-pointer transition-shadow hover:shadow-md'>
180
+ <CardHeader>
181
+ <CardTitle className='flex items-center gap-2'>
182
+ <PlusCircle className='h-5 w-5' />
183
+ Add Real Estate
184
+ </CardTitle>
185
+ <CardDescription>Create a new property listing</CardDescription>
186
+ </CardHeader>
187
+ <CardContent>
188
+ <Button asChild className='w-full'>
189
+ <Link href='/new/real-estate'>Create Property</Link>
190
+ </Button>
191
+ </CardContent>
192
+ </Card>
193
+
194
+ <Card className='cursor-pointer transition-shadow hover:shadow-md'>
195
+ <CardHeader>
196
+ <CardTitle className='flex items-center gap-2'>
197
+ <Users className='h-5 w-5' />
198
+ Manage Admins
199
+ </CardTitle>
200
+ <CardDescription>View and manage administrators</CardDescription>
201
+ </CardHeader>
202
+ <CardContent>
203
+ <Button asChild variant='outline' className='w-full'>
204
+ <Link href='/admins'>Manage Admins</Link>
205
+ </Button>
206
+ </CardContent>
207
+ </Card>
208
+
209
+ <Card className='cursor-pointer transition-shadow hover:shadow-md'>
210
+ <CardHeader>
211
+ <CardTitle className='flex items-center gap-2'>
212
+ <BarChart3 className='h-5 w-5' />
213
+ View Analytics
214
+ </CardTitle>
215
+ <CardDescription>Detailed analytics and insights</CardDescription>
216
+ </CardHeader>
217
+ <CardContent>
218
+ <Button asChild variant='outline' className='w-full'>
219
+ <Link href='/analytics'>View Analytics</Link>
220
+ </Button>
221
+ </CardContent>
222
+ </Card>
223
+ </div>
224
+ </div>
225
+
226
+ {/* System Status */}
227
+ <div>
228
+ <h2 className='mb-4 text-2xl font-semibold'>System Status</h2>
229
+ <div className='grid grid-cols-1 gap-4 md:grid-cols-2'>
230
+ <ContainerBox title='Database Status'>
231
+ <div className='flex items-center gap-2'>
232
+ <div className='h-3 w-3 rounded-full bg-green-500'></div>
233
+ <span>Connected</span>
234
+ </div>
235
+ <p className='text-muted-foreground mt-2 text-sm'>All database connections are healthy</p>
236
+ </ContainerBox>
237
+
238
+ <ContainerBox title='Cache Status'>
239
+ <div className='flex items-center gap-2'>
240
+ <div className='h-3 w-3 rounded-full bg-green-500'></div>
241
+ <span>Operational</span>
242
+ </div>
243
+ <p className='text-muted-foreground mt-2 text-sm'>Caching system is functioning properly</p>
244
+ </ContainerBox>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ )
250
+ }
251
+
252
+ export default DashboardNewPage
@@ -18,7 +18,7 @@ function Layout({ children }: { children: React.ReactNode }) {
18
18
  return (
19
19
  <div
20
20
  className={classNames({
21
- 'flex min-h-screen flex-col bg-background text-foreground': true,
21
+ 'bg-background text-foreground flex min-h-screen flex-col': true,
22
22
  'overflow-hidden': true,
23
23
  })}
24
24
  >
@@ -38,7 +38,7 @@ function Layout({ children }: { children: React.ReactNode }) {
38
38
  {showMobileSidebar && (
39
39
  // Display a black transparent div to close the sidebar when clicked outside
40
40
  <div
41
- className='fixed left-0 top-0 z-15 h-full w-full bg-black/80 md:hidden'
41
+ className='fixed top-0 left-0 z-15 h-full w-full bg-black/80 md:hidden'
42
42
  onClick={() => setShowMobileSidebar(false)}
43
43
  ></div>
44
44
  )}
@@ -6,12 +6,11 @@ import React from 'react'
6
6
  export default function LogPage() {
7
7
  return (
8
8
  <div className='w-full'>
9
- <div className='bg-linear-to-r from-sky-200 via-emerald-300 to-blue-600 p-8 font-extrabold text-foreground dark:from-blue-800 dark:via-amber-700 dark:to-rose-900'>
9
+ <div className='text-foreground bg-linear-to-r from-sky-200 via-emerald-300 to-blue-600 p-8 font-extrabold dark:from-blue-800 dark:via-amber-700 dark:to-rose-900'>
10
10
  <h1 className='text-3xl'>{getString('logs')}</h1>
11
11
  </div>
12
12
 
13
- <div className='flex flex-col gap-2 p-4'>
14
- </div>
13
+ <div className='flex flex-col gap-2 p-4'></div>
15
14
  </div>
16
15
  )
17
16
  }