@lincyaw/aegis-ui 0.10.0 → 0.12.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 (396) hide show
  1. package/dist/agent/ask/AskPanel.cjs +1 -1
  2. package/dist/agent/ask/AskPanel.cjs.map +1 -1
  3. package/dist/agent/ask/AskPanel.d.ts +5 -0
  4. package/dist/agent/ask/AskPanel.js +105 -98
  5. package/dist/agent/ask/AskPanel.js.map +1 -1
  6. package/dist/commands/commandContext.cjs.map +1 -1
  7. package/dist/commands/commandContext.d.ts +4 -1
  8. package/dist/commands/commandContext.js.map +1 -1
  9. package/dist/components/ui/AgentPanel.cjs +1 -1
  10. package/dist/components/ui/AgentPanel.cjs.map +1 -1
  11. package/dist/components/ui/AgentPanel.js +15 -14
  12. package/dist/components/ui/AgentPanel.js.map +1 -1
  13. package/dist/components/ui/Avatar.cjs +1 -1
  14. package/dist/components/ui/Avatar.cjs.map +1 -1
  15. package/dist/components/ui/Avatar.js +21 -19
  16. package/dist/components/ui/Avatar.js.map +1 -1
  17. package/dist/components/ui/BlastRadiusBar.cjs +1 -1
  18. package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
  19. package/dist/components/ui/BlastRadiusBar.d.ts +16 -4
  20. package/dist/components/ui/BlastRadiusBar.js +27 -23
  21. package/dist/components/ui/BlastRadiusBar.js.map +1 -1
  22. package/dist/components/ui/Button.cjs.map +1 -1
  23. package/dist/components/ui/Button.d.ts +4 -2
  24. package/dist/components/ui/Button.js.map +1 -1
  25. package/dist/components/ui/ChatComposer.cjs +1 -1
  26. package/dist/components/ui/ChatComposer.cjs.map +1 -1
  27. package/dist/components/ui/ChatComposer.js +32 -31
  28. package/dist/components/ui/ChatComposer.js.map +1 -1
  29. package/dist/components/ui/ChatSessionList.cjs +1 -1
  30. package/dist/components/ui/ChatSessionList.cjs.map +1 -1
  31. package/dist/components/ui/ChatSessionList.js +68 -66
  32. package/dist/components/ui/ChatSessionList.js.map +1 -1
  33. package/dist/components/ui/CheckGrid.cjs +1 -1
  34. package/dist/components/ui/CheckGrid.cjs.map +1 -1
  35. package/dist/components/ui/CheckGrid.js +18 -17
  36. package/dist/components/ui/CheckGrid.js.map +1 -1
  37. package/dist/components/ui/Checkbox.cjs +1 -1
  38. package/dist/components/ui/Checkbox.cjs.map +1 -1
  39. package/dist/components/ui/Checkbox.d.ts +6 -2
  40. package/dist/components/ui/Checkbox.js +21 -17
  41. package/dist/components/ui/Checkbox.js.map +1 -1
  42. package/dist/components/ui/ChoiceCardGroup.cjs +1 -1
  43. package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -1
  44. package/dist/components/ui/ChoiceCardGroup.d.ts +13 -4
  45. package/dist/components/ui/ChoiceCardGroup.js +47 -35
  46. package/dist/components/ui/ChoiceCardGroup.js.map +1 -1
  47. package/dist/components/ui/CodeEditor.cjs +1 -1
  48. package/dist/components/ui/CodeEditor.cjs.map +1 -1
  49. package/dist/components/ui/CodeEditor.d.ts +11 -1
  50. package/dist/components/ui/CodeEditor.js +108 -74
  51. package/dist/components/ui/CodeEditor.js.map +1 -1
  52. package/dist/components/ui/CommandInvocationCard.cjs +1 -1
  53. package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
  54. package/dist/components/ui/CommandInvocationCard.js +23 -26
  55. package/dist/components/ui/CommandInvocationCard.js.map +1 -1
  56. package/dist/components/ui/CommandPalette.cjs +1 -1
  57. package/dist/components/ui/CommandPalette.cjs.map +1 -1
  58. package/dist/components/ui/CommandPalette.d.ts +3 -3
  59. package/dist/components/ui/CommandPalette.js +75 -75
  60. package/dist/components/ui/CommandPalette.js.map +1 -1
  61. package/dist/components/ui/CommitGraph.cjs +1 -1
  62. package/dist/components/ui/CommitGraph.cjs.map +1 -1
  63. package/dist/components/ui/CommitGraph.d.ts +3 -1
  64. package/dist/components/ui/CommitGraph.js +77 -74
  65. package/dist/components/ui/CommitGraph.js.map +1 -1
  66. package/dist/components/ui/ContentInspectorDialog.cjs +1 -1
  67. package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
  68. package/dist/components/ui/ContentInspectorDialog.js +25 -31
  69. package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
  70. package/dist/components/ui/ContentPreview.cjs +2 -2
  71. package/dist/components/ui/ContentPreview.cjs.map +1 -1
  72. package/dist/components/ui/ContentPreview.js +55 -56
  73. package/dist/components/ui/ContentPreview.js.map +1 -1
  74. package/dist/components/ui/DangerZone.cjs +1 -1
  75. package/dist/components/ui/DangerZone.cjs.map +1 -1
  76. package/dist/components/ui/DangerZone.js +9 -8
  77. package/dist/components/ui/DangerZone.js.map +1 -1
  78. package/dist/components/ui/DataList.cjs +1 -1
  79. package/dist/components/ui/DataList.cjs.map +1 -1
  80. package/dist/components/ui/DataList.js +27 -25
  81. package/dist/components/ui/DataList.js.map +1 -1
  82. package/dist/components/ui/DataTable.cjs +1 -1
  83. package/dist/components/ui/DataTable.cjs.map +1 -1
  84. package/dist/components/ui/DataTable.d.ts +2 -1
  85. package/dist/components/ui/DataTable.js +141 -124
  86. package/dist/components/ui/DataTable.js.map +1 -1
  87. package/dist/components/ui/DiffViewer.cjs +1 -1
  88. package/dist/components/ui/DiffViewer.cjs.map +1 -1
  89. package/dist/components/ui/DiffViewer.js +29 -25
  90. package/dist/components/ui/DiffViewer.js.map +1 -1
  91. package/dist/components/ui/DropdownMenu.cjs +1 -1
  92. package/dist/components/ui/DropdownMenu.cjs.map +1 -1
  93. package/dist/components/ui/DropdownMenu.d.ts +1 -0
  94. package/dist/components/ui/DropdownMenu.js +41 -40
  95. package/dist/components/ui/DropdownMenu.js.map +1 -1
  96. package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
  97. package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
  98. package/dist/components/ui/EnvironmentSwitcher.js +26 -24
  99. package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
  100. package/dist/components/ui/EventTable.cjs +1 -1
  101. package/dist/components/ui/EventTable.cjs.map +1 -1
  102. package/dist/components/ui/EventTable.js +60 -53
  103. package/dist/components/ui/EventTable.js.map +1 -1
  104. package/dist/components/ui/FileDropzone.cjs +1 -1
  105. package/dist/components/ui/FileDropzone.cjs.map +1 -1
  106. package/dist/components/ui/FileDropzone.js +40 -42
  107. package/dist/components/ui/FileDropzone.js.map +1 -1
  108. package/dist/components/ui/FilePreview.cjs +1 -1
  109. package/dist/components/ui/FilePreview.cjs.map +1 -1
  110. package/dist/components/ui/FilePreview.js +63 -61
  111. package/dist/components/ui/FilePreview.js.map +1 -1
  112. package/dist/components/ui/FolderDropzone.cjs +1 -1
  113. package/dist/components/ui/FolderDropzone.cjs.map +1 -1
  114. package/dist/components/ui/FolderDropzone.js +114 -84
  115. package/dist/components/ui/FolderDropzone.js.map +1 -1
  116. package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
  117. package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
  118. package/dist/components/ui/ForgotPasswordForm.js +22 -21
  119. package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
  120. package/dist/components/ui/FormRow.cjs +1 -1
  121. package/dist/components/ui/FormRow.cjs.map +1 -1
  122. package/dist/components/ui/FormRow.d.ts +32 -11
  123. package/dist/components/ui/FormRow.js +24 -15
  124. package/dist/components/ui/FormRow.js.map +1 -1
  125. package/dist/components/ui/InboxPage.cjs +1 -1
  126. package/dist/components/ui/InboxPage.cjs.map +1 -1
  127. package/dist/components/ui/InboxPage.d.ts +12 -3
  128. package/dist/components/ui/InboxPage.js +91 -77
  129. package/dist/components/ui/InboxPage.js.map +1 -1
  130. package/dist/components/ui/LoginForm.cjs +1 -1
  131. package/dist/components/ui/LoginForm.cjs.map +1 -1
  132. package/dist/components/ui/LoginForm.js +43 -43
  133. package/dist/components/ui/LoginForm.js.map +1 -1
  134. package/dist/components/ui/MonoValue.cjs +1 -1
  135. package/dist/components/ui/MonoValue.cjs.map +1 -1
  136. package/dist/components/ui/MonoValue.d.ts +5 -1
  137. package/dist/components/ui/MonoValue.js +17 -17
  138. package/dist/components/ui/MonoValue.js.map +1 -1
  139. package/dist/components/ui/NotificationBell.cjs +1 -1
  140. package/dist/components/ui/NotificationBell.cjs.map +1 -1
  141. package/dist/components/ui/NotificationBell.d.ts +17 -1
  142. package/dist/components/ui/NotificationBell.js +129 -75
  143. package/dist/components/ui/NotificationBell.js.map +1 -1
  144. package/dist/components/ui/NumberField.cjs +1 -1
  145. package/dist/components/ui/NumberField.cjs.map +1 -1
  146. package/dist/components/ui/NumberField.d.ts +3 -1
  147. package/dist/components/ui/NumberField.js +52 -49
  148. package/dist/components/ui/NumberField.js.map +1 -1
  149. package/dist/components/ui/ObjectBrowser.cjs +1 -1
  150. package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
  151. package/dist/components/ui/ObjectBrowser.js +83 -78
  152. package/dist/components/ui/ObjectBrowser.js.map +1 -1
  153. package/dist/components/ui/PageSizeSelect.cjs +1 -1
  154. package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
  155. package/dist/components/ui/PageSizeSelect.js +30 -29
  156. package/dist/components/ui/PageSizeSelect.js.map +1 -1
  157. package/dist/components/ui/Panel.cjs.map +1 -1
  158. package/dist/components/ui/Panel.d.ts +5 -2
  159. package/dist/components/ui/Panel.js.map +1 -1
  160. package/dist/components/ui/ParetoChart.cjs +1 -1
  161. package/dist/components/ui/ParetoChart.cjs.map +1 -1
  162. package/dist/components/ui/ParetoChart.js +247 -212
  163. package/dist/components/ui/ParetoChart.js.map +1 -1
  164. package/dist/components/ui/ParquetViewer.cjs +1 -1
  165. package/dist/components/ui/ParquetViewer.cjs.map +1 -1
  166. package/dist/components/ui/ParquetViewer.js +69 -74
  167. package/dist/components/ui/ParquetViewer.js.map +1 -1
  168. package/dist/components/ui/PasswordField.cjs +1 -1
  169. package/dist/components/ui/PasswordField.cjs.map +1 -1
  170. package/dist/components/ui/PasswordField.js +28 -27
  171. package/dist/components/ui/PasswordField.js.map +1 -1
  172. package/dist/components/ui/PickerField.cjs +1 -1
  173. package/dist/components/ui/PickerField.cjs.map +1 -1
  174. package/dist/components/ui/PickerField.d.ts +25 -6
  175. package/dist/components/ui/PickerField.js +20 -17
  176. package/dist/components/ui/PickerField.js.map +1 -1
  177. package/dist/components/ui/ProjectSelector.cjs +1 -1
  178. package/dist/components/ui/ProjectSelector.cjs.map +1 -1
  179. package/dist/components/ui/ProjectSelector.js +40 -37
  180. package/dist/components/ui/ProjectSelector.js.map +1 -1
  181. package/dist/components/ui/QueryAutocomplete.cjs +1 -1
  182. package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
  183. package/dist/components/ui/QueryAutocomplete.d.ts +11 -2
  184. package/dist/components/ui/QueryAutocomplete.js +146 -126
  185. package/dist/components/ui/QueryAutocomplete.js.map +1 -1
  186. package/dist/components/ui/RankBar.cjs +1 -1
  187. package/dist/components/ui/RankBar.cjs.map +1 -1
  188. package/dist/components/ui/RankBar.js +9 -9
  189. package/dist/components/ui/RankBar.js.map +1 -1
  190. package/dist/components/ui/RegisterForm.cjs +1 -1
  191. package/dist/components/ui/RegisterForm.cjs.map +1 -1
  192. package/dist/components/ui/RegisterForm.js +41 -40
  193. package/dist/components/ui/RegisterForm.js.map +1 -1
  194. package/dist/components/ui/ReplayStepStrip.cjs +1 -1
  195. package/dist/components/ui/ReplayStepStrip.cjs.map +1 -1
  196. package/dist/components/ui/ReplayStepStrip.d.ts +6 -3
  197. package/dist/components/ui/ReplayStepStrip.js +71 -61
  198. package/dist/components/ui/ReplayStepStrip.js.map +1 -1
  199. package/dist/components/ui/ResizableSidePanel.cjs +1 -1
  200. package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
  201. package/dist/components/ui/ResizableSidePanel.js +41 -40
  202. package/dist/components/ui/ResizableSidePanel.js.map +1 -1
  203. package/dist/components/ui/SavedQueryBar.cjs +1 -1
  204. package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
  205. package/dist/components/ui/SavedQueryBar.d.ts +1 -1
  206. package/dist/components/ui/SavedQueryBar.js +375 -277
  207. package/dist/components/ui/SavedQueryBar.js.map +1 -1
  208. package/dist/components/ui/SearchInput.cjs +1 -1
  209. package/dist/components/ui/SearchInput.cjs.map +1 -1
  210. package/dist/components/ui/SearchInput.d.ts +5 -1
  211. package/dist/components/ui/SearchInput.js +28 -24
  212. package/dist/components/ui/SearchInput.js.map +1 -1
  213. package/dist/components/ui/Select.cjs +1 -1
  214. package/dist/components/ui/Select.cjs.map +1 -1
  215. package/dist/components/ui/Select.d.ts +3 -1
  216. package/dist/components/ui/Select.js +21 -19
  217. package/dist/components/ui/Select.js.map +1 -1
  218. package/dist/components/ui/ServiceMap.cjs +1 -1
  219. package/dist/components/ui/ServiceMap.cjs.map +1 -1
  220. package/dist/components/ui/ServiceMap.d.ts +18 -4
  221. package/dist/components/ui/ServiceMap.js +353 -228
  222. package/dist/components/ui/ServiceMap.js.map +1 -1
  223. package/dist/components/ui/Slider.cjs +1 -1
  224. package/dist/components/ui/Slider.cjs.map +1 -1
  225. package/dist/components/ui/Slider.d.ts +3 -1
  226. package/dist/components/ui/Slider.js +11 -9
  227. package/dist/components/ui/Slider.js.map +1 -1
  228. package/dist/components/ui/SparkLine.cjs +1 -1
  229. package/dist/components/ui/SparkLine.cjs.map +1 -1
  230. package/dist/components/ui/SparkLine.d.ts +5 -2
  231. package/dist/components/ui/SparkLine.js +36 -31
  232. package/dist/components/ui/SparkLine.js.map +1 -1
  233. package/dist/components/ui/Steps.cjs +1 -1
  234. package/dist/components/ui/Steps.cjs.map +1 -1
  235. package/dist/components/ui/Steps.js +25 -29
  236. package/dist/components/ui/Steps.js.map +1 -1
  237. package/dist/components/ui/TableOfContents.cjs +1 -1
  238. package/dist/components/ui/TableOfContents.cjs.map +1 -1
  239. package/dist/components/ui/TableOfContents.js +16 -19
  240. package/dist/components/ui/TableOfContents.js.map +1 -1
  241. package/dist/components/ui/Tabs.cjs +2 -2
  242. package/dist/components/ui/Tabs.cjs.map +1 -1
  243. package/dist/components/ui/Tabs.js +107 -87
  244. package/dist/components/ui/Tabs.js.map +1 -1
  245. package/dist/components/ui/Terminal.cjs +1 -1
  246. package/dist/components/ui/Terminal.cjs.map +1 -1
  247. package/dist/components/ui/Terminal.js +18 -17
  248. package/dist/components/ui/Terminal.js.map +1 -1
  249. package/dist/components/ui/TextField.cjs +1 -1
  250. package/dist/components/ui/TextField.cjs.map +1 -1
  251. package/dist/components/ui/TextField.js +6 -6
  252. package/dist/components/ui/TextField.js.map +1 -1
  253. package/dist/components/ui/ThemeToggle.cjs +1 -1
  254. package/dist/components/ui/ThemeToggle.cjs.map +1 -1
  255. package/dist/components/ui/ThemeToggle.js +15 -18
  256. package/dist/components/ui/ThemeToggle.js.map +1 -1
  257. package/dist/components/ui/TimeDisplay.cjs +1 -1
  258. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  259. package/dist/components/ui/TimeDisplay.js +12 -12
  260. package/dist/components/ui/TimeDisplay.js.map +1 -1
  261. package/dist/components/ui/TimeRangePicker.cjs +1 -1
  262. package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
  263. package/dist/components/ui/TimeRangePicker.d.ts +12 -1
  264. package/dist/components/ui/TimeRangePicker.js +136 -113
  265. package/dist/components/ui/TimeRangePicker.js.map +1 -1
  266. package/dist/components/ui/Timeline.cjs.map +1 -1
  267. package/dist/components/ui/Timeline.d.ts +4 -4
  268. package/dist/components/ui/Timeline.js.map +1 -1
  269. package/dist/components/ui/TimelineChart.cjs +2 -2
  270. package/dist/components/ui/TimelineChart.cjs.map +1 -1
  271. package/dist/components/ui/TimelineChart.d.ts +1 -0
  272. package/dist/components/ui/TimelineChart.js +131 -137
  273. package/dist/components/ui/TimelineChart.js.map +1 -1
  274. package/dist/components/ui/TraceSpanInspector.cjs +1 -1
  275. package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
  276. package/dist/components/ui/TraceSpanInspector.js +43 -46
  277. package/dist/components/ui/TraceSpanInspector.js.map +1 -1
  278. package/dist/components/ui/TraceTree.cjs +1 -1
  279. package/dist/components/ui/TraceTree.cjs.map +1 -1
  280. package/dist/components/ui/TraceTree.d.ts +5 -1
  281. package/dist/components/ui/TraceTree.js +98 -97
  282. package/dist/components/ui/TraceTree.js.map +1 -1
  283. package/dist/components/ui/TrajectoryStep.cjs +2 -1
  284. package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
  285. package/dist/components/ui/TrajectoryStep.js +64 -43
  286. package/dist/components/ui/TrajectoryStep.js.map +1 -1
  287. package/dist/components/ui/UploadQueue.cjs +1 -1
  288. package/dist/components/ui/UploadQueue.cjs.map +1 -1
  289. package/dist/components/ui/UploadQueue.js +59 -70
  290. package/dist/components/ui/UploadQueue.js.map +1 -1
  291. package/dist/components/ui/authValidation.cjs +1 -1
  292. package/dist/components/ui/authValidation.cjs.map +1 -1
  293. package/dist/components/ui/authValidation.d.ts +2 -2
  294. package/dist/components/ui/authValidation.js +4 -5
  295. package/dist/components/ui/authValidation.js.map +1 -1
  296. package/dist/components/ui/classifyContent.cjs +3 -3
  297. package/dist/components/ui/classifyContent.cjs.map +1 -1
  298. package/dist/components/ui/classifyContent.d.ts +2 -1
  299. package/dist/components/ui/classifyContent.js +52 -54
  300. package/dist/components/ui/classifyContent.js.map +1 -1
  301. package/dist/components/ui/relativeTime.cjs +1 -1
  302. package/dist/components/ui/relativeTime.cjs.map +1 -1
  303. package/dist/components/ui/relativeTime.d.ts +5 -3
  304. package/dist/components/ui/relativeTime.js +15 -6
  305. package/dist/components/ui/relativeTime.js.map +1 -1
  306. package/dist/components/ui/useColumnWidths.cjs +1 -1
  307. package/dist/components/ui/useColumnWidths.cjs.map +1 -1
  308. package/dist/components/ui/useColumnWidths.d.ts +6 -1
  309. package/dist/components/ui/useColumnWidths.js +139 -123
  310. package/dist/components/ui/useColumnWidths.js.map +1 -1
  311. package/dist/hooks/popoverOverflow.cjs +2 -0
  312. package/dist/hooks/popoverOverflow.cjs.map +1 -0
  313. package/dist/hooks/popoverOverflow.d.ts +8 -0
  314. package/dist/hooks/popoverOverflow.js +9 -0
  315. package/dist/hooks/popoverOverflow.js.map +1 -0
  316. package/dist/hooks/useDialogPopover.cjs +2 -0
  317. package/dist/hooks/useDialogPopover.cjs.map +1 -0
  318. package/dist/hooks/useDialogPopover.d.ts +23 -0
  319. package/dist/hooks/useDialogPopover.js +48 -0
  320. package/dist/hooks/useDialogPopover.js.map +1 -0
  321. package/dist/hooks/useMenuPopover.cjs +1 -1
  322. package/dist/hooks/useMenuPopover.cjs.map +1 -1
  323. package/dist/hooks/useMenuPopover.d.ts +0 -8
  324. package/dist/hooks/useMenuPopover.js +17 -22
  325. package/dist/hooks/useMenuPopover.js.map +1 -1
  326. package/dist/hooks/useSavedQueries.cjs +1 -1
  327. package/dist/hooks/useSavedQueries.cjs.map +1 -1
  328. package/dist/hooks/useSavedQueries.js +29 -28
  329. package/dist/hooks/useSavedQueries.js.map +1 -1
  330. package/dist/index.d.ts +1 -1
  331. package/dist/layouts/shell/AegisShell.cjs +1 -1
  332. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  333. package/dist/layouts/shell/AegisShell.js +58 -59
  334. package/dist/layouts/shell/AegisShell.js.map +1 -1
  335. package/dist/layouts/shell/AppSwitcher.cjs +1 -1
  336. package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
  337. package/dist/layouts/shell/AppSwitcher.js +53 -36
  338. package/dist/layouts/shell/AppSwitcher.js.map +1 -1
  339. package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
  340. package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
  341. package/dist/layouts/shell/AuthRequiredCard.js +24 -22
  342. package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
  343. package/dist/layouts/shell/RouteErrorBoundary.cjs +1 -1
  344. package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -1
  345. package/dist/layouts/shell/RouteErrorBoundary.d.ts +4 -1
  346. package/dist/layouts/shell/RouteErrorBoundary.js +15 -10
  347. package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -1
  348. package/dist/layouts/shell/ShellInboxPage.cjs +1 -1
  349. package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -1
  350. package/dist/layouts/shell/ShellInboxPage.js +17 -16
  351. package/dist/layouts/shell/ShellInboxPage.js.map +1 -1
  352. package/dist/layouts/shell/ShellNotificationBell.cjs +1 -1
  353. package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -1
  354. package/dist/layouts/shell/ShellNotificationBell.js +20 -14
  355. package/dist/layouts/shell/ShellNotificationBell.js.map +1 -1
  356. package/dist/layouts/shell/TopHeader.cjs +1 -1
  357. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  358. package/dist/layouts/shell/TopHeader.js +74 -74
  359. package/dist/layouts/shell/TopHeader.js.map +1 -1
  360. package/dist/layouts/shell/useShellUser.cjs +1 -1
  361. package/dist/layouts/shell/useShellUser.cjs.map +1 -1
  362. package/dist/layouts/shell/useShellUser.js +15 -13
  363. package/dist/layouts/shell/useShellUser.js.map +1 -1
  364. package/dist/lib/breakAtSeparators.cjs +2 -0
  365. package/dist/lib/breakAtSeparators.cjs.map +1 -0
  366. package/dist/lib/breakAtSeparators.d.ts +6 -0
  367. package/dist/lib/breakAtSeparators.js +10 -0
  368. package/dist/lib/breakAtSeparators.js.map +1 -0
  369. package/dist/lib/chart.cjs +1 -1
  370. package/dist/lib/chart.cjs.map +1 -1
  371. package/dist/lib/chart.d.ts +5 -7
  372. package/dist/lib/chart.js +49 -34
  373. package/dist/lib/chart.js.map +1 -1
  374. package/dist/lib/timeRange.cjs +1 -1
  375. package/dist/lib/timeRange.cjs.map +1 -1
  376. package/dist/lib/timeRange.d.ts +14 -4
  377. package/dist/lib/timeRange.js +41 -40
  378. package/dist/lib/timeRange.js.map +1 -1
  379. package/dist/locale/strings.cjs +1 -1
  380. package/dist/locale/strings.cjs.map +1 -1
  381. package/dist/locale/strings.d.ts +247 -2
  382. package/dist/locale/strings.js +562 -37
  383. package/dist/locale/strings.js.map +1 -1
  384. package/dist/notifications/notificationContext.cjs.map +1 -1
  385. package/dist/notifications/notificationContext.d.ts +12 -2
  386. package/dist/notifications/notificationContext.js.map +1 -1
  387. package/dist/style.css +1 -1
  388. package/dist/theme/antdTheme.cjs +1 -1
  389. package/dist/theme/antdTheme.cjs.map +1 -1
  390. package/dist/theme/antdTheme.js +52 -29
  391. package/dist/theme/antdTheme.js.map +1 -1
  392. package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
  393. package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
  394. package/dist/transports/agentm/AgentmChannelProvider.js +66 -61
  395. package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
  396. package/package.json +1 -1
