@alepha/ui 0.32.0 → 0.34.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 (402) hide show
  1. package/dist/account/AccountConnections.js +1 -1
  2. package/dist/account/AccountConnections.js.map +1 -1
  3. package/dist/account/AccountDeleteDialog.d.ts.map +1 -1
  4. package/dist/account/AccountDeleteDialog.js +17 -17
  5. package/dist/account/AccountDeleteDialog.js.map +1 -1
  6. package/dist/account/AccountKeys.js +2 -2
  7. package/dist/account/AccountKeys.js.map +1 -1
  8. package/dist/account/AccountMfaDialog.d.ts.map +1 -1
  9. package/dist/account/AccountMfaDialog.js +19 -25
  10. package/dist/account/AccountMfaDialog.js.map +1 -1
  11. package/dist/account/AccountPasswordDialog.d.ts.map +1 -1
  12. package/dist/account/AccountPasswordDialog.js +25 -24
  13. package/dist/account/AccountPasswordDialog.js.map +1 -1
  14. package/dist/account/AccountProfile.d.ts.map +1 -1
  15. package/dist/account/AccountProfile.js +17 -24
  16. package/dist/account/AccountProfile.js.map +1 -1
  17. package/dist/account/AccountSecurity.d.ts.map +1 -1
  18. package/dist/account/AccountSecurity.js +21 -19
  19. package/dist/account/AccountSecurity.js.map +1 -1
  20. package/dist/account/AccountSessions.js +1 -1
  21. package/dist/account/AccountSessions.js.map +1 -1
  22. package/dist/account/ApiKeyCreateDialog.d.ts.map +1 -1
  23. package/dist/account/ApiKeyCreateDialog.js +8 -12
  24. package/dist/account/ApiKeyCreateDialog.js.map +1 -1
  25. package/dist/admin/AdminFiles.js +1 -1
  26. package/dist/admin/AdminFiles.js.map +1 -1
  27. package/dist/admin/AdminJobs.js +1 -1
  28. package/dist/admin/AdminJobs.js.map +1 -1
  29. package/dist/admin/AdminKeys.js +1 -1
  30. package/dist/admin/AdminKeys.js.map +1 -1
  31. package/dist/admin/AdminParameters.d.ts.map +1 -1
  32. package/dist/admin/AdminParameters.js +7 -5
  33. package/dist/admin/AdminParameters.js.map +1 -1
  34. package/dist/admin/AdminParametersTreeFooterActions.d.ts +2 -2
  35. package/dist/admin/AdminParametersTreeFooterActions.d.ts.map +1 -1
  36. package/dist/admin/AdminParametersTreeFooterActions.js.map +1 -1
  37. package/dist/admin/AdminParametersTreePane.d.ts +2 -2
  38. package/dist/admin/AdminParametersTreePane.d.ts.map +1 -1
  39. package/dist/admin/AdminParametersTreePane.js.map +1 -1
  40. package/dist/admin/AdminRouter.d.ts +1 -3
  41. package/dist/admin/AdminRouter.d.ts.map +1 -1
  42. package/dist/admin/AdminRouter.js +2 -4
  43. package/dist/admin/AdminRouter.js.map +1 -1
  44. package/dist/admin/AdminSessions.js +1 -1
  45. package/dist/admin/AdminSessions.js.map +1 -1
  46. package/dist/admin/AdminUserAvatarControl.d.ts.map +1 -1
  47. package/dist/admin/AdminUserAvatarControl.js +9 -16
  48. package/dist/admin/AdminUserAvatarControl.js.map +1 -1
  49. package/dist/admin/AdminUserDetail.js +4 -4
  50. package/dist/admin/AdminUserDetail.js.map +1 -1
  51. package/dist/admin/AdminUsers.d.ts.map +1 -1
  52. package/dist/admin/AdminUsers.js +10 -12
  53. package/dist/admin/AdminUsers.js.map +1 -1
  54. package/dist/admin/AdminUsersRolesPicker.d.ts +5 -1
  55. package/dist/admin/AdminUsersRolesPicker.d.ts.map +1 -1
  56. package/dist/admin/AdminUsersRolesPicker.js +2 -3
  57. package/dist/admin/AdminUsersRolesPicker.js.map +1 -1
  58. package/dist/admin/analytics/AdvancedSection.d.ts.map +1 -1
  59. package/dist/admin/analytics/AdvancedSection.js +7 -3
  60. package/dist/admin/analytics/AdvancedSection.js.map +1 -1
  61. package/dist/admin/analytics/AnalyticsChart.d.ts +1 -0
  62. package/dist/admin/analytics/AnalyticsChart.d.ts.map +1 -1
  63. package/dist/admin/analytics/AnalyticsChart.js +3 -1
  64. package/dist/admin/analytics/AnalyticsChart.js.map +1 -1
  65. package/dist/admin/analytics/AnalyticsChartHeader.d.ts +5 -0
  66. package/dist/admin/analytics/AnalyticsChartHeader.d.ts.map +1 -1
  67. package/dist/admin/analytics/AnalyticsChartHeader.js +7 -2
  68. package/dist/admin/analytics/AnalyticsChartHeader.js.map +1 -1
  69. package/dist/admin/analytics/AnalyticsChartLine.d.ts +5 -0
  70. package/dist/admin/analytics/AnalyticsChartLine.d.ts.map +1 -1
  71. package/dist/admin/analytics/AnalyticsChartLine.js +6 -2
  72. package/dist/admin/analytics/AnalyticsChartLine.js.map +1 -1
  73. package/dist/admin/analytics/CoarsenedBadge.d.ts +15 -0
  74. package/dist/admin/analytics/CoarsenedBadge.d.ts.map +1 -0
  75. package/dist/admin/analytics/CoarsenedBadge.js +30 -0
  76. package/dist/admin/analytics/CoarsenedBadge.js.map +1 -0
  77. package/dist/admin/analytics/CompareNote.d.ts +5 -0
  78. package/dist/admin/analytics/CompareNote.d.ts.map +1 -1
  79. package/dist/admin/analytics/CompareNote.js +5 -1
  80. package/dist/admin/analytics/CompareNote.js.map +1 -1
  81. package/dist/admin/analytics/FilterEditor.d.ts +1 -0
  82. package/dist/admin/analytics/FilterEditor.d.ts.map +1 -1
  83. package/dist/admin/analytics/FilterEditor.js +1 -0
  84. package/dist/admin/analytics/FilterEditor.js.map +1 -1
  85. package/dist/admin/analytics/GroupByChips.d.ts +17 -11
  86. package/dist/admin/analytics/GroupByChips.d.ts.map +1 -1
  87. package/dist/admin/analytics/GroupByChips.js +21 -20
  88. package/dist/admin/analytics/GroupByChips.js.map +1 -1
  89. package/dist/admin/analytics/MeasureChips.d.ts +11 -6
  90. package/dist/admin/analytics/MeasureChips.d.ts.map +1 -1
  91. package/dist/admin/analytics/MeasureChips.js +13 -16
  92. package/dist/admin/analytics/MeasureChips.js.map +1 -1
  93. package/dist/admin/analytics/QueryPanel.d.ts.map +1 -1
  94. package/dist/admin/analytics/QueryPanel.js +10 -6
  95. package/dist/admin/analytics/QueryPanel.js.map +1 -1
  96. package/dist/admin/analytics/RangeControl.d.ts +11 -7
  97. package/dist/admin/analytics/RangeControl.d.ts.map +1 -1
  98. package/dist/admin/analytics/RangeControl.js +83 -30
  99. package/dist/admin/analytics/RangeControl.js.map +1 -1
  100. package/dist/admin/analytics/ResultsPane.d.ts.map +1 -1
  101. package/dist/admin/analytics/ResultsPane.js +13 -9
  102. package/dist/admin/analytics/ResultsPane.js.map +1 -1
  103. package/dist/admin/analytics/ResultsTable.d.ts.map +1 -1
  104. package/dist/admin/analytics/ResultsTable.js +3 -3
  105. package/dist/admin/analytics/ResultsTable.js.map +1 -1
  106. package/dist/admin/analytics/TotalsCards.d.ts +2 -1
  107. package/dist/admin/analytics/TotalsCards.d.ts.map +1 -1
  108. package/dist/admin/analytics/TotalsCards.js +9 -10
  109. package/dist/admin/analytics/TotalsCards.js.map +1 -1
  110. package/dist/admin/analytics/analyticsModel.d.ts +126 -17
  111. package/dist/admin/analytics/analyticsModel.d.ts.map +1 -1
  112. package/dist/admin/analytics/analyticsModel.js +283 -48
  113. package/dist/admin/analytics/analyticsModel.js.map +1 -1
  114. package/dist/admin/analytics/analyticsTypes.d.ts +55 -4
  115. package/dist/admin/analytics/analyticsTypes.d.ts.map +1 -1
  116. package/dist/admin/analytics/chartModel.d.ts +38 -3
  117. package/dist/admin/analytics/chartModel.d.ts.map +1 -1
  118. package/dist/admin/analytics/chartModel.js +86 -16
  119. package/dist/admin/analytics/chartModel.js.map +1 -1
  120. package/dist/admin/analytics/instantRangeSchema.d.ts +8 -0
  121. package/dist/admin/analytics/instantRangeSchema.d.ts.map +1 -0
  122. package/dist/admin/analytics/instantRangeSchema.js +13 -0
  123. package/dist/admin/analytics/instantRangeSchema.js.map +1 -0
  124. package/dist/admin/analytics/useAnalyticsQuery.d.ts +13 -3
  125. package/dist/admin/analytics/useAnalyticsQuery.d.ts.map +1 -1
  126. package/dist/admin/analytics/useAnalyticsQuery.js +60 -21
  127. package/dist/admin/analytics/useAnalyticsQuery.js.map +1 -1
  128. package/dist/admin/analytics/useFilterValues.d.ts +4 -0
  129. package/dist/admin/analytics/useFilterValues.d.ts.map +1 -1
  130. package/dist/admin/analytics/useFilterValues.js +6 -6
  131. package/dist/admin/analytics/useFilterValues.js.map +1 -1
  132. package/dist/admin/useConfirmedAction.d.ts +8 -2
  133. package/dist/admin/useConfirmedAction.d.ts.map +1 -1
  134. package/dist/admin/useConfirmedAction.js +15 -4
  135. package/dist/admin/useConfirmedAction.js.map +1 -1
  136. package/dist/ai/AiChat.d.ts +30 -0
  137. package/dist/ai/AiChat.d.ts.map +1 -0
  138. package/dist/ai/AiChat.js +116 -0
  139. package/dist/ai/AiChat.js.map +1 -0
  140. package/dist/ai/AiChatConfirmCard.d.ts +17 -0
  141. package/dist/ai/AiChatConfirmCard.d.ts.map +1 -0
  142. package/dist/ai/AiChatConfirmCard.js +47 -0
  143. package/dist/ai/AiChatConfirmCard.js.map +1 -0
  144. package/dist/ai/AiChatHistory.d.ts +14 -0
  145. package/dist/ai/AiChatHistory.d.ts.map +1 -0
  146. package/dist/ai/AiChatHistory.js +40 -0
  147. package/dist/ai/AiChatHistory.js.map +1 -0
  148. package/dist/ai/AiChatMessage.d.ts +10 -0
  149. package/dist/ai/AiChatMessage.d.ts.map +1 -0
  150. package/dist/ai/AiChatMessage.js +38 -0
  151. package/dist/ai/AiChatMessage.js.map +1 -0
  152. package/dist/ai/AiFormRegistry.d.ts +37 -0
  153. package/dist/ai/AiFormRegistry.d.ts.map +1 -0
  154. package/dist/ai/AiFormRegistry.js +59 -0
  155. package/dist/ai/AiFormRegistry.js.map +1 -0
  156. package/dist/ai/aiChatMessageFormSchema.d.ts +7 -0
  157. package/dist/ai/aiChatMessageFormSchema.d.ts.map +1 -0
  158. package/dist/ai/aiChatMessageFormSchema.js +13 -0
  159. package/dist/ai/aiChatMessageFormSchema.js.map +1 -0
  160. package/dist/ai/aiContextAtom.d.ts +16 -0
  161. package/dist/ai/aiContextAtom.d.ts.map +1 -0
  162. package/dist/ai/aiContextAtom.js +25 -0
  163. package/dist/ai/aiContextAtom.js.map +1 -0
  164. package/dist/ai/index.d.ts +18 -0
  165. package/dist/ai/index.d.ts.map +1 -0
  166. package/dist/ai/index.js +10 -0
  167. package/dist/ai/useAiChat.d.ts +82 -0
  168. package/dist/ai/useAiChat.d.ts.map +1 -0
  169. package/dist/ai/useAiChat.js +256 -0
  170. package/dist/ai/useAiChat.js.map +1 -0
  171. package/dist/ai/useAiContext.d.ts +33 -0
  172. package/dist/ai/useAiContext.d.ts.map +1 -0
  173. package/dist/ai/useAiContext.js +52 -0
  174. package/dist/ai/useAiContext.js.map +1 -0
  175. package/dist/auth/AuthLogin.d.ts.map +1 -1
  176. package/dist/auth/AuthLogin.js +4 -4
  177. package/dist/auth/AuthLogin.js.map +1 -1
  178. package/dist/auth/AuthRegister.js.map +1 -1
  179. package/dist/core/Breadcrumb.js +1 -1
  180. package/dist/core/Breadcrumb.js.map +1 -1
  181. package/dist/core/Sheet.d.ts +6 -1
  182. package/dist/core/Sheet.d.ts.map +1 -1
  183. package/dist/core/Sheet.js +2 -2
  184. package/dist/core/Sheet.js.map +1 -1
  185. package/dist/core/Sidebar.d.ts +7 -1
  186. package/dist/core/Sidebar.d.ts.map +1 -1
  187. package/dist/core/Sidebar.js +22 -17
  188. package/dist/core/Sidebar.js.map +1 -1
  189. package/dist/core/index.js +2 -2
  190. package/dist/form/AutoForm.js +1 -1
  191. package/dist/form/AutoForm.js.map +1 -1
  192. package/dist/form/Control.d.ts +14 -0
  193. package/dist/form/Control.d.ts.map +1 -1
  194. package/dist/form/Control.js +10 -4
  195. package/dist/form/Control.js.map +1 -1
  196. package/dist/form/ControlArray.js +5 -5
  197. package/dist/form/ControlArray.js.map +1 -1
  198. package/dist/form/ControlDate.d.ts +11 -0
  199. package/dist/form/ControlDate.d.ts.map +1 -1
  200. package/dist/form/ControlDate.js +20 -2
  201. package/dist/form/ControlDate.js.map +1 -1
  202. package/dist/form/ControlDatePopover.d.ts +3 -0
  203. package/dist/form/ControlDatePopover.d.ts.map +1 -1
  204. package/dist/form/ControlDatePopover.js +1 -0
  205. package/dist/form/ControlDatePopover.js.map +1 -1
  206. package/dist/form/ControlMonthPopover.d.ts +25 -0
  207. package/dist/form/ControlMonthPopover.d.ts.map +1 -0
  208. package/dist/form/ControlMonthPopover.js +112 -0
  209. package/dist/form/ControlMonthPopover.js.map +1 -0
  210. package/dist/form/ControlSelect.d.ts +7 -0
  211. package/dist/form/ControlSelect.d.ts.map +1 -1
  212. package/dist/form/ControlSelect.js +39 -2
  213. package/dist/form/ControlSelect.js.map +1 -1
  214. package/dist/form/ControlUpload.d.ts +1 -1
  215. package/dist/form/ControlUpload.js.map +1 -1
  216. package/dist/i18n/fr/uiFr.d.ts.map +1 -1
  217. package/dist/i18n/fr/uiFr.js +31 -10
  218. package/dist/i18n/fr/uiFr.js.map +1 -1
  219. package/dist/organizations/MyOrganizationInvitations.js +2 -2
  220. package/dist/organizations/MyOrganizationInvitations.js.map +1 -1
  221. package/dist/organizations/OrganizationInviteDialog.js +1 -1
  222. package/dist/organizations/OrganizationInviteDialog.js.map +1 -1
  223. package/dist/organizations/OrganizationMembers.js +1 -1
  224. package/dist/organizations/OrganizationMembers.js.map +1 -1
  225. package/dist/organizations/OrganizationPendingInvitations.js +1 -1
  226. package/dist/organizations/OrganizationPendingInvitations.js.map +1 -1
  227. package/dist/organizations/OrganizationRanks.js +3 -3
  228. package/dist/organizations/OrganizationRanks.js.map +1 -1
  229. package/dist/organizations/useInviteOrganizationMember.d.ts +6 -1
  230. package/dist/organizations/useInviteOrganizationMember.d.ts.map +1 -1
  231. package/dist/organizations/useInviteOrganizationMember.js +13 -13
  232. package/dist/organizations/useInviteOrganizationMember.js.map +1 -1
  233. package/dist/organizations/useRevokeOrganizationInvitation.d.ts +7 -1
  234. package/dist/organizations/useRevokeOrganizationInvitation.d.ts.map +1 -1
  235. package/dist/organizations/useRevokeOrganizationInvitation.js +13 -2
  236. package/dist/organizations/useRevokeOrganizationInvitation.js.map +1 -1
  237. package/dist/shell/AppShellNavCollapse.d.ts +4 -0
  238. package/dist/shell/AppShellNavCollapse.d.ts.map +1 -1
  239. package/dist/shell/AppShellNavCollapse.js +1 -0
  240. package/dist/shell/AppShellNavCollapse.js.map +1 -1
  241. package/dist/shell/AppShellSidebarNavItem.d.ts.map +1 -1
  242. package/dist/shell/AppShellSidebarNavItem.js +13 -9
  243. package/dist/shell/AppShellSidebarNavItem.js.map +1 -1
  244. package/dist/shell/AppShellStatefulSidebarTrigger.d.ts.map +1 -1
  245. package/dist/shell/AppShellStatefulSidebarTrigger.js +5 -2
  246. package/dist/shell/AppShellStatefulSidebarTrigger.js.map +1 -1
  247. package/dist/shell/ButtonUser.d.ts +1 -2
  248. package/dist/shell/ButtonUser.d.ts.map +1 -1
  249. package/dist/shell/ButtonUser.js +14 -42
  250. package/dist/shell/ButtonUser.js.map +1 -1
  251. package/dist/shell/ButtonUserContent.d.ts +13 -0
  252. package/dist/shell/ButtonUserContent.d.ts.map +1 -0
  253. package/dist/shell/ButtonUserContent.js +52 -0
  254. package/dist/shell/ButtonUserContent.js.map +1 -0
  255. package/dist/shell/ButtonUserPlaceholder.d.ts +14 -0
  256. package/dist/shell/ButtonUserPlaceholder.d.ts.map +1 -0
  257. package/dist/shell/ButtonUserPlaceholder.js +17 -0
  258. package/dist/shell/ButtonUserPlaceholder.js.map +1 -0
  259. package/dist/styles.css +31 -0
  260. package/dist/table/DataTable.d.ts.map +1 -1
  261. package/dist/table/DataTable.js +3 -2
  262. package/dist/table/DataTable.js.map +1 -1
  263. package/dist/table/DataTableFilterBar.js +2 -2
  264. package/dist/table/DataTableFilterBar.js.map +1 -1
  265. package/dist/table/DataTableToolbar.d.ts +7 -3
  266. package/dist/table/DataTableToolbar.d.ts.map +1 -1
  267. package/dist/table/DataTableToolbar.js +7 -3
  268. package/dist/table/DataTableToolbar.js.map +1 -1
  269. package/dist/table/dataTableBaseProps.d.ts +18 -1
  270. package/dist/table/dataTableBaseProps.d.ts.map +1 -1
  271. package/dist/table/dataTableTypes.d.ts +3 -3
  272. package/dist/table/dataTableTypes.d.ts.map +1 -1
  273. package/dist/table/useDataTableData.d.ts.map +1 -1
  274. package/dist/table/useDataTableData.js +3 -1
  275. package/dist/table/useDataTableData.js.map +1 -1
  276. package/dist/table/useDataTableRefresh.js +2 -2
  277. package/dist/table/useDataTableRefresh.js.map +1 -1
  278. package/dist/table/useDataTableSummary.d.ts.map +1 -1
  279. package/dist/table/useDataTableSummary.js +2 -1
  280. package/dist/table/useDataTableSummary.js.map +1 -1
  281. package/docs/packages-alepha-ui-account.md +29 -0
  282. package/docs/packages-alepha-ui-admin.md +35 -0
  283. package/docs/packages-alepha-ui-ai.md +29 -0
  284. package/docs/packages-alepha-ui-auth.md +23 -0
  285. package/docs/packages-alepha-ui-calendar.md +24 -0
  286. package/docs/packages-alepha-ui-chart.md +23 -0
  287. package/docs/packages-alepha-ui-command.md +24 -0
  288. package/docs/packages-alepha-ui-core.md +40 -0
  289. package/docs/packages-alepha-ui-form.md +29 -0
  290. package/docs/packages-alepha-ui-i18n-fr.md +31 -0
  291. package/docs/packages-alepha-ui-markdown.md +27 -0
  292. package/docs/packages-alepha-ui-organizations.md +20 -0
  293. package/docs/packages-alepha-ui-otp.md +22 -0
  294. package/docs/packages-alepha-ui-overview.md +337 -0
  295. package/docs/packages-alepha-ui-resizable.md +22 -0
  296. package/docs/packages-alepha-ui-settings.md +23 -0
  297. package/docs/packages-alepha-ui-shell.md +41 -0
  298. package/docs/packages-alepha-ui-table.md +37 -0
  299. package/docs/packages-alepha-ui-tree.md +31 -0
  300. package/package.json +18 -8
  301. package/src/account/AccountConnections.tsx +1 -1
  302. package/src/account/AccountDeleteDialog.tsx +25 -31
  303. package/src/account/AccountKeys.tsx +2 -2
  304. package/src/account/AccountMfaDialog.tsx +33 -27
  305. package/src/account/AccountPasswordDialog.tsx +36 -39
  306. package/src/account/AccountProfile.tsx +29 -43
  307. package/src/account/AccountSecurity.tsx +57 -64
  308. package/src/account/AccountSessions.tsx +1 -1
  309. package/src/account/ApiKeyCreateDialog.tsx +12 -20
  310. package/src/account/__tests__/AccountRouter.spec.ts +2 -1
  311. package/src/admin/AdminFiles.tsx +1 -1
  312. package/src/admin/AdminJobs.tsx +1 -1
  313. package/src/admin/AdminKeys.tsx +1 -1
  314. package/src/admin/AdminParameters.tsx +7 -5
  315. package/src/admin/AdminParametersTreeFooterActions.tsx +2 -2
  316. package/src/admin/AdminParametersTreePane.tsx +2 -2
  317. package/src/admin/AdminRouter.tsx +2 -4
  318. package/src/admin/AdminSessions.tsx +1 -1
  319. package/src/admin/AdminUserAvatarControl.tsx +17 -22
  320. package/src/admin/AdminUserDetail.tsx +4 -4
  321. package/src/admin/AdminUsers.tsx +10 -12
  322. package/src/admin/AdminUsersRolesPicker.tsx +11 -4
  323. package/src/admin/__tests__/AdminRouter.spec.ts +3 -2
  324. package/src/admin/analytics/AdvancedSection.tsx +39 -30
  325. package/src/admin/analytics/AnalyticsChart.tsx +7 -1
  326. package/src/admin/analytics/AnalyticsChartHeader.tsx +22 -7
  327. package/src/admin/analytics/AnalyticsChartLine.tsx +15 -2
  328. package/src/admin/analytics/CoarsenedBadge.tsx +38 -0
  329. package/src/admin/analytics/CompareNote.tsx +16 -5
  330. package/src/admin/analytics/FilterEditor.tsx +2 -0
  331. package/src/admin/analytics/GroupByChips.tsx +40 -27
  332. package/src/admin/analytics/MeasureChips.tsx +19 -11
  333. package/src/admin/analytics/QueryPanel.tsx +11 -6
  334. package/src/admin/analytics/RangeControl.tsx +91 -27
  335. package/src/admin/analytics/ResultsPane.tsx +20 -6
  336. package/src/admin/analytics/ResultsTable.tsx +9 -5
  337. package/src/admin/analytics/TotalsCards.tsx +24 -11
  338. package/src/admin/analytics/analyticsModel.spec.ts +167 -36
  339. package/src/admin/analytics/analyticsModel.ts +358 -49
  340. package/src/admin/analytics/analyticsTypes.ts +56 -4
  341. package/src/admin/analytics/chartModel.ts +139 -20
  342. package/src/admin/analytics/instantRangeSchema.ts +9 -0
  343. package/src/admin/analytics/useAnalyticsQuery.ts +98 -35
  344. package/src/admin/analytics/useFilterValues.ts +16 -5
  345. package/src/admin/useConfirmedAction.tsx +24 -10
  346. package/src/ai/AiChat.tsx +151 -0
  347. package/src/ai/AiChatConfirmCard.tsx +64 -0
  348. package/src/ai/AiChatHistory.tsx +60 -0
  349. package/src/ai/AiChatMessage.tsx +57 -0
  350. package/src/ai/AiFormRegistry.ts +78 -0
  351. package/src/ai/__tests__/AiChat.browser.spec.tsx +391 -0
  352. package/src/ai/aiChatMessageFormSchema.ts +8 -0
  353. package/src/ai/aiContextAtom.ts +23 -0
  354. package/src/ai/index.ts +18 -0
  355. package/src/ai/useAiChat.ts +343 -0
  356. package/src/ai/useAiContext.ts +74 -0
  357. package/src/auth/AuthLogin.tsx +10 -9
  358. package/src/auth/AuthRegister.tsx +2 -2
  359. package/src/core/Breadcrumb.tsx +1 -1
  360. package/src/core/Sheet.tsx +9 -2
  361. package/src/core/Sidebar.tsx +45 -22
  362. package/src/form/AutoForm.tsx +1 -1
  363. package/src/form/Control.tsx +27 -2
  364. package/src/form/ControlArray.tsx +5 -5
  365. package/src/form/ControlDate.tsx +37 -2
  366. package/src/form/ControlDatePopover.tsx +4 -1
  367. package/src/form/ControlMonthPopover.tsx +169 -0
  368. package/src/form/ControlSelect.tsx +64 -2
  369. package/src/form/ControlUpload.tsx +1 -1
  370. package/src/form/__tests__/ControlArrayChildChange.browser.spec.tsx +1 -1
  371. package/src/form/__tests__/ControlChoices.browser.spec.tsx +130 -0
  372. package/src/i18n/fr/uiFr.ts +36 -11
  373. package/src/organizations/MyOrganizationInvitations.tsx +2 -2
  374. package/src/organizations/OrganizationInviteDialog.tsx +1 -1
  375. package/src/organizations/OrganizationMembers.tsx +1 -1
  376. package/src/organizations/OrganizationPendingInvitations.tsx +1 -1
  377. package/src/organizations/OrganizationRanks.tsx +3 -3
  378. package/src/organizations/useInviteOrganizationMember.ts +22 -15
  379. package/src/organizations/useRevokeOrganizationInvitation.ts +23 -4
  380. package/src/shell/AppShellNavCollapse.tsx +5 -0
  381. package/src/shell/AppShellSidebarNavItem.tsx +23 -10
  382. package/src/shell/AppShellStatefulSidebarTrigger.tsx +10 -2
  383. package/src/shell/ButtonUser.tsx +14 -79
  384. package/src/shell/ButtonUserContent.tsx +92 -0
  385. package/src/shell/ButtonUserPlaceholder.tsx +25 -0
  386. package/src/shell/__tests__/ActionErrorToaster.browser.spec.tsx +1 -1
  387. package/src/shell/__tests__/ActionErrorToasterHandled.browser.spec.tsx +1 -2
  388. package/src/shell/__tests__/AppShell.pageCache.spec.tsx +67 -0
  389. package/src/shell/__tests__/AppShellDirection.browser.spec.tsx +95 -0
  390. package/src/styles.css +31 -0
  391. package/src/table/DataTable.tsx +3 -1
  392. package/src/table/DataTableFilterBar.tsx +2 -2
  393. package/src/table/DataTableToolbar.tsx +18 -3
  394. package/src/table/__tests__/DataTableFilterDateRange.browser.spec.tsx +1 -1
  395. package/src/table/__tests__/DataTableLeading.browser.spec.tsx +130 -0
  396. package/src/table/__tests__/DataTableQuerySeed.browser.spec.tsx +1 -1
  397. package/src/table/__tests__/DataTableShareFilters.browser.spec.tsx +1 -1
  398. package/src/table/dataTableBaseProps.ts +18 -1
  399. package/src/table/dataTableTypes.ts +3 -3
  400. package/src/table/useDataTableData.ts +2 -0
  401. package/src/table/useDataTableRefresh.ts +3 -3
  402. package/src/table/useDataTableSummary.ts +2 -1
