@alepha/ui 0.30.0 → 0.31.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 (583) hide show
  1. package/dist/account/$pageAccount.d.ts +15 -7
  2. package/dist/account/$pageAccount.d.ts.map +1 -1
  3. package/dist/account/$pageAccount.js +15 -7
  4. package/dist/account/$pageAccount.js.map +1 -1
  5. package/dist/account/AccountBackToSiteMenuItem.d.ts +21 -0
  6. package/dist/account/AccountBackToSiteMenuItem.d.ts.map +1 -0
  7. package/dist/account/AccountBackToSiteMenuItem.js +32 -0
  8. package/dist/account/AccountBackToSiteMenuItem.js.map +1 -0
  9. package/dist/account/AccountBrand.d.ts +23 -0
  10. package/dist/account/AccountBrand.d.ts.map +1 -0
  11. package/dist/account/AccountBrand.js +47 -0
  12. package/dist/account/AccountBrand.js.map +1 -0
  13. package/dist/account/AccountConnections.d.ts +11 -6
  14. package/dist/account/AccountConnections.d.ts.map +1 -1
  15. package/dist/account/AccountConnections.js +103 -63
  16. package/dist/account/AccountConnections.js.map +1 -1
  17. package/dist/account/AccountDeleteDialog.js +4 -4
  18. package/dist/account/AccountDeleteDialog.js.map +1 -1
  19. package/dist/account/AccountKeys.d.ts +12 -8
  20. package/dist/account/AccountKeys.d.ts.map +1 -1
  21. package/dist/account/AccountKeys.js +236 -123
  22. package/dist/account/AccountKeys.js.map +1 -1
  23. package/dist/account/AccountLayout.d.ts +23 -24
  24. package/dist/account/AccountLayout.d.ts.map +1 -1
  25. package/dist/account/AccountLayout.js +79 -46
  26. package/dist/account/AccountLayout.js.map +1 -1
  27. package/dist/account/AccountMfaDialog.d.ts.map +1 -1
  28. package/dist/account/AccountMfaDialog.js +64 -75
  29. package/dist/account/AccountMfaDialog.js.map +1 -1
  30. package/dist/account/AccountPage.d.ts +28 -0
  31. package/dist/account/AccountPage.d.ts.map +1 -0
  32. package/dist/account/AccountPage.js +33 -0
  33. package/dist/account/AccountPage.js.map +1 -0
  34. package/dist/account/AccountPasswordDialog.js +3 -3
  35. package/dist/account/AccountPasswordDialog.js.map +1 -1
  36. package/dist/account/AccountProfile.d.ts.map +1 -1
  37. package/dist/account/AccountProfile.js +119 -115
  38. package/dist/account/AccountProfile.js.map +1 -1
  39. package/dist/account/AccountRecoveryCodes.d.ts +16 -0
  40. package/dist/account/AccountRecoveryCodes.d.ts.map +1 -0
  41. package/dist/account/AccountRecoveryCodes.js +46 -0
  42. package/dist/account/AccountRecoveryCodes.js.map +1 -0
  43. package/dist/account/AccountRecoveryCodesDialog.d.ts +16 -0
  44. package/dist/account/AccountRecoveryCodesDialog.d.ts.map +1 -0
  45. package/dist/account/AccountRecoveryCodesDialog.js +30 -0
  46. package/dist/account/AccountRecoveryCodesDialog.js.map +1 -0
  47. package/dist/account/AccountRouter.d.ts +61 -40
  48. package/dist/account/AccountRouter.d.ts.map +1 -1
  49. package/dist/account/AccountRouter.js +74 -48
  50. package/dist/account/AccountRouter.js.map +1 -1
  51. package/dist/account/AccountRouterOptions.d.ts +55 -26
  52. package/dist/account/AccountRouterOptions.d.ts.map +1 -1
  53. package/dist/account/AccountRouterOptions.js +1 -1
  54. package/dist/account/AccountRouterOptions.js.map +1 -1
  55. package/dist/account/AccountSecurity.d.ts.map +1 -1
  56. package/dist/account/AccountSecurity.js +129 -89
  57. package/dist/account/AccountSecurity.js.map +1 -1
  58. package/dist/account/AccountSessions.d.ts +16 -7
  59. package/dist/account/AccountSessions.d.ts.map +1 -1
  60. package/dist/account/AccountSessions.js +144 -98
  61. package/dist/account/AccountSessions.js.map +1 -1
  62. package/dist/account/ApiKeyCreateDialog.js +3 -3
  63. package/dist/account/ApiKeyCreateDialog.js.map +1 -1
  64. package/dist/account/ApiKeyScopeMatrix.js +1 -1
  65. package/dist/account/index.d.ts +4 -1
  66. package/dist/account/index.d.ts.map +1 -1
  67. package/dist/account/index.js +4 -1
  68. package/dist/admin/AdminAnalytics.js +2 -2
  69. package/dist/admin/AdminAudits.js +3 -3
  70. package/dist/admin/AdminDashboardCountCard.js +1 -1
  71. package/dist/admin/AdminFiles.d.ts.map +1 -1
  72. package/dist/admin/AdminFiles.js +7 -4
  73. package/dist/admin/AdminFiles.js.map +1 -1
  74. package/dist/admin/AdminFilesUsage.d.ts +4 -0
  75. package/dist/admin/AdminFilesUsage.d.ts.map +1 -1
  76. package/dist/admin/AdminFilesUsage.js +5 -2
  77. package/dist/admin/AdminFilesUsage.js.map +1 -1
  78. package/dist/admin/AdminFilesUsageCard.d.ts +12 -0
  79. package/dist/admin/AdminFilesUsageCard.d.ts.map +1 -1
  80. package/dist/admin/AdminFilesUsageCard.js +31 -3
  81. package/dist/admin/AdminFilesUsageCard.js.map +1 -1
  82. package/dist/admin/AdminJobDetail.js +3 -3
  83. package/dist/admin/AdminJobDetail.js.map +1 -1
  84. package/dist/admin/AdminJobDetailAside.js +1 -1
  85. package/dist/admin/AdminJobDetailExecutions.js +4 -4
  86. package/dist/admin/AdminJobDetailExecutions.js.map +1 -1
  87. package/dist/admin/AdminJobExecutionLogs.js +1 -1
  88. package/dist/admin/AdminJobExecutionLogs.js.map +1 -1
  89. package/dist/admin/AdminJobExecutionSheet.js +4 -4
  90. package/dist/admin/AdminJobExecutionSheet.js.map +1 -1
  91. package/dist/admin/AdminJobs.js +4 -4
  92. package/dist/admin/AdminJobs.js.map +1 -1
  93. package/dist/admin/AdminJobsPayloadDialog.js +1 -1
  94. package/dist/admin/AdminJobsTypeIcon.js +1 -1
  95. package/dist/admin/AdminKeys.js +6 -6
  96. package/dist/admin/AdminKeysTokenDialog.js +2 -2
  97. package/dist/admin/AdminKeysTokenDialog.js.map +1 -1
  98. package/dist/admin/AdminLayout.js +3 -3
  99. package/dist/admin/AdminNotifications.js +3 -3
  100. package/dist/admin/AdminNotificationsDetail.js +1 -1
  101. package/dist/admin/AdminNotificationsDetailTabs.js +1 -1
  102. package/dist/admin/AdminNotificationsPreviewTab.js +1 -1
  103. package/dist/admin/AdminParameters.d.ts.map +1 -1
  104. package/dist/admin/AdminParameters.js +2 -2
  105. package/dist/admin/AdminParameters.js.map +1 -1
  106. package/dist/admin/AdminParametersEditorForm.js +3 -3
  107. package/dist/admin/AdminParametersEditorForm.js.map +1 -1
  108. package/dist/admin/AdminParametersEditorPane.js +2 -2
  109. package/dist/admin/AdminParametersHistoryPane.js +2 -2
  110. package/dist/admin/AdminParametersTreeFooterActions.js +3 -3
  111. package/dist/admin/AdminParametersTreeFooterActions.js.map +1 -1
  112. package/dist/admin/AdminParametersTreeNodeView.js +4 -4
  113. package/dist/admin/AdminParametersTreeNodeView.js.map +1 -1
  114. package/dist/admin/AdminParametersTreePane.js +2 -2
  115. package/dist/admin/AdminParametersTreePane.js.map +1 -1
  116. package/dist/admin/AdminPayments.js +2 -2
  117. package/dist/admin/AdminRouter.js +1 -1
  118. package/dist/admin/AdminSessions.js +3 -3
  119. package/dist/admin/AdminUserAvatarControl.js +4 -4
  120. package/dist/admin/AdminUserAvatarControl.js.map +1 -1
  121. package/dist/admin/AdminUserDetail.d.ts.map +1 -1
  122. package/dist/admin/AdminUserDetail.js +5 -4
  123. package/dist/admin/AdminUserDetail.js.map +1 -1
  124. package/dist/admin/AdminUserDetailAuditsTab.js +1 -1
  125. package/dist/admin/AdminUserDetailIdentityAside.js +1 -1
  126. package/dist/admin/AdminUserDetailOverviewTab.js +1 -1
  127. package/dist/admin/AdminUserDetailPasswordDialog.js +2 -2
  128. package/dist/admin/AdminUserDetailPasswordDialog.js.map +1 -1
  129. package/dist/admin/AdminUserDetailSecurityTab.d.ts.map +1 -1
  130. package/dist/admin/AdminUserDetailSecurityTab.js +6 -4
  131. package/dist/admin/AdminUserDetailSecurityTab.js.map +1 -1
  132. package/dist/admin/AdminUserDetailSessionsTab.js +1 -1
  133. package/dist/admin/AdminUsers.js +4 -4
  134. package/dist/admin/AdminUsersRolesPicker.js +1 -1
  135. package/dist/admin/AdminUsersStatusBadge.js +1 -1
  136. package/dist/admin/ParameterDiffDialog.js +3 -3
  137. package/dist/admin/ParameterDiffDialog.js.map +1 -1
  138. package/dist/admin/ParameterHistoryItem.js +3 -3
  139. package/dist/admin/ParameterHistoryItem.js.map +1 -1
  140. package/dist/admin/ParameterJsonDialog.js +2 -2
  141. package/dist/admin/ParameterJsonDialog.js.map +1 -1
  142. package/dist/admin/ParameterSaveDialog.js +3 -3
  143. package/dist/admin/ParameterSaveDialog.js.map +1 -1
  144. package/dist/admin/analytics/AdvancedSection.js +1 -1
  145. package/dist/admin/analytics/AnalyticsEmpty.js +1 -1
  146. package/dist/admin/analytics/DatasetSelect.js +1 -1
  147. package/dist/admin/analytics/FilterEditor.js +4 -4
  148. package/dist/admin/analytics/FilterEditor.js.map +1 -1
  149. package/dist/admin/analytics/FilterValuePicker.js +3 -3
  150. package/dist/admin/analytics/FilterValuePicker.js.map +1 -1
  151. package/dist/admin/analytics/RequestDialog.js +2 -2
  152. package/dist/admin/analytics/RequestDialog.js.map +1 -1
  153. package/dist/admin/analytics/ResultsPane.js +2 -2
  154. package/dist/admin/analytics/ResultsPane.js.map +1 -1
  155. package/dist/admin/analytics/ResultsTable.d.ts.map +1 -1
  156. package/dist/admin/analytics/ResultsTable.js +2 -2
  157. package/dist/admin/analytics/ResultsTable.js.map +1 -1
  158. package/dist/admin/analytics/RunFooter.js +1 -1
  159. package/dist/admin/analytics/SamplingBadge.js +1 -1
  160. package/dist/admin/analytics/ToggleChip.js +1 -1
  161. package/dist/admin/analytics/ToggleChip.js.map +1 -1
  162. package/dist/admin/analytics/TruncationBanner.js +2 -2
  163. package/dist/admin/analytics/TruncationBanner.js.map +1 -1
  164. package/dist/admin/analytics/useAnalyticsQuery.js +1 -1
  165. package/dist/admin/analytics/useShapeLabels.js +1 -1
  166. package/dist/auth/AuthLogin.js +5 -5
  167. package/dist/auth/AuthLogin.js.map +1 -1
  168. package/dist/auth/AuthMfaStep.js +3 -3
  169. package/dist/auth/AuthMfaStep.js.map +1 -1
  170. package/dist/auth/AuthRegister.js +5 -5
  171. package/dist/auth/AuthRegister.js.map +1 -1
  172. package/dist/auth/AuthRegisterFormPhase.js +3 -3
  173. package/dist/auth/AuthRegisterFormPhase.js.map +1 -1
  174. package/dist/auth/AuthRegisterPasswordRules.js +1 -1
  175. package/dist/auth/AuthResetPassword.js +5 -5
  176. package/dist/auth/AuthResetPassword.js.map +1 -1
  177. package/dist/auth/AuthRouter.d.ts +2 -2
  178. package/dist/auth/AuthRouter.js +2 -2
  179. package/dist/auth/AuthRouter.js.map +1 -1
  180. package/dist/auth/AuthVerifyEmailStateful.js +2 -2
  181. package/dist/auth/AuthVerifyEmailView.js +3 -3
  182. package/dist/auth/AuthVerifyEmailView.js.map +1 -1
  183. package/dist/auth/safeRedirect.d.ts +3 -0
  184. package/dist/auth/safeRedirect.d.ts.map +1 -1
  185. package/dist/auth/safeRedirect.js +11 -0
  186. package/dist/auth/safeRedirect.js.map +1 -1
  187. package/dist/calendar/Calendar.js +3 -3
  188. package/dist/calendar/Calendar.js.map +1 -1
  189. package/dist/core/Alert.js +2 -2
  190. package/dist/core/Alert.js.map +1 -1
  191. package/dist/core/AlertDialog.js +1 -1
  192. package/dist/core/AlertDialog.js.map +1 -1
  193. package/dist/core/Badge.js +3 -3
  194. package/dist/core/Badge.js.map +1 -1
  195. package/dist/core/Button.d.ts +45 -3
  196. package/dist/core/Button.d.ts.map +1 -1
  197. package/dist/core/Button.js +155 -11
  198. package/dist/core/Button.js.map +1 -1
  199. package/dist/core/ButtonGroup.js +1 -1
  200. package/dist/core/Checkbox.js +1 -1
  201. package/dist/core/Checkbox.js.map +1 -1
  202. package/dist/core/Combobox.js +4 -4
  203. package/dist/core/Combobox.js.map +1 -1
  204. package/dist/core/ContextMenu.js +1 -1
  205. package/dist/core/ContextMenu.js.map +1 -1
  206. package/dist/core/Dialog.js +2 -2
  207. package/dist/core/Dialog.js.map +1 -1
  208. package/dist/core/DropdownMenu.js +2 -2
  209. package/dist/core/DropdownMenu.js.map +1 -1
  210. package/dist/core/Empty.js +1 -1
  211. package/dist/core/Input.js +1 -1
  212. package/dist/core/Input.js.map +1 -1
  213. package/dist/core/InputGroup.js +3 -3
  214. package/dist/core/InputGroup.js.map +1 -1
  215. package/dist/core/Menubar.js +2 -2
  216. package/dist/core/Menubar.js.map +1 -1
  217. package/dist/core/Pagination.js +1 -1
  218. package/dist/core/Pagination.js.map +1 -1
  219. package/dist/core/Segmented.d.ts.map +1 -1
  220. package/dist/core/Segmented.js +1 -1
  221. package/dist/core/Segmented.js.map +1 -1
  222. package/dist/core/Sheet.js +1 -1
  223. package/dist/core/Sheet.js.map +1 -1
  224. package/dist/core/Sidebar.js +4 -4
  225. package/dist/core/Sidebar.js.map +1 -1
  226. package/dist/core/Switch.js +1 -1
  227. package/dist/core/Switch.js.map +1 -1
  228. package/dist/core/Tabs.js +1 -1
  229. package/dist/core/Textarea.js +1 -1
  230. package/dist/core/Textarea.js.map +1 -1
  231. package/dist/core/TimeAgo.js +1 -1
  232. package/dist/core/index.d.ts +1 -1
  233. package/dist/core/index.d.ts.map +1 -1
  234. package/dist/core/index.js +19 -19
  235. package/dist/core/useDialog.d.ts.map +1 -1
  236. package/dist/core/useDialog.js +3 -3
  237. package/dist/core/useDialog.js.map +1 -1
  238. package/dist/form/AutoForm.d.ts +3 -1
  239. package/dist/form/AutoForm.d.ts.map +1 -1
  240. package/dist/form/AutoForm.js +3 -3
  241. package/dist/form/AutoForm.js.map +1 -1
  242. package/dist/form/AutoFormBottomBar.d.ts.map +1 -1
  243. package/dist/form/AutoFormBottomBar.js +5 -4
  244. package/dist/form/AutoFormBottomBar.js.map +1 -1
  245. package/dist/form/AutoFormErrorPopover.js +4 -4
  246. package/dist/form/AutoFormErrorPopover.js.map +1 -1
  247. package/dist/form/AutoFormGroupBlock.js +2 -2
  248. package/dist/form/AutoFormGroupGridField.js +1 -1
  249. package/dist/form/Control.d.ts +16 -0
  250. package/dist/form/Control.d.ts.map +1 -1
  251. package/dist/form/Control.js +20 -10
  252. package/dist/form/Control.js.map +1 -1
  253. package/dist/form/ControlArray.d.ts.map +1 -1
  254. package/dist/form/ControlArray.js +15 -14
  255. package/dist/form/ControlArray.js.map +1 -1
  256. package/dist/form/ControlDate.d.ts.map +1 -1
  257. package/dist/form/ControlDate.js +5 -2
  258. package/dist/form/ControlDate.js.map +1 -1
  259. package/dist/form/ControlDatePopover.js +1 -1
  260. package/dist/form/ControlDateRange.js +2 -2
  261. package/dist/form/ControlObject.js +7 -7
  262. package/dist/form/ControlObject.js.map +1 -1
  263. package/dist/form/ControlPassword.js +1 -1
  264. package/dist/form/ControlPassword.js.map +1 -1
  265. package/dist/form/ControlSelect.d.ts +3 -2
  266. package/dist/form/ControlSelect.d.ts.map +1 -1
  267. package/dist/form/ControlSelect.js +2 -2
  268. package/dist/form/ControlSelect.js.map +1 -1
  269. package/dist/form/ControlSelectCombobox.js +1 -1
  270. package/dist/form/ControlUpload.js +3 -3
  271. package/dist/form/ControlUpload.js.map +1 -1
  272. package/dist/form/FormField.js +5 -5
  273. package/dist/form/FormField.js.map +1 -1
  274. package/dist/form/fieldTrigger.js +1 -1
  275. package/dist/form/grid.d.ts +11 -0
  276. package/dist/form/grid.d.ts.map +1 -1
  277. package/dist/form/grid.js +17 -6
  278. package/dist/form/grid.js.map +1 -1
  279. package/dist/form/index.js +2 -2
  280. package/dist/i18n/fr/uiFr.d.ts.map +1 -1
  281. package/dist/i18n/fr/uiFr.js +41 -30
  282. package/dist/i18n/fr/uiFr.js.map +1 -1
  283. package/dist/markdown/MarkdownView.d.ts.map +1 -1
  284. package/dist/markdown/MarkdownView.js +5 -4
  285. package/dist/markdown/MarkdownView.js.map +1 -1
  286. package/dist/markdown/rehypeHighlight.d.ts +1 -1
  287. package/dist/markdown/rehypeHighlight.js +1 -1
  288. package/dist/markdown/rehypeHighlight.js.map +1 -1
  289. package/dist/organizations/MyOrganizationInvitations.d.ts +36 -0
  290. package/dist/organizations/MyOrganizationInvitations.d.ts.map +1 -1
  291. package/dist/organizations/MyOrganizationInvitations.js +116 -58
  292. package/dist/organizations/MyOrganizationInvitations.js.map +1 -1
  293. package/dist/organizations/MyOrganizations.js +4 -4
  294. package/dist/organizations/MyOrganizations.js.map +1 -1
  295. package/dist/organizations/OrganizationInviteDialog.js +2 -2
  296. package/dist/organizations/OrganizationInviteDialog.js.map +1 -1
  297. package/dist/organizations/OrganizationMemberIdentity.d.ts.map +1 -1
  298. package/dist/organizations/OrganizationMemberIdentity.js +1 -1
  299. package/dist/organizations/OrganizationMemberIdentity.js.map +1 -1
  300. package/dist/organizations/OrganizationMemberRankPicker.js +3 -3
  301. package/dist/organizations/OrganizationMembers.js +7 -7
  302. package/dist/organizations/OrganizationMembers.js.map +1 -1
  303. package/dist/organizations/OrganizationPendingInvitations.js +5 -5
  304. package/dist/organizations/OrganizationPendingInvitations.js.map +1 -1
  305. package/dist/organizations/OrganizationRankColumnHeader.d.ts +0 -1
  306. package/dist/organizations/OrganizationRankColumnHeader.d.ts.map +1 -1
  307. package/dist/organizations/OrganizationRankColumnHeader.js +26 -35
  308. package/dist/organizations/OrganizationRankColumnHeader.js.map +1 -1
  309. package/dist/organizations/OrganizationRanks.d.ts.map +1 -1
  310. package/dist/organizations/OrganizationRanks.js +7 -8
  311. package/dist/organizations/OrganizationRanks.js.map +1 -1
  312. package/dist/organizations/OrganizationTransferOwnershipDialog.js +3 -3
  313. package/dist/organizations/OrganizationTransferOwnershipDialog.js.map +1 -1
  314. package/dist/organizations/useInviteOrganizationMember.js +1 -1
  315. package/dist/organizations/useRevokeOrganizationInvitation.js +1 -1
  316. package/dist/otp/InputOTP.js +2 -2
  317. package/dist/otp/InputOTP.js.map +1 -1
  318. package/dist/settings/SettingsDangerSection.js +2 -2
  319. package/dist/settings/SettingsDangerSection.js.map +1 -1
  320. package/dist/settings/SettingsHeading.d.ts +1 -1
  321. package/dist/settings/SettingsHeading.js +1 -1
  322. package/dist/settings/SettingsHeading.js.map +1 -1
  323. package/dist/settings/SettingsSection.d.ts +1 -1
  324. package/dist/settings/SettingsSection.js +2 -2
  325. package/dist/settings/SettingsSection.js.map +1 -1
  326. package/dist/settings/index.js +2 -2
  327. package/dist/shell/AppActions.d.ts +2 -2
  328. package/dist/shell/AppActions.js +6 -6
  329. package/dist/shell/AppActions.js.map +1 -1
  330. package/dist/shell/AppShellSidebarNavItem.d.ts.map +1 -1
  331. package/dist/shell/AppShellSidebarNavItem.js +8 -2
  332. package/dist/shell/AppShellSidebarNavItem.js.map +1 -1
  333. package/dist/shell/AppShellStatefulSidebarTrigger.js +1 -1
  334. package/dist/shell/AppShellStatefulSidebarTrigger.js.map +1 -1
  335. package/dist/shell/ButtonDark.d.ts +2 -2
  336. package/dist/shell/ButtonDark.d.ts.map +1 -1
  337. package/dist/shell/ButtonDark.js +1 -1
  338. package/dist/shell/ButtonDark.js.map +1 -1
  339. package/dist/shell/ButtonInbox.d.ts +1 -1
  340. package/dist/shell/ButtonInbox.d.ts.map +1 -1
  341. package/dist/shell/ButtonInbox.js +7 -7
  342. package/dist/shell/ButtonInbox.js.map +1 -1
  343. package/dist/shell/ButtonLanguage.d.ts +2 -2
  344. package/dist/shell/ButtonLanguage.d.ts.map +1 -1
  345. package/dist/shell/ButtonLanguage.js +3 -3
  346. package/dist/shell/ButtonLanguage.js.map +1 -1
  347. package/dist/shell/ButtonSettings.d.ts +2 -2
  348. package/dist/shell/ButtonSettings.d.ts.map +1 -1
  349. package/dist/shell/ButtonSettings.js +2 -2
  350. package/dist/shell/ButtonSettings.js.map +1 -1
  351. package/dist/shell/ButtonSettingsLanguageMenu.js +1 -1
  352. package/dist/shell/ButtonSettingsThemeMenu.js +1 -1
  353. package/dist/shell/ButtonTheme.d.ts +2 -2
  354. package/dist/shell/ButtonTheme.d.ts.map +1 -1
  355. package/dist/shell/ButtonTheme.js +3 -3
  356. package/dist/shell/ButtonTheme.js.map +1 -1
  357. package/dist/shell/ButtonUser.d.ts +2 -2
  358. package/dist/shell/ButtonUser.d.ts.map +1 -1
  359. package/dist/shell/ButtonUser.js +4 -4
  360. package/dist/shell/ButtonUser.js.map +1 -1
  361. package/dist/shell/DetailAside.js +3 -3
  362. package/dist/shell/DetailAside.js.map +1 -1
  363. package/dist/shell/DetailLayout.js +2 -2
  364. package/dist/shell/DetailLayout.js.map +1 -1
  365. package/dist/shell/NavShell.js +1 -1
  366. package/dist/shell/NavigationProgress.js +1 -1
  367. package/dist/shell/PlateTabBar.d.ts.map +1 -1
  368. package/dist/shell/PlateTabBar.js +2 -2
  369. package/dist/shell/PlateTabBar.js.map +1 -1
  370. package/dist/shell/Spotlight.js +1 -1
  371. package/dist/shell/index.js +3 -3
  372. package/dist/shell/useNavBreadcrumbs.js +1 -1
  373. package/dist/shell/useNavEntries.js +1 -1
  374. package/dist/styles.css +89 -12
  375. package/dist/table/DataTable.js +3 -3
  376. package/dist/table/DataTableBody.js +1 -1
  377. package/dist/table/DataTableBulkBar.d.ts.map +1 -1
  378. package/dist/table/DataTableBulkBar.js +6 -3
  379. package/dist/table/DataTableBulkBar.js.map +1 -1
  380. package/dist/table/DataTableBulkMenu.d.ts.map +1 -1
  381. package/dist/table/DataTableBulkMenu.js +4 -3
  382. package/dist/table/DataTableBulkMenu.js.map +1 -1
  383. package/dist/table/DataTableColumnPicker.js +3 -3
  384. package/dist/table/DataTableColumnPicker.js.map +1 -1
  385. package/dist/table/DataTableFilterAdd.d.ts +7 -0
  386. package/dist/table/DataTableFilterAdd.d.ts.map +1 -1
  387. package/dist/table/DataTableFilterAdd.js +15 -6
  388. package/dist/table/DataTableFilterAdd.js.map +1 -1
  389. package/dist/table/DataTableFilterBar.d.ts.map +1 -1
  390. package/dist/table/DataTableFilterBar.js +12 -3
  391. package/dist/table/DataTableFilterBar.js.map +1 -1
  392. package/dist/table/DataTableFilterControl.d.ts +1 -1
  393. package/dist/table/DataTableFilterControl.js +2 -2
  394. package/dist/table/DataTableFilterControl.js.map +1 -1
  395. package/dist/table/DataTableFilterDialog.js +5 -5
  396. package/dist/table/DataTableFilterDialog.js.map +1 -1
  397. package/dist/table/DataTableFilterMenu.js +3 -3
  398. package/dist/table/DataTableFilterMenu.js.map +1 -1
  399. package/dist/table/DataTableFooter.d.ts.map +1 -1
  400. package/dist/table/DataTableFooter.js +1 -1
  401. package/dist/table/DataTableFooter.js.map +1 -1
  402. package/dist/table/DataTableHeaderRow.js +1 -1
  403. package/dist/table/DataTableHelpButton.js +2 -2
  404. package/dist/table/DataTableHelpButton.js.map +1 -1
  405. package/dist/table/DataTableRowActionsMenu.js +3 -3
  406. package/dist/table/DataTableRowActionsMenu.js.map +1 -1
  407. package/dist/table/DataTableToolbar.d.ts.map +1 -1
  408. package/dist/table/DataTableToolbar.js +4 -4
  409. package/dist/table/DataTableToolbar.js.map +1 -1
  410. package/dist/table/PermissionMatrixRowLabel.d.ts +1 -1
  411. package/dist/table/PermissionMatrixRowLabel.js +1 -1
  412. package/dist/table/PermissionMatrixRowLabel.js.map +1 -1
  413. package/dist/table/dataTableTypes.d.ts +12 -1
  414. package/dist/table/dataTableTypes.d.ts.map +1 -1
  415. package/dist/table/index.js +1 -1
  416. package/dist/table/useDataTableData.d.ts.map +1 -1
  417. package/dist/table/useDataTableData.js +13 -2
  418. package/dist/table/useDataTableData.js.map +1 -1
  419. package/dist/tree/TreeViewRenameInput.js +1 -1
  420. package/dist/tree/TreeViewResizer.js +1 -1
  421. package/package.json +17 -14
  422. package/src/account/$pageAccount.tsx +15 -7
  423. package/src/account/AccountBackToSiteMenuItem.tsx +46 -0
  424. package/src/account/AccountBrand.tsx +51 -0
  425. package/src/account/AccountConnections.tsx +154 -126
  426. package/src/account/AccountDeleteDialog.tsx +2 -2
  427. package/src/account/AccountKeys.tsx +277 -162
  428. package/src/account/AccountLayout.tsx +75 -84
  429. package/src/account/AccountMfaDialog.tsx +19 -38
  430. package/src/account/AccountPage.tsx +63 -0
  431. package/src/account/AccountPasswordDialog.tsx +1 -1
  432. package/src/account/AccountProfile.tsx +6 -4
  433. package/src/account/AccountRecoveryCodes.tsx +69 -0
  434. package/src/account/AccountRecoveryCodesDialog.tsx +47 -0
  435. package/src/account/AccountRouter.tsx +82 -50
  436. package/src/account/AccountRouterOptions.tsx +59 -27
  437. package/src/account/AccountSecurity.tsx +84 -12
  438. package/src/account/AccountSessions.tsx +214 -159
  439. package/src/account/ApiKeyCreateDialog.tsx +1 -1
  440. package/src/account/__tests__/AccountConnections.browser.spec.tsx +130 -0
  441. package/src/account/__tests__/AccountKeys.browser.spec.tsx +156 -0
  442. package/src/account/__tests__/AccountLayout.browser.spec.tsx +120 -30
  443. package/src/account/__tests__/AccountRecoveryCodes.browser.spec.tsx +118 -0
  444. package/src/account/__tests__/AccountRouter.spec.ts +34 -0
  445. package/src/account/__tests__/AccountSessions.browser.spec.tsx +199 -0
  446. package/src/account/index.ts +7 -1
  447. package/src/admin/AdminFiles.tsx +4 -1
  448. package/src/admin/AdminFilesUsage.tsx +10 -1
  449. package/src/admin/AdminFilesUsageCard.tsx +69 -2
  450. package/src/admin/AdminJobDetail.tsx +1 -1
  451. package/src/admin/AdminJobDetailExecutions.tsx +1 -1
  452. package/src/admin/AdminJobExecutionLogs.tsx +1 -1
  453. package/src/admin/AdminJobExecutionSheet.tsx +1 -1
  454. package/src/admin/AdminJobs.tsx +1 -1
  455. package/src/admin/AdminKeysTokenDialog.tsx +1 -1
  456. package/src/admin/AdminParameters.tsx +13 -14
  457. package/src/admin/AdminParametersEditorForm.tsx +2 -2
  458. package/src/admin/AdminParametersTreeFooterActions.tsx +2 -2
  459. package/src/admin/AdminParametersTreeNodeView.tsx +2 -2
  460. package/src/admin/AdminParametersTreePane.tsx +1 -1
  461. package/src/admin/AdminUserAvatarControl.tsx +2 -2
  462. package/src/admin/AdminUserDetail.tsx +3 -2
  463. package/src/admin/AdminUserDetailPasswordDialog.tsx +1 -1
  464. package/src/admin/AdminUserDetailSecurityTab.tsx +5 -3
  465. package/src/admin/ParameterDiffDialog.tsx +2 -2
  466. package/src/admin/ParameterHistoryItem.tsx +1 -1
  467. package/src/admin/ParameterJsonDialog.tsx +1 -1
  468. package/src/admin/ParameterSaveDialog.tsx +1 -1
  469. package/src/admin/__tests__/AdminFilesUsageCard.browser.spec.tsx +52 -2
  470. package/src/admin/analytics/FilterEditor.tsx +3 -3
  471. package/src/admin/analytics/FilterValuePicker.tsx +2 -2
  472. package/src/admin/analytics/RequestDialog.tsx +1 -1
  473. package/src/admin/analytics/ResultsPane.tsx +1 -1
  474. package/src/admin/analytics/ResultsTable.tsx +6 -1
  475. package/src/admin/analytics/ToggleChip.tsx +1 -1
  476. package/src/admin/analytics/TruncationBanner.tsx +1 -1
  477. package/src/auth/AuthLogin.tsx +2 -2
  478. package/src/auth/AuthMfaStep.tsx +2 -2
  479. package/src/auth/AuthRegister.tsx +2 -2
  480. package/src/auth/AuthRegisterFormPhase.tsx +1 -1
  481. package/src/auth/AuthResetPassword.tsx +2 -2
  482. package/src/auth/AuthRouter.tsx +2 -2
  483. package/src/auth/AuthVerifyEmailView.tsx +1 -1
  484. package/src/auth/__tests__/AuthRouter.spec.ts +2 -1
  485. package/src/auth/__tests__/safeRedirect.spec.ts +38 -0
  486. package/src/auth/safeRedirect.ts +13 -0
  487. package/src/calendar/Calendar.tsx +2 -2
  488. package/src/core/Alert.tsx +1 -1
  489. package/src/core/AlertDialog.tsx +1 -1
  490. package/src/core/Badge.tsx +2 -2
  491. package/src/core/Button.tsx +232 -18
  492. package/src/core/Checkbox.tsx +1 -1
  493. package/src/core/Combobox.tsx +4 -4
  494. package/src/core/ContextMenu.tsx +1 -1
  495. package/src/core/Dialog.tsx +2 -2
  496. package/src/core/DropdownMenu.tsx +1 -1
  497. package/src/core/Input.tsx +1 -1
  498. package/src/core/InputGroup.tsx +2 -2
  499. package/src/core/Menubar.tsx +1 -1
  500. package/src/core/Pagination.tsx +1 -1
  501. package/src/core/Segmented.tsx +6 -4
  502. package/src/core/Sheet.tsx +1 -1
  503. package/src/core/Sidebar.tsx +1 -1
  504. package/src/core/Switch.tsx +1 -1
  505. package/src/core/Textarea.tsx +1 -1
  506. package/src/core/index.ts +7 -1
  507. package/src/core/useDialog.tsx +3 -5
  508. package/src/form/AutoForm.tsx +3 -1
  509. package/src/form/AutoFormBottomBar.tsx +4 -3
  510. package/src/form/AutoFormErrorPopover.tsx +3 -3
  511. package/src/form/Control.tsx +53 -9
  512. package/src/form/ControlArray.tsx +13 -12
  513. package/src/form/ControlDate.tsx +4 -1
  514. package/src/form/ControlObject.tsx +6 -6
  515. package/src/form/ControlPassword.tsx +1 -1
  516. package/src/form/ControlSelect.tsx +3 -2
  517. package/src/form/ControlUpload.tsx +1 -1
  518. package/src/form/FormField.tsx +5 -5
  519. package/src/form/grid.tsx +17 -6
  520. package/src/i18n/fr/uiFr.ts +46 -33
  521. package/src/markdown/MarkdownView.tsx +5 -4
  522. package/src/markdown/rehypeHighlight.ts +1 -1
  523. package/src/organizations/MyOrganizationInvitations.tsx +177 -71
  524. package/src/organizations/MyOrganizations.tsx +1 -1
  525. package/src/organizations/OrganizationInviteDialog.tsx +1 -1
  526. package/src/organizations/OrganizationMemberIdentity.tsx +4 -1
  527. package/src/organizations/OrganizationMembers.tsx +3 -3
  528. package/src/organizations/OrganizationPendingInvitations.tsx +1 -1
  529. package/src/organizations/OrganizationRankColumnHeader.tsx +1 -8
  530. package/src/organizations/OrganizationRanks.tsx +2 -3
  531. package/src/organizations/OrganizationTransferOwnershipDialog.tsx +2 -2
  532. package/src/organizations/__tests__/MyOrganizationInvitations.browser.spec.tsx +61 -7
  533. package/src/organizations/__tests__/OrganizationRanks.browser.spec.tsx +34 -0
  534. package/src/otp/InputOTP.tsx +2 -2
  535. package/src/settings/SettingsDangerSection.tsx +2 -2
  536. package/src/settings/SettingsHeading.tsx +1 -1
  537. package/src/settings/SettingsSection.tsx +1 -1
  538. package/src/settings/__tests__/SettingsSection.browser.spec.tsx +3 -3
  539. package/src/shell/AppActions.tsx +6 -6
  540. package/src/shell/AppShellSidebarNavItem.tsx +17 -2
  541. package/src/shell/AppShellStatefulSidebarTrigger.tsx +1 -1
  542. package/src/shell/ButtonDark.tsx +3 -3
  543. package/src/shell/ButtonInbox.tsx +15 -5
  544. package/src/shell/ButtonLanguage.tsx +3 -3
  545. package/src/shell/ButtonSettings.tsx +3 -3
  546. package/src/shell/ButtonTheme.tsx +3 -3
  547. package/src/shell/ButtonUser.tsx +4 -4
  548. package/src/shell/DetailAside.tsx +1 -1
  549. package/src/shell/DetailLayout.tsx +1 -1
  550. package/src/shell/PlateTabBar.tsx +4 -2
  551. package/src/shell/__tests__/ActionErrorToaster.browser.spec.tsx +2 -2
  552. package/src/shell/__tests__/AppActions.browser.spec.tsx +1 -1
  553. package/src/shell/__tests__/ButtonInbox.browser.spec.tsx +12 -0
  554. package/src/shell/__tests__/NavigationProgress.browser.spec.tsx +2 -2
  555. package/src/styles.css +89 -12
  556. package/src/table/DataTableBulkBar.tsx +10 -3
  557. package/src/table/DataTableBulkMenu.tsx +2 -1
  558. package/src/table/DataTableColumnPicker.tsx +1 -1
  559. package/src/table/DataTableFilterAdd.tsx +55 -25
  560. package/src/table/DataTableFilterBar.tsx +16 -3
  561. package/src/table/DataTableFilterControl.tsx +1 -1
  562. package/src/table/DataTableFilterDialog.tsx +3 -3
  563. package/src/table/DataTableFilterMenu.tsx +1 -1
  564. package/src/table/DataTableFooter.tsx +31 -32
  565. package/src/table/DataTableHelpButton.tsx +1 -1
  566. package/src/table/DataTableRowActionsMenu.tsx +1 -1
  567. package/src/table/DataTableToolbar.tsx +11 -3
  568. package/src/table/PermissionMatrixRowLabel.tsx +1 -1
  569. package/src/table/__tests__/DataTableBulkBarChrome.browser.spec.tsx +87 -0
  570. package/src/table/__tests__/DataTableFilterDefaultBar.browser.spec.tsx +24 -0
  571. package/src/table/__tests__/DataTableNewestRequest.browser.spec.tsx +91 -0
  572. package/src/table/dataTableTypes.ts +14 -1
  573. package/src/table/useDataTableData.ts +24 -1
  574. package/dist/account/AccountHeader.d.ts +0 -33
  575. package/dist/account/AccountHeader.d.ts.map +0 -1
  576. package/dist/account/AccountHeader.js +0 -45
  577. package/dist/account/AccountHeader.js.map +0 -1
  578. package/dist/account/AccountKeysRow.d.ts +0 -22
  579. package/dist/account/AccountKeysRow.d.ts.map +0 -1
  580. package/dist/account/AccountKeysRow.js +0 -68
  581. package/dist/account/AccountKeysRow.js.map +0 -1
  582. package/src/account/AccountHeader.tsx +0 -66
  583. package/src/account/AccountKeysRow.tsx +0 -100
