@lincyaw/aegis-ui 0.9.4 → 0.11.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 (748) hide show
  1. package/dist/agent/ask/AskOverlay.cjs +3 -1
  2. package/dist/agent/ask/AskOverlay.cjs.map +1 -1
  3. package/dist/agent/ask/AskOverlay.d.ts +17 -1
  4. package/dist/agent/ask/AskOverlay.js +115 -58
  5. package/dist/agent/ask/AskOverlay.js.map +1 -1
  6. package/dist/agent/ask/AskPanel.cjs +1 -1
  7. package/dist/agent/ask/AskPanel.cjs.map +1 -1
  8. package/dist/agent/ask/AskPanel.d.ts +18 -3
  9. package/dist/agent/ask/AskPanel.js +147 -119
  10. package/dist/agent/ask/AskPanel.js.map +1 -1
  11. package/dist/agent/chat/chat.cjs +1 -1
  12. package/dist/agent/chat/chat.cjs.map +1 -1
  13. package/dist/agent/chat/chat.d.ts +1 -1
  14. package/dist/agent/chat/chat.js +3 -5
  15. package/dist/agent/chat/chat.js.map +1 -1
  16. package/dist/agent/chat/useAgentChat.cjs +1 -1
  17. package/dist/agent/chat/useAgentChat.cjs.map +1 -1
  18. package/dist/agent/chat/useAgentChat.d.ts +2 -0
  19. package/dist/agent/chat/useAgentChat.js +8 -4
  20. package/dist/agent/chat/useAgentChat.js.map +1 -1
  21. package/dist/agent/core/AegisRuntimeProvider.cjs.map +1 -1
  22. package/dist/agent/core/AegisRuntimeProvider.d.ts +2 -2
  23. package/dist/agent/core/AegisRuntimeProvider.js.map +1 -1
  24. package/dist/agent/core/hooks.cjs +1 -1
  25. package/dist/agent/core/hooks.cjs.map +1 -1
  26. package/dist/agent/core/hooks.js +21 -20
  27. package/dist/agent/core/hooks.js.map +1 -1
  28. package/dist/agent/core/runtime.cjs +1 -1
  29. package/dist/agent/core/runtime.cjs.map +1 -1
  30. package/dist/agent/core/runtime.d.ts +28 -9
  31. package/dist/agent/core/runtime.js +435 -268
  32. package/dist/agent/core/runtime.js.map +1 -1
  33. package/dist/agent/core/types.d.ts +65 -10
  34. package/dist/agent/index.d.ts +4 -3
  35. package/dist/commands/CommandProvider.cjs +1 -1
  36. package/dist/commands/CommandProvider.cjs.map +1 -1
  37. package/dist/commands/CommandProvider.js +33 -37
  38. package/dist/commands/CommandProvider.js.map +1 -1
  39. package/dist/commands/commandContext.cjs +1 -1
  40. package/dist/commands/commandContext.cjs.map +1 -1
  41. package/dist/commands/commandContext.d.ts +6 -6
  42. package/dist/commands/commandContext.js +3 -17
  43. package/dist/commands/commandContext.js.map +1 -1
  44. package/dist/commands/index.d.ts +1 -1
  45. package/dist/commands/useCommands.cjs +1 -1
  46. package/dist/commands/useCommands.cjs.map +1 -1
  47. package/dist/commands/useCommands.d.ts +4 -2
  48. package/dist/commands/useCommands.js +21 -5
  49. package/dist/commands/useCommands.js.map +1 -1
  50. package/dist/commands/useRegisterCommands.cjs +2 -1
  51. package/dist/commands/useRegisterCommands.cjs.map +1 -1
  52. package/dist/commands/useRegisterCommands.d.ts +3 -2
  53. package/dist/commands/useRegisterCommands.js +35 -8
  54. package/dist/commands/useRegisterCommands.js.map +1 -1
  55. package/dist/components/ui/AgentPanel.cjs +1 -1
  56. package/dist/components/ui/AgentPanel.cjs.map +1 -1
  57. package/dist/components/ui/AgentPanel.js +15 -14
  58. package/dist/components/ui/AgentPanel.js.map +1 -1
  59. package/dist/components/ui/Alert.cjs +1 -1
  60. package/dist/components/ui/Alert.cjs.map +1 -1
  61. package/dist/components/ui/Alert.js +11 -11
  62. package/dist/components/ui/Alert.js.map +1 -1
  63. package/dist/components/ui/Avatar.cjs +1 -1
  64. package/dist/components/ui/Avatar.cjs.map +1 -1
  65. package/dist/components/ui/Avatar.js +21 -19
  66. package/dist/components/ui/Avatar.js.map +1 -1
  67. package/dist/components/ui/BlastRadiusBar.cjs +1 -1
  68. package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
  69. package/dist/components/ui/BlastRadiusBar.d.ts +16 -2
  70. package/dist/components/ui/BlastRadiusBar.js +27 -20
  71. package/dist/components/ui/BlastRadiusBar.js.map +1 -1
  72. package/dist/components/ui/Button.cjs.map +1 -1
  73. package/dist/components/ui/Button.d.ts +1 -1
  74. package/dist/components/ui/Button.js.map +1 -1
  75. package/dist/components/ui/ChatComposer.cjs +1 -1
  76. package/dist/components/ui/ChatComposer.cjs.map +1 -1
  77. package/dist/components/ui/ChatComposer.js +30 -29
  78. package/dist/components/ui/ChatComposer.js.map +1 -1
  79. package/dist/components/ui/ChatSessionList.cjs +1 -1
  80. package/dist/components/ui/ChatSessionList.cjs.map +1 -1
  81. package/dist/components/ui/ChatSessionList.js +136 -157
  82. package/dist/components/ui/ChatSessionList.js.map +1 -1
  83. package/dist/components/ui/Checkbox.cjs +1 -1
  84. package/dist/components/ui/Checkbox.cjs.map +1 -1
  85. package/dist/components/ui/Checkbox.d.ts +7 -1
  86. package/dist/components/ui/Checkbox.js +26 -20
  87. package/dist/components/ui/Checkbox.js.map +1 -1
  88. package/dist/components/ui/Chip.cjs +1 -1
  89. package/dist/components/ui/Chip.cjs.map +1 -1
  90. package/dist/components/ui/Chip.d.ts +6 -1
  91. package/dist/components/ui/Chip.js +20 -18
  92. package/dist/components/ui/Chip.js.map +1 -1
  93. package/dist/components/ui/ChoiceCardGroup.cjs +2 -0
  94. package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -0
  95. package/dist/components/ui/ChoiceCardGroup.d.ts +34 -0
  96. package/dist/components/ui/ChoiceCardGroup.js +56 -0
  97. package/dist/components/ui/ChoiceCardGroup.js.map +1 -0
  98. package/dist/components/ui/CodeBlock.cjs +2 -2
  99. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  100. package/dist/components/ui/CodeBlock.js +31 -27
  101. package/dist/components/ui/CodeBlock.js.map +1 -1
  102. package/dist/components/ui/CodeEditor.cjs +1 -1
  103. package/dist/components/ui/CodeEditor.cjs.map +1 -1
  104. package/dist/components/ui/CodeEditor.d.ts +15 -4
  105. package/dist/components/ui/CodeEditor.js +243 -70
  106. package/dist/components/ui/CodeEditor.js.map +1 -1
  107. package/dist/components/ui/Collapse.cjs +1 -1
  108. package/dist/components/ui/Collapse.cjs.map +1 -1
  109. package/dist/components/ui/Collapse.js +23 -23
  110. package/dist/components/ui/Collapse.js.map +1 -1
  111. package/dist/components/ui/ColumnChart.cjs +1 -1
  112. package/dist/components/ui/ColumnChart.cjs.map +1 -1
  113. package/dist/components/ui/ColumnChart.js +21 -20
  114. package/dist/components/ui/ColumnChart.js.map +1 -1
  115. package/dist/components/ui/CommandInvocationCard.cjs +1 -1
  116. package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
  117. package/dist/components/ui/CommandInvocationCard.js +28 -31
  118. package/dist/components/ui/CommandInvocationCard.js.map +1 -1
  119. package/dist/components/ui/CommandPalette.cjs +1 -1
  120. package/dist/components/ui/CommandPalette.cjs.map +1 -1
  121. package/dist/components/ui/CommandPalette.d.ts +23 -1
  122. package/dist/components/ui/CommandPalette.js +146 -121
  123. package/dist/components/ui/CommandPalette.js.map +1 -1
  124. package/dist/components/ui/CommitGraph.cjs +2 -0
  125. package/dist/components/ui/CommitGraph.cjs.map +1 -0
  126. package/dist/components/ui/CommitGraph.d.ts +79 -0
  127. package/dist/components/ui/CommitGraph.js +383 -0
  128. package/dist/components/ui/CommitGraph.js.map +1 -0
  129. package/dist/components/ui/ContentInspectorDialog.cjs +1 -3
  130. package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
  131. package/dist/components/ui/ContentInspectorDialog.d.ts +4 -10
  132. package/dist/components/ui/ContentInspectorDialog.js +42 -201
  133. package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
  134. package/dist/components/ui/ContentPreview.cjs +3 -0
  135. package/dist/components/ui/ContentPreview.cjs.map +1 -0
  136. package/dist/components/ui/ContentPreview.d.ts +13 -0
  137. package/dist/components/ui/ContentPreview.js +133 -0
  138. package/dist/components/ui/ContentPreview.js.map +1 -0
  139. package/dist/components/ui/CopyGlyph.cjs +2 -0
  140. package/dist/components/ui/CopyGlyph.cjs.map +1 -0
  141. package/dist/components/ui/CopyGlyph.d.ts +7 -0
  142. package/dist/components/ui/CopyGlyph.js +48 -0
  143. package/dist/components/ui/CopyGlyph.js.map +1 -0
  144. package/dist/components/ui/DangerZone.cjs +1 -1
  145. package/dist/components/ui/DangerZone.cjs.map +1 -1
  146. package/dist/components/ui/DangerZone.js +13 -12
  147. package/dist/components/ui/DangerZone.js.map +1 -1
  148. package/dist/components/ui/DataList.cjs +1 -1
  149. package/dist/components/ui/DataList.cjs.map +1 -1
  150. package/dist/components/ui/DataList.d.ts +7 -1
  151. package/dist/components/ui/DataList.js +89 -33
  152. package/dist/components/ui/DataList.js.map +1 -1
  153. package/dist/components/ui/DataTable.cjs +1 -1
  154. package/dist/components/ui/DataTable.cjs.map +1 -1
  155. package/dist/components/ui/DataTable.d.ts +22 -18
  156. package/dist/components/ui/DataTable.js +279 -341
  157. package/dist/components/ui/DataTable.js.map +1 -1
  158. package/dist/components/ui/DropdownMenu.cjs +1 -1
  159. package/dist/components/ui/DropdownMenu.cjs.map +1 -1
  160. package/dist/components/ui/DropdownMenu.d.ts +8 -1
  161. package/dist/components/ui/DropdownMenu.js +63 -46
  162. package/dist/components/ui/DropdownMenu.js.map +1 -1
  163. package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
  164. package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
  165. package/dist/components/ui/EnvironmentSwitcher.js +26 -24
  166. package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
  167. package/dist/components/ui/ErrorState.cjs +1 -1
  168. package/dist/components/ui/ErrorState.cjs.map +1 -1
  169. package/dist/components/ui/ErrorState.d.ts +1 -0
  170. package/dist/components/ui/ErrorState.js +1 -1
  171. package/dist/components/ui/ErrorState.js.map +1 -1
  172. package/dist/components/ui/EventTable.cjs +1 -1
  173. package/dist/components/ui/EventTable.cjs.map +1 -1
  174. package/dist/components/ui/EventTable.d.ts +16 -2
  175. package/dist/components/ui/EventTable.js +198 -165
  176. package/dist/components/ui/EventTable.js.map +1 -1
  177. package/dist/components/ui/FileDropzone.cjs +1 -1
  178. package/dist/components/ui/FileDropzone.cjs.map +1 -1
  179. package/dist/components/ui/FileDropzone.d.ts +3 -21
  180. package/dist/components/ui/FileDropzone.js +42 -67
  181. package/dist/components/ui/FileDropzone.js.map +1 -1
  182. package/dist/components/ui/FilePreview.cjs +1 -1
  183. package/dist/components/ui/FilePreview.cjs.map +1 -1
  184. package/dist/components/ui/FilePreview.d.ts +4 -1
  185. package/dist/components/ui/FilePreview.js +62 -60
  186. package/dist/components/ui/FilePreview.js.map +1 -1
  187. package/dist/components/ui/FileTree.cjs +1 -1
  188. package/dist/components/ui/FileTree.cjs.map +1 -1
  189. package/dist/components/ui/FileTree.d.ts +18 -2
  190. package/dist/components/ui/FileTree.js +141 -110
  191. package/dist/components/ui/FileTree.js.map +1 -1
  192. package/dist/components/ui/FolderDropzone.cjs +1 -1
  193. package/dist/components/ui/FolderDropzone.cjs.map +1 -1
  194. package/dist/components/ui/FolderDropzone.d.ts +10 -1
  195. package/dist/components/ui/FolderDropzone.js +140 -130
  196. package/dist/components/ui/FolderDropzone.js.map +1 -1
  197. package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
  198. package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
  199. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -0
  200. package/dist/components/ui/ForgotPasswordForm.js +23 -20
  201. package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
  202. package/dist/components/ui/FormRow.cjs +1 -1
  203. package/dist/components/ui/FormRow.cjs.map +1 -1
  204. package/dist/components/ui/FormRow.d.ts +32 -2
  205. package/dist/components/ui/FormRow.js +33 -13
  206. package/dist/components/ui/FormRow.js.map +1 -1
  207. package/dist/components/ui/HeadlineStat.cjs +1 -1
  208. package/dist/components/ui/HeadlineStat.cjs.map +1 -1
  209. package/dist/components/ui/HeadlineStat.js +6 -5
  210. package/dist/components/ui/HeadlineStat.js.map +1 -1
  211. package/dist/components/ui/InboxPage.cjs +1 -1
  212. package/dist/components/ui/InboxPage.cjs.map +1 -1
  213. package/dist/components/ui/InboxPage.d.ts +25 -2
  214. package/dist/components/ui/InboxPage.js +93 -77
  215. package/dist/components/ui/InboxPage.js.map +1 -1
  216. package/dist/components/ui/KeyValueList.cjs +1 -1
  217. package/dist/components/ui/KeyValueList.cjs.map +1 -1
  218. package/dist/components/ui/KeyValueList.d.ts +6 -5
  219. package/dist/components/ui/KeyValueList.js +14 -17
  220. package/dist/components/ui/KeyValueList.js.map +1 -1
  221. package/dist/components/ui/LoginForm.cjs +1 -1
  222. package/dist/components/ui/LoginForm.cjs.map +1 -1
  223. package/dist/components/ui/LoginForm.d.ts +1 -0
  224. package/dist/components/ui/LoginForm.js +63 -55
  225. package/dist/components/ui/LoginForm.js.map +1 -1
  226. package/dist/components/ui/Markdown.cjs +1 -1
  227. package/dist/components/ui/Markdown.cjs.map +1 -1
  228. package/dist/components/ui/Markdown.d.ts +3 -2
  229. package/dist/components/ui/Markdown.js +57 -49
  230. package/dist/components/ui/Markdown.js.map +1 -1
  231. package/dist/components/ui/MdxDocument.cjs +1 -1
  232. package/dist/components/ui/MdxDocument.cjs.map +1 -1
  233. package/dist/components/ui/MdxDocument.d.ts +7 -2
  234. package/dist/components/ui/MdxDocument.js +34 -49
  235. package/dist/components/ui/MdxDocument.js.map +1 -1
  236. package/dist/components/ui/MetadataList.cjs +1 -1
  237. package/dist/components/ui/MetadataList.cjs.map +1 -1
  238. package/dist/components/ui/MetadataList.d.ts +7 -1
  239. package/dist/components/ui/MetadataList.js +29 -20
  240. package/dist/components/ui/MetadataList.js.map +1 -1
  241. package/dist/components/ui/MetricCard.cjs +1 -1
  242. package/dist/components/ui/MetricCard.cjs.map +1 -1
  243. package/dist/components/ui/MetricCard.js +16 -16
  244. package/dist/components/ui/MetricCard.js.map +1 -1
  245. package/dist/components/ui/MonoValue.cjs +1 -1
  246. package/dist/components/ui/MonoValue.cjs.map +1 -1
  247. package/dist/components/ui/MonoValue.d.ts +12 -1
  248. package/dist/components/ui/MonoValue.js +19 -17
  249. package/dist/components/ui/MonoValue.js.map +1 -1
  250. package/dist/components/ui/NotificationBell.cjs +1 -1
  251. package/dist/components/ui/NotificationBell.cjs.map +1 -1
  252. package/dist/components/ui/NotificationBell.d.ts +31 -3
  253. package/dist/components/ui/NotificationBell.js +127 -71
  254. package/dist/components/ui/NotificationBell.js.map +1 -1
  255. package/dist/components/ui/NumberField.cjs +2 -0
  256. package/dist/components/ui/NumberField.cjs.map +1 -0
  257. package/dist/components/ui/NumberField.d.ts +34 -0
  258. package/dist/components/ui/NumberField.js +80 -0
  259. package/dist/components/ui/NumberField.js.map +1 -0
  260. package/dist/components/ui/ObjectBrowser.cjs +1 -1
  261. package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
  262. package/dist/components/ui/ObjectBrowser.js +107 -94
  263. package/dist/components/ui/ObjectBrowser.js.map +1 -1
  264. package/dist/components/ui/ObjectInspector.cjs +1 -1
  265. package/dist/components/ui/ObjectInspector.cjs.map +1 -1
  266. package/dist/components/ui/ObjectInspector.d.ts +5 -0
  267. package/dist/components/ui/ObjectInspector.js +61 -69
  268. package/dist/components/ui/ObjectInspector.js.map +1 -1
  269. package/dist/components/ui/PageSizeSelect.cjs +1 -1
  270. package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
  271. package/dist/components/ui/PageSizeSelect.d.ts +3 -4
  272. package/dist/components/ui/PageSizeSelect.js +30 -29
  273. package/dist/components/ui/PageSizeSelect.js.map +1 -1
  274. package/dist/components/ui/Pagination.cjs +1 -1
  275. package/dist/components/ui/Pagination.cjs.map +1 -1
  276. package/dist/components/ui/Pagination.d.ts +16 -6
  277. package/dist/components/ui/Pagination.js +58 -45
  278. package/dist/components/ui/Pagination.js.map +1 -1
  279. package/dist/components/ui/Panel.cjs +1 -1
  280. package/dist/components/ui/Panel.cjs.map +1 -1
  281. package/dist/components/ui/Panel.d.ts +17 -4
  282. package/dist/components/ui/Panel.js +53 -40
  283. package/dist/components/ui/Panel.js.map +1 -1
  284. package/dist/components/ui/ParquetViewer.cjs +1 -1
  285. package/dist/components/ui/ParquetViewer.cjs.map +1 -1
  286. package/dist/components/ui/ParquetViewer.d.ts +1 -1
  287. package/dist/components/ui/ParquetViewer.js +121 -120
  288. package/dist/components/ui/ParquetViewer.js.map +1 -1
  289. package/dist/components/ui/PasswordField.cjs +1 -1
  290. package/dist/components/ui/PasswordField.cjs.map +1 -1
  291. package/dist/components/ui/PasswordField.js +28 -27
  292. package/dist/components/ui/PasswordField.js.map +1 -1
  293. package/dist/components/ui/PickerField.cjs +1 -1
  294. package/dist/components/ui/PickerField.cjs.map +1 -1
  295. package/dist/components/ui/PickerField.d.ts +25 -6
  296. package/dist/components/ui/PickerField.js +20 -17
  297. package/dist/components/ui/PickerField.js.map +1 -1
  298. package/dist/components/ui/ProjectSelector.cjs +1 -1
  299. package/dist/components/ui/ProjectSelector.cjs.map +1 -1
  300. package/dist/components/ui/ProjectSelector.js +39 -36
  301. package/dist/components/ui/ProjectSelector.js.map +1 -1
  302. package/dist/components/ui/QueryAutocomplete.cjs +1 -1
  303. package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
  304. package/dist/components/ui/QueryAutocomplete.d.ts +7 -1
  305. package/dist/components/ui/QueryAutocomplete.js +150 -127
  306. package/dist/components/ui/QueryAutocomplete.js.map +1 -1
  307. package/dist/components/ui/RegisterForm.cjs +1 -1
  308. package/dist/components/ui/RegisterForm.cjs.map +1 -1
  309. package/dist/components/ui/RegisterForm.d.ts +1 -0
  310. package/dist/components/ui/RegisterForm.js +52 -43
  311. package/dist/components/ui/RegisterForm.js.map +1 -1
  312. package/dist/components/ui/ResizableSidePanel.cjs +1 -1
  313. package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
  314. package/dist/components/ui/ResizableSidePanel.js +41 -40
  315. package/dist/components/ui/ResizableSidePanel.js.map +1 -1
  316. package/dist/components/ui/RollingValue.cjs +2 -0
  317. package/dist/components/ui/RollingValue.cjs.map +1 -0
  318. package/dist/components/ui/RollingValue.d.ts +14 -0
  319. package/dist/components/ui/RollingValue.js +39 -0
  320. package/dist/components/ui/RollingValue.js.map +1 -0
  321. package/dist/components/ui/SavedQueryBar.cjs +1 -1
  322. package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
  323. package/dist/components/ui/SavedQueryBar.d.ts +9 -3
  324. package/dist/components/ui/SavedQueryBar.js +390 -291
  325. package/dist/components/ui/SavedQueryBar.js.map +1 -1
  326. package/dist/components/ui/ScrollStory.cjs +1 -2
  327. package/dist/components/ui/ScrollStory.cjs.map +1 -1
  328. package/dist/components/ui/ScrollStory.js +57 -75
  329. package/dist/components/ui/ScrollStory.js.map +1 -1
  330. package/dist/components/ui/SearchInput.cjs +1 -1
  331. package/dist/components/ui/SearchInput.cjs.map +1 -1
  332. package/dist/components/ui/SearchInput.d.ts +5 -1
  333. package/dist/components/ui/SearchInput.js +28 -24
  334. package/dist/components/ui/SearchInput.js.map +1 -1
  335. package/dist/components/ui/Select.cjs +1 -1
  336. package/dist/components/ui/Select.cjs.map +1 -1
  337. package/dist/components/ui/Select.d.ts +4 -2
  338. package/dist/components/ui/Select.js +34 -31
  339. package/dist/components/ui/Select.js.map +1 -1
  340. package/dist/components/ui/ServiceMap.cjs +1 -1
  341. package/dist/components/ui/ServiceMap.cjs.map +1 -1
  342. package/dist/components/ui/ServiceMap.d.ts +57 -2
  343. package/dist/components/ui/ServiceMap.js +374 -117
  344. package/dist/components/ui/ServiceMap.js.map +1 -1
  345. package/dist/components/ui/ShareLinkDialog.cjs +1 -1
  346. package/dist/components/ui/ShareLinkDialog.cjs.map +1 -1
  347. package/dist/components/ui/ShareLinkDialog.d.ts +5 -3
  348. package/dist/components/ui/ShareLinkDialog.js +107 -98
  349. package/dist/components/ui/ShareLinkDialog.js.map +1 -1
  350. package/dist/components/ui/Slider.cjs +2 -0
  351. package/dist/components/ui/Slider.cjs.map +1 -0
  352. package/dist/components/ui/Slider.d.ts +24 -0
  353. package/dist/components/ui/Slider.js +55 -0
  354. package/dist/components/ui/Slider.js.map +1 -0
  355. package/dist/components/ui/SparkLine.cjs +1 -1
  356. package/dist/components/ui/SparkLine.cjs.map +1 -1
  357. package/dist/components/ui/SparkLine.d.ts +4 -1
  358. package/dist/components/ui/SparkLine.js +29 -23
  359. package/dist/components/ui/SparkLine.js.map +1 -1
  360. package/dist/components/ui/StatBlock.cjs +1 -1
  361. package/dist/components/ui/StatBlock.cjs.map +1 -1
  362. package/dist/components/ui/StatBlock.js +17 -16
  363. package/dist/components/ui/StatBlock.js.map +1 -1
  364. package/dist/components/ui/StatusDot.cjs.map +1 -1
  365. package/dist/components/ui/StatusDot.d.ts +5 -1
  366. package/dist/components/ui/StatusDot.js.map +1 -1
  367. package/dist/components/ui/Steps.cjs +2 -0
  368. package/dist/components/ui/Steps.cjs.map +1 -0
  369. package/dist/components/ui/Steps.d.ts +19 -0
  370. package/dist/components/ui/Steps.js +53 -0
  371. package/dist/components/ui/Steps.js.map +1 -0
  372. package/dist/components/ui/TableOfContents.cjs +1 -1
  373. package/dist/components/ui/TableOfContents.cjs.map +1 -1
  374. package/dist/components/ui/TableOfContents.d.ts +3 -3
  375. package/dist/components/ui/TableOfContents.js +47 -28
  376. package/dist/components/ui/TableOfContents.js.map +1 -1
  377. package/dist/components/ui/Tabs.cjs +2 -2
  378. package/dist/components/ui/Tabs.cjs.map +1 -1
  379. package/dist/components/ui/Tabs.d.ts +37 -3
  380. package/dist/components/ui/Tabs.js +169 -109
  381. package/dist/components/ui/Tabs.js.map +1 -1
  382. package/dist/components/ui/Terminal.cjs +1 -1
  383. package/dist/components/ui/Terminal.cjs.map +1 -1
  384. package/dist/components/ui/Terminal.js +18 -17
  385. package/dist/components/ui/Terminal.js.map +1 -1
  386. package/dist/components/ui/TextField.cjs +1 -1
  387. package/dist/components/ui/TextField.cjs.map +1 -1
  388. package/dist/components/ui/TextField.js +19 -18
  389. package/dist/components/ui/TextField.js.map +1 -1
  390. package/dist/components/ui/ThemeToggle.cjs +1 -1
  391. package/dist/components/ui/ThemeToggle.cjs.map +1 -1
  392. package/dist/components/ui/ThemeToggle.js +15 -18
  393. package/dist/components/ui/ThemeToggle.js.map +1 -1
  394. package/dist/components/ui/TimeDisplay.cjs +1 -1
  395. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  396. package/dist/components/ui/TimeDisplay.d.ts +14 -4
  397. package/dist/components/ui/TimeDisplay.js +43 -44
  398. package/dist/components/ui/TimeDisplay.js.map +1 -1
  399. package/dist/components/ui/TimeRangePicker.cjs +1 -1
  400. package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
  401. package/dist/components/ui/TimeRangePicker.js +128 -111
  402. package/dist/components/ui/TimeRangePicker.js.map +1 -1
  403. package/dist/components/ui/TimelineChart.cjs +2 -1
  404. package/dist/components/ui/TimelineChart.cjs.map +1 -1
  405. package/dist/components/ui/TimelineChart.d.ts +1 -0
  406. package/dist/components/ui/TimelineChart.js +221 -169
  407. package/dist/components/ui/TimelineChart.js.map +1 -1
  408. package/dist/components/ui/ToolCallCard.cjs +1 -1
  409. package/dist/components/ui/ToolCallCard.cjs.map +1 -1
  410. package/dist/components/ui/ToolCallCard.js +22 -22
  411. package/dist/components/ui/ToolCallCard.js.map +1 -1
  412. package/dist/components/ui/Toolbar.cjs +1 -1
  413. package/dist/components/ui/Toolbar.cjs.map +1 -1
  414. package/dist/components/ui/Toolbar.d.ts +4 -16
  415. package/dist/components/ui/Toolbar.js +8 -62
  416. package/dist/components/ui/Toolbar.js.map +1 -1
  417. package/dist/components/ui/TraceSpanInspector.cjs +1 -1
  418. package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
  419. package/dist/components/ui/TraceSpanInspector.js +94 -76
  420. package/dist/components/ui/TraceSpanInspector.js.map +1 -1
  421. package/dist/components/ui/TraceTree.cjs +1 -1
  422. package/dist/components/ui/TraceTree.cjs.map +1 -1
  423. package/dist/components/ui/TraceTree.d.ts +36 -2
  424. package/dist/components/ui/TraceTree.js +278 -170
  425. package/dist/components/ui/TraceTree.js.map +1 -1
  426. package/dist/components/ui/TrajectoryStep.cjs +1 -1
  427. package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
  428. package/dist/components/ui/TrajectoryStep.js +39 -43
  429. package/dist/components/ui/TrajectoryStep.js.map +1 -1
  430. package/dist/components/ui/TrajectoryTimeline.cjs +1 -1
  431. package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -1
  432. package/dist/components/ui/TrajectoryTimeline.js +31 -28
  433. package/dist/components/ui/TrajectoryTimeline.js.map +1 -1
  434. package/dist/components/ui/UploadQueue.cjs +1 -1
  435. package/dist/components/ui/UploadQueue.cjs.map +1 -1
  436. package/dist/components/ui/UploadQueue.d.ts +18 -2
  437. package/dist/components/ui/UploadQueue.js +53 -71
  438. package/dist/components/ui/UploadQueue.js.map +1 -1
  439. package/dist/components/ui/authValidation.cjs +2 -0
  440. package/dist/components/ui/authValidation.cjs.map +1 -0
  441. package/dist/components/ui/authValidation.d.ts +3 -0
  442. package/dist/components/ui/authValidation.js +8 -0
  443. package/dist/components/ui/authValidation.js.map +1 -0
  444. package/dist/components/ui/classifyContent.cjs +6 -0
  445. package/dist/components/ui/classifyContent.cjs.map +1 -0
  446. package/dist/components/ui/classifyContent.d.ts +40 -0
  447. package/dist/components/ui/classifyContent.js +167 -0
  448. package/dist/components/ui/classifyContent.js.map +1 -0
  449. package/dist/components/ui/dropFiles.cjs +2 -0
  450. package/dist/components/ui/dropFiles.cjs.map +1 -0
  451. package/dist/components/ui/dropFiles.d.ts +7 -0
  452. package/dist/components/ui/dropFiles.js +16 -0
  453. package/dist/components/ui/dropFiles.js.map +1 -0
  454. package/dist/components/ui/index.d.ts +23 -10
  455. package/dist/components/ui/linkComponent.cjs +1 -1
  456. package/dist/components/ui/linkComponent.cjs.map +1 -1
  457. package/dist/components/ui/linkComponent.d.ts +4 -2
  458. package/dist/components/ui/linkComponent.js +15 -5
  459. package/dist/components/ui/linkComponent.js.map +1 -1
  460. package/dist/components/ui/markdownDocument.cjs +2 -0
  461. package/dist/components/ui/markdownDocument.cjs.map +1 -0
  462. package/dist/components/ui/markdownDocument.d.ts +40 -0
  463. package/dist/components/ui/markdownDocument.js +39 -0
  464. package/dist/components/ui/markdownDocument.js.map +1 -0
  465. package/dist/components/ui/relativeTime.cjs +1 -1
  466. package/dist/components/ui/relativeTime.cjs.map +1 -1
  467. package/dist/components/ui/relativeTime.d.ts +5 -3
  468. package/dist/components/ui/relativeTime.js +15 -6
  469. package/dist/components/ui/relativeTime.js.map +1 -1
  470. package/dist/components/ui/traceStatus.cjs +2 -0
  471. package/dist/components/ui/traceStatus.cjs.map +1 -0
  472. package/dist/components/ui/{traceFormat.d.ts → traceStatus.d.ts} +0 -1
  473. package/dist/components/ui/traceStatus.js +7 -0
  474. package/dist/components/ui/traceStatus.js.map +1 -0
  475. package/dist/components/ui/useColumnWidths.cjs +2 -0
  476. package/dist/components/ui/useColumnWidths.cjs.map +1 -0
  477. package/dist/components/ui/useColumnWidths.d.ts +60 -0
  478. package/dist/components/ui/useColumnWidths.js +196 -0
  479. package/dist/components/ui/useColumnWidths.js.map +1 -0
  480. package/dist/hooks/popoverOverflow.cjs +2 -0
  481. package/dist/hooks/popoverOverflow.cjs.map +1 -0
  482. package/dist/hooks/popoverOverflow.d.ts +8 -0
  483. package/dist/hooks/popoverOverflow.js +9 -0
  484. package/dist/hooks/popoverOverflow.js.map +1 -0
  485. package/dist/hooks/useDevelopAfterLoad.cjs +2 -0
  486. package/dist/hooks/useDevelopAfterLoad.cjs.map +1 -0
  487. package/dist/hooks/useDevelopAfterLoad.d.ts +8 -0
  488. package/dist/hooks/useDevelopAfterLoad.js +9 -0
  489. package/dist/hooks/useDevelopAfterLoad.js.map +1 -0
  490. package/dist/hooks/useDialogPopover.cjs +2 -0
  491. package/dist/hooks/useDialogPopover.cjs.map +1 -0
  492. package/dist/hooks/useDialogPopover.d.ts +23 -0
  493. package/dist/hooks/useDialogPopover.js +48 -0
  494. package/dist/hooks/useDialogPopover.js.map +1 -0
  495. package/dist/hooks/useMenuPopover.cjs +1 -1
  496. package/dist/hooks/useMenuPopover.cjs.map +1 -1
  497. package/dist/hooks/useMenuPopover.d.ts +0 -8
  498. package/dist/hooks/useMenuPopover.js +17 -22
  499. package/dist/hooks/useMenuPopover.js.map +1 -1
  500. package/dist/hooks/useResizable.cjs +1 -1
  501. package/dist/hooks/useResizable.cjs.map +1 -1
  502. package/dist/hooks/useResizable.js +87 -78
  503. package/dist/hooks/useResizable.js.map +1 -1
  504. package/dist/hooks/useSavedQueries.cjs +1 -1
  505. package/dist/hooks/useSavedQueries.cjs.map +1 -1
  506. package/dist/hooks/useSavedQueries.d.ts +6 -0
  507. package/dist/hooks/useSavedQueries.js +52 -60
  508. package/dist/hooks/useSavedQueries.js.map +1 -1
  509. package/dist/hooks/useSectionSpy.cjs +1 -1
  510. package/dist/hooks/useSectionSpy.cjs.map +1 -1
  511. package/dist/hooks/useSectionSpy.d.ts +6 -1
  512. package/dist/hooks/useSectionSpy.js +87 -57
  513. package/dist/hooks/useSectionSpy.js.map +1 -1
  514. package/dist/hooks/useStorageItem.cjs +2 -0
  515. package/dist/hooks/useStorageItem.cjs.map +1 -0
  516. package/dist/hooks/useStorageItem.d.ts +6 -0
  517. package/dist/hooks/useStorageItem.js +36 -0
  518. package/dist/hooks/useStorageItem.js.map +1 -0
  519. package/dist/index.cjs +1 -1
  520. package/dist/index.d.ts +5 -5
  521. package/dist/index.js +321 -313
  522. package/dist/index.js.map +1 -1
  523. package/dist/layouts/shell/AegisShell.cjs +1 -1
  524. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  525. package/dist/layouts/shell/AegisShell.d.ts +4 -2
  526. package/dist/layouts/shell/AegisShell.js +150 -243
  527. package/dist/layouts/shell/AegisShell.js.map +1 -1
  528. package/dist/layouts/shell/AppRoutes.cjs +2 -0
  529. package/dist/layouts/shell/AppRoutes.cjs.map +1 -0
  530. package/dist/layouts/shell/AppRoutes.d.ts +5 -0
  531. package/dist/layouts/shell/AppRoutes.js +8 -0
  532. package/dist/layouts/shell/AppRoutes.js.map +1 -0
  533. package/dist/layouts/shell/AppSwitcher.cjs +1 -1
  534. package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
  535. package/dist/layouts/shell/AppSwitcher.js +53 -36
  536. package/dist/layouts/shell/AppSwitcher.js.map +1 -1
  537. package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
  538. package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
  539. package/dist/layouts/shell/AuthRequiredCard.js +24 -22
  540. package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
  541. package/dist/layouts/shell/BreadcrumbBar.cjs +1 -1
  542. package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -1
  543. package/dist/layouts/shell/BreadcrumbBar.d.ts +1 -2
  544. package/dist/layouts/shell/BreadcrumbBar.js +19 -26
  545. package/dist/layouts/shell/BreadcrumbBar.js.map +1 -1
  546. package/dist/layouts/shell/RouteErrorBoundary.cjs +2 -0
  547. package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -0
  548. package/dist/layouts/shell/RouteErrorBoundary.d.ts +26 -0
  549. package/dist/layouts/shell/RouteErrorBoundary.js +40 -0
  550. package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -0
  551. package/dist/layouts/shell/RouterLink.cjs +2 -0
  552. package/dist/layouts/shell/RouterLink.cjs.map +1 -0
  553. package/dist/layouts/shell/RouterLink.d.ts +3 -0
  554. package/dist/layouts/shell/RouterLink.js +22 -0
  555. package/dist/layouts/shell/RouterLink.js.map +1 -0
  556. package/dist/layouts/shell/ShellCommandPalette.cjs +2 -0
  557. package/dist/layouts/shell/ShellCommandPalette.cjs.map +1 -0
  558. package/dist/layouts/shell/ShellCommandPalette.d.ts +7 -0
  559. package/dist/layouts/shell/ShellCommandPalette.js +32 -0
  560. package/dist/layouts/shell/ShellCommandPalette.js.map +1 -0
  561. package/dist/layouts/shell/ShellInboxPage.cjs +2 -0
  562. package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -0
  563. package/dist/layouts/shell/ShellInboxPage.d.ts +12 -0
  564. package/dist/layouts/shell/ShellInboxPage.js +33 -0
  565. package/dist/layouts/shell/ShellInboxPage.js.map +1 -0
  566. package/dist/layouts/shell/ShellNotificationBell.cjs +2 -0
  567. package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -0
  568. package/dist/layouts/shell/ShellNotificationBell.d.ts +5 -0
  569. package/dist/layouts/shell/ShellNotificationBell.js +30 -0
  570. package/dist/layouts/shell/ShellNotificationBell.js.map +1 -0
  571. package/dist/layouts/shell/Sidebar.cjs +1 -1
  572. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  573. package/dist/layouts/shell/Sidebar.d.ts +4 -2
  574. package/dist/layouts/shell/Sidebar.js +14 -11
  575. package/dist/layouts/shell/Sidebar.js.map +1 -1
  576. package/dist/layouts/shell/TopHeader.cjs +1 -1
  577. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  578. package/dist/layouts/shell/TopHeader.d.ts +6 -2
  579. package/dist/layouts/shell/TopHeader.js +87 -75
  580. package/dist/layouts/shell/TopHeader.js.map +1 -1
  581. package/dist/layouts/shell/apps.cjs +2 -0
  582. package/dist/layouts/shell/apps.cjs.map +1 -0
  583. package/dist/layouts/shell/apps.d.ts +12 -0
  584. package/dist/layouts/shell/apps.js +34 -0
  585. package/dist/layouts/shell/apps.js.map +1 -0
  586. package/dist/layouts/shell/buildRouteTree.cjs +2 -0
  587. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -0
  588. package/dist/layouts/shell/buildRouteTree.d.ts +22 -0
  589. package/dist/layouts/shell/buildRouteTree.js +49 -0
  590. package/dist/layouts/shell/buildRouteTree.js.map +1 -0
  591. package/dist/layouts/shell/environments/EnvironmentProvider.cjs +2 -0
  592. package/dist/layouts/shell/environments/EnvironmentProvider.cjs.map +1 -0
  593. package/dist/layouts/shell/environments/EnvironmentProvider.d.ts +13 -0
  594. package/dist/layouts/shell/environments/EnvironmentProvider.js +90 -0
  595. package/dist/layouts/shell/environments/EnvironmentProvider.js.map +1 -0
  596. package/dist/layouts/shell/environments/{context.cjs → environmentContext.cjs} +2 -2
  597. package/dist/layouts/shell/environments/environmentContext.cjs.map +1 -0
  598. package/dist/layouts/shell/environments/environmentContext.d.ts +6 -0
  599. package/dist/layouts/shell/environments/environmentContext.js +8 -0
  600. package/dist/layouts/shell/environments/environmentContext.js.map +1 -0
  601. package/dist/layouts/shell/environments/index.d.ts +2 -3
  602. package/dist/layouts/shell/environments/types.cjs.map +1 -1
  603. package/dist/layouts/shell/environments/types.d.ts +23 -15
  604. package/dist/layouts/shell/environments/types.js.map +1 -1
  605. package/dist/layouts/shell/environments/useEnvironment.cjs +2 -0
  606. package/dist/layouts/shell/environments/useEnvironment.cjs.map +1 -0
  607. package/dist/layouts/shell/environments/{hooks.d.ts → useEnvironment.d.ts} +3 -2
  608. package/dist/layouts/shell/environments/useEnvironment.js +25 -0
  609. package/dist/layouts/shell/environments/useEnvironment.js.map +1 -0
  610. package/dist/layouts/shell/index.d.ts +3 -1
  611. package/dist/layouts/shell/types.d.ts +14 -14
  612. package/dist/layouts/shell/useAgentPanel.cjs +2 -0
  613. package/dist/layouts/shell/useAgentPanel.cjs.map +1 -0
  614. package/dist/layouts/shell/useAgentPanel.d.ts +13 -0
  615. package/dist/layouts/shell/useAgentPanel.js +21 -0
  616. package/dist/layouts/shell/useAgentPanel.js.map +1 -0
  617. package/dist/layouts/shell/useAppCommands.cjs +2 -0
  618. package/dist/layouts/shell/useAppCommands.cjs.map +1 -0
  619. package/dist/layouts/shell/useAppCommands.d.ts +6 -0
  620. package/dist/layouts/shell/useAppCommands.js +19 -0
  621. package/dist/layouts/shell/useAppCommands.js.map +1 -0
  622. package/dist/layouts/shell/useMobileNav.cjs +2 -0
  623. package/dist/layouts/shell/useMobileNav.cjs.map +1 -0
  624. package/dist/layouts/shell/useMobileNav.d.ts +20 -0
  625. package/dist/layouts/shell/useMobileNav.js +54 -0
  626. package/dist/layouts/shell/useMobileNav.js.map +1 -0
  627. package/dist/layouts/shell/useOpenNotification.cjs +2 -0
  628. package/dist/layouts/shell/useOpenNotification.cjs.map +1 -0
  629. package/dist/layouts/shell/useOpenNotification.d.ts +3 -0
  630. package/dist/layouts/shell/useOpenNotification.js +16 -0
  631. package/dist/layouts/shell/useOpenNotification.js.map +1 -0
  632. package/dist/layouts/shell/useShellUser.cjs +2 -0
  633. package/dist/layouts/shell/useShellUser.cjs.map +1 -0
  634. package/dist/layouts/shell/useShellUser.d.ts +7 -0
  635. package/dist/layouts/shell/useShellUser.js +23 -0
  636. package/dist/layouts/shell/useShellUser.js.map +1 -0
  637. package/dist/layouts/shell/useWarnOnce.cjs +2 -0
  638. package/dist/layouts/shell/useWarnOnce.cjs.map +1 -0
  639. package/dist/layouts/shell/useWarnOnce.d.ts +1 -0
  640. package/dist/layouts/shell/useWarnOnce.js +11 -0
  641. package/dist/layouts/shell/useWarnOnce.js.map +1 -0
  642. package/dist/lib/chart.cjs +1 -1
  643. package/dist/lib/chart.cjs.map +1 -1
  644. package/dist/lib/chart.d.ts +5 -7
  645. package/dist/lib/chart.js +49 -34
  646. package/dist/lib/chart.js.map +1 -1
  647. package/dist/lib/format.cjs +1 -1
  648. package/dist/lib/format.cjs.map +1 -1
  649. package/dist/lib/format.d.ts +34 -0
  650. package/dist/lib/format.js +98 -9
  651. package/dist/lib/format.js.map +1 -1
  652. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +1 -1
  653. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -1
  654. package/dist/lib/luceneQuery/tokenizeAtCursor.js +29 -29
  655. package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -1
  656. package/dist/lib/storage.cjs +1 -1
  657. package/dist/lib/storage.cjs.map +1 -1
  658. package/dist/lib/storage.js +19 -12
  659. package/dist/lib/storage.js.map +1 -1
  660. package/dist/lib/timeRange.cjs +1 -1
  661. package/dist/lib/timeRange.cjs.map +1 -1
  662. package/dist/lib/timeRange.d.ts +14 -4
  663. package/dist/lib/timeRange.js +43 -39
  664. package/dist/lib/timeRange.js.map +1 -1
  665. package/dist/locale/strings.cjs +1 -1
  666. package/dist/locale/strings.cjs.map +1 -1
  667. package/dist/locale/strings.d.ts +243 -2
  668. package/dist/locale/strings.js +545 -26
  669. package/dist/locale/strings.js.map +1 -1
  670. package/dist/notifications/notificationContext.cjs.map +1 -1
  671. package/dist/notifications/notificationContext.d.ts +15 -0
  672. package/dist/notifications/notificationContext.js.map +1 -1
  673. package/dist/style.css +1 -1
  674. package/dist/theme/ThemeProvider.cjs +1 -1
  675. package/dist/theme/ThemeProvider.cjs.map +1 -1
  676. package/dist/theme/ThemeProvider.d.ts +2 -1
  677. package/dist/theme/ThemeProvider.js +47 -33
  678. package/dist/theme/ThemeProvider.js.map +1 -1
  679. package/dist/theme/antdTheme.cjs +1 -1
  680. package/dist/theme/antdTheme.cjs.map +1 -1
  681. package/dist/theme/antdTheme.d.ts +0 -2
  682. package/dist/theme/antdTheme.js +28 -20
  683. package/dist/theme/antdTheme.js.map +1 -1
  684. package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
  685. package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
  686. package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
  687. package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
  688. package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
  689. package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
  690. package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
  691. package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
  692. package/dist/transports/agentm/agentmChannelClient.js +133 -89
  693. package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
  694. package/dist/transports/index.d.ts +2 -2
  695. package/dist/transports/mcpBridge.cjs +2 -0
  696. package/dist/transports/mcpBridge.cjs.map +1 -0
  697. package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
  698. package/dist/transports/mcpBridge.js +144 -0
  699. package/dist/transports/mcpBridge.js.map +1 -0
  700. package/dist/transports/mcpTools.cjs +2 -0
  701. package/dist/transports/mcpTools.cjs.map +1 -0
  702. package/dist/transports/mcpTools.d.ts +15 -0
  703. package/dist/transports/mcpTools.js +283 -0
  704. package/dist/transports/mcpTools.js.map +1 -0
  705. package/dist/transports.cjs +1 -1
  706. package/dist/transports.js +1 -1
  707. package/package.json +5 -4
  708. package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
  709. package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
  710. package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
  711. package/dist/agent/core/mcpToolCatalogue.js +0 -101
  712. package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
  713. package/dist/components/ui/BucketCard.cjs +0 -2
  714. package/dist/components/ui/BucketCard.cjs.map +0 -1
  715. package/dist/components/ui/BucketCard.d.ts +0 -24
  716. package/dist/components/ui/BucketCard.js +0 -73
  717. package/dist/components/ui/BucketCard.js.map +0 -1
  718. package/dist/components/ui/ContentInspectorContent.cjs +0 -5
  719. package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
  720. package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
  721. package/dist/components/ui/ContentInspectorContent.js +0 -101
  722. package/dist/components/ui/ContentInspectorContent.js.map +0 -1
  723. package/dist/components/ui/traceFormat.cjs +0 -2
  724. package/dist/components/ui/traceFormat.cjs.map +0 -1
  725. package/dist/components/ui/traceFormat.js +0 -11
  726. package/dist/components/ui/traceFormat.js.map +0 -1
  727. package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
  728. package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
  729. package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
  730. package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
  731. package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
  732. package/dist/layouts/shell/environments/context.cjs.map +0 -1
  733. package/dist/layouts/shell/environments/context.d.ts +0 -6
  734. package/dist/layouts/shell/environments/context.js +0 -6
  735. package/dist/layouts/shell/environments/context.js.map +0 -1
  736. package/dist/layouts/shell/environments/hooks.cjs +0 -2
  737. package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
  738. package/dist/layouts/shell/environments/hooks.js +0 -24
  739. package/dist/layouts/shell/environments/hooks.js.map +0 -1
  740. package/dist/layouts/shell/environments/manifest.cjs +0 -2
  741. package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
  742. package/dist/layouts/shell/environments/manifest.d.ts +0 -26
  743. package/dist/layouts/shell/environments/manifest.js +0 -82
  744. package/dist/layouts/shell/environments/manifest.js.map +0 -1
  745. package/dist/transports/bridge.cjs +0 -2
  746. package/dist/transports/bridge.cjs.map +0 -1
  747. package/dist/transports/bridge.js +0 -143
  748. package/dist/transports/bridge.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.cjs","sources":["../../../src/components/ui/NotificationBell.tsx"],"sourcesContent":["import { type ReactElement, useState } from 'react';\n\nimport { BellOutlined } from '@ant-design/icons';\nimport { Popover } from 'antd';\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport { type AegisNotification, useNotifications } from '../../notifications';\nimport './NotificationBell.css';\nimport { relativeTime } from './relativeTime';\n\ninterface NotificationBellProps {\n /** Path to the full inbox page, e.g. '/inbox'. */\n inboxPath: string;\n /** Override popover width in px. Defaults to 360. */\n width?: number;\n /** Optional aegis-ui agent action — fired when the bell is clicked. */\n action?: AegisAction<void, unknown>;\n}\n\nconst MAX_PREVIEW_ITEMS = 8;\nconst DEFAULT_WIDTH = 360;\n\nexport function NotificationBell({\n inboxPath,\n width = DEFAULT_WIDTH,\n action,\n}: NotificationBellProps): ReactElement {\n const { items, unreadCount, markRead } = useNotifications();\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const bound = useAegisAction<void, unknown>(action);\n\n const preview = items.slice(0, MAX_PREVIEW_ITEMS);\n\n const handleItemClick = (item: AegisNotification): void => {\n if (!item.read && markRead) {\n void markRead(item.id);\n }\n setOpen(false);\n if (item.to) {\n navigate(item.to);\n }\n };\n\n const content = (\n <div className=\"aegis-notif-pop\" style={{ width }}>\n <div className=\"aegis-notif-pop__head\">\n <span className=\"aegis-notif-pop__title\">Notifications</span>\n {unreadCount > 0 && (\n <span className=\"aegis-notif-pop__count\">{unreadCount} unread</span>\n )}\n </div>\n {preview.length === 0 ? (\n <div className=\"aegis-notif-pop__empty\">You&apos;re all caught up.</div>\n ) : (\n <ul className=\"aegis-notif-pop__list\">\n {preview.map((item) => (\n <li key={item.id} className=\"aegis-notif-pop__item-wrap\">\n <button\n type=\"button\"\n className={[\n 'aegis-notif-pop__item',\n item.read ? '' : 'aegis-notif-pop__item--unread',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n handleItemClick(item);\n }}\n >\n <span\n className=\"aegis-notif-pop__dot\"\n aria-hidden=\"true\"\n data-unread={!item.read}\n />\n <span className=\"aegis-notif-pop__body\">\n <span className=\"aegis-notif-pop__row\">\n <span className=\"aegis-notif-pop__item-title\">\n {item.title}\n </span>\n <span className=\"aegis-notif-pop__time\">\n {relativeTime(item.timestamp)}\n </span>\n </span>\n {item.body && (\n <span className=\"aegis-notif-pop__item-body\">\n {item.body}\n </span>\n )}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n <div className=\"aegis-notif-pop__foot\">\n <Link\n to={inboxPath}\n className=\"aegis-notif-pop__view-all\"\n onClick={() => {\n setOpen(false);\n }}\n >\n View all\n </Link>\n </div>\n </div>\n );\n\n return (\n <Popover\n content={content}\n trigger=\"click\"\n open={open}\n onOpenChange={setOpen}\n placement=\"bottomRight\"\n arrow={false}\n classNames={{ root: 'aegis-notif-pop__overlay' }}\n >\n <button\n type=\"button\"\n className=\"aegis-notif-bell\"\n aria-label={\n unreadCount > 0\n ? `Notifications: ${String(unreadCount)} unread`\n : 'Notifications'\n }\n data-agent-action-id={action?.id}\n onClick={action ? () => void bound.invoke() : undefined}\n >\n <BellOutlined className=\"aegis-notif-bell__icon\" />\n {unreadCount > 0 && (\n <span className=\"aegis-notif-bell__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n </button>\n </Popover>\n );\n}\n"],"names":["MAX_PREVIEW_ITEMS","DEFAULT_WIDTH","NotificationBell","inboxPath","width","action","items","unreadCount","markRead","useNotifications","open","setOpen","useState","navigate","useNavigate","bound","useAegisAction","preview","handleItemClick","item","content","jsxs","jsx","relativeTime","Link","Popover","BellOutlined"],"mappings":"iYAqBMA,EAAoB,EACpBC,EAAgB,IAEf,SAASC,EAAiB,CAC/B,UAAAC,EACA,MAAAC,EAAQH,EACR,OAAAI,CACF,EAAwC,CACtC,KAAM,CAAE,MAAAC,EAAO,YAAAC,EAAa,SAAAC,CAAA,EAAaC,EAAAA,iBAAA,EACnC,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAChCC,EAAWC,EAAAA,YAAA,EACXC,EAAQC,EAAAA,eAA8BX,CAAM,EAE5CY,EAAUX,EAAM,MAAM,EAAGN,CAAiB,EAE1CkB,EAAmBC,GAAkC,CACrD,CAACA,EAAK,MAAQX,GACXA,EAASW,EAAK,EAAE,EAEvBR,EAAQ,EAAK,EACTQ,EAAK,IACPN,EAASM,EAAK,EAAE,CAEpB,EAEMC,SACH,MAAA,CAAI,UAAU,kBAAkB,MAAO,CAAE,MAAAhB,GACxC,SAAA,CAAAiB,EAAAA,KAAC,MAAA,CAAI,UAAU,wBACb,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,yBAAyB,SAAA,gBAAa,EACrDf,EAAc,GACbc,OAAC,OAAA,CAAK,UAAU,yBAA0B,SAAA,CAAAd,EAAY,SAAA,CAAA,CA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d,EAAc,EACV,kBAAkB,OAAOA,CAAW,CAAC,UACrC,gBAEN,uBAAsBF,GAAQ,GAC9B,QAASA,EAAS,IAAM,KAAKU,EAAM,SAAW,OAE9C,SAAA,CAAAO,EAAAA,IAACI,EAAAA,aAAA,CAAa,UAAU,wBAAA,CAAyB,EAChDnB,EAAc,GACbe,EAAAA,IAAC,OAAA,CAAK,UAAU,0BAA0B,cAAY,OACnD,SAAAf,EAAc,GAAK,MAAQA,CAAA,CAC9B,CAAA,CAAA,CAAA,CAEJ,CAAA,CAGN"}
