@devalok/shilp-sutra 0.53.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/AGENTS.md +7 -1
  2. package/BREAKING.json +29 -0
  3. package/MIGRATION.md +83 -0
  4. package/dist/_chunks/badge-group.js +1 -1
  5. package/dist/_chunks/popover.js +38 -37
  6. package/dist/_chunks/popover.js.map +1 -1
  7. package/dist/_chunks/primitives/react-accordion.js +270 -0
  8. package/dist/_chunks/primitives/react-accordion.js.map +1 -0
  9. package/dist/_chunks/primitives/react-alert-dialog.js +857 -0
  10. package/dist/_chunks/primitives/react-alert-dialog.js.map +1 -0
  11. package/dist/_chunks/primitives/react-aspect-ratio.js +32 -0
  12. package/dist/_chunks/primitives/react-aspect-ratio.js.map +1 -0
  13. package/dist/_chunks/primitives/react-avatar.js +69 -0
  14. package/dist/_chunks/primitives/react-avatar.js.map +1 -0
  15. package/dist/_chunks/primitives/react-checkbox.js +151 -0
  16. package/dist/_chunks/primitives/react-checkbox.js.map +1 -0
  17. package/dist/_chunks/primitives/react-context-menu.js +905 -0
  18. package/dist/_chunks/primitives/react-context-menu.js.map +1 -0
  19. package/dist/_chunks/primitives/react-dropdown-menu.js +220 -0
  20. package/dist/_chunks/primitives/react-dropdown-menu.js.map +1 -0
  21. package/dist/_chunks/primitives/react-hover-card.js +153 -0
  22. package/dist/_chunks/primitives/react-hover-card.js.map +1 -0
  23. package/dist/_chunks/primitives/react-label.js +16 -0
  24. package/dist/_chunks/primitives/react-label.js.map +1 -0
  25. package/dist/_chunks/primitives/react-menubar.js +304 -0
  26. package/dist/_chunks/primitives/react-menubar.js.map +1 -0
  27. package/dist/_chunks/primitives/react-navigation-menu.js +560 -0
  28. package/dist/_chunks/primitives/react-navigation-menu.js.map +1 -0
  29. package/dist/_chunks/primitives/react-popover.js +186 -0
  30. package/dist/_chunks/primitives/react-popover.js.map +1 -0
  31. package/dist/_chunks/primitives/react-progress.js +70 -0
  32. package/dist/_chunks/primitives/react-progress.js.map +1 -0
  33. package/dist/_chunks/primitives/react-radio-group.js +170 -0
  34. package/dist/_chunks/primitives/react-radio-group.js.map +1 -0
  35. package/dist/_chunks/primitives/react-select.js +671 -0
  36. package/dist/_chunks/primitives/react-select.js.map +1 -0
  37. package/dist/_chunks/primitives/react-separator.js +24 -0
  38. package/dist/_chunks/primitives/react-separator.js.map +1 -0
  39. package/dist/_chunks/primitives/react-slider.js +349 -0
  40. package/dist/_chunks/primitives/react-slider.js.map +1 -0
  41. package/dist/_chunks/primitives/react-switch.js +92 -0
  42. package/dist/_chunks/primitives/react-switch.js.map +1 -0
  43. package/dist/_chunks/primitives/react-tabs.js +114 -0
  44. package/dist/_chunks/primitives/react-tabs.js.map +1 -0
  45. package/dist/_chunks/primitives/react-toggle-group.js +122 -0
  46. package/dist/_chunks/primitives/react-toggle-group.js.map +1 -0
  47. package/dist/_chunks/primitives/react-toggle.js +28 -0
  48. package/dist/_chunks/primitives/react-toggle.js.map +1 -0
  49. package/dist/_chunks/primitives/react-tooltip.js +341 -0
  50. package/dist/_chunks/primitives/react-tooltip.js.map +1 -0
  51. package/dist/_chunks/primitives-internal.js +2071 -0
  52. package/dist/_chunks/primitives-internal.js.map +1 -0
  53. package/dist/_chunks/shared.js +32 -32
  54. package/dist/_chunks/tiptap.js +1 -1
  55. package/dist/ai/ai-command-provider.d.ts +2 -3
  56. package/dist/ai/block-renderer.d.ts +1 -2
  57. package/dist/ai/blocks/block-shell.d.ts +0 -1
  58. package/dist/ai/blocks/block-table.d.ts +1 -2
  59. package/dist/ai/blocks/confirm.d.ts +1 -2
  60. package/dist/ai/blocks/divider.d.ts +1 -2
  61. package/dist/ai/blocks/error.d.ts +1 -2
  62. package/dist/ai/blocks/index.d.ts +7 -8
  63. package/dist/ai/blocks/info.d.ts +1 -2
  64. package/dist/ai/blocks/loading.d.ts +1 -2
  65. package/dist/ai/blocks/stat-row.d.ts +1 -2
  66. package/dist/ai/blocks/success.d.ts +1 -2
  67. package/dist/ai/blocks/text.d.ts +1 -2
  68. package/dist/ai/command-bar.d.ts +1 -2
  69. package/dist/ai/conversation.d.ts +2 -3
  70. package/dist/ai/devadoot-icon.d.ts +0 -1
  71. package/dist/ai/index.d.ts +16 -17
  72. package/dist/ai/types.js +1 -0
  73. package/dist/composed/activity-feed.d.ts +1 -2
  74. package/dist/composed/avatar-group.d.ts +11 -10
  75. package/dist/composed/avatar-group.d.ts.map +1 -1
  76. package/dist/composed/avatar-group.js +108 -140
  77. package/dist/composed/avatar-group.js.map +1 -1
  78. package/dist/composed/bulk-action-bar.d.ts +20 -13
  79. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  80. package/dist/composed/bulk-action-bar.js +81 -110
  81. package/dist/composed/bulk-action-bar.js.map +1 -1
  82. package/dist/composed/command-palette.d.ts +1 -2
  83. package/dist/composed/confirm-dialog.d.ts +0 -1
  84. package/dist/composed/date-picker/calendar-grid.d.ts +0 -1
  85. package/dist/composed/date-picker/date-picker.d.ts +0 -1
  86. package/dist/composed/date-picker/date-range-picker.d.ts +1 -2
  87. package/dist/composed/date-picker/date-time-picker.d.ts +0 -1
  88. package/dist/composed/date-picker/index.d.ts +17 -18
  89. package/dist/composed/date-picker/month-picker.d.ts +0 -1
  90. package/dist/composed/date-picker/presets.d.ts +0 -1
  91. package/dist/composed/date-picker/time-picker.d.ts +0 -1
  92. package/dist/composed/date-picker/use-calendar.d.ts +0 -1
  93. package/dist/composed/date-picker/year-picker.d.ts +0 -1
  94. package/dist/composed/deadline-indicator.d.ts +0 -1
  95. package/dist/composed/diff.d.ts +0 -1
  96. package/dist/composed/emoji-picker.d.ts +0 -1
  97. package/dist/composed/empty-state.d.ts +1 -2
  98. package/dist/composed/error-boundary.d.ts +15 -4
  99. package/dist/composed/error-boundary.d.ts.map +1 -1
  100. package/dist/composed/error-boundary.js +43 -26
  101. package/dist/composed/error-boundary.js.map +1 -1
  102. package/dist/composed/extensions/emoji-data.d.ts +0 -1
  103. package/dist/composed/extensions/emoji-node.d.ts +0 -1
  104. package/dist/composed/extensions/emoji-suggestion.d.ts +1 -2
  105. package/dist/composed/extensions/file-attachment.d.ts +0 -1
  106. package/dist/composed/extensions/mention-suggestion.d.ts +1 -2
  107. package/dist/composed/extensions/slash-command.d.ts +0 -1
  108. package/dist/composed/file-preview/audio-preview.d.ts +0 -1
  109. package/dist/composed/file-preview/document-preview.d.ts +0 -1
  110. package/dist/composed/file-preview/embed-preview.d.ts +0 -1
  111. package/dist/composed/file-preview/image-preview.d.ts +0 -1
  112. package/dist/composed/file-preview/shared.d.ts +0 -1
  113. package/dist/composed/file-preview/video-preview.d.ts +0 -1
  114. package/dist/composed/file-preview.d.ts +0 -1
  115. package/dist/composed/filter-bar.d.ts +0 -1
  116. package/dist/composed/form-section.d.ts +0 -1
  117. package/dist/composed/global-loading.d.ts +0 -1
  118. package/dist/composed/index.d.ts +49 -50
  119. package/dist/composed/inline-edit.d.ts +0 -1
  120. package/dist/composed/loading-skeleton.d.ts +2 -0
  121. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  122. package/dist/composed/loading-skeleton.js +79 -56
  123. package/dist/composed/loading-skeleton.js.map +1 -1
  124. package/dist/composed/markdown-viewer.d.ts +0 -1
  125. package/dist/composed/master-detail.d.ts +21 -9
  126. package/dist/composed/master-detail.d.ts.map +1 -1
  127. package/dist/composed/master-detail.js +91 -77
  128. package/dist/composed/master-detail.js.map +1 -1
  129. package/dist/composed/member-picker.d.ts +0 -1
  130. package/dist/composed/multi-select-popover.d.ts +0 -1
  131. package/dist/composed/page-skeletons.d.ts +6 -0
  132. package/dist/composed/page-skeletons.d.ts.map +1 -1
  133. package/dist/composed/page-skeletons.js +93 -71
  134. package/dist/composed/page-skeletons.js.map +1 -1
  135. package/dist/composed/priority-indicator.d.ts +0 -1
  136. package/dist/composed/responsive-modal.d.ts +1 -2
  137. package/dist/composed/responsive-modal.js +47 -47
  138. package/dist/composed/rich-chat-input/attachment-strip.d.ts +0 -1
  139. package/dist/composed/rich-chat-input/audio-player.d.ts +0 -1
  140. package/dist/composed/rich-chat-input/audio-waveform.d.ts +0 -1
  141. package/dist/composed/rich-chat-input/chat-toolbar.d.ts +0 -1
  142. package/dist/composed/rich-chat-input/recording-overlay.d.ts +0 -1
  143. package/dist/composed/rich-chat-input/reply-banner.d.ts +0 -1
  144. package/dist/composed/rich-chat-input/schedule-send.d.ts +0 -1
  145. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts +0 -1
  146. package/dist/composed/rich-chat-input.d.ts +9 -10
  147. package/dist/composed/rich-chat-input.js +1 -1
  148. package/dist/composed/rich-text-editor.d.ts +1 -2
  149. package/dist/composed/schedule-view.d.ts +0 -1
  150. package/dist/composed/simple-tooltip.d.ts +0 -1
  151. package/dist/composed/status-badge.d.ts +1 -2
  152. package/dist/hooks/index.d.ts +6 -7
  153. package/dist/hooks/use-color-mode.d.ts +0 -1
  154. package/dist/hooks/use-mobile.d.ts +0 -1
  155. package/dist/hooks/use-touch-device.d.ts +0 -1
  156. package/dist/hooks/use-viewport-height.d.ts +0 -1
  157. package/dist/motion/check-motion-provider.d.ts +0 -1
  158. package/dist/motion/index.d.ts +2 -3
  159. package/dist/motion/motion-provider.d.ts +1 -2
  160. package/dist/motion/primitives-index.d.ts +1 -2
  161. package/dist/motion/primitives.d.ts +1 -2
  162. package/dist/primitives/_internal/react-arrow.d.ts +1 -1
  163. package/dist/primitives/_internal/react-collection.d.ts +2 -2
  164. package/dist/primitives/_internal/react-dismissable-layer.d.ts +1 -1
  165. package/dist/primitives/_internal/react-focus-scope.d.ts +1 -1
  166. package/dist/primitives/_internal/react-popper.d.ts +4 -4
  167. package/dist/primitives/_internal/react-portal.d.ts +1 -1
  168. package/dist/primitives/_internal/react-use-rect.d.ts +1 -1
  169. package/dist/primitives/react-accordion.d.ts +3 -3
  170. package/dist/primitives/react-alert-dialog.d.ts +2 -2
  171. package/dist/primitives/react-aspect-ratio.d.ts +1 -1
  172. package/dist/primitives/react-avatar.d.ts +2 -2
  173. package/dist/primitives/react-checkbox.d.ts +3 -3
  174. package/dist/primitives/react-collapsible.d.ts +2 -2
  175. package/dist/primitives/react-context-menu.d.ts +3 -3
  176. package/dist/primitives/react-dialog.d.ts +5 -5
  177. package/dist/primitives/react-dropdown-menu.d.ts +3 -3
  178. package/dist/primitives/react-hover-card.d.ts +5 -5
  179. package/dist/primitives/react-label.d.ts +1 -1
  180. package/dist/primitives/react-menu.d.ts +7 -7
  181. package/dist/primitives/react-menubar.d.ts +5 -5
  182. package/dist/primitives/react-navigation-menu.d.ts +5 -5
  183. package/dist/primitives/react-popover.d.ts +6 -6
  184. package/dist/primitives/react-progress.d.ts +2 -2
  185. package/dist/primitives/react-radio-group.d.ts +3 -3
  186. package/dist/primitives/react-roving-focus.d.ts +2 -2
  187. package/dist/primitives/react-select.d.ts +6 -6
  188. package/dist/primitives/react-separator.d.ts +1 -1
  189. package/dist/primitives/react-slider.d.ts +2 -2
  190. package/dist/primitives/react-switch.d.ts +2 -2
  191. package/dist/primitives/react-tabs.d.ts +3 -3
  192. package/dist/primitives/react-toast.d.ts +3 -3
  193. package/dist/primitives/react-toggle-group.d.ts +4 -4
  194. package/dist/primitives/react-toggle.d.ts +1 -1
  195. package/dist/primitives/react-tooltip.d.ts +5 -5
  196. package/dist/primitives/react-visually-hidden.d.ts +1 -1
  197. package/dist/shell/app-command-palette.d.ts +2 -3
  198. package/dist/shell/bottom-navbar.d.ts +1 -2
  199. package/dist/shell/command-registry.d.ts +1 -2
  200. package/dist/shell/index.d.ts +12 -11
  201. package/dist/shell/index.d.ts.map +1 -1
  202. package/dist/shell/index.js +2 -3
  203. package/dist/shell/link-context.d.ts +2 -3
  204. package/dist/shell/notification-center.d.ts +0 -1
  205. package/dist/shell/notification-preferences.d.ts +0 -1
  206. package/dist/shell/notification-preferences.d.ts.map +1 -1
  207. package/dist/shell/notification-preferences.js +2 -0
  208. package/dist/shell/notification-preferences.js.map +1 -1
  209. package/dist/shell/top-bar.d.ts +1 -2
  210. package/dist/test-utils/conformance.d.ts +0 -1
  211. package/dist/ui/accordion.d.ts +1 -2
  212. package/dist/ui/accordion.js +1 -1
  213. package/dist/ui/alert-dialog.d.ts +1 -2
  214. package/dist/ui/alert-dialog.js +52 -52
  215. package/dist/ui/alert.d.ts +0 -1
  216. package/dist/ui/aspect-ratio.d.ts +1 -2
  217. package/dist/ui/aspect-ratio.js +4 -4
  218. package/dist/ui/autocomplete.d.ts +1 -2
  219. package/dist/ui/autocomplete.js +1 -1
  220. package/dist/ui/avatar.d.ts +1 -2
  221. package/dist/ui/avatar.js +33 -33
  222. package/dist/ui/badge-group.d.ts +1 -2
  223. package/dist/ui/badge-indicator.d.ts +0 -1
  224. package/dist/ui/badge.d.ts +3 -4
  225. package/dist/ui/banner.d.ts +0 -1
  226. package/dist/ui/breadcrumb.js +1 -1
  227. package/dist/ui/button-group.d.ts +1 -2
  228. package/dist/ui/button-processing.d.ts +0 -1
  229. package/dist/ui/button.d.ts +1 -2
  230. package/dist/ui/button.js +1 -1
  231. package/dist/ui/card.d.ts +0 -1
  232. package/dist/ui/charts/_internal/animation.d.ts +0 -1
  233. package/dist/ui/charts/_internal/axes.d.ts +0 -1
  234. package/dist/ui/charts/_internal/colors.d.ts +1 -2
  235. package/dist/ui/charts/_internal/grid-lines.d.ts +0 -1
  236. package/dist/ui/charts/_internal/legend.d.ts +0 -1
  237. package/dist/ui/charts/_internal/scales.d.ts +0 -1
  238. package/dist/ui/charts/_internal/tooltip.d.ts +0 -1
  239. package/dist/ui/charts/_internal/types.d.ts +0 -1
  240. package/dist/ui/charts/area-chart.d.ts +1 -2
  241. package/dist/ui/charts/bar-chart.d.ts +1 -2
  242. package/dist/ui/charts/chart-container.d.ts +1 -2
  243. package/dist/ui/charts/gauge-chart.d.ts +0 -1
  244. package/dist/ui/charts/index.d.ts +9 -10
  245. package/dist/ui/charts/line-chart.d.ts +1 -2
  246. package/dist/ui/charts/pie-chart.d.ts +0 -1
  247. package/dist/ui/charts/radar-chart.d.ts +0 -1
  248. package/dist/ui/charts/sparkline.d.ts +0 -1
  249. package/dist/ui/chat/date-separator.d.ts +0 -1
  250. package/dist/ui/chat/index.d.ts +7 -8
  251. package/dist/ui/chat/message-input.d.ts +0 -1
  252. package/dist/ui/chat/message-list.d.ts +0 -1
  253. package/dist/ui/chat/message.d.ts +1 -2
  254. package/dist/ui/chat/system-message.d.ts +1 -2
  255. package/dist/ui/chat/typing-indicator.d.ts +0 -1
  256. package/dist/ui/chat/unread-separator.d.ts +0 -1
  257. package/dist/ui/checkbox.d.ts +2 -3
  258. package/dist/ui/checkbox.js +13 -13
  259. package/dist/ui/collapsible.d.ts +1 -2
  260. package/dist/ui/collapsible.js +1 -1
  261. package/dist/ui/color-input.d.ts +0 -1
  262. package/dist/ui/color-swatch.d.ts +0 -1
  263. package/dist/ui/combobox.d.ts +3 -4
  264. package/dist/ui/combobox.d.ts.map +1 -1
  265. package/dist/ui/combobox.js +146 -141
  266. package/dist/ui/combobox.js.map +1 -1
  267. package/dist/ui/context-menu.d.ts +1 -2
  268. package/dist/ui/context-menu.js +58 -58
  269. package/dist/ui/data-table-body.d.ts +0 -1
  270. package/dist/ui/data-table-bulk-actions.d.ts +0 -1
  271. package/dist/ui/data-table-card.d.ts +0 -1
  272. package/dist/ui/data-table-context.d.ts +0 -1
  273. package/dist/ui/data-table-header.d.ts +0 -1
  274. package/dist/ui/data-table-pagination.d.ts +0 -1
  275. package/dist/ui/data-table-toolbar.d.ts +0 -1
  276. package/dist/ui/data-table.d.ts +3 -4
  277. package/dist/ui/devalok-grain.d.ts +0 -1
  278. package/dist/ui/dialog.d.ts +1 -2
  279. package/dist/ui/dialog.js +43 -43
  280. package/dist/ui/dot.d.ts +0 -1
  281. package/dist/ui/dropdown-menu.d.ts +1 -2
  282. package/dist/ui/dropdown-menu.js +69 -69
  283. package/dist/ui/file-upload.d.ts +0 -1
  284. package/dist/ui/file-upload.d.ts.map +1 -1
  285. package/dist/ui/file-upload.js +124 -138
  286. package/dist/ui/file-upload.js.map +1 -1
  287. package/dist/ui/form.d.ts +7 -1
  288. package/dist/ui/form.d.ts.map +1 -1
  289. package/dist/ui/form.js +4 -2
  290. package/dist/ui/form.js.map +1 -1
  291. package/dist/ui/hover-card.d.ts +1 -2
  292. package/dist/ui/hover-card.js +16 -16
  293. package/dist/ui/icon-button.d.ts +4 -4
  294. package/dist/ui/icon-button.d.ts.map +1 -1
  295. package/dist/ui/icon-button.js +1 -1
  296. package/dist/ui/icon-button.js.map +1 -1
  297. package/dist/ui/icon-context.d.ts +0 -1
  298. package/dist/ui/icon-group.d.ts +1 -2
  299. package/dist/ui/icon.d.ts +1 -2
  300. package/dist/ui/index.d.ts +78 -79
  301. package/dist/ui/index.d.ts.map +1 -1
  302. package/dist/ui/index.js.map +1 -1
  303. package/dist/ui/input-otp.d.ts +0 -1
  304. package/dist/ui/input.d.ts +1 -2
  305. package/dist/ui/label.d.ts +1 -2
  306. package/dist/ui/label.d.ts.map +1 -1
  307. package/dist/ui/label.js +13 -12
  308. package/dist/ui/label.js.map +1 -1
  309. package/dist/ui/lib/bottom-sheet.d.ts +0 -1
  310. package/dist/ui/lib/check-tokens.d.ts +0 -1
  311. package/dist/ui/lib/field-state.d.ts +0 -1
  312. package/dist/ui/lib/icon-input.d.ts +0 -1
  313. package/dist/ui/lib/index.d.ts +6 -7
  314. package/dist/ui/lib/keybinding.d.ts +0 -1
  315. package/dist/ui/lib/link-context.d.ts +0 -1
  316. package/dist/ui/lib/mention.d.ts +0 -1
  317. package/dist/ui/lib/normalize-icon.d.ts +2 -2
  318. package/dist/ui/lib/slot.d.ts +2 -3
  319. package/dist/ui/lib/use-controllable-open.d.ts +0 -1
  320. package/dist/ui/link.d.ts +0 -1
  321. package/dist/ui/link.js +1 -1
  322. package/dist/ui/menubar.d.ts +1 -2
  323. package/dist/ui/menubar.js +64 -64
  324. package/dist/ui/navigation-menu.d.ts +1 -2
  325. package/dist/ui/navigation-menu.js +67 -67
  326. package/dist/ui/number-input.d.ts +1 -2
  327. package/dist/ui/oauth-button/index.d.ts +1 -2
  328. package/dist/ui/oauth-button/oauth-button.d.ts +2 -3
  329. package/dist/ui/pagination.d.ts +0 -1
  330. package/dist/ui/pagination.js +1 -1
  331. package/dist/ui/popover.d.ts +1 -2
  332. package/dist/ui/progress-ring.d.ts +0 -1
  333. package/dist/ui/progress.d.ts +1 -2
  334. package/dist/ui/progress.js +30 -30
  335. package/dist/ui/radio.d.ts +2 -3
  336. package/dist/ui/radio.js +18 -18
  337. package/dist/ui/search-input.d.ts +0 -1
  338. package/dist/ui/segmented-control.d.ts +1 -2
  339. package/dist/ui/select.d.ts +1 -2
  340. package/dist/ui/select.js +55 -55
  341. package/dist/ui/separator.d.ts +1 -2
  342. package/dist/ui/separator.js +5 -5
  343. package/dist/ui/sheet.d.ts +1 -2
  344. package/dist/ui/sheet.js +45 -45
  345. package/dist/ui/sidebar.d.ts +4 -5
  346. package/dist/ui/sidebar.js +1 -1
  347. package/dist/ui/slider.d.ts +1 -2
  348. package/dist/ui/slider.js +14 -14
  349. package/dist/ui/spinner.d.ts +0 -1
  350. package/dist/ui/spinner.d.ts.map +1 -1
  351. package/dist/ui/spinner.js +50 -44
  352. package/dist/ui/spinner.js.map +1 -1
  353. package/dist/ui/split-button.d.ts +14 -4
  354. package/dist/ui/split-button.d.ts.map +1 -1
  355. package/dist/ui/split-button.js.map +1 -1
  356. package/dist/ui/stat-card.d.ts +3 -4
  357. package/dist/ui/stat-flash.d.ts +1 -2
  358. package/dist/ui/stepper.d.ts +1 -2
  359. package/dist/ui/surface.js +1 -1
  360. package/dist/ui/switch.d.ts +2 -3
  361. package/dist/ui/switch.d.ts.map +1 -1
  362. package/dist/ui/switch.js +31 -31
  363. package/dist/ui/switch.js.map +1 -1
  364. package/dist/ui/table-row-link.d.ts +0 -1
  365. package/dist/ui/table.js +1 -1
  366. package/dist/ui/table.js.map +1 -1
  367. package/dist/ui/tabs.d.ts +1 -2
  368. package/dist/ui/tabs.js +35 -35
  369. package/dist/ui/textarea.d.ts +1 -2
  370. package/dist/ui/toast-registry.d.ts +0 -1
  371. package/dist/ui/toast-types.js +1 -0
  372. package/dist/ui/toast.d.ts +2 -3
  373. package/dist/ui/toaster.d.ts +0 -1
  374. package/dist/ui/toggle-group.d.ts +2 -3
  375. package/dist/ui/toggle-group.js +14 -14
  376. package/dist/ui/toggle.d.ts +1 -2
  377. package/dist/ui/toggle.js +12 -12
  378. package/dist/ui/tooltip.d.ts +1 -2
  379. package/dist/ui/tooltip.js +21 -21
  380. package/dist/ui/tree-view/index.d.ts +3 -4
  381. package/dist/ui/tree-view/tree-item.d.ts +1 -2
  382. package/dist/ui/tree-view/tree-view.d.ts +1 -2
  383. package/dist/ui/tree-view/use-tree.d.ts +1 -2
  384. package/dist/ui/truncated-text.d.ts +0 -1
  385. package/docs/components/composed/bulk-action-bar.md +9 -3
  386. package/docs/components/composed/error-boundary.md +18 -2
  387. package/docs/components/composed/master-detail.md +12 -2
  388. package/docs/components/composed/page-skeletons.md +2 -2
  389. package/docs/components/composed/rich-chat-input.md +18 -6
  390. package/docs/components/composed/simple-tooltip.md +1 -1
  391. package/docs/components/shell/app-command-palette.md +2 -1
  392. package/docs/components/shell/bottom-navbar.md +4 -4
  393. package/docs/components/shell/command-registry.md +2 -2
  394. package/docs/components/shell/link-context.md +2 -2
  395. package/docs/components/shell/top-bar.md +1 -1
  396. package/docs/components/ui/search-input.md +2 -2
  397. package/docs/components/ui/slider.md +2 -2
  398. package/docs/components/ui/split-button.md +3 -3
  399. package/docs/recipes/install-astro.md +2 -0
  400. package/docs/recipes/install-next-app-router.md +2 -0
  401. package/docs/recipes/install-remix.md +2 -0
  402. package/docs/recipes/install-tanstack-start.md +2 -0
  403. package/docs/recipes/install-vite.md +2 -0
  404. package/docs/recipes/troubleshoot.md +80 -0
  405. package/llms.txt +2 -2
  406. package/make-kit/Guidelines.md +1 -1
  407. package/make-kit/components/overview.md +2 -2
  408. package/make-kit/foundations/surfaces.md +1 -1
  409. package/mcp-manifest.json +411 -147
  410. package/package.json +30 -10
  411. package/skill/SKILL.md +1 -1
  412. package/skill/chat-skill/README.md +18 -0
  413. package/skill/chat-skill/SKILL.md +78 -0
  414. package/skill/chat-skill/chatgpt-instructions.md +26 -0
  415. package/skill/chat-skill/gemini-instructions.md +25 -0
  416. package/skill/references/components.md +2 -2
  417. package/skill/references/setup-astro.md +2 -0
  418. package/skill/references/setup-next-app-router.md +2 -0
  419. package/skill/references/setup-remix.md +2 -0
  420. package/skill/references/setup-tanstack-start.md +2 -0
  421. package/skill/references/setup-vite.md +2 -0
  422. package/skill/references/troubleshoot.md +80 -0
  423. package/dist/_chunks/primitives.js +0 -7596
  424. package/dist/_chunks/primitives.js.map +0 -1
  425. package/dist/shell/sidebar.d.ts +0 -113
  426. package/dist/shell/sidebar.d.ts.map +0 -1
  427. package/dist/shell/sidebar.js +0 -293
  428. package/dist/shell/sidebar.js.map +0 -1
  429. package/docs/components/shell/sidebar.md +0 -103
