@alepha/ui 0.26.0 → 0.27.0

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 (684) hide show
  1. package/README.md +86 -12
  2. package/dist/components/account/account-connections.js +5 -5
  3. package/dist/components/account/account-connections.js.map +1 -1
  4. package/dist/components/account/account-delete-dialog.js +4 -4
  5. package/dist/components/account/account-header.d.ts.map +1 -1
  6. package/dist/components/account/account-header.js +3 -1
  7. package/dist/components/account/account-header.js.map +1 -1
  8. package/dist/components/account/account-keys.js +7 -7
  9. package/dist/components/account/account-keys.js.map +1 -1
  10. package/dist/components/account/account-layout.d.ts.map +1 -1
  11. package/dist/components/account/account-layout.js +7 -4
  12. package/dist/components/account/account-layout.js.map +1 -1
  13. package/dist/components/account/account-password-dialog.js +3 -3
  14. package/dist/components/account/account-profile.js +8 -8
  15. package/dist/components/account/account-profile.js.map +1 -1
  16. package/dist/components/account/account-router-options.d.ts.map +1 -1
  17. package/dist/components/account/account-router-options.js.map +1 -1
  18. package/dist/components/account/account-router-page.d.ts.map +1 -1
  19. package/dist/components/account/account-router-page.js.map +1 -1
  20. package/dist/components/account/account-router.d.ts +3 -2
  21. package/dist/components/account/account-router.d.ts.map +1 -1
  22. package/dist/components/account/account-router.js +4 -3
  23. package/dist/components/account/account-router.js.map +1 -1
  24. package/dist/components/account/account-security.d.ts.map +1 -1
  25. package/dist/components/account/account-security.js +6 -6
  26. package/dist/components/account/account-security.js.map +1 -1
  27. package/dist/components/account/account-sessions.d.ts.map +1 -1
  28. package/dist/components/account/account-sessions.js +19 -6
  29. package/dist/components/account/account-sessions.js.map +1 -1
  30. package/dist/components/admin/admin-analytics-query-panel.d.ts +1 -1
  31. package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -1
  32. package/dist/components/admin/admin-analytics-query-panel.js +5 -5
  33. package/dist/components/admin/admin-analytics-query-panel.js.map +1 -1
  34. package/dist/components/admin/admin-analytics-results.d.ts +1 -1
  35. package/dist/components/admin/admin-analytics-results.d.ts.map +1 -1
  36. package/dist/components/admin/admin-analytics-results.js +2 -2
  37. package/dist/components/admin/admin-analytics-results.js.map +1 -1
  38. package/dist/components/admin/admin-analytics.d.ts +1 -1
  39. package/dist/components/admin/admin-analytics.d.ts.map +1 -1
  40. package/dist/components/admin/admin-analytics.js +3 -3
  41. package/dist/components/admin/admin-analytics.js.map +1 -1
  42. package/dist/components/admin/admin-audits.d.ts +1 -1
  43. package/dist/components/admin/admin-audits.d.ts.map +1 -1
  44. package/dist/components/admin/admin-audits.js +4 -4
  45. package/dist/components/admin/admin-audits.js.map +1 -1
  46. package/dist/components/admin/admin-dashboard-card.d.ts +42 -0
  47. package/dist/components/admin/admin-dashboard-card.d.ts.map +1 -0
  48. package/dist/components/admin/admin-dashboard-card.js +0 -0
  49. package/dist/components/admin/admin-dashboard-count-card.d.ts +34 -0
  50. package/dist/components/admin/admin-dashboard-count-card.d.ts.map +1 -0
  51. package/dist/components/admin/admin-dashboard-count-card.js +42 -0
  52. package/dist/components/admin/admin-dashboard-count-card.js.map +1 -0
  53. package/dist/components/admin/admin-dashboard.d.ts +20 -0
  54. package/dist/components/admin/admin-dashboard.d.ts.map +1 -0
  55. package/dist/components/admin/admin-dashboard.js +32 -0
  56. package/dist/components/admin/admin-dashboard.js.map +1 -0
  57. package/dist/components/admin/admin-files.d.ts +1 -1
  58. package/dist/components/admin/admin-files.d.ts.map +1 -1
  59. package/dist/components/admin/admin-files.js +3 -3
  60. package/dist/components/admin/admin-files.js.map +1 -1
  61. package/dist/components/admin/admin-jobs-executions-panel.d.ts +2 -2
  62. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  63. package/dist/components/admin/admin-jobs-executions-panel.js +16 -31
  64. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  65. package/dist/components/admin/admin-jobs-status-badge.d.ts +2 -2
  66. package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
  67. package/dist/components/admin/admin-jobs-status-badge.js +2 -2
  68. package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
  69. package/dist/components/admin/admin-jobs.d.ts +1 -1
  70. package/dist/components/admin/admin-jobs.d.ts.map +1 -1
  71. package/dist/components/admin/admin-jobs.js +5 -5
  72. package/dist/components/admin/admin-jobs.js.map +1 -1
  73. package/dist/components/admin/admin-keys-token-dialog.js +3 -3
  74. package/dist/components/admin/admin-keys-token-dialog.js.map +1 -1
  75. package/dist/components/admin/admin-keys.d.ts +1 -1
  76. package/dist/components/admin/admin-keys.d.ts.map +1 -1
  77. package/dist/components/admin/admin-keys.js +4 -4
  78. package/dist/components/admin/admin-keys.js.map +1 -1
  79. package/dist/components/admin/admin-layout.d.ts.map +1 -1
  80. package/dist/components/admin/admin-layout.js +1 -3
  81. package/dist/components/admin/admin-layout.js.map +1 -1
  82. package/dist/components/admin/admin-notifications.d.ts +1 -1
  83. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  84. package/dist/components/admin/admin-notifications.js +3 -3
  85. package/dist/components/admin/admin-notifications.js.map +1 -1
  86. package/dist/components/admin/admin-parameters.d.ts +1 -1
  87. package/dist/components/admin/admin-parameters.d.ts.map +1 -1
  88. package/dist/components/admin/admin-parameters.js +10 -10
  89. package/dist/components/admin/admin-parameters.js.map +1 -1
  90. package/dist/components/admin/admin-payments.d.ts +1 -1
  91. package/dist/components/admin/admin-payments.d.ts.map +1 -1
  92. package/dist/components/admin/admin-payments.js +3 -3
  93. package/dist/components/admin/admin-payments.js.map +1 -1
  94. package/dist/components/admin/admin-router-options.d.ts +13 -10
  95. package/dist/components/admin/admin-router-options.d.ts.map +1 -1
  96. package/dist/components/admin/admin-router-options.js.map +1 -1
  97. package/dist/components/admin/admin-router-page.d.ts +7 -5
  98. package/dist/components/admin/admin-router-page.d.ts.map +1 -1
  99. package/dist/components/admin/admin-router-page.js +7 -5
  100. package/dist/components/admin/admin-router-page.js.map +1 -1
  101. package/dist/components/admin/admin-router.d.ts +72 -27
  102. package/dist/components/admin/admin-router.d.ts.map +1 -1
  103. package/dist/components/admin/admin-router.js +103 -40
  104. package/dist/components/admin/admin-router.js.map +1 -1
  105. package/dist/components/admin/admin-sessions.d.ts +1 -1
  106. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  107. package/dist/components/admin/admin-sessions.js +12 -4
  108. package/dist/components/admin/admin-sessions.js.map +1 -1
  109. package/dist/components/admin/admin-user-detail-audits-tab.d.ts +2 -2
  110. package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
  111. package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
  112. package/dist/components/admin/admin-user-detail-identity-aside.d.ts +4 -3
  113. package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -1
  114. package/dist/components/admin/admin-user-detail-identity-aside.js +13 -69
  115. package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -1
  116. package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -1
  117. package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -1
  118. package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -1
  119. package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -1
  120. package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -1
  121. package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -1
  122. package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
  123. package/dist/components/admin/admin-user-detail-security-tab.js +2 -2
  124. package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
  125. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +2 -2
  126. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  127. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  128. package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
  129. package/dist/components/admin/admin-user-detail.js +68 -111
  130. package/dist/components/admin/admin-user-detail.js.map +1 -1
  131. package/dist/components/admin/admin-users-roles-picker.d.ts +6 -1
  132. package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
  133. package/dist/components/admin/admin-users-roles-picker.js +11 -8
  134. package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
  135. package/dist/components/admin/admin-users.d.ts.map +1 -1
  136. package/dist/components/admin/admin-users.js +9 -12
  137. package/dist/components/admin/admin-users.js.map +1 -1
  138. package/dist/components/admin/admin-workflows-execution-sheet.d.ts +2 -2
  139. package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -1
  140. package/dist/components/admin/admin-workflows-execution-sheet.js +10 -10
  141. package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -1
  142. package/dist/components/admin/admin-workflows-executions-panel.d.ts +2 -2
  143. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
  144. package/dist/components/admin/admin-workflows-executions-panel.js +20 -44
  145. package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
  146. package/dist/components/admin/admin-workflows-status-badge.d.ts +2 -2
  147. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
  148. package/dist/components/admin/admin-workflows-status-badge.js +2 -2
  149. package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
  150. package/dist/components/admin/admin-workflows.d.ts +1 -1
  151. package/dist/components/admin/admin-workflows.d.ts.map +1 -1
  152. package/dist/components/admin/admin-workflows.js +5 -5
  153. package/dist/components/admin/admin-workflows.js.map +1 -1
  154. package/dist/components/admin/diff-lines.js +1 -1
  155. package/dist/components/admin/diff-lines.js.map +1 -1
  156. package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -1
  157. package/dist/components/admin/parameter-diff-dialog.js +1 -1
  158. package/dist/components/admin/parameter-diff-dialog.js.map +1 -1
  159. package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
  160. package/dist/components/admin/parameter-history-item.js +4 -4
  161. package/dist/components/admin/parameter-history-item.js.map +1 -1
  162. package/dist/components/admin/parameter-json-dialog.js +1 -1
  163. package/dist/components/admin/parameter-save-dialog.js +2 -2
  164. package/dist/components/admin/use-confirmed-action.js +1 -1
  165. package/dist/components/alepha-table/alepha-table.d.ts +103 -8
  166. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  167. package/dist/components/alepha-table/alepha-table.js +128 -26
  168. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  169. package/dist/components/alepha-table/paginate-local.d.ts +43 -0
  170. package/dist/components/alepha-table/paginate-local.d.ts.map +1 -0
  171. package/dist/components/alepha-table/paginate-local.js +84 -0
  172. package/dist/components/alepha-table/paginate-local.js.map +1 -0
  173. package/dist/components/app-actions/app-actions.js +1 -1
  174. package/dist/components/app-shell/app-shell.d.ts +10 -1
  175. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  176. package/dist/components/app-shell/app-shell.js +27 -20
  177. package/dist/components/app-shell/app-shell.js.map +1 -1
  178. package/dist/components/auth/auth-login.d.ts +1 -1
  179. package/dist/components/auth/auth-login.d.ts.map +1 -1
  180. package/dist/components/auth/auth-login.js +7 -18
  181. package/dist/components/auth/auth-login.js.map +1 -1
  182. package/dist/components/auth/auth-register.d.ts +1 -1
  183. package/dist/components/auth/auth-register.d.ts.map +1 -1
  184. package/dist/components/auth/auth-register.js +20 -21
  185. package/dist/components/auth/auth-register.js.map +1 -1
  186. package/dist/components/auth/auth-reset-password.d.ts +1 -1
  187. package/dist/components/auth/auth-reset-password.d.ts.map +1 -1
  188. package/dist/components/auth/auth-reset-password.js +16 -13
  189. package/dist/components/auth/auth-reset-password.js.map +1 -1
  190. package/dist/components/auth/auth-router.d.ts +3 -3
  191. package/dist/components/auth/auth-router.d.ts.map +1 -1
  192. package/dist/components/auth/auth-router.js +3 -3
  193. package/dist/components/auth/auth-router.js.map +1 -1
  194. package/dist/components/auth/auth-verify-email.d.ts +1 -1
  195. package/dist/components/auth/auth-verify-email.d.ts.map +1 -1
  196. package/dist/components/auth/auth-verify-email.js +8 -8
  197. package/dist/components/auth/auth-verify-email.js.map +1 -1
  198. package/dist/components/auth/safe-redirect.d.ts +9 -0
  199. package/dist/components/auth/safe-redirect.d.ts.map +1 -0
  200. package/dist/components/auth/safe-redirect.js +19 -0
  201. package/dist/components/auth/safe-redirect.js.map +1 -0
  202. package/dist/components/auto-form/auto-form.d.ts.map +1 -1
  203. package/dist/components/auto-form/auto-form.js +32 -32
  204. package/dist/components/auto-form/auto-form.js.map +1 -1
  205. package/dist/components/brand-icon/brand-icon.d.ts +1 -1
  206. package/dist/components/brand-icon/brand-icon.d.ts.map +1 -1
  207. package/dist/components/brand-icon/brand-icon.js +2 -2
  208. package/dist/components/brand-icon/brand-icon.js.map +1 -1
  209. package/dist/components/button-dark/button-dark.d.ts +1 -1
  210. package/dist/components/button-dark/button-dark.d.ts.map +1 -1
  211. package/dist/components/button-dark/button-dark.js +2 -2
  212. package/dist/components/button-dark/button-dark.js.map +1 -1
  213. package/dist/components/button-language/button-language.d.ts +1 -1
  214. package/dist/components/button-language/button-language.d.ts.map +1 -1
  215. package/dist/components/button-language/button-language.js +2 -2
  216. package/dist/components/button-language/button-language.js.map +1 -1
  217. package/dist/components/button-theme/button-theme.d.ts +1 -1
  218. package/dist/components/button-theme/button-theme.d.ts.map +1 -1
  219. package/dist/components/button-theme/button-theme.js +3 -3
  220. package/dist/components/button-theme/button-theme.js.map +1 -1
  221. package/dist/components/button-user/button-user.d.ts +2 -20
  222. package/dist/components/button-user/button-user.d.ts.map +1 -1
  223. package/dist/components/button-user/button-user.js +3 -3
  224. package/dist/components/button-user/button-user.js.map +1 -1
  225. package/dist/components/captcha/turnstile-widget.d.ts +2 -2
  226. package/dist/components/captcha/turnstile-widget.d.ts.map +1 -1
  227. package/dist/components/captcha/turnstile-widget.js +5 -4
  228. package/dist/components/captcha/turnstile-widget.js.map +1 -1
  229. package/dist/components/control/control.d.ts +1 -1
  230. package/dist/components/control/control.d.ts.map +1 -1
  231. package/dist/components/control/control.js +8 -11
  232. package/dist/components/control/control.js.map +1 -1
  233. package/dist/components/control-array/control-array.d.ts +1 -1
  234. package/dist/components/control-array/control-array.d.ts.map +1 -1
  235. package/dist/components/control-array/control-array.js +23 -16
  236. package/dist/components/control-array/control-array.js.map +1 -1
  237. package/dist/components/control-base/field-i18n.d.ts +5 -3
  238. package/dist/components/control-base/field-i18n.d.ts.map +1 -1
  239. package/dist/components/control-base/field-i18n.js +4 -2
  240. package/dist/components/control-base/field-i18n.js.map +1 -1
  241. package/dist/components/control-base/form-field.d.ts +7 -7
  242. package/dist/components/control-base/form-field.d.ts.map +1 -1
  243. package/dist/components/control-base/form-field.js +10 -10
  244. package/dist/components/control-base/form-field.js.map +1 -1
  245. package/dist/components/control-base/icon-hint.d.ts +1 -1
  246. package/dist/components/control-base/icon-hint.d.ts.map +1 -1
  247. package/dist/components/control-base/icon-hint.js.map +1 -1
  248. package/dist/components/control-date/control-date.d.ts +1 -1
  249. package/dist/components/control-date/control-date.d.ts.map +1 -1
  250. package/dist/components/control-date/control-date.js +23 -7
  251. package/dist/components/control-date/control-date.js.map +1 -1
  252. package/dist/components/control-number/control-number.d.ts +2 -2
  253. package/dist/components/control-number/control-number.d.ts.map +1 -1
  254. package/dist/components/control-number/control-number.js +3 -3
  255. package/dist/components/control-number/control-number.js.map +1 -1
  256. package/dist/components/control-object/control-object.d.ts +4 -2
  257. package/dist/components/control-object/control-object.d.ts.map +1 -1
  258. package/dist/components/control-object/control-object.js +8 -8
  259. package/dist/components/control-object/control-object.js.map +1 -1
  260. package/dist/components/control-password/control-password.js +2 -3
  261. package/dist/components/control-password/control-password.js.map +1 -1
  262. package/dist/components/control-select/control-select.d.ts +2 -2
  263. package/dist/components/control-select/control-select.d.ts.map +1 -1
  264. package/dist/components/control-select/control-select.js +17 -17
  265. package/dist/components/control-select/control-select.js.map +1 -1
  266. package/dist/components/control-upload/control-upload.d.ts +1 -1
  267. package/dist/components/control-upload/control-upload.d.ts.map +1 -1
  268. package/dist/components/control-upload/control-upload.js +11 -11
  269. package/dist/components/control-upload/control-upload.js.map +1 -1
  270. package/dist/components/detail/detail-aside.d.ts +58 -0
  271. package/dist/components/detail/detail-aside.d.ts.map +1 -0
  272. package/dist/components/detail/detail-aside.js +95 -0
  273. package/dist/components/detail/detail-aside.js.map +1 -0
  274. package/dist/components/detail/detail-layout.d.ts +90 -0
  275. package/dist/components/detail/detail-layout.d.ts.map +1 -0
  276. package/dist/components/detail/detail-layout.js +102 -0
  277. package/dist/components/detail/detail-layout.js.map +1 -0
  278. package/dist/components/detail/use-detail-tab.d.ts +15 -0
  279. package/dist/components/detail/use-detail-tab.d.ts.map +1 -0
  280. package/dist/components/detail/use-detail-tab.js +37 -0
  281. package/dist/components/detail/use-detail-tab.js.map +1 -0
  282. package/dist/components/file-image/file-image.d.ts.map +1 -1
  283. package/dist/components/file-image/file-image.js.map +1 -1
  284. package/dist/components/language-toggle/language-toggle.d.ts +1 -1
  285. package/dist/components/language-toggle/language-toggle.d.ts.map +1 -1
  286. package/dist/components/language-toggle/language-toggle.js +2 -2
  287. package/dist/components/language-toggle/language-toggle.js.map +1 -1
  288. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts +28 -0
  289. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts.map +1 -0
  290. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js +25 -0
  291. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js.map +1 -0
  292. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +44 -0
  293. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -0
  294. package/dist/components/markdown-view/diagram/FlowchartDiagram.js +98 -0
  295. package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -0
  296. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts +14 -0
  297. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts.map +1 -0
  298. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +45 -0
  299. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -0
  300. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts +19 -0
  301. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -0
  302. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +69 -0
  303. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -0
  304. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +23 -0
  305. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +1 -0
  306. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js +34 -0
  307. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +1 -0
  308. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts +17 -0
  309. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -0
  310. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +63 -0
  311. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -0
  312. package/dist/components/markdown-view/diagram/MermaidFence.d.ts +30 -0
  313. package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -0
  314. package/dist/components/markdown-view/diagram/MermaidFence.js +30 -0
  315. package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -0
  316. package/dist/components/markdown-view/diagram/flowchartParser.d.ts +18 -0
  317. package/dist/components/markdown-view/diagram/flowchartParser.d.ts.map +1 -0
  318. package/dist/components/markdown-view/diagram/flowchartParser.js +370 -0
  319. package/dist/components/markdown-view/diagram/flowchartParser.js.map +1 -0
  320. package/dist/components/markdown-view/diagram/graphModel.d.ts +67 -0
  321. package/dist/components/markdown-view/diagram/graphModel.d.ts.map +1 -0
  322. package/dist/components/markdown-view/diagram/graphModel.js +0 -0
  323. package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts +109 -0
  324. package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts.map +1 -0
  325. package/dist/components/markdown-view/diagram/layoutFlowchart.js +185 -0
  326. package/dist/components/markdown-view/diagram/layoutFlowchart.js.map +1 -0
  327. package/dist/components/markdown-view/diagram/textMetrics.d.ts +63 -0
  328. package/dist/components/markdown-view/diagram/textMetrics.d.ts.map +1 -0
  329. package/dist/components/markdown-view/diagram/textMetrics.js +228 -0
  330. package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -0
  331. package/dist/components/markdown-view/markdown-view.d.ts +32 -0
  332. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  333. package/dist/components/markdown-view/markdown-view.js +85 -9
  334. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  335. package/dist/components/nav-shell/nav-shell.d.ts +1 -1
  336. package/dist/components/nav-shell/nav-shell.d.ts.map +1 -1
  337. package/dist/components/nav-shell/nav-shell.js +1 -1
  338. package/dist/components/nav-shell/nav-shell.js.map +1 -1
  339. package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
  340. package/dist/components/nav-shell/spotlight.js.map +1 -1
  341. package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
  342. package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
  343. package/dist/components/nav-shell/use-nav-entries.d.ts +15 -5
  344. package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
  345. package/dist/components/nav-shell/use-nav-entries.js +1 -1
  346. package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
  347. package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
  348. package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
  349. package/dist/components/settings/settings-card-edge.d.ts +25 -0
  350. package/dist/components/settings/settings-card-edge.d.ts.map +1 -0
  351. package/dist/components/settings/settings-card-edge.js +29 -0
  352. package/dist/components/settings/settings-card-edge.js.map +1 -0
  353. package/dist/components/settings/settings-danger-section.d.ts.map +1 -1
  354. package/dist/components/settings/settings-danger-section.js +2 -1
  355. package/dist/components/settings/settings-danger-section.js.map +1 -1
  356. package/dist/components/settings/settings-layout.d.ts.map +1 -1
  357. package/dist/components/settings/settings-layout.js +1 -1
  358. package/dist/components/settings/settings-layout.js.map +1 -1
  359. package/dist/components/settings/settings-nav.d.ts.map +1 -1
  360. package/dist/components/settings/settings-nav.js +3 -3
  361. package/dist/components/settings/settings-nav.js.map +1 -1
  362. package/dist/components/settings/settings-row.js +2 -2
  363. package/dist/components/settings/settings-row.js.map +1 -1
  364. package/dist/components/settings/settings-section.d.ts.map +1 -1
  365. package/dist/components/settings/settings-section.js +3 -2
  366. package/dist/components/settings/settings-section.js.map +1 -1
  367. package/dist/components/ui/accordion.js +3 -3
  368. package/dist/components/ui/accordion.js.map +1 -1
  369. package/dist/components/ui/alert-dialog.js +5 -5
  370. package/dist/components/ui/alert-dialog.js.map +1 -1
  371. package/dist/components/ui/alert.js +2 -2
  372. package/dist/components/ui/alert.js.map +1 -1
  373. package/dist/components/ui/avatar.js +5 -5
  374. package/dist/components/ui/avatar.js.map +1 -1
  375. package/dist/components/ui/badge.d.ts +13 -2
  376. package/dist/components/ui/badge.d.ts.map +1 -1
  377. package/dist/components/ui/badge.js +51 -12
  378. package/dist/components/ui/badge.js.map +1 -1
  379. package/dist/components/ui/breadcrumb.js +3 -3
  380. package/dist/components/ui/breadcrumb.js.map +1 -1
  381. package/dist/components/ui/button-group.js +2 -2
  382. package/dist/components/ui/button-group.js.map +1 -1
  383. package/dist/components/ui/button.js +2 -2
  384. package/dist/components/ui/button.js.map +1 -1
  385. package/dist/components/ui/calendar.js +8 -8
  386. package/dist/components/ui/calendar.js.map +1 -1
  387. package/dist/components/ui/card.js +3 -3
  388. package/dist/components/ui/card.js.map +1 -1
  389. package/dist/components/ui/carousel.d.ts.map +1 -1
  390. package/dist/components/ui/carousel.js +20 -10
  391. package/dist/components/ui/carousel.js.map +1 -1
  392. package/dist/components/ui/chart.d.ts.map +1 -1
  393. package/dist/components/ui/chart.js +7 -6
  394. package/dist/components/ui/chart.js.map +1 -1
  395. package/dist/components/ui/checkbox.js +1 -1
  396. package/dist/components/ui/checkbox.js.map +1 -1
  397. package/dist/components/ui/combobox.d.ts.map +1 -1
  398. package/dist/components/ui/combobox.js +8 -8
  399. package/dist/components/ui/combobox.js.map +1 -1
  400. package/dist/components/ui/command.d.ts.map +1 -1
  401. package/dist/components/ui/command.js +6 -6
  402. package/dist/components/ui/command.js.map +1 -1
  403. package/dist/components/ui/context-menu.js +8 -8
  404. package/dist/components/ui/context-menu.js.map +1 -1
  405. package/dist/components/ui/dialog.js +4 -4
  406. package/dist/components/ui/dialog.js.map +1 -1
  407. package/dist/components/ui/drawer.js +4 -4
  408. package/dist/components/ui/drawer.js.map +1 -1
  409. package/dist/components/ui/dropdown-menu.js +9 -9
  410. package/dist/components/ui/dropdown-menu.js.map +1 -1
  411. package/dist/components/ui/empty.js +2 -2
  412. package/dist/components/ui/empty.js.map +1 -1
  413. package/dist/components/ui/hover-card.js +1 -1
  414. package/dist/components/ui/hover-card.js.map +1 -1
  415. package/dist/components/ui/input-group.d.ts.map +1 -1
  416. package/dist/components/ui/input-group.js +3 -3
  417. package/dist/components/ui/input-group.js.map +1 -1
  418. package/dist/components/ui/input-otp.js +3 -3
  419. package/dist/components/ui/input-otp.js.map +1 -1
  420. package/dist/components/ui/input.js +1 -1
  421. package/dist/components/ui/input.js.map +1 -1
  422. package/dist/components/ui/item.js +3 -3
  423. package/dist/components/ui/item.js.map +1 -1
  424. package/dist/components/ui/kbd.js +1 -1
  425. package/dist/components/ui/kbd.js.map +1 -1
  426. package/dist/components/ui/label.d.ts.map +1 -1
  427. package/dist/components/ui/label.js.map +1 -1
  428. package/dist/components/ui/menubar.js +9 -9
  429. package/dist/components/ui/menubar.js.map +1 -1
  430. package/dist/components/ui/navigation-menu.js +7 -7
  431. package/dist/components/ui/navigation-menu.js.map +1 -1
  432. package/dist/components/ui/pagination.d.ts.map +1 -1
  433. package/dist/components/ui/pagination.js.map +1 -1
  434. package/dist/components/ui/popover.js +1 -1
  435. package/dist/components/ui/popover.js.map +1 -1
  436. package/dist/components/ui/progress.js +3 -3
  437. package/dist/components/ui/progress.js.map +1 -1
  438. package/dist/components/ui/radio-group.js +2 -2
  439. package/dist/components/ui/radio-group.js.map +1 -1
  440. package/dist/components/ui/resizable.js +2 -2
  441. package/dist/components/ui/resizable.js.map +1 -1
  442. package/dist/components/ui/scroll-area.js +2 -2
  443. package/dist/components/ui/scroll-area.js.map +1 -1
  444. package/dist/components/ui/segmented.d.ts.map +1 -1
  445. package/dist/components/ui/segmented.js +1 -1
  446. package/dist/components/ui/segmented.js.map +1 -1
  447. package/dist/components/ui/select.js +8 -8
  448. package/dist/components/ui/select.js.map +1 -1
  449. package/dist/components/ui/separator.js +1 -1
  450. package/dist/components/ui/separator.js.map +1 -1
  451. package/dist/components/ui/sheet.js +3 -3
  452. package/dist/components/ui/sheet.js.map +1 -1
  453. package/dist/components/ui/sidebar.js +17 -17
  454. package/dist/components/ui/sidebar.js.map +1 -1
  455. package/dist/components/ui/skeleton.js +1 -1
  456. package/dist/components/ui/skeleton.js.map +1 -1
  457. package/dist/components/ui/slider.js +2 -2
  458. package/dist/components/ui/slider.js.map +1 -1
  459. package/dist/components/ui/sonner.js +1 -1
  460. package/dist/components/ui/switch.js +2 -2
  461. package/dist/components/ui/switch.js.map +1 -1
  462. package/dist/components/ui/table.d.ts.map +1 -1
  463. package/dist/components/ui/table.js +5 -5
  464. package/dist/components/ui/table.js.map +1 -1
  465. package/dist/components/ui/tabs.js +2 -2
  466. package/dist/components/ui/tabs.js.map +1 -1
  467. package/dist/components/ui/textarea.js +1 -1
  468. package/dist/components/ui/textarea.js.map +1 -1
  469. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  470. package/dist/components/ui/toggle-group.js +13 -7
  471. package/dist/components/ui/toggle-group.js.map +1 -1
  472. package/dist/components/ui/toggle.js +2 -2
  473. package/dist/components/ui/toggle.js.map +1 -1
  474. package/dist/components/ui/tooltip.d.ts +10 -0
  475. package/dist/components/ui/tooltip.d.ts.map +1 -1
  476. package/dist/components/ui/tooltip.js +13 -3
  477. package/dist/components/ui/tooltip.js.map +1 -1
  478. package/dist/components/use-dialog/use-dialog.d.ts +2 -2
  479. package/dist/components/use-dialog/use-dialog.d.ts.map +1 -1
  480. package/dist/components/use-dialog/use-dialog.js +10 -6
  481. package/dist/components/use-dialog/use-dialog.js.map +1 -1
  482. package/dist/components/use-toast/use-toast.d.ts +9 -3
  483. package/dist/components/use-toast/use-toast.d.ts.map +1 -1
  484. package/dist/components/use-toast/use-toast.js +23 -22
  485. package/dist/components/use-toast/use-toast.js.map +1 -1
  486. package/dist/hooks/use-mobile.d.ts +10 -0
  487. package/dist/hooks/use-mobile.d.ts.map +1 -1
  488. package/dist/hooks/use-mobile.js +19 -12
  489. package/dist/hooks/use-mobile.js.map +1 -1
  490. package/dist/lib/i18n-fr.d.ts +3 -3
  491. package/dist/lib/i18n-fr.d.ts.map +1 -1
  492. package/dist/lib/i18n-fr.js +13 -8
  493. package/dist/lib/i18n-fr.js.map +1 -1
  494. package/dist/styles.css +5 -5
  495. package/package.json +46 -45
  496. package/src/components/account/__tests__/account-router.spec.ts +4 -2
  497. package/src/components/account/account-connections.tsx +1 -1
  498. package/src/components/account/account-header.tsx +6 -1
  499. package/src/components/account/account-keys.tsx +1 -1
  500. package/src/components/account/account-layout.tsx +8 -1
  501. package/src/components/account/account-profile.tsx +3 -3
  502. package/src/components/account/account-router-options.tsx +1 -0
  503. package/src/components/account/account-router-page.tsx +1 -0
  504. package/src/components/account/account-router.tsx +4 -2
  505. package/src/components/account/account-security.tsx +1 -0
  506. package/src/components/account/account-sessions.tsx +21 -4
  507. package/src/components/admin/__tests__/admin-keys-token-dialog.browser.spec.tsx +1 -0
  508. package/src/components/admin/__tests__/admin-layout.browser.spec.tsx +2 -1
  509. package/src/components/admin/__tests__/admin-router-page.spec.ts +2 -1
  510. package/src/components/admin/__tests__/admin-router.spec.ts +57 -1
  511. package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +1 -0
  512. package/src/components/admin/__tests__/admin-user-detail.spec.ts +1 -0
  513. package/src/components/admin/admin-analytics-query-panel.tsx +4 -3
  514. package/src/components/admin/admin-analytics-results.tsx +2 -2
  515. package/src/components/admin/admin-analytics.tsx +3 -3
  516. package/src/components/admin/admin-audits.tsx +3 -3
  517. package/src/components/admin/admin-dashboard-card.tsx +45 -0
  518. package/src/components/admin/admin-dashboard-count-card.tsx +89 -0
  519. package/src/components/admin/admin-dashboard.tsx +60 -0
  520. package/src/components/admin/admin-files.tsx +2 -2
  521. package/src/components/admin/admin-jobs-executions-panel.tsx +19 -12
  522. package/src/components/admin/admin-jobs-status-badge.tsx +2 -2
  523. package/src/components/admin/admin-jobs.tsx +4 -4
  524. package/src/components/admin/admin-keys-token-dialog.tsx +2 -2
  525. package/src/components/admin/admin-keys.tsx +2 -2
  526. package/src/components/admin/admin-layout.tsx +1 -2
  527. package/src/components/admin/admin-notifications.tsx +2 -2
  528. package/src/components/admin/admin-parameters.tsx +16 -9
  529. package/src/components/admin/admin-payments.tsx +2 -2
  530. package/src/components/admin/admin-router-options.tsx +14 -10
  531. package/src/components/admin/admin-router-page.tsx +8 -5
  532. package/src/components/admin/admin-router.tsx +112 -40
  533. package/src/components/admin/admin-sessions.tsx +13 -2
  534. package/src/components/admin/admin-user-detail-audits-tab.tsx +5 -2
  535. package/src/components/admin/admin-user-detail-identity-aside.tsx +16 -93
  536. package/src/components/admin/admin-user-detail-overview-tab.tsx +1 -0
  537. package/src/components/admin/admin-user-detail-password-dialog.tsx +1 -0
  538. package/src/components/admin/admin-user-detail-profile-policy.spec.ts +1 -0
  539. package/src/components/admin/admin-user-detail-profile-policy.ts +1 -0
  540. package/src/components/admin/admin-user-detail-security-tab.tsx +1 -0
  541. package/src/components/admin/admin-user-detail-sessions-tab.tsx +5 -2
  542. package/src/components/admin/admin-user-detail.tsx +49 -87
  543. package/src/components/admin/admin-users-roles-picker.tsx +22 -15
  544. package/src/components/admin/admin-users.tsx +8 -14
  545. package/src/components/admin/admin-workflows-execution-sheet.tsx +18 -10
  546. package/src/components/admin/admin-workflows-executions-panel.tsx +24 -17
  547. package/src/components/admin/admin-workflows-status-badge.tsx +4 -2
  548. package/src/components/admin/admin-workflows.tsx +6 -4
  549. package/src/components/admin/diff-lines.spec.ts +1 -0
  550. package/src/components/admin/diff-lines.ts +1 -1
  551. package/src/components/admin/parameter-diff-dialog.tsx +3 -2
  552. package/src/components/admin/parameter-history-item.tsx +6 -5
  553. package/src/components/alepha-table/__tests__/alepha-table-static.browser.spec.tsx +190 -0
  554. package/src/components/alepha-table/__tests__/paginate-local.spec.ts +286 -0
  555. package/src/components/alepha-table/__tests__/use-table-selection.browser.spec.tsx +1 -0
  556. package/src/components/alepha-table/alepha-table.tsx +362 -79
  557. package/src/components/alepha-table/paginate-local.ts +174 -0
  558. package/src/components/app-actions/__tests__/app-actions.browser.spec.tsx +1 -0
  559. package/src/components/app-shell/app-shell.tsx +42 -19
  560. package/src/components/auth/__tests__/auth-router.spec.ts +2 -1
  561. package/src/components/auth/auth-login.tsx +5 -16
  562. package/src/components/auth/auth-register.tsx +26 -25
  563. package/src/components/auth/auth-reset-password.tsx +24 -17
  564. package/src/components/auth/auth-router.tsx +4 -3
  565. package/src/components/auth/auth-verify-email.tsx +7 -7
  566. package/src/components/auth/safe-redirect.ts +14 -0
  567. package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -0
  568. package/src/components/auto-form/auto-form.tsx +60 -39
  569. package/src/components/brand-icon/brand-icon.tsx +2 -2
  570. package/src/components/button-dark/button-dark.tsx +2 -2
  571. package/src/components/button-language/button-language.tsx +2 -2
  572. package/src/components/button-theme/button-theme.tsx +2 -2
  573. package/src/components/button-user/button-user.tsx +4 -4
  574. package/src/components/captcha/turnstile-widget.tsx +6 -5
  575. package/src/components/control/control.tsx +6 -6
  576. package/src/components/control-array/control-array.tsx +28 -15
  577. package/src/components/control-base/__tests__/form-field-a11y.browser.spec.tsx +1 -0
  578. package/src/components/control-base/field-i18n.ts +5 -3
  579. package/src/components/control-base/form-field.tsx +13 -13
  580. package/src/components/control-base/icon-hint.tsx +1 -1
  581. package/src/components/control-date/control-date.tsx +29 -6
  582. package/src/components/control-number/control-number.tsx +3 -3
  583. package/src/components/control-object/control-object.tsx +11 -8
  584. package/src/components/control-password/control-password.tsx +2 -2
  585. package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +1 -0
  586. package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +1 -0
  587. package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +1 -0
  588. package/src/components/control-select/control-select.tsx +32 -18
  589. package/src/components/control-upload/control-upload.tsx +16 -10
  590. package/src/components/detail/__tests__/detail-aside.browser.spec.tsx +135 -0
  591. package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +151 -0
  592. package/src/components/detail/detail-aside.tsx +198 -0
  593. package/src/components/detail/detail-layout.tsx +181 -0
  594. package/src/components/detail/use-detail-tab.tsx +41 -0
  595. package/src/components/file-image/file-image.tsx +4 -2
  596. package/src/components/language-toggle/language-toggle.tsx +2 -2
  597. package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +148 -0
  598. package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +1 -0
  599. package/src/components/markdown-view/diagram/DiagramErrorBoundary.tsx +42 -0
  600. package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +136 -0
  601. package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +59 -0
  602. package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +95 -0
  603. package/src/components/markdown-view/diagram/FlowchartDiagramLabel.tsx +58 -0
  604. package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +78 -0
  605. package/src/components/markdown-view/diagram/MermaidFence.tsx +46 -0
  606. package/src/components/markdown-view/diagram/__tests__/flowchart-diagram.browser.spec.tsx +210 -0
  607. package/src/components/markdown-view/diagram/flowchartParser.spec.ts +379 -0
  608. package/src/components/markdown-view/diagram/flowchartParser.ts +475 -0
  609. package/src/components/markdown-view/diagram/graphModel.ts +72 -0
  610. package/src/components/markdown-view/diagram/layoutFlowchart.spec.ts +235 -0
  611. package/src/components/markdown-view/diagram/layoutFlowchart.ts +324 -0
  612. package/src/components/markdown-view/diagram/textMetrics.spec.ts +128 -0
  613. package/src/components/markdown-view/diagram/textMetrics.ts +296 -0
  614. package/src/components/markdown-view/markdown-view.tsx +128 -9
  615. package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +1 -0
  616. package/src/components/nav-shell/nav-shell.tsx +6 -3
  617. package/src/components/nav-shell/spotlight.tsx +2 -1
  618. package/src/components/nav-shell/use-nav-breadcrumbs.ts +1 -0
  619. package/src/components/nav-shell/use-nav-entries.ts +16 -5
  620. package/src/components/nav-shell/use-nav-tree.ts +1 -0
  621. package/src/components/settings/__tests__/settings-nav.browser.spec.tsx +1 -0
  622. package/src/components/settings/__tests__/settings-section.browser.spec.tsx +1 -0
  623. package/src/components/settings/settings-card-edge.ts +24 -0
  624. package/src/components/settings/settings-danger-section.tsx +7 -1
  625. package/src/components/settings/settings-layout.tsx +16 -1
  626. package/src/components/settings/settings-nav.tsx +12 -3
  627. package/src/components/settings/settings-row.tsx +2 -2
  628. package/src/components/settings/settings-section.tsx +2 -1
  629. package/src/components/ui/accordion.tsx +3 -3
  630. package/src/components/ui/alert-dialog.tsx +5 -5
  631. package/src/components/ui/alert.tsx +2 -2
  632. package/src/components/ui/avatar.tsx +5 -5
  633. package/src/components/ui/badge.tsx +48 -2
  634. package/src/components/ui/breadcrumb.tsx +3 -3
  635. package/src/components/ui/button-group.tsx +2 -2
  636. package/src/components/ui/button.tsx +2 -2
  637. package/src/components/ui/calendar.tsx +8 -8
  638. package/src/components/ui/card.tsx +3 -3
  639. package/src/components/ui/carousel.tsx +30 -13
  640. package/src/components/ui/chart.tsx +18 -6
  641. package/src/components/ui/checkbox.tsx +1 -1
  642. package/src/components/ui/combobox.tsx +8 -9
  643. package/src/components/ui/command.tsx +6 -7
  644. package/src/components/ui/context-menu.tsx +8 -8
  645. package/src/components/ui/dialog.tsx +4 -4
  646. package/src/components/ui/drawer.tsx +4 -4
  647. package/src/components/ui/dropdown-menu.tsx +9 -9
  648. package/src/components/ui/empty.tsx +2 -2
  649. package/src/components/ui/hover-card.tsx +1 -1
  650. package/src/components/ui/input-group.tsx +6 -3
  651. package/src/components/ui/input-otp.tsx +3 -3
  652. package/src/components/ui/input.tsx +1 -1
  653. package/src/components/ui/item.tsx +3 -3
  654. package/src/components/ui/kbd.tsx +1 -1
  655. package/src/components/ui/label.tsx +3 -0
  656. package/src/components/ui/menubar.tsx +9 -9
  657. package/src/components/ui/navigation-menu.tsx +7 -7
  658. package/src/components/ui/pagination.tsx +0 -1
  659. package/src/components/ui/popover.tsx +1 -1
  660. package/src/components/ui/progress.tsx +3 -3
  661. package/src/components/ui/radio-group.tsx +2 -2
  662. package/src/components/ui/resizable.tsx +2 -2
  663. package/src/components/ui/scroll-area.tsx +2 -2
  664. package/src/components/ui/segmented.tsx +8 -3
  665. package/src/components/ui/select.tsx +8 -8
  666. package/src/components/ui/separator.tsx +1 -1
  667. package/src/components/ui/sheet.tsx +3 -3
  668. package/src/components/ui/sidebar.tsx +20 -20
  669. package/src/components/ui/skeleton.tsx +1 -1
  670. package/src/components/ui/slider.tsx +2 -2
  671. package/src/components/ui/switch.tsx +2 -2
  672. package/src/components/ui/table.tsx +10 -5
  673. package/src/components/ui/tabs.tsx +3 -3
  674. package/src/components/ui/textarea.tsx +1 -1
  675. package/src/components/ui/toggle-group.tsx +9 -4
  676. package/src/components/ui/toggle.tsx +2 -2
  677. package/src/components/ui/tooltip.tsx +13 -3
  678. package/src/components/use-dialog/use-dialog.tsx +19 -6
  679. package/src/components/use-toast/__tests__/use-toast.browser.spec.tsx +19 -0
  680. package/src/components/use-toast/use-toast.tsx +38 -26
  681. package/src/hooks/use-mobile.ts +27 -14
  682. package/src/lib/__tests__/i18n-fr.spec.ts +5 -1
  683. package/src/lib/i18n-fr.ts +18 -10
  684. package/src/styles.css +5 -5
