studiocms 0.1.0-beta.25 → 0.1.0-beta.26

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 (397) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/dist/cli/users/steps/libsqlCreateUsers.js +1 -3
  3. package/dist/cli/users/steps/libsqlModifyUsers.js +1 -3
  4. package/dist/components/auth/OAuthButton.astro +1 -1
  5. package/dist/components/auth/OAuthButtonStack.astro +1 -1
  6. package/dist/components/auth/component-scripts/formListener.js +1 -1
  7. package/dist/components/dashboard/BaseHead.astro +6 -17
  8. package/dist/components/dashboard/DashboardGrid.astro +2 -2
  9. package/dist/components/dashboard/DashboardGridItem.astro +2 -1
  10. package/dist/components/dashboard/DashboardPageHeader.astro +8 -4
  11. package/dist/components/dashboard/DoubleSidebar.astro +2 -2
  12. package/dist/components/dashboard/LoginChecker.astro +3 -2
  13. package/dist/components/dashboard/MainSidebarContent.astro +16 -12
  14. package/dist/components/dashboard/PageHeader.astro +3 -2
  15. package/dist/components/dashboard/SidebarLink.astro +5 -5
  16. package/dist/components/dashboard/SidebarPluginLink.astro +3 -3
  17. package/dist/components/dashboard/SingleSidebar.astro +2 -2
  18. package/dist/components/dashboard/configuration/ConfigForm.astro +49 -47
  19. package/dist/components/dashboard/configuration/LoginPreview.astro +6 -4
  20. package/dist/components/dashboard/content-mgmt/CreateFolder.astro +3 -2
  21. package/dist/components/dashboard/content-mgmt/CreatePage.astro +8 -5
  22. package/dist/components/dashboard/content-mgmt/EditFolder.astro +3 -2
  23. package/dist/components/dashboard/content-mgmt/EditPage.astro +25 -13
  24. package/dist/components/dashboard/content-mgmt/InnerSidebarElement.astro +23 -15
  25. package/dist/components/dashboard/content-mgmt/PageHeader.astro +23 -14
  26. package/dist/components/dashboard/content-mgmt/PluginFields.astro +6 -1
  27. package/dist/components/dashboard/content-mgmt/TreeRenderer.astro +6 -6
  28. package/dist/components/dashboard/content-mgmt/TreeSidebarFolder.astro +4 -4
  29. package/dist/components/dashboard/content-mgmt/TreeSidebarLink.astro +4 -4
  30. package/dist/components/dashboard/plugins/SettingsRenderer.astro +6 -1
  31. package/dist/components/dashboard/profile/APITokens.astro +14 -8
  32. package/dist/components/dashboard/profile/BasicInfo.astro +8 -4
  33. package/dist/components/dashboard/profile/Notifications.astro +7 -4
  34. package/dist/components/dashboard/profile/SocialSignin.astro +8 -5
  35. package/dist/components/dashboard/profile/UpdatePassword.astro +6 -3
  36. package/dist/components/dashboard/sidebar/UserAccount.astro +1 -2
  37. package/dist/components/dashboard/sidebar/VersionCheck.astro +7 -7
  38. package/dist/components/dashboard/sidebar/VersionCheckChangelog.astro +28 -6
  39. package/dist/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
  40. package/dist/components/dashboard/sidebar-modals/VersionModal.astro +16 -15
  41. package/dist/components/dashboard/sidebarConfig.d.ts +2 -2
  42. package/dist/components/dashboard/sidebarConfig.js +6 -6
  43. package/dist/components/dashboard/user-mgmt/InnerSidebarElement.astro +16 -9
  44. package/dist/components/dashboard/user-mgmt/RankCheck.astro +6 -8
  45. package/dist/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
  46. package/dist/components/dashboard/user-mgmt/UserListItem.astro +8 -6
  47. package/dist/components/default-grid-items/Recently-created-pages.astro +11 -9
  48. package/dist/components/default-grid-items/Recently-signed-up.astro +8 -8
  49. package/dist/components/default-grid-items/Recently-updated-pages.astro +11 -9
  50. package/dist/components/default-grid-items/Totals.astro +7 -6
  51. package/dist/components/first-time-setup/PageHeader.astro +4 -3
  52. package/dist/components/shared/SSRUser.astro +200 -0
  53. package/dist/components/shared/head/Favicons.astro +6 -0
  54. package/dist/components/shared/head/Global.astro +4 -0
  55. package/dist/components/shared/head/TitleTags.astro +14 -0
  56. package/dist/config.d.ts +1 -4
  57. package/dist/consts.d.ts +34 -1
  58. package/dist/consts.js +42 -1
  59. package/dist/db/config.d.ts +22 -37
  60. package/dist/db/config.js +14 -2
  61. package/dist/handlers/astroConfigCheck.js +1 -1
  62. package/dist/handlers/changelog.d.ts +1 -0
  63. package/dist/handlers/changelog.js +54 -0
  64. package/dist/handlers/index.d.ts +1 -2
  65. package/dist/handlers/index.js +2 -4
  66. package/dist/handlers/pluginHandler.d.ts +2 -1
  67. package/dist/handlers/pluginHandler.js +14 -8
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.js +115 -107
  70. package/dist/integrations/dynamic-sitemap/index.js +1 -1
  71. package/dist/integrations/webVitals/checkForWebVitalsPlugin.js +3 -3
  72. package/dist/integrations/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
  73. package/dist/integrations/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
  74. package/dist/integrations/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
  75. package/dist/integrations/webVitals/dashboard-grid-items/metric.css +17 -17
  76. package/dist/integrations/webVitals/dashboard-grid-items/shared.d.ts +4 -4
  77. package/dist/integrations/webVitals/dashboard-grid-items/shared.js +3 -3
  78. package/dist/integrations/webVitals/pages/analytics/body.astro +10 -9
  79. package/dist/integrations/webVitals/utils/webVitalsUtils.d.ts +9 -9
  80. package/dist/layouts/AuthLayout.astro +7 -18
  81. package/dist/layouts/DashboardLayout.astro +3 -2
  82. package/dist/layouts/FirstTimeSetupLayout.astro +7 -18
  83. package/dist/middleware/index.js +3 -13
  84. package/dist/middleware/utils.d.ts +1 -1
  85. package/dist/middleware/utils.js +8 -5
  86. package/dist/routes/api/auth/login.js +1 -6
  87. package/dist/routes/api/auth/logout.js +3 -2
  88. package/dist/routes/api/auth/register.js +1 -7
  89. package/dist/routes/api/dashboard/content/page.js +5 -5
  90. package/dist/routes/api/dashboard/create-user-invite.js +1 -1
  91. package/dist/routes/api/dashboard/create-user.d.ts +0 -7
  92. package/dist/routes/api/dashboard/create-user.js +18 -23
  93. package/dist/routes/api/dashboard/email-notification-settings-site.js +10 -0
  94. package/dist/routes/api/dashboard/profile.js +1 -1
  95. package/dist/routes/api/dashboard/reset-password.js +1 -1
  96. package/dist/routes/api/dashboard/users.js +27 -10
  97. package/dist/routes/api/dashboard/verify-email.js +5 -2
  98. package/dist/routes/api/dashboard/verify-session.js +3 -2
  99. package/dist/routes/api/rest/utils/auth-token.d.ts +1 -1
  100. package/dist/routes/api/rest/v1/pages/[id]/index.js +3 -10
  101. package/dist/routes/api/rest/v1/users/[id].js +24 -23
  102. package/dist/routes/api/rest/v1/users/index.js +1 -1
  103. package/dist/routes/api/sdk/utils/changelog.d.ts +0 -15
  104. package/dist/routes/api/sdk/utils/changelog.js +9 -112
  105. package/dist/routes/auth/login.astro +16 -9
  106. package/dist/routes/auth/signup.astro +2 -1
  107. package/dist/routes/dashboard/configuration.astro +3 -2
  108. package/dist/routes/dashboard/content-management/createfolder.astro +1 -1
  109. package/dist/routes/dashboard/content-management/createpage.astro +1 -1
  110. package/dist/routes/dashboard/content-management/diff.astro +8 -5
  111. package/dist/routes/dashboard/content-management/index.astro +1 -1
  112. package/dist/routes/dashboard/password-reset.astro +8 -5
  113. package/dist/routes/dashboard/plugins/[plugin].astro +4 -3
  114. package/dist/routes/dashboard/smtp-configuration.astro +21 -10
  115. package/dist/routes/dashboard/unverified-email.astro +2 -4
  116. package/dist/routes/dashboard/user-management/edit.astro +30 -22
  117. package/dist/routes/dashboard/user-management/index.astro +2 -2
  118. package/dist/routes/error-pages/404.astro +1 -1
  119. package/dist/routes/firstTimeSetupRoutes/1-start.astro +15 -14
  120. package/dist/routes/firstTimeSetupRoutes/2-next.astro +14 -11
  121. package/dist/routes/firstTimeSetupRoutes/3-done.astro +3 -2
  122. package/dist/routes/firstTimeSetupRoutes/api/step-2.js +1 -1
  123. package/dist/schemas/plugins/index.d.ts +64 -64
  124. package/dist/schemas/plugins/shared.d.ts +84 -84
  125. package/dist/schemas/plugins/shared.js +10 -16
  126. package/dist/styles/404.css +1 -1
  127. package/dist/styles/code-component.css +8 -8
  128. package/dist/styles/dashboard-base.css +29 -29
  129. package/dist/styles/dashboard-diff.css +31 -31
  130. package/dist/types.d.ts +2 -22
  131. package/dist/utils/effects/smtp.d.ts +2 -3
  132. package/dist/utils/effects/smtp.js +5 -1
  133. package/dist/utils/safeString.d.ts +1 -1
  134. package/dist/utils/safeString.js +1 -3
  135. package/dist/utils/stripIconify.d.ts +13 -0
  136. package/dist/utils/stripIconify.js +11 -0
  137. package/dist/utils/tinyMDParser.js +5 -5
  138. package/dist/virtual.d.ts +17 -60
  139. package/dist/virtuals/auth/core.d.ts +91 -0
  140. package/dist/virtuals/auth/core.js +45 -0
  141. package/dist/virtuals/auth/index.d.ts +1 -4
  142. package/dist/virtuals/auth/index.js +1 -4
  143. package/dist/virtuals/auth/verify-email.d.ts +3 -3
  144. package/dist/virtuals/i18n/LanguageSelector.astro +1 -1
  145. package/dist/virtuals/i18n/client.d.ts +100 -4
  146. package/dist/virtuals/i18n/client.js +11 -10
  147. package/dist/virtuals/i18n/config.d.ts +417 -3
  148. package/dist/virtuals/i18n/config.js +22 -1
  149. package/dist/virtuals/i18n/server.d.ts +116 -0
  150. package/dist/virtuals/i18n/{index.js → server.js} +6 -19
  151. package/dist/virtuals/i18n/v-files.d.ts +30 -0
  152. package/dist/virtuals/i18n/v-files.js +46 -0
  153. package/dist/virtuals/lib/head.d.ts +1 -25
  154. package/dist/virtuals/lib/head.js +1 -73
  155. package/dist/virtuals/lib/headDefaults.d.ts +2 -2
  156. package/dist/virtuals/lib/pathGenerators.d.ts +1 -20
  157. package/dist/virtuals/lib/pathGenerators.js +1 -66
  158. package/dist/virtuals/lib/urlGen.d.ts +2 -1
  159. package/dist/virtuals/lib/urlGen.js +4 -24
  160. package/dist/virtuals/mailer/index.d.ts +4 -34
  161. package/dist/virtuals/mailer/index.js +3 -16
  162. package/dist/virtuals/plugins/dashboard-pages.d.ts +8 -8
  163. package/dist/virtuals/scripts/user-quick-tools.d.ts +3 -2
  164. package/dist/virtuals/scripts/user-quick-tools.js +135 -53
  165. package/dist/virtuals/sdk/effect/collectors.d.ts +1 -1
  166. package/dist/virtuals/sdk/effect/foldertree.d.ts +1 -1
  167. package/dist/virtuals/sdk/effect/parsers.js +1 -1
  168. package/dist/virtuals/sdk/index.d.ts +2 -1
  169. package/dist/virtuals/sdk/modules/auth.d.ts +6 -5
  170. package/dist/virtuals/sdk/modules/config.d.ts +272 -0
  171. package/dist/virtuals/sdk/modules/config.js +205 -0
  172. package/dist/virtuals/sdk/modules/get.d.ts +10 -23
  173. package/dist/virtuals/sdk/modules/get.js +27 -40
  174. package/dist/virtuals/sdk/modules/init.d.ts +4 -18
  175. package/dist/virtuals/sdk/modules/init.js +7 -8
  176. package/dist/virtuals/sdk/modules/notificationSettings.d.ts +5 -22
  177. package/dist/virtuals/sdk/modules/notificationSettings.js +7 -29
  178. package/dist/virtuals/sdk/modules/post.d.ts +5 -5
  179. package/dist/virtuals/sdk/modules/post.js +14 -9
  180. package/dist/virtuals/sdk/modules/rest_api.d.ts +3 -3
  181. package/dist/virtuals/sdk/modules/update.d.ts +19 -19
  182. package/dist/virtuals/sdk/modules/update.js +28 -25
  183. package/dist/virtuals/sdk/sdkCore.d.ts +5 -3
  184. package/dist/virtuals/sdk/sdkCore.js +9 -4
  185. package/dist/virtuals/sdk/types/index.d.ts +4 -3
  186. package/dist/virtuals/sdk/types/tableDefs.d.ts +5 -4
  187. package/dist/virtuals/sdk/types/tsAlias.d.ts +4 -0
  188. package/dist/virtuals/sdk/utils.d.ts +3 -2
  189. package/dist/virtuals/utils.d.ts +21 -17
  190. package/dist/virtuals/utils.js +10 -6
  191. package/package.json +15 -20
  192. package/src/cli/users/steps/libsqlCreateUsers.ts +2 -4
  193. package/src/cli/users/steps/libsqlModifyUsers.ts +2 -4
  194. package/src/components/auth/OAuthButton.astro +1 -1
  195. package/src/components/auth/OAuthButtonStack.astro +1 -1
  196. package/src/components/auth/component-scripts/formListener.ts +1 -1
  197. package/src/components/dashboard/BaseHead.astro +6 -17
  198. package/src/components/dashboard/DashboardGrid.astro +2 -2
  199. package/src/components/dashboard/DashboardGridItem.astro +2 -1
  200. package/src/components/dashboard/DashboardPageHeader.astro +8 -4
  201. package/src/components/dashboard/DoubleSidebar.astro +2 -2
  202. package/src/components/dashboard/LoginChecker.astro +3 -2
  203. package/src/components/dashboard/MainSidebarContent.astro +16 -12
  204. package/src/components/dashboard/PageHeader.astro +3 -2
  205. package/src/components/dashboard/SidebarLink.astro +5 -5
  206. package/src/components/dashboard/SidebarPluginLink.astro +3 -3
  207. package/src/components/dashboard/SingleSidebar.astro +2 -2
  208. package/src/components/dashboard/configuration/ConfigForm.astro +49 -47
  209. package/src/components/dashboard/configuration/LoginPreview.astro +6 -4
  210. package/src/components/dashboard/content-mgmt/CreateFolder.astro +3 -2
  211. package/src/components/dashboard/content-mgmt/CreatePage.astro +8 -5
  212. package/src/components/dashboard/content-mgmt/EditFolder.astro +3 -2
  213. package/src/components/dashboard/content-mgmt/EditPage.astro +25 -13
  214. package/src/components/dashboard/content-mgmt/InnerSidebarElement.astro +23 -15
  215. package/src/components/dashboard/content-mgmt/PageHeader.astro +23 -14
  216. package/src/components/dashboard/content-mgmt/PluginFields.astro +6 -1
  217. package/src/components/dashboard/content-mgmt/TreeRenderer.astro +6 -6
  218. package/src/components/dashboard/content-mgmt/TreeSidebarFolder.astro +4 -4
  219. package/src/components/dashboard/content-mgmt/TreeSidebarLink.astro +4 -4
  220. package/src/components/dashboard/plugins/SettingsRenderer.astro +6 -1
  221. package/src/components/dashboard/profile/APITokens.astro +14 -8
  222. package/src/components/dashboard/profile/BasicInfo.astro +8 -4
  223. package/src/components/dashboard/profile/Notifications.astro +7 -4
  224. package/src/components/dashboard/profile/SocialSignin.astro +8 -5
  225. package/src/components/dashboard/profile/UpdatePassword.astro +6 -3
  226. package/src/components/dashboard/sidebar/UserAccount.astro +1 -2
  227. package/src/components/dashboard/sidebar/VersionCheck.astro +7 -7
  228. package/src/components/dashboard/sidebar/VersionCheckChangelog.astro +28 -6
  229. package/src/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
  230. package/src/components/dashboard/sidebar-modals/VersionModal.astro +16 -15
  231. package/src/components/dashboard/sidebarConfig.ts +8 -8
  232. package/src/components/dashboard/user-mgmt/InnerSidebarElement.astro +16 -9
  233. package/src/components/dashboard/user-mgmt/RankCheck.astro +6 -8
  234. package/src/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
  235. package/src/components/dashboard/user-mgmt/UserListItem.astro +8 -6
  236. package/src/components/default-grid-items/Recently-created-pages.astro +11 -9
  237. package/src/components/default-grid-items/Recently-signed-up.astro +8 -8
  238. package/src/components/default-grid-items/Recently-updated-pages.astro +11 -9
  239. package/src/components/default-grid-items/Totals.astro +7 -6
  240. package/src/components/first-time-setup/PageHeader.astro +4 -3
  241. package/src/components/shared/SSRUser.astro +200 -0
  242. package/src/components/shared/head/Favicons.astro +6 -0
  243. package/src/components/shared/head/Global.astro +4 -0
  244. package/src/components/shared/head/TitleTags.astro +14 -0
  245. package/src/config.ts +1 -4
  246. package/src/consts.ts +67 -1
  247. package/src/db/config.ts +43 -2
  248. package/src/handlers/astroConfigCheck.ts +1 -1
  249. package/src/handlers/changelog.ts +67 -0
  250. package/src/handlers/index.ts +1 -2
  251. package/src/handlers/pluginHandler.ts +16 -9
  252. package/src/index.ts +142 -121
  253. package/src/integrations/dynamic-sitemap/index.ts +1 -1
  254. package/src/integrations/webVitals/checkForWebVitalsPlugin.ts +3 -3
  255. package/src/integrations/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
  256. package/src/integrations/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
  257. package/src/integrations/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
  258. package/src/integrations/webVitals/dashboard-grid-items/metric.css +17 -17
  259. package/src/integrations/webVitals/dashboard-grid-items/shared.ts +7 -7
  260. package/src/integrations/webVitals/pages/analytics/body.astro +10 -9
  261. package/src/layouts/AuthLayout.astro +7 -18
  262. package/src/layouts/DashboardLayout.astro +3 -2
  263. package/src/layouts/FirstTimeSetupLayout.astro +7 -18
  264. package/src/middleware/index.ts +3 -19
  265. package/src/middleware/utils.ts +7 -4
  266. package/src/routes/api/auth/login.ts +1 -6
  267. package/src/routes/api/auth/logout.ts +3 -2
  268. package/src/routes/api/auth/register.ts +1 -7
  269. package/src/routes/api/dashboard/config.ts +3 -2
  270. package/src/routes/api/dashboard/content/page.ts +6 -6
  271. package/src/routes/api/dashboard/create-user-invite.ts +3 -2
  272. package/src/routes/api/dashboard/create-user.ts +21 -23
  273. package/src/routes/api/dashboard/email-notification-settings-site.ts +27 -2
  274. package/src/routes/api/dashboard/profile.ts +1 -1
  275. package/src/routes/api/dashboard/reset-password.ts +1 -1
  276. package/src/routes/api/dashboard/users.ts +33 -15
  277. package/src/routes/api/dashboard/verify-email.ts +5 -2
  278. package/src/routes/api/dashboard/verify-session.ts +3 -2
  279. package/src/routes/api/rest/v1/pages/[id]/index.ts +3 -13
  280. package/src/routes/api/rest/v1/users/[id].ts +24 -23
  281. package/src/routes/api/rest/v1/users/index.ts +1 -1
  282. package/src/routes/api/sdk/utils/changelog.ts +2 -143
  283. package/src/routes/auth/login.astro +16 -9
  284. package/src/routes/auth/signup.astro +2 -1
  285. package/src/routes/dashboard/configuration.astro +3 -2
  286. package/src/routes/dashboard/content-management/createfolder.astro +1 -1
  287. package/src/routes/dashboard/content-management/createpage.astro +1 -1
  288. package/src/routes/dashboard/content-management/diff.astro +8 -5
  289. package/src/routes/dashboard/content-management/index.astro +1 -1
  290. package/src/routes/dashboard/password-reset.astro +8 -5
  291. package/src/routes/dashboard/plugins/[plugin].astro +4 -3
  292. package/src/routes/dashboard/smtp-configuration.astro +21 -10
  293. package/src/routes/dashboard/unverified-email.astro +2 -4
  294. package/src/routes/dashboard/user-management/edit.astro +30 -22
  295. package/src/routes/dashboard/user-management/index.astro +2 -2
  296. package/src/routes/error-pages/404.astro +1 -1
  297. package/src/routes/firstTimeSetupRoutes/1-start.astro +15 -14
  298. package/src/routes/firstTimeSetupRoutes/2-next.astro +14 -11
  299. package/src/routes/firstTimeSetupRoutes/3-done.astro +3 -2
  300. package/src/routes/firstTimeSetupRoutes/api/step-2.ts +1 -1
  301. package/src/schemas/plugins/shared.ts +13 -25
  302. package/src/styles/404.css +1 -1
  303. package/src/styles/code-component.css +8 -8
  304. package/src/styles/dashboard-base.css +29 -29
  305. package/src/styles/dashboard-diff.css +31 -31
  306. package/src/types.ts +3 -20
  307. package/src/utils/effects/smtp.ts +8 -4
  308. package/src/utils/safeString.ts +1 -6
  309. package/src/utils/stripIconify.ts +20 -0
  310. package/src/utils/tinyMDParser.ts +7 -7
  311. package/src/virtual.d.ts +17 -60
  312. package/src/virtuals/auth/core.ts +82 -0
  313. package/src/virtuals/auth/index.ts +1 -4
  314. package/src/virtuals/i18n/LanguageSelector.astro +1 -1
  315. package/src/virtuals/i18n/client.ts +115 -11
  316. package/src/virtuals/i18n/config.ts +154 -3
  317. package/src/virtuals/i18n/{index.ts → server.ts} +42 -46
  318. package/src/virtuals/i18n/v-files.ts +122 -0
  319. package/src/virtuals/lib/head.ts +1 -114
  320. package/src/virtuals/lib/pathGenerators.ts +1 -72
  321. package/src/virtuals/lib/urlGen.ts +4 -29
  322. package/src/virtuals/mailer/index.ts +7 -34
  323. package/src/virtuals/scripts/user-quick-tools.ts +151 -59
  324. package/src/virtuals/sdk/effect/parsers.ts +1 -1
  325. package/src/virtuals/sdk/modules/auth.ts +2 -1
  326. package/src/virtuals/sdk/modules/config.ts +602 -0
  327. package/src/virtuals/sdk/modules/get.ts +32 -48
  328. package/src/virtuals/sdk/modules/init.ts +18 -26
  329. package/src/virtuals/sdk/modules/notificationSettings.ts +8 -44
  330. package/src/virtuals/sdk/modules/post.ts +17 -18
  331. package/src/virtuals/sdk/modules/update.ts +31 -29
  332. package/src/virtuals/sdk/sdkCore.ts +5 -0
  333. package/src/virtuals/sdk/types/index.ts +4 -8
  334. package/src/virtuals/sdk/types/tableDefs.ts +4 -4
  335. package/src/virtuals/sdk/types/tsAlias.ts +4 -0
  336. package/src/virtuals/sdk/utils.ts +2 -2
  337. package/src/virtuals/utils.ts +29 -25
  338. package/ui.d.ts +1301 -274
  339. package/dist/components/first-time-setup/TabItem.astro +0 -44
  340. package/dist/components/first-time-setup/Tabs.astro +0 -170
  341. package/dist/handlers/changelog/changelogLoader.d.ts +0 -15
  342. package/dist/handlers/changelog/changelogLoader.js +0 -104
  343. package/dist/handlers/changelog/index.d.ts +0 -1
  344. package/dist/handlers/changelog/index.js +0 -53
  345. package/dist/handlers/scriptHandler.d.ts +0 -30
  346. package/dist/handlers/scriptHandler.js +0 -25
  347. package/dist/utils/addIntegrationArray.d.ts +0 -24
  348. package/dist/utils/addIntegrationArray.js +0 -11
  349. package/dist/utils/getLatestVersion.d.ts +0 -12
  350. package/dist/utils/getLatestVersion.js +0 -36
  351. package/dist/utils/integrationLogger.d.ts +0 -8
  352. package/dist/utils/integrationLogger.js +0 -23
  353. package/dist/utils/jsonUtils.d.ts +0 -13
  354. package/dist/utils/jsonUtils.js +0 -11
  355. package/dist/utils/pageTypeFilter.d.ts +0 -2
  356. package/dist/utils/pageTypeFilter.js +0 -16
  357. package/dist/virtuals/auth/encryption.d.ts +0 -46
  358. package/dist/virtuals/auth/encryption.js +0 -82
  359. package/dist/virtuals/auth/password.d.ts +0 -47
  360. package/dist/virtuals/auth/password.js +0 -147
  361. package/dist/virtuals/auth/session.d.ts +0 -77
  362. package/dist/virtuals/auth/session.js +0 -146
  363. package/dist/virtuals/auth/user.d.ts +0 -155
  364. package/dist/virtuals/auth/user.js +0 -251
  365. package/dist/virtuals/auth/utils/lists/passwords.d.ts +0 -2
  366. package/dist/virtuals/auth/utils/lists/passwords.js +0 -10006
  367. package/dist/virtuals/auth/utils/lists/usernames.d.ts +0 -2
  368. package/dist/virtuals/auth/utils/lists/usernames.js +0 -547
  369. package/dist/virtuals/auth/utils/scrypt.d.ts +0 -17
  370. package/dist/virtuals/auth/utils/scrypt.js +0 -30
  371. package/dist/virtuals/auth/utils/unsafeCheck.d.ts +0 -34
  372. package/dist/virtuals/auth/utils/unsafeCheck.js +0 -39
  373. package/dist/virtuals/i18n/index.d.ts +0 -2471
  374. package/dist/virtuals/lib/jsonUtils.d.ts +0 -2
  375. package/dist/virtuals/lib/jsonUtils.js +0 -14
  376. package/dist/virtuals/lib/removeLeadingTrailingSlashes.d.ts +0 -10
  377. package/dist/virtuals/lib/removeLeadingTrailingSlashes.js +0 -5
  378. package/src/components/first-time-setup/TabItem.astro +0 -44
  379. package/src/components/first-time-setup/Tabs.astro +0 -170
  380. package/src/handlers/changelog/changelogLoader.ts +0 -138
  381. package/src/handlers/changelog/index.ts +0 -67
  382. package/src/handlers/scriptHandler.ts +0 -86
  383. package/src/utils/addIntegrationArray.ts +0 -35
  384. package/src/utils/getLatestVersion.ts +0 -67
  385. package/src/utils/integrationLogger.ts +0 -29
  386. package/src/utils/jsonUtils.ts +0 -20
  387. package/src/utils/pageTypeFilter.ts +0 -13
  388. package/src/virtuals/auth/encryption.ts +0 -148
  389. package/src/virtuals/auth/password.ts +0 -279
  390. package/src/virtuals/auth/session.ts +0 -290
  391. package/src/virtuals/auth/user.ts +0 -501
  392. package/src/virtuals/auth/utils/lists/passwords.ts +0 -10004
  393. package/src/virtuals/auth/utils/lists/usernames.ts +0 -546
  394. package/src/virtuals/auth/utils/scrypt.ts +0 -42
  395. package/src/virtuals/auth/utils/unsafeCheck.ts +0 -72
  396. package/src/virtuals/lib/jsonUtils.ts +0 -11
  397. package/src/virtuals/lib/removeLeadingTrailingSlashes.ts +0 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,96 @@
