@alepha/ui 0.27.0 → 0.28.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 (835) hide show
  1. package/README.md +56 -15
  2. package/dist/components/account/account-connections.d.ts.map +1 -1
  3. package/dist/components/account/account-connections.js +24 -13
  4. package/dist/components/account/account-connections.js.map +1 -1
  5. package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
  6. package/dist/components/account/account-delete-dialog.js +12 -8
  7. package/dist/components/account/account-delete-dialog.js.map +1 -1
  8. package/dist/components/account/account-header.d.ts.map +1 -1
  9. package/dist/components/account/account-header.js +3 -1
  10. package/dist/components/account/account-header.js.map +1 -1
  11. package/dist/components/account/account-keys.d.ts.map +1 -1
  12. package/dist/components/account/account-keys.js +35 -21
  13. package/dist/components/account/account-keys.js.map +1 -1
  14. package/dist/components/account/account-layout.d.ts.map +1 -1
  15. package/dist/components/account/account-layout.js +8 -2
  16. package/dist/components/account/account-layout.js.map +1 -1
  17. package/dist/components/account/account-mfa-dialog.d.ts +20 -0
  18. package/dist/components/account/account-mfa-dialog.d.ts.map +1 -0
  19. package/dist/components/account/account-mfa-dialog.js +149 -0
  20. package/dist/components/account/account-mfa-dialog.js.map +1 -0
  21. package/dist/components/account/account-password-dialog.d.ts.map +1 -1
  22. package/dist/components/account/account-password-dialog.js +15 -10
  23. package/dist/components/account/account-password-dialog.js.map +1 -1
  24. package/dist/components/account/account-profile.d.ts.map +1 -1
  25. package/dist/components/account/account-profile.js +25 -25
  26. package/dist/components/account/account-profile.js.map +1 -1
  27. package/dist/components/account/account-router.d.ts +76 -2
  28. package/dist/components/account/account-router.d.ts.map +1 -1
  29. package/dist/components/account/account-router.js +44 -4
  30. package/dist/components/account/account-router.js.map +1 -1
  31. package/dist/components/account/account-security.d.ts +11 -1
  32. package/dist/components/account/account-security.d.ts.map +1 -1
  33. package/dist/components/account/account-security.js +119 -32
  34. package/dist/components/account/account-security.js.map +1 -1
  35. package/dist/components/account/account-sessions.d.ts.map +1 -1
  36. package/dist/components/account/account-sessions.js +46 -24
  37. package/dist/components/account/account-sessions.js.map +1 -1
  38. package/dist/components/admin/admin-analytics.d.ts +34 -5
  39. package/dist/components/admin/admin-analytics.d.ts.map +1 -1
  40. package/dist/components/admin/admin-analytics.js +69 -51
  41. package/dist/components/admin/admin-analytics.js.map +1 -1
  42. package/dist/components/admin/admin-audits.d.ts +14 -0
  43. package/dist/components/admin/admin-audits.d.ts.map +1 -1
  44. package/dist/components/admin/admin-audits.js +35 -8
  45. package/dist/components/admin/admin-audits.js.map +1 -1
  46. package/dist/components/admin/admin-files.d.ts.map +1 -1
  47. package/dist/components/admin/admin-files.js +2 -1
  48. package/dist/components/admin/admin-files.js.map +1 -1
  49. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  50. package/dist/components/admin/admin-jobs-executions-panel.js +5 -10
  51. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  52. package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
  53. package/dist/components/admin/admin-jobs-status-badge.js +3 -3
  54. package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
  55. package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
  56. package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
  57. package/dist/components/admin/admin-jobs-status-labels.js +46 -0
  58. package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
  59. package/dist/components/admin/admin-jobs.js +1 -1
  60. package/dist/components/admin/admin-keys.d.ts.map +1 -1
  61. package/dist/components/admin/admin-keys.js +2 -1
  62. package/dist/components/admin/admin-keys.js.map +1 -1
  63. package/dist/components/admin/admin-layout.d.ts.map +1 -1
  64. package/dist/components/admin/admin-layout.js +5 -3
  65. package/dist/components/admin/admin-layout.js.map +1 -1
  66. package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
  67. package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
  68. package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
  69. package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
  70. package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
  71. package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
  72. package/dist/components/admin/admin-notifications-detail.js +48 -0
  73. package/dist/components/admin/admin-notifications-detail.js.map +1 -0
  74. package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
  75. package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
  76. package/dist/components/admin/admin-notifications-preview-body.js +64 -0
  77. package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
  78. package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
  79. package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
  80. package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
  81. package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
  82. package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
  83. package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
  84. package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
  85. package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
  86. package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
  87. package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
  88. package/dist/components/admin/admin-notifications-status-badge.js +32 -0
  89. package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
  90. package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
  91. package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
  92. package/dist/components/admin/admin-notifications-status-labels.js +33 -0
  93. package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
  94. package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
  95. package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
  96. package/dist/components/admin/admin-notifications-status-tones.js +64 -0
  97. package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
  98. package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
  99. package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
  100. package/dist/components/admin/admin-notifications-template-label.js +24 -0
  101. package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
  102. package/dist/components/admin/admin-notifications.d.ts +13 -2
  103. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  104. package/dist/components/admin/admin-notifications.js +265 -30
  105. package/dist/components/admin/admin-notifications.js.map +1 -1
  106. package/dist/components/admin/admin-parameters.d.ts.map +1 -1
  107. package/dist/components/admin/admin-parameters.js +108 -14
  108. package/dist/components/admin/admin-parameters.js.map +1 -1
  109. package/dist/components/admin/admin-payments.js +1 -1
  110. package/dist/components/admin/admin-router.d.ts +29 -2
  111. package/dist/components/admin/admin-router.d.ts.map +1 -1
  112. package/dist/components/admin/admin-router.js +68 -8
  113. package/dist/components/admin/admin-router.js.map +1 -1
  114. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  115. package/dist/components/admin/admin-sessions.js +127 -5
  116. package/dist/components/admin/admin-sessions.js.map +1 -1
  117. package/dist/components/admin/admin-user-avatar-control.d.ts +24 -0
  118. package/dist/components/admin/admin-user-avatar-control.d.ts.map +1 -0
  119. package/dist/components/admin/admin-user-avatar-control.js +84 -0
  120. package/dist/components/admin/admin-user-avatar-control.js.map +1 -0
  121. package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
  122. package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
  123. package/dist/components/admin/admin-user-detail-security-tab.js +63 -44
  124. package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
  125. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  126. package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
  127. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  128. package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
  129. package/dist/components/admin/admin-user-detail.js +32 -16
  130. package/dist/components/admin/admin-user-detail.js.map +1 -1
  131. package/dist/components/admin/admin-users.js +2 -2
  132. package/dist/components/admin/admin-users.js.map +1 -1
  133. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
  134. package/dist/components/admin/admin-workflows-executions-panel.js +4 -12
  135. package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
  136. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
  137. package/dist/components/admin/admin-workflows-status-badge.js +3 -3
  138. package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
  139. package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
  140. package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
  141. package/dist/components/admin/admin-workflows-status-labels.js +48 -0
  142. package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
  143. package/dist/components/admin/admin-workflows.js +1 -1
  144. package/dist/components/admin/analytics/AdvancedSection.d.ts +26 -0
  145. package/dist/components/admin/analytics/AdvancedSection.d.ts.map +1 -0
  146. package/dist/components/admin/analytics/AdvancedSection.js +143 -0
  147. package/dist/components/admin/analytics/AdvancedSection.js.map +1 -0
  148. package/dist/components/admin/analytics/AnalyticsChart.d.ts +20 -0
  149. package/dist/components/admin/analytics/AnalyticsChart.d.ts.map +1 -0
  150. package/dist/components/admin/analytics/AnalyticsChart.js +60 -0
  151. package/dist/components/admin/analytics/AnalyticsChart.js.map +1 -0
  152. package/dist/components/admin/analytics/AnalyticsChartBars.d.ts +19 -0
  153. package/dist/components/admin/analytics/AnalyticsChartBars.d.ts.map +1 -0
  154. package/dist/components/admin/analytics/AnalyticsChartBars.js +42 -0
  155. package/dist/components/admin/analytics/AnalyticsChartBars.js.map +1 -0
  156. package/dist/components/admin/analytics/AnalyticsChartDonut.d.ts +11 -0
  157. package/dist/components/admin/analytics/AnalyticsChartDonut.d.ts.map +1 -0
  158. package/dist/components/admin/analytics/AnalyticsChartDonut.js +78 -0
  159. package/dist/components/admin/analytics/AnalyticsChartDonut.js.map +1 -0
  160. package/dist/components/admin/analytics/AnalyticsChartHeader.d.ts +20 -0
  161. package/dist/components/admin/analytics/AnalyticsChartHeader.d.ts.map +1 -0
  162. package/dist/components/admin/analytics/AnalyticsChartHeader.js +105 -0
  163. package/dist/components/admin/analytics/AnalyticsChartHeader.js.map +1 -0
  164. package/dist/components/admin/analytics/AnalyticsChartHeat.d.ts +10 -0
  165. package/dist/components/admin/analytics/AnalyticsChartHeat.d.ts.map +1 -0
  166. package/dist/components/admin/analytics/AnalyticsChartHeat.js +58 -0
  167. package/dist/components/admin/analytics/AnalyticsChartHeat.js.map +1 -0
  168. package/dist/components/admin/analytics/AnalyticsChartLegend.d.ts +9 -0
  169. package/dist/components/admin/analytics/AnalyticsChartLegend.d.ts.map +1 -0
  170. package/dist/components/admin/analytics/AnalyticsChartLegend.js +21 -0
  171. package/dist/components/admin/analytics/AnalyticsChartLegend.js.map +1 -0
  172. package/dist/components/admin/analytics/AnalyticsChartLine.d.ts +13 -0
  173. package/dist/components/admin/analytics/AnalyticsChartLine.d.ts.map +1 -0
  174. package/dist/components/admin/analytics/AnalyticsChartLine.js +36 -0
  175. package/dist/components/admin/analytics/AnalyticsChartLine.js.map +1 -0
  176. package/dist/components/admin/analytics/AnalyticsChartRank.d.ts +13 -0
  177. package/dist/components/admin/analytics/AnalyticsChartRank.d.ts.map +1 -0
  178. package/dist/components/admin/analytics/AnalyticsChartRank.js +41 -0
  179. package/dist/components/admin/analytics/AnalyticsChartRank.js.map +1 -0
  180. package/dist/components/admin/analytics/AnalyticsChartTicks.d.ts +13 -0
  181. package/dist/components/admin/analytics/AnalyticsChartTicks.d.ts.map +1 -0
  182. package/dist/components/admin/analytics/AnalyticsChartTicks.js +26 -0
  183. package/dist/components/admin/analytics/AnalyticsChartTicks.js.map +1 -0
  184. package/dist/components/admin/analytics/AnalyticsEmpty.d.ts +16 -0
  185. package/dist/components/admin/analytics/AnalyticsEmpty.d.ts.map +1 -0
  186. package/dist/components/admin/analytics/AnalyticsEmpty.js +32 -0
  187. package/dist/components/admin/analytics/AnalyticsEmpty.js.map +1 -0
  188. package/dist/components/admin/analytics/ClauseLabel.d.ts +15 -0
  189. package/dist/components/admin/analytics/ClauseLabel.d.ts.map +1 -0
  190. package/dist/components/admin/analytics/ClauseLabel.js +19 -0
  191. package/dist/components/admin/analytics/ClauseLabel.js.map +1 -0
  192. package/dist/components/admin/analytics/CompareNote.d.ts +16 -0
  193. package/dist/components/admin/analytics/CompareNote.d.ts.map +1 -0
  194. package/dist/components/admin/analytics/CompareNote.js +33 -0
  195. package/dist/components/admin/analytics/CompareNote.js.map +1 -0
  196. package/dist/components/admin/analytics/DatasetSelect.d.ts +20 -0
  197. package/dist/components/admin/analytics/DatasetSelect.d.ts.map +1 -0
  198. package/dist/components/admin/analytics/DatasetSelect.js +63 -0
  199. package/dist/components/admin/analytics/DatasetSelect.js.map +1 -0
  200. package/dist/components/admin/analytics/FilterEditor.d.ts +24 -0
  201. package/dist/components/admin/analytics/FilterEditor.d.ts.map +1 -0
  202. package/dist/components/admin/analytics/FilterEditor.js +129 -0
  203. package/dist/components/admin/analytics/FilterEditor.js.map +1 -0
  204. package/dist/components/admin/analytics/FilterValuePicker.d.ts +19 -0
  205. package/dist/components/admin/analytics/FilterValuePicker.d.ts.map +1 -0
  206. package/dist/components/admin/analytics/FilterValuePicker.js +131 -0
  207. package/dist/components/admin/analytics/FilterValuePicker.js.map +1 -0
  208. package/dist/components/admin/analytics/GroupByChips.d.ts +26 -0
  209. package/dist/components/admin/analytics/GroupByChips.d.ts.map +1 -0
  210. package/dist/components/admin/analytics/GroupByChips.js +71 -0
  211. package/dist/components/admin/analytics/GroupByChips.js.map +1 -0
  212. package/dist/components/admin/analytics/MeasureChips.d.ts +18 -0
  213. package/dist/components/admin/analytics/MeasureChips.d.ts.map +1 -0
  214. package/dist/components/admin/analytics/MeasureChips.js +46 -0
  215. package/dist/components/admin/analytics/MeasureChips.js.map +1 -0
  216. package/dist/components/admin/analytics/QueryPanel.d.ts +27 -0
  217. package/dist/components/admin/analytics/QueryPanel.d.ts.map +1 -0
  218. package/dist/components/admin/analytics/QueryPanel.js +92 -0
  219. package/dist/components/admin/analytics/QueryPanel.js.map +1 -0
  220. package/dist/components/admin/analytics/RangeControl.d.ts +17 -0
  221. package/dist/components/admin/analytics/RangeControl.d.ts.map +1 -0
  222. package/dist/components/admin/analytics/RangeControl.js +43 -0
  223. package/dist/components/admin/analytics/RangeControl.js.map +1 -0
  224. package/dist/components/admin/analytics/RequestDialog.d.ts +24 -0
  225. package/dist/components/admin/analytics/RequestDialog.d.ts.map +1 -0
  226. package/dist/components/admin/analytics/RequestDialog.js +67 -0
  227. package/dist/components/admin/analytics/RequestDialog.js.map +1 -0
  228. package/dist/components/admin/analytics/ResultsPane.d.ts +15 -0
  229. package/dist/components/admin/analytics/ResultsPane.d.ts.map +1 -0
  230. package/dist/components/admin/analytics/ResultsPane.js +161 -0
  231. package/dist/components/admin/analytics/ResultsPane.js.map +1 -0
  232. package/dist/components/admin/analytics/ResultsTable.d.ts +17 -0
  233. package/dist/components/admin/analytics/ResultsTable.d.ts.map +1 -0
  234. package/dist/components/admin/analytics/ResultsTable.js +113 -0
  235. package/dist/components/admin/analytics/ResultsTable.js.map +1 -0
  236. package/dist/components/admin/analytics/RunFooter.d.ts +18 -0
  237. package/dist/components/admin/analytics/RunFooter.d.ts.map +1 -0
  238. package/dist/components/admin/analytics/RunFooter.js +78 -0
  239. package/dist/components/admin/analytics/RunFooter.js.map +1 -0
  240. package/dist/components/admin/analytics/SamplingBadge.d.ts +18 -0
  241. package/dist/components/admin/analytics/SamplingBadge.d.ts.map +1 -0
  242. package/dist/components/admin/analytics/SamplingBadge.js +35 -0
  243. package/dist/components/admin/analytics/SamplingBadge.js.map +1 -0
  244. package/dist/components/admin/analytics/ToggleChip.d.ts +28 -0
  245. package/dist/components/admin/analytics/ToggleChip.d.ts.map +1 -0
  246. package/dist/components/admin/analytics/ToggleChip.js +35 -0
  247. package/dist/components/admin/analytics/ToggleChip.js.map +1 -0
  248. package/dist/components/admin/analytics/TotalsCards.d.ts +19 -0
  249. package/dist/components/admin/analytics/TotalsCards.d.ts.map +1 -0
  250. package/dist/components/admin/analytics/TotalsCards.js +75 -0
  251. package/dist/components/admin/analytics/TotalsCards.js.map +1 -0
  252. package/dist/components/admin/analytics/TruncationBanner.d.ts +15 -0
  253. package/dist/components/admin/analytics/TruncationBanner.d.ts.map +1 -0
  254. package/dist/components/admin/analytics/TruncationBanner.js +52 -0
  255. package/dist/components/admin/analytics/TruncationBanner.js.map +1 -0
  256. package/dist/components/admin/analytics/analyticsModel.d.ts +98 -0
  257. package/dist/components/admin/analytics/analyticsModel.d.ts.map +1 -0
  258. package/dist/components/admin/analytics/analyticsModel.js +184 -0
  259. package/dist/components/admin/analytics/analyticsModel.js.map +1 -0
  260. package/dist/components/admin/analytics/analyticsTypes.d.ts +116 -0
  261. package/dist/components/admin/analytics/analyticsTypes.d.ts.map +1 -0
  262. package/dist/components/admin/analytics/analyticsTypes.js +0 -0
  263. package/dist/components/admin/analytics/chartModel.d.ts +149 -0
  264. package/dist/components/admin/analytics/chartModel.d.ts.map +1 -0
  265. package/dist/components/admin/analytics/chartModel.js +278 -0
  266. package/dist/components/admin/analytics/chartModel.js.map +1 -0
  267. package/dist/components/admin/analytics/useAnalyticsQuery.d.ts +62 -0
  268. package/dist/components/admin/analytics/useAnalyticsQuery.d.ts.map +1 -0
  269. package/dist/components/admin/analytics/useAnalyticsQuery.js +257 -0
  270. package/dist/components/admin/analytics/useAnalyticsQuery.js.map +1 -0
  271. package/dist/components/admin/analytics/useDismissable.d.ts +18 -0
  272. package/dist/components/admin/analytics/useDismissable.d.ts.map +1 -0
  273. package/dist/components/admin/analytics/useDismissable.js +37 -0
  274. package/dist/components/admin/analytics/useDismissable.js.map +1 -0
  275. package/dist/components/admin/analytics/useFilterValues.d.ts +37 -0
  276. package/dist/components/admin/analytics/useFilterValues.d.ts.map +1 -0
  277. package/dist/components/admin/analytics/useFilterValues.js +78 -0
  278. package/dist/components/admin/analytics/useFilterValues.js.map +1 -0
  279. package/dist/components/admin/analytics/usePanelWidth.d.ts +26 -0
  280. package/dist/components/admin/analytics/usePanelWidth.d.ts.map +1 -0
  281. package/dist/components/admin/analytics/usePanelWidth.js +61 -0
  282. package/dist/components/admin/analytics/usePanelWidth.js.map +1 -0
  283. package/dist/components/admin/analytics/useShapeLabels.d.ts +24 -0
  284. package/dist/components/admin/analytics/useShapeLabels.d.ts.map +1 -0
  285. package/dist/components/admin/analytics/useShapeLabels.js +41 -0
  286. package/dist/components/admin/analytics/useShapeLabels.js.map +1 -0
  287. package/dist/components/alepha-table/alepha-table-bulk-menu.d.ts +22 -0
  288. package/dist/components/alepha-table/alepha-table-bulk-menu.d.ts.map +1 -0
  289. package/dist/components/alepha-table/alepha-table-bulk-menu.js +117 -0
  290. package/dist/components/alepha-table/alepha-table-bulk-menu.js.map +1 -0
  291. package/dist/components/alepha-table/alepha-table.d.ts +154 -13
  292. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  293. package/dist/components/alepha-table/alepha-table.js +117 -22
  294. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  295. package/dist/components/app-shell/app-shell.d.ts +30 -11
  296. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  297. package/dist/components/app-shell/app-shell.js +75 -67
  298. package/dist/components/app-shell/app-shell.js.map +1 -1
  299. package/dist/components/app-shell/navigation-progress.d.ts +40 -0
  300. package/dist/components/app-shell/navigation-progress.d.ts.map +1 -0
  301. package/dist/components/app-shell/navigation-progress.js +86 -0
  302. package/dist/components/app-shell/navigation-progress.js.map +1 -0
  303. package/dist/components/auth/auth-login.d.ts.map +1 -1
  304. package/dist/components/auth/auth-login.js +27 -17
  305. package/dist/components/auth/auth-login.js.map +1 -1
  306. package/dist/components/auth/auth-mfa-step.d.ts +25 -0
  307. package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
  308. package/dist/components/auth/auth-mfa-step.js +122 -0
  309. package/dist/components/auth/auth-mfa-step.js.map +1 -0
  310. package/dist/components/auth/auth-register.d.ts +35 -0
  311. package/dist/components/auth/auth-register.d.ts.map +1 -1
  312. package/dist/components/auth/auth-register.js +14 -10
  313. package/dist/components/auth/auth-register.js.map +1 -1
  314. package/dist/components/auth/auth-reset-password.js +2 -2
  315. package/dist/components/auth/auth-router.d.ts +20 -0
  316. package/dist/components/auth/auth-router.d.ts.map +1 -1
  317. package/dist/components/auth/provider-labels.d.ts.map +1 -1
  318. package/dist/components/auth/provider-labels.js +1 -0
  319. package/dist/components/auth/provider-labels.js.map +1 -1
  320. package/dist/components/auto-form/auto-form.js +20 -17
  321. package/dist/components/auto-form/auto-form.js.map +1 -1
  322. package/dist/components/control/control.d.ts +50 -12
  323. package/dist/components/control/control.d.ts.map +1 -1
  324. package/dist/components/control/control.js +17 -6
  325. package/dist/components/control/control.js.map +1 -1
  326. package/dist/components/control-array/control-array.d.ts.map +1 -1
  327. package/dist/components/control-array/control-array.js +55 -10
  328. package/dist/components/control-array/control-array.js.map +1 -1
  329. package/dist/components/control-date/control-date.d.ts +8 -0
  330. package/dist/components/control-date/control-date.d.ts.map +1 -1
  331. package/dist/components/control-date/control-date.js +25 -9
  332. package/dist/components/control-date/control-date.js.map +1 -1
  333. package/dist/components/control-number/control-number.d.ts +5 -0
  334. package/dist/components/control-number/control-number.d.ts.map +1 -1
  335. package/dist/components/control-number/control-number.js +1 -0
  336. package/dist/components/control-number/control-number.js.map +1 -1
  337. package/dist/components/control-object/control-object.d.ts +12 -1
  338. package/dist/components/control-object/control-object.d.ts.map +1 -1
  339. package/dist/components/control-object/control-object.js +2 -1
  340. package/dist/components/control-object/control-object.js.map +1 -1
  341. package/dist/components/control-password/control-password.d.ts.map +1 -1
  342. package/dist/components/control-password/control-password.js +1 -0
  343. package/dist/components/control-password/control-password.js.map +1 -1
  344. package/dist/components/control-select/control-select.d.ts +57 -6
  345. package/dist/components/control-select/control-select.d.ts.map +1 -1
  346. package/dist/components/control-select/control-select.js +112 -32
  347. package/dist/components/control-select/control-select.js.map +1 -1
  348. package/dist/components/detail/detail-layout.d.ts +6 -0
  349. package/dist/components/detail/detail-layout.d.ts.map +1 -1
  350. package/dist/components/detail/detail-layout.js +11 -7
  351. package/dist/components/detail/detail-layout.js.map +1 -1
  352. package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
  353. package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
  354. package/dist/components/email-body-frame/email-body-frame.js +44 -0
  355. package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
  356. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
  357. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
  358. package/dist/components/markdown-view/diagram/{FlowchartDiagramLabel.js → DiagramLabel.js} +15 -6
  359. package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
  360. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +0 -5
  361. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -1
  362. package/dist/components/markdown-view/diagram/FlowchartDiagram.js +2 -6
  363. package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -1
  364. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +1 -1
  365. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -1
  366. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -1
  367. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +2 -3
  368. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -1
  369. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -1
  370. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +2 -3
  371. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -1
  372. package/dist/components/markdown-view/diagram/MermaidFence.d.ts +20 -11
  373. package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -1
  374. package/dist/components/markdown-view/diagram/MermaidFence.js +34 -13
  375. package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -1
  376. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
  377. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
  378. package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
  379. package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
  380. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
  381. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
  382. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
  383. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
  384. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
  385. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
  386. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
  387. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
  388. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
  389. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
  390. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
  391. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
  392. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
  393. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
  394. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
  395. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
  396. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
  397. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
  398. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
  399. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
  400. package/dist/components/markdown-view/diagram/diagramKind.d.ts +18 -0
  401. package/dist/components/markdown-view/diagram/diagramKind.d.ts.map +1 -0
  402. package/dist/components/markdown-view/diagram/diagramKind.js +27 -0
  403. package/dist/components/markdown-view/diagram/diagramKind.js.map +1 -0
  404. package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
  405. package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
  406. package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
  407. package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
  408. package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
  409. package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
  410. package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
  411. package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
  412. package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
  413. package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
  414. package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
  415. package/dist/components/markdown-view/markdown-view.css +65 -0
  416. package/dist/components/markdown-view/markdown-view.d.ts +18 -11
  417. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  418. package/dist/components/markdown-view/markdown-view.js +30 -16
  419. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  420. package/dist/components/nav-shell/nav-page.d.ts +7 -0
  421. package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
  422. package/dist/components/nav-shell/nav-page.js.map +1 -1
  423. package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
  424. package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
  425. package/dist/components/nav-shell/nav-tree-util.js +29 -6
  426. package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
  427. package/dist/components/nav-shell/spotlight.d.ts +3 -2
  428. package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
  429. package/dist/components/nav-shell/spotlight.js +9 -6
  430. package/dist/components/nav-shell/spotlight.js.map +1 -1
  431. package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
  432. package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
  433. package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
  434. package/dist/components/nav-shell/use-nav-entries.d.ts +6 -0
  435. package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
  436. package/dist/components/nav-shell/use-nav-entries.js +8 -3
  437. package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
  438. package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
  439. package/dist/components/nav-shell/use-nav-tree.js +1 -1
  440. package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
  441. package/dist/components/plate-layout/plate-layout.d.ts +50 -0
  442. package/dist/components/plate-layout/plate-layout.d.ts.map +1 -0
  443. package/dist/components/plate-layout/plate-layout.js +37 -0
  444. package/dist/components/plate-layout/plate-layout.js.map +1 -0
  445. package/dist/components/plate-layout/plate-tab-bar.d.ts +55 -0
  446. package/dist/components/plate-layout/plate-tab-bar.d.ts.map +1 -0
  447. package/dist/components/plate-layout/plate-tab-bar.js +52 -0
  448. package/dist/components/plate-layout/plate-tab-bar.js.map +1 -0
  449. package/dist/components/ui/alert-dialog.d.ts +1 -1
  450. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  451. package/dist/components/ui/alert-dialog.js +1 -0
  452. package/dist/components/ui/alert-dialog.js.map +1 -1
  453. package/dist/components/ui/alert.d.ts +2 -2
  454. package/dist/components/ui/alert.d.ts.map +1 -1
  455. package/dist/components/ui/alert.js +1 -0
  456. package/dist/components/ui/alert.js.map +1 -1
  457. package/dist/components/ui/avatar.d.ts +2 -2
  458. package/dist/components/ui/avatar.d.ts.map +1 -1
  459. package/dist/components/ui/avatar.js +1 -0
  460. package/dist/components/ui/avatar.js.map +1 -1
  461. package/dist/components/ui/breadcrumb.d.ts +2 -2
  462. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  463. package/dist/components/ui/breadcrumb.js +1 -0
  464. package/dist/components/ui/breadcrumb.js.map +1 -1
  465. package/dist/components/ui/button.js +1 -1
  466. package/dist/components/ui/button.js.map +1 -1
  467. package/dist/components/ui/card.d.ts +2 -2
  468. package/dist/components/ui/card.d.ts.map +1 -1
  469. package/dist/components/ui/card.js +1 -0
  470. package/dist/components/ui/card.js.map +1 -1
  471. package/dist/components/ui/checkbox.js +1 -1
  472. package/dist/components/ui/checkbox.js.map +1 -1
  473. package/dist/components/ui/combobox.d.ts +1 -1
  474. package/dist/components/ui/combobox.d.ts.map +1 -1
  475. package/dist/components/ui/combobox.js.map +1 -1
  476. package/dist/components/ui/command.d.ts +2 -2
  477. package/dist/components/ui/command.d.ts.map +1 -1
  478. package/dist/components/ui/command.js +1 -0
  479. package/dist/components/ui/command.js.map +1 -1
  480. package/dist/components/ui/context-menu.d.ts +2 -2
  481. package/dist/components/ui/context-menu.d.ts.map +1 -1
  482. package/dist/components/ui/context-menu.js +1 -0
  483. package/dist/components/ui/context-menu.js.map +1 -1
  484. package/dist/components/ui/dialog.d.ts +1 -1
  485. package/dist/components/ui/dialog.d.ts.map +1 -1
  486. package/dist/components/ui/dialog.js +1 -0
  487. package/dist/components/ui/dialog.js.map +1 -1
  488. package/dist/components/ui/drawer.d.ts +1 -1
  489. package/dist/components/ui/drawer.d.ts.map +1 -1
  490. package/dist/components/ui/drawer.js.map +1 -1
  491. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  492. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  493. package/dist/components/ui/dropdown-menu.js +1 -0
  494. package/dist/components/ui/dropdown-menu.js.map +1 -1
  495. package/dist/components/ui/empty.d.ts +1 -1
  496. package/dist/components/ui/empty.d.ts.map +1 -1
  497. package/dist/components/ui/empty.js.map +1 -1
  498. package/dist/components/ui/hover-card.d.ts +1 -1
  499. package/dist/components/ui/hover-card.js.map +1 -1
  500. package/dist/components/ui/input-group.d.ts +2 -2
  501. package/dist/components/ui/input-group.d.ts.map +1 -1
  502. package/dist/components/ui/input-group.js +1 -0
  503. package/dist/components/ui/input-group.js.map +1 -1
  504. package/dist/components/ui/input-otp.d.ts +1 -1
  505. package/dist/components/ui/input-otp.d.ts.map +1 -1
  506. package/dist/components/ui/input-otp.js.map +1 -1
  507. package/dist/components/ui/input.d.ts +1 -1
  508. package/dist/components/ui/input.d.ts.map +1 -1
  509. package/dist/components/ui/input.js +1 -0
  510. package/dist/components/ui/input.js.map +1 -1
  511. package/dist/components/ui/label.d.ts +1 -1
  512. package/dist/components/ui/label.d.ts.map +1 -1
  513. package/dist/components/ui/label.js +1 -0
  514. package/dist/components/ui/label.js.map +1 -1
  515. package/dist/components/ui/menubar.d.ts +2 -2
  516. package/dist/components/ui/menubar.d.ts.map +1 -1
  517. package/dist/components/ui/menubar.js +1 -0
  518. package/dist/components/ui/menubar.js.map +1 -1
  519. package/dist/components/ui/pagination.d.ts +1 -1
  520. package/dist/components/ui/pagination.d.ts.map +1 -1
  521. package/dist/components/ui/pagination.js +1 -0
  522. package/dist/components/ui/pagination.js.map +1 -1
  523. package/dist/components/ui/popover.d.ts +1 -1
  524. package/dist/components/ui/popover.d.ts.map +1 -1
  525. package/dist/components/ui/popover.js +1 -0
  526. package/dist/components/ui/popover.js.map +1 -1
  527. package/dist/components/ui/progress.d.ts +1 -1
  528. package/dist/components/ui/progress.d.ts.map +1 -1
  529. package/dist/components/ui/progress.js.map +1 -1
  530. package/dist/components/ui/segmented.d.ts +11 -0
  531. package/dist/components/ui/segmented.d.ts.map +1 -1
  532. package/dist/components/ui/segmented.js +6 -2
  533. package/dist/components/ui/segmented.js.map +1 -1
  534. package/dist/components/ui/select.d.ts +1 -1
  535. package/dist/components/ui/select.d.ts.map +1 -1
  536. package/dist/components/ui/select.js +1 -0
  537. package/dist/components/ui/select.js.map +1 -1
  538. package/dist/components/ui/sheet.d.ts +2 -2
  539. package/dist/components/ui/sheet.d.ts.map +1 -1
  540. package/dist/components/ui/sheet.js +1 -0
  541. package/dist/components/ui/sheet.js.map +1 -1
  542. package/dist/components/ui/switch.js +1 -1
  543. package/dist/components/ui/switch.js.map +1 -1
  544. package/dist/components/ui/table.d.ts +2 -2
  545. package/dist/components/ui/table.d.ts.map +1 -1
  546. package/dist/components/ui/table.js +1 -0
  547. package/dist/components/ui/table.js.map +1 -1
  548. package/dist/components/ui/tabs.d.ts +1 -1
  549. package/dist/components/ui/tabs.d.ts.map +1 -1
  550. package/dist/components/ui/tabs.js.map +1 -1
  551. package/dist/components/ui/textarea.d.ts +1 -1
  552. package/dist/components/ui/textarea.d.ts.map +1 -1
  553. package/dist/components/ui/textarea.js +1 -0
  554. package/dist/components/ui/textarea.js.map +1 -1
  555. package/dist/components/ui/tooltip.d.ts +1 -11
  556. package/dist/components/ui/tooltip.d.ts.map +1 -1
  557. package/dist/components/ui/tooltip.js +0 -10
  558. package/dist/components/ui/tooltip.js.map +1 -1
  559. package/dist/components/use-dialog/use-dialog.d.ts +7 -0
  560. package/dist/components/use-dialog/use-dialog.d.ts.map +1 -1
  561. package/dist/components/use-dialog/use-dialog.js +10 -1
  562. package/dist/components/use-dialog/use-dialog.js.map +1 -1
  563. package/dist/hooks/use-mobile.d.ts +1 -1
  564. package/dist/hooks/use-mobile.js +1 -1
  565. package/dist/hooks/use-mobile.js.map +1 -1
  566. package/dist/lib/i18n-fr.d.ts.map +1 -1
  567. package/dist/lib/i18n-fr.js +361 -8
  568. package/dist/lib/i18n-fr.js.map +1 -1
  569. package/dist/styles.css +45 -21
  570. package/package.json +11 -10
  571. package/src/components/account/__tests__/account-layout.browser.spec.tsx +127 -0
  572. package/src/components/account/__tests__/account-router.spec.ts +25 -0
  573. package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
  574. package/src/components/account/account-connections.tsx +50 -18
  575. package/src/components/account/account-delete-dialog.tsx +24 -9
  576. package/src/components/account/account-header.tsx +4 -1
  577. package/src/components/account/account-keys.tsx +73 -29
  578. package/src/components/account/account-layout.tsx +32 -2
  579. package/src/components/account/account-mfa-dialog.tsx +233 -0
  580. package/src/components/account/account-password-dialog.tsx +42 -12
  581. package/src/components/account/account-profile.tsx +66 -25
  582. package/src/components/account/account-router.tsx +47 -6
  583. package/src/components/account/account-security.tsx +209 -22
  584. package/src/components/account/account-sessions.tsx +87 -22
  585. package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
  586. package/src/components/admin/__tests__/admin-audits-action-filter.browser.spec.tsx +53 -0
  587. package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
  588. package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
  589. package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
  590. package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
  591. package/src/components/admin/__tests__/admin-router.spec.ts +27 -0
  592. package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
  593. package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
  594. package/src/components/admin/admin-analytics.tsx +97 -83
  595. package/src/components/admin/admin-audits.tsx +50 -8
  596. package/src/components/admin/admin-files.tsx +3 -0
  597. package/src/components/admin/admin-jobs-executions-panel.tsx +8 -11
  598. package/src/components/admin/admin-jobs-status-badge.tsx +4 -5
  599. package/src/components/admin/admin-jobs-status-labels.ts +46 -0
  600. package/src/components/admin/admin-keys.tsx +2 -0
  601. package/src/components/admin/admin-layout.tsx +9 -3
  602. package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
  603. package/src/components/admin/admin-notifications-detail.tsx +100 -0
  604. package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
  605. package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
  606. package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
  607. package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
  608. package/src/components/admin/admin-notifications-status-labels.ts +42 -0
  609. package/src/components/admin/admin-notifications-status-tones.ts +85 -0
  610. package/src/components/admin/admin-notifications-template-label.ts +22 -0
  611. package/src/components/admin/admin-notifications.tsx +398 -31
  612. package/src/components/admin/admin-parameters.tsx +165 -12
  613. package/src/components/admin/admin-router.tsx +65 -8
  614. package/src/components/admin/admin-sessions.tsx +174 -7
  615. package/src/components/admin/admin-user-avatar-control.tsx +130 -0
  616. package/src/components/admin/admin-user-detail-security-tab.tsx +70 -5
  617. package/src/components/admin/admin-user-detail-sessions-tab.tsx +10 -3
  618. package/src/components/admin/admin-user-detail.tsx +115 -24
  619. package/src/components/admin/admin-users.tsx +1 -1
  620. package/src/components/admin/admin-workflows-executions-panel.tsx +8 -16
  621. package/src/components/admin/admin-workflows-status-badge.tsx +4 -5
  622. package/src/components/admin/admin-workflows-status-labels.ts +51 -0
  623. package/src/components/admin/analytics/AdvancedSection.tsx +162 -0
  624. package/src/components/admin/analytics/AnalyticsChart.tsx +69 -0
  625. package/src/components/admin/analytics/AnalyticsChartBars.tsx +86 -0
  626. package/src/components/admin/analytics/AnalyticsChartDonut.tsx +78 -0
  627. package/src/components/admin/analytics/AnalyticsChartHeader.tsx +135 -0
  628. package/src/components/admin/analytics/AnalyticsChartHeat.tsx +57 -0
  629. package/src/components/admin/analytics/AnalyticsChartLegend.tsx +26 -0
  630. package/src/components/admin/analytics/AnalyticsChartLine.tsx +37 -0
  631. package/src/components/admin/analytics/AnalyticsChartRank.tsx +43 -0
  632. package/src/components/admin/analytics/AnalyticsChartTicks.tsx +38 -0
  633. package/src/components/admin/analytics/AnalyticsEmpty.tsx +37 -0
  634. package/src/components/admin/analytics/ClauseLabel.tsx +26 -0
  635. package/src/components/admin/analytics/CompareNote.tsx +50 -0
  636. package/src/components/admin/analytics/DatasetSelect.tsx +79 -0
  637. package/src/components/admin/analytics/FilterEditor.tsx +173 -0
  638. package/src/components/admin/analytics/FilterValuePicker.tsx +154 -0
  639. package/src/components/admin/analytics/GroupByChips.tsx +82 -0
  640. package/src/components/admin/analytics/MeasureChips.tsx +53 -0
  641. package/src/components/admin/analytics/QueryPanel.tsx +113 -0
  642. package/src/components/admin/analytics/RangeControl.tsx +42 -0
  643. package/src/components/admin/analytics/RequestDialog.tsx +91 -0
  644. package/src/components/admin/analytics/ResultsPane.tsx +224 -0
  645. package/src/components/admin/analytics/ResultsTable.tsx +176 -0
  646. package/src/components/admin/analytics/RunFooter.tsx +90 -0
  647. package/src/components/admin/analytics/SamplingBadge.tsx +46 -0
  648. package/src/components/admin/analytics/ToggleChip.tsx +57 -0
  649. package/src/components/admin/analytics/TotalsCards.tsx +79 -0
  650. package/src/components/admin/analytics/TruncationBanner.tsx +60 -0
  651. package/src/components/admin/analytics/analyticsModel.spec.ts +266 -0
  652. package/src/components/admin/analytics/analyticsModel.ts +263 -0
  653. package/src/components/admin/analytics/analyticsTypes.ts +139 -0
  654. package/src/components/admin/analytics/chartModel.spec.ts +240 -0
  655. package/src/components/admin/analytics/chartModel.ts +427 -0
  656. package/src/components/admin/analytics/useAnalyticsQuery.ts +401 -0
  657. package/src/components/admin/analytics/useDismissable.ts +48 -0
  658. package/src/components/admin/analytics/useFilterValues.ts +113 -0
  659. package/src/components/admin/analytics/usePanelWidth.ts +85 -0
  660. package/src/components/admin/analytics/useShapeLabels.ts +73 -0
  661. package/src/components/alepha-table/__tests__/alepha-table-actions.browser.spec.tsx +117 -0
  662. package/src/components/alepha-table/__tests__/alepha-table-bulk-menu.browser.spec.tsx +177 -0
  663. package/src/components/alepha-table/__tests__/alepha-table-bulk-visible.browser.spec.tsx +125 -0
  664. package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
  665. package/src/components/alepha-table/alepha-table-bulk-menu.tsx +170 -0
  666. package/src/components/alepha-table/alepha-table.tsx +344 -65
  667. package/src/components/app-shell/__tests__/navigation-progress.browser.spec.tsx +122 -0
  668. package/src/components/app-shell/__tests__/sidebar-nav-auto-close.browser.spec.tsx +170 -0
  669. package/src/components/app-shell/app-shell.tsx +135 -110
  670. package/src/components/app-shell/navigation-progress.tsx +110 -0
  671. package/src/components/auth/auth-login.tsx +37 -18
  672. package/src/components/auth/auth-mfa-step.tsx +177 -0
  673. package/src/components/auth/auth-register.tsx +73 -10
  674. package/src/components/auth/provider-labels.ts +4 -0
  675. package/src/components/auto-form/__tests__/auto-form-fill-groups.browser.spec.tsx +104 -0
  676. package/src/components/auto-form/auto-form.tsx +13 -3
  677. package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
  678. package/src/components/control/control.tsx +83 -19
  679. package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
  680. package/src/components/control-array/control-array.tsx +85 -13
  681. package/src/components/control-date/control-date.tsx +55 -16
  682. package/src/components/control-number/control-number.tsx +7 -0
  683. package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
  684. package/src/components/control-object/control-object.tsx +21 -2
  685. package/src/components/control-password/control-password.tsx +2 -1
  686. package/src/components/control-select/__tests__/control-select-multi.browser.spec.tsx +196 -0
  687. package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +5 -1
  688. package/src/components/control-select/__tests__/control-select-size-minimal.browser.spec.tsx +119 -0
  689. package/src/components/control-select/__tests__/control-select-trigger-props.browser.spec.tsx +89 -0
  690. package/src/components/control-select/control-select.tsx +294 -97
  691. package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +82 -0
  692. package/src/components/detail/detail-layout.tsx +57 -8
  693. package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
  694. package/src/components/email-body-frame/email-body-frame.tsx +81 -0
  695. package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +65 -2
  696. package/src/components/markdown-view/diagram/{FlowchartDiagramLabel.tsx → DiagramLabel.tsx} +14 -4
  697. package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +1 -6
  698. package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +1 -1
  699. package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +2 -3
  700. package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +2 -3
  701. package/src/components/markdown-view/diagram/MermaidFence.tsx +43 -15
  702. package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
  703. package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
  704. package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
  705. package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
  706. package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
  707. package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
  708. package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
  709. package/src/components/markdown-view/diagram/diagramKind.ts +31 -0
  710. package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
  711. package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
  712. package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
  713. package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
  714. package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
  715. package/src/components/markdown-view/markdown-view.css +65 -0
  716. package/src/components/markdown-view/markdown-view.tsx +34 -16
  717. package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +107 -1
  718. package/src/components/nav-shell/nav-page.tsx +8 -0
  719. package/src/components/nav-shell/nav-tree-util.ts +95 -2
  720. package/src/components/nav-shell/spotlight.tsx +22 -8
  721. package/src/components/nav-shell/use-nav-breadcrumbs.ts +9 -2
  722. package/src/components/nav-shell/use-nav-entries.ts +18 -2
  723. package/src/components/nav-shell/use-nav-tree.ts +4 -1
  724. package/src/components/plate-layout/__tests__/plate-layout.browser.spec.tsx +167 -0
  725. package/src/components/plate-layout/plate-layout.tsx +78 -0
  726. package/src/components/plate-layout/plate-tab-bar.tsx +122 -0
  727. package/src/components/ui/alert-dialog.tsx +1 -1
  728. package/src/components/ui/alert.tsx +2 -2
  729. package/src/components/ui/avatar.tsx +3 -3
  730. package/src/components/ui/breadcrumb.tsx +3 -3
  731. package/src/components/ui/button.tsx +1 -1
  732. package/src/components/ui/card.tsx +5 -5
  733. package/src/components/ui/checkbox.tsx +1 -1
  734. package/src/components/ui/combobox.tsx +8 -8
  735. package/src/components/ui/command.tsx +4 -4
  736. package/src/components/ui/context-menu.tsx +7 -7
  737. package/src/components/ui/dialog.tsx +1 -1
  738. package/src/components/ui/drawer.tsx +6 -6
  739. package/src/components/ui/dropdown-menu.tsx +8 -14
  740. package/src/components/ui/empty.tsx +3 -3
  741. package/src/components/ui/hover-card.tsx +1 -1
  742. package/src/components/ui/input-group.tsx +2 -2
  743. package/src/components/ui/input-otp.tsx +1 -1
  744. package/src/components/ui/input.tsx +1 -1
  745. package/src/components/ui/label.tsx +1 -1
  746. package/src/components/ui/menubar.tsx +9 -9
  747. package/src/components/ui/pagination.tsx +1 -1
  748. package/src/components/ui/popover.tsx +1 -1
  749. package/src/components/ui/progress.tsx +1 -1
  750. package/src/components/ui/segmented.tsx +28 -0
  751. package/src/components/ui/select.tsx +1 -1
  752. package/src/components/ui/sheet.tsx +4 -4
  753. package/src/components/ui/switch.tsx +1 -1
  754. package/src/components/ui/table.tsx +6 -9
  755. package/src/components/ui/tabs.tsx +1 -1
  756. package/src/components/ui/textarea.tsx +1 -1
  757. package/src/components/ui/tooltip.tsx +3 -11
  758. package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
  759. package/src/components/use-dialog/use-dialog.tsx +10 -0
  760. package/src/hooks/use-mobile.ts +1 -1
  761. package/src/lib/__tests__/i18n-fr.spec.ts +27 -5
  762. package/src/lib/i18n-fr.ts +428 -7
  763. package/src/styles.css +45 -21
  764. package/dist/components/admin/admin-analytics-query-panel.d.ts +0 -16
  765. package/dist/components/admin/admin-analytics-query-panel.d.ts.map +0 -1
  766. package/dist/components/admin/admin-analytics-query-panel.js +0 -117
  767. package/dist/components/admin/admin-analytics-query-panel.js.map +0 -1
  768. package/dist/components/admin/admin-analytics-results.d.ts +0 -15
  769. package/dist/components/admin/admin-analytics-results.d.ts.map +0 -1
  770. package/dist/components/admin/admin-analytics-results.js +0 -56
  771. package/dist/components/admin/admin-analytics-results.js.map +0 -1
  772. package/dist/components/language-toggle/language-toggle.d.ts +0 -8
  773. package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
  774. package/dist/components/language-toggle/language-toggle.js +0 -49
  775. package/dist/components/language-toggle/language-toggle.js.map +0 -1
  776. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +0 -23
  777. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +0 -1
  778. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +0 -1
  779. package/dist/components/ui/accordion.d.ts +0 -7
  780. package/dist/components/ui/accordion.d.ts.map +0 -1
  781. package/dist/components/ui/accordion.js +0 -55
  782. package/dist/components/ui/accordion.js.map +0 -1
  783. package/dist/components/ui/aspect-ratio.d.ts +0 -5
  784. package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
  785. package/dist/components/ui/aspect-ratio.js +0 -15
  786. package/dist/components/ui/aspect-ratio.js.map +0 -1
  787. package/dist/components/ui/carousel.d.ts +0 -29
  788. package/dist/components/ui/carousel.d.ts.map +0 -1
  789. package/dist/components/ui/carousel.js +0 -144
  790. package/dist/components/ui/carousel.js.map +0 -1
  791. package/dist/components/ui/collapsible.d.ts +0 -6
  792. package/dist/components/ui/collapsible.d.ts.map +0 -1
  793. package/dist/components/ui/collapsible.js +0 -26
  794. package/dist/components/ui/collapsible.js.map +0 -1
  795. package/dist/components/ui/direction.d.ts +0 -2
  796. package/dist/components/ui/direction.d.ts.map +0 -1
  797. package/dist/components/ui/direction.js +0 -3
  798. package/dist/components/ui/item.d.ts +0 -23
  799. package/dist/components/ui/item.d.ts.map +0 -1
  800. package/dist/components/ui/item.js +0 -122
  801. package/dist/components/ui/item.js.map +0 -1
  802. package/dist/components/ui/navigation-menu.d.ts +0 -12
  803. package/dist/components/ui/navigation-menu.d.ts.map +0 -1
  804. package/dist/components/ui/navigation-menu.js +0 -84
  805. package/dist/components/ui/navigation-menu.js.map +0 -1
  806. package/dist/components/ui/radio-group.d.ts +0 -6
  807. package/dist/components/ui/radio-group.d.ts.map +0 -1
  808. package/dist/components/ui/radio-group.js +0 -29
  809. package/dist/components/ui/radio-group.js.map +0 -1
  810. package/dist/components/ui/scroll-area.d.ts +0 -5
  811. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  812. package/dist/components/ui/scroll-area.js +0 -38
  813. package/dist/components/ui/scroll-area.js.map +0 -1
  814. package/dist/components/ui/toggle-group.d.ts +0 -12
  815. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  816. package/dist/components/ui/toggle-group.js +0 -60
  817. package/dist/components/ui/toggle-group.js.map +0 -1
  818. package/dist/components/ui/toggle.d.ts +0 -9
  819. package/dist/components/ui/toggle.d.ts.map +0 -1
  820. package/dist/components/ui/toggle.js +0 -38
  821. package/dist/components/ui/toggle.js.map +0 -1
  822. package/src/components/admin/admin-analytics-query-panel.tsx +0 -150
  823. package/src/components/admin/admin-analytics-results.tsx +0 -95
  824. package/src/components/language-toggle/language-toggle.tsx +0 -66
  825. package/src/components/ui/accordion.tsx +0 -77
  826. package/src/components/ui/aspect-ratio.tsx +0 -22
  827. package/src/components/ui/carousel.tsx +0 -258
  828. package/src/components/ui/collapsible.tsx +0 -21
  829. package/src/components/ui/direction.tsx +0 -6
  830. package/src/components/ui/item.tsx +0 -200
  831. package/src/components/ui/navigation-menu.tsx +0 -170
  832. package/src/components/ui/radio-group.tsx +0 -37
  833. package/src/components/ui/scroll-area.tsx +0 -53
  834. package/src/components/ui/toggle-group.tsx +0 -93
  835. package/src/components/ui/toggle.tsx +0 -44