package/README.md CHANGED
@@ -17,7 +17,7 @@ npm install @alepha/ui
17
17
  Base UI and Tailwind, with [lucide](https://lucide.dev) icons.
18
18
 
19
19
  Unlike the rest of the framework, these components are **meant to be edited
20
- directly**. The package ships `src/` only — no `dist/`, no build step. Copy a
20
+ directly**: `src/` ships alongside the built `dist/`, so you can copy a
21
21
  component into your app and change it, or depend on the package and let
22
22
  bugfixes arrive through normal dependency updates.
23
23
 
@@ -41,34 +41,37 @@ import "@alepha/ui/styles.css";
41
41
 
42
42
  ## What's inside
43
43
 
44
- **`components/ui/*`** — the shadcn primitives, unmodified in spirit: `button`,
44
+ **`components/ui/*`** - the shadcn primitives, unmodified in spirit: `button`,
45
45
  `input`, `card`, `badge`, `dialog`, `sheet`, `tooltip`, `label`, `accordion`,
46
46
  `avatar`, and the rest. Reach for these first.
47
47
 
48
- **Schema-driven forms** — `auto-form` renders a complete form from a `z.object()`
48
+ **Schema-driven forms** - `auto-form` renders a complete form from a `z.object()`
49
49
  schema, driven by the `$control` metadata on each field. `control`,
50
50
  `control-array`, `control-object`, `control-date`, `control-number`,
51
51
  `control-select`, `control-password`, and `control-upload` are the per-type
52
52
  field renderers it dispatches to; use them directly when you want to lay a form
53
53
  out by hand.
54
54
 
55
- **`alepha-table`** — data table wired for server-side pagination, sorting and
55
+ **`alepha-table`** - data table wired for server-side pagination, sorting and
56
56
  filtering.
57
57
 
58
- **Application shells** — `app-shell` and `nav-shell` for page scaffolding,
58
+ **Application shells** - `app-shell` and `nav-shell` for page scaffolding,
59
59
  `app-actions` for toolbars, plus ready-made `auth`, `account`, `settings`, and
60
60
  `admin` screens.
61
61
 
62
- **Hooks** — `use-toast` and `use-dialog` (imperative toasts and modals) live
62
+ **`markdown-view`** - renders markdown as prose, with diagrams. See the section
63
+ below.
64
+
65
+ **Hooks** - `use-toast` and `use-dialog` (imperative toasts and modals) live
63
66
  under `components/`; `use-mobile` lives under `hooks/`.
64
67
 
65
- **`lib/*`** — `utils` exports `cn()`, the `clsx` + `tailwind-merge` helper every
66
- component uses. Also `resize-image`, `rehype-safe-img`, and `i18n-fr`.
68
+ **`lib/*`** - `utils` exports `cn()`, the `clsx` + `tailwind-merge` helper every
69
+ component uses. Also `resize-image` and `i18n-fr`.
67
70
 
68
71
  ## Example
69
72
 
70
73
  `AutoForm` pairs with `useForm` from `alepha/react/form`. The schema is the
71
- single source of truth — field types, validation, and layout hints all come
74
+ single source of truth - field types, validation, and layout hints all come
72
75
  from it:
73
76
 
74
77
  ```tsx
@@ -77,7 +80,11 @@ import { z } from "alepha";
77
80
  import { useForm } from "alepha/react/form";
78
81
 
79
82
  const profileSchema = z.object({
80
- username: z.string().min(2).max(32).meta({ $control: { icon: "user" } }),
83
+ username: z
84
+ .string()
85
+ .min(2)
86
+ .max(32)
87
+ .meta({ $control: { icon: "user" } }),
81
88
  email: z.string(),
82
89
  newsletter: z.boolean(),
83
90
  });
@@ -85,7 +92,7 @@ const profileSchema = z.object({
85
92
  export const ProfilePage = () => {
86
93
  const form = useForm({
87
94
  schema: profileSchema,
88
- defaultValues: { username: "", email: "", newsletter: false },
95
+ initialValues: { username: "", email: "", newsletter: false },
89
96
  handler: (values) => save(values),
90
97
  });
91
98
 
@@ -128,13 +135,65 @@ bar is the card's own last row. Each group carries its own `title` and
128
135
  ```
129
136
 
130
137
  So a settings card whose rows are all form fields should be an `AutoForm`.
131
- Reach for `SettingsSection` directly for the rows that are *not* fields — an
138
+ Reach for `SettingsSection` directly for the rows that are _not_ fields - an
132
139
  avatar picker, a read-only value, a lone button.
133
140
 
134
141
  Add `autoSave` to commit on change instead, which hides the action bar. Text
135
142
  fields still never commit on keystroke: they commit on Enter, or on the inline
136
143
  tick that appears in the input once the field is dirty.
137
144
 
145
+ ## Markdown, and diagrams in it
146
+
147
+ `MarkdownView` renders markdown as formatted prose. Raw HTML is always escaped
148
+ to text, never promoted to markup: it renders content authored by one user to
149
+ another, so a live raw tag would be an injection point on every surface built on
150
+ this package.
151
+
152
+ A ` ```mermaid ` fence containing a **`flowchart`** is drawn as an SVG diagram
153
+ instead of a code block. The renderer is in-house rather than mermaid itself:
154
+ mermaid is roughly 500-900 kB gzip in a browser and cannot run without a DOM,
155
+ because it measures text in a hidden element. Here the only imported piece is
156
+ `graphre` (dagre in TypeScript, ~15.5 kB gzip) for layout; parsing, text
157
+ measurement and drawing are ours. The whole thing is one lazy chunk of about
158
+ 18 kB gzip, imported only when a document actually contains a fence, so a
159
+ document with no diagram pays nothing.
160
+
161
+ Drawing it ourselves is what makes the diagram look like the app: the SVG uses
162
+ `--card`, `--border`, `--muted-foreground` and `--muted`, so dark mode works
163
+ with no second palette and no theme prop.
164
+
165
+ The syntax is mermaid's so a document stays portable to GitHub, Obsidian and
166
+ anywhere else, but only a subset is drawn:
167
+
168
+ | | |
169
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
170
+ | Header | `flowchart` / `graph`, `TD` `TB` `LR` `RL` `BT` |
171
+ | Nodes | `[rect]` `(rounded)` `{diamond}` `((circle))`; `([ ])` `[[ ]]` `[( )]` `{{ }}` `> ]` `[/ /]` `[\ \]` `((( )))` are consumed and mapped onto those four |
172
+ | Edges | `-->` `---` `-.->` `==>` `<-->`; `--o` and `--x` parse, but the emitter has one end marker, so they draw the same arrowhead as `-->` rather than mermaid's circle and cross |
173
+ | Edge labels | both `-->\|text\|` and `-- text -->` |
174
+ | Structure | chains `A --> B --> C`, fans `A & B --> C`, nested `subgraph` |
175
+ | Text | `<br/>` becomes a line break; quoted and backtick-quoted labels |
176
+
177
+ Everything else degrades to the code block it renders as today, silently:
178
+ `sequenceDiagram`, `classDiagram`, `gantt` and mindmaps are not drawn, `style`
179
+ and `classDef` are ignored (the theme picks the colours), and a malformed
180
+ diagram, a parse failure or a graph past the 200-node / 400-edge cap all render
181
+ the plain fence rather than an error.
182
+
183
+ ⚠️ **A node label must not contain a link operator.** The statement is scanned
184
+ for links before anything knows where the labels are, so a `--`, `==` or `-.`
185
+ sequence inside `[...]` is read as an edge and the label is cut. `A[--o]` yields
186
+ an empty `A` and a bogus node named `]`; `A[pre--post]` truncates to `pre`.
187
+ Quoting does NOT protect it - `A["-->"]` is damaged identically, because
188
+ `splitOnLinks` runs with no quote awareness. A single hyphen (`A[well-known]`)
189
+ is safe. There is no escape that works today, and the failure is silent: the
190
+ graph still draws, with the wrong text.
191
+
192
+ The font is pinned rather than inherited. Layout needs node sizes before it can
193
+ place anything, and node width comes from a generated per-character width table
194
+ measured against Inter at one size; inheriting the surrounding face would make
195
+ text and box disagree, differently on every surface.
196
+
138
197
  ## Adding a shadcn component
139
198
 
140
199
  `components.json` is configured for this package, so the shadcn CLI drops new
@@ -144,3 +203,18 @@ components in the right place with the right aliases:
144
203
  npx shadcn@latest add <component>
145
204
  ```
