@lincyaw/aegis-ui 0.9.4 → 0.10.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 (661) 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 +13 -3
  9. package/dist/agent/ask/AskPanel.js +130 -109
  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 +2 -5
  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/Alert.cjs +1 -1
  56. package/dist/components/ui/Alert.cjs.map +1 -1
  57. package/dist/components/ui/Alert.js +11 -11
  58. package/dist/components/ui/Alert.js.map +1 -1
  59. package/dist/components/ui/BlastRadiusBar.cjs +1 -1
  60. package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
  61. package/dist/components/ui/BlastRadiusBar.d.ts +3 -1
  62. package/dist/components/ui/BlastRadiusBar.js +20 -17
  63. package/dist/components/ui/BlastRadiusBar.js.map +1 -1
  64. package/dist/components/ui/Button.cjs.map +1 -1
  65. package/dist/components/ui/Button.d.ts +1 -1
  66. package/dist/components/ui/Button.js.map +1 -1
  67. package/dist/components/ui/ChatComposer.cjs +1 -1
  68. package/dist/components/ui/ChatComposer.cjs.map +1 -1
  69. package/dist/components/ui/ChatComposer.js +3 -3
  70. package/dist/components/ui/ChatComposer.js.map +1 -1
  71. package/dist/components/ui/ChatSessionList.cjs +1 -1
  72. package/dist/components/ui/ChatSessionList.cjs.map +1 -1
  73. package/dist/components/ui/ChatSessionList.js +127 -150
  74. package/dist/components/ui/ChatSessionList.js.map +1 -1
  75. package/dist/components/ui/Checkbox.cjs +1 -1
  76. package/dist/components/ui/Checkbox.cjs.map +1 -1
  77. package/dist/components/ui/Checkbox.d.ts +3 -1
  78. package/dist/components/ui/Checkbox.js +19 -17
  79. package/dist/components/ui/Checkbox.js.map +1 -1
  80. package/dist/components/ui/Chip.cjs +1 -1
  81. package/dist/components/ui/Chip.cjs.map +1 -1
  82. package/dist/components/ui/Chip.d.ts +6 -1
  83. package/dist/components/ui/Chip.js +20 -18
  84. package/dist/components/ui/Chip.js.map +1 -1
  85. package/dist/components/ui/ChoiceCardGroup.cjs +2 -0
  86. package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -0
  87. package/dist/components/ui/ChoiceCardGroup.d.ts +25 -0
  88. package/dist/components/ui/ChoiceCardGroup.js +44 -0
  89. package/dist/components/ui/ChoiceCardGroup.js.map +1 -0
  90. package/dist/components/ui/CodeBlock.cjs +2 -2
  91. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  92. package/dist/components/ui/CodeBlock.js +31 -27
  93. package/dist/components/ui/CodeBlock.js.map +1 -1
  94. package/dist/components/ui/CodeEditor.cjs +1 -1
  95. package/dist/components/ui/CodeEditor.cjs.map +1 -1
  96. package/dist/components/ui/CodeEditor.d.ts +5 -4
  97. package/dist/components/ui/CodeEditor.js +210 -63
  98. package/dist/components/ui/CodeEditor.js.map +1 -1
  99. package/dist/components/ui/Collapse.cjs +1 -1
  100. package/dist/components/ui/Collapse.cjs.map +1 -1
  101. package/dist/components/ui/Collapse.js +23 -23
  102. package/dist/components/ui/Collapse.js.map +1 -1
  103. package/dist/components/ui/ColumnChart.cjs +1 -1
  104. package/dist/components/ui/ColumnChart.cjs.map +1 -1
  105. package/dist/components/ui/ColumnChart.js +21 -20
  106. package/dist/components/ui/ColumnChart.js.map +1 -1
  107. package/dist/components/ui/CommandPalette.cjs +1 -1
  108. package/dist/components/ui/CommandPalette.cjs.map +1 -1
  109. package/dist/components/ui/CommandPalette.d.ts +23 -1
  110. package/dist/components/ui/CommandPalette.js +145 -120
  111. package/dist/components/ui/CommandPalette.js.map +1 -1
  112. package/dist/components/ui/CommitGraph.cjs +2 -0
  113. package/dist/components/ui/CommitGraph.cjs.map +1 -0
  114. package/dist/components/ui/CommitGraph.d.ts +77 -0
  115. package/dist/components/ui/CommitGraph.js +380 -0
  116. package/dist/components/ui/CommitGraph.js.map +1 -0
  117. package/dist/components/ui/ContentInspectorDialog.cjs +1 -3
  118. package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
  119. package/dist/components/ui/ContentInspectorDialog.d.ts +4 -10
  120. package/dist/components/ui/ContentInspectorDialog.js +40 -193
  121. package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
  122. package/dist/components/ui/ContentPreview.cjs +3 -0
  123. package/dist/components/ui/ContentPreview.cjs.map +1 -0
  124. package/dist/components/ui/ContentPreview.d.ts +13 -0
  125. package/dist/components/ui/ContentPreview.js +134 -0
  126. package/dist/components/ui/ContentPreview.js.map +1 -0
  127. package/dist/components/ui/CopyGlyph.cjs +2 -0
  128. package/dist/components/ui/CopyGlyph.cjs.map +1 -0
  129. package/dist/components/ui/CopyGlyph.d.ts +7 -0
  130. package/dist/components/ui/CopyGlyph.js +48 -0
  131. package/dist/components/ui/CopyGlyph.js.map +1 -0
  132. package/dist/components/ui/DataList.cjs +1 -1
  133. package/dist/components/ui/DataList.cjs.map +1 -1
  134. package/dist/components/ui/DataList.d.ts +7 -1
  135. package/dist/components/ui/DataList.js +87 -32
  136. package/dist/components/ui/DataList.js.map +1 -1
  137. package/dist/components/ui/DataTable.cjs +1 -1
  138. package/dist/components/ui/DataTable.cjs.map +1 -1
  139. package/dist/components/ui/DataTable.d.ts +22 -18
  140. package/dist/components/ui/DataTable.js +279 -341
  141. package/dist/components/ui/DataTable.js.map +1 -1
  142. package/dist/components/ui/DropdownMenu.cjs +1 -1
  143. package/dist/components/ui/DropdownMenu.cjs.map +1 -1
  144. package/dist/components/ui/DropdownMenu.d.ts +8 -1
  145. package/dist/components/ui/DropdownMenu.js +66 -50
  146. package/dist/components/ui/DropdownMenu.js.map +1 -1
  147. package/dist/components/ui/ErrorState.cjs +1 -1
  148. package/dist/components/ui/ErrorState.cjs.map +1 -1
  149. package/dist/components/ui/ErrorState.d.ts +1 -0
  150. package/dist/components/ui/ErrorState.js +1 -1
  151. package/dist/components/ui/ErrorState.js.map +1 -1
  152. package/dist/components/ui/EventTable.cjs +1 -1
  153. package/dist/components/ui/EventTable.cjs.map +1 -1
  154. package/dist/components/ui/EventTable.d.ts +16 -2
  155. package/dist/components/ui/EventTable.js +190 -164
  156. package/dist/components/ui/EventTable.js.map +1 -1
  157. package/dist/components/ui/FileDropzone.cjs +1 -1
  158. package/dist/components/ui/FileDropzone.cjs.map +1 -1
  159. package/dist/components/ui/FileDropzone.d.ts +3 -21
  160. package/dist/components/ui/FileDropzone.js +41 -64
  161. package/dist/components/ui/FileDropzone.js.map +1 -1
  162. package/dist/components/ui/FilePreview.cjs +1 -1
  163. package/dist/components/ui/FilePreview.cjs.map +1 -1
  164. package/dist/components/ui/FilePreview.d.ts +4 -1
  165. package/dist/components/ui/FilePreview.js +45 -42
  166. package/dist/components/ui/FilePreview.js.map +1 -1
  167. package/dist/components/ui/FileTree.cjs +1 -1
  168. package/dist/components/ui/FileTree.cjs.map +1 -1
  169. package/dist/components/ui/FileTree.d.ts +18 -2
  170. package/dist/components/ui/FileTree.js +141 -110
  171. package/dist/components/ui/FileTree.js.map +1 -1
  172. package/dist/components/ui/FolderDropzone.cjs +1 -1
  173. package/dist/components/ui/FolderDropzone.cjs.map +1 -1
  174. package/dist/components/ui/FolderDropzone.d.ts +10 -1
  175. package/dist/components/ui/FolderDropzone.js +108 -128
  176. package/dist/components/ui/FolderDropzone.js.map +1 -1
  177. package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
  178. package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
  179. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -0
  180. package/dist/components/ui/ForgotPasswordForm.js +21 -19
  181. package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
  182. package/dist/components/ui/FormRow.cjs +1 -1
  183. package/dist/components/ui/FormRow.cjs.map +1 -1
  184. package/dist/components/ui/FormRow.d.ts +10 -1
  185. package/dist/components/ui/FormRow.js +22 -11
  186. package/dist/components/ui/FormRow.js.map +1 -1
  187. package/dist/components/ui/HeadlineStat.cjs +1 -1
  188. package/dist/components/ui/HeadlineStat.cjs.map +1 -1
  189. package/dist/components/ui/HeadlineStat.js +6 -5
  190. package/dist/components/ui/HeadlineStat.js.map +1 -1
  191. package/dist/components/ui/InboxPage.cjs +1 -1
  192. package/dist/components/ui/InboxPage.cjs.map +1 -1
  193. package/dist/components/ui/InboxPage.d.ts +16 -2
  194. package/dist/components/ui/InboxPage.js +54 -52
  195. package/dist/components/ui/InboxPage.js.map +1 -1
  196. package/dist/components/ui/KeyValueList.cjs +1 -1
  197. package/dist/components/ui/KeyValueList.cjs.map +1 -1
  198. package/dist/components/ui/KeyValueList.d.ts +6 -5
  199. package/dist/components/ui/KeyValueList.js +14 -17
  200. package/dist/components/ui/KeyValueList.js.map +1 -1
  201. package/dist/components/ui/LoginForm.cjs +1 -1
  202. package/dist/components/ui/LoginForm.cjs.map +1 -1
  203. package/dist/components/ui/LoginForm.d.ts +1 -0
  204. package/dist/components/ui/LoginForm.js +56 -48
  205. package/dist/components/ui/LoginForm.js.map +1 -1
  206. package/dist/components/ui/Markdown.cjs +1 -1
  207. package/dist/components/ui/Markdown.cjs.map +1 -1
  208. package/dist/components/ui/Markdown.d.ts +3 -2
  209. package/dist/components/ui/Markdown.js +57 -49
  210. package/dist/components/ui/Markdown.js.map +1 -1
  211. package/dist/components/ui/MdxDocument.cjs +1 -1
  212. package/dist/components/ui/MdxDocument.cjs.map +1 -1
  213. package/dist/components/ui/MdxDocument.d.ts +7 -2
  214. package/dist/components/ui/MdxDocument.js +34 -49
  215. package/dist/components/ui/MdxDocument.js.map +1 -1
  216. package/dist/components/ui/MetadataList.cjs +1 -1
  217. package/dist/components/ui/MetadataList.cjs.map +1 -1
  218. package/dist/components/ui/MetadataList.d.ts +7 -1
  219. package/dist/components/ui/MetadataList.js +29 -20
  220. package/dist/components/ui/MetadataList.js.map +1 -1
  221. package/dist/components/ui/MetricCard.cjs +1 -1
  222. package/dist/components/ui/MetricCard.cjs.map +1 -1
  223. package/dist/components/ui/MetricCard.js +16 -16
  224. package/dist/components/ui/MetricCard.js.map +1 -1
  225. package/dist/components/ui/MonoValue.cjs +1 -1
  226. package/dist/components/ui/MonoValue.cjs.map +1 -1
  227. package/dist/components/ui/MonoValue.d.ts +8 -1
  228. package/dist/components/ui/MonoValue.js +15 -13
  229. package/dist/components/ui/MonoValue.js.map +1 -1
  230. package/dist/components/ui/NotificationBell.cjs +1 -1
  231. package/dist/components/ui/NotificationBell.cjs.map +1 -1
  232. package/dist/components/ui/NotificationBell.d.ts +15 -3
  233. package/dist/components/ui/NotificationBell.js +41 -39
  234. package/dist/components/ui/NotificationBell.js.map +1 -1
  235. package/dist/components/ui/NumberField.cjs +2 -0
  236. package/dist/components/ui/NumberField.cjs.map +1 -0
  237. package/dist/components/ui/NumberField.d.ts +32 -0
  238. package/dist/components/ui/NumberField.js +77 -0
  239. package/dist/components/ui/NumberField.js.map +1 -0
  240. package/dist/components/ui/ObjectBrowser.cjs +1 -1
  241. package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
  242. package/dist/components/ui/ObjectBrowser.js +38 -30
  243. package/dist/components/ui/ObjectBrowser.js.map +1 -1
  244. package/dist/components/ui/ObjectInspector.cjs +1 -1
  245. package/dist/components/ui/ObjectInspector.cjs.map +1 -1
  246. package/dist/components/ui/ObjectInspector.d.ts +5 -0
  247. package/dist/components/ui/ObjectInspector.js +61 -69
  248. package/dist/components/ui/ObjectInspector.js.map +1 -1
  249. package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
  250. package/dist/components/ui/PageSizeSelect.d.ts +3 -4
  251. package/dist/components/ui/PageSizeSelect.js.map +1 -1
  252. package/dist/components/ui/Pagination.cjs +1 -1
  253. package/dist/components/ui/Pagination.cjs.map +1 -1
  254. package/dist/components/ui/Pagination.d.ts +16 -6
  255. package/dist/components/ui/Pagination.js +58 -45
  256. package/dist/components/ui/Pagination.js.map +1 -1
  257. package/dist/components/ui/Panel.cjs +1 -1
  258. package/dist/components/ui/Panel.cjs.map +1 -1
  259. package/dist/components/ui/Panel.d.ts +12 -2
  260. package/dist/components/ui/Panel.js +53 -40
  261. package/dist/components/ui/Panel.js.map +1 -1
  262. package/dist/components/ui/ParquetViewer.cjs +1 -1
  263. package/dist/components/ui/ParquetViewer.cjs.map +1 -1
  264. package/dist/components/ui/ParquetViewer.d.ts +1 -1
  265. package/dist/components/ui/ParquetViewer.js +124 -118
  266. package/dist/components/ui/ParquetViewer.js.map +1 -1
  267. package/dist/components/ui/ProjectSelector.cjs +1 -1
  268. package/dist/components/ui/ProjectSelector.cjs.map +1 -1
  269. package/dist/components/ui/ProjectSelector.js +9 -9
  270. package/dist/components/ui/ProjectSelector.js.map +1 -1
  271. package/dist/components/ui/QueryAutocomplete.cjs +1 -1
  272. package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
  273. package/dist/components/ui/QueryAutocomplete.js +123 -107
  274. package/dist/components/ui/QueryAutocomplete.js.map +1 -1
  275. package/dist/components/ui/RegisterForm.cjs +1 -1
  276. package/dist/components/ui/RegisterForm.cjs.map +1 -1
  277. package/dist/components/ui/RegisterForm.d.ts +1 -0
  278. package/dist/components/ui/RegisterForm.js +46 -38
  279. package/dist/components/ui/RegisterForm.js.map +1 -1
  280. package/dist/components/ui/RollingValue.cjs +2 -0
  281. package/dist/components/ui/RollingValue.cjs.map +1 -0
  282. package/dist/components/ui/RollingValue.d.ts +14 -0
  283. package/dist/components/ui/RollingValue.js +39 -0
  284. package/dist/components/ui/RollingValue.js.map +1 -0
  285. package/dist/components/ui/SavedQueryBar.cjs +1 -1
  286. package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
  287. package/dist/components/ui/SavedQueryBar.d.ts +8 -2
  288. package/dist/components/ui/SavedQueryBar.js +162 -161
  289. package/dist/components/ui/SavedQueryBar.js.map +1 -1
  290. package/dist/components/ui/ScrollStory.cjs +1 -2
  291. package/dist/components/ui/ScrollStory.cjs.map +1 -1
  292. package/dist/components/ui/ScrollStory.js +57 -75
  293. package/dist/components/ui/ScrollStory.js.map +1 -1
  294. package/dist/components/ui/Select.cjs +1 -1
  295. package/dist/components/ui/Select.cjs.map +1 -1
  296. package/dist/components/ui/Select.d.ts +1 -1
  297. package/dist/components/ui/Select.js +33 -32
  298. package/dist/components/ui/Select.js.map +1 -1
  299. package/dist/components/ui/ServiceMap.cjs +1 -1
  300. package/dist/components/ui/ServiceMap.cjs.map +1 -1
  301. package/dist/components/ui/ServiceMap.d.ts +51 -2
  302. package/dist/components/ui/ServiceMap.js +314 -117
  303. package/dist/components/ui/ServiceMap.js.map +1 -1
  304. package/dist/components/ui/ShareLinkDialog.cjs +1 -1
  305. package/dist/components/ui/ShareLinkDialog.cjs.map +1 -1
  306. package/dist/components/ui/ShareLinkDialog.d.ts +5 -3
  307. package/dist/components/ui/ShareLinkDialog.js +107 -98
  308. package/dist/components/ui/ShareLinkDialog.js.map +1 -1
  309. package/dist/components/ui/Slider.cjs +2 -0
  310. package/dist/components/ui/Slider.cjs.map +1 -0
  311. package/dist/components/ui/Slider.d.ts +22 -0
  312. package/dist/components/ui/Slider.js +53 -0
  313. package/dist/components/ui/Slider.js.map +1 -0
  314. package/dist/components/ui/SparkLine.cjs +1 -1
  315. package/dist/components/ui/SparkLine.cjs.map +1 -1
  316. package/dist/components/ui/SparkLine.d.ts +4 -1
  317. package/dist/components/ui/SparkLine.js +30 -25
  318. package/dist/components/ui/SparkLine.js.map +1 -1
  319. package/dist/components/ui/StatBlock.cjs +1 -1
  320. package/dist/components/ui/StatBlock.cjs.map +1 -1
  321. package/dist/components/ui/StatBlock.js +17 -16
  322. package/dist/components/ui/StatBlock.js.map +1 -1
  323. package/dist/components/ui/StatusDot.cjs.map +1 -1
  324. package/dist/components/ui/StatusDot.d.ts +5 -1
  325. package/dist/components/ui/StatusDot.js.map +1 -1
  326. package/dist/components/ui/Steps.cjs +2 -0
  327. package/dist/components/ui/Steps.cjs.map +1 -0
  328. package/dist/components/ui/Steps.d.ts +19 -0
  329. package/dist/components/ui/Steps.js +57 -0
  330. package/dist/components/ui/Steps.js.map +1 -0
  331. package/dist/components/ui/TableOfContents.cjs +1 -1
  332. package/dist/components/ui/TableOfContents.cjs.map +1 -1
  333. package/dist/components/ui/TableOfContents.d.ts +3 -3
  334. package/dist/components/ui/TableOfContents.js +47 -28
  335. package/dist/components/ui/TableOfContents.js.map +1 -1
  336. package/dist/components/ui/Tabs.cjs +2 -2
  337. package/dist/components/ui/Tabs.cjs.map +1 -1
  338. package/dist/components/ui/Tabs.d.ts +37 -3
  339. package/dist/components/ui/Tabs.js +169 -109
  340. package/dist/components/ui/Tabs.js.map +1 -1
  341. package/dist/components/ui/TextField.cjs +1 -1
  342. package/dist/components/ui/TextField.cjs.map +1 -1
  343. package/dist/components/ui/TextField.js +16 -15
  344. package/dist/components/ui/TextField.js.map +1 -1
  345. package/dist/components/ui/TimeDisplay.cjs +1 -1
  346. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  347. package/dist/components/ui/TimeDisplay.d.ts +14 -4
  348. package/dist/components/ui/TimeDisplay.js +43 -44
  349. package/dist/components/ui/TimeDisplay.js.map +1 -1
  350. package/dist/components/ui/TimelineChart.cjs +2 -1
  351. package/dist/components/ui/TimelineChart.cjs.map +1 -1
  352. package/dist/components/ui/TimelineChart.d.ts +1 -0
  353. package/dist/components/ui/TimelineChart.js +221 -169
  354. package/dist/components/ui/TimelineChart.js.map +1 -1
  355. package/dist/components/ui/ToolCallCard.cjs +1 -1
  356. package/dist/components/ui/ToolCallCard.cjs.map +1 -1
  357. package/dist/components/ui/ToolCallCard.js +22 -22
  358. package/dist/components/ui/ToolCallCard.js.map +1 -1
  359. package/dist/components/ui/Toolbar.cjs +1 -1
  360. package/dist/components/ui/Toolbar.cjs.map +1 -1
  361. package/dist/components/ui/Toolbar.d.ts +4 -16
  362. package/dist/components/ui/Toolbar.js +8 -62
  363. package/dist/components/ui/Toolbar.js.map +1 -1
  364. package/dist/components/ui/TraceSpanInspector.cjs +1 -1
  365. package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
  366. package/dist/components/ui/TraceSpanInspector.js +93 -72
  367. package/dist/components/ui/TraceSpanInspector.js.map +1 -1
  368. package/dist/components/ui/TraceTree.cjs +1 -1
  369. package/dist/components/ui/TraceTree.cjs.map +1 -1
  370. package/dist/components/ui/TraceTree.d.ts +36 -2
  371. package/dist/components/ui/TraceTree.js +278 -170
  372. package/dist/components/ui/TraceTree.js.map +1 -1
  373. package/dist/components/ui/TrajectoryStep.cjs +1 -1
  374. package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
  375. package/dist/components/ui/TrajectoryStep.js +39 -43
  376. package/dist/components/ui/TrajectoryStep.js.map +1 -1
  377. package/dist/components/ui/TrajectoryTimeline.cjs +1 -1
  378. package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -1
  379. package/dist/components/ui/TrajectoryTimeline.js +31 -28
  380. package/dist/components/ui/TrajectoryTimeline.js.map +1 -1
  381. package/dist/components/ui/UploadQueue.cjs +1 -1
  382. package/dist/components/ui/UploadQueue.cjs.map +1 -1
  383. package/dist/components/ui/UploadQueue.d.ts +18 -2
  384. package/dist/components/ui/UploadQueue.js +56 -63
  385. package/dist/components/ui/UploadQueue.js.map +1 -1
  386. package/dist/components/ui/authValidation.cjs +2 -0
  387. package/dist/components/ui/authValidation.cjs.map +1 -0
  388. package/dist/components/ui/authValidation.d.ts +3 -0
  389. package/dist/components/ui/authValidation.js +9 -0
  390. package/dist/components/ui/authValidation.js.map +1 -0
  391. package/dist/components/ui/classifyContent.cjs +6 -0
  392. package/dist/components/ui/classifyContent.cjs.map +1 -0
  393. package/dist/components/ui/classifyContent.d.ts +39 -0
  394. package/dist/components/ui/classifyContent.js +169 -0
  395. package/dist/components/ui/classifyContent.js.map +1 -0
  396. package/dist/components/ui/dropFiles.cjs +2 -0
  397. package/dist/components/ui/dropFiles.cjs.map +1 -0
  398. package/dist/components/ui/dropFiles.d.ts +7 -0
  399. package/dist/components/ui/dropFiles.js +16 -0
  400. package/dist/components/ui/dropFiles.js.map +1 -0
  401. package/dist/components/ui/index.d.ts +23 -10
  402. package/dist/components/ui/linkComponent.cjs +1 -1
  403. package/dist/components/ui/linkComponent.cjs.map +1 -1
  404. package/dist/components/ui/linkComponent.d.ts +4 -2
  405. package/dist/components/ui/linkComponent.js +15 -5
  406. package/dist/components/ui/linkComponent.js.map +1 -1
  407. package/dist/components/ui/markdownDocument.cjs +2 -0
  408. package/dist/components/ui/markdownDocument.cjs.map +1 -0
  409. package/dist/components/ui/markdownDocument.d.ts +40 -0
  410. package/dist/components/ui/markdownDocument.js +39 -0
  411. package/dist/components/ui/markdownDocument.js.map +1 -0
  412. package/dist/components/ui/traceStatus.cjs +2 -0
  413. package/dist/components/ui/traceStatus.cjs.map +1 -0
  414. package/dist/components/ui/{traceFormat.d.ts → traceStatus.d.ts} +0 -1
  415. package/dist/components/ui/traceStatus.js +7 -0
  416. package/dist/components/ui/traceStatus.js.map +1 -0
  417. package/dist/components/ui/useColumnWidths.cjs +2 -0
  418. package/dist/components/ui/useColumnWidths.cjs.map +1 -0
  419. package/dist/components/ui/useColumnWidths.d.ts +60 -0
  420. package/dist/components/ui/useColumnWidths.js +196 -0
  421. package/dist/components/ui/useColumnWidths.js.map +1 -0
  422. package/dist/hooks/useDevelopAfterLoad.cjs +2 -0
  423. package/dist/hooks/useDevelopAfterLoad.cjs.map +1 -0
  424. package/dist/hooks/useDevelopAfterLoad.d.ts +8 -0
  425. package/dist/hooks/useDevelopAfterLoad.js +9 -0
  426. package/dist/hooks/useDevelopAfterLoad.js.map +1 -0
  427. package/dist/hooks/useResizable.cjs +1 -1
  428. package/dist/hooks/useResizable.cjs.map +1 -1
  429. package/dist/hooks/useResizable.js +87 -78
  430. package/dist/hooks/useResizable.js.map +1 -1
  431. package/dist/hooks/useSavedQueries.cjs +1 -1
  432. package/dist/hooks/useSavedQueries.cjs.map +1 -1
  433. package/dist/hooks/useSavedQueries.d.ts +6 -0
  434. package/dist/hooks/useSavedQueries.js +49 -58
  435. package/dist/hooks/useSavedQueries.js.map +1 -1
  436. package/dist/hooks/useSectionSpy.cjs +1 -1
  437. package/dist/hooks/useSectionSpy.cjs.map +1 -1
  438. package/dist/hooks/useSectionSpy.d.ts +6 -1
  439. package/dist/hooks/useSectionSpy.js +87 -57
  440. package/dist/hooks/useSectionSpy.js.map +1 -1
  441. package/dist/hooks/useStorageItem.cjs +2 -0
  442. package/dist/hooks/useStorageItem.cjs.map +1 -0
  443. package/dist/hooks/useStorageItem.d.ts +6 -0
  444. package/dist/hooks/useStorageItem.js +36 -0
  445. package/dist/hooks/useStorageItem.js.map +1 -0
  446. package/dist/index.cjs +1 -1
  447. package/dist/index.d.ts +4 -4
  448. package/dist/index.js +321 -313
  449. package/dist/index.js.map +1 -1
  450. package/dist/layouts/shell/AegisShell.cjs +1 -1
  451. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  452. package/dist/layouts/shell/AegisShell.d.ts +4 -2
  453. package/dist/layouts/shell/AegisShell.js +149 -242
  454. package/dist/layouts/shell/AegisShell.js.map +1 -1
  455. package/dist/layouts/shell/AppRoutes.cjs +2 -0
  456. package/dist/layouts/shell/AppRoutes.cjs.map +1 -0
  457. package/dist/layouts/shell/AppRoutes.d.ts +5 -0
  458. package/dist/layouts/shell/AppRoutes.js +8 -0
  459. package/dist/layouts/shell/AppRoutes.js.map +1 -0
  460. package/dist/layouts/shell/BreadcrumbBar.cjs +1 -1
  461. package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -1
  462. package/dist/layouts/shell/BreadcrumbBar.d.ts +1 -2
  463. package/dist/layouts/shell/BreadcrumbBar.js +19 -26
  464. package/dist/layouts/shell/BreadcrumbBar.js.map +1 -1
  465. package/dist/layouts/shell/RouteErrorBoundary.cjs +2 -0
  466. package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -0
  467. package/dist/layouts/shell/RouteErrorBoundary.d.ts +23 -0
  468. package/dist/layouts/shell/RouteErrorBoundary.js +35 -0
  469. package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -0
  470. package/dist/layouts/shell/RouterLink.cjs +2 -0
  471. package/dist/layouts/shell/RouterLink.cjs.map +1 -0
  472. package/dist/layouts/shell/RouterLink.d.ts +3 -0
  473. package/dist/layouts/shell/RouterLink.js +22 -0
  474. package/dist/layouts/shell/RouterLink.js.map +1 -0
  475. package/dist/layouts/shell/ShellCommandPalette.cjs +2 -0
  476. package/dist/layouts/shell/ShellCommandPalette.cjs.map +1 -0
  477. package/dist/layouts/shell/ShellCommandPalette.d.ts +7 -0
  478. package/dist/layouts/shell/ShellCommandPalette.js +32 -0
  479. package/dist/layouts/shell/ShellCommandPalette.js.map +1 -0
  480. package/dist/layouts/shell/ShellInboxPage.cjs +2 -0
  481. package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -0
  482. package/dist/layouts/shell/ShellInboxPage.d.ts +12 -0
  483. package/dist/layouts/shell/ShellInboxPage.js +32 -0
  484. package/dist/layouts/shell/ShellInboxPage.js.map +1 -0
  485. package/dist/layouts/shell/ShellNotificationBell.cjs +2 -0
  486. package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -0
  487. package/dist/layouts/shell/ShellNotificationBell.d.ts +5 -0
  488. package/dist/layouts/shell/ShellNotificationBell.js +24 -0
  489. package/dist/layouts/shell/ShellNotificationBell.js.map +1 -0
  490. package/dist/layouts/shell/Sidebar.cjs +1 -1
  491. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  492. package/dist/layouts/shell/Sidebar.d.ts +4 -2
  493. package/dist/layouts/shell/Sidebar.js +14 -11
  494. package/dist/layouts/shell/Sidebar.js.map +1 -1
  495. package/dist/layouts/shell/TopHeader.cjs +1 -1
  496. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  497. package/dist/layouts/shell/TopHeader.d.ts +6 -2
  498. package/dist/layouts/shell/TopHeader.js +77 -65
  499. package/dist/layouts/shell/TopHeader.js.map +1 -1
  500. package/dist/layouts/shell/apps.cjs +2 -0
  501. package/dist/layouts/shell/apps.cjs.map +1 -0
  502. package/dist/layouts/shell/apps.d.ts +12 -0
  503. package/dist/layouts/shell/apps.js +34 -0
  504. package/dist/layouts/shell/apps.js.map +1 -0
  505. package/dist/layouts/shell/buildRouteTree.cjs +2 -0
  506. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -0
  507. package/dist/layouts/shell/buildRouteTree.d.ts +22 -0
  508. package/dist/layouts/shell/buildRouteTree.js +49 -0
  509. package/dist/layouts/shell/buildRouteTree.js.map +1 -0
  510. package/dist/layouts/shell/environments/EnvironmentProvider.cjs +2 -0
  511. package/dist/layouts/shell/environments/EnvironmentProvider.cjs.map +1 -0
  512. package/dist/layouts/shell/environments/EnvironmentProvider.d.ts +13 -0
  513. package/dist/layouts/shell/environments/EnvironmentProvider.js +90 -0
  514. package/dist/layouts/shell/environments/EnvironmentProvider.js.map +1 -0
  515. package/dist/layouts/shell/environments/{context.cjs → environmentContext.cjs} +2 -2
  516. package/dist/layouts/shell/environments/environmentContext.cjs.map +1 -0
  517. package/dist/layouts/shell/environments/environmentContext.d.ts +6 -0
  518. package/dist/layouts/shell/environments/environmentContext.js +8 -0
  519. package/dist/layouts/shell/environments/environmentContext.js.map +1 -0
  520. package/dist/layouts/shell/environments/index.d.ts +2 -3
  521. package/dist/layouts/shell/environments/types.cjs.map +1 -1
  522. package/dist/layouts/shell/environments/types.d.ts +23 -15
  523. package/dist/layouts/shell/environments/types.js.map +1 -1
  524. package/dist/layouts/shell/environments/useEnvironment.cjs +2 -0
  525. package/dist/layouts/shell/environments/useEnvironment.cjs.map +1 -0
  526. package/dist/layouts/shell/environments/{hooks.d.ts → useEnvironment.d.ts} +3 -2
  527. package/dist/layouts/shell/environments/useEnvironment.js +25 -0
  528. package/dist/layouts/shell/environments/useEnvironment.js.map +1 -0
  529. package/dist/layouts/shell/index.d.ts +3 -1
  530. package/dist/layouts/shell/types.d.ts +14 -14
  531. package/dist/layouts/shell/useAgentPanel.cjs +2 -0
  532. package/dist/layouts/shell/useAgentPanel.cjs.map +1 -0
  533. package/dist/layouts/shell/useAgentPanel.d.ts +13 -0
  534. package/dist/layouts/shell/useAgentPanel.js +21 -0
  535. package/dist/layouts/shell/useAgentPanel.js.map +1 -0
  536. package/dist/layouts/shell/useAppCommands.cjs +2 -0
  537. package/dist/layouts/shell/useAppCommands.cjs.map +1 -0
  538. package/dist/layouts/shell/useAppCommands.d.ts +6 -0
  539. package/dist/layouts/shell/useAppCommands.js +19 -0
  540. package/dist/layouts/shell/useAppCommands.js.map +1 -0
  541. package/dist/layouts/shell/useMobileNav.cjs +2 -0
  542. package/dist/layouts/shell/useMobileNav.cjs.map +1 -0
  543. package/dist/layouts/shell/useMobileNav.d.ts +20 -0
  544. package/dist/layouts/shell/useMobileNav.js +54 -0
  545. package/dist/layouts/shell/useMobileNav.js.map +1 -0
  546. package/dist/layouts/shell/useOpenNotification.cjs +2 -0
  547. package/dist/layouts/shell/useOpenNotification.cjs.map +1 -0
  548. package/dist/layouts/shell/useOpenNotification.d.ts +3 -0
  549. package/dist/layouts/shell/useOpenNotification.js +16 -0
  550. package/dist/layouts/shell/useOpenNotification.js.map +1 -0
  551. package/dist/layouts/shell/useShellUser.cjs +2 -0
  552. package/dist/layouts/shell/useShellUser.cjs.map +1 -0
  553. package/dist/layouts/shell/useShellUser.d.ts +7 -0
  554. package/dist/layouts/shell/useShellUser.js +21 -0
  555. package/dist/layouts/shell/useShellUser.js.map +1 -0
  556. package/dist/layouts/shell/useWarnOnce.cjs +2 -0
  557. package/dist/layouts/shell/useWarnOnce.cjs.map +1 -0
  558. package/dist/layouts/shell/useWarnOnce.d.ts +1 -0
  559. package/dist/layouts/shell/useWarnOnce.js +11 -0
  560. package/dist/layouts/shell/useWarnOnce.js.map +1 -0
  561. package/dist/lib/format.cjs +1 -1
  562. package/dist/lib/format.cjs.map +1 -1
  563. package/dist/lib/format.d.ts +34 -0
  564. package/dist/lib/format.js +98 -9
  565. package/dist/lib/format.js.map +1 -1
  566. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +1 -1
  567. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -1
  568. package/dist/lib/luceneQuery/tokenizeAtCursor.js +29 -29
  569. package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -1
  570. package/dist/lib/storage.cjs +1 -1
  571. package/dist/lib/storage.cjs.map +1 -1
  572. package/dist/lib/storage.js +19 -12
  573. package/dist/lib/storage.js.map +1 -1
  574. package/dist/lib/timeRange.cjs +1 -1
  575. package/dist/lib/timeRange.cjs.map +1 -1
  576. package/dist/lib/timeRange.js +4 -1
  577. package/dist/lib/timeRange.js.map +1 -1
  578. package/dist/locale/strings.cjs +1 -1
  579. package/dist/locale/strings.cjs.map +1 -1
  580. package/dist/locale/strings.d.ts +2 -0
  581. package/dist/locale/strings.js +2 -0
  582. package/dist/locale/strings.js.map +1 -1
  583. package/dist/notifications/notificationContext.cjs.map +1 -1
  584. package/dist/notifications/notificationContext.d.ts +5 -0
  585. package/dist/notifications/notificationContext.js.map +1 -1
  586. package/dist/style.css +1 -1
  587. package/dist/theme/ThemeProvider.cjs +1 -1
  588. package/dist/theme/ThemeProvider.cjs.map +1 -1
  589. package/dist/theme/ThemeProvider.d.ts +2 -1
  590. package/dist/theme/ThemeProvider.js +47 -33
  591. package/dist/theme/ThemeProvider.js.map +1 -1
  592. package/dist/theme/antdTheme.cjs +1 -1
  593. package/dist/theme/antdTheme.cjs.map +1 -1
  594. package/dist/theme/antdTheme.d.ts +0 -2
  595. package/dist/theme/antdTheme.js +26 -20
  596. package/dist/theme/antdTheme.js.map +1 -1
  597. package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
  598. package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
  599. package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
  600. package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
  601. package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
  602. package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
  603. package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
  604. package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
  605. package/dist/transports/agentm/agentmChannelClient.js +133 -89
  606. package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
  607. package/dist/transports/index.d.ts +2 -2
  608. package/dist/transports/mcpBridge.cjs +2 -0
  609. package/dist/transports/mcpBridge.cjs.map +1 -0
  610. package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
  611. package/dist/transports/mcpBridge.js +144 -0
  612. package/dist/transports/mcpBridge.js.map +1 -0
  613. package/dist/transports/mcpTools.cjs +2 -0
  614. package/dist/transports/mcpTools.cjs.map +1 -0
  615. package/dist/transports/mcpTools.d.ts +15 -0
  616. package/dist/transports/mcpTools.js +283 -0
  617. package/dist/transports/mcpTools.js.map +1 -0
  618. package/dist/transports.cjs +1 -1
  619. package/dist/transports.js +1 -1
  620. package/package.json +5 -4
  621. package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
  622. package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
  623. package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
  624. package/dist/agent/core/mcpToolCatalogue.js +0 -101
  625. package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
  626. package/dist/components/ui/BucketCard.cjs +0 -2
  627. package/dist/components/ui/BucketCard.cjs.map +0 -1
  628. package/dist/components/ui/BucketCard.d.ts +0 -24
  629. package/dist/components/ui/BucketCard.js +0 -73
  630. package/dist/components/ui/BucketCard.js.map +0 -1
  631. package/dist/components/ui/ContentInspectorContent.cjs +0 -5
  632. package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
  633. package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
  634. package/dist/components/ui/ContentInspectorContent.js +0 -101
  635. package/dist/components/ui/ContentInspectorContent.js.map +0 -1
  636. package/dist/components/ui/traceFormat.cjs +0 -2
  637. package/dist/components/ui/traceFormat.cjs.map +0 -1
  638. package/dist/components/ui/traceFormat.js +0 -11
  639. package/dist/components/ui/traceFormat.js.map +0 -1
  640. package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
  641. package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
  642. package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
  643. package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
  644. package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
  645. package/dist/layouts/shell/environments/context.cjs.map +0 -1
  646. package/dist/layouts/shell/environments/context.d.ts +0 -6
  647. package/dist/layouts/shell/environments/context.js +0 -6
  648. package/dist/layouts/shell/environments/context.js.map +0 -1
  649. package/dist/layouts/shell/environments/hooks.cjs +0 -2
  650. package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
  651. package/dist/layouts/shell/environments/hooks.js +0 -24
  652. package/dist/layouts/shell/environments/hooks.js.map +0 -1
  653. package/dist/layouts/shell/environments/manifest.cjs +0 -2
  654. package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
  655. package/dist/layouts/shell/environments/manifest.d.ts +0 -26
  656. package/dist/layouts/shell/environments/manifest.js +0 -82
  657. package/dist/layouts/shell/environments/manifest.js.map +0 -1
  658. package/dist/transports/bridge.cjs +0 -2
  659. package/dist/transports/bridge.cjs.map +0 -1
  660. package/dist/transports/bridge.js +0 -143
  661. package/dist/transports/bridge.js.map +0 -1