@@ -1 +1 @@
1
- {"version":3,"file":"alepha-table.js","names":[],"sources":["../../../src/components/alepha-table/alepha-table.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Checkbox } from \"@alepha/ui/components/ui/checkbox\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@alepha/ui/components/ui/dropdown-menu\";\nimport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n} from \"@alepha/ui/components/ui/pagination\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@alepha/ui/components/ui/select\";\nimport { Skeleton } from \"@alepha/ui/components/ui/skeleton\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@alepha/ui/components/ui/table\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@alepha/ui/components/ui/tooltip\";\nimport { cn } from \"@alepha/ui/lib/utils\";\nimport { type Page, type ZObject, z } from \"alepha\";\nimport { ClientOnly, useAlepha } from \"alepha/react\";\nimport { type FormModel, useForm } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n ArrowDown,\n ArrowUp,\n ChevronsUpDown,\n Columns3,\n FunnelX,\n Inbox,\n MoreVertical,\n RefreshCw,\n X,\n} from \"lucide-react\";\nimport {\n type ComponentType,\n type ReactNode,\n type SVGProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { paginateLocal } from \"./paginate-local.ts\";\nimport { useTableSelection } from \"./use-table-selection.ts\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface ColumnDef<T> {\n label: string;\n cell: (item: T) => ReactNode;\n sortable?: boolean;\n /**\n * Sort key sent to the API. Defaults to the column key.\n */\n sortKey?: string;\n /**\n * Static-data mode only: the value this column sorts on, for a column\n * whose sort key is not a plain property of the row (a derived total, a\n * joined label). Defaults to `item[sortKey]`.\n *\n * Ignored when the table fetches: there the server owns the ordering.\n */\n sortValue?: (item: T) => unknown;\n /**\n * When true, the column starts hidden. The user can still toggle it\n * on via the built-in column picker. Pass `hideColumnPicker` on the\n * table to forbid toggling entirely.\n */\n defaultHidden?: boolean;\n className?: string;\n align?: \"left\" | \"right\" | \"center\";\n}\n\n/**\n * Context passed to every row-action `onClick`. `refresh()` re-fires the\n * current fetch with the current filters/sort — call it after a mutation\n * so the table reflects the new state without a manual reload.\n *\n * ⚠️ In static-data mode there is no fetch to re-fire, so `refresh()` only\n * returns to page 0: the rows belong to the caller, and a mutation has to\n * be written back into the array passed as `data`. The table renders the\n * new array on the same render, without it.\n */\nexport interface RowActionContext {\n refresh: () => void;\n}\n\nexport interface RowAction<T> {\n label: string;\n icon?: IconType;\n onClick: (item: T, ctx: RowActionContext) => void | Promise<void>;\n destructive?: boolean;\n disabled?: (item: T) => boolean;\n}\n\n/**\n * Context passed to every bulk-action `onClick`. `clearSelection()`\n * empties the checkbox set; `refresh()` re-fires the current fetch.\n */\nexport interface BulkActionContext {\n refresh: () => void;\n clearSelection: () => void;\n}\n\nexport interface BulkAction<T> {\n label: string;\n icon?: IconType;\n onClick: (selected: T[], ctx: BulkActionContext) => void | Promise<void>;\n destructive?: boolean;\n}\n\n/**\n * A standalone toolbar icon-button, rendered in the right-hand icon group\n * next to the column picker and separated from the filter area by a divider.\n * Use for table-scoped actions (e.g. \"Upload\", \"New\") that aren't tied to a\n * row or a selection. The table renders the ghost icon button + tooltip so it\n * matches the built-in column-picker / refresh controls.\n */\nexport interface TableAction {\n icon: IconType;\n label: string;\n onClick: () => void;\n disabled?: boolean;\n}\n\n/**\n * High-level filter slot. AlephaTable creates the `useForm` internally,\n * wraps `render`'s output in a `<form>` element, persists values under\n * `persistenceKey` when set, and refetches on submit (and on every\n * change, debounced, by default).\n *\n * The render function receives the typed form so callers wire inputs\n * with `form.input.<field>` exactly like a hand-rolled `useForm`.\n */\nexport interface AlephaTableFilters {\n schema: ZObject;\n initialValues?: Record<string, any>;\n /**\n * Filter values that outrank the persisted ones on mount.\n *\n * `initialValues` is what the table starts from when the reader has never\n * chosen anything; a persisted choice wins over it, which is the right\n * default for a preference. This is the opposite case: values the caller\n * derived from *how the reader got here* — typically a URL param on a\n * drill-through link — where landing on last week's stored filter instead\n * would ignore the link that was just clicked.\n *\n * Read once, at mount, exactly like `initialValues`. Change the\n * component's `key` to re-seed on a later arrival.\n *\n * **Transient, and by construction.** Persistence is written from\n * `form:change` / `form:submit:success` only, never on mount — so a seed\n * shows in the toolbar and narrows the fetch without overwriting the\n * filter the reader chose for themselves last time. Touch any control and\n * the resulting values (seed included) become the stored choice, which is\n * the right moment for it: that is the reader choosing.\n */\n seedValues?: Record<string, any>;\n render: (form: FormModel<ZObject>) => ReactNode;\n}\n\ninterface SortState {\n field: string;\n direction: \"asc\" | \"desc\";\n}\n\nexport type TableFetcher<T> = (params: {\n page: number;\n size: number;\n sort?: string;\n filters?: Record<string, any>;\n}) => Promise<Page<T>>;\n\n/**\n * Where the rows come from. Exactly one of the two.\n *\n * `data` is not sugar over `fetch`: a fetcher closing over an in-memory\n * array cannot work, because the table holds `fetch` in a ref that is\n * deliberately excluded from its load effect (see `fetchRef`), so the\n * closure goes stale the moment the caller's array changes. Static rows\n * therefore bypass the fetch path entirely and are derived synchronously.\n */\nexport type AlephaTableSource<T> =\n | {\n /**\n * Fetcher invoked with paging + sort + filters. Should return an\n * Alepha `Page<T>`.\n */\n fetch: TableFetcher<T>;\n data?: never;\n filter?: never;\n }\n | {\n /**\n * Rows the caller already holds. The table filters, sorts and pages\n * them in memory and never issues a request.\n *\n * Use it when the array is the page's data rather than the table's —\n * shared with a chart, a count, an aside — so that one array stays\n * the single source of truth. For anything the reader can outgrow,\n * pass `fetch` and let the server page it.\n */\n data: T[];\n /**\n * Static-data mode only: predicate replacing the built-in field\n * matching, which pairs each filter value with the same-named\n * property (strings as a case-insensitive substring, arrays by\n * membership, everything else strictly).\n *\n * Reach for it as soon as a filter is not a field: a `search` box\n * spanning several columns, a range, a joined label. Only ever\n * called with filter values that are actually set.\n */\n filter?: (item: T, filters: Record<string, any>) => boolean;\n fetch?: never;\n };\n\nexport type AlephaTableProps<T> = AlephaTableBaseProps<T> &\n AlephaTableSource<T>;\n\nexport interface AlephaTableBaseProps<T> {\n /**\n * Column definitions, keyed by the property name they read from.\n */\n columns: Record<string, ColumnDef<T>>;\n /**\n * Per-row action menu builder. Return an array of `RowAction` per\n * item. Each `onClick` receives `(item, { refresh })`.\n */\n rowActions?: (item: T) => RowAction<T>[];\n /**\n * Actions applied to selected rows (enables checkbox column). Each\n * `onClick` receives `(items, { refresh, clearSelection })`.\n */\n bulkActions?: BulkAction<T>[];\n /**\n * Page size the table opens on. The reader can change it from the footer;\n * with `persistenceKey` set, their choice is remembered and wins over this.\n */\n defaultSize?: number;\n /**\n * Sizes offered in the footer picker. Defaults to {@link PAGE_SIZES}.\n *\n * Pass `[]` to hide the picker entirely, for a table whose page size is\n * not the reader's business.\n */\n pageSizes?: number[];\n /**\n * Stable row identifier. Defaults to `item.id`.\n */\n rowKey?: (item: T) => string;\n /**\n * Click handler invoked when a row is clicked (excluding action\n * buttons).\n */\n onRowClick?: (item: T) => void;\n /**\n * Auto-refresh interval in ms (only when document is visible).\n *\n * Meaningless in static-data mode — there is no request to repeat, and a\n * changed `data` array is already on screen the render it changes.\n */\n pollMs?: number;\n /**\n * External refetch trigger. Bump this value (e.g. from a `useState`\n * counter) after a mutation performed *outside* the table — such as a\n * toolbar upload action — to make the table reload. Row/bulk actions\n * already get `ctx.refresh()`; this is the escape hatch for everything\n * else. Changing it resets to page 0 and refetches; the initial value\n * is ignored (the table fetches on mount regardless).\n *\n * Not needed in static-data mode: a new `data` array is picked up on its\n * own. Bumping this there only resets to page 0.\n */\n refreshSignal?: number | string;\n /**\n * High-level filter form. AlephaTable owns the `useForm`, renders the\n * inputs inside a `<form>` in the toolbar, and refetches on\n * submit/change.\n *\n * Mutually exclusive with `form` (legacy: caller-owned form). When\n * both are passed, `filters` wins.\n */\n filters?: AlephaTableFilters;\n /**\n * When set, filter values, column visibility, and sort state are\n * persisted to `localStorage` under this key. Pick a key that's\n * unique per page and per scope (e.g. `\"admin.users\"`,\n * `\\`lor.board.${campaignId}\\``).\n */\n persistenceKey?: string;\n /**\n * Hide the built-in column visibility dropdown in the toolbar.\n */\n hideColumnPicker?: boolean;\n /**\n * Hide the built-in actions menu (Refresh, Reset filters).\n */\n hideActionsMenu?: boolean;\n /**\n * Extra slot rendered to the right of the filter inputs in the\n * toolbar — typically a \"New\" / \"Create\" button.\n *\n * Vertically centred in the bar (`self-center`) regardless of its own\n * height, so it no longer has to match the filter inputs. It used to inherit\n * the bar's `items-end`, which meant anything shorter than h-9 hung off the\n * bottom edge and a labelled filter dragged the button down with it.\n */\n toolbar?: ReactNode;\n /**\n * Standalone icon-button actions rendered in the toolbar's right-hand\n * icon group, before the column picker and separated from the filter\n * area by a divider. The table renders the ghost icon button + tooltip\n * itself, so callers only supply the icon/label/handler.\n */\n actions?: TableAction[];\n /**\n * Extra classes applied to the outer wrapper.\n */\n className?: string;\n /**\n * Message shown when the page is empty. Defaults to \"No results\".\n */\n emptyMessage?: string;\n /**\n * Rich empty-state node rendered when the page is empty — e.g. an icon +\n * message + optional call-to-action. Overrides `emptyMessage` when set.\n */\n empty?: ReactNode;\n /**\n * Free-form content rendered above the toolbar (e.g. a page title).\n */\n header?: ReactNode;\n /**\n * Initial sort state. When `persistenceKey` is set, a persisted sort\n * takes precedence over this.\n */\n defaultSort?: SortState | null;\n /**\n * Called whenever the user toggles a column header. Receives the new\n * sort state (`null` when sort is cleared). Use this if you need a\n * persistence layer beyond `persistenceKey` (e.g. URL state).\n */\n onSortChange?: (sort: SortState | null) => void;\n /**\n * Legacy: caller-owned filter form. Prefer `filters` (which has\n * AlephaTable own the form). When `filters` is set, this prop is\n * ignored.\n */\n form?: FormModel<ZObject>;\n /**\n * When true (default when `filters` is set), the table refetches on\n * every `form:change` event, debounced by 250ms. Set to `false` to\n * require an explicit submit.\n */\n autoApplyFilters?: boolean;\n}\n\nconst defaultRowKey = (item: unknown): string =>\n // Coercion at a boundary: the value is a form/route/chart primitive whose\n // declared type is wider than what can reach here.\n // oxlint-disable-next-line typescript/no-base-to-string\n String((item as { id?: unknown })?.id ?? Math.random());\n\nconst EMPTY_FILTERS_SCHEMA = z.object({}) as ZObject;\n\n/**\n * Synchronous localStorage read. Returns undefined on miss or error.\n */\nconst readPersisted = <V,>(key: string, suffix: string): V | undefined => {\n if (typeof window === \"undefined\") return undefined;\n try {\n const raw = window.localStorage.getItem(`${key}.${suffix}`);\n return raw == null ? undefined : (JSON.parse(raw) as V);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Synchronous localStorage write. Empty objects/null delete the key.\n */\nconst writePersisted = (key: string, suffix: string, value: unknown): void => {\n if (typeof window === \"undefined\") return;\n const fullKey = `${key}.${suffix}`;\n try {\n const isEmptyObject =\n value !== null &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n Object.keys(value as object).length === 0;\n const isEmptyArray = Array.isArray(value) && value.length === 0;\n if (\n value === undefined ||\n value === null ||\n isEmptyObject ||\n isEmptyArray\n ) {\n window.localStorage.removeItem(fullKey);\n return;\n }\n window.localStorage.setItem(fullKey, JSON.stringify(value));\n } catch {\n // localStorage may be unavailable (private mode, quota). Skip.\n }\n};\n\n/**\n * Page sizes the footer offers.\n *\n * No \"all\". Pagination here is server-side, so an unbounded fetch is a query\n * whose cost grows with the biggest table in the product and is paid by the\n * reader who can least afford it. 100 covers \"let me scan the lot\" without\n * that.\n */\nexport const PAGE_SIZES = [10, 20, 50, 100];\n\nexport function AlephaTable<T>(props: AlephaTableProps<T>) {\n const rowKey = props.rowKey ?? defaultRowKey;\n\n // State, not a constant. It was `props.defaultSize ?? 20` read once, so a\n // reader had no way to see more rows than the call site had decided for\n // them. Already in `load`'s dependency array, so changing it refetches.\n const [size, setSize] = useState<number>(\n () =>\n (props.persistenceKey\n ? readPersisted<number>(props.persistenceKey, \"size\")\n : undefined) ??\n props.defaultSize ??\n 20,\n );\n const pageSizes = props.pageSizes ?? PAGE_SIZES;\n const alepha = useAlepha();\n const { tr } = useI18n();\n\n // -- Filter form (internal when `filters` is set, else legacy `form`) -----\n\n // Read persisted filter values synchronously so they reach useForm's\n // first invocation. Reading inside an effect would be too late —\n // useForm captures `initialValues` only once via useMemo.\n const persistedFilterValues = useMemo(() => {\n if (!props.persistenceKey || !props.filters) return undefined;\n return readPersisted<Record<string, any>>(props.persistenceKey, \"filters\");\n }, [props.persistenceKey, props.filters]);\n\n const mergedFilterInitialValues = useMemo<Record<string, any>>(\n () => ({\n ...props.filters?.initialValues,\n ...persistedFilterValues,\n // Last, so it beats the stored choice — see `seedValues`. A drill-through\n // link that lost to a filter the reader set last week would be a link\n // that does nothing.\n ...props.filters?.seedValues,\n }),\n [],\n );\n\n // Always call useForm to keep hook order stable. When the caller\n // doesn't pass `filters`, the internal form has an empty schema and\n // is simply unused.\n const internalForm = useForm({\n schema: props.filters?.schema ?? EMPTY_FILTERS_SCHEMA,\n initialValues: mergedFilterInitialValues,\n handler: async () => {\n // No-op — the table subscribes to `form:submit:success` to refetch.\n },\n });\n\n const form = props.filters ? internalForm : props.form;\n\n // -- Paging / sort / data --------------------------------------------------\n\n const [page, setPage] = useState(0);\n\n /**\n * Change the page size and go back to the first page.\n *\n * The reset is the whole point: raising the size while on page 5 can put\n * the reader past the last page, which renders an empty table with no\n * visible cause. Persisted so the choice survives a reload, alongside the\n * filters, sort and columns this table already remembers.\n */\n const changeSize = (next: number) => {\n setSize(next);\n setPage(0);\n if (props.persistenceKey) {\n writePersisted(props.persistenceKey, \"size\", next);\n }\n };\n const [sort, setSort] = useState<SortState | null>(() => {\n if (props.persistenceKey) {\n const persisted = readPersisted<SortState>(props.persistenceKey, \"sort\");\n if (persisted) return persisted;\n }\n return props.defaultSort ?? null;\n });\n const [fetchedData, setData] = useState<T[]>([]);\n const [fetchedMeta, setMeta] = useState<Page<T>[\"page\"] | null>(null);\n const [loading, setLoading] = useState(false);\n const [refreshKey, setRefreshKey] = useState(0);\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n // Alepha's pagination parser reads \"field\" as asc and \"-field\" as desc.\n // Multiple comma-separated entries are multi-column sort, so we must\n // NOT use `field,direction` syntax — that would treat \"asc\"/\"desc\" as\n // a second column name and 500 on the backend.\n const sortParam = sort\n ? sort.direction === \"desc\"\n ? `-${sort.field}`\n : sort.field\n : undefined;\n\n // Hold the latest `fetch` in a ref so it is NOT a dependency of `load`.\n // Callers pass `fetch` inline (a new function every render), and a fetcher\n // that writes a store atom the caller also subscribes to would otherwise\n // self-trigger: load → atom write → caller re-render → new `fetch` → new\n // `load` → effect re-runs → infinite loop. The ref keeps the newest closure\n // available while `load` only re-runs on actual inputs (page/size/sort/…).\n const fetchRef = useRef(props.fetch);\n fetchRef.current = props.fetch;\n\n const load = useCallback(async () => {\n // Static mode owns no request. Bail before touching `loading` too, so a\n // table fed an array never flashes the skeleton over rows it already has.\n const fetcher = fetchRef.current;\n if (!fetcher) return;\n setLoading(true);\n try {\n const res = await fetcher({\n page,\n size,\n sort: sortParam,\n filters: form?.currentValues,\n });\n setData(res.content);\n setMeta(res.page);\n } catch (error) {\n // Surface read failures through the same `react:action:error` channel\n // that useAction/useQuery use, so a mounted <ActionErrorToaster /> toasts\n // them. Keep the previous rows on screen rather than blanking the table.\n void alepha.events.emit(\"react:action:error\", {\n type: \"custom\",\n id: \"alepha-table:load\",\n error: error as Error,\n });\n } finally {\n setLoading(false);\n }\n }, [page, size, sortParam, refreshKey, form, alepha]);\n\n useEffect(() => {\n void load();\n }, [load]);\n\n /**\n * Static mode's equivalent of `load` — derived, not stored.\n *\n * Deliberately NOT routed through `load`: putting `props.data` in that\n * effect's dependencies reproduces the exact loop `fetchRef` exists to\n * prevent (load → setData → re-render → new inline array → new load).\n * Computed synchronously there is no state to go stale, an inline\n * `data={rows.filter(…)}` is safe, and a changed array is on screen in\n * the same render.\n */\n const staticPage = useMemo(() => {\n if (!props.data) return null;\n const sortValues: Record<string, (item: T) => unknown> = {};\n for (const [key, column] of Object.entries(props.columns)) {\n if (column.sortValue) {\n sortValues[column.sortKey ?? key] = column.sortValue;\n }\n }\n return paginateLocal(props.data, {\n page,\n size,\n sort: sortParam,\n sortValues,\n filters: form?.currentValues,\n filter: props.filter,\n });\n // `refreshKey` is what the filter-form subscriptions bump, so it is how\n // a filter change reaches this memo — `form.currentValues` is mutated in\n // place and its identity never changes.\n }, [\n props.data,\n props.columns,\n props.filter,\n page,\n size,\n sortParam,\n refreshKey,\n form,\n ]);\n\n const data = staticPage ? staticPage.content : fetchedData;\n const meta = staticPage ? staticPage.page : fetchedMeta;\n\n /**\n * Rows vanish under the reader in static mode: the caller detaches one and\n * the page they are on stops existing. Nothing fetches, so nothing else\n * would notice — the table would sit on an empty page with no visible\n * cause. Fetch mode has the same hole, but there the server round-trip\n * needed to see it makes this the wrong place to close it.\n */\n if (staticPage) {\n const totalPages = staticPage.page.totalPages ?? 0;\n if (page > 0 && page > totalPages - 1) {\n // Guarded on `page`, so it settles in one pass and does not need an\n // effect: the clamp lands before the rows render against a page that no\n // longer exists.\n setPage(Math.max(0, totalPages - 1));\n }\n }\n\n // Persist sort to localStorage on every change.\n useEffect(() => {\n if (!props.persistenceKey) return;\n writePersisted(props.persistenceKey, \"sort\", sort);\n }, [props.persistenceKey, sort]);\n\n // -- Refresh + reset wiring -----------------------------------------------\n\n const refresh = useCallback(() => {\n setPage(0);\n setRefreshKey((k) => k + 1);\n }, []);\n\n const handleRefreshClick = useCallback(() => {\n setIsRefreshing(true);\n refresh();\n setTimeout(() => setIsRefreshing(false), 1000);\n }, [refresh]);\n\n // React to the external `refreshSignal` prop. The first render seeds the\n // ref without refetching (the mount effect already loads); every later\n // change triggers a refresh. Kept separate from `load`'s deps so an inline\n // `fetch` closure can't self-trigger a loop (see `fetchRef` above).\n const refreshSignalRef = useRef(props.refreshSignal);\n useEffect(() => {\n if (refreshSignalRef.current === props.refreshSignal) return;\n refreshSignalRef.current = props.refreshSignal;\n refresh();\n }, [props.refreshSignal, refresh]);\n\n const resetFilters = useCallback(() => {\n if (!form || !props.filters) return;\n // Per-field `.set(undefined)` is necessary: `setInitialValues({})`\n // doesn't emit `form:change` for deleted keys, so inputs stay\n // visually populated and subscribers don't refetch. Explicit set\n // keeps everyone in sync.\n const keys = Object.keys(z.schema.shape(props.filters.schema));\n for (const key of keys) {\n const input = (form.input as Record<string, { set?: (v: any) => void }>)[\n key\n ];\n input?.set?.(undefined);\n }\n }, [form, props.filters]);\n\n // -- Form event subscriptions ---------------------------------------------\n\n // Refetch on explicit submit (manual Apply, programmatic submit, etc.).\n useEffect(() => {\n if (!form) return;\n return alepha.events.on(\"form:submit:success\", (event) => {\n if (event.id !== form.id) return;\n setPage(0);\n setRefreshKey((k) => k + 1);\n });\n }, [alepha, form]);\n\n // Refetch on change (debounced) when autoApplyFilters is on. Default\n // is on whenever AlephaTable owns the form (`filters` prop).\n const autoApply = props.autoApplyFilters ?? Boolean(props.filters);\n useEffect(() => {\n if (!form || !autoApply) return;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const unsub = alepha.events.on(\"form:change\", (event) => {\n if (event.id !== form.id) return;\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(() => {\n setPage(0);\n setRefreshKey((k) => k + 1);\n }, 250);\n });\n return () => {\n if (timeout) clearTimeout(timeout);\n unsub();\n };\n }, [alepha, form, autoApply]);\n\n // Persist filter values to localStorage on change.\n useEffect(() => {\n if (!props.persistenceKey || !form || !props.filters) return;\n const persist = () => {\n const clean: Record<string, any> = {};\n const values = form.currentValues ?? {};\n for (const [k, v] of Object.entries(values)) {\n if (v === undefined || v === null || v === \"\") continue;\n if (Array.isArray(v) && v.length === 0) continue;\n clean[k] = v;\n }\n writePersisted(props.persistenceKey!, \"filters\", clean);\n };\n const unsubs = [\n alepha.events.on(\"form:change\", (event) => {\n if (event.id !== form.id) return;\n persist();\n }),\n alepha.events.on(\"form:submit:success\", (event) => {\n if (event.id !== form.id) return;\n persist();\n }),\n ];\n return () => {\n for (const u of unsubs) u();\n };\n }, [alepha, form, props.filters, props.persistenceKey]);\n\n // -- Polling ---------------------------------------------------------------\n\n useEffect(() => {\n if (!props.pollMs) return;\n const id = setInterval(() => {\n if (document.visibilityState === \"visible\") setRefreshKey((k) => k + 1);\n }, props.pollMs);\n return () => clearInterval(id);\n }, [props.pollMs]);\n\n // -- Selection -------------------------------------------------------------\n\n const {\n selection,\n selectedItems,\n allSelected,\n someSelected,\n toggleRow,\n toggleAll,\n clearSelection,\n } = useTableSelection(data, rowKey);\n\n // -- Sort ------------------------------------------------------------------\n\n const toggleSort = (col: string, def: ColumnDef<T>) => {\n if (!def.sortable) return;\n const field = def.sortKey ?? col;\n setSort((s) => {\n const next: SortState | null =\n !s || s.field !== field\n ? { field, direction: \"asc\" }\n : s.direction === \"asc\"\n ? { field, direction: \"desc\" }\n : null;\n props.onSortChange?.(next);\n return next;\n });\n };\n\n // -- Column visibility -----------------------------------------------------\n\n const allColumnKeys = useMemo(\n () => Object.keys(props.columns),\n [props.columns],\n );\n\n const [visibleColumns, setVisibleColumns] = useState<Set<string>>(() => {\n if (props.persistenceKey) {\n const persisted = readPersisted<string[]>(\n props.persistenceKey,\n \"columns\",\n );\n if (persisted) {\n return new Set(persisted.filter((k) => k in props.columns));\n }\n }\n return new Set(\n allColumnKeys.filter((k) => !props.columns[k].defaultHidden),\n );\n });\n\n useEffect(() => {\n if (!props.persistenceKey) return;\n writePersisted(props.persistenceKey, \"columns\", [...visibleColumns]);\n }, [props.persistenceKey, visibleColumns]);\n\n const toggleColumn = (id: string) => {\n setVisibleColumns((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n };\n\n // -- Render ---------------------------------------------------------------\n\n const cols = Object.entries(props.columns) as Array<[string, ColumnDef<T>]>;\n const visibleCols = cols.filter(([key]) => visibleColumns.has(key));\n const hasCheckbox = Boolean(props.bulkActions?.length);\n const hasRowActions = Boolean(props.rowActions);\n\n const rowCtx: RowActionContext = useMemo(() => ({ refresh }), [refresh]);\n const bulkCtx: BulkActionContext = useMemo(\n () => ({ refresh, clearSelection }),\n [refresh, clearSelection],\n );\n\n const hasActiveFilters = useMemo(() => {\n if (!props.filters || !form) return false;\n const values = form.currentValues ?? {};\n for (const v of Object.values(values)) {\n if (v === undefined || v === null || v === \"\") continue;\n if (Array.isArray(v) && v.length === 0) continue;\n return true;\n }\n return false;\n }, [props.filters, form, refreshKey]);\n\n const showToolbar =\n Boolean(props.filters) ||\n Boolean(props.toolbar) ||\n Boolean(props.actions?.length) ||\n !props.hideColumnPicker ||\n !props.hideActionsMenu;\n const showColumnPicker = !props.hideColumnPicker && allColumnKeys.length > 0;\n const showActionsMenu = !props.hideActionsMenu;\n\n return (\n <ClientOnly>\n <div className={cn(\"flex flex-col gap-2\", props.className)}>\n {props.header && (\n <div className=\"flex items-center gap-2\">\n <div className=\"min-w-0 flex-1\">{props.header}</div>\n </div>\n )}\n\n {showToolbar && (\n // `bg-muted`, paired with the pagination footer below: the filter bar\n // and the footer are the table's chrome and bracket it top and\n // bottom, so they sit one step off the page while the table itself\n // (header included) stays on it. They were `bg-card` — pure white in\n // light, the same colour as the page, so neither had an edge.\n //\n // The controls need an explicit fill because of that. shadcn ships\n // inputs and select triggers `bg-transparent` in light and only fills\n // them in dark (`dark:bg-input/30`) — the light case assumes a white\n // page, where transparent already reads as a white field. On this bar\n // it does not: they would take the muted grey and the border alone\n // would have to say \"input\". Scoped here rather than to the\n // primitives, which `yarn w @alepha/ui sync` overwrites.\n //\n // `bg-background` suits both modes: white against the muted bar in\n // light, near-black in dark, so the control reads as a well sunk\n // into the chrome either way. The `dark:` copy is not redundant —\n // the primitives ship `dark:bg-input/30` at (0,2,0), a translucent\n // WHITE wash that leaves the field lighter than the bar. Only the\n // dark-scoped rule (0,3,0) outranks it, and without it the two\n // controls disagreed: the trigger went dark, the input stayed light.\n <div className=\"bg-muted [&_:is(input,[role=combobox])]:bg-background dark:[&_:is(input,[role=combobox])]:bg-background flex flex-wrap items-end gap-2 rounded-md rounded-b-none border p-2\">\n {props.filters && form ? (\n <form\n {...form.props}\n className=\"flex flex-1 flex-wrap items-end gap-2\"\n >\n {props.filters.render(form)}\n </form>\n ) : (\n <div className=\"flex flex-1\" />\n )}\n {/*\n `self-center`, against the bar's own `items-end`.\n\n The bar bottom-aligns because a filter Control may carry a label,\n and a row of labelled controls has to line up on the inputs rather\n than on the top of the tallest label. Everything to the right of\n the filters is a bare control with no label of its own, so\n inheriting that baseline pinned it to the bottom of whatever the\n filter area happened to measure — a \"New\" button sitting low\n against a labelled select, moving as soon as a filter gained or\n lost its label.\n\n Centring only the trailing content keeps the filter row's own\n alignment intact and makes the actions independent of it.\n */}\n {props.toolbar && (\n <div className=\"self-center\">{props.toolbar}</div>\n )}\n <TooltipProvider>\n <div className=\"flex items-center gap-1 self-center\">\n {props.actions?.length ? (\n <>\n {props.actions.map((action) => {\n const ActionIcon = action.icon;\n return (\n <Tooltip key={action.label}>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={action.label}\n disabled={action.disabled}\n onClick={action.onClick}\n />\n }\n >\n <ActionIcon className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{action.label}</TooltipContent>\n </Tooltip>\n );\n })}\n {(showColumnPicker || showActionsMenu) && (\n <span\n aria-hidden\n className=\"bg-border mx-1 h-5 w-px self-center\"\n />\n )}\n </>\n ) : null}\n {showColumnPicker && (\n <ColumnPicker<T>\n columns={props.columns}\n visible={visibleColumns}\n onToggle={toggleColumn}\n />\n )}\n {showActionsMenu && props.filters && (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={tr(\"alephaTable.resetFilters\", {\n default: \"Reset filters\",\n })}\n disabled={!hasActiveFilters}\n onClick={resetFilters}\n />\n }\n >\n <FunnelX className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"alephaTable.resetFilters\", {\n default: \"Reset filters\",\n })}\n </TooltipContent>\n </Tooltip>\n )}\n {showActionsMenu && (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={tr(\"alephaTable.refresh\", {\n default: \"Refresh\",\n })}\n disabled={isRefreshing}\n onClick={handleRefreshClick}\n />\n }\n >\n <RefreshCw\n className={cn(\"size-4\", isRefreshing && \"animate-spin\")}\n />\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"alephaTable.refresh\", { default: \"Refresh\" })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </TooltipProvider>\n </div>\n )}\n\n {hasCheckbox &&\n selection.size > 0 && (\n // Linear-style floating action pill: fixed at the bottom-center of\n // the viewport, dark surface that stays readable in both themes\n // because the colors are hard-coded (theme-relative `bg-foreground`\n // inverts awkwardly against a white container in dark mode).\n <div className=\"pointer-events-none fixed inset-x-0 bottom-6 z-40 flex justify-center\">\n <div className=\"animate-in fade-in-0 slide-in-from-bottom-2 pointer-events-auto flex items-center gap-2 rounded-full bg-zinc-900 px-3 py-1.5 text-zinc-100 shadow-lg ring-1 ring-white/10 duration-150\">\n <span className=\"pl-2 text-sm\">\n {tr(\"alephaTable.selected\", {\n default: `${selection.size} selected`,\n args: [String(selection.size)],\n })}\n </span>\n <span className=\"mx-1 h-4 w-px bg-white/20\" />\n {props.bulkActions?.map((action) => {\n const ActionIcon = action.icon;\n return (\n <Button\n key={action.label}\n size=\"sm\"\n className={\n action.destructive\n ? \"h-8 bg-red-600 text-white hover:bg-red-500\"\n : \"h-8 bg-transparent text-zinc-100 hover:bg-white/10 hover:text-zinc-100\"\n }\n onClick={() => action.onClick(selectedItems, bulkCtx)}\n >\n {ActionIcon && <ActionIcon className=\"size-4\" />}\n {action.label}\n </Button>\n );\n })}\n <span className=\"mx-1 h-4 w-px bg-white/20\" />\n <Button\n size=\"icon\"\n className=\"size-8 bg-transparent text-zinc-300 hover:bg-white/10 hover:text-zinc-100\"\n onClick={clearSelection}\n aria-label={tr(\"alephaTable.clearSelection\", {\n default: \"Clear selection\",\n })}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n </div>\n )}\n\n {/*\n The toolbar, the rows and the footer are one panel: each facing edge\n is flattened and its border dropped so no double line appears, and\n `-mt-2` cancels the wrapper's `gap-2`. The footer half is\n unconditional because the page row below already renders\n unconditionally — gating it on `meta` would pop the bar in and flip\n this bottom border on every load, since `meta` starts null and only\n fills after the fetch.\n */}\n <div\n className={cn(\n \"flex min-h-0 flex-1 flex-col overflow-auto rounded-md border\",\n showToolbar && \"-mt-2 rounded-t-none border-t-0\",\n \"rounded-b-none border-b-0\",\n )}\n >\n <Table>\n {/* `bg-muted`, fully opaque, NOT the base header's `bg-muted/50`:\n this header is sticky, so anything translucent lets the rows\n scroll visibly through the column labels. Same tint, no\n transparency. */}\n <TableHeader className=\"bg-muted sticky top-0 z-10 shadow-[inset_0_-1px_0_0_var(--border)]\">\n <TableRow>\n {hasCheckbox && (\n <TableHead className=\"w-10\">\n <Checkbox\n checked={allSelected}\n indeterminate={!allSelected && someSelected}\n onCheckedChange={() => toggleAll()}\n aria-label={tr(\"alephaTable.selectAll\", {\n default: \"Select all rows\",\n })}\n />\n </TableHead>\n )}\n {visibleCols.map(([key, def]) => {\n const sorted =\n def.sortable && sort?.field === (def.sortKey ?? key);\n return (\n <TableHead\n key={key}\n className={cn(\n def.className,\n def.align === \"right\" && \"text-right\",\n def.align === \"center\" && \"text-center\",\n )}\n aria-sort={\n sorted\n ? sort?.direction === \"asc\"\n ? \"ascending\"\n : \"descending\"\n : undefined\n }\n >\n {def.sortable ? (\n // A real button so keyboard and assistive-tech\n // users can sort — a th onClick is mouse-only.\n <button\n type=\"button\"\n onClick={() => toggleSort(key, def)}\n className=\"group/sort hover:text-foreground inline-flex cursor-pointer items-center gap-1 select-none\"\n >\n {def.label}\n {/* A sortable column says so at rest. The arrow\n used to appear only once a column WAS sorted,\n so an unsorted sortable header and a dead one\n were indistinguishable until you happened to\n hover one. The neutral glyph is dimmed so a row\n of them does not shout, and brightens under the\n cursor.\n\n Lucide, not the `↑` / `↓` characters this\n replaced: those render in the text font at text\n weight and sat visibly apart from every other\n icon in the table.\n\n `aria-hidden` throughout: `aria-sort` on the\n `th` already states this to assistive tech. */}\n {sorted ? (\n sort?.direction === \"asc\" ? (\n <ArrowUp className=\"size-3.5\" aria-hidden />\n ) : (\n <ArrowDown className=\"size-3.5\" aria-hidden />\n )\n ) : (\n <ChevronsUpDown\n className=\"size-3.5 opacity-40 transition-opacity group-hover/sort:opacity-100\"\n aria-hidden\n />\n )}\n </button>\n ) : (\n <span className=\"inline-flex items-center gap-1\">\n {def.label}\n </span>\n )}\n </TableHead>\n );\n })}\n {hasRowActions && <TableHead className=\"w-10\" />}\n </TableRow>\n </TableHeader>\n <TableBody>\n {loading && data.length === 0 ? (\n <SkeletonRows\n rows={5}\n cols={\n visibleCols.length +\n (hasCheckbox ? 1 : 0) +\n (hasRowActions ? 1 : 0)\n }\n />\n ) : data.length === 0 ? (\n <TableRow className=\"hover:bg-transparent\">\n <TableCell\n colSpan={\n visibleCols.length +\n (hasCheckbox ? 1 : 0) +\n (hasRowActions ? 1 : 0)\n }\n className=\"p-0\"\n >\n {props.empty ?? (\n <div className=\"text-muted-foreground flex flex-col items-center justify-center gap-2 py-12 text-center\">\n <Inbox className=\"size-8 opacity-40\" />\n <p className=\"text-sm\">\n {props.emptyMessage ??\n String(\n tr(\"alephaTable.empty\", {\n default: \"No results.\",\n }),\n )}\n </p>\n </div>\n )}\n </TableCell>\n </TableRow>\n ) : (\n data.map((item) => {\n const key = rowKey(item);\n const isSelected = selection.has(key);\n return (\n <TableRow\n key={key}\n onClick={() => props.onRowClick?.(item)}\n className={cn(\n props.onRowClick && \"cursor-pointer\",\n isSelected && \"bg-muted/30\",\n )}\n >\n {hasCheckbox && (\n <TableCell onClick={(e) => e.stopPropagation()}>\n <Checkbox\n checked={isSelected}\n onCheckedChange={() => toggleRow(item)}\n aria-label={tr(\"alephaTable.selectRow\", {\n default: \"Select row\",\n })}\n />\n </TableCell>\n )}\n {visibleCols.map(([key, def]) => (\n <TableCell\n key={key}\n className={cn(\n def.className,\n def.align === \"right\" && \"text-right\",\n def.align === \"center\" && \"text-center\",\n )}\n >\n {def.cell(item)}\n </TableCell>\n ))}\n {hasRowActions && (\n <TableCell\n className=\"text-right\"\n onClick={(e) => e.stopPropagation()}\n >\n <RowActionsMenu\n actions={props.rowActions!(item)}\n item={item}\n ctx={rowCtx}\n />\n </TableCell>\n )}\n </TableRow>\n );\n })\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* `bg-muted`, paired with the filter bar above — see the note there. */}\n <div className=\"bg-muted -mt-2 flex flex-wrap items-center justify-between gap-2 rounded-md rounded-t-none border p-2\">\n {/* The size picker sits with the count, not in the toolbar above:\n this line already answers \"how many, where am I\", while the\n toolbar answers \"which rows\". Mixing the two turns the toolbar\n into a junk drawer. */}\n <div className=\"flex items-center gap-2\">\n {pageSizes.length > 0 && (\n // The same Select the filter bar's controls are built on, not\n // a bare `<select>`: a native control renders in the OS widget\n // set and sat visibly apart from every other trigger in this\n // table. `Control` itself is form-bound, so the picker uses the\n // component underneath it.\n <Select\n value={String(size)}\n onValueChange={(value) => changeSize(Number(value))}\n >\n <SelectTrigger\n // `bg-background`, because this bar is `bg-muted` and the\n // trigger is `bg-transparent` by default: on a plain form\n // surface that blending is right, on a tinted bar it made\n // the picker read as part of the bar while the pagination\n // buttons beside it sat on their own plane. Overridden here\n // rather than in `SelectTrigger`, which every form still\n // wants transparent.\n className=\"bg-background h-7 w-auto gap-1 text-xs\"\n aria-label={String(\n tr(\"table.pageSize\", { default: \"Rows per page\" }),\n )}\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {pageSizes.map((n) => (\n <SelectItem key={n} value={String(n)}>\n {n}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n <p className=\"text-muted-foreground text-xs\">\n {meta\n ? `Page ${meta.number + 1}${meta.totalPages ? ` of ${meta.totalPages}` : \"\"} · ${meta.numberOfElements} of ${meta.totalElements ?? \"?\"}`\n : \"—\"}\n </p>\n </div>\n {meta && meta.totalPages && meta.totalPages > 1 ? (\n <Pagination className=\"mx-0 w-auto justify-end\">\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (!meta.isFirst) setPage((p) => Math.max(0, p - 1));\n }}\n aria-disabled={meta.isFirst}\n className={cn(\n meta.isFirst && \"pointer-events-none opacity-50\",\n )}\n />\n </PaginationItem>\n {computePageItems(meta.number + 1, meta.totalPages).map(\n (item, idx) =>\n item === \"ellipsis\" ? (\n <PaginationItem key={`e-${idx}`}>\n <PaginationEllipsis />\n </PaginationItem>\n ) : (\n <PaginationItem key={item}>\n <PaginationLink\n href=\"#\"\n isActive={item === meta.number + 1}\n onClick={(e) => {\n e.preventDefault();\n setPage(item - 1);\n }}\n >\n {item}\n </PaginationLink>\n </PaginationItem>\n ),\n )}\n <PaginationItem>\n <PaginationNext\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (!meta.isLast) setPage((p) => p + 1);\n }}\n aria-disabled={meta.isLast}\n className={cn(\n meta.isLast && \"pointer-events-none opacity-50\",\n )}\n />\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n ) : null}\n </div>\n </div>\n </ClientOnly>\n );\n}\n\nfunction ColumnPicker<T>(props: {\n columns: Record<string, ColumnDef<T>>;\n visible: Set<string>;\n onToggle: (key: string) => void;\n}) {\n const { tr } = useI18n();\n const entries = Object.entries(props.columns);\n const label = tr(\"alephaTable.toggleColumns\", {\n default: \"Toggle columns\",\n });\n return (\n <DropdownMenu>\n {/*\n * The trigger is composed rather than plain: it has to be the dropdown\n * trigger AND the tooltip trigger at once, or this button is the only\n * icon-only control in the toolbar with no tooltip (reset-filters and\n * refresh sit right next to it and both have one).\n *\n * `TooltipTrigger` wraps the rendered element rather than the other way\n * round, matching how `sidebar.tsx` composes the same two primitives.\n * `TooltipProvider` is supplied by the toolbar that renders this.\n */}\n <Tooltip>\n <DropdownMenuTrigger\n render={\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={label}\n />\n }\n />\n }\n >\n <Columns3 className=\"size-4\" />\n </DropdownMenuTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuGroup>\n <DropdownMenuLabel>\n {tr(\"alephaTable.columns\", { default: \"Columns\" })}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n {entries.map(([key, def]) => (\n <DropdownMenuCheckboxItem\n key={key}\n checked={props.visible.has(key)}\n closeOnClick={false}\n onCheckedChange={() => props.onToggle(key)}\n >\n {def.label}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/**\n * Build the visible page-number sequence with ellipses. Always shows\n * first + last, ±1 around current. Gaps collapse into a single ellipsis.\n * `current` and `total` are 1-indexed.\n */\nfunction computePageItems(\n current: number,\n total: number,\n): Array<number | \"ellipsis\"> {\n if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);\n const items: Array<number | \"ellipsis\"> = [1];\n if (current > 3) items.push(\"ellipsis\");\n const start = Math.max(2, current - 1);\n const end = Math.min(total - 1, current + 1);\n for (let i = start; i <= end; i++) items.push(i);\n if (current < total - 2) items.push(\"ellipsis\");\n items.push(total);\n return items;\n}\n\nconst SkeletonRows = (props: { rows: number; cols: number }) => {\n return (\n <>\n {Array.from({ length: props.rows }).map((_, i) => (\n <TableRow key={i}>\n {Array.from({ length: props.cols }).map((_, j) => (\n <TableCell key={j}>\n <Skeleton className=\"h-4 w-full\" />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </>\n );\n};\n\nfunction RowActionsMenu<T>(props: {\n actions: RowAction<T>[];\n item: T;\n ctx: RowActionContext;\n}) {\n const { tr } = useI18n();\n if (props.actions.length === 0) return null;\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={tr(\"alephaTable.openRowActions\", {\n default: \"Open row actions\",\n })}\n />\n }\n >\n <MoreVertical className=\"size-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {props.actions.map((action, idx) => {\n const Icon = action.icon;\n const disabled = action.disabled?.(props.item);\n const sep =\n idx > 0 &&\n action.destructive &&\n !props.actions[idx - 1].destructive;\n return (\n <span key={action.label}>\n {sep && <DropdownMenuSeparator />}\n <DropdownMenuItem\n disabled={disabled}\n onClick={() => action.onClick(props.item, props.ctx)}\n className={action.destructive ? \"text-destructive\" : undefined}\n >\n {Icon && <Icon className=\"mr-2 size-4\" />}\n {action.label}\n </DropdownMenuItem>\n </span>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsYA,MAAM,iBAAiB,SAIrB,OAAQ,MAA2B,MAAM,KAAK,OAAO,CAAC;AAExD,MAAM,uBAAuB,EAAE,OAAO,CAAC,CAAC;;;;AAKxC,MAAM,iBAAqB,KAAa,WAAkC;CACxE,IAAI,OAAO,WAAW,aAAa,OAAO,KAAA;CAC1C,IAAI;EACF,MAAM,MAAM,OAAO,aAAa,QAAQ,GAAG,IAAI,GAAG,QAAQ;EAC1D,OAAO,OAAO,OAAO,KAAA,IAAa,KAAK,MAAM,GAAG;CAClD,QAAQ;EACN;CACF;AACF;;;;AAKA,MAAM,kBAAkB,K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;AAEN;AAEA,SAAS,eAAkB,OAIxB;CACD,MAAM,EAAE,OAAO,QAAQ;CACvB,IAAI,MAAM,QAAQ,WAAW,GAAG,OAAO;CACvC,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,qBAAD;EACE,QACE,oBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,cAAY,GAAG,8BAA8B,EAC3C,SAAS,mBACX,CAAC;EACF,CAAA;EAGH,UAAA,oBAAC,cAAD,EAAc,WAAU,SAAU,CAAA;CACf,CAAA,GACrB,oBAAC,qBAAD;EAAqB,OAAM;EACxB,UAAA,MAAM,QAAQ,KAAK,QAAQ,QAAQ;GAClC,MAAM,OAAO,OAAO;GACpB,MAAM,WAAW,OAAO,WAAW,MAAM,IAAI;GAK7C,OACE,qBAAC,QAAD,EAAA,UAAA,CAJA,MAAM,KACN,OAAO,eACP,CAAC,MAAM,QAAQ,MAAM,EAAE,CAAC,eAGd,oBAAC,uBAAD,CAAwB,CAAA,GAChC,qBAAC,kBAAD;IACY;IACV,eAAe,OAAO,QAAQ,MAAM,MAAM,MAAM,GAAG;IACnD,WAAW,OAAO,cAAc,qBAAqB,KAAA;IAHvD,UAAA,CAKG,QAAQ,oBAAC,MAAD,EAAM,WAAU,cAAe,CAAA,GACvC,OAAO,KACQ;GACd,CAAA,CAAA,EAAA,GAVK,OAAO,KAUZ;EAEV,CAAC;CACkB,CAAA,CACT,EAAA,CAAA;AAElB"}
1
+ {"version":3,"file":"alepha-table.js","names":["Table"],"sources":["../../../src/components/alepha-table/alepha-table.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Control } from \"@alepha/ui/components/control/control\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Checkbox } from \"@alepha/ui/components/ui/checkbox\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@alepha/ui/components/ui/dropdown-menu\";\nimport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n} from \"@alepha/ui/components/ui/pagination\";\nimport { Skeleton } from \"@alepha/ui/components/ui/skeleton\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@alepha/ui/components/ui/table\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@alepha/ui/components/ui/tooltip\";\nimport { cn } from \"@alepha/ui/lib/utils\";\nimport { type Page, type ZObject, z } from \"alepha\";\nimport { ClientOnly, useAlepha } from \"alepha/react\";\nimport { type FormModel, useForm } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n ArrowDown,\n ArrowUp,\n ChevronsUpDown,\n Columns3,\n FunnelX,\n Inbox,\n MoreVertical,\n RefreshCw,\n X,\n} from \"lucide-react\";\nimport {\n type ComponentType,\n type ReactNode,\n type SVGProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { AlephaTableBulkMenu } from \"./alepha-table-bulk-menu.tsx\";\nimport { paginateLocal } from \"./paginate-local.ts\";\nimport { useTableSelection } from \"./use-table-selection.ts\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface ColumnDef<T> {\n label: string;\n cell: (item: T) => ReactNode;\n sortable?: boolean;\n /**\n * Sort key sent to the API. Defaults to the column key.\n */\n sortKey?: string;\n /**\n * Static-data mode only: the value this column sorts on, for a column\n * whose sort key is not a plain property of the row (a derived total, a\n * joined label). Defaults to `item[sortKey]`.\n *\n * Ignored when the table fetches: there the server owns the ordering.\n */\n sortValue?: (item: T) => unknown;\n /**\n * When true, the column starts hidden. The user can still toggle it\n * on via the built-in column picker. Pass `hideColumnPicker` on the\n * table to forbid toggling entirely.\n */\n defaultHidden?: boolean;\n className?: string;\n align?: \"left\" | \"right\" | \"center\";\n}\n\n/**\n * Context passed to every row-action `onClick`. `refresh()` re-fires the\n * current fetch with the current filters/sort — call it after a mutation\n * so the table reflects the new state without a manual reload.\n *\n * ⚠️ In static-data mode there is no fetch to re-fire, so `refresh()` only\n * returns to page 0: the rows belong to the caller, and a mutation has to\n * be written back into the array passed as `data`. The table renders the\n * new array on the same render, without it.\n */\nexport interface RowActionContext {\n refresh: () => void;\n}\n\nexport interface RowAction<T> {\n label: string;\n icon?: IconType;\n onClick: (item: T, ctx: RowActionContext) => void | Promise<void>;\n destructive?: boolean;\n disabled?: (item: T) => boolean;\n}\n\n/**\n * Context passed to every bulk-action `onClick`. `clearSelection()`\n * empties the checkbox set; `refresh()` re-fires the current fetch.\n */\nexport interface BulkActionContext {\n refresh: () => void;\n clearSelection: () => void;\n}\n\n/**\n * A bulk action that is a button: one click, one handler over the selection.\n */\nexport interface BulkAction<T> {\n label: string;\n icon?: IconType;\n onClick: (selected: T[], ctx: BulkActionContext) => void | Promise<void>;\n destructive?: boolean;\n /**\n * Whether the action is offered for this selection. Absent means always.\n *\n * Hide, not disable: a disabled button in a three-item pill is a question\n * (\"why can't I?\"), a missing one is an answer. An action that applies to\n * some of the rows and not others should stay visible and act on the rows\n * it fits, which is what its `onClick` receives the whole selection for.\n */\n visible?: (selected: T[]) => boolean;\n}\n\n/**\n * A bulk action that is a MENU: the trigger opens a list of choices, each of\n * them a {@link BulkAction} in its own right, and picking one runs its\n * `onClick` over the selection. For \"add to release\", \"move to column\",\n * \"assign to\": one button cannot carry N targets, and the targets are not\n * known when the table renders.\n *\n * `items` produces the choices, synchronously or not. It is called on open\n * intent (pointer enter, focus, or the menu opening, so keyboard and touch\n * are covered) and its result is kept for the life of the selection: a new\n * selection asks again. Both the pending and the failed state are shown\n * inside the menu, and an empty result renders a disabled \"nothing to pick\"\n * row rather than an empty popup.\n *\n * A union with {@link BulkAction} rather than an optional `items` on it, so\n * a button cannot also be a menu and a menu cannot also be clicked: the two\n * are told apart by `items` being present.\n *\n * ```tsx\n * const addToRelease: BulkMenuAction<Quest> = {\n * label: \"Add to release\",\n * icon: Flag,\n * // The closure carries the target, so no item type needs a payload.\n * items: () =>\n * releases\n * .filter((release) => !release.releasedAt)\n * .map((release) => ({\n * label: release.tag,\n * onClick: async (quests, ctx) => {\n * await Promise.all(\n * quests.map((quest) => attach(quest.id, release.id)),\n * );\n * ctx.refresh();\n * ctx.clearSelection();\n * },\n * })),\n * };\n *\n * <AlephaTable<Quest> bulkActions={[shelve, addToRelease]} />\n * ```\n */\nexport interface BulkMenuAction<T> {\n label: string;\n icon?: IconType;\n /**\n * Same contract as {@link BulkAction.visible}.\n */\n visible?: (selected: T[]) => boolean;\n /**\n * The choices, produced when the menu is about to open. An async producer\n * shows a loading row until it settles; a rejection shows a failure row and\n * the next open tries again.\n */\n items: () => BulkAction<T>[] | Promise<BulkAction<T>[]>;\n}\n\n/**\n * A standalone toolbar action, rendered in the right-hand icon group next to\n * the column picker and separated from the filter area by a divider. Use for\n * table-scoped actions (e.g. \"Upload\", \"New\") that aren't tied to a row or a\n * selection.\n *\n * Two forms, chosen per action:\n *\n * - **secondary** (the default): a ghost icon button with the label as its\n * tooltip, matching the built-in column-picker / refresh controls.\n * - **primary** (`primary: true`): a solid `default` button carrying the icon\n * AND the visible label. For the page's one main action, typically its\n * create control: a bare `+` at the same weight as two utility toggles\n * disappears, and the create button is what a reader looks for first.\n * No tooltip, since the label is already on screen. Below the `sm`\n * breakpoint the label collapses to the icon and the button keeps its\n * primary colour, so it still reads as the action.\n */\nexport interface TableAction {\n icon: IconType;\n label: string;\n onClick: () => void;\n disabled?: boolean;\n /**\n * Render as the table's primary action: a solid labelled button rather\n * than a ghost icon. One per table is the intent; a toolbar with two\n * primary buttons has no primary action.\n */\n primary?: boolean;\n}\n\n/**\n * High-level filter slot. AlephaTable creates the `useForm` internally,\n * wraps `render`'s output in a `<form>` element, persists values under\n * `persistenceKey` when set, and refetches on submit (and on every\n * change, debounced, by default).\n *\n * The render function receives the typed form so callers wire inputs\n * with `form.input.<field>` exactly like a hand-rolled `useForm`.\n */\nexport interface AlephaTableFilters {\n schema: ZObject;\n initialValues?: Record<string, any>;\n /**\n * Filter values that outrank the persisted ones on mount.\n *\n * `initialValues` is what the table starts from when the reader has never\n * chosen anything; a persisted choice wins over it, which is the right\n * default for a preference. This is the opposite case: values the caller\n * derived from *how the reader got here* — typically a URL param on a\n * drill-through link — where landing on last week's stored filter instead\n * would ignore the link that was just clicked.\n *\n * Read once, at mount, exactly like `initialValues`. Change the\n * component's `key` to re-seed on a later arrival.\n *\n * **Transient, and by construction.** Persistence is written from\n * `form:change` / `form:submit:success` only, never on mount — so a seed\n * shows in the toolbar and narrows the fetch without overwriting the\n * filter the reader chose for themselves last time. Touch any control and\n * the resulting values (seed included) become the stored choice, which is\n * the right moment for it: that is the reader choosing.\n */\n seedValues?: Record<string, any>;\n render: (form: FormModel<ZObject>) => ReactNode;\n}\n\ninterface SortState {\n field: string;\n direction: \"asc\" | \"desc\";\n}\n\nexport type TableFetcher<T> = (params: {\n page: number;\n size: number;\n sort?: string;\n filters?: Record<string, any>;\n}) => Promise<Page<T>>;\n\n/**\n * Where the rows come from. Exactly one of the two.\n *\n * `data` is not sugar over `fetch`: a fetcher closing over an in-memory\n * array cannot work, because the table holds `fetch` in a ref that is\n * deliberately excluded from its load effect (see `fetchRef`), so the\n * closure goes stale the moment the caller's array changes. Static rows\n * therefore bypass the fetch path entirely and are derived synchronously.\n */\nexport type AlephaTableSource<T> =\n | {\n /**\n * Fetcher invoked with paging + sort + filters. Should return an\n * Alepha `Page<T>`.\n */\n fetch: TableFetcher<T>;\n data?: never;\n filter?: never;\n }\n | {\n /**\n * Rows the caller already holds. The table filters, sorts and pages\n * them in memory and never issues a request.\n *\n * Use it when the array is the page's data rather than the table's —\n * shared with a chart, a count, an aside — so that one array stays\n * the single source of truth. For anything the reader can outgrow,\n * pass `fetch` and let the server page it.\n */\n data: T[];\n /**\n * Static-data mode only: predicate replacing the built-in field\n * matching, which pairs each filter value with the same-named\n * property (strings as a case-insensitive substring, arrays by\n * membership, everything else strictly).\n *\n * Reach for it as soon as a filter is not a field: a `search` box\n * spanning several columns, a range, a joined label. Only ever\n * called with filter values that are actually set.\n */\n filter?: (item: T, filters: Record<string, any>) => boolean;\n fetch?: never;\n };\n\nexport type AlephaTableProps<T> = AlephaTableBaseProps<T> &\n AlephaTableSource<T>;\n\n/**\n * ⚠️ **A page-level action goes INSIDE the table, not above it.**\n *\n * AlephaTable owns a toolbar, and that toolbar is the page's action bar. A\n * \"New\" button, a picker, an import, an export all belong in it. Putting one\n * in a `CardHeader` above the table produces two stacked bars saying one\n * thing - which is exactly what the epic page's Quests tab looked like until\n * feedback #2006, a hand-rolled header holding a title and an \"Attach Quest\"\n * button, sitting directly on top of a toolbar holding the column picker and\n * refresh.\n *\n * The rule is written here rather than only on the props because this is\n * where a reader - human or agent - looks first, and the drift comes from\n * not knowing the slot exists rather than from choosing against it.\n *\n * Three slots, and which one is a question about the control, not the action:\n *\n * - `actions` - a button that does something on click. Rendered in the\n * right-hand icon group beside the column picker: a ghost icon with a\n * tooltip from its own `label`, or, with `primary: true`, a solid button\n * showing the label. The page's create action is the `primary` one.\n * - `toolbar` - anything else: a labelled button, a popover trigger, a\n * segmented control, a group of them. Rendered to the right of the filter\n * inputs and vertically centred, so it does not have to match their height.\n * - `bulkActions` - operates on the checkbox selection, and only appears\n * while something is selected. A button, or a menu of them resolved on\n * demand (`BulkMenuAction`, for \"add to release\" and its kind).\n *\n * ```tsx\n * <AlephaTable<Quest>\n * data={quests}\n * columns={columns}\n * // A popover trigger: `toolbar`, because it is not an icon button.\n * toolbar={<QuestPicker onAttach={attach} />}\n * // Buttons that act on click: `actions`. The create control is `primary`.\n * actions={[\n * { icon: Plus, label: \"New quest\", primary: true, onClick: create },\n * { icon: Download, label: \"Export\", onClick: exportAll },\n * ]}\n * />\n * ```\n *\n * The exception is a control that LEAVES the page - a back link, a tab bar,\n * breadcrumbs. Those are navigation, not actions on this table, and belong\n * where the page's other navigation is.\n */\n\nexport interface AlephaTableBaseProps<T> {\n /**\n * Column definitions, keyed by the property name they read from.\n */\n columns: Record<string, ColumnDef<T>>;\n /**\n * Per-row action menu builder. Return an array of `RowAction` per\n * item. Each `onClick` receives `(item, { refresh })`.\n */\n rowActions?: (item: T) => RowAction<T>[];\n /**\n * Actions applied to selected rows (enables checkbox column). A\n * {@link BulkAction} is a button whose `onClick` receives\n * `(items, { refresh, clearSelection })`; a {@link BulkMenuAction} is a\n * button that opens a menu of such actions, produced on demand.\n */\n bulkActions?: Array<BulkAction<T> | BulkMenuAction<T>>;\n /**\n * Page size the table opens on. The reader can change it from the footer;\n * with `persistenceKey` set, their choice is remembered and wins over this.\n */\n defaultSize?: number;\n /**\n * Sizes offered in the footer picker. Defaults to {@link PAGE_SIZES}.\n *\n * Pass `[]` to hide the picker entirely, for a table whose page size is\n * not the reader's business.\n */\n pageSizes?: number[];\n /**\n * Stable row identifier. Defaults to `item.id`.\n *\n * Rows with neither fall back to their position in the current page, which\n * is stable across renders but NOT across sorting or paging - the same row\n * sorted into a different slot becomes a different row as far as React and\n * the selection are concerned. Pass this whenever rows can be selected or\n * hold an inline input and the data has no `id`.\n */\n rowKey?: (item: T) => string;\n /**\n * Click handler invoked when a row is clicked (excluding action\n * buttons).\n */\n onRowClick?: (item: T) => void;\n /**\n * Auto-refresh interval in ms (only when document is visible).\n *\n * Meaningless in static-data mode — there is no request to repeat, and a\n * changed `data` array is already on screen the render it changes.\n */\n pollMs?: number;\n /**\n * External refetch trigger. Bump this value (e.g. from a `useState`\n * counter) after a mutation performed *outside* the table — such as a\n * toolbar upload action — to make the table reload. Row/bulk actions\n * already get `ctx.refresh()`; this is the escape hatch for everything\n * else. Changing it resets to page 0 and refetches; the initial value\n * is ignored (the table fetches on mount regardless).\n *\n * Not needed in static-data mode: a new `data` array is picked up on its\n * own. Bumping this there only resets to page 0.\n */\n refreshSignal?: number | string;\n /**\n * High-level filter form. AlephaTable owns the `useForm`, renders the\n * inputs inside a `<form>` in the toolbar, and refetches on\n * submit/change.\n *\n * Mutually exclusive with `form` (legacy: caller-owned form). When\n * both are passed, `filters` wins.\n */\n filters?: AlephaTableFilters;\n /**\n * When set, filter values, column visibility, and sort state are\n * persisted to `localStorage` under this key. Pick a key that's\n * unique per page and per scope (e.g. `\"admin.users\"`,\n * `\\`lor.board.${campaignId}\\``).\n */\n persistenceKey?: string;\n /**\n * Hide the built-in column visibility dropdown in the toolbar.\n */\n hideColumnPicker?: boolean;\n /**\n * Hide the built-in actions menu (Refresh, Reset filters).\n */\n hideActionsMenu?: boolean;\n /**\n * Extra slot rendered to the right of the filter inputs in the\n * toolbar — typically a \"New\" / \"Create\" button, or any page-level action\n * that is not a bare icon button (see the note on `AlephaTableProps`: it\n * belongs here rather than in a header above the table).\n *\n * Vertically centred in the bar (`self-center`) regardless of its own\n * height, so it no longer has to match the filter inputs. It used to inherit\n * the bar's `items-end`, which meant anything shorter than h-9 hung off the\n * bottom edge and a labelled filter dragged the button down with it.\n */\n toolbar?: ReactNode;\n /**\n * Standalone actions rendered in the toolbar's right-hand icon group,\n * before the column picker and separated from the filter area by a\n * divider. The table renders the button itself, so callers only supply\n * the icon/label/handler: a ghost icon with a tooltip by default, or a\n * solid labelled button when the action is marked `primary`.\n */\n actions?: TableAction[];\n /**\n * Extra classes applied to the outer wrapper.\n */\n className?: string;\n /**\n * Message shown when the page is empty. Defaults to \"No results\".\n */\n emptyMessage?: string;\n /**\n * Rich empty-state node rendered when the page is empty — e.g. an icon +\n * message + optional call-to-action. Overrides `emptyMessage` when set.\n */\n empty?: ReactNode;\n /**\n * Free-form content rendered above the toolbar (e.g. a page title).\n */\n header?: ReactNode;\n /**\n * Initial sort state. When `persistenceKey` is set, a persisted sort\n * takes precedence over this.\n */\n defaultSort?: SortState | null;\n /**\n * Called whenever the user toggles a column header. Receives the new\n * sort state (`null` when sort is cleared). Use this if you need a\n * persistence layer beyond `persistenceKey` (e.g. URL state).\n */\n onSortChange?: (sort: SortState | null) => void;\n /**\n * Legacy: caller-owned filter form. Prefer `filters` (which has\n * AlephaTable own the form). When `filters` is set, this prop is\n * ignored.\n */\n form?: FormModel<ZObject>;\n /**\n * When true (default when `filters` is set), the table refetches on\n * every `form:change` event, debounced by 250ms. Set to `false` to\n * require an explicit submit.\n */\n autoApplyFilters?: boolean;\n}\n\nconst EMPTY_FILTERS_SCHEMA = z.object({}) as ZObject;\n\n/**\n * Synchronous localStorage read. Returns undefined on miss or error.\n */\nconst readPersisted = <V,>(key: string, suffix: string): V | undefined => {\n if (typeof window === \"undefined\") return undefined;\n try {\n const raw = window.localStorage.getItem(`${key}.${suffix}`);\n return raw == null ? undefined : (JSON.parse(raw) as V);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Reshape persisted filter values that no longer match the schema.\n *\n * Filters are stored in localStorage per `persistenceKey`, so a filter whose\n * shape changes meets values written by the previous shape - on the machine\n * of anyone who has used the page, and only there, which is precisely the\n * class of bug no test environment contains. The first case was the Quests\n * table going from one value per filter to many (quest #1644): a stored\n * `area: \"lore/feedback\"` reaching an array field.\n *\n * A scalar where the schema now wants an array is WRAPPED, not dropped: the\n * reader's filter survives the change, which is what makes the migration\n * invisible. The reverse takes the first element, since there is no honest\n * way to keep the rest. Anything else is left alone - this reconciles a\n * container, not a value, and the form's own validation still has the last\n * word.\n */\nconst reconcilePersistedFilters = (\n schema: ZObject | undefined,\n values: Record<string, any> | undefined,\n): Record<string, any> | undefined => {\n if (!schema || !values) return values;\n const shape = z.schema.shape(schema);\n const out: Record<string, any> = {};\n for (const [key, value] of Object.entries(values)) {\n const field = shape[key];\n if (!field) {\n // A filter that no longer exists. Dropped rather than passed through,\n // so a removed field cannot reappear in the fetch payload.\n continue;\n }\n const wantsArray = z.schema.isArray(z.schema.unwrap(field));\n const isArray = Array.isArray(value);\n if (wantsArray && !isArray) {\n out[key] = value === undefined || value === \"\" ? [] : [value];\n } else if (!wantsArray && isArray) {\n out[key] = value[0];\n } else {\n out[key] = value;\n }\n }\n return out;\n};\n\n/**\n * Synchronous localStorage write. Empty objects/null delete the key.\n */\nconst writePersisted = (key: string, suffix: string, value: unknown): void => {\n if (typeof window === \"undefined\") return;\n const fullKey = `${key}.${suffix}`;\n try {\n const isEmptyObject =\n value !== null &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n Object.keys(value as object).length === 0;\n const isEmptyArray = Array.isArray(value) && value.length === 0;\n if (\n value === undefined ||\n value === null ||\n isEmptyObject ||\n isEmptyArray\n ) {\n window.localStorage.removeItem(fullKey);\n return;\n }\n window.localStorage.setItem(fullKey, JSON.stringify(value));\n } catch {\n // localStorage may be unavailable (private mode, quota). Skip.\n }\n};\n\n/**\n * Page sizes the footer offers.\n *\n * No \"all\". Pagination here is server-side, so an unbounded fetch is a query\n * whose cost grows with the biggest table in the product and is paid by the\n * reader who can least afford it. 100 covers \"let me scan the lot\" without\n * that.\n */\nexport const PAGE_SIZES = [10, 20, 50, 100];\n\nexport function AlephaTable<T>(props: AlephaTableProps<T>) {\n // State, not a constant. It was `props.defaultSize ?? 20` read once, so a\n // reader had no way to see more rows than the call site had decided for\n // them. Already in `load`'s dependency array, so changing it refetches.\n const [size, setSize] = useState<number>(\n () =>\n (props.persistenceKey\n ? readPersisted<number>(props.persistenceKey, \"size\")\n : undefined) ??\n props.defaultSize ??\n 20,\n );\n const pageSizes = props.pageSizes ?? PAGE_SIZES;\n const alepha = useAlepha();\n const { tr } = useI18n();\n\n // -- Filter form (internal when `filters` is set, else legacy `form`) -----\n\n // Read persisted filter values synchronously so they reach useForm's\n // first invocation. Reading inside an effect would be too late —\n // useForm captures `initialValues` only once via useMemo.\n const persistedFilterValues = useMemo(() => {\n if (!props.persistenceKey || !props.filters) return undefined;\n return reconcilePersistedFilters(\n props.filters.schema,\n readPersisted<Record<string, any>>(props.persistenceKey, \"filters\"),\n );\n }, [props.persistenceKey, props.filters]);\n\n const mergedFilterInitialValues = useMemo<Record<string, any>>(\n () => ({\n ...props.filters?.initialValues,\n ...persistedFilterValues,\n // Last, so it beats the stored choice — see `seedValues`. A drill-through\n // link that lost to a filter the reader set last week would be a link\n // that does nothing.\n ...props.filters?.seedValues,\n }),\n [],\n );\n\n // Always call useForm to keep hook order stable. When the caller\n // doesn't pass `filters`, the internal form has an empty schema and\n // is simply unused.\n const internalForm = useForm({\n schema: props.filters?.schema ?? EMPTY_FILTERS_SCHEMA,\n initialValues: mergedFilterInitialValues,\n handler: async () => {\n // No-op — the table subscribes to `form:submit:success` to refetch.\n },\n });\n\n const form = props.filters ? internalForm : props.form;\n\n // -- Paging / sort / data --------------------------------------------------\n\n const [page, setPage] = useState(0);\n\n /**\n * Change the page size and go back to the first page.\n *\n * The reset is the whole point: raising the size while on page 5 can put\n * the reader past the last page, which renders an empty table with no\n * visible cause. Persisted so the choice survives a reload, alongside the\n * filters, sort and columns this table already remembers.\n */\n const changeSize = (next: number) => {\n setSize(next);\n setPage(0);\n if (props.persistenceKey) {\n writePersisted(props.persistenceKey, \"size\", next);\n }\n };\n\n /**\n * The footer's page-size picker, as a form of one field.\n *\n * `Control` is form-bound and this picker is not part of any form, which is\n * why the footer stayed on a raw `<Select>` long after everything else here\n * moved. One field is the whole cost of joining, and it buys the picker the\n * same trigger, popup and keyboard handling as every other select in the\n * table. `keepDirty: false` so the re-seed below actually re-seeds: `size`\n * can move without the picker (a persisted value on mount), and a kept\n * \"edit\" would pin the trigger to a page size the table is not using.\n */\n const sizeForm = useForm({\n schema: z.object({ size: z.number() }),\n initialValues: { size },\n keepDirty: false,\n handler: async () => {},\n onChange: (_key, next) => changeSize(next as number),\n });\n\n const [sort, setSort] = useState<SortState | null>(() => {\n if (props.persistenceKey) {\n const persisted = readPersisted<SortState>(props.persistenceKey, \"sort\");\n if (persisted) return persisted;\n }\n return props.defaultSort ?? null;\n });\n const [fetchedData, setData] = useState<T[]>([]);\n const [fetchedMeta, setMeta] = useState<Page<T>[\"page\"] | null>(null);\n const [loading, setLoading] = useState(false);\n const [refreshKey, setRefreshKey] = useState(0);\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n // Alepha's pagination parser reads \"field\" as asc and \"-field\" as desc.\n // Multiple comma-separated entries are multi-column sort, so we must\n // NOT use `field,direction` syntax — that would treat \"asc\"/\"desc\" as\n // a second column name and 500 on the backend.\n const sortParam = sort\n ? sort.direction === \"desc\"\n ? `-${sort.field}`\n : sort.field\n : undefined;\n\n // Hold the latest `fetch` in a ref so it is NOT a dependency of `load`.\n // Callers pass `fetch` inline (a new function every render), and a fetcher\n // that writes a store atom the caller also subscribes to would otherwise\n // self-trigger: load → atom write → caller re-render → new `fetch` → new\n // `load` → effect re-runs → infinite loop. The ref keeps the newest closure\n // available while `load` only re-runs on actual inputs (page/size/sort/…).\n const fetchRef = useRef(props.fetch);\n fetchRef.current = props.fetch;\n\n const load = useCallback(async () => {\n // Static mode owns no request. Bail before touching `loading` too, so a\n // table fed an array never flashes the skeleton over rows it already has.\n const fetcher = fetchRef.current;\n if (!fetcher) return;\n setLoading(true);\n try {\n const res = await fetcher({\n page,\n size,\n sort: sortParam,\n filters: form?.currentValues,\n });\n setData(res.content);\n setMeta(res.page);\n } catch (error) {\n // Surface read failures through the same `react:action:error` channel\n // that useAction/useQuery use, so a mounted <ActionErrorToaster /> toasts\n // them. Keep the previous rows on screen rather than blanking the table.\n void alepha.events.emit(\"react:action:error\", {\n type: \"custom\",\n id: \"alepha-table:load\",\n error: error as Error,\n });\n } finally {\n setLoading(false);\n }\n }, [page, size, sortParam, refreshKey, form, alepha]);\n\n useEffect(() => {\n void load();\n }, [load]);\n\n /**\n * Static mode's equivalent of `load` — derived, not stored.\n *\n * Deliberately NOT routed through `load`: putting `props.data` in that\n * effect's dependencies reproduces the exact loop `fetchRef` exists to\n * prevent (load → setData → re-render → new inline array → new load).\n * Computed synchronously there is no state to go stale, an inline\n * `data={rows.filter(…)}` is safe, and a changed array is on screen in\n * the same render.\n */\n const staticPage = useMemo(() => {\n if (!props.data) return null;\n const sortValues: Record<string, (item: T) => unknown> = {};\n for (const [key, column] of Object.entries(props.columns)) {\n if (column.sortValue) {\n sortValues[column.sortKey ?? key] = column.sortValue;\n }\n }\n return paginateLocal(props.data, {\n page,\n size,\n sort: sortParam,\n sortValues,\n filters: form?.currentValues,\n filter: props.filter,\n });\n // `refreshKey` is what the filter-form subscriptions bump, so it is how\n // a filter change reaches this memo — `form.currentValues` is mutated in\n // place and its identity never changes.\n }, [\n props.data,\n props.columns,\n props.filter,\n page,\n size,\n sortParam,\n refreshKey,\n form,\n ]);\n\n const data = staticPage ? staticPage.content : fetchedData;\n const meta = staticPage ? staticPage.page : fetchedMeta;\n\n /**\n * Rows vanish under the reader in static mode: the caller detaches one and\n * the page they are on stops existing. Nothing fetches, so nothing else\n * would notice — the table would sit on an empty page with no visible\n * cause. Fetch mode has the same hole, but there the server round-trip\n * needed to see it makes this the wrong place to close it.\n */\n if (staticPage) {\n const totalPages = staticPage.page.totalPages ?? 0;\n if (page > 0 && page > totalPages - 1) {\n // Guarded on `page`, so it settles in one pass and does not need an\n // effect: the clamp lands before the rows render against a page that no\n // longer exists.\n setPage(Math.max(0, totalPages - 1));\n }\n }\n\n // Persist sort to localStorage on every change.\n useEffect(() => {\n if (!props.persistenceKey) return;\n writePersisted(props.persistenceKey, \"sort\", sort);\n }, [props.persistenceKey, sort]);\n\n // -- Refresh + reset wiring -----------------------------------------------\n\n const refresh = useCallback(() => {\n setPage(0);\n setRefreshKey((k) => k + 1);\n }, []);\n\n const handleRefreshClick = useCallback(() => {\n setIsRefreshing(true);\n refresh();\n setTimeout(() => setIsRefreshing(false), 1000);\n }, [refresh]);\n\n // React to the external `refreshSignal` prop. The first render seeds the\n // ref without refetching (the mount effect already loads); every later\n // change triggers a refresh. Kept separate from `load`'s deps so an inline\n // `fetch` closure can't self-trigger a loop (see `fetchRef` above).\n const refreshSignalRef = useRef(props.refreshSignal);\n useEffect(() => {\n if (refreshSignalRef.current === props.refreshSignal) return;\n refreshSignalRef.current = props.refreshSignal;\n refresh();\n }, [props.refreshSignal, refresh]);\n\n const resetFilters = useCallback(() => {\n if (!form || !props.filters) return;\n // Per-field `.set(undefined)` is necessary: `setInitialValues({})`\n // doesn't emit `form:change` for deleted keys, so inputs stay\n // visually populated and subscribers don't refetch. Explicit set\n // keeps everyone in sync.\n const keys = Object.keys(z.schema.shape(props.filters.schema));\n for (const key of keys) {\n const input = (form.input as Record<string, { set?: (v: any) => void }>)[\n key\n ];\n input?.set?.(undefined);\n }\n }, [form, props.filters]);\n\n // -- Form event subscriptions ---------------------------------------------\n\n // Refetch on explicit submit (manual Apply, programmatic submit, etc.).\n useEffect(() => {\n if (!form) return;\n return alepha.events.on(\"form:submit:success\", (event) => {\n if (event.id !== form.id) return;\n setPage(0);\n setRefreshKey((k) => k + 1);\n });\n }, [alepha, form]);\n\n // Refetch on change (debounced) when autoApplyFilters is on. Default\n // is on whenever AlephaTable owns the form (`filters` prop).\n const autoApply = props.autoApplyFilters ?? Boolean(props.filters);\n useEffect(() => {\n if (!form || !autoApply) return;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const unsub = alepha.events.on(\"form:change\", (event) => {\n if (event.id !== form.id) return;\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(() => {\n setPage(0);\n setRefreshKey((k) => k + 1);\n }, 250);\n });\n return () => {\n if (timeout) clearTimeout(timeout);\n unsub();\n };\n }, [alepha, form, autoApply]);\n\n // Persist filter values to localStorage on change.\n useEffect(() => {\n if (!props.persistenceKey || !form || !props.filters) return;\n const persist = () => {\n const clean: Record<string, any> = {};\n const values = form.currentValues ?? {};\n for (const [k, v] of Object.entries(values)) {\n if (v === undefined || v === null || v === \"\") continue;\n if (Array.isArray(v) && v.length === 0) continue;\n clean[k] = v;\n }\n writePersisted(props.persistenceKey!, \"filters\", clean);\n };\n const unsubs = [\n alepha.events.on(\"form:change\", (event) => {\n if (event.id !== form.id) return;\n persist();\n }),\n alepha.events.on(\"form:submit:success\", (event) => {\n if (event.id !== form.id) return;\n persist();\n }),\n ];\n return () => {\n for (const u of unsubs) u();\n };\n }, [alepha, form, props.filters, props.persistenceKey]);\n\n // -- Polling ---------------------------------------------------------------\n\n useEffect(() => {\n if (!props.pollMs) return;\n const id = setInterval(() => {\n if (document.visibilityState === \"visible\") setRefreshKey((k) => k + 1);\n }, props.pollMs);\n return () => clearInterval(id);\n }, [props.pollMs]);\n\n // -- Row identity ----------------------------------------------------------\n\n /**\n * A row's key, in order of preference: the caller's `rowKey`, the row's own\n * `id`, then where the row sits.\n *\n * The last one used to be `Math.random()`, which is not an identity at all.\n * Every render produced a new key, so React saw every id-less row as a new\n * row and remounted it: focus in an inline input was lost the moment\n * anything else re-rendered, and the list re-animated on every keystroke.\n * Selection was broken by the same thing - `selection.has(rowKey(item))`\n * compared against a key generated one render earlier, so it never matched.\n */\n const rowKeys = useMemo(\n () =>\n data.map((item, index) => {\n if (props.rowKey) return props.rowKey(item);\n const id = (item as { id?: unknown })?.id;\n // Coercion at a boundary: the value is a form/route/chart primitive\n // whose declared type is wider than what can reach here.\n // oxlint-disable-next-line typescript/no-base-to-string\n return id != null ? String(id) : `page-${page}-row-${index}`;\n }),\n [data, page, props.rowKey],\n );\n\n /**\n * Selection asks for a key by item, not by index. Every item it can ask\n * about is one of `data`'s, so a lookup keyed on identity covers it without\n * an O(n) scan per call.\n */\n const rowKeyByItem = useMemo(() => {\n const map = new Map<T, string>();\n data.forEach((item, index) => map.set(item, rowKeys[index]));\n return map;\n }, [data, rowKeys]);\n\n const rowKey = useCallback(\n (item: T): string => rowKeyByItem.get(item) ?? \"\",\n [rowKeyByItem],\n );\n\n // -- Selection -------------------------------------------------------------\n\n const {\n selection,\n selectedItems,\n allSelected,\n someSelected,\n toggleRow,\n toggleAll,\n clearSelection,\n } = useTableSelection(data, rowKey);\n\n // The bulk actions offered for THIS selection: an action's `visible`\n // predicate reads the selected rows. Computed once, here, so the pill's\n // contents and the pill's own presence come from the same list.\n const visibleBulkActions = useMemo(\n () =>\n (props.bulkActions ?? []).filter(\n (action) => action.visible?.(selectedItems) ?? true,\n ),\n [props.bulkActions, selectedItems],\n );\n\n // -- Sort ------------------------------------------------------------------\n\n const toggleSort = (col: string, def: ColumnDef<T>) => {\n if (!def.sortable) return;\n const field = def.sortKey ?? col;\n setSort((s) => {\n const next: SortState | null =\n !s || s.field !== field\n ? { field, direction: \"asc\" }\n : s.direction === \"asc\"\n ? { field, direction: \"desc\" }\n : null;\n props.onSortChange?.(next);\n return next;\n });\n };\n\n // -- Column visibility -----------------------------------------------------\n\n const allColumnKeys = useMemo(\n () => Object.keys(props.columns),\n [props.columns],\n );\n\n const [visibleColumns, setVisibleColumns] = useState<Set<string>>(() => {\n if (props.persistenceKey) {\n const persisted = readPersisted<string[]>(\n props.persistenceKey,\n \"columns\",\n );\n if (persisted) {\n return new Set(persisted.filter((k) => k in props.columns));\n }\n }\n return new Set(\n allColumnKeys.filter((k) => !props.columns[k].defaultHidden),\n );\n });\n\n useEffect(() => {\n if (!props.persistenceKey) return;\n writePersisted(props.persistenceKey, \"columns\", [...visibleColumns]);\n }, [props.persistenceKey, visibleColumns]);\n\n const toggleColumn = (id: string) => {\n setVisibleColumns((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n };\n\n // -- Render ---------------------------------------------------------------\n\n const cols = Object.entries(props.columns) as Array<[string, ColumnDef<T>]>;\n const visibleCols = cols.filter(([key]) => visibleColumns.has(key));\n const hasCheckbox = Boolean(props.bulkActions?.length);\n const hasRowActions = Boolean(props.rowActions);\n\n const rowCtx: RowActionContext = useMemo(() => ({ refresh }), [refresh]);\n const bulkCtx: BulkActionContext = useMemo(\n () => ({ refresh, clearSelection }),\n [refresh, clearSelection],\n );\n\n const hasActiveFilters = useMemo(() => {\n if (!props.filters || !form) return false;\n const values = form.currentValues ?? {};\n for (const v of Object.values(values)) {\n if (v === undefined || v === null || v === \"\") continue;\n if (Array.isArray(v) && v.length === 0) continue;\n return true;\n }\n return false;\n }, [props.filters, form, refreshKey]);\n\n const showToolbar =\n Boolean(props.filters) ||\n Boolean(props.toolbar) ||\n Boolean(props.actions?.length) ||\n !props.hideColumnPicker ||\n !props.hideActionsMenu;\n const showColumnPicker = !props.hideColumnPicker && allColumnKeys.length > 0;\n const showActionsMenu = !props.hideActionsMenu;\n\n return (\n <ClientOnly>\n <div className={cn(\"flex flex-col gap-2\", props.className)}>\n {props.header && (\n <div className=\"flex items-center gap-2\">\n <div className=\"min-w-0 flex-1\">{props.header}</div>\n </div>\n )}\n\n {showToolbar && (\n // `bg-muted`, paired with the pagination footer below: the filter bar\n // and the footer are the table's chrome and bracket it top and\n // bottom, so they sit one step off the page while the table itself\n // (header included) stays on it. They were `bg-card` — pure white in\n // light, the same colour as the page, so neither had an edge.\n //\n // The controls need an explicit fill because of that. shadcn ships\n // inputs and select triggers `bg-transparent` in light and only fills\n // them in dark (`dark:bg-input/30`) — the light case assumes a white\n // page, where transparent already reads as a white field. On this bar\n // it does not: they would take the muted grey and the border alone\n // would have to say \"input\". Scoped here rather than to the\n // primitives, which `yarn w @alepha/ui sync` overwrites.\n //\n // `bg-background` suits both modes: white against the muted bar in\n // light, near-black in dark, so the control reads as a well sunk\n // into the chrome either way. The `dark:` copy is not redundant —\n // the primitives ship `dark:bg-input/30` at (0,2,0), a translucent\n // WHITE wash that leaves the field lighter than the bar. Only the\n // dark-scoped rule (0,3,0) outranks it, and without it the two\n // controls disagreed: the trigger went dark, the input stayed light.\n <div className=\"bg-muted [&_:is(input,[role=combobox])]:bg-background dark:[&_:is(input,[role=combobox])]:bg-background flex flex-wrap items-end gap-2 rounded-md rounded-b-none border p-2\">\n {props.filters && form ? (\n <form\n {...form.props}\n className=\"flex flex-1 flex-wrap items-end gap-2\"\n >\n {props.filters.render(form)}\n </form>\n ) : (\n <div className=\"flex flex-1\" />\n )}\n {/*\n `self-center`, against the bar's own `items-end`.\n\n The bar bottom-aligns because a filter Control may carry a label,\n and a row of labelled controls has to line up on the inputs rather\n than on the top of the tallest label. Everything to the right of\n the filters is a bare control with no label of its own, so\n inheriting that baseline pinned it to the bottom of whatever the\n filter area happened to measure — a \"New\" button sitting low\n against a labelled select, moving as soon as a filter gained or\n lost its label.\n\n Centring only the trailing content keeps the filter row's own\n alignment intact and makes the actions independent of it.\n */}\n {props.toolbar && (\n <div className=\"self-center\">{props.toolbar}</div>\n )}\n <TooltipProvider>\n <div className=\"flex items-center gap-1 self-center\">\n {props.actions?.length ? (\n <>\n {props.actions.map((action) => {\n const ActionIcon = action.icon;\n if (action.primary) {\n // The visible label is the tooltip, so there is\n // none. `aria-label` keeps the accessible name once\n // the label collapses below `sm`; `h-9` lines the\n // button up with the ghost icons beside it.\n return (\n <Button\n key={action.label}\n type=\"button\"\n size=\"sm\"\n className=\"h-9 px-3\"\n aria-label={action.label}\n disabled={action.disabled}\n onClick={action.onClick}\n >\n <ActionIcon className=\"size-4\" />\n <span className=\"hidden sm:inline\">\n {action.label}\n </span>\n </Button>\n );\n }\n return (\n <Tooltip key={action.label}>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={action.label}\n disabled={action.disabled}\n onClick={action.onClick}\n />\n }\n >\n <ActionIcon className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>{action.label}</TooltipContent>\n </Tooltip>\n );\n })}\n {(showColumnPicker || showActionsMenu) && (\n <span\n aria-hidden\n className=\"bg-border mx-1 h-5 w-px self-center\"\n />\n )}\n </>\n ) : null}\n {showColumnPicker && (\n <ColumnPicker<T>\n columns={props.columns}\n visible={visibleColumns}\n onToggle={toggleColumn}\n />\n )}\n {showActionsMenu && props.filters && (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={tr(\"alephaTable.resetFilters\", {\n default: \"Reset filters\",\n })}\n disabled={!hasActiveFilters}\n onClick={resetFilters}\n />\n }\n >\n <FunnelX className=\"size-4\" />\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"alephaTable.resetFilters\", {\n default: \"Reset filters\",\n })}\n </TooltipContent>\n </Tooltip>\n )}\n {showActionsMenu && (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={tr(\"alephaTable.refresh\", {\n default: \"Refresh\",\n })}\n disabled={isRefreshing}\n onClick={handleRefreshClick}\n />\n }\n >\n <RefreshCw\n className={cn(\"size-4\", isRefreshing && \"animate-spin\")}\n />\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"alephaTable.refresh\", { default: \"Refresh\" })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </TooltipProvider>\n </div>\n )}\n\n {hasCheckbox &&\n selection.size > 0 &&\n visibleBulkActions.length > 0 && (\n // Linear-style floating action pill: fixed at the bottom-center of\n // the viewport, dark surface that stays readable in both themes\n // because the colors are hard-coded (theme-relative `bg-foreground`\n // inverts awkwardly against a white container in dark mode).\n <div className=\"pointer-events-none fixed inset-x-0 bottom-6 z-40 flex justify-center\">\n <div className=\"animate-in fade-in-0 slide-in-from-bottom-2 pointer-events-auto flex items-center gap-2 rounded-full bg-zinc-900 px-3 py-1.5 text-zinc-100 shadow-lg ring-1 ring-white/10 duration-150\">\n <span className=\"pl-2 text-sm\">\n {tr(\"alephaTable.selected\", {\n default: `${selection.size} selected`,\n args: [String(selection.size)],\n })}\n </span>\n <span className=\"mx-1 h-4 w-px bg-white/20\" />\n {visibleBulkActions.map((action) => {\n if (\"items\" in action) {\n return (\n <AlephaTableBulkMenu<T>\n key={action.label}\n action={action}\n selected={selectedItems}\n ctx={bulkCtx}\n />\n );\n }\n const ActionIcon = action.icon;\n return (\n <Button\n key={action.label}\n size=\"sm\"\n className={\n action.destructive\n ? \"h-8 bg-red-600 text-white hover:bg-red-500\"\n : \"h-8 bg-transparent text-zinc-100 hover:bg-white/10 hover:text-zinc-100\"\n }\n onClick={() => action.onClick(selectedItems, bulkCtx)}\n >\n {ActionIcon && <ActionIcon className=\"size-4\" />}\n {action.label}\n </Button>\n );\n })}\n <span className=\"mx-1 h-4 w-px bg-white/20\" />\n <Button\n size=\"icon\"\n className=\"size-8 bg-transparent text-zinc-300 hover:bg-white/10 hover:text-zinc-100\"\n onClick={clearSelection}\n aria-label={tr(\"alephaTable.clearSelection\", {\n default: \"Clear selection\",\n })}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n </div>\n )}\n\n {/*\n The toolbar, the rows and the footer are one panel: each facing edge\n is flattened and its border dropped so no double line appears, and\n `-mt-2` cancels the wrapper's `gap-2`. The footer half is\n unconditional because the page row below already renders\n unconditionally — gating it on `meta` would pop the bar in and flip\n this bottom border on every load, since `meta` starts null and only\n fills after the fetch.\n */}\n <div\n className={cn(\n \"flex min-h-0 flex-1 flex-col overflow-auto rounded-md border\",\n showToolbar && \"-mt-2 rounded-t-none border-t-0\",\n \"rounded-b-none border-b-0\",\n )}\n >\n <Table>\n {/* `bg-muted`, fully opaque, NOT the base header's `bg-muted/50`:\n this header is sticky, so anything translucent lets the rows\n scroll visibly through the column labels. Same tint, no\n transparency. */}\n <TableHeader className=\"bg-muted sticky top-0 z-10 shadow-[inset_0_-1px_0_0_var(--border)]\">\n <TableRow>\n {hasCheckbox && (\n <TableHead className=\"w-10\">\n <Checkbox\n checked={allSelected}\n indeterminate={!allSelected && someSelected}\n onCheckedChange={() => toggleAll()}\n aria-label={tr(\"alephaTable.selectAll\", {\n default: \"Select all rows\",\n })}\n />\n </TableHead>\n )}\n {visibleCols.map(([key, def]) => {\n const sorted =\n def.sortable && sort?.field === (def.sortKey ?? key);\n return (\n <TableHead\n key={key}\n className={cn(\n def.className,\n def.align === \"right\" && \"text-right\",\n def.align === \"center\" && \"text-center\",\n )}\n aria-sort={\n sorted\n ? sort?.direction === \"asc\"\n ? \"ascending\"\n : \"descending\"\n : undefined\n }\n >\n {def.sortable ? (\n // A real button so keyboard and assistive-tech\n // users can sort — a th onClick is mouse-only.\n <button\n type=\"button\"\n onClick={() => toggleSort(key, def)}\n className=\"group/sort hover:text-foreground inline-flex cursor-pointer items-center gap-1 select-none\"\n >\n {def.label}\n {/* A sortable column says so at rest. The arrow\n used to appear only once a column WAS sorted,\n so an unsorted sortable header and a dead one\n were indistinguishable until you happened to\n hover one. The neutral glyph is dimmed so a row\n of them does not shout, and brightens under the\n cursor.\n\n Lucide, not the `↑` / `↓` characters this\n replaced: those render in the text font at text\n weight and sat visibly apart from every other\n icon in the table.\n\n `aria-hidden` throughout: `aria-sort` on the\n `th` already states this to assistive tech. */}\n {sorted ? (\n sort?.direction === \"asc\" ? (\n <ArrowUp className=\"size-3.5\" aria-hidden />\n ) : (\n <ArrowDown className=\"size-3.5\" aria-hidden />\n )\n ) : (\n <ChevronsUpDown\n className=\"size-3.5 opacity-40 transition-opacity group-hover/sort:opacity-100\"\n aria-hidden\n />\n )}\n </button>\n ) : (\n <span className=\"inline-flex items-center gap-1\">\n {def.label}\n </span>\n )}\n </TableHead>\n );\n })}\n {hasRowActions && <TableHead className=\"w-10\" />}\n </TableRow>\n </TableHeader>\n <TableBody>\n {loading && data.length === 0 ? (\n <SkeletonRows\n rows={5}\n cols={\n visibleCols.length +\n (hasCheckbox ? 1 : 0) +\n (hasRowActions ? 1 : 0)\n }\n />\n ) : data.length === 0 ? (\n <TableRow className=\"hover:bg-transparent\">\n <TableCell\n colSpan={\n visibleCols.length +\n (hasCheckbox ? 1 : 0) +\n (hasRowActions ? 1 : 0)\n }\n className=\"p-0\"\n >\n {props.empty ?? (\n <div className=\"text-muted-foreground flex flex-col items-center justify-center gap-2 py-12 text-center\">\n <Inbox className=\"size-8 opacity-40\" />\n <p className=\"text-sm\">\n {props.emptyMessage ??\n String(\n tr(\"alephaTable.empty\", {\n default: \"No results.\",\n }),\n )}\n </p>\n </div>\n )}\n </TableCell>\n </TableRow>\n ) : (\n data.map((item, rowIndex) => {\n const key = rowKeys[rowIndex];\n const isSelected = selection.has(key);\n return (\n <TableRow\n key={key}\n onClick={() => props.onRowClick?.(item)}\n className={cn(\n props.onRowClick && \"cursor-pointer\",\n isSelected && \"bg-muted/30\",\n )}\n >\n {hasCheckbox && (\n <TableCell onClick={(e) => e.stopPropagation()}>\n <Checkbox\n checked={isSelected}\n onCheckedChange={() => toggleRow(item)}\n aria-label={tr(\"alephaTable.selectRow\", {\n default: \"Select row\",\n })}\n />\n </TableCell>\n )}\n {visibleCols.map(([key, def]) => (\n <TableCell\n key={key}\n className={cn(\n def.className,\n def.align === \"right\" && \"text-right\",\n def.align === \"center\" && \"text-center\",\n )}\n >\n {def.cell(item)}\n </TableCell>\n ))}\n {hasRowActions && (\n <TableCell\n className=\"text-right\"\n onClick={(e) => e.stopPropagation()}\n >\n <RowActionsMenu\n actions={props.rowActions!(item)}\n item={item}\n ctx={rowCtx}\n />\n </TableCell>\n )}\n </TableRow>\n );\n })\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* `bg-muted`, paired with the filter bar above — see the note there. */}\n <div className=\"bg-muted -mt-2 flex flex-wrap items-center justify-between gap-2 rounded-md rounded-t-none border p-2\">\n {/* The size picker sits with the count, not in the toolbar above:\n this line already answers \"how many, where am I\", while the\n toolbar answers \"which rows\". Mixing the two turns the toolbar\n into a junk drawer. */}\n <div className=\"flex items-center gap-2\">\n {pageSizes.length > 0 && (\n // The same `Control` the filter bar is built on, so the picker\n // is one component with every other select in this table. It\n // used to be the raw `Select` underneath it, because `Control`\n // is form-bound and this is not a form — `sizeForm` above is\n // what closes that gap.\n <Control\n input={sizeForm.input.size}\n // The count line beside it is not a label, so the trigger has\n // to name itself.\n label=\"\"\n inputProps={{\n \"aria-label\": String(\n tr(\"table.pageSize\", { default: \"Rows per page\" }),\n ),\n }}\n // `bg-background`, because this bar is `bg-muted` and the\n // trigger is `bg-transparent` by default: on a plain form\n // surface that blending is right, on a tinted bar it made the\n // picker read as part of the bar while the pagination buttons\n // beside it sat on their own plane. Set here rather than on\n // the trigger itself, which every form still wants\n // transparent.\n triggerClassName=\"bg-background h-7 w-auto gap-1 text-xs\"\n items={pageSizes.map((n) => ({\n value: String(n),\n label: String(n),\n }))}\n />\n )}\n <p className=\"text-muted-foreground text-xs\">\n {meta\n ? `Page ${meta.number + 1}${meta.totalPages ? ` of ${meta.totalPages}` : \"\"} · ${meta.numberOfElements} of ${meta.totalElements ?? \"?\"}`\n : \"—\"}\n </p>\n </div>\n {meta && meta.totalPages && meta.totalPages > 1 ? (\n <Pagination className=\"mx-0 w-auto justify-end\">\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (!meta.isFirst) setPage((p) => Math.max(0, p - 1));\n }}\n aria-disabled={meta.isFirst}\n className={cn(\n meta.isFirst && \"pointer-events-none opacity-50\",\n )}\n />\n </PaginationItem>\n {computePageItems(meta.number + 1, meta.totalPages).map(\n (item, idx) =>\n item === \"ellipsis\" ? (\n <PaginationItem key={`e-${idx}`}>\n <PaginationEllipsis />\n </PaginationItem>\n ) : (\n <PaginationItem key={item}>\n <PaginationLink\n href=\"#\"\n isActive={item === meta.number + 1}\n onClick={(e) => {\n e.preventDefault();\n setPage(item - 1);\n }}\n >\n {item}\n </PaginationLink>\n </PaginationItem>\n ),\n )}\n <PaginationItem>\n <PaginationNext\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (!meta.isLast) setPage((p) => p + 1);\n }}\n aria-disabled={meta.isLast}\n className={cn(\n meta.isLast && \"pointer-events-none opacity-50\",\n )}\n />\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n ) : null}\n </div>\n </div>\n </ClientOnly>\n );\n}\n\nfunction ColumnPicker<T>(props: {\n columns: Record<string, ColumnDef<T>>;\n visible: Set<string>;\n onToggle: (key: string) => void;\n}) {\n const { tr } = useI18n();\n const entries = Object.entries(props.columns);\n const label = tr(\"alephaTable.toggleColumns\", {\n default: \"Toggle columns\",\n });\n return (\n <DropdownMenu>\n {/*\n * The trigger is composed rather than plain: it has to be the dropdown\n * trigger AND the tooltip trigger at once, or this button is the only\n * icon-only control in the toolbar with no tooltip (reset-filters and\n * refresh sit right next to it and both have one).\n *\n * `TooltipTrigger` wraps the rendered element rather than the other way\n * round, matching how `sidebar.tsx` composes the same two primitives.\n * `TooltipProvider` is supplied by the toolbar that renders this.\n */}\n <Tooltip>\n <DropdownMenuTrigger\n render={\n <TooltipTrigger\n render={\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-9 w-9 p-0\"\n aria-label={label}\n />\n }\n />\n }\n >\n <Columns3 className=\"size-4\" />\n </DropdownMenuTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuGroup>\n <DropdownMenuLabel>\n {tr(\"alephaTable.columns\", { default: \"Columns\" })}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n {entries.map(([key, def]) => (\n <DropdownMenuCheckboxItem\n key={key}\n checked={props.visible.has(key)}\n closeOnClick={false}\n onCheckedChange={() => props.onToggle(key)}\n >\n {def.label}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/**\n * Build the visible page-number sequence with ellipses. Always shows\n * first + last, ±1 around current. Gaps collapse into a single ellipsis.\n * `current` and `total` are 1-indexed.\n */\nfunction computePageItems(\n current: number,\n total: number,\n): Array<number | \"ellipsis\"> {\n if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);\n const items: Array<number | \"ellipsis\"> = [1];\n if (current > 3) items.push(\"ellipsis\");\n const start = Math.max(2, current - 1);\n const end = Math.min(total - 1, current + 1);\n for (let i = start; i <= end; i++) items.push(i);\n if (current < total - 2) items.push(\"ellipsis\");\n items.push(total);\n return items;\n}\n\nconst SkeletonRows = (props: { rows: number; cols: number }) => {\n return (\n <>\n {Array.from({ length: props.rows }).map((_, i) => (\n <TableRow key={i}>\n {Array.from({ length: props.cols }).map((_, j) => (\n <TableCell key={j}>\n <Skeleton className=\"h-4 w-full\" />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </>\n );\n};\n\nfunction RowActionsMenu<T>(props: {\n actions: RowAction<T>[];\n item: T;\n ctx: RowActionContext;\n}) {\n const { tr } = useI18n();\n if (props.actions.length === 0) return null;\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={tr(\"alephaTable.openRowActions\", {\n default: \"Open row actions\",\n })}\n />\n }\n >\n <MoreVertical className=\"size-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {props.actions.map((action, idx) => {\n const Icon = action.icon;\n const disabled = action.disabled?.(props.item);\n const sep =\n idx > 0 &&\n action.destructive &&\n !props.actions[idx - 1].destructive;\n return (\n <span key={action.label}>\n {sep && <DropdownMenuSeparator />}\n <DropdownMenuItem\n disabled={disabled}\n onClick={() => action.onClick(props.item, props.ctx)}\n variant={action.destructive ? \"destructive\" : undefined}\n >\n {Icon && <Icon className=\"mr-2 size-4\" />}\n {action.label}\n </DropdownMenuItem>\n </span>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAghBA,MAAM,uBAAuB,EAAE,OAAO,CAAC,CAAC;;;;AAKxC,MAAM,iBAAqB,KAAa,WAAkC;CACxE,IAAI,OAAO,WAAW,aAAa,OAAO,KAAA;CAC1C,IAAI;EACF,MAAM,MAAM,OAAO,aAAa,QAAQ,GAAG,IAAI,GAAG,QAAQ;EAC1D,OAAO,OAAO,OAAO,KAAA,IAAa,KAAK,MAAM,GAAG;CAClD,QAAQ;EACN;CACF;AACF;;;;;;;;;;;;;;;;;;AAmBA,MAAM,6BACJ,QACA,WACoC;CACpC,IAAI,CAAC,UAAU,CAAC,QAAQ,OAAO;CAC/B,MAAM,QAAQ,EAAE,OAAO,MA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1
  import * as React from "react";
2
2
  import { type ActionErrorToasterProps } from "@alepha/ui/components/action-error-toaster/action-error-toaster";
3
+ import { type NavigationProgressOptions } from "@alepha/ui/components/app-shell/navigation-progress";
3
4
  import type { ComponentType, ReactNode, SVGProps } from "react";
4
- export interface NavigationProgressOptions {
5
- /**
6
- * Tailwind classes applied to the bar. Defaults to `bg-primary`.
7
- */
8
- className?: string;
9
- /**
10
- * Bar height in pixels. Defaults to 2.
11
- */
12
- height?: number;
13
- }
5
+ /**
6
+ * Re-exported: the bar moved to its own module so it can be mounted at an
7
+ * application root, but the option type is part of {@link AppShellProps}
8
+ * and was importable from here first.
9
+ */
10
+ export type { NavigationProgressOptions };
11
+ /**
12
+ * Closes the mobile nav sheet when a link inside it is followed.
13
+ *
14
+ * On a phone the sidebar is a `Sheet` driven by `openMobile`. Tapping a nav
15
+ * entry navigated and left the sheet up, so the destination page rendered
16
+ * behind an overlay the reader had to dismiss by hand (feedback #2077, at
17
+ * 491x929).
18
+ *
19
+ * ⚠️ One handler on the container, not a callback on each nav item. The links
20
+ * inside that sheet are `SidebarNavItem`'s leaf, `NavDropdownItems`, the group
21
+ * children, the brand slot's project switcher and every app's own sidebar
22
+ * footer - a per-item `onClick` covers whichever of those someone remembers
23
+ * today and silently misses the next one added. A capture listener on the
24
+ * container covers them all, including the ones no `@alepha/ui` file knows
25
+ * about, because it asks what the DOM event actually landed on.
26
+ *
27
+ * It reacts to ANCHORS only. The switcher, the disclosure toggles and the
28
+ * dropdown triggers in there are buttons that open something inside the sheet,
29
+ * and closing it under them would break the control rather than fix it.
30
+ */
31
+ export declare const SidebarNavAutoClose: (props: {
32
+ children: ReactNode;
33
+ }) => string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
14
34
  type IconType = ComponentType<SVGProps<SVGSVGElement>>;
15
35
  export interface NavItem {
16
36
  label: ReactNode;
@@ -140,5 +160,4 @@ export interface AppShellProps {
140
160
  * Built on shadcn `<Sidebar>` + `<Breadcrumb>`.
141
161
  */
142
162
  export declare const AppShell: (props: AppShellProps) => React.JSX.Element;
143
- export {};
144
163
  //# sourceMappingURL=app-shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,iEAAiE,CAAC;AA+DzE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAqFD,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAwQD,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAA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