@lincyaw/aegis-ui 0.9.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (748) hide show
  1. package/dist/agent/ask/AskOverlay.cjs +3 -1
  2. package/dist/agent/ask/AskOverlay.cjs.map +1 -1
  3. package/dist/agent/ask/AskOverlay.d.ts +17 -1
  4. package/dist/agent/ask/AskOverlay.js +115 -58
  5. package/dist/agent/ask/AskOverlay.js.map +1 -1
  6. package/dist/agent/ask/AskPanel.cjs +1 -1
  7. package/dist/agent/ask/AskPanel.cjs.map +1 -1
  8. package/dist/agent/ask/AskPanel.d.ts +18 -3
  9. package/dist/agent/ask/AskPanel.js +147 -119
  10. package/dist/agent/ask/AskPanel.js.map +1 -1
  11. package/dist/agent/chat/chat.cjs +1 -1
  12. package/dist/agent/chat/chat.cjs.map +1 -1
  13. package/dist/agent/chat/chat.d.ts +1 -1
  14. package/dist/agent/chat/chat.js +3 -5
  15. package/dist/agent/chat/chat.js.map +1 -1
  16. package/dist/agent/chat/useAgentChat.cjs +1 -1
  17. package/dist/agent/chat/useAgentChat.cjs.map +1 -1
  18. package/dist/agent/chat/useAgentChat.d.ts +2 -0
  19. package/dist/agent/chat/useAgentChat.js +8 -4
  20. package/dist/agent/chat/useAgentChat.js.map +1 -1
  21. package/dist/agent/core/AegisRuntimeProvider.cjs.map +1 -1
  22. package/dist/agent/core/AegisRuntimeProvider.d.ts +2 -2
  23. package/dist/agent/core/AegisRuntimeProvider.js.map +1 -1
  24. package/dist/agent/core/hooks.cjs +1 -1
  25. package/dist/agent/core/hooks.cjs.map +1 -1
  26. package/dist/agent/core/hooks.js +21 -20
  27. package/dist/agent/core/hooks.js.map +1 -1
  28. package/dist/agent/core/runtime.cjs +1 -1
  29. package/dist/agent/core/runtime.cjs.map +1 -1
  30. package/dist/agent/core/runtime.d.ts +28 -9
  31. package/dist/agent/core/runtime.js +435 -268
  32. package/dist/agent/core/runtime.js.map +1 -1
  33. package/dist/agent/core/types.d.ts +65 -10
  34. package/dist/agent/index.d.ts +4 -3
  35. package/dist/commands/CommandProvider.cjs +1 -1
  36. package/dist/commands/CommandProvider.cjs.map +1 -1
  37. package/dist/commands/CommandProvider.js +33 -37
  38. package/dist/commands/CommandProvider.js.map +1 -1
  39. package/dist/commands/commandContext.cjs +1 -1
  40. package/dist/commands/commandContext.cjs.map +1 -1
  41. package/dist/commands/commandContext.d.ts +6 -6
  42. package/dist/commands/commandContext.js +3 -17
  43. package/dist/commands/commandContext.js.map +1 -1
  44. package/dist/commands/index.d.ts +1 -1
  45. package/dist/commands/useCommands.cjs +1 -1
  46. package/dist/commands/useCommands.cjs.map +1 -1
  47. package/dist/commands/useCommands.d.ts +4 -2
  48. package/dist/commands/useCommands.js +21 -5
  49. package/dist/commands/useCommands.js.map +1 -1
  50. package/dist/commands/useRegisterCommands.cjs +2 -1
  51. package/dist/commands/useRegisterCommands.cjs.map +1 -1
  52. package/dist/commands/useRegisterCommands.d.ts +3 -2
  53. package/dist/commands/useRegisterCommands.js +35 -8
  54. package/dist/commands/useRegisterCommands.js.map +1 -1
  55. package/dist/components/ui/AgentPanel.cjs +1 -1
  56. package/dist/components/ui/AgentPanel.cjs.map +1 -1
  57. package/dist/components/ui/AgentPanel.js +15 -14
  58. package/dist/components/ui/AgentPanel.js.map +1 -1
  59. package/dist/components/ui/Alert.cjs +1 -1
  60. package/dist/components/ui/Alert.cjs.map +1 -1
  61. package/dist/components/ui/Alert.js +11 -11
  62. package/dist/components/ui/Alert.js.map +1 -1
  63. package/dist/components/ui/Avatar.cjs +1 -1
  64. package/dist/components/ui/Avatar.cjs.map +1 -1
  65. package/dist/components/ui/Avatar.js +21 -19
  66. package/dist/components/ui/Avatar.js.map +1 -1
  67. package/dist/components/ui/BlastRadiusBar.cjs +1 -1
  68. package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
  69. package/dist/components/ui/BlastRadiusBar.d.ts +16 -2
  70. package/dist/components/ui/BlastRadiusBar.js +27 -20
  71. package/dist/components/ui/BlastRadiusBar.js.map +1 -1
  72. package/dist/components/ui/Button.cjs.map +1 -1
  73. package/dist/components/ui/Button.d.ts +1 -1
  74. package/dist/components/ui/Button.js.map +1 -1
  75. package/dist/components/ui/ChatComposer.cjs +1 -1
  76. package/dist/components/ui/ChatComposer.cjs.map +1 -1
  77. package/dist/components/ui/ChatComposer.js +30 -29
  78. package/dist/components/ui/ChatComposer.js.map +1 -1
  79. package/dist/components/ui/ChatSessionList.cjs +1 -1
  80. package/dist/components/ui/ChatSessionList.cjs.map +1 -1
  81. package/dist/components/ui/ChatSessionList.js +136 -157
  82. package/dist/components/ui/ChatSessionList.js.map +1 -1
  83. package/dist/components/ui/Checkbox.cjs +1 -1
  84. package/dist/components/ui/Checkbox.cjs.map +1 -1
  85. package/dist/components/ui/Checkbox.d.ts +7 -1
  86. package/dist/components/ui/Checkbox.js +26 -20
  87. package/dist/components/ui/Checkbox.js.map +1 -1
  88. package/dist/components/ui/Chip.cjs +1 -1
  89. package/dist/components/ui/Chip.cjs.map +1 -1
  90. package/dist/components/ui/Chip.d.ts +6 -1
  91. package/dist/components/ui/Chip.js +20 -18
  92. package/dist/components/ui/Chip.js.map +1 -1
  93. package/dist/components/ui/ChoiceCardGroup.cjs +2 -0
  94. package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -0
  95. package/dist/components/ui/ChoiceCardGroup.d.ts +34 -0
  96. package/dist/components/ui/ChoiceCardGroup.js +56 -0
  97. package/dist/components/ui/ChoiceCardGroup.js.map +1 -0
  98. package/dist/components/ui/CodeBlock.cjs +2 -2
  99. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  100. package/dist/components/ui/CodeBlock.js +31 -27
  101. package/dist/components/ui/CodeBlock.js.map +1 -1
  102. package/dist/components/ui/CodeEditor.cjs +1 -1
  103. package/dist/components/ui/CodeEditor.cjs.map +1 -1
  104. package/dist/components/ui/CodeEditor.d.ts +15 -4
  105. package/dist/components/ui/CodeEditor.js +243 -70
  106. package/dist/components/ui/CodeEditor.js.map +1 -1
  107. package/dist/components/ui/Collapse.cjs +1 -1
  108. package/dist/components/ui/Collapse.cjs.map +1 -1
  109. package/dist/components/ui/Collapse.js +23 -23
  110. package/dist/components/ui/Collapse.js.map +1 -1
  111. package/dist/components/ui/ColumnChart.cjs +1 -1
  112. package/dist/components/ui/ColumnChart.cjs.map +1 -1
  113. package/dist/components/ui/ColumnChart.js +21 -20
  114. package/dist/components/ui/ColumnChart.js.map +1 -1
  115. package/dist/components/ui/CommandInvocationCard.cjs +1 -1
  116. package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
  117. package/dist/components/ui/CommandInvocationCard.js +28 -31
  118. package/dist/components/ui/CommandInvocationCard.js.map +1 -1
  119. package/dist/components/ui/CommandPalette.cjs +1 -1
  120. package/dist/components/ui/CommandPalette.cjs.map +1 -1
  121. package/dist/components/ui/CommandPalette.d.ts +23 -1
  122. package/dist/components/ui/CommandPalette.js +146 -121
  123. package/dist/components/ui/CommandPalette.js.map +1 -1
  124. package/dist/components/ui/CommitGraph.cjs +2 -0
  125. package/dist/components/ui/CommitGraph.cjs.map +1 -0
  126. package/dist/components/ui/CommitGraph.d.ts +79 -0
  127. package/dist/components/ui/CommitGraph.js +383 -0
  128. package/dist/components/ui/CommitGraph.js.map +1 -0
  129. package/dist/components/ui/ContentInspectorDialog.cjs +1 -3
  130. package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
  131. package/dist/components/ui/ContentInspectorDialog.d.ts +4 -10
  132. package/dist/components/ui/ContentInspectorDialog.js +42 -201
  133. package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
  134. package/dist/components/ui/ContentPreview.cjs +3 -0
  135. package/dist/components/ui/ContentPreview.cjs.map +1 -0
  136. package/dist/components/ui/ContentPreview.d.ts +13 -0
  137. package/dist/components/ui/ContentPreview.js +133 -0
  138. package/dist/components/ui/ContentPreview.js.map +1 -0
  139. package/dist/components/ui/CopyGlyph.cjs +2 -0
  140. package/dist/components/ui/CopyGlyph.cjs.map +1 -0
  141. package/dist/components/ui/CopyGlyph.d.ts +7 -0
  142. package/dist/components/ui/CopyGlyph.js +48 -0
  143. package/dist/components/ui/CopyGlyph.js.map +1 -0
  144. package/dist/components/ui/DangerZone.cjs +1 -1
  145. package/dist/components/ui/DangerZone.cjs.map +1 -1
  146. package/dist/components/ui/DangerZone.js +13 -12
  147. package/dist/components/ui/DangerZone.js.map +1 -1
  148. package/dist/components/ui/DataList.cjs +1 -1
  149. package/dist/components/ui/DataList.cjs.map +1 -1
  150. package/dist/components/ui/DataList.d.ts +7 -1
  151. package/dist/components/ui/DataList.js +89 -33
  152. package/dist/components/ui/DataList.js.map +1 -1
  153. package/dist/components/ui/DataTable.cjs +1 -1
  154. package/dist/components/ui/DataTable.cjs.map +1 -1
  155. package/dist/components/ui/DataTable.d.ts +22 -18
  156. package/dist/components/ui/DataTable.js +279 -341
  157. package/dist/components/ui/DataTable.js.map +1 -1
  158. package/dist/components/ui/DropdownMenu.cjs +1 -1
  159. package/dist/components/ui/DropdownMenu.cjs.map +1 -1
  160. package/dist/components/ui/DropdownMenu.d.ts +8 -1
  161. package/dist/components/ui/DropdownMenu.js +63 -46
  162. package/dist/components/ui/DropdownMenu.js.map +1 -1
  163. package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
  164. package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
  165. package/dist/components/ui/EnvironmentSwitcher.js +26 -24
  166. package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
  167. package/dist/components/ui/ErrorState.cjs +1 -1
  168. package/dist/components/ui/ErrorState.cjs.map +1 -1
  169. package/dist/components/ui/ErrorState.d.ts +1 -0
  170. package/dist/components/ui/ErrorState.js +1 -1
  171. package/dist/components/ui/ErrorState.js.map +1 -1
  172. package/dist/components/ui/EventTable.cjs +1 -1
  173. package/dist/components/ui/EventTable.cjs.map +1 -1
  174. package/dist/components/ui/EventTable.d.ts +16 -2
  175. package/dist/components/ui/EventTable.js +198 -165
  176. package/dist/components/ui/EventTable.js.map +1 -1
  177. package/dist/components/ui/FileDropzone.cjs +1 -1
  178. package/dist/components/ui/FileDropzone.cjs.map +1 -1
  179. package/dist/components/ui/FileDropzone.d.ts +3 -21
  180. package/dist/components/ui/FileDropzone.js +42 -67
  181. package/dist/components/ui/FileDropzone.js.map +1 -1
  182. package/dist/components/ui/FilePreview.cjs +1 -1
  183. package/dist/components/ui/FilePreview.cjs.map +1 -1
  184. package/dist/components/ui/FilePreview.d.ts +4 -1
  185. package/dist/components/ui/FilePreview.js +62 -60
  186. package/dist/components/ui/FilePreview.js.map +1 -1
  187. package/dist/components/ui/FileTree.cjs +1 -1
  188. package/dist/components/ui/FileTree.cjs.map +1 -1
  189. package/dist/components/ui/FileTree.d.ts +18 -2
  190. package/dist/components/ui/FileTree.js +141 -110
  191. package/dist/components/ui/FileTree.js.map +1 -1
  192. package/dist/components/ui/FolderDropzone.cjs +1 -1
  193. package/dist/components/ui/FolderDropzone.cjs.map +1 -1
  194. package/dist/components/ui/FolderDropzone.d.ts +10 -1
  195. package/dist/components/ui/FolderDropzone.js +140 -130
  196. package/dist/components/ui/FolderDropzone.js.map +1 -1
  197. package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
  198. package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
  199. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -0
  200. package/dist/components/ui/ForgotPasswordForm.js +23 -20
  201. package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
  202. package/dist/components/ui/FormRow.cjs +1 -1
  203. package/dist/components/ui/FormRow.cjs.map +1 -1
  204. package/dist/components/ui/FormRow.d.ts +32 -2
  205. package/dist/components/ui/FormRow.js +33 -13
  206. package/dist/components/ui/FormRow.js.map +1 -1
  207. package/dist/components/ui/HeadlineStat.cjs +1 -1
  208. package/dist/components/ui/HeadlineStat.cjs.map +1 -1
  209. package/dist/components/ui/HeadlineStat.js +6 -5
  210. package/dist/components/ui/HeadlineStat.js.map +1 -1
  211. package/dist/components/ui/InboxPage.cjs +1 -1
  212. package/dist/components/ui/InboxPage.cjs.map +1 -1
  213. package/dist/components/ui/InboxPage.d.ts +25 -2
  214. package/dist/components/ui/InboxPage.js +93 -77
  215. package/dist/components/ui/InboxPage.js.map +1 -1
  216. package/dist/components/ui/KeyValueList.cjs +1 -1
  217. package/dist/components/ui/KeyValueList.cjs.map +1 -1
  218. package/dist/components/ui/KeyValueList.d.ts +6 -5
  219. package/dist/components/ui/KeyValueList.js +14 -17
  220. package/dist/components/ui/KeyValueList.js.map +1 -1
  221. package/dist/components/ui/LoginForm.cjs +1 -1
  222. package/dist/components/ui/LoginForm.cjs.map +1 -1
  223. package/dist/components/ui/LoginForm.d.ts +1 -0
  224. package/dist/components/ui/LoginForm.js +63 -55
  225. package/dist/components/ui/LoginForm.js.map +1 -1
  226. package/dist/components/ui/Markdown.cjs +1 -1
  227. package/dist/components/ui/Markdown.cjs.map +1 -1
  228. package/dist/components/ui/Markdown.d.ts +3 -2
  229. package/dist/components/ui/Markdown.js +57 -49
  230. package/dist/components/ui/Markdown.js.map +1 -1
  231. package/dist/components/ui/MdxDocument.cjs +1 -1
  232. package/dist/components/ui/MdxDocument.cjs.map +1 -1
  233. package/dist/components/ui/MdxDocument.d.ts +7 -2
  234. package/dist/components/ui/MdxDocument.js +34 -49
  235. package/dist/components/ui/MdxDocument.js.map +1 -1
  236. package/dist/components/ui/MetadataList.cjs +1 -1
  237. package/dist/components/ui/MetadataList.cjs.map +1 -1
  238. package/dist/components/ui/MetadataList.d.ts +7 -1
  239. package/dist/components/ui/MetadataList.js +29 -20
  240. package/dist/components/ui/MetadataList.js.map +1 -1
  241. package/dist/components/ui/MetricCard.cjs +1 -1
  242. package/dist/components/ui/MetricCard.cjs.map +1 -1
  243. package/dist/components/ui/MetricCard.js +16 -16
  244. package/dist/components/ui/MetricCard.js.map +1 -1
  245. package/dist/components/ui/MonoValue.cjs +1 -1
  246. package/dist/components/ui/MonoValue.cjs.map +1 -1
  247. package/dist/components/ui/MonoValue.d.ts +12 -1
  248. package/dist/components/ui/MonoValue.js +19 -17
  249. package/dist/components/ui/MonoValue.js.map +1 -1
  250. package/dist/components/ui/NotificationBell.cjs +1 -1
  251. package/dist/components/ui/NotificationBell.cjs.map +1 -1
  252. package/dist/components/ui/NotificationBell.d.ts +31 -3
  253. package/dist/components/ui/NotificationBell.js +127 -71
  254. package/dist/components/ui/NotificationBell.js.map +1 -1
  255. package/dist/components/ui/NumberField.cjs +2 -0
  256. package/dist/components/ui/NumberField.cjs.map +1 -0
  257. package/dist/components/ui/NumberField.d.ts +34 -0
  258. package/dist/components/ui/NumberField.js +80 -0
  259. package/dist/components/ui/NumberField.js.map +1 -0
  260. package/dist/components/ui/ObjectBrowser.cjs +1 -1
  261. package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
  262. package/dist/components/ui/ObjectBrowser.js +107 -94
  263. package/dist/components/ui/ObjectBrowser.js.map +1 -1
  264. package/dist/components/ui/ObjectInspector.cjs +1 -1
  265. package/dist/components/ui/ObjectInspector.cjs.map +1 -1
  266. package/dist/components/ui/ObjectInspector.d.ts +5 -0
  267. package/dist/components/ui/ObjectInspector.js +61 -69
  268. package/dist/components/ui/ObjectInspector.js.map +1 -1
  269. package/dist/components/ui/PageSizeSelect.cjs +1 -1
  270. package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
  271. package/dist/components/ui/PageSizeSelect.d.ts +3 -4
  272. package/dist/components/ui/PageSizeSelect.js +30 -29
  273. package/dist/components/ui/PageSizeSelect.js.map +1 -1
  274. package/dist/components/ui/Pagination.cjs +1 -1
  275. package/dist/components/ui/Pagination.cjs.map +1 -1
  276. package/dist/components/ui/Pagination.d.ts +16 -6
  277. package/dist/components/ui/Pagination.js +58 -45
  278. package/dist/components/ui/Pagination.js.map +1 -1
  279. package/dist/components/ui/Panel.cjs +1 -1
  280. package/dist/components/ui/Panel.cjs.map +1 -1
  281. package/dist/components/ui/Panel.d.ts +17 -4
  282. package/dist/components/ui/Panel.js +53 -40
  283. package/dist/components/ui/Panel.js.map +1 -1
  284. package/dist/components/ui/ParquetViewer.cjs +1 -1
  285. package/dist/components/ui/ParquetViewer.cjs.map +1 -1
  286. package/dist/components/ui/ParquetViewer.d.ts +1 -1
  287. package/dist/components/ui/ParquetViewer.js +121 -120
  288. package/dist/components/ui/ParquetViewer.js.map +1 -1
  289. package/dist/components/ui/PasswordField.cjs +1 -1
  290. package/dist/components/ui/PasswordField.cjs.map +1 -1
  291. package/dist/components/ui/PasswordField.js +28 -27
  292. package/dist/components/ui/PasswordField.js.map +1 -1
  293. package/dist/components/ui/PickerField.cjs +1 -1
  294. package/dist/components/ui/PickerField.cjs.map +1 -1
  295. package/dist/components/ui/PickerField.d.ts +25 -6
  296. package/dist/components/ui/PickerField.js +20 -17
  297. package/dist/components/ui/PickerField.js.map +1 -1
  298. package/dist/components/ui/ProjectSelector.cjs +1 -1
  299. package/dist/components/ui/ProjectSelector.cjs.map +1 -1
  300. package/dist/components/ui/ProjectSelector.js +39 -36
  301. package/dist/components/ui/ProjectSelector.js.map +1 -1
  302. package/dist/components/ui/QueryAutocomplete.cjs +1 -1
  303. package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
  304. package/dist/components/ui/QueryAutocomplete.d.ts +7 -1
  305. package/dist/components/ui/QueryAutocomplete.js +150 -127
  306. package/dist/components/ui/QueryAutocomplete.js.map +1 -1
  307. package/dist/components/ui/RegisterForm.cjs +1 -1
  308. package/dist/components/ui/RegisterForm.cjs.map +1 -1
  309. package/dist/components/ui/RegisterForm.d.ts +1 -0
  310. package/dist/components/ui/RegisterForm.js +52 -43
  311. package/dist/components/ui/RegisterForm.js.map +1 -1
  312. package/dist/components/ui/ResizableSidePanel.cjs +1 -1
  313. package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
  314. package/dist/components/ui/ResizableSidePanel.js +41 -40
  315. package/dist/components/ui/ResizableSidePanel.js.map +1 -1
  316. package/dist/components/ui/RollingValue.cjs +2 -0
  317. package/dist/components/ui/RollingValue.cjs.map +1 -0
  318. package/dist/components/ui/RollingValue.d.ts +14 -0
  319. package/dist/components/ui/RollingValue.js +39 -0
  320. package/dist/components/ui/RollingValue.js.map +1 -0
  321. package/dist/components/ui/SavedQueryBar.cjs +1 -1
  322. package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
  323. package/dist/components/ui/SavedQueryBar.d.ts +9 -3
  324. package/dist/components/ui/SavedQueryBar.js +390 -291
  325. package/dist/components/ui/SavedQueryBar.js.map +1 -1
  326. package/dist/components/ui/ScrollStory.cjs +1 -2
  327. package/dist/components/ui/ScrollStory.cjs.map +1 -1
  328. package/dist/components/ui/ScrollStory.js +57 -75
  329. package/dist/components/ui/ScrollStory.js.map +1 -1
  330. package/dist/components/ui/SearchInput.cjs +1 -1
  331. package/dist/components/ui/SearchInput.cjs.map +1 -1
  332. package/dist/components/ui/SearchInput.d.ts +5 -1
  333. package/dist/components/ui/SearchInput.js +28 -24
  334. package/dist/components/ui/SearchInput.js.map +1 -1
  335. package/dist/components/ui/Select.cjs +1 -1
  336. package/dist/components/ui/Select.cjs.map +1 -1
  337. package/dist/components/ui/Select.d.ts +4 -2
  338. package/dist/components/ui/Select.js +34 -31
  339. package/dist/components/ui/Select.js.map +1 -1
  340. package/dist/components/ui/ServiceMap.cjs +1 -1
  341. package/dist/components/ui/ServiceMap.cjs.map +1 -1
  342. package/dist/components/ui/ServiceMap.d.ts +57 -2
  343. package/dist/components/ui/ServiceMap.js +374 -117
  344. package/dist/components/ui/ServiceMap.js.map +1 -1
  345. package/dist/components/ui/ShareLinkDialog.cjs +1 -1
  346. package/dist/components/ui/ShareLinkDialog.cjs.map +1 -1
  347. package/dist/components/ui/ShareLinkDialog.d.ts +5 -3
  348. package/dist/components/ui/ShareLinkDialog.js +107 -98
  349. package/dist/components/ui/ShareLinkDialog.js.map +1 -1
  350. package/dist/components/ui/Slider.cjs +2 -0
  351. package/dist/components/ui/Slider.cjs.map +1 -0
  352. package/dist/components/ui/Slider.d.ts +24 -0
  353. package/dist/components/ui/Slider.js +55 -0
  354. package/dist/components/ui/Slider.js.map +1 -0
  355. package/dist/components/ui/SparkLine.cjs +1 -1
  356. package/dist/components/ui/SparkLine.cjs.map +1 -1
  357. package/dist/components/ui/SparkLine.d.ts +4 -1
  358. package/dist/components/ui/SparkLine.js +29 -23
  359. package/dist/components/ui/SparkLine.js.map +1 -1
  360. package/dist/components/ui/StatBlock.cjs +1 -1
  361. package/dist/components/ui/StatBlock.cjs.map +1 -1
  362. package/dist/components/ui/StatBlock.js +17 -16
  363. package/dist/components/ui/StatBlock.js.map +1 -1
  364. package/dist/components/ui/StatusDot.cjs.map +1 -1
  365. package/dist/components/ui/StatusDot.d.ts +5 -1
  366. package/dist/components/ui/StatusDot.js.map +1 -1
  367. package/dist/components/ui/Steps.cjs +2 -0
  368. package/dist/components/ui/Steps.cjs.map +1 -0
  369. package/dist/components/ui/Steps.d.ts +19 -0
  370. package/dist/components/ui/Steps.js +53 -0
  371. package/dist/components/ui/Steps.js.map +1 -0
  372. package/dist/components/ui/TableOfContents.cjs +1 -1
  373. package/dist/components/ui/TableOfContents.cjs.map +1 -1
  374. package/dist/components/ui/TableOfContents.d.ts +3 -3
  375. package/dist/components/ui/TableOfContents.js +47 -28
  376. package/dist/components/ui/TableOfContents.js.map +1 -1
  377. package/dist/components/ui/Tabs.cjs +2 -2
  378. package/dist/components/ui/Tabs.cjs.map +1 -1
  379. package/dist/components/ui/Tabs.d.ts +37 -3
  380. package/dist/components/ui/Tabs.js +169 -109
  381. package/dist/components/ui/Tabs.js.map +1 -1
  382. package/dist/components/ui/Terminal.cjs +1 -1
  383. package/dist/components/ui/Terminal.cjs.map +1 -1
  384. package/dist/components/ui/Terminal.js +18 -17
  385. package/dist/components/ui/Terminal.js.map +1 -1
  386. package/dist/components/ui/TextField.cjs +1 -1
  387. package/dist/components/ui/TextField.cjs.map +1 -1
  388. package/dist/components/ui/TextField.js +19 -18
  389. package/dist/components/ui/TextField.js.map +1 -1
  390. package/dist/components/ui/ThemeToggle.cjs +1 -1
  391. package/dist/components/ui/ThemeToggle.cjs.map +1 -1
  392. package/dist/components/ui/ThemeToggle.js +15 -18
  393. package/dist/components/ui/ThemeToggle.js.map +1 -1
  394. package/dist/components/ui/TimeDisplay.cjs +1 -1
  395. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  396. package/dist/components/ui/TimeDisplay.d.ts +14 -4
  397. package/dist/components/ui/TimeDisplay.js +43 -44
  398. package/dist/components/ui/TimeDisplay.js.map +1 -1
  399. package/dist/components/ui/TimeRangePicker.cjs +1 -1
  400. package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
  401. package/dist/components/ui/TimeRangePicker.js +128 -111
  402. package/dist/components/ui/TimeRangePicker.js.map +1 -1
  403. package/dist/components/ui/TimelineChart.cjs +2 -1
  404. package/dist/components/ui/TimelineChart.cjs.map +1 -1
  405. package/dist/components/ui/TimelineChart.d.ts +1 -0
  406. package/dist/components/ui/TimelineChart.js +221 -169
  407. package/dist/components/ui/TimelineChart.js.map +1 -1
  408. package/dist/components/ui/ToolCallCard.cjs +1 -1
  409. package/dist/components/ui/ToolCallCard.cjs.map +1 -1
  410. package/dist/components/ui/ToolCallCard.js +22 -22
  411. package/dist/components/ui/ToolCallCard.js.map +1 -1
  412. package/dist/components/ui/Toolbar.cjs +1 -1
  413. package/dist/components/ui/Toolbar.cjs.map +1 -1
  414. package/dist/components/ui/Toolbar.d.ts +4 -16
  415. package/dist/components/ui/Toolbar.js +8 -62
  416. package/dist/components/ui/Toolbar.js.map +1 -1
  417. package/dist/components/ui/TraceSpanInspector.cjs +1 -1
  418. package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
  419. package/dist/components/ui/TraceSpanInspector.js +94 -76
  420. package/dist/components/ui/TraceSpanInspector.js.map +1 -1
  421. package/dist/components/ui/TraceTree.cjs +1 -1
  422. package/dist/components/ui/TraceTree.cjs.map +1 -1
  423. package/dist/components/ui/TraceTree.d.ts +36 -2
  424. package/dist/components/ui/TraceTree.js +278 -170
  425. package/dist/components/ui/TraceTree.js.map +1 -1
  426. package/dist/components/ui/TrajectoryStep.cjs +1 -1
  427. package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
  428. package/dist/components/ui/TrajectoryStep.js +39 -43
  429. package/dist/components/ui/TrajectoryStep.js.map +1 -1
  430. package/dist/components/ui/TrajectoryTimeline.cjs +1 -1
  431. package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -1
  432. package/dist/components/ui/TrajectoryTimeline.js +31 -28
  433. package/dist/components/ui/TrajectoryTimeline.js.map +1 -1
  434. package/dist/components/ui/UploadQueue.cjs +1 -1
  435. package/dist/components/ui/UploadQueue.cjs.map +1 -1
  436. package/dist/components/ui/UploadQueue.d.ts +18 -2
  437. package/dist/components/ui/UploadQueue.js +53 -71
  438. package/dist/components/ui/UploadQueue.js.map +1 -1
  439. package/dist/components/ui/authValidation.cjs +2 -0
  440. package/dist/components/ui/authValidation.cjs.map +1 -0
  441. package/dist/components/ui/authValidation.d.ts +3 -0
  442. package/dist/components/ui/authValidation.js +8 -0
  443. package/dist/components/ui/authValidation.js.map +1 -0
  444. package/dist/components/ui/classifyContent.cjs +6 -0
  445. package/dist/components/ui/classifyContent.cjs.map +1 -0
  446. package/dist/components/ui/classifyContent.d.ts +40 -0
  447. package/dist/components/ui/classifyContent.js +167 -0
  448. package/dist/components/ui/classifyContent.js.map +1 -0
  449. package/dist/components/ui/dropFiles.cjs +2 -0
  450. package/dist/components/ui/dropFiles.cjs.map +1 -0
  451. package/dist/components/ui/dropFiles.d.ts +7 -0
  452. package/dist/components/ui/dropFiles.js +16 -0
  453. package/dist/components/ui/dropFiles.js.map +1 -0
  454. package/dist/components/ui/index.d.ts +23 -10
  455. package/dist/components/ui/linkComponent.cjs +1 -1
  456. package/dist/components/ui/linkComponent.cjs.map +1 -1
  457. package/dist/components/ui/linkComponent.d.ts +4 -2
  458. package/dist/components/ui/linkComponent.js +15 -5
  459. package/dist/components/ui/linkComponent.js.map +1 -1
  460. package/dist/components/ui/markdownDocument.cjs +2 -0
  461. package/dist/components/ui/markdownDocument.cjs.map +1 -0
  462. package/dist/components/ui/markdownDocument.d.ts +40 -0
  463. package/dist/components/ui/markdownDocument.js +39 -0
  464. package/dist/components/ui/markdownDocument.js.map +1 -0
  465. package/dist/components/ui/relativeTime.cjs +1 -1
  466. package/dist/components/ui/relativeTime.cjs.map +1 -1
  467. package/dist/components/ui/relativeTime.d.ts +5 -3
  468. package/dist/components/ui/relativeTime.js +15 -6
  469. package/dist/components/ui/relativeTime.js.map +1 -1
  470. package/dist/components/ui/traceStatus.cjs +2 -0
  471. package/dist/components/ui/traceStatus.cjs.map +1 -0
  472. package/dist/components/ui/{traceFormat.d.ts → traceStatus.d.ts} +0 -1
  473. package/dist/components/ui/traceStatus.js +7 -0
  474. package/dist/components/ui/traceStatus.js.map +1 -0
  475. package/dist/components/ui/useColumnWidths.cjs +2 -0
  476. package/dist/components/ui/useColumnWidths.cjs.map +1 -0
  477. package/dist/components/ui/useColumnWidths.d.ts +60 -0
  478. package/dist/components/ui/useColumnWidths.js +196 -0
  479. package/dist/components/ui/useColumnWidths.js.map +1 -0
  480. package/dist/hooks/popoverOverflow.cjs +2 -0
  481. package/dist/hooks/popoverOverflow.cjs.map +1 -0
  482. package/dist/hooks/popoverOverflow.d.ts +8 -0
  483. package/dist/hooks/popoverOverflow.js +9 -0
  484. package/dist/hooks/popoverOverflow.js.map +1 -0
  485. package/dist/hooks/useDevelopAfterLoad.cjs +2 -0
  486. package/dist/hooks/useDevelopAfterLoad.cjs.map +1 -0
  487. package/dist/hooks/useDevelopAfterLoad.d.ts +8 -0
  488. package/dist/hooks/useDevelopAfterLoad.js +9 -0
  489. package/dist/hooks/useDevelopAfterLoad.js.map +1 -0
  490. package/dist/hooks/useDialogPopover.cjs +2 -0
  491. package/dist/hooks/useDialogPopover.cjs.map +1 -0
  492. package/dist/hooks/useDialogPopover.d.ts +23 -0
  493. package/dist/hooks/useDialogPopover.js +48 -0
  494. package/dist/hooks/useDialogPopover.js.map +1 -0
  495. package/dist/hooks/useMenuPopover.cjs +1 -1
  496. package/dist/hooks/useMenuPopover.cjs.map +1 -1
  497. package/dist/hooks/useMenuPopover.d.ts +0 -8
  498. package/dist/hooks/useMenuPopover.js +17 -22
  499. package/dist/hooks/useMenuPopover.js.map +1 -1
  500. package/dist/hooks/useResizable.cjs +1 -1
  501. package/dist/hooks/useResizable.cjs.map +1 -1
  502. package/dist/hooks/useResizable.js +87 -78
  503. package/dist/hooks/useResizable.js.map +1 -1
  504. package/dist/hooks/useSavedQueries.cjs +1 -1
  505. package/dist/hooks/useSavedQueries.cjs.map +1 -1
  506. package/dist/hooks/useSavedQueries.d.ts +6 -0
  507. package/dist/hooks/useSavedQueries.js +52 -60
  508. package/dist/hooks/useSavedQueries.js.map +1 -1
  509. package/dist/hooks/useSectionSpy.cjs +1 -1
  510. package/dist/hooks/useSectionSpy.cjs.map +1 -1
  511. package/dist/hooks/useSectionSpy.d.ts +6 -1
  512. package/dist/hooks/useSectionSpy.js +87 -57
  513. package/dist/hooks/useSectionSpy.js.map +1 -1
  514. package/dist/hooks/useStorageItem.cjs +2 -0
  515. package/dist/hooks/useStorageItem.cjs.map +1 -0
  516. package/dist/hooks/useStorageItem.d.ts +6 -0
  517. package/dist/hooks/useStorageItem.js +36 -0
  518. package/dist/hooks/useStorageItem.js.map +1 -0
  519. package/dist/index.cjs +1 -1
  520. package/dist/index.d.ts +5 -5
  521. package/dist/index.js +321 -313
  522. package/dist/index.js.map +1 -1
  523. package/dist/layouts/shell/AegisShell.cjs +1 -1
  524. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  525. package/dist/layouts/shell/AegisShell.d.ts +4 -2
  526. package/dist/layouts/shell/AegisShell.js +150 -243
  527. package/dist/layouts/shell/AegisShell.js.map +1 -1
  528. package/dist/layouts/shell/AppRoutes.cjs +2 -0
  529. package/dist/layouts/shell/AppRoutes.cjs.map +1 -0
  530. package/dist/layouts/shell/AppRoutes.d.ts +5 -0
  531. package/dist/layouts/shell/AppRoutes.js +8 -0
  532. package/dist/layouts/shell/AppRoutes.js.map +1 -0
  533. package/dist/layouts/shell/AppSwitcher.cjs +1 -1
  534. package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
  535. package/dist/layouts/shell/AppSwitcher.js +53 -36
  536. package/dist/layouts/shell/AppSwitcher.js.map +1 -1
  537. package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
  538. package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
  539. package/dist/layouts/shell/AuthRequiredCard.js +24 -22
  540. package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
  541. package/dist/layouts/shell/BreadcrumbBar.cjs +1 -1
  542. package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -1
  543. package/dist/layouts/shell/BreadcrumbBar.d.ts +1 -2
  544. package/dist/layouts/shell/BreadcrumbBar.js +19 -26
  545. package/dist/layouts/shell/BreadcrumbBar.js.map +1 -1
  546. package/dist/layouts/shell/RouteErrorBoundary.cjs +2 -0
  547. package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -0
  548. package/dist/layouts/shell/RouteErrorBoundary.d.ts +26 -0
  549. package/dist/layouts/shell/RouteErrorBoundary.js +40 -0
  550. package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -0
  551. package/dist/layouts/shell/RouterLink.cjs +2 -0
  552. package/dist/layouts/shell/RouterLink.cjs.map +1 -0
  553. package/dist/layouts/shell/RouterLink.d.ts +3 -0
  554. package/dist/layouts/shell/RouterLink.js +22 -0
  555. package/dist/layouts/shell/RouterLink.js.map +1 -0
  556. package/dist/layouts/shell/ShellCommandPalette.cjs +2 -0
  557. package/dist/layouts/shell/ShellCommandPalette.cjs.map +1 -0
  558. package/dist/layouts/shell/ShellCommandPalette.d.ts +7 -0
  559. package/dist/layouts/shell/ShellCommandPalette.js +32 -0
  560. package/dist/layouts/shell/ShellCommandPalette.js.map +1 -0
  561. package/dist/layouts/shell/ShellInboxPage.cjs +2 -0
  562. package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -0
  563. package/dist/layouts/shell/ShellInboxPage.d.ts +12 -0
  564. package/dist/layouts/shell/ShellInboxPage.js +33 -0
  565. package/dist/layouts/shell/ShellInboxPage.js.map +1 -0
  566. package/dist/layouts/shell/ShellNotificationBell.cjs +2 -0
  567. package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -0
  568. package/dist/layouts/shell/ShellNotificationBell.d.ts +5 -0
  569. package/dist/layouts/shell/ShellNotificationBell.js +30 -0
  570. package/dist/layouts/shell/ShellNotificationBell.js.map +1 -0
  571. package/dist/layouts/shell/Sidebar.cjs +1 -1
  572. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  573. package/dist/layouts/shell/Sidebar.d.ts +4 -2
  574. package/dist/layouts/shell/Sidebar.js +14 -11
  575. package/dist/layouts/shell/Sidebar.js.map +1 -1
  576. package/dist/layouts/shell/TopHeader.cjs +1 -1
  577. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  578. package/dist/layouts/shell/TopHeader.d.ts +6 -2
  579. package/dist/layouts/shell/TopHeader.js +87 -75
  580. package/dist/layouts/shell/TopHeader.js.map +1 -1
  581. package/dist/layouts/shell/apps.cjs +2 -0
  582. package/dist/layouts/shell/apps.cjs.map +1 -0
  583. package/dist/layouts/shell/apps.d.ts +12 -0
  584. package/dist/layouts/shell/apps.js +34 -0
  585. package/dist/layouts/shell/apps.js.map +1 -0
  586. package/dist/layouts/shell/buildRouteTree.cjs +2 -0
  587. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -0
  588. package/dist/layouts/shell/buildRouteTree.d.ts +22 -0
  589. package/dist/layouts/shell/buildRouteTree.js +49 -0
  590. package/dist/layouts/shell/buildRouteTree.js.map +1 -0
  591. package/dist/layouts/shell/environments/EnvironmentProvider.cjs +2 -0
  592. package/dist/layouts/shell/environments/EnvironmentProvider.cjs.map +1 -0
  593. package/dist/layouts/shell/environments/EnvironmentProvider.d.ts +13 -0
  594. package/dist/layouts/shell/environments/EnvironmentProvider.js +90 -0
  595. package/dist/layouts/shell/environments/EnvironmentProvider.js.map +1 -0
  596. package/dist/layouts/shell/environments/{context.cjs → environmentContext.cjs} +2 -2
  597. package/dist/layouts/shell/environments/environmentContext.cjs.map +1 -0
  598. package/dist/layouts/shell/environments/environmentContext.d.ts +6 -0
  599. package/dist/layouts/shell/environments/environmentContext.js +8 -0
  600. package/dist/layouts/shell/environments/environmentContext.js.map +1 -0
  601. package/dist/layouts/shell/environments/index.d.ts +2 -3
  602. package/dist/layouts/shell/environments/types.cjs.map +1 -1
  603. package/dist/layouts/shell/environments/types.d.ts +23 -15
  604. package/dist/layouts/shell/environments/types.js.map +1 -1
  605. package/dist/layouts/shell/environments/useEnvironment.cjs +2 -0
  606. package/dist/layouts/shell/environments/useEnvironment.cjs.map +1 -0
  607. package/dist/layouts/shell/environments/{hooks.d.ts → useEnvironment.d.ts} +3 -2
  608. package/dist/layouts/shell/environments/useEnvironment.js +25 -0
  609. package/dist/layouts/shell/environments/useEnvironment.js.map +1 -0
  610. package/dist/layouts/shell/index.d.ts +3 -1
  611. package/dist/layouts/shell/types.d.ts +14 -14
  612. package/dist/layouts/shell/useAgentPanel.cjs +2 -0
  613. package/dist/layouts/shell/useAgentPanel.cjs.map +1 -0
  614. package/dist/layouts/shell/useAgentPanel.d.ts +13 -0
  615. package/dist/layouts/shell/useAgentPanel.js +21 -0
  616. package/dist/layouts/shell/useAgentPanel.js.map +1 -0
  617. package/dist/layouts/shell/useAppCommands.cjs +2 -0
  618. package/dist/layouts/shell/useAppCommands.cjs.map +1 -0
  619. package/dist/layouts/shell/useAppCommands.d.ts +6 -0
  620. package/dist/layouts/shell/useAppCommands.js +19 -0
  621. package/dist/layouts/shell/useAppCommands.js.map +1 -0
  622. package/dist/layouts/shell/useMobileNav.cjs +2 -0
  623. package/dist/layouts/shell/useMobileNav.cjs.map +1 -0
  624. package/dist/layouts/shell/useMobileNav.d.ts +20 -0
  625. package/dist/layouts/shell/useMobileNav.js +54 -0
  626. package/dist/layouts/shell/useMobileNav.js.map +1 -0
  627. package/dist/layouts/shell/useOpenNotification.cjs +2 -0
  628. package/dist/layouts/shell/useOpenNotification.cjs.map +1 -0
  629. package/dist/layouts/shell/useOpenNotification.d.ts +3 -0
  630. package/dist/layouts/shell/useOpenNotification.js +16 -0
  631. package/dist/layouts/shell/useOpenNotification.js.map +1 -0
  632. package/dist/layouts/shell/useShellUser.cjs +2 -0
  633. package/dist/layouts/shell/useShellUser.cjs.map +1 -0
  634. package/dist/layouts/shell/useShellUser.d.ts +7 -0
  635. package/dist/layouts/shell/useShellUser.js +23 -0
  636. package/dist/layouts/shell/useShellUser.js.map +1 -0
  637. package/dist/layouts/shell/useWarnOnce.cjs +2 -0
  638. package/dist/layouts/shell/useWarnOnce.cjs.map +1 -0
  639. package/dist/layouts/shell/useWarnOnce.d.ts +1 -0
  640. package/dist/layouts/shell/useWarnOnce.js +11 -0
  641. package/dist/layouts/shell/useWarnOnce.js.map +1 -0
  642. package/dist/lib/chart.cjs +1 -1
  643. package/dist/lib/chart.cjs.map +1 -1
  644. package/dist/lib/chart.d.ts +5 -7
  645. package/dist/lib/chart.js +49 -34
  646. package/dist/lib/chart.js.map +1 -1
  647. package/dist/lib/format.cjs +1 -1
  648. package/dist/lib/format.cjs.map +1 -1
  649. package/dist/lib/format.d.ts +34 -0
  650. package/dist/lib/format.js +98 -9
  651. package/dist/lib/format.js.map +1 -1
  652. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +1 -1
  653. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -1
  654. package/dist/lib/luceneQuery/tokenizeAtCursor.js +29 -29
  655. package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -1
  656. package/dist/lib/storage.cjs +1 -1
  657. package/dist/lib/storage.cjs.map +1 -1
  658. package/dist/lib/storage.js +19 -12
  659. package/dist/lib/storage.js.map +1 -1
  660. package/dist/lib/timeRange.cjs +1 -1
  661. package/dist/lib/timeRange.cjs.map +1 -1
  662. package/dist/lib/timeRange.d.ts +14 -4
  663. package/dist/lib/timeRange.js +43 -39
  664. package/dist/lib/timeRange.js.map +1 -1
  665. package/dist/locale/strings.cjs +1 -1
  666. package/dist/locale/strings.cjs.map +1 -1
  667. package/dist/locale/strings.d.ts +243 -2
  668. package/dist/locale/strings.js +545 -26
  669. package/dist/locale/strings.js.map +1 -1
  670. package/dist/notifications/notificationContext.cjs.map +1 -1
  671. package/dist/notifications/notificationContext.d.ts +15 -0
  672. package/dist/notifications/notificationContext.js.map +1 -1
  673. package/dist/style.css +1 -1
  674. package/dist/theme/ThemeProvider.cjs +1 -1
  675. package/dist/theme/ThemeProvider.cjs.map +1 -1
  676. package/dist/theme/ThemeProvider.d.ts +2 -1
  677. package/dist/theme/ThemeProvider.js +47 -33
  678. package/dist/theme/ThemeProvider.js.map +1 -1
  679. package/dist/theme/antdTheme.cjs +1 -1
  680. package/dist/theme/antdTheme.cjs.map +1 -1
  681. package/dist/theme/antdTheme.d.ts +0 -2
  682. package/dist/theme/antdTheme.js +28 -20
  683. package/dist/theme/antdTheme.js.map +1 -1
  684. package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
  685. package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
  686. package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
  687. package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
  688. package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
  689. package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
  690. package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
  691. package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
  692. package/dist/transports/agentm/agentmChannelClient.js +133 -89
  693. package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
  694. package/dist/transports/index.d.ts +2 -2
  695. package/dist/transports/mcpBridge.cjs +2 -0
  696. package/dist/transports/mcpBridge.cjs.map +1 -0
  697. package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
  698. package/dist/transports/mcpBridge.js +144 -0
  699. package/dist/transports/mcpBridge.js.map +1 -0
  700. package/dist/transports/mcpTools.cjs +2 -0
  701. package/dist/transports/mcpTools.cjs.map +1 -0
  702. package/dist/transports/mcpTools.d.ts +15 -0
  703. package/dist/transports/mcpTools.js +283 -0
  704. package/dist/transports/mcpTools.js.map +1 -0
  705. package/dist/transports.cjs +1 -1
  706. package/dist/transports.js +1 -1
  707. package/package.json +5 -4
  708. package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
  709. package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
  710. package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
  711. package/dist/agent/core/mcpToolCatalogue.js +0 -101
  712. package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
  713. package/dist/components/ui/BucketCard.cjs +0 -2
  714. package/dist/components/ui/BucketCard.cjs.map +0 -1
  715. package/dist/components/ui/BucketCard.d.ts +0 -24
  716. package/dist/components/ui/BucketCard.js +0 -73
  717. package/dist/components/ui/BucketCard.js.map +0 -1
  718. package/dist/components/ui/ContentInspectorContent.cjs +0 -5
  719. package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
  720. package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
  721. package/dist/components/ui/ContentInspectorContent.js +0 -101
  722. package/dist/components/ui/ContentInspectorContent.js.map +0 -1
  723. package/dist/components/ui/traceFormat.cjs +0 -2
  724. package/dist/components/ui/traceFormat.cjs.map +0 -1
  725. package/dist/components/ui/traceFormat.js +0 -11
  726. package/dist/components/ui/traceFormat.js.map +0 -1
  727. package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
  728. package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
  729. package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
  730. package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
  731. package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
  732. package/dist/layouts/shell/environments/context.cjs.map +0 -1
  733. package/dist/layouts/shell/environments/context.d.ts +0 -6
  734. package/dist/layouts/shell/environments/context.js +0 -6
  735. package/dist/layouts/shell/environments/context.js.map +0 -1
  736. package/dist/layouts/shell/environments/hooks.cjs +0 -2
  737. package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
  738. package/dist/layouts/shell/environments/hooks.js +0 -24
  739. package/dist/layouts/shell/environments/hooks.js.map +0 -1
  740. package/dist/layouts/shell/environments/manifest.cjs +0 -2
  741. package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
  742. package/dist/layouts/shell/environments/manifest.d.ts +0 -26
  743. package/dist/layouts/shell/environments/manifest.js +0 -82
  744. package/dist/layouts/shell/environments/manifest.js.map +0 -1
  745. package/dist/transports/bridge.cjs +0 -2
  746. package/dist/transports/bridge.cjs.map +0 -1
  747. package/dist/transports/bridge.js +0 -143
  748. package/dist/transports/bridge.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");function c(e,r){const n=t.useRef(!1);t.useEffect(()=>{e&&!n.current&&(n.current=!0,console.warn(r))},[e,r])}exports.useWarnOnce=c;