@@ -1,11 +1,13 @@
1
- import { ReactElement } from 'react';
1
+ import { ReactElement, Ref } from 'react';
2
2
  import { AegisApp } from './types';
3
3
  interface SidebarProps {
4
4
  activeApp: AegisApp | undefined;
5
+ /** The sidebar element, which is the navigation drawer at 768 px and below. */
6
+ drawerRef?: Ref<HTMLElement>;
5
7
  }
6
8
  /**
7
9
  * Per-app inner nav. The global app list lives in the header's
8
10
  * `AppSwitcher`, not here — sidebar only ever shows the current app.
9
11
  */
10
- export declare function Sidebar({ activeApp }: SidebarProps): ReactElement | null;
12
+ export declare function Sidebar({ activeApp, drawerRef, }: SidebarProps): ReactElement | null;
11
13
  export {};
@@ -1,21 +1,24 @@
1
1
  import { jsx as s, jsxs as i } from "react/jsx-runtime";
2
- import { NavLink as h } from "react-router-dom";
3
- import { joinPath as c } from "./paths.js";
4
- function t({ activeApp: e }) {
5
- return !e?.sidebar || e.sidebar.length === 0 ? null : /* @__PURE__ */ s("aside", { className: "aegis-shell__sidebar", children: /* @__PURE__ */ i("section", { className: "aegis-shell__sidebar-section", children: [
2
+ import { NavLink as c } from "react-router-dom";
3
+ import { joinPath as o } from "./paths.js";
4
+ function m({
5
+ activeApp: e,
6
+ drawerRef: r
7
+ }) {
8
+ return !e?.sidebar || e.sidebar.length === 0 ? null : /* @__PURE__ */ s("aside", { ref: r, className: "aegis-shell__sidebar", children: /* @__PURE__ */ i("section", { className: "aegis-shell__sidebar-section", children: [
6
9
  /* @__PURE__ */ s("div", { className: "aegis-shell__sidebar-heading", children: e.label }),
7
- e.sidebar.map((l, r) => /* @__PURE__ */ i("div", { children: [
10
+ e.sidebar.map((l, d) => /* @__PURE__ */ i("div", { children: [
8
11
  l.label && /* @__PURE__ */ s("div", { className: "aegis-shell__sidebar-heading", children: l.label }),
9
12
  l.items.map((a) => {
10
- const n = c(e.basePath, a.to);
13
+ const n = o(e.basePath, a.to);
11
14
  return /* @__PURE__ */ i(
12
- h,
15
+ c,
13
16
  {
14
17
  to: n,
15
18
  end: a.end,
16
- className: ({ isActive: d }) => [
19
+ className: ({ isActive: h }) => [
17
20
  "aegis-shell__nav-link",
18
- d ? "aegis-shell__nav-link--active" : ""
21
+ h ? "aegis-shell__nav-link--active" : ""
19
22
  ].filter(Boolean).join(" "),
20
23
  children: [
21
24
  a.icon && /* @__PURE__ */ s("span", { className: "aegis-shell__nav-icon", children: a.icon }),
@@ -25,10 +28,10 @@ function t({ activeApp: e }) {
25
28
  n
26
29
  );
27
30
  })
28
- ] }, r))
31
+ ] }, d))
29
32
  ] }) });
30
33
  }
31
34
  export {
32
- t as Sidebar
35
+ m as Sidebar
33
36
  };
34
37
  //# sourceMappingURL=Sidebar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../../src/layouts/shell/Sidebar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { NavLink } from 'react-router-dom';\n\nimport { joinPath } from './paths';\nimport type { AegisApp } from './types';\n\ninterface SidebarProps {\n activeApp: AegisApp | undefined;\n}\n\n/**\n * Per-app inner nav. The global app list lives in the header's\n * `AppSwitcher`, not here — sidebar only ever shows the current app.\n */\nexport function Sidebar({ activeApp }: SidebarProps): ReactElement | null {\n if (!activeApp?.sidebar || activeApp.sidebar.length === 0) {\n return null;\n }\n\n return (\n <aside className=\"aegis-shell__sidebar\">\n <section className=\"aegis-shell__sidebar-section\">\n <div className=\"aegis-shell__sidebar-heading\">{activeApp.label}</div>\n {activeApp.sidebar.map((group, idx) => (\n <div key={idx}>\n {group.label && (\n <div className=\"aegis-shell__sidebar-heading\">{group.label}</div>\n )}\n {group.items.map((item) => {\n const path = joinPath(activeApp.basePath, item.to);\n return (\n <NavLink\n key={path}\n to={path}\n end={item.end}\n className={({ isActive }) =>\n [\n 'aegis-shell__nav-link',\n isActive ? 'aegis-shell__nav-link--active' : '',\n ]\n .filter(Boolean)\n .join(' ')\n }\n >\n {item.icon && (\n <span className=\"aegis-shell__nav-icon\">{item.icon}</span>\n )}\n <span>{item.label}</span>\n </NavLink>\n );\n })}\n </div>\n ))}\n </section>\n </aside>\n );\n}\n"],"names":["Sidebar","activeApp","jsxs","jsx","group","idx","item","path","joinPath","NavLink","isActive"],"mappings":";;;AAeO,SAASA,EAAQ,EAAE,WAAAC,KAAgD;AACxE,SAAI,CAACA,GAAW,WAAWA,EAAU,QAAQ,WAAW,IAC/C,yBAIN,SAAA,EAAM,WAAU,wBACf,UAAA,gBAAAC,EAAC,WAAA,EAAQ,WAAU,gCACjB,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,gCAAgC,UAAAF,EAAU,OAAM;AAAA,IAC9DA,EAAU,QAAQ,IAAI,CAACG,GAAOC,wBAC5B,OAAA,EACE,UAAA;AAAA,MAAAD,EAAM,SACL,gBAAAD,EAAC,OAAA,EAAI,WAAU,gCAAgC,YAAM,OAAM;AAAA,MAE5DC,EAAM,MAAM,IAAI,CAACE,MAAS;AACzB,cAAMC,IAAOC,EAASP,EAAU,UAAUK,EAAK,EAAE;AACjD,eACE,gBAAAJ;AAAA,UAACO;AAAA,UAAA;AAAA,YAEC,IAAIF;AAAA,YACJ,KAAKD,EAAK;AAAA,YACV,WAAW,CAAC,EAAE,UAAAI,QACZ;AAAA,cACE;AAAA,cACAA,IAAW,kCAAkC;AAAA,YAAA,EAE5C,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,YAGZ,UAAA;AAAA,cAAAJ,EAAK,QACJ,gBAAAH,EAAC,QAAA,EAAK,WAAU,yBAAyB,YAAK,MAAK;AAAA,cAErD,gBAAAA,EAAC,QAAA,EAAM,UAAAG,EAAK,MAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,UAfbC;AAAA,QAAA;AAAA,MAkBX,CAAC;AAAA,IAAA,EAAA,GA1BOF,CA2BV,CACD;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../src/layouts/shell/Sidebar.tsx"],"sourcesContent":["import type { ReactElement, Ref } from 'react';\n\nimport { NavLink } from 'react-router-dom';\n\nimport { joinPath } from './paths';\nimport type { AegisApp } from './types';\n\ninterface SidebarProps {\n activeApp: AegisApp | undefined;\n /** The sidebar element, which is the navigation drawer at 768 px and below. */\n drawerRef?: Ref<HTMLElement>;\n}\n\n/**\n * Per-app inner nav. The global app list lives in the header's\n * `AppSwitcher`, not here — sidebar only ever shows the current app.\n */\nexport function Sidebar({\n activeApp,\n drawerRef,\n}: SidebarProps): ReactElement | null {\n if (!activeApp?.sidebar || activeApp.sidebar.length === 0) {\n return null;\n }\n\n return (\n <aside ref={drawerRef} className=\"aegis-shell__sidebar\">\n <section className=\"aegis-shell__sidebar-section\">\n <div className=\"aegis-shell__sidebar-heading\">{activeApp.label}</div>\n {activeApp.sidebar.map((group, idx) => (\n <div key={idx}>\n {group.label && (\n <div className=\"aegis-shell__sidebar-heading\">{group.label}</div>\n )}\n {group.items.map((item) => {\n const path = joinPath(activeApp.basePath, item.to);\n return (\n <NavLink\n key={path}\n to={path}\n end={item.end}\n className={({ isActive }) =>\n [\n 'aegis-shell__nav-link',\n isActive ? 'aegis-shell__nav-link--active' : '',\n ]\n .filter(Boolean)\n .join(' ')\n }\n >\n {item.icon && (\n <span className=\"aegis-shell__nav-icon\">{item.icon}</span>\n )}\n <span>{item.label}</span>\n </NavLink>\n );\n })}\n </div>\n ))}\n </section>\n </aside>\n );\n}\n"],"names":["Sidebar","activeApp","drawerRef","jsx","jsxs","group","idx","item","path","joinPath","NavLink","isActive"],"mappings":";;;AAiBO,SAASA,EAAQ;AAAA,EACtB,WAAAC;AAAA,EACA,WAAAC;AACF,GAAsC;AACpC,SAAI,CAACD,GAAW,WAAWA,EAAU,QAAQ,WAAW,IAC/C,OAIP,gBAAAE,EAAC,WAAM,KAAKD,GAAW,WAAU,wBAC/B,UAAA,gBAAAE,EAAC,WAAA,EAAQ,WAAU,gCACjB,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,gCAAgC,UAAAF,EAAU,OAAM;AAAA,IAC9DA,EAAU,QAAQ,IAAI,CAACI,GAAOC,wBAC5B,OAAA,EACE,UAAA;AAAA,MAAAD,EAAM,SACL,gBAAAF,EAAC,OAAA,EAAI,WAAU,gCAAgC,YAAM,OAAM;AAAA,MAE5DE,EAAM,MAAM,IAAI,CAACE,MAAS;AACzB,cAAMC,IAAOC,EAASR,EAAU,UAAUM,EAAK,EAAE;AACjD,eACE,gBAAAH;AAAA,UAACM;AAAA,UAAA;AAAA,YAEC,IAAIF;AAAA,YACJ,KAAKD,EAAK;AAAA,YACV,WAAW,CAAC,EAAE,UAAAI,QACZ;AAAA,cACE;AAAA,cACAA,IAAW,kCAAkC;AAAA,YAAA,EAE5C,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,YAGZ,UAAA;AAAA,cAAAJ,EAAK,QACJ,gBAAAJ,EAAC,QAAA,EAAK,WAAU,yBAAyB,YAAK,MAAK;AAAA,cAErD,gBAAAA,EAAC,QAAA,EAAM,UAAAI,EAAK,MAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,UAfbC;AAAA,QAAA;AAAA,MAkBX,CAAC;AAAA,IAAA,EAAA,GA1BOF,CA2BV,CACD;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react-router-dom"),f=require("../../components/ui/Avatar.cjs"),k=require("../../components/ui/DropdownMenu.cjs"),y=require("../../components/ui/EnvironmentSwitcher.cjs"),S=require("../../components/ui/NotificationBell.cjs"),q=require("./AppSwitcher.cjs"),C=require("../../locale/useStrings.cjs"),E=require("./environments/hooks.cjs");function B({brand:s,apps:i,activeAppId:a,onAppSwitch:t,appSwitcher:o=!0,scrolled:n=!1,user:r,headerCenter:p,headerActions:w,inboxPath:d,onMobileMenuToggle:g,showMobileMenu:v,sidebarCollapsible:b,sidebarCollapsed:h,onSidebarToggle:u,inlineSlotRef:N,inlineSlotActive:_,agentPanelOpen:c=!1,onAgentPanelToggle:m}){const l=C.useStrings(),x=e.jsxs(e.Fragment,{children:[s.logo&&e.jsx("span",{className:"aegis-shell__brand-logo",children:s.logo}),e.jsx("span",{className:"aegis-shell__brand-name",children:s.name})]});return e.jsxs("header",{className:n?"aegis-shell__header aegis-shell__header--scrolled":"aegis-shell__header",children:[e.jsxs("div",{className:"aegis-shell__header-left",children:[v&&g&&e.jsx("button",{type:"button",className:"aegis-shell__menu-toggle",onClick:g,"aria-label":l.openNavigation,children:e.jsx("span",{className:"aegis-shell__menu-toggle-glyph","aria-hidden":"true",children:"☰"})}),b&&u&&e.jsx("button",{type:"button",className:"aegis-shell__sidebar-toggle",onClick:u,"aria-label":h?l.showSidebar:l.hideSidebar,"aria-pressed":h,title:h?l.showSidebar:l.hideSidebar,children:e.jsx("span",{className:"aegis-shell__sidebar-toggle-glyph","aria-hidden":"true",children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"2.5",y:"3.5",width:"15",height:"13",rx:"2"}),e.jsx("line",{x1:"8",y1:"3.5",x2:"8",y2:"16.5"})]})})}),o?e.jsx(q.AppSwitcher,{apps:i,activeAppId:a,onAppSwitch:t}):null,s.href?e.jsx(j.Link,{to:s.href,className:"aegis-shell__brand",children:x}):e.jsx("span",{className:"aegis-shell__brand",children:x})]}),e.jsx("div",{className:_?"aegis-shell__header-center aegis-shell__header-center--app":"aegis-shell__header-center",ref:N,"data-aegis-inline-slot":"",children:!_&&p}),e.jsxs("div",{className:"aegis-shell__header-right",children:[e.jsx(H,{}),w,d&&e.jsx(S.NotificationBell,{inboxPath:d}),r&&e.jsx(A,{user:r}),m&&e.jsx("button",{type:"button",className:"aegis-shell__agent-toggle",onClick:m,"aria-label":c?"Hide agent panel":"Show agent panel","aria-pressed":c,title:c?"Hide agent panel":"Show agent panel",children:e.jsx("span",{className:"aegis-shell__agent-toggle-glyph","aria-hidden":"true",children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"2.5",y:"3.5",width:"15",height:"13",rx:"2"}),e.jsx("line",{x1:"12",y1:"3.5",x2:"12",y2:"16.5"})]})})})]})]})}function H(){const s=E.useEnvironmentManifest();if(s.status!=="ready")return null;const i=s.manifest.environments.map(a=>({id:a.id,label:a.label,badge:a.badge,hint:a.baseUrl}));return e.jsx(y.EnvironmentSwitcher,{options:i,currentId:s.currentEnvId,onChange:s.setCurrentEnv})}function A({user:s}){const i=j.useNavigate(),a=(s.menu??[]).map(n=>{const r=n.to;return{key:n.key,label:n.label,onClick:r?()=>{i(r)}:n.onClick}}),t=s.avatar??(typeof s.name=="string"?e.jsx(f.Avatar,{name:s.name,size:"sm",className:"aegis-shell__user-initials"}):null),o=e.jsxs("span",{className:t?"aegis-shell__user aegis-shell__user--badge":"aegis-shell__user",children:[t,e.jsx("span",{className:"aegis-shell__user-name",children:s.name})]});return a.length===0?o:e.jsx(k.DropdownMenu,{trigger:o,items:a})}exports.TopHeader=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("antd"),j=require("react-router-dom"),S=require("../../components/ui/Avatar.cjs"),q=require("../../components/ui/Chip.cjs"),C=require("../../components/ui/DropdownMenu.cjs"),E=require("../../components/ui/EnvironmentSwitcher.cjs"),B=require("./AppSwitcher.cjs"),H=require("./ShellNotificationBell.cjs"),A=require("../../locale/useStrings.cjs"),D=require("./environments/useEnvironment.cjs");function I({brand:s,apps:i,activeAppId:r,onAppSwitch:t,appSwitcher:o=!0,scrolled:a=!1,user:l,headerCenter:v,headerActions:w,inboxPath:d,onMobileMenuToggle:g,mobileMenuOpen:u=!1,menuToggleRef:N,showMobileMenu:f,sidebarCollapsible:b,sidebarCollapsed:h,onSidebarToggle:_,inlineSlotRef:y,inlineSlotActive:m,agentPanelOpen:c=!1,onAgentPanelToggle:x}){const n=A.useStrings(),p=e.jsxs(e.Fragment,{children:[s.logo&&e.jsx("span",{className:"aegis-shell__brand-logo",children:s.logo}),e.jsx("span",{className:"aegis-shell__brand-name",children:s.name})]});return e.jsxs("header",{className:a?"aegis-shell__header aegis-shell__header--scrolled":"aegis-shell__header",children:[e.jsxs("div",{className:"aegis-shell__header-left",children:[f&&g&&e.jsx("button",{ref:N,type:"button",className:"aegis-shell__menu-toggle",onClick:g,"aria-label":u?n.closeNavigation:n.openNavigation,"aria-expanded":u,children:e.jsx("span",{className:"aegis-shell__menu-toggle-glyph","aria-hidden":"true",children:"☰"})}),b&&_&&e.jsx("button",{type:"button",className:"aegis-shell__sidebar-toggle",onClick:_,"aria-label":h?n.showSidebar:n.hideSidebar,"aria-pressed":h,title:h?n.showSidebar:n.hideSidebar,children:e.jsx("span",{className:"aegis-shell__sidebar-toggle-glyph","aria-hidden":"true",children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"2.5",y:"3.5",width:"15",height:"13",rx:"2"}),e.jsx("line",{x1:"8",y1:"3.5",x2:"8",y2:"16.5"})]})})}),o?e.jsx(B.AppSwitcher,{apps:i,activeAppId:r,onAppSwitch:t}):null,s.href?e.jsx(j.Link,{to:s.href,className:"aegis-shell__brand",children:p}):e.jsx("span",{className:"aegis-shell__brand",children:p})]}),e.jsx("div",{className:m?"aegis-shell__header-center aegis-shell__header-center--app":"aegis-shell__header-center",ref:y,"data-aegis-inline-slot":"",children:!m&&v}),e.jsxs("div",{className:"aegis-shell__header-right",children:[e.jsx(L,{}),w,d&&e.jsx(H.ShellNotificationBell,{inboxPath:d}),l&&e.jsx(M,{user:l}),x&&e.jsx("button",{type:"button",className:"aegis-shell__agent-toggle",onClick:x,"aria-label":c?"Hide agent panel":"Show agent panel","aria-pressed":c,title:c?"Hide agent panel":"Show agent panel",children:e.jsx("span",{className:"aegis-shell__agent-toggle-glyph","aria-hidden":"true",children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"2.5",y:"3.5",width:"15",height:"13",rx:"2"}),e.jsx("line",{x1:"12",y1:"3.5",x2:"12",y2:"16.5"})]})})})]})]})}function L(){const s=D.useEnvironmentManifest();if(s.status==="error")return e.jsx(k.Tooltip,{title:`${s.error.message} Click to retry.`,children:e.jsx("span",{className:"aegis-shell__env-error",children:e.jsxs(q.Chip,{tone:"warning",onClick:s.retry,children:[e.jsx("span",{className:"aegis-shell__env-error-full",children:"Environments unavailable"}),e.jsx("span",{className:"aegis-shell__env-error-short",children:"Env error"})]})})});if(s.status!=="ready")return null;const i=s.manifest.environments.map(r=>({id:r.id,label:r.label,badge:r.badge,hint:r.baseUrl}));return e.jsx(E.EnvironmentSwitcher,{className:"aegis-shell__env-switcher",options:i,currentId:s.currentEnvId,onChange:s.setCurrentEnv})}function M({user:s}){const i=j.useNavigate(),r=(s.menu??[]).map(a=>{const l=a.to;return{key:a.key,label:a.label,onClick:l?()=>{i(l)}:a.onClick}}),t=s.avatar??(typeof s.name=="string"?e.jsx(S.Avatar,{name:s.name,size:"sm",className:"aegis-shell__user-initials"}):null),o=e.jsxs("span",{className:t?"aegis-shell__user aegis-shell__user--badge":"aegis-shell__user",children:[t,e.jsx("span",{className:"aegis-shell__user-name",children:s.name})]});return r.length===0?o:e.jsx(C.DropdownMenu,{trigger:o,items:r})}exports.TopHeader=I;
2
2
  //# sourceMappingURL=TopHeader.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopHeader.cjs","sources":["../../../src/layouts/shell/TopHeader.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\n\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { Avatar } from '../../components/ui/Avatar';\nimport {\n type DropdownItem,\n DropdownMenu,\n} from '../../components/ui/DropdownMenu';\nimport { EnvironmentSwitcher } from '../../components/ui/EnvironmentSwitcher';\nimport { NotificationBell } from '../../components/ui/NotificationBell';\nimport { useStrings } from '../../locale';\nimport { AppSwitcher } from './AppSwitcher';\nimport { useEnvironmentManifest } from './environments';\nimport type { AegisApp, AegisBrand, AegisUser } from './types';\n\ninterface TopHeaderProps {\n brand: AegisBrand;\n apps: AegisApp[];\n activeAppId?: string;\n onAppSwitch?: (appId: string) => void;\n /** Whether to render the app launcher. */\n appSwitcher?: boolean;\n /** The page has scrolled under the header; it gets a shadow. */\n scrolled?: boolean;\n user?: AegisUser;\n headerCenter?: ReactNode;\n headerActions?: ReactNode;\n /** When set, render a notification bell linking to this path. */\n inboxPath?: string;\n /** Fired by the mobile hamburger; the shell owns the open state. */\n onMobileMenuToggle?: () => void;\n /** Whether to render the mobile hamburger at all (only when sidebar exists). */\n showMobileMenu?: boolean;\n /** Whether to render the desktop sidebar collapse toggle. */\n sidebarCollapsible?: boolean;\n /** Current collapsed state — drives aria-pressed on the toggle. */\n sidebarCollapsed?: boolean;\n /** Fired by the desktop collapse button; the shell owns the state. */\n onSidebarToggle?: () => void;\n /**\n * Ref callback for the inline app-header slot. The active app's\n * `header` is portalled into this node so it appears inside the shell\n * header instead of below it.\n */\n inlineSlotRef?: (node: HTMLDivElement | null) => void;\n /** When true, hide the global `headerCenter` (an app header took it over). */\n inlineSlotActive?: boolean;\n /** Current agent panel state — drives aria-pressed on its toggle. */\n agentPanelOpen?: boolean;\n /** Fired by the agent panel toggle; the toggle renders only when set. */\n onAgentPanelToggle?: () => void;\n}\n\nexport function TopHeader({\n brand,\n apps,\n activeAppId,\n onAppSwitch,\n appSwitcher = true,\n scrolled = false,\n user,\n headerCenter,\n headerActions,\n inboxPath,\n onMobileMenuToggle,\n showMobileMenu,\n sidebarCollapsible,\n sidebarCollapsed,\n onSidebarToggle,\n inlineSlotRef,\n inlineSlotActive,\n agentPanelOpen = false,\n onAgentPanelToggle,\n}: TopHeaderProps): ReactElement {\n const strings = useStrings();\n const brandInner = (\n <>\n {brand.logo && (\n <span className=\"aegis-shell__brand-logo\">{brand.logo}</span>\n )}\n <span className=\"aegis-shell__brand-name\">{brand.name}</span>\n </>\n );\n\n return (\n <header\n className={\n scrolled\n ? 'aegis-shell__header aegis-shell__header--scrolled'\n : 'aegis-shell__header'\n }\n >\n <div className=\"aegis-shell__header-left\">\n {showMobileMenu && onMobileMenuToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__menu-toggle\"\n onClick={onMobileMenuToggle}\n aria-label={strings.openNavigation}\n >\n <span className=\"aegis-shell__menu-toggle-glyph\" aria-hidden=\"true\">\n ☰\n </span>\n </button>\n )}\n {sidebarCollapsible && onSidebarToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__sidebar-toggle\"\n onClick={onSidebarToggle}\n aria-label={\n sidebarCollapsed ? strings.showSidebar : strings.hideSidebar\n }\n aria-pressed={sidebarCollapsed}\n title={sidebarCollapsed ? strings.showSidebar : strings.hideSidebar}\n >\n <span\n className=\"aegis-shell__sidebar-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"8\" y1=\"3.5\" x2=\"8\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n {appSwitcher ? (\n <AppSwitcher\n apps={apps}\n activeAppId={activeAppId}\n onAppSwitch={onAppSwitch}\n />\n ) : null}\n {brand.href ? (\n <Link to={brand.href} className=\"aegis-shell__brand\">\n {brandInner}\n </Link>\n ) : (\n <span className=\"aegis-shell__brand\">{brandInner}</span>\n )}\n </div>\n <div\n className={\n inlineSlotActive\n ? 'aegis-shell__header-center aegis-shell__header-center--app'\n : 'aegis-shell__header-center'\n }\n ref={inlineSlotRef}\n data-aegis-inline-slot=\"\"\n >\n {!inlineSlotActive && headerCenter}\n </div>\n <div className=\"aegis-shell__header-right\">\n <ActiveEnvironmentSwitcher />\n {headerActions}\n {inboxPath && <NotificationBell inboxPath={inboxPath} />}\n {user && <UserMenu user={user} />}\n {onAgentPanelToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__agent-toggle\"\n onClick={onAgentPanelToggle}\n aria-label={\n agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'\n }\n aria-pressed={agentPanelOpen}\n title={agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'}\n >\n <span\n className=\"aegis-shell__agent-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"12\" y1=\"3.5\" x2=\"12\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n </div>\n </header>\n );\n}\n\nfunction ActiveEnvironmentSwitcher(): ReactElement | null {\n const state = useEnvironmentManifest();\n if (state.status !== 'ready') {\n return null;\n }\n const options = state.manifest.environments.map((e) => ({\n id: e.id,\n label: e.label,\n badge: e.badge,\n hint: e.baseUrl,\n }));\n return (\n <EnvironmentSwitcher\n options={options}\n currentId={state.currentEnvId}\n onChange={state.setCurrentEnv}\n />\n );\n}\n\nfunction UserMenu({ user }: { user: AegisUser }): ReactElement {\n const navigate = useNavigate();\n const items: DropdownItem[] = (user.menu ?? []).map((entry) => {\n const to = entry.to;\n return {\n key: entry.key,\n label: entry.label,\n onClick: to\n ? () => {\n navigate(to);\n }\n : entry.onClick,\n };\n });\n const badge =\n user.avatar ??\n (typeof user.name === 'string' ? (\n <Avatar\n name={user.name}\n size=\"sm\"\n className=\"aegis-shell__user-initials\"\n />\n ) : null);\n const trigger = (\n <span\n className={\n badge\n ? 'aegis-shell__user aegis-shell__user--badge'\n : 'aegis-shell__user'\n }\n >\n {badge}\n <span className=\"aegis-shell__user-name\">{user.name}</span>\n </span>\n );\n if (items.length === 0) {\n return trigger;\n }\n return <DropdownMenu trigger={trigger} items={items} />;\n}\n"],"names":["TopHeader","brand","apps","activeAppId","onAppSwitch","appSwitcher","scrolled","user","headerCenter","headerActions","inboxPath","onMobileMenuToggle","showMobileMenu","sidebarCollapsible","sidebarCollapsed","onSidebarToggle","inlineSlotRef","inlineSlotActive","agentPanelOpen","onAgentPanelToggle","strings","useStrings","brandInner","jsxs","Fragment","jsx","AppSwitcher","Link","ActiveEnvironmentSwitcher","NotificationBell","UserMenu","state","useEnvironmentManifest","options","e","EnvironmentSwitcher","navigate","useNavigate","items","entry","to","badge","Avatar","trigger","DropdownMenu"],"mappings":"8cAsDO,SAASA,EAAU,CACxB,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,GACd,SAAAC,EAAW,GACX,KAAAC,EACA,aAAAC,EACA,cAAAC,EACA,UAAAC,EACA,mBAAAC,EACA,eAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,eAAAC,EAAiB,GACjB,mBAAAC,CACF,EAAiC,CAC/B,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAvB,EAAM,MACLwB,EAAAA,IAAC,OAAA,CAAK,UAAU,0BAA2B,WAAM,KAAK,EAExDA,EAAAA,IAAC,OAAA,CAAK,UAAU,0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CAC7D,MAAM6B,EAAWC,EAAAA,YAAA,EACXC,GAAyB/B,EAAK,MAAQ,CAAA,GAAI,IAAKgC,GAAU,CAC7D,MAAMC,EAAKD,EAAM,GACjB,MAAO,CACL,IAAKA,EAAM,IACX,MAAOA,EAAM,MACb,QAASC,EACL,IAAM,CACJJ,EAASI,CAAE,CACb,EACAD,EAAM,OAAA,CAEd,CAAC,EACKE,EACJlC,EAAK,SACJ,OAAOA,EAAK,MAAS,SACpBkB,EAAAA,IAACiB,EAAAA,OAAA,CACC,KAAMnC,EAAK,KACX,KAAK,KACL,UAAU,4BAAA,CAAA,EAEV,MACAoC,EACJpB,EAAAA,KAAC,OAAA,CACC,UACEkB,EACI,6CACA,oBAGL,SAAA,CAAAA,EACDhB,EAAAA,IAAC,OAAA,CAAK,UAAU,yBAA0B,WAAK,IAAA,CAAK,CAAA,CAAA,CAAA,EAGxD,OAAIa,EAAM,SAAW,EACZK,EAEFlB,EAAAA,IAACmB,EAAAA,aAAA,CAAa,QAAAD,EAAkB,MAAAL,CAAA,CAAc,CACvD"}
1
+ {"version":3,"file":"TopHeader.cjs","sources":["../../../src/layouts/shell/TopHeader.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react';\n\nimport { Tooltip } from 'antd';\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { Avatar } from '../../components/ui/Avatar';\nimport { Chip } from '../../components/ui/Chip';\nimport {\n type DropdownItem,\n DropdownMenu,\n} from '../../components/ui/DropdownMenu';\nimport { EnvironmentSwitcher } from '../../components/ui/EnvironmentSwitcher';\nimport { useStrings } from '../../locale';\nimport { AppSwitcher } from './AppSwitcher';\nimport { ShellNotificationBell } from './ShellNotificationBell';\nimport { useEnvironmentManifest } from './environments';\nimport type { AegisApp, AegisBrand, AegisUser } from './types';\n\ninterface TopHeaderProps {\n brand: AegisBrand;\n apps: AegisApp[];\n activeAppId?: string;\n onAppSwitch?: (appId: string) => void;\n /** Whether to render the app launcher. */\n appSwitcher?: boolean;\n /** The page has scrolled under the header; it gets a shadow. */\n scrolled?: boolean;\n user?: AegisUser;\n headerCenter?: ReactNode;\n headerActions?: ReactNode;\n /** When set, render a notification bell linking to this path. */\n inboxPath?: string;\n /** Fired by the mobile hamburger; the shell owns the open state. */\n onMobileMenuToggle?: () => void;\n /** Whether the navigation drawer is open — drives aria-expanded on the hamburger. */\n mobileMenuOpen?: boolean;\n /** The hamburger button, which takes focus back when the drawer is dismissed. */\n menuToggleRef?: Ref<HTMLButtonElement>;\n /** Whether to render the mobile hamburger at all (only when sidebar exists). */\n showMobileMenu?: boolean;\n /** Whether to render the desktop sidebar collapse toggle. */\n sidebarCollapsible?: boolean;\n /** Current collapsed state — drives aria-pressed on the toggle. */\n sidebarCollapsed?: boolean;\n /** Fired by the desktop collapse button; the shell owns the state. */\n onSidebarToggle?: () => void;\n /**\n * Ref callback for the inline app-header slot. The active app's\n * `header` is portalled into this node so it appears inside the shell\n * header instead of below it.\n */\n inlineSlotRef?: (node: HTMLDivElement | null) => void;\n /** When true, hide the global `headerCenter` (an app header took it over). */\n inlineSlotActive?: boolean;\n /** Current agent panel state — drives aria-pressed on its toggle. */\n agentPanelOpen?: boolean;\n /** Fired by the agent panel toggle; the toggle renders only when set. */\n onAgentPanelToggle?: () => void;\n}\n\nexport function TopHeader({\n brand,\n apps,\n activeAppId,\n onAppSwitch,\n appSwitcher = true,\n scrolled = false,\n user,\n headerCenter,\n headerActions,\n inboxPath,\n onMobileMenuToggle,\n mobileMenuOpen = false,\n menuToggleRef,\n showMobileMenu,\n sidebarCollapsible,\n sidebarCollapsed,\n onSidebarToggle,\n inlineSlotRef,\n inlineSlotActive,\n agentPanelOpen = false,\n onAgentPanelToggle,\n}: TopHeaderProps): ReactElement {\n const strings = useStrings();\n const brandInner = (\n <>\n {brand.logo && (\n <span className=\"aegis-shell__brand-logo\">{brand.logo}</span>\n )}\n <span className=\"aegis-shell__brand-name\">{brand.name}</span>\n </>\n );\n\n return (\n <header\n className={\n scrolled\n ? 'aegis-shell__header aegis-shell__header--scrolled'\n : 'aegis-shell__header'\n }\n >\n <div className=\"aegis-shell__header-left\">\n {showMobileMenu && onMobileMenuToggle && (\n <button\n ref={menuToggleRef}\n type=\"button\"\n className=\"aegis-shell__menu-toggle\"\n onClick={onMobileMenuToggle}\n aria-label={\n mobileMenuOpen ? strings.closeNavigation : strings.openNavigation\n }\n aria-expanded={mobileMenuOpen}\n >\n <span className=\"aegis-shell__menu-toggle-glyph\" aria-hidden=\"true\">\n ☰\n </span>\n </button>\n )}\n {sidebarCollapsible && onSidebarToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__sidebar-toggle\"\n onClick={onSidebarToggle}\n aria-label={\n sidebarCollapsed ? strings.showSidebar : strings.hideSidebar\n }\n aria-pressed={sidebarCollapsed}\n title={sidebarCollapsed ? strings.showSidebar : strings.hideSidebar}\n >\n <span\n className=\"aegis-shell__sidebar-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"8\" y1=\"3.5\" x2=\"8\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n {appSwitcher ? (\n <AppSwitcher\n apps={apps}\n activeAppId={activeAppId}\n onAppSwitch={onAppSwitch}\n />\n ) : null}\n {brand.href ? (\n <Link to={brand.href} className=\"aegis-shell__brand\">\n {brandInner}\n </Link>\n ) : (\n <span className=\"aegis-shell__brand\">{brandInner}</span>\n )}\n </div>\n <div\n className={\n inlineSlotActive\n ? 'aegis-shell__header-center aegis-shell__header-center--app'\n : 'aegis-shell__header-center'\n }\n ref={inlineSlotRef}\n data-aegis-inline-slot=\"\"\n >\n {!inlineSlotActive && headerCenter}\n </div>\n <div className=\"aegis-shell__header-right\">\n <ActiveEnvironmentSwitcher />\n {headerActions}\n {inboxPath && <ShellNotificationBell inboxPath={inboxPath} />}\n {user && <UserMenu user={user} />}\n {onAgentPanelToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__agent-toggle\"\n onClick={onAgentPanelToggle}\n aria-label={\n agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'\n }\n aria-pressed={agentPanelOpen}\n title={agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'}\n >\n <span\n className=\"aegis-shell__agent-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"12\" y1=\"3.5\" x2=\"12\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n </div>\n </header>\n );\n}\n\nfunction ActiveEnvironmentSwitcher(): ReactElement | null {\n const state = useEnvironmentManifest();\n if (state.status === 'error') {\n return (\n <Tooltip title={`${state.error.message} Click to retry.`}>\n <span className=\"aegis-shell__env-error\">\n <Chip tone=\"warning\" onClick={state.retry}>\n <span className=\"aegis-shell__env-error-full\">\n Environments unavailable\n </span>\n <span className=\"aegis-shell__env-error-short\">Env error</span>\n </Chip>\n </span>\n </Tooltip>\n );\n }\n if (state.status !== 'ready') {\n return null;\n }\n const options = state.manifest.environments.map((e) => ({\n id: e.id,\n label: e.label,\n badge: e.badge,\n hint: e.baseUrl,\n }));\n return (\n <EnvironmentSwitcher\n className=\"aegis-shell__env-switcher\"\n options={options}\n currentId={state.currentEnvId}\n onChange={state.setCurrentEnv}\n />\n );\n}\n\nfunction UserMenu({ user }: { user: AegisUser }): ReactElement {\n const navigate = useNavigate();\n const items: DropdownItem[] = (user.menu ?? []).map((entry) => {\n const to = entry.to;\n return {\n key: entry.key,\n label: entry.label,\n onClick: to\n ? () => {\n navigate(to);\n }\n : entry.onClick,\n };\n });\n const badge =\n user.avatar ??\n (typeof user.name === 'string' ? (\n <Avatar\n name={user.name}\n size=\"sm\"\n className=\"aegis-shell__user-initials\"\n />\n ) : null);\n const trigger = (\n <span\n className={\n badge\n ? 'aegis-shell__user aegis-shell__user--badge'\n : 'aegis-shell__user'\n }\n >\n {badge}\n <span className=\"aegis-shell__user-name\">{user.name}</span>\n </span>\n );\n if (items.length === 0) {\n return trigger;\n }\n return <DropdownMenu trigger={trigger} items={items} />;\n}\n"],"names":["TopHeader","brand","apps","activeAppId","onAppSwitch","appSwitcher","scrolled","user","headerCenter","headerActions","inboxPath","onMobileMenuToggle","mobileMenuOpen","menuToggleRef","showMobileMenu","sidebarCollapsible","sidebarCollapsed","onSidebarToggle","inlineSlotRef","inlineSlotActive","agentPanelOpen","onAgentPanelToggle","strings","useStrings","brandInner","jsxs","Fragment","jsx","AppSwitcher","Link","ActiveEnvironmentSwitcher","ShellNotificationBell","UserMenu","state","useEnvironmentManifest","Tooltip","Chip","options","e","EnvironmentSwitcher","navigate","useNavigate","items","entry","to","badge","Avatar","trigger","DropdownMenu"],"mappings":"sgBA4DO,SAASA,EAAU,CACxB,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,GACd,SAAAC,EAAW,GACX,KAAAC,EACA,aAAAC,EACA,cAAAC,EACA,UAAAC,EACA,mBAAAC,EACA,eAAAC,EAAiB,GACjB,cAAAC,EACA,eAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,eAAAC,EAAiB,GACjB,mBAAAC,CACF,EAAiC,CAC/B,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAzB,EAAM,MACL0B,EAAAA,IAAC,OAAA,CAAK,UAAU,0BA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ref } from 'react';
2
2
  import { AegisApp, AegisBrand, AegisUser } from './types';
3
3
  interface TopHeaderProps {
4
4
  brand: AegisBrand;
@@ -16,6 +16,10 @@ interface TopHeaderProps {
16
16
  inboxPath?: string;
17
17
  /** Fired by the mobile hamburger; the shell owns the open state. */
18
18
  onMobileMenuToggle?: () => void;
19
+ /** Whether the navigation drawer is open — drives aria-expanded on the hamburger. */
20
+ mobileMenuOpen?: boolean;
21
+ /** The hamburger button, which takes focus back when the drawer is dismissed. */
22
+ menuToggleRef?: Ref<HTMLButtonElement>;
19
23
  /** Whether to render the mobile hamburger at all (only when sidebar exists). */
20
24
  showMobileMenu?: boolean;
21
25
  /** Whether to render the desktop sidebar collapse toggle. */
@@ -37,5 +41,5 @@ interface TopHeaderProps {
37
41
  /** Fired by the agent panel toggle; the toggle renders only when set. */
38
42
  onAgentPanelToggle?: () => void;
39
43
  }
40
- export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, appSwitcher, scrolled, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, agentPanelOpen, onAgentPanelToggle, }: TopHeaderProps): ReactElement;
44
+ export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, appSwitcher, scrolled, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, mobileMenuOpen, menuToggleRef, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, agentPanelOpen, onAgentPanelToggle, }: TopHeaderProps): ReactElement;
41
45
  export {};
@@ -1,68 +1,74 @@
1
- import { jsxs as i, Fragment as x, jsx as e } from "react/jsx-runtime";
2
- import { Link as y, useNavigate as S } from "react-router-dom";
3
- import { Avatar as C } from "../../components/ui/Avatar.js";
4
- import { DropdownMenu as E } from "../../components/ui/DropdownMenu.js";
5
- import { EnvironmentSwitcher as j } from "../../components/ui/EnvironmentSwitcher.js";
6
- import { NotificationBell as B } from "../../components/ui/NotificationBell.js";
7
- import { AppSwitcher as H } from "./AppSwitcher.js";
8
- import { useStrings as I } from "../../locale/useStrings.js";
9
- import { useEnvironmentManifest as L } from "./environments/hooks.js";
10
- function Q({
1
+ import { jsxs as r, Fragment as C, jsx as e } from "react/jsx-runtime";
2
+ import { Tooltip as S } from "antd";
3
+ import { Link as E, useNavigate as j } from "react-router-dom";
4
+ import { Avatar as B } from "../../components/ui/Avatar.js";
5
+ import { Chip as H } from "../../components/ui/Chip.js";
6
+ import { DropdownMenu as I } from "../../components/ui/DropdownMenu.js";
7
+ import { EnvironmentSwitcher as L } from "../../components/ui/EnvironmentSwitcher.js";
8
+ import { AppSwitcher as U } from "./AppSwitcher.js";
9
+ import { ShellNotificationBell as W } from "./ShellNotificationBell.js";
10
+ import { useStrings as z } from "../../locale/useStrings.js";
11
+ import { useEnvironmentManifest as A } from "./environments/useEnvironment.js";
12
+ function Z({
11
13
  brand: a,
12
- apps: r,
14
+ apps: n,
13
15
  activeAppId: s,
14
- onAppSwitch: h,
15
- appSwitcher: o = !0,
16
+ onAppSwitch: o,
17
+ appSwitcher: h = !0,
16
18
  scrolled: l = !1,
17
- user: n,
18
- headerCenter: w,
19
- headerActions: b,
19
+ user: t,
20
+ headerCenter: N,
21
+ headerActions: w,
20
22
  inboxPath: g,
21
23
  onMobileMenuToggle: m,
22
- showMobileMenu: v,
23
- sidebarCollapsible: N,
24
+ mobileMenuOpen: _ = !1,
25
+ menuToggleRef: b,
26
+ showMobileMenu: k,
27
+ sidebarCollapsible: x,
24
28
  sidebarCollapsed: c,
25
- onSidebarToggle: _,
26
- inlineSlotRef: k,
27
- inlineSlotActive: p,
29
+ onSidebarToggle: p,
30
+ inlineSlotRef: y,
31
+ inlineSlotActive: u,
28
32
  agentPanelOpen: d = !1,
29
- onAgentPanelToggle: u
33
+ onAgentPanelToggle: f
30
34
  }) {
31
- const t = I(), f = /* @__PURE__ */ i(x, { children: [
35
+ const i = z(), v = /* @__PURE__ */ r(C, { children: [
32
36
  a.logo && /* @__PURE__ */ e("span", { className: "aegis-shell__brand-logo", children: a.logo }),
33
37
  /* @__PURE__ */ e("span", { className: "aegis-shell__brand-name", children: a.name })
34
38
  ] });
35
- return /* @__PURE__ */ i(
39
+ return /* @__PURE__ */ r(
36
40
  "header",
37
41
  {
38
42
  className: l ? "aegis-shell__header aegis-shell__header--scrolled" : "aegis-shell__header",
39
43
  children: [
40
- /* @__PURE__ */ i("div", { className: "aegis-shell__header-left", children: [
41
- v && m && /* @__PURE__ */ e(
44
+ /* @__PURE__ */ r("div", { className: "aegis-shell__header-left", children: [
45
+ k && m && /* @__PURE__ */ e(
42
46
  "button",
43
47
  {
48
+ ref: b,
44
49
  type: "button",
45
50
  className: "aegis-shell__menu-toggle",
46
51
  onClick: m,
47
- "aria-label": t.openNavigation,
52
+ "aria-label": _ ? i.closeNavigation : i.openNavigation,
53
+ "aria-expanded": _,
48
54
  children: /* @__PURE__ */ e("span", { className: "aegis-shell__menu-toggle-glyph", "aria-hidden": "true", children: "☰" })
49
55
  }
50
56
  ),
51
- N && _ && /* @__PURE__ */ e(
57
+ x && p && /* @__PURE__ */ e(
52
58
  "button",
53
59
  {
54
60
  type: "button",
55
61
  className: "aegis-shell__sidebar-toggle",
56
- onClick: _,
57
- "aria-label": c ? t.showSidebar : t.hideSidebar,
62
+ onClick: p,
63
+ "aria-label": c ? i.showSidebar : i.hideSidebar,
58
64
  "aria-pressed": c,
59
- title: c ? t.showSidebar : t.hideSidebar,
65
+ title: c ? i.showSidebar : i.hideSidebar,
60
66
  children: /* @__PURE__ */ e(
61
67
  "span",
62
68
  {
63
69
  className: "aegis-shell__sidebar-toggle-glyph",
64
70
  "aria-hidden": "true",
65
- children: /* @__PURE__ */ i(
71
+ children: /* @__PURE__ */ r(
66
72
  "svg",
67
73
  {
68
74
  width: "18",
@@ -83,36 +89,36 @@ function Q({
83
89
  )
84
90
  }
85
91
  ),
86
- o ? /* @__PURE__ */ e(
87
- H,
92
+ h ? /* @__PURE__ */ e(
93
+ U,
88
94
  {
89
- apps: r,
95
+ apps: n,
90
96
  activeAppId: s,
91
- onAppSwitch: h
97
+ onAppSwitch: o
92
98
  }
93
99
  ) : null,
94
- a.href ? /* @__PURE__ */ e(y, { to: a.href, className: "aegis-shell__brand", children: f }) : /* @__PURE__ */ e("span", { className: "aegis-shell__brand", children: f })
100
+ a.href ? /* @__PURE__ */ e(E, { to: a.href, className: "aegis-shell__brand", children: v }) : /* @__PURE__ */ e("span", { className: "aegis-shell__brand", children: v })
95
101
  ] }),
96
102
  /* @__PURE__ */ e(
97
103
  "div",
98
104
  {
99
- className: p ? "aegis-shell__header-center aegis-shell__header-center--app" : "aegis-shell__header-center",
100
- ref: k,
105
+ className: u ? "aegis-shell__header-center aegis-shell__header-center--app" : "aegis-shell__header-center",
106
+ ref: y,
101
107
  "data-aegis-inline-slot": "",
102
- children: !p && w
108
+ children: !u && N
103
109
  }
104
110
  ),
105
- /* @__PURE__ */ i("div", { className: "aegis-shell__header-right", children: [
106
- /* @__PURE__ */ e(U, {}),
107
- b,
108
- g && /* @__PURE__ */ e(B, { inboxPath: g }),
109
- n && /* @__PURE__ */ e(W, { user: n }),
110
- u && /* @__PURE__ */ e(
111
+ /* @__PURE__ */ r("div", { className: "aegis-shell__header-right", children: [
112
+ /* @__PURE__ */ e(D, {}),
113
+ w,
114
+ g && /* @__PURE__ */ e(W, { inboxPath: g }),
115
+ t && /* @__PURE__ */ e(F, { user: t }),
116
+ f && /* @__PURE__ */ e(
111
117
  "button",
112
118
  {
113
119
  type: "button",
114
120
  className: "aegis-shell__agent-toggle",
115
- onClick: u,
121
+ onClick: f,
116
122
  "aria-label": d ? "Hide agent panel" : "Show agent panel",
117
123
  "aria-pressed": d,
118
124
  title: d ? "Hide agent panel" : "Show agent panel",
@@ -121,7 +127,7 @@ function Q({
121
127
  {
122
128
  className: "aegis-shell__agent-toggle-glyph",
123
129
  "aria-hidden": "true",
124
- children: /* @__PURE__ */ i(
130
+ children: /* @__PURE__ */ r(
125
131
  "svg",
126
132
  {
127
133
  width: "18",
@@ -147,55 +153,61 @@ function Q({
147
153
  }
148
154
  );
149
155
  }
150
- function U() {
151
- const a = L();
156
+ function D() {
157
+ const a = A();
158
+ if (a.status === "error")
159
+ return /* @__PURE__ */ e(S, { title: `${a.error.message} Click to retry.`, children: /* @__PURE__ */ e("span", { className: "aegis-shell__env-error", children: /* @__PURE__ */ r(H, { tone: "warning", onClick: a.retry, children: [
160
+ /* @__PURE__ */ e("span", { className: "aegis-shell__env-error-full", children: "Environments unavailable" }),
161
+ /* @__PURE__ */ e("span", { className: "aegis-shell__env-error-short", children: "Env error" })
162
+ ] }) }) });
152
163
  if (a.status !== "ready")
153
164
  return null;
154
- const r = a.manifest.environments.map((s) => ({
165
+ const n = a.manifest.environments.map((s) => ({
155
166
  id: s.id,
156
167
  label: s.label,
157
168
  badge: s.badge,
158
169
  hint: s.baseUrl
159
170
  }));
160
171
  return /* @__PURE__ */ e(
161
- j,
172
+ L,
162
173
  {
163
- options: r,
174
+ className: "aegis-shell__env-switcher",
175
+ options: n,
164
176
  currentId: a.currentEnvId,
165
177
  onChange: a.setCurrentEnv
166
178
  }
167
179
  );
168
180
  }
169
- function W({ user: a }) {
170
- const r = S(), s = (a.menu ?? []).map((l) => {
171
- const n = l.to;
181
+ function F({ user: a }) {
182
+ const n = j(), s = (a.menu ?? []).map((l) => {
183
+ const t = l.to;
172
184
  return {
173
185
  key: l.key,
174
186
  label: l.label,
175
- onClick: n ? () => {
176
- r(n);
187
+ onClick: t ? () => {
188
+ n(t);
177
189
  } : l.onClick
178
190
  };
179
- }), h = a.avatar ?? (typeof a.name == "string" ? /* @__PURE__ */ e(
180
- C,
191
+ }), o = a.avatar ?? (typeof a.name == "string" ? /* @__PURE__ */ e(
192
+ B,
181
193
  {
182
194
  name: a.name,
183
195
  size: "sm",
184
196
  className: "aegis-shell__user-initials"
185
197
  }
186
- ) : null), o = /* @__PURE__ */ i(
198
+ ) : null), h = /* @__PURE__ */ r(
187
199
  "span",
188
200
  {
189
- className: h ? "aegis-shell__user aegis-shell__user--badge" : "aegis-shell__user",
201
+ className: o ? "aegis-shell__user aegis-shell__user--badge" : "aegis-shell__user",
190
202
  children: [
191
- h,
203
+ o,
192
204
  /* @__PURE__ */ e("span", { className: "aegis-shell__user-name", children: a.name })
193
205
  ]
194
206
  }
195
207
  );
196
- return s.length === 0 ? o : /* @__PURE__ */ e(E, { trigger: o, items: s });
208
+ return s.length === 0 ? h : /* @__PURE__ */ e(I, { trigger: h, items: s });
197
209
  }
198
210
  export {
199
- Q as TopHeader
211
+ Z as TopHeader
200
212
  };
201
213
  //# sourceMappingURL=TopHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopHeader.js","sources":["../../../src/layouts/shell/TopHeader.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\n\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { Avatar } from '../../components/ui/Avatar';\nimport {\n type DropdownItem,\n DropdownMenu,\n} from '../../components/ui/DropdownMenu';\nimport { EnvironmentSwitcher } from '../../components/ui/EnvironmentSwitcher';\nimport { NotificationBell } from '../../components/ui/NotificationBell';\nimport { useStrings } from '../../locale';\nimport { AppSwitcher } from './AppSwitcher';\nimport { useEnvironmentManifest } from './environments';\nimport type { AegisApp, AegisBrand, AegisUser } from './types';\n\ninterface TopHeaderProps {\n brand: AegisBrand;\n apps: AegisApp[];\n activeAppId?: string;\n onAppSwitch?: (appId: string) => void;\n /** Whether to render the app launcher. */\n appSwitcher?: boolean;\n /** The page has scrolled under the header; it gets a shadow. */\n scrolled?: boolean;\n user?: AegisUser;\n headerCenter?: ReactNode;\n headerActions?: ReactNode;\n /** When set, render a notification bell linking to this path. */\n inboxPath?: string;\n /** Fired by the mobile hamburger; the shell owns the open state. */\n onMobileMenuToggle?: () => void;\n /** Whether to render the mobile hamburger at all (only when sidebar exists). */\n showMobileMenu?: boolean;\n /** Whether to render the desktop sidebar collapse toggle. */\n sidebarCollapsible?: boolean;\n /** Current collapsed state — drives aria-pressed on the toggle. */\n sidebarCollapsed?: boolean;\n /** Fired by the desktop collapse button; the shell owns the state. */\n onSidebarToggle?: () => void;\n /**\n * Ref callback for the inline app-header slot. The active app's\n * `header` is portalled into this node so it appears inside the shell\n * header instead of below it.\n */\n inlineSlotRef?: (node: HTMLDivElement | null) => void;\n /** When true, hide the global `headerCenter` (an app header took it over). */\n inlineSlotActive?: boolean;\n /** Current agent panel state — drives aria-pressed on its toggle. */\n agentPanelOpen?: boolean;\n /** Fired by the agent panel toggle; the toggle renders only when set. */\n onAgentPanelToggle?: () => void;\n}\n\nexport function TopHeader({\n brand,\n apps,\n activeAppId,\n onAppSwitch,\n appSwitcher = true,\n scrolled = false,\n user,\n headerCenter,\n headerActions,\n inboxPath,\n onMobileMenuToggle,\n showMobileMenu,\n sidebarCollapsible,\n sidebarCollapsed,\n onSidebarToggle,\n inlineSlotRef,\n inlineSlotActive,\n agentPanelOpen = false,\n onAgentPanelToggle,\n}: TopHeaderProps): ReactElement {\n const strings = useStrings();\n const brandInner = (\n <>\n {brand.logo && (\n <span className=\"aegis-shell__brand-logo\">{brand.logo}</span>\n )}\n <span className=\"aegis-shell__brand-name\">{brand.name}</span>\n </>\n );\n\n return (\n <header\n className={\n scrolled\n ? 'aegis-shell__header aegis-shell__header--scrolled'\n : 'aegis-shell__header'\n }\n >\n <div className=\"aegis-shell__header-left\">\n {showMobileMenu && onMobileMenuToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__menu-toggle\"\n onClick={onMobileMenuToggle}\n aria-label={strings.openNavigation}\n >\n <span className=\"aegis-shell__menu-toggle-glyph\" aria-hidden=\"true\">\n ☰\n </span>\n </button>\n )}\n {sidebarCollapsible && onSidebarToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__sidebar-toggle\"\n onClick={onSidebarToggle}\n aria-label={\n sidebarCollapsed ? strings.showSidebar : strings.hideSidebar\n }\n aria-pressed={sidebarCollapsed}\n title={sidebarCollapsed ? strings.showSidebar : strings.hideSidebar}\n >\n <span\n className=\"aegis-shell__sidebar-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"8\" y1=\"3.5\" x2=\"8\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n {appSwitcher ? (\n <AppSwitcher\n apps={apps}\n activeAppId={activeAppId}\n onAppSwitch={onAppSwitch}\n />\n ) : null}\n {brand.href ? (\n <Link to={brand.href} className=\"aegis-shell__brand\">\n {brandInner}\n </Link>\n ) : (\n <span className=\"aegis-shell__brand\">{brandInner}</span>\n )}\n </div>\n <div\n className={\n inlineSlotActive\n ? 'aegis-shell__header-center aegis-shell__header-center--app'\n : 'aegis-shell__header-center'\n }\n ref={inlineSlotRef}\n data-aegis-inline-slot=\"\"\n >\n {!inlineSlotActive && headerCenter}\n </div>\n <div className=\"aegis-shell__header-right\">\n <ActiveEnvironmentSwitcher />\n {headerActions}\n {inboxPath && <NotificationBell inboxPath={inboxPath} />}\n {user && <UserMenu user={user} />}\n {onAgentPanelToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__agent-toggle\"\n onClick={onAgentPanelToggle}\n aria-label={\n agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'\n }\n aria-pressed={agentPanelOpen}\n title={agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'}\n >\n <span\n className=\"aegis-shell__agent-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"12\" y1=\"3.5\" x2=\"12\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n </div>\n </header>\n );\n}\n\nfunction ActiveEnvironmentSwitcher(): ReactElement | null {\n const state = useEnvironmentManifest();\n if (state.status !== 'ready') {\n return null;\n }\n const options = state.manifest.environments.map((e) => ({\n id: e.id,\n label: e.label,\n badge: e.badge,\n hint: e.baseUrl,\n }));\n return (\n <EnvironmentSwitcher\n options={options}\n currentId={state.currentEnvId}\n onChange={state.setCurrentEnv}\n />\n );\n}\n\nfunction UserMenu({ user }: { user: AegisUser }): ReactElement {\n const navigate = useNavigate();\n const items: DropdownItem[] = (user.menu ?? []).map((entry) => {\n const to = entry.to;\n return {\n key: entry.key,\n label: entry.label,\n onClick: to\n ? () => {\n navigate(to);\n }\n : entry.onClick,\n };\n });\n const badge =\n user.avatar ??\n (typeof user.name === 'string' ? (\n <Avatar\n name={user.name}\n size=\"sm\"\n className=\"aegis-shell__user-initials\"\n />\n ) : null);\n const trigger = (\n <span\n className={\n badge\n ? 'aegis-shell__user aegis-shell__user--badge'\n : 'aegis-shell__user'\n }\n >\n {badge}\n <span className=\"aegis-shell__user-name\">{user.name}</span>\n </span>\n );\n if (items.length === 0) {\n return trigger;\n }\n return <DropdownMenu trigger={trigger} items={items} />;\n}\n"],"names":["TopHeader","brand","apps","activeAppId","onAppSwitch","appSwitcher","scrolled","user","headerCenter","headerActions","inboxPath","onMobileMenuToggle","showMobileMenu","sidebarCollapsible","sidebarCollapsed","onSidebarToggle","inlineSlotRef","inlineSlotActive","agentPanelOpen","onAgentPanelToggle","strings","useStrings","brandInner","jsxs","Fragment","jsx","AppSwitcher","Link","ActiveEnvironmentSwitcher","NotificationBell","UserMenu","state","useEnvironmentManifest","options","e","EnvironmentSwitcher","navigate","useNavigate","items","entry","to","badge","Avatar","trigger","DropdownMenu"],"mappings":";;;;;;;;;AAsD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U;AAAA,IAAA;AAAA,MACC,SAAAF;AAAA,MACA,WAAWF,EAAM;AAAA,MACjB,UAAUA,EAAM;AAAA,IAAA;AAAA,EAAA;AAGtB;AAEA,SAASD,EAAS,EAAE,MAAAvB,KAA2C;AAC7D,QAAM6B,IAAWC,EAAA,GACXC,KAAyB/B,EAAK,QAAQ,CAAA,GAAI,IAAI,CAACgC,MAAU;AAC7D,UAAMC,IAAKD,EAAM;AACjB,WAAO;AAAA,MACL,KAAKA,EAAM;AAAA,MACX,OAAOA,EAAM;AAAA,MACb,SAASC,IACL,MAAM;AACJ,QAAAJ,EAASI,CAAE;AAAA,MACb,IACAD,EAAM;AAAA,IAAA;AAAA,EAEd,CAAC,GACKE,IACJlC,EAAK,WACJ,OAAOA,EAAK,QAAS,WACpB,gBAAAkB;AAAA,IAACiB;AAAA,IAAA;AAAA,MACC,MAAMnC,EAAK;AAAA,MACX,MAAK;AAAA,MACL,WAAU;AAAA,IAAA;AAAA,EAAA,IAEV,OACAoC,IACJ,gBAAApB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WACEkB,IACI,+CACA;AAAA,MAGL,UAAA;AAAA,QAAAA;AAAA,QACD,gBAAAhB,EAAC,QAAA,EAAK,WAAU,0BAA0B,YAAK,KAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxD,SAAIa,EAAM,WAAW,IACZK,IAEF,gBAAAlB,EAACmB,GAAA,EAAa,SAAAD,GAAkB,OAAAL,EAAA,CAAc;AACvD;"}
1
+ {"version":3,"file":"TopHeader.js","sources":["../../../src/layouts/shell/TopHeader.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react';\n\nimport { Tooltip } from 'antd';\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { Avatar } from '../../components/ui/Avatar';\nimport { Chip } from '../../components/ui/Chip';\nimport {\n type DropdownItem,\n DropdownMenu,\n} from '../../components/ui/DropdownMenu';\nimport { EnvironmentSwitcher } from '../../components/ui/EnvironmentSwitcher';\nimport { useStrings } from '../../locale';\nimport { AppSwitcher } from './AppSwitcher';\nimport { ShellNotificationBell } from './ShellNotificationBell';\nimport { useEnvironmentManifest } from './environments';\nimport type { AegisApp, AegisBrand, AegisUser } from './types';\n\ninterface TopHeaderProps {\n brand: AegisBrand;\n apps: AegisApp[];\n activeAppId?: string;\n onAppSwitch?: (appId: string) => void;\n /** Whether to render the app launcher. */\n appSwitcher?: boolean;\n /** The page has scrolled under the header; it gets a shadow. */\n scrolled?: boolean;\n user?: AegisUser;\n headerCenter?: ReactNode;\n headerActions?: ReactNode;\n /** When set, render a notification bell linking to this path. */\n inboxPath?: string;\n /** Fired by the mobile hamburger; the shell owns the open state. */\n onMobileMenuToggle?: () => void;\n /** Whether the navigation drawer is open — drives aria-expanded on the hamburger. */\n mobileMenuOpen?: boolean;\n /** The hamburger button, which takes focus back when the drawer is dismissed. */\n menuToggleRef?: Ref<HTMLButtonElement>;\n /** Whether to render the mobile hamburger at all (only when sidebar exists). */\n showMobileMenu?: boolean;\n /** Whether to render the desktop sidebar collapse toggle. */\n sidebarCollapsible?: boolean;\n /** Current collapsed state — drives aria-pressed on the toggle. */\n sidebarCollapsed?: boolean;\n /** Fired by the desktop collapse button; the shell owns the state. */\n onSidebarToggle?: () => void;\n /**\n * Ref callback for the inline app-header slot. The active app's\n * `header` is portalled into this node so it appears inside the shell\n * header instead of below it.\n */\n inlineSlotRef?: (node: HTMLDivElement | null) => void;\n /** When true, hide the global `headerCenter` (an app header took it over). */\n inlineSlotActive?: boolean;\n /** Current agent panel state — drives aria-pressed on its toggle. */\n agentPanelOpen?: boolean;\n /** Fired by the agent panel toggle; the toggle renders only when set. */\n onAgentPanelToggle?: () => void;\n}\n\nexport function TopHeader({\n brand,\n apps,\n activeAppId,\n onAppSwitch,\n appSwitcher = true,\n scrolled = false,\n user,\n headerCenter,\n headerActions,\n inboxPath,\n onMobileMenuToggle,\n mobileMenuOpen = false,\n menuToggleRef,\n showMobileMenu,\n sidebarCollapsible,\n sidebarCollapsed,\n onSidebarToggle,\n inlineSlotRef,\n inlineSlotActive,\n agentPanelOpen = false,\n onAgentPanelToggle,\n}: TopHeaderProps): ReactElement {\n const strings = useStrings();\n const brandInner = (\n <>\n {brand.logo && (\n <span className=\"aegis-shell__brand-logo\">{brand.logo}</span>\n )}\n <span className=\"aegis-shell__brand-name\">{brand.name}</span>\n </>\n );\n\n return (\n <header\n className={\n scrolled\n ? 'aegis-shell__header aegis-shell__header--scrolled'\n : 'aegis-shell__header'\n }\n >\n <div className=\"aegis-shell__header-left\">\n {showMobileMenu && onMobileMenuToggle && (\n <button\n ref={menuToggleRef}\n type=\"button\"\n className=\"aegis-shell__menu-toggle\"\n onClick={onMobileMenuToggle}\n aria-label={\n mobileMenuOpen ? strings.closeNavigation : strings.openNavigation\n }\n aria-expanded={mobileMenuOpen}\n >\n <span className=\"aegis-shell__menu-toggle-glyph\" aria-hidden=\"true\">\n ☰\n </span>\n </button>\n )}\n {sidebarCollapsible && onSidebarToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__sidebar-toggle\"\n onClick={onSidebarToggle}\n aria-label={\n sidebarCollapsed ? strings.showSidebar : strings.hideSidebar\n }\n aria-pressed={sidebarCollapsed}\n title={sidebarCollapsed ? strings.showSidebar : strings.hideSidebar}\n >\n <span\n className=\"aegis-shell__sidebar-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"8\" y1=\"3.5\" x2=\"8\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n {appSwitcher ? (\n <AppSwitcher\n apps={apps}\n activeAppId={activeAppId}\n onAppSwitch={onAppSwitch}\n />\n ) : null}\n {brand.href ? (\n <Link to={brand.href} className=\"aegis-shell__brand\">\n {brandInner}\n </Link>\n ) : (\n <span className=\"aegis-shell__brand\">{brandInner}</span>\n )}\n </div>\n <div\n className={\n inlineSlotActive\n ? 'aegis-shell__header-center aegis-shell__header-center--app'\n : 'aegis-shell__header-center'\n }\n ref={inlineSlotRef}\n data-aegis-inline-slot=\"\"\n >\n {!inlineSlotActive && headerCenter}\n </div>\n <div className=\"aegis-shell__header-right\">\n <ActiveEnvironmentSwitcher />\n {headerActions}\n {inboxPath && <ShellNotificationBell inboxPath={inboxPath} />}\n {user && <UserMenu user={user} />}\n {onAgentPanelToggle && (\n <button\n type=\"button\"\n className=\"aegis-shell__agent-toggle\"\n onClick={onAgentPanelToggle}\n aria-label={\n agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'\n }\n aria-pressed={agentPanelOpen}\n title={agentPanelOpen ? 'Hide agent panel' : 'Show agent panel'}\n >\n <span\n className=\"aegis-shell__agent-toggle-glyph\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"13\" rx=\"2\" />\n <line x1=\"12\" y1=\"3.5\" x2=\"12\" y2=\"16.5\" />\n </svg>\n </span>\n </button>\n )}\n </div>\n </header>\n );\n}\n\nfunction ActiveEnvironmentSwitcher(): ReactElement | null {\n const state = useEnvironmentManifest();\n if (state.status === 'error') {\n return (\n <Tooltip title={`${state.error.message} Click to retry.`}>\n <span className=\"aegis-shell__env-error\">\n <Chip tone=\"warning\" onClick={state.retry}>\n <span className=\"aegis-shell__env-error-full\">\n Environments unavailable\n </span>\n <span className=\"aegis-shell__env-error-short\">Env error</span>\n </Chip>\n </span>\n </Tooltip>\n );\n }\n if (state.status !== 'ready') {\n return null;\n }\n const options = state.manifest.environments.map((e) => ({\n id: e.id,\n label: e.label,\n badge: e.badge,\n hint: e.baseUrl,\n }));\n return (\n <EnvironmentSwitcher\n className=\"aegis-shell__env-switcher\"\n options={options}\n currentId={state.currentEnvId}\n onChange={state.setCurrentEnv}\n />\n );\n}\n\nfunction UserMenu({ user }: { user: AegisUser }): ReactElement {\n const navigate = useNavigate();\n const items: DropdownItem[] = (user.menu ?? []).map((entry) => {\n const to = entry.to;\n return {\n key: entry.key,\n label: entry.label,\n onClick: to\n ? () => {\n navigate(to);\n }\n : entry.onClick,\n };\n });\n const badge =\n user.avatar ??\n (typeof user.name === 'string' ? (\n <Avatar\n name={user.name}\n size=\"sm\"\n className=\"aegis-shell__user-initials\"\n />\n ) : null);\n const trigger = (\n <span\n className={\n badge\n ? 'aegis-shell__user aegis-shell__user--badge'\n : 'aegis-shell__user'\n }\n >\n {badge}\n <span className=\"aegis-shell__user-name\">{user.name}</span>\n </span>\n );\n if (items.length === 0) {\n return trigger;\n }\n return <DropdownMenu trigger={trigger} items={items} />;\n}\n"],"names":["TopHeader","brand","apps","activeAppId","onAppSwitch","appSwitcher","scrolled","user","headerCenter","headerActions","inboxPath","onMobileMenuToggle","mobileMenuOpen","menuToggleRef","showMobileMenu","sidebarCollapsible","sidebarCollapsed","onSidebarToggle","inlineSlotRef","inlineSlotActive","agentPanelOpen","onAgentPanelToggle","strings","useStrings","brandInner","jsxs","Fragment","jsx","AppSwitcher","Link","ActiveEnvironmentSwitcher","ShellNotificationBell","UserMenu","state","useEnvironmentManifest","Tooltip","Chip","options","e","EnvironmentSwitcher","navigate","useNavigate","items","entry","to","badge","Avatar","trigger","DropdownMenu"],"mappings":";;;;;;;;;;;AA4DO,SAASA,EAAU;AAAA,EACxB,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,MAAAC;AAAA,EACA,cAAAC;AAAA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AAkB,OAAAL,EAAA,CAAc;AACvD;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./paths.cjs");function n(s,a,i){if(s.requiresAuth===!1)return!0;if(a!=="authenticated")return!1;if(!s.requiredRoles||s.requiredRoles.length===0)return!0;const e=i?.roles??[];return s.requiredRoles.some(t=>e.includes(t))}function o(s,a){return s.filter(e=>{const t=r.normalizeBasePath(e.basePath);return a===t||a.startsWith(`${t}/`)}).sort((e,t)=>r.normalizeBasePath(t.basePath).length-r.normalizeBasePath(e.basePath).length)[0]}function l(s){const a=new Map;for(const i of s){const e=r.normalizeBasePath(i.basePath),t=a.get(e);t&&console.error(`AegisShell: duplicate basePath "${e}" on apps "${t}" and "${i.id}". Routing will collide — give each app a unique basePath.`),a.set(e,i.id)}}exports.assertUniqueBasePaths=l;exports.findActiveApp=o;exports.isAppVisible=n;
2
+ //# sourceMappingURL=apps.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.cjs","sources":["../../../src/layouts/shell/apps.ts"],"sourcesContent":["import type { AegisAuthUser, AuthStatus } from '../../auth';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp } from './types';\n\n/**\n * Whether the user may see and open `app`: apps with `requiresAuth: false`\n * are open to everyone, the rest need a signed-in user holding one of the\n * `requiredRoles`, when the app lists any. `hidden` is not part of the\n * rule; it only keeps an app out of the launcher.\n */\nexport function isAppVisible(\n app: AegisApp,\n status: AuthStatus,\n user: AegisAuthUser | null,\n): boolean {\n if (app.requiresAuth === false) {\n return true;\n }\n if (status !== 'authenticated') {\n return false;\n }\n if (!app.requiredRoles || app.requiredRoles.length === 0) {\n return true;\n }\n const userRoles = user?.roles ?? [];\n return app.requiredRoles.some((r) => userRoles.includes(r));\n}\n\n/** The app whose basePath is the longest prefix of `pathname`. */\nexport function findActiveApp(\n apps: AegisApp[],\n pathname: string,\n): AegisApp | undefined {\n const candidates = apps\n .filter((app) => {\n const base = normalizeBasePath(app.basePath);\n return pathname === base || pathname.startsWith(`${base}/`);\n })\n .sort(\n (a, b) =>\n normalizeBasePath(b.basePath).length -\n normalizeBasePath(a.basePath).length,\n );\n return candidates[0];\n}\n\nexport function assertUniqueBasePaths(apps: AegisApp[]): void {\n const seen = new Map<string, string>();\n for (const app of apps) {\n const key = normalizeBasePath(app.basePath);\n const prev = seen.get(key);\n if (prev) {\n console.error(\n `AegisShell: duplicate basePath \"${key}\" on apps \"${prev}\" and \"${app.id}\". ` +\n `Routing will collide — give each app a unique basePath.`,\n );\n }\n seen.set(key, app.id);\n }\n}\n"],"names":["isAppVisible","app","status","user","userRoles","r","findActiveApp","apps","pathname","base","normalizeBasePath","a","b","assertUniqueBasePaths","seen","key","prev"],"mappings":"+GAUO,SAASA,EACdC,EACAC,EACAC,EACS,CACT,GAAIF,EAAI,eAAiB,GACvB,MAAO,GAET,GAAIC,IAAW,gBACb,MAAO,GAET,GAAI,CAACD,EAAI,eAAiBA,EAAI,cAAc,SAAW,EACrD,MAAO,GAET,MAAMG,EAAYD,GAAM,OAAS,CAAA,EACjC,OAAOF,EAAI,cAAc,KAAMI,GAAMD,EAAU,SAASC,CAAC,CAAC,CAC5D,CAGO,SAASC,EACdC,EACAC,EACsB,CAWtB,OAVmBD,EAChB,OAAQN,GAAQ,CACf,MAAMQ,EAAOC,EAAAA,kBAAkBT,EAAI,QAAQ,EAC3C,OAAOO,IAAaC,GAAQD,EAAS,WAAW,GAAGC,CAAI,GAAG,CAC5D,CAAC,EACA,KACC,CAACE,EAAGC,IACFF,EAAAA,kBAAkBE,EAAE,QAAQ,EAAE,OAC9BF,EAAAA,kBAAkBC,EAAE,QAAQ,EAAE,MAAA,EAElB,CAAC,CACrB,CAEO,SAASE,EAAsBN,EAAwB,CAC5D,MAAMO,MAAW,IACjB,UAAWb,KAAOM,EAAM,CACtB,MAAMQ,EAAML,EAAAA,kBAAkBT,EAAI,QAAQ,EACpCe,EAAOF,EAAK,IAAIC,CAAG,EACrBC,GACF,QAAQ,MACN,mCAAmCD,CAAG,cAAcC,CAAI,UAAUf,EAAI,EAAE,4DAAA,EAI5Ea,EAAK,IAAIC,EAAKd,EAAI,EAAE,CACtB,CACF"}
@@ -0,0 +1,12 @@
1
+ import { AegisAuthUser, AuthStatus } from '../../auth';
2
+ import { AegisApp } from './types';
3
+ /**
4
+ * Whether the user may see and open `app`: apps with `requiresAuth: false`
5
+ * are open to everyone, the rest need a signed-in user holding one of the
6
+ * `requiredRoles`, when the app lists any. `hidden` is not part of the
7
+ * rule; it only keeps an app out of the launcher.
8
+ */
9
+ export declare function isAppVisible(app: AegisApp, status: AuthStatus, user: AegisAuthUser | null): boolean;
10
+ /** The app whose basePath is the longest prefix of `pathname`. */
11
+ export declare function findActiveApp(apps: AegisApp[], pathname: string): AegisApp | undefined;
12
+ export declare function assertUniqueBasePaths(apps: AegisApp[]): void;
@@ -0,0 +1,34 @@
1
+ import { normalizeBasePath as i } from "./paths.js";
2
+ function o(s, r, n) {
3
+ if (s.requiresAuth === !1)
4
+ return !0;
5
+ if (r !== "authenticated")
6
+ return !1;
7
+ if (!s.requiredRoles || s.requiredRoles.length === 0)
8
+ return !0;
9
+ const e = n?.roles ?? [];
10
+ return s.requiredRoles.some((t) => e.includes(t));
11
+ }
12
+ function u(s, r) {
13
+ return s.filter((e) => {
14
+ const t = i(e.basePath);
15
+ return r === t || r.startsWith(`${t}/`);
16
+ }).sort(
17
+ (e, t) => i(t.basePath).length - i(e.basePath).length
18
+ )[0];
19
+ }
20
+ function l(s) {
21
+ const r = /* @__PURE__ */ new Map();
22
+ for (const n of s) {
23
+ const e = i(n.basePath), t = r.get(e);
24
+ t && console.error(
25
+ `AegisShell: duplicate basePath "${e}" on apps "${t}" and "${n.id}". Routing will collide — give each app a unique basePath.`
26
+ ), r.set(e, n.id);
27
+ }
28
+ }
29
+ export {
30
+ l as assertUniqueBasePaths,
31
+ u as findActiveApp,
32
+ o as isAppVisible
33
+ };
34
+ //# sourceMappingURL=apps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.js","sources":["../../../src/layouts/shell/apps.ts"],"sourcesContent":["import type { AegisAuthUser, AuthStatus } from '../../auth';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp } from './types';\n\n/**\n * Whether the user may see and open `app`: apps with `requiresAuth: false`\n * are open to everyone, the rest need a signed-in user holding one of the\n * `requiredRoles`, when the app lists any. `hidden` is not part of the\n * rule; it only keeps an app out of the launcher.\n */\nexport function isAppVisible(\n app: AegisApp,\n status: AuthStatus,\n user: AegisAuthUser | null,\n): boolean {\n if (app.requiresAuth === false) {\n return true;\n }\n if (status !== 'authenticated') {\n return false;\n }\n if (!app.requiredRoles || app.requiredRoles.length === 0) {\n return true;\n }\n const userRoles = user?.roles ?? [];\n return app.requiredRoles.some((r) => userRoles.includes(r));\n}\n\n/** The app whose basePath is the longest prefix of `pathname`. */\nexport function findActiveApp(\n apps: AegisApp[],\n pathname: string,\n): AegisApp | undefined {\n const candidates = apps\n .filter((app) => {\n const base = normalizeBasePath(app.basePath);\n return pathname === base || pathname.startsWith(`${base}/`);\n })\n .sort(\n (a, b) =>\n normalizeBasePath(b.basePath).length -\n normalizeBasePath(a.basePath).length,\n );\n return candidates[0];\n}\n\nexport function assertUniqueBasePaths(apps: AegisApp[]): void {\n const seen = new Map<string, string>();\n for (const app of apps) {\n const key = normalizeBasePath(app.basePath);\n const prev = seen.get(key);\n if (prev) {\n console.error(\n `AegisShell: duplicate basePath \"${key}\" on apps \"${prev}\" and \"${app.id}\". ` +\n `Routing will collide — give each app a unique basePath.`,\n );\n }\n seen.set(key, app.id);\n }\n}\n"],"names":["isAppVisible","app","status","user","userRoles","r","findActiveApp","apps","pathname","base","normalizeBasePath","a","b","assertUniqueBasePaths","seen","key","prev"],"mappings":";AAUO,SAASA,EACdC,GACAC,GACAC,GACS;AACT,MAAIF,EAAI,iBAAiB;AACvB,WAAO;AAET,MAAIC,MAAW;AACb,WAAO;AAET,MAAI,CAACD,EAAI,iBAAiBA,EAAI,cAAc,WAAW;AACrD,WAAO;AAET,QAAMG,IAAYD,GAAM,SAAS,CAAA;AACjC,SAAOF,EAAI,cAAc,KAAK,CAACI,MAAMD,EAAU,SAASC,CAAC,CAAC;AAC5D;AAGO,SAASC,EACdC,GACAC,GACsB;AAWtB,SAVmBD,EAChB,OAAO,CAACN,MAAQ;AACf,UAAMQ,IAAOC,EAAkBT,EAAI,QAAQ;AAC3C,WAAOO,MAAaC,KAAQD,EAAS,WAAW,GAAGC,CAAI,GAAG;AAAA,EAC5D,CAAC,EACA;AAAA,IACC,CAACE,GAAGC,MACFF,EAAkBE,EAAE,QAAQ,EAAE,SAC9BF,EAAkBC,EAAE,QAAQ,EAAE;AAAA,EAAA,EAElB,CAAC;AACrB;AAEO,SAASE,EAAsBN,GAAwB;AAC5D,QAAMO,wBAAW,IAAA;AACjB,aAAWb,KAAOM,GAAM;AACtB,UAAMQ,IAAML,EAAkBT,EAAI,QAAQ,GACpCe,IAAOF,EAAK,IAAIC,CAAG;AACzB,IAAIC,KACF,QAAQ;AAAA,MACN,mCAAmCD,CAAG,cAAcC,CAAI,UAAUf,EAAI,EAAE;AAAA,IAAA,GAI5Ea,EAAK,IAAIC,GAAKd,EAAI,EAAE;AAAA,EACtB;AACF;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react-router-dom"),n=require("../PageWrapper.cjs"),m=require("./AppRoutes.cjs"),q=require("./AuthRequiredCard.cjs"),j=require("./apps.cjs"),x=require("./paths.cjs");function h({apps:c,rootRoutes:a,fallbackPath:i,notFoundElement:o,auth:r}){const l=r.signIn?()=>{r.signIn?.({})}:void 0,b=c.map(e=>({path:`${x.normalizeBasePath(e.basePath)}/*`,element:t.jsx(n.PageWrapper,{children:j.isAppVisible(e,r.status,r.user)?t.jsx(m.AppRoutes,{app:e}):t.jsx(q.AuthRequiredCard,{app:e,status:r.status,user:r.user,onSignIn:l})})})),d=a.filter(e=>!e.bare).map(({bare:e,element:s,...R})=>({...R,element:t.jsx(n.PageWrapper,{children:s})})),u=a.filter(e=>e.bare).map(({bare:e,...s})=>s),p=o?{path:"*",element:t.jsx(n.PageWrapper,{children:o})}:i?{path:"*",element:t.jsx(g.Navigate,{to:i,replace:!0})}:null;return{routes:[...u,...d,...b,...p?[p]:[]],bareRoutes:new Set(u)}}exports.buildRouteTree=h;
2
+ //# sourceMappingURL=buildRouteTree.cjs.map