@alepha/ui 0.26.0 → 0.27.1

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 (923) hide show
  1. package/README.md +127 -12
  2. package/dist/components/account/account-connections.d.ts.map +1 -1
  3. package/dist/components/account/account-connections.js +29 -18
  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 +16 -12
  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 +6 -2
  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 +42 -28
  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 +7 -4
  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 +18 -13
  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 +33 -33
  26. package/dist/components/account/account-profile.js.map +1 -1
  27. package/dist/components/account/account-router-options.d.ts.map +1 -1
  28. package/dist/components/account/account-router-options.js.map +1 -1
  29. package/dist/components/account/account-router-page.d.ts.map +1 -1
  30. package/dist/components/account/account-router-page.js.map +1 -1
  31. package/dist/components/account/account-router.d.ts +79 -4
  32. package/dist/components/account/account-router.d.ts.map +1 -1
  33. package/dist/components/account/account-router.js +48 -7
  34. package/dist/components/account/account-router.js.map +1 -1
  35. package/dist/components/account/account-security.d.ts +11 -1
  36. package/dist/components/account/account-security.d.ts.map +1 -1
  37. package/dist/components/account/account-security.js +124 -37
  38. package/dist/components/account/account-security.js.map +1 -1
  39. package/dist/components/account/account-sessions.d.ts.map +1 -1
  40. package/dist/components/account/account-sessions.js +63 -28
  41. package/dist/components/account/account-sessions.js.map +1 -1
  42. package/dist/components/admin/admin-analytics-query-panel.d.ts +1 -1
  43. package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -1
  44. package/dist/components/admin/admin-analytics-query-panel.js +5 -5
  45. package/dist/components/admin/admin-analytics-query-panel.js.map +1 -1
  46. package/dist/components/admin/admin-analytics-results.d.ts +1 -1
  47. package/dist/components/admin/admin-analytics-results.d.ts.map +1 -1
  48. package/dist/components/admin/admin-analytics-results.js +2 -2
  49. package/dist/components/admin/admin-analytics-results.js.map +1 -1
  50. package/dist/components/admin/admin-analytics.d.ts +1 -1
  51. package/dist/components/admin/admin-analytics.d.ts.map +1 -1
  52. package/dist/components/admin/admin-analytics.js +3 -3
  53. package/dist/components/admin/admin-analytics.js.map +1 -1
  54. package/dist/components/admin/admin-audits.d.ts +1 -1
  55. package/dist/components/admin/admin-audits.d.ts.map +1 -1
  56. package/dist/components/admin/admin-audits.js +4 -4
  57. package/dist/components/admin/admin-audits.js.map +1 -1
  58. package/dist/components/admin/admin-dashboard-card.d.ts +42 -0
  59. package/dist/components/admin/admin-dashboard-card.d.ts.map +1 -0
  60. package/dist/components/admin/admin-dashboard-card.js +0 -0
  61. package/dist/components/admin/admin-dashboard-count-card.d.ts +34 -0
  62. package/dist/components/admin/admin-dashboard-count-card.d.ts.map +1 -0
  63. package/dist/components/admin/admin-dashboard-count-card.js +42 -0
  64. package/dist/components/admin/admin-dashboard-count-card.js.map +1 -0
  65. package/dist/components/admin/admin-dashboard.d.ts +20 -0
  66. package/dist/components/admin/admin-dashboard.d.ts.map +1 -0
  67. package/dist/components/admin/admin-dashboard.js +32 -0
  68. package/dist/components/admin/admin-dashboard.js.map +1 -0
  69. package/dist/components/admin/admin-files.d.ts +1 -1
  70. package/dist/components/admin/admin-files.d.ts.map +1 -1
  71. package/dist/components/admin/admin-files.js +3 -3
  72. package/dist/components/admin/admin-files.js.map +1 -1
  73. package/dist/components/admin/admin-jobs-executions-panel.d.ts +2 -2
  74. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  75. package/dist/components/admin/admin-jobs-executions-panel.js +12 -32
  76. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  77. package/dist/components/admin/admin-jobs-status-badge.d.ts +2 -2
  78. package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
  79. package/dist/components/admin/admin-jobs-status-badge.js +5 -5
  80. package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
  81. package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
  82. package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
  83. package/dist/components/admin/admin-jobs-status-labels.js +46 -0
  84. package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
  85. package/dist/components/admin/admin-jobs.d.ts +1 -1
  86. package/dist/components/admin/admin-jobs.d.ts.map +1 -1
  87. package/dist/components/admin/admin-jobs.js +5 -5
  88. package/dist/components/admin/admin-jobs.js.map +1 -1
  89. package/dist/components/admin/admin-keys-token-dialog.js +3 -3
  90. package/dist/components/admin/admin-keys-token-dialog.js.map +1 -1
  91. package/dist/components/admin/admin-keys.d.ts +1 -1
  92. package/dist/components/admin/admin-keys.d.ts.map +1 -1
  93. package/dist/components/admin/admin-keys.js +4 -4
  94. package/dist/components/admin/admin-keys.js.map +1 -1
  95. package/dist/components/admin/admin-layout.d.ts.map +1 -1
  96. package/dist/components/admin/admin-layout.js +6 -6
  97. package/dist/components/admin/admin-layout.js.map +1 -1
  98. package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
  99. package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
  100. package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
  101. package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
  102. package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
  103. package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
  104. package/dist/components/admin/admin-notifications-detail.js +48 -0
  105. package/dist/components/admin/admin-notifications-detail.js.map +1 -0
  106. package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
  107. package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
  108. package/dist/components/admin/admin-notifications-preview-body.js +64 -0
  109. package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
  110. package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
  111. package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
  112. package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
  113. package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
  114. package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
  115. package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
  116. package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
  117. package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
  118. package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
  119. package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
  120. package/dist/components/admin/admin-notifications-status-badge.js +32 -0
  121. package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
  122. package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
  123. package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
  124. package/dist/components/admin/admin-notifications-status-labels.js +33 -0
  125. package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
  126. package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
  127. package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
  128. package/dist/components/admin/admin-notifications-status-tones.js +64 -0
  129. package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
  130. package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
  131. package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
  132. package/dist/components/admin/admin-notifications-template-label.js +24 -0
  133. package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
  134. package/dist/components/admin/admin-notifications.d.ts +13 -2
  135. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  136. package/dist/components/admin/admin-notifications.js +266 -31
  137. package/dist/components/admin/admin-notifications.js.map +1 -1
  138. package/dist/components/admin/admin-parameters.d.ts +1 -1
  139. package/dist/components/admin/admin-parameters.d.ts.map +1 -1
  140. package/dist/components/admin/admin-parameters.js +10 -10
  141. package/dist/components/admin/admin-parameters.js.map +1 -1
  142. package/dist/components/admin/admin-payments.d.ts +1 -1
  143. package/dist/components/admin/admin-payments.d.ts.map +1 -1
  144. package/dist/components/admin/admin-payments.js +3 -3
  145. package/dist/components/admin/admin-payments.js.map +1 -1
  146. package/dist/components/admin/admin-router-options.d.ts +13 -10
  147. package/dist/components/admin/admin-router-options.d.ts.map +1 -1
  148. package/dist/components/admin/admin-router-options.js.map +1 -1
  149. package/dist/components/admin/admin-router-page.d.ts +7 -5
  150. package/dist/components/admin/admin-router-page.d.ts.map +1 -1
  151. package/dist/components/admin/admin-router-page.js +7 -5
  152. package/dist/components/admin/admin-router-page.js.map +1 -1
  153. package/dist/components/admin/admin-router.d.ts +101 -29
  154. package/dist/components/admin/admin-router.d.ts.map +1 -1
  155. package/dist/components/admin/admin-router.js +168 -45
  156. package/dist/components/admin/admin-router.js.map +1 -1
  157. package/dist/components/admin/admin-sessions.d.ts +1 -1
  158. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  159. package/dist/components/admin/admin-sessions.js +13 -5
  160. package/dist/components/admin/admin-sessions.js.map +1 -1
  161. package/dist/components/admin/admin-user-detail-audits-tab.d.ts +2 -2
  162. package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
  163. package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
  164. package/dist/components/admin/admin-user-detail-identity-aside.d.ts +4 -3
  165. package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -1
  166. package/dist/components/admin/admin-user-detail-identity-aside.js +13 -69
  167. package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -1
  168. package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -1
  169. package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -1
  170. package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -1
  171. package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -1
  172. package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -1
  173. package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -1
  174. package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
  175. package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
  176. package/dist/components/admin/admin-user-detail-security-tab.js +65 -46
  177. package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
  178. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +2 -2
  179. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  180. package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
  181. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  182. package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
  183. package/dist/components/admin/admin-user-detail.js +88 -126
  184. package/dist/components/admin/admin-user-detail.js.map +1 -1
  185. package/dist/components/admin/admin-users-roles-picker.d.ts +6 -1
  186. package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
  187. package/dist/components/admin/admin-users-roles-picker.js +11 -8
  188. package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
  189. package/dist/components/admin/admin-users.d.ts.map +1 -1
  190. package/dist/components/admin/admin-users.js +10 -13
  191. package/dist/components/admin/admin-users.js.map +1 -1
  192. package/dist/components/admin/admin-workflows-execution-sheet.d.ts +2 -2
  193. package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -1
  194. package/dist/components/admin/admin-workflows-execution-sheet.js +10 -10
  195. package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -1
  196. package/dist/components/admin/admin-workflows-executions-panel.d.ts +2 -2
  197. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
  198. package/dist/components/admin/admin-workflows-executions-panel.js +13 -45
  199. package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
  200. package/dist/components/admin/admin-workflows-status-badge.d.ts +2 -2
  201. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
  202. package/dist/components/admin/admin-workflows-status-badge.js +5 -5
  203. package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
  204. package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
  205. package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
  206. package/dist/components/admin/admin-workflows-status-labels.js +48 -0
  207. package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
  208. package/dist/components/admin/admin-workflows.d.ts +1 -1
  209. package/dist/components/admin/admin-workflows.d.ts.map +1 -1
  210. package/dist/components/admin/admin-workflows.js +5 -5
  211. package/dist/components/admin/admin-workflows.js.map +1 -1
  212. package/dist/components/admin/diff-lines.js +1 -1
  213. package/dist/components/admin/diff-lines.js.map +1 -1
  214. package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -1
  215. package/dist/components/admin/parameter-diff-dialog.js +1 -1
  216. package/dist/components/admin/parameter-diff-dialog.js.map +1 -1
  217. package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
  218. package/dist/components/admin/parameter-history-item.js +4 -4
  219. package/dist/components/admin/parameter-history-item.js.map +1 -1
  220. package/dist/components/admin/parameter-json-dialog.js +1 -1
  221. package/dist/components/admin/parameter-save-dialog.js +2 -2
  222. package/dist/components/admin/use-confirmed-action.js +1 -1
  223. package/dist/components/alepha-table/alepha-table.d.ts +109 -8
  224. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  225. package/dist/components/alepha-table/alepha-table.js +161 -31
  226. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  227. package/dist/components/alepha-table/paginate-local.d.ts +43 -0
  228. package/dist/components/alepha-table/paginate-local.d.ts.map +1 -0
  229. package/dist/components/alepha-table/paginate-local.js +84 -0
  230. package/dist/components/alepha-table/paginate-local.js.map +1 -0
  231. package/dist/components/app-actions/app-actions.js +1 -1
  232. package/dist/components/app-shell/app-shell.d.ts +10 -1
  233. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  234. package/dist/components/app-shell/app-shell.js +27 -20
  235. package/dist/components/app-shell/app-shell.js.map +1 -1
  236. package/dist/components/auth/auth-login.d.ts +1 -1
  237. package/dist/components/auth/auth-login.d.ts.map +1 -1
  238. package/dist/components/auth/auth-login.js +33 -34
  239. package/dist/components/auth/auth-login.js.map +1 -1
  240. package/dist/components/auth/auth-mfa-step.d.ts +25 -0
  241. package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
  242. package/dist/components/auth/auth-mfa-step.js +122 -0
  243. package/dist/components/auth/auth-mfa-step.js.map +1 -0
  244. package/dist/components/auth/auth-register.d.ts +1 -1
  245. package/dist/components/auth/auth-register.d.ts.map +1 -1
  246. package/dist/components/auth/auth-register.js +22 -23
  247. package/dist/components/auth/auth-register.js.map +1 -1
  248. package/dist/components/auth/auth-reset-password.d.ts +1 -1
  249. package/dist/components/auth/auth-reset-password.d.ts.map +1 -1
  250. package/dist/components/auth/auth-reset-password.js +18 -15
  251. package/dist/components/auth/auth-reset-password.js.map +1 -1
  252. package/dist/components/auth/auth-router.d.ts +23 -3
  253. package/dist/components/auth/auth-router.d.ts.map +1 -1
  254. package/dist/components/auth/auth-router.js +3 -3
  255. package/dist/components/auth/auth-router.js.map +1 -1
  256. package/dist/components/auth/auth-verify-email.d.ts +1 -1
  257. package/dist/components/auth/auth-verify-email.d.ts.map +1 -1
  258. package/dist/components/auth/auth-verify-email.js +8 -8
  259. package/dist/components/auth/auth-verify-email.js.map +1 -1
  260. package/dist/components/auth/provider-labels.d.ts.map +1 -1
  261. package/dist/components/auth/provider-labels.js +1 -0
  262. package/dist/components/auth/provider-labels.js.map +1 -1
  263. package/dist/components/auth/safe-redirect.d.ts +9 -0
  264. package/dist/components/auth/safe-redirect.d.ts.map +1 -0
  265. package/dist/components/auth/safe-redirect.js +19 -0
  266. package/dist/components/auth/safe-redirect.js.map +1 -0
  267. package/dist/components/auto-form/auto-form.d.ts.map +1 -1
  268. package/dist/components/auto-form/auto-form.js +32 -32
  269. package/dist/components/auto-form/auto-form.js.map +1 -1
  270. package/dist/components/brand-icon/brand-icon.d.ts +1 -1
  271. package/dist/components/brand-icon/brand-icon.d.ts.map +1 -1
  272. package/dist/components/brand-icon/brand-icon.js +2 -2
  273. package/dist/components/brand-icon/brand-icon.js.map +1 -1
  274. package/dist/components/button-dark/button-dark.d.ts +1 -1
  275. package/dist/components/button-dark/button-dark.d.ts.map +1 -1
  276. package/dist/components/button-dark/button-dark.js +2 -2
  277. package/dist/components/button-dark/button-dark.js.map +1 -1
  278. package/dist/components/button-language/button-language.d.ts +1 -1
  279. package/dist/components/button-language/button-language.d.ts.map +1 -1
  280. package/dist/components/button-language/button-language.js +2 -2
  281. package/dist/components/button-language/button-language.js.map +1 -1
  282. package/dist/components/button-theme/button-theme.d.ts +1 -1
  283. package/dist/components/button-theme/button-theme.d.ts.map +1 -1
  284. package/dist/components/button-theme/button-theme.js +3 -3
  285. package/dist/components/button-theme/button-theme.js.map +1 -1
  286. package/dist/components/button-user/button-user.d.ts +2 -20
  287. package/dist/components/button-user/button-user.d.ts.map +1 -1
  288. package/dist/components/button-user/button-user.js +3 -3
  289. package/dist/components/button-user/button-user.js.map +1 -1
  290. package/dist/components/captcha/turnstile-widget.d.ts +2 -2
  291. package/dist/components/captcha/turnstile-widget.d.ts.map +1 -1
  292. package/dist/components/captcha/turnstile-widget.js +5 -4
  293. package/dist/components/captcha/turnstile-widget.js.map +1 -1
  294. package/dist/components/control/control.d.ts +12 -3
  295. package/dist/components/control/control.d.ts.map +1 -1
  296. package/dist/components/control/control.js +12 -10
  297. package/dist/components/control/control.js.map +1 -1
  298. package/dist/components/control-array/control-array.d.ts +1 -1
  299. package/dist/components/control-array/control-array.d.ts.map +1 -1
  300. package/dist/components/control-array/control-array.js +78 -26
  301. package/dist/components/control-array/control-array.js.map +1 -1
  302. package/dist/components/control-base/field-i18n.d.ts +5 -3
  303. package/dist/components/control-base/field-i18n.d.ts.map +1 -1
  304. package/dist/components/control-base/field-i18n.js +4 -2
  305. package/dist/components/control-base/field-i18n.js.map +1 -1
  306. package/dist/components/control-base/form-field.d.ts +7 -7
  307. package/dist/components/control-base/form-field.d.ts.map +1 -1
  308. package/dist/components/control-base/form-field.js +10 -10
  309. package/dist/components/control-base/form-field.js.map +1 -1
  310. package/dist/components/control-base/icon-hint.d.ts +1 -1
  311. package/dist/components/control-base/icon-hint.d.ts.map +1 -1
  312. package/dist/components/control-base/icon-hint.js.map +1 -1
  313. package/dist/components/control-date/control-date.d.ts +1 -1
  314. package/dist/components/control-date/control-date.d.ts.map +1 -1
  315. package/dist/components/control-date/control-date.js +23 -7
  316. package/dist/components/control-date/control-date.js.map +1 -1
  317. package/dist/components/control-number/control-number.d.ts +7 -2
  318. package/dist/components/control-number/control-number.d.ts.map +1 -1
  319. package/dist/components/control-number/control-number.js +4 -3
  320. package/dist/components/control-number/control-number.js.map +1 -1
  321. package/dist/components/control-object/control-object.d.ts +16 -3
  322. package/dist/components/control-object/control-object.d.ts.map +1 -1
  323. package/dist/components/control-object/control-object.js +10 -9
  324. package/dist/components/control-object/control-object.js.map +1 -1
  325. package/dist/components/control-password/control-password.d.ts.map +1 -1
  326. package/dist/components/control-password/control-password.js +2 -2
  327. package/dist/components/control-password/control-password.js.map +1 -1
  328. package/dist/components/control-select/control-select.d.ts +2 -2
  329. package/dist/components/control-select/control-select.d.ts.map +1 -1
  330. package/dist/components/control-select/control-select.js +17 -17
  331. package/dist/components/control-select/control-select.js.map +1 -1
  332. package/dist/components/control-upload/control-upload.d.ts +1 -1
  333. package/dist/components/control-upload/control-upload.d.ts.map +1 -1
  334. package/dist/components/control-upload/control-upload.js +11 -11
  335. package/dist/components/control-upload/control-upload.js.map +1 -1
  336. package/dist/components/detail/detail-aside.d.ts +58 -0
  337. package/dist/components/detail/detail-aside.d.ts.map +1 -0
  338. package/dist/components/detail/detail-aside.js +95 -0
  339. package/dist/components/detail/detail-aside.js.map +1 -0
  340. package/dist/components/detail/detail-layout.d.ts +96 -0
  341. package/dist/components/detail/detail-layout.d.ts.map +1 -0
  342. package/dist/components/detail/detail-layout.js +103 -0
  343. package/dist/components/detail/detail-layout.js.map +1 -0
  344. package/dist/components/detail/use-detail-tab.d.ts +15 -0
  345. package/dist/components/detail/use-detail-tab.d.ts.map +1 -0
  346. package/dist/components/detail/use-detail-tab.js +37 -0
  347. package/dist/components/detail/use-detail-tab.js.map +1 -0
  348. package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
  349. package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
  350. package/dist/components/email-body-frame/email-body-frame.js +44 -0
  351. package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
  352. package/dist/components/file-image/file-image.d.ts.map +1 -1
  353. package/dist/components/file-image/file-image.js.map +1 -1
  354. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts +28 -0
  355. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts.map +1 -0
  356. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js +25 -0
  357. package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js.map +1 -0
  358. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
  359. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
  360. package/dist/components/markdown-view/diagram/DiagramLabel.js +43 -0
  361. package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
  362. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +39 -0
  363. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -0
  364. package/dist/components/markdown-view/diagram/FlowchartDiagram.js +94 -0
  365. package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -0
  366. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts +14 -0
  367. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts.map +1 -0
  368. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +45 -0
  369. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -0
  370. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts +19 -0
  371. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -0
  372. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +68 -0
  373. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -0
  374. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts +17 -0
  375. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -0
  376. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +62 -0
  377. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -0
  378. package/dist/components/markdown-view/diagram/MermaidFence.d.ts +39 -0
  379. package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -0
  380. package/dist/components/markdown-view/diagram/MermaidFence.js +65 -0
  381. package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -0
  382. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
  383. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
  384. package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
  385. package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
  386. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
  387. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
  388. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
  389. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
  390. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
  391. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
  392. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
  393. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
  394. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
  395. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
  396. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
  397. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
  398. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
  399. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
  400. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
  401. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
  402. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
  403. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
  404. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
  405. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
  406. package/dist/components/markdown-view/diagram/flowchartParser.d.ts +18 -0
  407. package/dist/components/markdown-view/diagram/flowchartParser.d.ts.map +1 -0
  408. package/dist/components/markdown-view/diagram/flowchartParser.js +370 -0
  409. package/dist/components/markdown-view/diagram/flowchartParser.js.map +1 -0
  410. package/dist/components/markdown-view/diagram/graphModel.d.ts +67 -0
  411. package/dist/components/markdown-view/diagram/graphModel.d.ts.map +1 -0
  412. package/dist/components/markdown-view/diagram/graphModel.js +0 -0
  413. package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts +109 -0
  414. package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts.map +1 -0
  415. package/dist/components/markdown-view/diagram/layoutFlowchart.js +185 -0
  416. package/dist/components/markdown-view/diagram/layoutFlowchart.js.map +1 -0
  417. package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
  418. package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
  419. package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
  420. package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
  421. package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
  422. package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
  423. package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
  424. package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
  425. package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
  426. package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
  427. package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
  428. package/dist/components/markdown-view/diagram/textMetrics.d.ts +63 -0
  429. package/dist/components/markdown-view/diagram/textMetrics.d.ts.map +1 -0
  430. package/dist/components/markdown-view/diagram/textMetrics.js +228 -0
  431. package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -0
  432. package/dist/components/markdown-view/markdown-view.css +65 -0
  433. package/dist/components/markdown-view/markdown-view.d.ts +39 -0
  434. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  435. package/dist/components/markdown-view/markdown-view.js +99 -9
  436. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  437. package/dist/components/nav-shell/nav-page.d.ts +7 -0
  438. package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
  439. package/dist/components/nav-shell/nav-page.js.map +1 -1
  440. package/dist/components/nav-shell/nav-shell.d.ts +1 -1
  441. package/dist/components/nav-shell/nav-shell.d.ts.map +1 -1
  442. package/dist/components/nav-shell/nav-shell.js +1 -1
  443. package/dist/components/nav-shell/nav-shell.js.map +1 -1
  444. package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
  445. package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
  446. package/dist/components/nav-shell/nav-tree-util.js +29 -6
  447. package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
  448. package/dist/components/nav-shell/spotlight.d.ts +3 -2
  449. package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
  450. package/dist/components/nav-shell/spotlight.js +9 -6
  451. package/dist/components/nav-shell/spotlight.js.map +1 -1
  452. package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
  453. package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
  454. package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
  455. package/dist/components/nav-shell/use-nav-entries.d.ts +21 -5
  456. package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
  457. package/dist/components/nav-shell/use-nav-entries.js +9 -4
  458. package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
  459. package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
  460. package/dist/components/nav-shell/use-nav-tree.js +1 -1
  461. package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
  462. package/dist/components/settings/settings-card-edge.d.ts +25 -0
  463. package/dist/components/settings/settings-card-edge.d.ts.map +1 -0
  464. package/dist/components/settings/settings-card-edge.js +29 -0
  465. package/dist/components/settings/settings-card-edge.js.map +1 -0
  466. package/dist/components/settings/settings-danger-section.d.ts.map +1 -1
  467. package/dist/components/settings/settings-danger-section.js +2 -1
  468. package/dist/components/settings/settings-danger-section.js.map +1 -1
  469. package/dist/components/settings/settings-layout.d.ts.map +1 -1
  470. package/dist/components/settings/settings-layout.js +1 -1
  471. package/dist/components/settings/settings-layout.js.map +1 -1
  472. package/dist/components/settings/settings-nav.d.ts.map +1 -1
  473. package/dist/components/settings/settings-nav.js +3 -3
  474. package/dist/components/settings/settings-nav.js.map +1 -1
  475. package/dist/components/settings/settings-row.js +2 -2
  476. package/dist/components/settings/settings-row.js.map +1 -1
  477. package/dist/components/settings/settings-section.d.ts.map +1 -1
  478. package/dist/components/settings/settings-section.js +3 -2
  479. package/dist/components/settings/settings-section.js.map +1 -1
  480. package/dist/components/ui/alert-dialog.d.ts +1 -1
  481. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  482. package/dist/components/ui/alert-dialog.js +6 -5
  483. package/dist/components/ui/alert-dialog.js.map +1 -1
  484. package/dist/components/ui/alert.d.ts +2 -2
  485. package/dist/components/ui/alert.d.ts.map +1 -1
  486. package/dist/components/ui/alert.js +3 -2
  487. package/dist/components/ui/alert.js.map +1 -1
  488. package/dist/components/ui/avatar.d.ts +2 -2
  489. package/dist/components/ui/avatar.d.ts.map +1 -1
  490. package/dist/components/ui/avatar.js +6 -5
  491. package/dist/components/ui/avatar.js.map +1 -1
  492. package/dist/components/ui/badge.d.ts +13 -2
  493. package/dist/components/ui/badge.d.ts.map +1 -1
  494. package/dist/components/ui/badge.js +51 -12
  495. package/dist/components/ui/badge.js.map +1 -1
  496. package/dist/components/ui/breadcrumb.d.ts +2 -2
  497. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  498. package/dist/components/ui/breadcrumb.js +4 -3
  499. package/dist/components/ui/breadcrumb.js.map +1 -1
  500. package/dist/components/ui/button-group.js +2 -2
  501. package/dist/components/ui/button-group.js.map +1 -1
  502. package/dist/components/ui/button.js +2 -2
  503. package/dist/components/ui/button.js.map +1 -1
  504. package/dist/components/ui/calendar.js +8 -8
  505. package/dist/components/ui/calendar.js.map +1 -1
  506. package/dist/components/ui/card.d.ts +2 -2
  507. package/dist/components/ui/card.d.ts.map +1 -1
  508. package/dist/components/ui/card.js +4 -3
  509. package/dist/components/ui/card.js.map +1 -1
  510. package/dist/components/ui/chart.d.ts.map +1 -1
  511. package/dist/components/ui/chart.js +7 -6
  512. package/dist/components/ui/chart.js.map +1 -1
  513. package/dist/components/ui/checkbox.js +1 -1
  514. package/dist/components/ui/checkbox.js.map +1 -1
  515. package/dist/components/ui/combobox.d.ts +1 -1
  516. package/dist/components/ui/combobox.d.ts.map +1 -1
  517. package/dist/components/ui/combobox.js +8 -8
  518. package/dist/components/ui/combobox.js.map +1 -1
  519. package/dist/components/ui/command.d.ts +2 -2
  520. package/dist/components/ui/command.d.ts.map +1 -1
  521. package/dist/components/ui/command.js +7 -6
  522. package/dist/components/ui/command.js.map +1 -1
  523. package/dist/components/ui/context-menu.d.ts +2 -2
  524. package/dist/components/ui/context-menu.d.ts.map +1 -1
  525. package/dist/components/ui/context-menu.js +9 -8
  526. package/dist/components/ui/context-menu.js.map +1 -1
  527. package/dist/components/ui/dialog.d.ts +1 -1
  528. package/dist/components/ui/dialog.d.ts.map +1 -1
  529. package/dist/components/ui/dialog.js +5 -4
  530. package/dist/components/ui/dialog.js.map +1 -1
  531. package/dist/components/ui/drawer.d.ts +1 -1
  532. package/dist/components/ui/drawer.d.ts.map +1 -1
  533. package/dist/components/ui/drawer.js +4 -4
  534. package/dist/components/ui/drawer.js.map +1 -1
  535. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  536. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  537. package/dist/components/ui/dropdown-menu.js +10 -9
  538. package/dist/components/ui/dropdown-menu.js.map +1 -1
  539. package/dist/components/ui/empty.d.ts +1 -1
  540. package/dist/components/ui/empty.d.ts.map +1 -1
  541. package/dist/components/ui/empty.js +2 -2
  542. package/dist/components/ui/empty.js.map +1 -1
  543. package/dist/components/ui/hover-card.d.ts +1 -1
  544. package/dist/components/ui/hover-card.js +1 -1
  545. package/dist/components/ui/hover-card.js.map +1 -1
  546. package/dist/components/ui/input-group.d.ts +2 -2
  547. package/dist/components/ui/input-group.d.ts.map +1 -1
  548. package/dist/components/ui/input-group.js +4 -3
  549. package/dist/components/ui/input-group.js.map +1 -1
  550. package/dist/components/ui/input-otp.d.ts +1 -1
  551. package/dist/components/ui/input-otp.d.ts.map +1 -1
  552. package/dist/components/ui/input-otp.js +3 -3
  553. package/dist/components/ui/input-otp.js.map +1 -1
  554. package/dist/components/ui/input.d.ts +1 -1
  555. package/dist/components/ui/input.d.ts.map +1 -1
  556. package/dist/components/ui/input.js +2 -1
  557. package/dist/components/ui/input.js.map +1 -1
  558. package/dist/components/ui/kbd.js +1 -1
  559. package/dist/components/ui/kbd.js.map +1 -1
  560. package/dist/components/ui/label.d.ts +1 -1
  561. package/dist/components/ui/label.d.ts.map +1 -1
  562. package/dist/components/ui/label.js +1 -0
  563. package/dist/components/ui/label.js.map +1 -1
  564. package/dist/components/ui/menubar.d.ts +2 -2
  565. package/dist/components/ui/menubar.d.ts.map +1 -1
  566. package/dist/components/ui/menubar.js +10 -9
  567. package/dist/components/ui/menubar.js.map +1 -1
  568. package/dist/components/ui/pagination.d.ts +1 -1
  569. package/dist/components/ui/pagination.d.ts.map +1 -1
  570. package/dist/components/ui/pagination.js +1 -0
  571. package/dist/components/ui/pagination.js.map +1 -1
  572. package/dist/components/ui/popover.d.ts +1 -1
  573. package/dist/components/ui/popover.d.ts.map +1 -1
  574. package/dist/components/ui/popover.js +2 -1
  575. package/dist/components/ui/popover.js.map +1 -1
  576. package/dist/components/ui/progress.d.ts +1 -1
  577. package/dist/components/ui/progress.d.ts.map +1 -1
  578. package/dist/components/ui/progress.js +3 -3
  579. package/dist/components/ui/progress.js.map +1 -1
  580. package/dist/components/ui/resizable.js +2 -2
  581. package/dist/components/ui/resizable.js.map +1 -1
  582. package/dist/components/ui/segmented.d.ts +11 -0
  583. package/dist/components/ui/segmented.d.ts.map +1 -1
  584. package/dist/components/ui/segmented.js +7 -3
  585. package/dist/components/ui/segmented.js.map +1 -1
  586. package/dist/components/ui/select.d.ts +1 -1
  587. package/dist/components/ui/select.d.ts.map +1 -1
  588. package/dist/components/ui/select.js +9 -8
  589. package/dist/components/ui/select.js.map +1 -1
  590. package/dist/components/ui/separator.js +1 -1
  591. package/dist/components/ui/separator.js.map +1 -1
  592. package/dist/components/ui/sheet.d.ts +2 -2
  593. package/dist/components/ui/sheet.d.ts.map +1 -1
  594. package/dist/components/ui/sheet.js +4 -3
  595. package/dist/components/ui/sheet.js.map +1 -1
  596. package/dist/components/ui/sidebar.js +17 -17
  597. package/dist/components/ui/sidebar.js.map +1 -1
  598. package/dist/components/ui/skeleton.js +1 -1
  599. package/dist/components/ui/skeleton.js.map +1 -1
  600. package/dist/components/ui/slider.js +2 -2
  601. package/dist/components/ui/slider.js.map +1 -1
  602. package/dist/components/ui/sonner.js +1 -1
  603. package/dist/components/ui/switch.js +2 -2
  604. package/dist/components/ui/switch.js.map +1 -1
  605. package/dist/components/ui/table.d.ts +2 -2
  606. package/dist/components/ui/table.d.ts.map +1 -1
  607. package/dist/components/ui/table.js +6 -5
  608. package/dist/components/ui/table.js.map +1 -1
  609. package/dist/components/ui/tabs.d.ts +1 -1
  610. package/dist/components/ui/tabs.d.ts.map +1 -1
  611. package/dist/components/ui/tabs.js +2 -2
  612. package/dist/components/ui/tabs.js.map +1 -1
  613. package/dist/components/ui/textarea.d.ts +1 -1
  614. package/dist/components/ui/textarea.d.ts.map +1 -1
  615. package/dist/components/ui/textarea.js +2 -1
  616. package/dist/components/ui/textarea.js.map +1 -1
  617. package/dist/components/ui/tooltip.d.ts +1 -1
  618. package/dist/components/ui/tooltip.d.ts.map +1 -1
  619. package/dist/components/ui/tooltip.js +3 -3
  620. package/dist/components/ui/tooltip.js.map +1 -1
  621. package/dist/components/use-dialog/use-dialog.d.ts +2 -2
  622. package/dist/components/use-dialog/use-dialog.d.ts.map +1 -1
  623. package/dist/components/use-dialog/use-dialog.js +10 -6
  624. package/dist/components/use-dialog/use-dialog.js.map +1 -1
  625. package/dist/components/use-toast/use-toast.d.ts +9 -3
  626. package/dist/components/use-toast/use-toast.d.ts.map +1 -1
  627. package/dist/components/use-toast/use-toast.js +23 -22
  628. package/dist/components/use-toast/use-toast.js.map +1 -1
  629. package/dist/hooks/use-mobile.d.ts +10 -0
  630. package/dist/hooks/use-mobile.d.ts.map +1 -1
  631. package/dist/hooks/use-mobile.js +19 -12
  632. package/dist/hooks/use-mobile.js.map +1 -1
  633. package/dist/lib/i18n-fr.d.ts +3 -3
  634. package/dist/lib/i18n-fr.d.ts.map +1 -1
  635. package/dist/lib/i18n-fr.js +265 -10
  636. package/dist/lib/i18n-fr.js.map +1 -1
  637. package/dist/styles.css +5 -5
  638. package/package.json +48 -47
  639. package/src/components/account/__tests__/account-router.spec.ts +29 -2
  640. package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
  641. package/src/components/account/account-connections.tsx +51 -19
  642. package/src/components/account/account-delete-dialog.tsx +24 -9
  643. package/src/components/account/account-header.tsx +10 -2
  644. package/src/components/account/account-keys.tsx +74 -30
  645. package/src/components/account/account-layout.tsx +8 -1
  646. package/src/components/account/account-mfa-dialog.tsx +233 -0
  647. package/src/components/account/account-password-dialog.tsx +42 -12
  648. package/src/components/account/account-profile.tsx +69 -28
  649. package/src/components/account/account-router-options.tsx +1 -0
  650. package/src/components/account/account-router-page.tsx +1 -0
  651. package/src/components/account/account-router.tsx +51 -8
  652. package/src/components/account/account-security.tsx +210 -22
  653. package/src/components/account/account-sessions.tsx +105 -23
  654. package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
  655. package/src/components/admin/__tests__/admin-keys-token-dialog.browser.spec.tsx +1 -0
  656. package/src/components/admin/__tests__/admin-layout.browser.spec.tsx +2 -1
  657. package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
  658. package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
  659. package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
  660. package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
  661. package/src/components/admin/__tests__/admin-router-page.spec.ts +2 -1
  662. package/src/components/admin/__tests__/admin-router.spec.ts +84 -1
  663. package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
  664. package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +1 -0
  665. package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
  666. package/src/components/admin/__tests__/admin-user-detail.spec.ts +1 -0
  667. package/src/components/admin/admin-analytics-query-panel.tsx +4 -3
  668. package/src/components/admin/admin-analytics-results.tsx +2 -2
  669. package/src/components/admin/admin-analytics.tsx +3 -3
  670. package/src/components/admin/admin-audits.tsx +3 -3
  671. package/src/components/admin/admin-dashboard-card.tsx +45 -0
  672. package/src/components/admin/admin-dashboard-count-card.tsx +89 -0
  673. package/src/components/admin/admin-dashboard.tsx +60 -0
  674. package/src/components/admin/admin-files.tsx +2 -2
  675. package/src/components/admin/admin-jobs-executions-panel.tsx +17 -13
  676. package/src/components/admin/admin-jobs-status-badge.tsx +6 -7
  677. package/src/components/admin/admin-jobs-status-labels.ts +46 -0
  678. package/src/components/admin/admin-jobs.tsx +4 -4
  679. package/src/components/admin/admin-keys-token-dialog.tsx +2 -2
  680. package/src/components/admin/admin-keys.tsx +2 -2
  681. package/src/components/admin/admin-layout.tsx +10 -5
  682. package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
  683. package/src/components/admin/admin-notifications-detail.tsx +100 -0
  684. package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
  685. package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
  686. package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
  687. package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
  688. package/src/components/admin/admin-notifications-status-labels.ts +42 -0
  689. package/src/components/admin/admin-notifications-status-tones.ts +85 -0
  690. package/src/components/admin/admin-notifications-template-label.ts +22 -0
  691. package/src/components/admin/admin-notifications.tsx +400 -33
  692. package/src/components/admin/admin-parameters.tsx +16 -9
  693. package/src/components/admin/admin-payments.tsx +2 -2
  694. package/src/components/admin/admin-router-options.tsx +14 -10
  695. package/src/components/admin/admin-router-page.tsx +8 -5
  696. package/src/components/admin/admin-router.tsx +175 -46
  697. package/src/components/admin/admin-sessions.tsx +23 -5
  698. package/src/components/admin/admin-user-detail-audits-tab.tsx +5 -2
  699. package/src/components/admin/admin-user-detail-identity-aside.tsx +16 -93
  700. package/src/components/admin/admin-user-detail-overview-tab.tsx +1 -0
  701. package/src/components/admin/admin-user-detail-password-dialog.tsx +1 -0
  702. package/src/components/admin/admin-user-detail-profile-policy.spec.ts +1 -0
  703. package/src/components/admin/admin-user-detail-profile-policy.ts +1 -0
  704. package/src/components/admin/admin-user-detail-security-tab.tsx +71 -5
  705. package/src/components/admin/admin-user-detail-sessions-tab.tsx +15 -5
  706. package/src/components/admin/admin-user-detail.tsx +141 -110
  707. package/src/components/admin/admin-users-roles-picker.tsx +22 -15
  708. package/src/components/admin/admin-users.tsx +9 -15
  709. package/src/components/admin/admin-workflows-execution-sheet.tsx +18 -10
  710. package/src/components/admin/admin-workflows-executions-panel.tsx +17 -18
  711. package/src/components/admin/admin-workflows-status-badge.tsx +8 -7
  712. package/src/components/admin/admin-workflows-status-labels.ts +51 -0
  713. package/src/components/admin/admin-workflows.tsx +6 -4
  714. package/src/components/admin/diff-lines.spec.ts +1 -0
  715. package/src/components/admin/diff-lines.ts +1 -1
  716. package/src/components/admin/parameter-diff-dialog.tsx +3 -2
  717. package/src/components/admin/parameter-history-item.tsx +6 -5
  718. package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
  719. package/src/components/alepha-table/__tests__/alepha-table-static.browser.spec.tsx +190 -0
  720. package/src/components/alepha-table/__tests__/paginate-local.spec.ts +286 -0
  721. package/src/components/alepha-table/__tests__/use-table-selection.browser.spec.tsx +1 -0
  722. package/src/components/alepha-table/alepha-table.tsx +408 -85
  723. package/src/components/alepha-table/paginate-local.ts +174 -0
  724. package/src/components/app-actions/__tests__/app-actions.browser.spec.tsx +1 -0
  725. package/src/components/app-shell/app-shell.tsx +42 -19
  726. package/src/components/auth/__tests__/auth-router.spec.ts +2 -1
  727. package/src/components/auth/auth-login.tsx +42 -34
  728. package/src/components/auth/auth-mfa-step.tsx +177 -0
  729. package/src/components/auth/auth-register.tsx +27 -26
  730. package/src/components/auth/auth-reset-password.tsx +24 -17
  731. package/src/components/auth/auth-router.tsx +4 -3
  732. package/src/components/auth/auth-verify-email.tsx +7 -7
  733. package/src/components/auth/provider-labels.ts +4 -0
  734. package/src/components/auth/safe-redirect.ts +14 -0
  735. package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -0
  736. package/src/components/auto-form/auto-form.tsx +60 -39
  737. package/src/components/brand-icon/brand-icon.tsx +2 -2
  738. package/src/components/button-dark/button-dark.tsx +2 -2
  739. package/src/components/button-language/button-language.tsx +2 -2
  740. package/src/components/button-theme/button-theme.tsx +2 -2
  741. package/src/components/button-user/button-user.tsx +4 -4
  742. package/src/components/captcha/turnstile-widget.tsx +6 -5
  743. package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
  744. package/src/components/control/control.tsx +20 -5
  745. package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
  746. package/src/components/control-array/control-array.tsx +113 -28
  747. package/src/components/control-base/__tests__/form-field-a11y.browser.spec.tsx +1 -0
  748. package/src/components/control-base/field-i18n.ts +5 -3
  749. package/src/components/control-base/form-field.tsx +13 -13
  750. package/src/components/control-base/icon-hint.tsx +1 -1
  751. package/src/components/control-date/control-date.tsx +29 -6
  752. package/src/components/control-number/control-number.tsx +10 -3
  753. package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
  754. package/src/components/control-object/control-object.tsx +32 -10
  755. package/src/components/control-password/control-password.tsx +2 -1
  756. package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +1 -0
  757. package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +1 -0
  758. package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +1 -0
  759. package/src/components/control-select/control-select.tsx +32 -18
  760. package/src/components/control-upload/control-upload.tsx +16 -10
  761. package/src/components/detail/__tests__/detail-aside.browser.spec.tsx +135 -0
  762. package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +187 -0
  763. package/src/components/detail/detail-aside.tsx +198 -0
  764. package/src/components/detail/detail-layout.tsx +200 -0
  765. package/src/components/detail/use-detail-tab.tsx +41 -0
  766. package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
  767. package/src/components/email-body-frame/email-body-frame.tsx +81 -0
  768. package/src/components/file-image/file-image.tsx +4 -2
  769. package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +211 -0
  770. package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +1 -0
  771. package/src/components/markdown-view/diagram/DiagramErrorBoundary.tsx +42 -0
  772. package/src/components/markdown-view/diagram/DiagramLabel.tsx +68 -0
  773. package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +131 -0
  774. package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +59 -0
  775. package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +94 -0
  776. package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +77 -0
  777. package/src/components/markdown-view/diagram/MermaidFence.tsx +96 -0
  778. package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
  779. package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
  780. package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
  781. package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
  782. package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
  783. package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
  784. package/src/components/markdown-view/diagram/__tests__/flowchart-diagram.browser.spec.tsx +210 -0
  785. package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
  786. package/src/components/markdown-view/diagram/flowchartParser.spec.ts +379 -0
  787. package/src/components/markdown-view/diagram/flowchartParser.ts +475 -0
  788. package/src/components/markdown-view/diagram/graphModel.ts +72 -0
  789. package/src/components/markdown-view/diagram/layoutFlowchart.spec.ts +235 -0
  790. package/src/components/markdown-view/diagram/layoutFlowchart.ts +324 -0
  791. package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
  792. package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
  793. package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
  794. package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
  795. package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
  796. package/src/components/markdown-view/diagram/textMetrics.spec.ts +128 -0
  797. package/src/components/markdown-view/diagram/textMetrics.ts +296 -0
  798. package/src/components/markdown-view/markdown-view.css +65 -0
  799. package/src/components/markdown-view/markdown-view.tsx +146 -9
  800. package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +108 -1
  801. package/src/components/nav-shell/nav-page.tsx +8 -0
  802. package/src/components/nav-shell/nav-shell.tsx +6 -3
  803. package/src/components/nav-shell/nav-tree-util.ts +95 -2
  804. package/src/components/nav-shell/spotlight.tsx +24 -9
  805. package/src/components/nav-shell/use-nav-breadcrumbs.ts +10 -2
  806. package/src/components/nav-shell/use-nav-entries.ts +34 -7
  807. package/src/components/nav-shell/use-nav-tree.ts +5 -1
  808. package/src/components/settings/__tests__/settings-nav.browser.spec.tsx +1 -0
  809. package/src/components/settings/__tests__/settings-section.browser.spec.tsx +1 -0
  810. package/src/components/settings/settings-card-edge.ts +24 -0
  811. package/src/components/settings/settings-danger-section.tsx +7 -1
  812. package/src/components/settings/settings-layout.tsx +16 -1
  813. package/src/components/settings/settings-nav.tsx +12 -3
  814. package/src/components/settings/settings-row.tsx +2 -2
  815. package/src/components/settings/settings-section.tsx +2 -1
  816. package/src/components/ui/alert-dialog.tsx +6 -6
  817. package/src/components/ui/alert.tsx +4 -4
  818. package/src/components/ui/avatar.tsx +8 -8
  819. package/src/components/ui/badge.tsx +48 -2
  820. package/src/components/ui/breadcrumb.tsx +6 -6
  821. package/src/components/ui/button-group.tsx +2 -2
  822. package/src/components/ui/button.tsx +2 -2
  823. package/src/components/ui/calendar.tsx +8 -8
  824. package/src/components/ui/card.tsx +8 -8
  825. package/src/components/ui/chart.tsx +18 -6
  826. package/src/components/ui/checkbox.tsx +1 -1
  827. package/src/components/ui/combobox.tsx +16 -17
  828. package/src/components/ui/command.tsx +10 -11
  829. package/src/components/ui/context-menu.tsx +15 -15
  830. package/src/components/ui/dialog.tsx +5 -5
  831. package/src/components/ui/drawer.tsx +10 -10
  832. package/src/components/ui/dropdown-menu.tsx +17 -23
  833. package/src/components/ui/empty.tsx +5 -5
  834. package/src/components/ui/hover-card.tsx +2 -2
  835. package/src/components/ui/input-group.tsx +8 -5
  836. package/src/components/ui/input-otp.tsx +4 -4
  837. package/src/components/ui/input.tsx +2 -2
  838. package/src/components/ui/kbd.tsx +1 -1
  839. package/src/components/ui/label.tsx +4 -1
  840. package/src/components/ui/menubar.tsx +18 -18
  841. package/src/components/ui/pagination.tsx +1 -2
  842. package/src/components/ui/popover.tsx +2 -2
  843. package/src/components/ui/progress.tsx +4 -4
  844. package/src/components/ui/resizable.tsx +2 -2
  845. package/src/components/ui/segmented.tsx +36 -3
  846. package/src/components/ui/select.tsx +9 -9
  847. package/src/components/ui/separator.tsx +1 -1
  848. package/src/components/ui/sheet.tsx +7 -7
  849. package/src/components/ui/sidebar.tsx +20 -20
  850. package/src/components/ui/skeleton.tsx +1 -1
  851. package/src/components/ui/slider.tsx +2 -2
  852. package/src/components/ui/switch.tsx +2 -2
  853. package/src/components/ui/table.tsx +11 -9
  854. package/src/components/ui/tabs.tsx +4 -4
  855. package/src/components/ui/textarea.tsx +2 -2
  856. package/src/components/ui/tooltip.tsx +6 -4
  857. package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
  858. package/src/components/use-dialog/use-dialog.tsx +19 -6
  859. package/src/components/use-toast/__tests__/use-toast.browser.spec.tsx +19 -0
  860. package/src/components/use-toast/use-toast.tsx +38 -26
  861. package/src/hooks/use-mobile.ts +27 -14
  862. package/src/lib/__tests__/i18n-fr.spec.ts +31 -5
  863. package/src/lib/i18n-fr.ts +326 -11
  864. package/src/styles.css +5 -5
  865. package/dist/components/language-toggle/language-toggle.d.ts +0 -8
  866. package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
  867. package/dist/components/language-toggle/language-toggle.js +0 -49
  868. package/dist/components/language-toggle/language-toggle.js.map +0 -1
  869. package/dist/components/ui/accordion.d.ts +0 -7
  870. package/dist/components/ui/accordion.d.ts.map +0 -1
  871. package/dist/components/ui/accordion.js +0 -55
  872. package/dist/components/ui/accordion.js.map +0 -1
  873. package/dist/components/ui/aspect-ratio.d.ts +0 -5
  874. package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
  875. package/dist/components/ui/aspect-ratio.js +0 -15
  876. package/dist/components/ui/aspect-ratio.js.map +0 -1
  877. package/dist/components/ui/carousel.d.ts +0 -29
  878. package/dist/components/ui/carousel.d.ts.map +0 -1
  879. package/dist/components/ui/carousel.js +0 -134
  880. package/dist/components/ui/carousel.js.map +0 -1
  881. package/dist/components/ui/collapsible.d.ts +0 -6
  882. package/dist/components/ui/collapsible.d.ts.map +0 -1
  883. package/dist/components/ui/collapsible.js +0 -26
  884. package/dist/components/ui/collapsible.js.map +0 -1
  885. package/dist/components/ui/direction.d.ts +0 -2
  886. package/dist/components/ui/direction.d.ts.map +0 -1
  887. package/dist/components/ui/direction.js +0 -3
  888. package/dist/components/ui/item.d.ts +0 -23
  889. package/dist/components/ui/item.d.ts.map +0 -1
  890. package/dist/components/ui/item.js +0 -122
  891. package/dist/components/ui/item.js.map +0 -1
  892. package/dist/components/ui/navigation-menu.d.ts +0 -12
  893. package/dist/components/ui/navigation-menu.d.ts.map +0 -1
  894. package/dist/components/ui/navigation-menu.js +0 -84
  895. package/dist/components/ui/navigation-menu.js.map +0 -1
  896. package/dist/components/ui/radio-group.d.ts +0 -6
  897. package/dist/components/ui/radio-group.d.ts.map +0 -1
  898. package/dist/components/ui/radio-group.js +0 -29
  899. package/dist/components/ui/radio-group.js.map +0 -1
  900. package/dist/components/ui/scroll-area.d.ts +0 -5
  901. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  902. package/dist/components/ui/scroll-area.js +0 -38
  903. package/dist/components/ui/scroll-area.js.map +0 -1
  904. package/dist/components/ui/toggle-group.d.ts +0 -12
  905. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  906. package/dist/components/ui/toggle-group.js +0 -54
  907. package/dist/components/ui/toggle-group.js.map +0 -1
  908. package/dist/components/ui/toggle.d.ts +0 -9
  909. package/dist/components/ui/toggle.d.ts.map +0 -1
  910. package/dist/components/ui/toggle.js +0 -38
  911. package/dist/components/ui/toggle.js.map +0 -1
  912. package/src/components/language-toggle/language-toggle.tsx +0 -66
  913. package/src/components/ui/accordion.tsx +0 -77
  914. package/src/components/ui/aspect-ratio.tsx +0 -22
  915. package/src/components/ui/carousel.tsx +0 -241
  916. package/src/components/ui/collapsible.tsx +0 -21
  917. package/src/components/ui/direction.tsx +0 -6
  918. package/src/components/ui/item.tsx +0 -200
  919. package/src/components/ui/navigation-menu.tsx +0 -170
  920. package/src/components/ui/radio-group.tsx +0 -37
  921. package/src/components/ui/scroll-area.tsx +0 -53
  922. package/src/components/ui/toggle-group.tsx +0 -88
  923. 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 { 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 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\";\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 * 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 */\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 render: (form: FormModel<ZObject>) => ReactNode;\n}\n\ninterface SortState {\n field: string;\n direction: \"asc\" | \"desc\";\n}\n\nexport interface AlephaTableProps<T> {\n /**\n * Fetcher invoked with paging + sort + filters. Should return an\n * Alepha `Page<T>`.\n */\n fetch: (params: {\n page: number;\n size: number;\n sort?: string;\n filters?: Record<string, any>;\n }) => Promise<Page<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 * Default page size.\n */\n defaultSize?: 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 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 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 String((item as { id?: unknown })?.id ?? Math.random());\n\nconst EMPTY_FILTERS_SCHEMA = z.object({}) as ZObject;\n\n/** Synchronous localStorage read. Returns undefined on miss or error. */\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/** Synchronous localStorage write. Empty objects/null delete the key. */\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\nexport function AlephaTable<T>(props: AlephaTableProps<T>) {\n const rowKey = props.rowKey ?? defaultRowKey;\n const size = props.defaultSize ?? 20;\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 }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\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 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 [data, setData] = useState<T[]>([]);\n const [meta, 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 setLoading(true);\n try {\n const res = await fetchRef.current({\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 // 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 flex flex-wrap items-end gap-2 rounded-md rounded-b-none border p-2 [&_:is(input,[role=combobox])]:bg-background dark:[&_:is(input,[role=combobox])]:bg-background\">\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 && 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=\"pointer-events-auto flex animate-in fade-in-0 slide-in-from-bottom-2 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=\"text-sm pl-2\">\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 <TableHeader className=\"bg-background 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=\"hover:text-foreground inline-flex cursor-pointer select-none items-center gap-1\"\n >\n {def.label}\n {sorted && (\n <span aria-hidden>\n {sort?.direction === \"asc\" ? \"↑\" : \"↓\"}\n </span>\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 <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 {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\nfunction 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":";;;;;;;;;;;;;;;;;AA8RA,MAAM,iBAAiB,SACrB,OAAQ,MAA2B,MAAM,KAAK,OAAO,CAAC;AAExD,MAAM,uBAAuB,EAAE,OAAO,CAAC,CAAC;;AAGxC,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;;AAGA,MAAM,kBAAkB,KAAa,QAAgB,UAAyB;CAC5E,IAAI,OAAO,WAAW,aAAa;CACnC,MAAM,UAAU,GAAG,IAAI,GAAG;CAC1B,IAAI;EACF,MAAM,gBACJ,UAAU,QACV,OAAO,UAAU,YACjB,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAO,KAAK,KAAe,CAAC,CAAC,WAAW;EAC1C,MAAM,eAAe,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW;E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AAC,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":[],"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 * 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.\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 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 // 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 // -- 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 // -- 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, 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 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":";;;;;;;;;;;;;;;;;;;AA4YA,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,KAAa,QAAgB,UAAyB;CAC5E,IAAI,OAAO,WAAW,aAAa;CACnC,MAAM,UAAU,GAAG,IAAI,GAAG;CAC1B,IAAI;EACF,MAAM,gBACJ,UAAU,QACV,OAAO,UAAU,YACjB,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAO,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LocalOptions<T> {
3
+ /**
4
+ * Zero-based page index, exactly as AlephaTable holds it.
5
+ */
6
+ page: number;
7
+ size: number;
8
+ /**
9
+ * Alepha's sort param: `"field"` ascending, `"-field"` descending.
10
+ * Only a single field is honoured — a static table has no server to
11
+ * hand a multi-column sort to.
12
+ */
13
+ sort?: string;
14
+ /**
15
+ * Value accessors keyed by sort field, for columns whose sort key is not
16
+ * a plain property of the row (a derived total, a joined label). Falls
17
+ * back to `item[field]`.
18
+ */
19
+ sortValues?: Record<string, (item: T) => unknown>;
20
+ /**
21
+ * Current filter form values, straight off AlephaTable's filter form.
22
+ */
23
+ filters?: Record<string, any>;
24
+ /**
25
+ * Predicate replacing the built-in field matching entirely.
26
+ *
27
+ * Reach for it as soon as a filter is not a field: a `search` box that
28
+ * spans title and description, a range, a joined label. Only ever called
29
+ * with filter values that are actually set.
30
+ */
31
+ filter?: (item: T, filters: Record<string, any>) => boolean;
32
+ }
33
+ /**
34
+ * Client-side sort + slice over an in-memory array, shaped as the same
35
+ * `Page<T>` a server fetcher returns.
36
+ *
37
+ * This is the whole of AlephaTable's static-data mode: the component swaps
38
+ * its fetched `data`/`meta` for this function's output and every other part
39
+ * of the table (pager, selection, column picker, row actions) keeps working
40
+ * against the shape it already knows.
41
+ */
42
+ export declare const paginateLocal: <T>(items: T[], options: PaginateLocalOptions<T>) => Page<T>;
43
+ //# sourceMappingURL=paginate-local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginate-local.d.ts","sourceRoot":"","sources":["../../../src/components/alepha-table/paginate-local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;IAClD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;CAC7D;AAuDD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SACtB,CAAC,EAAE,WACD,oBAAoB,CAAC,CAAC,CAAC,KAC/B,IAAI,CAAC,CAAC,CA0ER,CAAC"}
@@ -0,0 +1,84 @@
1
+ //#region src/components/alepha-table/paginate-local.ts
2
+ /**
3
+ * Does one filter value match the same-named property of a row?
4
+ *
5
+ * Sugar for the common case, not a query language. Strings match as a
6
+ * case-insensitive substring (what a text box means), arrays match on
7
+ * membership (what a tag picker means), everything else compares strictly.
8
+ * Anything more expressive is the caller's `filter`.
9
+ */
10
+ const matchesField = (item, key, value) => {
11
+ if (!(key in item)) return true;
12
+ const cell = item[key];
13
+ if (Array.isArray(cell)) return cell.some((entry) => typeof entry === "string" && typeof value === "string" ? entry.toLowerCase() === value.toLowerCase() : entry === value);
14
+ if (typeof cell === "string" && typeof value === "string") return cell.toLowerCase().includes(value.toLowerCase());
15
+ return cell === value;
16
+ };
17
+ /**
18
+ * Compare two non-nullish cell values.
19
+ *
20
+ * Typed rather than stringified: `String(a) < String(b)` puts 10 before 2
21
+ * and 2026-01-02 before 2026-01-10, which reads as a sorted column that is
22
+ * quietly wrong. Strings fall through to `localeCompare` at `sensitivity:
23
+ * "base"` so "Apple" and "apple" land together instead of ASCII-uppercase
24
+ * first.
25
+ */
26
+ const compareValues = (a, b) => {
27
+ if (typeof a === "number" && typeof b === "number") return a - b;
28
+ if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
29
+ if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
30
+ return String(a).localeCompare(String(b), void 0, { sensitivity: "base" });
31
+ };
32
+ /**
33
+ * Client-side sort + slice over an in-memory array, shaped as the same
34
+ * `Page<T>` a server fetcher returns.
35
+ *
36
+ * This is the whole of AlephaTable's static-data mode: the component swaps
37
+ * its fetched `data`/`meta` for this function's output and every other part
38
+ * of the table (pager, selection, column picker, row actions) keeps working
39
+ * against the shape it already knows.
40
+ */
41
+ const paginateLocal = (items, options) => {
42
+ const { page, size } = options;
43
+ let working = items;
44
+ const active = Object.entries(options.filters ?? {}).filter(([, value]) => value !== void 0 && value !== null && value !== "" && !(Array.isArray(value) && value.length === 0));
45
+ if (active.length > 0) {
46
+ const values = Object.fromEntries(active);
47
+ working = working.filter((item) => options.filter ? options.filter(item, values) : active.every(([key, value]) => matchesField(item, key, value)));
48
+ }
49
+ if (options.sort) {
50
+ const descending = options.sort.startsWith("-");
51
+ const field = descending ? options.sort.slice(1) : options.sort;
52
+ const accessor = options.sortValues?.[field] ?? ((item) => item[field]);
53
+ const direction = descending ? -1 : 1;
54
+ working = [...working].sort((left, right) => {
55
+ const a = accessor(left);
56
+ const b = accessor(right);
57
+ const aEmpty = a === null || a === void 0 || a === "";
58
+ const bEmpty = b === null || b === void 0 || b === "";
59
+ if (aEmpty || bEmpty) return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
60
+ return compareValues(a, b) * direction;
61
+ });
62
+ }
63
+ const offset = page * size;
64
+ const content = working.slice(offset, offset + size);
65
+ const totalPages = Math.ceil(working.length / size);
66
+ return {
67
+ content,
68
+ page: {
69
+ number: page,
70
+ size,
71
+ offset,
72
+ numberOfElements: content.length,
73
+ totalElements: working.length,
74
+ totalPages,
75
+ isEmpty: content.length === 0,
76
+ isFirst: page === 0,
77
+ isLast: page >= totalPages - 1
78
+ }
79
+ };
80
+ };
81
+ //#endregion
82
+ export { paginateLocal };
83
+
84
+ //# sourceMappingURL=paginate-local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginate-local.js","names":[],"sources":["../../../src/components/alepha-table/paginate-local.ts"],"sourcesContent":["import type { Page } from \"alepha\";\n\nexport interface PaginateLocalOptions<T> {\n /**\n * Zero-based page index, exactly as AlephaTable holds it.\n */\n page: number;\n size: number;\n /**\n * Alepha's sort param: `\"field\"` ascending, `\"-field\"` descending.\n * Only a single field is honoured — a static table has no server to\n * hand a multi-column sort to.\n */\n sort?: string;\n /**\n * Value accessors keyed by sort field, for columns whose sort key is not\n * a plain property of the row (a derived total, a joined label). Falls\n * back to `item[field]`.\n */\n sortValues?: Record<string, (item: T) => unknown>;\n /**\n * Current filter form values, straight off AlephaTable's filter form.\n */\n filters?: Record<string, any>;\n /**\n * Predicate replacing the built-in field matching entirely.\n *\n * Reach for it as soon as a filter is not a field: a `search` box that\n * spans title and description, a range, a joined label. Only ever called\n * with filter values that are actually set.\n */\n filter?: (item: T, filters: Record<string, any>) => boolean;\n}\n\n/**\n * Does one filter value match the same-named property of a row?\n *\n * Sugar for the common case, not a query language. Strings match as a\n * case-insensitive substring (what a text box means), arrays match on\n * membership (what a tag picker means), everything else compares strictly.\n * Anything more expressive is the caller's `filter`.\n */\nconst matchesField = (item: unknown, key: string, value: unknown): boolean => {\n // A filter field the rows do not carry belongs to a caller-owned\n // `filter`. Emptying the table is the worst possible way to report that,\n // so an unknown key matches everything and stays visible instead.\n if (!(key in (item as object))) {\n return true;\n }\n const cell = (item as Record<string, unknown>)[key];\n if (Array.isArray(cell)) {\n return cell.some((entry) =>\n typeof entry === \"string\" && typeof value === \"string\"\n ? entry.toLowerCase() === value.toLowerCase()\n : entry === value,\n );\n }\n if (typeof cell === \"string\" && typeof value === \"string\") {\n return cell.toLowerCase().includes(value.toLowerCase());\n }\n return cell === value;\n};\n\n/**\n * Compare two non-nullish cell values.\n *\n * Typed rather than stringified: `String(a) < String(b)` puts 10 before 2\n * and 2026-01-02 before 2026-01-10, which reads as a sorted column that is\n * quietly wrong. Strings fall through to `localeCompare` at `sensitivity:\n * \"base\"` so \"Apple\" and \"apple\" land together instead of ASCII-uppercase\n * first.\n */\nconst compareValues = (a: unknown, b: unknown): number => {\n if (typeof a === \"number\" && typeof b === \"number\") {\n return a - b;\n }\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() - b.getTime();\n }\n if (typeof a === \"boolean\" && typeof b === \"boolean\") {\n return Number(a) - Number(b);\n }\n return String(a).localeCompare(String(b), undefined, {\n sensitivity: \"base\",\n });\n};\n\n/**\n * Client-side sort + slice over an in-memory array, shaped as the same\n * `Page<T>` a server fetcher returns.\n *\n * This is the whole of AlephaTable's static-data mode: the component swaps\n * its fetched `data`/`meta` for this function's output and every other part\n * of the table (pager, selection, column picker, row actions) keeps working\n * against the shape it already knows.\n */\nexport const paginateLocal = <T>(\n items: T[],\n options: PaginateLocalOptions<T>,\n): Page<T> => {\n const { page, size } = options;\n\n let working = items;\n\n // A cleared Control sets `undefined`; an emptied text input sets \"\".\n // Either one treated as a real value empties the table for no reason the\n // reader can see, so they are dropped before anything else looks at them.\n const active = Object.entries(options.filters ?? {}).filter(\n ([, value]) =>\n value !== undefined &&\n value !== null &&\n value !== \"\" &&\n !(Array.isArray(value) && value.length === 0),\n );\n\n if (active.length > 0) {\n const values = Object.fromEntries(active);\n working = working.filter((item) =>\n options.filter\n ? options.filter(item, values)\n : active.every(([key, value]) => matchesField(item, key, value)),\n );\n }\n\n if (options.sort) {\n const descending = options.sort.startsWith(\"-\");\n const field = descending ? options.sort.slice(1) : options.sort;\n const accessor =\n options.sortValues?.[field] ??\n ((item: T) => (item as Record<string, unknown>)[field]);\n const direction = descending ? -1 : 1;\n\n // Copy `working`, not `items`: sorting the original array back over the\n // filtered one throws the filter away. Copy at all because `sort`\n // mutates, and the array belongs to the caller — reordering their state\n // in place would be a side effect they never asked for and cannot see.\n // `sort` is stable, so rows that compare equal keep the order the caller\n // put them in.\n working = [...working].sort((left, right) => {\n const a = accessor(left);\n const b = accessor(right);\n const aEmpty = a === null || a === undefined || a === \"\";\n const bEmpty = b === null || b === undefined || b === \"\";\n // Nullish last, and outside the direction flip: an empty cell is\n // missing data, and burying it is right whichever way the reader\n // pointed the arrow.\n if (aEmpty || bEmpty) {\n return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;\n }\n return compareValues(a, b) * direction;\n });\n }\n\n const offset = page * size;\n const content = working.slice(offset, offset + size);\n const totalPages = Math.ceil(working.length / size);\n\n return {\n content,\n page: {\n number: page,\n size,\n offset,\n numberOfElements: content.length,\n totalElements: working.length,\n totalPages,\n isEmpty: content.length === 0,\n isFirst: page === 0,\n // `>=` rather than `===`: a page past the end is still the last thing\n // there is to show, and the pager must not offer a \"next\" from it.\n isLast: page >= totalPages - 1,\n },\n };\n};\n"],"mappings":";;;;;;;;;AA0CA,MAAM,gBAAgB,MAAe,KAAa,UAA4B;CAI5E,IAAI,EAAE,OAAQ,OACZ,OAAO;CAET,MAAM,OAAQ,KAAiC;CAC/C,IAAI,MAAM,QAAQ,IAAI,GACpB,OAAO,KAAK,MAAM,UAChB,OAAO,UAAU,YAAY,OAAO,UAAU,WAC1C,MAAM,YAAY,MAAM,MAAM,YAAY,IAC1C,UAAU,KAChB;CAEF,IAAI,OAAO,SAAS,YAAY,OAAO,UAAU,UAC/C,OAAO,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,YAAY,CAAC;CAExD,OAAO,SAAS;AAClB;;;;;;;;;;AAWA,MAAM,iBAAiB,GAAY,MAAuB;CACxD,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UACxC,OAAO,IAAI;CAEb,IAAI,aAAa,QAAQ,aAAa,MACpC,OAAO,EAAE,QAAQ,IAAI,EAAE,QAAQ;CAEjC,IAAI,OAAO,MAAM,aAAa,OAAO,MAAM,WACzC,OAAO,OAAO,CAAC,IAAI,OAAO,CAAC;CAE7B,OAAO,OAAO,CAAC,CAAC,CAAC,cAAc,OAAO,CAAC,GAAG,KAAA,GAAW,EACnD,aAAa,OACf,CAAC;AACH;;;;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;GAC1B,eAAe,QAAQ;GACvB;GACA,SAAS,QAAQ,WAAW;GAC5B,SAAS,SAAS;GAGlB,QAAQ,QAAQ,aAAa;EAC/B;CACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../../lib/utils.js";
2
- import { DropdownMenuSeparator } from "../ui/dropdown-menu.js";
3
2
  import { ButtonDark } from "../button-dark/button-dark.js";
