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
@@ -1,7 +1,11 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { useTranslations } from 'studiocms:i18n';
4
- import { Button, Card, Group, Icon, Input } from 'studiocms:ui/components';
4
+ import { Button } from 'studiocms:ui/components/button';
5
+ import { Card } from 'studiocms:ui/components/card';
6
+ import { Group } from 'studiocms:ui/components/group';
7
+ import { Icon } from 'studiocms:ui/components/icon';
8
+ import { Input } from 'studiocms:ui/components/input';
5
9
 
6
10
  interface Props {
7
11
  currentUser: UserSessionData | null;
@@ -23,13 +27,13 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
23
27
  <div class="form-header">
24
28
  <Group>
25
29
  <Button id="refresh-avatar" size='sm' variant={'outlined'} color={'info'} data-url={Astro.locals.StudioCMS.routeMap.endpointLinks.profile}>
26
- <Icon slot="start-content" name="user-circle" width={24} height={24} />
30
+ <Icon slot="start-content" name="heroicons:user-circle" width={24} height={24} />
27
31
  <t-profile-basic key="sync-with-libravatar">
28
32
  {t('sync-with-libravatar')}
29
33
  </t-profile-basic>
30
34
  </Button>
31
35
  <Button type='submit' size='sm' variant={'solid'} color='primary'>
32
- <Icon slot="start-content" name="check" width={24} height={24} />
36
+ <Icon slot="start-content" name="heroicons:check" width={24} height={24} />
33
37
  <t-profile-basic key="basic-info-save-button">
34
38
  {t('basic-info-save-button')}
35
39
  </t-profile-basic>
@@ -80,7 +84,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
80
84
 
81
85
 
82
86
  <script>
83
- import { toast } from "studiocms:ui/components";
87
+ import { toast } from "studiocms:ui/components/toaster";
84
88
 
85
89
  const syncAvatar = document.getElementById('refresh-avatar') as HTMLButtonElement;
86
90
  const syncUrl = syncAvatar.dataset.url as string;
@@ -3,8 +3,11 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { Mailer } from 'studiocms:mailer';
4
4
  import { notificationTitleStrings, notificationTypes } from 'studiocms:notifier';
5
5
  import { type SiteConfigCacheObject } from 'studiocms:sdk/types';
6
- import { Button, Card, Icon, Toggle } from 'studiocms:ui/components';
7
- import { Effect } from 'effect';
6
+ import { Button } from 'studiocms:ui/components/button';
7
+ import { Card } from 'studiocms:ui/components/card';
8
+ import { Icon } from 'studiocms:ui/components/icon';
9
+ import { Toggle } from 'studiocms:ui/components/toggle';
10
+ import { Effect } from '../../../effect.js';
8
11
 
9
12
  interface Props {
10
13
  currentUser: UserSessionData | null;
@@ -57,7 +60,7 @@ if (enableMailer) {
57
60
  size='sm'
58
61
  disabled={!isNotificationsEnabled}
59
62
  >
60
- <Icon slot="start-content" name="check" width={24} height={24} />
63
+ <Icon slot="start-content" name="heroicons:check" width={24} height={24} />
61
64
  Save
62
65
  </Button>
63
66
 
@@ -108,7 +111,7 @@ if (enableMailer) {
108
111
  </Card>
109
112
 
110
113
  <script>
111
- import { toast } from 'studiocms:ui/components';
114
+ import { toast } from 'studiocms:ui/components/toaster';
112
115
  import { getEnabledNotificationCheckboxes, formatNotificationOptions } from 'studiocms:notifier/client'
113
116
 
114
117
  const form = document.getElementById('notifications-form') as HTMLFormElement;
@@ -3,7 +3,10 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { useTranslations } from 'studiocms:i18n';
4
4
  import { runSDK, SDKCoreJs } from 'studiocms:sdk';
5
5
  import type { CombinedUserData } from 'studiocms:sdk/types';
6
- import { Button, Card, Center, Icon } from 'studiocms:ui/components';
6
+ import { Button } from 'studiocms:ui/components/button';
7
+ import { Card } from 'studiocms:ui/components/card';
8
+ import { Center } from 'studiocms:ui/components/center';
9
+ import { Icon } from 'studiocms:ui/components/icon';
7
10
  import { providerData } from './oAuthButtonProviders.js';
8
11
 
9
12
  interface Props {
@@ -73,7 +76,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
73
76
  <Fragment set:html={image} />
74
77
  <span>{label}</span>
75
78
  </div>
76
- <Icon name="minus-circle" width={24} height={24} />
79
+ <Icon name="heroicons:minus-circle" width={24} height={24} />
77
80
  </Button>
78
81
  ))
79
82
  }
@@ -105,7 +108,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
105
108
  <Fragment set:html={image} />
106
109
  <span>{label}</span>
107
110
  </div>
108
- <Icon name="plus-circle" width={24} height={24} />
111
+ <Icon name="heroicons:plus-circle" width={24} height={24} />
109
112
  </Button>
110
113
  ))