2
+ //# sourceMappingURL=useWarnOnce.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWarnOnce.cjs","sources":["../../../src/layouts/shell/useWarnOnce.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function useWarnOnce(shouldWarn: boolean, message: string): void {\n const warnedRef = useRef(false);\n useEffect(() => {\n if (shouldWarn && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(message);\n }\n }, [shouldWarn, message]);\n}\n"],"names":["useWarnOnce","shouldWarn","message","warnedRef","useRef","useEffect"],"mappings":"yGAEO,SAASA,EAAYC,EAAqBC,EAAuB,CACtE,MAAMC,EAAYC,EAAAA,OAAO,EAAK,EAC9BC,EAAAA,UAAU,IAAM,CACVJ,GAAc,CAACE,EAAU,UAC3BA,EAAU,QAAU,GACpB,QAAQ,KAAKD,CAAO,EAExB,EAAG,CAACD,EAAYC,CAAO,CAAC,CAC1B"}
@@ -0,0 +1 @@
1
+ export declare function useWarnOnce(shouldWarn: boolean, message: string): void;
@@ -0,0 +1,11 @@
1
+ import { useRef as f, useEffect as t } from "react";
2
+ function o(e, r) {
3
+ const n = f(!1);
4
+ t(() => {
5
+ e && !n.current && (n.current = !0, console.warn(r));
6
+ }, [e, r]);
7
+ }
8
+ export {
9
+ o as useWarnOnce
10
+ };
11
+ //# sourceMappingURL=useWarnOnce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWarnOnce.js","sources":["../../../src/layouts/shell/useWarnOnce.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function useWarnOnce(shouldWarn: boolean, message: string): void {\n const warnedRef = useRef(false);\n useEffect(() => {\n if (shouldWarn && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(message);\n }\n }, [shouldWarn, message]);\n}\n"],"names":["useWarnOnce","shouldWarn","message","warnedRef","useRef","useEffect"],"mappings":";AAEO,SAASA,EAAYC,GAAqBC,GAAuB;AACtE,QAAMC,IAAYC,EAAO,EAAK;AAC9B,EAAAC,EAAU,MAAM;AACd,IAAIJ,KAAc,CAACE,EAAU,YAC3BA,EAAU,UAAU,IACpB,QAAQ,KAAKD,CAAO;AAAA,EAExB,GAAG,CAACD,GAAYC,CAAO,CAAC;AAC1B;"}
@@ -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,EAAIA,EAAK,CAAC,EAAI,CAACA,EAAIC,CAAE,CAC1C,CAGO,SAASC,EAASC,EAAqB,CAC5C,GAAI,EAAEA,EAAM,IAAM,CAAC,OAAO,SAASA,CAAG,EACpC,MAAO,GAET,MAAMC,EAAO,IAAM,KAAK,MAAM,KAAK,MAAMD,CAAG,CAAC,EACvCE,EAAaF,EAAMC,EAGzB,OADEC,GAAc,EAAI,EAAIA,GAAc,EAAI,EAAIA,GAAc,EAAI,EAAI,IACtDD,CAChB,CAEA,MAAME,EAAY,GASX,SAASC,EAAUP,EAAYC,EAAYO,EAAQ,EAAa,CACrE,GAAI,EAAEP,EAAKD,GACT,MAAO,CAAA,EAET,MAAMS,EAAOP,GAAUD,EAAKD,GAAMQ,CAAK,EAEjCE,EAAU,KACVC,EAAQ,KAAK,KAAKX,EAAKS,EAAOC,CAAO,EACrCE,EAAO,KAAK,MAAMX,EAAKQ,EAAOC,CAAO,EACrCG,EAAW,KAAK,IAAI,EAAG,CAAC,KAAK,MAAM,KAAK,MAAMJ,CAAI,CAAC,CAAC,EACpDK,EAAkB,CAAA,EACxB,QAASC,EAAIJ,EAAOI,GAAKH,GAAQE,EAAM,OAASR,EAAWS,GAAK,EAAG,CACjE,MAAMC,EAAO,QAAQD,EAAIN,GAAM,QAAQI,CAAQ,CAAC,EAChDC,EAAM,KAAKE,IAAS,EAAI,EAAIA,CAAI,CAClC,CACA,OAAOF,CACT,CAGA,MAAMG,EAAU,IAOT,SAASC,EACdC,EACAC,EACAZ,EACQ,CACR,MAAMa,EAAO,EAAIJ,EAAU,KAAK,IAAIT,EAAQ,EAAG,CAAC,EAChD,OAAO,KAAK,IAAI,EAAG,KAAK,IAAI,EAAGW,EAAWE,EAAOJ,EAAUG,CAAK,CAAC,CACnE,CAMO,SAASE,EACdH,EACAI,EACAC,EACQ,CACR,OAAO,KAAK,IAAI,EAAG,KAAK,IAAI,GAAIL,EAAWI,IAASC,EAAKD,EAAK,CAAC,CACjE"}
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`, 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,CAACA,EAAIC,CAAE,CAC1C,CAGA,SAASC,EAASC,EAAkD,CAClE,MAAMC,EAAW,KAAK,MAAM,KAAK,MAAMD,CAAG,CAAC,EACrCE,EA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K,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
  /**
package/dist/lib/chart.js CHANGED
@@ -1,11 +1,11 @@
1
- function v(t) {
1
+ function N(t) {
2
2
  return {
3
3
  solid: void 0,
4
4
  dashed: "var(--space-2) var(--space-1)",
5
5
  dotted: "var(--size-hairline) var(--space-1)"
6
6
  }[t];
7
7
  }
8
- const M = {
8
+ const v = {
9
9
  seq: "var(--data-seq)",
10
10
  "cat-1": "var(--data-cat-1)",
11
11
  "cat-2": "var(--data-cat-2)",
@@ -15,45 +15,60 @@ const M = {
15
15
  "cat-6": "var(--data-cat-6)",
16
16
  unknown: "var(--bg-muted)"
17
17
  };
18
- function l(t) {
19
- return t.startsWith("var(") ? t : M[t];
18
+ function S(t) {
19
+ return t.startsWith("var(") ? t : v[t];
20
20
  }
21
- function g(t, n) {
22
- const a = Math.min(0, ...t), c = n ?? Math.max(0, ...t);
23
- return c <= a ? [a, a + 1] : [a, c];
21
+ function w(t, a) {
22
+ const n = Math.min(0, ...t), e = a ?? Math.max(0, ...t);
23
+ return e <= n ? [n, n + 1] : [n, e];
24
24
  }
25
- function f(t) {
26
- if (!(t > 0) || !Number.isFinite(t))
27
- return 1;
28
- const n = 10 ** Math.floor(Math.log10(t)), a = t / n;
29
- return (a <= 1 ? 1 : a <= 2 ? 2 : a <= 5 ? 5 : 10) * n;
25
+ function b(t) {
26
+ const a = Math.floor(Math.log10(t)), n = t / 10 ** a;
27
+ return n <= 1 ? { digit: 1, exponent: a } : n <= 2 ? { digit: 2, exponent: a } : n <= 5 ? { digit: 5, exponent: a } : { digit: 1, exponent: a + 1 };
30
28
  }
31
- const m = 50;
32
- function p(t, n, a = 5) {
33
- if (!(n > t))
29
+ const x = 50;
30
+ function A(t, a, n = 5) {
31
+ if (!(a > t) || !Number.isFinite(t) || !Number.isFinite(a))
34
32
  return [];
35
- const c = f((n - t) / a), s = 1e-9, h = Math.ceil(t / c - s), u = Math.floor(n / c + s), d = Math.max(0, -Math.floor(Math.log10(c))), e = [];
36
- for (let r = h; r <= u && e.length < m; r += 1) {
37
- const o = Number((r * c).toFixed(d));
38
- e.push(o === 0 ? 0 : o);
39
- }
40
- return e;
33
+ const e = (a / 2 - t / 2) / n * 2;
34
+ if (!(e > 0) || !Number.isFinite(e))
35
+ return [];
36
+ const p = Math.max(Math.abs(t), Math.abs(a)) * Number.EPSILON, { digit: h, exponent: d } = b(Math.max(e, p)), i = (r) => +`${String(BigInt(r) * BigInt(h))}e${String(d)}`, m = i(1);
37
+ if (!Number.isFinite(m))
38
+ return [];
39
+ const g = (r) => {
40
+ const [l, f] = r.toExponential().split("e");
41
+ return +`${l}e${String(Number(f) - d)}` / h;
42
+ }, o = m * 1e-9;
43
+ let s = Math.floor(g(t));
44
+ for (; i(s - 1) >= t - o; )
45
+ s -= 1;
46
+ for (; i(s) < t - o; )
47
+ s += 1;
48
+ let c = Math.ceil(g(a));
49
+ for (; i(c + 1) <= a + o; )
50
+ c += 1;
51
+ for (; i(c) > a + o; )
52
+ c -= 1;
53
+ const u = [];
54
+ for (let r = s; r <= c && u.length < x; r += 1)
55
+ u.push(i(r));
56
+ return u;
41
57
  }
42
- const i = 0.12;
43
- function x(t, n, a) {
44
- const c = 1 + i * Math.max(a - 1, 0);
45
- return Math.min(1, Math.max(0, t * c - i * n));
58
+ const M = 0.12;
59
+ function E(t, a, n) {
60
+ const e = 1 + M * Math.max(n - 1, 0);
61
+ return Math.min(1, Math.max(0, t * e - M * a));
46
62
  }
47
- function A(t, n, a) {
48
- return Math.min(1, Math.max(0, (t - n) / (a - n)));
63
+ function T(t, a, n) {
64
+ return Math.min(1, Math.max(0, (t - a) / (n - a)));
49
65
  }
50
66
  export {
51
- l as chartColorValue,
52
- v as chartLineDash,
53
- f as niceStep,
54
- p as niceTicks,
55
- A as stageProgress,
56
- x as staggeredProgress,
57
- g as zeroAnchoredDomain
67
+ S as chartColorValue,
68
+ N as chartLineDash,
69
+ A as niceTicks,
70
+ T as stageProgress,
71
+ E as staggeredProgress,
72
+ w as zeroAnchoredDomain
58
73
  };
59
74
  //# sourceMappingURL=chart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","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":"AAsBO,SAASA,EAAcC,GAA2C;AACvE,SAAO;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,EAAA,EACRA,CAAK;AACT;AAEA,MAAMC,IAAoD;AAAA,EACxD,KAAK;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAGO,SAASC,EAAgBC,GAA2B;AACzD,SAAOA,EAAM,WAAW,MAAM,IAC1BA,IACAF,EAAeE,CAA0B;AAC/C;AAOO,SAASC,EACdC,GACAC,GACkB;AAClB,QAAMC,IAAK,KAAK,IAAI,GAAG,GAAGF,CAAM,GAC1BG,IAAKF,KAAO,KAAK,IAAI,GAAG,GAAGD,CAAM;AACvC,SAAOG,KAAMD,IAAK,CAACA,GAAIA,IAAK,CAAC,IAAI,CAACA,GAAIC,CAAE;AAC1C;AAGO,SAASC,EAASC,GAAqB;AAC5C,MAAI,EAAEA,IAAM,MAAM,CAAC,OAAO,SAASA,CAAG;AACpC,WAAO;AAET,QAAMC,IAAO,MAAM,KAAK,MAAM,KAAK,MAAMD,CAAG,CAAC,GACvCE,IAAaF,IAAMC;AAGzB,UADEC,KAAc,IAAI,IAAIA,KAAc,IAAI,IAAIA,KAAc,IAAI,IAAI,MACtDD;AAChB;AAEA,MAAME,IAAY;AASX,SAASC,EAAUP,GAAYC,GAAYO,IAAQ,GAAa;AACrE,MAAI,EAAEP,IAAKD;AACT,WAAO,CAAA;AAET,QAAMS,IAAOP,GAAUD,IAAKD,KAAMQ,CAAK,GAEjCE,IAAU,MACVC,IAAQ,KAAK,KAAKX,IAAKS,IAAOC,CAAO,GACrCE,IAAO,KAAK,MAAMX,IAAKQ,IAAOC,CAAO,GACrCG,IAAW,KAAK,IAAI,GAAG,CAAC,KAAK,MAAM,KAAK,MAAMJ,CAAI,CAAC,CAAC,GACpDK,IAAkB,CAAA;AACxB,WAASC,IAAIJ,GAAOI,KAAKH,KAAQE,EAAM,SAASR,GAAWS,KAAK,GAAG;AACjE,UAAMC,IAAO,QAAQD,IAAIN,GAAM,QAAQI,CAAQ,CAAC;AAChD,IAAAC,EAAM,KAAKE,MAAS,IAAI,IAAIA,CAAI;AAAA,EAClC;AACA,SAAOF;AACT;AAGA,MAAMG,IAAU;AAOT,SAASC,EACdC,GACAC,GACAZ,GACQ;AACR,QAAMa,IAAO,IAAIJ,IAAU,KAAK,IAAIT,IAAQ,GAAG,CAAC;AAChD,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAGW,IAAWE,IAAOJ,IAAUG,CAAK,CAAC;AACnE;AAMO,SAASE,EACdH,GACAI,GACAC,GACQ;AACR,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAIL,IAAWI,MAASC,IAAKD,EAAK,CAAC;AACjE;"}
1
+ {"version":3,"file":"chart.js","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":"AAsBO,SAASA,EAAcC,GAA2C;AACvE,SAAO;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,EAAA,EACRA,CAAK;AACT;AAEA,MAAMC,IAAoD;AAAA,EACxD,KAAK;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAGO,SAASC,EAAgBC,GAA2B;AACzD,SAAOA,EAAM,WAAW,MAAM,IAC1BA,IACAF,EAAeE,CAA0B;AAC/C;AAOO,SAASC,EACdC,GACAC,GACkB;AAClB,QAAMC,IAAK,KAAK,IAAI,GAAG,GAAGF,CAAM,GAC1BG,IAAKF,KAAO,KAAK,IAAI,GAAG,GAAGD,CAAM;AACvC,SAAOG,KAAMD,IAAK,CAACA,GAAIA,IAAK,CAAC,IAAI,CAACA,GAAIC,CAAE;AAC1C;AAGA,SAASC,EAASC,GAAkD;AAClE,QAAMC,IAAW,KAAK,MAAM,KAAK,MAAMD,CAAG,CAAC,GACrCE,IAAaF,IAAM,MAAMC;AAC/B,SAAOC,KAAc,IACjB,EAAE,OAAO,GAAG,UAAAD,EAAA,IACZC,KAAc,IACZ,EAAE,OAAO,GAAG,UAAAD,MACZC,KAAc,IACZ,EAAE,OAAO,GAAG,UAAAD,EAAA,IACZ,EAAE,OAAO,GAAG,UAAUA,IAAW,EAAA;AAC3C;AAEA,MAAME,IAAY;AASX,SAASC,EAAUP,GAAYC,GAAYO,IAAQ,GAAa;AACrE,MAAI,EAAEP,IAAKD,MAAO,CAAC,OAAO,SAASA,CAAE,KAAK,CAAC,OAAO,SAASC,CAAE;A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OW,CAAC,CAAC;AAEtB,SAAOD;AACT;AAGA,MAAME,IAAU;AAOT,SAASC,EACdC,GACAb,GACAJ,GACQ;AACR,QAAMkB,IAAO,IAAIH,IAAU,KAAK,IAAIf,IAAQ,GAAG,CAAC;AAChD,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAGiB,IAAWC,IAAOH,IAAUX,CAAK,CAAC;AACnE;AAMO,SAASe,EACdF,GACAG,GACAC,GACQ;AACR,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAIJ,IAAWG,MAASC,IAAKD,EAAK,CAAC;AACjE;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=["KB","MB","GB","TB"];function i(e){if(e<1024)return`${e.toString()} B`;let t=e/1024,r=0;for(;t>=1024&&r<o.length-1;)t/=1024,r+=1;return`${t.toFixed(t<10?1:0)} ${o[r]??""}`}exports.formatBytes=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=["KB","MB","GB","TB"];function N(t){if(t<1024)return`${t.toString()} B`;let i=t/1024,o=0;for(;i>=1024&&o<l.length-1;)i/=1024,o+=1;return`${i.toFixed(i<10?1:0)} ${l[o]??""}`}const u=[{symbol:"ns",ms:1e-6},{symbol:"µs",ms:.001},{symbol:"ms",ms:1},{symbol:"s",ms:1e3}],y=9995e-10;function T(t){return t.toFixed(t>=99.95?0:t>=9.995?1:2)}function a(t){const i=Math.floor(t/3600),o=Math.floor(t%3600/60);return i===0?`${o.toString()} min ${(t%60).toString()} s`:`${i.toString()} h ${o.toString()} min`}function h(t){if(!Number.isFinite(t))return"—";if(t===0)return"0 ms";if(Math.abs(t)<y)return"<1 ns";if(t<0)return`-${h(-t)}`;if(t<59950){let i=0;u.forEach((e,n)=>{t>=e.ms&&(i=n)}),t/u[i].ms>=999.5&&i<u.length-1&&(i+=1);const o=u[i];return`${T(t/o.ms)} ${o.symbol}`}return a(Math.round(t/1e3))}function d(t){if(!Number.isFinite(t))return"—";const i=Math.max(Math.ceil(t/1e3),0);return i<60?`${i.toString()} s`:a(i)}const c=[{symbol:"ns",ms:1e-6,fromMs:0},{symbol:"µs",ms:.001,fromMs:.001},{symbol:"ms",ms:1,fromMs:1},{symbol:"s",ms:1e3,fromMs:1e3},{symbol:"min",ms:6e4,fromMs:3e5},{symbol:"h",ms:36e5,fromMs:18e6}],b=50,m=[1,2,5],S=1e-12;function M(t){let i=c[0];for(const o of c)t>=o.fromMs&&(i=o);return i}function $(t,i){if(!(t>0)||!Number.isFinite(t))return[];const o=t/M(t).ms*(1+S);let e=Math.floor(Math.log10(o));10**(e+1)<=o&&(e+=1);let n=m.length-1;for(;m[n]*10**e>o;)n-=1,n<0&&(n=m.length-1,e-=1);const r=[];for(;r.length<b;){const s=m[n]*10**e;if(r.length>0&&Math.floor(o/s)+1>i)break;r.push(s),n-=1,n<0&&(n=m.length-1,e-=1)}return r.reverse()}function g(t,i){if(!(t>0)||!Number.isFinite(t)||!(i>0))return[];const o=M(t),e=t/o.ms*(1+S),n=Math.max(0,-Math.floor(Math.log10(i)+1e-9)),r=[];for(let s=0;r.length<b;s+=1){const f=Number((s*i).toFixed(n));if(f>e)break;r.push({ms:Math.min(f*o.ms,t),label:`${f.toFixed(n)} ${o.symbol}`})}return r}exports.durationTickSteps=$;exports.durationTicks=g;exports.formatBytes=N;exports.formatDuration=h;exports.formatDurationEstimate=d;
2
2
  //# sourceMappingURL=format.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.cjs","sources":["../../src/lib/format.ts"],"sourcesContent":["const BYTE_UNITS = ['KB', 'MB', 'GB', 'TB'];\n\n/** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */\nexport function formatBytes(n: number): string {\n if (n < 1024) {\n return `${n.toString()} B`;\n }\n let v = n / 1024;\n let i = 0;\n while (v >= 1024 && i < BYTE_UNITS.length - 1) {\n v /= 1024;\n i += 1;\n }\n return `${v.toFixed(v < 10 ? 1 : 0)} ${BYTE_UNITS[i] ?? ''}`;\n}\n"],"names":["BYTE_UNITS","formatBytes","n","v","i"],"mappings":"gFAAA,MAAMA,EAAa,CAAC,KAAM,KAAM,KAAM,IAAI,EAGnC,SAASC,EAAYC,EAAmB,CAC7C,GAAIA,EAAI,KACN,MAAO,GAAGA,EAAE,SAAA,CAAU,KAExB,IAAIC,EAAID,EAAI,KACRE,EAAI,EACR,KAAOD,GAAK,MAAQC,EAAIJ,EAAW,OAAS,GAC1CG,GAAK,KACLC,GAAK,EAEP,MAAO,GAAGD,EAAE,QAAQA,EAAI,GAAK,EAAI,CAAC,CAAC,IAAIH,EAAWI,CAAC,GAAK,EAAE,EAC5D"}
1
+ {"version":3,"file":"format.cjs","sources":["../../src/lib/format.ts"],"sourcesContent":["const BYTE_UNITS = ['KB', 'MB', 'GB', 'TB'];\n\n/** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */\nexport function formatBytes(n: number): string {\n if (n < 1024) {\n return `${n.toString()} B`;\n }\n let v = n / 1024;\n let i = 0;\n while (v >= 1024 && i < BYTE_UNITS.length - 1) {\n v /= 1024;\n i += 1;\n }\n return `${v.toFixed(v < 10 ? 1 : 0)} ${BYTE_UNITS[i] ?? ''}`;\n}\n\ninterface DurationUnit {\n symbol: string;\n ms: number;\n}\n\nconst SUB_MINUTE_UNITS: readonly DurationUnit[] = [\n { symbol: 'ns', ms: 1e-6 },\n { symbol: 'µs', ms: 1e-3 },\n { symbol: 'ms', ms: 1 },\n { symbol: 's', ms: 1000 },\n];\n\n/** Below this a duration reads `<1 ns`: 0.9995 ns already rounds to `1.00 ns`. */\nconst SUB_NANOSECOND_MS = 0.9995e-6;\n\n/** Three significant digits, decided after rounding: `9.996` gives `10.0`. */\nfunction threeDigits(value: number): string {\n return value.toFixed(value >= 99.95 ? 0 : value >= 9.995 ? 1 : 2);\n}\n\n/** A whole number of seconds from a minute on: `2 min 3 s`, `1 h 5 min`. */\nfunction wholeMinutes(totalSeconds: number): string {\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n if (hours === 0) {\n return `${minutes.toString()} min ${(totalSeconds % 60).toString()} s`;\n }\n return `${hours.toString()} h ${minutes.toString()} min`;\n}\n\n/**\n * Formats a duration in milliseconds with three significant digits in the\n * largest unit that holds it: `512 ns`, `500 µs`, `12.3 ms`, `1.50 s`; from a\n * minute on, whole units: `2 min 3 s`, `1 h 5 min`. Anything shorter than a\n * nanosecond, either side of zero, reads `<1 ns`; other negative durations\n * take a minus sign. The micro sign is U+00B5, which the UI face draws (it\n * has no Greek mu).\n */\nexport function formatDuration(ms: number): string {\n if (!Number.isFinite(ms)) {\n return '—';\n }\n if (ms === 0) {\n return '0 ms';\n }\n if (Math.abs(ms) < SUB_NANOSECOND_MS) {\n return '<1 ns';\n }\n if (ms < 0) {\n return `-${formatDuration(-ms)}`;\n }\n if (ms < 59_950) {\n let index = 0;\n SUB_MINUTE_UNITS.forEach((unit, i) => {\n if (ms >= unit.ms) {\n index = i;\n }\n });\n if (\n ms / SUB_MINUTE_UNITS[index].ms >= 999.5 &&\n index < SUB_MINUTE_UNITS.length - 1\n ) {\n index += 1;\n }\n const unit = SUB_MINUTE_UNITS[index];\n return `${threeDigits(ms / unit.ms)} ${unit.symbol}`;\n }\n return wholeMinutes(Math.round(ms / 1000));\n}\n\n/**\n * Formats an estimate, such as the time left on an upload, in whole seconds\n * rounded up, since tenths of a second are noise there: `45 s`, `2 min 3 s`,\n * `1 h 5 min`.\n */\nexport function formatDurationEstimate(ms: number): string {\n if (!Number.isFinite(ms)) {\n return '—';\n }\n const totalSeconds = Math.max(Math.ceil(ms / 1000), 0);\n return totalSeconds < 60\n ? `${totalSeconds.toString()} s`\n : wholeMinutes(totalSeconds);\n}\n\n/**\n * The units a duration axis labels its ticks in, each from the range at\n * which it takes over. Minutes and hours wait until the range holds five, so\n * a range of a few minutes reads in round seconds.\n */\nconst AXIS_UNITS: ReadonlyArray<DurationUnit & { fromMs: number }> = [\n { symbol: 'ns', ms: 1e-6, fromMs: 0 },\n { symbol: 'µs', ms: 1e-3, fromMs: 1e-3 },\n { symbol: 'ms', ms: 1, fromMs: 1 },\n { symbol: 's', ms: 1000, fromMs: 1000 },\n { symbol: 'min', ms: 60_000, fromMs: 300_000 },\n { symbol: 'h', ms: 3_600_000, fromMs: 18_000_000 },\n];\n\nexport interface DurationTick {\n /** Offset from the start of the axis, in ms. */\n ms: number;\n label: string;\n}\n\nconst MAX_DURATION_TICKS = 50;\nconst NICE_MANTISSAS = [1, 2, 5];\n/** Absorbs the rounding of a tick computed as index × step. */\nconst RANGE_TOLERANCE = 1e-12;\n\nfunction axisUnit(rangeMs: number): DurationUnit {\n let unit = AXIS_UNITS[0];\n for (const candidate of AXIS_UNITS) {\n if (rangeMs >= candidate.fromMs) {\n unit = candidate;\n }\n }\n return unit;\n}\n\n/**\n * The steps a duration axis over `rangeMs` can tick at, densest first: the\n * 1, 2 and 5 × 10ⁿ values of the unit the range calls for that give between\n * two and `maxTicks` ticks. The last always gives at least two, so the list\n * has an entry for any positive range.\n */\nexport function durationTickSteps(rangeMs: number, maxTicks: number): number[] {\n if (!(rangeMs > 0) || !Number.isFinite(rangeMs)) {\n return [];\n }\n const limit = (rangeMs / axisUnit(rangeMs).ms) * (1 + RANGE_TOLERANCE);\n // Start from the largest step that still reaches a second tick.\n // Math.log10 can land a hair below a power of ten.\n let exponent = Math.floor(Math.log10(limit));\n if (10 ** (exponent + 1) <= limit) {\n exponent += 1;\n }\n let mantissa = NICE_MANTISSAS.length - 1;\n while (NICE_MANTISSAS[mantissa] * 10 ** exponent > limit) {\n mantissa -= 1;\n if (mantissa < 0) {\n mantissa = NICE_MANTISSAS.length - 1;\n exponent -= 1;\n }\n }\n const steps: number[] = [];\n while (steps.length < MAX_DURATION_TICKS) {\n const step = NICE_MANTISSAS[mantissa] * 10 ** exponent;\n if (steps.length > 0 && Math.floor(limit / step) + 1 > maxTicks) {\n break;\n }\n steps.push(step);\n mantissa -= 1;\n if (mantissa < 0) {\n mantissa = NICE_MANTISSAS.length - 1;\n exponent -= 1;\n }\n }\n return steps.reverse();\n}\n\n/**\n * The ticks from 0 to `rangeMs` every `step`, one of\n * `durationTickSteps(rangeMs, …)`, never one past `rangeMs`. Every tick is\n * labelled in the one unit the range calls for, with the decimals the step\n * needs: `0.0 s | 0.5 s | 1.0 s`, never a mix such as `500 ms | 1.00 s`.\n */\nexport function durationTicks(rangeMs: number, step: number): DurationTick[] {\n if (!(rangeMs > 0) || !Number.isFinite(rangeMs) || !(step > 0)) {\n return [];\n }\n const unit = axisUnit(rangeMs);\n const limit = (rangeMs / unit.ms) * (1 + RANGE_TOLERANCE);\n const decimals = Math.max(0, -Math.floor(Math.log10(step) + 1e-9));\n const ticks: DurationTick[] = [];\n for (let i = 0; ticks.length < MAX_DURATION_TICKS; i += 1) {\n const value = Number((i * step).toFixed(decimals));\n if (value > limit) {\n break;\n }\n ticks.push({\n ms: Math.min(value * unit.ms, rangeMs),\n label: `${value.toFixed(decimals)} ${unit.symbol}`,\n });\n }\n return ticks;\n}\n"],"names":["BYTE_UNITS","formatBytes","n","v","i","SUB_MINUTE_UNITS","SUB_NANOSECOND_MS","threeDigits","value","wholeMinutes","totalSeconds","hours","minutes","formatDuration","ms","index","unit","formatDurationEstimate","AXIS_UNITS","MAX_DURATION_TICKS","NICE_MANTISSAS","RANGE_TOLERANCE","axisUnit","rangeMs","candidate","durationTickSteps","maxTicks","limit","exponent","mantissa","steps","step","durationTicks","decimals","ticks"],"mappings":"gFAAA,MAAMA,EAAa,CAAC,KAAM,KAAM,KAAM,IAAI,EAGnC,SAASC,EAAYC,EAAmB,CAC7C,GAAIA,EAAI,KACN,MAAO,GAAGA,EAAE,SAAA,CAAU,KAExB,IAAIC,EAAID,EAAI,KACRE,EAAI,EACR,KAAOD,GAAK,MAAQC,EAAIJ,EAAW,OAAS,GAC1CG,GAAK,KACLC,GAAK,EAEP,MAAO,GAAGD,EAAE,QAAQA,EA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Q,EAAI,IAAMD,EAC9C,GAAIE,EAAM,OAAS,GAAK,KAAK,MAAMH,EAAQI,CAAI,EAAI,EAAIL,EACrD,MAEFI,EAAM,KAAKC,CAAI,EACfF,GAAY,EACRA,EAAW,IACbA,EAAWT,EAAe,OAAS,EACnCQ,GAAY,EAEhB,CACA,OAAOE,EAAM,QAAA,CACf,CAQO,SAASE,EAAcT,EAAiBQ,EAA8B,CAC3E,GAAI,EAAER,EAAU,IAAM,CAAC,OAAO,SAASA,CAAO,GAAK,EAAEQ,EAAO,GAC1D,MAAO,CAAA,EAET,MAAMf,EAAOM,EAASC,CAAO,EACvBI,EAASJ,EAAUP,EAAK,IAAO,EAAIK,GACnCY,EAAW,KAAK,IAAI,EAAG,CAAC,KAAK,MAAM,KAAK,MAAMF,CAAI,EAAI,IAAI,CAAC,EAC3DG,EAAwB,CAAA,EAC9B,QAAS9B,EAAI,EAAG8B,EAAM,OAASf,EAAoBf,GAAK,EAAG,CACzD,MAAMI,EAAQ,QAAQJ,EAAI2B,GAAM,QAAQE,CAAQ,CAAC,EACjD,GAAIzB,EAAQmB,EACV,MAEFO,EAAM,KAAK,CACT,GAAI,KAAK,IAAI1B,EAAQQ,EAAK,GAAIO,CAAO,EACrC,MAAO,GAAGf,EAAM,QAAQyB,CAAQ,CAAC,IAAIjB,EAAK,MAAM,EAAA,CACjD,CACH,CACA,OAAOkB,CACT"}
@@ -1,2 +1,36 @@
1
1
  /** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */
2
2
  export declare function formatBytes(n: number): string;
3
+ /**
4
+ * Formats a duration in milliseconds with three significant digits in the
5
+ * largest unit that holds it: `512 ns`, `500 µs`, `12.3 ms`, `1.50 s`; from a
6
+ * minute on, whole units: `2 min 3 s`, `1 h 5 min`. Anything shorter than a
7
+ * nanosecond, either side of zero, reads `<1 ns`; other negative durations
8
+ * take a minus sign. The micro sign is U+00B5, which the UI face draws (it
9
+ * has no Greek mu).
10
+ */
11
+ export declare function formatDuration(ms: number): string;
12
+ /**
13
+ * Formats an estimate, such as the time left on an upload, in whole seconds
14
+ * rounded up, since tenths of a second are noise there: `45 s`, `2 min 3 s`,
15
+ * `1 h 5 min`.
16
+ */
17
+ export declare function formatDurationEstimate(ms: number): string;
18
+ export interface DurationTick {
19
+ /** Offset from the start of the axis, in ms. */
20
+ ms: number;
21
+ label: string;
22
+ }
23
+ /**
24
+ * The steps a duration axis over `rangeMs` can tick at, densest first: the
25
+ * 1, 2 and 5 × 10ⁿ values of the unit the range calls for that give between
26
+ * two and `maxTicks` ticks. The last always gives at least two, so the list
27
+ * has an entry for any positive range.
28
+ */
29
+ export declare function durationTickSteps(rangeMs: number, maxTicks: number): number[];
30
+ /**
31
+ * The ticks from 0 to `rangeMs` every `step`, one of
32
+ * `durationTickSteps(rangeMs, …)`, never one past `rangeMs`. Every tick is
33
+ * labelled in the one unit the range calls for, with the decimals the step
34
+ * needs: `0.0 s | 0.5 s | 1.0 s`, never a mix such as `500 ms | 1.00 s`.
35
+ */
36
+ export declare function durationTicks(rangeMs: number, step: number): DurationTick[];
@@ -1,13 +1,102 @@
1
- const B = ["KB", "MB", "GB", "TB"];
2
- function i(e) {
3
- if (e < 1024)
4
- return `${e.toString()} B`;
5
- let t = e / 1024, r = 0;
6
- for (; t >= 1024 && r < B.length - 1; )
7
- t /= 1024, r += 1;
8
- return `${t.toFixed(t < 10 ? 1 : 0)} ${B[r] ?? ""}`;
1
+ const l = ["KB", "MB", "GB", "TB"];
2
+ function $(t) {
3
+ if (t < 1024)
4
+ return `${t.toString()} B`;
5
+ let n = t / 1024, i = 0;
6
+ for (; n >= 1024 && i < l.length - 1; )
7
+ n /= 1024, i += 1;
8
+ return `${n.toFixed(n < 10 ? 1 : 0)} ${l[i] ?? ""}`;
9
+ }
10
+ const f = [
11
+ { symbol: "ns", ms: 1e-6 },
12
+ { symbol: "µs", ms: 1e-3 },
13
+ { symbol: "ms", ms: 1 },
14
+ { symbol: "s", ms: 1e3 }
15
+ ], S = 9995e-10;
16
+ function N(t) {
17
+ return t.toFixed(t >= 99.95 ? 0 : t >= 9.995 ? 1 : 2);
18
+ }
19
+ function h(t) {
20
+ const n = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60);
21
+ return n === 0 ? `${i.toString()} min ${(t % 60).toString()} s` : `${n.toString()} h ${i.toString()} min`;
22
+ }
23
+ function y(t) {
24
+ if (!Number.isFinite(t))
25
+ return "—";
26
+ if (t === 0)
27
+ return "0 ms";
28
+ if (Math.abs(t) < S)
29
+ return "<1 ns";
30
+ if (t < 0)
31
+ return `-${y(-t)}`;
32
+ if (t < 59950) {
33
+ let n = 0;
34
+ f.forEach((e, o) => {
35
+ t >= e.ms && (n = o);
36
+ }), t / f[n].ms >= 999.5 && n < f.length - 1 && (n += 1);
37
+ const i = f[n];
38
+ return `${N(t / i.ms)} ${i.symbol}`;
39
+ }
40
+ return h(Math.round(t / 1e3));
41
+ }
42
+ function T(t) {
43
+ if (!Number.isFinite(t))
44
+ return "—";
45
+ const n = Math.max(Math.ceil(t / 1e3), 0);
46
+ return n < 60 ? `${n.toString()} s` : h(n);
47
+ }
48
+ const c = [
49
+ { symbol: "ns", ms: 1e-6, fromMs: 0 },
50
+ { symbol: "µs", ms: 1e-3, fromMs: 1e-3 },
51
+ { symbol: "ms", ms: 1, fromMs: 1 },
52
+ { symbol: "s", ms: 1e3, fromMs: 1e3 },
53
+ { symbol: "min", ms: 6e4, fromMs: 3e5 },
54
+ { symbol: "h", ms: 36e5, fromMs: 18e6 }
55
+ ], a = 50, m = [1, 2, 5], b = 1e-12;
56
+ function M(t) {
57
+ let n = c[0];
58
+ for (const i of c)
59
+ t >= i.fromMs && (n = i);
60
+ return n;
61
+ }
62
+ function d(t, n) {
63
+ if (!(t > 0) || !Number.isFinite(t))
64
+ return [];
65
+ const i = t / M(t).ms * (1 + b);
66
+ let e = Math.floor(Math.log10(i));
67
+ 10 ** (e + 1) <= i && (e += 1);
68
+ let o = m.length - 1;
69
+ for (; m[o] * 10 ** e > i; )
70
+ o -= 1, o < 0 && (o = m.length - 1, e -= 1);
71
+ const s = [];
72
+ for (; s.length < a; ) {
73
+ const r = m[o] * 10 ** e;
74
+ if (s.length > 0 && Math.floor(i / r) + 1 > n)
75
+ break;
76
+ s.push(r), o -= 1, o < 0 && (o = m.length - 1, e -= 1);
77
+ }
78
+ return s.reverse();
79
+ }
80
+ function g(t, n) {
81
+ if (!(t > 0) || !Number.isFinite(t) || !(n > 0))
82
+ return [];
83
+ const i = M(t), e = t / i.ms * (1 + b), o = Math.max(0, -Math.floor(Math.log10(n) + 1e-9)), s = [];
84
+ for (let r = 0; s.length < a; r += 1) {
85
+ const u = Number((r * n).toFixed(o));
86
+ if (u > e)
87
+ break;
88
+ s.push({
89
+ ms: Math.min(u * i.ms, t),
90
+ label: `${u.toFixed(o)} ${i.symbol}`
91
+ });
92
+ }
93
+ return s;
9
94
  }
10
95
  export {
11
- i as formatBytes
96
+ d as durationTickSteps,
97
+ g as durationTicks,
98
+ $ as formatBytes,
99
+ y as formatDuration,
100
+ T as formatDurationEstimate
12
101
  };
13
102
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sources":["../../src/lib/format.ts"],"sourcesContent":["const BYTE_UNITS = ['KB', 'MB', 'GB', 'TB'];\n\n/** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */\nexport function formatBytes(n: number): string {\n if (n < 1024) {\n return `${n.toString()} B`;\n }\n let v = n / 1024;\n let i = 0;\n while (v >= 1024 && i < BYTE_UNITS.length - 1) {\n v /= 1024;\n i += 1;\n }\n return `${v.toFixed(v < 10 ? 1 : 0)} ${BYTE_UNITS[i] ?? ''}`;\n}\n"],"names":["BYTE_UNITS","formatBytes","n","v","i"],"mappings":"AAAA,MAAMA,IAAa,CAAC,MAAM,MAAM,MAAM,IAAI;AAGnC,SAASC,EAAYC,GAAmB;AAC7C,MAAIA,IAAI;AACN,WAAO,GAAGA,EAAE,SAAA,CAAU;AAExB,MAAIC,IAAID,IAAI,MACRE,IAAI;AACR,SAAOD,KAAK,QAAQC,IAAIJ,EAAW,SAAS;AAC1C,IAAAG,KAAK,MACLC,KAAK;AAEP,SAAO,GAAGD,EAAE,QAAQA,IAAI,KAAK,IAAI,CAAC,CAAC,IAAIH,EAAWI,CAAC,KAAK,EAAE;AAC5D;"}
1
+ {"version":3,"file":"format.js","sources":["../../src/lib/format.ts"],"sourcesContent":["const BYTE_UNITS = ['KB', 'MB', 'GB', 'TB'];\n\n/** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */\nexport function formatBytes(n: number): string {\n if (n < 1024) {\n return `${n.toString()} B`;\n }\n let v = n / 1024;\n let i = 0;\n while (v >= 1024 && i < BYTE_UNITS.length - 1) {\n v /= 1024;\n i += 1;\n }\n return `${v.toFixed(v < 10 ? 1 : 0)} ${BYTE_UNITS[i] ?? ''}`;\n}\n\ninterface DurationUnit {\n symbol: string;\n ms: number;\n}\n\nconst SUB_MINUTE_UNITS: readonly DurationUnit[] = [\n { symbol: 'ns', ms: 1e-6 },\n { symbol: 'µs', ms: 1e-3 },\n { symbol: 'ms', ms: 1 },\n { symbol: 's', ms: 1000 },\n];\n\n/** Below this a duration reads `<1 ns`: 0.9995 ns already rounds to `1.00 ns`. */\nconst SUB_NANOSECOND_MS = 0.9995e-6;\n\n/** Three significant digits, decided after rounding: `9.996` gives `10.0`. */\nfunction threeDigits(value: number): string {\n return value.toFixed(value >= 99.95 ? 0 : value >= 9.995 ? 1 : 2);\n}\n\n/** A whole number of seconds from a minute on: `2 min 3 s`, `1 h 5 min`. */\nfunction wholeMinutes(totalSeconds: number): string {\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n if (hours === 0) {\n return `${minutes.toString()} min ${(totalSeconds % 60).toString()} s`;\n }\n return `${hours.toString()} h ${minutes.toString()} min`;\n}\n\n/**\n * Formats a duration in milliseconds with three significant digits in the\n * largest unit that holds it: `512 ns`, `500 µs`, `12.3 ms`, `1.50 s`; from a\n * minute on, whole units: `2 min 3 s`, `1 h 5 min`. Anything shorter than a\n * nanosecond, either side of zero, reads `<1 ns`; other negative durations\n * take a minus sign. The micro sign is U+00B5, which the UI face draws (it\n * has no Greek mu).\n */\nexport function formatDuration(ms: number): string {\n if (!Number.isFinite(ms)) {\n return '—';\n }\n if (ms === 0) {\n return '0 ms';\n }\n if (Math.abs(ms) < SUB_NANOSECOND_MS) {\n return '<1 ns';\n }\n if (ms < 0) {\n return `-${formatDuration(-ms)}`;\n }\n if (ms < 59_950) {\n let index = 0;\n SUB_MINUTE_UNITS.forEach((unit, i) => {\n if (ms >= unit.ms) {\n index = i;\n }\n });\n if (\n ms / SUB_MINUTE_UNITS[index].ms >= 999.5 &&\n index < SUB_MINUTE_UNITS.length - 1\n ) {\n index += 1;\n }\n const unit = SUB_MINUTE_UNITS[index];\n return `${threeDigits(ms / unit.ms)} ${unit.symbol}`;\n }\n return wholeMinutes(Math.round(ms / 1000));\n}\n\n/**\n * Formats an estimate, such as the time left on an upload, in whole seconds\n * rounded up, since tenths of a second are noise there: `45 s`, `2 min 3 s`,\n * `1 h 5 min`.\n */\nexport function formatDurationEstimate(ms: number): string {\n if (!Number.isFinite(ms)) {\n return '—';\n }\n const totalSeconds = Math.max(Math.ceil(ms / 1000), 0);\n return totalSeconds < 60\n ? `${totalSeconds.toString()} s`\n : wholeMinutes(totalSeconds);\n}\n\n/**\n * The units a duration axis labels its ticks in, each from the range at\n * which it takes over. Minutes and hours wait until the range holds five, so\n * a range of a few minutes reads in round seconds.\n */\nconst AXIS_UNITS: ReadonlyArray<DurationUnit & { fromMs: number }> = [\n { symbol: 'ns', ms: 1e-6, fromMs: 0 },\n { symbol: 'µs', ms: 1e-3, fromMs: 1e-3 },\n { symbol: 'ms', ms: 1, fromMs: 1 },\n { symbol: 's', ms: 1000, fromMs: 1000 },\n { symbol: 'min', ms: 60_000, fromMs: 300_000 },\n { symbol: 'h', ms: 3_600_000, fromMs: 18_000_000 },\n];\n\nexport interface DurationTick {\n /** Offset from the start of the axis, in ms. */\n ms: number;\n label: string;\n}\n\nconst MAX_DURATION_TICKS = 50;\nconst NICE_MANTISSAS = [1, 2, 5];\n/** Absorbs the rounding of a tick computed as index × step. */\nconst RANGE_TOLERANCE = 1e-12;\n\nfunction axisUnit(rangeMs: number): DurationUnit {\n let unit = AXIS_UNITS[0];\n for (const candidate of AXIS_UNITS) {\n if (rangeMs >= candidate.fromMs) {\n unit = candidate;\n }\n }\n return unit;\n}\n\n/**\n * The steps a duration axis over `rangeMs` can tick at, densest first: the\n * 1, 2 and 5 × 10ⁿ values of the unit the range calls for that give between\n * two and `maxTicks` ticks. The last always gives at least two, so the list\n * has an entry for any positive range.\n */\nexport function durationTickSteps(rangeMs: number, maxTicks: number): number[] {\n if (!(rangeMs > 0) || !Number.isFinite(rangeMs)) {\n return [];\n }\n const limit = (rangeMs / axisUnit(rangeMs).ms) * (1 + RANGE_TOLERANCE);\n // Start from the largest step that still reaches a second tick.\n // Math.log10 can land a hair below a power of ten.\n let exponent = Math.floor(Math.log10(limit));\n if (10 ** (exponent + 1) <= limit) {\n exponent += 1;\n }\n let mantissa = NICE_MANTISSAS.length - 1;\n while (NICE_MANTISSAS[mantissa] * 10 ** exponent > limit) {\n mantissa -= 1;\n if (mantissa < 0) {\n mantissa = NICE_MANTISSAS.length - 1;\n exponent -= 1;\n }\n }\n const steps: number[] = [];\n while (steps.length < MAX_DURATION_TICKS) {\n const step = NICE_MANTISSAS[mantissa] * 10 ** exponent;\n if (steps.length > 0 && Math.floor(limit / step) + 1 > maxTicks) {\n break;\n }\n steps.push(step);\n mantissa -= 1;\n if (mantissa < 0) {\n mantissa = NICE_MANTISSAS.length - 1;\n exponent -= 1;\n }\n }\n return steps.reverse();\n}\n\n/**\n * The ticks from 0 to `rangeMs` every `step`, one of\n * `durationTickSteps(rangeMs, …)`, never one past `rangeMs`. Every tick is\n * labelled in the one unit the range calls for, with the decimals the step\n * needs: `0.0 s | 0.5 s | 1.0 s`, never a mix such as `500 ms | 1.00 s`.\n */\nexport function durationTicks(rangeMs: number, step: number): DurationTick[] {\n if (!(rangeMs > 0) || !Number.isFinite(rangeMs) || !(step > 0)) {\n return [];\n }\n const unit = axisUnit(rangeMs);\n const limit = (rangeMs / unit.ms) * (1 + RANGE_TOLERANCE);\n const decimals = Math.max(0, -Math.floor(Math.log10(step) + 1e-9));\n const ticks: DurationTick[] = [];\n for (let i = 0; ticks.length < MAX_DURATION_TICKS; i += 1) {\n const value = Number((i * step).toFixed(decimals));\n if (value > limit) {\n break;\n }\n ticks.push({\n ms: Math.min(value * unit.ms, rangeMs),\n label: `${value.toFixed(decimals)} ${unit.symbol}`,\n });\n }\n return ticks;\n}\n"],"names":["BYTE_UNITS","formatBytes","n","v","SUB_MINUTE_UNITS","SUB_NANOSECOND_MS","threeDigits","value","wholeMinutes","totalSeconds","hours","minutes","formatDuration","ms","index","unit","i","formatDurationEstimate","AXIS_UNITS","MAX_DURATION_TICKS","NICE_MANTISSAS","RANGE_TOLERANCE","axisUnit","rangeMs","candidate","durationTickSteps","maxTicks","limit","exponent","mantissa","steps","step","durationTicks","decimals","ticks"],"mappings":"AAAA,MAAMA,IAAa,CAAC,MAAM,MAAM,MAAM,IAAI;AAGnC,SAASC,EAAYC,GAAmB;AAC7C,MAAIA,IAAI;AACN,WAAO,GAAGA,EAAE,SAAA,CAAU;AAExB,MAAIC,IAAID,IAAI,MACR,IAAI;AACR,SAAOC,KAAK,QAAQ,IAAIH,EAAW,SAAS;AAC1C,IAAAG,KAAK,MACL,KAAK;AAEP,SAAO,GAAGA,EAAE,QAAQA,IAAI,KAAK,IAAI,CAAC,CAAC,IAAIH,EAAW,CAAC,KAAK,EAAE;AAC5D;AAOA,MAAMI,IAA4C;AAAA,EAChD,EAAE,QAAQ,MAAM,IAAI,KAAA;AAAA,EACpB,EAAE,QAAQ,MAAM,IAAI,KAAA;AAAA,EACpB,EAAE,QAAQ,MAAM,IAAI,EAAA;AAA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C,CAAI,GACfF,KAAY,GACRA,IAAW,MACbA,IAAWT,EAAe,SAAS,GACnCQ,KAAY;AAAA,EAEhB;AACA,SAAOE,EAAM,QAAA;AACf;AAQO,SAASE,EAAcT,GAAiBQ,GAA8B;AAC3E,MAAI,EAAER,IAAU,MAAM,CAAC,OAAO,SAASA,CAAO,KAAK,EAAEQ,IAAO;AAC1D,WAAO,CAAA;AAET,QAAMhB,IAAOO,EAASC,CAAO,GACvBI,IAASJ,IAAUR,EAAK,MAAO,IAAIM,IACnCY,IAAW,KAAK,IAAI,GAAG,CAAC,KAAK,MAAM,KAAK,MAAMF,CAAI,IAAI,IAAI,CAAC,GAC3DG,IAAwB,CAAA;AAC9B,WAASlB,IAAI,GAAGkB,EAAM,SAASf,GAAoBH,KAAK,GAAG;AACzD,UAAMT,IAAQ,QAAQS,IAAIe,GAAM,QAAQE,CAAQ,CAAC;AACjD,QAAI1B,IAAQoB;AACV;AAEF,IAAAO,EAAM,KAAK;AAAA,MACT,IAAI,KAAK,IAAI3B,IAAQQ,EAAK,IAAIQ,CAAO;AAAA,MACrC,OAAO,GAAGhB,EAAM,QAAQ0B,CAAQ,CAAC,IAAIlB,EAAK,MAAM;AAAA,IAAA,CACjD;AAAA,EACH;AACA,SAAOmB;AACT;"}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=/[A-Za-z0-9_.]/,k=["AND","OR","NOT"];function p(t){return t===" "||t===" "||t===`
2
- `}function f(t,c){let n=!1,s=!1,e=0;for(let r=0;r<c;r++){const i=t[r];if(s){s=!1;continue}if(i==="\\"&&n){s=!0;continue}if(i==='"'){n=!n,n?e=r:e=r+1;continue}!n&&(p(i)||i==="("||i===")")&&(e=r+1)}return e}function h(t,c){const n=Math.max(0,Math.min(c,t.length));if(t.length===0)return{kind:"empty"};const s=f(t,n),e=t.slice(s,n);if(e.length===0)return{kind:"empty"};const r=e.indexOf('"');if(r>=0){const o=e.slice(0,r),l=o.indexOf(":");if(l>=0){const u=o.slice(0,l),d=e.slice(r+1);return{kind:"value-start",field:u,prefix:d}}return{kind:"empty"}}const i=e.indexOf(":");if(i>=0){const o=e.slice(0,i),l=e.slice(i+1);return{kind:"value-start",field:o,prefix:l}}const a=e.toUpperCase();return e.length>0&&e===a&&k.some(o=>o.startsWith(a))?{kind:"operator",prefix:e}:x.test(e[0])?{kind:"field-start",prefix:e}:{kind:"empty"}}function m(t,c,n){const s=Math.max(0,Math.min(c,t.length)),e=f(t,s);return{value:t.slice(0,e)+n+t.slice(s),caret:e+n.length}}exports.replaceTokenAtCursor=m;exports.tokenizeAtCursor=h;
2
+ `}function f(t,c){let n=!1,o=!1,e=0;for(let r=0;r<c;r++){const i=t[r];if(o){o=!1;continue}if(i==="\\"&&n){o=!0;continue}if(i==='"'){n=!n,n||(e=r+1);continue}!n&&(p(i)||i==="("||i===")")&&(e=r+1)}return e}function h(t,c){const n=Math.max(0,Math.min(c,t.length));if(t.length===0)return{kind:"empty"};const o=f(t,n),e=t.slice(o,n);if(e.length===0)return{kind:"empty"};const r=e.indexOf('"');if(r>=0){const s=e.slice(0,r),l=s.indexOf(":");if(l>=0){const u=s.slice(0,l),d=e.slice(r+1);return{kind:"value-start",field:u,prefix:d}}return{kind:"empty"}}const i=e.indexOf(":");if(i>=0){const s=e.slice(0,i),l=e.slice(i+1);return{kind:"value-start",field:s,prefix:l}}const a=e.toUpperCase();return e.length>0&&e===a&&k.some(s=>s.startsWith(a))?{kind:"operator",prefix:e}:x.test(e[0])?{kind:"field-start",prefix:e}:{kind:"empty"}}function m(t,c,n){const o=Math.max(0,Math.min(c,t.length)),e=f(t,o);return{value:t.slice(0,e)+n+t.slice(o),caret:e+n.length}}exports.replaceTokenAtCursor=m;exports.tokenizeAtCursor=h;
3
3
  //# sourceMappingURL=tokenizeAtCursor.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokenizeAtCursor.cjs","sources":["../../../src/lib/luceneQuery/tokenizeAtCursor.ts"],"sourcesContent":["// Cursor-position tokenizer for the QueryAutocomplete LuceneQL input.\n// Idiom borrowed from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/hooks/useAutoCompleteOptions.tsx\n//\n// This is intentionally a small character-level scanner that walks backward\n// from the caret to find the boundary of the active token. It deliberately\n// does NOT run the full Lucene parser — partial / unparseable input must\n// still produce a suggestion.\nexport type CursorToken =\n | { kind: 'field-start'; prefix: string }\n | { kind: 'value-start'; field: string; prefix: string }\n | { kind: 'operator'; prefix: string }\n | { kind: 'empty' };\n\nconst IDENT_RE = /[A-Za-z0-9_.]/;\nconst OPERATOR_KEYWORDS = ['AND', 'OR', 'NOT'];\n\nfunction isWhitespace(ch: string): boolean {\n return ch === ' ' || ch === '\\t' || ch === '\\n';\n}\n\n/** Walk backward from `caret` to the first whitespace-or-paren boundary that\n * is not inside a double-quoted region. Returns the start index of the token\n * the caret sits inside (which may equal `caret` if the caret is at a\n * boundary). */\nfunction tokenStart(input: string, caret: number): number {\n // First pass: scan forward from start of string, tracking quote state, to\n // figure out whether `caret` is currently inside a quoted region.\n let inQuotes = false;\n let escaped = false;\n let lastBoundary = 0;\n for (let i = 0; i < caret; i++) {\n const ch = input[i];\n if (escaped) {\n escaped = false;\n continue;\n }\n if (ch === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (ch === '\"') {\n inQuotes = !inQuotes;\n if (!inQuotes) {\n // closing quote → boundary after it\n lastBoundary = i + 1;\n } else {\n lastBoundary = i;\n }\n continue;\n }\n if (!inQuotes && (isWhitespace(ch) || ch === '(' || ch === ')')) {\n lastBoundary = i + 1;\n }\n }\n return lastBoundary;\n}\n\nexport function tokenizeAtCursor(input: string, caret: number): CursorToken {\n const clamped = Math.max(0, Math.min(caret, input.length));\n if (input.length === 0) {\n return { kind: 'empty' };\n }\n const start = tokenStart(input, clamped);\n const slice = input.slice(start, clamped);\n\n // Pure whitespace → empty position.\n if (slice.length === 0) {\n return { kind: 'empty' };\n }\n\n // Quoted value: `field:\"…` — caret inside the quoted region.\n const quoteIdx = slice.indexOf('\"');\n if (quoteIdx >= 0) {\n const before = slice.slice(0, quoteIdx);\n const colonIdx = before.indexOf(':');\n if (colonIdx >= 0) {\n const field = before.slice(0, colonIdx);\n const prefix = slice.slice(quoteIdx + 1);\n return { kind: 'value-start', field, prefix };\n }\n return { kind: 'empty' };\n }\n\n // `field:value` — split on the first colon.\n const colonIdx = slice.indexOf(':');\n if (colonIdx >= 0) {\n const field = slice.slice(0, colonIdx);\n const prefix = slice.slice(colonIdx + 1);\n return { kind: 'value-start', field, prefix };\n }\n\n // No colon: this is either a field-name partial or an operator partial.\n // Treat any all-uppercase prefix that matches one of AND / OR / NOT as an\n // operator suggestion — otherwise rank it as a field name.\n const upper = slice.toUpperCase();\n if (\n slice.length > 0 &&\n slice === upper &&\n OPERATOR_KEYWORDS.some((kw) => kw.startsWith(upper))\n ) {\n return { kind: 'operator', prefix: slice };\n }\n\n // Reject obvious non-identifiers (e.g. punctuation only).\n if (!IDENT_RE.test(slice[0])) {\n return { kind: 'empty' };\n }\n\n return { kind: 'field-start', prefix: slice };\n}\n\n/** Replace the token under the caret with `replacement`. Returns the new\n * input and the caret position after the replacement (right after the\n * inserted text). Used by QueryAutocomplete to commit a suggestion. */\nexport function replaceTokenAtCursor(\n input: string,\n caret: number,\n replacement: string,\n): { value: string; caret: number } {\n const clamped = Math.max(0, Math.min(caret, input.length));\n const start = tokenStart(input, clamped);\n const next = input.slice(0, start) + replacement + input.slice(clamped);\n return { value: next, caret: start + replacement.length };\n}\n"],"names":["IDENT_RE","OPERATOR_KEYWORDS","isWhitespace","ch","tokenStart","input","caret","inQuotes","escaped","lastBoundary","i","tokenizeAtCursor","clamped","start","slice","quoteIdx","before","colonIdx","field","prefix","upper","kw","replaceTokenAtCursor","replacement"],"mappings":"gFAcA,MAAMA,EAAW,gBACXC,EAAoB,CAAC,MAAO,KAAM,KAAK,EAE7C,SAASC,EAAa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AAIG,GAAY,EAAG,CACjB,MAAMC,EAAQJ,EAAM,MAAM,EAAGG,CAAQ,EAC/BE,EAASL,EAAM,MAAMG,EAAW,CAAC,EACvC,MAAO,CAAE,KAAM,cAAe,MAAAC,EAAO,OAAAC,CAAA,CACvC,CAKA,MAAMC,EAAQN,EAAM,YAAA,EACpB,OACEA,EAAM,OAAS,GACfA,IAAUM,GACVnB,EAAkB,KAAMoB,GAAOA,EAAG,WAAWD,CAAK,CAAC,EAE5C,CAAE,KAAM,WAAY,OAAQN,CAAA,EAIhCd,EAAS,KAAKc,EAAM,CAAC,CAAC,EAIpB,CAAE,KAAM,cAAe,OAAQA,CAAA,EAH7B,CAAE,KAAM,OAAA,CAInB,CAKO,SAASQ,EACdjB,EACAC,EACAiB,EACkC,CAClC,MAAMX,EAAU,KAAK,IAAI,EAAG,KAAK,IAAIN,EAAOD,EAAM,MAAM,CAAC,EACnDQ,EAAQT,EAAWC,EAAOO,CAAO,EAEvC,MAAO,CAAE,MADIP,EAAM,MAAM,EAAGQ,CAAK,EAAIU,EAAclB,EAAM,MAAMO,CAAO,EAChD,MAAOC,EAAQU,EAAY,MAAA,CACnD"}