@@ -1,74 +1,74 @@
1
- import { jsxs as r, Fragment as C, jsx as e } from "react/jsx-runtime";
2
- import { Tooltip as S } from "antd";
1
+ import { jsxs as i, Fragment as S, jsx as e } from "react/jsx-runtime";
2
+ import { Tooltip as A } from "antd";
3
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";
4
+ import { Avatar as U } from "../../components/ui/Avatar.js";
5
+ import { Chip as B } from "../../components/ui/Chip.js";
6
6
  import { DropdownMenu as I } from "../../components/ui/DropdownMenu.js";
7
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";
8
+ import { AppSwitcher as W } from "./AppSwitcher.js";
9
+ import { ShellNotificationBell as z } from "./ShellNotificationBell.js";
10
+ import { useStrings as N } from "../../locale/useStrings.js";
11
+ import { useEnvironmentManifest as D } from "./environments/useEnvironment.js";
12
12
  function Z({
13
- brand: a,
14
- apps: n,
15
- activeAppId: s,
16
- onAppSwitch: o,
13
+ brand: s,
14
+ apps: a,
15
+ activeAppId: n,
16
+ onAppSwitch: l,
17
17
  appSwitcher: h = !0,
18
- scrolled: l = !1,
19
- user: t,
20
- headerCenter: N,
21
- headerActions: w,
18
+ scrolled: t = !1,
19
+ user: o,
20
+ headerCenter: w,
21
+ headerActions: b,
22
22
  inboxPath: g,
23
23
  onMobileMenuToggle: m,
24
24
  mobileMenuOpen: _ = !1,
25
- menuToggleRef: b,
26
- showMobileMenu: k,
27
- sidebarCollapsible: x,
25
+ menuToggleRef: k,
26
+ showMobileMenu: x,
27
+ sidebarCollapsible: y,
28
28
  sidebarCollapsed: c,
29
29
  onSidebarToggle: p,
30
- inlineSlotRef: y,
30
+ inlineSlotRef: C,
31
31
  inlineSlotActive: u,
32
32
  agentPanelOpen: d = !1,
33
33
  onAgentPanelToggle: f
34
34
  }) {
35
- const i = z(), v = /* @__PURE__ */ r(C, { children: [
36
- a.logo && /* @__PURE__ */ e("span", { className: "aegis-shell__brand-logo", children: a.logo }),
37
- /* @__PURE__ */ e("span", { className: "aegis-shell__brand-name", children: a.name })
35
+ const r = N(), v = /* @__PURE__ */ i(S, { children: [
36
+ s.logo && /* @__PURE__ */ e("span", { className: "aegis-shell__brand-logo", children: s.logo }),
37
+ /* @__PURE__ */ e("span", { className: "aegis-shell__brand-name", children: s.name })
38
38
  ] });
39
- return /* @__PURE__ */ r(
39
+ return /* @__PURE__ */ i(
40
40
  "header",
41
41
  {
42
- className: l ? "aegis-shell__header aegis-shell__header--scrolled" : "aegis-shell__header",
42
+ className: t ? "aegis-shell__header aegis-shell__header--scrolled" : "aegis-shell__header",
43
43
  children: [
44
- /* @__PURE__ */ r("div", { className: "aegis-shell__header-left", children: [
45
- k && m && /* @__PURE__ */ e(
44
+ /* @__PURE__ */ i("div", { className: "aegis-shell__header-left", children: [
45
+ x && m && /* @__PURE__ */ e(
46
46
  "button",
47
47
  {
48
- ref: b,
48
+ ref: k,
49
49
  type: "button",
50
50
  className: "aegis-shell__menu-toggle",
51
51
  onClick: m,
52
- "aria-label": _ ? i.closeNavigation : i.openNavigation,
52
+ "aria-label": _ ? r.closeNavigation : r.openNavigation,
53
53
  "aria-expanded": _,
54
54
  children: /* @__PURE__ */ e("span", { className: "aegis-shell__menu-toggle-glyph", "aria-hidden": "true", children: "☰" })
55
55
  }
56
56
  ),
57
- x && p && /* @__PURE__ */ e(
57
+ y && p && /* @__PURE__ */ e(
58
58
  "button",
59
59
  {
60
60
  type: "button",
61
61
  className: "aegis-shell__sidebar-toggle",
62
62
  onClick: p,
63
- "aria-label": c ? i.showSidebar : i.hideSidebar,
63
+ "aria-label": c ? r.showSidebar : r.hideSidebar,
64
64
  "aria-pressed": c,
65
- title: c ? i.showSidebar : i.hideSidebar,
65
+ title: c ? r.showSidebar : r.hideSidebar,
66
66
  children: /* @__PURE__ */ e(
67
67
  "span",
68
68
  {
69
69
  className: "aegis-shell__sidebar-toggle-glyph",
70
70
  "aria-hidden": "true",
71
- children: /* @__PURE__ */ r(
71
+ children: /* @__PURE__ */ i(
72
72
  "svg",
73
73
  {
74
74
  width: "18",
@@ -90,44 +90,44 @@ function Z({
90
90
  }
91
91
  ),
92
92
  h ? /* @__PURE__ */ e(
93
- U,
93
+ W,
94
94
  {
95
- apps: n,
96
- activeAppId: s,
97
- onAppSwitch: o
95
+ apps: a,
96
+ activeAppId: n,
97
+ onAppSwitch: l
98
98
  }
99
99
  ) : null,
100
- a.href ? /* @__PURE__ */ e(E, { to: a.href, className: "aegis-shell__brand", children: v }) : /* @__PURE__ */ e("span", { className: "aegis-shell__brand", children: v })
100
+ s.href ? /* @__PURE__ */ e(E, { to: s.href, className: "aegis-shell__brand", children: v }) : /* @__PURE__ */ e("span", { className: "aegis-shell__brand", children: v })
101
101
  ] }),
102
102
  /* @__PURE__ */ e(
103
103
  "div",
104
104
  {
105
105
  className: u ? "aegis-shell__header-center aegis-shell__header-center--app" : "aegis-shell__header-center",
106
- ref: y,
106
+ ref: C,
107
107
  "data-aegis-inline-slot": "",
108
- children: !u && N
108
+ children: !u && w
109
109
  }
110
110
  ),
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 }),
111
+ /* @__PURE__ */ i("div", { className: "aegis-shell__header-right", children: [
112
+ /* @__PURE__ */ e(F, {}),
113
+ b,
114
+ g && /* @__PURE__ */ e(z, { inboxPath: g }),
115
+ o && /* @__PURE__ */ e(H, { user: o }),
116
116
  f && /* @__PURE__ */ e(
117
117
  "button",
118
118
  {
119
119
  type: "button",
120
120
  className: "aegis-shell__agent-toggle",
121
121
  onClick: f,
122
- "aria-label": d ? "Hide agent panel" : "Show agent panel",
122
+ "aria-label": d ? r.hideAgentPanel : r.showAgentPanel,
123
123
  "aria-pressed": d,
124
- title: d ? "Hide agent panel" : "Show agent panel",
124
+ title: d ? r.hideAgentPanel : r.showAgentPanel,
125
125
  children: /* @__PURE__ */ e(
126
126
  "span",
127
127
  {
128
128
  className: "aegis-shell__agent-toggle-glyph",
129
129
  "aria-hidden": "true",
130
- children: /* @__PURE__ */ r(
130
+ children: /* @__PURE__ */ i(
131
131
  "svg",
132
132
  {
133
133
  width: "18",
@@ -153,20 +153,20 @@ function Z({
153
153
  }
154
154
  );
155
155
  }
156
- function D() {
157
- const a = A();
156
+ function F() {
157
+ const s = N(), a = D();
158
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" })
159
+ return /* @__PURE__ */ e(A, { title: s.environmentsRetry(a.error.message), children: /* @__PURE__ */ e("span", { className: "aegis-shell__env-error", children: /* @__PURE__ */ i(B, { tone: "warning", onClick: a.retry, children: [
160
+ /* @__PURE__ */ e("span", { className: "aegis-shell__env-error-full", children: s.environmentsUnavailable }),
161
+ /* @__PURE__ */ e("span", { className: "aegis-shell__env-error-short", children: s.environmentsUnavailableShort })
162
162
  ] }) }) });
163
163
  if (a.status !== "ready")
164
164
  return null;
165
- const n = a.manifest.environments.map((s) => ({
166
- id: s.id,
167
- label: s.label,
168
- badge: s.badge,
169
- hint: s.baseUrl
165
+ const n = a.manifest.environments.map((l) => ({
166
+ id: l.id,
167
+ label: l.label,
168
+ badge: l.badge,
169
+ hint: l.baseUrl
170
170
  }));
171
171
  return /* @__PURE__ */ e(
172
172
  L,
@@ -178,34 +178,34 @@ function D() {
178
178
  }
179
179
  );
180
180
  }
181
- function F({ user: a }) {
182
- const n = j(), s = (a.menu ?? []).map((l) => {
183
- const t = l.to;
181
+ function H({ user: s }) {
182
+ const a = j(), n = (s.menu ?? []).map((t) => {
183
+ const o = t.to;
184
184
  return {
185
- key: l.key,
186
- label: l.label,
187
- onClick: t ? () => {
188
- n(t);
189
- } : l.onClick
185
+ key: t.key,
186
+ label: t.label,
187
+ onClick: o ? () => {
188
+ a(o);
189
+ } : t.onClick
190
190
  };
191
- }), o = a.avatar ?? (typeof a.name == "string" ? /* @__PURE__ */ e(
192
- B,
191
+ }), l = s.avatar ?? (typeof s.name == "string" ? /* @__PURE__ */ e(
192
+ U,
193
193
  {
194
- name: a.name,
194
+ name: s.name,
195
195
  size: "sm",
196
196
  className: "aegis-shell__user-initials"
197
197
  }
198
- ) : null), h = /* @__PURE__ */ r(
198
+ ) : null), h = /* @__PURE__ */ i(
199
199
  "span",
200
200
  {
201
- className: o ? "aegis-shell__user aegis-shell__user--badge" : "aegis-shell__user",
201
+ className: l ? "aegis-shell__user aegis-shell__user--badge" : "aegis-shell__user",
202
202
  children: [
203
- o,
204
- /* @__PURE__ */ e("span", { className: "aegis-shell__user-name", children: a.name })
203
+ l,
204
+ /* @__PURE__ */ e("span", { className: "aegis-shell__user-name", children: s.name })
205
205
  ]
206
206
  }
207
207
  );
208
- return s.length === 0 ? h : /* @__PURE__ */ e(I, { trigger: h, items: s });
208
+ return n.length === 0 ? h : /* @__PURE__ */ e(I, { trigger: h, items: n });
209
209
  }
210
210
  export {
211
211
  Z as TopHeader
@@ -1 +1 @@
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,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,oBAAAC;AACF,GAAiC;AAC/B,QAAMC,IAAUC,EAAA,GACVC,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAzB,EAAM,QACL,gBAAA0B,EAAC,QAAA,EAAK,WAAU,2BAA2B,YAAM,MAAK;AAAA,IAExD,gBAAAA,EAAC,QAAA,EAAK,WAAU,2BAA2B,YAAM,KAAA,CAAK;AAAA,EAAA,GACxD;AAGF,SACE,gBAAAF;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WACEnB,IACI,sDACA;AAAA,MAGN,UAAA;AAAA,QAAA,gBAAAmB,EAAC,OAAA,EAAI,WAAU,4BACZ,UAAA;AAAA,UAAAX,KAAkBH,KACjB,gBAAAgB;AAAA,YAAC;AAAA,YAAA;A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MACb,IACAD,EAAM;AAAA,IAAA;AAAA,EAEd,CAAC,GACKE,IACJtC,EAAK,WACJ,OAAOA,EAAK,QAAS,WACpB,gBAAAoB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,MAAMvC,EAAK;AAAA,MACX,MAAK;AAAA,MACL,WAAU;AAAA,IAAA;AAAA,EAAA,IAEV,OACAwC,IACJ,gBAAAtB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WACEoB,IACI,+CACA;AAAA,MAGL,UAAA;AAAA,QAAAA;AAAA,QACD,gBAAAlB,EAAC,QAAA,EAAK,WAAU,0BAA0B,YAAK,KAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxD,SAAIe,EAAM,WAAW,IACZK,IAEF,gBAAApB,EAACqB,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 ? strings.hideAgentPanel : strings.showAgentPanel\n }\n aria-pressed={agentPanelOpen}\n title={\n agentPanelOpen ? strings.hideAgentPanel : strings.showAgentPanel\n }\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 strings = useStrings();\n const state = useEnvironmentManifest();\n if (state.status === 'error') {\n return (\n <Tooltip title={strings.environmentsRetry(state.error.message)}>\n <span className=\"aegis-shell__env-error\">\n <Chip tone=\"warning\" onClick={state.retry}>\n <span className=\"aegis-shell__env-error-full\">\n {strings.environmentsUnavailable}\n </span>\n <span className=\"aegis-shell__env-error-short\">\n {strings.environmentsUnavailableShort}\n </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,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,oBAAAC;AACF,GAAiC;AAC/B,QAAMC,IAAUC,EAAA,GACVC,IACJ,gBAAAC,EAAAC,GAAA,EACG,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;AACF,SACE,gBAAAX;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,SAAAF;AAAA,MACA,WAAWJ,EAAM;AAAA,MACjB,UAAUA,EAAM;AAAA,IAAA;AAAA,EAAA;AAGtB;AAEA,SAASD,EAAS,EAAE,MAAAzB,KAA2C;AAC7D,QAAMiC,IAAWC,EAAA,GACXC,KAAyBnC,EAAK,QAAQ,CAAA,GAAI,IAAI,CAACoC,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,IACJtC,EAAK,WACJ,OAAOA,EAAK,QAAS,WACpB,gBAAAoB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,MAAMvC,EAAK;AAAA,MACX,MAAK;AAAA,MACL,WAAU;AAAA,IAAA;AAAA,EAAA,IAEV,OACAwC,IACJ,gBAAAtB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WACEoB,IACI,+CACA;AAAA,MAGL,UAAA;AAAA,QAAAA;AAAA,QACD,gBAAAlB,EAAC,QAAA,EAAK,WAAU,0BAA0B,YAAK,KAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxD,SAAIe,EAAM,WAAW,IACZK,IAEF,gBAAApB,EAACqB,GAAA,EAAa,SAAAD,GAAkB,OAAAL,EAAA,CAAc;AACvD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function s(t,n,e){return o.useMemo(()=>{if(t)return t;if(e.status!=="authenticated"||!e.user)return;const r=[...n??[]],{signOut:i}=e;return i&&r.push({key:"sign-out",label:"Sign out",onClick:()=>{i()}}),{name:e.user.name,menu:r}},[t,n,e])}exports.useShellUser=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("../../locale/useStrings.cjs");function c(t,n,e){const{signOut:s}=o.useStrings();return u.useMemo(()=>{if(t)return t;if(e.status!=="authenticated"||!e.user)return;const r=[...n??[]],{signOut:i}=e;return i&&r.push({key:"sign-out",label:s,onClick:()=>{i()}}),{name:e.user.name,menu:r}},[t,n,e,s])}exports.useShellUser=c;
2
2
  //# sourceMappingURL=useShellUser.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"useShellUser.cjs","sources":["../../../src/layouts/shell/useShellUser.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport type { AegisUser, AegisUserMenuItem } from './types';\n\n/**\n * The header's user: `user` when the host passes one, else the signed-in\n * user from the auth context with `userMenu` plus a Sign out entry.\n */\nexport function useShellUser(\n user: AegisUser | undefined,\n userMenu: AegisUserMenuItem[] | undefined,\n auth: AuthContextValue<AegisAuthUser>,\n): AegisUser | undefined {\n return useMemo(() => {\n if (user) {\n return user;\n }\n if (auth.status !== 'authenticated' || !auth.user) {\n return undefined;\n }\n const menu = [...(userMenu ?? [])];\n const { signOut } = auth;\n if (signOut) {\n menu.push({\n key: 'sign-out',\n label: 'Sign out',\n onClick: () => {\n void signOut();\n },\n });\n }\n return { name: auth.user.name, menu };\n }, [user, userMenu, auth]);\n}\n"],"names":["useShellUser","user","userMenu","auth","useMemo","menu","signOut"],"mappings":"yGASO,SAASA,EACdC,EACAC,EACAC,EACuB,CACvB,OAAOC,EAAAA,QAAQ,IAAM,CACnB,GAAIH,EACF,OAAOA,EAET,GAAIE,EAAK,SAAW,iBAAmB,CAACA,EAAK,KAC3C,OAEF,MAAME,EAAO,CAAC,GAAIH,GAAY,EAAG,EAC3B,CAAE,QAAAI,GAAYH,EACpB,OAAIG,GACFD,EAAK,KAAK,CACR,IAAK,WACL,MAAO,WACP,QAAS,IAAM,CACRC,EAAA,CACP,CAAA,CACD,EAEI,CAAE,KAAMH,EAAK,KAAK,KAAM,KAAAE,CAAA,CACjC,EAAG,CAACJ,EAAMC,EAAUC,CAAI,CAAC,CAC3B"}
1
+ {"version":3,"file":"useShellUser.cjs","sources":["../../../src/layouts/shell/useShellUser.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport { useStrings } from '../../locale';\nimport type { AegisUser, AegisUserMenuItem } from './types';\n\n/**\n * The header's user: `user` when the host passes one, else the signed-in\n * user from the auth context with `userMenu` plus a Sign out entry.\n */\nexport function useShellUser(\n user: AegisUser | undefined,\n userMenu: AegisUserMenuItem[] | undefined,\n auth: AuthContextValue<AegisAuthUser>,\n): AegisUser | undefined {\n const { signOut: signOutLabel } = useStrings();\n return useMemo(() => {\n if (user) {\n return user;\n }\n if (auth.status !== 'authenticated' || !auth.user) {\n return undefined;\n }\n const menu = [...(userMenu ?? [])];\n const { signOut } = auth;\n if (signOut) {\n menu.push({\n key: 'sign-out',\n label: signOutLabel,\n onClick: () => {\n void signOut();\n },\n });\n }\n return { name: auth.user.name, menu };\n }, [user, userMenu, auth, signOutLabel]);\n}\n"],"names":["useShellUser","user","userMenu","auth","signOutLabel","useStrings","useMemo","menu","signOut"],"mappings":"kJAUO,SAASA,EACdC,EACAC,EACAC,EACuB,CACvB,KAAM,CAAE,QAASC,CAAA,EAAiBC,aAAA,EAClC,OAAOC,EAAAA,QAAQ,IAAM,CACnB,GAAIL,EACF,OAAOA,EAET,GAAIE,EAAK,SAAW,iBAAmB,CAACA,EAAK,KAC3C,OAEF,MAAMI,EAAO,CAAC,GAAIL,GAAY,EAAG,EAC3B,CAAE,QAAAM,GAAYL,EACpB,OAAIK,GACFD,EAAK,KAAK,CACR,IAAK,WACL,MAAOH,EACP,QAAS,IAAM,CACRI,EAAA,CACP,CAAA,CACD,EAEI,CAAE,KAAML,EAAK,KAAK,KAAM,KAAAI,CAAA,CACjC,EAAG,CAACN,EAAMC,EAAUC,EAAMC,CAAY,CAAC,CACzC"}
@@ -1,21 +1,23 @@
1
- import { useMemo as r } from "react";
2
- function u(n, t, e) {
3
- return r(() => {
4
- if (n)
5
- return n;
6
- if (e.status !== "authenticated" || !e.user)
1
+ import { useMemo as s } from "react";
2
+ import { useStrings as u } from "../../locale/useStrings.js";
3
+ function f(e, t, n) {
4
+ const { signOut: i } = u();
5
+ return s(() => {
6
+ if (e)
7
+ return e;
8
+ if (n.status !== "authenticated" || !n.user)
7
9
  return;
8
- const i = [...t ?? []], { signOut: o } = e;
9
- return o && i.push({
10
+ const o = [...t ?? []], { signOut: r } = n;
11
+ return r && o.push({
10
12
  key: "sign-out",
11
- label: "Sign out",
13
+ label: i,
12
14
  onClick: () => {
13
- o();
15
+ r();
14
16
  }
15
- }), { name: e.user.name, menu: i };
16
- }, [n, t, e]);
17
+ }), { name: n.user.name, menu: o };
18
+ }, [e, t, n, i]);
17
19
  }
18
20
  export {
19
- u as useShellUser
21
+ f as useShellUser
20
22
  };
21
23
  //# sourceMappingURL=useShellUser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useShellUser.js","sources":["../../../src/layouts/shell/useShellUser.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport type { AegisUser, AegisUserMenuItem } from './types';\n\n/**\n * The header's user: `user` when the host passes one, else the signed-in\n * user from the auth context with `userMenu` plus a Sign out entry.\n */\nexport function useShellUser(\n user: AegisUser | undefined,\n userMenu: AegisUserMenuItem[] | undefined,\n auth: AuthContextValue<AegisAuthUser>,\n): AegisUser | undefined {\n return useMemo(() => {\n if (user) {\n return user;\n }\n if (auth.status !== 'authenticated' || !auth.user) {\n return undefined;\n }\n const menu = [...(userMenu ?? [])];\n const { signOut } = auth;\n if (signOut) {\n menu.push({\n key: 'sign-out',\n label: 'Sign out',\n onClick: () => {\n void signOut();\n },\n });\n }\n return { name: auth.user.name, menu };\n }, [user, userMenu, auth]);\n}\n"],"names":["useShellUser","user","userMenu","auth","useMemo","menu","signOut"],"mappings":";AASO,SAASA,EACdC,GACAC,GACAC,GACuB;AACvB,SAAOC,EAAQ,MAAM;AACnB,QAAIH;AACF,aAAOA;AAET,QAAIE,EAAK,WAAW,mBAAmB,CAACA,EAAK;AAC3C;AAEF,UAAME,IAAO,CAAC,GAAIH,KAAY,EAAG,GAC3B,EAAE,SAAAI,MAAYH;AACpB,WAAIG,KACFD,EAAK,KAAK;AAAA,MACR,KAAK;AAAA,MACL,OAAO;AAAA,MACP,SAAS,MAAM;AACb,QAAKC,EAAA;AAAA,MACP;AAAA,IAAA,CACD,GAEI,EAAE,MAAMH,EAAK,KAAK,MAAM,MAAAE,EAAA;AAAA,EACjC,GAAG,CAACJ,GAAMC,GAAUC,CAAI,CAAC;AAC3B;"}
1
+ {"version":3,"file":"useShellUser.js","sources":["../../../src/layouts/shell/useShellUser.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport { useStrings } from '../../locale';\nimport type { AegisUser, AegisUserMenuItem } from './types';\n\n/**\n * The header's user: `user` when the host passes one, else the signed-in\n * user from the auth context with `userMenu` plus a Sign out entry.\n */\nexport function useShellUser(\n user: AegisUser | undefined,\n userMenu: AegisUserMenuItem[] | undefined,\n auth: AuthContextValue<AegisAuthUser>,\n): AegisUser | undefined {\n const { signOut: signOutLabel } = useStrings();\n return useMemo(() => {\n if (user) {\n return user;\n }\n if (auth.status !== 'authenticated' || !auth.user) {\n return undefined;\n }\n const menu = [...(userMenu ?? [])];\n const { signOut } = auth;\n if (signOut) {\n menu.push({\n key: 'sign-out',\n label: signOutLabel,\n onClick: () => {\n void signOut();\n },\n });\n }\n return { name: auth.user.name, menu };\n }, [user, userMenu, auth, signOutLabel]);\n}\n"],"names":["useShellUser","user","userMenu","auth","signOutLabel","useStrings","useMemo","menu","signOut"],"mappings":";;AAUO,SAASA,EACdC,GACAC,GACAC,GACuB;AACvB,QAAM,EAAE,SAASC,EAAA,IAAiBC,EAAA;AAClC,SAAOC,EAAQ,MAAM;AACnB,QAAIL;AACF,aAAOA;AAET,QAAIE,EAAK,WAAW,mBAAmB,CAACA,EAAK;AAC3C;AAEF,UAAMI,IAAO,CAAC,GAAIL,KAAY,EAAG,GAC3B,EAAE,SAAAM,MAAYL;AACpB,WAAIK,KACFD,EAAK,KAAK;AAAA,MACR,KAAK;AAAA,MACL,OAAOH;AAAA,MACP,SAAS,MAAM;AACb,QAAKI,EAAA;AAAA,MACP;AAAA,IAAA,CACD,GAEI,EAAE,MAAML,EAAK,KAAK,MAAM,MAAAI,EAAA;AAAA,EACjC,GAAG,CAACN,GAAMC,GAAUC,GAAMC,CAAY,CAAC;AACzC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");function s(t){return typeof t!="string"?t:t.split(/(?<=[_./:-])/).flatMap((r,e)=>e===0?[r]:[o.jsx("wbr",{},e),r])}exports.breakAtSeparators=s;
2
+ //# sourceMappingURL=breakAtSeparators.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakAtSeparators.cjs","sources":["../../src/lib/breakAtSeparators.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * A text label with a line-break opportunity after each `_ . - / :`, so an\n * id such as `no_destructive_ddl` wraps between its words, never inside one.\n */\nexport function breakAtSeparators(label: ReactNode): ReactNode {\n if (typeof label !== 'string') {\n return label;\n }\n return label\n .split(/(?<=[_./:-])/)\n .flatMap((part, index) =>\n index === 0 ? [part] : [<wbr key={index} />, part],\n );\n}\n"],"names":["breakAtSeparators","label","part","index","jsx"],"mappings":"qHAMO,SAASA,EAAkBC,EAA6B,CAC7D,OAAI,OAAOA,GAAU,SACZA,EAEFA,EACJ,MAAM,cAAc,EACpB,QAAQ,CAACC,EAAMC,IACdA,IAAU,EAAI,CAACD,CAAI,EAAI,CAACE,EAAAA,IAAC,MAAA,GAASD,CAAO,EAAID,CAAI,CAAA,CAEvD"}
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * A text label with a line-break opportunity after each `_ . - / :`, so an
4
+ * id such as `no_destructive_ddl` wraps between its words, never inside one.
5
+ */
6
+ export declare function breakAtSeparators(label: ReactNode): ReactNode;
@@ -0,0 +1,10 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ function i(r) {
3
+ return typeof r != "string" ? r : r.split(/(?<=[_./:-])/).flatMap(
4
+ (t, o) => o === 0 ? [t] : [/* @__PURE__ */ f("wbr", {}, o), t]
5
+ );
6
+ }
7
+ export {
8
+ i as breakAtSeparators
9
+ };
10
+ //# sourceMappingURL=breakAtSeparators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakAtSeparators.js","sources":["../../src/lib/breakAtSeparators.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * A text label with a line-break opportunity after each `_ . - / :`, so an\n * id such as `no_destructive_ddl` wraps between its words, never inside one.\n */\nexport function breakAtSeparators(label: ReactNode): ReactNode {\n if (typeof label !== 'string') {\n return label;\n }\n return label\n .split(/(?<=[_./:-])/)\n .flatMap((part, index) =>\n index === 0 ? [part] : [<wbr key={index} />, part],\n );\n}\n"],"names":["breakAtSeparators","label","part","index","jsx"],"mappings":";AAMO,SAASA,EAAkBC,GAA6B;AAC7D,SAAI,OAAOA,KAAU,WACZA,IAEFA,EACJ,MAAM,cAAc,EACpB;AAAA,IAAQ,CAACC,GAAMC,MACdA,MAAU,IAAI,CAACD,CAAI,IAAI,CAAC,gBAAAE,EAAC,OAAA,IAASD,CAAO,GAAID,CAAI;AAAA,EAAA;AAEvD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(t){return{solid:void 0,dashed:"var(--space-2) var(--space-1)",dotted:"var(--size-hairline) var(--space-1)"}[t]}const M={seq:"var(--data-seq)","cat-1":"var(--data-cat-1)","cat-2":"var(--data-cat-2)","cat-3":"var(--data-cat-3)","cat-4":"var(--data-cat-4)","cat-5":"var(--data-cat-5)","cat-6":"var(--data-cat-6)",unknown:"var(--bg-muted)"};function m(t){return t.startsWith("var(")?t:M[t]}function f(t,n){const a=Math.min(0,...t),e=n??Math.max(0,...t);return e<=a?[a,a+1]:[a,e]}function h(t){if(!(t>0)||!Number.isFinite(t))return 1;const n=10**Math.floor(Math.log10(t)),a=t/n;return(a<=1?1:a<=2?2:a<=5?5:10)*n}const v=50;function p(t,n,a=5){if(!(n>t))return[];const e=h((n-t)/a),s=1e-9,u=Math.ceil(t/e-s),d=Math.floor(n/e+s),l=Math.max(0,-Math.floor(Math.log10(e))),r=[];for(let c=u;c<=d&&r.length<v;c+=1){const o=Number((c*e).toFixed(l));r.push(o===0?0:o)}return r}const i=.12;function S(t,n,a){const e=1+i*Math.max(a-1,0);return Math.min(1,Math.max(0,t*e-i*n))}function T(t,n,a){return Math.min(1,Math.max(0,(t-n)/(a-n)))}exports.chartColorValue=m;exports.chartLineDash=g;exports.niceStep=h;exports.niceTicks=p;exports.stageProgress=T;exports.staggeredProgress=S;exports.zeroAnchoredDomain=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function v(t){return{solid:void 0,dashed:"var(--space-2) var(--space-1)",dotted:"var(--size-hairline) var(--space-1)"}[t]}const b={seq:"var(--data-seq)","cat-1":"var(--data-cat-1)","cat-2":"var(--data-cat-2)","cat-3":"var(--data-cat-3)","cat-4":"var(--data-cat-4)","cat-5":"var(--data-cat-5)","cat-6":"var(--data-cat-6)",unknown:"var(--bg-muted)"};function x(t){return t.startsWith("var(")?t:b[t]}function S(t,a){const e=Math.min(0,...t),n=a??Math.max(0,...t);return n<=e?[e,e+1]:[e,n]}function N(t){const a=Math.floor(Math.log10(t)),e=t/10**a;return e<=1?{digit:1,exponent:a}:e<=2?{digit:2,exponent:a}:e<=5?{digit:5,exponent:a}:{digit:1,exponent:a+1}}const T=50;function A(t,a,e=5){if(!(a>t)||!Number.isFinite(t)||!Number.isFinite(a))return[];const n=(a/2-t/2)/e*2;if(!(n>0)||!Number.isFinite(n))return[];const M=Math.max(Math.abs(t),Math.abs(a))*Number.EPSILON,{digit:h,exponent:d}=N(Math.max(n,M)),i=r=>+`${String(BigInt(r)*BigInt(h))}e${String(d)}`,g=i(1);if(!Number.isFinite(g))return[];const m=r=>{const[p,f]=r.toExponential().split("e");return+`${p}e${String(Number(f)-d)}`/h},o=g*1e-9;let s=Math.floor(m(t));for(;i(s-1)>=t-o;)s-=1;for(;i(s)<t-o;)s+=1;let c=Math.ceil(m(a));for(;i(c+1)<=a+o;)c+=1;for(;i(c)>a+o;)c-=1;const u=[];for(let r=s;r<=c&&u.length<T;r+=1)u.push(i(r));return u}const l=.12;function P(t,a,e){const n=1+l*Math.max(e-1,0);return Math.min(1,Math.max(0,t*n-l*a))}function k(t,a,e){return Math.min(1,Math.max(0,(t-a)/(e-a)))}exports.chartColorValue=x;exports.chartLineDash=v;exports.niceTicks=A;exports.stageProgress=k;exports.staggeredProgress=P;exports.zeroAnchoredDomain=S;
2
2
  //# sourceMappingURL=chart.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart.cjs","sources":["../../src/lib/chart.ts"],"sourcesContent":["/** Colours of the data palette in theme.css. */\nexport type ChartPaletteColor =\n | 'seq'\n | 'cat-1'\n | 'cat-2'\n | 'cat-3'\n | 'cat-4'\n | 'cat-5'\n | 'cat-6'\n | 'unknown';\n\n/**\n * How a chart colours a series: a palette colour (`seq` for one\n * magnitude, `cat-1`…`cat-6` to tell series apart, `unknown` a neutral\n * fill for a share not classified yet), or a `var(…)` reference to a\n * token, such as a `--series-*` vendor colour, so one vendor keeps its\n * colour on every chart.\n */\nexport type ChartColor = ChartPaletteColor | `var(--${string})`;\n\nexport type ChartLineStyle = 'solid' | 'dashed' | 'dotted';\n\nexport function chartLineDash(style: ChartLineStyle): string | undefined {\n return {\n solid: undefined,\n dashed: 'var(--space-2) var(--space-1)',\n dotted: 'var(--size-hairline) var(--space-1)',\n }[style];\n}\n\nconst PALETTE_VALUES: Record<ChartPaletteColor, string> = {\n seq: 'var(--data-seq)',\n 'cat-1': 'var(--data-cat-1)',\n 'cat-2': 'var(--data-cat-2)',\n 'cat-3': 'var(--data-cat-3)',\n 'cat-4': 'var(--data-cat-4)',\n 'cat-5': 'var(--data-cat-5)',\n 'cat-6': 'var(--data-cat-6)',\n unknown: 'var(--bg-muted)',\n};\n\n/** The CSS colour of a chart colour. */\nexport function chartColorValue(color: ChartColor): string {\n return color.startsWith('var(')\n ? color\n : PALETTE_VALUES[color as ChartPaletteColor];\n}\n\n/**\n * The span an axis covers: from 0 (or the smallest value, when negative)\n * to `max` when given, else to the largest value. A span of all zeros\n * becomes [0, 1] so the scale still divides.\n */\nexport function zeroAnchoredDomain(\n values: number[],\n max?: number,\n): [number, number] {\n const lo = Math.min(0, ...values);\n const hi = max ?? Math.max(0, ...values);\n return hi <= lo ? [lo, lo + 1] : [lo, hi];\n}\n\n/** The smallest 1, 2 or 5 × 10ⁿ step not below `raw`. */\nexport function niceStep(raw: number): number {\n if (!(raw > 0) || !Number.isFinite(raw)) {\n return 1;\n }\n const base = 10 ** Math.floor(Math.log10(raw));\n const normalized = raw / base;\n const nice =\n normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;\n return nice * base;\n}\n\nconst MAX_TICKS = 50;\n\n/**\n * Round values from `lo` to `hi`, about `count` of them. Ticks are\n * computed by index rather than by repeated addition, so a span far from\n * zero (nanosecond timestamps) neither drifts nor stalls, and each is\n * rounded to the step's decimals, so 0.6 stays 0.6 and an end that is a\n * multiple of the step is a tick.\n */\nexport function niceTicks(lo: number, hi: number, count = 5): number[] {\n if (!(hi > lo)) {\n return [];\n }\n const step = niceStep((hi - lo) / count);\n // Absorbs division error such as 0.6 / 0.2 = 2.9999999999999996.\n const epsilon = 1e-9;\n const first = Math.ceil(lo / step - epsilon);\n const last = Math.floor(hi / step + epsilon);\n const decimals = Math.max(0, -Math.floor(Math.log10(step)));\n const ticks: number[] = [];\n for (let i = first; i <= last && ticks.length < MAX_TICKS; i += 1) {\n const tick = Number((i * step).toFixed(decimals));\n ticks.push(tick === 0 ? 0 : tick);\n }\n return ticks;\n}\n\n/** How far later rows lag behind the first, as a share of the draw. */\nconst STAGGER = 0.12;\n\n/**\n * The share of row `index` (of `count`) that is drawn when the chart as a\n * whole is `progress` of the way in: rows start one after another and\n * all finish at 1.\n */\nexport function staggeredProgress(\n progress: number,\n index: number,\n count: number,\n): number {\n const span = 1 + STAGGER * Math.max(count - 1, 0);\n return Math.min(1, Math.max(0, progress * span - STAGGER * index));\n}\n\n/**\n * Where `progress` is within one stage, `from` to `to`, of a chart's draw:\n * 0 before the stage, 1 after it.\n */\nexport function stageProgress(\n progress: number,\n from: number,\n to: number,\n): number {\n return Math.min(1, Math.max(0, (progress - from) / (to - from)));\n}\n"],"names":["chartLineDash","style","PALETTE_VALUES","chartColorValue","color","zeroAnchoredDomain","values","max","lo","hi","niceStep","raw","base","normalized","MAX_TICKS","niceTicks","count","step","epsilon","first","last","decimals","ticks","i","tick","STAGGER","staggeredProgress","progress","index","span","stageProgress","from","to"],"mappings":"gFAsBO,SAASA,EAAcC,EAA2C,CACvE,MAAO,CACL,MAAO,OACP,OAAQ,gCACR,OAAQ,qCAAA,EACRA,CAAK,CACT,CAEA,MAAMC,EAAoD,CACxD,IAAK,kBACL,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,iBACX,EAGO,SAASC,EAAgBC,EAA2B,CACzD,OAAOA,EAAM,WAAW,MAAM,EAC1BA,EACAF,EAAeE,CAA0B,CAC/C,CAOO,SAASC,EACdC,EACAC,EACkB,CAClB,MAAMC,EAAK,KAAK,IAAI,EAAG,GAAGF,CAAM,EAC1BG,EAAKF,GAAO,KAAK,IAAI,EAAG,GAAGD,CAAM,EACvC,OAAOG,GAAMD,EAAK,CAACA,EA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chart.cjs","sources":["../../src/lib/chart.ts"],"sourcesContent":["/** Colours of the data palette in theme.css. */\nexport type ChartPaletteColor =\n | 'seq'\n | 'cat-1'\n | 'cat-2'\n | 'cat-3'\n | 'cat-4'\n | 'cat-5'\n | 'cat-6'\n | 'unknown';\n\n/**\n * How a chart colours a series: a palette colour (`seq` for one\n * magnitude, `cat-1`…`cat-6` to tell series apart, `unknown` a neutral\n * fill for a share not classified yet), or a `var(…)` reference to a\n * token, such as a `--series-*` vendor colour, so one vendor keeps its\n * colour on every chart.\n */\nexport type ChartColor = ChartPaletteColor | `var(--${string})`;\n\nexport type ChartLineStyle = 'solid' | 'dashed' | 'dotted';\n\nexport function chartLineDash(style: ChartLineStyle): string | undefined {\n return {\n solid: undefined,\n dashed: 'var(--space-2) var(--space-1)',\n dotted: 'var(--size-hairline) var(--space-1)',\n }[style];\n}\n\nconst PALETTE_VALUES: Record<ChartPaletteColor, string> = {\n seq: 'var(--data-seq)',\n 'cat-1': 'var(--data-cat-1)',\n 'cat-2': 'var(--data-cat-2)',\n 'cat-3': 'var(--data-cat-3)',\n 'cat-4': 'var(--data-cat-4)',\n 'cat-5': 'var(--data-cat-5)',\n 'cat-6': 'var(--data-cat-6)',\n unknown: 'var(--bg-muted)',\n};\n\n/** The CSS colour of a chart colour. */\nexport function chartColorValue(color: ChartColor): string {\n return color.startsWith('var(')\n ? color\n : PALETTE_VALUES[color as ChartPaletteColor];\n}\n\n/**\n * The span an axis covers: from 0 (or the smallest value, when negative)\n * to `max` when given, else to the largest value. A span of all zeros\n * becomes [0, 1] so the scale still divides.\n */\nexport function zeroAnchoredDomain(\n values: number[],\n max?: number,\n): [number, number] {\n const lo = Math.min(0, ...values);\n const hi = max ?? Math.max(0, ...values);\n return hi <= lo ? [lo, lo + 1] : [lo, hi];\n}\n\n/** The smallest 1, 2 or 5 × 10ⁿ step not below `raw`, as `digit × 10^exponent`. */\nfunction niceStep(raw: number): { digit: number; exponent: number } {\n const exponent = Math.floor(Math.log10(raw));\n const normalized = raw / 10 ** exponent;\n return normalized <= 1\n ? { digit: 1, exponent }\n : normalized <= 2\n ? { digit: 2, exponent }\n : normalized <= 5\n ? { digit: 5, exponent }\n : { digit: 1, exponent: exponent + 1 };\n}\n\nconst MAX_TICKS = 50;\n\n/**\n * Round values from `lo` to `hi`, about `count` of them. Each tick is read\n * from its decimal, such as `3e-1`, so it is the double nearest that\n * decimal: 0.6 stays 0.6, a span far from zero (nanosecond timestamps)\n * neither drifts nor stalls, and an end that is a multiple of the step is\n * a tick however many steps it lies from zero.\n */\nexport function niceTicks(lo: number, hi: number, count = 5): number[] {\n if (!(hi > lo) || !Number.isFinite(lo) || !Number.isFinite(hi)) {\n return [];\n }\n // Halving first keeps a span such as ±1e308 from overflowing; the\n // halves are exact, so any other span gives the same quotient.\n const raw = ((hi / 2 - lo / 2) / count) * 2;\n if (!(raw > 0) || !Number.isFinite(raw)) {\n return [];\n }\n // A step finer than the doubles near the ends would round neighbouring\n // ticks onto one value.\n const resolution = Math.max(Math.abs(lo), Math.abs(hi)) * Number.EPSILON;\n const { digit, exponent } = niceStep(Math.max(raw, resolution));\n const tickAt = (index: number): number =>\n Number(`${String(BigInt(index) * BigInt(digit))}e${String(exponent)}`);\n const step = tickAt(1);\n if (!Number.isFinite(step)) {\n return [];\n }\n // How many steps from zero `value` lies, scaled through its decimal: a\n // division by a subnormal step would be off by millions of steps.\n const stepsTo = (value: number): number => {\n const [mantissa, power] = value.toExponential().split('e');\n return Number(`${mantissa}e${String(Number(power) - exponent)}`) / digit;\n };\n // Absorbs float error in an end, such as 0.1 * 3 = 0.30000000000000004.\n const slack = step * 1e-9;\n // The estimates can miss by a step or two when the step is an ulp or\n // two of the ends.\n let first = Math.floor(stepsTo(lo));\n while (tickAt(first - 1) >= lo - slack) {\n first -= 1;\n }\n while (tickAt(first) < lo - slack) {\n first += 1;\n }\n let last = Math.ceil(stepsTo(hi));\n while (tickAt(last + 1) <= hi + slack) {\n last += 1;\n }\n while (tickAt(last) > hi + slack) {\n last -= 1;\n }\n const ticks: number[] = [];\n for (let i = first; i <= last && ticks.length < MAX_TICKS; i += 1) {\n ticks.push(tickAt(i));\n }\n return ticks;\n}\n\n/** How far later rows lag behind the first, as a share of the draw. */\nconst STAGGER = 0.12;\n\n/**\n * The share of row `index` (of `count`) that is drawn when the chart as a\n * whole is `progress` of the way in: rows start one after another and\n * all finish at 1.\n */\nexport function staggeredProgress(\n progress: number,\n index: number,\n count: number,\n): number {\n const span = 1 + STAGGER * Math.max(count - 1, 0);\n return Math.min(1, Math.max(0, progress * span - STAGGER * index));\n}\n\n/**\n * Where `progress` is within one stage, `from` to `to`, of a chart's draw:\n * 0 before the stage, 1 after it.\n */\nexport function stageProgress(\n progress: number,\n from: number,\n to: number,\n): number {\n return Math.min(1, Math.max(0, (progress - from) / (to - from)));\n}\n"],"names":["chartLineDash","style","PALETTE_VALUES","chartColorValue","color","zeroAnchoredDomain","values","max","lo","hi","niceStep","raw","exponent","normalized","MAX_TICKS","niceTicks","count","resolution","digit","tickAt","index","step","stepsTo","value","mantissa","power","slack","first","last","ticks","i","STAGGER","staggeredProgress","progress","span","stageProgress","from","to"],"mappings":"gFAsBO,SAASA,EAAcC,EAA2C,CACvE,MAAO,CACL,MAAO,OACP,OAAQ,gCACR,OAAQ,qCAAA,EACRA,CAAK,CACT,CAEA,MAAMC,EAAoD,CACxD,IAAK,kBACL,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,oBACT,QAAS,iBACX,EAGO,SAASC,EAAgBC,EAA2B,CACzD,OAAOA,EAAM,WAAW,MAAM,EAC1BA,EACAF,EAAeE,CAA0B,CAC/C,CAOO,SAASC,EACdC,EACAC,EACkB,CAClB,MAAMC,EAAK,KAAK,IAAI,EAAG,GAAGF,CAAM,EAC1BG,EAAKF,GAAO,KAAK,IAAI,EAAG,GAAGD,CAAM,EACvC,OAAOG,GAAMD,EAAK,CAACA,EAAIA,EAAK,CAAC,EAAI,C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MAAML,EAAQd,CAAE,CAAC,EAClC,KAAOW,EAAOQ,EAAQ,CAAC,GAAKnB,EAAKkB,GAC/BC,GAAS,EAEX,KAAOR,EAAOQ,CAAK,EAAInB,EAAKkB,GAC1BC,GAAS,EAEX,IAAIC,EAAO,KAAK,KAAKN,EAAQb,CAAE,CAAC,EAChC,KAAOU,EAAOS,EAAO,CAAC,GAAKnB,EAAKiB,GAC9BE,GAAQ,EAEV,KAAOT,EAAOS,CAAI,EAAInB,EAAKiB,GACzBE,GAAQ,EAEV,MAAMC,EAAkB,CAAA,EACxB,QAASC,EAAIH,EAAOG,GAAKF,GAAQC,EAAM,OAASf,EAAWgB,GAAK,EAC9DD,EAAM,KAAKV,EAAOW,CAAC,CAAC,EAEtB,OAAOD,CACT,CAGA,MAAME,EAAU,IAOT,SAASC,EACdC,EACAb,EACAJ,EACQ,CACR,MAAMkB,EAAO,EAAIH,EAAU,KAAK,IAAIf,EAAQ,EAAG,CAAC,EAChD,OAAO,KAAK,IAAI,EAAG,KAAK,IAAI,EAAGiB,EAAWC,EAAOH,EAAUX,CAAK,CAAC,CACnE,CAMO,SAASe,EACdF,EACAG,EACAC,EACQ,CACR,OAAO,KAAK,IAAI,EAAG,KAAK,IAAI,GAAIJ,EAAWG,IAASC,EAAKD,EAAK,CAAC,CACjE"}
@@ -18,14 +18,12 @@ export declare function chartColorValue(color: ChartColor): string;
18
18
  * becomes [0, 1] so the scale still divides.
19
19
  */
20
20
  export declare function zeroAnchoredDomain(values: number[], max?: number): [number, number];
21
- /** The smallest 1, 2 or 5 × 10ⁿ step not below `raw`. */
22
- export declare function niceStep(raw: number): number;
23
21
  /**
24
- * Round values from `lo` to `hi`, about `count` of them. Ticks are
25
- * computed by index rather than by repeated addition, so a span far from
26
- * zero (nanosecond timestamps) neither drifts nor stalls, and each is
27
- * rounded to the step's decimals, so 0.6 stays 0.6 and an end that is a
28
- * multiple of the step is a tick.
22
+ * Round values from `lo` to `hi`, about `count` of them. Each tick is read
23
+ * from its decimal, such as `3e-1`, so it is the double nearest that
24
+ * decimal: 0.6 stays 0.6, a span far from zero (nanosecond timestamps)
25
+ * neither drifts nor stalls, and an end that is a multiple of the step is
26
+ * a tick however many steps it lies from zero.
29
27
  */
30
28
  export declare function niceTicks(lo: number, hi: number, count?: number): number[];
31
29
  /**