111
114
  }
@@ -161,7 +164,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
161
164
  }
162
165
 
163
166
  .social-signin-bg {
164
- background-color: hsl(var(--background-step-1));
167
+ background-color: var(--background-step-1);
165
168
  height: auto;
166
169
  }
167
170
 
@@ -170,7 +173,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
170
173
  align-items: stretch;
171
174
  justify-content: space-between !important;
172
175
  width: 100%;
173
- margin-button: 1rem;
176
+ margin-bottom: 1rem;
174
177
  }
175
178
 
176
179
  .icon-and-label {
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { useTranslations } from 'studiocms:i18n';
4
- import { Button, Card, Icon, Input } from 'studiocms:ui/components';
4
+ import { Button } from 'studiocms:ui/components/button';
5
+ import { Card } from 'studiocms:ui/components/card';
6
+ import { Icon } from 'studiocms:ui/components/icon';
7
+ import { Input } from 'studiocms:ui/components/input';
5
8
 
6
9
  interface Props {
7
10
  currentUser: UserSessionData | null;
@@ -28,7 +31,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
28
31
  disabled={userHasNoPassword}
29
32
  size='sm'
30
33
  >
31
- <Icon slot="start-content" name="check" width={24} height={24} />
34
+ <Icon slot="start-content" name="heroicons:check" width={24} height={24} />
32
35
  <t-profile-password key="user-password-save-button">
33
36
  {t('user-password-save-button')}
34
37
  </t-profile-password>
@@ -99,7 +102,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
99
102
  </script>
100
103
 
101
104
  <script>
102
- import { toast } from "studiocms:ui/components";
105
+ import { toast } from "studiocms:ui/components/toaster";
103
106
  const passwordUpdateForm = document.getElementById('password-update-form') as HTMLFormElement;
104
107
 
105
108
  passwordUpdateForm.addEventListener('submit', async (e) => {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import type { UserSessionData } from 'studiocms:auth/lib/types';
3
3
  import { getLabelForPermissionLevel } from 'studiocms:auth/utils/getLabelForPermissionLevel';
4
- import { User } from 'studiocms:ui/components';
4
+ import User from '../../shared/SSRUser.astro';
5
5
 
6
6
  interface Props {
7
7
  currentUser: UserSessionData | null;
@@ -17,7 +17,6 @@ type UserProps = PropsOf<typeof User>;
17
17
  const userProps: UserProps = {
18
18
  name: currentUser?.user?.name || 'Visitor',
19
19
  description: getLabelForPermissionLevel(currentUser?.permissionLevel || 'Visitor'),
20
- loading: 'eager',
21
20
  };
22
21
 
23
22
  if (currentUser?.user?.avatar) {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  import type { VersionCacheObject } from 'studiocms:sdk/types';
3
- import { Button } from 'studiocms:ui/components';
3
+ import { Button } from 'studiocms:ui/components/button';
4
4
  import currentVersion from 'studiocms:version';
5
5
  import { compare } from 'semver';
6
6
 
@@ -22,7 +22,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
22
22
  </Button>
23
23
 
24
24
  <script>
25
- import { ModalHelper } from 'studiocms:ui/components';
25
+ import { ModalHelper } from 'studiocms:ui/components/modal';
26
26
  import { dateTimeListener } from '../component-scripts/dateTimeListener.js';
27
27
  import { dateWithTimeAndZone } from '../component-scripts/dateWithTimeAndZone.js';
28
28
  import { timeAgo } from '../component-scripts/timeAgo.js';
@@ -76,14 +76,14 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
76
76
  align-items: center;
77
77
  align-content: center;
78
78
  vertical-align: middle;
79
- color: hsl(var(--text-muted));
79
+ color: var(--text-muted);
80
80
  font-weight: 700;
81
81
  flex-wrap: wrap;
82
82
  justify-content: center;
83
83
  }
84
84
 
85
85
  .version-check:hover {
86
- color: hsl(var(--primary-base));
86
+ color: var(--primary-base);
87
87
  cursor: pointer;
88
88
  }
89
89
 
@@ -92,7 +92,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
92
92
  width: 14px;
93
93
  height: 14px;
94
94
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775a5.25 5.25 0 0 1 10.233-2.33a3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5z'/%3E%3C/svg%3E");
95
- background-color: hsl(var(--warning-base));
95
+ background-color: var(--warning-base);
96
96
  -webkit-mask-image: var(--svg);
97
97
  mask-image: var(--svg);
98
98
  -webkit-mask-repeat: no-repeat;
@@ -106,7 +106,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
106
106
  width: 14px;
107
107
  height: 14px;
108
108
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4.5 12.75l6 6l9-13.5'/%3E%3C/svg%3E");
109
- background-color: hsl(var(--success-base));
109
+ background-color: var(--success-base);
110
110
  -webkit-mask-image: var(--svg);
111
111
  mask-image: var(--svg);
112
112
  -webkit-mask-repeat: no-repeat;
@@ -120,7 +120,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
120
120
  width: 14px;
121
121
  height: 14px;
122
122
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104q-.376.034-.75.082m.75-.082a24.3 24.3 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104q.377.034.75.082M19.8 15.3l-1.57.393A9.07 9.07 0 0 1 12 15a9.07 9.07 0 0 0-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.3 48.3 0 0 1 12 21a48 48 0 0 1-8.135-.687c-1.718-.293-2.3-2.379-1.067-3.61L5 14.5'/%3E%3C/svg%3E");
123
- background-color: hsl(var(--primary-base));
123
+ background-color: var(--primary-base);
124
124
  -webkit-mask-image: var(--svg);
125
125
  mask-image: var(--svg);
126
126
  -webkit-mask-repeat: no-repeat;
@@ -1,4 +1,6 @@
1
1
  ---
2
+ import css from '@studiocms/ui/css/prose.css?raw';
3
+
2
4
  interface Props {
3
5
  link: string;
4
6
  changelog: string;
@@ -7,7 +9,7 @@ interface Props {
7
9
  const { link, changelog } = Astro.props;
8
10
  ---
9
11
 
10
- <frame-button data-link={link} data-changelog={changelog}>
12
+ <frame-button data-link={link} data-changelog={changelog} data-styles={css}>
11
13
  <slot />
12
14
  </frame-button>
13
15
 
@@ -15,6 +17,8 @@ const { link, changelog } = Astro.props;
15
17
  if (!customElements.get('frame-button')) {
16
18
 
17
19
  class FrameButton extends HTMLElement {
20
+ _onKeydown: (e: KeyboardEvent) => void;
21
+
18
22
  constructor() {
19
23
  super();
20
24
  // Get the slot element
@@ -22,9 +26,11 @@ const { link, changelog } = Astro.props;
22
26
 
23
27
  const frameContainer = document.createElement('div');
24
28
  frameContainer.style.position = 'absolute';
29
+ frameContainer.setAttribute('role', 'dialog');
30
+ frameContainer.setAttribute('aria-modal', 'true');
25
31
  frameContainer.style.width = '100%';
26
32
  frameContainer.style.height = '100%';
27
- frameContainer.style.backgroundColor = 'hsl(var(--background-step-1))';
33
+ frameContainer.style.backgroundColor = 'var(--background-step-1)';
28
34
  frameContainer.style.display = 'none';
29
35
  frameContainer.style.justifyContent = 'center';
30
36
  frameContainer.style.alignItems = 'center';
@@ -50,19 +56,20 @@ const { link, changelog } = Astro.props;
50
56
  frameButton.style.justifyContent = 'center';
51
57
  frameButton.style.alignItems = 'center';
52
58
  frameButton.style.transition = 'background-color 0.15s ease-in-out';
59
+ frameButton.setAttribute('aria-label', 'Close full changelog');
53
60
 
54
61
  const frameContent = document.createElement('div');
55
62
  frameContent.style.padding = '1.5rem';
56
63
  frameContent.style.width = '100%';
57
64
  frameContent.style.height = '90%';
58
- frameContent.style.overflowX = 'none';
65
+ frameContent.style.overflowX = 'hidden';
59
66
  frameContent.style.overflowWrap = 'break-word';
60
67
  frameContent.style.overflowY = 'auto';
61
68
  frameContent.style.scrollbarWidth = 'thin';
62
- frameContent.style.scrollbarColor = 'hsl(var(--default-active)) hsl(var(--background-step-1))';
69
+ frameContent.style.scrollbarColor = 'var(--default-active) var(--background-step-1)';
63
70
 
64
71
  frameButton.addEventListener('mouseenter', () => {
65
- frameButton.style.backgroundColor = 'hsl(var(--default-base))';
72
+ frameButton.style.backgroundColor = 'var(--default-base)';
66
73
  });
67
74
 
68
75
  frameButton.addEventListener('mouseleave', () => {
@@ -83,16 +90,24 @@ const { link, changelog } = Astro.props;
83
90
  },
84
91
  body: JSON.stringify({ currentURLOrigin: window.location.origin }),
85
92
  })).json();
93
+ const styles = this.getAttribute('data-styles')!;
86
94
 
87
95
  frameContent.innerHTML = `
88
96
  <h1>Full Changelog</h1>
89
97
  <a href="${changelogLink}" target="_blank">See on GitHub ⤴</a>
90
- ${changelog}
98
+ <style>${styles}</style>
99
+ <div class="prose">${changelog}</div>
91
100
  `;
92
101
 
93
102
  frameContainer.style.display = 'flex';
94
103
  });
95
104
 
105
+ this._onKeydown = (e: KeyboardEvent) => {
106
+ if (e.key === 'Escape' && frameContainer.style.display === 'flex') {
107
+ frameContainer.style.display = 'none';
108
+ }
109
+ };
110
+
96
111
  frameContainer.appendChild(frameButton);
97
112
  frameContainer.appendChild(frameContent);
98
113
 
@@ -100,6 +115,13 @@ const { link, changelog } = Astro.props;
100
115
  shadow.appendChild(frameContainer);
101
116
  shadow.appendChild(slot);
102
117
  }
118
+
119
+ connectedCallback() {
120
+ document.addEventListener('keydown', this._onKeydown);
121
+ }
122
+ disconnectedCallback() {
123
+ document.removeEventListener('keydown', this._onKeydown);
124
+ }
103
125
  }
104
126
 
105
127
  customElements.define('frame-button', FrameButton);
@@ -1,5 +1,10 @@
1
1
  ---
2
- import { Button, Center, Icon, Input, Modal, Select } from 'studiocms:ui/components';
2
+ import { Button } from 'studiocms:ui/components/button';
3
+ import { Center } from 'studiocms:ui/components/center';
4
+ import { Icon } from 'studiocms:ui/components/icon';
5
+ import { Input } from 'studiocms:ui/components/input';
6
+ import { Modal } from 'studiocms:ui/components/modal';
7
+ import { Select } from 'studiocms:ui/components/select';
3
8
  ---
4
9
  <Modal
5
10
  id='create-new-user-modal'
@@ -51,7 +56,7 @@ import { Button, Center, Icon, Input, Modal, Select } from 'studiocms:ui/compone
51
56
  <div class="link-container">
52
57
  <code id="invite-response-placeholder"></code>
53
58
  <Button color="primary" size="sm" class="copy-btn">
54
- <Icon name="document-duplicate-20-solid" width={20} height={20} />
59
+ <Icon name="heroicons:document-duplicate-20-solid" width={20} height={20} />
55
60
  </Button>
56
61
  </div>
57
62
  </div>
@@ -70,7 +75,7 @@ import { Button, Center, Icon, Input, Modal, Select } from 'studiocms:ui/compone
70
75
  }
71
76
 
72
77
  code {
73
- background-color: hsl(var(--background-step-3));
78
+ background-color: var(--background-step-3);
74
79
  padding: .25rem;
75
80
  border-radius: 4px;
76
81
  }
@@ -1,7 +1,8 @@
1
1
  ---
2
+ import 'studiocms:ui/prose';
2
3
  import changelog from 'studiocms:changelog';
3
4
  import type { VersionCacheObject } from 'studiocms:sdk/types';
4
- import { Modal } from 'studiocms:ui/components';
5
+ import { Modal } from 'studiocms:ui/components/modal';
5
6
  import currentVersion from 'studiocms:version';
6
7
  import { studioCMSSocials } from '../../../consts.js';
7
8
  import { parseMarkdown } from '../../../utils/tinyMDParser.js';
@@ -53,7 +54,7 @@ const lastChecked = new Date(latestVersion.lastCacheUpdate);
53
54
  </div>
54
55
 
55
56
  <div class="version-modal-release-notes">
56
- <div><Fragment set:html={parseMarkdown(changelog)} /></div>
57
+ <div class="prose"><Fragment set:html={parseMarkdown(changelog)} /></div>
57
58
  <span class="release-notes-read-more">
58
59
  <VersionCheckChangelog changelog={studioCMSSocials.changelog} link={Astro.locals.StudioCMS.routeMap.sdk.changelog}><span class="read-more-text">Full Changelog</span></VersionCheckChangelog>
59
60
  </span>
@@ -116,25 +117,25 @@ to allow for more information on a slightly bigger modal.
116
117
  font-size: 1rem;
117
118
 
118
119
  .read-more-text {
119
- color: hsl(var(--text-muted));
120
+ color: var(--text-muted);
120
121
  text-align: end;
121
122
  font-weight: 400;
122
123
  cursor: pointer;
123
124
  }
124
125
 
125
126
  .read-more-text:hover {
126
- color: hsl(var(--primary-base));
127
+ color: var(--primary-base);
127
128
  text-decoration: underline;
128
129
  }
129
130
 
130
131
  a {
131
- color: hsl(var(--text-muted));
132
+ color: var(--text-muted);
132
133
  text-decoration: none;
133
134
  font-weight: 700;
134
135
  }
135
136
 
136
137
  a:hover {
137
- color: hsl(var(--primary-base));
138
+ color: var(--primary-base);
138
139
  }
139
140
  }
140
141
 
@@ -150,7 +151,7 @@ to allow for more information on a slightly bigger modal.
150
151
 
151
152
  .version-modal-row-title {
152
153
  font-weight: 500;
153
- color: hsl(var(--text-muted));
154
+ color: var(--text-muted);
154
155
  }
155
156
 
156
157
  .version-modal-col-value {
@@ -169,7 +170,7 @@ to allow for more information on a slightly bigger modal.
169
170
  }
170
171
 
171
172
  .version-modal-release-notes {
172
- border: 1px solid hsl(var(--border));
173
+ border: 1px solid var(--border);
173
174
  border-radius: 0.5rem;
174
175
  padding: 1rem;
175
176
  overflow: auto;
@@ -182,7 +183,7 @@ to allow for more information on a slightly bigger modal.
182
183
  }
183
184
 
184
185
  .latest-update-check {
185
- color: hsl(var(--text-muted));
186
+ color: var(--text-muted);
186
187
  font-size: .7em;
187
188
  font-weight: 700;
188
189
  text-align: center;
@@ -198,11 +199,11 @@ to allow for more information on a slightly bigger modal.
198
199
 
199
200
  a:-webkit-any-link:hover {
200
201
  text-decoration: underline;
201
- color: hsl(var(--primary-base));
202
+ color: var(--primary-base);
202
203
  }
203
204
 
204
205
  a:-webkit-any-link {
205
- color: hsl(var(--text-muted));
206
+ color: var(--text-muted);
206
207
  text-decoration: none;
207
208
  }
208
209
 
@@ -217,7 +218,7 @@ to allow for more information on a slightly bigger modal.
217
218
  .reload-button {
218
219
  display: flex;
219
220
  padding: 0.125rem;
220
- border: 2px solid hsl(var(--border));
221
+ border: 2px solid var(--border);
221
222
  border-radius: 0.5rem;
222
223
  width: 1.5rem;
223
224
  height: 1.5rem;
@@ -228,10 +229,10 @@ to allow for more information on a slightly bigger modal.
228
229
  transition: all 0.15s ease;
229
230
  margin-left: 0.25rem;
230
231
  &:hover {
231
- background-color: hsl(var(--border));
232
+ background-color: var(--border);
232
233
 
233
234
  .reload {
234
- background-color: hsl(var(--primary-base));
235
+ background-color: var(--primary-base);
235
236
  }
236
237
  }
237
238
  }
@@ -241,7 +242,7 @@ to allow for more information on a slightly bigger modal.
241
242
  width: 16px;
242
243
  height: 16px;
243
244
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99'/%3E%3C/svg%3E");
244
- background-color: hsl(var(--text-muted));
245
+ background-color: var(--text-muted);
245
246
  -webkit-mask-image: var(--svg);
246
247
  mask-image: var(--svg);
247
248
  -webkit-mask-repeat: no-repeat;
@@ -1,12 +1,12 @@
1
1
  import type { UiLanguageKeys } from 'studiocms:i18n';
2
- import type { HeroIconName } from '@studiocms/ui/components/Icon/iconType.js';
2
+ import type { AvailableIcons } from 'studiocms:ui/icons';
3
3
  /**
4
4
  * Represents a link in the sidebar of the dashboard.
5
5
  */
6
6
  interface SidebarLink {
7
7
  title?: string;
8
8
  key?: string;
9
- icon: HeroIconName;
9
+ icon: AvailableIcons;
10
10
  href: string;
11
11
  }
12
12
  /**
@@ -7,7 +7,7 @@ function filterAndProcessPages(pages, admin, permission, lang) {
7
7
  const filteredPages = [];
8
8
  for (const { title: t, icon: ico, slug, requiredPermissions } of pages) {
9
9
  const href = makeDashboardRoute(slug);
10
- const icon = ico || "cube-transparent";
10
+ const icon = ico || "heroicons:cube-transparent";
11
11
  const title = t[lang] || t[defaultLang];
12
12
  if (admin) {
13
13
  if (requiredPermissions === void 0) {
@@ -47,7 +47,7 @@ function getSidebarLinks(lang) {
47
47
  const baseLinks = [
48
48
  {
49
49
  key: "dashboard-link-label",
50
- icon: "home",
50
+ icon: "heroicons:home",
51
51
  href: StudioCMSRoutes.mainLinks.dashboardIndex
52
52
  },
53
53
  ...filterAndProcessPages(userPages, false, ["none", "visitor"], lang)
@@ -55,7 +55,7 @@ function getSidebarLinks(lang) {
55
55
  const editorLinks = [
56
56
  {
57
57
  key: "content-management-label",
58
- icon: "pencil-square",
58
+ icon: "heroicons:pencil-square",
59
59
  href: StudioCMSRoutes.mainLinks.contentManagement
60
60
  },
61
61
  ...filterAndProcessPages(userPages, false, ["editor"], lang)
@@ -63,7 +63,7 @@ function getSidebarLinks(lang) {
63
63
  const adminLinks = [
64
64
  {
65
65
  key: "user-management-label",
66
- icon: "user-group",
66
+ icon: "heroicons:user-group",
67
67
  href: StudioCMSRoutes.mainLinks.userManagement
68
68
  },
69
69
  ...filterAndProcessPages(adminPages, true, ["admin"], lang)
@@ -71,12 +71,12 @@ function getSidebarLinks(lang) {
71
71
  const ownerLinks = [
72
72
  {
73
73
  key: "site-configuration-label",
74
- icon: "cog-6-tooth",
74
+ icon: "heroicons:cog-6-tooth",
75
75
  href: StudioCMSRoutes.mainLinks.siteConfiguration
76
76
  },
77
77
  {
78
78
  key: "mailer-configuration-label",
79
- icon: "inbox",
79
+ icon: "heroicons:inbox",
80
80
  href: StudioCMSRoutes.mainLinks.smtpConfiguration
81
81
  },
82
82
  ...filterAndProcessPages(adminPages, true, ["owner"], lang)
@@ -1,7 +1,12 @@
1
1
  ---
2
2
  import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
3
3
  import { runSDK, SDKCoreJs } from 'studiocms:sdk';
4
- import { Button, Divider, Dropdown, Icon, Input } from 'studiocms:ui/components';
4
+ import { Button } from 'studiocms:ui/components/button';
5
+ import { Divider } from 'studiocms:ui/components/divider';
6
+ import { Dropdown } from 'studiocms:ui/components/dropdown';
7
+ import { Icon } from 'studiocms:ui/components/icon';
8
+ import { Input } from 'studiocms:ui/components/input';
9
+ import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
5
10
  import UserListItem from './UserListItem.astro';
6
11
 
7
12
  interface Props {
@@ -21,7 +26,7 @@ const safeUsers: {
21
26
  permissionsData:
22
27
  | {
23
28
  user: string;
24
- rank: string;
29
+ rank: AvailablePermissionRanks;
25
30
  }
26
31
  | undefined;
27
32
  }[] = Users.map(({ avatar, email, id, name, username, permissionsData }) => {
@@ -32,7 +37,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
32
37
  ---
33
38
  <div class="inner-user-sidebar-header">
34
39
  <Button variant="solid" color="primary" size='md' id="back-to-outer" class="mobile-btn mid-size-btn">
35
- <Icon name="arrow-left" width={24} height={24} slot="start-content" />
40
+ <Icon name="heroicons:arrow-left" width={24} height={24} slot="start-content" />
36
41
  </Button>
37
42
  <form id="search-form">
38
43
  <Input name='search' placeholder={t('input-placeholder-search')} type='search' required />
@@ -40,18 +45,18 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
40
45
  <Dropdown
41
46
  id='create-user-dropdown'
42
47
  options={[
43
- { label: t('dropdown-create-user'), icon: 'user-plus', value: 'new-user' },
44
- { label: t('dropdown-create-invite'), icon: 'inbox-arrow-down', value: 'new-invite' },
48
+ { label: t('dropdown-create-user'), icon: 'heroicons:user-plus', value: 'new-user' },
49
+ { label: t('dropdown-create-invite'), icon: 'heroicons:inbox-arrow-down', value: 'new-invite' },
45
50
  ]}
46
51
  align={'end'}
47
52
  offset={8}
48
53
  >
49
54
  <Button variant="solid" color="primary" size='md' class="add-button">
50
- <Icon name="plus" width={24} height={24} />
55
+ <Icon name="heroicons:plus" width={24} height={24} />
51
56
  </Button>
52
57
  </Dropdown>
53
58
  <Button variant="solid" color="primary" size='md' class="mobile-btn" id="show-page">
54
- <Icon name="x-mark" width={24} height={24} slot="start-content" />
59
+ <Icon name="heroicons:x-mark" width={24} height={24} slot="start-content" />
55
60
  </Button>
56
61
  </div>
57
62
 
@@ -130,8 +135,10 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
130
135
  </script>
131
136
 
132
137
  <script>
133
- import { DropdownHelper, ModalHelper, toast } from 'studiocms:ui/components';
134
-
138
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown';
139
+ import { ModalHelper } from 'studiocms:ui/components/modal';
140
+ import { toast } from 'studiocms:ui/components/toaster';
141
+
135
142
  const createNewDropdown = new DropdownHelper('create-user-dropdown');
136
143
  const createNewUserModal = new ModalHelper('create-new-user-modal');
137
144
  const createUserInviteModal = new ModalHelper('create-user-invite-modal');
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  import { User } from 'studiocms:auth/lib';
3
- import { Effect } from 'effect';
3
+ import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
4
+ import { Effect } from '../../../effect.js';
4
5
 
5
6
  interface Props {
6
- requiredPermission?: string;
7
+ requiredPermission?: AvailablePermissionRanks;
7
8
  }
8
9
 
9
- const { requiredPermission } = Astro.props;
10
+ const { requiredPermission = 'unknown' } = Astro.props;
10
11
 
11
12
  const { userSessionData: user } = Astro.locals.StudioCMS?.security ?? {
12
13
  userSessionData: null,
@@ -15,11 +16,8 @@ const { userSessionData: user } = Astro.locals.StudioCMS?.security ?? {
15
16
  const isAuthorized = await Effect.runPromise(
16
17
  Effect.gen(function* () {
17
18
  const { isUserAllowed } = yield* User;
18
- return yield* isUserAllowed(
19
- user,
20
- (requiredPermission as 'owner' | 'admin' | 'editor' | 'visitor' | 'unknown') ?? 'unknown'
21
- );
22
- }).pipe(User.Provide)
19
+ return yield* isUserAllowed(user, requiredPermission);
20
+ })
23
21
  );
24
22
 
25
23
  if (!isAuthorized) {