@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
@@ -1,4 +1,5 @@
1
- import "react";
1
+ import { DiagramErrorBoundary } from "./diagram/DiagramErrorBoundary.js";
2
+ import { Suspense, lazy } from "react";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import "./markdown-view.css";
4
5
  import ReactMarkdown from "react-markdown";
@@ -6,8 +7,48 @@ import rehypeHighlight from "rehype-highlight";
6
7
  import remarkGfm from "remark-gfm";
7
8
  //#region src/components/markdown-view/markdown-view.tsx
8
9
  /**
10
+ * Parser + `graphre` + emitter, pulled in ONLY when a document actually
11
+ * contains a mermaid fence.
12
+ *
13
+ * This is the constraint the whole diagram layer exists under: a document
14
+ * with no diagram must pay nothing at all. One with a diagram pays roughly
15
+ * 20-25 kB gzip once, then it is cached.
16
+ *
17
+ * ⚠️ A lazy import a bundler decides to inline fails silently: the feature
18
+ * still works and the cost moves into the entry chunk. After changing this,
19
+ * build and confirm `graphre` is in a chunk of its own:
20
+ *
21
+ * yarn w lore build
22
+ * grep -rl addBorderSegments apps/lore/dist/
23
+ */
24
+ const MermaidFence = lazy(() => import("./diagram/MermaidFence.js"));
25
+ /**
9
26
  * Renders markdown as formatted prose.
10
27
  *
28
+ * ## Diagrams
29
+ *
30
+ * A ` ```mermaid ` fence containing a **`flowchart`** is drawn as an SVG
31
+ * diagram instead of a code block, themed from the app's own CSS variables
32
+ * so dark mode needs no second palette. The renderer is in-house: only
33
+ * layout is imported (`graphre`, dagre in TypeScript, ~15.5 kB gzip), and
34
+ * the whole thing is one lazy chunk pulled in only when a document actually
35
+ * contains a fence, so a document with no diagram pays nothing.
36
+ *
37
+ * The drawn subset is `flowchart TD|TB|LR|RL|BT`; the four node shapes
38
+ * `[rect]` `(rounded)` `{diamond}` `((circle))`, with every other mermaid
39
+ * bracket pair consumed and mapped onto them; edges `-->` `---` `-.->`
40
+ * `==>` `<-->` with labels in both the `-->|text|` and `-- text -->` forms;
41
+ * chains, `&` fans, `<br/>` line breaks and nested `subgraph`.
42
+ *
43
+ * **Everything else degrades to the code block, silently.**
44
+ * `sequenceDiagram`, `classDiagram`, `gantt` and mindmaps are not drawn,
45
+ * `style` / `classDef` are ignored, and a parse failure or a graph past the
46
+ * node cap renders the plain fence rather than an error. Agents write
47
+ * invalid mermaid, and a red box in the middle of a document is worse than
48
+ * a grey fence. See `packages/@alepha/ui/DOC.md` for the full table.
49
+ *
50
+ * ## Raw HTML
51
+ *
11
52
  * No raw HTML is ever rendered as markup: react-markdown's default is to
12
53
  * escape a raw node to text, and this component deliberately mounts no
13
54
  * plugin that changes that. A narrow `rehypeSafeImg` plugin used to promote
@@ -21,12 +62,12 @@ import remarkGfm from "remark-gfm";
21
62
  */