1
+ {"version":3,"file":"NotificationBell.cjs","sources":["../../../src/components/ui/NotificationBell.tsx"],"sourcesContent":["import { type ReactElement, useEffect, useId } from 'react';\n\nimport { BellOutlined, ExclamationCircleFilled } from '@ant-design/icons';\nimport { Popover } from 'antd';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport { POPOVER_OVERFLOW } from '../../hooks/popoverOverflow';\nimport { useDialogPopover } from '../../hooks/useDialogPopover';\nimport { useStrings } from '../../locale';\nimport type { AegisNotification } from '../../notifications';\nimport { Button } from './Button';\nimport { ErrorState } from './ErrorState';\nimport './NotificationBell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\nimport { relativeTime } from './relativeTime';\n\nexport interface NotificationBellProps {\n /** Newest first; the popover previews the first few. */\n items: AegisNotification[];\n /** Shown on the badge. Defaults to the number of unread `items`. */\n unreadCount?: number;\n /**\n * Fired when the user opens an item; the popover closes first. The host\n * marks it read and navigates to `item.to`.\n */\n onOpen?: (item: AegisNotification) => void;\n /** Path to the full inbox page, e.g. '/inbox'. */\n inboxPath: string;\n /** Renders the \"View all\" link. Defaults to an `<a href>`. */\n linkComponent?: LinkComponent;\n /** Override popover width in px. Defaults to 360. */\n width?: number;\n /** Optional aegis-ui agent action — fired when the bell is clicked. */\n action?: AegisAction<void, unknown>;\n /**\n * Set while live updates are failing: the bell shows a caution mark and\n * the popover says the items may be out of date. The count stays.\n */\n liveError?: Error | null;\n /**\n * Why loading failed. With no `items`, the bell shows the caution mark and\n * the popover says the notifications couldn't load; with `items`, it is\n * shown like `liveError`.\n */\n error?: Error | null;\n /**\n * Renders a retry button where the popover says loading failed or the\n * items may be out of date.\n */\n onRetry?: () => void;\n}\n\nconst MAX_PREVIEW_ITEMS = 8;\nconst DEFAULT_WIDTH = 360;\n\nexport function NotificationBell({\n items,\n unreadCount = items.filter((n) => !n.read).length,\n onOpen,\n inboxPath,\n linkComponent: LinkImpl = DefaultLink,\n width = DEFAULT_WIDTH,\n action,\n liveError,\n error,\n onRetry,\n}: NotificationBellProps): ReactElement {\n const strings = useStrings();\n const popover = useDialogPopover<HTMLDivElement>();\n const { open, focusPanel } = popover;\n const panelId = useId();\n const staleId = `${panelId}-stale`;\n const bound = useAegisAction<void, unknown>(action);\n\n const preview = items.slice(0, MAX_PREVIEW_ITEMS);\n const loadError = items.length === 0 ? (error ?? null) : null;\n const staleError = loadError ? null : (liveError ?? error ?? null);\n let caution: string | null = null;\n if (loadError) {\n caution = strings.notificationsLoadFailedNote(loadError.message);\n } else if (staleError) {\n caution = strings.notificationsStaleNote(staleError.message);\n }\n\n // A retry that works removes the retry button that had focus, which\n // would leave the open panel without it.\n useEffect(() => {\n if (open && document.activeElement === document.body) {\n focusPanel();\n }\n }, [loadError, staleError, open, focusPanel]);\n\n const handleItemClick = (item: AegisNotification): void => {\n popover.close();\n onOpen?.(item);\n };\n\n const content = (\n <div\n ref={popover.panelRef}\n id={panelId}\n className=\"aegis-notif-pop\"\n style={{ width }}\n role=\"dialog\"\n aria-labelledby={`${panelId}-title`}\n tabIndex={-1}\n >\n <div className=\"aegis-notif-pop__head\">\n <span id={`${panelId}-title`} className=\"aegis-notif-pop__title\">\n {strings.notifications}\n </span>\n {unreadCount > 0 && (\n <span className=\"aegis-notif-pop__count\">\n {strings.unreadCount(unreadCount)}\n </span>\n )}\n </div>\n {staleError && (\n <div className=\"aegis-notif-pop__stale\">\n <ExclamationCircleFilled\n className=\"aegis-notif-pop__stale-icon\"\n aria-hidden\n />\n <div className=\"aegis-notif-pop__stale-body\">\n <span>\n <span className=\"aegis-notif-pop__stale-title\">\n {strings.notificationsStale}\n </span>{' '}\n {staleError.message}\n </span>\n {onRetry && (\n <Button tone=\"secondary\" onClick={onRetry}>\n {strings.retry}\n </Button>\n )}\n </div>\n </div>\n )}\n {loadError ? (\n <ErrorState\n size=\"compact\"\n title={strings.notificationsLoadFailed}\n description={loadError.message}\n action={\n onRetry && (\n <Button tone=\"secondary\" onClick={onRetry}>\n {strings.retry}\n </Button>\n )\n }\n />\n ) : preview.length === 0 ? (\n <div className=\"aegis-notif-pop__empty\">\n {strings.notificationsCaughtUp}\n </div>\n ) : (\n <ul className=\"aegis-notif-pop__list\">\n {preview.map((item) => (\n <li key={item.id} className=\"aegis-notif-pop__item-wrap\">\n <button\n type=\"button\"\n className={[\n 'aegis-notif-pop__item',\n item.read ? '' : 'aegis-notif-pop__item--unread',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n handleItemClick(item);\n }}\n >\n <span\n className=\"aegis-notif-pop__dot\"\n aria-hidden=\"true\"\n data-unread={!item.read}\n />\n <span className=\"aegis-notif-pop__body\">\n <span className=\"aegis-notif-pop__row\">\n <span className=\"aegis-notif-pop__item-title\">\n {item.title}\n </span>\n <span className=\"aegis-notif-pop__time\">\n {relativeTime(item.timestamp, strings)}\n </span>\n </span>\n {item.body && (\n <span className=\"aegis-notif-pop__item-body\">\n {item.body}\n </span>\n )}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n {/* Following the link closes the popover. */}\n <div className=\"aegis-notif-pop__foot\" onClickCapture={popover.close}>\n <LinkImpl to={inboxPath} className=\"aegis-notif-pop__view-all\">\n {strings.viewAll}\n </LinkImpl>\n </div>\n </div>\n );\n\n return (\n <Popover\n content={content}\n trigger=\"click\"\n open={popover.open}\n onOpenChange={popover.setOpen}\n placement=\"bottomRight\"\n autoAdjustOverflow={POPOVER_OVERFLOW}\n arrow={false}\n classNames={{ root: 'aegis-notif-pop__overlay' }}\n >\n {/* antd sets aria-describedby on its child to the popover's id, so\n the wrapper takes that and the bell keeps its own description. */}\n <span className=\"aegis-notif-bell__anchor\">\n <button\n ref={popover.triggerRef}\n type=\"button\"\n className=\"aegis-notif-bell\"\n aria-describedby={caution ? staleId : undefined}\n aria-haspopup=\"dialog\"\n aria-expanded={popover.open}\n aria-controls={popover.open ? panelId : undefined}\n aria-label={strings.notificationBellLabel(unreadCount)}\n data-agent-action-id={action?.id}\n onClick={action ? () => void bound.invoke() : undefined}\n >\n <BellOutlined className=\"aegis-notif-bell__icon\" />\n {unreadCount > 0 && (\n <span className=\"aegis-notif-bell__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n {caution && (\n <>\n <ExclamationCircleFilled\n className=\"aegis-notif-bell__stale\"\n aria-hidden\n />\n <span id={staleId} className=\"aegis-notif-bell__description\">\n {caution}\n </span>\n </>\n )}\n </button>\n </span>\n </Popover>\n );\n}\n"],"names":["MAX_PREVIEW_ITEMS","DEFAULT_WIDTH","NotificationBell","items","unreadCount","n","onOpen","inboxPath","LinkImpl","DefaultLink","width","action","liveError","error","onRetry","strings","useStrings","popover","useDialogPopover","open","focusPanel","panelId","useId","staleId","bound","useAegisAction","preview","loadError","staleError","caution","useEffect","handleItemClick","item","content","jsxs","jsx","ExclamationCircleFilled","Button","ErrorState","Popover","POPOVER_OVERFLOW","BellOutlined","Fragment"],"mappings":"0gBAqDMA,EAAoB,EACpBC,EAAgB,IAEf,SAASC,EAAiB,CAC/B,MAAAC,EACA,YAAAC,EAAcD,EAAM,OAAQE,GAAM,CAACA,EAAE,IAAI,EAAE,OAC3C,OAAAC,EACA,UAAAC,EACA,cAAeC,EAAWC,EAAAA,YAC1B,MAAAC,EAAQT,EACR,OAAAU,EACA,UAAAC,EACA,MAAAC,EACA,QAAAC,CACF,EAAwC,CACtC,MAAMC,EAAUC,EAAAA,WAAA,E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AGFG,MAAC,MAAA,CAAI,UAAU,wBAAwB,eAAgBlB,EAAQ,MAC7D,SAAAkB,EAAAA,IAAC3B,EAAA,CAAS,GAAID,EAAW,UAAU,4BAChC,SAAAQ,EAAQ,QACX,CAAA,CACF,CAAA,CAAA,CAAA,EAIJ,OACEoB,EAAAA,IAACI,EAAAA,QAAA,CACC,QAAAN,EACA,QAAQ,QACR,KAAMhB,EAAQ,KACd,aAAcA,EAAQ,QACtB,UAAU,cACV,mBAAoBuB,EAAAA,iBACpB,MAAO,GACP,WAAY,CAAE,KAAM,0BAAA,EAIpB,SAAAL,EAAAA,IAAC,OAAA,CAAK,UAAU,2BACd,SAAAD,EAAAA,KAAC,SAAA,CACC,IAAKjB,EAAQ,WACb,KAAK,SACL,UAAU,mBACV,mBAAkBY,EAAUN,EAAU,OACtC,gBAAc,SACd,gBAAeN,EAAQ,KACvB,gBAAeA,EAAQ,KAAOI,EAAU,OACxC,aAAYN,EAAQ,sBAAsBX,CAAW,EACrD,uBAAsBO,GAAQ,GAC9B,QAASA,EAAS,IAAM,KAAKa,EAAM,SAAW,OAE9C,SAAA,CAAAW,EAAAA,IAACM,EAAAA,aAAA,CAAa,UAAU,wBAAA,CAAyB,EAChDrC,EAAc,GACb+B,EAAAA,IAAC,OAAA,CAAK,UAAU,0BAA0B,cAAY,OACnD,SAAA/B,EAAc,GAAK,MAAQA,CAAA,CAC9B,EAEDyB,GACCK,EAAAA,KAAAQ,WAAA,CACE,SAAA,CAAAP,EAAAA,IAACC,EAAAA,wBAAA,CACC,UAAU,0BACV,cAAW,EAAA,CAAA,QAEZ,OAAA,CAAK,GAAIb,EAAS,UAAU,gCAC1B,SAAAM,CAAA,CACH,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAEJ,CACF,CAAA,CAAA,CAGN"}
@@ -1,12 +1,40 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { AegisAction } from '../../agent/core/types';
3
- interface NotificationBellProps {
3
+ import { AegisNotification } from '../../notifications';
4
+ import { LinkComponent } from './linkComponent';
5
+ export interface NotificationBellProps {
6
+ /** Newest first; the popover previews the first few. */
7
+ items: AegisNotification[];
8
+ /** Shown on the badge. Defaults to the number of unread `items`. */
9
+ unreadCount?: number;
10
+ /**
11
+ * Fired when the user opens an item; the popover closes first. The host
12
+ * marks it read and navigates to `item.to`.
13
+ */
14
+ onOpen?: (item: AegisNotification) => void;
4
15
  /** Path to the full inbox page, e.g. '/inbox'. */
5
16
  inboxPath: string;
17
+ /** Renders the "View all" link. Defaults to an `<a href>`. */
18
+ linkComponent?: LinkComponent;
6
19
  /** Override popover width in px. Defaults to 360. */
7
20
  width?: number;
8
21
  /** Optional aegis-ui agent action — fired when the bell is clicked. */
9
22
  action?: AegisAction<void, unknown>;
23
+ /**
24
+ * Set while live updates are failing: the bell shows a caution mark and
25
+ * the popover says the items may be out of date. The count stays.
26
+ */
27
+ liveError?: Error | null;
28
+ /**
29
+ * Why loading failed. With no `items`, the bell shows the caution mark and
30
+ * the popover says the notifications couldn't load; with `items`, it is
31
+ * shown like `liveError`.
32
+ */
33
+ error?: Error | null;
34
+ /**
35
+ * Renders a retry button where the popover says loading failed or the
36
+ * items may be out of date.
37
+ */
38
+ onRetry?: () => void;
10
39
  }
11
- export declare function NotificationBell({ inboxPath, width, action, }: NotificationBellProps): ReactElement;
12
- export {};
40
+ export declare function NotificationBell({ items, unreadCount, onOpen, inboxPath, linkComponent: LinkImpl, width, action, liveError, error, onRetry, }: NotificationBellProps): ReactElement;
@@ -1,98 +1,154 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { useState as h } from "react";
3
- import { BellOutlined as N } from "@ant-design/icons";
4
- import { Popover as u } from "antd";
5
- import { useNavigate as b, Link as v } from "react-router-dom";
6
- import { useAegisAction as y } from "../../agent/core/hooks.js";
1
+ import { jsxs as o, jsx as e, Fragment as x } from "react/jsx-runtime";
2
+ import { useId as A, useEffect as F } from "react";
3
+ import { ExclamationCircleFilled as u, BellOutlined as L } from "@ant-design/icons";
4
+ import { Popover as P } from "antd";
5
+ import { useAegisAction as B } from "../../agent/core/hooks.js";
6
+ import { POPOVER_OVERFLOW as S } from "../../hooks/popoverOverflow.js";
7
+ import { useDialogPopover as j } from "../../hooks/useDialogPopover.js";
8
+ import { Button as b } from "./Button.js";
9
+ import { ErrorState as D } from "./ErrorState.js";
7
10
  /* empty css */
8
- import { relativeTime as k } from "./relativeTime.js";
9
- import { useNotifications as w } from "../../notifications/useNotifications.js";
10
- const C = 8, A = 360;
11
- function D({
12
- inboxPath: p,
13
- width: r = A,
14
- action: s
11
+ import { DefaultLink as T } from "./linkComponent.js";
12
+ import { relativeTime as R } from "./relativeTime.js";
13
+ import { useStrings as V } from "../../locale/useStrings.js";
14
+ const W = 8, $ = 360;
15
+ function ie({
16
+ items: d,
17
+ unreadCount: n = d.filter((i) => !i.read).length,
18
+ onOpen: v,
19
+ inboxPath: y,
20
+ linkComponent: E = T,
21
+ width: k = $,
22
+ action: m,
23
+ liveError: I,
24
+ error: f,
25
+ onRetry: p
15
26
  }) {
16
- const { items: c, unreadCount: a, markRead: n } = w(), [d, t] = h(!1), f = b(), m = y(s), l = c.slice(0, C), _ = (i) => {
17
- !i.read && n && n(i.id), t(!1), i.to && f(i.to);
18
- }, g = /* @__PURE__ */ o("div", { className: "aegis-notif-pop", style: { width: r }, children: [
19
- /* @__PURE__ */ o("div", { className: "aegis-notif-pop__head", children: [
20
- /* @__PURE__ */ e("span", { className: "aegis-notif-pop__title", children: "Notifications" }),
21
- a > 0 && /* @__PURE__ */ o("span", { className: "aegis-notif-pop__count", children: [
22
- a,
23
- " unread"
24
- ] })
25
- ] }),
26
- l.length === 0 ? /* @__PURE__ */ e("div", { className: "aegis-notif-pop__empty", children: "You're all caught up." }) : /* @__PURE__ */ e("ul", { className: "aegis-notif-pop__list", children: l.map((i) => /* @__PURE__ */ e("li", { className: "aegis-notif-pop__item-wrap", children: /* @__PURE__ */ o(
27
- "button",
28
- {
29
- type: "button",
30
- className: [
31
- "aegis-notif-pop__item",
32
- i.read ? "" : "aegis-notif-pop__item--unread"
33
- ].filter(Boolean).join(" "),
34
- onClick: () => {
35
- _(i);
36
- },
37
- children: [
27
+ const i = V(), t = j(), { open: _, focusPanel: g } = t, l = A(), h = `${l}-stale`, O = B(m), N = d.slice(0, W), s = d.length === 0 ? f ?? null : null, c = s ? null : I ?? f ?? null;
28
+ let r = null;
29
+ s ? r = i.notificationsLoadFailedNote(s.message) : c && (r = i.notificationsStaleNote(c.message)), F(() => {
30
+ _ && document.activeElement === document.body && g();
31
+ }, [s, c, _, g]);
32
+ const w = (a) => {
33
+ t.close(), v?.(a);
34
+ }, C = /* @__PURE__ */ o(
35
+ "div",
36
+ {
37
+ ref: t.panelRef,
38
+ id: l,
39
+ className: "aegis-notif-pop",
40
+ style: { width: k },
41
+ role: "dialog",
42
+ "aria-labelledby": `${l}-title`,
43
+ tabIndex: -1,
44
+ children: [
45
+ /* @__PURE__ */ o("div", { className: "aegis-notif-pop__head", children: [
46
+ /* @__PURE__ */ e("span", { id: `${l}-title`, className: "aegis-notif-pop__title", children: i.notifications }),
47
+ n > 0 && /* @__PURE__ */ e("span", { className: "aegis-notif-pop__count", children: i.unreadCount(n) })
48
+ ] }),
49
+ c && /* @__PURE__ */ o("div", { className: "aegis-notif-pop__stale", children: [
38
50
  /* @__PURE__ */ e(
39
- "span",
51
+ u,
40
52
  {
41
- className: "aegis-notif-pop__dot",
42
- "aria-hidden": "true",
43
- "data-unread": !i.read
53
+ className: "aegis-notif-pop__stale-icon",
54
+ "aria-hidden": !0
44
55
  }
45
56
  ),
46
- /* @__PURE__ */ o("span", { className: "aegis-notif-pop__body", children: [
47
- /* @__PURE__ */ o("span", { className: "aegis-notif-pop__row", children: [
48
- /* @__PURE__ */ e("span", { className: "aegis-notif-pop__item-title", children: i.title }),
49
- /* @__PURE__ */ e("span", { className: "aegis-notif-pop__time", children: k(i.timestamp) })
57
+ /* @__PURE__ */ o("div", { className: "aegis-notif-pop__stale-body", children: [
58
+ /* @__PURE__ */ o("span", { children: [
59
+ /* @__PURE__ */ e("span", { className: "aegis-notif-pop__stale-title", children: i.notificationsStale }),
60
+ " ",
61
+ c.message
50
62
  ] }),
51
- i.body && /* @__PURE__ */ e("span", { className: "aegis-notif-pop__item-body", children: i.body })
63
+ p && /* @__PURE__ */ e(b, { tone: "secondary", onClick: p, children: i.retry })
52
64
  ] })
53
- ]
54
- }
55
- ) }, i.id)) }),
56
- /* @__PURE__ */ e("div", { className: "aegis-notif-pop__foot", children: /* @__PURE__ */ e(
57
- v,
58
- {
59
- to: p,
60
- className: "aegis-notif-pop__view-all",
61
- onClick: () => {
62
- t(!1);
63
- },
64
- children: "View all"
65
- }
66
- ) })
67
- ] });
65
+ ] }),
66
+ s ? /* @__PURE__ */ e(
67
+ D,
68
+ {
69
+ size: "compact",
70
+ title: i.notificationsLoadFailed,
71
+ description: s.message,
72
+ action: p && /* @__PURE__ */ e(b, { tone: "secondary", onClick: p, children: i.retry })
73
+ }
74
+ ) : N.length === 0 ? /* @__PURE__ */ e("div", { className: "aegis-notif-pop__empty", children: i.notificationsCaughtUp }) : /* @__PURE__ */ e("ul", { className: "aegis-notif-pop__list", children: N.map((a) => /* @__PURE__ */ e("li", { className: "aegis-notif-pop__item-wrap", children: /* @__PURE__ */ o(
75
+ "button",
76
+ {
77
+ type: "button",
78
+ className: [
79
+ "aegis-notif-pop__item",
80
+ a.read ? "" : "aegis-notif-pop__item--unread"
81
+ ].filter(Boolean).join(" "),
82
+ onClick: () => {
83
+ w(a);
84
+ },
85
+ children: [
86
+ /* @__PURE__ */ e(
87
+ "span",
88
+ {
89
+ className: "aegis-notif-pop__dot",
90
+ "aria-hidden": "true",
91
+ "data-unread": !a.read
92
+ }
93
+ ),
94
+ /* @__PURE__ */ o("span", { className: "aegis-notif-pop__body", children: [
95
+ /* @__PURE__ */ o("span", { className: "aegis-notif-pop__row", children: [
96
+ /* @__PURE__ */ e("span", { className: "aegis-notif-pop__item-title", children: a.title }),
97
+ /* @__PURE__ */ e("span", { className: "aegis-notif-pop__time", children: R(a.timestamp, i) })
98
+ ] }),
99
+ a.body && /* @__PURE__ */ e("span", { className: "aegis-notif-pop__item-body", children: a.body })
100
+ ] })
101
+ ]
102
+ }
103
+ ) }, a.id)) }),
104
+ /* @__PURE__ */ e("div", { className: "aegis-notif-pop__foot", onClickCapture: t.close, children: /* @__PURE__ */ e(E, { to: y, className: "aegis-notif-pop__view-all", children: i.viewAll }) })
105
+ ]
106
+ }
107
+ );
68
108
  return /* @__PURE__ */ e(
69
- u,
109
+ P,
70
110
  {
71
- content: g,
111
+ content: C,
72
112
  trigger: "click",
73
- open: d,
74
- onOpenChange: t,
113
+ open: t.open,
114
+ onOpenChange: t.setOpen,
75
115
  placement: "bottomRight",
116
+ autoAdjustOverflow: S,
76
117
  arrow: !1,
77
118
  classNames: { root: "aegis-notif-pop__overlay" },
78
- children: /* @__PURE__ */ o(
119
+ children: /* @__PURE__ */ e("span", { className: "aegis-notif-bell__anchor", children: /* @__PURE__ */ o(
79
120
  "button",
80
121
  {
122
+ ref: t.triggerRef,
81
123
  type: "button",
82
124
  className: "aegis-notif-bell",
83
- "aria-label": a > 0 ? `Notifications: ${String(a)} unread` : "Notifications",
84
- "data-agent-action-id": s?.id,
85
- onClick: s ? () => void m.invoke() : void 0,
125
+ "aria-describedby": r ? h : void 0,
126
+ "aria-haspopup": "dialog",
127
+ "aria-expanded": t.open,
128
+ "aria-controls": t.open ? l : void 0,
129
+ "aria-label": i.notificationBellLabel(n),
130
+ "data-agent-action-id": m?.id,
131
+ onClick: m ? () => void O.invoke() : void 0,
86
132
  children: [
87
- /* @__PURE__ */ e(N, { className: "aegis-notif-bell__icon" }),
88
- a > 0 && /* @__PURE__ */ e("span", { className: "aegis-notif-bell__badge", "aria-hidden": "true", children: a > 99 ? "99+" : a })
133
+ /* @__PURE__ */ e(L, { className: "aegis-notif-bell__icon" }),
134
+ n > 0 && /* @__PURE__ */ e("span", { className: "aegis-notif-bell__badge", "aria-hidden": "true", children: n > 99 ? "99+" : n }),
135
+ r && /* @__PURE__ */ o(x, { children: [
136
+ /* @__PURE__ */ e(
137
+ u,
138
+ {
139
+ className: "aegis-notif-bell__stale",
140
+ "aria-hidden": !0
141
+ }
142
+ ),
143
+ /* @__PURE__ */ e("span", { id: h, className: "aegis-notif-bell__description", children: r })
144
+ ] })
89
145
  ]
90
146
  }
91
- )
147
+ ) })
92
148
  }
93
149
  );
94
150
  }
95
151
  export {
96
- D as NotificationBell
152
+ ie as NotificationBell
97
153
  };
98
154
  //# sourceMappingURL=NotificationBell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.js","sources":["../../../src/components/ui/NotificationBell.tsx"],"sourcesContent":["import { type ReactElement, useState } from 'react';\n\nimport { BellOutlined } from '@ant-design/icons';\nimport { Popover } from 'antd';\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport { type AegisNotification, useNotifications } from '../../notifications';\nimport './NotificationBell.css';\nimport { relativeTime } from './relativeTime';\n\ninterface NotificationBellProps {\n /** Path to the full inbox page, e.g. '/inbox'. */\n inboxPath: string;\n /** Override popover width in px. Defaults to 360. */\n width?: number;\n /** Optional aegis-ui agent action — fired when the bell is clicked. */\n action?: AegisAction<void, unknown>;\n}\n\nconst MAX_PREVIEW_ITEMS = 8;\nconst DEFAULT_WIDTH = 360;\n\nexport function NotificationBell({\n inboxPath,\n width = DEFAULT_WIDTH,\n action,\n}: NotificationBellProps): ReactElement {\n const { items, unreadCount, markRead } = useNotifications();\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const bound = useAegisAction<void, unknown>(action);\n\n const preview = items.slice(0, MAX_PREVIEW_ITEMS);\n\n const handleItemClick = (item: AegisNotification): void => {\n if (!item.read && markRead) {\n void markRead(item.id);\n }\n setOpen(false);\n if (item.to) {\n navigate(item.to);\n }\n };\n\n const content = (\n <div className=\"aegis-notif-pop\" style={{ width }}>\n <div className=\"aegis-notif-pop__head\">\n <span className=\"aegis-notif-pop__title\">Notifications</span>\n {unreadCount > 0 && (\n <span className=\"aegis-notif-pop__count\">{unreadCount} unread</span>\n )}\n </div>\n {preview.length === 0 ? (\n <div className=\"aegis-notif-pop__empty\">You&apos;re all caught up.</div>\n ) : (\n <ul className=\"aegis-notif-pop__list\">\n {preview.map((item) => (\n <li key={item.id} className=\"aegis-notif-pop__item-wrap\">\n <button\n type=\"button\"\n className={[\n 'aegis-notif-pop__item',\n item.read ? '' : 'aegis-notif-pop__item--unread',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n handleItemClick(item);\n }}\n >\n <span\n className=\"aegis-notif-pop__dot\"\n aria-hidden=\"true\"\n data-unread={!item.read}\n />\n <span className=\"aegis-notif-pop__body\">\n <span className=\"aegis-notif-pop__row\">\n <span className=\"aegis-notif-pop__item-title\">\n {item.title}\n </span>\n <span className=\"aegis-notif-pop__time\">\n {relativeTime(item.timestamp)}\n </span>\n </span>\n {item.body && (\n <span className=\"aegis-notif-pop__item-body\">\n {item.body}\n </span>\n )}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n <div className=\"aegis-notif-pop__foot\">\n <Link\n to={inboxPath}\n className=\"aegis-notif-pop__view-all\"\n onClick={() => {\n setOpen(false);\n }}\n >\n View all\n </Link>\n </div>\n </div>\n );\n\n return (\n <Popover\n content={content}\n trigger=\"click\"\n open={open}\n onOpenChange={setOpen}\n placement=\"bottomRight\"\n arrow={false}\n classNames={{ root: 'aegis-notif-pop__overlay' }}\n >\n <button\n type=\"button\"\n className=\"aegis-notif-bell\"\n aria-label={\n unreadCount > 0\n ? `Notifications: ${String(unreadCount)} unread`\n : 'Notifications'\n }\n data-agent-action-id={action?.id}\n onClick={action ? () => void bound.invoke() : undefined}\n >\n <BellOutlined className=\"aegis-notif-bell__icon\" />\n {unreadCount > 0 && (\n <span className=\"aegis-notif-bell__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n </button>\n </Popover>\n );\n}\n"],"names":["MAX_PREVIEW_ITEMS","DEFAULT_WIDTH","NotificationBell","inboxPath","width","action","items","unreadCount","markRead","useNotifications","open","setOpen","useState","navigate","useNavigate","bound","useAegisAction","preview","handleItemClick","item","content","jsxs","jsx","relativeTime","Link","Popover","BellOutlined"],"mappings":";;;;;;;;;AAqBA,MAAMA,IAAoB,GACpBC,IAAgB;AAEf,SAASC,EAAiB;AAAA,EAC/B,WAAAC;AAAA,EACA,OAAAC,IAAQH;AAAA,EACR,QAAAI;AACF,GAAwC;AACtC,QAAM,EAAE,OAAAC,GAAO,aAAAC,GAAa,UAAAC,EAAA,IAAaC,EAAA,GACnC,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAChCC,IAAWC,EAAA,GACXC,IAAQC,EAA8BX,CAAM,GAE5CY,IAAUX,EAAM,MAAM,GAAGN,CAAiB,GAE1CkB,IAAkB,CAACC,MAAkC;AACzD,IAAI,CAACA,EAAK,QAAQX,KACXA,EAASW,EAAK,EAAE,GAEvBR,EAAQ,EAAK,GACTQ,EAAK,MACPN,EAASM,EAAK,EAAE;AAAA,EAEpB,GAEMC,sBACH,OAAA,EAAI,WAAU,mBAAkB,OAAO,EAAE,OAAAhB,KACxC,UAAA;AAAA,IAAA,gBAAAiB,EAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,0BAAyB,UAAA,iBAAa;AAAA,MACrDf,IAAc,KACb,gBAAAc,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAA;AAAA,QAAAd;AAAA,QAAY;AAAA,MAAA,EAAA,CAAO;AAAA,IAAA,GAEjE;AAAA,IACCU,EAAQ,WAAW,IAClB,gBAAAK,EAAC,SAAI,WAAU,0BAAyB,mCAA0B,IAElE,gBAAAA,EAAC,QAAG,WAAU,yBACX,YAAQ,IAAI,CAACH,MACZ,gBAAAG,EAAC,MAAA,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,MACV,OAAO;AAAA,MACP,YAAY,EAAE,MAAM,2BAAA;AAAA,MAEpB,UAAA,gBAAAU;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,cACEd,IAAc,IACV,kBAAkB,OAAOA,CAAW,CAAC,YACrC;AAAA,UAEN,wBAAsBF,GAAQ;AAAA,UAC9B,SAASA,IAAS,MAAM,KAAKU,EAAM,WAAW;AAAA,UAE9C,UAAA;AAAA,YAAA,gBAAAO,EAACI,GAAA,EAAa,WAAU,yBAAA,CAAyB;AAAA,YAChDnB,IAAc,KACb,gBAAAe,EAAC,QAAA,EAAK,WAAU,2BAA0B,eAAY,QACnD,UAAAf,IAAc,KAAK,QAAQA,EAAA,CAC9B;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"NotificationBell.js","sources":["../../../src/components/ui/NotificationBell.tsx"],"sourcesContent":["import { type ReactElement, useEffect, useId } from 'react';\n\nimport { BellOutlined, ExclamationCircleFilled } from '@ant-design/icons';\nimport { Popover } from 'antd';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport { POPOVER_OVERFLOW } from '../../hooks/popoverOverflow';\nimport { useDialogPopover } from '../../hooks/useDialogPopover';\nimport { useStrings } from '../../locale';\nimport type { AegisNotification } from '../../notifications';\nimport { Button } from './Button';\nimport { ErrorState } from './ErrorState';\nimport './NotificationBell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\nimport { relativeTime } from './relativeTime';\n\nexport interface NotificationBellProps {\n /** Newest first; the popover previews the first few. */\n items: AegisNotification[];\n /** Shown on the badge. Defaults to the number of unread `items`. */\n unreadCount?: number;\n /**\n * Fired when the user opens an item; the popover closes first. The host\n * marks it read and navigates to `item.to`.\n */\n onOpen?: (item: AegisNotification) => void;\n /** Path to the full inbox page, e.g. '/inbox'. */\n inboxPath: string;\n /** Renders the \"View all\" link. Defaults to an `<a href>`. */\n linkComponent?: LinkComponent;\n /** Override popover width in px. Defaults to 360. */\n width?: number;\n /** Optional aegis-ui agent action — fired when the bell is clicked. */\n action?: AegisAction<void, unknown>;\n /**\n * Set while live updates are failing: the bell shows a caution mark and\n * the popover says the items may be out of date. The count stays.\n */\n liveError?: Error | null;\n /**\n * Why loading failed. With no `items`, the bell shows the caution mark and\n * the popover says the notifications couldn't load; with `items`, it is\n * shown like `liveError`.\n */\n error?: Error | null;\n /**\n * Renders a retry button where the popover says loading failed or the\n * items may be out of date.\n */\n onRetry?: () => void;\n}\n\nconst MAX_PREVIEW_ITEMS = 8;\nconst DEFAULT_WIDTH = 360;\n\nexport function NotificationBell({\n items,\n unreadCount = items.filter((n) => !n.read).length,\n onOpen,\n inboxPath,\n linkComponent: LinkImpl = DefaultLink,\n width = DEFAULT_WIDTH,\n action,\n liveError,\n error,\n onRetry,\n}: NotificationBellProps): ReactElement {\n const strings = useStrings();\n const popover = useDialogPopover<HTMLDivElement>();\n const { open, focusPanel } = popover;\n const panelId = useId();\n const staleId = `${panelId}-stale`;\n const bound = useAegisAction<void, unknown>(action);\n\n const preview = items.slice(0, MAX_PREVIEW_ITEMS);\n const loadError = items.length === 0 ? (error ?? null) : null;\n const staleError = loadError ? null : (liveError ?? error ?? null);\n let caution: string | null = null;\n if (loadError) {\n caution = strings.notificationsLoadFailedNote(loadError.message);\n } else if (staleError) {\n caution = strings.notificationsStaleNote(staleError.message);\n }\n\n // A retry that works removes the retry button that had focus, which\n // would leave the open panel without it.\n useEffect(() => {\n if (open && document.activeElement === document.body) {\n focusPanel();\n }\n }, [loadError, staleError, open, focusPanel]);\n\n const handleItemClick = (item: AegisNotification): void => {\n popover.close();\n onOpen?.(item);\n };\n\n const content = (\n <div\n ref={popover.panelRef}\n id={panelId}\n className=\"aegis-notif-pop\"\n style={{ width }}\n role=\"dialog\"\n aria-labelledby={`${panelId}-title`}\n tabIndex={-1}\n >\n <div className=\"aegis-notif-pop__head\">\n <span id={`${panelId}-title`} className=\"aegis-notif-pop__title\">\n {strings.notifications}\n </span>\n {unreadCount > 0 && (\n <span className=\"aegis-notif-pop__count\">\n {strings.unreadCount(unreadCount)}\n </span>\n )}\n </div>\n {staleError && (\n <div className=\"aegis-notif-pop__stale\">\n <ExclamationCircleFilled\n className=\"aegis-notif-pop__stale-icon\"\n aria-hidden\n />\n <div className=\"aegis-notif-pop__stale-body\">\n <span>\n <span className=\"aegis-notif-pop__stale-title\">\n {strings.notificationsStale}\n </span>{' '}\n {staleError.message}\n </span>\n {onRetry && (\n <Button tone=\"secondary\" onClick={onRetry}>\n {strings.retry}\n </Button>\n )}\n </div>\n </div>\n )}\n {loadError ? (\n <ErrorState\n size=\"compact\"\n title={strings.notificationsLoadFailed}\n description={loadError.message}\n action={\n onRetry && (\n <Button tone=\"secondary\" onClick={onRetry}>\n {strings.retry}\n </Button>\n )\n }\n />\n ) : preview.length === 0 ? (\n <div className=\"aegis-notif-pop__empty\">\n {strings.notificationsCaughtUp}\n </div>\n ) : (\n <ul className=\"aegis-notif-pop__list\">\n {preview.map((item) => (\n <li key={item.id} className=\"aegis-notif-pop__item-wrap\">\n <button\n type=\"button\"\n className={[\n 'aegis-notif-pop__item',\n item.read ? '' : 'aegis-notif-pop__item--unread',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n handleItemClick(item);\n }}\n >\n <span\n className=\"aegis-notif-pop__dot\"\n aria-hidden=\"true\"\n data-unread={!item.read}\n />\n <span className=\"aegis-notif-pop__body\">\n <span className=\"aegis-notif-pop__row\">\n <span className=\"aegis-notif-pop__item-title\">\n {item.title}\n </span>\n <span className=\"aegis-notif-pop__time\">\n {relativeTime(item.timestamp, strings)}\n </span>\n </span>\n {item.body && (\n <span className=\"aegis-notif-pop__item-body\">\n {item.body}\n </span>\n )}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n {/* Following the link closes the popover. */}\n <div className=\"aegis-notif-pop__foot\" onClickCapture={popover.close}>\n <LinkImpl to={inboxPath} className=\"aegis-notif-pop__view-all\">\n {strings.viewAll}\n </LinkImpl>\n </div>\n </div>\n );\n\n return (\n <Popover\n content={content}\n trigger=\"click\"\n open={popover.open}\n onOpenChange={popover.setOpen}\n placement=\"bottomRight\"\n autoAdjustOverflow={POPOVER_OVERFLOW}\n arrow={false}\n classNames={{ root: 'aegis-notif-pop__overlay' }}\n >\n {/* antd sets aria-describedby on its child to the popover's id, so\n the wrapper takes that and the bell keeps its own description. */}\n <span className=\"aegis-notif-bell__anchor\">\n <button\n ref={popover.triggerRef}\n type=\"button\"\n className=\"aegis-notif-bell\"\n aria-describedby={caution ? staleId : undefined}\n aria-haspopup=\"dialog\"\n aria-expanded={popover.open}\n aria-controls={popover.open ? panelId : undefined}\n aria-label={strings.notificationBellLabel(unreadCount)}\n data-agent-action-id={action?.id}\n onClick={action ? () => void bound.invoke() : undefined}\n >\n <BellOutlined className=\"aegis-notif-bell__icon\" />\n {unreadCount > 0 && (\n <span className=\"aegis-notif-bell__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n {caution && (\n <>\n <ExclamationCircleFilled\n className=\"aegis-notif-bell__stale\"\n aria-hidden\n />\n <span id={staleId} className=\"aegis-notif-bell__description\">\n {caution}\n </span>\n </>\n )}\n </button>\n </span>\n </Popover>\n );\n}\n"],"names":["MAX_PREVIEW_ITEMS","DEFAULT_WIDTH","NotificationBell","items","unreadCount","n","onOpen","inboxPath","LinkImpl","DefaultLink","width","action","liveError","error","onRetry","strings","useStrings","popover","useDialogPopover","open","focusPanel","panelId","useId","staleId","bound","useAegisAction","preview","loadError","staleError","caution","useEffect","handleItemClick","item","content","jsxs","jsx","ExclamationCircleFilled","Button","ErrorState","Popover","POPOVER_OVERFLOW","BellOutlined","Fragment"],"mappings":";;;;;;;;;;;;;AAqDA,MAAMA,IAAoB,GACpBC,IAAgB;AAEf,SAASC,GAAiB;AAAA,EAC/B,OAAAC;AAAA,EACA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A,QAAA;AAAA,UACC,KAAKjB,EAAQ;AAAA,UACb,MAAK;AAAA,UACL,WAAU;AAAA,UACV,oBAAkBY,IAAUN,IAAU;AAAA,UACtC,iBAAc;AAAA,UACd,iBAAeN,EAAQ;AAAA,UACvB,iBAAeA,EAAQ,OAAOI,IAAU;AAAA,UACxC,cAAYN,EAAQ,sBAAsBX,CAAW;AAAA,UACrD,wBAAsBO,GAAQ;AAAA,UAC9B,SAASA,IAAS,MAAM,KAAKa,EAAM,WAAW;AAAA,UAE9C,UAAA;AAAA,YAAA,gBAAAW,EAACM,GAAA,EAAa,WAAU,yBAAA,CAAyB;AAAA,YAChDrC,IAAc,KACb,gBAAA+B,EAAC,QAAA,EAAK,WAAU,2BAA0B,eAAY,QACnD,UAAA/B,IAAc,KAAK,QAAQA,EAAA,CAC9B;AAAA,YAEDyB,KACC,gBAAAK,EAAAQ,GAAA,EACE,UAAA;AAAA,cAAA,gBAAAP;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,eAAW;AAAA,gBAAA;AAAA,cAAA;AAAA,gCAEZ,QAAA,EAAK,IAAIb,GAAS,WAAU,iCAC1B,UAAAM,EAAA,CACH;AAAA,YAAA,EAAA,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,EAEJ,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react/jsx-runtime"),g=require("react");;/* empty css */const $=require("./TextField.cjs"),C=require("../../locale/useStrings.cjs"),V=/^-?\d+$/,B=/^-?(\d+\.?\d*|\.\d+)$/,G=/^-?$/,U=/^-?\.?$/;function m(e){return e===void 0?"":String(e)}function _(e,n,s){return Math.min(s??1/0,Math.max(n??-1/0,e))}function k({value:e,onChange:n,label:s,ariaLabel:v,integer:i=!1,min:r,max:p,step:y=1,unit:N,placeholder:w,helperText:x,error:I,disabled:A=!1,id:S,"aria-describedby":T,className:E}){const b=C.useStrings(),D=i?V:B,u=t=>D.test(t.trim())?Number(t.trim()):void 0,[a,l]=g.useState(()=>m(e)),[M,d]=g.useState(e);e!==M&&(d(e),e!==u(a)&&l(m(e)));const f=u(a),h=(i?G:U).test(a.trim())||f!==void 0?void 0:i?b.enterWholeNumber:b.enterNumber,q=t=>{const c=u(t);l(t),d(c),n(c)},P=t=>{const o=_((f??r??0)+t*y,r,p);l(m(o)),d(o),n(o)},R=t=>{const o={ArrowUp:1,ArrowDown:-1,PageUp:10,PageDown:-10}[t.key];o!==void 0&&(t.preventDefault(),P(o))},j=r===void 0||r<0?"text":i?"numeric":"decimal",F=["aegis-number-field",E??""].filter(Boolean).join(" ");return L.jsx($.TextField,{className:F,id:S,label:s,"aria-label":s===void 0?v:void 0,"aria-describedby":T,role:"spinbutton","aria-valuenow":f,"aria-valuemin":r,"aria-valuemax":p,inputMode:j,autoComplete:"off",value:a,placeholder:w,disabled:A,error:h??I,helperText:x,trailingIcon:N,onChange:t=>{q(t.target.value)},onKeyDown:R})}exports.NumberField=k;
2
+ //# sourceMappingURL=NumberField.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberField.cjs","sources":["../../../src/components/ui/NumberField.tsx"],"sourcesContent":["import { type KeyboardEvent, type ReactNode, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './NumberField.css';\nimport { TextField } from './TextField';\n\ninterface NumberFieldProps {\n /** `undefined` when the field is empty or its text is not a number. */\n value: number | undefined;\n onChange: (value: number | undefined) => void;\n label?: string;\n /** Accessible name for a field shown without a visible label. */\n ariaLabel?: string;\n /** Whole numbers only: a decimal is refused, as a backend `int` field would. */\n integer?: boolean;\n /** Bounds for the arrow keys, announced to assistive tech. A typed value outside them is still passed on, for the host to judge. */\n min?: number;\n max?: number;\n /** What the arrow keys add or take away; PageUp / PageDown move ten steps. */\n step?: number;\n /** Unit shown inside the field, e.g. `ms`. */\n unit?: ReactNode;\n placeholder?: string;\n helperText?: ReactNode;\n /** A problem the host found with the value, e.g. out of range. */\n error?: string;\n disabled?: boolean;\n id?: string;\n /** Ids of the text that describes the field, such as a FormRow's description; read before the field's own helper or error text. */\n 'aria-describedby'?: string;\n className?: string;\n}\n\nconst INTEGER = /^-?\\d+$/;\nconst DECIMAL = /^-?(\\d+\\.?\\d*|\\.\\d+)$/;\n/** Text that may still become a number as the user keeps typing. */\nconst PARTIAL_INTEGER = /^-?$/;\nconst PARTIAL_DECIMAL = /^-?\\.?$/;\n\nfunction format(value: number | undefined): string {\n return value === undefined ? '' : String(value);\n}\n\nfunction clamp(value: number, min?: number, max?: number): number {\n return Math.min(max ?? Infinity, Math.max(min ?? -Infinity, value));\n}\n\n/**\n * A text field for one number. It keeps the text as typed, hands the host\n * the parsed number (or `undefined`), and says itself when the text is not\n * a number of the right kind, since the host never sees that text.\n */\nexport function NumberField({\n value,\n onChange,\n label,\n ariaLabel,\n integer = false,\n min,\n max,\n step = 1,\n unit,\n placeholder,\n helperText,\n error,\n disabled = false,\n id,\n 'aria-describedby': describedBy,\n className,\n}: NumberFieldProps) {\n const strings = useStrings();\n const pattern = integer ? INTEGER : DECIMAL;\n const parse = (raw: string): number | undefined =>\n pattern.test(raw.trim()) ? Number(raw.trim()) : undefined;\n\n const [text, setText] = useState(() => format(value));\n const [shownValue, setShownValue] = useState(value);\n if (value !== shownValue) {\n setShownValue(value);\n if (value !== parse(text)) {\n setText(format(value));\n }\n }\n\n const parsed = parse(text);\n const partial = (integer ? PARTIAL_INTEGER : PARTIAL_DECIMAL).test(\n text.trim(),\n );\n const formatError =\n partial || parsed !== undefined\n ? undefined\n : integer\n ? strings.enterWholeNumber\n : strings.enterNumber;\n\n const edit = (next: string): void => {\n const nextValue = parse(next);\n setText(next);\n setShownValue(nextValue);\n onChange(nextValue);\n };\n\n const stepBy = (steps: number): void => {\n const from = parsed ?? min ?? 0;\n const next = clamp(from + steps * step, min, max);\n setText(format(next));\n setShownValue(next);\n onChange(next);\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>): void => {\n const steps: Partial<Record<string, number>> = {\n ArrowUp: 1,\n ArrowDown: -1,\n PageUp: 10,\n PageDown: -10,\n };\n const by = steps[event.key];\n if (by !== undefined) {\n event.preventDefault();\n stepBy(by);\n }\n };\n\n const allowsNegative = min === undefined || min < 0;\n const inputMode = allowsNegative ? 'text' : integer ? 'numeric' : 'decimal';\n const cls = ['aegis-number-field', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <TextField\n className={cls}\n id={id}\n label={label}\n aria-label={label === undefined ? ariaLabel : undefined}\n aria-describedby={describedBy}\n role=\"spinbutton\"\n aria-valuenow={parsed}\n aria-valuemin={min}\n aria-valuemax={max}\n inputMode={inputMode}\n autoComplete=\"off\"\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n error={formatError ?? error}\n helperText={helperText}\n trailingIcon={unit}\n onChange={(event) => {\n edit(event.target.value);\n }}\n onKeyDown={onKeyDown}\n />\n );\n}\n"],"names":["INTEGER","DECIMAL","PARTIAL_INTEGER","PARTIAL_DECIMAL","format","value","clamp","min","max","NumberField","onChange","label","ariaLabel","integer","step","unit","placeholder","helperText","error","disabled","id","describedBy","className","strings","useStrings","pattern","parse","raw","text","setText","useState","shownValue","setShownValue","parsed","formatError","edit","next","nextValue","stepBy","steps","onKeyDown","event","by","inputMode","cls","jsx","TextField"],"mappings":"qPAiCMA,EAAU,UACVC,EAAU,wBAEVC,EAAkB,OAClBC,EAAkB,UAExB,SAASC,EAAOC,EAAmC,CACjD,OAAOA,IAAU,OAAY,GAAK,OAAOA,CAAK,CAChD,CAEA,SAASC,EAAMD,EAAeE,EAAcC,EAAsB,CAChE,OAAO,KAAK,IAAIA,GAAO,IAAU,KAAK,IAAID,GAAO,KAAWF,CAAK,CAAC,CACpE,CAOO,SAASI,EAAY,CAC1B,MAAAJ,EACA,SAAAK,EACA,MAAAC,EACA,UAAAC,EACA,QAAAC,EAAU,GACV,IAAAN,EACA,IAAAC,EACA,KAAAM,EAA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B,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAE5E,OACEuB,EAAAA,IAACC,EAAAA,UAAA,CACC,UAAWF,EACX,GAAAxB,EACA,MAAAT,EACA,aAAYA,IAAU,OAAYC,EAAY,OAC9C,mBAAkBS,EAClB,KAAK,aACL,gBAAeY,EACf,gBAAe1B,EACf,gBAAeC,EACf,UAAAmC,EACA,aAAa,MACb,MAAOf,EACP,YAAAZ,EACA,SAAAG,EACA,MAAOe,GAAehB,EACtB,WAAAD,EACA,aAAcF,EACd,SAAW0B,GAAU,CACnBN,EAAKM,EAAM,OAAO,KAAK,CACzB,EACA,UAAAD,CAAA,CAAA,CAGN"}
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ interface NumberFieldProps {
3
+ /** `undefined` when the field is empty or its text is not a number. */
4
+ value: number | undefined;
5
+ onChange: (value: number | undefined) => void;
6
+ label?: string;
7
+ /** Accessible name for a field shown without a visible label. */
8
+ ariaLabel?: string;
9
+ /** Whole numbers only: a decimal is refused, as a backend `int` field would. */
10
+ integer?: boolean;
11
+ /** Bounds for the arrow keys, announced to assistive tech. A typed value outside them is still passed on, for the host to judge. */
12
+ min?: number;
13
+ max?: number;
14
+ /** What the arrow keys add or take away; PageUp / PageDown move ten steps. */
15
+ step?: number;
16
+ /** Unit shown inside the field, e.g. `ms`. */
17
+ unit?: ReactNode;
18
+ placeholder?: string;
19
+ helperText?: ReactNode;
20
+ /** A problem the host found with the value, e.g. out of range. */
21
+ error?: string;
22
+ disabled?: boolean;
23
+ id?: string;
24
+ /** Ids of the text that describes the field, such as a FormRow's description; read before the field's own helper or error text. */
25
+ 'aria-describedby'?: string;
26
+ className?: string;
27
+ }
28
+ /**
29
+ * A text field for one number. It keeps the text as typed, hands the host
30
+ * the parsed number (or `undefined`), and says itself when the text is not
31
+ * a number of the right kind, since the host never sees that text.
32
+ */
33
+ export declare function NumberField({ value, onChange, label, ariaLabel, integer, min, max, step, unit, placeholder, helperText, error, disabled, id, 'aria-describedby': describedBy, className, }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
34
+ export {};
@@ -0,0 +1,80 @@
1
+ import { jsx as V } from "react/jsx-runtime";
2
+ import { useState as v } from "react";
3
+ /* empty css */
4
+ import { TextField as j } from "./TextField.js";
5
+ import { useStrings as B } from "../../locale/useStrings.js";
6
+ const F = /^-?\d+$/, G = /^-?(\d+\.?\d*|\.\d+)$/, U = /^-?$/, _ = /^-?\.?$/;
7
+ function p(o) {
8
+ return o === void 0 ? "" : String(o);
9
+ }
10
+ function k(o, n, s) {
11
+ return Math.min(s ?? 1 / 0, Math.max(n ?? -1 / 0, o));
12
+ }
13
+ function Q({
14
+ value: o,
15
+ onChange: n,
16
+ label: s,
17
+ ariaLabel: w,
18
+ integer: i = !1,
19
+ min: r,
20
+ max: u,
21
+ step: I = 1,
22
+ unit: N,
23
+ placeholder: x,
24
+ helperText: y,
25
+ error: A,
26
+ disabled: g = !1,
27
+ id: E,
28
+ "aria-describedby": D,
29
+ className: T
30
+ }) {
31
+ const b = B(), h = i ? F : G, m = (t) => h.test(t.trim()) ? Number(t.trim()) : void 0, [a, l] = v(() => p(o)), [M, d] = v(o);
32
+ o !== M && (d(o), o !== m(a) && l(p(o)));
33
+ const f = m(a), L = (i ? U : _).test(
34
+ a.trim()
35
+ ) || f !== void 0 ? void 0 : i ? b.enterWholeNumber : b.enterNumber, P = (t) => {
36
+ const c = m(t);
37
+ l(t), d(c), n(c);
38
+ }, R = (t) => {
39
+ const e = k((f ?? r ?? 0) + t * I, r, u);
40
+ l(p(e)), d(e), n(e);
41
+ }, S = (t) => {
42
+ const e = {
43
+ ArrowUp: 1,
44
+ ArrowDown: -1,
45
+ PageUp: 10,
46
+ PageDown: -10
47
+ }[t.key];
48
+ e !== void 0 && (t.preventDefault(), R(e));
49
+ }, $ = r === void 0 || r < 0 ? "text" : i ? "numeric" : "decimal", C = ["aegis-number-field", T ?? ""].filter(Boolean).join(" ");
50
+ return /* @__PURE__ */ V(
51
+ j,
52
+ {
53
+ className: C,
54
+ id: E,
55
+ label: s,
56
+ "aria-label": s === void 0 ? w : void 0,
57
+ "aria-describedby": D,
58
+ role: "spinbutton",
59
+ "aria-valuenow": f,
60
+ "aria-valuemin": r,
61
+ "aria-valuemax": u,
62
+ inputMode: $,
63
+ autoComplete: "off",
64
+ value: a,
65
+ placeholder: x,
66
+ disabled: g,
67
+ error: L ?? A,
68
+ helperText: y,
69
+ trailingIcon: N,
70
+ onChange: (t) => {
71
+ P(t.target.value);
72
+ },
73
+ onKeyDown: S
74
+ }
75
+ );
76
+ }
77
+ export {
78
+ Q as NumberField
79
+ };
80
+ //# sourceMappingURL=NumberField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberField.js","sources":["../../../src/components/ui/NumberField.tsx"],"sourcesContent":["import { type KeyboardEvent, type ReactNode, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './NumberField.css';\nimport { TextField } from './TextField';\n\ninterface NumberFieldProps {\n /** `undefined` when the field is empty or its text is not a number. */\n value: number | undefined;\n onChange: (value: number | undefined) => void;\n label?: string;\n /** Accessible name for a field shown without a visible label. */\n ariaLabel?: string;\n /** Whole numbers only: a decimal is refused, as a backend `int` field would. */\n integer?: boolean;\n /** Bounds for the arrow keys, announced to assistive tech. A typed value outside them is still passed on, for the host to judge. */\n min?: number;\n max?: number;\n /** What the arrow keys add or take away; PageUp / PageDown move ten steps. */\n step?: number;\n /** Unit shown inside the field, e.g. `ms`. */\n unit?: ReactNode;\n placeholder?: string;\n helperText?: ReactNode;\n /** A problem the host found with the value, e.g. out of range. */\n error?: string;\n disabled?: boolean;\n id?: string;\n /** Ids of the text that describes the field, such as a FormRow's description; read before the field's own helper or error text. */\n 'aria-describedby'?: string;\n className?: string;\n}\n\nconst INTEGER = /^-?\\d+$/;\nconst DECIMAL = /^-?(\\d+\\.?\\d*|\\.\\d+)$/;\n/** Text that may still become a number as the user keeps typing. */\nconst PARTIAL_INTEGER = /^-?$/;\nconst PARTIAL_DECIMAL = /^-?\\.?$/;\n\nfunction format(value: number | undefined): string {\n return value === undefined ? '' : String(value);\n}\n\nfunction clamp(value: number, min?: number, max?: number): number {\n return Math.min(max ?? Infinity, Math.max(min ?? -Infinity, value));\n}\n\n/**\n * A text field for one number. It keeps the text as typed, hands the host\n * the parsed number (or `undefined`), and says itself when the text is not\n * a number of the right kind, since the host never sees that text.\n */\nexport function NumberField({\n value,\n onChange,\n label,\n ariaLabel,\n integer = false,\n min,\n max,\n step = 1,\n unit,\n placeholder,\n helperText,\n error,\n disabled = false,\n id,\n 'aria-describedby': describedBy,\n className,\n}: NumberFieldProps) {\n const strings = useStrings();\n const pattern = integer ? INTEGER : DECIMAL;\n const parse = (raw: string): number | undefined =>\n pattern.test(raw.trim()) ? Number(raw.trim()) : undefined;\n\n const [text, setText] = useState(() => format(value));\n const [shownValue, setShownValue] = useState(value);\n if (value !== shownValue) {\n setShownValue(value);\n if (value !== parse(text)) {\n setText(format(value));\n }\n }\n\n const parsed = parse(text);\n const partial = (integer ? PARTIAL_INTEGER : PARTIAL_DECIMAL).test(\n text.trim(),\n );\n const formatError =\n partial || parsed !== undefined\n ? undefined\n : integer\n ? strings.enterWholeNumber\n : strings.enterNumber;\n\n const edit = (next: string): void => {\n const nextValue = parse(next);\n setText(next);\n setShownValue(nextValue);\n onChange(nextValue);\n };\n\n const stepBy = (steps: number): void => {\n const from = parsed ?? min ?? 0;\n const next = clamp(from + steps * step, min, max);\n setText(format(next));\n setShownValue(next);\n onChange(next);\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>): void => {\n const steps: Partial<Record<string, number>> = {\n ArrowUp: 1,\n ArrowDown: -1,\n PageUp: 10,\n PageDown: -10,\n };\n const by = steps[event.key];\n if (by !== undefined) {\n event.preventDefault();\n stepBy(by);\n }\n };\n\n const allowsNegative = min === undefined || min < 0;\n const inputMode = allowsNegative ? 'text' : integer ? 'numeric' : 'decimal';\n const cls = ['aegis-number-field', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <TextField\n className={cls}\n id={id}\n label={label}\n aria-label={label === undefined ? ariaLabel : undefined}\n aria-describedby={describedBy}\n role=\"spinbutton\"\n aria-valuenow={parsed}\n aria-valuemin={min}\n aria-valuemax={max}\n inputMode={inputMode}\n autoComplete=\"off\"\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n error={formatError ?? error}\n helperText={helperText}\n trailingIcon={unit}\n onChange={(event) => {\n edit(event.target.value);\n }}\n onKeyDown={onKeyDown}\n />\n );\n}\n"],"names":["INTEGER","DECIMAL","PARTIAL_INTEGER","PARTIAL_DECIMAL","format","value","clamp","min","max","NumberField","onChange","label","ariaLabel","integer","step","unit","placeholder","helperText","error","disabled","id","describedBy","className","strings","useStrings","pattern","parse","raw","text","setText","useState","shownValue","setShownValue","parsed","formatError","edit","next","nextValue","stepBy","steps","onKeyDown","event","by","inputMode","cls","jsx","TextField"],"mappings":";;;;;AAiCA,MAAMA,IAAU,WACVC,IAAU,yBAEVC,IAAkB,QAClBC,IAAkB;AAExB,SAASC,EAAOC,GAAmC;AACjD,SAAOA,MAAU,SAAY,KAAK,OAAOA,CAAK;AAChD;AAEA,SAASC,EAAMD,GAAeE,GAAcC,GAAsB;AAChE,SAAO,KAAK,IAAIA,KAAO,OAAU,KAAK,IAAID,KAAO,QAAWF,CAAK,CAAC;AACpE;AAOO,SAASI,EAAY;AAAA,EAC1B,OAAAJ;AAAA,EACA,UAAAK;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,KAAAN;AAAA,EACA,KAAAC;AAAA,EACA,MAAAM,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,IAAAC;AAAA,EACA,oBAAoBC;AAAA,EACpB,WAAAC;AACF,GAAqB;AACnB,QAAMC,IAAUC,EAAA,GACVC,IAAUZ,IA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AACC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACX,IAAAxB;AAAA,MACA,OAAAT;AAAA,MACA,cAAYA,MAAU,SAAYC,IAAY;AAAA,MAC9C,oBAAkBS;AAAA,MAClB,MAAK;AAAA,MACL,iBAAeY;AAAA,MACf,iBAAe1B;AAAA,MACf,iBAAeC;AAAA,MACf,WAAAmC;AAAA,MACA,cAAa;AAAA,MACb,OAAOf;AAAA,MACP,aAAAZ;AAAA,MACA,UAAAG;AAAA,MACA,OAAOe,KAAehB;AAAA,MACtB,YAAAD;AAAA,MACA,cAAcF;AAAA,MACd,UAAU,CAAC0B,MAAU;AACnB,QAAAN,EAAKM,EAAM,OAAO,KAAK;AAAA,MACzB;AAAA,MACA,WAAAD;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("react"),n=require("./MetricLabel.cjs"),d=require("./MonoValue.cjs");;/* empty css */const b=require("./Skeleton.cjs");function S(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?r:r.slice(l+1)}function f(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?"":`${r.slice(0,l)}/`}function q({prefixes:s,currentPrefix:r,onPrefixChange:l,children:m,toolbar:j,searchSlot:a,viewModeSlot:u,footer:h,dragOverlay:_,selectionCount:i=0,hideTree:c=!1,defaultTreeCollapsed:x=!1,loading:g=!1,className:w}){const[t,N]=M.useState(x),p=!c&&!t,v=["aegis-object-browser",c||t?"aegis-object-browser--no-tree":"",w??""].filter(Boolean).join(" "),k=j!==void 0||a!==void 0||u!==void 0||i>0;return e.jsxs("div",{className:v,children:[c?null:e.jsxs("aside",{className:"aegis-object-browser__tree","aria-label":"Folders",children:[e.jsxs("header",{className:"aegis-object-browser__tree-head",children:[e.jsx(n.MetricLabel,{children:"Folders"}),e.jsx("button",{type:"button",className:"aegis-object-browser__tree-toggle",onClick:()=>{N(o=>!o)},"aria-label":t?"Expand folders":"Collapse folders",title:t?"Expand":"Collapse",children:t?"›":"‹"})]}),p?e.jsxs("ul",{className:"aegis-object-browser__tree-list",children:[r!==""?e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item aegis-object-browser__tree-item--up",onClick:()=>{l(f(r))},children:[e.jsx("span",{"aria-hidden":"true",children:"↑"}),e.jsx(d.MonoValue,{size:"sm",children:".."})]})}):null,s.length===0&&r===""?e.jsx("li",{className:"aegis-object-browser__tree-empty",children:e.jsx(n.MetricLabel,{children:"No sub-prefixes"})}):null,s.map(o=>{const y=S(o);return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item",onClick:()=>{l(o)},children:[e.jsx("span",{"aria-hidden":"true",children:"▸"}),e.jsx(d.MonoValue,{size:"sm",children:y})]})},o)})]}):null]}),e.jsxs("section",{className:"aegis-object-browser__main",children:[k?e.jsxs("div",{className:"aegis-object-browser__toolbar",children:[i>0?e.jsxs("span",{className:"aegis-object-browser__selection",children:[e.jsx(d.MonoValue,{size:"sm",children:i.toString()}),e.jsx(n.MetricLabel,{children:"Selected"})]}):null,a!==void 0?e.jsx("span",{className:"aegis-object-browser__search-slot",children:a}):null,e.jsxs("span",{className:"aegis-object-browser__toolbar-slot",children:[u,j]})]}):null,e.jsxs("div",{className:"aegis-object-browser__body-wrap",children:[_!==void 0?e.jsx("div",{className:"aegis-object-browser__drag-overlay",children:_}):null,e.jsx("div",{className:"aegis-object-browser__body",children:g?e.jsxs("div",{className:"aegis-object-browser__skeleton","aria-busy":"true",children:[e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"})]}):m})]}),h!==void 0?e.jsx("div",{className:"aegis-object-browser__footer",children:h}):null]})]})}exports.ObjectBrowser=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),M=require("../../hooks/useDevelopAfterLoad.cjs"),m=require("./MetricLabel.cjs"),g=require("./MonoValue.cjs");;/* empty css */const d=require("./Skeleton.cjs"),L=require("../../locale/useStrings.cjs");function O(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?r:r.slice(l+1)}function R(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?"":`${r.slice(0,l)}/`}function B({prefixes:s,currentPrefix:r,onPrefixChange:l,children:x,toolbar:b,searchSlot:i,viewModeSlot:j,footer:u,dragOverlay:h,selectionCount:c=0,hideTree:n=!1,defaultTreeCollapsed:w=!1,loading:_=!1,className:v}){const o=L.useStrings(),[t,p]=S.useState(w),N=M.useDevelopAfterLoad(_),k=!n&&!t,y=["aegis-object-browser",n||t?"aegis-object-browser--no-tree":"",v??""].filter(Boolean).join(" "),f=b!==void 0||i!==void 0||j!==void 0||c>0;return e.jsxs("div",{className:y,children:[n?null:e.jsxs("aside",{className:"aegis-object-browser__tree","aria-label":o.folders,children:[e.jsxs("header",{className:"aegis-object-browser__tree-head",children:[e.jsx(m.MetricLabel,{children:o.folders}),e.jsx("button",{type:"button",className:"aegis-object-browser__tree-toggle",onClick:()=>{p(a=>!a)},"aria-label":t?o.expandFolders:o.collapseFolders,title:t?o.expandRow:o.collapseRow,children:t?"›":"‹"})]}),k?e.jsxs("ul",{className:"aegis-object-browser__tree-list",children:[r!==""?e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item aegis-object-browser__tree-item--up",onClick:()=>{l(R(r))},children:[e.jsx("span",{"aria-hidden":"true",children:"↑"}),e.jsx(g.MonoValue,{size:"sm",children:".."})]})}):null,s.length===0&&r===""?e.jsx("li",{className:"aegis-object-browser__tree-empty",children:e.jsx(m.MetricLabel,{children:o.noSubPrefixes})}):null,s.map(a=>{const q=O(a);return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item",onClick:()=>{l(a)},children:[e.jsx("span",{"aria-hidden":"true",children:"▸"}),e.jsx(g.MonoValue,{size:"sm",children:q})]})},a)})]}):null]}),e.jsxs("section",{className:"aegis-object-browser__main",children:[f?e.jsxs("div",{className:"aegis-object-browser__toolbar",children:[c>0?e.jsx("span",{className:"aegis-object-browser__selection",children:o.selectionCount(c)}):null,i!==void 0?e.jsx("span",{className:"aegis-object-browser__search-slot",children:i}):null,e.jsxs("span",{className:"aegis-object-browser__toolbar-slot",children:[j,b]})]}):null,e.jsxs("div",{className:"aegis-object-browser__body-wrap",children:[h!==void 0?e.jsx("div",{className:"aegis-object-browser__drag-overlay",children:h}):null,e.jsx("div",{className:"aegis-object-browser__body","data-aegis-develop":N||void 0,children:_?e.jsxs("div",{className:"aegis-object-browser__skeleton","aria-busy":"true",children:[e.jsx(d.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(d.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(d.Skeleton,{block:!0,height:"var(--space-8)"})]}):x})]}),u!==void 0?e.jsx("div",{className:"aegis-object-browser__footer",children:u}):null]})]})}exports.ObjectBrowser=B;
2
2
  //# sourceMappingURL=ObjectBrowser.cjs.map