146
205
 
206
+ ## Refreshing stock primitives
207
+
208
+ `yarn w @alepha/ui sync` re-fetches the stock `components/ui/*` primitives from
209
+ the public `ui.shadcn.com/r/styles/base-nova` registry and rewrites their
210
+ `@/registry/...` imports to `@alepha/ui/...`. It touches only the stock
211
+ primitives - the hand-maintained blocks (controls, admin, auth, app-shell,
212
+ alepha-table, …) are never overwritten. After a sync, diff for removed
213
+ `from "alepha/` imports before committing: the registry copy does not know
214
+ about local patches.
215
+
216
+ ## API Reference
217
+
218
+ ### React Hooks
219
+
220
+ - [`useIsMobile`](https://alepha.dev/docs/reference-react-hooks-useismobile) - Upstream's version seeds `undefined` and fills it in from an effect, which
@@ -1,13 +1,13 @@
1
- import { useToast } from "../use-toast/use-toast.js";
2
- import { Button } from "../ui/button.js";
3
- import { useDialog } from "../use-dialog/use-dialog.js";
4
1
  import { SettingsRow } from "../settings/settings-row.js";
5
2
  import { SettingsSection } from "../settings/settings-section.js";
3
+ import { Button } from "../ui/button.js";
4
+ import { useDialog } from "../use-dialog/use-dialog.js";
5
+ import { useToast } from "../use-toast/use-toast.js";
6
6
  import { useState } from "react";
7
- import { useClient, useInject } from "alepha/react";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { Plug } from "lucide-react";
10
9
  import { DateTimeProvider } from "alepha/datetime";
10
+ import { useClient, useInject } from "alepha/react";
11
11
  //#region src/components/account/account-connections.tsx
12
12
  /**
13
13
  * Applications holding access to this account through OAuth — an MCP client,
@@ -43,7 +43,7 @@ const AccountConnections = (props) => {
43
43
  description: "Applications that can act on your behalf.",
44
44
  children: /* @__PURE__ */ jsx(SettingsRow, {
45
45
  label: /* @__PURE__ */ jsxs("span", {
46
- className: "flex items-center gap-2 text-muted-foreground",
46
+ className: "text-muted-foreground flex items-center gap-2",
47
47
  children: [/* @__PURE__ */ jsx(Plug, { className: "size-4" }), "Nothing is connected"]
48
48
  }),
49
49
  description: "Applications you authorize will appear here."
@@ -1 +1 @@
1
- {"version":3,"file":"account-connections.js","names":[],"sources":["../../../src/components/account/account-connections.tsx"],"sourcesContent":["import { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useDialog } from \"@alepha/ui/components/use-dialog/use-dialog\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type { MyConnection, MyConnectionController } from \"alepha/api/users\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { useClient, useInject } from \"alepha/react\";\nimport { Plug } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport interface AccountConnectionsProps {\n connections?: MyConnection[];\n}\n\n/**\n * Applications holding access to this account through OAuth — an MCP client,\n * a CLI, a third-party integration.\n *\n * Confirmed on revoke, unlike a plain session. A session comes back by\n * signing in again; a connection comes back only by re-running whatever\n * authorization flow created it, which for an MCP client means the person has\n * to go and reconnect it from the other side.\n */\nconst AccountConnections = (props: AccountConnectionsProps) => {\n const api = useClient<MyConnectionController>();\n const dt = useInject(DateTimeProvider);\n const dialog = useDialog();\n const toaster = useToast();\n\n const [connections, setConnections] = useState<MyConnection[]>(\n props.connections ?? [],\n );\n\n const revoke = async (connection: MyConnection) => {\n const ok = await dialog.confirm({\n title: `Disconnect ${connection.clientName}?`,\n description:\n \"It loses access immediately and has to be authorized again to come back.\",\n confirmLabel: \"Disconnect\",\n destructive: true,\n });\n if (!ok) {\n return;\n }\n try {\n await api.revokeMyConnection({ params: { id: connection.id } });\n setConnections((prev) => prev.filter((it) => it.id !== connection.id));\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not disconnect it\", \"danger\");\n }\n };\n\n if (connections.length === 0) {\n /*\n Same title AND description as the populated branch below. An empty page\n that drops its description reads as a different page, and the sentence is\n exactly what a reader with nothing on screen needs.\n */\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n <SettingsRow\n label={\n <span className=\"flex items-center gap-2 text-muted-foreground\">\n <Plug className=\"size-4\" />\n Nothing is connected\n </span>\n }\n description=\"Applications you authorize will appear here.\"\n />\n </SettingsSection>\n );\n }\n\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n {connections.map((connection) => (\n <SettingsRow\n key={connection.id}\n label={\n <span className=\"flex items-center gap-2\">\n {connection.clientName}\n {connection.current ? (\n <span className=\"text-muted-foreground text-xs\">\n (this one)\n </span>\n ) : null}\n </span>\n }\n description={`Connected ${dt.of(connection.createdAt).fromNow()}${\n connection.lastUsedAt\n ? ` · last used ${dt.of(connection.lastUsedAt).fromNow()}`\n : \" · never used\"\n }`}\n >\n <Button variant=\"ghost\" size=\"sm\" onClick={() => revoke(connection)}>\n Disconnect\n </Button>\n </SettingsRow>\n ))}\n </SettingsSection>\n );\n};\n\nexport default AccountConnections;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,sBAAsB,UAAmC;CAC7D,MAAM,MAAM,UAAkC;CAC9C,MAAM,KAAK,UAAU,gBAAgB;CACrC,MAAM,SAAS,UAAU;CACzB,MAAM,UAAU,SAAS;CAEzB,MAAM,CAAC,aAAa,kBAAkB,SACpC,MAAM,eAAe,CAAC,CACxB;CAEA,MAAM,SAAS,OAAO,eAA6B;EAQjD,IAAI,CAAC,MAPY,OAAO,QAAQ;GAC9B,OAAO,cAAc,WAAW,WAAW;GAC3C,aACE;GACF,cAAc;GACd,aAAa;EACf,CAAC,GAEC;EAEF,IAAI;GACF,MAAM,IAAI,mBAAmB,EAAE,QAAQ,EAAE,IAAI,WAAW,GAAG,EAAE,CAAC;GAC9D,gBAAgB,SAAS,KAAK,QAAQ,OAAO,GAAG,OAAO,WAAW,EAAE,CAAC;EACvE,SAAS,OAAY;GACnB,QAAQ,KAAK,OAAO,WAAW,2BAA2B,QAAQ;EACpE;CACF;CAEA,IAAI,YAAY,WAAW,GAMzB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEZ,UAAA,oBAAC,aAAD;GACE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GAAC,sBAEvB;;GAER,aAAY;EACb,CAAA;CACc,CAAA;CAIrB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEX,UAAA,YAAY,KAAK,eAChB,oBAAC,aAAD;GAEE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACG,WAAW,YACX,WAAW,UACV,oBAAC,QAAD;KAAM,WAAU;KAAgC,UAAA;IAE1C,CAAA,IACJ,IACA;;GAER,aAAa,aAAa,GAAG,GAAG,WAAW,SAAS,CAAC,CAAC,QAAQ,IAC5D,WAAW,aACP,gBAAgB,GAAG,GAAG,WAAW,UAAU,CAAC,CAAC,QAAQ,MACrD;GAGN,UAAA,oBAAC,QAAD;IAAQ,SAAQ;IAAQ,MAAK;IAAK,eAAe,OAAO,UAAU;IAAG,UAAA;GAE7D,CAAA;EACG,GApBN,WAAW,EAoBL,CACd;CACc,CAAA;AAErB"}
1
+ {"version":3,"file":"account-connections.js","names":[],"sources":["../../../src/components/account/account-connections.tsx"],"sourcesContent":["import { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useDialog } from \"@alepha/ui/components/use-dialog/use-dialog\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type { MyConnection, MyConnectionController } from \"alepha/api/users\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { useClient, useInject } from \"alepha/react\";\nimport { Plug } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport interface AccountConnectionsProps {\n connections?: MyConnection[];\n}\n\n/**\n * Applications holding access to this account through OAuth — an MCP client,\n * a CLI, a third-party integration.\n *\n * Confirmed on revoke, unlike a plain session. A session comes back by\n * signing in again; a connection comes back only by re-running whatever\n * authorization flow created it, which for an MCP client means the person has\n * to go and reconnect it from the other side.\n */\nconst AccountConnections = (props: AccountConnectionsProps) => {\n const api = useClient<MyConnectionController>();\n const dt = useInject(DateTimeProvider);\n const dialog = useDialog();\n const toaster = useToast();\n\n const [connections, setConnections] = useState<MyConnection[]>(\n props.connections ?? [],\n );\n\n const revoke = async (connection: MyConnection) => {\n const ok = await dialog.confirm({\n title: `Disconnect ${connection.clientName}?`,\n description:\n \"It loses access immediately and has to be authorized again to come back.\",\n confirmLabel: \"Disconnect\",\n destructive: true,\n });\n if (!ok) {\n return;\n }\n try {\n await api.revokeMyConnection({ params: { id: connection.id } });\n setConnections((prev) => prev.filter((it) => it.id !== connection.id));\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not disconnect it\", \"danger\");\n }\n };\n\n if (connections.length === 0) {\n /*\n Same title AND description as the populated branch below. An empty page\n that drops its description reads as a different page, and the sentence is\n exactly what a reader with nothing on screen needs.\n */\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n <SettingsRow\n label={\n <span className=\"text-muted-foreground flex items-center gap-2\">\n <Plug className=\"size-4\" />\n Nothing is connected\n </span>\n }\n description=\"Applications you authorize will appear here.\"\n />\n </SettingsSection>\n );\n }\n\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n {connections.map((connection) => (\n <SettingsRow\n key={connection.id}\n label={\n <span className=\"flex items-center gap-2\">\n {connection.clientName}\n {connection.current ? (\n <span className=\"text-muted-foreground text-xs\">\n (this one)\n </span>\n ) : null}\n </span>\n }\n description={`Connected ${dt.of(connection.createdAt).fromNow()}${\n connection.lastUsedAt\n ? ` · last used ${dt.of(connection.lastUsedAt).fromNow()}`\n : \" · never used\"\n }`}\n >\n <Button variant=\"ghost\" size=\"sm\" onClick={() => revoke(connection)}>\n Disconnect\n </Button>\n </SettingsRow>\n ))}\n </SettingsSection>\n );\n};\n\nexport default AccountConnections;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,sBAAsB,UAAmC;CAC7D,MAAM,MAAM,UAAkC;CAC9C,MAAM,KAAK,UAAU,gBAAgB;CACrC,MAAM,SAAS,UAAU;CACzB,MAAM,UAAU,SAAS;CAEzB,MAAM,CAAC,aAAa,kBAAkB,SACpC,MAAM,eAAe,CAAC,CACxB;CAEA,MAAM,SAAS,OAAO,eAA6B;EAQjD,IAAI,CAAC,MAPY,OAAO,QAAQ;GAC9B,OAAO,cAAc,WAAW,WAAW;GAC3C,aACE;GACF,cAAc;GACd,aAAa;EACf,CAAC,GAEC;EAEF,IAAI;GACF,MAAM,IAAI,mBAAmB,EAAE,QAAQ,EAAE,IAAI,WAAW,GAAG,EAAE,CAAC;GAC9D,gBAAgB,SAAS,KAAK,QAAQ,OAAO,GAAG,OAAO,WAAW,EAAE,CAAC;EACvE,SAAS,OAAY;GACnB,QAAQ,KAAK,OAAO,WAAW,2BAA2B,QAAQ;EACpE;CACF;CAEA,IAAI,YAAY,WAAW,GAMzB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEZ,UAAA,oBAAC,aAAD;GACE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GAAC,sBAEvB;;GAER,aAAY;EACb,CAAA;CACc,CAAA;CAIrB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEX,UAAA,YAAY,KAAK,eAChB,oBAAC,aAAD;GAEE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACG,WAAW,YACX,WAAW,UACV,oBAAC,QAAD;KAAM,WAAU;KAAgC,UAAA;IAE1C,CAAA,IACJ,IACA;;GAER,aAAa,aAAa,GAAG,GAAG,WAAW,SAAS,CAAC,CAAC,QAAQ,IAC5D,WAAW,aACP,gBAAgB,GAAG,GAAG,WAAW,UAAU,CAAC,CAAC,QAAQ,MACrD;GAGN,UAAA,oBAAC,QAAD;IAAQ,SAAQ;IAAQ,MAAK;IAAK,eAAe,OAAO,UAAU;IAAG,UAAA;GAE7D,CAAA;EACG,GApBN,WAAW,EAoBL,CACd;CACc,CAAA;AAErB"}
@@ -1,12 +1,12 @@
1
- import { useToast } from "../use-toast/use-toast.js";
2
1
  import { Button } from "../ui/button.js";
3
- import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
4
- import { Label } from "../ui/label.js";
5
2
  import { Input } from "../ui/input.js";
3
+ import { useToast } from "../use-toast/use-toast.js";
4
+ import { Label } from "../ui/label.js";
6
5
  import { ControlPassword } from "../control-password/control-password.js";
6
+ import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
7
7
  import { useEffect, useState } from "react";
8
- import { useClient } from "alepha/react";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { useClient } from "alepha/react";
10
10
  //#region src/components/account/account-delete-dialog.tsx
11
11
  /**
12
12
  * Permanently delete your own account.
@@ -1 +1 @@
1
- {"version":3,"file":"account-header.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-header.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,UAAW,kBAAkB,gCAkBtD,CAAC"}
1
+ {"version":3,"file":"account-header.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-header.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,UAAW,kBAAkB,gCAuBtD,CAAC"}
@@ -29,8 +29,10 @@ const AccountHeader = (props) => {
29
29
  children: [/* @__PURE__ */ jsxs(Button, {
30
30
  variant: "ghost",
31
31
  size: "sm",
32
- className: "-ml-2 text-muted-foreground hover:text-foreground",
32
+ className: "text-muted-foreground hover:text-foreground -ml-2",
33
33
  render: /* @__PURE__ */ jsx(Link$1, { href: router.path(home) }),
34
+ nativeButton: false,
35
+ role: "link",
34
36
  children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }), props.backLabel ?? "Back to site"]
35
37
  }), /* @__PURE__ */ jsx(AppActions, {})]
36
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"account-header.js","names":["Link"],"sources":["../../../src/components/account/account-header.tsx"],"sourcesContent":["import { AppActions } from \"@alepha/ui/components/app-actions/app-actions\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Link, useRouter } from \"alepha/react/router\";\nimport { ArrowLeft } from \"lucide-react\";\n\nexport interface AccountHeaderProps {\n /**\n * Route name the back link points at.\n *\n * @default \"home\"\n */\n homeRouteName?: string;\n\n /**\n * Label for the back link.\n *\n * @default \"Back to site\"\n */\n backLabel?: string;\n}\n\n/**\n * The account area's top bar: a way out on the left, the ambient controls on\n * the right.\n *\n * The way out is the point. `/account` is a destination you arrive at from\n * somewhere else and leave again, and unlike `/admin` it has no sidebar to\n * carry a brand or a home affordance — without this the only exit is the\n * browser's back button.\n *\n * It is a real `<Link href>`, not a button that calls `router.push`, so the\n * middle-click / open-in-new-tab / copy-link behaviours all work and the\n * destination is visible in the status bar on hover.\n *\n * Replaceable wholesale: `AccountRouterOptions.header` overrides this, for an\n * application whose account area sits inside its own chrome and needs no\n * second header.\n */\nexport const AccountHeader = (props: AccountHeaderProps) => {\n const router = useRouter<any>();\n const home = props.homeRouteName ?? \"home\";\n\n return (\n <div className=\"flex items-center justify-between gap-4 border-b pb-3\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"-ml-2 text-muted-foreground hover:text-foreground\"\n render={<Link href={router.path(home)} />}\n >\n <ArrowLeft className=\"size-4\" />\n {props.backLabel ?? \"Back to site\"}\n </Button>\n <AppActions />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,SAAS,UAAe;CAC9B,MAAM,OAAO,MAAM,iBAAiB;CAEpC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,WAAU;GACV,QAAQ,oBAACA,QAAD,EAAM,MAAM,OAAO,KAAK,IAAI,EAAI,CAAA;GAJ1C,UAAA,CAME,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,aAAa,cACd;EACR,CAAA,GAAA,oBAAC,YAAD,CAAa,CAAA,CACV;;AAET"}
1
+ {"version":3,"file":"account-header.js","names":["Link"],"sources":["../../../src/components/account/account-header.tsx"],"sourcesContent":["import { AppActions } from \"@alepha/ui/components/app-actions/app-actions\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Link, useRouter } from \"alepha/react/router\";\nimport { ArrowLeft } from \"lucide-react\";\n\nexport interface AccountHeaderProps {\n /**\n * Route name the back link points at.\n *\n * @default \"home\"\n */\n homeRouteName?: string;\n\n /**\n * Label for the back link.\n *\n * @default \"Back to site\"\n */\n backLabel?: string;\n}\n\n/**\n * The account area's top bar: a way out on the left, the ambient controls on\n * the right.\n *\n * The way out is the point. `/account` is a destination you arrive at from\n * somewhere else and leave again, and unlike `/admin` it has no sidebar to\n * carry a brand or a home affordance — without this the only exit is the\n * browser's back button.\n *\n * It is a real `<Link href>`, not a button that calls `router.push`, so the\n * middle-click / open-in-new-tab / copy-link behaviours all work and the\n * destination is visible in the status bar on hover.\n *\n * Replaceable wholesale: `AccountRouterOptions.header` overrides this, for an\n * application whose account area sits inside its own chrome and needs no\n * second header.\n */\nexport const AccountHeader = (props: AccountHeaderProps) => {\n const router = useRouter<any>();\n const home = props.homeRouteName ?? \"home\";\n\n return (\n <div className=\"flex items-center justify-between gap-4 border-b pb-3\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-foreground -ml-2\"\n render={<Link href={router.path(home)} />}\n // A link wearing a button's clothes: `nativeButton={false}` stops Base UI\n // assuming a native <button> (it warns otherwise), and `role` puts back the\n // link semantics its non-native branch would overwrite with `role=\"button\"`.\n nativeButton={false}\n role=\"link\"\n >\n <ArrowLeft className=\"size-4\" />\n {props.backLabel ?? \"Back to site\"}\n </Button>\n <AppActions />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,SAAS,UAAe;CAC9B,MAAM,OAAO,MAAM,iBAAiB;CAEpC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,WAAU;GACV,QAAQ,oBAACA,QAAD,EAAM,MAAM,OAAO,KAAK,IAAI,EAAI,CAAA;GAIxC,cAAc;GACd,MAAK;GATP,UAAA,CAWE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,aAAa,cACd;EACR,CAAA,GAAA,oBAAC,YAAD,CAAa,CAAA,CACV;;AAET"}
@@ -1,16 +1,16 @@
1
- import { useToast } from "../use-toast/use-toast.js";
1
+ import { SettingsRow } from "../settings/settings-row.js";
2
+ import { SettingsSection } from "../settings/settings-section.js";
2
3
  import { Button } from "../ui/button.js";
3
- import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
4
- import { Label } from "../ui/label.js";
5
4
  import { Input } from "../ui/input.js";
6
5
  import { useDialog } from "../use-dialog/use-dialog.js";
7
- import { SettingsRow } from "../settings/settings-row.js";
8
- import { SettingsSection } from "../settings/settings-section.js";
6
+ import { useToast } from "../use-toast/use-toast.js";
7
+ import { Label } from "../ui/label.js";
8
+ import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
9
9
  import { useState } from "react";
10
- import { useClient, useInject } from "alepha/react";
11
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
11
  import { Check, Clipboard, Plus, Trash2 } from "lucide-react";
13
12
  import { DateTimeProvider } from "alepha/datetime";
13
+ import { useClient, useInject } from "alepha/react";
14
14
  //#region src/components/account/account-keys.tsx
15
15
  /**
16
16
  * Your own API keys: mint, see, revoke.
@@ -140,7 +140,7 @@ const AccountKeys = (props) => {
140
140
  children: "This is the only time it is shown. Store it somewhere safe before closing this dialog."
141
141
  }),
142
142
  /* @__PURE__ */ jsx("code", {
143
- className: "break-all rounded-md border bg-muted p-3 font-mono text-xs",
143
+ className: "bg-muted rounded-md border p-3 font-mono text-xs break-all",
144
144
  children: freshToken
145
145
  }),
146
146
  /* @__PURE__ */ jsxs("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"account-keys.js","names":[],"sources":["../../../src/components/account/account-keys.tsx"],"sourcesContent":["import { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n} from \"@alepha/ui/components/ui/dialog\";\nimport { Input } from \"@alepha/ui/components/ui/input\";\nimport { Label } from \"@alepha/ui/components/ui/label\";\nimport { useDialog } from \"@alepha/ui/components/use-dialog/use-dialog\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type { Infer } from \"alepha\";\nimport type { ApiKeyController, listApiKeyItemSchema } from \"alepha/api/keys\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { useClient, useInject } from \"alepha/react\";\nimport { Check, Clipboard, Plus, Trash2 } from \"lucide-react\";\nimport { type FormEvent, useState } from \"react\";\n\n/**\n * Derived from the framework's own response schema rather than restated, so a\n * field added to the endpoint is available here the day it lands — and a\n * field removed is a compile error rather than a blank cell.\n */\ntype ApiKeyRow = Infer<typeof listApiKeyItemSchema>;\n\nexport interface AccountKeysProps {\n apiKeys?: ApiKeyRow[];\n}\n\n/**\n * Your own API keys: mint, see, revoke.\n *\n * The freshly created token is shown **once**, in a dialog that stays open\n * until dismissed, because the server stores only a hash and cannot show it\n * again. That is also why the create form and the reveal are separate steps\n * rather than one inline row — a token that scrolls out of view behind a\n * re-render is gone.\n */\nconst AccountKeys = (props: AccountKeysProps) => {\n const api = useClient<ApiKeyController>();\n const dt = useInject(DateTimeProvider);\n const dialog = useDialog();\n const toaster = useToast();\n\n const [keys, setKeys] = useState<ApiKeyRow[]>(props.apiKeys ?? []);\n const [createOpen, setCreateOpen] = useState(false);\n const [name, setName] = useState(\"\");\n const [creating, setCreating] = useState(false);\n const [freshToken, setFreshToken] = useState<string | undefined>();\n const [copied, setCopied] = useState(false);\n\n const create = async (event: FormEvent) => {\n event.preventDefault();\n setCreating(true);\n try {\n const created: any = await api.createApiKey({ body: { name } });\n setFreshToken(created.token);\n setKeys(await (api.listApiKeys() as Promise<any>));\n setName(\"\");\n setCreateOpen(false);\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not create that key\", \"danger\");\n } finally {\n setCreating(false);\n }\n };\n\n const revoke = async (key: ApiKeyRow) => {\n const ok = await dialog.confirm({\n title: `Revoke ${key.name}?`,\n description:\n \"Anything still using this key stops working immediately. This cannot be undone.\",\n confirmLabel: \"Revoke\",\n destructive: true,\n });\n if (!ok) {\n return;\n }\n try {\n await api.revokeMyApiKey({ params: { id: key.id } });\n setKeys((prev) => prev.filter((it) => it.id !== key.id));\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not revoke that key\", \"danger\");\n }\n };\n\n const copy = async () => {\n if (!freshToken) {\n return;\n }\n await navigator.clipboard.writeText(freshToken);\n setCopied(true);\n };\n\n return (\n <>\n <SettingsSection\n title=\"API keys\"\n description=\"Keys act as you. Revoke any you no longer recognise.\"\n >\n {keys.map((key) => (\n <SettingsRow\n key={key.id}\n label={key.name}\n description={`…${key.tokenSuffix} · created ${dt\n .of(key.createdAt)\n .fromNow()}${\n key.lastUsedAt\n ? ` · last used ${dt.of(key.lastUsedAt).fromNow()}`\n : \" · never used\"\n }`}\n >\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => revoke(key)}\n aria-label={`Revoke ${key.name}`}\n >\n <Trash2 className=\"size-4\" />\n </Button>\n </SettingsRow>\n ))}\n\n <SettingsRow\n label=\"Create a key\"\n description=\"Shown once, at creation. It cannot be recovered afterwards.\"\n >\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => setCreateOpen(true)}\n >\n <Plus className=\"size-4\" />\n New key\n </Button>\n </SettingsRow>\n </SettingsSection>\n\n <Dialog open={createOpen} onOpenChange={setCreateOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>New API key</DialogTitle>\n </DialogHeader>\n <form onSubmit={create} className=\"flex flex-col gap-4\">\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor=\"apiKeyName\">Name</Label>\n <Input\n id=\"apiKeyName\"\n value={name}\n onChange={(event) => setName(event.target.value)}\n placeholder=\"CI pipeline\"\n required\n />\n </div>\n <div className=\"flex justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCreateOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={creating}>\n Create\n </Button>\n </div>\n </form>\n </DialogContent>\n </Dialog>\n\n {/* Deliberately not auto-dismissed: this is the only time the token\n exists in a readable form. */}\n <Dialog\n open={Boolean(freshToken)}\n onOpenChange={(next) => {\n if (!next) {\n setFreshToken(undefined);\n setCopied(false);\n }\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Copy your key now</DialogTitle>\n </DialogHeader>\n <div className=\"flex flex-col gap-4\">\n <span className=\"text-muted-foreground text-sm\">\n This is the only time it is shown. Store it somewhere safe before\n closing this dialog.\n </span>\n <code className=\"break-all rounded-md border bg-muted p-3 font-mono text-xs\">\n {freshToken}\n </code>\n <div className=\"flex justify-end gap-2\">\n <Button variant=\"secondary\" onClick={copy}>\n {copied ? (\n <Check className=\"size-4\" />\n ) : (\n <Clipboard className=\"size-4\" />\n )}\n {copied ? \"Copied\" : \"Copy\"}\n </Button>\n <Button\n onClick={() => {\n setFreshToken(undefined);\n setCopied(false);\n }}\n >\n Done\n </Button>\n </div>\n </div>\n </DialogContent>\n </Dialog>\n </>\n );\n};\n\nexport default AccountKeys;\n"],"mappings":"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"}
1
+ {"version":3,"file":"account-keys.js","names":[],"sources":["../../../src/components/account/account-keys.tsx"],"sourcesContent":["import { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n} from \"@alepha/ui/components/ui/dialog\";\nimport { Input } from \"@alepha/ui/components/ui/input\";\nimport { Label } from \"@alepha/ui/components/ui/label\";\nimport { useDialog } from \"@alepha/ui/components/use-dialog/use-dialog\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type { Infer } from \"alepha\";\nimport type { ApiKeyController, listApiKeyItemSchema } from \"alepha/api/keys\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { useClient, useInject } from \"alepha/react\";\nimport { Check, Clipboard, Plus, Trash2 } from \"lucide-react\";\nimport { type FormEvent, useState } from \"react\";\n\n/**\n * Derived from the framework's own response schema rather than restated, so a\n * field added to the endpoint is available here the day it lands — and a\n * field removed is a compile error rather than a blank cell.\n */\ntype ApiKeyRow = Infer<typeof listApiKeyItemSchema>;\n\nexport interface AccountKeysProps {\n apiKeys?: ApiKeyRow[];\n}\n\n/**\n * Your own API keys: mint, see, revoke.\n *\n * The freshly created token is shown **once**, in a dialog that stays open\n * until dismissed, because the server stores only a hash and cannot show it\n * again. That is also why the create form and the reveal are separate steps\n * rather than one inline row — a token that scrolls out of view behind a\n * re-render is gone.\n */\nconst AccountKeys = (props: AccountKeysProps) => {\n const api = useClient<ApiKeyController>();\n const dt = useInject(DateTimeProvider);\n const dialog = useDialog();\n const toaster = useToast();\n\n const [keys, setKeys] = useState<ApiKeyRow[]>(props.apiKeys ?? []);\n const [createOpen, setCreateOpen] = useState(false);\n const [name, setName] = useState(\"\");\n const [creating, setCreating] = useState(false);\n const [freshToken, setFreshToken] = useState<string | undefined>();\n const [copied, setCopied] = useState(false);\n\n const create = async (event: FormEvent) => {\n event.preventDefault();\n setCreating(true);\n try {\n const created: any = await api.createApiKey({ body: { name } });\n setFreshToken(created.token);\n setKeys(await (api.listApiKeys() as Promise<any>));\n setName(\"\");\n setCreateOpen(false);\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not create that key\", \"danger\");\n } finally {\n setCreating(false);\n }\n };\n\n const revoke = async (key: ApiKeyRow) => {\n const ok = await dialog.confirm({\n title: `Revoke ${key.name}?`,\n description:\n \"Anything still using this key stops working immediately. This cannot be undone.\",\n confirmLabel: \"Revoke\",\n destructive: true,\n });\n if (!ok) {\n return;\n }\n try {\n await api.revokeMyApiKey({ params: { id: key.id } });\n setKeys((prev) => prev.filter((it) => it.id !== key.id));\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not revoke that key\", \"danger\");\n }\n };\n\n const copy = async () => {\n if (!freshToken) {\n return;\n }\n await navigator.clipboard.writeText(freshToken);\n setCopied(true);\n };\n\n return (\n <>\n <SettingsSection\n title=\"API keys\"\n description=\"Keys act as you. Revoke any you no longer recognise.\"\n >\n {keys.map((key) => (\n <SettingsRow\n key={key.id}\n label={key.name}\n description={`…${key.tokenSuffix} · created ${dt\n .of(key.createdAt)\n .fromNow()}${\n key.lastUsedAt\n ? ` · last used ${dt.of(key.lastUsedAt).fromNow()}`\n : \" · never used\"\n }`}\n >\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => revoke(key)}\n aria-label={`Revoke ${key.name}`}\n >\n <Trash2 className=\"size-4\" />\n </Button>\n </SettingsRow>\n ))}\n\n <SettingsRow\n label=\"Create a key\"\n description=\"Shown once, at creation. It cannot be recovered afterwards.\"\n >\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => setCreateOpen(true)}\n >\n <Plus className=\"size-4\" />\n New key\n </Button>\n </SettingsRow>\n </SettingsSection>\n\n <Dialog open={createOpen} onOpenChange={setCreateOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>New API key</DialogTitle>\n </DialogHeader>\n <form onSubmit={create} className=\"flex flex-col gap-4\">\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor=\"apiKeyName\">Name</Label>\n <Input\n id=\"apiKeyName\"\n value={name}\n onChange={(event) => setName(event.target.value)}\n placeholder=\"CI pipeline\"\n required\n />\n </div>\n <div className=\"flex justify-end gap-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCreateOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={creating}>\n Create\n </Button>\n </div>\n </form>\n </DialogContent>\n </Dialog>\n\n {/* Deliberately not auto-dismissed: this is the only time the token\n exists in a readable form. */}\n <Dialog\n open={Boolean(freshToken)}\n onOpenChange={(next) => {\n if (!next) {\n setFreshToken(undefined);\n setCopied(false);\n }\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Copy your key now</DialogTitle>\n </DialogHeader>\n <div className=\"flex flex-col gap-4\">\n <span className=\"text-muted-foreground text-sm\">\n This is the only time it is shown. Store it somewhere safe before\n closing this dialog.\n </span>\n <code className=\"bg-muted rounded-md border p-3 font-mono text-xs break-all\">\n {freshToken}\n </code>\n <div className=\"flex justify-end gap-2\">\n <Button variant=\"secondary\" onClick={copy}>\n {copied ? (\n <Check className=\"size-4\" />\n ) : (\n <Clipboard className=\"size-4\" />\n )}\n {copied ? \"Copied\" : \"Copy\"}\n </Button>\n <Button\n onClick={() => {\n setFreshToken(undefined);\n setCopied(false);\n }}\n >\n Done\n </Button>\n </div>\n </div>\n </DialogContent>\n </Dialog>\n </>\n );\n};\n\nexport default AccountKeys;\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"account-layout.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-layout.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,mCA0BzB,CAAC;eAEa,aAAa"}
1
+ {"version":3,"file":"account-layout.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-layout.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,mCAgCzB,CAAC;eAEa,aAAa"}
@@ -1,10 +1,10 @@
1
- import { useNavEntries } from "../nav-shell/use-nav-entries.js";
1
+ import { AccountHeader } from "./account-header.js";
2
2
  import { SettingsLayout } from "../settings/settings-layout.js";
3
3
  import { SettingsNav } from "../settings/settings-nav.js";
4
- import { AccountHeader } from "./account-header.js";
4
+ import { useNavEntries } from "../nav-shell/use-nav-entries.js";
5
5
  import { accountRouterOptionsAtom } from "./account-router-options.js";
6
- import { useStore } from "alepha/react";
7
6
  import { jsx } from "react/jsx-runtime";
7
+ import { useStore } from "alepha/react";
8
8
  import { NestedView } from "alepha/react/router";
9
9
  //#region src/components/account/account-layout.tsx
10
10
  /**
@@ -43,7 +43,10 @@ const AccountLayout = () => {
43
43
  className: options.className,
44
44
  fill: options.fill,
45
45
  header: options.header !== void 0 ? options.header : /* @__PURE__ */ jsx(AccountHeader, { homeRouteName: options.homeRouteName }),
46
- nav: /* @__PURE__ */ jsx(SettingsNav, { items: entries }),
46
+ nav: /* @__PURE__ */ jsx(SettingsNav, {
47
+ items: entries,
48
+ size: "default"
49
+ }),
47
50
  children: /* @__PURE__ */ jsx(NestedView, {})
48
51
  });
49
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"account-layout.js","names":[],"sources":["../../../src/components/account/account-layout.tsx"],"sourcesContent":["import { AccountHeader } from \"@alepha/ui/components/account/account-header\";\nimport { SettingsLayout } from \"@alepha/ui/components/settings/settings-layout\";\nimport { SettingsNav } from \"@alepha/ui/components/settings/settings-nav\";\nimport { useStore } from \"alepha/react\";\nimport { NestedView } from \"alepha/react/router\";\nimport { useNavEntries } from \"../nav-shell/use-nav-entries.ts\";\nimport { accountRouterOptionsAtom } from \"./account-router-options.tsx\";\n\n/**\n * The account shell: a centred column with a settings rail, deliberately not\n * the admin console's chrome.\n *\n * The rail is derived from the route subtree anchored at `account` — every\n * page carries its own `nav`, so there is no hand-synced list and a page\n * added with `$pageAccount` appears without registering anywhere.\n *\n * Two things this does *not* do, both on purpose:\n *\n * - **No `<ColorScheme />`.** `AdminLayout` mounts one because `/admin` is\n * never a child of the application's layout, so nothing else would apply\n * the dark-mode class to `<html>`. This shell is normally adopted *into*\n * the application's own layout (see `AccountRouter`'s `children` note), and\n * an application mounting it standalone is already supplying `header` and\n * owns its chrome. A second component writing to `<html>` would be the\n * surprise, not the service.\n * - **No scroll container by default.** The page scrolls, and a nested\n * `overflow-auto` would strand the sticky rail against the wrong scroll\n * root. An application whose own shell has already taken the viewport\n * height and hidden its overflow has no page scroll to lend, and opts in\n * with `fill` on the options atom — see `SettingsLayout`.\n *\n * `useNavEntries` returns entries already filtered by `can` and permission,\n * and sorted by group then order — and its `NavEntry` is structurally a\n * superset of `SettingsNavItem`, so it passes straight through. That is safe\n * here specifically because none of these routes is parameterised: see\n * `SettingsNav` for why it takes resolved items rather than a route name.\n */\nexport const AccountLayout = () => {\n const [options] = useStore(accountRouterOptionsAtom);\n const entries = useNavEntries({ root: \"account\" });\n\n return (\n <SettingsLayout\n className={options.className}\n fill={options.fill}\n /*\n `!== undefined`, not `??`. `null ?? x` yields `x`, so nullish\n coalescing would silently ignore `header: null` — the documented way\n to say \"this account area is nested in my own chrome, draw no bar\".\n Absent means default; explicit null means none.\n */\n header={\n options.header !== undefined ? (\n options.header\n ) : (\n <AccountHeader homeRouteName={options.homeRouteName} />\n )\n }\n nav={<SettingsNav items={entries} />}\n >\n <NestedView />\n </SettingsLayout>\n );\n};\n\nexport default AccountLayout;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,sBAAsB;CACjC,MAAM,CAAC,WAAW,SAAS,wBAAwB;CACnD,MAAM,UAAU,cAAc,EAAE,MAAM,UAAU,CAAC;CAEjD,OACE,oBAAC,gBAAD;EACE,WAAW,QAAQ;EACnB,MAAM,QAAQ;EAOd,QACE,QAAQ,WAAW,KAAA,IACjB,QAAQ,SAER,oBAAC,eAAD,EAAe,eAAe,QAAQ,cAAgB,CAAA;EAG1D,KAAK,oBAAC,aAAD,EAAa,OAAO,QAAU,CAAA;EAEnC,UAAA,oBAAC,YAAD,CAAa,CAAA;CACC,CAAA;AAEpB"}
1
+ {"version":3,"file":"account-layout.js","names":[],"sources":["../../../src/components/account/account-layout.tsx"],"sourcesContent":["import { AccountHeader } from \"@alepha/ui/components/account/account-header\";\nimport { SettingsLayout } from \"@alepha/ui/components/settings/settings-layout\";\nimport { SettingsNav } from \"@alepha/ui/components/settings/settings-nav\";\nimport { useStore } from \"alepha/react\";\nimport { NestedView } from \"alepha/react/router\";\n\nimport { useNavEntries } from \"../nav-shell/use-nav-entries.ts\";\nimport { accountRouterOptionsAtom } from \"./account-router-options.tsx\";\n\n/**\n * The account shell: a centred column with a settings rail, deliberately not\n * the admin console's chrome.\n *\n * The rail is derived from the route subtree anchored at `account` — every\n * page carries its own `nav`, so there is no hand-synced list and a page\n * added with `$pageAccount` appears without registering anywhere.\n *\n * Two things this does *not* do, both on purpose:\n *\n * - **No `<ColorScheme />`.** `AdminLayout` mounts one because `/admin` is\n * never a child of the application's layout, so nothing else would apply\n * the dark-mode class to `<html>`. This shell is normally adopted *into*\n * the application's own layout (see `AccountRouter`'s `children` note), and\n * an application mounting it standalone is already supplying `header` and\n * owns its chrome. A second component writing to `<html>` would be the\n * surprise, not the service.\n * - **No scroll container by default.** The page scrolls, and a nested\n * `overflow-auto` would strand the sticky rail against the wrong scroll\n * root. An application whose own shell has already taken the viewport\n * height and hidden its overflow has no page scroll to lend, and opts in\n * with `fill` on the options atom — see `SettingsLayout`.\n *\n * `useNavEntries` returns entries already filtered by `can` and permission,\n * and sorted by group then order — and its `NavEntry` is structurally a\n * superset of `SettingsNavItem`, so it passes straight through. That is safe\n * here specifically because none of these routes is parameterised: see\n * `SettingsNav` for why it takes resolved items rather than a route name.\n */\nexport const AccountLayout = () => {\n const [options] = useStore(accountRouterOptionsAtom);\n const entries = useNavEntries({ root: \"account\" });\n\n return (\n <SettingsLayout\n className={options.className}\n fill={options.fill}\n /*\n `!== undefined`, not `??`. `null ?? x` yields `x`, so nullish\n coalescing would silently ignore `header: null` — the documented way\n to say \"this account area is nested in my own chrome, draw no bar\".\n Absent means default; explicit null means none.\n */\n header={\n options.header !== undefined ? (\n options.header\n ) : (\n <AccountHeader homeRouteName={options.homeRouteName} />\n )\n }\n /*\n `size=\"default\"` so this rail and `apps/lore`'s project-settings one\n are the same size as well as the same component. `default` rather than\n the `sm` this used to take because the metrics both rails borrow are\n `SidebarMenuButton`'s, and the sidebar itself renders at `default`.\n */\n nav={<SettingsNav items={entries} size=\"default\" />}\n >\n <NestedView />\n </SettingsLayout>\n );\n};\n\nexport default AccountLayout;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,sBAAsB;CACjC,MAAM,CAAC,WAAW,SAAS,wBAAwB;CACnD,MAAM,UAAU,cAAc,EAAE,MAAM,UAAU,CAAC;CAEjD,OACE,oBAAC,gBAAD;EACE,WAAW,QAAQ;EACnB,MAAM,QAAQ;EAOd,QACE,QAAQ,WAAW,KAAA,IACjB,QAAQ,SAER,oBAAC,eAAD,EAAe,eAAe,QAAQ,cAAgB,CAAA;EAS1D,KAAK,oBAAC,aAAD;GAAa,OAAO;GAAS,MAAK;EAAW,CAAA;EAElD,UAAA,oBAAC,YAAD,CAAa,CAAA;CACC,CAAA;AAEpB"}
@@ -1,10 +1,10 @@
1
- import { useToast } from "../use-toast/use-toast.js";
2
1
  import { Button } from "../ui/button.js";
3
- import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
2
+ import { useToast } from "../use-toast/use-toast.js";
4
3
  import { ControlPassword } from "../control-password/control-password.js";
4
+ import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
5
5
  import { useState } from "react";
6
- import { useClient } from "alepha/react";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { useClient } from "alepha/react";
8
8
  //#region src/components/account/account-password-dialog.tsx
9
9
  /**
10
10
  * Set a first password, or change an existing one.
@@ -1,16 +1,16 @@
1
- import { useToast } from "../use-toast/use-toast.js";
1
+ import { SettingsRow } from "../settings/settings-row.js";
2
+ import { SettingsSection } from "../settings/settings-section.js";
2
3
  import { Button } from "../ui/button.js";
4
+ import { useToast } from "../use-toast/use-toast.js";
3
5
  import { AutoForm } from "../auto-form/auto-form.js";
4
- import { Badge } from "../ui/badge.js";
5
6
  import { FileImage } from "../file-image/file-image.js";
6
- import { SettingsRow } from "../settings/settings-row.js";
7
- import { SettingsSection } from "../settings/settings-section.js";
7
+ import { Badge } from "../ui/badge.js";
8
8
  import { useRef, useState } from "react";
9
- import { useClient } from "alepha/react";
10
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
10
  import { AtSign, Camera, Trash2, User } from "lucide-react";
12
- import { useForm } from "alepha/react/form";
13
11
  import { useI18n } from "alepha/react/i18n";
12
+ import { useClient } from "alepha/react";
13
+ import { useForm } from "alepha/react/form";
14
14
  import { updateMyProfileBodySchema } from "alepha/api/users";
15
15
  //#region src/components/account/account-profile.tsx
16
16
  /**
@@ -110,7 +110,7 @@ const AccountProfile = (props) => {
110
110
  "aria-label": "Change avatar",
111
111
  className: "relative size-14 shrink-0 cursor-pointer",
112
112
  children: [/* @__PURE__ */ jsx("div", {
113
- className: "size-full overflow-hidden rounded-full border bg-muted",
113
+ className: "bg-muted size-full overflow-hidden rounded-full border",
114
114
  children: /* @__PURE__ */ jsx(FileImage, {
115
115
  id: profile.picture,
116
116
  public: true,
@@ -122,7 +122,7 @@ const AccountProfile = (props) => {
122
122
  })
123
123
  })
124
124
  }), /* @__PURE__ */ jsx("div", {
125
- className: "absolute right-0 bottom-0 flex size-5 items-center justify-center rounded-full border bg-card",
125
+ className: "bg-card absolute right-0 bottom-0 flex size-5 items-center justify-center rounded-full border",
126
126
  children: /* @__PURE__ */ jsx(Camera, { className: "size-3" })
127
127
  })]