22
63
  const MarkdownView = (props) => {
23
64
  return /* @__PURE__ */ jsx("div", {
24
- className: "max-w-none text-sm leading-relaxed",
65
+ className: `max-w-none text-sm leading-relaxed ${props.className ?? ""}`,
25
66
  children: /* @__PURE__ */ jsx(ReactMarkdown, {
26
67
  remarkPlugins: [remarkGfm],
27
68
  rehypePlugins: [[rehypeHighlight, {
28
69
  detect: true,
29
- ignoreMissing: true
70
+ plainText: ["mermaid"]
30
71
  }]],
31
72
  components: {
32
73
  h1: ({ children }) => /* @__PURE__ */ jsx("h1", {
@@ -59,7 +100,7 @@ const MarkdownView = (props) => {
59
100
  }),
60
101
  a: ({ href, children }) => /* @__PURE__ */ jsx("a", {
61
102
  href,
62
- className: "text-primary underline decoration-primary/50 underline-offset-4 hover:decoration-primary",
103
+ className: "text-primary decoration-primary/50 hover:decoration-primary underline underline-offset-4",
63
104
  children
64
105
  }),
65
106
  code: ({ children, className }) => {
@@ -68,14 +109,28 @@ const MarkdownView = (props) => {
68
109
  children
69
110
  });
70
111
  return /* @__PURE__ */ jsx("code", {
71
- className: "bg-muted rounded px-1.5 py-0.5 text-[0.85em] font-mono",
112
+ className: "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.85em]",
72
113
  children
73
114
  });
74
115
  },
75
- pre: ({ children }) => /* @__PURE__ */ jsx("pre", {
76
- className: "border-border my-4 overflow-auto rounded-md border bg-transparent p-3 text-xs",
77
- children
78
- }),
116
+ pre: ({ children, node }) => {
117
+ const block = /* @__PURE__ */ jsx("pre", {
118
+ className: "border-border my-4 overflow-auto rounded-md border bg-transparent p-3 text-xs",
119
+ children
120
+ });
121
+ const source = mermaidSource(node);
122
+ if (!source) return block;
123
+ return /* @__PURE__ */ jsx(DiagramErrorBoundary, {
124
+ fallback: block,
125
+ children: /* @__PURE__ */ jsx(Suspense, {
126
+ fallback: block,
127
+ children: /* @__PURE__ */ jsx(MermaidFence, {
128
+ source,
129
+ fallback: block
130
+ })
131
+ })
132
+ });
133
+ },
79
134
  blockquote: ({ children }) => /* @__PURE__ */ jsx("blockquote", {
80
135
  className: "border-muted-foreground/30 my-3 border-l-2 pl-4 italic",
81
136
  children
@@ -98,6 +153,27 @@ const MarkdownView = (props) => {
98
153
  })
99
154
  });
100
155
  };
156
+ /**
157
+ * The text of a ` ```mermaid ` fence, or `undefined` for every other `<pre>`.
158
+ *
159
+ * Reads the hast node rather than the rendered children because the source
160
+ * has to arrive at the parser exactly as the author typed it, and walking React
161
+ * children would mean reassembling it from whatever the renderer produced.
162
+ *
163
+ * The alternative wiring, a remark plugin, is more code for the same result:
164
+ * `mdast-util-to-hast` applies `data.hName` to the `<code>` element BEFORE
165
+ * wrapping it in `<pre>`, so renaming the code node still leaves the diagram
166
+ * inside this bordered box. Going that way needs a custom node type and a
167
+ * cast into `components`, whose type is keyed on intrinsic elements.
168
+ */
169
+ const mermaidSource = (node) => {
170
+ const code = node?.children?.[0];
171
+ if (code?.type !== "element" || code.tagName !== "code") return void 0;
172
+ const className = code.properties?.className;
173
+ if (!(Array.isArray(className) ? className.map(String) : typeof className === "string" ? className.split(/\s+/) : []).includes("language-mermaid")) return void 0;
174
+ const text = code.children?.filter((child) => child.type === "text").map((child) => child.value ?? "").join("");
175
+ return text?.trim() ? text : void 0;
176
+ };
101
177
  //#endregion
102
178
  export { MarkdownView };
103
179
 
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-view.js","names":[],"sources":["../../../src/components/markdown-view/markdown-view.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport \"./markdown-view.css\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport remarkGfm from \"remark-gfm\";\n\nexport interface MarkdownViewProps {\n content: string;\n}\n\n/**\n * Renders markdown as formatted prose.\n *\n * No raw HTML is ever rendered as markup: react-markdown's default is to\n * escape a raw node to text, and this component deliberately mounts no\n * plugin that changes that. A narrow `rehypeSafeImg` plugin used to promote\n * a lone `<img …>` — the one thing MDXEditor emitted for a *resized* image —\n * and was deleted along with the editor that produced it, since nothing\n * writes that markup anymore.\n *\n * Do not reach for `rehype-raw` to bring the capability back: this renders\n * content authored by one user to another, so every raw tag becoming live\n * markup turns every markdown surface in every app into an injection point.\n */\nexport const MarkdownView = (props: MarkdownViewProps) => {\n return (\n <div className=\"max-w-none text-sm leading-relaxed\">\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[\n [rehypeHighlight, { detect: true, ignoreMissing: true }],\n ]}\n components={{\n h1: ({ children }) => (\n <h1 className=\"mt-6 mb-3 text-2xl font-semibold tracking-tight\">\n {children}\n </h1>\n ),\n h2: ({ children }) => (\n <h2 className=\"mt-6 mb-2 text-xl font-semibold tracking-tight\">\n {children}\n </h2>\n ),\n h3: ({ children }) => (\n <h3 className=\"mt-4 mb-2 text-base font-semibold\">{children}</h3>\n ),\n p: ({ children }) => <p className=\"my-3\">{children}</p>,\n ul: ({ children }) => (\n <ul className=\"my-3 list-disc space-y-1 pl-5\">{children}</ul>\n ),\n ol: ({ children }) => (\n <ol className=\"my-3 list-decimal space-y-1 pl-5\">{children}</ol>\n ),\n li: ({ children }) => <li className=\"pl-1\">{children}</li>,\n a: ({ href, children }) => (\n <a\n href={href}\n className=\"text-primary underline decoration-primary/50 underline-offset-4 hover:decoration-primary\"\n >\n {children}\n </a>\n ),\n code: ({ children, className }) => {\n const isBlock =\n className?.includes(\"language-\") || className?.includes(\"hljs\");\n if (isBlock) {\n return <code className={`${className} text-xs`}>{children}</code>;\n }\n return (\n <code className=\"bg-muted rounded px-1.5 py-0.5 text-[0.85em] font-mono\">\n {children}\n </code>\n );\n },\n pre: ({ children }) => (\n <pre className=\"border-border my-4 overflow-auto rounded-md border bg-transparent p-3 text-xs\">\n {children}\n </pre>\n ),\n blockquote: ({ children }) => (\n <blockquote className=\"border-muted-foreground/30 my-3 border-l-2 pl-4 italic\">\n {children}\n </blockquote>\n ),\n hr: () => <hr className=\"border-border my-6\" />,\n table: ({ children }) => (\n <table className=\"my-4 border-collapse text-xs\">{children}</table>\n ),\n th: ({ children }) => (\n <th className=\"border-border border px-2 py-1 text-left font-medium\">\n {children}\n </th>\n ),\n td: ({ children }) => (\n <td className=\"border-border border px-2 py-1\">{children}</td>\n ),\n }}\n >\n {props.content}\n </ReactMarkdown>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,gBAAgB,UAA6B;CACxD,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,eAAD;GACE,eAAe,CAAC,SAAS;GACzB,eAAe,CACb,CAAC,iBAAiB;IAAE,QAAQ;IAAM,eAAe;GAAK,CAAC,CACzD;GACA,YAAY;IACV,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAqC;IAAa,CAAA;IAElE,IAAI,EAAE,eAAe,oBAAC,KAAD;KAAG,WAAU;KAAQ;IAAY,CAAA;IACtD,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAiC;IAAa,CAAA;IAE9D,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAoC;IAAa,CAAA;IAEjE,KAAK,EAAE,eAAe,oBAAC,MAAD;KAAI,WAAU;KAAQ;IAAa,CAAA;IACzD,IAAI,EAAE,MAAM,eACV,oBAAC,KAAD;KACQ;KACN,WAAU;KAET;IACA,CAAA;IAEL,OAAO,EAAE,UAAU,gBAAgB;KAGjC,IADE,WAAW,SAAS,WAAW,KAAK,WAAW,SAAS,MAAM,GAE9D,OAAO,oBAAC,QAAD;MAAM,WAAW,GAAG,UAAU;MAAY;KAAe,CAAA;KAElE,OACE,oBAAC,QAAD;MAAM,WAAU;MACb;KACG,CAAA;IAEV;IACA,MAAM,EAAE,eACN,oBAAC,OAAD;KAAK,WAAU;KACZ;IACE,CAAA;IAEP,aAAa,EAAE,eACb,oBAAC,cAAD;KAAY,WAAU;KACnB;IACS,CAAA;IAEd,UAAU,oBAAC,MAAD,EAAI,WAAU,qBAAsB,CAAA;IAC9C,QAAQ,EAAE,eACR,oBAAC,SAAD;KAAO,WAAU;KAAgC;IAAgB,CAAA;IAEnE,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAkC;IAAa,CAAA;GAEjE;GAEC,UAAA,MAAM;EACM,CAAA;CACZ,CAAA;AAET"}
1
+ {"version":3,"file":"markdown-view.js","names":["pre"],"sources":["../../../src/components/markdown-view/markdown-view.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport \"./markdown-view.css\";\nimport { lazy, Suspense } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport remarkGfm from \"remark-gfm\";\n\nimport { DiagramErrorBoundary } from \"./diagram/DiagramErrorBoundary.tsx\";\n\n/**\n * Parser + `graphre` + emitter, pulled in ONLY when a document actually\n * contains a mermaid fence.\n *\n * This is the constraint the whole diagram layer exists under: a document\n * with no diagram must pay nothing at all. One with a diagram pays roughly\n * 20-25 kB gzip once, then it is cached.\n *\n * ⚠️ A lazy import a bundler decides to inline fails silently: the feature\n * still works and the cost moves into the entry chunk. After changing this,\n * build and confirm `graphre` is in a chunk of its own:\n *\n * yarn w lore build\n * grep -rl addBorderSegments apps/lore/dist/\n */\nconst MermaidFence = lazy(() => import(\"./diagram/MermaidFence.tsx\"));\n\nexport interface MarkdownViewProps {\n content: string;\n /**\n * Extra classes for the prose root, merged after the defaults so a caller\n * can set its own reading face or measure. The defaults it overrides are\n * `text-sm leading-relaxed` — a surface that sets prose in a display serif\n * needs both, and no parent wrapper can supply them, since they sit on\n * this element rather than being inherited.\n */\n className?: string;\n}\n\n/**\n * Renders markdown as formatted prose.\n *\n * ## Diagrams\n *\n * A ` ```mermaid ` fence containing a **`flowchart`** is drawn as an SVG\n * diagram instead of a code block, themed from the app's own CSS variables\n * so dark mode needs no second palette. The renderer is in-house: only\n * layout is imported (`graphre`, dagre in TypeScript, ~15.5 kB gzip), and\n * the whole thing is one lazy chunk pulled in only when a document actually\n * contains a fence, so a document with no diagram pays nothing.\n *\n * The drawn subset is `flowchart TD|TB|LR|RL|BT`; the four node shapes\n * `[rect]` `(rounded)` `{diamond}` `((circle))`, with every other mermaid\n * bracket pair consumed and mapped onto them; edges `-->` `---` `-.->`\n * `==>` `<-->` with labels in both the `-->|text|` and `-- text -->` forms;\n * chains, `&` fans, `<br/>` line breaks and nested `subgraph`.\n *\n * **Everything else degrades to the code block, silently.**\n * `sequenceDiagram`, `classDiagram`, `gantt` and mindmaps are not drawn,\n * `style` / `classDef` are ignored, and a parse failure or a graph past the\n * node cap renders the plain fence rather than an error. Agents write\n * invalid mermaid, and a red box in the middle of a document is worse than\n * a grey fence. See `packages/@alepha/ui/DOC.md` for the full table.\n *\n * ## Raw HTML\n *\n * No raw HTML is ever rendered as markup: react-markdown's default is to\n * escape a raw node to text, and this component deliberately mounts no\n * plugin that changes that. A narrow `rehypeSafeImg` plugin used to promote\n * a lone `<img …>` — the one thing MDXEditor emitted for a *resized* image —\n * and was deleted along with the editor that produced it, since nothing\n * writes that markup anymore.\n *\n * Do not reach for `rehype-raw` to bring the capability back: this renders\n * content authored by one user to another, so every raw tag becoming live\n * markup turns every markdown surface in every app into an injection point.\n */\nexport const MarkdownView = (props: MarkdownViewProps) => {\n return (\n <div\n className={`max-w-none text-sm leading-relaxed ${props.className ?? \"\"}`}\n >\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[\n // `plainText` claims the fence BEFORE highlighting runs: hljs would\n // otherwise tokenise the diagram source, and the fallback would be a\n // soup of spans instead of the text the author wrote.\n //\n // `ignoreMissing` is gone: it no longer exists in v7, where an\n // unknown language already produces a vfile message rather than a\n // throw.\n [rehypeHighlight, { detect: true, plainText: [\"mermaid\"] }],\n ]}\n components={{\n h1: ({ children }) => (\n <h1 className=\"mt-6 mb-3 text-2xl font-semibold tracking-tight\">\n {children}\n </h1>\n ),\n h2: ({ children }) => (\n <h2 className=\"mt-6 mb-2 text-xl font-semibold tracking-tight\">\n {children}\n </h2>\n ),\n h3: ({ children }) => (\n <h3 className=\"mt-4 mb-2 text-base font-semibold\">{children}</h3>\n ),\n p: ({ children }) => <p className=\"my-3\">{children}</p>,\n ul: ({ children }) => (\n <ul className=\"my-3 list-disc space-y-1 pl-5\">{children}</ul>\n ),\n ol: ({ children }) => (\n <ol className=\"my-3 list-decimal space-y-1 pl-5\">{children}</ol>\n ),\n li: ({ children }) => <li className=\"pl-1\">{children}</li>,\n a: ({ href, children }) => (\n <a\n href={href}\n className=\"text-primary decoration-primary/50 hover:decoration-primary underline underline-offset-4\"\n >\n {children}\n </a>\n ),\n code: ({ children, className }) => {\n const isBlock =\n className?.includes(\"language-\") || className?.includes(\"hljs\");\n if (isBlock) {\n return <code className={`${className} text-xs`}>{children}</code>;\n }\n return (\n <code className=\"bg-muted rounded px-1.5 py-0.5 font-mono text-[0.85em]\">\n {children}\n </code>\n );\n },\n pre: ({ children, node }) => {\n const block = (\n <pre className=\"border-border my-4 overflow-auto rounded-md border bg-transparent p-3 text-xs\">\n {children}\n </pre>\n );\n const source = mermaidSource(node);\n if (!source) return block;\n return (\n <DiagramErrorBoundary fallback={block}>\n {/*\n The loading state IS the code block: the fence is already on\n screen, and swapping it for the diagram when the chunk lands\n costs no spinner and no second layout.\n */}\n <Suspense fallback={block}>\n <MermaidFence source={source} fallback={block} />\n </Suspense>\n </DiagramErrorBoundary>\n );\n },\n blockquote: ({ children }) => (\n <blockquote className=\"border-muted-foreground/30 my-3 border-l-2 pl-4 italic\">\n {children}\n </blockquote>\n ),\n hr: () => <hr className=\"border-border my-6\" />,\n table: ({ children }) => (\n <table className=\"my-4 border-collapse text-xs\">{children}</table>\n ),\n th: ({ children }) => (\n <th className=\"border-border border px-2 py-1 text-left font-medium\">\n {children}\n </th>\n ),\n td: ({ children }) => (\n <td className=\"border-border border px-2 py-1\">{children}</td>\n ),\n }}\n >\n {props.content}\n </ReactMarkdown>\n </div>\n );\n};\n\n/**\n * The text of a ` ```mermaid ` fence, or `undefined` for every other `<pre>`.\n *\n * Reads the hast node rather than the rendered children because the source\n * has to arrive at the parser exactly as the author typed it, and walking React\n * children would mean reassembling it from whatever the renderer produced.\n *\n * The alternative wiring, a remark plugin, is more code for the same result:\n * `mdast-util-to-hast` applies `data.hName` to the `<code>` element BEFORE\n * wrapping it in `<pre>`, so renaming the code node still leaves the diagram\n * inside this bordered box. Going that way needs a custom node type and a\n * cast into `components`, whose type is keyed on intrinsic elements.\n */\nconst mermaidSource = (node: unknown): string | undefined => {\n const pre = node as\n | {\n children?: Array<{\n type?: string;\n tagName?: string;\n properties?: { className?: unknown };\n children?: Array<{ type?: string; value?: string }>;\n }>;\n }\n | undefined;\n const code = pre?.children?.[0];\n if (code?.type !== \"element\" || code.tagName !== \"code\") return undefined;\n\n const className = code.properties?.className;\n const names = Array.isArray(className)\n ? className.map(String)\n : typeof className === \"string\"\n ? className.split(/\\s+/)\n : [];\n if (!names.includes(\"language-mermaid\")) return undefined;\n\n const text = code.children\n ?.filter((child) => child.type === \"text\")\n .map((child) => child.value ?? \"\")\n .join(\"\");\n return text?.trim() ? text : undefined;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,eAAe,WAAW,OAAO,4BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDpE,MAAa,gBAAgB,UAA6B;CACxD,OACE,oBAAC,OAAD;EACE,WAAW,sCAAsC,MAAM,aAAa;EAEpE,UAAA,oBAAC,eAAD;GACE,eAAe,CAAC,SAAS;GACzB,eAAe,CAQb,CAAC,iBAAiB;IAAE,QAAQ;IAAM,WAAW,CAAC,SAAS;GAAE,CAAC,CAC5D;GACA,YAAY;IACV,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAqC;IAAa,CAAA;IAElE,IAAI,EAAE,eAAe,oBAAC,KAAD;KAAG,WAAU;KAAQ;IAAY,CAAA;IACtD,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAiC;IAAa,CAAA;IAE9D,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAoC;IAAa,CAAA;IAEjE,KAAK,EAAE,eAAe,oBAAC,MAAD;KAAI,WAAU;KAAQ;IAAa,CAAA;IACzD,IAAI,EAAE,MAAM,eACV,oBAAC,KAAD;KACQ;KACN,WAAU;KAET;IACA,CAAA;IAEL,OAAO,EAAE,UAAU,gBAAgB;KAGjC,IADE,WAAW,SAAS,WAAW,KAAK,WAAW,SAAS,MAAM,GAE9D,OAAO,oBAAC,QAAD;MAAM,WAAW,GAAG,UAAU;MAAY;KAAe,CAAA;KAElE,OACE,oBAAC,QAAD;MAAM,WAAU;MACb;KACG,CAAA;IAEV;IACA,MAAM,EAAE,UAAU,WAAW;KAC3B,MAAM,QACJ,oBAAC,OAAD;MAAK,WAAU;MACZ;KACE,CAAA;KAEP,MAAM,SAAS,cAAc,IAAI;KACjC,IAAI,CAAC,QAAQ,OAAO;KACpB,OACE,oBAAC,sBAAD;MAAsB,UAAU;MAM9B,UAAA,oBAAC,UAAD;OAAU,UAAU;OAClB,UAAA,oBAAC,cAAD;QAAsB;QAAQ,UAAU;OAAQ,CAAA;MACxC,CAAA;KACU,CAAA;IAE1B;IACA,aAAa,EAAE,eACb,oBAAC,cAAD;KAAY,WAAU;KACnB;IACS,CAAA;IAEd,UAAU,oBAAC,MAAD,EAAI,WAAU,qBAAsB,CAAA;IAC9C,QAAQ,EAAE,eACR,oBAAC,SAAD;KAAO,WAAU;KAAgC;IAAgB,CAAA;IAEnE,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KACX;IACC,CAAA;IAEN,KAAK,EAAE,eACL,oBAAC,MAAD;KAAI,WAAU;KAAkC;IAAa,CAAA;GAEjE;GAEC,UAAA,MAAM;EACM,CAAA;CACZ,CAAA;AAET;;;;;;;;;;;;;;AAeA,MAAM,iBAAiB,SAAsC;CAW3D,MAAM,OAAOA,MAAK,WAAW;CAC7B,IAAI,MAAM,SAAS,aAAa,KAAK,YAAY,QAAQ,OAAO,KAAA;CAEhE,MAAM,YAAY,KAAK,YAAY;CAMnC,IAAI,EALU,MAAM,QAAQ,SAAS,IACjC,UAAU,IAAI,MAAM,IACpB,OAAO,cAAc,WACnB,UAAU,MAAM,KAAK,IACrB,CAAC,EAAA,CACI,SAAS,kBAAkB,GAAG,OAAO,KAAA;CAEhD,MAAM,OAAO,KAAK,UACd,QAAQ,UAAU,MAAM,SAAS,MAAM,CAAC,CACzC,KAAK,UAAU,MAAM,SAAS,EAAE,CAAC,CACjC,KAAK,EAAE;CACV,OAAO,MAAM,KAAK,IAAI,OAAO,KAAA;AAC/B"}
@@ -8,7 +8,7 @@ export interface NavShellProps extends Omit<AppShellProps, "nav" | "breadcrumbs"
8
8
  */
9
9
  root: string;
10
10
  /**
11
- * Infer nav groups appended after the route-derived ones, for entries that
11
+ * Extra nav groups appended after the route-derived ones, for entries that
12
12
  * don't map to routes (external links, grouped sub-menus). Their `active`
13
13
  * state is computed from the current path (matching `href`), so callers only
14
14
  * supply structure. Most shells won't need this.
@@ -1 +1 @@
1
- {"version":3,"file":"nav-shell.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/nav-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEd,MAAM,2CAA2C,CAAC;AAOnD,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,aAAa,CAAC;IAClD;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,aAAa,gCAmB5C,CAAC"}
1
+ {"version":3,"file":"nav-shell.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/nav-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEd,MAAM,2CAA2C,CAAC;AAQnD,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,aAAa,EACb,KAAK,GAAG,aAAa,CACtB;IACC;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,aAAa,gCAmB5C,CAAC"}
@@ -1,5 +1,5 @@
1
- import { AppShell } from "../app-shell/app-shell.js";
2
1
  import { isActivePath } from "./nav-tree-util.js";
2
+ import { AppShell } from "../app-shell/app-shell.js";
3
3
  import { useNavBreadcrumbs } from "./use-nav-breadcrumbs.js";
4
4
  import { useNavTree } from "./use-nav-tree.js";
5
5
  import { useMemo } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"nav-shell.js","names":[],"sources":["../../../src/components/nav-shell/nav-shell.tsx"],"sourcesContent":["import {\n AppShell,\n type AppShellProps,\n type NavGroup,\n type NavItem,\n} from \"@alepha/ui/components/app-shell/app-shell\";\nimport { useRouterState } from \"alepha/react/router\";\nimport { useMemo } from \"react\";\nimport { isActivePath } from \"./nav-tree-util.ts\";\nimport { useNavBreadcrumbs } from \"./use-nav-breadcrumbs.ts\";\nimport { useNavTree } from \"./use-nav-tree.ts\";\n\nexport interface NavShellProps\n extends Omit<AppShellProps, \"nav\" | \"breadcrumbs\"> {\n /**\n * Route name that anchors this shell — typically the layout `$page` mounted\n * at the shell's base path (e.g. `/admin`). The sidebar and breadcrumbs are\n * derived from this page's subtree, so an app can host several shells (a `/`\n * app shell and a `/admin` shell), each scoped to its own routes.\n */\n root: string;\n /**\n * Infer nav groups appended after the route-derived ones, for entries that\n * don't map to routes (external links, grouped sub-menus). Their `active`\n * state is computed from the current path (matching `href`), so callers only\n * supply structure. Most shells won't need this.\n */\n extraNav?: NavGroup[];\n}\n\n/**\n * Data-driven {@link AppShell}: the sidebar nav and breadcrumb trail are\n * derived from the route tree under `root` (via each `$page`'s `nav`\n * metadata), instead of hand-maintained lists. Everything else — brand,\n * top-bar actions, layout variant, fill — passes straight through to\n * `AppShell`.\n */\nexport const NavShell = (props: NavShellProps) => {\n const { root, extraNav, ...appShellProps } = props;\n const derived = useNavTree({ root });\n const breadcrumbs = useNavBreadcrumbs({ root });\n const state = useRouterState();\n const current = state.url?.pathname ?? \"/\";\n\n const nav = useMemo(() => {\n if (!extraNav?.length) return derived;\n return [\n ...derived,\n ...extraNav.map((group) => ({\n ...group,\n items: markActive(group.items, current),\n })),\n ];\n }, [derived, extraNav, current]);\n\n return <AppShell {...appShellProps} nav={nav} breadcrumbs={breadcrumbs} />;\n};\n\n/**\n * Recursively set `active` on static nav items by matching their `href`\n * against the current path (a parent group highlights when a descendant is\n * active).\n */\nfunction markActive(items: NavItem[], current: string): NavItem[] {\n return items.map((item) => ({\n ...item,\n active: item.href ? isActivePath(current, item.href) : item.active,\n children: item.children\n ? markActive(item.children, current)\n : item.children,\n }));\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAa,YAAY,UAAyB;CAChD,MAAM,EAAE,MAAM,UAAU,GAAG,kBAAkB;CAC7C,MAAM,UAAU,WAAW,EAAE,KAAK,CAAC;CACnC,MAAM,cAAc,kBAAkB,EAAE,KAAK,CAAC;CAE9C,MAAM,UADQ,eACM,CAAC,CAAC,KAAK,YAAY;CAEvC,MAAM,MAAM,cAAc;EACxB,IAAI,CAAC,UAAU,QAAQ,OAAO;EAC9B,OAAO,CACL,GAAG,SACH,GAAG,SAAS,KAAK,WAAW;GAC1B,GAAG;GACH,OAAO,WAAW,MAAM,OAAO,OAAO;EACxC,EAAE,CACJ;CACF,GAAG;EAAC;EAAS;EAAU;CAAO,CAAC;CAE/B,OAAO,oBAAC,UAAD;EAAU,GAAI;EAAoB;EAAkB;CAAc,CAAA;AAC3E;;;;;;AAOA,SAAS,WAAW,OAAkB,SAA4B;CAChE,OAAO,MAAM,KAAK,UAAU;EAC1B,GAAG;EACH,QAAQ,KAAK,OAAO,aAAa,SAAS,KAAK,IAAI,IAAI,KAAK;EAC5D,UAAU,KAAK,WACX,WAAW,KAAK,UAAU,OAAO,IACjC,KAAK;CACX,EAAE;AACJ"}
1
+ {"version":3,"file":"nav-shell.js","names":[],"sources":["../../../src/components/nav-shell/nav-shell.tsx"],"sourcesContent":["import {\n AppShell,\n type AppShellProps,\n type NavGroup,\n type NavItem,\n} from \"@alepha/ui/components/app-shell/app-shell\";\nimport { useRouterState } from \"alepha/react/router\";\nimport { useMemo } from \"react\";\n\nimport { isActivePath } from \"./nav-tree-util.ts\";\nimport { useNavBreadcrumbs } from \"./use-nav-breadcrumbs.ts\";\nimport { useNavTree } from \"./use-nav-tree.ts\";\n\nexport interface NavShellProps extends Omit<\n AppShellProps,\n \"nav\" | \"breadcrumbs\"\n> {\n /**\n * Route name that anchors this shell — typically the layout `$page` mounted\n * at the shell's base path (e.g. `/admin`). The sidebar and breadcrumbs are\n * derived from this page's subtree, so an app can host several shells (a `/`\n * app shell and a `/admin` shell), each scoped to its own routes.\n */\n root: string;\n /**\n * Extra nav groups appended after the route-derived ones, for entries that\n * don't map to routes (external links, grouped sub-menus). Their `active`\n * state is computed from the current path (matching `href`), so callers only\n * supply structure. Most shells won't need this.\n */\n extraNav?: NavGroup[];\n}\n\n/**\n * Data-driven {@link AppShell}: the sidebar nav and breadcrumb trail are\n * derived from the route tree under `root` (via each `$page`'s `nav`\n * metadata), instead of hand-maintained lists. Everything else — brand,\n * top-bar actions, layout variant, fill — passes straight through to\n * `AppShell`.\n */\nexport const NavShell = (props: NavShellProps) => {\n const { root, extraNav, ...appShellProps } = props;\n const derived = useNavTree({ root });\n const breadcrumbs = useNavBreadcrumbs({ root });\n const state = useRouterState();\n const current = state.url?.pathname ?? \"/\";\n\n const nav = useMemo(() => {\n if (!extraNav?.length) return derived;\n return [\n ...derived,\n ...extraNav.map((group) => ({\n ...group,\n items: markActive(group.items, current),\n })),\n ];\n }, [derived, extraNav, current]);\n\n return <AppShell {...appShellProps} nav={nav} breadcrumbs={breadcrumbs} />;\n};\n\n/**\n * Recursively set `active` on static nav items by matching their `href`\n * against the current path (a parent group highlights when a descendant is\n * active).\n */\nfunction markActive(items: NavItem[], current: string): NavItem[] {\n return items.map((item) => ({\n ...item,\n active: item.href ? isActivePath(current, item.href) : item.active,\n children: item.children\n ? markActive(item.children, current)\n : item.children,\n }));\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAa,YAAY,UAAyB;CAChD,MAAM,EAAE,MAAM,UAAU,GAAG,kBAAkB;CAC7C,MAAM,UAAU,WAAW,EAAE,KAAK,CAAC;CACnC,MAAM,cAAc,kBAAkB,EAAE,KAAK,CAAC;CAE9C,MAAM,UADQ,eACM,CAAC,CAAC,KAAK,YAAY;CAEvC,MAAM,MAAM,cAAc;EACxB,IAAI,CAAC,UAAU,QAAQ,OAAO;EAC9B,OAAO,CACL,GAAG,SACH,GAAG,SAAS,KAAK,WAAW;GAC1B,GAAG;GACH,OAAO,WAAW,MAAM,OAAO,OAAO;EACxC,EAAE,CACJ;CACF,GAAG;EAAC;EAAS;EAAU;CAAO,CAAC;CAE/B,OAAO,oBAAC,UAAD;EAAU,GAAI;EAAoB;EAAkB;CAAc,CAAA;AAC3E;;;;;;AAOA,SAAS,WAAW,OAAkB,SAA4B;CAChE,OAAO,MAAM,KAAK,UAAU;EAC1B,GAAG;EACH,QAAQ,KAAK,OAAO,aAAa,SAAS,KAAK,IAAI,IAAI,KAAK;EAC5D,UAAU,KAAK,WACX,WAAW,KAAK,UAAU,OAAO,IACjC,KAAK;CACX,EAAE;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/spotlight.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,gCAkG9C,CAAC"}
1
+ {"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/spotlight.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,gCAkG9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.js","names":[],"sources":["../../../src/components/nav-shell/spotlight.tsx"],"sourcesContent":["import {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@alepha/ui/components/ui/command\";\nimport { useRouter } from \"alepha/react/router\";\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { type NavEntry, useNavEntries } from \"./use-nav-entries.ts\";\n\nexport interface SpotlightProps {\n /**\n * Route name anchoring the palette — the same `root` passed to\n * {@link NavShell}. The palette lists the navigable pages of that subtree,\n * derived from each page's `nav` metadata (label / icon / group / keywords /\n * description). One source for sidebar, breadcrumbs and palette.\n */\n root: string;\n /**\n * Controlled open state. Omit to let the palette manage its own state (it\n * still toggles on the keyboard shortcut).\n */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Search input placeholder.\n */\n placeholder?: string;\n /**\n * Message shown when nothing matches the query.\n */\n emptyMessage?: ReactNode;\n /**\n * Bind the global ⌘K / Ctrl+K shortcut to toggle the palette. Defaults to\n * `true`.\n */\n shortcut?: boolean;\n}\n\n/**\n * Command palette over the navigation tree. Opens on ⌘K / Ctrl+K (or via\n * controlled `open`), searches page labels / keywords / descriptions, and\n * navigates on select. Reads the same {@link useNavEntries} source as the\n * sidebar, so it never drifts from the routes.\n */\nexport const Spotlight = (props: SpotlightProps) => {\n const { root, placeholder = \"Search…\", shortcut = true } = props;\n const router = useRouter<any>();\n const entries = useNavEntries({ root });\n\n const isControlled = props.open !== undefined;\n const [internalOpen, setInternalOpen] = useState(false);\n const open = isControlled ? !!props.open : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n props.onOpenChange?.(next);\n },\n [isControlled, props.onOpenChange],\n );\n\n useEffect(() => {\n if (!shortcut) return;\n const onKeyDown = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === \"k\") {\n event.preventDefault();\n setOpen(!open);\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [shortcut, open, setOpen]);\n\n // Bucket the already-sorted entries into their groups, preserving order.\n const groups = useMemo(() => {\n const out: { key: string; label?: string; items: NavEntry[] }[] = [];\n const byKey = new Map<string, NavEntry[]>();\n for (const entry of entries) {\n const key = entry.group ?? \"\";\n let items = byKey.get(key);\n if (!items) {\n items = [];\n byKey.set(key, items);\n out.push({ key, label: entry.group || undefined, items });\n }\n items.push(entry);\n }\n return out;\n }, [entries]);\n\n const onSelect = useCallback(\n (entry: NavEntry) => {\n if (entry.disabled) return;\n setOpen(false);\n router.push(entry.name);\n },\n [router, setOpen],\n );\n\n return (\n <CommandDialog\n open={open}\n onOpenChange={setOpen}\n title=\"Search\"\n description=\"Jump to a page\"\n >\n <Command>\n <CommandInput placeholder={placeholder} />\n <CommandList>\n <CommandEmpty>{props.emptyMessage ?? \"No results.\"}</CommandEmpty>\n {groups.map((group) => (\n <CommandGroup key={group.key || \"_ungrouped\"} heading={group.label}>\n {group.items.map((entry) => (\n <CommandItem\n key={entry.name}\n // cmdk matches the query against `value` + `keywords`;\n // include the human label plus any explicit synonyms.\n value={`${entry.name} ${toText(entry.label)}`}\n keywords={[\n toText(entry.label),\n toText(entry.description),\n ...(entry.keywords ?? []),\n entry.group ?? \"\",\n ].filter(Boolean)}\n disabled={entry.disabled}\n onSelect={() => onSelect(entry)}\n >\n {entry.icon}\n <span>{entry.label}</span>\n {entry.description ? (\n <span className=\"text-muted-foreground ml-2 truncate text-xs\">\n {entry.description}\n </span>\n ) : null}\n </CommandItem>\n ))}\n </CommandGroup>\n ))}\n </CommandList>\n </Command>\n </CommandDialog>\n );\n};\n\n/**\n * cmdk filters on plain text; coerce a ReactNode label to a searchable string\n * (component labels contribute nothing — callers should add `nav.keywords`).\n */\nfunction toText(node: ReactNode): string {\n return typeof node === \"string\" || typeof node === \"number\"\n ? String(node)\n : \"\";\n}\n"],"mappings":";;;;;;;;;;;;AAsDA,MAAa,aAAa,UAA0B;CAClD,MAAM,EAAE,MAAM,cAAc,WAAW,WAAW,SAAS;CAC3D,MAAM,SAAS,UAAe;CAC9B,MAAM,UAAU,cAAc,EAAE,KAAK,CAAC;CAEtC,MAAM,eAAe,MAAM,SAAS,KAAA;CACpC,MAAM,CAAC,cAAc,mBAAmB,SAAS,KAAK;CACtD,MAAM,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO;CAE3C,MAAM,UAAU,aACb,SAAkB;EACjB,IAAI,CAAC,cAAc,gBAAgB,IAAI;EACvC,MAAM,eAAe,IAAI;CAC3B,GACA,CAAC,cAAc,MAAM,YAAY,CACnC;CAEA,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,MAAM,aAAa,UAAyB;GAC1C,KAAK,MAAM,WAAW,MAAM,YAAY,MAAM,IAAI,YAAY,MAAM,KAAK;IACvE,MAAM,eAAe;IACrB,QAAQ,CAAC,IAAI;GACf;EACF;EACA,SAAS,iBAAiB,WAAW,SAAS;EAC9C,aAAa,SAAS,oBAAoB,WAAW,SAAS;CAChE,GAAG;EAAC;EAAU;EAAM;CAAO,CAAC;CAG5B,MAAM,SAAS,cAAc;EAC3B,MAAM,MAA4D,CAAC;EACnE,MAAM,wBAAQ,IAAI,IAAwB;EAC1C,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,MAAM,MAAM,SAAS;GAC3B,IAAI,QAAQ,MAAM,IAAI,GAAG;GACzB,IAAI,CAAC,OAAO;IACV,QAAQ,CAAC;IACT,MAAM,IAAI,KAAK,KAAK;IACpB,IAAI,KAAK;KAAE;KAAK,OAAO,MAAM,SAAS,KAAA;KAAW;IAAM,CAAC;GAC1D;GACA,MAAM,KAAK,KAAK;EAClB;EACA,OAAO;CACT,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,WAAW,aACd,UAAoB;EACnB,IAAI,MAAM,UAAU;EACpB,QAAQ,KAAK;EACb,OAAO,KAAK,MAAM,IAAI;CACxB,GACA,CAAC,QAAQ,OAAO,CAClB;CAEA,OACE,oBAAC,eAAD;EACQ;EACN,cAAc;EACd,OAAM;EACN,aAAY;EAEZ,UAAA,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAA2B,YAAc,CAAA,GACzC,qBAAC,aAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAAA,UAAe,MAAM,gBAAgB,cAA4B,CAAA,GAChE,OAAO,KAAK,UACX,oBAAC,cAAD;GAA8C,SAAS,MAAM;GAC1D,UAAA,MAAM,MAAM,KAAK,UAChB,qBAAC,aAAD;IAIE,OAAO,GAAG,MAAM,KAAK,GAAG,OAAO,MAAM,KAAK;IAC1C,UAAU;KACR,OAAO,MAAM,KAAK;KAClB,OAAO,MAAM,WAAW;KACxB,GAAI,MAAM,YAAY,CAAC;KACvB,MAAM,SAAS;IACjB,CAAC,CAAC,OAAO,OAAO;IAChB,UAAU,MAAM;IAChB,gBAAgB,SAAS,KAAK;IAZhC,UAAA;KAcG,MAAM;KACP,oBAAC,QAAD,EAAA,UAAO,MAAM,MAAY,CAAA;KACxB,MAAM,cACL,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,MAAM;KACH,CAAA,IACJ;IACO;GApBN,GAAA,MAAM,IAoBA,CACd;EACW,GAzBK,MAAM,OAAO,YAyBlB,CACf,CACU,EAAA,CAAA,CACN,EAAA,CAAA;CACI,CAAA;AAEnB;;;;;AAMA,SAAS,OAAO,MAAyB;CACvC,OAAO,OAAO,SAAS,YAAY,OAAO,SAAS,WAC/C,OAAO,IAAI,IACX;AACN"}
1
+ {"version":3,"file":"spotlight.js","names":[],"sources":["../../../src/components/nav-shell/spotlight.tsx"],"sourcesContent":["import {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@alepha/ui/components/ui/command\";\nimport { useRouter } from \"alepha/react/router\";\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport { type NavEntry, useNavEntries } from \"./use-nav-entries.ts\";\n\nexport interface SpotlightProps {\n /**\n * Route name anchoring the palette — the same `root` passed to\n * {@link NavShell}. The palette lists the navigable pages of that subtree,\n * derived from each page's `nav` metadata (label / icon / group / keywords /\n * description). One source for sidebar, breadcrumbs and palette.\n */\n root: string;\n /**\n * Controlled open state. Omit to let the palette manage its own state (it\n * still toggles on the keyboard shortcut).\n */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Search input placeholder.\n */\n placeholder?: string;\n /**\n * Message shown when nothing matches the query.\n */\n emptyMessage?: ReactNode;\n /**\n * Bind the global ⌘K / Ctrl+K shortcut to toggle the palette. Defaults to\n * `true`.\n */\n shortcut?: boolean;\n}\n\n/**\n * Command palette over the navigation tree. Opens on ⌘K / Ctrl+K (or via\n * controlled `open`), searches page labels / keywords / descriptions, and\n * navigates on select. Reads the same {@link useNavEntries} source as the\n * sidebar, so it never drifts from the routes.\n */\nexport const Spotlight = (props: SpotlightProps) => {\n const { root, placeholder = \"Search…\", shortcut = true } = props;\n const router = useRouter<any>();\n const entries = useNavEntries({ root });\n\n const isControlled = props.open !== undefined;\n const [internalOpen, setInternalOpen] = useState(false);\n const open = isControlled ? !!props.open : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n props.onOpenChange?.(next);\n },\n [isControlled, props.onOpenChange],\n );\n\n useEffect(() => {\n if (!shortcut) return;\n const onKeyDown = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === \"k\") {\n event.preventDefault();\n setOpen(!open);\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [shortcut, open, setOpen]);\n\n // Bucket the already-sorted entries into their groups, preserving order.\n const groups = useMemo(() => {\n const out: { key: string; label?: string; items: NavEntry[] }[] = [];\n const byKey = new Map<string, NavEntry[]>();\n for (const entry of entries) {\n const key = entry.group ?? \"\";\n let items = byKey.get(key);\n if (!items) {\n items = [];\n byKey.set(key, items);\n out.push({ key, label: entry.group || undefined, items });\n }\n items.push(entry);\n }\n return out;\n }, [entries]);\n\n const onSelect = useCallback(\n (entry: NavEntry) => {\n if (entry.disabled) return;\n setOpen(false);\n void router.push(entry.name);\n },\n [router, setOpen],\n );\n\n return (\n <CommandDialog\n open={open}\n onOpenChange={setOpen}\n title=\"Search\"\n description=\"Jump to a page\"\n >\n <Command>\n <CommandInput placeholder={placeholder} />\n <CommandList>\n <CommandEmpty>{props.emptyMessage ?? \"No results.\"}</CommandEmpty>\n {groups.map((group) => (\n <CommandGroup key={group.key || \"_ungrouped\"} heading={group.label}>\n {group.items.map((entry) => (\n <CommandItem\n key={entry.name}\n // cmdk matches the query against `value` + `keywords`;\n // include the human label plus any explicit synonyms.\n value={`${entry.name} ${toText(entry.label)}`}\n keywords={[\n toText(entry.label),\n toText(entry.description),\n ...(entry.keywords ?? []),\n entry.group ?? \"\",\n ].filter(Boolean)}\n disabled={entry.disabled}\n onSelect={() => onSelect(entry)}\n >\n {entry.icon}\n <span>{entry.label}</span>\n {entry.description ? (\n <span className=\"text-muted-foreground ml-2 truncate text-xs\">\n {entry.description}\n </span>\n ) : null}\n </CommandItem>\n ))}\n </CommandGroup>\n ))}\n </CommandList>\n </Command>\n </CommandDialog>\n );\n};\n\n/**\n * cmdk filters on plain text; coerce a ReactNode label to a searchable string\n * (component labels contribute nothing — callers should add `nav.keywords`).\n */\nfunction toText(node: ReactNode): string {\n return typeof node === \"string\" || typeof node === \"number\"\n ? String(node)\n : \"\";\n}\n"],"mappings":";;;;;;;;;;;;AAuDA,MAAa,aAAa,UAA0B;CAClD,MAAM,EAAE,MAAM,cAAc,WAAW,WAAW,SAAS;CAC3D,MAAM,SAAS,UAAe;CAC9B,MAAM,UAAU,cAAc,EAAE,KAAK,CAAC;CAEtC,MAAM,eAAe,MAAM,SAAS,KAAA;CACpC,MAAM,CAAC,cAAc,mBAAmB,SAAS,KAAK;CACtD,MAAM,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO;CAE3C,MAAM,UAAU,aACb,SAAkB;EACjB,IAAI,CAAC,cAAc,gBAAgB,IAAI;EACvC,MAAM,eAAe,IAAI;CAC3B,GACA,CAAC,cAAc,MAAM,YAAY,CACnC;CAEA,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,MAAM,aAAa,UAAyB;GAC1C,KAAK,MAAM,WAAW,MAAM,YAAY,MAAM,IAAI,YAAY,MAAM,KAAK;IACvE,MAAM,eAAe;IACrB,QAAQ,CAAC,IAAI;GACf;EACF;EACA,SAAS,iBAAiB,WAAW,SAAS;EAC9C,aAAa,SAAS,oBAAoB,WAAW,SAAS;CAChE,GAAG;EAAC;EAAU;EAAM;CAAO,CAAC;CAG5B,MAAM,SAAS,cAAc;EAC3B,MAAM,MAA4D,CAAC;EACnE,MAAM,wBAAQ,IAAI,IAAwB;EAC1C,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,MAAM,MAAM,SAAS;GAC3B,IAAI,QAAQ,MAAM,IAAI,GAAG;GACzB,IAAI,CAAC,OAAO;IACV,QAAQ,CAAC;IACT,MAAM,IAAI,KAAK,KAAK;IACpB,IAAI,KAAK;KAAE;KAAK,OAAO,MAAM,SAAS,KAAA;KAAW;IAAM,CAAC;GAC1D;GACA,MAAM,KAAK,KAAK;EAClB;EACA,OAAO;CACT,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,WAAW,aACd,UAAoB;EACnB,IAAI,MAAM,UAAU;EACpB,QAAQ,KAAK;EACb,OAAY,KAAK,MAAM,IAAI;CAC7B,GACA,CAAC,QAAQ,OAAO,CAClB;CAEA,OACE,oBAAC,eAAD;EACQ;EACN,cAAc;EACd,OAAM;EACN,aAAY;EAEZ,UAAA,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAA2B,YAAc,CAAA,GACzC,qBAAC,aAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAAA,UAAe,MAAM,gBAAgB,cAA4B,CAAA,GAChE,OAAO,KAAK,UACX,oBAAC,cAAD;GAA8C,SAAS,MAAM;GAC1D,UAAA,MAAM,MAAM,KAAK,UAChB,qBAAC,aAAD;IAIE,OAAO,GAAG,MAAM,KAAK,GAAG,OAAO,MAAM,KAAK;IAC1C,UAAU;KACR,OAAO,MAAM,KAAK;KAClB,OAAO,MAAM,WAAW;KACxB,GAAI,MAAM,YAAY,CAAC;KACvB,MAAM,SAAS;IACjB,CAAC,CAAC,OAAO,OAAO;IAChB,UAAU,MAAM;IAChB,gBAAgB,SAAS,KAAK;IAZhC,UAAA;KAcG,MAAM;KACP,oBAAC,QAAD,EAAA,UAAO,MAAM,MAAY,CAAA;KACxB,MAAM,cACL,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,MAAM;KACH,CAAA,IACJ;IACO;GApBN,GAAA,MAAM,IAoBA,CACd;EACW,GAzBK,MAAM,OAAO,YAyBlB,CACf,CACU,EAAA,CAAA,CACN,EAAA,CAAA;CACI,CAAA;AAEnB;;;;;AAMA,SAAS,OAAO,MAAyB;CACvC,OAAO,OAAO,SAAS,YAAY,OAAO,SAAS,WAC/C,OAAO,IAAI,IACX;AACN"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-breadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,QAAQ,EAAE,CAqBZ"}
1
+ {"version":3,"file":"use-nav-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-breadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,QAAQ,EAAE,CAqBZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-breadcrumbs.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-breadcrumbs.ts"],"sourcesContent":["import { useRouterState } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\nimport { navLabel } from \"./nav-tree-util.ts\";\n\nexport interface UseNavBreadcrumbsOptions {\n /**\n * Route name anchoring the shell. The trail starts at this layer and walks\n * down to the active leaf; ancestors above it (e.g. the global app layout)\n * are dropped.\n */\n root: string;\n}\n\nexport interface NavCrumb {\n label: ReactNode;\n href?: string;\n}\n\n/**\n * Derive the breadcrumb trail from the active route layers. Each rendered\n * layer that carries a route becomes a crumb (labelled via {@link navLabel});\n * the last one is the current page and is rendered without a link.\n *\n * Because the trail is the genuine nested-route chain, a detail page mounted\n * directly under the shell layout (rather than under its list page) yields\n * `Shell > Detail` — there is no synthetic \"list\" crumb in between.\n */\nexport function useNavBreadcrumbs(\n options: UseNavBreadcrumbsOptions,\n): NavCrumb[] {\n const state = useRouterState();\n\n return useMemo(() => {\n const layers = state.layers ?? [];\n const rootIndex = layers.findIndex((l) => l.route?.name === options.root);\n const chain = rootIndex >= 0 ? layers.slice(rootIndex) : layers;\n\n const crumbs: NavCrumb[] = [];\n for (const layer of chain) {\n const route = layer.route;\n if (!route) continue;\n crumbs.push({ label: navLabel(route), href: route.match });\n }\n\n // The current page is a label, not a link.\n if (crumbs.length > 0) {\n crumbs[crumbs.length - 1] = { label: crumbs[crumbs.length - 1].label };\n }\n return crumbs;\n }, [state.layers, options.root]);\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,SAAgB,kBACd,SACY;CACZ,MAAM,QAAQ,eAAe;CAE7B,OAAO,cAAc;EACnB,MAAM,SAAS,MAAM,UAAU,CAAC;EAChC,MAAM,YAAY,OAAO,WAAW,MAAM,EAAE,OAAO,SAAS,QAAQ,IAAI;EACxE,MAAM,QAAQ,aAAa,IAAI,OAAO,MAAM,SAAS,IAAI;EAEzD,MAAM,SAAqB,CAAC;EAC5B,KAAK,MAAM,SAAS,OAAO;GACzB,MAAM,QAAQ,MAAM;GACpB,IAAI,CAAC,OAAO;GACZ,OAAO,KAAK;IAAE,OAAO,SAAS,KAAK;IAAG,MAAM,MAAM;GAAM,CAAC;EAC3D;EAGA,IAAI,OAAO,SAAS,GAClB,OAAO,OAAO,SAAS,KAAK,EAAE,OAAO,OAAO,OAAO,SAAS,EAAE,CAAC,MAAM;EAEvE,OAAO;CACT,GAAG,CAAC,MAAM,QAAQ,QAAQ,IAAI,CAAC;AACjC"}
1
+ {"version":3,"file":"use-nav-breadcrumbs.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-breadcrumbs.ts"],"sourcesContent":["import { useRouterState } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { navLabel } from \"./nav-tree-util.ts\";\n\nexport interface UseNavBreadcrumbsOptions {\n /**\n * Route name anchoring the shell. The trail starts at this layer and walks\n * down to the active leaf; ancestors above it (e.g. the global app layout)\n * are dropped.\n */\n root: string;\n}\n\nexport interface NavCrumb {\n label: ReactNode;\n href?: string;\n}\n\n/**\n * Derive the breadcrumb trail from the active route layers. Each rendered\n * layer that carries a route becomes a crumb (labelled via {@link navLabel});\n * the last one is the current page and is rendered without a link.\n *\n * Because the trail is the genuine nested-route chain, a detail page mounted\n * directly under the shell layout (rather than under its list page) yields\n * `Shell > Detail` — there is no synthetic \"list\" crumb in between.\n */\nexport function useNavBreadcrumbs(\n options: UseNavBreadcrumbsOptions,\n): NavCrumb[] {\n const state = useRouterState();\n\n return useMemo(() => {\n const layers = state.layers ?? [];\n const rootIndex = layers.findIndex((l) => l.route?.name === options.root);\n const chain = rootIndex >= 0 ? layers.slice(rootIndex) : layers;\n\n const crumbs: NavCrumb[] = [];\n for (const layer of chain) {\n const route = layer.route;\n if (!route) continue;\n crumbs.push({ label: navLabel(route), href: route.match });\n }\n\n // The current page is a label, not a link.\n if (crumbs.length > 0) {\n crumbs[crumbs.length - 1] = { label: crumbs[crumbs.length - 1].label };\n }\n return crumbs;\n }, [state.layers, options.root]);\n}\n"],"mappings":";;;;;;;;;;;;;AA6BA,SAAgB,kBACd,SACY;CACZ,MAAM,QAAQ,eAAe;CAE7B,OAAO,cAAc;EACnB,MAAM,SAAS,MAAM,UAAU,CAAC;EAChC,MAAM,YAAY,OAAO,WAAW,MAAM,EAAE,OAAO,SAAS,QAAQ,IAAI;EACxE,MAAM,QAAQ,aAAa,IAAI,OAAO,MAAM,SAAS,IAAI;EAEzD,MAAM,SAAqB,CAAC;EAC5B,KAAK,MAAM,SAAS,OAAO;GACzB,MAAM,QAAQ,MAAM;GACpB,IAAI,CAAC,OAAO;GACZ,OAAO,KAAK;IAAE,OAAO,SAAS,KAAK;IAAG,MAAM,MAAM;GAAM,CAAC;EAC3D;EAGA,IAAI,OAAO,SAAS,GAClB,OAAO,OAAO,SAAS,KAAK,EAAE,OAAO,OAAO,OAAO,SAAS,EAAE,CAAC,MAAM;EAEvE,OAAO;CACT,GAAG,CAAC,MAAM,QAAQ,QAAQ,IAAI,CAAC;AACjC"}
@@ -12,21 +12,31 @@ export interface UseNavEntriesOptions {
12
12
  * ({@link Spotlight}) so both stay in sync from one source.
13
13
  */
14
14
  export interface NavEntry {
15
- /** Route name — used for navigation (`router.push(name)`) and as a stable key. */
15
+ /**
16
+ * Route name — used for navigation (`router.push(name)`) and as a stable key.
17
+ */
16
18
  name: string;
17
- /** Resolved pathname (the page's full `match`). */
19
+ /**
20
+ * Resolved pathname (the page's full `match`).
21
+ */
18
22
  href: string;
19
23
  label: ReactNode;
20
24
  icon?: ReactNode;
21
25
  group?: string;
22
- /** `nav.order` within the group. */
26
+ /**
27
+ * `nav.order` within the group.
28
+ */
23
29
  order: number;
24
- /** Smallest `order` in this entry's group — drives group ordering. */
30
+ /**
31
+ * Smallest `order` in this entry's group — drives group ordering.
32
+ */
25
33
  groupOrder: number;
26
34
  keywords?: string[];
27
35
  description?: ReactNode;
28
36
  badge?: ReactNode;
29
- /** `can()` returned `"disabled"` — show muted, block navigation. */
37
+ /**
38
+ * `can()` returned `"disabled"` — show muted, block navigation.
39
+ */
30
40
  disabled: boolean;
31
41
  /**
32
42
  * The current route is on or under this entry, and no sibling entry matched
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-entries.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-entries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,EAAE,CAqDvE"}
1
+ {"version":3,"file":"use-nav-entries.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-entries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,EAAE,CAqDvE"}
@@ -1,7 +1,7 @@
1
1
  import { hasNavPermission, isActivePath, isDescendantOf, keepDeepestActive, navLabel } from "./nav-tree-util.js";
2
2
  import { useMemo } from "react";
3
- import { useRouter, useRouterState } from "alepha/react/router";
4
3
  import { useAuth } from "alepha/react/auth";
4
+ import { useRouter, useRouterState } from "alepha/react/router";
5
5
  //#region src/components/nav-shell/use-nav-entries.ts
6
6
  /**
7
7
  * Flat, filtered, sorted list of nav entries for the subtree under `root`.
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-entries.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-entries.ts"],"sourcesContent":["import { useAuth } from \"alepha/react/auth\";\nimport { useRouter, useRouterState } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\nimport {\n hasNavPermission,\n isActivePath,\n isDescendantOf,\n keepDeepestActive,\n navLabel,\n} from \"./nav-tree-util.ts\";\n\nexport interface UseNavEntriesOptions {\n /**\n * Route name anchoring the shell — only descendant pages contribute entries.\n * See {@link UseNavTreeOptions}.\n */\n root: string;\n}\n\n/**\n * A single resolved navigation entry derived from a `$page`'s `nav` metadata.\n * Shared by the sidebar ({@link useNavTree}) and the command palette\n * ({@link Spotlight}) so both stay in sync from one source.\n */\nexport interface NavEntry {\n /** Route name — used for navigation (`router.push(name)`) and as a stable key. */\n name: string;\n /** Resolved pathname (the page's full `match`). */\n href: string;\n label: ReactNode;\n icon?: ReactNode;\n group?: string;\n /** `nav.order` within the group. */\n order: number;\n /** Smallest `order` in this entry's group — drives group ordering. */\n groupOrder: number;\n keywords?: string[];\n description?: ReactNode;\n badge?: ReactNode;\n /** `can()` returned `\"disabled\"` — show muted, block navigation. */\n disabled: boolean;\n /**\n * The current route is on or under this entry, and no sibling entry matched\n * it more specifically. At most one entry in a list is active — see\n * {@link keepDeepestActive}.\n */\n active: boolean;\n}\n\n/**\n * Flat, filtered, sorted list of nav entries for the subtree under `root`.\n * Filtering (hidden / permission / `can`), labelling and active-state matching\n * are applied here; consumers decide how to present them. Entries are sorted by\n * group order, then by item order.\n */\nexport function useNavEntries(options: UseNavEntriesOptions): NavEntry[] {\n const router = useRouter<any>();\n const state = useRouterState();\n const { has } = useAuth();\n const pages = router.pages;\n const current = state.url?.pathname ?? \"/\";\n\n return useMemo(() => {\n const entries: NavEntry[] = [];\n // Smallest order seen per group, so a group sorts by its earliest item.\n const groupOrders = new Map<string, number>();\n\n for (const page of pages) {\n const nav = page.nav;\n if (!nav || nav.hidden) continue;\n if (!isDescendantOf(page, options.root)) continue;\n if (!hasNavPermission(nav.permission, has)) continue;\n\n // `can` escape hatch: `false` hides, `\"disabled\"` shows muted.\n const canResult = page.can ? page.can({ has }) : true;\n if (canResult === false) continue;\n\n const order = nav.order ?? 0;\n const key = nav.group ?? \"\";\n const prev = groupOrders.get(key);\n if (prev === undefined || order < prev) groupOrders.set(key, order);\n\n entries.push({\n name: page.name,\n href: page.match,\n label: navLabel(page),\n icon: nav.icon,\n group: nav.group,\n order,\n groupOrder: 0,\n keywords: nav.keywords,\n description: nav.description,\n badge: nav.badge,\n disabled: canResult === \"disabled\",\n active: isActivePath(current, page.match),\n });\n }\n\n for (const entry of entries) {\n entry.groupOrder = groupOrders.get(entry.group ?? \"\") ?? 0;\n }\n entries.sort((a, b) => a.groupOrder - b.groupOrder || a.order - b.order);\n\n // `isActivePath` sees one entry at a time and so cannot tell that another\n // matched more specifically. Only now, with the whole set in hand, can the\n // shallower matches be dropped.\n return keepDeepestActive(entries);\n }, [pages, current, has, options.root]);\n}\n"],"mappings":";;;;;;;;;;;AAwDA,SAAgB,cAAc,SAA2C;CACvE,MAAM,SAAS,UAAe;CAC9B,MAAM,QAAQ,eAAe;CAC7B,MAAM,EAAE,QAAQ,QAAQ;CACxB,MAAM,QAAQ,OAAO;CACrB,MAAM,UAAU,MAAM,KAAK,YAAY;CAEvC,OAAO,cAAc;EACnB,MAAM,UAAsB,CAAC;EAE7B,MAAM,8BAAc,IAAI,IAAoB;EAE5C,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,KAAK;GACjB,IAAI,CAAC,OAAO,IAAI,QAAQ;GACxB,IAAI,CAAC,eAAe,MAAM,QAAQ,IAAI,GAAG;GACzC,IAAI,CAAC,iBAAiB,IAAI,YAAY,GAAG,GAAG;GAG5C,MAAM,YAAY,KAAK,MAAM,KAAK,IAAI,EAAE,IAAI,CAAC,IAAI;GACjD,IAAI,cAAc,OAAO;GAEzB,MAAM,QAAQ,IAAI,SAAS;GAC3B,MAAM,MAAM,IAAI,SAAS;GACzB,MAAM,OAAO,YAAY,IAAI,GAAG;GAChC,IAAI,SAAS,KAAA,KAAa,QAAQ,MAAM,YAAY,IAAI,KAAK,KAAK;GAElE,QAAQ,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,OAAO,SAAS,IAAI;IACpB,MAAM,IAAI;IACV,OAAO,IAAI;IACX;IACA,YAAY;IACZ,UAAU,IAAI;IACd,aAAa,IAAI;IACjB,OAAO,IAAI;IACX,UAAU,cAAc;IACxB,QAAQ,aAAa,SAAS,KAAK,KAAK;GAC1C,CAAC;EACH;EAEA,KAAK,MAAM,SAAS,SAClB,MAAM,aAAa,YAAY,IAAI,MAAM,SAAS,EAAE,KAAK;EAE3D,QAAQ,MAAM,GAAG,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK;EAKvE,OAAO,kBAAkB,OAAO;CAClC,GAAG;EAAC;EAAO;EAAS;EAAK,QAAQ;CAAI,CAAC;AACxC"}
1
+ {"version":3,"file":"use-nav-entries.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-entries.ts"],"sourcesContent":["import { useAuth } from \"alepha/react/auth\";\nimport { useRouter, useRouterState } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\n\nimport {\n hasNavPermission,\n isActivePath,\n isDescendantOf,\n keepDeepestActive,\n navLabel,\n} from \"./nav-tree-util.ts\";\n\nexport interface UseNavEntriesOptions {\n /**\n * Route name anchoring the shell — only descendant pages contribute entries.\n * See {@link UseNavTreeOptions}.\n */\n root: string;\n}\n\n/**\n * A single resolved navigation entry derived from a `$page`'s `nav` metadata.\n * Shared by the sidebar ({@link useNavTree}) and the command palette\n * ({@link Spotlight}) so both stay in sync from one source.\n */\nexport interface NavEntry {\n /**\n * Route name — used for navigation (`router.push(name)`) and as a stable key.\n */\n name: string;\n /**\n * Resolved pathname (the page's full `match`).\n */\n href: string;\n label: ReactNode;\n icon?: ReactNode;\n group?: string;\n /**\n * `nav.order` within the group.\n */\n order: number;\n /**\n * Smallest `order` in this entry's group — drives group ordering.\n */\n groupOrder: number;\n keywords?: string[];\n description?: ReactNode;\n badge?: ReactNode;\n /**\n * `can()` returned `\"disabled\"` — show muted, block navigation.\n */\n disabled: boolean;\n /**\n * The current route is on or under this entry, and no sibling entry matched\n * it more specifically. At most one entry in a list is active — see\n * {@link keepDeepestActive}.\n */\n active: boolean;\n}\n\n/**\n * Flat, filtered, sorted list of nav entries for the subtree under `root`.\n * Filtering (hidden / permission / `can`), labelling and active-state matching\n * are applied here; consumers decide how to present them. Entries are sorted by\n * group order, then by item order.\n */\nexport function useNavEntries(options: UseNavEntriesOptions): NavEntry[] {\n const router = useRouter<any>();\n const state = useRouterState();\n const { has } = useAuth();\n const pages = router.pages;\n const current = state.url?.pathname ?? \"/\";\n\n return useMemo(() => {\n const entries: NavEntry[] = [];\n // Smallest order seen per group, so a group sorts by its earliest item.\n const groupOrders = new Map<string, number>();\n\n for (const page of pages) {\n const nav = page.nav;\n if (!nav || nav.hidden) continue;\n if (!isDescendantOf(page, options.root)) continue;\n if (!hasNavPermission(nav.permission, has)) continue;\n\n // `can` escape hatch: `false` hides, `\"disabled\"` shows muted.\n const canResult = page.can ? page.can({ has }) : true;\n if (canResult === false) continue;\n\n const order = nav.order ?? 0;\n const key = nav.group ?? \"\";\n const prev = groupOrders.get(key);\n if (prev === undefined || order < prev) groupOrders.set(key, order);\n\n entries.push({\n name: page.name,\n href: page.match,\n label: navLabel(page),\n icon: nav.icon,\n group: nav.group,\n order,\n groupOrder: 0,\n keywords: nav.keywords,\n description: nav.description,\n badge: nav.badge,\n disabled: canResult === \"disabled\",\n active: isActivePath(current, page.match),\n });\n }\n\n for (const entry of entries) {\n entry.groupOrder = groupOrders.get(entry.group ?? \"\") ?? 0;\n }\n entries.sort((a, b) => a.groupOrder - b.groupOrder || a.order - b.order);\n\n // `isActivePath` sees one entry at a time and so cannot tell that another\n // matched more specifically. Only now, with the whole set in hand, can the\n // shallower matches be dropped.\n return keepDeepestActive(entries);\n }, [pages, current, has, options.root]);\n}\n"],"mappings":";;;;;;;;;;;AAmEA,SAAgB,cAAc,SAA2C;CACvE,MAAM,SAAS,UAAe;CAC9B,MAAM,QAAQ,eAAe;CAC7B,MAAM,EAAE,QAAQ,QAAQ;CACxB,MAAM,QAAQ,OAAO;CACrB,MAAM,UAAU,MAAM,KAAK,YAAY;CAEvC,OAAO,cAAc;EACnB,MAAM,UAAsB,CAAC;EAE7B,MAAM,8BAAc,IAAI,IAAoB;EAE5C,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,KAAK;GACjB,IAAI,CAAC,OAAO,IAAI,QAAQ;GACxB,IAAI,CAAC,eAAe,MAAM,QAAQ,IAAI,GAAG;GACzC,IAAI,CAAC,iBAAiB,IAAI,YAAY,GAAG,GAAG;GAG5C,MAAM,YAAY,KAAK,MAAM,KAAK,IAAI,EAAE,IAAI,CAAC,IAAI;GACjD,IAAI,cAAc,OAAO;GAEzB,MAAM,QAAQ,IAAI,SAAS;GAC3B,MAAM,MAAM,IAAI,SAAS;GACzB,MAAM,OAAO,YAAY,IAAI,GAAG;GAChC,IAAI,SAAS,KAAA,KAAa,QAAQ,MAAM,YAAY,IAAI,KAAK,KAAK;GAElE,QAAQ,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,OAAO,SAAS,IAAI;IACpB,MAAM,IAAI;IACV,OAAO,IAAI;IACX;IACA,YAAY;IACZ,UAAU,IAAI;IACd,aAAa,IAAI;IACjB,OAAO,IAAI;IACX,UAAU,cAAc;IACxB,QAAQ,aAAa,SAAS,KAAK,KAAK;GAC1C,CAAC;EACH;EAEA,KAAK,MAAM,SAAS,SAClB,MAAM,aAAa,YAAY,IAAI,MAAM,SAAS,EAAE,KAAK;EAE3D,QAAQ,MAAM,GAAG,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK;EAKvE,OAAO,kBAAkB,OAAO;CAClC,GAAG;EAAC;EAAO;EAAS;EAAK,QAAQ;CAAI,CAAC;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-tree.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAET,MAAM,2CAA2C,CAAC;AAInD,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,QAAQ,EAAE,CAsBjE"}
1
+ {"version":3,"file":"use-nav-tree.d.ts","sourceRoot":"","sources":["../../../src/components/nav-shell/use-nav-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAET,MAAM,2CAA2C,CAAC;AAKnD,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,QAAQ,EAAE,CAsBjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-tree.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-tree.ts"],"sourcesContent":["import type {\n NavGroup,\n NavItem,\n} from \"@alepha/ui/components/app-shell/app-shell\";\nimport { useMemo } from \"react\";\nimport { type NavEntry, useNavEntries } from \"./use-nav-entries.ts\";\n\nexport interface UseNavTreeOptions {\n /**\n * Route name that anchors the shell (e.g. the `/admin` layout page). Only\n * its descendant pages with `nav` metadata become entries — this is what\n * lets an app host several shells (a `/` app shell and a `/admin` shell),\n * each scoped to its own subtree.\n */\n root: string;\n}\n\n/**\n * Derive sidebar navigation groups from the route tree. Built on the shared\n * {@link useNavEntries} (which handles filtering, permissions, `can`, labelling\n * and active-state); this hook only buckets the already-sorted entries into\n * `nav.group` sections for {@link AppShell}.\n *\n * This replaces the hand-synced nav list that used to live alongside the\n * router and breadcrumb definitions.\n */\nexport function useNavTree(options: UseNavTreeOptions): NavGroup[] {\n const entries = useNavEntries(options);\n\n return useMemo(() => {\n const groups: NavGroup[] = [];\n const byKey = new Map<string, NavItem[]>();\n\n for (const entry of entries) {\n const key = entry.group ?? \"\";\n let items = byKey.get(key);\n if (!items) {\n items = [];\n byKey.set(key, items);\n // Entries are pre-sorted by (groupOrder, order), so the first time we\n // see a group it lands in the right position.\n groups.push({ label: entry.group || undefined, items });\n }\n items.push(toNavItem(entry));\n }\n\n return groups;\n }, [entries]);\n}\n\nfunction toNavItem(entry: NavEntry): NavItem {\n return {\n label: entry.label,\n href: entry.href,\n icon: entry.icon,\n badge: entry.badge,\n tooltip: entry.description,\n disabled: entry.disabled,\n active: entry.active,\n };\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,SAAgB,WAAW,SAAwC;CACjE,MAAM,UAAU,cAAc,OAAO;CAErC,OAAO,cAAc;EACnB,MAAM,SAAqB,CAAC;EAC5B,MAAM,wBAAQ,IAAI,IAAuB;EAEzC,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,MAAM,MAAM,SAAS;GAC3B,IAAI,QAAQ,MAAM,IAAI,GAAG;GACzB,IAAI,CAAC,OAAO;IACV,QAAQ,CAAC;IACT,MAAM,IAAI,KAAK,KAAK;IAGpB,OAAO,KAAK;KAAE,OAAO,MAAM,SAAS,KAAA;KAAW;IAAM,CAAC;GACxD;GACA,MAAM,KAAK,UAAU,KAAK,CAAC;EAC7B;EAEA,OAAO;CACT,GAAG,CAAC,OAAO,CAAC;AACd;AAEA,SAAS,UAAU,OAA0B;CAC3C,OAAO;EACL,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,SAAS,MAAM;EACf,UAAU,MAAM;EAChB,QAAQ,MAAM;CAChB;AACF"}
1
+ {"version":3,"file":"use-nav-tree.js","names":[],"sources":["../../../src/components/nav-shell/use-nav-tree.ts"],"sourcesContent":["import type {\n NavGroup,\n NavItem,\n} from \"@alepha/ui/components/app-shell/app-shell\";\nimport { useMemo } from \"react\";\n\nimport { type NavEntry, useNavEntries } from \"./use-nav-entries.ts\";\n\nexport interface UseNavTreeOptions {\n /**\n * Route name that anchors the shell (e.g. the `/admin` layout page). Only\n * its descendant pages with `nav` metadata become entries — this is what\n * lets an app host several shells (a `/` app shell and a `/admin` shell),\n * each scoped to its own subtree.\n */\n root: string;\n}\n\n/**\n * Derive sidebar navigation groups from the route tree. Built on the shared\n * {@link useNavEntries} (which handles filtering, permissions, `can`, labelling\n * and active-state); this hook only buckets the already-sorted entries into\n * `nav.group` sections for {@link AppShell}.\n *\n * This replaces the hand-synced nav list that used to live alongside the\n * router and breadcrumb definitions.\n */\nexport function useNavTree(options: UseNavTreeOptions): NavGroup[] {\n const entries = useNavEntries(options);\n\n return useMemo(() => {\n const groups: NavGroup[] = [];\n const byKey = new Map<string, NavItem[]>();\n\n for (const entry of entries) {\n const key = entry.group ?? \"\";\n let items = byKey.get(key);\n if (!items) {\n items = [];\n byKey.set(key, items);\n // Entries are pre-sorted by (groupOrder, order), so the first time we\n // see a group it lands in the right position.\n groups.push({ label: entry.group || undefined, items });\n }\n items.push(toNavItem(entry));\n }\n\n return groups;\n }, [entries]);\n}\n\nfunction toNavItem(entry: NavEntry): NavItem {\n return {\n label: entry.label,\n href: entry.href,\n icon: entry.icon,\n badge: entry.badge,\n tooltip: entry.description,\n disabled: entry.disabled,\n active: entry.active,\n };\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAgB,WAAW,SAAwC;CACjE,MAAM,UAAU,cAAc,OAAO;CAErC,OAAO,cAAc;EACnB,MAAM,SAAqB,CAAC;EAC5B,MAAM,wBAAQ,IAAI,IAAuB;EAEzC,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,MAAM,MAAM,SAAS;GAC3B,IAAI,QAAQ,MAAM,IAAI,GAAG;GACzB,IAAI,CAAC,OAAO;IACV,QAAQ,CAAC;IACT,MAAM,IAAI,KAAK,KAAK;IAGpB,OAAO,KAAK;KAAE,OAAO,MAAM,SAAS,KAAA;KAAW;IAAM,CAAC;GACxD;GACA,MAAM,KAAK,UAAU,KAAK,CAAC;EAC7B;EAEA,OAAO;CACT,GAAG,CAAC,OAAO,CAAC;AACd;AAEA,SAAS,UAAU,OAA0B;CAC3C,OAAO;EACL,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,SAAS,MAAM;EACf,UAAU,MAAM;EAChB,QAAQ,MAAM;CAChB;AACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The edge every settings card wears: a single 1px border, a 10px radius and
3
+ * the soft drop shadow. Padding is deliberately NOT in here: a row card, a
4
+ * table card and a form card each carry their own, and only the edge has to
5
+ * agree.
6
+ *
7
+ * It is a shared constant because the hand-written version had already drifted
8
+ * four ways across ten call sites: `py-4 shadow`, `py-3 shadow`, bare `shadow`
9
+ * and bare `<Card>`, so a settings page could show two cards side by side with
10
+ * visibly different edges (`/settings/kanban` had a 1px-bordered card directly
11
+ * above a borderless 14px-radius one).
12
+ *
13
+ * ⚠️ **`ring-0` is the load-bearing part.** `Card` draws its own edge with
14
+ * `ring-1 ring-foreground/10` and no border at all. Adding `border` without
15
+ * cancelling that ring does not replace the edge, it stacks a second one
16
+ * outside the first, and the card reads a pixel heavier than everything built
17
+ * the other way. Every historical variant here got that wrong in one direction
18
+ * or the other.
19
+ *
20
+ * `Card` itself cannot carry this: it lives in `components/ui/`, which
21
+ * `yarn w @alepha/ui sync` overwrites wholesale from the upstream registry, so
22
+ * a patch there vanishes on the next refresh.
23
+ */
24
+ export declare const settingsCardEdge = "bg-card rounded-lg border shadow-sm ring-0";
25
+ //# sourceMappingURL=settings-card-edge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-card-edge.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-card-edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gBAAgB,+CAA+C,CAAC"}
@@ -0,0 +1,29 @@
1
+ //#region src/components/settings/settings-card-edge.ts
2
+ /**
3
+ * The edge every settings card wears: a single 1px border, a 10px radius and
4
+ * the soft drop shadow. Padding is deliberately NOT in here: a row card, a
5
+ * table card and a form card each carry their own, and only the edge has to
6
+ * agree.
7
+ *
8
+ * It is a shared constant because the hand-written version had already drifted
9
+ * four ways across ten call sites: `py-4 shadow`, `py-3 shadow`, bare `shadow`
10
+ * and bare `<Card>`, so a settings page could show two cards side by side with
11
+ * visibly different edges (`/settings/kanban` had a 1px-bordered card directly
12
+ * above a borderless 14px-radius one).
13
+ *
14
+ * ⚠️ **`ring-0` is the load-bearing part.** `Card` draws its own edge with
15
+ * `ring-1 ring-foreground/10` and no border at all. Adding `border` without
16
+ * cancelling that ring does not replace the edge, it stacks a second one
17
+ * outside the first, and the card reads a pixel heavier than everything built
18
+ * the other way. Every historical variant here got that wrong in one direction
19
+ * or the other.
20
+ *
21
+ * `Card` itself cannot carry this: it lives in `components/ui/`, which
22
+ * `yarn w @alepha/ui sync` overwrites wholesale from the upstream registry, so
23
+ * a patch there vanishes on the next refresh.
24
+ */
25
+ const settingsCardEdge = "bg-card rounded-lg border shadow-sm ring-0";
26
+ //#endregion
27
+ export { settingsCardEdge };
28
+
29
+ //# sourceMappingURL=settings-card-edge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-card-edge.js","names":[],"sources":["../../../src/components/settings/settings-card-edge.ts"],"sourcesContent":["/**\n * The edge every settings card wears: a single 1px border, a 10px radius and\n * the soft drop shadow. Padding is deliberately NOT in here: a row card, a\n * table card and a form card each carry their own, and only the edge has to\n * agree.\n *\n * It is a shared constant because the hand-written version had already drifted\n * four ways across ten call sites: `py-4 shadow`, `py-3 shadow`, bare `shadow`\n * and bare `<Card>`, so a settings page could show two cards side by side with\n * visibly different edges (`/settings/kanban` had a 1px-bordered card directly\n * above a borderless 14px-radius one).\n *\n * ⚠️ **`ring-0` is the load-bearing part.** `Card` draws its own edge with\n * `ring-1 ring-foreground/10` and no border at all. Adding `border` without\n * cancelling that ring does not replace the edge, it stacks a second one\n * outside the first, and the card reads a pixel heavier than everything built\n * the other way. Every historical variant here got that wrong in one direction\n * or the other.\n *\n * `Card` itself cannot carry this: it lives in `components/ui/`, which\n * `yarn w @alepha/ui sync` overwrites wholesale from the upstream registry, so\n * a patch there vanishes on the next refresh.\n */\nexport const settingsCardEdge = \"bg-card rounded-lg border shadow-sm ring-0\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-danger-section.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-danger-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,UAAW,0BAA0B,gCAkBtE,CAAC"}
1
+ {"version":3,"file":"settings-danger-section.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-danger-section.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,UAAW,0BAA0B,gCAuBtE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { cn } from "../../lib/utils.js";
2
2
  import { Card } from "../ui/card.js";
3
+ import { settingsCardEdge } from "./settings-card-edge.js";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  //#region src/components/settings/settings-danger-section.tsx
5
6
  /**
@@ -31,7 +32,7 @@ const SettingsDangerSection = (props) => {
31
32
  children: props.description
32
33
  }) : null]
33
34
  }), /* @__PURE__ */ jsx(Card, {
34
- className: "gap-0 divide-y divide-destructive/20 rounded-lg border border-destructive/30 bg-card py-0",
35
+ className: cn(settingsCardEdge, "divide-destructive/20 border-destructive/30 gap-0 divide-y py-0"),
35
36
  children: props.children
36
37
  })]
37
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"settings-danger-section.js","names":[],"sources":["../../../src/components/settings/settings-danger-section.tsx"],"sourcesContent":["import { Card } from \"@alepha/ui/components/ui/card\";\nimport { cn } from \"@alepha/ui/lib/utils\";\nimport type { ReactNode } from \"react\";\n\nexport interface SettingsDangerSectionProps {\n /**\n * Heading above the card.\n *\n * @default \"Danger zone\"\n */\n title?: ReactNode;\n\n /**\n * One line under the title.\n */\n description?: ReactNode;\n\n /**\n * {@link SettingsRow}s, each holding a `variant=\"destructive\"` control.\n */\n children: ReactNode;\n\n className?: string;\n}\n\n/**\n * {@link SettingsSection} for irreversible actions — delete, leave, revoke\n * everything.\n *\n * Identical in structure, with a destructive-tinted border and title. The\n * colour is doing real work rather than decorating: these rows sit in the\n * same visual rhythm as every harmless row above them, and without a boundary\n * the only thing separating \"change your display name\" from \"delete your\n * account\" is the button colour at the moment of the click.\n *\n * The tint stays at 30–40% opacity on purpose. A full-strength destructive\n * border reads as *\"something is wrong\"* rather than *\"be careful here\"*, and\n * a settings page that looks like it is erroring every time you open it\n * teaches people to ignore the colour.\n */\nexport const SettingsDangerSection = (props: SettingsDangerSectionProps) => {\n const { title = \"Danger zone\" } = props;\n\n return (\n <div className={cn(\"flex flex-col gap-2\", props.className)}>\n <div className=\"flex flex-col gap-0.5\">\n <span className=\"text-destructive text-sm\">{title}</span>\n {props.description != null ? (\n <span className=\"text-muted-foreground text-xs\">\n {props.description}\n </span>\n ) : null}\n </div>\n <Card className=\"gap-0 divide-y divide-destructive/20 rounded-lg border border-destructive/30 bg-card py-0\">\n {props.children}\n </Card>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCA,MAAa,yBAAyB,UAAsC;CAC1E,MAAM,EAAE,QAAQ,kBAAkB;CAElC,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,uBAAuB,MAAM,SAAS;EAAzD,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,QAAD;IAAM,WAAU;IAA4B,UAAA;GAAY,CAAA,GACvD,MAAM,eAAe,OACpB,oBAAC,QAAD;IAAM,WAAU;IACb,UAAA,MAAM;GACH,CAAA,IACJ,IACD;EACL,CAAA,GAAA,oBAAC,MAAD;GAAM,WAAU;GACb,UAAA,MAAM;EACH,CAAA,CACH;;AAET"}
1
+ {"version":3,"file":"settings-danger-section.js","names":[],"sources":["../../../src/components/settings/settings-danger-section.tsx"],"sourcesContent":["import { settingsCardEdge } from \"@alepha/ui/components/settings/settings-card-edge.ts\";\nimport { Card } from \"@alepha/ui/components/ui/card\";\nimport { cn } from \"@alepha/ui/lib/utils\";\nimport type { ReactNode } from \"react\";\n\nexport interface SettingsDangerSectionProps {\n /**\n * Heading above the card.\n *\n * @default \"Danger zone\"\n */\n title?: ReactNode;\n\n /**\n * One line under the title.\n */\n description?: ReactNode;\n\n /**\n * {@link SettingsRow}s, each holding a `variant=\"destructive\"` control.\n */\n children: ReactNode;\n\n className?: string;\n}\n\n/**\n * {@link SettingsSection} for irreversible actions — delete, leave, revoke\n * everything.\n *\n * Identical in structure, with a destructive-tinted border and title. The\n * colour is doing real work rather than decorating: these rows sit in the\n * same visual rhythm as every harmless row above them, and without a boundary\n * the only thing separating \"change your display name\" from \"delete your\n * account\" is the button colour at the moment of the click.\n *\n * The tint stays at 30–40% opacity on purpose. A full-strength destructive\n * border reads as *\"something is wrong\"* rather than *\"be careful here\"*, and\n * a settings page that looks like it is erroring every time you open it\n * teaches people to ignore the colour.\n */\nexport const SettingsDangerSection = (props: SettingsDangerSectionProps) => {\n const { title = \"Danger zone\" } = props;\n\n return (\n <div className={cn(\"flex flex-col gap-2\", props.className)}>\n <div className=\"flex flex-col gap-0.5\">\n <span className=\"text-destructive text-sm\">{title}</span>\n {props.description != null ? (\n <span className=\"text-muted-foreground text-xs\">\n {props.description}\n </span>\n ) : null}\n </div>\n <Card\n className={cn(\n settingsCardEdge,\n \"divide-destructive/20 border-destructive/30 gap-0 divide-y py-0\",\n )}\n >\n {props.children}\n </Card>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,yBAAyB,UAAsC;CAC1E,MAAM,EAAE,QAAQ,kBAAkB;CAElC,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,uBAAuB,MAAM,SAAS;EAAzD,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,QAAD;IAAM,WAAU;IAA4B,UAAA;GAAY,CAAA,GACvD,MAAM,eAAe,OACpB,oBAAC,QAAD;IAAM,WAAU;IACb,UAAA,MAAM;GACH,CAAA,IACJ,IACD;EACL,CAAA,GAAA,oBAAC,MAAD;GACE,WAAW,GACT,kBACA,iEACF;GAEC,UAAA,MAAM;EACH,CAAA,CACH;;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-layout.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,cAAc,UAAW,mBAAmB,gCA4BxD,CAAC"}
1
+ {"version":3,"file":"settings-layout.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,cAAc,UAAW,mBAAmB,gCA2CxD,CAAC"}
@@ -44,7 +44,7 @@ const SettingsLayout = (props) => {
44
44
  }) : null, /* @__PURE__ */ jsxs("div", {
45
45
  className: cn("flex flex-col gap-6 md:flex-row md:items-start", props.fill && "md:min-h-0 md:flex-1 md:items-stretch"),
46
46
  children: [props.nav, /* @__PURE__ */ jsx("div", {
47
- className: cn("flex min-w-0 flex-1 flex-col gap-8", props.fill && "md:min-h-0 md:overflow-y-auto"),
47
+ className: cn("flex min-w-0 flex-1 flex-col gap-8", props.fill && "md:-mx-2 md:min-h-0 md:overflow-y-auto md:px-2"),
48
48
  children: props.children
49
49
  })]
50
50
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"settings-layout.js","names":[],"sources":["../../../src/components/settings/settings-layout.tsx"],"sourcesContent":["import { cn } from \"@alepha/ui/lib/utils\";\nimport type { ReactNode } from \"react\";\n\nexport interface SettingsLayoutProps {\n /**\n * The left rail — normally a {@link SettingsNav}. Omit for a settings page\n * with a single screen and nothing to navigate between.\n */\n nav?: ReactNode;\n\n /**\n * Full-width block above both columns: an identity card, a page title, a\n * back link. Rendered inside the centred container, so it lines up with the\n * content rather than the viewport.\n */\n header?: ReactNode;\n\n /**\n * The routed content — normally a `NestedView`.\n */\n children: ReactNode;\n\n /**\n * Bound the shell to its parent's height and give the content column its\n * own scrollbar, instead of letting the document scroll.\n *\n * Turn it on when this layout is mounted inside a host that has already\n * taken the viewport height and hidden its own overflow — an application\n * shell built as `h-svh … overflow-hidden`, which is the usual shape for an\n * app with a fixed header. In that host the default (below) has no scrollbar\n * to give: the document cannot scroll, so anything past the fold is simply\n * unreachable.\n *\n * The mode is deliberately not auto-detected. Reading the ancestor chain for\n * a clipping parent is a layout-effect away from a flash of the wrong shape\n * on every mount, and the host already knows the answer at boot.\n *\n * It serves both kinds of page at once, which is why there is one flag\n * rather than two:\n *\n * - A natural-height page (a stack of {@link SettingsSection} cards) exceeds\n * the column and scrolls it — the same reading experience as the default,\n * just against a nearer scroll root.\n * - A page that opts into `flex-1 min-h-0` is bounded by the column instead,\n * so it can hand the scroll to a child. That is what lets a table keep its\n * filters and pagination bar pinned while only its rows move.\n */\n fill?: boolean;\n\n className?: string;\n}\n\n/**\n * Centred two-column shell for a settings area: sticky rail on the left,\n * content on the right, stacked on small screens.\n *\n * `min-w-0` on the content column is load-bearing. A grid/flex child defaults\n * to `min-width: auto`, which is the *content's* intrinsic width — so one\n * unbreakable string (an API key, a long email, a `<pre>` block) makes the\n * column refuse to shrink and pushes the whole page into horizontal scroll,\n * rail included. `min-w-0` lets it shrink and lets the child's own\n * `overflow` handle it.\n *\n * By default there is no scroll container here and the page scrolls, because\n * a nested `overflow-auto` would strand the sticky rail against the wrong\n * scroll root. Pass {@link SettingsLayoutProps.fill} when the host has already\n * claimed the viewport height and clipped its own overflow, so there is no\n * page scroll left to inherit.\n *\n * `md:items-start` becomes `md:items-stretch` under `fill` so the content\n * column is as tall as the row rather than as tall as its content — a column\n * sized by its content can never be the thing that scrolls. The rail is\n * unaffected either way: it carries its own `md:self-start`, which outranks\n * whatever the row aligns to.\n *\n * ⚠️ **`fill` engages at `md` and up only, and the root keeps a scrollbar at\n * every width.** Below `md` the rail is not a rail: it stacks above the\n * content as a full list of links, which on a phone is most of the viewport.\n * Splitting what little is left into a second bounded pane gives a page a few\n * hundred pixels it cannot grow out of — a table lands in a box too short to\n * show a row, and because that table owns its own scroll, nothing above it can\n * scroll to make room. So the mobile shape stays the default one: the root\n * scrolls, rail and content together. At `md` and up the row is bounded, so\n * the root's scrollbar never has anything to show and the content column is\n * the scroll root instead.\n */\nexport const SettingsLayout = (props: SettingsLayoutProps) => {\n return (\n <div\n className={cn(\n \"mx-auto w-full max-w-5xl p-4 md:pt-10\",\n props.fill && \"flex h-full min-h-0 flex-col overflow-y-auto\",\n props.className,\n )}\n >\n {props.header ? <div className=\"mb-6\">{props.header}</div> : null}\n <div\n className={cn(\n \"flex flex-col gap-6 md:flex-row md:items-start\",\n props.fill && \"md:min-h-0 md:flex-1 md:items-stretch\",\n )}\n >\n {props.nav}\n <div\n className={cn(\n \"flex min-w-0 flex-1 flex-col gap-8\",\n props.fill && \"md:min-h-0 md:overflow-y-auto\",\n )}\n >\n {props.children}\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA,MAAa,kBAAkB,UAA+B;CAC5D,OACE,qBAAC,OAAD;EACE,WAAW,GACT,yCACA,MAAM,QAAQ,gDACd,MAAM,SACR;EALF,UAAA,CAOG,MAAM,SAAS,oBAAC,OAAD;GAAK,WAAU;GAAQ,UAAA,MAAM;EAAY,CAAA,IAAI,MAC7D,qBAAC,OAAD;GACE,WAAW,GACT,kDACA,MAAM,QAAQ,uCAChB;GAJF,UAAA,CAMG,MAAM,KACP,oBAAC,OAAD;IACE,WAAW,GACT,sCACA,MAAM,QAAQ,+BAChB;IAEC,UAAA,MAAM;GACJ,CAAA,CACF;EACF,CAAA,CAAA;;AAET"}
1
+ {"version":3,"file":"settings-layout.js","names":[],"sources":["../../../src/components/settings/settings-layout.tsx"],"sourcesContent":["import { cn } from \"@alepha/ui/lib/utils\";\nimport type { ReactNode } from \"react\";\n\nexport interface SettingsLayoutProps {\n /**\n * The left rail — normally a {@link SettingsNav}. Omit for a settings page\n * with a single screen and nothing to navigate between.\n */\n nav?: ReactNode;\n\n /**\n * Full-width block above both columns: an identity card, a page title, a\n * back link. Rendered inside the centred container, so it lines up with the\n * content rather than the viewport.\n */\n header?: ReactNode;\n\n /**\n * The routed content — normally a `NestedView`.\n */\n children: ReactNode;\n\n /**\n * Bound the shell to its parent's height and give the content column its\n * own scrollbar, instead of letting the document scroll.\n *\n * Turn it on when this layout is mounted inside a host that has already\n * taken the viewport height and hidden its own overflow — an application\n * shell built as `h-svh … overflow-hidden`, which is the usual shape for an\n * app with a fixed header. In that host the default (below) has no scrollbar\n * to give: the document cannot scroll, so anything past the fold is simply\n * unreachable.\n *\n * The mode is deliberately not auto-detected. Reading the ancestor chain for\n * a clipping parent is a layout-effect away from a flash of the wrong shape\n * on every mount, and the host already knows the answer at boot.\n *\n * It serves both kinds of page at once, which is why there is one flag\n * rather than two:\n *\n * - A natural-height page (a stack of {@link SettingsSection} cards) exceeds\n * the column and scrolls it — the same reading experience as the default,\n * just against a nearer scroll root.\n * - A page that opts into `flex-1 min-h-0` is bounded by the column instead,\n * so it can hand the scroll to a child. That is what lets a table keep its\n * filters and pagination bar pinned while only its rows move.\n */\n fill?: boolean;\n\n className?: string;\n}\n\n/**\n * Centred two-column shell for a settings area: sticky rail on the left,\n * content on the right, stacked on small screens.\n *\n * `min-w-0` on the content column is load-bearing. A grid/flex child defaults\n * to `min-width: auto`, which is the *content's* intrinsic width — so one\n * unbreakable string (an API key, a long email, a `<pre>` block) makes the\n * column refuse to shrink and pushes the whole page into horizontal scroll,\n * rail included. `min-w-0` lets it shrink and lets the child's own\n * `overflow` handle it.\n *\n * By default there is no scroll container here and the page scrolls, because\n * a nested `overflow-auto` would strand the sticky rail against the wrong\n * scroll root. Pass {@link SettingsLayoutProps.fill} when the host has already\n * claimed the viewport height and clipped its own overflow, so there is no\n * page scroll left to inherit.\n *\n * `md:items-start` becomes `md:items-stretch` under `fill` so the content\n * column is as tall as the row rather than as tall as its content — a column\n * sized by its content can never be the thing that scrolls. The rail is\n * unaffected either way: it carries its own `md:self-start`, which outranks\n * whatever the row aligns to.\n *\n * ⚠️ **`fill` engages at `md` and up only, and the root keeps a scrollbar at\n * every width.** Below `md` the rail is not a rail: it stacks above the\n * content as a full list of links, which on a phone is most of the viewport.\n * Splitting what little is left into a second bounded pane gives a page a few\n * hundred pixels it cannot grow out of — a table lands in a box too short to\n * show a row, and because that table owns its own scroll, nothing above it can\n * scroll to make room. So the mobile shape stays the default one: the root\n * scrolls, rail and content together. At `md` and up the row is bounded, so\n * the root's scrollbar never has anything to show and the content column is\n * the scroll root instead.\n */\nexport const SettingsLayout = (props: SettingsLayoutProps) => {\n return (\n <div\n className={cn(\n \"mx-auto w-full max-w-5xl p-4 md:pt-10\",\n props.fill && \"flex h-full min-h-0 flex-col overflow-y-auto\",\n props.className,\n )}\n >\n {props.header ? <div className=\"mb-6\">{props.header}</div> : null}\n <div\n className={cn(\n \"flex flex-col gap-6 md:flex-row md:items-start\",\n props.fill && \"md:min-h-0 md:flex-1 md:items-stretch\",\n )}\n >\n {props.nav}\n <div\n className={cn(\n \"flex min-w-0 flex-1 flex-col gap-8\",\n // `md:px-2 md:-mx-2` is not spacing, it is clip headroom, and it\n // only exists because of the `overflow-y-auto` on the same line.\n //\n // An element with `overflow-y: auto` cannot keep `overflow-x:\n // visible`, CSS computes the visible axis to `auto`, so this\n // column becomes a horizontal clipping box too. The cards inside\n // are exactly as wide as it is, which puts their edges on the clip\n // boundary; a border survives that (it is inside the border box)\n // but a ring or a `shadow-sm` does not, and the cards came out\n // looking shaved down both sides.\n //\n // The padding moves the boundary out from under the cards and the\n // equal negative margin takes the width straight back, so nothing\n // moves and nothing narrows. Plain padding would have fixed the\n // clipping by making every card 16px narrower instead.\n props.fill && \"md:-mx-2 md:min-h-0 md:overflow-y-auto md:px-2\",\n )}\n >\n {props.children}\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA,MAAa,kBAAkB,UAA+B;CAC5D,OACE,qBAAC,OAAD;EACE,WAAW,GACT,yCACA,MAAM,QAAQ,gDACd,MAAM,SACR;EALF,UAAA,CAOG,MAAM,SAAS,oBAAC,OAAD;GAAK,WAAU;GAAQ,UAAA,MAAM;EAAY,CAAA,IAAI,MAC7D,qBAAC,OAAD;GACE,WAAW,GACT,kDACA,MAAM,QAAQ,uCAChB;GAJF,UAAA,CAMG,MAAM,KACP,oBAAC,OAAD;IACE,WAAW,GACT,sCAgBA,MAAM,QAAQ,gDAChB;IAEC,UAAA,MAAM;GACJ,CAAA,CACF;EACF,CAAA,CAAA;;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,KAAK,EAAE,eAAe,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCA+ElD,CAAC"}
1
+ {"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../../src/components/settings/settings-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,KAAK,EAAE,eAAe,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAwFlD,CAAC"}
@@ -43,7 +43,7 @@ import { Link } from "alepha/react/router";
43
43
  * the thing to re-align.
44
44
  */
45
45
  const SettingsNav = (props) => {
46
- const entry = cn("flex items-center gap-2 whitespace-nowrap rounded-md px-2 text-left [&_svg]:size-4 [&_svg]:shrink-0", (props.size ?? "sm") === "sm" ? "h-7 text-xs" : "h-8 text-sm");
46
+ const entry = cn("flex items-center gap-2 rounded-md px-2 text-left whitespace-nowrap [&_svg]:size-4 [&_svg]:shrink-0", (props.size ?? "sm") === "sm" ? "h-7 text-xs" : "h-8 text-sm");
47
47
  const groups = useMemo(() => {
48
48
  const ordered = [];
49
49
  const byKey = /* @__PURE__ */ new Map();
@@ -70,7 +70,7 @@ const SettingsNav = (props) => {
70
70
  children: groups.map((group) => /* @__PURE__ */ jsxs("div", {
71
71
  className: "flex flex-col gap-0.5",
72
72
  children: [group.label ? /* @__PURE__ */ jsx("span", {
73
- className: "px-2 font-semibold text-[11px] text-muted-foreground uppercase tracking-wider",
73
+ className: "text-muted-foreground px-2 text-[11px] font-semibold tracking-wider uppercase",
74
74
  children: group.label
75
75
  }) : null, group.items.map((item) => item.disabled ? /* @__PURE__ */ jsxs("span", {
76
76
  "aria-disabled": "true",
@@ -79,7 +79,7 @@ const SettingsNav = (props) => {
79
79
  }, item.name) : /* @__PURE__ */ jsxs(Link, {
80
80
  href: item.href,
81
81
  "aria-current": item.active ? "page" : void 0,
82
- className: cn(entry, "transition-colors", item.active ? "bg-muted font-medium" : "text-muted-foreground hover:bg-muted/60"),
82
+ className: cn(entry, "transition-colors", item.active ? "bg-sidebar-accent text-sidebar-accent-foreground after:bg-sidebar-primary relative font-medium after:absolute after:top-1 after:bottom-1 after:left-0 after:w-[3px] after:rounded-full" : "text-muted-foreground hover:bg-muted/60"),
83
83
  children: [item.icon, item.label]
84
84
  }, item.name))]
85
85
  }, group.key))