@@ -0,0 +1,337 @@
1
+ ---
2
+ slug: "packages-alepha-ui-overview"
3
+ title: "@alepha/ui"
4
+ summary: "Shared Base UI and Tailwind components for Alepha apps."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui
10
+
11
+ Shared Base UI and Tailwind components for Alepha apps. Edited directly; bugfixes propagate via normal dep updates.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @alepha/ui
17
+ ```
18
+
19
+ ## Overview
20
+
21
+ `@alepha/ui` is the shared component library for Alepha applications, built
22
+ on Base UI and Tailwind, with [lucide](https://lucide.dev) icons.
23
+
24
+ Unlike the rest of the framework, these components are **meant to be edited
25
+ directly**: `src/` ships alongside the built `dist/`, so you can copy a
26
+ component into your app and change it, or depend on the package and let
27
+ bugfixes arrive through normal dependency updates.
28
+
29
+ ## Import paths
30
+
31
+ The package is sixteen modules, one subpath each. The primitives are the package
32
+ root; everything heavier is a subpath of its own, so an app loads only what it
33
+ renders:
34
+
35
+ ```ts
36
+ import { Button, cn, useToast } from "@alepha/ui";
37
+ import { AdminRouter } from "@alepha/ui/admin";
38
+ import { AutoForm } from "@alepha/ui/form";
39
+ import { DataTable } from "@alepha/ui/table";
40
+ ```
41
+
42
+ Load the stylesheet once, at your app's entry point:
43
+
44
+ ```ts
45
+ import "@alepha/ui/styles.css";
46
+ ```
47
+
48
+ A module's files are private: import from the subpath, never from a file
49
+ inside it. Inside the package the rule is the opposite - every import is
50
+ relative and names a concrete file - and `check:conventions` enforces both
51
+ the module map and that `@alepha/ui` (the root) imports no other module.
52
+
53
+ ## What's inside
54
+
55
+ | Subpath | What it holds |
56
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `@alepha/ui` | The primitives (`Button`, `Input`, `Card`, `Badge`, `Dialog`, `Sheet`, `Tooltip`, `Sidebar`, and the rest), `cn`, `useToast` + `Toaster`, `useDialog` + `DialogProvider`, `useIsMobile`, `TimeAgo`, `UserAvatar` |
58
+ | `@alepha/ui/form` | `AutoForm`, `Control` and the per-type renderers (`ControlSelect`, `ControlDate`, `ControlUpload`, ...), `FormField`, `resizeImage` |
59
+ | `@alepha/ui/settings` | The settings kit: `SettingsLayout`, `SettingsNav`, `SettingsSection`, `SettingsRow`, `SettingsDangerSection` |
60
+ | `@alepha/ui/table` | `DataTable` and its parts, `paginateLocal`, `useTableSelection`, `PermissionMatrix` |
61
+ | `@alepha/ui/tree` | `TreeView`, `TreeViewResizer`, `useTreeState`, and the tree model (`buildTree`, `flattenTree`, `resolveDrop`, ...) |
62
+ | `@alepha/ui/markdown` | `MarkdownView` and the diagram parsers. See the section below |
63
+ | `@alepha/ui/shell` | `AppShell`, `NavShell` and its `Spotlight`, `PlateLayout`, `DetailLayout`, `AppActions`, the header buttons, `ActionErrorToaster` |
64
+ | `@alepha/ui/auth` | `AuthRouter` and its pages, `TurnstileWidget` |
65
+ | `@alepha/ui/account` | `AccountRouter`, `$pageAccount`, and the account pages |
66
+ | `@alepha/ui/admin` | `AdminRouter`, `$pageAdmin`, the admin pages and `AdminAnalytics` |
67
+ | `@alepha/ui/chart` | The recharts wrapper (`ChartContainer` and its parts). Opt-in |
68
+ | `@alepha/ui/command` | The command palette on Base UI's `Autocomplete` (`Command`, `CommandDialog`), ranked by cmdk's scorer. Opt-in |
69
+ | `@alepha/ui/calendar` | The react-day-picker wrapper (`Calendar`). Opt-in |
70
+ | `@alepha/ui/otp` | The input-otp wrapper (`InputOTP`). Opt-in |
71
+ | `@alepha/ui/resizable` | The react-resizable-panels wrapper. Opt-in |
72
+ | `@alepha/ui/i18n/fr` | `uiFr`, the French catalogue for every key the package asks for |
73
+
74
+ The five opt-in wrappers import only the root, so a heavy dependency (recharts,
75
+ react-day-picker, input-otp, react-resizable-panels) is loaded by the app
76
+ that imports its subpath and by nothing else.
77
+
78
+ > `useDialog()` throws without a `<DialogProvider>` above it, and toasts need a
79
+ > `<Toaster />`. `AppShell` mounts both. The account and admin routers do
80
+ > **not** - a second `<Toaster />` under an app that already has one shows every
81
+ > toast twice - so a standalone mount (or `AppShell` with `embedded`) has to
82
+ > wrap them itself.
83
+
84
+ ## Example
85
+
86
+ `AutoForm` pairs with `useForm` from `alepha/react/form`. The schema is the
87
+ single source of truth - field types, validation, and layout hints all come
88
+ from it:
89
+
90
+ ```tsx
91
+ import { AutoForm } from "@alepha/ui/form";
92
+ import { z } from "alepha";
93
+ import { useForm } from "alepha/react/form";
94
+
95
+ const profileSchema = z.object({
96
+ username: z
97
+ .string()
98
+ .min(2)
99
+ .max(32)
100
+ .meta({ $control: { icon: "user" } }),
101
+ email: z.string(),
102
+ newsletter: z.boolean(),
103
+ });
104
+
105
+ export const ProfilePage = () => {
106
+ const form = useForm({
107
+ schema: profileSchema,
108
+ initialValues: { username: "", email: "", newsletter: false },
109
+ handler: (values) => save(values),
110
+ });
111
+
112
+ return (
113
+ <AutoForm
114
+ form={form}
115
+ icon="cog"
116
+ title="Account profile"
117
+ autoGroup
118
+ disabledIfPristine
119
+ />
120
+ );
121
+ };
122
+ ```
123
+
124
+ `autoGroup` derives field groups from the schema shape; pass `groups` instead to
125
+ lay them out yourself.
126
+
127
+ ### Settings cards
128
+
129
+ `layout="row"` renders the same shape as the `SettingsSection` / `SettingsRow`
130
+ kit rather than an approximation of it: each group becomes a bordered card of
131
+ divided rows, label and help on the left, control on the right, and the action
132
+ bar is the card's own last row. Each group carries its own `title` and
133
+ `description`, rendered through the same `SettingsHeading` the kit uses.
134
+
135
+ ```tsx
136
+ <AutoForm
137
+ form={form}
138
+ layout="row"
139
+ disabledIfPristine
140
+ groups={[
141
+ {
142
+ title: "Name",
143
+ description: "How you are identified to other people.",
144
+ fields: ["username", "firstName", "lastName"],
145
+ },
146
+ ]}
147
+ />
148
+ ```
149
+
150
+ So a settings card whose rows are all form fields should be an `AutoForm`.
151
+ Reach for `SettingsSection` directly for the rows that are _not_ fields - an
152
+ avatar picker, a read-only value, a lone button.
153
+
154
+ Add `autoSave` to commit on change instead, which hides the action bar. Text
155
+ fields still never commit on keystroke: they commit on Enter, or on the inline
156
+ tick that appears in the input once the field is dirty.
157
+
158
+ ## Markdown, and diagrams in it
159
+
160
+ `MarkdownView` renders markdown as formatted prose. Raw HTML is always escaped
161
+ to text, never promoted to markup: it renders content authored by one user to
162
+ another, so a live raw tag would be an injection point on every surface built on
163
+ this package.
164
+
165
+ ### Spoilers
166
+
167
+ `||text||` renders as a covered box that reveals on click, on Enter or on
168
+ Space. Discord's syntax, and Discord's behaviour: inline markdown inside it
169
+ survives (`||see [the docs](/d) **now**||` hides a link and a bold word, not
170
+ the text of them), a code span and a fence keep their pipes literally, and an
171
+ unterminated `||` renders as the two characters that were typed rather than
172
+ swallowing the rest of the paragraph. A pair cannot cross a paragraph break.
173
+
174
+ ⚠️ **It is not a security feature, and must never be described as one.** The
175
+ covered text is in the DOM from the first paint - the box is a colour, not an
176
+ absence - and it is also in the raw markdown, in an export, in whatever an API
177
+ or an MCP tool serves, and in any search snippet built from the source. It
178
+ hides a plot point from a reader's eye. It does not store a secret, and the
179
+ same words go in any UI that explains it.
180
+
181
+ A revealed spoiler stays revealed: re-hiding on blur would make it unreadable
182
+ with a keyboard, since reading what is around it is exactly what a reader does
183
+ next.
184
+
185
+ ### Diagrams
186
+
187
+ A ` ```mermaid ` fence containing a **`flowchart`** or a **`sequenceDiagram`**
188
+ is drawn as an SVG diagram instead of a code block. The renderer is in-house
189
+ rather than mermaid itself: mermaid is roughly 500-900 kB gzip in a browser and
190
+ cannot run without a DOM, because it measures text in a hidden element. Here the
191
+ only imported piece is `graphre` (dagre in TypeScript, ~15.5 kB gzip), and only
192
+ the flowchart uses it; parsing, text measurement and drawing are ours. The whole
193
+ thing is one lazy chunk of about 22 kB gzip, imported only when a document
194
+ actually contains a fence, so a document with no diagram pays nothing.
195
+
196
+ The two are separate pipelines that share only the text metrics and the theming.
197
+ A flowchart has to be ranked, which is what `graphre` does; a sequence diagram
198
+ has both axes decided by the source - participants left to right in declaration
199
+ order, rows top to bottom in statement order - so its layout is arithmetic with
200
+ no library at all.
201
+
202
+ Drawing it ourselves is what makes the diagram look like the app: the SVG uses
203
+ `--card`, `--border`, `--muted-foreground` and `--muted`, so dark mode works
204
+ with no second palette and no theme prop.
205
+
206
+ The syntax is mermaid's so a document stays portable to GitHub, Obsidian and
207
+ anywhere else, but only a subset is drawn.
208
+
209
+ ### Flowcharts
210
+
211
+ | | |
212
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
213
+ | Header | `flowchart` / `graph`, `TD` `TB` `LR` `RL` `BT` |
214
+ | Nodes | `[rect]` `(rounded)` `{diamond}` `((circle))`; `([ ])` `[[ ]]` `[( )]` `{{ }}` `> ]` `[/ /]` `[\ \]` `((( )))` are consumed and mapped onto those four |
215
+ | Edges | `-->` `---` `-.->` `==>` `<-->`; `--o` and `--x` parse, but the emitter has one end marker, so they draw the same arrowhead as `-->` rather than mermaid's circle and cross |
216
+ | Edge labels | both `-->\|text\|` and `-- text -->` |
217
+ | Structure | chains `A --> B --> C`, fans `A & B --> C`, nested `subgraph` |
218
+ | Text | `<br/>` becomes a line break; quoted and backtick-quoted labels |
219
+
220
+ ⚠️ **A node label must not contain a link operator.** The statement is scanned
221
+ for links before anything knows where the labels are, so a `--`, `==` or `-.`
222
+ sequence inside `[...]` is read as an edge and the label is cut. `A[--o]` yields
223
+ an empty `A` and a bogus node named `]`; `A[pre--post]` truncates to `pre`.
224
+ Quoting does NOT protect it - `A["-->"]` is damaged identically, because
225
+ `splitOnLinks` runs with no quote awareness. A single hyphen (`A[well-known]`)
226
+ is safe. There is no escape that works today, and the failure is silent: the
227
+ graph still draws, with the wrong text.
228
+
229
+ ### Sequence diagrams
230
+
231
+ | | |
232
+ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
233
+ | Participants | `participant A`, `participant A as Alice`, `actor U` (an actor draws a stick figure); declared implicitly by first use, in order of appearance |
234
+ | Arrows | `->` `-->` `->>` `-->>` `-x` `--x` `-)` `--)`; the double hyphen dashes the line, and the four heads (none, filled, cross, open) are drawn distinctly |
235
+ | Activation | `->>+` / `-->>-` and `activate` / `deactivate` parse and are DISCARDED - activation bars are not drawn |
236
+ | Notes | `Note left of A:`, `Note right of A:`, `Note over A:`, `Note over A,B:` |
237
+ | Fragments | `alt` / `else` / `opt` / `loop`, nested, each closed by `end` |
238
+ | Other | `autonumber` (including `autonumber 10 10`), self-messages, `<br/>` line breaks |
239
+
240
+ A sequence diagram keeps its natural width in a horizontal scroll frame rather
241
+ than scaling into the prose column. A flowchart is roughly as tall as it is wide
242
+ and shrinks gracefully; a sequence diagram's width comes from its participant
243
+ count with nothing to wrap, so scaling eight lifelines into a phone column puts
244
+ the labels at around 5px with no way for the reader to recover. The frame is
245
+ focusable and carries an accessible name, because a scroll container that cannot
246
+ take focus cannot be scrolled from a keyboard.
247
+
248
+ Two constructs are refused rather than approximated. `par`, `critical`, `break`,
249
+ `create` and `destroy` send the WHOLE diagram back to the code block: drawing
250
+ `par` branches one under the other would assert an ordering that is false, and
251
+ silently wrong output about a protocol is worse than no output. `rect`, `box`,
252
+ `links`, `link`, `menu` and `style` are skipped in silence, being decorative.
253
+
254
+ ### Everything else
255
+
256
+ Degrades to the code block it renders as today, silently: `classDiagram`,
257
+ `gantt` and mindmaps are not drawn, `style` and `classDef` are ignored (the
258
+ theme picks the colours), and a malformed diagram, a parse failure, a graph past
259
+ the 200-node / 400-edge cap or a sequence diagram past the 30-participant /
260
+ 300-row cap all render the plain fence rather than an error.
261
+
262
+ The font is pinned rather than inherited. Layout needs node sizes before it can
263
+ place anything, and node width comes from a generated per-character width table
264
+ measured against Inter at one size; inheriting the surrounding face would make
265
+ text and box disagree, differently on every surface.
266
+
267
+ ## Command palette
268
+
269
+ `@alepha/ui/command` is Base UI's `Autocomplete`, rendered inline: a search
270
+ input over a list that stays on screen. It is **data-driven**. The root takes
271
+ every row as `items` (flat, or in groups shaped `{ items, ...yours }`), ranks
272
+ them against the query, and hands `CommandList` what is left, best first,
273
+ through a function child:
274
+
275
+ ```tsx
276
+ import {
277
+ Command,
278
+ CommandDialog,
279
+ CommandEmpty,
280
+ CommandGroup,
281
+ CommandInput,
282
+ CommandItem,
283
+ CommandList,
284
+ } from "@alepha/ui/command";
285
+
286
+ <CommandDialog open={open} onOpenChange={setOpen}>
287
+ <Command<Page>
288
+ items={groups}
289
+ itemToStringValue={(page) => `${page.section} ${page.label}`}
290
+ >
291
+ <CommandInput placeholder="Search…" />
292
+ <CommandEmpty>No results.</CommandEmpty>
293
+ <CommandList>
294
+ {(group: PageGroup) => (
295
+ <CommandGroup key={group.key} items={group.items} heading={group.label}>
296
+ {(page: Page) => (
297
+ <CommandItem key={page.href} value={page} onClick={() => go(page)}>
298
+ {page.label}
299
+ </CommandItem>
300
+ )}
301
+ </CommandGroup>
302
+ )}
303
+ </CommandList>
304
+ </Command>
305
+ </CommandDialog>;
306
+ ```
307
+
308
+ The ranking is cmdk's fuzzy subsequence scorer, ported (`commandScore`, also
309
+ exported): a match at the start of a word beats one inside a word, and a short
310
+ string beats a long one with the same match. The first row is always
311
+ highlighted, so Enter runs the best match. Results that arrive already ranked,
312
+ from a server for instance, take `mode="none"`, which shows `items` as given.
313
+
314
+ The palette was on cmdk until 0.30.0, which read each row from its children.
315
+ The part names are the same; what a row carried moved to the root:
316
+
317
+ | cmdk | now |
318
+ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
319
+ | `CommandItem value="…"` | `CommandItem value={item}`, the item from `items`; the text it is found by is the root's `itemToStringValue` |
320
+ | `CommandItem keywords={[…]}` | append them in `itemToStringValue`: the scorer read `value` and `keywords` as one string |
321
+ | `CommandItem onSelect` | `CommandItem onClick`, which also runs on Enter |
322
+ | rows written as children of the list | `items` on `Command`, drawn by a function child of `CommandList` or `CommandGroup` |
323
+ | `Command shouldFilter={false}` | `Command mode="none"` |
324
+ | `Command filter={(value, search) => n}` | `Command filter={(item, query, itemToString) => n}`, a score: 0 hides, higher first |
325
+ | `CommandInput value` / `onValueChange` | `Command value` / `onValueChange` |
326
+ | `CommandEmpty` inside `CommandList` | `CommandEmpty` beside it, before the list |
327
+ | `data-selected` on the keyboard row | `data-highlighted` |
328
+
329
+ ## Adding a component
330
+
331
+ The package owns every file in it: there is no registry to pull from and no
332
+ generator to run. A new primitive is written by hand in `src/core/`, one file
333
+ per family, named after it (`DropdownMenu.tsx` holds the menu and all its
334
+ parts), and re-exported from `src/core/index.ts`. An upstream component
335
+ (shadcn's, Base UI's own examples) is a fine starting point, copied in and then
336
+ edited like any other file here: `cn` comes from `./utils.ts`, and a
337
+ `data-slot` attribute on each part keeps it addressable from `styles.css`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ slug: "packages-alepha-ui-resizable"
3
+ title: "@alepha/ui - Resizable"
4
+ summary: "Resizable panels, on react-resizable-panels."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui - Resizable
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @alepha/ui
15
+ ```
16
+
17
+ ## Overview
18
+
19
+ Resizable panels, on react-resizable-panels.
20
+
21
+ `ResizablePanelGroup`, `ResizablePanel` and `ResizableHandle`. Opt-in:
22
+ nothing else in `@alepha/ui` imports it.
@@ -0,0 +1,23 @@
1
+ ---
2
+ slug: "packages-alepha-ui-settings"
3
+ title: "@alepha/ui - Settings"
4
+ summary: "The settings kit."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui - Settings
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @alepha/ui
15
+ ```
16
+
17
+ ## Overview
18
+
19
+ The settings kit.
20
+
21
+ `SettingsLayout` and `SettingsNav` frame a settings area; `SettingsSection`,
22
+ `SettingsRow`, `SettingsHeading` and `SettingsDangerSection` build its pages,
23
+ and `settingsCardEdge` is the one card edge they all share.
@@ -0,0 +1,41 @@
1
+ ---
2
+ slug: "packages-alepha-ui-shell"
3
+ title: "@alepha/ui - Shell"
4
+ summary: "Application shells and their chrome."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui - Shell
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @alepha/ui
15
+ ```
16
+
17
+ ## Overview
18
+
19
+ Application shells and their chrome.
20
+
21
+ `$pageNav` declares a page that appears in a shell's sidebar, for an app
22
+ that hangs its pages off its OWN layout rather than the admin shell's
23
+ (`$pageAdmin` is the same thing already parented to `AdminRouter`).
24
+
25
+ `AppShell` is the sidebar-and-header frame of an application and `NavShell`
26
+ the page-tree variant with its `Spotlight` search. `PlateLayout` and
27
+ `DetailLayout` frame a page, `AppActions` a toolbar. `ButtonDark`,
28
+ `ButtonTheme`, `ButtonLanguage`, `ButtonInbox` and `ButtonUser` are the
29
+ header buttons, and `ButtonSettings` is the account button with language,
30
+ theme and display mode folded into its menu once signed in.
31
+ `ActionErrorToaster` turns a failed action into a toast.
32
+
33
+ ## API Reference
34
+
35
+ ### Primitives
36
+
37
+ - [`$pageNav`](../../../alepha/docs/reference-primitives-$pagenav.md) - `$page` sugar for shell pages: declares the page's `nav` metadata and its
38
+
39
+ ### React Hooks
40
+
41
+ - [`useDetailTab`](../../../alepha/docs/reference-react-hooks-usedetailtab.md) - Binds a detail page's selected tab to `?tab=<key>`.
@@ -0,0 +1,37 @@
1
+ ---
2
+ slug: "packages-alepha-ui-table"
3
+ title: "@alepha/ui - Table"
4
+ summary: "Data tables."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui - Table
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @alepha/ui
15
+ ```
16
+
17
+ ## Overview
18
+
19
+ Data tables.
20
+
21
+ `DataTable` is a table wired for server-side pagination, sorting and
22
+ filtering, with row and bulk actions, persisted filters and a static mode for
23
+ local data (`paginateLocal`). Its filters are a record of fields
24
+ (`DataTableFilterFields`) that it draws on its own filter bar. Above that
25
+ bar it can hold a collapsible summary (`DataTableSummary`): stat cards
26
+ (`DataTableStatCard`) given or fetched with the table's filters, and any
27
+ node beside them. A `help` node sits behind a `?` at the end of the
28
+ toolbar's icons.
29
+ `DataTableFilterMenu`, `DataTableFilterDialog` and `DataTableBulkMenu`
30
+ are its parts, and `useTableSelection` its selection state. `PermissionMatrix` is the grid of
31
+ roles against permissions the admin and account kits draw.
32
+
33
+ ## API Reference
34
+
35
+ ### React Hooks
36
+
37
+ - [`useTableSelection`](../../../alepha/docs/reference-react-hooks-usetableselection.md) - Cross-page row selection for DataTable.
@@ -0,0 +1,31 @@
1
+ ---
2
+ slug: "packages-alepha-ui-tree"
3
+ title: "@alepha/ui - Tree"
4
+ summary: "A controlled tree."
5
+ package: "@alepha/ui"
6
+ section: "packages"
7
+ ---
8
+
9
+ # @alepha/ui - Tree
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @alepha/ui
15
+ ```
16
+
17
+ ## Overview
18
+
19
+ A controlled tree.
20
+
21
+ `treeModel`'s functions are the pure half: build, flatten, cycle-safe parents
22
+ and drop resolution. `TreeView` draws the rows with their indent guides and
23
+ ARIA tree roles; drag and drop, inline rename and a context-menu slot are
24
+ opt-ins. `useTreeState` holds the gesture state and `TreeViewResizer` is the
25
+ pane handle.
26
+
27
+ ## API Reference
28
+
29
+ ### React Hooks
30
+
31
+ - [`useTreeState`](../../../alepha/docs/reference-react-hooks-usetreestate.md) - The state a `TreeView` needs and a consumer would otherwise write again:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alepha/ui",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Shared Base UI and Tailwind components for Alepha apps. Edited directly; bugfixes propagate via normal dep updates.",
5
5
  "keywords": [
6
6
  "alepha",
@@ -19,7 +19,8 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
- "src"
22
+ "src",
23
+ "docs"
23
24
  ],
24
25
  "type": "module",
25
26
  "sideEffects": [
@@ -70,6 +71,10 @@
70
71
  "types": "./dist/organizations/index.d.ts",
71
72
  "default": "./dist/organizations/index.js"
72
73
  },
74
+ "./ai": {
75
+ "types": "./dist/ai/index.d.ts",
76
+ "default": "./dist/ai/index.js"
77
+ },
73
78
  "./chart": {
74
79
  "types": "./dist/chart/index.d.ts",
75
80
  "default": "./dist/chart/index.js"
@@ -143,6 +148,10 @@
143
148
  "types": "./dist/organizations/index.d.ts",
144
149
  "default": "./dist/organizations/index.js"
145
150
  },
151
+ "./ai": {
152
+ "types": "./dist/ai/index.d.ts",
153
+ "default": "./dist/ai/index.js"
154
+ },
146
155
  "./chart": {
147
156
  "types": "./dist/chart/index.d.ts",
148
157
  "default": "./dist/chart/index.js"
@@ -205,7 +214,7 @@
205
214
  "@types/bun": "^1.4.2",
206
215
  "@types/node": "^26.6.4",
207
216
  "@types/react": "^19.3.0",
208
- "alepha": "0.32.0",
217
+ "alepha": "0.34.0",
209
218
  "react": "^19.3.0",
210
219
  "react-dom": "^19.3.0",
211
220
  "recharts": "^3.10.1",
@@ -213,9 +222,9 @@
213
222
  "typescript": "^7.0.2"
214
223
  },
215
224
  "peerDependencies": {
216
- "alepha": "^0.32.0",
217
- "react": "*",
218
- "react-dom": "*",
225
+ "alepha": "^0.34.0",
226
+ "react": "^19.3.0",
227
+ "react-dom": "^19.3.0",
219
228
  "recharts": "^3",
220
229
  "tailwindcss": "^4"
221
230
  },
@@ -228,7 +237,8 @@
228
237
  }
229
238
  },
230
239
  "engines": {
231
- "node": ">=22.0.0"
240
+ "node": ">=24.0.0"
232
241
  },
233
- "llms": "https://alepha.dev/llms.txt"
242
+ "llms": "https://alepha.dev/llms.txt",
243
+ "llmsLocal": "./docs"
234
244
  }
@@ -39,7 +39,7 @@ const AccountConnections = (props: AccountConnectionsProps) => {
39
39
 
40
40
  const revoke = useAction<[connection: MyConnection], boolean>(
41
41
  {
42
- handler: async (connection) => {
42
+ handler: async (_ctx, connection) => {
43
43
  const ok = await dialog.confirm({
44
44
  title: tr("account.connections.revokeTitle", {
45
45
  default: "Disconnect $1?",
@@ -2,7 +2,7 @@ import type {
2
2
  MyAccountController,
3
3
  MyProfileController,
4
4
  } from "alepha/api/users";
5
- import { useClient } from "alepha/react";
5
+ import { useAction, useClient } from "alepha/react";
6
6
  import { useI18n } from "alepha/react/i18n";
7
7
  import { type FormEvent, type ReactNode, useEffect, useState } from "react";
8
8
 
@@ -16,7 +16,6 @@ import {
16
16
  } from "../core/Dialog.tsx";
17
17
  import { Input } from "../core/Input.tsx";
18
18
  import { Label } from "../core/Label.tsx";
19
- import { useToast } from "../core/useToast.tsx";
20
19
  import { ControlPassword } from "../form/ControlPassword.tsx";
21
20
 
22
21
  export interface AccountDeleteDialogProps {
@@ -68,13 +67,11 @@ export interface AccountDeleteDialogProps {
68
67
  export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
69
68
  const accountApi = useClient<MyAccountController>();
70
69
  const profileApi = useClient<MyProfileController>();
71
- const toaster = useToast();
72
70
  const { tr } = useI18n();
73
71
 
74
72
  const [expected, setExpected] = useState<string | undefined>();
75
73
  const [confirm, setConfirm] = useState("");
76
74
  const [currentPassword, setCurrentPassword] = useState("");
77
- const [submitting, setSubmitting] = useState(false);
78
75
 
79
76
  useEffect(() => {
80
77
  if (!props.open) {
@@ -104,34 +101,31 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
104
101
  props.onOpenChange(false);
105
102
  };
106
103
 
107
- const submit = async (event: FormEvent) => {
104
+ /*
105
+ An application's `user:delete:before` hook refuses here ("You still own 3
106
+ projects") and the framework's fast-path emit delivers that message
107
+ unwrapped. The app's ActionErrorToaster shows it verbatim, which is the
108
+ entire reason the emit avoids `{ log: true }`.
109
+ */
110
+ const remove = useAction<[]>(
111
+ {
112
+ handler: async () => {
113
+ await accountApi.deleteMyAccount({
114
+ body: {
115
+ confirm,
116
+ currentPassword: props.hasPassword ? currentPassword : undefined,
117
+ },
118
+ });
119
+ await props.onDeleted();
120
+ },
121
+ },
122
+ [accountApi, confirm, currentPassword, props.hasPassword, props.onDeleted],
123
+ );
124
+ const submitting = remove.loading;
125
+
126
+ const submit = (event: FormEvent) => {
108
127
  event.preventDefault();
109
- setSubmitting(true);
110
- try {
111
- await accountApi.deleteMyAccount({
112
- body: {
113
- confirm,
114
- currentPassword: props.hasPassword ? currentPassword : undefined,
115
- },
116
- });
117
- await props.onDeleted();
118
- } catch (error: any) {
119
- /*
120
- An application's `user:delete:before` hook refuses here — "You still
121
- own 3 projects" — and the framework's fast-path emit delivers that
122
- message unwrapped. Showing it verbatim is the entire reason the emit
123
- avoids `{ log: true }`; a generic "could not delete" would waste it.
124
- */
125
- toaster.show(
126
- error?.message ??
127
- tr("account.delete.error", {
128
- default: "Could not delete your account",
129
- }),
130
- "danger",
131
- );
132
- } finally {
133
- setSubmitting(false);
134
- }
128
+ void remove.run();
135
129
  };
136
130
 
137
131
  const ready = expected !== undefined && confirm === expected;