3
+ import { DropdownMenuSeparator } from "../ui/dropdown-menu.js";
4
4
  import { ButtonLanguage } from "../button-language/button-language.js";
5
5
  import { ButtonTheme } from "../button-theme/button-theme.js";
6
6
  import { ButtonUser } from "../button-user/button-user.js";
@@ -125,11 +125,20 @@ export interface AppShellProps {
125
125
  * sticky footer sits below the shell).
126
126
  */
127
127
  fill?: boolean;
128
+ /**
129
+ * Extra classes for the scrolling `<main>` element.
130
+ *
131
+ * Exists so an app can paint its own page surface (Lore stamps a dot
132
+ * texture there) without every other consumer of the shell inheriting it.
133
+ * Layout classes are applied after this, so a caller cannot break the
134
+ * flex/overflow contract described above.
135
+ */
136
+ mainClassName?: string;
128
137
  }
129
138
  /**
130
139
  * Standard SaaS layout: collapsible sidebar + topbar with breadcrumbs.
131
140
  * Built on shadcn `<Sidebar>` + `<Breadcrumb>`.
132
141
  */
133
- export declare function AppShell(props: AppShellProps): React.JSX.Element;
142
+ export declare const AppShell: (props: AppShellProps) => React.JSX.Element;
134
143
  export {};
135
144
  //# 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":"AAAA,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,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