@@ -8,8 +8,8 @@ import { ButtonSettingsThemeMenu } from "./ButtonSettingsThemeMenu.js";
8
8
  import { ButtonTheme } from "./ButtonTheme.js";
9
9
  import { ButtonUser } from "./ButtonUser.js";
10
10
  import { useRouter } from "alepha/react/router";
11
- import "react";
12
11
  import { useI18n } from "alepha/react/i18n";
12
+ import "react";
13
13
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
14
14
  import { useAuth } from "alepha/react/auth";
15
15
  //#region src/shell/ButtonSettings.tsx
@@ -58,7 +58,7 @@ const ButtonSettings = (props) => {
58
58
  colorModeDark: given.colorModeDark ?? tr("shell.settings.colorModeDark", { default: "Dark" }),
59
59
  colorModeLight: given.colorModeLight ?? tr("shell.settings.colorModeLight", { default: "Light" })
60
60
  };
61
- const variant = props.variant ?? "ghost";
61
+ const variant = props.variant ?? "minimal";
62
62
  const inMenu = !!auth.user && (props.placement ?? "menu") === "menu";
63
63
  return /* @__PURE__ */ jsxs("div", {
64
64
  className: cn("flex items-center gap-1", props.className),
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSettings.js","names":[],"sources":["../../src/shell/ButtonSettings.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useAuth } from \"alepha/react/auth\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { useRouter } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\n\nimport { DropdownMenuSeparator } from \"../core/DropdownMenu.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { ButtonDark } from \"./ButtonDark.tsx\";\nimport { ButtonLanguage } from \"./ButtonLanguage.tsx\";\nimport { ButtonSettingsColorModeMenu } from \"./ButtonSettingsColorModeMenu.tsx\";\nimport { ButtonSettingsLanguageMenu } from \"./ButtonSettingsLanguageMenu.tsx\";\nimport { ButtonSettingsThemeMenu } from \"./ButtonSettingsThemeMenu.tsx\";\nimport { ButtonTheme } from \"./ButtonTheme.tsx\";\nimport { ButtonUser } from \"./ButtonUser.tsx\";\n\nexport interface ButtonSettingsProps {\n /**\n * Where language, theme and display mode go while the viewer is signed in.\n *\n * - `\"menu\"`: inside the account menu, between the destinations and\n * Logout, so the header carries one button.\n * - `\"buttons\"`: icon buttons left of the account button, the way\n * `AppActions` draws them.\n *\n * Signed out there is no menu to put them in, so they are buttons whatever\n * this says.\n *\n * @default \"menu\"\n */\n placement?: \"menu\" | \"buttons\";\n\n /**\n * Extra menu items appended to the account dropdown, below Admin Panel and\n * above the settings. For an application-specific destination that belongs\n * with the account rather than in the page chrome.\n */\n children?: ReactNode;\n\n /**\n * Rendered to the left of the cluster, in the same `flex gap-1` row.\n */\n before?: ReactNode;\n\n /**\n * Route name of the \"Admin Panel\" item. The item is hidden anyway unless\n * the viewer holds `admin:ui`.\n *\n * @default \"admin\"\n */\n adminRouteName?: string;\n\n /**\n * Route name pushed by the signed-out state's sign-in button.\n *\n * @default \"login\"\n */\n loginRouteName?: string;\n\n /**\n * Labels, for an application that names its chrome itself. An omitted\n * entry is read from the catalogue under `shell.settings.*`, English by\n * default and French through `uiFr`, so the admin console and the account\n * area are localised without passing any. `language`, `theme` and\n * `colorMode` name the control in both placements: the submenu in the\n * menu, the tooltip and `aria-label` as a button.\n */\n labels?: {\n signIn?: string;\n menu?: string;\n account?: string;\n admin?: string;\n logout?: string;\n language?: string;\n theme?: string;\n colorMode?: string;\n colorModeSystem?: string;\n colorModeDark?: string;\n colorModeLight?: string;\n };\n\n /**\n * Forwarded to {@link ButtonUser.avatar}: overrides what the signed-in\n * button shows. Absent, it draws the viewer's own picture when they have\n * one and the generic glyph when they do not.\n */\n avatar?: ReactNode;\n\n /**\n * Below `sm`, drop the settings BUTTONS and keep only the account button.\n * It never touches the menu, so a signed-in viewer on a phone still reaches\n * all three there under the default `placement`.\n */\n compact?: boolean;\n\n /**\n * Visual variant of every button. Defaults to `\"ghost\"`.\n */\n variant?: \"ghost\" | \"outline\";\n\n className?: string;\n}\n\n/**\n * The account button with the viewer's settings attached: language, theme\n * and display mode, wrapped around {@link ButtonUser}.\n *\n * Signed out, it draws the four icon buttons `AppActions` draws: language,\n * theme, dark mode, sign in. Signed in, it draws ONE button, the avatar, and\n * the settings move into its menu:\n *\n * ```\n * ada@example.com\n * User Account\n * Admin Panel\n * ───────────\n * Language ›\n * Theme ›\n * Display Mode ›\n * ───────────\n * Logout\n * ```\n *\n * Pass `placement=\"buttons\"` to keep them as buttons once signed in too.\n *\n * Each part still decides whether it has anything to offer: language and\n * theme disappear, as a button or as a submenu, when one or fewer are\n * registered, and the account and admin items hide when their route is not\n * mounted or the viewer lacks `admin:ui`.\n */\nexport const ButtonSettings = (props: ButtonSettingsProps) => {\n const auth = useAuth();\n const router = useRouter<any>();\n const { tr } = useI18n();\n const given = props.labels ?? {};\n // Each key written out, not built from a list: the `uiFr` coverage spec\n // finds a key by its literal `tr(\"...\")` call.\n const labels = {\n signIn: given.signIn ?? tr(\"shell.settings.signIn\", { default: \"Sign in\" }),\n menu: given.menu ?? tr(\"shell.settings.menu\", { default: \"Account menu\" }),\n account:\n given.account ??\n tr(\"shell.settings.account\", { default: \"User Account\" }),\n admin:\n given.admin ?? tr(\"shell.settings.admin\", { default: \"Admin Panel\" }),\n logout: given.logout ?? tr(\"shell.settings.logout\", { default: \"Logout\" }),\n language:\n given.language ?? tr(\"shell.settings.language\", { default: \"Language\" }),\n theme: given.theme ?? tr(\"shell.settings.theme\", { default: \"Theme\" }),\n colorMode:\n given.colorMode ??\n tr(\"shell.settings.colorMode\", { default: \"Display Mode\" }),\n colorModeSystem:\n given.colorModeSystem ??\n tr(\"shell.settings.colorModeSystem\", { default: \"System\" }),\n colorModeDark:\n given.colorModeDark ??\n tr(\"shell.settings.colorModeDark\", { default: \"Dark\" }),\n colorModeLight:\n given.colorModeLight ??\n tr(\"shell.settings.colorModeLight\", { default: \"Light\" }),\n };\n const variant = props.variant ?? \"ghost\";\n const inMenu = !!auth.user && (props.placement ?? \"menu\") === \"menu\";\n\n return (\n <div className={cn(\"flex items-center gap-1\", props.className)}>\n {props.before}\n {!inMenu && (\n // `contents` keeps the three direct children of the flex row and its\n // `gap-1`; `hidden` wins over it below the breakpoint.\n <div className={cn(props.compact ? \"hidden sm:contents\" : \"contents\")}>\n <ButtonLanguage variant={variant} label={labels.language} />\n <ButtonTheme variant={variant} label={labels.theme} />\n <ButtonDark variant={variant} label={labels.colorMode} />\n </div>\n )}\n <ButtonUser\n variant={variant}\n avatar={props.avatar}\n signInLabel={labels.signIn}\n menuLabel={labels.menu}\n onSignIn={() => router.push(props.loginRouteName ?? \"login\")}\n >\n <ButtonUser.Email />\n {/* Account before admin: see `ButtonUserDefaultMenu` for why. */}\n <ButtonUser.AccountMenuItem label={labels.account} />\n <ButtonUser.AdminMenuItem\n label={labels.admin}\n routeName={props.adminRouteName}\n />\n {props.children}\n {inMenu && (\n <>\n <DropdownMenuSeparator />\n <ButtonSettingsLanguageMenu label={labels.language} />\n <ButtonSettingsThemeMenu label={labels.theme} />\n <ButtonSettingsColorModeMenu\n label={labels.colorMode}\n labels={{\n system: labels.colorModeSystem,\n dark: labels.colorModeDark,\n light: labels.colorModeLight,\n }}\n />\n </>\n )}\n <DropdownMenuSeparator />\n <ButtonUser.LogoutMenuItem label={labels.logout} />\n </ButtonUser>\n </div>\n );\n};\n\nButtonSettings.LanguageMenu = ButtonSettingsLanguageMenu;\nButtonSettings.ThemeMenu = ButtonSettingsThemeMenu;\nButtonSettings.ColorModeMenu = ButtonSettingsColorModeMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,MAAa,kBAAkB,UAA+B;CAC5D,MAAM,OAAO,QAAQ;CACrB,MAAM,SAAS,UAAe;CAC9B,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,QAAQ,MAAM,UAAU,CAAC;CAG/B,MAAM,SAAS;EACb,QAAQ,MAAM,UAAU,GAAG,yBAAyB,EAAE,SAAS,UAAU,CAAC;EAC1E,MAAM,MAAM,QAAQ,GAAG,uBAAuB,EAAE,SAAS,eAAe,CAAC;EACzE,SACE,MAAM,WACN,GAAG,0BAA0B,EAAE,SAAS,eAAe,CAAC;EAC1D,OACE,MAAM,SAAS,GAAG,wBAAwB,EAAE,SAAS,cAAc,CAAC;EACtE,QAAQ,MAAM,UAAU,GAAG,yBAAyB,EAAE,SAAS,SAAS,CAAC;EACzE,UACE,MAAM,YAAY,GAAG,2BAA2B,EAAE,SAAS,WAAW,CAAC;EACzE,OAAO,MAAM,SAAS,GAAG,wBAAwB,EAAE,SAAS,QAAQ,CAAC;EACrE,WACE,MAAM,aACN,GAAG,4BAA4B,EAAE,SAAS,eAAe,CAAC;EAC5D,iBACE,MAAM,mBACN,GAAG,kCAAkC,EAAE,SAAS,SAAS,CAAC;EAC5D,eACE,MAAM,iBACN,GAAG,gCAAgC,EAAE,SAAS,OAAO,CAAC;EACxD,gBACE,MAAM,kBACN,GAAG,iCAAiC,EAAE,SAAS,QAAQ,CAAC;CAC5D;CACA,MAAM,UAAU,MAAM,WAAW;CACjC,MAAM,SAAS,CAAC,CAAC,KAAK,SAAS,MAAM,aAAa,YAAY;CAE9D,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,MAAM,SAAS;EAA7D,UAAA;GACG,MAAM;GACN,CAAC,UAGA,qBAAC,OAAD;IAAK,WAAW,GAAG,MAAM,UAAU,uBAAuB,UAAU;IAApE,UAAA;KACE,oBAAC,gBAAD;MAAyB;MAAS,OAAO,OAAO;KAAW,CAAA;KAC3D,oBAAC,aAAD;MAAsB;MAAS,OAAO,OAAO;KAAQ,CAAA;KACrD,oBAAC,YAAD;MAAqB;MAAS,OAAO,OAAO;KAAY,CAAA;IACrD;;GAEP,qBAAC,YAAD;IACW;IACT,QAAQ,MAAM;IACd,aAAa,OAAO;IACpB,WAAW,OAAO;IAClB,gBAAgB,OAAO,KAAK,MAAM,kBAAkB,OAAO;IAL7D,UAAA;KAOE,oBAAC,WAAW,OAAZ,CAAmB,CAAA;KAEnB,oBAAC,WAAW,iBAAZ,EAA4B,OAAO,OAAO,QAAU,CAAA;KACpD,oBAAC,WAAW,eAAZ;MACE,OAAO,OAAO;MACd,WAAW,MAAM;KAClB,CAAA;KACA,MAAM;KACN,UACC,qBAAA,YAAA,EAAA,UAAA;MACE,oBAAC,uBAAD,CAAwB,CAAA;MACxB,oBAAC,4BAAD,EAA4B,OAAO,OAAO,SAAW,CAAA;MACrD,oBAAC,yBAAD,EAAyB,OAAO,OAAO,MAAQ,CAAA;MAC/C,oBAAC,6BAAD;OACE,OAAO,OAAO;OACd,QAAQ;QACN,QAAQ,OAAO;QACf,MAAM,OAAO;QACb,OAAO,OAAO;OAChB;MACD,CAAA;KACD,EAAA,CAAA;KAEJ,oBAAC,uBAAD,CAAwB,CAAA;KACxB,oBAAC,WAAW,gBAAZ,EAA2B,OAAO,OAAO,OAAS,CAAA;IACxC;;EACT;;AAET;AAEA,eAAe,eAAe;AAC9B,eAAe,YAAY;AAC3B,eAAe,gBAAgB"}
1
+ {"version":3,"file":"ButtonSettings.js","names":[],"sources":["../../src/shell/ButtonSettings.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useAuth } from \"alepha/react/auth\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { useRouter } from \"alepha/react/router\";\nimport type { ReactNode } from \"react\";\n\nimport { DropdownMenuSeparator } from \"../core/DropdownMenu.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { ButtonDark } from \"./ButtonDark.tsx\";\nimport { ButtonLanguage } from \"./ButtonLanguage.tsx\";\nimport { ButtonSettingsColorModeMenu } from \"./ButtonSettingsColorModeMenu.tsx\";\nimport { ButtonSettingsLanguageMenu } from \"./ButtonSettingsLanguageMenu.tsx\";\nimport { ButtonSettingsThemeMenu } from \"./ButtonSettingsThemeMenu.tsx\";\nimport { ButtonTheme } from \"./ButtonTheme.tsx\";\nimport { ButtonUser } from \"./ButtonUser.tsx\";\n\nexport interface ButtonSettingsProps {\n /**\n * Where language, theme and display mode go while the viewer is signed in.\n *\n * - `\"menu\"`: inside the account menu, between the destinations and\n * Logout, so the header carries one button.\n * - `\"buttons\"`: icon buttons left of the account button, the way\n * `AppActions` draws them.\n *\n * Signed out there is no menu to put them in, so they are buttons whatever\n * this says.\n *\n * @default \"menu\"\n */\n placement?: \"menu\" | \"buttons\";\n\n /**\n * Extra menu items appended to the account dropdown, below Admin Panel and\n * above the settings. For an application-specific destination that belongs\n * with the account rather than in the page chrome.\n */\n children?: ReactNode;\n\n /**\n * Rendered to the left of the cluster, in the same `flex gap-1` row.\n */\n before?: ReactNode;\n\n /**\n * Route name of the \"Admin Panel\" item. The item is hidden anyway unless\n * the viewer holds `admin:ui`.\n *\n * @default \"admin\"\n */\n adminRouteName?: string;\n\n /**\n * Route name pushed by the signed-out state's sign-in button.\n *\n * @default \"login\"\n */\n loginRouteName?: string;\n\n /**\n * Labels, for an application that names its chrome itself. An omitted\n * entry is read from the catalogue under `shell.settings.*`, English by\n * default and French through `uiFr`, so the admin console and the account\n * area are localised without passing any. `language`, `theme` and\n * `colorMode` name the control in both placements: the submenu in the\n * menu, the tooltip and `aria-label` as a button.\n */\n labels?: {\n signIn?: string;\n menu?: string;\n account?: string;\n admin?: string;\n logout?: string;\n language?: string;\n theme?: string;\n colorMode?: string;\n colorModeSystem?: string;\n colorModeDark?: string;\n colorModeLight?: string;\n };\n\n /**\n * Forwarded to {@link ButtonUser.avatar}: overrides what the signed-in\n * button shows. Absent, it draws the viewer's own picture when they have\n * one and the generic glyph when they do not.\n */\n avatar?: ReactNode;\n\n /**\n * Below `sm`, drop the settings BUTTONS and keep only the account button.\n * It never touches the menu, so a signed-in viewer on a phone still reaches\n * all three there under the default `placement`.\n */\n compact?: boolean;\n\n /**\n * Visual variant of every button. Defaults to `\"minimal\"`.\n */\n variant?: \"minimal\" | \"outlined\";\n\n className?: string;\n}\n\n/**\n * The account button with the viewer's settings attached: language, theme\n * and display mode, wrapped around {@link ButtonUser}.\n *\n * Signed out, it draws the four icon buttons `AppActions` draws: language,\n * theme, dark mode, sign in. Signed in, it draws ONE button, the avatar, and\n * the settings move into its menu:\n *\n * ```\n * ada@example.com\n * User Account\n * Admin Panel\n * ───────────\n * Language ›\n * Theme ›\n * Display Mode ›\n * ───────────\n * Logout\n * ```\n *\n * Pass `placement=\"buttons\"` to keep them as buttons once signed in too.\n *\n * Each part still decides whether it has anything to offer: language and\n * theme disappear, as a button or as a submenu, when one or fewer are\n * registered, and the account and admin items hide when their route is not\n * mounted or the viewer lacks `admin:ui`.\n */\nexport const ButtonSettings = (props: ButtonSettingsProps) => {\n const auth = useAuth();\n const router = useRouter<any>();\n const { tr } = useI18n();\n const given = props.labels ?? {};\n // Each key written out, not built from a list: the `uiFr` coverage spec\n // finds a key by its literal `tr(\"...\")` call.\n const labels = {\n signIn: given.signIn ?? tr(\"shell.settings.signIn\", { default: \"Sign in\" }),\n menu: given.menu ?? tr(\"shell.settings.menu\", { default: \"Account menu\" }),\n account:\n given.account ??\n tr(\"shell.settings.account\", { default: \"User Account\" }),\n admin:\n given.admin ?? tr(\"shell.settings.admin\", { default: \"Admin Panel\" }),\n logout: given.logout ?? tr(\"shell.settings.logout\", { default: \"Logout\" }),\n language:\n given.language ?? tr(\"shell.settings.language\", { default: \"Language\" }),\n theme: given.theme ?? tr(\"shell.settings.theme\", { default: \"Theme\" }),\n colorMode:\n given.colorMode ??\n tr(\"shell.settings.colorMode\", { default: \"Display Mode\" }),\n colorModeSystem:\n given.colorModeSystem ??\n tr(\"shell.settings.colorModeSystem\", { default: \"System\" }),\n colorModeDark:\n given.colorModeDark ??\n tr(\"shell.settings.colorModeDark\", { default: \"Dark\" }),\n colorModeLight:\n given.colorModeLight ??\n tr(\"shell.settings.colorModeLight\", { default: \"Light\" }),\n };\n const variant = props.variant ?? \"minimal\";\n const inMenu = !!auth.user && (props.placement ?? \"menu\") === \"menu\";\n\n return (\n <div className={cn(\"flex items-center gap-1\", props.className)}>\n {props.before}\n {!inMenu && (\n // `contents` keeps the three direct children of the flex row and its\n // `gap-1`; `hidden` wins over it below the breakpoint.\n <div className={cn(props.compact ? \"hidden sm:contents\" : \"contents\")}>\n <ButtonLanguage variant={variant} label={labels.language} />\n <ButtonTheme variant={variant} label={labels.theme} />\n <ButtonDark variant={variant} label={labels.colorMode} />\n </div>\n )}\n <ButtonUser\n variant={variant}\n avatar={props.avatar}\n signInLabel={labels.signIn}\n menuLabel={labels.menu}\n onSignIn={() => router.push(props.loginRouteName ?? \"login\")}\n >\n <ButtonUser.Email />\n {/* Account before admin: see `ButtonUserDefaultMenu` for why. */}\n <ButtonUser.AccountMenuItem label={labels.account} />\n <ButtonUser.AdminMenuItem\n label={labels.admin}\n routeName={props.adminRouteName}\n />\n {props.children}\n {inMenu && (\n <>\n <DropdownMenuSeparator />\n <ButtonSettingsLanguageMenu label={labels.language} />\n <ButtonSettingsThemeMenu label={labels.theme} />\n <ButtonSettingsColorModeMenu\n label={labels.colorMode}\n labels={{\n system: labels.colorModeSystem,\n dark: labels.colorModeDark,\n light: labels.colorModeLight,\n }}\n />\n </>\n )}\n <DropdownMenuSeparator />\n <ButtonUser.LogoutMenuItem label={labels.logout} />\n </ButtonUser>\n </div>\n );\n};\n\nButtonSettings.LanguageMenu = ButtonSettingsLanguageMenu;\nButtonSettings.ThemeMenu = ButtonSettingsThemeMenu;\nButtonSettings.ColorModeMenu = ButtonSettingsColorModeMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,MAAa,kBAAkB,UAA+B;CAC5D,MAAM,OAAO,QAAQ;CACrB,MAAM,SAAS,UAAe;CAC9B,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,QAAQ,MAAM,UAAU,CAAC;CAG/B,MAAM,SAAS;EACb,QAAQ,MAAM,UAAU,GAAG,yBAAyB,EAAE,SAAS,UAAU,CAAC;EAC1E,MAAM,MAAM,QAAQ,GAAG,uBAAuB,EAAE,SAAS,eAAe,CAAC;EACzE,SACE,MAAM,WACN,GAAG,0BAA0B,EAAE,SAAS,eAAe,CAAC;EAC1D,OACE,MAAM,SAAS,GAAG,wBAAwB,EAAE,SAAS,cAAc,CAAC;EACtE,QAAQ,MAAM,UAAU,GAAG,yBAAyB,EAAE,SAAS,SAAS,CAAC;EACzE,UACE,MAAM,YAAY,GAAG,2BAA2B,EAAE,SAAS,WAAW,CAAC;EACzE,OAAO,MAAM,SAAS,GAAG,wBAAwB,EAAE,SAAS,QAAQ,CAAC;EACrE,WACE,MAAM,aACN,GAAG,4BAA4B,EAAE,SAAS,eAAe,CAAC;EAC5D,iBACE,MAAM,mBACN,GAAG,kCAAkC,EAAE,SAAS,SAAS,CAAC;EAC5D,eACE,MAAM,iBACN,GAAG,gCAAgC,EAAE,SAAS,OAAO,CAAC;EACxD,gBACE,MAAM,kBACN,GAAG,iCAAiC,EAAE,SAAS,QAAQ,CAAC;CAC5D;CACA,MAAM,UAAU,MAAM,WAAW;CACjC,MAAM,SAAS,CAAC,CAAC,KAAK,SAAS,MAAM,aAAa,YAAY;CAE9D,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,MAAM,SAAS;EAA7D,UAAA;GACG,MAAM;GACN,CAAC,UAGA,qBAAC,OAAD;IAAK,WAAW,GAAG,MAAM,UAAU,uBAAuB,UAAU;IAApE,UAAA;KACE,oBAAC,gBAAD;MAAyB;MAAS,OAAO,OAAO;KAAW,CAAA;KAC3D,oBAAC,aAAD;MAAsB;MAAS,OAAO,OAAO;KAAQ,CAAA;KACrD,oBAAC,YAAD;MAAqB;MAAS,OAAO,OAAO;KAAY,CAAA;IACrD;;GAEP,qBAAC,YAAD;IACW;IACT,QAAQ,MAAM;IACd,aAAa,OAAO;IACpB,WAAW,OAAO;IAClB,gBAAgB,OAAO,KAAK,MAAM,kBAAkB,OAAO;IAL7D,UAAA;KAOE,oBAAC,WAAW,OAAZ,CAAmB,CAAA;KAEnB,oBAAC,WAAW,iBAAZ,EAA4B,OAAO,OAAO,QAAU,CAAA;KACpD,oBAAC,WAAW,eAAZ;MACE,OAAO,OAAO;MACd,WAAW,MAAM;KAClB,CAAA;KACA,MAAM;KACN,UACC,qBAAA,YAAA,EAAA,UAAA;MACE,oBAAC,uBAAD,CAAwB,CAAA;MACxB,oBAAC,4BAAD,EAA4B,OAAO,OAAO,SAAW,CAAA;MACrD,oBAAC,yBAAD,EAAyB,OAAO,OAAO,MAAQ,CAAA;MAC/C,oBAAC,6BAAD;OACE,OAAO,OAAO;OACd,QAAQ;QACN,QAAQ,OAAO;QACf,MAAM,OAAO;QACb,OAAO,OAAO;OAChB;MACD,CAAA;KACD,EAAA,CAAA;KAEJ,oBAAC,uBAAD,CAAwB,CAAA;KACxB,oBAAC,WAAW,gBAAZ,EAA2B,OAAO,OAAO,OAAS,CAAA;IACxC;;EACT;;AAET;AAEA,eAAe,eAAe;AAC9B,eAAe,YAAY;AAC3B,eAAe,gBAAgB"}
@@ -1,7 +1,7 @@
1
1
  import { DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from "../core/DropdownMenu.js";
2
+ import { useI18n } from "alepha/react/i18n";
2
3
  import { Languages } from "lucide-react";
3
4
  import "react";
4
- import { useI18n } from "alepha/react/i18n";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/shell/ButtonSettingsLanguageMenu.tsx
7
7
  /**
@@ -2,8 +2,8 @@ import { DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, Dropdow
2
2
  import { ButtonThemeSwatch } from "./ButtonThemeSwatch.js";
3
3
  import { Palette } from "lucide-react";
4
4
  import "react";
5
- import { useStore } from "alepha/react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { useStore } from "alepha/react";
7
7
  import { uiThemeListAtom, useTheme } from "alepha/react/ui";
8
8
  //#region src/shell/ButtonSettingsThemeMenu.tsx
9
9
  /**
@@ -9,10 +9,10 @@ export interface ButtonThemeProps {
9
9
  */
10
10
  heading?: string;
11
11
  /**
12
- * Visual variant. Defaults to `"ghost"` (minimal). Pass `"outline"` for a
12
+ * Visual variant. Defaults to `"minimal"`. Pass `"outlined"` for a
13
13
  * bordered toolbar look.
14
14
  */
15
- variant?: "ghost" | "outline";
15
+ variant?: "minimal" | "outlined";
16
16
  }
17
17
  /**
18
18
  * Theme picker reading the available list from `uiThemeListAtom` and the
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonTheme.d.ts","sourceRoot":"","sources":["../../src/shell/ButtonTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,6BA4DlD,CAAC"}
1
+ {"version":3,"file":"ButtonTheme.d.ts","sourceRoot":"","sources":["../../src/shell/ButtonTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CAClC;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,6BA4DlD,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { cn } from "../core/utils.js";
2
- import { Button } from "../core/Button.js";
3
2
  import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../core/DropdownMenu.js";
3
+ import { Button } from "../core/Button.js";
4
4
  import { Tooltip, TooltipContent, TooltipTrigger } from "../core/Tooltip.js";
5
5
  import { ButtonThemeSwatch } from "./ButtonThemeSwatch.js";
6
6
  import { Check, Palette } from "lucide-react";
7
7
  import "react";
8
- import { useStore } from "alepha/react";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { useStore } from "alepha/react";
10
10
  import { uiThemeListAtom, useTheme } from "alepha/react/ui";
11
11
  //#region src/shell/ButtonTheme.tsx
12
12
  /**
@@ -33,7 +33,7 @@ const ButtonTheme = (props) => {
33
33
  const label = props.label ?? "Pick theme";
34
34
  return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
35
35
  render: /* @__PURE__ */ jsx(DropdownMenuTrigger, { render: /* @__PURE__ */ jsx(Button, {
36
- variant: props.variant ?? "ghost",
36
+ variant: props.variant ?? "minimal",
37
37
  size: "icon",
38
38
  "aria-label": label
39
39
  }) }),
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonTheme.js","names":[],"sources":["../../src/shell/ButtonTheme.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useStore } from \"alepha/react\";\nimport { uiThemeListAtom, useTheme } from \"alepha/react/ui\";\nimport { Check, Palette } from \"lucide-react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../core/DropdownMenu.tsx\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../core/Tooltip.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { ButtonThemeSwatch } from \"./ButtonThemeSwatch.tsx\";\n\nexport interface ButtonThemeProps {\n /**\n * Optional aria-label override. Defaults to `\"Pick theme\"`.\n */\n label?: string;\n /**\n * Optional dropdown header. Defaults to `\"Themes\"`.\n */\n heading?: string;\n /**\n * Visual variant. Defaults to `\"ghost\"` (minimal). Pass `\"outline\"` for a\n * bordered toolbar look.\n */\n variant?: \"ghost\" | \"outline\";\n}\n\n/**\n * Theme picker reading the available list from `uiThemeListAtom` and the\n * selected id from `useTheme()`. Apps register their themes once at boot:\n *\n * ```ts\n * alepha.store.set(uiThemeListAtom, [\n * { id: \"default\", label: \"Default\" },\n * { id: \"claude\", label: \"Claude\", swatch: [...], fontHref: \"https://...\" },\n * ]);\n * ```\n *\n * Renders nothing when the list has 0 or 1 entries. Loading a theme's\n * `fontHref` is `<ColorScheme/>`'s job, not this one's: a picker is absent\n * from most pages, so an injection done here reached only the pages that\n * happen to show a toolbar.\n */\nexport const ButtonTheme = (props: ButtonThemeProps) => {\n const { theme, setTheme } = useTheme();\n const [list] = useStore(uiThemeListAtom);\n const themes = list ?? [];\n\n if (themes.length <= 1) {\n return null;\n }\n\n const label = props.label ?? \"Pick theme\";\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger\n render={\n <DropdownMenuTrigger\n render={\n <Button\n variant={props.variant ?? \"ghost\"}\n size=\"icon\"\n aria-label={label}\n />\n }\n />\n }\n >\n <Palette className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuGroup>\n <DropdownMenuLabel>{props.heading ?? \"Themes\"}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {/*\n `DropdownMenuItem`, not a raw `<button>`. These were plain buttons\n inside a `role=\"menu\"`, which cost two things that are the menu\n primitive's whole job: the container announced itself as a menu\n with NO items to assistive technology, and picking a theme left the\n menu open - alone among every dropdown in the app - because only an\n Item tells the root to close on select.\n */}\n {themes.map((t) => (\n <DropdownMenuItem\n key={t.id}\n onClick={() => setTheme(t.id)}\n className={cn(\n \"flex w-full items-center gap-2.5 px-2 py-1.5 text-sm\",\n theme === t.id && \"bg-accent\",\n )}\n >\n {t.swatch && <ButtonThemeSwatch colors={t.swatch} />}\n <span className=\"flex-1 text-left\">{t.label}</span>\n {theme === t.id && <Check className=\"size-3.5\" />}\n </DropdownMenuItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,MAAa,eAAe,UAA4B;CACtD,MAAM,EAAE,OAAO,aAAa,SAAS;CACrC,MAAM,CAAC,QAAQ,SAAS,eAAe;CACvC,MAAM,SAAS,QAAQ,CAAC;CAExB,IAAI,OAAO,UAAU,GACnB,OAAO;CAGT,MAAM,QAAQ,MAAM,SAAS;CAC7B,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EACE,QACE,oBAAC,qBAAD,EACE,QACE,oBAAC,QAAD;GACE,SAAS,MAAM,WAAW;GAC1B,MAAK;GACL,cAAY;EACb,CAAA,EAEJ,CAAA;EAGH,UAAA,oBAAC,SAAD,EAAS,WAAU,SAAU,CAAA;CACf,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,MAAsB,CAAA,CAChC,EAAA,CAAA,GACT,oBAAC,qBAAD;EAAqB,OAAM;EAAM,WAAU;EACzC,UAAA,qBAAC,mBAAD,EAAA,UAAA;GACE,oBAAC,mBAAD,EAAA,UAAoB,MAAM,WAAW,SAA4B,CAAA;GACjE,oBAAC,uBAAD,CAAwB,CAAA;GASvB,OAAO,KAAK,MACX,qBAAC,kBAAD;IAEE,eAAe,SAAS,EAAE,EAAE;IAC5B,WAAW,GACT,wDACA,UAAU,EAAE,MAAM,WACpB;IANF,UAAA;KAQG,EAAE,UAAU,oBAAC,mBAAD,EAAmB,QAAQ,EAAE,OAAS,CAAA;KACnD,oBAAC,QAAD;MAAM,WAAU;MAAoB,UAAA,EAAE;KAAY,CAAA;KACjD,UAAU,EAAE,MAAM,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA;IAChC;GAVX,GAAA,EAAE,EAUS,CACnB;EACgB,EAAA,CAAA;CACA,CAAA,CACT,EAAA,CAAA;AAElB"}
1
+ {"version":3,"file":"ButtonTheme.js","names":[],"sources":["../../src/shell/ButtonTheme.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useStore } from \"alepha/react\";\nimport { uiThemeListAtom, useTheme } from \"alepha/react/ui\";\nimport { Check, Palette } from \"lucide-react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../core/DropdownMenu.tsx\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../core/Tooltip.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { ButtonThemeSwatch } from \"./ButtonThemeSwatch.tsx\";\n\nexport interface ButtonThemeProps {\n /**\n * Optional aria-label override. Defaults to `\"Pick theme\"`.\n */\n label?: string;\n /**\n * Optional dropdown header. Defaults to `\"Themes\"`.\n */\n heading?: string;\n /**\n * Visual variant. Defaults to `\"minimal\"`. Pass `\"outlined\"` for a\n * bordered toolbar look.\n */\n variant?: \"minimal\" | \"outlined\";\n}\n\n/**\n * Theme picker reading the available list from `uiThemeListAtom` and the\n * selected id from `useTheme()`. Apps register their themes once at boot:\n *\n * ```ts\n * alepha.store.set(uiThemeListAtom, [\n * { id: \"default\", label: \"Default\" },\n * { id: \"claude\", label: \"Claude\", swatch: [...], fontHref: \"https://...\" },\n * ]);\n * ```\n *\n * Renders nothing when the list has 0 or 1 entries. Loading a theme's\n * `fontHref` is `<ColorScheme/>`'s job, not this one's: a picker is absent\n * from most pages, so an injection done here reached only the pages that\n * happen to show a toolbar.\n */\nexport const ButtonTheme = (props: ButtonThemeProps) => {\n const { theme, setTheme } = useTheme();\n const [list] = useStore(uiThemeListAtom);\n const themes = list ?? [];\n\n if (themes.length <= 1) {\n return null;\n }\n\n const label = props.label ?? \"Pick theme\";\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger\n render={\n <DropdownMenuTrigger\n render={\n <Button\n variant={props.variant ?? \"minimal\"}\n size=\"icon\"\n aria-label={label}\n />\n }\n />\n }\n >\n <Palette className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuGroup>\n <DropdownMenuLabel>{props.heading ?? \"Themes\"}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {/*\n `DropdownMenuItem`, not a raw `<button>`. These were plain buttons\n inside a `role=\"menu\"`, which cost two things that are the menu\n primitive's whole job: the container announced itself as a menu\n with NO items to assistive technology, and picking a theme left the\n menu open - alone among every dropdown in the app - because only an\n Item tells the root to close on select.\n */}\n {themes.map((t) => (\n <DropdownMenuItem\n key={t.id}\n onClick={() => setTheme(t.id)}\n className={cn(\n \"flex w-full items-center gap-2.5 px-2 py-1.5 text-sm\",\n theme === t.id && \"bg-accent\",\n )}\n >\n {t.swatch && <ButtonThemeSwatch colors={t.swatch} />}\n <span className=\"flex-1 text-left\">{t.label}</span>\n {theme === t.id && <Check className=\"size-3.5\" />}\n </DropdownMenuItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,MAAa,eAAe,UAA4B;CACtD,MAAM,EAAE,OAAO,aAAa,SAAS;CACrC,MAAM,CAAC,QAAQ,SAAS,eAAe;CACvC,MAAM,SAAS,QAAQ,CAAC;CAExB,IAAI,OAAO,UAAU,GACnB,OAAO;CAGT,MAAM,QAAQ,MAAM,SAAS;CAC7B,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EACE,QACE,oBAAC,qBAAD,EACE,QACE,oBAAC,QAAD;GACE,SAAS,MAAM,WAAW;GAC1B,MAAK;GACL,cAAY;EACb,CAAA,EAEJ,CAAA;EAGH,UAAA,oBAAC,SAAD,EAAS,WAAU,SAAU,CAAA;CACf,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,MAAsB,CAAA,CAChC,EAAA,CAAA,GACT,oBAAC,qBAAD;EAAqB,OAAM;EAAM,WAAU;EACzC,UAAA,qBAAC,mBAAD,EAAA,UAAA;GACE,oBAAC,mBAAD,EAAA,UAAoB,MAAM,WAAW,SAA4B,CAAA;GACjE,oBAAC,uBAAD,CAAwB,CAAA;GASvB,OAAO,KAAK,MACX,qBAAC,kBAAD;IAEE,eAAe,SAAS,EAAE,EAAE;IAC5B,WAAW,GACT,wDACA,UAAU,EAAE,MAAM,WACpB;IANF,UAAA;KAQG,EAAE,UAAU,oBAAC,mBAAD,EAAmB,QAAQ,EAAE,OAAS,CAAA;KACnD,oBAAC,QAAD;MAAM,WAAU;MAAoB,UAAA,EAAE;KAAY,CAAA;KACjD,UAAU,EAAE,MAAM,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA;IAChC;GAVX,GAAA,EAAE,EAUS,CACnB;EACgB,EAAA,CAAA;CACA,CAAA,CACT,EAAA,CAAA;AAElB"}
@@ -35,10 +35,10 @@ export interface ButtonUserProps {
35
35
  */
36
36
  menuLabel?: string;
37
37
  /**
38
- * Visual variant. Defaults to `"ghost"` (minimal). Pass `"outline"` for a
38
+ * Visual variant. Defaults to `"minimal"`. Pass `"outlined"` for a
39
39
  * bordered toolbar look.
40
40
  */
41
- variant?: "ghost" | "outline";
41
+ variant?: "minimal" | "outlined";
42
42
  /**
43
43
  * Overrides what the signed-in button shows. Rarely needed: by default the
44
44
  * button already draws the viewer's own avatar (feedback #P2138, #Q2229).
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonUser.d.ts","sourceRoot":"","sources":["../../src/shell/ButtonUser.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;mCAoB0B,KAAK,EAAE,eAAe;;aAiE9B,eAAe;aACP,uBAAuB;aACrB,yBAAyB;aAC1B,wBAAwB"}
1
+ {"version":3,"file":"ButtonUser.d.ts","sourceRoot":"","sources":["../../src/shell/ButtonUser.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;mCAoB0B,KAAK,EAAE,eAAe;;aAiE9B,eAAe;aACP,uBAAuB;aACrB,yBAAyB;aAC1B,wBAAwB"}
@@ -1,7 +1,7 @@
1
- import { Button } from "../core/Button.js";
2
1
  import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../core/DropdownMenu.js";
3
- import { Tooltip, TooltipContent, TooltipTrigger } from "../core/Tooltip.js";
4
2
  import { UserAvatar } from "../core/UserAvatar.js";
3
+ import { Button } from "../core/Button.js";
4
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../core/Tooltip.js";
5
5
  import { ButtonUserAccountMenuItem } from "./ButtonUserAccountMenuItem.js";
6
6
  import { ButtonUserAdminMenuItem } from "./ButtonUserAdminMenuItem.js";
7
7
  import { ButtonUserEmail } from "./ButtonUserEmail.js";
@@ -36,7 +36,7 @@ const ButtonUser = (props) => {
36
36
  const signInLabel = props.signInLabel ?? "Sign in";
37
37
  return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
38
38
  render: /* @__PURE__ */ jsx(Button, {
39
- variant: props.variant ?? "ghost",
39
+ variant: props.variant ?? "minimal",
40
40
  size: "icon",
41
41
  "aria-label": signInLabel,
42
42
  disabled: !props.onSignIn,
@@ -52,7 +52,7 @@ const ButtonUser = (props) => {
52
52
  }) : /* @__PURE__ */ jsx(User, { className: "size-4" }));
53
53
  return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
54
54
  render: /* @__PURE__ */ jsx(DropdownMenuTrigger, { render: /* @__PURE__ */ jsx(Button, {
55
- variant: props.variant ?? "ghost",
55
+ variant: props.variant ?? "minimal",
56
56
  size: "icon",
57
57
  "aria-label": menuLabel
58
58
  }) }),
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonUser.js","names":[],"sources":["../../src/shell/ButtonUser.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useAuth } from \"alepha/react/auth\";\nimport { LogIn, User } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"../core/DropdownMenu.tsx\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../core/Tooltip.tsx\";\nimport { UserAvatar } from \"../core/UserAvatar.tsx\";\nimport { ButtonUserAccountMenuItem } from \"./ButtonUserAccountMenuItem.tsx\";\nimport { ButtonUserAdminMenuItem } from \"./ButtonUserAdminMenuItem.tsx\";\nimport { ButtonUserDefaultMenu } from \"./ButtonUserDefaultMenu.tsx\";\nimport { ButtonUserEmail } from \"./ButtonUserEmail.tsx\";\nimport { ButtonUserLogoutMenuItem } from \"./ButtonUserLogoutMenuItem.tsx\";\n\nexport interface ButtonUserProps {\n /**\n * Custom menu items rendered between the email header and the logout\n * footer. When omitted, a default menu is rendered: email + account + admin\n * (when permitted) + logout. When provided, the consumer is responsible for the\n * full layout — use `ButtonUser.Email`, `ButtonUser.AdminMenuItem`,\n * `ButtonUser.LogoutMenuItem` as building blocks.\n */\n children?: ReactNode;\n /**\n * Called when the user clicks the sign-in icon (logged-out state). When\n * absent, the icon button is disabled.\n */\n onSignIn?: () => void;\n /**\n * Called when the user clicks the default \"Admin Panel\" menu item. Has no\n * effect when `children` are provided. When absent, the admin item is\n * hidden even if the user has the permission.\n */\n onAdminClick?: () => void;\n /**\n * Aria-label and tooltip text for the logged-out (sign-in) state.\n * Defaults to `\"Sign in\"`.\n */\n signInLabel?: string;\n /**\n * Aria-label and tooltip text for the logged-in (account menu) state.\n * Defaults to `\"Account menu\"`.\n */\n menuLabel?: string;\n /**\n * Visual variant. Defaults to `\"ghost\"` (minimal). Pass `\"outline\"` for a\n * bordered toolbar look.\n */\n variant?: \"ghost\" | \"outline\";\n\n /**\n * Overrides what the signed-in button shows. Rarely needed: by default the\n * button already draws the viewer's own avatar (feedback #P2138, #Q2229).\n *\n * **The default.** When `useAuth().user.picture` is set, the button draws\n * {@link UserAvatar} at `size-7` inside the `size-9` icon button, so the\n * face fills the control the way the `size-4` glyph it replaces does not.\n * A viewer with NO picture keeps the bare `User` glyph rather than a glyph\n * in a filled circle: beside the ghost icons of `AppActions`, a filled\n * circle reads as a different kind of control. A picture that fails to\n * load lands on `UserAvatar`'s own fallback.\n *\n * **Which file route, and why.** `user.picture` is a file id in the\n * `avatars` bucket, and both routes that serve it belong to\n * `alepha/api/files`, not to an application, so the kit can build the URL\n * itself. It uses the AUTHENTICATED `/api/files/:id`: the default\n * `FileAccessProvider` lets the uploader and an admin read there with no\n * opt-in, while the anonymous `/api/public/files/:id` refuses everything\n * until the application opens the bucket in `assertPublic`, so a\n * `public` default would show the glyph in every application that did\n * not. The cost is edge caching, and for the viewer's OWN avatar it is\n * close to nothing: the response is `private, max-age=1y, immutable`, so\n * the browser keeps it across pages, and an edge cache would only have\n * shared it with viewers who never ask for it. One case still falls back\n * to the glyph under the default provider: an avatar an ADMIN set, whose\n * uploader is the admin rather than the viewer.\n *\n * Only reached when signed in - the signed-out branch returns above.\n */\n avatar?: ReactNode;\n}\n\n/**\n * Account button: shows a sign-in icon when logged out, a user icon with a\n * dropdown menu when logged in. Reads auth state via `useAuth()`.\n *\n * @example\n * // Default menu\n * <ButtonUser onSignIn={() => router.push(\"login\")} onAdminClick={() => router.push(\"admin\")} />\n *\n * @example\n * // Custom menu\n * <ButtonUser onSignIn={() => router.push(\"login\")}>\n * <ButtonUser.Email />\n * <ButtonUser.AdminMenuItem onClick={() => router.push(\"admin\")} />\n * <DropdownMenuItem onClick={() => router.push(\"me\")}>Profile</DropdownMenuItem>\n * <DropdownMenuSeparator />\n * <ButtonUser.LogoutMenuItem />\n * </ButtonUser>\n */\nexport const ButtonUser = (props: ButtonUserProps) => {\n const auth = useAuth();\n\n if (!auth.user) {\n const signInLabel = props.signInLabel ?? \"Sign in\";\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n variant={props.variant ?? \"ghost\"}\n size=\"icon\"\n aria-label={signInLabel}\n disabled={!props.onSignIn}\n onClick={props.onSignIn}\n />\n }\n >\n <LogIn className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{signInLabel}</TooltipContent>\n </Tooltip>\n );\n }\n\n const menuLabel = props.menuLabel ?? \"Account menu\";\n const face =\n props.avatar ??\n (auth.user.picture ? (\n <UserAvatar fileId={auth.user.picture} className=\"size-7\" />\n ) : (\n <User className=\"size-4\" />\n ));\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger\n render={\n <DropdownMenuTrigger\n render={\n <Button\n variant={props.variant ?? \"ghost\"}\n size=\"icon\"\n aria-label={menuLabel}\n />\n }\n />\n }\n >\n {/* The tooltip and `aria-label` are untouched by the avatar: a\n face is not a label, and \"Account menu\" is still the accessible\n name of the button. */}\n {face}\n </TooltipTrigger>\n <TooltipContent>{menuLabel}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n {props.children ?? (\n <ButtonUserDefaultMenu onAdminClick={props.onAdminClick} />\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nButtonUser.Email = ButtonUserEmail;\nButtonUser.AdminMenuItem = ButtonUserAdminMenuItem;\nButtonUser.AccountMenuItem = ButtonUserAccountMenuItem;\nButtonUser.LogoutMenuItem = ButtonUserLogoutMenuItem;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,MAAa,cAAc,UAA2B;CACpD,MAAM,OAAO,QAAQ;CAErB,IAAI,CAAC,KAAK,MAAM;EACd,MAAM,cAAc,MAAM,eAAe;EACzC,OACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;GACE,QACE,oBAAC,QAAD;IACE,SAAS,MAAM,WAAW;IAC1B,MAAK;IACL,cAAY;IACZ,UAAU,CAAC,MAAM;IACjB,SAAS,MAAM;GAChB,CAAA;GAGH,UAAA,oBAAC,OAAD,EAAO,WAAU,SAAU,CAAA;EACb,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,YAA4B,CAAA,CACtC,EAAA,CAAA;CAEb;CAEA,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,OACJ,MAAM,WACL,KAAK,KAAK,UACT,oBAAC,YAAD;EAAY,QAAQ,KAAK,KAAK;EAAS,WAAU;CAAU,CAAA,IAE3D,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA;CAE9B,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EACE,QACE,oBAAC,qBAAD,EACE,QACE,oBAAC,QAAD;GACE,SAAS,MAAM,WAAW;GAC1B,MAAK;GACL,cAAY;EACb,CAAA,EAEJ,CAAA;EAMF,UAAA;CACa,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,UAA0B,CAAA,CACpC,EAAA,CAAA,GACT,oBAAC,qBAAD;EAAqB,OAAM;EAAM,WAAU;EACxC,UAAA,MAAM,YACL,oBAAC,uBAAD,EAAuB,cAAc,MAAM,aAAe,CAAA;CAEzC,CAAA,CACT,EAAA,CAAA;AAElB;AAEA,WAAW,QAAQ;AACnB,WAAW,gBAAgB;AAC3B,WAAW,kBAAkB;AAC7B,WAAW,iBAAiB"}
1
+ {"version":3,"file":"ButtonUser.js","names":[],"sources":["../../src/shell/ButtonUser.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useAuth } from \"alepha/react/auth\";\nimport { LogIn, User } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"../core/DropdownMenu.tsx\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../core/Tooltip.tsx\";\nimport { UserAvatar } from \"../core/UserAvatar.tsx\";\nimport { ButtonUserAccountMenuItem } from \"./ButtonUserAccountMenuItem.tsx\";\nimport { ButtonUserAdminMenuItem } from \"./ButtonUserAdminMenuItem.tsx\";\nimport { ButtonUserDefaultMenu } from \"./ButtonUserDefaultMenu.tsx\";\nimport { ButtonUserEmail } from \"./ButtonUserEmail.tsx\";\nimport { ButtonUserLogoutMenuItem } from \"./ButtonUserLogoutMenuItem.tsx\";\n\nexport interface ButtonUserProps {\n /**\n * Custom menu items rendered between the email header and the logout\n * footer. When omitted, a default menu is rendered: email + account + admin\n * (when permitted) + logout. When provided, the consumer is responsible for the\n * full layout — use `ButtonUser.Email`, `ButtonUser.AdminMenuItem`,\n * `ButtonUser.LogoutMenuItem` as building blocks.\n */\n children?: ReactNode;\n /**\n * Called when the user clicks the sign-in icon (logged-out state). When\n * absent, the icon button is disabled.\n */\n onSignIn?: () => void;\n /**\n * Called when the user clicks the default \"Admin Panel\" menu item. Has no\n * effect when `children` are provided. When absent, the admin item is\n * hidden even if the user has the permission.\n */\n onAdminClick?: () => void;\n /**\n * Aria-label and tooltip text for the logged-out (sign-in) state.\n * Defaults to `\"Sign in\"`.\n */\n signInLabel?: string;\n /**\n * Aria-label and tooltip text for the logged-in (account menu) state.\n * Defaults to `\"Account menu\"`.\n */\n menuLabel?: string;\n /**\n * Visual variant. Defaults to `\"minimal\"`. Pass `\"outlined\"` for a\n * bordered toolbar look.\n */\n variant?: \"minimal\" | \"outlined\";\n\n /**\n * Overrides what the signed-in button shows. Rarely needed: by default the\n * button already draws the viewer's own avatar (feedback #P2138, #Q2229).\n *\n * **The default.** When `useAuth().user.picture` is set, the button draws\n * {@link UserAvatar} at `size-7` inside the `size-9` icon button, so the\n * face fills the control the way the `size-4` glyph it replaces does not.\n * A viewer with NO picture keeps the bare `User` glyph rather than a glyph\n * in a filled circle: beside the ghost icons of `AppActions`, a filled\n * circle reads as a different kind of control. A picture that fails to\n * load lands on `UserAvatar`'s own fallback.\n *\n * **Which file route, and why.** `user.picture` is a file id in the\n * `avatars` bucket, and both routes that serve it belong to\n * `alepha/api/files`, not to an application, so the kit can build the URL\n * itself. It uses the AUTHENTICATED `/api/files/:id`: the default\n * `FileAccessProvider` lets the uploader and an admin read there with no\n * opt-in, while the anonymous `/api/public/files/:id` refuses everything\n * until the application opens the bucket in `assertPublic`, so a\n * `public` default would show the glyph in every application that did\n * not. The cost is edge caching, and for the viewer's OWN avatar it is\n * close to nothing: the response is `private, max-age=1y, immutable`, so\n * the browser keeps it across pages, and an edge cache would only have\n * shared it with viewers who never ask for it. One case still falls back\n * to the glyph under the default provider: an avatar an ADMIN set, whose\n * uploader is the admin rather than the viewer.\n *\n * Only reached when signed in - the signed-out branch returns above.\n */\n avatar?: ReactNode;\n}\n\n/**\n * Account button: shows a sign-in icon when logged out, a user icon with a\n * dropdown menu when logged in. Reads auth state via `useAuth()`.\n *\n * @example\n * // Default menu\n * <ButtonUser onSignIn={() => router.push(\"login\")} onAdminClick={() => router.push(\"admin\")} />\n *\n * @example\n * // Custom menu\n * <ButtonUser onSignIn={() => router.push(\"login\")}>\n * <ButtonUser.Email />\n * <ButtonUser.AdminMenuItem onClick={() => router.push(\"admin\")} />\n * <DropdownMenuItem onClick={() => router.push(\"me\")}>Profile</DropdownMenuItem>\n * <DropdownMenuSeparator />\n * <ButtonUser.LogoutMenuItem />\n * </ButtonUser>\n */\nexport const ButtonUser = (props: ButtonUserProps) => {\n const auth = useAuth();\n\n if (!auth.user) {\n const signInLabel = props.signInLabel ?? \"Sign in\";\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n variant={props.variant ?? \"minimal\"}\n size=\"icon\"\n aria-label={signInLabel}\n disabled={!props.onSignIn}\n onClick={props.onSignIn}\n />\n }\n >\n <LogIn className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{signInLabel}</TooltipContent>\n </Tooltip>\n );\n }\n\n const menuLabel = props.menuLabel ?? \"Account menu\";\n const face =\n props.avatar ??\n (auth.user.picture ? (\n <UserAvatar fileId={auth.user.picture} className=\"size-7\" />\n ) : (\n <User className=\"size-4\" />\n ));\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger\n render={\n <DropdownMenuTrigger\n render={\n <Button\n variant={props.variant ?? \"minimal\"}\n size=\"icon\"\n aria-label={menuLabel}\n />\n }\n />\n }\n >\n {/* The tooltip and `aria-label` are untouched by the avatar: a\n face is not a label, and \"Account menu\" is still the accessible\n name of the button. */}\n {face}\n </TooltipTrigger>\n <TooltipContent>{menuLabel}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n {props.children ?? (\n <ButtonUserDefaultMenu onAdminClick={props.onAdminClick} />\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nButtonUser.Email = ButtonUserEmail;\nButtonUser.AdminMenuItem = ButtonUserAdminMenuItem;\nButtonUser.AccountMenuItem = ButtonUserAccountMenuItem;\nButtonUser.LogoutMenuItem = ButtonUserLogoutMenuItem;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,MAAa,cAAc,UAA2B;CACpD,MAAM,OAAO,QAAQ;CAErB,IAAI,CAAC,KAAK,MAAM;EACd,MAAM,cAAc,MAAM,eAAe;EACzC,OACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;GACE,QACE,oBAAC,QAAD;IACE,SAAS,MAAM,WAAW;IAC1B,MAAK;IACL,cAAY;IACZ,UAAU,CAAC,MAAM;IACjB,SAAS,MAAM;GAChB,CAAA;GAGH,UAAA,oBAAC,OAAD,EAAO,WAAU,SAAU,CAAA;EACb,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,YAA4B,CAAA,CACtC,EAAA,CAAA;CAEb;CAEA,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,OACJ,MAAM,WACL,KAAK,KAAK,UACT,oBAAC,YAAD;EAAY,QAAQ,KAAK,KAAK;EAAS,WAAU;CAAU,CAAA,IAE3D,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA;CAE9B,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EACE,QACE,oBAAC,qBAAD,EACE,QACE,oBAAC,QAAD;GACE,SAAS,MAAM,WAAW;GAC1B,MAAK;GACL,cAAY;EACb,CAAA,EAEJ,CAAA;EAMF,UAAA;CACa,CAAA,GAChB,oBAAC,gBAAD,EAAA,UAAiB,UAA0B,CAAA,CACpC,EAAA,CAAA,GACT,oBAAC,qBAAD;EAAqB,OAAM;EAAM,WAAU;EACxC,UAAA,MAAM,YACL,oBAAC,uBAAD,EAAuB,cAAc,MAAM,aAAe,CAAA;CAEzC,CAAA,CACT,EAAA,CAAA;AAElB;AAEA,WAAW,QAAQ;AACnB,WAAW,gBAAgB;AAC3B,WAAW,kBAAkB;AAC7B,WAAW,iBAAiB"}
@@ -1,9 +1,9 @@
1
- import { Button } from "../core/Button.js";
2
1
  import { UserAvatar } from "../core/UserAvatar.js";
2
+ import { Button } from "../core/Button.js";
3
3
  import { Avatar, AvatarFallback, AvatarImage } from "../core/Avatar.js";
4
+ import { useI18n } from "alepha/react/i18n";
4
5
  import { Check, Copy } from "lucide-react";
5
6
  import { useEffect, useRef, useState } from "react";
6
- import { useI18n } from "alepha/react/i18n";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/shell/DetailAside.tsx
9
9
  /**
@@ -83,7 +83,7 @@ const DetailAside = (props) => {
83
83
  children: row.copy
84
84
  }), /* @__PURE__ */ jsx(Button, {
85
85
  type: "button",
86
- variant: "ghost",
86
+ variant: "minimal",
87
87
  size: "icon-xs",
88
88
  onClick: () => copy(row),
89
89
  "aria-label": tr("admin.detail.copyValue", {
@@ -1 +1 @@
1
- {"version":3,"file":"DetailAside.js","names":[],"sources":["../../src/shell/DetailAside.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Check, Copy } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"../core/Avatar.tsx\";\nimport { Button } from \"../core/Button.tsx\";\nimport { UserAvatar } from \"../core/UserAvatar.tsx\";\n\nexport interface DetailAsideRow {\n /**\n * Doubles as the React key, so two rows in one aside must not share a label.\n */\n label: string;\n value?: React.ReactNode;\n /**\n * Renders a copy-to-clipboard button beside the value. When `value` is\n * omitted the row renders this text as the value, in mono — the shape an id\n * row wants.\n */\n copy?: string;\n}\n\nexport interface DetailAsideProps {\n /**\n * Omit when something else on screen already names the thing — a\n * breadcrumb leaf, most often. With no title and no avatar the header\n * block is not rendered at all and the list starts at the top edge.\n */\n title?: string;\n /**\n * Thumbnail or avatar source, as a URL. Falls back to {@link fallback}.\n */\n image?: string;\n /**\n * The same picture as a file id served by `alepha/api/files` - a\n * `user.picture`, say - drawn through {@link UserAvatar} on the\n * authenticated file route. Wins over {@link image}.\n *\n * A separate prop because a file id is not a URL: handed to `image`, the\n * browser requested the bare id relative to the page and the fallback\n * letter was all anyone saw (#Q2246).\n */\n imageFileId?: string;\n /**\n * Shown in place of a missing image. Defaults to the title's initial.\n */\n fallback?: string;\n /**\n * Set `false` for an entity that has no avatar concept at all, and the\n * title stands alone.\n *\n * The letter fallback earns its place when the thing *has* a picture and\n * happens to be missing one — a user without an uploaded photo is still a\n * face-shaped hole. For something that could never have had one, a large\n * square holding the first letter of a title printed beside it is the same\n * character twice at two sizes.\n */\n avatar?: boolean;\n rows: DetailAsideRow[];\n}\n\n/**\n * The identity panel of a detail page: a thumbnail and title above a dense\n * label/value list.\n *\n * Dense rather than a marketing hero — the list is what a reader scans, so it\n * is a `<dl>` of small caps labels over their values, and a row with nothing\n * to say is left out by the caller rather than rendered empty.\n *\n * Extracted from the admin user detail page and shared by every detail page\n * since, which is why the clipboard behaviour lives here: each of them wants\n * a copyable id, and each of them had reimplemented it. It moved out of\n * `components/admin/` alongside {@link DetailLayout} once a non-admin page\n * (Lore's Epic view) became a consumer.\n */\nexport const DetailAside = (props: DetailAsideProps) => {\n const { tr } = useI18n();\n\n // Which row last had its value copied, so only that row shows the tick.\n const [copiedLabel, setCopiedLabel] = useState<string>();\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n const copy = async (row: DetailAsideRow) => {\n if (!row.copy) return;\n try {\n await navigator.clipboard.writeText(row.copy);\n setCopiedLabel(row.label);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopiedLabel(undefined), 1_500);\n } catch {\n // clipboard may be unavailable (insecure context); ignore\n }\n };\n\n const initial = (props.fallback ?? props.title ?? \"?\")\n .charAt(0)\n .toUpperCase();\n\n const showAvatar = props.avatar !== false;\n const header = showAvatar || props.title;\n\n return (\n <div className=\"flex flex-col gap-4\">\n {header ? (\n <div className=\"flex items-center gap-3\">\n {showAvatar && props.imageFileId ? (\n <UserAvatar\n fileId={props.imageFileId}\n alt={props.title ?? \"\"}\n className=\"size-10 rounded-md\"\n fallback={<span className=\"text-sm\">{initial}</span>}\n />\n ) : showAvatar ? (\n <Avatar className=\"size-10 rounded-md after:rounded-md\">\n {props.image && (\n <AvatarImage\n src={props.image}\n alt={props.title ?? \"\"}\n className=\"rounded-md\"\n />\n )}\n <AvatarFallback className=\"rounded-md\">{initial}</AvatarFallback>\n </Avatar>\n ) : null}\n {props.title ? (\n <span\n className=\"min-w-0 flex-1 truncate text-sm font-semibold tracking-tight\"\n title={props.title}\n >\n {props.title}\n </span>\n ) : null}\n </div>\n ) : null}\n {/* The list is a bordered card whose rows are divided from each other,\n rather than a run of rows separated by whitespace.\n\n It replaced a single `border-t` above the list, which existed only\n to separate it from the header and had to be dropped when there was\n no header to separate it from (a top border with empty space above\n it reads as a clipped element). The card's own border does that job\n on every side, so the conditional is gone: the panel looks the same\n whether or not a title sits above it.\n\n `divide-y` instead of a border on each row: a border-bottom on all\n of them doubles up against the card's own bottom edge, and skipping\n the last one by hand is the rule `divide-y` already encodes.\n\n `gap-3` had to go with it. Rows that are spaced apart AND ruled show\n the rule floating in the gap rather than meeting the rows it\n divides; `py-2.5` inside each row is what carries the rhythm now.\n\n `overflow-hidden` for the corners: with nothing painting a\n background the radius is only on the border, but the first and last\n rows sit in the rounded corners and anything they gain later (a hover\n tint, a status band) would square them off.\n\n The tint is `bg-muted/40`, not `bg-muted`. The card once wore the\n table header's fold (`bg-muted` under a `--bevel` line on every\n row), and badges and controls inside a row came out the same colour\n as the card they sat on. At 40% the card stays a step below them. Plain `bg-muted/40` is not in the state-layer\n redirect in `styles.css` (only its `hover:` form is). */}\n <dl className=\"bg-muted/40 flex flex-col divide-y overflow-hidden rounded-lg border text-sm\">\n {props.rows.map((row) => (\n <div key={row.label} className=\"flex flex-col gap-0.5 px-3 py-2.5\">\n <dt className=\"text-muted-foreground text-[11px] font-medium tracking-wide uppercase\">\n {row.label}\n </dt>\n <dd className=\"min-w-0\">\n {row.copy ? (\n <div className=\"flex items-center gap-1\">\n {row.value ?? (\n <code\n className=\"text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs\"\n title={row.copy}\n >\n {row.copy}\n </code>\n )}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={() => copy(row)}\n aria-label={tr(\"admin.detail.copyValue\", {\n default: `Copy ${row.label}`,\n args: [row.label],\n })}\n // No background override: `ghost` hovers to `bg-muted`,\n // and that class does not resolve to the opaque token:\n // `styles.css`\n // redirects it to `--state-layer`, a 10% `--foreground`\n // wash that DARKENS in light and lifts in dark, so it\n // reads over whatever surface it lands on. A literal\n // `hover:bg-background` here looked correct in dark and\n // went white-on-grey in light.\n className=\"text-muted-foreground hover:text-foreground shrink-0\"\n >\n {copiedLabel === row.label ? (\n <Check className=\"size-3.5\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </Button>\n </div>\n ) : (\n row.value\n )}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+EA,MAAa,eAAe,UAA4B;CACtD,MAAM,EAAE,OAAO,QAAQ;CAGvB,MAAM,CAAC,aAAa,kBAAkB,SAAiB;CACvD,MAAM,QAAQ,OAAkD,KAAA,CAAS;CACzE,sBACc;EACV,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;CAC/C,GACA,CAAC,CACH;CAEA,MAAM,OAAO,OAAO,QAAwB;EAC1C,IAAI,CAAC,IAAI,MAAM;EACf,IAAI;GACF,MAAM,UAAU,UAAU,UAAU,IAAI,IAAI;GAC5C,eAAe,IAAI,KAAK;GACxB,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;GAC7C,MAAM,UAAU,iBAAiB,eAAe,KAAA,CAAS,GAAG,IAAK;EACnE,QAAQ,CAER;CACF;CAEA,MAAM,WAAW,MAAM,YAAY,MAAM,SAAS,IAAA,CAC/C,OAAO,CAAC,CAAC,CACT,YAAY;CAEf,MAAM,aAAa,MAAM,WAAW;CACpC,MAAM,SAAS,cAAc,MAAM;CAEnC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,SACC,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,cAAc,MAAM,cACnB,oBAAC,YAAD;IACE,QAAQ,MAAM;IACd,KAAK,MAAM,SAAS;IACpB,WAAU;IACV,UAAU,oBAAC,QAAD;KAAM,WAAU;KAAW,UAAA;IAAc,CAAA;GACpD,CAAA,IACC,aACF,qBAAC,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,MAAM,SACL,oBAAC,aAAD;KACE,KAAK,MAAM;KACX,KAAK,MAAM,SAAS;KACpB,WAAU;IACX,CAAA,GAEH,oBAAC,gBAAD;KAAgB,WAAU;KAAc,UAAA;IAAwB,CAAA,CAC1D;GACN,CAAA,IAAA,MACH,MAAM,QACL,oBAAC,QAAD;IACE,WAAU;IACV,OAAO,MAAM;IAEZ,UAAA,MAAM;GACH,CAAA,IACJ,IACD;EACH,CAAA,IAAA,MA6BJ,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,MAAM,KAAK,KAAK,QACf,qBAAC,OAAD;IAAqB,WAAU;IAA/B,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI;IACH,CAAA,GACJ,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI,OACH,qBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACG,IAAI,SACH,oBAAC,QAAD;OACE,WAAU;OACV,OAAO,IAAI;OAEV,UAAA,IAAI;MACD,CAAA,GAER,oBAAC,QAAD;OACE,MAAK;OACL,SAAQ;OACR,MAAK;OACL,eAAe,KAAK,GAAG;OACvB,cAAY,GAAG,0BAA0B;QACvC,SAAS,QAAQ,IAAI;QACrB,MAAM,CAAC,IAAI,KAAK;OAClB,CAAC;OASD,WAAU;OAET,UAAA,gBAAgB,IAAI,QACnB,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA,IAE7B,oBAAC,MAAD,EAAM,WAAU,WAAY,CAAA;MAExB,CAAA,CACL;KAEL,CAAA,IAAA,IAAI;IAEJ,CAAA,CACD;GA7CK,GAAA,IAAI,KA6CT,CACN;EACC,CAAA,CACD;;AAET"}
1
+ {"version":3,"file":"DetailAside.js","names":[],"sources":["../../src/shell/DetailAside.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Check, Copy } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"../core/Avatar.tsx\";\nimport { Button } from \"../core/Button.tsx\";\nimport { UserAvatar } from \"../core/UserAvatar.tsx\";\n\nexport interface DetailAsideRow {\n /**\n * Doubles as the React key, so two rows in one aside must not share a label.\n */\n label: string;\n value?: React.ReactNode;\n /**\n * Renders a copy-to-clipboard button beside the value. When `value` is\n * omitted the row renders this text as the value, in mono — the shape an id\n * row wants.\n */\n copy?: string;\n}\n\nexport interface DetailAsideProps {\n /**\n * Omit when something else on screen already names the thing — a\n * breadcrumb leaf, most often. With no title and no avatar the header\n * block is not rendered at all and the list starts at the top edge.\n */\n title?: string;\n /**\n * Thumbnail or avatar source, as a URL. Falls back to {@link fallback}.\n */\n image?: string;\n /**\n * The same picture as a file id served by `alepha/api/files` - a\n * `user.picture`, say - drawn through {@link UserAvatar} on the\n * authenticated file route. Wins over {@link image}.\n *\n * A separate prop because a file id is not a URL: handed to `image`, the\n * browser requested the bare id relative to the page and the fallback\n * letter was all anyone saw (#Q2246).\n */\n imageFileId?: string;\n /**\n * Shown in place of a missing image. Defaults to the title's initial.\n */\n fallback?: string;\n /**\n * Set `false` for an entity that has no avatar concept at all, and the\n * title stands alone.\n *\n * The letter fallback earns its place when the thing *has* a picture and\n * happens to be missing one — a user without an uploaded photo is still a\n * face-shaped hole. For something that could never have had one, a large\n * square holding the first letter of a title printed beside it is the same\n * character twice at two sizes.\n */\n avatar?: boolean;\n rows: DetailAsideRow[];\n}\n\n/**\n * The identity panel of a detail page: a thumbnail and title above a dense\n * label/value list.\n *\n * Dense rather than a marketing hero — the list is what a reader scans, so it\n * is a `<dl>` of small caps labels over their values, and a row with nothing\n * to say is left out by the caller rather than rendered empty.\n *\n * Extracted from the admin user detail page and shared by every detail page\n * since, which is why the clipboard behaviour lives here: each of them wants\n * a copyable id, and each of them had reimplemented it. It moved out of\n * `components/admin/` alongside {@link DetailLayout} once a non-admin page\n * (Lore's Epic view) became a consumer.\n */\nexport const DetailAside = (props: DetailAsideProps) => {\n const { tr } = useI18n();\n\n // Which row last had its value copied, so only that row shows the tick.\n const [copiedLabel, setCopiedLabel] = useState<string>();\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n const copy = async (row: DetailAsideRow) => {\n if (!row.copy) return;\n try {\n await navigator.clipboard.writeText(row.copy);\n setCopiedLabel(row.label);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopiedLabel(undefined), 1_500);\n } catch {\n // clipboard may be unavailable (insecure context); ignore\n }\n };\n\n const initial = (props.fallback ?? props.title ?? \"?\")\n .charAt(0)\n .toUpperCase();\n\n const showAvatar = props.avatar !== false;\n const header = showAvatar || props.title;\n\n return (\n <div className=\"flex flex-col gap-4\">\n {header ? (\n <div className=\"flex items-center gap-3\">\n {showAvatar && props.imageFileId ? (\n <UserAvatar\n fileId={props.imageFileId}\n alt={props.title ?? \"\"}\n className=\"size-10 rounded-md\"\n fallback={<span className=\"text-sm\">{initial}</span>}\n />\n ) : showAvatar ? (\n <Avatar className=\"size-10 rounded-md after:rounded-md\">\n {props.image && (\n <AvatarImage\n src={props.image}\n alt={props.title ?? \"\"}\n className=\"rounded-md\"\n />\n )}\n <AvatarFallback className=\"rounded-md\">{initial}</AvatarFallback>\n </Avatar>\n ) : null}\n {props.title ? (\n <span\n className=\"min-w-0 flex-1 truncate text-sm font-semibold tracking-tight\"\n title={props.title}\n >\n {props.title}\n </span>\n ) : null}\n </div>\n ) : null}\n {/* The list is a bordered card whose rows are divided from each other,\n rather than a run of rows separated by whitespace.\n\n It replaced a single `border-t` above the list, which existed only\n to separate it from the header and had to be dropped when there was\n no header to separate it from (a top border with empty space above\n it reads as a clipped element). The card's own border does that job\n on every side, so the conditional is gone: the panel looks the same\n whether or not a title sits above it.\n\n `divide-y` instead of a border on each row: a border-bottom on all\n of them doubles up against the card's own bottom edge, and skipping\n the last one by hand is the rule `divide-y` already encodes.\n\n `gap-3` had to go with it. Rows that are spaced apart AND ruled show\n the rule floating in the gap rather than meeting the rows it\n divides; `py-2.5` inside each row is what carries the rhythm now.\n\n `overflow-hidden` for the corners: with nothing painting a\n background the radius is only on the border, but the first and last\n rows sit in the rounded corners and anything they gain later (a hover\n tint, a status band) would square them off.\n\n The tint is `bg-muted/40`, not `bg-muted`. The card once wore the\n table header's fold (`bg-muted` under a `--bevel` line on every\n row), and badges and controls inside a row came out the same colour\n as the card they sat on. At 40% the card stays a step below them. Plain `bg-muted/40` is not in the state-layer\n redirect in `styles.css` (only its `hover:` form is). */}\n <dl className=\"bg-muted/40 flex flex-col divide-y overflow-hidden rounded-lg border text-sm\">\n {props.rows.map((row) => (\n <div key={row.label} className=\"flex flex-col gap-0.5 px-3 py-2.5\">\n <dt className=\"text-muted-foreground text-[11px] font-medium tracking-wide uppercase\">\n {row.label}\n </dt>\n <dd className=\"min-w-0\">\n {row.copy ? (\n <div className=\"flex items-center gap-1\">\n {row.value ?? (\n <code\n className=\"text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs\"\n title={row.copy}\n >\n {row.copy}\n </code>\n )}\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon-xs\"\n onClick={() => copy(row)}\n aria-label={tr(\"admin.detail.copyValue\", {\n default: `Copy ${row.label}`,\n args: [row.label],\n })}\n // No background override: `ghost` hovers to `bg-muted`,\n // and that class does not resolve to the opaque token:\n // `styles.css`\n // redirects it to `--state-layer`, a 10% `--foreground`\n // wash that DARKENS in light and lifts in dark, so it\n // reads over whatever surface it lands on. A literal\n // `hover:bg-background` here looked correct in dark and\n // went white-on-grey in light.\n className=\"text-muted-foreground hover:text-foreground shrink-0\"\n >\n {copiedLabel === row.label ? (\n <Check className=\"size-3.5\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </Button>\n </div>\n ) : (\n row.value\n )}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+EA,MAAa,eAAe,UAA4B;CACtD,MAAM,EAAE,OAAO,QAAQ;CAGvB,MAAM,CAAC,aAAa,kBAAkB,SAAiB;CACvD,MAAM,QAAQ,OAAkD,KAAA,CAAS;CACzE,sBACc;EACV,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;CAC/C,GACA,CAAC,CACH;CAEA,MAAM,OAAO,OAAO,QAAwB;EAC1C,IAAI,CAAC,IAAI,MAAM;EACf,IAAI;GACF,MAAM,UAAU,UAAU,UAAU,IAAI,IAAI;GAC5C,eAAe,IAAI,KAAK;GACxB,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;GAC7C,MAAM,UAAU,iBAAiB,eAAe,KAAA,CAAS,GAAG,IAAK;EACnE,QAAQ,CAER;CACF;CAEA,MAAM,WAAW,MAAM,YAAY,MAAM,SAAS,IAAA,CAC/C,OAAO,CAAC,CAAC,CACT,YAAY;CAEf,MAAM,aAAa,MAAM,WAAW;CACpC,MAAM,SAAS,cAAc,MAAM;CAEnC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,SACC,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,cAAc,MAAM,cACnB,oBAAC,YAAD;IACE,QAAQ,MAAM;IACd,KAAK,MAAM,SAAS;IACpB,WAAU;IACV,UAAU,oBAAC,QAAD;KAAM,WAAU;KAAW,UAAA;IAAc,CAAA;GACpD,CAAA,IACC,aACF,qBAAC,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,MAAM,SACL,oBAAC,aAAD;KACE,KAAK,MAAM;KACX,KAAK,MAAM,SAAS;KACpB,WAAU;IACX,CAAA,GAEH,oBAAC,gBAAD;KAAgB,WAAU;KAAc,UAAA;IAAwB,CAAA,CAC1D;GACN,CAAA,IAAA,MACH,MAAM,QACL,oBAAC,QAAD;IACE,WAAU;IACV,OAAO,MAAM;IAEZ,UAAA,MAAM;GACH,CAAA,IACJ,IACD;EACH,CAAA,IAAA,MA6BJ,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,MAAM,KAAK,KAAK,QACf,qBAAC,OAAD;IAAqB,WAAU;IAA/B,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI;IACH,CAAA,GACJ,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI,OACH,qBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACG,IAAI,SACH,oBAAC,QAAD;OACE,WAAU;OACV,OAAO,IAAI;OAEV,UAAA,IAAI;MACD,CAAA,GAER,oBAAC,QAAD;OACE,MAAK;OACL,SAAQ;OACR,MAAK;OACL,eAAe,KAAK,GAAG;OACvB,cAAY,GAAG,0BAA0B;QACvC,SAAS,QAAQ,IAAI;QACrB,MAAM,CAAC,IAAI,KAAK;OAClB,CAAC;OASD,WAAU;OAET,UAAA,gBAAgB,IAAI,QACnB,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA,IAE7B,oBAAC,MAAD,EAAM,WAAU,WAAY,CAAA;MAExB,CAAA,CACL;KAEL,CAAA,IAAA,IAAI;IAEJ,CAAA,CACD;GA7CK,GAAA,IAAI,KA6CT,CACN;EACC,CAAA,CACD;;AAET"}
@@ -1,6 +1,6 @@
1
1
  import { Button } from "../core/Button.js";
2
- import { Segmented } from "../core/Segmented.js";
3
2
  import { Skeleton } from "../core/Skeleton.js";
3
+ import { Segmented } from "../core/Segmented.js";
4
4
  import { ArrowLeft } from "lucide-react";
5
5
  import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -59,7 +59,7 @@ const DetailLayout = (props) => {
59
59
  className: "text-muted-foreground text-sm",
60
60
  children: props.notFound.message
61
61
  }), /* @__PURE__ */ jsxs(Button, {
62
- variant: "outline",
62
+ variant: "outlined",
63
63
  onClick: props.notFound.onBack,
64
64
  children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }), props.notFound.backLabel]
65
65
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"DetailLayout.js","names":[],"sources":["../../src/shell/DetailLayout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Segmented } from \"../core/Segmented.tsx\";\nimport { Skeleton } from \"../core/Skeleton.tsx\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state — see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data — every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load —\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific — it imports a\n * button, a segmented control and a skeleton — so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given — the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children` — they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outline\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n {/* ⚠️ `min-w-0 overflow-x-auto` around the tab strip, and `shrink-0`\n on the actions. Without them the row is a non-wrapping flex line\n whose items refuse to shrink below their `whitespace-nowrap`\n min-content width, while the ancestor two levels up is\n `overflow-hidden` (deliberately, see the comment above it) and\n this row is `overflow-x: visible`. Everything past the right edge\n was therefore CLIPPED, with no scrollbar and no way to reach it.\n\n Measured on the epic view at 411x845: the row was 409 wide with a\n 648 scrollWidth, and `Folios`, `Edit` and `Begin the Epic` - the\n page's primary action - were all off-screen and unclickable. 768px\n was worse, not better, because the 288px aside returns at `md`.\n\n The two classes split the row's shortfall deliberately. The tab\n strip is a bounded list this component owns, so it takes the\n scrolling; the actions are caller JSX this component cannot size\n (as the comment above already says), so they keep their full width\n and stay clickable. A tab strip that scrolls is a known phone\n pattern; a primary action hidden behind a scroll is not.\n\n The `no-scrollbar` class used elsewhere in this package is not\n defined anywhere in the repo, so the thin scrollbar shows - which\n is the affordance saying there is more to the right.\n\n `py-1` is not spacing: `overflow-x: auto` makes the computed\n `overflow-y` `auto` too, and without 4px of slack the segment's\n 3px focus ring is clipped top and bottom. The row is\n `items-center` in a fixed 56px bar, so it costs no height. */}\n <div className=\"min-w-0 overflow-x-auto py-1\">\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n </div>\n {props.actions ? (\n <div className=\"ml-auto flex shrink-0 items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAU,SAAS,MAAM,SAAS;GAAlD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAwCE,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,WAAD;MACE,MAAK;MACI;MACT,OAAO,MAAM;MACb,UAAU,MAAM;KACjB,CAAA;IACE,CAAA,GACJ,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
1
+ {"version":3,"file":"DetailLayout.js","names":[],"sources":["../../src/shell/DetailLayout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Segmented } from \"../core/Segmented.tsx\";\nimport { Skeleton } from \"../core/Skeleton.tsx\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state — see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data — every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load —\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific — it imports a\n * button, a segmented control and a skeleton — so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given — the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children` — they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outlined\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n {/* ⚠️ `min-w-0 overflow-x-auto` around the tab strip, and `shrink-0`\n on the actions. Without them the row is a non-wrapping flex line\n whose items refuse to shrink below their `whitespace-nowrap`\n min-content width, while the ancestor two levels up is\n `overflow-hidden` (deliberately, see the comment above it) and\n this row is `overflow-x: visible`. Everything past the right edge\n was therefore CLIPPED, with no scrollbar and no way to reach it.\n\n Measured on the epic view at 411x845: the row was 409 wide with a\n 648 scrollWidth, and `Folios`, `Edit` and `Begin the Epic` - the\n page's primary action - were all off-screen and unclickable. 768px\n was worse, not better, because the 288px aside returns at `md`.\n\n The two classes split the row's shortfall deliberately. The tab\n strip is a bounded list this component owns, so it takes the\n scrolling; the actions are caller JSX this component cannot size\n (as the comment above already says), so they keep their full width\n and stay clickable. A tab strip that scrolls is a known phone\n pattern; a primary action hidden behind a scroll is not.\n\n The `no-scrollbar` class used elsewhere in this package is not\n defined anywhere in the repo, so the thin scrollbar shows - which\n is the affordance saying there is more to the right.\n\n `py-1` is not spacing: `overflow-x: auto` makes the computed\n `overflow-y` `auto` too, and without 4px of slack the segment's\n 3px focus ring is clipped top and bottom. The row is\n `items-center` in a fixed 56px bar, so it costs no height. */}\n <div className=\"min-w-0 overflow-x-auto py-1\">\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n </div>\n {props.actions ? (\n <div className=\"ml-auto flex shrink-0 items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAW,SAAS,MAAM,SAAS;GAAnD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAwCE,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,WAAD;MACE,MAAK;MACI;MACT,OAAO,MAAM;MACb,UAAU,MAAM;KACjB,CAAA;IACE,CAAA,GACJ,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
@@ -1,5 +1,5 @@
1
- import { isActivePath } from "./navTreeUtil.js";
2
1
  import { AppShell } from "./AppShell.js";
2
+ import { isActivePath } from "./navTreeUtil.js";
3
3
  import { useNavBreadcrumbs } from "./useNavBreadcrumbs.js";
4
4
  import { useNavTree } from "./useNavTree.js";
5
5
  import { useRouterState } from "alepha/react/router";
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useRef, useState } from "react";
2
- import { useEvents } from "alepha/react";
3
2
  import { jsx } from "react/jsx-runtime";
3
+ import { useEvents } from "alepha/react";
4
4
  //#region src/shell/NavigationProgress.tsx
5
5
  const NavigationProgress = (props) => {
6
6
  const [progress, setProgress] = useState(0);
@@ -1 +1 @@
1
- {"version":3,"file":"PlateTabBar.d.ts","sourceRoot":"","sources":["../../src/shell/PlateTabBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCA+ElD,CAAC"}
1
+ {"version":3,"file":"PlateTabBar.d.ts","sourceRoot":"","sources":["../../src/shell/PlateTabBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAiFlD,CAAC"}
@@ -14,11 +14,11 @@ const PlateTabBar = (props) => {
14
14
  const navigates = props.tabs.every((tab) => tab.href !== void 0);
15
15
  return /* @__PURE__ */ jsx("div", {
16
16
  "data-testid": props.testId,
17
- className: cn("bg-muted border-border flex gap-5 px-6 shadow-[inset_0_1px_0_0_var(--bevel)]", props.divided !== false && "border-t"),
17
+ className: cn("bg-muted border-border flex gap-5 overflow-x-auto px-6 shadow-[inset_0_1px_0_0_var(--bevel)]", props.divided !== false && "border-t"),
18
18
  role: navigates ? "navigation" : "tablist",
19
19
  children: props.tabs.map((tab) => {
20
20
  const active = tab.key === props.active;
21
- const className = cn("-mb-px inline-flex h-[42px] items-center gap-[7px] border-b-2 text-[13.5px] font-medium transition-colors", active ? "border-primary text-foreground" : "text-muted-foreground hover:text-foreground border-transparent");
21
+ const className = cn("-mb-px inline-flex h-[42px] shrink-0 items-center gap-[7px] border-b-2 text-[13.5px] font-medium whitespace-nowrap transition-colors", active ? "border-primary text-foreground" : "text-muted-foreground hover:text-foreground border-transparent");
22
22
  const body = /* @__PURE__ */ jsxs(Fragment, { children: [
23
23
  tab.icon && /* @__PURE__ */ jsx(tab.icon, {
24
24
  className: "size-[14px]",
@@ -1 +1 @@
1
- {"version":3,"file":"PlateTabBar.js","names":[],"sources":["../../src/shell/PlateTabBar.tsx"],"sourcesContent":["import { Link } from \"alepha/react/router\";\n\nimport { cn } from \"../core/utils.ts\";\nimport type { IconComponent } from \"../form/iconHint.tsx\";\n\nexport interface PlateTab {\n /**\n * Identifies the tab. Compared against {@link PlateTabBarProps.active}, and\n * handed back to {@link PlateTabBarProps.onSelect}. For a router-driven bar\n * this is the route name.\n */\n key: string;\n label: string;\n icon?: IconComponent;\n /**\n * A trailing count, in a pill of its own rather than folded into the label.\n * The pill's colour follows the tab's state - `text-foreground` active,\n * `text-muted-foreground` not - and a count written into the label would\n * carry one fixed class that is wrong on one of the two. Same reason\n * `Segmented` has a `count` prop.\n *\n * Show it only once its collection has resolved: `undefined` renders the\n * bare label rather than a confident \"0\".\n */\n count?: number;\n /**\n * Makes this tab a NAVIGATION rather than a state change. Present, the tab\n * is a router `Link` and `onSelect` is not called; absent, it is a button.\n *\n * Both shapes exist because both are real: a tab that swaps a panel inside\n * one route is state, and a tab that is its own route has to be a link -\n * middle-click, copy-link and the back button all depend on it.\n */\n href?: string;\n}\n\nexport interface PlateTabBarProps {\n tabs: PlateTab[];\n active: string;\n /**\n * Called for a tab with no `href`. A router-driven bar passes nothing.\n */\n onSelect?: (key: string) => void;\n /**\n * Marks the bar for tests. Worth setting: tab labels are ordinary words\n * (\"Overview\", \"Settings\") that a page-wide `getByRole` finds in the tab\n * BODIES too, and \"Settings\" is also a project-level nav entry.\n */\n testId?: string;\n /**\n * Whether to rule off the top edge. Default `true`.\n *\n * The line separates the tabs from the plate above them, so it is only\n * right when there IS one. `PlateLayout` derives this from its own `plate`\n * slot; a bar with no plate above it would otherwise draw a stray line\n * immediately under the container's top edge, which is what a caller\n * omitting the plate for the first time discovered (feedback #2095).\n */\n divided?: boolean;\n}\n\n/**\n * Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.\n *\n * Underlines rather than `Segmented`, which sits inside a toolbar as a\n * control. This bar IS the bottom edge of a full-width band, and a pill group\n * floating on that edge reads as a widget dropped onto the header rather than\n * as the header's own last row.\n */\nexport const PlateTabBar = (props: PlateTabBarProps) => {\n // A bar of links is a NAVIGATION, not a tablist, and its items are links\n // rather than tabs. `role=\"tab\"` on an anchor overrides the implicit link\n // role, which takes it out of `getByRole(\"link\")` and tells a screen reader\n // it swaps a panel when it actually leaves the page. `aria-current=\"page\"`\n // is what marks the current one in a set of navigation links.\n const navigates = props.tabs.every((tab) => tab.href !== undefined);\n\n return (\n <div\n data-testid={props.testId}\n className={cn(\n // The table header's surface, and for the same reason: this strip is\n // chrome, not body. `bg-muted` under a `--bevel` line laid just inside\n // the top edge - two adjacent lines of opposite polarity read as a\n // fold - so the band looks raised out of the page rather than painted\n // onto it. Opaque like the sticky table header, not the base header's\n // `bg-muted/50`: the plate above is already translucent over the page,\n // and stacking a second wash on it makes the two bands differ by a\n // couple of percent instead of reading as one raised object.\n //\n // The border above the bevel is whichever line closes the top edge:\n // the bar's own `border-t` when there is a plate, and the shell\n // header's bottom border when there is not. Both are `--border`, so\n // the fold reads the same either way.\n \"bg-muted border-border flex gap-5 px-6 shadow-[inset_0_1px_0_0_var(--bevel)]\",\n props.divided !== false && \"border-t\",\n )}\n role={navigates ? \"navigation\" : \"tablist\"}\n >\n {props.tabs.map((tab) => {\n const active = tab.key === props.active;\n const className = cn(\n \"-mb-px inline-flex h-[42px] items-center gap-[7px] border-b-2 text-[13.5px] font-medium transition-colors\",\n active\n ? \"border-primary text-foreground\"\n : \"text-muted-foreground hover:text-foreground border-transparent\",\n );\n const body = (\n <>\n {tab.icon && <tab.icon className=\"size-[14px]\" aria-hidden />}\n {tab.label}\n {tab.count !== undefined && (\n <span\n className={cn(\n \"bg-foreground/10 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-[5px] font-mono text-[10.5px]\",\n active ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n >\n {tab.count}\n </span>\n )}\n </>\n );\n\n return tab.href !== undefined ? (\n <Link\n key={tab.key}\n href={tab.href}\n aria-current={active ? \"page\" : undefined}\n className={className}\n >\n {body}\n </Link>\n ) : (\n <button\n key={tab.key}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => props.onSelect?.(tab.key)}\n className={className}\n >\n {body}\n </button>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAqEA,MAAa,eAAe,UAA4B;CAMtD,MAAM,YAAY,MAAM,KAAK,OAAO,QAAQ,IAAI,SAAS,KAAA,CAAS;CAElE,OACE,oBAAC,OAAD;EACE,eAAa,MAAM;EACnB,WAAW,GAcT,gFACA,MAAM,YAAY,SAAS,UAC7B;EACA,MAAM,YAAY,eAAe;EAEhC,UAAA,MAAM,KAAK,KAAK,QAAQ;GACvB,MAAM,SAAS,IAAI,QAAQ,MAAM;GACjC,MAAM,YAAY,GAChB,6GACA,SACI,mCACA,gEACN;GACA,MAAM,OACJ,qBAAA,UAAA,EAAA,UAAA;IACG,IAAI,QAAQ,oBAAC,IAAI,MAAL;KAAU,WAAU;KAAc,eAAA;IAAa,CAAA;IAC3D,IAAI;IACJ,IAAI,UAAU,KAAA,KACb,oBAAC,QAAD;KACE,WAAW,GACT,gIACA,SAAS,oBAAoB,uBAC/B;KAEC,UAAA,IAAI;IACD,CAAA;GAER,EAAA,CAAA;GAGJ,OAAO,IAAI,SAAS,KAAA,IAClB,oBAAC,MAAD;IAEE,MAAM,IAAI;IACV,gBAAc,SAAS,SAAS,KAAA;IACrB;IAEV,UAAA;GACG,GANC,IAAI,GAML,IAEN,oBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,iBAAe;IACf,eAAe,MAAM,WAAW,IAAI,GAAG;IAC5B;IAEV,UAAA;GACK,GARD,IAAI,GAQH;EAEZ,CAAC;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"PlateTabBar.js","names":[],"sources":["../../src/shell/PlateTabBar.tsx"],"sourcesContent":["import { Link } from \"alepha/react/router\";\n\nimport { cn } from \"../core/utils.ts\";\nimport type { IconComponent } from \"../form/iconHint.tsx\";\n\nexport interface PlateTab {\n /**\n * Identifies the tab. Compared against {@link PlateTabBarProps.active}, and\n * handed back to {@link PlateTabBarProps.onSelect}. For a router-driven bar\n * this is the route name.\n */\n key: string;\n label: string;\n icon?: IconComponent;\n /**\n * A trailing count, in a pill of its own rather than folded into the label.\n * The pill's colour follows the tab's state - `text-foreground` active,\n * `text-muted-foreground` not - and a count written into the label would\n * carry one fixed class that is wrong on one of the two. Same reason\n * `Segmented` has a `count` prop.\n *\n * Show it only once its collection has resolved: `undefined` renders the\n * bare label rather than a confident \"0\".\n */\n count?: number;\n /**\n * Makes this tab a NAVIGATION rather than a state change. Present, the tab\n * is a router `Link` and `onSelect` is not called; absent, it is a button.\n *\n * Both shapes exist because both are real: a tab that swaps a panel inside\n * one route is state, and a tab that is its own route has to be a link -\n * middle-click, copy-link and the back button all depend on it.\n */\n href?: string;\n}\n\nexport interface PlateTabBarProps {\n tabs: PlateTab[];\n active: string;\n /**\n * Called for a tab with no `href`. A router-driven bar passes nothing.\n */\n onSelect?: (key: string) => void;\n /**\n * Marks the bar for tests. Worth setting: tab labels are ordinary words\n * (\"Overview\", \"Settings\") that a page-wide `getByRole` finds in the tab\n * BODIES too, and \"Settings\" is also a project-level nav entry.\n */\n testId?: string;\n /**\n * Whether to rule off the top edge. Default `true`.\n *\n * The line separates the tabs from the plate above them, so it is only\n * right when there IS one. `PlateLayout` derives this from its own `plate`\n * slot; a bar with no plate above it would otherwise draw a stray line\n * immediately under the container's top edge, which is what a caller\n * omitting the plate for the first time discovered (feedback #2095).\n */\n divided?: boolean;\n}\n\n/**\n * Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.\n *\n * Underlines rather than `Segmented`, which sits inside a toolbar as a\n * control. This bar IS the bottom edge of a full-width band, and a pill group\n * floating on that edge reads as a widget dropped onto the header rather than\n * as the header's own last row.\n */\nexport const PlateTabBar = (props: PlateTabBarProps) => {\n // A bar of links is a NAVIGATION, not a tablist, and its items are links\n // rather than tabs. `role=\"tab\"` on an anchor overrides the implicit link\n // role, which takes it out of `getByRole(\"link\")` and tells a screen reader\n // it swaps a panel when it actually leaves the page. `aria-current=\"page\"`\n // is what marks the current one in a set of navigation links.\n const navigates = props.tabs.every((tab) => tab.href !== undefined);\n\n return (\n <div\n data-testid={props.testId}\n className={cn(\n // The table header's surface, and for the same reason: this strip is\n // chrome, not body. `bg-muted` under a `--bevel` line laid just inside\n // the top edge - two adjacent lines of opposite polarity read as a\n // fold - so the band looks raised out of the page rather than painted\n // onto it. Opaque like the sticky table header, not the base header's\n // `bg-muted/50`: the plate above is already translucent over the page,\n // and stacking a second wash on it makes the two bands differ by a\n // couple of percent instead of reading as one raised object.\n //\n // The border above the bevel is whichever line closes the top edge:\n // the bar's own `border-t` when there is a plate, and the shell\n // header's bottom border when there is not. Both are `--border`, so\n // the fold reads the same either way.\n // `overflow-x-auto` so a bar wider than a phone scrolls sideways\n // instead of widening the page; the tabs never wrap or shrink.\n \"bg-muted border-border flex gap-5 overflow-x-auto px-6 shadow-[inset_0_1px_0_0_var(--bevel)]\",\n props.divided !== false && \"border-t\",\n )}\n role={navigates ? \"navigation\" : \"tablist\"}\n >\n {props.tabs.map((tab) => {\n const active = tab.key === props.active;\n const className = cn(\n \"-mb-px inline-flex h-[42px] shrink-0 items-center gap-[7px] border-b-2 text-[13.5px] font-medium whitespace-nowrap transition-colors\",\n active\n ? \"border-primary text-foreground\"\n : \"text-muted-foreground hover:text-foreground border-transparent\",\n );\n const body = (\n <>\n {tab.icon && <tab.icon className=\"size-[14px]\" aria-hidden />}\n {tab.label}\n {tab.count !== undefined && (\n <span\n className={cn(\n \"bg-foreground/10 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-[5px] font-mono text-[10.5px]\",\n active ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n >\n {tab.count}\n </span>\n )}\n </>\n );\n\n return tab.href !== undefined ? (\n <Link\n key={tab.key}\n href={tab.href}\n aria-current={active ? \"page\" : undefined}\n className={className}\n >\n {body}\n </Link>\n ) : (\n <button\n key={tab.key}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => props.onSelect?.(tab.key)}\n className={className}\n >\n {body}\n </button>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAqEA,MAAa,eAAe,UAA4B;CAMtD,MAAM,YAAY,MAAM,KAAK,OAAO,QAAQ,IAAI,SAAS,KAAA,CAAS;CAElE,OACE,oBAAC,OAAD;EACE,eAAa,MAAM;EACnB,WAAW,GAgBT,gGACA,MAAM,YAAY,SAAS,UAC7B;EACA,MAAM,YAAY,eAAe;EAEhC,UAAA,MAAM,KAAK,KAAK,QAAQ;GACvB,MAAM,SAAS,IAAI,QAAQ,MAAM;GACjC,MAAM,YAAY,GAChB,wIACA,SACI,mCACA,gEACN;GACA,MAAM,OACJ,qBAAA,UAAA,EAAA,UAAA;IACG,IAAI,QAAQ,oBAAC,IAAI,MAAL;KAAU,WAAU;KAAc,eAAA;IAAa,CAAA;IAC3D,IAAI;IACJ,IAAI,UAAU,KAAA,KACb,oBAAC,QAAD;KACE,WAAW,GACT,gIACA,SAAS,oBAAoB,uBAC/B;KAEC,UAAA,IAAI;IACD,CAAA;GAER,EAAA,CAAA;GAGJ,OAAO,IAAI,SAAS,KAAA,IAClB,oBAAC,MAAD;IAEE,MAAM,IAAI;IACV,gBAAc,SAAS,SAAS,KAAA;IACrB;IAEV,UAAA;GACG,GANC,IAAI,GAML,IAEN,oBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,iBAAe;IACf,eAAe,MAAM,WAAW,IAAI,GAAG;IAC5B;IAEV,UAAA;GACK,GARD,IAAI,GAQH;EAEZ,CAAC;CACE,CAAA;AAET"}
@@ -2,8 +2,8 @@ import { useNavEntries } from "./useNavEntries.js";
2
2
  import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command/Command.js";
3
3
  import { spotlightSearchText } from "./spotlightSearchText.js";
4
4
  import { useRouter } from "alepha/react/router";
5
- import { useCallback, useEffect, useMemo, useState } from "react";
6
5
  import { useI18n } from "alepha/react/i18n";
6
+ import { useCallback, useEffect, useMemo, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/shell/Spotlight.tsx
9
9
  /**
@@ -4,15 +4,15 @@ import { ButtonLanguage } from "./ButtonLanguage.js";
4
4
  import { ButtonTheme } from "./ButtonTheme.js";
5
5
  import { ButtonUser } from "./ButtonUser.js";
6
6
  import { ButtonSettings } from "./ButtonSettings.js";
7
- import { DetailLayout } from "./DetailLayout.js";
8
- import { useDetailTab } from "./useDetailTab.js";
9
- import { DetailAside } from "./DetailAside.js";
10
7
  import { ActionErrorToaster } from "./ActionErrorToaster.js";
11
8
  import { NavigationProgress } from "./NavigationProgress.js";
12
9
  import { SidebarNavAutoClose } from "./SidebarNavAutoClose.js";
13
10
  import { AppShell } from "./AppShell.js";
14
11
  import { NavShell } from "./NavShell.js";
15
12
  import { Spotlight } from "./Spotlight.js";
13
+ import { DetailLayout } from "./DetailLayout.js";
14
+ import { useDetailTab } from "./useDetailTab.js";
15
+ import { DetailAside } from "./DetailAside.js";
16
16
  import { AppActions } from "./AppActions.js";
17
17
  import { inboxUnreadAtom } from "./inboxUnreadAtom.js";
18
18
  import { ButtonInbox } from "./ButtonInbox.js";
@@ -1,7 +1,7 @@
1
1
  import { navLabel } from "./navTreeUtil.js";
2
2
  import { useRouterState } from "alepha/react/router";
3
- import { useMemo } from "react";
4
3
  import { useI18n } from "alepha/react/i18n";
4
+ import { useMemo } from "react";
5
5
  //#region src/shell/useNavBreadcrumbs.ts
6
6
  /**
7
7
  * Derive the breadcrumb trail from the active route layers. Each rendered
@@ -1,7 +1,7 @@
1
1
  import { hasNavPermission, isActivePath, isDescendantOf, keepDeepestActive, navGroupLabel, navLabel } from "./navTreeUtil.js";
2
2
  import { useRouter, useRouterState } from "alepha/react/router";
3
- import { useMemo } from "react";
4
3
  import { useI18n } from "alepha/react/i18n";
4
+ import { useMemo } from "react";
5
5
  import { useAuth } from "alepha/react/auth";
6
6
  //#region src/shell/useNavEntries.ts
7
7
  /**