1
1
  # studiocms
2
2
 
3
+ ## 0.1.0-beta.26
4
+
5
+ ### Patch Changes
6
+
7
+ - [#730](https://github.com/withstudiocms/studiocms/pull/730) [`cf0e866`](https://github.com/withstudiocms/studiocms/commit/cf0e866e1508d6fec7d59c765126c6bbfe09f068) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Update to StudioCMS UI 1.0 beta
8
+
9
+ - [#754](https://github.com/withstudiocms/studiocms/pull/754) [`3daaf92`](https://github.com/withstudiocms/studiocms/commit/3daaf92efa7ba78de41927cc56cc3d166da48075) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fix: Adjust SDK page lookup to return `undefined` when a page is not found, eliminating noisy Astro errors in development (notably when using Chrome DevTools).
10
+
11
+ - [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Cleanup internal integration code
12
+
13
+ - [#740](https://github.com/withstudiocms/studiocms/pull/740) [`203852c`](https://github.com/withstudiocms/studiocms/commit/203852c2e102c668eed71e46b96f134899895327) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implement new auth package into StudioCMS
14
+
15
+ - [#761](https://github.com/withstudiocms/studiocms/pull/761) [`447843f`](https://github.com/withstudiocms/studiocms/commit/447843f8e565f7ea15131a1a02cf178c6269d5ef) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Renames internal i18n file to server.ts instead of index.ts
16
+
17
+ - [#724](https://github.com/withstudiocms/studiocms/pull/724) [`0921bd3`](https://github.com/withstudiocms/studiocms/commit/0921bd330bcd69080aba0265db822b33327fbb9f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.49
18
+
19
+ - [#734](https://github.com/withstudiocms/studiocms/pull/734) [`c613781`](https://github.com/withstudiocms/studiocms/commit/c613781d04003f1808a1632dcfcd2f2662d4ee8b) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
20
+
21
+ - [#746](https://github.com/withstudiocms/studiocms/pull/746) [`d52873f`](https://github.com/withstudiocms/studiocms/commit/d52873f975fa7cbfe52a037bf84648b03c4773b4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.50
22
+
23
+ - [#766](https://github.com/withstudiocms/studiocms/pull/766) [`06444cb`](https://github.com/withstudiocms/studiocms/commit/06444cbaf17e63a12b08eb8a08c1b6d65eeaac82) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
24
+
25
+ - [#749](https://github.com/withstudiocms/studiocms/pull/749) [`5780dd6`](https://github.com/withstudiocms/studiocms/commit/5780dd603ec6dc900d8f0f667374b4cf5eaf6a5a) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - BREAKING: Remove deprecated locals from middleware in favor of a joined StudioCMS locals object.
26
+
27
+ Removed top-level Astro.Locals keys:
28
+
29
+ - SCMSGenerator, SCMSUiGenerator, latestVersion, siteConfig, defaultLang, routeMap
30
+ - userSessionData, emailVerificationEnabled, userPermissionLevel
31
+ - wysiwygCsrfToken (renamed)
32
+
33
+ New location:
34
+
35
+ - Access these under event.locals.StudioCMS.<key>
36
+
37
+ Renames:
38
+
39
+ - wysiwygCsrfToken → editorCSRFToken (under StudioCMS)
40
+
41
+ Migration examples:
42
+ Before:
43
+ const { siteConfig, defaultLang } = Astro.locals;
44
+ After:
45
+ const { siteConfig, defaultLang } = Astro.locals.StudioCMS;
46
+
47
+ Before:
48
+ const token = Astro.locals.wysiwygCsrfToken;
49
+ After:
50
+ const token = Astro.locals.StudioCMS.editorCSRFToken;
51
+
52
+ - [#755](https://github.com/withstudiocms/studiocms/pull/755) [`85a9a99`](https://github.com/withstudiocms/studiocms/commit/85a9a99d3c4595ff7130ca753e4962da66ad2511) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implements new DB table for dynamic config storage in unified table
53
+
54
+ BREAKING:
55
+
56
+ Users will be required to run `astro db push --remote` to update their database table schemas.
57
+
58
+ - [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - cleanup and organize dependencies
59
+
60
+ - [#741](https://github.com/withstudiocms/studiocms/pull/741) [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Tweak auth-kit to conform types to table configs
61
+
62
+ - [#742](https://github.com/withstudiocms/studiocms/pull/742) [`8e53f8f`](https://github.com/withstudiocms/studiocms/commit/8e53f8fc56adb8a8b110c9854053c779e07b3cb3) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Init new package @withstudiocms/internal_helpers
63
+
64
+ - [#744](https://github.com/withstudiocms/studiocms/pull/744) [`95b41f1`](https://github.com/withstudiocms/studiocms/commit/95b41f1a37b241dd3e1bfa90c8a85b858c107e6d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fix missing variable during First time setup
65
+
66
+ - [#741](https://github.com/withstudiocms/studiocms/pull/741) [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - BREAKING CHANGE: Updated AstroDB table config to utilize enums for permissions.
67
+
68
+ Users will be required to run `astro db push --remote` to update their table schema.
69
+
70
+ - [#751](https://github.com/withstudiocms/studiocms/pull/751) [`d5229f5`](https://github.com/withstudiocms/studiocms/commit/d5229f557b8035406582c9792e8a738dba18a1b5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - fixes formdata conversion on first time setup
71
+
72
+ - [#763](https://github.com/withstudiocms/studiocms/pull/763) [`2b280d8`](https://github.com/withstudiocms/studiocms/commit/2b280d84bcb40805bbd1ed44e45a9f7260eed081) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Clean up and deduplicate code in the main integration index.
73
+
74
+ - [#756](https://github.com/withstudiocms/studiocms/pull/756) [`2f5403d`](https://github.com/withstudiocms/studiocms/commit/2f5403de6af5662a088bdcb764a43bf351249c44) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Restore avatar functionality with automatic fallback when remote avatars are unavailable to prevent server errors
75
+
76
+ - [#750](https://github.com/withstudiocms/studiocms/pull/750) [`0fc4fd7`](https://github.com/withstudiocms/studiocms/commit/0fc4fd7c4567b36865c4dba617663a12ecf619f5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - NOTICE: Avatars disabled for now due to performance issues.
77
+
78
+ - [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Create and implement new injectScripts helper for Astro integrations
79
+
80
+ - [#747](https://github.com/withstudiocms/studiocms/pull/747) [`57f2d80`](https://github.com/withstudiocms/studiocms/commit/57f2d800d929734dfaa9eb324e8d8171856e8f3f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Clean up and remove deprecated `removeLeadingTrailingSlashes` in favor of `stripLeadingAndTrailingSlashes`.
81
+
82
+ - [#750](https://github.com/withstudiocms/studiocms/pull/750) [`0fc4fd7`](https://github.com/withstudiocms/studiocms/commit/0fc4fd7c4567b36865c4dba617663a12ecf619f5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Streamlines i18n setup to utilize centralized config.
83
+
84
+ - [#764](https://github.com/withstudiocms/studiocms/pull/764) [`3b22102`](https://github.com/withstudiocms/studiocms/commit/3b2210274705cb534b03d02d6952bfcdbdb10478) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Refactor: Handle i18n translations at build instead of bundling json files
85
+
86
+ - [#758](https://github.com/withstudiocms/studiocms/pull/758) [`bfda1e4`](https://github.com/withstudiocms/studiocms/commit/bfda1e4922fe391d2b8ecc81e8a83f68990ab083) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Tweaks i18n loader to ignore translations with more than 10% of the translations missing
87
+
88
+ - Updated dependencies [[`203852c`](https://github.com/withstudiocms/studiocms/commit/203852c2e102c668eed71e46b96f134899895327), [`2ad259e`](https://github.com/withstudiocms/studiocms/commit/2ad259e9662bd4c8b58e07629491cb322eb479fa), [`d77a8c1`](https://github.com/withstudiocms/studiocms/commit/d77a8c16c97b91343f1c03b2fd9dd2fca0252647), [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f), [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1), [`8e53f8f`](https://github.com/withstudiocms/studiocms/commit/8e53f8fc56adb8a8b110c9854053c779e07b3cb3), [`341b59e`](https://github.com/withstudiocms/studiocms/commit/341b59e3c775f619e9630c9044772ef0f16d1970), [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f), [`e70f380`](https://github.com/withstudiocms/studiocms/commit/e70f38001d9ef80e27f701d249fda23c670dfb5e)]:
89
+ - @withstudiocms/auth-kit@0.1.0-beta.1
90
+ - @withstudiocms/effect@0.1.0-beta.2
91
+ - @withstudiocms/internal_helpers@0.1.0-beta.1
92
+ - @withstudiocms/component-registry@0.1.0-beta.2
93
+
3
94
  ## 0.1.0-beta.25
4
95
 
5
96
  ### Patch Changes
@@ -1,10 +1,8 @@
1
+ import { CheckIfUnsafe } from "@withstudiocms/auth-kit/utils/unsafeCheck";
1
2
  import { StudioCMSColorwayError, StudioCMSColorwayInfo } from "@withstudiocms/cli-kit/colors";
2
3
  import { z } from "astro/zod";
3
4
  import dotenv from "dotenv";
4
5
  import { Effect, runEffect } from "../../../effect.js";
5
- import {
6
- CheckIfUnsafe
7
- } from "../../../virtuals/auth/utils/unsafeCheck.js";
8
6
  import { checkRequiredEnvVars } from "../../utils/checkRequiredEnvVars.js";
9
7
  import { createUserAvatar } from "../../utils/createUserAvatar.js";
10
8
  import { logger } from "../../utils/logger.js";
@@ -1,10 +1,8 @@
1
+ import { CheckIfUnsafe } from "@withstudiocms/auth-kit/utils/unsafeCheck";
1
2
  import { StudioCMSColorwayError, StudioCMSColorwayInfo } from "@withstudiocms/cli-kit/colors";
2
3
  import dotenv from "dotenv";
3
4
  import { eq } from "drizzle-orm";
4
5
  import { Effect, runEffect } from "../../../effect.js";
5
- import {
6
- CheckIfUnsafe
7
- } from "../../../virtuals/auth/utils/unsafeCheck.js";
8
6
  import { checkRequiredEnvVars } from "../../utils/checkRequiredEnvVars.js";
9
7
  import { logger } from "../../utils/logger.js";
10
8
  import { Permissions, Users, useLibSQLDb } from "../../utils/useLibSQLDb.js";
@@ -1,5 +1,5 @@
1
1
  ---
2
- import { Button } from 'studiocms:ui/components';
2
+ import { Button } from 'studiocms:ui/components/button';
3
3
 
4
4
  interface Props {
5
5
  href: string;
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  import { useTranslations } from 'studiocms:i18n';
3
- import { Divider } from 'studiocms:ui/components';
3
+ import { Divider } from 'studiocms:ui/components/divider';
4
4
  import OAuthButton from './OAuthButton.astro';
5
5
  import { providerData, showOAuth } from './oAuthButtonProviders.js';
6
6
 
@@ -1,4 +1,4 @@
1
- import { toast } from "studiocms:ui/components";
1
+ import { toast } from "studiocms:ui/components/toaster";
2
2
  async function formListener(event, form, type) {
3
3
  event.preventDefault();
4
4
  if (type === "register") {
@@ -3,7 +3,9 @@ import 'studiocms:ui/global-css';
3
3
  import '../../styles/dashboard-base.css';
4
4
  import '../../styles/dashboard-diff.css';
5
5
  import { Generator } from 'studiocms:components';
6
- import { FAVICON_ASSETS, STUDIOCMS_THEME_COLOR } from '../../consts.js';
6
+ import Favicons from '../shared/head/Favicons.astro';
7
+ import Global from '../shared/head/Global.astro';
8
+ import TitleTags from '../shared/head/TitleTags.astro';
7
9
  import ThemeManager from '../shared/ThemeManager.astro';
8
10
 
9
11
  export interface Props {
@@ -15,22 +17,9 @@ const { title, description } = Astro.props;
15
17
  ---
16
18
 
17
19
  <head>
18
- {/* Global Metadata */}
19
- <meta charset="utf-8" />
20
- <meta name="viewport" content="width=device-width,initial-scale=1" />
20
+ <Global />
21
21
  <Generator />
22
-
23
- {/* Favicon */}
24
- <link rel="icon" href={FAVICON_ASSETS.svg} type="image/svg+xml" />
25
- <link rel="icon" href={FAVICON_ASSETS.png.light} type="image/png" media="(prefers-color-scheme: dark)" />
26
- <link rel="icon" href={FAVICON_ASSETS.png.dark} type="image/png" media="(prefers-color-scheme: light)" />
27
-
28
- {/* Primary Meta Tags */}
29
- <title>{title}</title>
30
- <meta name="title" content={title} />
31
- <meta name="description" content={description} />
32
- <meta name="theme-color" content={STUDIOCMS_THEME_COLOR} />
33
-
34
- {/* Theme Manager */}
22
+ <Favicons />
23
+ <TitleTags {title} {description} />
35
24
  <ThemeManager />
36
25
  </head>
@@ -4,7 +4,7 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
4
4
  import dashboardGridItems from 'studiocms:components/dashboard-grid-items';
5
5
  import type { UiLanguageKeys } from 'studiocms:i18n';
6
6
  import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
7
- import { Center } from 'studiocms:ui/components';
7
+ import { Center } from 'studiocms:ui/components/center';
8
8
  import { Effect } from '../../effect.js';
9
9
  import DashboardGridItem from './DashboardGridItem.astro';
10
10
 
@@ -32,7 +32,7 @@ const checkAllowed = (perm: 'owner' | 'admin' | 'editor' | 'visitor' | undefined
32
32
  Effect.gen(function* () {
33
33
  const user = yield* User;
34
34
  return user.isUserAllowed(currentUser, perm ?? 'unknown');
35
- }).pipe(User.Provide);
35
+ });
36
36
  ---
37
37
 
38
38
  <div class="dashboard-grid-container">
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  import type { UiLanguageKeys } from 'studiocms:i18n';
3
- import { Card, Icon } from 'studiocms:ui/components';
3
+ import { Card } from 'studiocms:ui/components/card';
4
+ import { Icon } from 'studiocms:ui/components/icon';
4
5
  import { createComponentProxy, transformHTML } from '../../runtime/index.js';
5
6
  import type { GridItem } from './shared.js';
6
7
 
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
4
- import { Button, Icon, Modal, Textarea } from 'studiocms:ui/components';
4
+ import { Button } from 'studiocms:ui/components/button';
5
+ import { Icon } from 'studiocms:ui/components/icon';
6
+ import { Modal } from 'studiocms:ui/components/modal';
7
+ import { Textarea } from 'studiocms:ui/components/textarea';
5
8
  import { studioCMSSocials } from '../../consts.js';
6
9
  import UserName from './UserName.astro';
7
10
 
@@ -18,7 +21,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
18
21
  <header class="index-page-header">
19
22
  <div class="page-title-container">
20
23
  <Button color='primary' id='nav-open' class='mobile-btn'>
21
- <Icon name="bars-3" height={24} width={24} />
24
+ <Icon name="heroicons:bars-3" height={24} width={24} />
22
25
  </Button>
23
26
  <h1 class="page-title">
24
27
  <t-dashboard-header key="welcome-title">{t("welcome-title")}</t-dashboard-header>, <UserName {currentUser} />.
@@ -30,7 +33,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
30
33
  <t-dashboard-header key="title-button:discord">{t("title-button:discord")}</t-dashboard-header>
31
34
  </Button>
32
35
  <Button color='success' variant='flat' id="feedback-button">
33
- <Icon name='chat-bubble-oval-left-ellipsis' width={24} height={24} />
36
+ <Icon name='heroicons:chat-bubble-oval-left-ellipsis' width={24} height={24} />
34
37
  <t-dashboard-header key="title-button:feedback">{t("title-button:feedback")}</t-dashboard-header>
35
38
  </Button>
36
39
  </div>
@@ -50,7 +53,8 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
50
53
  </Modal>
51
54
 
52
55
  <script>
53
- import { ModalHelper, toast } from 'studiocms:ui/components';
56
+ import { toast } from 'studiocms:ui/components/toaster';
57
+ import { ModalHelper } from 'studiocms:ui/components/modal';
54
58
 
55
59
  const ENDPOINT = "https://api.feelback.dev/v0";
56
60
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import type { VersionCacheObject } from 'studiocms:sdk/types';
4
- import { DoubleSidebar as SuiDoubleSidebar } from 'studiocms:ui/components';
4
+ import { DoubleSidebar as SuiDoubleSidebar } from 'studiocms:ui/components/sidebar';
5
5
  import MainSidebarContent from './MainSidebarContent.astro';
6
6
 
7
7
  interface Props {
@@ -22,7 +22,7 @@ const { currentUser, latestVersion } = Astro.props as Props;
22
22
  </SuiDoubleSidebar>
23
23
 
24
24
  <script>
25
- import { DoubleSidebarHelper } from "studiocms:ui/components";
25
+ import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar";
26
26
 
27
27
  if (document.getElementById('sui-sidebars')) {
28
28
  const sidebar = new DoubleSidebarHelper();
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  import { User, VerifyEmail } from 'studiocms:auth/lib';
3
3
  import type { UserSessionData } from 'studiocms:auth/lib/types';
4
+ import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
4
5
  import { Effect } from '../../effect.js';
5
6
 
6
7
  interface Props {
7
- requiredPermission: 'owner' | 'admin' | 'editor' | 'visitor' | 'unknown';
8
+ requiredPermission: AvailablePermissionRanks;
8
9
  currentUser: UserSessionData | null;
9
10
  }
10
11
 
@@ -18,7 +19,7 @@ let [isAuthorized, emailVerified] = await Effect.runPromise(
18
19
  isUserAllowed(currentUser, requiredPermission),
19
20
  isEmailVerified(currentUser),
20
21
  ]);
21
- }).pipe(User.Provide, VerifyEmail.Provide)
22
+ }).pipe(VerifyEmail.Provide)
22
23
  );
23
24
 
24
25
  let redirectProfile = Astro.locals.StudioCMS.routeMap.mainLinks.userProfile;
@@ -4,7 +4,11 @@ import { dashboardConfig } from 'studiocms:config';
4
4
  import { useTranslations } from 'studiocms:i18n';
5
5
  import pluginList from 'studiocms:plugins';
6
6
  import type { VersionCacheObject } from 'studiocms:sdk/types';
7
- import { Button, Divider, Dropdown, Group, Icon } from 'studiocms:ui/components';
7
+ import { Button } from 'studiocms:ui/components/button';
8
+ import { Divider } from 'studiocms:ui/components/divider';
9
+ import { Dropdown } from 'studiocms:ui/components/dropdown';
10
+ import { Group } from 'studiocms:ui/components/group';
11
+ import { Icon } from 'studiocms:ui/components/icon';
8
12
  import Footer from './Footer.astro';
9
13
  import SidebarLink from './SidebarLink.astro';
10
14
  import SidebarPluginLink from './SidebarPluginLink.astro';
@@ -46,18 +50,18 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
46
50
  { versionCheck && <VersionCheck {latestVersion} /> }
47
51
  <Button size='sm' variant="outlined" color={'default'} id={'studiocms-theme-toggle'}>
48
52
  <div id="dark-content">
49
- <Icon name='moon-16-solid' width={16} height={16} slot="dark" />
53
+ <Icon name='heroicons:moon-16-solid' width={16} height={16} slot="dark" />
50
54
  </div>
51
55
  <div id="light-content">
52
- <Icon name='sun-16-solid' width={16} height={16} slot="light" />
56
+ <Icon name='heroicons:sun-16-solid' width={16} height={16} slot="light" />
53
57
  </div>
54
58
  <div id="fallback-content">
55
- <Icon name='arrow-path-16-solid' width={16} height={16} slot="fallback" />
59
+ <Icon name='heroicons:arrow-path-16-solid' width={16} height={16} slot="fallback" />
56
60
  </div>
57
61
  </Button>
58
62
  </Group>
59
63
  <Button color='primary' size='sm' id='nav-close' class='mobile-btn mid-size-btn'>
60
- <Icon name="x-mark" height={16} width={16} />
64
+ <Icon name="heroicons:x-mark" height={16} width={16} />
61
65
  </Button>
62
66
  </div>
63
67
  </div>
@@ -146,9 +150,9 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
146
150
  <Dropdown
147
151
  id='sidebar-user-dropdown'
148
152
  options={[
149
- { label: t("user-dropdown:settings"), icon: "user", value: Astro.locals.StudioCMS.routeMap.mainLinks.userProfile },
150
- { label: t("user-dropdown:view-site"), icon: "globe-alt", value: Astro.locals.StudioCMS.routeMap.mainLinks.baseSiteURL },
151
- { label: t("user-dropdown:logout"), icon: "arrow-left-start-on-rectangle", color: 'danger', value: Astro.locals.StudioCMS.routeMap.authLinks.logoutURL },
153
+ { label: t("user-dropdown:settings"), icon: "heroicons:user", value: Astro.locals.StudioCMS.routeMap.mainLinks.userProfile },
154
+ { label: t("user-dropdown:view-site"), icon: "heroicons:globe-alt", value: Astro.locals.StudioCMS.routeMap.mainLinks.baseSiteURL },
155
+ { label: t("user-dropdown:logout"), icon: "heroicons:arrow-left-start-on-rectangle", color: 'danger', value: Astro.locals.StudioCMS.routeMap.authLinks.logoutURL },
152
156
  ]}
153
157
  offset={8}
154
158
  >
@@ -244,7 +248,7 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
244
248
  </script>
245
249
 
246
250
  <script>
247
- import { DropdownHelper } from "studiocms:ui/components";
251
+ import { DropdownHelper } from "studiocms:ui/components/dropdown";
248
252
  import { ThemeHelper } from '@studiocms/ui/utils/ThemeHelper.js';
249
253
 
250
254
  function setup() {
@@ -294,21 +298,21 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
294
298
  .empty-placeholder-span {
295
299
  width: 100%;
296
300
  text-align: center;
297
- color: hsl(var(--text-muted));
301
+ color: var(--text-muted);
298
302
  font-size: .875em;
299
303
  }
300
304
 
301
305
  .user-dropdown-trigger-container {
302
306
  width: calc(280px - 3rem);
303
307
  cursor: pointer;
304
- border: 1px solid hsl(var(--border));
308
+ border: 1px solid var(--border);
305
309
  padding: .5rem;
306
310
  border-radius: .5rem;
307
311
  transition: all .15s ease;
308
312
  }
309
313
 
310
314
  .user-dropdown-trigger-container:hover {
311
- background-color: hsla(var(--border) / .5);
315
+ background-color: var(--background-step-2);
312
316
  }
313
317
 
314
318
  .sidebar {
@@ -1,5 +1,6 @@
1
1
  ---
2
- import { Button, Icon } from 'studiocms:ui/components';
2
+ import { Button } from 'studiocms:ui/components/button';
3
+ import { Icon } from 'studiocms:ui/components/icon';
3
4
 
4
5
  interface Props {
5
6
  title: string;
@@ -10,7 +11,7 @@ const { title } = Astro.props;
10
11
  <header class="page-header">
11
12
  <div class="page-title-container">
12
13
  <Button color='primary' id='nav-open' class='mobile-btn'>
13
- <Icon name="bars-3" height={24} width={24} />
14
+ <Icon name="heroicons:bars-3" height={24} width={24} />
14
15
  </Button>
15
16
  <h1 class="page-title">{title}</h1>
16
17
  </div>
@@ -1,19 +1,19 @@
1
1
  ---
2
- import { Icon } from 'studiocms:ui/components';
3
- import type { HeroIconName } from '@studiocms/ui/components/Icon/iconType.js';
2
+ import { Icon } from 'studiocms:ui/components/icon';
3
+ import type { AvailableIcons } from 'studiocms:ui/icons';
4
4
  import type { HTMLAttributes } from 'astro/types';
5
5
 
6
6
  interface Props extends HTMLAttributes<'a'> {
7
7
  /**
8
8
  * ONLY USE OUTLINED ICONS! Shit will break otherwise
9
9
  */
10
- icon: HeroIconName;
10
+ icon: AvailableIcons;
11
11
  href: string;
12
12
  }
13
13
 
14
14
  const { icon, class: className, ...props } = Astro.props;
15
15
 
16
- const activeIcon = `${icon}-solid`;
16
+ const activeIcon = (icon.endsWith('-solid') ? icon : `${icon}-solid`) as AvailableIcons;
17
17
 
18
18
  const compId = crypto.randomUUID();
19
19
  ---
@@ -33,7 +33,7 @@ const compId = crypto.randomUUID();
33
33
  height={24}
34
34
  />
35
35
  <Icon
36
- name={activeIcon as HeroIconName}
36
+ name={activeIcon}
37
37
  id="selected-icon"
38
38
  class="sidebar-link-icon selected"
39
39
  width={24}
@@ -25,15 +25,15 @@ const isActive = Astro.url.pathname === href && 'active';
25
25
  width: 100%;
26
26
  padding: .375rem .5rem;
27
27
  text-decoration: none;
28
- color: hsl(var(--text-muted));
28
+ color: var(--text-muted);
29
29
  }
30
30
 
31
31
  .sidebar-plugin-link:hover {
32
- background-color: hsl(var(--background-step-2));
32
+ background-color: var(--background-step-2);
33
33
  }
34
34
 
35
35
  .sidebar-plugin-link.active {
36
- color: hsl(var(--text));
36
+ color: var(--text);
37
37
  }
38
38
 
39
39
  .sidebar-plugin-identifier {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import type { VersionCacheObject } from 'studiocms:sdk/types';
4
- import { Sidebar } from 'studiocms:ui/components';
4
+ import { Sidebar } from 'studiocms:ui/components/sidebar';
5
5
  import MainSidebarContent from './MainSidebarContent.astro';
6
6
 
7
7
  interface Props {
@@ -16,7 +16,7 @@ const { currentUser, latestVersion } = Astro.props as Props;
16
16
  </Sidebar>
17
17
 
18
18
  <script>
19
- import { SingleSidebarHelper } from "studiocms:ui/components";
19
+ import { SingleSidebarHelper } from "studiocms:ui/components/sidebar";
20
20
 
21
21
  function setupSidebar() {
22
22
  if (!document.getElementById('sui-sidebar')) return;
@@ -3,7 +3,11 @@ import { validImages } from 'studiocms:auth/utils/validImages';
3
3
  import dashboardGridItems from 'studiocms:components/dashboard-grid-items';
4
4
  import { useTranslations } from 'studiocms:i18n';
5
5
  import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
6
- import { Card, Divider, Input, Select, Toggle } from 'studiocms:ui/components';
6
+ import { Card } from 'studiocms:ui/components/card';
7
+ import { Divider } from 'studiocms:ui/components/divider';
8
+ import { Input } from 'studiocms:ui/components/input';
9
+ import { Select } from 'studiocms:ui/components/select';
10
+ import { Toggle } from 'studiocms:ui/components/toggle';
7
11
  import LoginPreview from './LoginPreview.astro';
8
12
 
9
13
  interface Props {
@@ -88,7 +92,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:configuration');
88
92
  <div class="grid-items-container">
89
93
  {
90
94
  gridItemOptions.map(({ enabled, label, name }) => (
91
- <Card style="background-color: hsl(var(--background-step-2));">
95
+ <Card style="background-color: var(--background-step-2);">
92
96
  <Toggle {label} {name} color='primary' defaultChecked={enabled} />
93
97
  </Card>
94
98
  ))
@@ -147,61 +151,59 @@ const t = useTranslations(lang, '@studiocms/dashboard:configuration');
147
151
  </script>
148
152
 
149
153
  <script>
150
- import { toast } from "studiocms:ui/components";
154
+ import { toast } from "studiocms:ui/components/toaster";
151
155
  const configForm = document.querySelector('#site-config-form') as HTMLFormElement;
152
156
 
153
157
  configForm.addEventListener('submit', async (e) => {
154
158
  e.preventDefault();
155
-
156
- const formData = new FormData(configForm);
157
-
158
- // Get dashboard grid items
159
- const gridItems = Array.from(configForm.querySelectorAll('input[type="checkbox"]') as NodeListOf<HTMLInputElement>).map((input) => {
160
- return {
159
+ try {
160
+ const formData = new FormData(configForm);
161
+ // Scope to grid container to avoid unrelated checkboxes
162
+ const gridItems = Array.from(document.querySelectorAll('.grid-items-container input[type="checkbox"]') as NodeListOf<HTMLInputElement>).map((input) => ({
161
163
  name: input.name,
162
164
  enabled: input.checked,
165
+ }));
166
+ const enabledGridItems = gridItems.filter((item) => item.enabled).map((item) => item.name);
167
+ const diffPerPageRaw = formData.get('diff-per-page') as string;
168
+ const diffPerPageParsed = Number.parseInt(diffPerPageRaw, 10);
169
+ const data = {
170
+ title: formData.get('site-title') as string,
171
+ description: formData.get('site-description') as string,
172
+ defaultOgImage: formData.get('default-og-image') ?? null,
173
+ siteIcon: formData.get('site-icon') ?? null,
174
+ loginPageBackground: formData.get('login-page-background') as string,
175
+ loginPageCustomImage: formData.get('login-page-background-custom') ?? null,
176
+ enableDiffs: formData.get('diff-enabled') === 'true',
177
+ diffPerPage: Number.isNaN(diffPerPageParsed) ? 10 : diffPerPageParsed,
178
+ gridItems: enabledGridItems,
179
+ enableMailer: formData.get('enable-mailer') === 'true',
180
+ hideDefaultIndex: formData.get('hide-default-index') === 'true'
181
+ };
182
+ const response = await fetch(configForm.action, {
183
+ method: 'POST',
184
+ body: JSON.stringify(data),
185
+ headers: { 'Content-Type': 'application/json' },
186
+ });
187
+ const res: any = await response.json().catch(() => ({}));
188
+ if (!response.ok) {
189
+ toast({
190
+ title: 'Error',
191
+ description: res?.error || res?.message || 'Request failed',
192
+ type: 'danger'
193
+ });
194
+ return;
163
195
  }
164
- });
165
-
166
- const enabledGridItems = gridItems.filter((item) => item.enabled).map((item) => item.name);
167
-
168
- const data = {
169
- title: formData.get('site-title') as string,
170
- description: formData.get('site-description') as string,
171
- defaultOgImage: formData.get('default-og-image') ?? null,
172
- siteIcon: formData.get('site-icon') ?? null,
173
- loginPageBackground: formData.get('login-page-background') as string,
174
- loginPageCustomImage: formData.get('login-page-background-custom') ?? null,
175
- enableDiffs: formData.get('diff-enabled') === 'true',
176
- diffPerPage: parseInt(formData.get('diff-per-page') as string),
177
- gridItems: enabledGridItems,
178
- enableMailer: formData.get('enable-mailer') === 'true',
179
- hideDefaultIndex: formData.get('hide-default-index') === 'true'
180
- }
181
-
182
- const response = await fetch(configForm.action, {
183
- method: 'POST',
184
- body: JSON.stringify(data),
185
- headers: {
186
- 'Content-Type': 'application/json',
187
- },
188
- })
189
- const res = await response.json();
190
-
191
- if (response.status !== 200) {
192
- toast({
193
- title: 'Error',
194
- description: res.error,
195
- type: 'danger'
196
- })
197
- }
198
-
199
- if (response.status === 200) {
200
196
  toast({
201
197
  title: 'Success',
202
- description: res.message,
198
+ description: res?.message || 'Configuration saved',
203
199
  type: 'success'
204
- })
200
+ });
201
+ } catch (err) {
202
+ toast({
203
+ title: 'Network error',
204
+ description: (err as Error)?.message ?? 'Unexpected error',
205
+ type: 'danger'
206
+ });
205
207
  }
206
208
  });
207
209
  </script>
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  import { Image } from 'astro:assets';
3
3
  import { validImages } from 'studiocms:auth/utils/validImages';
4
- import { useTranslations } from 'studiocms:i18n';
5
- import { Card } from 'studiocms:ui/components';
4
+ import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
5
+ import { Card } from 'studiocms:ui/components/card';
6
6
 
7
7
  const imageFilter = (filterName: string) =>
8
8
  validImages.filter(({ name }) => name === filterName)[0];
@@ -33,9 +33,11 @@ const curves = getLoginImage('studiocms-curves');
33
33
  interface Props {
34
34
  light?: ImageMetadata;
35
35
  dark?: ImageMetadata;
36
+
37
+ defaultLang?: UiLanguageKeys;
36
38
  }
37
39
 
38
- const { light, dark } = Astro.props as Props;
40
+ const { light, dark, defaultLang } = Astro.props as Props;
39
41
 
40
42
  const lightSrc = light ? light : blobs.light;
41
43
  const darkSrc = dark ? dark : blobs.dark;
@@ -55,7 +57,7 @@ const stringifyable = {
55
57
  },
56
58
  };
57
59
 
58
- const lang = Astro.locals.StudioCMS.defaultLang;
60
+ const lang = defaultLang ?? Astro.locals?.StudioCMS?.defaultLang ?? 'en';
59
61
  const t = useTranslations(lang, '@studiocms/dashboard:configuration');
60
62
  ---
61
63