@@ -8,152 +8,123 @@ import * as a from "react";
8
8
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
9
  import { createPortal as c } from "react-dom";
10
10
  import { IconX as l } from "@tabler/icons-react";
11
- import { AnimatePresence as u, motion as d } from "framer-motion";
11
+ import { AnimatePresence as u, motion as d, useReducedMotion as f } from "framer-motion";
12
12
  //#region src/composed/bulk-action-bar.tsx
13
- var f = a.forwardRef(function({ action: t, tabIndex: n }, r) {
14
- let [c, l] = a.useState(!1);
15
- return c ? /* @__PURE__ */ s(d.div, {
16
- ref: r,
17
- initial: {
18
- opacity: 0,
19
- scale: .95
20
- },
21
- animate: {
22
- opacity: 1,
23
- scale: 1
24
- },
25
- exit: {
26
- opacity: 0,
27
- scale: .95
28
- },
29
- transition: e.snappy,
30
- className: "flex items-center gap-ds-02",
31
- tabIndex: n,
32
- children: [
33
- /* @__PURE__ */ o("span", {
34
- className: "text-body-sm text-surface-fg-muted whitespace-nowrap",
35
- children: t.confirmMessage ?? "Are you sure?"
36
- }),
37
- /* @__PURE__ */ o(i, {
38
- variant: "solid",
39
- size: "sm",
40
- color: "error",
41
- onClick: () => {
42
- l(!1), t.onClick();
43
- },
44
- children: "Confirm"
45
- }),
46
- /* @__PURE__ */ o(i, {
47
- variant: "ghost",
48
- size: "sm",
49
- onClick: () => l(!1),
50
- children: "Cancel"
51
- })
52
- ]
53
- }) : /* @__PURE__ */ o(d.div, {
54
- ref: r,
55
- initial: {
56
- opacity: 0,
57
- scale: .95
58
- },
59
- animate: {
60
- opacity: 1,
61
- scale: 1
62
- },
63
- exit: {
64
- opacity: 0,
65
- scale: .95
66
- },
67
- transition: e.snappy,
68
- tabIndex: n,
69
- children: /* @__PURE__ */ o(i, {
70
- variant: "ghost",
71
- size: "sm",
72
- color: t.color === "error" ? "error" : "accent",
73
- disabled: t.disabled,
74
- onClick: t.requiresConfirmation ? () => l(!0) : t.onClick,
75
- startIcon: t.icon ?? void 0,
76
- tabIndex: -1,
77
- children: t.label
78
- })
79
- });
80
- });
81
- function p({ show: p, count: m, onClearSelection: h, actions: g, totalCount: _, onSelectAll: v, className: y }) {
82
- let [b, x] = a.useState(!1), [S, C] = a.useState(0), w = a.useRef([]);
13
+ var p = a.forwardRef(function({ show: p, count: m, onClearSelection: h, actions: g, totalCount: _, onSelectAll: v, className: y, ...b }, x) {
14
+ let S = f(), [C, w] = a.useState(!1), [T, E] = a.useState(0), [D, O] = a.useState(null), k = a.useRef([]), A = a.useRef(null), j = _ != null && _ > m && !!v, M = +!!j, N = M + g.length + 1;
83
15
  a.useEffect(() => {
84
- C(0);
16
+ w(!0);
17
+ }, []), a.useEffect(() => {
18
+ E(0), O(null);
85
19
  }, [g.length]), a.useEffect(() => {
86
- x(!0);
87
- }, []);
88
- function T(e) {
20
+ D != null && A.current?.focus();
21
+ }, [D]);
22
+ let P = (e) => {
23
+ let t = (e + N) % N;
24
+ E(t), k.current[t]?.focus();
25
+ };
26
+ function F(e) {
89
27
  if (e.key === "Escape") {
90
- e.preventDefault(), h();
28
+ e.preventDefault(), D == null ? h() : (O(null), P(T));
91
29
  return;
92
30
  }
93
- let t = g.length;
94
- if (t !== 0) {
95
- if (e.key === "ArrowRight") {
96
- e.preventDefault();
97
- let n = (S + 1) % t;
98
- C(n), w.current[n]?.focus();
99
- } else if (e.key === "ArrowLeft") {
100
- e.preventDefault();
101
- let n = (S - 1 + t) % t;
102
- C(n), w.current[n]?.focus();
103
- } else if (e.key === "Home") e.preventDefault(), C(0), w.current[0]?.focus();
104
- else if (e.key === "End") {
105
- e.preventDefault();
106
- let n = t - 1;
107
- C(n), w.current[n]?.focus();
108
- }
109
- }
31
+ if (D != null) return;
32
+ let t = e.currentTarget.dir === "rtl" || document.dir === "rtl", n = t ? "ArrowLeft" : "ArrowRight", r = t ? "ArrowRight" : "ArrowLeft";
33
+ e.key === n ? (e.preventDefault(), P(T + 1)) : e.key === r ? (e.preventDefault(), P(T - 1)) : e.key === "Home" ? (e.preventDefault(), P(0)) : e.key === "End" && (e.preventDefault(), P(N - 1));
110
34
  }
111
- return b ? c(/* @__PURE__ */ o(u, { children: p && /* @__PURE__ */ s(d.div, {
112
- initial: {
35
+ if (!C) return null;
36
+ let I = S ? { duration: 0 } : e.smooth;
37
+ return c(/* @__PURE__ */ o(u, { children: p && /* @__PURE__ */ s(d.div, {
38
+ ref: x,
39
+ initial: S ? { opacity: 0 } : {
113
40
  y: 100,
114
41
  opacity: 0
115
42
  },
116
- animate: {
43
+ animate: S ? { opacity: 1 } : {
117
44
  y: 0,
118
45
  opacity: 1
119
46
  },
120
- exit: {
47
+ exit: S ? { opacity: 0 } : {
121
48
  y: 100,
122
49
  opacity: 0
123
50
  },
124
- transition: e.snappy,
125
- className: t("fixed bottom-ds-06 left-1/2 z-sticky -translate-x-1/2", "flex items-center gap-ds-04 rounded-surface bg-surface-overlay px-ds-05 py-ds-03 shadow-floating", y),
51
+ transition: I,
52
+ className: t("fixed bottom-ds-06 start-1/2 z-sticky -translate-x-1/2", "flex items-center gap-ds-04 rounded-surface bg-surface-overlay px-ds-05 py-ds-03 shadow-floating", y),
126
53
  role: "toolbar",
127
54
  "aria-label": `${m} items selected`,
128
- onKeyDown: T,
55
+ onKeyDown: F,
56
+ ...b,
129
57
  children: [
130
58
  /* @__PURE__ */ s(r, {
131
59
  variant: "solid",
132
60
  size: "sm",
133
61
  children: [m, " selected"]
134
62
  }),
135
- _ != null && _ > m && v && /* @__PURE__ */ s(i, {
63
+ j && /* @__PURE__ */ s(i, {
64
+ ref: (e) => {
65
+ k.current[0] = e;
66
+ },
136
67
  variant: "link",
137
68
  size: "xs",
69
+ tabIndex: T === 0 ? 0 : -1,
138
70
  onClick: v,
139
71
  children: ["Select all ", _]
140
72
  }),
141
73
  /* @__PURE__ */ o("div", {
142
74
  className: "flex items-center gap-ds-02",
143
- children: /* @__PURE__ */ o(u, {
144
- mode: "popLayout",
145
- children: g.map((e, t) => /* @__PURE__ */ o(f, {
75
+ children: g.map((e, t) => {
76
+ let n = M + t;
77
+ return D === t ? /* @__PURE__ */ s("div", {
78
+ role: "group",
79
+ "aria-live": "assertive",
80
+ className: "flex items-center gap-ds-02",
81
+ children: [
82
+ /* @__PURE__ */ o("span", {
83
+ className: "whitespace-nowrap text-body-sm text-surface-fg-muted",
84
+ children: e.confirmMessage ?? "Are you sure?"
85
+ }),
86
+ /* @__PURE__ */ o(i, {
87
+ ref: A,
88
+ variant: "solid",
89
+ size: "sm",
90
+ color: e.color === "error" ? "error" : e.color ?? "accent",
91
+ onClick: () => {
92
+ O(null), e.onClick();
93
+ },
94
+ children: "Confirm"
95
+ }),
96
+ /* @__PURE__ */ o(i, {
97
+ variant: "ghost",
98
+ size: "sm",
99
+ onClick: () => {
100
+ O(null), P(n);
101
+ },
102
+ children: "Cancel"
103
+ })
104
+ ]
105
+ }, e.label) : /* @__PURE__ */ o(i, {
146
106
  ref: (e) => {
147
- w.current[t] = e;
107
+ k.current[n] = e;
148
108
  },
149
- action: e,
150
- tabIndex: t === S ? 0 : -1
151
- }, e.label))
109
+ variant: "ghost",
110
+ size: "sm",
111
+ color: e.color ?? "accent",
112
+ disabled: e.disabled,
113
+ loading: e.loading,
114
+ startIcon: e.icon ?? void 0,
115
+ tabIndex: T === n ? 0 : -1,
116
+ onClick: e.requiresConfirmation ? () => O(t) : e.onClick,
117
+ children: e.label
118
+ }, e.label);
152
119
  })
153
120
  }),
154
121
  /* @__PURE__ */ o(i, {
122
+ ref: (e) => {
123
+ k.current[N - 1] = e;
124
+ },
155
125
  variant: "ghost",
156
126
  size: "icon-sm",
127
+ tabIndex: T === N - 1 ? 0 : -1,
157
128
  onClick: h,
158
129
  "aria-label": "Clear selection",
159
130
  children: /* @__PURE__ */ o(n, {
@@ -162,8 +133,8 @@ function p({ show: p, count: m, onClearSelection: h, actions: g, totalCount: _,
162
133
  })
163
134
  })
164
135
  ]
165
- }) }), document.body) : null;
166
- }
136
+ }) }), document.body);
137
+ });
167
138
  p.displayName = "BulkActionBar";
168
139
  //#endregion
169
140
  export { p as BulkActionBar };
@@ -1 +1 @@
1
- {"version":3,"file":"bulk-action-bar.js","names":[],"sources":["../../src/composed/bulk-action-bar.tsx"],"sourcesContent":["'use client'\n\nimport { IconX } from '@tabler/icons-react'\nimport { AnimatePresence, motion } from 'framer-motion'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { Badge } from '../ui/badge'\nimport { Button } from '../ui/button'\nimport { Icon } from '../ui/icon'\nimport type { IconInput } from '../ui/lib/icon-input'\nimport { springs } from '../ui/lib/motion'\nimport { cn } from '../ui/lib/utils'\n\n// ============================================================\n// Types\n// ============================================================\n\nexport interface BulkActionBarAction {\n label: string\n icon?: IconInput\n onClick: () => void\n color?: 'accent' | 'error'\n disabled?: boolean\n /** Show inline confirmation before executing the action */\n requiresConfirmation?: boolean\n /** Custom confirmation message @default 'Are you sure?' */\n confirmMessage?: string\n}\n\nexport interface BulkActionBarProps {\n show: boolean\n count: number\n onClearSelection: () => void\n actions: BulkActionBarAction[]\n /** Total number of items available for selection */\n totalCount?: number\n /** Called when user clicks \"Select all\" */\n onSelectAll?: () => void\n className?: string\n}\n\n// ============================================================\n// ActionButton — handles inline confirmation\n// ============================================================\n\nconst ActionButton = React.forwardRef<HTMLDivElement, { action: BulkActionBarAction; tabIndex?: number }>(function ActionButton({ action, tabIndex }, ref) {\n const [confirming, setConfirming] = React.useState(false)\n\n if (confirming) {\n return (\n <motion.div\n ref={ref}\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={springs.snappy}\n className=\"flex items-center gap-ds-02\"\n tabIndex={tabIndex}\n >\n <span className=\"text-body-sm text-surface-fg-muted whitespace-nowrap\">\n {action.confirmMessage ?? 'Are you sure?'}\n </span>\n <Button\n variant=\"solid\"\n size=\"sm\"\n color=\"error\"\n onClick={() => {\n setConfirming(false)\n action.onClick()\n }}\n >\n Confirm\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => setConfirming(false)}\n >\n Cancel\n </Button>\n </motion.div>\n )\n }\n\n return (\n <motion.div\n ref={ref}\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={springs.snappy}\n tabIndex={tabIndex}\n >\n <Button\n variant=\"ghost\"\n size=\"sm\"\n color={action.color === 'error' ? 'error' : 'accent'}\n disabled={action.disabled}\n onClick={action.requiresConfirmation ? () => setConfirming(true) : action.onClick}\n startIcon={action.icon ?? undefined}\n tabIndex={-1}\n >\n {action.label}\n </Button>\n </motion.div>\n )\n})\n\n// ============================================================\n// BulkActionBar\n// ============================================================\n\nfunction BulkActionBar({\n show,\n count,\n onClearSelection,\n actions,\n totalCount,\n onSelectAll,\n className,\n}: BulkActionBarProps) {\n const [mounted, setMounted] = React.useState(false)\n const [focusedIndex, setFocusedIndex] = React.useState(0)\n const actionRefs = React.useRef<(HTMLDivElement | null)[]>([])\n\n // Reset focused index when actions change\n React.useEffect(() => {\n setFocusedIndex(0)\n }, [actions.length])\n\n React.useEffect(() => {\n setMounted(true)\n }, [])\n\n function handleKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Escape') {\n e.preventDefault()\n onClearSelection()\n return\n }\n\n const count = actions.length\n if (count === 0) return\n\n if (e.key === 'ArrowRight') {\n e.preventDefault()\n const next = (focusedIndex + 1) % count\n setFocusedIndex(next)\n actionRefs.current[next]?.focus()\n } else if (e.key === 'ArrowLeft') {\n e.preventDefault()\n const prev = (focusedIndex - 1 + count) % count\n setFocusedIndex(prev)\n actionRefs.current[prev]?.focus()\n } else if (e.key === 'Home') {\n e.preventDefault()\n setFocusedIndex(0)\n actionRefs.current[0]?.focus()\n } else if (e.key === 'End') {\n e.preventDefault()\n const last = count - 1\n setFocusedIndex(last)\n actionRefs.current[last]?.focus()\n }\n }\n\n if (!mounted) return null\n\n return createPortal(\n <AnimatePresence>\n {show && (\n <motion.div\n initial={{ y: 100, opacity: 0 }}\n animate={{ y: 0, opacity: 1 }}\n exit={{ y: 100, opacity: 0 }}\n transition={springs.snappy}\n className={cn(\n 'fixed bottom-ds-06 left-1/2 z-sticky -translate-x-1/2',\n 'flex items-center gap-ds-04 rounded-surface bg-surface-overlay px-ds-05 py-ds-03 shadow-floating',\n className,\n )}\n role=\"toolbar\"\n aria-label={`${count} items selected`}\n onKeyDown={handleKeyDown}\n >\n <Badge variant=\"solid\" size=\"sm\">\n {count} selected\n </Badge>\n\n {totalCount != null && totalCount > count && onSelectAll && (\n <Button variant=\"link\" size=\"xs\" onClick={onSelectAll}>\n Select all {totalCount}\n </Button>\n )}\n\n <div className=\"flex items-center gap-ds-02\">\n <AnimatePresence mode=\"popLayout\">\n {actions.map((action, i) => (\n <ActionButton\n key={action.label}\n ref={(el: HTMLDivElement | null) => { actionRefs.current[i] = el }}\n action={action}\n tabIndex={i === focusedIndex ? 0 : -1}\n />\n ))}\n </AnimatePresence>\n </div>\n\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n onClick={onClearSelection}\n aria-label=\"Clear selection\"\n >\n <Icon icon={IconX} size=\"sm\" />\n </Button>\n </motion.div>\n )}\n </AnimatePresence>,\n document.body,\n )\n}\n\nBulkActionBar.displayName = 'BulkActionBar'\n\nexport { BulkActionBar }\n"],"mappings":";;;;;;;;;;;;AA8CA,IAAM,IAAe,EAAM,WAA+E,SAAsB,EAAE,WAAQ,eAAY,GAAK;CACzJ,IAAM,CAAC,GAAY,KAAiB,EAAM,SAAS,EAAK;CAsCxD,OApCI,IAEA,kBAAC,EAAO,KAAR;EACO;EACL,SAAS;GAAE,SAAS;GAAG,OAAO;EAAK;EACnC,SAAS;GAAE,SAAS;GAAG,OAAO;EAAE;EAChC,MAAM;GAAE,SAAS;GAAG,OAAO;EAAK;EAChC,YAAY,EAAQ;EACpB,WAAU;EACA;YAPZ;GASE,kBAAC,QAAD;IAAM,WAAU;cACb,EAAO,kBAAkB;GACtB,CAAA;GACN,kBAAC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,OAAM;IACN,eAAe;KAEb,AADA,EAAc,EAAK,GACnB,EAAO,QAAQ;IACjB;cACD;GAEO,CAAA;GACR,kBAAC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAe,EAAc,EAAK;cACnC;GAEO,CAAA;EACE;MAKd,kBAAC,EAAO,KAAR;EACO;EACL,SAAS;GAAE,SAAS;GAAG,OAAO;EAAK;EACnC,SAAS;GAAE,SAAS;GAAG,OAAO;EAAE;EAChC,MAAM;GAAE,SAAS;GAAG,OAAO;EAAK;EAChC,YAAY,EAAQ;EACV;YAEV,kBAAC,GAAD;GACE,SAAQ;GACR,MAAK;GACL,OAAO,EAAO,UAAU,UAAU,UAAU;GAC5C,UAAU,EAAO;GACjB,SAAS,EAAO,6BAA6B,EAAc,EAAI,IAAI,EAAO;GAC1E,WAAW,EAAO,QAAQ,KAAA;GAC1B,UAAU;aAET,EAAO;EACF,CAAA;CACE,CAAA;AAEhB,CAAC;AAMD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;EAAE;EAC3B,YAAY,EAAQ;EACpB,WAAW,EACT,yDACA,oGACA,CACF;EACA,MAAK;EACL,cAAY,GAAG,EAAM;EACrB,WAAW;YAZb;GAcE,kBAAC,GAAD;IAAO,SAAQ;IAAQ,MAAK;cAA5B,CACG,GAAM,WACF;;GAEN,KAAc,QAAQ,IAAa,KAAS,KAC3C,kBAAC,GAAD;IAAQ,SAAQ;IAAO,MAAK;IAAK,SAAS;cAA1C,CAAuD,eACzC,CACN;;GAGV,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD;KAAiB,MAAK;eACnB,EAAQ,KAAK,GAAQ,MACpB,kBAAC,GAAD;MAEE,MAAM,MAA8B;OAAE,EAAW,QAAQ,KAAK;MAAG;MACzD;MACR,UAAU,MAAM,IAAe,IAAI;KACpC,GAJM,EAAO,KAIb,CACF;IACc,CAAA;GACd,CAAA;GAEL,kBAAC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,SAAS;IACT,cAAW;cAEX,kBAAC,GAAD;KAAM,MAAM;KAAO,MAAK;IAAM,CAAA;GACxB,CAAA;EACE;IAEC,CAAA,GACjB,SAAS,IACX,IAtDqB;AAuDvB;AAEA,EAAc,cAAc"}
1
+ {"version":3,"file":"bulk-action-bar.js","names":[],"sources":["../../src/composed/bulk-action-bar.tsx"],"sourcesContent":["'use client'\n\nimport { IconX } from '@tabler/icons-react'\nimport { AnimatePresence, motion, useReducedMotion } from 'framer-motion'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { Badge } from '../ui/badge'\nimport { Button } from '../ui/button'\nimport { Icon } from '../ui/icon'\nimport type { IconInput } from '../ui/lib/icon-input'\nimport { springs } from '../ui/lib/motion'\nimport { cn } from '../ui/lib/utils'\n\ntype ButtonColor = React.ComponentProps<typeof Button>['color']\n\nexport interface BulkActionBarAction {\n label: string\n icon?: IconInput\n onClick: () => void\n /** Any Button color. @default 'accent' (or 'error' for destructive). */\n color?: ButtonColor\n disabled?: boolean\n /** Show a pending spinner on the action (e.g. slow bulk op in flight). */\n loading?: boolean\n /** Show inline confirmation before executing the action. */\n requiresConfirmation?: boolean\n /** Custom confirmation message. @default 'Are you sure?' */\n confirmMessage?: string\n}\n\nexport interface BulkActionBarProps\n extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n // Keys whose types collide with framer-motion's HTMLMotionProps.\n 'children' | 'color' | 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onAnimationStart' | 'onAnimationEnd' | 'onAnimationIteration' | 'style'\n > {\n show: boolean\n count: number\n onClearSelection: () => void\n actions: BulkActionBarAction[]\n /** Total items available for selection (enables \"Select all\"). */\n totalCount?: number\n /** Called when the user clicks \"Select all\". */\n onSelectAll?: () => void\n}\n\n/**\n * BulkActionBar — floating selection toolbar. Follows the ARIA toolbar model:\n * a single tab stop with roving focus (Arrow keys / Home / End) across ALL\n * controls (Select-all, actions, Clear), focus landing on the real buttons so\n * Enter/Space activate them. Arrow direction mirrors under `dir=\"rtl\"`. Escape\n * clears the selection (or cancels a pending confirmation).\n */\nconst BulkActionBar = React.forwardRef<HTMLDivElement, BulkActionBarProps>(\n function BulkActionBar(\n { show, count, onClearSelection, actions, totalCount, onSelectAll, className, ...props },\n forwardedRef,\n ) {\n const reduced = useReducedMotion()\n const [mounted, setMounted] = React.useState(false)\n const [focusedIndex, setFocusedIndex] = React.useState(0)\n const [confirming, setConfirming] = React.useState<number | null>(null)\n const controlRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n const confirmRef = React.useRef<HTMLButtonElement | null>(null)\n\n const hasSelectAll = totalCount != null && totalCount > count && !!onSelectAll\n const selectAllOffset = hasSelectAll ? 1 : 0\n const total = selectAllOffset + actions.length + 1 // + Clear\n\n React.useEffect(() => { setMounted(true) }, [])\n React.useEffect(() => { setFocusedIndex(0); setConfirming(null) }, [actions.length])\n // Move focus to Confirm when a confirmation opens.\n React.useEffect(() => {\n if (confirming != null) confirmRef.current?.focus()\n }, [confirming])\n\n const focusAt = (i: number) => {\n const clamped = (i + total) % total\n setFocusedIndex(clamped)\n controlRefs.current[clamped]?.focus()\n }\n\n function handleKeyDown(e: React.KeyboardEvent<HTMLDivElement>) {\n if (e.key === 'Escape') {\n e.preventDefault()\n if (confirming != null) { setConfirming(null); focusAt(focusedIndex) }\n else onClearSelection()\n return\n }\n if (confirming != null) return // roving suspended during confirm\n const rtl = e.currentTarget.dir === 'rtl' || document.dir === 'rtl'\n const fwd = rtl ? 'ArrowLeft' : 'ArrowRight'\n const back = rtl ? 'ArrowRight' : 'ArrowLeft'\n if (e.key === fwd) { e.preventDefault(); focusAt(focusedIndex + 1) }\n else if (e.key === back) { e.preventDefault(); focusAt(focusedIndex - 1) }\n else if (e.key === 'Home') { e.preventDefault(); focusAt(0) }\n else if (e.key === 'End') { e.preventDefault(); focusAt(total - 1) }\n }\n\n if (!mounted) return null\n\n const slideTransition = reduced ? { duration: 0 } : springs.smooth\n\n return createPortal(\n <AnimatePresence>\n {show && (\n <motion.div\n ref={forwardedRef}\n initial={reduced ? { opacity: 0 } : { y: 100, opacity: 0 }}\n animate={reduced ? { opacity: 1 } : { y: 0, opacity: 1 }}\n exit={reduced ? { opacity: 0 } : { y: 100, opacity: 0 }}\n transition={slideTransition}\n className={cn(\n 'fixed bottom-ds-06 start-1/2 z-sticky -translate-x-1/2',\n 'flex items-center gap-ds-04 rounded-surface bg-surface-overlay px-ds-05 py-ds-03 shadow-floating',\n className,\n )}\n role=\"toolbar\"\n aria-label={`${count} items selected`}\n onKeyDown={handleKeyDown}\n {...props}\n >\n <Badge variant=\"solid\" size=\"sm\">{count} selected</Badge>\n\n {hasSelectAll && (\n <Button\n ref={(el) => { controlRefs.current[0] = el }}\n variant=\"link\"\n size=\"xs\"\n tabIndex={focusedIndex === 0 ? 0 : -1}\n onClick={onSelectAll}\n >\n Select all {totalCount}\n </Button>\n )}\n\n <div className=\"flex items-center gap-ds-02\">\n {actions.map((action, i) => {\n const controlIndex = selectAllOffset + i\n const isConfirming = confirming === i\n if (isConfirming) {\n return (\n <div\n key={action.label}\n role=\"group\"\n aria-live=\"assertive\"\n className=\"flex items-center gap-ds-02\"\n >\n <span className=\"whitespace-nowrap text-body-sm text-surface-fg-muted\">\n {action.confirmMessage ?? 'Are you sure?'}\n </span>\n <Button\n ref={confirmRef}\n variant=\"solid\"\n size=\"sm\"\n color={action.color === 'error' ? 'error' : (action.color ?? 'accent')}\n onClick={() => { setConfirming(null); action.onClick() }}\n >\n Confirm\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => { setConfirming(null); focusAt(controlIndex) }}\n >\n Cancel\n </Button>\n </div>\n )\n }\n return (\n <Button\n key={action.label}\n ref={(el) => { controlRefs.current[controlIndex] = el }}\n variant=\"ghost\"\n size=\"sm\"\n color={action.color ?? 'accent'}\n disabled={action.disabled}\n loading={action.loading}\n startIcon={action.icon ?? undefined}\n tabIndex={focusedIndex === controlIndex ? 0 : -1}\n onClick={action.requiresConfirmation ? () => setConfirming(i) : action.onClick}\n >\n {action.label}\n </Button>\n )\n })}\n </div>\n\n <Button\n ref={(el) => { controlRefs.current[total - 1] = el }}\n variant=\"ghost\"\n size=\"icon-sm\"\n tabIndex={focusedIndex === total - 1 ? 0 : -1}\n onClick={onClearSelection}\n aria-label=\"Clear selection\"\n >\n <Icon icon={IconX} size=\"sm\" />\n </Button>\n </motion.div>\n )}\n </AnimatePresence>,\n document.body,\n )\n },\n)\nBulkActionBar.displayName = 'BulkActionBar'\n\nexport { BulkActionBar }\n"],"mappings":";;;;;;;;;;;;AAsDA,IAAM,IAAgB,EAAM,WAC1B,SACE,EAAE,SAAM,UAAO,qBAAkB,YAAS,eAAY,gBAAa,cAAW,GAAG,KACjF,GACA;CACA,IAAM,IAAU,EAAiB,GAC3B,CAAC,GAAS,KAAc,EAAM,SAAS,EAAK,GAC5C,CAAC,GAAc,KAAmB,EAAM,SAAS,CAAC,GAClD,CAAC,GAAY,KAAiB,EAAM,SAAwB,IAAI,GAChE,IAAc,EAAM,OAAwC,C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L,OAAO,EAAO,SAAS;MACvB,UAAU,EAAO;MACjB,SAAS,EAAO;MAChB,WAAW,EAAO,QAAQ,KAAA;MAC1B,UAAU,MAAiB,IAAe,IAAI;MAC9C,SAAS,EAAO,6BAA6B,EAAc,CAAC,IAAI,EAAO;gBAEtE,EAAO;KACF,GAZD,EAAO,KAYN;IAEZ,CAAC;GACE,CAAA;GAEL,kBAAC,GAAD;IACE,MAAM,MAAO;KAAE,EAAY,QAAQ,IAAQ,KAAK;IAAG;IACnD,SAAQ;IACR,MAAK;IACL,UAAU,MAAiB,IAAQ,IAAI,IAAI;IAC3C,SAAS;IACT,cAAW;cAEX,kBAAC,GAAD;KAAM,MAAM;KAAO,MAAK;IAAM,CAAA;GACxB,CAAA;EACE;IAEC,CAAA,GACjB,SAAS,IACX;AACF,CACF;AACA,EAAc,cAAc"}
@@ -1,5 +1,4 @@
1
- "use client";
2
- import { IconInput } from '../ui/lib/icon-input';
1
+ import { IconInput } from '../ui/lib/icon-input.js';
3
2
  import * as React from 'react';
4
3
  export interface CommandItem {
5
4
  id: string;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface ConfirmDialogProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
4
3
  /** Whether the dialog is open */
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface CalendarEvent {
4
3
  date: Date;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  /**
4
3
  * A popover-based date picker with day/month/year drill-down views.
@@ -1,5 +1,4 @@
1
- "use client";
2
- import { PresetKey } from './presets';
1
+ import { PresetKey } from './presets.js';
3
2
  import * as React from 'react';
4
3
  export interface DateRangePickerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'onChange'> {
5
4
  startDate?: Date | null;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface DateTimePickerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'onChange' | 'value'> {
4
3
  /** The currently selected date and time. */
@@ -1,19 +1,18 @@
1
- "use client";
2
- export type { CalendarEvent, CalendarGridProps } from './calendar-grid';
3
- export { CalendarGrid } from './calendar-grid';
4
- export type { DatePickerProps } from './date-picker';
5
- export { DatePicker } from './date-picker';
6
- export type { DateRangePickerProps } from './date-range-picker';
7
- export { DateRangePicker } from './date-range-picker';
8
- export type { DateTimePickerProps } from './date-time-picker';
9
- export { DateTimePicker } from './date-time-picker';
10
- export type { MonthPickerProps } from './month-picker';
11
- export { MonthPicker } from './month-picker';
12
- export type { PresetKey, PresetsProps } from './presets';
13
- export { Presets } from './presets';
14
- export type { TimePickerProps } from './time-picker';
15
- export { TimePicker } from './time-picker';
16
- export { useCalendar } from './use-calendar';
17
- export type { YearPickerProps } from './year-picker';
18
- export { YearPicker } from './year-picker';
1
+ export type { CalendarEvent, CalendarGridProps } from './calendar-grid.js';
2
+ export { CalendarGrid } from './calendar-grid.js';
3
+ export type { DatePickerProps } from './date-picker.js';
4
+ export { DatePicker } from './date-picker.js';
5
+ export type { DateRangePickerProps } from './date-range-picker.js';
6
+ export { DateRangePicker } from './date-range-picker.js';
7
+ export type { DateTimePickerProps } from './date-time-picker.js';
8
+ export { DateTimePicker } from './date-time-picker.js';
9
+ export type { MonthPickerProps } from './month-picker.js';
10
+ export { MonthPicker } from './month-picker.js';
11
+ export type { PresetKey, PresetsProps } from './presets.js';
12
+ export { Presets } from './presets.js';
13
+ export type { TimePickerProps } from './time-picker.js';
14
+ export { TimePicker } from './time-picker.js';
15
+ export { useCalendar } from './use-calendar.js';
16
+ export type { YearPickerProps } from './year-picker.js';
17
+ export { YearPicker } from './year-picker.js';
19
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface MonthPickerProps extends React.ComponentPropsWithoutRef<'div'> {
4
3
  currentYear: number;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export type PresetKey = 'today' | 'yesterday' | 'last7days' | 'last30days' | 'thisMonth' | 'lastMonth' | 'thisYear';
4
3
  export interface PresetsProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onSelect'> {
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface TimePickerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'onChange' | 'value'> {
4
3
  /** The currently selected time (as a Date object). */
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  export declare function useCalendar(initialMonth?: Date): {
3
2
  currentMonth: Date;
4
3
  setCurrentMonth: import('react').Dispatch<import('react').SetStateAction<Date>>;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface YearPickerProps extends React.ComponentPropsWithoutRef<'div'> {
4
3
  currentYear: number;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface DeadlineIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
4
3
  deadline: Date | string;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export type DiffMode = 'inline' | 'split' | 'fields';
4
3
  export type DiffGranularity = 'line' | 'word';
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface EmojiData {
4
3
  id: string;
@@ -1,5 +1,4 @@
1
- "use client";
2
- import { IconInput } from '../ui/lib/icon-input';
1
+ import { IconInput } from '../ui/lib/icon-input.js';
3
2
  import * as React from 'react';
4
3
  export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
5
4
  /** Icon. Accepts any `IconInput`. Falls back to the Devalok chakra glyph. */
@@ -1,18 +1,27 @@
1
- "use client";
2
1
  import * as React from 'react';
3
2
  export interface ErrorDisplayProps extends React.ComponentPropsWithoutRef<'div'> {
4
3
  error: unknown;
5
4
  onReset?: () => void;
5
+ /** Custom recovery actions. When set, replaces the default "Try Again" button. */
6
+ actions?: React.ReactNode;
7
+ /** Center in a full-viewport-height region (error page). @default true */
8
+ fullPage?: boolean;
9
+ /** Move focus to the recovery button on mount (set by ErrorBoundary on swap). @default false */
10
+ autoFocusReset?: boolean;
6
11
  }
7
12
  declare const ErrorDisplay: React.ForwardRefExoticComponent<ErrorDisplayProps & React.RefAttributes<HTMLDivElement>>;
8
13
  interface ErrorBoundaryProps {
9
14
  children: React.ReactNode;
10
- /** Optional callback when the user clicks "Try Again" */
15
+ /** Called when the user clicks "Try Again" (after the boundary resets). */
11
16
  onReset?: () => void;
12
- /** Optional custom fallback receives the caught error. Defaults to ErrorDisplay. */
17
+ /** Called when an error is caught wire your logger/Sentry here. */
18
+ onError?: (error: unknown, info: React.ErrorInfo) => void;
19
+ /** Auto-reset when any value in this array changes (react-error-boundary parity). */
20
+ resetKeys?: unknown[];
21
+ /** Custom fallback — receives the caught error + a reset callback. Defaults to ErrorDisplay. */
13
22
  fallback?: (props: {
14
23
  error: unknown;
15
- onReset?: () => void;
24
+ onReset: () => void;
16
25
  }) => React.ReactNode;
17
26
  }
18
27
  interface ErrorBoundaryState {
@@ -21,6 +30,8 @@ interface ErrorBoundaryState {
21
30
  declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
22
31
  constructor(props: ErrorBoundaryProps);
23
32
  static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
33
+ componentDidCatch(error: unknown, info: React.ErrorInfo): void;
34
+ componentDidUpdate(prev: ErrorBoundaryProps): void;
24
35
  private handleReset;
25
36
  render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
26
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/composed/error-boundary.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ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O,CAAA;IAClB,gGAAgG;IAChG,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAgDD,QAAA,MAAM,YAAY,0FAuDjB,CAAA;AAGD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,qEAAqE;IACrE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAA;IACzD,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,EAAE,CAAA;IACrB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/E;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CACtB;AAQD,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACrE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB;IAInE,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;IAIvD,kBAAkB,CAAC,IAAI,EAAE,kBAAkB;IAO3C,OAAO,CAAC,WAAW,CAGlB;IAED,MAAM;CASP;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA;AACtC,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
@@ -19,9 +19,12 @@ function d(e) {
19
19
  if (typeof e == "string") return e;
20
20
  }
21
21
  function f(e) {
22
- if (e instanceof Error) return e.stack;
22
+ return e instanceof Error ? e.stack : void 0;
23
23
  }
24
- function p(e) {
24
+ function p() {
25
+ return typeof process < "u" && !!process.env && process.env.NODE_ENV === "development";
26
+ }
27
+ function m(e) {
25
28
  switch (e) {
26
29
  case 404: return {
27
30
  icon: c,
@@ -53,71 +56,84 @@ function p(e) {
53
56
  };
54
57
  }
55
58
  }
56
- var m = r.forwardRef(function({ error: r, onReset: o, className: s, ...c }, l) {
57
- let m = u(r), h = d(r), g = f(r), _ = typeof process < "u" && process.env && process.env.NODE_ENV === "development", v = p(m), y = v.icon;
58
- return /* @__PURE__ */ i("div", {
59
- ref: l,
60
- ...c,
61
- className: e("flex min-h-[60vh] items-center justify-center p-ds-05", s),
59
+ var h = r.forwardRef(function({ error: o, onReset: s, actions: c, fullPage: l = !0, autoFocusReset: h = !1, className: g, ..._ }, v) {
60
+ let y = u(o), b = d(o), x = f(o), S = p(), C = m(y), w = C.icon, T = r.useRef(null), E = S && b || C.message;
61
+ return r.useEffect(() => {
62
+ h && T.current?.focus();
63
+ }, [h]), /* @__PURE__ */ i("div", {
64
+ ref: v,
65
+ ..._,
66
+ className: e("flex items-center justify-center p-ds-05", l && "min-h-[60vh]", g),
62
67
  children: /* @__PURE__ */ a("div", {
68
+ role: "alert",
63
69
  className: "flex w-full max-w-lg flex-col items-center gap-ds-06 rounded-overlay-lg bg-surface-raised p-ds-07 text-center shadow-raised",
64
70
  children: [
65
71
  /* @__PURE__ */ i("div", {
66
- className: e("flex h-ds-lg w-ds-lg items-center justify-center rounded-bubble", v.bgClass),
72
+ className: e("flex h-ds-lg w-ds-lg items-center justify-center rounded-bubble", C.bgClass),
67
73
  children: /* @__PURE__ */ i(t, {
68
- icon: y,
74
+ icon: w,
69
75
  size: "2xl",
70
- className: v.iconClass
76
+ className: C.iconClass
71
77
  })
72
78
  }),
73
79
  /* @__PURE__ */ a("div", {
74
80
  className: "flex flex-col gap-ds-03",
75
81
  children: [
76
- m && /* @__PURE__ */ a("span", {
82
+ y && /* @__PURE__ */ a("span", {
77
83
  className: "text-body-sm text-surface-fg-subtle",
78
- children: ["Error ", m]
84
+ children: ["Error ", y]
79
85
  }),
80
86
  /* @__PURE__ */ i("h2", {
81
87
  className: "text-heading-md font-semibold text-surface-fg",
82
- children: v.title
88
+ children: C.title
83
89
  }),
84
90
  /* @__PURE__ */ i("p", {
85
91
  className: "text-body-lg text-surface-fg-subtle",
86
- children: h || v.message
92
+ children: E
87
93
  })
88
94
  ]
89
95
  }),
90
- o && /* @__PURE__ */ i("div", {
96
+ (c || s) && /* @__PURE__ */ i("div", {
91
97
  className: "flex items-center gap-ds-04",
92
- children: /* @__PURE__ */ i(n, {
98
+ children: c ?? /* @__PURE__ */ i(n, {
99
+ ref: T,
93
100
  variant: "soft",
94
101
  size: "md",
95
- onClick: o,
102
+ onClick: s,
96
103
  children: "Try Again"
97
104
  })
98
105
  }),
99
- _ && g && /* @__PURE__ */ a("div", {
100
- className: "w-full overflow-auto rounded-surface border border-card-strong bg-surface-raised p-ds-05 text-left",
106
+ S && x && /* @__PURE__ */ a("div", {
107
+ className: "w-full overflow-auto rounded-surface border border-card bg-surface-raised p-ds-05 text-left",
101
108
  children: [/* @__PURE__ */ i("p", {
102
109
  className: "text-body-sm mb-ds-03 font-semibold text-surface-fg",
103
110
  children: "Stack Trace (development only)"
104
111
  }), /* @__PURE__ */ i("pre", {
105
112
  className: "whitespace-pre-wrap text-body-sm text-surface-fg-subtle",
106
- children: g
113
+ children: x
107
114
  })]
108
115
  })
109
116
  ]
110
117
  })
111
118
  });
112
119
  });
113
- m.displayName = "ErrorDisplay";
114
- var h = class extends r.Component {
120
+ h.displayName = "ErrorDisplay";
121
+ function g(e, t) {
122
+ return !e || !t ? !1 : e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
123
+ }
124
+ var _ = class extends r.Component {
115
125
  constructor(e) {
116
126
  super(e), this.state = { error: null };
117
127
  }
118
128
  static getDerivedStateFromError(e) {
119
129
  return { error: e };
120
130
  }
131
+ componentDidCatch(e, t) {
132
+ this.props.onError?.(e, t);
133
+ }
134
+ componentDidUpdate(e) {
135
+ this.state.error !== null && g(e.resetKeys, this.props.resetKeys) && this.setState({ error: null });
136
+ }
121
137
  handleReset = () => {
122
138
  this.setState({ error: null }), this.props.onReset?.();
123
139
  };
@@ -125,11 +141,12 @@ var h = class extends r.Component {
125
141
  return this.state.error === null ? this.props.children : this.props.fallback ? this.props.fallback({
126
142
  error: this.state.error,
127
143
  onReset: this.handleReset
128
- }) : /* @__PURE__ */ i(m, {
144
+ }) : /* @__PURE__ */ i(h, {
129
145
  error: this.state.error,
130
- onReset: this.handleReset
146
+ onReset: this.handleReset,
147
+ autoFocusReset: !0
131
148
  });
132
149
  }
133
150
  };
134
151
  //#endregion
135
- export { h as ErrorBoundary, m as ErrorDisplay };
152
+ export { _ as ErrorBoundary, h as ErrorDisplay };