128
128
  }), profile.picture ? /* @__PURE__ */ jsxs(Button, {
@@ -1 +1 @@
1
- {"version":3,"file":"account-profile.js","names":[],"sources":["../../../src/components/account/account-profile.tsx"],"sourcesContent":["import { AutoForm } from \"@alepha/ui/components/auto-form/auto-form\";\nimport { FileImage } from \"@alepha/ui/components/file-image/file-image\";\nimport { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Badge } from \"@alepha/ui/components/ui/badge\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type {\n MyAvatarController,\n MyProfile,\n MyProfileController,\n RealmConfig,\n} from \"alepha/api/users\";\nimport { updateMyProfileBodySchema } from \"alepha/api/users\";\nimport { useClient } from \"alepha/react\";\nimport { useForm } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { AtSign, Camera, Trash2, User } from \"lucide-react\";\nimport { type ChangeEvent, useRef, useState } from \"react\";\n\nexport interface AccountProfileProps {\n /**\n * Supplied by the route loader. Optional so the page can also be rendered\n * standalone in a story or a test.\n */\n profile?: MyProfile;\n\n /**\n * Supplied by the route loader, and read for one thing: whether this realm\n * collects usernames at all.\n *\n * Optional for the same reason `profile` is. Absent, the username field\n * renders — the historical behaviour, and the right guess for a realm nobody\n * described.\n */\n realmConfig?: RealmConfig;\n}\n\n/**\n * Who you are: avatar, name, and the read-only facts about the account.\n *\n * Email is shown but not editable — changing it is a verification flow, not a\n * profile edit, and `updateMyProfile` deliberately refuses it. Rather than\n * render a disabled input with no explanation, the row says so.\n */\nconst AccountProfile = (props: AccountProfileProps) => {\n const api = useClient<MyProfileController>();\n const avatarApi = useClient<MyAvatarController>();\n const toaster = useToast();\n const { l } = useI18n();\n const fileInput = useRef<HTMLInputElement>(null);\n\n const [profile, setProfile] = useState<MyProfile | undefined>(props.profile);\n const [uploading, setUploading] = useState(false);\n\n /*\n * Does this realm have usernames at all?\n *\n * The avatar section above reads its switch through `can()`, because a realm\n * with `features.avatars` off registers no avatar action and the capability\n * is simply absent from `/api/_links`. That cannot work here:\n * `updateMyProfile` is the same call that saves first and last name, so it\n * exists in every realm and its presence says nothing about usernames.\n *\n * The realm's own `settings.username` is the switch, and `\"none\"` is the\n * only value that hides the row: it is the one that means this realm has no\n * such thing as a username, so there is nothing to show and nothing the user\n * could set.\n *\n * Without this, a `\"none\"` realm did not merely render a pointless field:\n * `?? \"\"` seeded an empty string into a column that is `.optional()` but\n * `minLength: 3`, `FormModel` decodes its initial values on construction,\n * and the whole page died at `useForm` with \"Too small: expected string to\n * have >=3 characters at /username\" — before anything rendered. `apps/shop`\n * is such a realm, and `\"none\"` is also the framework default, so this is\n * what any new app hits first.\n *\n * ⚠️ `auth-register.tsx` excludes `\"email\"` here as well, and this\n * deliberately does not. In that mode `RegistrationService` derives the\n * handle from the address and drops whatever the client sent, so the\n * registration form is right to hide a field the user does not choose — but\n * the account page is where an existing, already-derived username is shown,\n * and `apps/lore` runs exactly this mode. Whether editing it there should be\n * possible at all is a real question (a rename desyncs it from the email\n * that produced it, and `updateMyProfile` does not re-run the slugger), but\n * it is a separate one from \"this realm has no usernames\", and answering it\n * by quietly deleting the field is not the place to start.\n */\n const hasUsername = props.realmConfig?.settings?.username !== \"none\";\n\n /**\n * Validated against the server's own body schema, so \"3 to 30 characters\"\n * is enforced before the request rather than only by the 400 that comes\n * back — and is stated in exactly one place.\n *\n * The schema stays whole and `username` is dropped from the *values*: the\n * column is `.optional()`, so an absent key decodes cleanly, while the empty\n * string does not. Omitting it from `groups` below is what hides the row —\n * `AutoForm` renders the fields its groups name and nothing else — and an\n * absent value is what keeps it out of the request.\n *\n * ⚠️ **`username` is never seeded as `\"\"`, even when the field is shown.**\n * The old `?? \"\"` was not only a `\"none\"`-realm problem: `\"optional\"` is a\n * realm that collects usernames and does not insist, so an account without\n * one is the normal case there — and it crashed the page for exactly those\n * users while working for everyone who had set one. `undefined` is what an\n * empty optional field means, and it is what the two name fields would use\n * too if they were not `.nullable()` with a real \"clear me\" state.\n */\n const form = useForm({\n initialValues: {\n ...(hasUsername ? { username: props.profile?.username } : {}),\n firstName: props.profile?.firstName ?? \"\",\n lastName: props.profile?.lastName ?? \"\",\n },\n schema: updateMyProfileBodySchema,\n handler: async (values) => {\n try {\n setProfile(\n await api.updateMyProfile({\n body: {\n // Empty is \"unset\", which the API spells `null` — NOT\n // `undefined`, which means \"leave this column alone\" and made\n // clearing a name a silent no-op that still toasted success.\n firstName: values.firstName || null,\n lastName: values.lastName || null,\n // Absent, not `null`, in a realm without usernames: `null` is the\n // \"clear this column\" signal the two name fields use, and\n // `username` has no such state — absent is \"leave it alone\".\n username: values.username,\n },\n }),\n );\n toaster.show(\"Profile updated\", \"success\");\n } catch (error: any) {\n // The username-taken 409 arrives here with its own message, which is\n // the only one worth showing. Toasted *and* rethrown: the toast is\n // what the user reads, and the throw is what keeps the form dirty and\n // errored so Save stays actionable for the retry.\n toaster.show(\n error?.message ?? \"Could not update your profile\",\n \"danger\",\n );\n throw error;\n }\n },\n });\n\n if (!profile) {\n return null;\n }\n\n const onPickAvatar = async (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (!file) {\n return;\n }\n setUploading(true);\n try {\n setProfile(await avatarApi.updateMyAvatar({ body: { file } }));\n toaster.show(\"Avatar updated\", \"success\");\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not upload that image\", \"danger\");\n } finally {\n setUploading(false);\n // Reset so picking the same file again still fires a change event.\n if (fileInput.current) {\n fileInput.current.value = \"\";\n }\n }\n };\n\n const removeAvatar = async () => {\n setUploading(true);\n try {\n setProfile(await avatarApi.deleteMyAvatar());\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not remove your avatar\", \"danger\");\n } finally {\n setUploading(false);\n }\n };\n\n // Realms opt into avatars (`features.avatars`, off by default), and an\n // unregistered action is absent from `/api/_links` — so this is the realm's\n // own switch read through the mechanism that cannot drift from it. Checking\n // a flag mirrored into the client instead would let the picker render\n // against endpoints that answer 404.\n const canEditAvatar = avatarApi.updateMyAvatar.can();\n\n return (\n <>\n {canEditAvatar && (\n <>\n <SettingsSection\n title=\"Profile picture\"\n description=\"Shown next to your name wherever you appear.\"\n >\n <SettingsRow\n label=\"Avatar\"\n description=\"PNG, JPEG, GIF or WebP, up to 5 MB.\"\n >\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => fileInput.current?.click()}\n disabled={uploading}\n aria-label=\"Change avatar\"\n className=\"relative size-14 shrink-0 cursor-pointer\"\n >\n {/* Only the image is clipped to a circle; the camera badge sits\n outside the wrapper so the round mask cannot crop it. */}\n <div className=\"size-full overflow-hidden rounded-full border bg-muted\">\n <FileImage\n id={profile.picture}\n public\n alt=\"\"\n className=\"size-full object-cover\"\n fallback={\n <div className=\"flex size-full items-center justify-center\">\n <User className=\"size-6\" />\n </div>\n }\n />\n </div>\n <div className=\"absolute right-0 bottom-0 flex size-5 items-center justify-center rounded-full border bg-card\">\n <Camera className=\"size-3\" />\n </div>\n </button>\n {profile.picture ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={removeAvatar}\n disabled={uploading}\n >\n <Trash2 className=\"size-4\" />\n Remove\n </Button>\n ) : null}\n </div>\n </SettingsRow>\n </SettingsSection>\n\n <input\n type=\"file\"\n ref={fileInput}\n onChange={onPickAvatar}\n accept=\"image/jpeg,image/png,image/webp,image/gif\"\n className=\"hidden\"\n />\n </>\n )}\n\n {/* The one section here whose rows are all form fields, so it is an\n `AutoForm` in row layout rather than hand-wired `SettingsRow`s — same\n card, same rows, same heading, plus schema validation, the error\n popover, Reset, and a Save that knows whether anything changed. The\n sections above and below stay hand-wired because their rows are an\n avatar picker and read-only values, not fields. */}\n <AutoForm\n form={form}\n layout=\"row\"\n disabledIfPristine\n groups={[\n {\n title: \"Name\",\n description: \"How you are identified to other people.\",\n fields: hasUsername\n ? [\"username\", \"firstName\", \"lastName\"]\n : [\"firstName\", \"lastName\"],\n },\n ]}\n fields={{\n // Labels are explicit rather than derived: `prettyName` would title\n // -case them into \"First Name\", and this page's wording is settled.\n //\n // Icons are explicit because `Control`'s own fallback would resolve\n // the schema hint, and for a plain string that is the generic \"T\"\n // glyph — the same mark three times, saying \"this is text\" next to a\n // label that already said so. A field earns an icon by having one\n // that means something: `@` is what a handle looks like everywhere.\n username: {\n label: \"Username\",\n description: \"Unique across this site.\",\n autoComplete: \"username\",\n icon: AtSign,\n // No clear button: `updateMyProfile` has no \"unset\" for a\n // username, so the × would offer a deletion the server cannot\n // perform. First and last name keep theirs — those genuinely\n // clear, via `null`.\n clearable: false,\n },\n firstName: {\n label: \"First name\",\n autoComplete: \"given-name\",\n icon: User,\n },\n lastName: {\n label: \"Last name\",\n autoComplete: \"family-name\",\n icon: User,\n },\n }}\n />\n\n <SettingsSection\n title=\"Account\"\n description=\"Details you cannot change from this page.\"\n >\n <SettingsRow\n label=\"Email\"\n description=\"Changing your email needs verification, so it is not a profile edit.\"\n >\n <span className=\"text-muted-foreground text-sm\">\n {profile.email ?? \"Not set\"}\n </span>\n </SettingsRow>\n <SettingsRow label=\"Roles\">\n <div className=\"flex flex-wrap gap-1\">\n {profile.roles.length > 0 ? (\n profile.roles.map((role) => (\n <Badge key={role} variant=\"outline\" className=\"text-xs\">\n {role}\n </Badge>\n ))\n ) : (\n <span className=\"text-muted-foreground text-sm\">—</span>\n )}\n </div>\n </SettingsRow>\n <SettingsRow label=\"Member since\">\n <span className=\"text-muted-foreground text-sm\">\n {String(l(profile.createdAt, { date: \"LL\" }))}\n </span>\n </SettingsRow>\n </SettingsSection>\n </>\n );\n};\n\nexport default AccountProfile;\n"],"mappings":"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"}
1
+ {"version":3,"file":"account-profile.js","names":[],"sources":["../../../src/components/account/account-profile.tsx"],"sourcesContent":["import { AutoForm } from \"@alepha/ui/components/auto-form/auto-form\";\nimport { FileImage } from \"@alepha/ui/components/file-image/file-image\";\nimport { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Badge } from \"@alepha/ui/components/ui/badge\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type {\n MyAvatarController,\n MyProfile,\n MyProfileController,\n RealmConfig,\n} from \"alepha/api/users\";\nimport { updateMyProfileBodySchema } from \"alepha/api/users\";\nimport { useClient } from \"alepha/react\";\nimport { useForm } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { AtSign, Camera, Trash2, User } from \"lucide-react\";\nimport { type ChangeEvent, useRef, useState } from \"react\";\n\nexport interface AccountProfileProps {\n /**\n * Supplied by the route loader. Optional so the page can also be rendered\n * standalone in a story or a test.\n */\n profile?: MyProfile;\n\n /**\n * Supplied by the route loader, and read for one thing: whether this realm\n * collects usernames at all.\n *\n * Optional for the same reason `profile` is. Absent, the username field\n * renders — the historical behaviour, and the right guess for a realm nobody\n * described.\n */\n realmConfig?: RealmConfig;\n}\n\n/**\n * Who you are: avatar, name, and the read-only facts about the account.\n *\n * Email is shown but not editable — changing it is a verification flow, not a\n * profile edit, and `updateMyProfile` deliberately refuses it. Rather than\n * render a disabled input with no explanation, the row says so.\n */\nconst AccountProfile = (props: AccountProfileProps) => {\n const api = useClient<MyProfileController>();\n const avatarApi = useClient<MyAvatarController>();\n const toaster = useToast();\n const { l } = useI18n();\n const fileInput = useRef<HTMLInputElement>(null);\n\n const [profile, setProfile] = useState<MyProfile | undefined>(props.profile);\n const [uploading, setUploading] = useState(false);\n\n /*\n * Does this realm have usernames at all?\n *\n * The avatar section above reads its switch through `can()`, because a realm\n * with `features.avatars` off registers no avatar action and the capability\n * is simply absent from `/api/_links`. That cannot work here:\n * `updateMyProfile` is the same call that saves first and last name, so it\n * exists in every realm and its presence says nothing about usernames.\n *\n * The realm's own `settings.username` is the switch, and `\"none\"` is the\n * only value that hides the row: it is the one that means this realm has no\n * such thing as a username, so there is nothing to show and nothing the user\n * could set.\n *\n * Without this, a `\"none\"` realm did not merely render a pointless field:\n * `?? \"\"` seeded an empty string into a column that is `.optional()` but\n * `minLength: 3`, `FormModel` decodes its initial values on construction,\n * and the whole page died at `useForm` with \"Too small: expected string to\n * have >=3 characters at /username\" — before anything rendered. `apps/examples/shop`\n * is such a realm, and `\"none\"` is also the framework default, so this is\n * what any new app hits first.\n *\n * ⚠️ `auth-register.tsx` excludes `\"email\"` here as well, and this\n * deliberately does not. In that mode `RegistrationService` derives the\n * handle from the address and drops whatever the client sent, so the\n * registration form is right to hide a field the user does not choose — but\n * the account page is where an existing, already-derived username is shown,\n * and `apps/lore` runs exactly this mode. Whether editing it there should be\n * possible at all is a real question (a rename desyncs it from the email\n * that produced it, and `updateMyProfile` does not re-run the slugger), but\n * it is a separate one from \"this realm has no usernames\", and answering it\n * by quietly deleting the field is not the place to start.\n */\n const hasUsername = props.realmConfig?.settings?.username !== \"none\";\n\n /**\n * Validated against the server's own body schema, so \"3 to 30 characters\"\n * is enforced before the request rather than only by the 400 that comes\n * back — and is stated in exactly one place.\n *\n * The schema stays whole and `username` is dropped from the *values*: the\n * column is `.optional()`, so an absent key decodes cleanly, while the empty\n * string does not. Omitting it from `groups` below is what hides the row —\n * `AutoForm` renders the fields its groups name and nothing else — and an\n * absent value is what keeps it out of the request.\n *\n * ⚠️ **`username` is never seeded as `\"\"`, even when the field is shown.**\n * The old `?? \"\"` was not only a `\"none\"`-realm problem: `\"optional\"` is a\n * realm that collects usernames and does not insist, so an account without\n * one is the normal case there — and it crashed the page for exactly those\n * users while working for everyone who had set one. `undefined` is what an\n * empty optional field means, and it is what the two name fields would use\n * too if they were not `.nullable()` with a real \"clear me\" state.\n */\n const form = useForm({\n initialValues: {\n ...(hasUsername ? { username: props.profile?.username } : {}),\n firstName: props.profile?.firstName ?? \"\",\n lastName: props.profile?.lastName ?? \"\",\n },\n schema: updateMyProfileBodySchema,\n handler: async (values) => {\n try {\n setProfile(\n await api.updateMyProfile({\n body: {\n // Empty is \"unset\", which the API spells `null` — NOT\n // `undefined`, which means \"leave this column alone\" and made\n // clearing a name a silent no-op that still toasted success.\n firstName: values.firstName || null,\n lastName: values.lastName || null,\n // Absent, not `null`, in a realm without usernames: `null` is the\n // \"clear this column\" signal the two name fields use, and\n // `username` has no such state — absent is \"leave it alone\".\n username: values.username,\n },\n }),\n );\n toaster.show(\"Profile updated\", \"success\");\n } catch (error: any) {\n // The username-taken 409 arrives here with its own message, which is\n // the only one worth showing. Toasted *and* rethrown: the toast is\n // what the user reads, and the throw is what keeps the form dirty and\n // errored so Save stays actionable for the retry.\n toaster.show(\n error?.message ?? \"Could not update your profile\",\n \"danger\",\n );\n throw error;\n }\n },\n });\n\n if (!profile) {\n return null;\n }\n\n const onPickAvatar = async (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (!file) {\n return;\n }\n setUploading(true);\n try {\n setProfile(await avatarApi.updateMyAvatar({ body: { file } }));\n toaster.show(\"Avatar updated\", \"success\");\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not upload that image\", \"danger\");\n } finally {\n setUploading(false);\n // Reset so picking the same file again still fires a change event.\n if (fileInput.current) {\n fileInput.current.value = \"\";\n }\n }\n };\n\n const removeAvatar = async () => {\n setUploading(true);\n try {\n setProfile(await avatarApi.deleteMyAvatar());\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not remove your avatar\", \"danger\");\n } finally {\n setUploading(false);\n }\n };\n\n // Realms opt into avatars (`features.avatars`, off by default), and an\n // unregistered action is absent from `/api/_links` — so this is the realm's\n // own switch read through the mechanism that cannot drift from it. Checking\n // a flag mirrored into the client instead would let the picker render\n // against endpoints that answer 404.\n const canEditAvatar = avatarApi.updateMyAvatar.can();\n\n return (\n <>\n {canEditAvatar && (\n <>\n <SettingsSection\n title=\"Profile picture\"\n description=\"Shown next to your name wherever you appear.\"\n >\n <SettingsRow\n label=\"Avatar\"\n description=\"PNG, JPEG, GIF or WebP, up to 5 MB.\"\n >\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => fileInput.current?.click()}\n disabled={uploading}\n aria-label=\"Change avatar\"\n className=\"relative size-14 shrink-0 cursor-pointer\"\n >\n {/* Only the image is clipped to a circle; the camera badge sits\n outside the wrapper so the round mask cannot crop it. */}\n <div className=\"bg-muted size-full overflow-hidden rounded-full border\">\n <FileImage\n id={profile.picture}\n public\n alt=\"\"\n className=\"size-full object-cover\"\n fallback={\n <div className=\"flex size-full items-center justify-center\">\n <User className=\"size-6\" />\n </div>\n }\n />\n </div>\n <div className=\"bg-card absolute right-0 bottom-0 flex size-5 items-center justify-center rounded-full border\">\n <Camera className=\"size-3\" />\n </div>\n </button>\n {profile.picture ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={removeAvatar}\n disabled={uploading}\n >\n <Trash2 className=\"size-4\" />\n Remove\n </Button>\n ) : null}\n </div>\n </SettingsRow>\n </SettingsSection>\n\n <input\n type=\"file\"\n ref={fileInput}\n onChange={onPickAvatar}\n accept=\"image/jpeg,image/png,image/webp,image/gif\"\n className=\"hidden\"\n />\n </>\n )}\n\n {/* The one section here whose rows are all form fields, so it is an\n `AutoForm` in row layout rather than hand-wired `SettingsRow`s — same\n card, same rows, same heading, plus schema validation, the error\n popover, Reset, and a Save that knows whether anything changed. The\n sections above and below stay hand-wired because their rows are an\n avatar picker and read-only values, not fields. */}\n <AutoForm\n form={form}\n layout=\"row\"\n disabledIfPristine\n groups={[\n {\n title: \"Name\",\n description: \"How you are identified to other people.\",\n fields: hasUsername\n ? [\"username\", \"firstName\", \"lastName\"]\n : [\"firstName\", \"lastName\"],\n },\n ]}\n fields={{\n // Labels are explicit rather than derived: `prettyName` would title\n // -case them into \"First Name\", and this page's wording is settled.\n //\n // Icons are explicit because `Control`'s own fallback would resolve\n // the schema hint, and for a plain string that is the generic \"T\"\n // glyph — the same mark three times, saying \"this is text\" next to a\n // label that already said so. A field earns an icon by having one\n // that means something: `@` is what a handle looks like everywhere.\n username: {\n label: \"Username\",\n description: \"Unique across this site.\",\n autoComplete: \"username\",\n icon: AtSign,\n // No clear button: `updateMyProfile` has no \"unset\" for a\n // username, so the × would offer a deletion the server cannot\n // perform. First and last name keep theirs — those genuinely\n // clear, via `null`.\n clearable: false,\n },\n firstName: {\n label: \"First name\",\n autoComplete: \"given-name\",\n icon: User,\n },\n lastName: {\n label: \"Last name\",\n autoComplete: \"family-name\",\n icon: User,\n },\n }}\n />\n\n <SettingsSection\n title=\"Account\"\n description=\"Details you cannot change from this page.\"\n >\n <SettingsRow\n label=\"Email\"\n description=\"Changing your email needs verification, so it is not a profile edit.\"\n >\n <span className=\"text-muted-foreground text-sm\">\n {profile.email ?? \"Not set\"}\n </span>\n </SettingsRow>\n <SettingsRow label=\"Roles\">\n <div className=\"flex flex-wrap gap-1\">\n {profile.roles.length > 0 ? (\n profile.roles.map((role) => (\n <Badge key={role} variant=\"outline\" className=\"text-xs\">\n {role}\n </Badge>\n ))\n ) : (\n <span className=\"text-muted-foreground text-sm\">—</span>\n )}\n </div>\n </SettingsRow>\n <SettingsRow label=\"Member since\">\n <span className=\"text-muted-foreground text-sm\">\n {String(l(profile.createdAt, { date: \"LL\" }))}\n </span>\n </SettingsRow>\n </SettingsSection>\n </>\n );\n};\n\nexport default AccountProfile;\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"account-router-options.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-router-options.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,mBAAmB,CAAC;QAC9B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAChC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAChC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,WAAW,CAAC,EAAE,uBAAuB,CAAC;KACvC,CAAC;CACH;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,gIAKnC,CAAC"}
1
+ {"version":3,"file":"account-router-options.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-router-options.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,mBAAmB,CAAC;QAC9B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAChC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAChC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,WAAW,CAAC,EAAE,uBAAuB,CAAC;KACvC,CAAC;CACH;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,gIAKnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"account-router-options.js","names":[],"sources":["../../../src/components/account/account-router-options.tsx"],"sourcesContent":["import { $atom, z } from \"alepha\";\nimport type { ReactNode } from \"react\";\nimport type { AccountConnectionsProps } from \"./account-connections.tsx\";\nimport type { AccountKeysProps } from \"./account-keys.tsx\";\nimport type { AccountProfileProps } from \"./account-profile.tsx\";\nimport type { AccountSecurityProps } from \"./account-security.tsx\";\nimport type { AccountSessionsProps } from \"./account-sessions.tsx\";\n\n/**\n * Everything an application can change about `AccountRouter` without writing\n * its own.\n *\n * The seam is narrower than the admin one, and deliberately so — an account\n * area is a handful of forms, not a console. An application wanting different\n * URLs or a different page set writes its own router; the same trade\n * `AuthRouter` documents.\n */\nexport interface AccountRouterOptions {\n /**\n * Replaces the default {@link AccountHeader} — the back link plus the\n * ambient controls — entirely. Supply the whole bar, not an addition to it.\n *\n * Set it to `null` for an account area nested inside an application's own\n * chrome, where a second header would just be a second row of the same\n * controls.\n */\n header?: ReactNode;\n\n /**\n * Route name the default header's back link points at. Ignored when\n * `header` is supplied, since that replaces the link too.\n *\n * @default \"home\"\n */\n homeRouteName?: string;\n\n /**\n * Extra class(es) merged onto the shell's root element, for an account area\n * living inside a document the application does not fully own.\n */\n className?: string;\n\n /**\n * Bound the account area to its parent's height and let its content column\n * scroll, rather than relying on the document to scroll.\n *\n * Set it whenever the application adopts `AccountRouter.layout` into a shell\n * that has taken the viewport height and hidden its overflow — the common\n * `h-svh … overflow-hidden` app frame. Without it those pages have no\n * scrollbar at all in such a shell, and everything past the fold is\n * unreachable rather than merely below.\n *\n * @default false — the account area scrolls with the document.\n */\n fill?: boolean;\n\n /**\n * Props forwarded to the pages, keyed by page.\n *\n * Each entry reuses that component's own exported props interface rather\n * than restating its fields, so a prop added to a page is passable the day\n * it exists.\n */\n pages?: {\n profile?: AccountProfileProps;\n security?: AccountSecurityProps;\n sessions?: AccountSessionsProps;\n keys?: AccountKeysProps;\n connections?: AccountConnectionsProps;\n };\n}\n\n/**\n * Boot-time configuration for `AccountRouter`, following the\n * `adminRouterOptionsAtom` pattern: the application calls\n * `alepha.set(accountRouterOptionsAtom, { … })` once, before start.\n *\n * `z.custom` passthrough because the value carries React nodes, whose shape\n * TypeScript already owns. Being boot-configured also keeps it out of the SSR\n * payload — `StateManager.exportAtoms()` reads request scope only, and a\n * `ReactNode` would not survive JSON serialization.\n */\nexport const accountRouterOptionsAtom = $atom({\n name: \"alepha.ui.account.router.options\",\n description: \"Chrome slot and per-page props for the account router.\",\n schema: z.custom<AccountRouterOptions>(),\n default: {} satisfies AccountRouterOptions,\n});\n"],"mappings":";;;;;;;;;;;;AAkFA,MAAa,2BAA2B,MAAM;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,OAA6B;CACvC,SAAS,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"account-router-options.js","names":[],"sources":["../../../src/components/account/account-router-options.tsx"],"sourcesContent":["import { $atom, z } from \"alepha\";\nimport type { ReactNode } from \"react\";\n\nimport type { AccountConnectionsProps } from \"./account-connections.tsx\";\nimport type { AccountKeysProps } from \"./account-keys.tsx\";\nimport type { AccountProfileProps } from \"./account-profile.tsx\";\nimport type { AccountSecurityProps } from \"./account-security.tsx\";\nimport type { AccountSessionsProps } from \"./account-sessions.tsx\";\n\n/**\n * Everything an application can change about `AccountRouter` without writing\n * its own.\n *\n * The seam is narrower than the admin one, and deliberately so — an account\n * area is a handful of forms, not a console. An application wanting different\n * URLs or a different page set writes its own router; the same trade\n * `AuthRouter` documents.\n */\nexport interface AccountRouterOptions {\n /**\n * Replaces the default {@link AccountHeader} — the back link plus the\n * ambient controls — entirely. Supply the whole bar, not an addition to it.\n *\n * Set it to `null` for an account area nested inside an application's own\n * chrome, where a second header would just be a second row of the same\n * controls.\n */\n header?: ReactNode;\n\n /**\n * Route name the default header's back link points at. Ignored when\n * `header` is supplied, since that replaces the link too.\n *\n * @default \"home\"\n */\n homeRouteName?: string;\n\n /**\n * Extra class(es) merged onto the shell's root element, for an account area\n * living inside a document the application does not fully own.\n */\n className?: string;\n\n /**\n * Bound the account area to its parent's height and let its content column\n * scroll, rather than relying on the document to scroll.\n *\n * Set it whenever the application adopts `AccountRouter.layout` into a shell\n * that has taken the viewport height and hidden its overflow — the common\n * `h-svh … overflow-hidden` app frame. Without it those pages have no\n * scrollbar at all in such a shell, and everything past the fold is\n * unreachable rather than merely below.\n *\n * @default false — the account area scrolls with the document.\n */\n fill?: boolean;\n\n /**\n * Props forwarded to the pages, keyed by page.\n *\n * Each entry reuses that component's own exported props interface rather\n * than restating its fields, so a prop added to a page is passable the day\n * it exists.\n */\n pages?: {\n profile?: AccountProfileProps;\n security?: AccountSecurityProps;\n sessions?: AccountSessionsProps;\n keys?: AccountKeysProps;\n connections?: AccountConnectionsProps;\n };\n}\n\n/**\n * Boot-time configuration for `AccountRouter`, following the\n * `adminRouterOptionsAtom` pattern: the application calls\n * `alepha.set(accountRouterOptionsAtom, { … })` once, before start.\n *\n * `z.custom` passthrough because the value carries React nodes, whose shape\n * TypeScript already owns. Being boot-configured also keeps it out of the SSR\n * payload — `StateManager.exportAtoms()` reads request scope only, and a\n * `ReactNode` would not survive JSON serialization.\n */\nexport const accountRouterOptionsAtom = $atom({\n name: \"alepha.ui.account.router.options\",\n description: \"Chrome slot and per-page props for the account router.\",\n schema: z.custom<AccountRouterOptions>(),\n default: {} satisfies AccountRouterOptions,\n});\n"],"mappings":";;;;;;;;;;;;AAmFA,MAAa,2BAA2B,MAAM;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,OAA6B;CACvC,SAAS,CAAC;AACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"account-router-page.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-router-page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,MAAM,SAAS,MAAM,GAAG,aAAa,EACrC,YAAY,SAAS,MAAM,GAAG,mBAAmB,WAExC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,KACrE,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAO7C,CAAC"}
1
+ {"version":3,"file":"account-router-page.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-router-page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,MAAM,SAAS,MAAM,GAAG,aAAa,EACrC,YAAY,SAAS,MAAM,GAAG,mBAAmB,WAExC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,KACrE,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAO7C,CAAC"}