1
+ {"version":3,"file":"tokenizeAtCursor.cjs","sources":["../../../src/lib/luceneQuery/tokenizeAtCursor.ts"],"sourcesContent":["// Cursor-position tokenizer for the QueryAutocomplete LuceneQL input.\n// Idiom borrowed from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/hooks/useAutoCompleteOptions.tsx\n//\n// This is intentionally a small character-level scanner that walks backward\n// from the caret to find the boundary of the active token. It deliberately\n// does NOT run the full Lucene parser — partial / unparseable input must\n// still produce a suggestion.\nexport type CursorToken =\n | { kind: 'field-start'; prefix: string }\n | { kind: 'value-start'; field: string; prefix: string }\n | { kind: 'operator'; prefix: string }\n | { kind: 'empty' };\n\nconst IDENT_RE = /[A-Za-z0-9_.]/;\nconst OPERATOR_KEYWORDS = ['AND', 'OR', 'NOT'];\n\nfunction isWhitespace(ch: string): boolean {\n return ch === ' ' || ch === '\\t' || ch === '\\n';\n}\n\n/** Walk backward from `caret` to the first whitespace-or-paren boundary that\n * is not inside a double-quoted region. Returns the start index of the token\n * the caret sits inside (which may equal `caret` if the caret is at a\n * boundary). An opening quote stays part of its token, so inside\n * `field:\"…` the token starts at `field`. */\nfunction tokenStart(input: string, caret: number): number {\n // First pass: scan forward from start of string, tracking quote state, to\n // figure out whether `caret` is currently inside a quoted region.\n let inQuotes = false;\n let escaped = false;\n let lastBoundary = 0;\n for (let i = 0; i < caret; i++) {\n const ch = input[i];\n if (escaped) {\n escaped = false;\n continue;\n }\n if (ch === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (ch === '\"') {\n inQuotes = !inQuotes;\n if (!inQuotes) {\n // closing quote → boundary after it\n lastBoundary = i + 1;\n }\n continue;\n }\n if (!inQuotes && (isWhitespace(ch) || ch === '(' || ch === ')')) {\n lastBoundary = i + 1;\n }\n }\n return lastBoundary;\n}\n\nexport function tokenizeAtCursor(input: string, caret: number): CursorToken {\n const clamped = Math.max(0, Math.min(caret, input.length));\n if (input.length === 0) {\n return { kind: 'empty' };\n }\n const start = tokenStart(input, clamped);\n const slice = input.slice(start, clamped);\n\n // Pure whitespace → empty position.\n if (slice.length === 0) {\n return { kind: 'empty' };\n }\n\n // Quoted value: `field:\"…` — caret inside the quoted region.\n const quoteIdx = slice.indexOf('\"');\n if (quoteIdx >= 0) {\n const before = slice.slice(0, quoteIdx);\n const colonIdx = before.indexOf(':');\n if (colonIdx >= 0) {\n const field = before.slice(0, colonIdx);\n const prefix = slice.slice(quoteIdx + 1);\n return { kind: 'value-start', field, prefix };\n }\n return { kind: 'empty' };\n }\n\n // `field:value` — split on the first colon.\n const colonIdx = slice.indexOf(':');\n if (colonIdx >= 0) {\n const field = slice.slice(0, colonIdx);\n const prefix = slice.slice(colonIdx + 1);\n return { kind: 'value-start', field, prefix };\n }\n\n // No colon: this is either a field-name partial or an operator partial.\n // Treat any all-uppercase prefix that matches one of AND / OR / NOT as an\n // operator suggestion — otherwise rank it as a field name.\n const upper = slice.toUpperCase();\n if (\n slice.length > 0 &&\n slice === upper &&\n OPERATOR_KEYWORDS.some((kw) => kw.startsWith(upper))\n ) {\n return { kind: 'operator', prefix: slice };\n }\n\n // Reject obvious non-identifiers (e.g. punctuation only).\n if (!IDENT_RE.test(slice[0])) {\n return { kind: 'empty' };\n }\n\n return { kind: 'field-start', prefix: slice };\n}\n\n/** Replace the token under the caret with `replacement`. Returns the new\n * input and the caret position after the replacement (right after the\n * inserted text). Used by QueryAutocomplete to commit a suggestion. */\nexport function replaceTokenAtCursor(\n input: string,\n caret: number,\n replacement: string,\n): { value: string; caret: number } {\n const clamped = Math.max(0, Math.min(caret, input.length));\n const start = tokenStart(input, clamped);\n const next = input.slice(0, start) + replacement + input.slice(clamped);\n return { value: next, caret: start + replacement.length };\n}\n"],"names":["IDENT_RE","OPERATOR_KEYWORDS","isWhitespace","ch","tokenStart","input","caret","inQuotes","escaped","lastBoundary","i","tokenizeAtCursor","clamped","start","slice","quoteIdx","before","colonIdx","field","prefix","upper","kw","replaceTokenAtCursor","replacement"],"mappings":"gFAcA,MAAMA,EAAW,gBACXC,EAAoB,CAAC,MAAO,KAAM,KAAK,EAE7C,SAASC,EAAaC,EAAqB,CACzC,OAAOA,IAAO,KAAOA,IAAO,KAAQA,IAAO;AAAA,CAC7C,CAOA,SAASC,EAAWC,EAAeC,EAAuB,CAGxD,IAAIC,EAAW,GACXC,EAAU,GACVC,EAAe,EACnB,QAASC,EAAI,EAAGA,EAAIJ,EAAOI,IAAK,CAC9B,MAAMP,EAAKE,EAAMK,CAAC,EAClB,GAAIF,EAAS,CACXA,EAAU,GACV,QACF,CACA,GAAIL,IAAO,MAAQI,EAAU,CAC3BC,EAAU,GACV,QACF,CACA,GAAIL,IAAO,IAAK,CACdI,EAAW,CAACA,EACPA,IAEHE,EAAeC,EAAI,GAErB,QACF,CACI,CAACH,I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