@flanksource/clicky-ui 0.3.78 → 0.3.80

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 (775) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +2 -2
  3. package/dist/comments/CommentThreadList.cjs +13 -14
  4. package/dist/comments/CommentThreadList.cjs.map +1 -1
  5. package/dist/comments/CommentThreadList.d.ts.map +1 -1
  6. package/dist/comments/CommentThreadList.js +13 -14
  7. package/dist/comments/CommentThreadList.js.map +1 -1
  8. package/dist/components/Combobox.cjs +9 -3
  9. package/dist/components/Combobox.cjs.map +1 -1
  10. package/dist/components/Combobox.d.ts.map +1 -1
  11. package/dist/components/Combobox.js +9 -3
  12. package/dist/components/Combobox.js.map +1 -1
  13. package/dist/components/ComboboxMenu.cjs +1 -1
  14. package/dist/components/ComboboxMenu.cjs.map +1 -1
  15. package/dist/components/ComboboxMenu.js +1 -1
  16. package/dist/components/ComboboxMenu.js.map +1 -1
  17. package/dist/components/EndpointSelector.cjs +7 -1
  18. package/dist/components/EndpointSelector.cjs.map +1 -1
  19. package/dist/components/EndpointSelector.d.ts.map +1 -1
  20. package/dist/components/EndpointSelector.js +7 -1
  21. package/dist/components/EndpointSelector.js.map +1 -1
  22. package/dist/components/FilterBar.cjs +36 -12
  23. package/dist/components/FilterBar.cjs.map +1 -1
  24. package/dist/components/FilterBar.d.ts +14 -2
  25. package/dist/components/FilterBar.d.ts.map +1 -1
  26. package/dist/components/FilterBar.js +36 -12
  27. package/dist/components/FilterBar.js.map +1 -1
  28. package/dist/components/FormLookupProvider.cjs +12 -4
  29. package/dist/components/FormLookupProvider.cjs.map +1 -1
  30. package/dist/components/FormLookupProvider.d.ts.map +1 -1
  31. package/dist/components/FormLookupProvider.js +13 -5
  32. package/dist/components/FormLookupProvider.js.map +1 -1
  33. package/dist/components/JSONPathPlayground.cjs +124 -233
  34. package/dist/components/JSONPathPlayground.cjs.map +1 -1
  35. package/dist/components/JSONPathPlayground.d.ts +15 -13
  36. package/dist/components/JSONPathPlayground.d.ts.map +1 -1
  37. package/dist/components/JSONPathPlayground.js +125 -234
  38. package/dist/components/JSONPathPlayground.js.map +1 -1
  39. package/dist/components/JsonSchemaForm.cjs +6 -0
  40. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  41. package/dist/components/JsonSchemaForm.js +6 -0
  42. package/dist/components/JsonSchemaForm.js.map +1 -1
  43. package/dist/components/SegmentedControl.cjs +1 -1
  44. package/dist/components/SegmentedControl.cjs.map +1 -1
  45. package/dist/components/SegmentedControl.d.ts.map +1 -1
  46. package/dist/components/SegmentedControl.js +1 -1
  47. package/dist/components/SegmentedControl.js.map +1 -1
  48. package/dist/components/TimeRange.cjs +133 -60
  49. package/dist/components/TimeRange.cjs.map +1 -1
  50. package/dist/components/TimeRange.d.ts +8 -1
  51. package/dist/components/TimeRange.d.ts.map +1 -1
  52. package/dist/components/TimeRange.js +133 -60
  53. package/dist/components/TimeRange.js.map +1 -1
  54. package/dist/components/json-schema-form-accordion-array.cjs +8 -6
  55. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  56. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  57. package/dist/components/json-schema-form-accordion-array.js +9 -7
  58. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  59. package/dist/components/json-schema-form-array-rows.cjs +45 -0
  60. package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
  61. package/dist/components/json-schema-form-array-rows.d.ts +10 -0
  62. package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
  63. package/dist/components/json-schema-form-array-rows.js +45 -0
  64. package/dist/components/json-schema-form-array-rows.js.map +1 -0
  65. package/dist/components/json-schema-form-item-summary.cjs +3 -5
  66. package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
  67. package/dist/components/json-schema-form-item-summary.d.ts +1 -1
  68. package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
  69. package/dist/components/json-schema-form-item-summary.js +3 -5
  70. package/dist/components/json-schema-form-item-summary.js.map +1 -1
  71. package/dist/components/json-schema-form-render.cjs +11 -2
  72. package/dist/components/json-schema-form-render.cjs.map +1 -1
  73. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  74. package/dist/components/json-schema-form-render.js +12 -3
  75. package/dist/components/json-schema-form-render.js.map +1 -1
  76. package/dist/components/json-schema-form-resolve.cjs +10 -0
  77. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  78. package/dist/components/json-schema-form-resolve.d.ts +1 -0
  79. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  80. package/dist/components/json-schema-form-resolve.js +10 -1
  81. package/dist/components/json-schema-form-resolve.js.map +1 -1
  82. package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
  83. package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
  84. package/dist/components/json-schema-form-table-array.cjs +25 -16
  85. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  86. package/dist/components/json-schema-form-table-array.d.ts +1 -1
  87. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  88. package/dist/components/json-schema-form-table-array.js +26 -17
  89. package/dist/components/json-schema-form-table-array.js.map +1 -1
  90. package/dist/components/json-schema-form-types.d.ts +0 -2
  91. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  92. package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
  93. package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
  94. package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
  95. package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
  96. package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
  97. package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
  98. package/dist/components/jsonPathTree.cjs +1 -0
  99. package/dist/components/jsonPathTree.cjs.map +1 -1
  100. package/dist/components/jsonPathTree.d.ts +6 -0
  101. package/dist/components/jsonPathTree.d.ts.map +1 -1
  102. package/dist/components/jsonPathTree.js +1 -0
  103. package/dist/components/jsonPathTree.js.map +1 -1
  104. package/dist/data/Clicky.cjs +37 -18
  105. package/dist/data/Clicky.cjs.map +1 -1
  106. package/dist/data/Clicky.d.ts +5 -0
  107. package/dist/data/Clicky.d.ts.map +1 -1
  108. package/dist/data/Clicky.js +37 -18
  109. package/dist/data/Clicky.js.map +1 -1
  110. package/dist/data/DataTable.cjs +49 -12
  111. package/dist/data/DataTable.cjs.map +1 -1
  112. package/dist/data/DataTable.d.ts +17 -2
  113. package/dist/data/DataTable.d.ts.map +1 -1
  114. package/dist/data/DataTable.js +49 -12
  115. package/dist/data/DataTable.js.map +1 -1
  116. package/dist/data/TaskPoolUsage.cjs +2 -1
  117. package/dist/data/TaskPoolUsage.cjs.map +1 -1
  118. package/dist/data/TaskPoolUsage.d.ts.map +1 -1
  119. package/dist/data/TaskPoolUsage.js +2 -1
  120. package/dist/data/TaskPoolUsage.js.map +1 -1
  121. package/dist/data/TimeseriesPanel.axes.cjs +18 -3
  122. package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
  123. package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
  124. package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
  125. package/dist/data/TimeseriesPanel.axes.js +17 -4
  126. package/dist/data/TimeseriesPanel.axes.js.map +1 -1
  127. package/dist/data/TimeseriesPanel.cjs +57 -23
  128. package/dist/data/TimeseriesPanel.cjs.map +1 -1
  129. package/dist/data/TimeseriesPanel.d.ts.map +1 -1
  130. package/dist/data/TimeseriesPanel.js +59 -25
  131. package/dist/data/TimeseriesPanel.js.map +1 -1
  132. package/dist/data/TimeseriesPanel.model.cjs +10 -7
  133. package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
  134. package/dist/data/TimeseriesPanel.model.d.ts +7 -4
  135. package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
  136. package/dist/data/TimeseriesPanel.model.js +11 -8
  137. package/dist/data/TimeseriesPanel.model.js.map +1 -1
  138. package/dist/data/TimeseriesPanel.readout.cjs +11 -0
  139. package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
  140. package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
  141. package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
  142. package/dist/data/TimeseriesPanel.readout.js +10 -0
  143. package/dist/data/TimeseriesPanel.readout.js.map +1 -0
  144. package/dist/data/TimeseriesPanel.segments.cjs +67 -0
  145. package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
  146. package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
  147. package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
  148. package/dist/data/TimeseriesPanel.segments.js +67 -0
  149. package/dist/data/TimeseriesPanel.segments.js.map +1 -0
  150. package/dist/data/TreeDataTable.cjs +12 -3
  151. package/dist/data/TreeDataTable.cjs.map +1 -1
  152. package/dist/data/TreeDataTable.d.ts +15 -3
  153. package/dist/data/TreeDataTable.d.ts.map +1 -1
  154. package/dist/data/TreeDataTable.js +12 -3
  155. package/dist/data/TreeDataTable.js.map +1 -1
  156. package/dist/data/TreeNode.cjs +18 -3
  157. package/dist/data/TreeNode.cjs.map +1 -1
  158. package/dist/data/TreeNode.d.ts +7 -1
  159. package/dist/data/TreeNode.d.ts.map +1 -1
  160. package/dist/data/TreeNode.js +18 -3
  161. package/dist/data/TreeNode.js.map +1 -1
  162. package/dist/data/ai/SessionChatComposer.cjs +2 -0
  163. package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
  164. package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
  165. package/dist/data/ai/SessionChatComposer.js +2 -0
  166. package/dist/data/ai/SessionChatComposer.js.map +1 -1
  167. package/dist/data/ai/SessionInspector.panels.cjs +47 -1
  168. package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
  169. package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
  170. package/dist/data/ai/SessionInspector.panels.js +48 -2
  171. package/dist/data/ai/SessionInspector.panels.js.map +1 -1
  172. package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
  173. package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
  174. package/dist/data/ai/index.d.ts +2 -2
  175. package/dist/data/ai/index.d.ts.map +1 -1
  176. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
  177. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
  178. package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
  179. package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
  180. package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
  181. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
  182. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
  183. package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
  184. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
  185. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
  186. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
  187. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
  188. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
  189. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
  190. package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
  191. package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
  192. package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
  193. package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
  194. package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
  195. package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
  196. package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
  197. package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
  198. package/dist/data/ai/sessionSubmitVariant.js +30 -0
  199. package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
  200. package/dist/data/cells/Timestamp.cjs +15 -4
  201. package/dist/data/cells/Timestamp.cjs.map +1 -1
  202. package/dist/data/cells/Timestamp.d.ts.map +1 -1
  203. package/dist/data/cells/Timestamp.js +15 -4
  204. package/dist/data/cells/Timestamp.js.map +1 -1
  205. package/dist/data/cells/timestamp-format.cjs +28 -8
  206. package/dist/data/cells/timestamp-format.cjs.map +1 -1
  207. package/dist/data/cells/timestamp-format.d.ts +3 -1
  208. package/dist/data/cells/timestamp-format.d.ts.map +1 -1
  209. package/dist/data/cells/timestamp-format.js +28 -8
  210. package/dist/data/cells/timestamp-format.js.map +1 -1
  211. package/dist/data/charts/TrendChart.cjs +65 -31
  212. package/dist/data/charts/TrendChart.cjs.map +1 -1
  213. package/dist/data/charts/TrendChart.d.ts +12 -3
  214. package/dist/data/charts/TrendChart.d.ts.map +1 -1
  215. package/dist/data/charts/TrendChart.js +67 -33
  216. package/dist/data/charts/TrendChart.js.map +1 -1
  217. package/dist/data/charts/index.d.ts +1 -1
  218. package/dist/data/charts/index.d.ts.map +1 -1
  219. package/dist/data/chat/PromptInput.cjs +11 -2
  220. package/dist/data/chat/PromptInput.cjs.map +1 -1
  221. package/dist/data/chat/PromptInput.d.ts +15 -1
  222. package/dist/data/chat/PromptInput.d.ts.map +1 -1
  223. package/dist/data/chat/PromptInput.js +11 -2
  224. package/dist/data/chat/PromptInput.js.map +1 -1
  225. package/dist/data/chat/index.d.ts +1 -1
  226. package/dist/data/chat/index.d.ts.map +1 -1
  227. package/dist/data/data-table-filter-values.cjs.map +1 -1
  228. package/dist/data/data-table-filter-values.d.ts +1 -1
  229. package/dist/data/data-table-filter-values.d.ts.map +1 -1
  230. package/dist/data/data-table-filter-values.js.map +1 -1
  231. package/dist/data/data-table-server-filters.cjs +2 -6
  232. package/dist/data/data-table-server-filters.cjs.map +1 -1
  233. package/dist/data/data-table-server-filters.d.ts +1 -1
  234. package/dist/data/data-table-server-filters.d.ts.map +1 -1
  235. package/dist/data/data-table-server-filters.js +1 -5
  236. package/dist/data/data-table-server-filters.js.map +1 -1
  237. package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
  238. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  239. package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
  240. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  241. package/dist/data/diagnostics/ErrorDetails.js +2 -1
  242. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  243. package/dist/data/gauge-stats.cjs +7 -3
  244. package/dist/data/gauge-stats.cjs.map +1 -1
  245. package/dist/data/gauge-stats.d.ts.map +1 -1
  246. package/dist/data/gauge-stats.js +7 -3
  247. package/dist/data/gauge-stats.js.map +1 -1
  248. package/dist/data/query-browser/QueryBrowser.cjs +41 -17
  249. package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
  250. package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
  251. package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
  252. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
  253. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
  254. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
  255. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
  256. package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
  257. package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
  258. package/dist/data/query-browser/QueryBrowser.js +41 -17
  259. package/dist/data/query-browser/QueryBrowser.js.map +1 -1
  260. package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
  261. package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
  262. package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
  263. package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
  264. package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
  265. package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
  266. package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
  267. package/dist/data/runtime/RuntimeBarLayout.js +3 -2
  268. package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
  269. package/dist/data/test-runner/TestRunner.cjs +3 -1
  270. package/dist/data/test-runner/TestRunner.cjs.map +1 -1
  271. package/dist/data/test-runner/TestRunner.d.ts +8 -1
  272. package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
  273. package/dist/data/test-runner/TestRunner.js +3 -1
  274. package/dist/data/test-runner/TestRunner.js.map +1 -1
  275. package/dist/data/test-runner/TestTree.cjs +1 -0
  276. package/dist/data/test-runner/TestTree.cjs.map +1 -1
  277. package/dist/data/test-runner/TestTree.d.ts.map +1 -1
  278. package/dist/data/test-runner/TestTree.js +1 -0
  279. package/dist/data/test-runner/TestTree.js.map +1 -1
  280. package/dist/data/test-runner/context.cjs.map +1 -1
  281. package/dist/data/test-runner/context.d.ts +2 -0
  282. package/dist/data/test-runner/context.d.ts.map +1 -1
  283. package/dist/data/test-runner/context.js.map +1 -1
  284. package/dist/data/timeseries-query.cjs +2 -2
  285. package/dist/data/timeseries-query.cjs.map +1 -1
  286. package/dist/data/timeseries-query.d.ts +1 -1
  287. package/dist/data/timeseries-query.d.ts.map +1 -1
  288. package/dist/data/timeseries-query.js +2 -2
  289. package/dist/data/timeseries-query.js.map +1 -1
  290. package/dist/data/traces/otel/OtelTraceBrowser.cjs +18 -9
  291. package/dist/data/traces/otel/OtelTraceBrowser.cjs.map +1 -1
  292. package/dist/data/traces/otel/OtelTraceBrowser.d.ts.map +1 -1
  293. package/dist/data/traces/otel/OtelTraceBrowser.js +19 -10
  294. package/dist/data/traces/otel/OtelTraceBrowser.js.map +1 -1
  295. package/dist/data/traces/otel/OtelTraceTable.cjs +10 -8
  296. package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
  297. package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
  298. package/dist/data/traces/otel/OtelTraceTable.js +10 -8
  299. package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
  300. package/dist/data/traces/otel/QueryBar.cjs +6 -5
  301. package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
  302. package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
  303. package/dist/data/traces/otel/QueryBar.js +6 -5
  304. package/dist/data/traces/otel/QueryBar.js.map +1 -1
  305. package/dist/data/traces/otel/browser-state.cjs +17 -4
  306. package/dist/data/traces/otel/browser-state.cjs.map +1 -1
  307. package/dist/data/traces/otel/browser-state.d.ts +2 -1
  308. package/dist/data/traces/otel/browser-state.d.ts.map +1 -1
  309. package/dist/data/traces/otel/browser-state.js +17 -4
  310. package/dist/data/traces/otel/browser-state.js.map +1 -1
  311. package/dist/data/version-info.cjs +3 -3
  312. package/dist/data/version-info.js +3 -3
  313. package/dist/data.cjs +1 -0
  314. package/dist/data.d.ts +1 -1
  315. package/dist/data.d.ts.map +1 -1
  316. package/dist/data.js +2 -2
  317. package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
  318. package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
  319. package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
  320. package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
  321. package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
  322. package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
  323. package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
  324. package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
  325. package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
  326. package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
  327. package/dist/expressions/playground/ExpressionPlayground.js +6 -6
  328. package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
  329. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
  330. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
  331. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
  332. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
  333. package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
  334. package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
  335. package/dist/expressions/playground/api.cjs.map +1 -1
  336. package/dist/expressions/playground/api.d.ts +10 -0
  337. package/dist/expressions/playground/api.d.ts.map +1 -1
  338. package/dist/expressions/playground/api.js.map +1 -1
  339. package/dist/expressions/playground/hostEvaluation.cjs +67 -0
  340. package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
  341. package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
  342. package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
  343. package/dist/expressions/playground/hostEvaluation.js +63 -0
  344. package/dist/expressions/playground/hostEvaluation.js.map +1 -0
  345. package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
  346. package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
  347. package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
  348. package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
  349. package/dist/expressions/playground/panels/GraphPanel.js +8 -3
  350. package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
  351. package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
  352. package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
  353. package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
  354. package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
  355. package/dist/expressions/playground/panels/graphNodes.js +6 -2
  356. package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
  357. package/dist/expressions/playground.d.ts +1 -1
  358. package/dist/expressions/playground.d.ts.map +1 -1
  359. package/dist/hooks/use-element-height.cjs +26 -0
  360. package/dist/hooks/use-element-height.cjs.map +1 -0
  361. package/dist/hooks/use-element-height.d.ts +10 -0
  362. package/dist/hooks/use-element-height.d.ts.map +1 -0
  363. package/dist/hooks/use-element-height.js +26 -0
  364. package/dist/hooks/use-element-height.js.map +1 -0
  365. package/dist/index.cjs +6 -5
  366. package/dist/index.js +7 -7
  367. package/dist/jvm/classes/PatchedClassList.cjs +11 -2
  368. package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
  369. package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
  370. package/dist/jvm/classes/PatchedClassList.js +11 -2
  371. package/dist/jvm/classes/PatchedClassList.js.map +1 -1
  372. package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
  373. package/dist/jvm/model/patches.cjs +4 -2
  374. package/dist/jvm/model/patches.cjs.map +1 -1
  375. package/dist/jvm/model/patches.d.ts +3 -1
  376. package/dist/jvm/model/patches.d.ts.map +1 -1
  377. package/dist/jvm/model/patches.js +4 -2
  378. package/dist/jvm/model/patches.js.map +1 -1
  379. package/dist/jvm/protocol/client.d.ts +7 -2
  380. package/dist/jvm/protocol/client.d.ts.map +1 -1
  381. package/dist/jvm/protocol/operation-client.cjs +30 -11
  382. package/dist/jvm/protocol/operation-client.cjs.map +1 -1
  383. package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
  384. package/dist/jvm/protocol/operation-client.js +30 -11
  385. package/dist/jvm/protocol/operation-client.js.map +1 -1
  386. package/dist/jvm/protocol/query-keys.cjs +1 -1
  387. package/dist/jvm/protocol/query-keys.cjs.map +1 -1
  388. package/dist/jvm/protocol/query-keys.d.ts +1 -1
  389. package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
  390. package/dist/jvm/protocol/query-keys.js +1 -1
  391. package/dist/jvm/protocol/query-keys.js.map +1 -1
  392. package/dist/jvm/protocol/status.cjs +38 -0
  393. package/dist/jvm/protocol/status.cjs.map +1 -0
  394. package/dist/jvm/protocol/status.d.ts +13 -0
  395. package/dist/jvm/protocol/status.d.ts.map +1 -0
  396. package/dist/jvm/protocol/status.js +38 -0
  397. package/dist/jvm/protocol/status.js.map +1 -0
  398. package/dist/jvm/protocol/types.d.ts +16 -4
  399. package/dist/jvm/protocol/types.d.ts.map +1 -1
  400. package/dist/jvm/runtime/GcSummary.cjs +7 -1
  401. package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
  402. package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
  403. package/dist/jvm/runtime/GcSummary.js +7 -1
  404. package/dist/jvm/runtime/GcSummary.js.map +1 -1
  405. package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
  406. package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
  407. package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
  408. package/dist/jvm/surfaces/ClassesSurface.js +12 -11
  409. package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
  410. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
  411. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
  412. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
  413. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
  414. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
  415. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
  416. package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
  417. package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
  418. package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
  419. package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
  420. package/dist/jvm/surfaces/PatchesSurface.js +4 -9
  421. package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
  422. package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
  423. package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
  424. package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
  425. package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
  426. package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
  427. package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
  428. package/dist/jvm/surfaces/jvm-context.cjs +23 -4
  429. package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
  430. package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
  431. package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
  432. package/dist/jvm/surfaces/jvm-context.js +23 -5
  433. package/dist/jvm/surfaces/jvm-context.js.map +1 -1
  434. package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
  435. package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
  436. package/dist/jvm/surfaces/use-patch-actions.js +2 -2
  437. package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
  438. package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
  439. package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
  440. package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
  441. package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
  442. package/dist/jvm/threads/FoldedStackTrace.js +3 -2
  443. package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
  444. package/dist/jvm/threads/ThreadDetail.cjs +6 -2
  445. package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
  446. package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
  447. package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
  448. package/dist/jvm/threads/ThreadDetail.js +6 -2
  449. package/dist/jvm/threads/ThreadDetail.js.map +1 -1
  450. package/dist/jvm.cjs +3 -0
  451. package/dist/jvm.d.ts +2 -1
  452. package/dist/jvm.d.ts.map +1 -1
  453. package/dist/jvm.js +3 -2
  454. package/dist/layout/AppShell.cjs.map +1 -1
  455. package/dist/layout/AppShell.d.ts +16 -0
  456. package/dist/layout/AppShell.d.ts.map +1 -1
  457. package/dist/layout/AppShell.js.map +1 -1
  458. package/dist/layout/AppShell.nav.cjs +21 -2
  459. package/dist/layout/AppShell.nav.cjs.map +1 -1
  460. package/dist/layout/AppShell.nav.js +21 -2
  461. package/dist/layout/AppShell.nav.js.map +1 -1
  462. package/dist/layout/Workspace.cjs +66 -21
  463. package/dist/layout/Workspace.cjs.map +1 -1
  464. package/dist/layout/Workspace.d.ts +6 -1
  465. package/dist/layout/Workspace.d.ts.map +1 -1
  466. package/dist/layout/Workspace.js +66 -21
  467. package/dist/layout/Workspace.js.map +1 -1
  468. package/dist/layout/Workspace.model.cjs +20 -0
  469. package/dist/layout/Workspace.model.cjs.map +1 -1
  470. package/dist/layout/Workspace.model.d.ts +17 -0
  471. package/dist/layout/Workspace.model.d.ts.map +1 -1
  472. package/dist/layout/Workspace.model.js +20 -1
  473. package/dist/layout/Workspace.model.js.map +1 -1
  474. package/dist/layout/Workspace.regions.cjs +10 -6
  475. package/dist/layout/Workspace.regions.cjs.map +1 -1
  476. package/dist/layout/Workspace.regions.d.ts +4 -1
  477. package/dist/layout/Workspace.regions.d.ts.map +1 -1
  478. package/dist/layout/Workspace.regions.js +10 -6
  479. package/dist/layout/Workspace.regions.js.map +1 -1
  480. package/dist/lib/duration.cjs +20 -0
  481. package/dist/lib/duration.cjs.map +1 -1
  482. package/dist/lib/duration.d.ts +8 -0
  483. package/dist/lib/duration.d.ts.map +1 -1
  484. package/dist/lib/duration.js +19 -1
  485. package/dist/lib/duration.js.map +1 -1
  486. package/dist/monaco/MonacoEditor.cjs +34 -30
  487. package/dist/monaco/MonacoEditor.cjs.map +1 -1
  488. package/dist/monaco/MonacoEditor.d.ts.map +1 -1
  489. package/dist/monaco/MonacoEditor.js +34 -30
  490. package/dist/monaco/MonacoEditor.js.map +1 -1
  491. package/dist/overlay/ConfirmDialog.cjs +5 -2
  492. package/dist/overlay/ConfirmDialog.cjs.map +1 -1
  493. package/dist/overlay/ConfirmDialog.d.ts +14 -2
  494. package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
  495. package/dist/overlay/ConfirmDialog.js +5 -2
  496. package/dist/overlay/ConfirmDialog.js.map +1 -1
  497. package/dist/profiles/cel/celEditor.cjs +94 -285
  498. package/dist/profiles/cel/celEditor.cjs.map +1 -1
  499. package/dist/profiles/cel/celEditor.d.ts +10 -15
  500. package/dist/profiles/cel/celEditor.d.ts.map +1 -1
  501. package/dist/profiles/cel/celEditor.js +97 -287
  502. package/dist/profiles/cel/celEditor.js.map +1 -1
  503. package/dist/profiles/cel/celExpression.cjs +1 -61
  504. package/dist/profiles/cel/celExpression.cjs.map +1 -1
  505. package/dist/profiles/cel/celExpression.d.ts +2 -38
  506. package/dist/profiles/cel/celExpression.d.ts.map +1 -1
  507. package/dist/profiles/cel/celExpression.js +2 -58
  508. package/dist/profiles/cel/celExpression.js.map +1 -1
  509. package/dist/profiles/cel/celPlayground.cjs +122 -0
  510. package/dist/profiles/cel/celPlayground.cjs.map +1 -0
  511. package/dist/profiles/cel/celPlayground.d.ts +43 -0
  512. package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
  513. package/dist/profiles/cel/celPlayground.js +118 -0
  514. package/dist/profiles/cel/celPlayground.js.map +1 -0
  515. package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
  516. package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
  517. package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
  518. package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
  519. package/dist/profiles/connections/connectionBrowserModel.js +2 -2
  520. package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
  521. package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
  522. package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
  523. package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
  524. package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
  525. package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
  526. package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
  527. package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
  528. package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
  529. package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
  530. package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
  531. package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
  532. package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
  533. package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
  534. package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
  535. package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
  536. package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
  537. package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
  538. package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
  539. package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
  540. package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
  541. package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
  542. package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
  543. package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
  544. package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
  545. package/dist/profiles/editor/profileEditor.cjs +106 -37
  546. package/dist/profiles/editor/profileEditor.cjs.map +1 -1
  547. package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
  548. package/dist/profiles/editor/profileEditor.js +107 -38
  549. package/dist/profiles/editor/profileEditor.js.map +1 -1
  550. package/dist/profiles/editor/profileEditorModel.cjs +65 -19
  551. package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
  552. package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
  553. package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
  554. package/dist/profiles/editor/profileEditorModel.js +64 -18
  555. package/dist/profiles/editor/profileEditorModel.js.map +1 -1
  556. package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
  557. package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
  558. package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
  559. package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
  560. package/dist/profiles/editor/profileEditorPreview.js +129 -29
  561. package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
  562. package/dist/profiles/editor/profileEditorSections.cjs +137 -88
  563. package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
  564. package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
  565. package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
  566. package/dist/profiles/editor/profileEditorSections.js +138 -90
  567. package/dist/profiles/editor/profileEditorSections.js.map +1 -1
  568. package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
  569. package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
  570. package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
  571. package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
  572. package/dist/profiles/editor/profileMappingPreview.js +23 -7
  573. package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
  574. package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
  575. package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
  576. package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
  577. package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
  578. package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
  579. package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
  580. package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
  581. package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
  582. package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
  583. package/dist/profiles/editor/profileSourceExtensions.js +70 -0
  584. package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
  585. package/dist/profiles/editor/samplePaths.cjs +54 -0
  586. package/dist/profiles/editor/samplePaths.cjs.map +1 -0
  587. package/dist/profiles/editor/samplePaths.d.ts +27 -0
  588. package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
  589. package/dist/profiles/editor/samplePaths.js +53 -0
  590. package/dist/profiles/editor/samplePaths.js.map +1 -0
  591. package/dist/profiles/editor/testSchema.d.ts.map +1 -1
  592. package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
  593. package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
  594. package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
  595. package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
  596. package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
  597. package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
  598. package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
  599. package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
  600. package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
  601. package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
  602. package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
  603. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
  604. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
  605. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
  606. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
  607. package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
  608. package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
  609. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
  610. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
  611. package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
  612. package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
  613. package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
  614. package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
  615. package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
  616. package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
  617. package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
  618. package/dist/profiles/fields/profileFieldControls.cjs +3 -2
  619. package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
  620. package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
  621. package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
  622. package/dist/profiles/fields/profileFieldControls.js +3 -2
  623. package/dist/profiles/fields/profileFieldControls.js.map +1 -1
  624. package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
  625. package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
  626. package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
  627. package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
  628. package/dist/profiles/fields/profileFieldEditor.js +99 -186
  629. package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
  630. package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
  631. package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
  632. package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
  633. package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
  634. package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
  635. package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
  636. package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
  637. package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
  638. package/dist/profiles/fields/profileFieldIcons.js +2 -0
  639. package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
  640. package/dist/profiles/fields/profileFieldList.cjs +23 -1
  641. package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
  642. package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
  643. package/dist/profiles/fields/profileFieldList.js +23 -1
  644. package/dist/profiles/fields/profileFieldList.js.map +1 -1
  645. package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
  646. package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
  647. package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
  648. package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
  649. package/dist/profiles/fields/profileFieldPreview.js +110 -0
  650. package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
  651. package/dist/profiles/fields/profileFieldSample.cjs +182 -0
  652. package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
  653. package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
  654. package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
  655. package/dist/profiles/fields/profileFieldSample.js +180 -0
  656. package/dist/profiles/fields/profileFieldSample.js.map +1 -0
  657. package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
  658. package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
  659. package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
  660. package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
  661. package/dist/profiles/fields/profileFieldTypeField.js +104 -0
  662. package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
  663. package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
  664. package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
  665. package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
  666. package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
  667. package/dist/profiles/fields/profileFieldTypes.js +1 -0
  668. package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
  669. package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
  670. package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
  671. package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
  672. package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
  673. package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
  674. package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
  675. package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
  676. package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
  677. package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
  678. package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
  679. package/dist/profiles/fields/profileFieldValueMode.js +59 -0
  680. package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
  681. package/dist/profiles/processor/processorConfig.cjs +79 -79
  682. package/dist/profiles/processor/processorConfig.cjs.map +1 -1
  683. package/dist/profiles/processor/processorConfig.d.ts +30 -3
  684. package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
  685. package/dist/profiles/processor/processorConfig.js +78 -78
  686. package/dist/profiles/processor/processorConfig.js.map +1 -1
  687. package/dist/profiles/processor/processorPipeline.cjs +8 -6
  688. package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
  689. package/dist/profiles/processor/processorPipeline.d.ts +3 -3
  690. package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
  691. package/dist/profiles/processor/processorPipeline.js +9 -7
  692. package/dist/profiles/processor/processorPipeline.js.map +1 -1
  693. package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
  694. package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
  695. package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
  696. package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
  697. package/dist/profiles/processor/processorPipelineEditor.js +39 -95
  698. package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
  699. package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
  700. package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
  701. package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
  702. package/dist/profiles/processor/processorPipelineExtension.js +3 -2
  703. package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
  704. package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
  705. package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
  706. package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
  707. package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
  708. package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
  709. package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
  710. package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
  711. package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
  712. package/dist/profiles/wizard/profileWizardModel.js +10 -1
  713. package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
  714. package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
  715. package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
  716. package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
  717. package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
  718. package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
  719. package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
  720. package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
  721. package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
  722. package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
  723. package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
  724. package/dist/profiles/wizard/useProfileInspection.js +39 -0
  725. package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
  726. package/dist/profiles.cjs +9 -11
  727. package/dist/profiles.js +8 -8
  728. package/dist/rpc/EntityExplorerApp.cjs +7 -3
  729. package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
  730. package/dist/rpc/EntityExplorerApp.d.ts +16 -1
  731. package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
  732. package/dist/rpc/EntityExplorerApp.js +7 -3
  733. package/dist/rpc/EntityExplorerApp.js.map +1 -1
  734. package/dist/rpc/InlineError.cjs +30 -10
  735. package/dist/rpc/InlineError.cjs.map +1 -1
  736. package/dist/rpc/InlineError.d.ts +10 -1
  737. package/dist/rpc/InlineError.d.ts.map +1 -1
  738. package/dist/rpc/InlineError.js +30 -10
  739. package/dist/rpc/InlineError.js.map +1 -1
  740. package/dist/rpc/SchemaActionForm.cjs +9 -6
  741. package/dist/rpc/SchemaActionForm.cjs.map +1 -1
  742. package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
  743. package/dist/rpc/SchemaActionForm.js +9 -6
  744. package/dist/rpc/SchemaActionForm.js.map +1 -1
  745. package/dist/rpc/SessionHeader.cjs +3 -3
  746. package/dist/rpc/SessionHeader.cjs.map +1 -1
  747. package/dist/rpc/SessionHeader.d.ts.map +1 -1
  748. package/dist/rpc/SessionHeader.js +3 -3
  749. package/dist/rpc/SessionHeader.js.map +1 -1
  750. package/dist/rpc/formMetadata.cjs +2 -6
  751. package/dist/rpc/formMetadata.cjs.map +1 -1
  752. package/dist/rpc/formMetadata.d.ts.map +1 -1
  753. package/dist/rpc/formMetadata.js +1 -5
  754. package/dist/rpc/formMetadata.js.map +1 -1
  755. package/dist/rpc/surfaceNav.cjs +5 -0
  756. package/dist/rpc/surfaceNav.cjs.map +1 -1
  757. package/dist/rpc/surfaceNav.d.ts.map +1 -1
  758. package/dist/rpc/surfaceNav.js +5 -0
  759. package/dist/rpc/surfaceNav.js.map +1 -1
  760. package/dist/runtime/barrels.json +4982 -4979
  761. package/dist/runtime/importmap.json +2168 -2146
  762. package/dist/styles.css +1 -1
  763. package/package.json +1 -1
  764. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
  765. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
  766. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
  767. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
  768. package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
  769. package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
  770. package/dist/profiles/cel/celEditorResults.cjs +0 -158
  771. package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
  772. package/dist/profiles/cel/celEditorResults.d.ts +0 -37
  773. package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
  774. package/dist/profiles/cel/celEditorResults.js +0 -156
  775. package/dist/profiles/cel/celEditorResults.js.map +0 -1
@@ -86,12 +86,13 @@ function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, class
86
86
  const error = readings.find((reading) => reading.error)?.error;
87
87
  const [busy, slots, queued, supervisors] = readings.map((reading) => require_timeseries_query.latestValue(reading.data));
88
88
  const loaded = busy !== void 0 && slots !== void 0 && queued !== void 0 && supervisors !== void 0;
89
+ const hasGap = readings.some((reading) => reading.data && reading.data.points.length > 0 && require_timeseries_query.latestValue(reading.data) === void 0);
89
90
  const text = error ? `metrics unavailable: ${error.message}` : loaded ? [
90
91
  `${busy} busy`,
91
92
  countOf(slots, "slot"),
92
93
  `${queued} queued`,
93
94
  countOf(supervisors, "supervisor")
94
- ].join(" · ") : "loading";
95
+ ].join(" · ") : hasGap ? "no data" : "loading";
95
96
  const shown = error || !loaded ? text : [
96
97
  `${busy} busy`,
97
98
  countOf(slots, "slot"),
@@ -1 +1 @@
1
- {"version":3,"file":"TaskPoolUsage.cjs","names":["taskMetricSeries","TASK_POOL_METRIC_RUN_ID","cn","TimeseriesGauge","UiActivity","taskPoolMetrics","UiLayers","UiQueue","UiListTree","useTimeseriesQueries","defaultTimeseriesFetcher","soleSeries","latestValue","UiChevronDown","taskConcurrencyMetrics","UiStack","UiHourglass"],"sources":["../../src/data/TaskPoolUsage.tsx"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { UiActivity, UiChevronDown, UiHourglass, UiLayers, UiListTree, UiQueue, UiStack } from \"../icons\";\nimport { TimeseriesGauge } from \"./TimeseriesGauge\";\nimport { defaultTimeseriesFetcher, latestValue, soleSeries, useTimeseriesQueries } from \"./timeseries-query\";\nimport {\n TASK_POOL_METRIC_RUN_ID,\n taskConcurrencyMetrics,\n taskMetricSeries,\n taskPoolMetrics,\n} from \"./task-pool-metrics\";\n\nconst RANGE = \"15m\";\nconst REFRESH_MS = 2000;\n\nfunction metricsBaseUrl(basePath: string | undefined): string {\n return `${basePath ?? \"/api/v1\"}/tasks/metrics/`;\n}\n\nexport interface TaskPoolUsageProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** DOM id, so a TaskPoolSummary can name these gauges in aria-controls. */\n id?: string;\n className?: string;\n}\n\n/** Live usage of the task manager's worker pool: busy workers, slots, queue and supervisors. */\nexport function TaskPoolUsage({ basePath, id, className }: TaskPoolUsageProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const pool = (name: string) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name);\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section {...(id ? { id } : {})} aria-label=\"Worker pool\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Workers busy\" icon={UiActivity}\n value={pool(taskPoolMetrics.workersBusy)} max={pool(taskPoolMetrics.workersLimit)} />\n <TimeseriesGauge {...shared} title=\"Slots used\" icon={UiLayers}\n value={pool(taskPoolMetrics.slotsUsed)} max={pool(taskPoolMetrics.slotsCapacity)} />\n <TimeseriesGauge {...shared} title=\"Queued\" icon={UiQueue} value={pool(taskPoolMetrics.queued)} />\n <TimeseriesGauge {...shared} title=\"Supervisors\" icon={UiListTree} value={pool(taskPoolMetrics.supervisors)} />\n </section>\n );\n}\n\nexport interface TaskPoolSummaryProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** Whether the gauges this summary stands in for are showing. */\n expanded: boolean;\n onExpandedChange: (expanded: boolean) => void;\n /** Id of the element holding the gauges, for aria-controls. */\n controls?: string;\n className?: string;\n}\n\nconst SUMMARY_SOURCES = [\n taskPoolMetrics.workersBusy,\n taskPoolMetrics.slotsUsed,\n taskPoolMetrics.queued,\n taskPoolMetrics.supervisors,\n].map((name) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name));\n\nfunction countOf(value: number, singular: string, plural = `${singular}s`): string {\n return `${value} ${value === 1 ? singular : plural}`;\n}\n\n/**\n * The pool gauges folded into one tappable line — \"1 busy · 1 slot · 0 queued\n * · 0 supervisors\" — for a toolbar row on a phone, where four gauges would\n * spend a screen's worth of height on four small numbers.\n */\nexport function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, className }: TaskPoolSummaryProps) {\n const results = useTimeseriesQueries(SUMMARY_SOURCES, {\n baseUrl: metricsBaseUrl(basePath),\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const readings = SUMMARY_SOURCES.map((source, index) => soleSeries(source.id, results[index]));\n const error = readings.find((reading) => reading.error)?.error;\n const values = readings.map((reading) => latestValue(reading.data));\n const [busy, slots, queued, supervisors] = values;\n const loaded = busy !== undefined && slots !== undefined && queued !== undefined && supervisors !== undefined;\n const text = error\n ? `metrics unavailable: ${error.message}`\n : loaded\n ? [`${busy} busy`, countOf(slots, \"slot\"), `${queued} queued`, countOf(supervisors, \"supervisor\")].join(\" · \")\n : \"loading\";\n // The line shows the zero-valued queue and supervisor counts only in its\n // name and tooltip: on a phone toolbar they would crowd out the two\n // numbers that are moving.\n const shown = error || !loaded\n ? text\n : [`${busy} busy`, countOf(slots, \"slot\"), ...(queued > 0 ? [`${queued} queued`] : []), ...(supervisors > 0 ? [countOf(supervisors, \"supervisor\")] : [])].join(\" · \");\n return (\n <button\n type=\"button\"\n aria-expanded={expanded}\n {...(controls ? { \"aria-controls\": controls } : {})}\n aria-label={`Worker pool: ${text}`}\n title={`Worker pool: ${text}`}\n onClick={() => onExpandedChange(!expanded)}\n className={cn(\n \"inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-xs tabular-nums hover:bg-accent\",\n error ? \"text-destructive\" : \"text-muted-foreground\",\n className,\n )}\n >\n <UiActivity aria-hidden className=\"size-3.5 shrink-0\" />\n <span className=\"truncate\">{shown}</span>\n <UiChevronDown aria-hidden className={cn(\"size-3 shrink-0 transition-transform\", expanded && \"rotate-180\")} />\n </button>\n );\n}\n\nexport interface TaskRunConcurrencyProps {\n basePath?: string;\n runId: string;\n className?: string;\n}\n\n/**\n * A concurrency-limited run's permits in use against its limit, and how many\n * of its tasks wait for one. Renders nothing for a run without a limit (no\n * limit series recorded).\n */\nexport function TaskRunConcurrency({ basePath, runId, className }: TaskRunConcurrencyProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const limit = taskMetricSeries(runId, taskConcurrencyMetrics.limit);\n const [result] = useTimeseriesQueries([limit], {\n baseUrl,\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const { data, error } = soleSeries(limit.id, result);\n if (error) {\n return <p role=\"alert\" className=\"text-xs text-destructive\">Run concurrency unavailable: {error.message}</p>;\n }\n if (!((latestValue(data) ?? 0) > 0)) return null;\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section aria-label=\"Run concurrency\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Concurrency\" icon={UiStack}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.running)} max={limit} />\n <TimeseriesGauge {...shared} title=\"Waiting for a permit\" icon={UiHourglass}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.waiting)} />\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAM,QAAQ;AACd,IAAM,aAAa;AAEnB,SAAS,eAAe,UAAsC;CAC5D,OAAO,GAAG,YAAY,UAAU;AAClC;;AAWA,SAAgB,cAAc,EAAE,UAAU,IAAI,aAAiC;CAC7E,MAAM,UAAU,eAAe,QAAQ;CACvC,MAAM,QAAQ,SAAiBA,0BAAAA,iBAAiBC,0BAAAA,yBAAyB,IAAI;CAC7E,MAAM,SAAS;EAAE;EAAS,MAAM;EAAS,SAAS;EAAQ,OAAO;EAAO,WAAW;CAAW;CAC9F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EAAS,GA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A,iBAAiB,OAAOc,0BAAAA,uBAAuB,OAAO;EAAI,CAAA,CAC5D;;AAEb"}
1
+ {"version":3,"file":"TaskPoolUsage.cjs","names":["taskMetricSeries","TASK_POOL_METRIC_RUN_ID","cn","TimeseriesGauge","UiActivity","taskPoolMetrics","UiLayers","UiQueue","UiListTree","useTimeseriesQueries","defaultTimeseriesFetcher","soleSeries","latestValue","UiChevronDown","taskConcurrencyMetrics","UiStack","UiHourglass"],"sources":["../../src/data/TaskPoolUsage.tsx"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { UiActivity, UiChevronDown, UiHourglass, UiLayers, UiListTree, UiQueue, UiStack } from \"../icons\";\nimport { TimeseriesGauge } from \"./TimeseriesGauge\";\nimport { defaultTimeseriesFetcher, latestValue, soleSeries, useTimeseriesQueries } from \"./timeseries-query\";\nimport {\n TASK_POOL_METRIC_RUN_ID,\n taskConcurrencyMetrics,\n taskMetricSeries,\n taskPoolMetrics,\n} from \"./task-pool-metrics\";\n\nconst RANGE = \"15m\";\nconst REFRESH_MS = 2000;\n\nfunction metricsBaseUrl(basePath: string | undefined): string {\n return `${basePath ?? \"/api/v1\"}/tasks/metrics/`;\n}\n\nexport interface TaskPoolUsageProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** DOM id, so a TaskPoolSummary can name these gauges in aria-controls. */\n id?: string;\n className?: string;\n}\n\n/** Live usage of the task manager's worker pool: busy workers, slots, queue and supervisors. */\nexport function TaskPoolUsage({ basePath, id, className }: TaskPoolUsageProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const pool = (name: string) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name);\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section {...(id ? { id } : {})} aria-label=\"Worker pool\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Workers busy\" icon={UiActivity}\n value={pool(taskPoolMetrics.workersBusy)} max={pool(taskPoolMetrics.workersLimit)} />\n <TimeseriesGauge {...shared} title=\"Slots used\" icon={UiLayers}\n value={pool(taskPoolMetrics.slotsUsed)} max={pool(taskPoolMetrics.slotsCapacity)} />\n <TimeseriesGauge {...shared} title=\"Queued\" icon={UiQueue} value={pool(taskPoolMetrics.queued)} />\n <TimeseriesGauge {...shared} title=\"Supervisors\" icon={UiListTree} value={pool(taskPoolMetrics.supervisors)} />\n </section>\n );\n}\n\nexport interface TaskPoolSummaryProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** Whether the gauges this summary stands in for are showing. */\n expanded: boolean;\n onExpandedChange: (expanded: boolean) => void;\n /** Id of the element holding the gauges, for aria-controls. */\n controls?: string;\n className?: string;\n}\n\nconst SUMMARY_SOURCES = [\n taskPoolMetrics.workersBusy,\n taskPoolMetrics.slotsUsed,\n taskPoolMetrics.queued,\n taskPoolMetrics.supervisors,\n].map((name) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name));\n\nfunction countOf(value: number, singular: string, plural = `${singular}s`): string {\n return `${value} ${value === 1 ? singular : plural}`;\n}\n\n/**\n * The pool gauges folded into one tappable line — \"1 busy · 1 slot · 0 queued\n * · 0 supervisors\" — for a toolbar row on a phone, where four gauges would\n * spend a screen's worth of height on four small numbers.\n */\nexport function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, className }: TaskPoolSummaryProps) {\n const results = useTimeseriesQueries(SUMMARY_SOURCES, {\n baseUrl: metricsBaseUrl(basePath),\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const readings = SUMMARY_SOURCES.map((source, index) => soleSeries(source.id, results[index]));\n const error = readings.find((reading) => reading.error)?.error;\n const values = readings.map((reading) => latestValue(reading.data));\n const [busy, slots, queued, supervisors] = values;\n const loaded = busy !== undefined && slots !== undefined && queued !== undefined && supervisors !== undefined;\n // A series that answered with points but whose newest point is a gap has no current reading: that is\n // not \"loading\", which only ever ends when a reading arrives.\n const hasGap = readings.some((reading) => reading.data && reading.data.points.length > 0 && latestValue(reading.data) === undefined);\n const text = error\n ? `metrics unavailable: ${error.message}`\n : loaded\n ? [`${busy} busy`, countOf(slots, \"slot\"), `${queued} queued`, countOf(supervisors, \"supervisor\")].join(\" · \")\n : hasGap\n ? \"no data\"\n : \"loading\";\n // The line shows the zero-valued queue and supervisor counts only in its\n // name and tooltip: on a phone toolbar they would crowd out the two\n // numbers that are moving.\n const shown = error || !loaded\n ? text\n : [`${busy} busy`, countOf(slots, \"slot\"), ...(queued > 0 ? [`${queued} queued`] : []), ...(supervisors > 0 ? [countOf(supervisors, \"supervisor\")] : [])].join(\" · \");\n return (\n <button\n type=\"button\"\n aria-expanded={expanded}\n {...(controls ? { \"aria-controls\": controls } : {})}\n aria-label={`Worker pool: ${text}`}\n title={`Worker pool: ${text}`}\n onClick={() => onExpandedChange(!expanded)}\n className={cn(\n \"inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-xs tabular-nums hover:bg-accent\",\n error ? \"text-destructive\" : \"text-muted-foreground\",\n className,\n )}\n >\n <UiActivity aria-hidden className=\"size-3.5 shrink-0\" />\n <span className=\"truncate\">{shown}</span>\n <UiChevronDown aria-hidden className={cn(\"size-3 shrink-0 transition-transform\", expanded && \"rotate-180\")} />\n </button>\n );\n}\n\nexport interface TaskRunConcurrencyProps {\n basePath?: string;\n runId: string;\n className?: string;\n}\n\n/**\n * A concurrency-limited run's permits in use against its limit, and how many\n * of its tasks wait for one. Renders nothing for a run without a limit (no\n * limit series recorded).\n */\nexport function TaskRunConcurrency({ basePath, runId, className }: TaskRunConcurrencyProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const limit = taskMetricSeries(runId, taskConcurrencyMetrics.limit);\n const [result] = useTimeseriesQueries([limit], {\n baseUrl,\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const { data, error } = soleSeries(limit.id, result);\n if (error) {\n return <p role=\"alert\" className=\"text-xs text-destructive\">Run concurrency unavailable: {error.message}</p>;\n }\n if (!((latestValue(data) ?? 0) > 0)) return null;\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section aria-label=\"Run concurrency\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Concurrency\" icon={UiStack}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.running)} max={limit} />\n <TimeseriesGauge {...shared} title=\"Waiting for a permit\" icon={UiHourglass}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.waiting)} />\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAM,QAAQ;AACd,IAAM,aAAa;AAEnB,SAAS,eAAe,UAAsC;CAC5D,OAAO,GAAG,YAAY,UAAU;AAClC;;AAWA,SAAgB,cAAc,EAAE,UAAU,IAAI,aAAiC;CAC7E,MAAM,UAAU,eAAe,QAAQ;CACvC,MAAM,QAAQ,SAAiBA,0BAAAA,iBAAiBC,0BAAAA,yBAAyB,IAAI;CAC7E,MAAM,SAAS;EAAE;EAAS,MAAM;EAAS,SAAS;EAAQ,OAAO;EAAO,WAAW;CAAW;CAC9F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EAAS,GAAK,KAAK,EAAE,GAAG,IAAI,CAAC;EAAI,cAAW;EAAc,WAAWC,cAAAA,GAAG,yCAAyC,SAAS;EAA1H,UAAA;GACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,iBAAD;IAAiB,GAAI;IAAQ,OAAM;IAAe,MAAMC,mBAAAA;IACtD,OAAO,KAAKC,0BAAAA,gBAAgB,WAAW;IAAG,KAAK,KAAKA,0BAAAA,gBAAgB,YAAY;GAAI,CAAA;GACtF,iBAAA,GAAA,kBAAA,IAAA,CAACF,wBAAAA,iBAAD;IAAiB,GAAI;IAAQ,OAAM;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AAkB,+BAc5E;AAED,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,+BA+ClH;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,uBAAuB,sCAuBzF"}
@@ -86,12 +86,13 @@ function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, class
86
86
  const error = readings.find((reading) => reading.error)?.error;
87
87
  const [busy, slots, queued, supervisors] = readings.map((reading) => latestValue(reading.data));
88
88
  const loaded = busy !== void 0 && slots !== void 0 && queued !== void 0 && supervisors !== void 0;
89
+ const hasGap = readings.some((reading) => reading.data && reading.data.points.length > 0 && latestValue(reading.data) === void 0);
89
90
  const text = error ? `metrics unavailable: ${error.message}` : loaded ? [
90
91
  `${busy} busy`,
91
92
  countOf(slots, "slot"),
92
93
  `${queued} queued`,
93
94
  countOf(supervisors, "supervisor")
94
- ].join(" · ") : "loading";
95
+ ].join(" · ") : hasGap ? "no data" : "loading";
95
96
  const shown = error || !loaded ? text : [
96
97
  `${busy} busy`,
97
98
  countOf(slots, "slot"),
@@ -1 +1 @@
1
- {"version":3,"file":"TaskPoolUsage.js","names":[],"sources":["../../src/data/TaskPoolUsage.tsx"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { UiActivity, UiChevronDown, UiHourglass, UiLayers, UiListTree, UiQueue, UiStack } from \"../icons\";\nimport { TimeseriesGauge } from \"./TimeseriesGauge\";\nimport { defaultTimeseriesFetcher, latestValue, soleSeries, useTimeseriesQueries } from \"./timeseries-query\";\nimport {\n TASK_POOL_METRIC_RUN_ID,\n taskConcurrencyMetrics,\n taskMetricSeries,\n taskPoolMetrics,\n} from \"./task-pool-metrics\";\n\nconst RANGE = \"15m\";\nconst REFRESH_MS = 2000;\n\nfunction metricsBaseUrl(basePath: string | undefined): string {\n return `${basePath ?? \"/api/v1\"}/tasks/metrics/`;\n}\n\nexport interface TaskPoolUsageProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** DOM id, so a TaskPoolSummary can name these gauges in aria-controls. */\n id?: string;\n className?: string;\n}\n\n/** Live usage of the task manager's worker pool: busy workers, slots, queue and supervisors. */\nexport function TaskPoolUsage({ basePath, id, className }: TaskPoolUsageProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const pool = (name: string) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name);\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section {...(id ? { id } : {})} aria-label=\"Worker pool\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Workers busy\" icon={UiActivity}\n value={pool(taskPoolMetrics.workersBusy)} max={pool(taskPoolMetrics.workersLimit)} />\n <TimeseriesGauge {...shared} title=\"Slots used\" icon={UiLayers}\n value={pool(taskPoolMetrics.slotsUsed)} max={pool(taskPoolMetrics.slotsCapacity)} />\n <TimeseriesGauge {...shared} title=\"Queued\" icon={UiQueue} value={pool(taskPoolMetrics.queued)} />\n <TimeseriesGauge {...shared} title=\"Supervisors\" icon={UiListTree} value={pool(taskPoolMetrics.supervisors)} />\n </section>\n );\n}\n\nexport interface TaskPoolSummaryProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** Whether the gauges this summary stands in for are showing. */\n expanded: boolean;\n onExpandedChange: (expanded: boolean) => void;\n /** Id of the element holding the gauges, for aria-controls. */\n controls?: string;\n className?: string;\n}\n\nconst SUMMARY_SOURCES = [\n taskPoolMetrics.workersBusy,\n taskPoolMetrics.slotsUsed,\n taskPoolMetrics.queued,\n taskPoolMetrics.supervisors,\n].map((name) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name));\n\nfunction countOf(value: number, singular: string, plural = `${singular}s`): string {\n return `${value} ${value === 1 ? singular : plural}`;\n}\n\n/**\n * The pool gauges folded into one tappable line — \"1 busy · 1 slot · 0 queued\n * · 0 supervisors\" — for a toolbar row on a phone, where four gauges would\n * spend a screen's worth of height on four small numbers.\n */\nexport function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, className }: TaskPoolSummaryProps) {\n const results = useTimeseriesQueries(SUMMARY_SOURCES, {\n baseUrl: metricsBaseUrl(basePath),\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const readings = SUMMARY_SOURCES.map((source, index) => soleSeries(source.id, results[index]));\n const error = readings.find((reading) => reading.error)?.error;\n const values = readings.map((reading) => latestValue(reading.data));\n const [busy, slots, queued, supervisors] = values;\n const loaded = busy !== undefined && slots !== undefined && queued !== undefined && supervisors !== undefined;\n const text = error\n ? `metrics unavailable: ${error.message}`\n : loaded\n ? [`${busy} busy`, countOf(slots, \"slot\"), `${queued} queued`, countOf(supervisors, \"supervisor\")].join(\" · \")\n : \"loading\";\n // The line shows the zero-valued queue and supervisor counts only in its\n // name and tooltip: on a phone toolbar they would crowd out the two\n // numbers that are moving.\n const shown = error || !loaded\n ? text\n : [`${busy} busy`, countOf(slots, \"slot\"), ...(queued > 0 ? [`${queued} queued`] : []), ...(supervisors > 0 ? [countOf(supervisors, \"supervisor\")] : [])].join(\" · \");\n return (\n <button\n type=\"button\"\n aria-expanded={expanded}\n {...(controls ? { \"aria-controls\": controls } : {})}\n aria-label={`Worker pool: ${text}`}\n title={`Worker pool: ${text}`}\n onClick={() => onExpandedChange(!expanded)}\n className={cn(\n \"inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-xs tabular-nums hover:bg-accent\",\n error ? \"text-destructive\" : \"text-muted-foreground\",\n className,\n )}\n >\n <UiActivity aria-hidden className=\"size-3.5 shrink-0\" />\n <span className=\"truncate\">{shown}</span>\n <UiChevronDown aria-hidden className={cn(\"size-3 shrink-0 transition-transform\", expanded && \"rotate-180\")} />\n </button>\n );\n}\n\nexport interface TaskRunConcurrencyProps {\n basePath?: string;\n runId: string;\n className?: string;\n}\n\n/**\n * A concurrency-limited run's permits in use against its limit, and how many\n * of its tasks wait for one. Renders nothing for a run without a limit (no\n * limit series recorded).\n */\nexport function TaskRunConcurrency({ basePath, runId, className }: TaskRunConcurrencyProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const limit = taskMetricSeries(runId, taskConcurrencyMetrics.limit);\n const [result] = useTimeseriesQueries([limit], {\n baseUrl,\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const { data, error } = soleSeries(limit.id, result);\n if (error) {\n return <p role=\"alert\" className=\"text-xs text-destructive\">Run concurrency unavailable: {error.message}</p>;\n }\n if (!((latestValue(data) ?? 0) > 0)) return null;\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section aria-label=\"Run concurrency\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Concurrency\" icon={UiStack}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.running)} max={limit} />\n <TimeseriesGauge {...shared} title=\"Waiting for a permit\" icon={UiHourglass}\n value={taskMetricSeries(runId, taskConcurrencyMetrics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UAAA;GAAY,CAAA;GACxC,oBAAC,eAAD;IAAe,eAAA;IAAY,WAAW,GAAG,wCAAwC,YAAY,YAAY;GAAI,CAAA;EACvG;;AAEZ;;;;;;AAaA,SAAgB,mBAAmB,EAAE,UAAU,OAAO,aAAsC;CAC1F,MAAM,UAAU,eAAe,QAAQ;CACvC,MAAM,QAAQ,iBAAiB,OAAO,uBAAuB,KAAK;CAClE,MAAM,CAAC,UAAU,qBAAqB,CAAC,KAAK,GAAG;EAC7C;EACA,OAAO;EACP,WAAW;EACX,SAAS;CACX,CAAC;CACD,MAAM,EAAE,MAAM,UAAU,WAAW,MAAM,IAAI,MAAM;CACnD,IAAI,OACF,OAAO,qBAAC,KAAD;EAAG,MAAK;EAAQ,WAAU;EAA1B,UAAA,CAAqD,iCAA8B,MAAM,OAAW;;CAE7G,IAAI,GAAG,YAAY,IAAI,KAAK,KAAK,IAAI,OAAO;CAC5C,MAAM,SAAS;EAAE;EAAS,MAAM;EAAS,SAAS;EAAQ,OAAO;EAAO,WAAW;CAAW;CAC9F,OACE,qBAAC,WAAD;EAAS,cAAW;EAAkB,WAAW,GAAG,yCAAyC,SAAS;EAAtG,UAAA,CACE,oBAAC,iBAAD;GAAiB,GAAI;GAAQ,OAAM;GAAc,MAAM;GACrD,OAAO,iBAAiB,OAAO,uBAAuB,OAAO;GAAG,KAAK;EAAQ,CAAA,GAC/E,oBAAC,iBAAD;GAAiB,GAAI;GAAQ,OAAM;GAAuB,MAAM;GAC9D,OAAO,iBAAiB,OAAO,uBAAuB,OAAO;EAAI,CAAA,CAC5D;;AAEb"}
1
+ {"version":3,"file":"TaskPoolUsage.js","names":[],"sources":["../../src/data/TaskPoolUsage.tsx"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { UiActivity, UiChevronDown, UiHourglass, UiLayers, UiListTree, UiQueue, UiStack } from \"../icons\";\nimport { TimeseriesGauge } from \"./TimeseriesGauge\";\nimport { defaultTimeseriesFetcher, latestValue, soleSeries, useTimeseriesQueries } from \"./timeseries-query\";\nimport {\n TASK_POOL_METRIC_RUN_ID,\n taskConcurrencyMetrics,\n taskMetricSeries,\n taskPoolMetrics,\n} from \"./task-pool-metrics\";\n\nconst RANGE = \"15m\";\nconst REFRESH_MS = 2000;\n\nfunction metricsBaseUrl(basePath: string | undefined): string {\n return `${basePath ?? \"/api/v1\"}/tasks/metrics/`;\n}\n\nexport interface TaskPoolUsageProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** DOM id, so a TaskPoolSummary can name these gauges in aria-controls. */\n id?: string;\n className?: string;\n}\n\n/** Live usage of the task manager's worker pool: busy workers, slots, queue and supervisors. */\nexport function TaskPoolUsage({ basePath, id, className }: TaskPoolUsageProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const pool = (name: string) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name);\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section {...(id ? { id } : {})} aria-label=\"Worker pool\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Workers busy\" icon={UiActivity}\n value={pool(taskPoolMetrics.workersBusy)} max={pool(taskPoolMetrics.workersLimit)} />\n <TimeseriesGauge {...shared} title=\"Slots used\" icon={UiLayers}\n value={pool(taskPoolMetrics.slotsUsed)} max={pool(taskPoolMetrics.slotsCapacity)} />\n <TimeseriesGauge {...shared} title=\"Queued\" icon={UiQueue} value={pool(taskPoolMetrics.queued)} />\n <TimeseriesGauge {...shared} title=\"Supervisors\" icon={UiListTree} value={pool(taskPoolMetrics.supervisors)} />\n </section>\n );\n}\n\nexport interface TaskPoolSummaryProps {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string;\n /** Whether the gauges this summary stands in for are showing. */\n expanded: boolean;\n onExpandedChange: (expanded: boolean) => void;\n /** Id of the element holding the gauges, for aria-controls. */\n controls?: string;\n className?: string;\n}\n\nconst SUMMARY_SOURCES = [\n taskPoolMetrics.workersBusy,\n taskPoolMetrics.slotsUsed,\n taskPoolMetrics.queued,\n taskPoolMetrics.supervisors,\n].map((name) => taskMetricSeries(TASK_POOL_METRIC_RUN_ID, name));\n\nfunction countOf(value: number, singular: string, plural = `${singular}s`): string {\n return `${value} ${value === 1 ? singular : plural}`;\n}\n\n/**\n * The pool gauges folded into one tappable line — \"1 busy · 1 slot · 0 queued\n * · 0 supervisors\" — for a toolbar row on a phone, where four gauges would\n * spend a screen's worth of height on four small numbers.\n */\nexport function TaskPoolSummary({ basePath, expanded, onExpandedChange, controls, className }: TaskPoolSummaryProps) {\n const results = useTimeseriesQueries(SUMMARY_SOURCES, {\n baseUrl: metricsBaseUrl(basePath),\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const readings = SUMMARY_SOURCES.map((source, index) => soleSeries(source.id, results[index]));\n const error = readings.find((reading) => reading.error)?.error;\n const values = readings.map((reading) => latestValue(reading.data));\n const [busy, slots, queued, supervisors] = values;\n const loaded = busy !== undefined && slots !== undefined && queued !== undefined && supervisors !== undefined;\n // A series that answered with points but whose newest point is a gap has no current reading: that is\n // not \"loading\", which only ever ends when a reading arrives.\n const hasGap = readings.some((reading) => reading.data && reading.data.points.length > 0 && latestValue(reading.data) === undefined);\n const text = error\n ? `metrics unavailable: ${error.message}`\n : loaded\n ? [`${busy} busy`, countOf(slots, \"slot\"), `${queued} queued`, countOf(supervisors, \"supervisor\")].join(\" · \")\n : hasGap\n ? \"no data\"\n : \"loading\";\n // The line shows the zero-valued queue and supervisor counts only in its\n // name and tooltip: on a phone toolbar they would crowd out the two\n // numbers that are moving.\n const shown = error || !loaded\n ? text\n : [`${busy} busy`, countOf(slots, \"slot\"), ...(queued > 0 ? [`${queued} queued`] : []), ...(supervisors > 0 ? [countOf(supervisors, \"supervisor\")] : [])].join(\" · \");\n return (\n <button\n type=\"button\"\n aria-expanded={expanded}\n {...(controls ? { \"aria-controls\": controls } : {})}\n aria-label={`Worker pool: ${text}`}\n title={`Worker pool: ${text}`}\n onClick={() => onExpandedChange(!expanded)}\n className={cn(\n \"inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-xs tabular-nums hover:bg-accent\",\n error ? \"text-destructive\" : \"text-muted-foreground\",\n className,\n )}\n >\n <UiActivity aria-hidden className=\"size-3.5 shrink-0\" />\n <span className=\"truncate\">{shown}</span>\n <UiChevronDown aria-hidden className={cn(\"size-3 shrink-0 transition-transform\", expanded && \"rotate-180\")} />\n </button>\n );\n}\n\nexport interface TaskRunConcurrencyProps {\n basePath?: string;\n runId: string;\n className?: string;\n}\n\n/**\n * A concurrency-limited run's permits in use against its limit, and how many\n * of its tasks wait for one. Renders nothing for a run without a limit (no\n * limit series recorded).\n */\nexport function TaskRunConcurrency({ basePath, runId, className }: TaskRunConcurrencyProps) {\n const baseUrl = metricsBaseUrl(basePath);\n const limit = taskMetricSeries(runId, taskConcurrencyMetrics.limit);\n const [result] = useTimeseriesQueries([limit], {\n baseUrl,\n range: RANGE,\n refreshMs: REFRESH_MS,\n fetcher: defaultTimeseriesFetcher,\n });\n const { data, error } = soleSeries(limit.id, result);\n if (error) {\n return <p role=\"alert\" className=\"text-xs text-destructive\">Run concurrency unavailable: {error.message}</p>;\n }\n if (!((latestValue(data) ?? 0) > 0)) return null;\n const shared = { baseUrl, unit: \"short\", variant: \"cell\", range: RANGE, refreshMs: REFRESH_MS } as const;\n return (\n <section aria-label=\"Run concurrency\" className={cn(\"grid grid-cols-2 gap-2 sm:grid-cols-4\", className)}>\n <TimeseriesGauge {...shared} title=\"Concurrency\" icon={UiStack}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.running)} max={limit} />\n <TimeseriesGauge {...shared} title=\"Waiting for a permit\" icon={UiHourglass}\n value={taskMetricSeries(runId, taskConcurrencyMetrics.waiting)} />\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAM,QAAQ;AACd,IAAM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U;GAAqB,CAAA;GACvD,oBAAC,QAAD;IAAM,WAAU;IAAY,UAAA;GAAY,CAAA;GACxC,oBAAC,eAAD;IAAe,eAAA;IAAY,WAAW,GAAG,wCAAwC,YAAY,YAAY;GAAI,CAAA;EACvG;;AAEZ;;;;;;AAaA,SAAgB,mBAAmB,EAAE,UAAU,OAAO,aAAsC;CAC1F,MAAM,UAAU,eAAe,QAAQ;CACvC,MAAM,QAAQ,iBAAiB,OAAO,uBAAuB,KAAK;CAClE,MAAM,CAAC,UAAU,qBAAqB,CAAC,KAAK,GAAG;EAC7C;EACA,OAAO;EACP,WAAW;EACX,SAAS;CACX,CAAC;CACD,MAAM,EAAE,MAAM,UAAU,WAAW,MAAM,IAAI,MAAM;CACnD,IAAI,OACF,OAAO,qBAAC,KAAD;EAAG,MAAK;EAAQ,WAAU;EAA1B,UAAA,CAAqD,iCAA8B,MAAM,OAAW;;CAE7G,IAAI,GAAG,YAAY,IAAI,KAAK,KAAK,IAAI,OAAO;CAC5C,MAAM,SAAS;EAAE;EAAS,MAAM;EAAS,SAAS;EAAQ,OAAO;EAAO,WAAW;CAAW;CAC9F,OACE,qBAAC,WAAD;EAAS,cAAW;EAAkB,WAAW,GAAG,yCAAyC,SAAS;EAAtG,UAAA,CACE,oBAAC,iBAAD;GAAiB,GAAI;GAAQ,OAAM;GAAc,MAAM;GACrD,OAAO,iBAAiB,OAAO,uBAAuB,OAAO;GAAG,KAAK;EAAQ,CAAA,GAC/E,oBAAC,iBAAD;GAAiB,GAAI;GAAQ,OAAM;GAAuB,MAAM;GAC9D,OAAO,iBAAiB,OAAO,uBAAuB,OAAO;EAAI,CAAA,CAC5D;;AAEb"}
@@ -38,14 +38,29 @@ function assignAxes(series) {
38
38
  axisOfKey
39
39
  };
40
40
  }
41
- /** Last numeric value for a series key, scanning from newest row; undefined if none. Pure. */
42
- function latestOf(rows, key) {
41
+ /**
42
+ * The series' newest sample, scanning from the newest row: its number, `null`
43
+ * when that sample is a gap ("no reading"), `undefined` when the series has no
44
+ * sample at all. Rows lacking the key belong to other series and are skipped.
45
+ * Pure.
46
+ */
47
+ function latestReading(rows, key) {
43
48
  for (let i = rows.length - 1; i >= 0; i--) {
44
49
  const v = rows[i]?.[key];
45
- if (typeof v === "number") return v;
50
+ if (typeof v === "number" || v === null) return v;
46
51
  }
47
52
  }
53
+ /** The newest sample's number; undefined when there is none or the newest sample is a gap. Pure. */
54
+ function latestOf(rows, key) {
55
+ return latestReading(rows, key) ?? void 0;
56
+ }
57
+ /** True when the series carries an explicit "no reading" (`null`) in any row. Pure. */
58
+ function seriesHasGap(rows, key) {
59
+ return rows.some((row) => row[key] === null);
60
+ }
48
61
  exports.assignAxes = assignAxes;
49
62
  exports.latestOf = latestOf;
63
+ exports.latestReading = latestReading;
64
+ exports.seriesHasGap = seriesHasGap;
50
65
 
51
66
  //# sourceMappingURL=TimeseriesPanel.axes.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeseriesPanel.axes.cjs","names":[],"sources":["../../src/data/TimeseriesPanel.axes.ts"],"sourcesContent":["import type { MergedRow, ResolvedSeries } from \"./TimeseriesPanel.model\";\n\nexport type AxisOrientation = \"left\" | \"right\";\n\n/** A rendered Y-axis: its recharts id (== orientation) and the unit it formats with. */\nexport interface AxisSpec {\n id: AxisOrientation;\n orientation: AxisOrientation;\n /** Unit the axis ticks format with; undefined for a unitless axis. */\n unit?: string;\n}\n\nexport interface AxisAssignment {\n /** 1 or 2 axes in render order (left first). */\n axes: AxisSpec[];\n /** Maps each series.key to the axis it draws against. */\n axisOfKey: Map<string, AxisOrientation>;\n}\n\n/** Sentinel grouping unitless series; never surfaced as an AxisSpec.unit. */\nconst NO_UNIT = \"\\u0000__noUnit\";\n\n/**\n * Assigns series to one or two Y-axes by distinct unit, in first-seen order:\n * the first distinct unit takes the left axis, the second takes the right.\n * A third-or-later distinct unit shares the right axis (its series still plot,\n * but the right ticks read in the second unit's scale — a known approximation;\n * true N-axis support is out of scope). A single distinct unit yields one left\n * axis only. Undefined units form their own bucket so unitless series still get\n * an axis (recharts drops any series whose yAxisId is missing). Pure.\n */\nexport function assignAxes(series: ResolvedSeries[]): AxisAssignment {\n const order: string[] = [];\n const seen = new Set<string>();\n for (const s of series) {\n const u = s.unit ?? NO_UNIT;\n if (!seen.has(u)) {\n seen.add(u);\n order.push(u);\n }\n }\n\n const unitToAxis = new Map<string, AxisOrientation>();\n const axes: AxisSpec[] = [];\n order.forEach((u, i) => {\n const orientation: AxisOrientation = i === 0 ? \"left\" : \"right\";\n unitToAxis.set(u, orientation);\n if (i <= 1) {\n axes.push({ id: orientation, orientation, ...(u !== NO_UNIT ? { unit: u } : {}) });\n }\n });\n\n const axisOfKey = new Map<string, AxisOrientation>();\n for (const s of series) {\n axisOfKey.set(s.key, unitToAxis.get(s.unit ?? NO_UNIT) ?? \"left\");\n }\n\n return { axes, axisOfKey };\n}\n\n/** Last numeric value for a series key, scanning from newest row; undefined if none. Pure. */\nexport function latestOf(rows: MergedRow[], key: string): number | undefined {\n for (let i = rows.length - 1; i >= 0; i--) {\n const v = rows[i]?.[key];\n if (typeof v === \"number\") return v;\n }\n return undefined;\n}\n"],"mappings":";;AAoBA,IAAM,UAAU;;;;;;;;;;AAWhB,SAAgB,WAAW,QAA0C;CACnE,MAAM,QAAkB,CAAC;CACzB,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,EAAE,QAAQ;EACpB,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG;GAChB,KAAK,IAAI,CAAC;GACV,MAAM,KAAK,CAAC;EACd;CACF;CAEA,MAAM,6BAAa,IAAI,IAA6B;CACpD,MAAM,OAAmB,CAAC;CAC1B,MAAM,SAAS,GAAG,MAAM;EACtB,MAAM,cAA+B,MAAM,IAAI,SAAS;EACxD,WAAW,IAAI,GAAG,WAAW;EAC7B,IAAI,KAAK,GACP,KAAK,KAAK;GAAE,IAAI;GAAa;GAAa,GAAI,MAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;EAAG,CAAC;CAErF,CAAC;CAED,MAAM,4BAAY,IAAI,IAA6B;CACnD,KAAK,MAAM,KAAK,QACd,UAAU,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,QAAQ,OAAO,KAAK,MAAM;CAGlE,OAAO;EAAE;EAAM;CAAU;AAC3B;;AAGA,SAAgB,SAAS,MAAmB,KAAiC;CAC3E,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,IAAI,KAAK,EAAE,GAAG;EACpB,IAAI,OAAO,MAAM,UAAU,OAAO;CACpC;AAEF"}
1
+ {"version":3,"file":"TimeseriesPanel.axes.cjs","names":[],"sources":["../../src/data/TimeseriesPanel.axes.ts"],"sourcesContent":["import type { MergedRow, ResolvedSeries } from \"./TimeseriesPanel.model\";\n\nexport type AxisOrientation = \"left\" | \"right\";\n\n/** A rendered Y-axis: its recharts id (== orientation) and the unit it formats with. */\nexport interface AxisSpec {\n id: AxisOrientation;\n orientation: AxisOrientation;\n /** Unit the axis ticks format with; undefined for a unitless axis. */\n unit?: string;\n}\n\nexport interface AxisAssignment {\n /** 1 or 2 axes in render order (left first). */\n axes: AxisSpec[];\n /** Maps each series.key to the axis it draws against. */\n axisOfKey: Map<string, AxisOrientation>;\n}\n\n/** Sentinel grouping unitless series; never surfaced as an AxisSpec.unit. */\nconst NO_UNIT = \"\\u0000__noUnit\";\n\n/**\n * Assigns series to one or two Y-axes by distinct unit, in first-seen order:\n * the first distinct unit takes the left axis, the second takes the right.\n * A third-or-later distinct unit shares the right axis (its series still plot,\n * but the right ticks read in the second unit's scale — a known approximation;\n * true N-axis support is out of scope). A single distinct unit yields one left\n * axis only. Undefined units form their own bucket so unitless series still get\n * an axis (recharts drops any series whose yAxisId is missing). Pure.\n */\nexport function assignAxes(series: ResolvedSeries[]): AxisAssignment {\n const order: string[] = [];\n const seen = new Set<string>();\n for (const s of series) {\n const u = s.unit ?? NO_UNIT;\n if (!seen.has(u)) {\n seen.add(u);\n order.push(u);\n }\n }\n\n const unitToAxis = new Map<string, AxisOrientation>();\n const axes: AxisSpec[] = [];\n order.forEach((u, i) => {\n const orientation: AxisOrientation = i === 0 ? \"left\" : \"right\";\n unitToAxis.set(u, orientation);\n if (i <= 1) {\n axes.push({ id: orientation, orientation, ...(u !== NO_UNIT ? { unit: u } : {}) });\n }\n });\n\n const axisOfKey = new Map<string, AxisOrientation>();\n for (const s of series) {\n axisOfKey.set(s.key, unitToAxis.get(s.unit ?? NO_UNIT) ?? \"left\");\n }\n\n return { axes, axisOfKey };\n}\n\n/**\n * The series' newest sample, scanning from the newest row: its number, `null`\n * when that sample is a gap (\"no reading\"), `undefined` when the series has no\n * sample at all. Rows lacking the key belong to other series and are skipped.\n * Pure.\n */\nexport function latestReading(rows: MergedRow[], key: string): number | null | undefined {\n for (let i = rows.length - 1; i >= 0; i--) {\n const v = rows[i]?.[key];\n if (typeof v === \"number\" || v === null) return v;\n }\n return undefined;\n}\n\n/** The newest sample's number; undefined when there is none or the newest sample is a gap. Pure. */\nexport function latestOf(rows: MergedRow[], key: string): number | undefined {\n return latestReading(rows, key) ?? undefined;\n}\n\n/** True when the series carries an explicit \"no reading\" (`null`) in any row. Pure. */\nexport function seriesHasGap(rows: MergedRow[], key: string): boolean {\n return rows.some((row) => row[key] === null);\n}\n"],"mappings":";;AAoBA,IAAM,UAAU;;;;;;;;;;AAWhB,SAAgB,WAAW,QAA0C;CACnE,MAAM,QAAkB,CAAC;CACzB,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,EAAE,QAAQ;EACpB,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG;GAChB,KAAK,IAAI,CAAC;GACV,MAAM,KAAK,CAAC;EACd;CACF;CAEA,MAAM,6BAAa,IAAI,IAA6B;CACpD,MAAM,OAAmB,CAAC;CAC1B,MAAM,SAAS,GAAG,MAAM;EACtB,MAAM,cAA+B,MAAM,IAAI,SAAS;EACxD,WAAW,IAAI,GAAG,WAAW;EAC7B,IAAI,KAAK,GACP,KAAK,KAAK;GAAE,IAAI;GAAa;GAAa,GAAI,MAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;EAAG,CAAC;CAErF,CAAC;CAED,MAAM,4BAAY,IAAI,IAA6B;CACnD,KAAK,MAAM,KAAK,QACd,UAAU,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,QAAQ,OAAO,KAAK,MAAM;CAGlE,OAAO;EAAE;EAAM;CAAU;AAC3B;;;;;;;AAQA,SAAgB,cAAc,MAAmB,KAAwC;CACvF,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,IAAI,KAAK,EAAE,GAAG;EACpB,IAAI,OAAO,MAAM,YAAY,MAAM,MAAM,OAAO;CAClD;AAEF;;AAGA,SAAgB,SAAS,MAAmB,KAAiC;CAC3E,OAAO,cAAc,MAAM,GAAG,KAAK,KAAA;AACrC;;AAGA,SAAgB,aAAa,MAAmB,KAAsB;CACpE,OAAO,KAAK,MAAM,QAAQ,IAAI,SAAS,IAAI;AAC7C"}
@@ -23,6 +23,15 @@ export interface AxisAssignment {
23
23
  * an axis (recharts drops any series whose yAxisId is missing). Pure.
24
24
  */
25
25
  export declare function assignAxes(series: ResolvedSeries[]): AxisAssignment;
26
- /** Last numeric value for a series key, scanning from newest row; undefined if none. Pure. */
26
+ /**
27
+ * The series' newest sample, scanning from the newest row: its number, `null`
28
+ * when that sample is a gap ("no reading"), `undefined` when the series has no
29
+ * sample at all. Rows lacking the key belong to other series and are skipped.
30
+ * Pure.
31
+ */
32
+ export declare function latestReading(rows: MergedRow[], key: string): number | null | undefined;
33
+ /** The newest sample's number; undefined when there is none or the newest sample is a gap. Pure. */
27
34
  export declare function latestOf(rows: MergedRow[], key: string): number | undefined;
35
+ /** True when the series carries an explicit "no reading" (`null`) in any row. Pure. */
36
+ export declare function seriesHasGap(rows: MergedRow[], key: string): boolean;
28
37
  //# sourceMappingURL=TimeseriesPanel.axes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeseriesPanel.axes.d.ts","sourceRoot":"","sources":["../../src/data/TimeseriesPanel.axes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wFAAwF;AACxF,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,eAAe,CAAC;IACpB,WAAW,EAAE,eAAe,CAAC;IAC7B,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,yDAAyD;IACzD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACzC;AAKD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,CA2BnE;AAED,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM3E"}
1
+ {"version":3,"file":"TimeseriesPanel.axes.d.ts","sourceRoot":"","sources":["../../src/data/TimeseriesPanel.axes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wFAAwF;AACxF,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,eAAe,CAAC;IACpB,WAAW,EAAE,eAAe,CAAC;IAC7B,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,yDAAyD;IACzD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACzC;AAKD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,CA2BnE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAMvF;AAED,oGAAoG;AACpG,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpE"}
@@ -38,13 +38,26 @@ function assignAxes(series) {
38
38
  axisOfKey
39
39
  };
40
40
  }
41
- /** Last numeric value for a series key, scanning from newest row; undefined if none. Pure. */
42
- function latestOf(rows, key) {
41
+ /**
42
+ * The series' newest sample, scanning from the newest row: its number, `null`
43
+ * when that sample is a gap ("no reading"), `undefined` when the series has no
44
+ * sample at all. Rows lacking the key belong to other series and are skipped.
45
+ * Pure.
46
+ */
47
+ function latestReading(rows, key) {
43
48
  for (let i = rows.length - 1; i >= 0; i--) {
44
49
  const v = rows[i]?.[key];
45
- if (typeof v === "number") return v;
50
+ if (typeof v === "number" || v === null) return v;
46
51
  }
47
52
  }
48
- export { assignAxes, latestOf };
53
+ /** The newest sample's number; undefined when there is none or the newest sample is a gap. Pure. */
54
+ function latestOf(rows, key) {
55
+ return latestReading(rows, key) ?? void 0;
56
+ }
57
+ /** True when the series carries an explicit "no reading" (`null`) in any row. Pure. */
58
+ function seriesHasGap(rows, key) {
59
+ return rows.some((row) => row[key] === null);
60
+ }
61
+ export { assignAxes, latestOf, latestReading, seriesHasGap };
49
62
 
50
63
  //# sourceMappingURL=TimeseriesPanel.axes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeseriesPanel.axes.js","names":[],"sources":["../../src/data/TimeseriesPanel.axes.ts"],"sourcesContent":["import type { MergedRow, ResolvedSeries } from \"./TimeseriesPanel.model\";\n\nexport type AxisOrientation = \"left\" | \"right\";\n\n/** A rendered Y-axis: its recharts id (== orientation) and the unit it formats with. */\nexport interface AxisSpec {\n id: AxisOrientation;\n orientation: AxisOrientation;\n /** Unit the axis ticks format with; undefined for a unitless axis. */\n unit?: string;\n}\n\nexport interface AxisAssignment {\n /** 1 or 2 axes in render order (left first). */\n axes: AxisSpec[];\n /** Maps each series.key to the axis it draws against. */\n axisOfKey: Map<string, AxisOrientation>;\n}\n\n/** Sentinel grouping unitless series; never surfaced as an AxisSpec.unit. */\nconst NO_UNIT = \"\\u0000__noUnit\";\n\n/**\n * Assigns series to one or two Y-axes by distinct unit, in first-seen order:\n * the first distinct unit takes the left axis, the second takes the right.\n * A third-or-later distinct unit shares the right axis (its series still plot,\n * but the right ticks read in the second unit's scale — a known approximation;\n * true N-axis support is out of scope). A single distinct unit yields one left\n * axis only. Undefined units form their own bucket so unitless series still get\n * an axis (recharts drops any series whose yAxisId is missing). Pure.\n */\nexport function assignAxes(series: ResolvedSeries[]): AxisAssignment {\n const order: string[] = [];\n const seen = new Set<string>();\n for (const s of series) {\n const u = s.unit ?? NO_UNIT;\n if (!seen.has(u)) {\n seen.add(u);\n order.push(u);\n }\n }\n\n const unitToAxis = new Map<string, AxisOrientation>();\n const axes: AxisSpec[] = [];\n order.forEach((u, i) => {\n const orientation: AxisOrientation = i === 0 ? \"left\" : \"right\";\n unitToAxis.set(u, orientation);\n if (i <= 1) {\n axes.push({ id: orientation, orientation, ...(u !== NO_UNIT ? { unit: u } : {}) });\n }\n });\n\n const axisOfKey = new Map<string, AxisOrientation>();\n for (const s of series) {\n axisOfKey.set(s.key, unitToAxis.get(s.unit ?? NO_UNIT) ?? \"left\");\n }\n\n return { axes, axisOfKey };\n}\n\n/** Last numeric value for a series key, scanning from newest row; undefined if none. Pure. */\nexport function latestOf(rows: MergedRow[], key: string): number | undefined {\n for (let i = rows.length - 1; i >= 0; i--) {\n const v = rows[i]?.[key];\n if (typeof v === \"number\") return v;\n }\n return undefined;\n}\n"],"mappings":";;AAoBA,IAAM,UAAU;;;;;;;;;;AAWhB,SAAgB,WAAW,QAA0C;CACnE,MAAM,QAAkB,CAAC;CACzB,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,EAAE,QAAQ;EACpB,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG;GAChB,KAAK,IAAI,CAAC;GACV,MAAM,KAAK,CAAC;EACd;CACF;CAEA,MAAM,6BAAa,IAAI,IAA6B;CACpD,MAAM,OAAmB,CAAC;CAC1B,MAAM,SAAS,GAAG,MAAM;EACtB,MAAM,cAA+B,MAAM,IAAI,SAAS;EACxD,WAAW,IAAI,GAAG,WAAW;EAC7B,IAAI,KAAK,GACP,KAAK,KAAK;GAAE,IAAI;GAAa;GAAa,GAAI,MAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;EAAG,CAAC;CAErF,CAAC;CAED,MAAM,4BAAY,IAAI,IAA6B;CACnD,KAAK,MAAM,KAAK,QACd,UAAU,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,QAAQ,OAAO,KAAK,MAAM;CAGlE,OAAO;EAAE;EAAM;CAAU;AAC3B;;AAGA,SAAgB,SAAS,MAAmB,KAAiC;CAC3E,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,IAAI,KAAK,EAAE,GAAG;EACpB,IAAI,OAAO,MAAM,UAAU,OAAO;CACpC;AAEF"}
1
+ {"version":3,"file":"TimeseriesPanel.axes.js","names":[],"sources":["../../src/data/TimeseriesPanel.axes.ts"],"sourcesContent":["import type { MergedRow, ResolvedSeries } from \"./TimeseriesPanel.model\";\n\nexport type AxisOrientation = \"left\" | \"right\";\n\n/** A rendered Y-axis: its recharts id (== orientation) and the unit it formats with. */\nexport interface AxisSpec {\n id: AxisOrientation;\n orientation: AxisOrientation;\n /** Unit the axis ticks format with; undefined for a unitless axis. */\n unit?: string;\n}\n\nexport interface AxisAssignment {\n /** 1 or 2 axes in render order (left first). */\n axes: AxisSpec[];\n /** Maps each series.key to the axis it draws against. */\n axisOfKey: Map<string, AxisOrientation>;\n}\n\n/** Sentinel grouping unitless series; never surfaced as an AxisSpec.unit. */\nconst NO_UNIT = \"\\u0000__noUnit\";\n\n/**\n * Assigns series to one or two Y-axes by distinct unit, in first-seen order:\n * the first distinct unit takes the left axis, the second takes the right.\n * A third-or-later distinct unit shares the right axis (its series still plot,\n * but the right ticks read in the second unit's scale — a known approximation;\n * true N-axis support is out of scope). A single distinct unit yields one left\n * axis only. Undefined units form their own bucket so unitless series still get\n * an axis (recharts drops any series whose yAxisId is missing). Pure.\n */\nexport function assignAxes(series: ResolvedSeries[]): AxisAssignment {\n const order: string[] = [];\n const seen = new Set<string>();\n for (const s of series) {\n const u = s.unit ?? NO_UNIT;\n if (!seen.has(u)) {\n seen.add(u);\n order.push(u);\n }\n }\n\n const unitToAxis = new Map<string, AxisOrientation>();\n const axes: AxisSpec[] = [];\n order.forEach((u, i) => {\n const orientation: AxisOrientation = i === 0 ? \"left\" : \"right\";\n unitToAxis.set(u, orientation);\n if (i <= 1) {\n axes.push({ id: orientation, orientation, ...(u !== NO_UNIT ? { unit: u } : {}) });\n }\n });\n\n const axisOfKey = new Map<string, AxisOrientation>();\n for (const s of series) {\n axisOfKey.set(s.key, unitToAxis.get(s.unit ?? NO_UNIT) ?? \"left\");\n }\n\n return { axes, axisOfKey };\n}\n\n/**\n * The series' newest sample, scanning from the newest row: its number, `null`\n * when that sample is a gap (\"no reading\"), `undefined` when the series has no\n * sample at all. Rows lacking the key belong to other series and are skipped.\n * Pure.\n */\nexport function latestReading(rows: MergedRow[], key: string): number | null | undefined {\n for (let i = rows.length - 1; i >= 0; i--) {\n const v = rows[i]?.[key];\n if (typeof v === \"number\" || v === null) return v;\n }\n return undefined;\n}\n\n/** The newest sample's number; undefined when there is none or the newest sample is a gap. Pure. */\nexport function latestOf(rows: MergedRow[], key: string): number | undefined {\n return latestReading(rows, key) ?? undefined;\n}\n\n/** True when the series carries an explicit \"no reading\" (`null`) in any row. Pure. */\nexport function seriesHasGap(rows: MergedRow[], key: string): boolean {\n return rows.some((row) => row[key] === null);\n}\n"],"mappings":";;AAoBA,IAAM,UAAU;;;;;;;;;;AAWhB,SAAgB,WAAW,QAA0C;CACnE,MAAM,QAAkB,CAAC;CACzB,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,EAAE,QAAQ;EACpB,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG;GAChB,KAAK,IAAI,CAAC;GACV,MAAM,KAAK,CAAC;EACd;CACF;CAEA,MAAM,6BAAa,IAAI,IAA6B;CACpD,MAAM,OAAmB,CAAC;CAC1B,MAAM,SAAS,GAAG,MAAM;EACtB,MAAM,cAA+B,MAAM,IAAI,SAAS;EACxD,WAAW,IAAI,GAAG,WAAW;EAC7B,IAAI,KAAK,GACP,KAAK,KAAK;GAAE,IAAI;GAAa;GAAa,GAAI,MAAM,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;EAAG,CAAC;CAErF,CAAC;CAED,MAAM,4BAAY,IAAI,IAA6B;CACnD,KAAK,MAAM,KAAK,QACd,UAAU,IAAI,EAAE,KAAK,WAAW,IAAI,EAAE,QAAQ,OAAO,KAAK,MAAM;CAGlE,OAAO;EAAE;EAAM;CAAU;AAC3B;;;;;;;AAQA,SAAgB,cAAc,MAAmB,KAAwC;CACvF,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,IAAI,KAAK,EAAE,GAAG;EACpB,IAAI,OAAO,MAAM,YAAY,MAAM,MAAM,OAAO;CAClD;AAEF;;AAGA,SAAgB,SAAS,MAAmB,KAAiC;CAC3E,OAAO,cAAc,MAAM,GAAG,KAAK,KAAA;AACrC;;AAGA,SAAgB,aAAa,MAAmB,KAAsB;CACpE,OAAO,KAAK,MAAM,QAAQ,IAAI,SAAS,IAAI;AAC7C"}
@@ -6,6 +6,8 @@ const require_ProgressBar = require("./ProgressBar.cjs");
6
6
  const require_UiFullscreen = require("../icons/components/UiFullscreen.cjs");
7
7
  const require_Icon = require("./Icon.cjs");
8
8
  const require_TimeseriesPanel_axes = require("./TimeseriesPanel.axes.cjs");
9
+ const require_TimeseriesPanel_readout = require("./TimeseriesPanel.readout.cjs");
10
+ const require_TimeseriesPanel_segments = require("./TimeseriesPanel.segments.cjs");
9
11
  const require_TimeseriesPanel_model = require("./TimeseriesPanel.model.cjs");
10
12
  const require_timeseries_query = require("./timeseries-query.cjs");
11
13
  let react = require("react");
@@ -139,11 +141,11 @@ function TimeseriesPanel(props) {
139
141
  function LatestReadout({ series, rows }) {
140
142
  const only = series.length === 1 ? series[0] : void 0;
141
143
  if (!only) return null;
142
- const v = require_TimeseriesPanel_axes.latestOf(rows, only.key);
144
+ const v = require_TimeseriesPanel_axes.latestReading(rows, only.key);
143
145
  if (v === void 0) return null;
144
146
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
145
147
  className: "tabular-nums",
146
- children: require_format.formatUnit(Math.abs(v), only.unit)
148
+ children: require_TimeseriesPanel_readout.formatReading(v, only.unit)
147
149
  });
148
150
  }
149
151
  var REFERENCE_LINE_COLOR = "var(--muted-foreground, #64748b)";
@@ -158,7 +160,7 @@ function ChartLegend({ series, rows, referenceLines, unit }) {
158
160
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
159
161
  className: "mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",
160
162
  children: [series.map((s) => {
161
- const v = require_TimeseriesPanel_axes.latestOf(rows, s.key);
163
+ const v = require_TimeseriesPanel_axes.latestReading(rows, s.key);
162
164
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
163
165
  className: "inline-flex min-w-0 items-center gap-1.5",
164
166
  children: [
@@ -173,7 +175,7 @@ function ChartLegend({ series, rows, referenceLines, unit }) {
173
175
  }),
174
176
  v !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
175
177
  className: "tabular-nums",
176
- children: require_format.formatUnit(Math.abs(v), s.unit)
178
+ children: require_TimeseriesPanel_readout.formatReading(v, s.unit)
177
179
  }) : null
178
180
  ]
179
181
  }, s.key);
@@ -199,7 +201,7 @@ function ChartLegend({ series, rows, referenceLines, unit }) {
199
201
  }
200
202
  /** Breakdown header readout: `used / total · pct%`, where used is the sum of segments. */
201
203
  function BreakdownReadout({ total, unit, items }) {
202
- const used = items.reduce((acc, it) => acc + it.value, 0);
204
+ const used = items.reduce((acc, it) => acc + (it.value ?? 0), 0);
203
205
  const pct = total > 0 ? Math.min(100, used / total * 100) : 0;
204
206
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
205
207
  className: "font-mono tabular-nums",
@@ -216,7 +218,7 @@ function BreakdownReadout({ total, unit, items }) {
216
218
  /** Instantaneous stacked bar + legend list. The expand button (in the panel header) opens the graph. */
217
219
  function BreakdownView({ total, unit, items }) {
218
220
  const segments = items.map((it) => ({
219
- count: it.value,
221
+ count: it.value ?? 0,
220
222
  color: it.color,
221
223
  label: it.label
222
224
  }));
@@ -242,11 +244,11 @@ function BreakdownView({ total, unit, items }) {
242
244
  }),
243
245
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
244
246
  className: "font-mono tabular-nums text-foreground",
245
- children: require_format.formatUnit(it.value, it.unit ?? unit)
247
+ children: it.value === null ? require_TimeseriesPanel_readout.NO_DATA_LABEL : require_format.formatUnit(it.value, it.unit ?? unit)
246
248
  }),
247
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
249
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
248
250
  className: "w-10 text-right font-mono tabular-nums text-muted-foreground",
249
- children: [it.percent.toFixed(0), "%"]
251
+ children: it.value === null ? "" : `${it.percent.toFixed(0)}%`
250
252
  })
251
253
  ]
252
254
  }, it.key))
@@ -255,7 +257,7 @@ function BreakdownView({ total, unit, items }) {
255
257
  }
256
258
  function Chart({ rows, series, variant, unit, showZeroLine, referenceLines }) {
257
259
  const stacked = variant === "stacked";
258
- const seriesByKey = new Map(series.map((s) => [s.key, s]));
260
+ const { rows: plotRows, plots } = (0, react.useMemo)(() => require_TimeseriesPanel_segments.splitGapRuns(series, rows), [series, rows]);
259
261
  const strokeOf = (s) => require_color.resolveCssColor(s.color);
260
262
  const { axes: yAxes, axisOfKey } = (0, react.useMemo)(() => require_TimeseriesPanel_axes.assignAxes(series), [series]);
261
263
  const axisOf = (key) => axisOfKey.get(key) ?? "left";
@@ -283,11 +285,13 @@ function Chart({ rows, series, variant, unit, showZeroLine, referenceLines }) {
283
285
  tickFormatter: (v) => require_format.formatUnit(Math.abs(v), ax.unit)
284
286
  }, ax.id)),
285
287
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Tooltip, {
288
+ filterNull: false,
289
+ content: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SeriesTooltip, {
290
+ rows,
291
+ series,
292
+ unit
293
+ }),
286
294
  labelFormatter: (label) => formatClock(String(label)),
287
- formatter: (value, name) => {
288
- const s = seriesByKey.get(String(name));
289
- return [require_format.formatUnit(Math.abs(Number(value) || 0), s?.unit ?? unit), s?.label ?? String(name)];
290
- },
291
295
  contentStyle: { fontSize: 12 }
292
296
  }),
293
297
  showZeroLine ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ReferenceLine, {
@@ -308,48 +312,78 @@ function Chart({ rows, series, variant, unit, showZeroLine, referenceLines }) {
308
312
  width: "100%",
309
313
  height: "100%",
310
314
  children: variant === "line" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(recharts.LineChart, {
311
- data: rows,
315
+ data: plotRows,
312
316
  margin: {
313
317
  top: 4,
314
318
  right: 8,
315
319
  bottom: 0,
316
320
  left: 0
317
321
  },
318
- children: [axes, series.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Line, {
322
+ children: [axes, plots.map(({ dataKey, series: s, isolatedSample }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Line, {
319
323
  yAxisId: axisOf(s.key),
320
324
  type: "monotone",
321
- dataKey: s.key,
325
+ dataKey,
322
326
  name: s.key,
323
327
  stroke: strokeOf(s),
324
328
  strokeWidth: 2,
325
- dot: false,
329
+ dot: isolatedSample ? isolatedDot(strokeOf(s)) : false,
326
330
  connectNulls: true,
327
331
  isAnimationActive: false
328
- }, s.key))]
332
+ }, dataKey))]
329
333
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(recharts.AreaChart, {
330
- data: rows,
334
+ data: plotRows,
331
335
  margin: {
332
336
  top: 4,
333
337
  right: 8,
334
338
  bottom: 0,
335
339
  left: 0
336
340
  },
337
- children: [axes, series.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Area, {
341
+ children: [axes, plots.map(({ dataKey, series: s, isolatedSample }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Area, {
338
342
  yAxisId: axisOf(s.key),
339
343
  type: "monotone",
340
- dataKey: s.key,
344
+ dataKey,
341
345
  name: s.key,
342
346
  stroke: strokeOf(s),
343
347
  fill: strokeOf(s),
344
348
  ...stacked ? { stackId: `stack-${axisOf(s.key)}` } : {},
345
349
  fillOpacity: stacked ? .7 : .12,
346
350
  strokeWidth: stacked ? 0 : 2,
351
+ dot: isolatedSample ? isolatedDot(strokeOf(s)) : false,
347
352
  connectNulls: true,
348
353
  isAnimationActive: false
349
- }, s.key))]
354
+ }, dataKey))]
350
355
  })
351
356
  });
352
357
  }
358
+ /** A lone sample between two gaps has no line to carry it, so it is drawn as a dot. */
359
+ var isolatedDot = (color) => ({
360
+ r: 2.5,
361
+ fill: color,
362
+ stroke: color
363
+ });
364
+ /**
365
+ * Tooltip body read from the merged row at the hovered time, not from recharts' payload: a gapped
366
+ * series is drawn as several runs, none of which has a value at the gap, yet the gap must say
367
+ * "no data". Series that simply have no row at this time (undefined) are left out, as before.
368
+ */
369
+ function SeriesTooltip({ rows, series, unit, ...rest }) {
370
+ const row = rows.find((candidate) => candidate.at === rest.label);
371
+ const payload = series.flatMap((s) => {
372
+ const value = row?.[s.key];
373
+ if (value === void 0 || typeof value === "string") return [];
374
+ return [{
375
+ name: s.label,
376
+ value: require_TimeseriesPanel_readout.formatReading(value, s.unit ?? unit),
377
+ color: require_color.resolveCssColor(s.color),
378
+ dataKey: s.key,
379
+ graphicalItemId: s.key
380
+ }];
381
+ });
382
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.DefaultTooltipContent, {
383
+ ...rest,
384
+ payload
385
+ });
386
+ }
353
387
  function PanelMessage({ children }) {
354
388
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
355
389
  className: "flex h-full items-center justify-center text-xs text-muted-foreground",
@@ -1 +1 @@
1
- {"version":3,"file":"TimeseriesPanel.cjs","names":["defaultTimeseriesFetcher","useState","useMemo","resolveSeries","useTimeseriesQueries","expandServedSeries","mergeSeries","resolveBreakdown","cn","Icon","UiFullscreen","Modal","latestOf","formatUnit","resolveCssColor","ProgressBar","assignAxes","_Fragment","CartesianGrid","XAxis","YAxis","Tooltip","ReferenceLine","ResponsiveContainer","LineChart","Line","AreaChart","Area"],"sources":["../../src/data/TimeseriesPanel.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n Line,\n LineChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { cn } from \"../lib/utils\";\nimport { resolveCssColor } from \"../lib/color\";\nimport { formatUnit } from \"../lib/format\";\nimport { Modal } from \"../overlay/Modal\";\nimport { ProgressBar, type ProgressSegment } from \"./ProgressBar\";\nimport { UiFullscreen } from \"../icons\";\nimport { Icon, type StaticIconComponent } from \"./Icon\";\nimport { assignAxes, latestOf } from \"./TimeseriesPanel.axes\";\nimport {\n expandServedSeries,\n mergeSeries,\n resolveBreakdown,\n resolveSeries,\n type BreakdownItem,\n type MergedRow,\n type ResolvedSeries,\n type TimeseriesPanelProps,\n type TimeseriesReferenceLine,\n} from \"./TimeseriesPanel.model\";\nimport { defaultTimeseriesFetcher, useTimeseriesQueries } from \"./timeseries-query\";\n\nexport type { AxisAssignment, AxisOrientation, AxisSpec } from \"./TimeseriesPanel.axes\";\nexport type {\n BreakdownItem,\n DisplaySeries,\n MergedRow,\n ResolvedSeries,\n SeriesLoadContext,\n SeriesLoader,\n TimeseriesPanelProps,\n TimeseriesPoint,\n TimeseriesReferenceLine,\n TimeseriesResponse,\n TimeseriesSeries,\n TimeseriesServerSeries,\n} from \"./TimeseriesPanel.model\";\n\nfunction formatClock(at: string): string {\n const date = new Date(at);\n if (Number.isNaN(date.getTime())) return \"\";\n return date.toLocaleTimeString([], { hour: \"2-digit\", minute: \"2-digit\" });\n}\n\nexport function TimeseriesPanel(props: TimeseriesPanelProps) {\n const {\n title,\n icon,\n unit,\n range = \"1h\",\n refreshMs = 5000,\n height = 160,\n variant = \"area\",\n expandable = true,\n total,\n referenceLines,\n fetcher = defaultTimeseriesFetcher,\n className,\n } = props;\n const isBreakdown = variant === \"breakdown\";\n // The inline chart (non-breakdown only) and the expand modal both need a\n // time-series variant; breakdown has no inline chart and expands to \"area\".\n const chartVariant: ChartVariant = isBreakdown ? \"area\" : variant;\n const expandVariant = props.expandVariant ?? chartVariant;\n\n const [expanded, setExpanded] = useState(false);\n\n const requested = useMemo(() => resolveSeries(props), [props]);\n const results = useTimeseriesQueries(\n requested.map((s) => ({ id: s.key, load: s.load })),\n { baseUrl: props.baseUrl ?? \"\", range, refreshMs, fetcher },\n );\n const refs = referenceLines ?? [];\n\n const error = results.find((r) => r.error)?.error ?? null;\n const isError = error !== null;\n const isLoading = results.some((r) => r.isLoading) && results.every((r) => !r.series);\n const served = results.map((r) => r.series);\n const { series, points } = useMemo(() => expandServedSeries(props, served), [props, served]);\n const rows = useMemo(() => mergeSeries(series, points), [series, points]);\n const hasMirrored = series.some((s) => s.transform);\n const breakdown = useMemo(\n () => (isBreakdown ? resolveBreakdown(series, rows, total) : null),\n [isBreakdown, series, rows, total],\n );\n\n // Breakdown renders instantly from `current`; the modal still needs polled\n // history. Other variants gate on having ≥2 points to draw a line.\n const canExpand = expandable && rows.length >= 2;\n\n return (\n <div className={cn(\"flex flex-col rounded-lg border border-border bg-card p-3\", className)}>\n <div className=\"flex items-center justify-between gap-2 text-xs text-muted-foreground\">\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n {icon ? <PanelIcon icon={icon} /> : null}\n <span className=\"truncate font-medium text-foreground\">{title}</span>\n </span>\n <span className=\"inline-flex shrink-0 items-center gap-1.5\">\n {breakdown ? (\n <BreakdownReadout total={breakdown.total} unit={unit} items={breakdown.items} />\n ) : (\n <LatestReadout series={series} rows={rows} />\n )}\n {canExpand ? (\n <button\n type=\"button\"\n aria-label=\"Expand chart\"\n onClick={() => setExpanded(true)}\n className=\"text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon icon={UiFullscreen} width={14} height={14} />\n </button>\n ) : null}\n </span>\n </div>\n <div className=\"mt-2\" style={breakdown ? undefined : { height }}>\n {error ? (\n <PanelMessage>{error.message || \"Failed to load metric\"}</PanelMessage>\n ) : breakdown ? (\n <BreakdownView total={breakdown.total} unit={unit} items={breakdown.items} />\n ) : isLoading ? (\n <PanelMessage>Loading…</PanelMessage>\n ) : rows.length < 2 ? (\n <PanelMessage>Collecting data…</PanelMessage>\n ) : (\n <Chart\n rows={rows}\n series={series}\n variant={chartVariant}\n unit={unit}\n showZeroLine={hasMirrored}\n referenceLines={refs}\n />\n )}\n </div>\n {!breakdown && !isError && !isLoading && rows.length >= 2 && series.length + refs.length > 1 ? (\n <ChartLegend series={series} rows={rows} referenceLines={refs} unit={unit} />\n ) : null}\n {canExpand ? (\n <Modal open={expanded} onClose={() => setExpanded(false)} title={title} size=\"xl\">\n <div style={{ height: 360 }}>\n <Chart\n rows={rows}\n series={series}\n variant={expandVariant}\n unit={unit}\n showZeroLine={hasMirrored}\n referenceLines={refs}\n />\n </div>\n {series.length + refs.length > 1 ? (\n <ChartLegend series={series} rows={rows} referenceLines={refs} unit={unit} />\n ) : null}\n </Modal>\n ) : null}\n </div>\n );\n}\n\n/**\n * Header readout for a single-series panel: the latest value, formatted with the\n * series' unit. Multi-series panels render the per-series values in {@link ChartLegend}\n * below the chart instead, so this returns null for them to avoid overlapping the title.\n */\nfunction LatestReadout({ series, rows }: { series: ResolvedSeries[]; rows: MergedRow[] }) {\n const only = series.length === 1 ? series[0] : undefined;\n if (!only) return null;\n const v = latestOf(rows, only.key);\n if (v === undefined) return null;\n return <span className=\"tabular-nums\">{formatUnit(Math.abs(v), only.unit)}</span>;\n}\n\nconst REFERENCE_LINE_COLOR = \"var(--muted-foreground, #64748b)\";\n\nfunction referenceColor(ref: TimeseriesReferenceLine): string {\n return resolveCssColor(ref.color ?? REFERENCE_LINE_COLOR);\n}\n\n/**\n * Wrapping color-keyed legend for the time-series variants: dot + label + latest\n * value, then each reference line with its fixed value.\n */\nfunction ChartLegend({\n series,\n rows,\n referenceLines,\n unit,\n}: {\n series: ResolvedSeries[];\n rows: MergedRow[];\n referenceLines: TimeseriesReferenceLine[];\n unit: string | undefined;\n}) {\n return (\n <ul className=\"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground\">\n {series.map((s) => {\n const v = latestOf(rows, s.key);\n return (\n <li key={s.key} className=\"inline-flex min-w-0 items-center gap-1.5\">\n <span\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: resolveCssColor(s.color) }}\n aria-hidden\n />\n <span className=\"truncate text-foreground\">{s.label}</span>\n {v !== undefined ? (\n <span className=\"tabular-nums\">{formatUnit(Math.abs(v), s.unit)}</span>\n ) : null}\n </li>\n );\n })}\n {referenceLines.map((ref, i) => (\n <li key={`ref-${i}`} className=\"inline-flex min-w-0 items-center gap-1.5\">\n <span\n className=\"h-0.5 w-2.5 shrink-0\"\n style={{ backgroundColor: referenceColor(ref) }}\n aria-hidden\n />\n <span className=\"truncate text-foreground\">{ref.label}</span>\n <span className=\"tabular-nums\">{formatUnit(ref.value, ref.unit ?? unit)}</span>\n </li>\n ))}\n </ul>\n );\n}\n\n/** Breakdown header readout: `used / total · pct%`, where used is the sum of segments. */\nfunction BreakdownReadout({\n total,\n unit,\n items,\n}: {\n total: number;\n unit: string | undefined;\n items: BreakdownItem[];\n}) {\n const used = items.reduce((acc, it) => acc + it.value, 0);\n const pct = total > 0 ? Math.min(100, (used / total) * 100) : 0;\n return (\n <span className=\"font-mono tabular-nums\">\n {formatUnit(used, unit)} / {formatUnit(total, unit)} · {pct.toFixed(0)}%\n </span>\n );\n}\n\n/** Instantaneous stacked bar + legend list. The expand button (in the panel header) opens the graph. */\nfunction BreakdownView({\n total,\n unit,\n items,\n}: {\n total: number;\n unit: string | undefined;\n items: BreakdownItem[];\n}) {\n const segments: ProgressSegment[] = items.map((it) => ({\n count: it.value,\n color: it.color,\n label: it.label,\n }));\n return (\n <div className=\"flex flex-col gap-2\">\n <ProgressBar segments={segments} total={total > 0 ? total : 1} height=\"h-3\" />\n {items.length > 0 ? (\n <ul className=\"grid grid-cols-1 gap-y-1 text-xs\">\n {items.map((it) => (\n <li key={it.key} className=\"flex items-center gap-2\">\n <span\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: resolveCssColor(it.color) }}\n aria-hidden\n />\n <span className=\"min-w-0 flex-1 truncate font-mono text-muted-foreground\">\n {it.label}\n </span>\n <span className=\"font-mono tabular-nums text-foreground\">\n {formatUnit(it.value, it.unit ?? unit)}\n </span>\n <span className=\"w-10 text-right font-mono tabular-nums text-muted-foreground\">\n {it.percent.toFixed(0)}%\n </span>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n\ntype ChartVariant = \"area\" | \"line\" | \"stacked\";\n\nfunction Chart({\n rows,\n series,\n variant,\n unit,\n showZeroLine,\n referenceLines,\n}: {\n rows: MergedRow[];\n series: ResolvedSeries[];\n variant: ChartVariant;\n unit: string | undefined;\n showZeroLine: boolean;\n referenceLines: TimeseriesReferenceLine[];\n}) {\n const stacked = variant === \"stacked\";\n // Mirrored series carry negative values; show magnitudes on axis and tooltip.\n const seriesByKey = new Map(series.map((s) => [s.key, s]));\n // recharts needs a CSS color value; a series may carry a Tailwind class.\n const strokeOf = (s: ResolvedSeries) => resolveCssColor(s.color);\n // Distinct units map to a left and (when present) right axis; each series draws\n // against the axis for its unit so mixed-unit panels keep independent scales.\n const { axes: yAxes, axisOfKey } = useMemo(() => assignAxes(series), [series]);\n const axisOf = (key: string): \"left\" | \"right\" => axisOfKey.get(key) ?? \"left\";\n // A reference line draws against the axis formatting its unit, else the left.\n const axisOfUnit = (u: string | undefined): \"left\" | \"right\" =>\n yAxes.find((ax) => ax.unit === u)?.id ?? \"left\";\n const axes = (\n <>\n <CartesianGrid strokeOpacity={0.12} vertical={false} />\n <XAxis\n dataKey=\"at\"\n tickFormatter={formatClock}\n tick={{ fontSize: 10 }}\n stroke=\"currentColor\"\n strokeOpacity={0.35}\n minTickGap={32}\n />\n {yAxes.map((ax) => (\n <YAxis\n key={ax.id}\n yAxisId={ax.id}\n orientation={ax.orientation}\n tick={{ fontSize: 10 }}\n stroke=\"currentColor\"\n strokeOpacity={0.35}\n width={40}\n tickFormatter={(v: number) => formatUnit(Math.abs(v), ax.unit)}\n />\n ))}\n <Tooltip\n labelFormatter={(label) => formatClock(String(label))}\n formatter={(value, name) => {\n const s = seriesByKey.get(String(name));\n return [formatUnit(Math.abs(Number(value) || 0), s?.unit ?? unit), s?.label ?? String(name)];\n }}\n contentStyle={{ fontSize: 12 }}\n />\n {showZeroLine ? (\n <ReferenceLine yAxisId=\"left\" y={0} stroke=\"currentColor\" strokeOpacity={0.35} />\n ) : null}\n {referenceLines.map((ref, i) => (\n <ReferenceLine\n key={`ref-${i}`}\n yAxisId={axisOfUnit(ref.unit ?? unit)}\n y={ref.value}\n stroke={referenceColor(ref)}\n strokeDasharray=\"4 4\"\n ifOverflow=\"extendDomain\"\n />\n ))}\n </>\n );\n\n return (\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n {variant === \"line\" ? (\n <LineChart data={rows} margin={{ top: 4, right: 8, bottom: 0, left: 0 }}>\n {axes}\n {series.map((s) => (\n <Line\n key={s.key}\n yAxisId={axisOf(s.key)}\n type=\"monotone\"\n dataKey={s.key}\n name={s.key}\n stroke={strokeOf(s)}\n strokeWidth={2}\n dot={false}\n connectNulls\n isAnimationActive={false}\n />\n ))}\n </LineChart>\n ) : (\n <AreaChart data={rows} margin={{ top: 4, right: 8, bottom: 0, left: 0 }}>\n {axes}\n {series.map((s) => (\n <Area\n key={s.key}\n yAxisId={axisOf(s.key)}\n type=\"monotone\"\n dataKey={s.key}\n name={s.key}\n stroke={strokeOf(s)}\n fill={strokeOf(s)}\n {...(stacked ? { stackId: `stack-${axisOf(s.key)}` } : {})}\n fillOpacity={stacked ? 0.7 : 0.12}\n strokeWidth={stacked ? 0 : 2}\n connectNulls\n isAnimationActive={false}\n />\n ))}\n </AreaChart>\n )}\n </ResponsiveContainer>\n );\n}\n\nfunction PanelMessage({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"flex h-full items-center justify-center text-xs text-muted-foreground\">\n {children}\n </div>\n );\n}\n\nfunction PanelIcon({ icon }: { icon: string | StaticIconComponent }) {\n if (typeof icon === \"string\") {\n return <Icon name={icon} width={16} height={16} className=\"text-muted-foreground\" />;\n }\n return <Icon icon={icon} width={16} height={16} className=\"text-muted-foreground\" />;\n}\n"],"mappings":";;;;;;;;;;;;;;AAkDA,SAAS,YA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Q;EAAI,WAAU;CAAyB,CAAA;AACrF"}
1
+ {"version":3,"file":"TimeseriesPanel.cjs","names":["defaultTimeseriesFetcher","useState","useMemo","resolveSeries","useTimeseriesQueries","expandServedSeries","mergeSeries","resolveBreakdown","cn","Icon","UiFullscreen","Modal","latestReading","formatReading","resolveCssColor","formatUnit","ProgressBar","NO_DATA_LABEL","splitGapRuns","assignAxes","_Fragment","CartesianGrid","XAxis","YAxis","Tooltip","ReferenceLine","ResponsiveContainer","LineChart","Line","AreaChart","Area","DefaultTooltipContent"],"sources":["../../src/data/TimeseriesPanel.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n DefaultTooltipContent,\n type DefaultTooltipContentProps,\n Line,\n LineChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { cn } from \"../lib/utils\";\nimport { resolveCssColor } from \"../lib/color\";\nimport { formatUnit } from \"../lib/format\";\nimport { Modal } from \"../overlay/Modal\";\nimport { ProgressBar, type ProgressSegment } from \"./ProgressBar\";\nimport { UiFullscreen } from \"../icons\";\nimport { Icon, type StaticIconComponent } from \"./Icon\";\nimport { assignAxes, latestReading } from \"./TimeseriesPanel.axes\";\nimport { formatReading, NO_DATA_LABEL } from \"./TimeseriesPanel.readout\";\nimport { splitGapRuns } from \"./TimeseriesPanel.segments\";\nimport {\n expandServedSeries,\n mergeSeries,\n resolveBreakdown,\n resolveSeries,\n type BreakdownItem,\n type MergedRow,\n type ResolvedSeries,\n type TimeseriesPanelProps,\n type TimeseriesReferenceLine,\n} from \"./TimeseriesPanel.model\";\nimport { defaultTimeseriesFetcher, useTimeseriesQueries } from \"./timeseries-query\";\n\nexport type { AxisAssignment, AxisOrientation, AxisSpec } from \"./TimeseriesPanel.axes\";\nexport type {\n BreakdownItem,\n DisplaySeries,\n MergedRow,\n ResolvedSeries,\n SeriesLoadContext,\n SeriesLoader,\n TimeseriesPanelProps,\n TimeseriesPoint,\n TimeseriesReferenceLine,\n TimeseriesResponse,\n TimeseriesSeries,\n TimeseriesServerSeries,\n} from \"./TimeseriesPanel.model\";\n\nfunction formatClock(at: string): string {\n const date = new Date(at);\n if (Number.isNaN(date.getTime())) return \"\";\n return date.toLocaleTimeString([], { hour: \"2-digit\", minute: \"2-digit\" });\n}\n\nexport function TimeseriesPanel(props: TimeseriesPanelProps) {\n const {\n title,\n icon,\n unit,\n range = \"1h\",\n refreshMs = 5000,\n height = 160,\n variant = \"area\",\n expandable = true,\n total,\n referenceLines,\n fetcher = defaultTimeseriesFetcher,\n className,\n } = props;\n const isBreakdown = variant === \"breakdown\";\n // The inline chart (non-breakdown only) and the expand modal both need a\n // time-series variant; breakdown has no inline chart and expands to \"area\".\n const chartVariant: ChartVariant = isBreakdown ? \"area\" : variant;\n const expandVariant = props.expandVariant ?? chartVariant;\n\n const [expanded, setExpanded] = useState(false);\n\n const requested = useMemo(() => resolveSeries(props), [props]);\n const results = useTimeseriesQueries(\n requested.map((s) => ({ id: s.key, load: s.load })),\n { baseUrl: props.baseUrl ?? \"\", range, refreshMs, fetcher },\n );\n const refs = referenceLines ?? [];\n\n const error = results.find((r) => r.error)?.error ?? null;\n const isError = error !== null;\n const isLoading = results.some((r) => r.isLoading) && results.every((r) => !r.series);\n const served = results.map((r) => r.series);\n const { series, points } = useMemo(() => expandServedSeries(props, served), [props, served]);\n const rows = useMemo(() => mergeSeries(series, points), [series, points]);\n const hasMirrored = series.some((s) => s.transform);\n const breakdown = useMemo(\n () => (isBreakdown ? resolveBreakdown(series, rows, total) : null),\n [isBreakdown, series, rows, total],\n );\n\n // Breakdown renders instantly from `current`; the modal still needs polled\n // history. Other variants gate on having ≥2 points to draw a line.\n const canExpand = expandable && rows.length >= 2;\n\n return (\n <div className={cn(\"flex flex-col rounded-lg border border-border bg-card p-3\", className)}>\n <div className=\"flex items-center justify-between gap-2 text-xs text-muted-foreground\">\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n {icon ? <PanelIcon icon={icon} /> : null}\n <span className=\"truncate font-medium text-foreground\">{title}</span>\n </span>\n <span className=\"inline-flex shrink-0 items-center gap-1.5\">\n {breakdown ? (\n <BreakdownReadout total={breakdown.total} unit={unit} items={breakdown.items} />\n ) : (\n <LatestReadout series={series} rows={rows} />\n )}\n {canExpand ? (\n <button\n type=\"button\"\n aria-label=\"Expand chart\"\n onClick={() => setExpanded(true)}\n className=\"text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon icon={UiFullscreen} width={14} height={14} />\n </button>\n ) : null}\n </span>\n </div>\n <div className=\"mt-2\" style={breakdown ? undefined : { height }}>\n {error ? (\n <PanelMessage>{error.message || \"Failed to load metric\"}</PanelMessage>\n ) : breakdown ? (\n <BreakdownView total={breakdown.total} unit={unit} items={breakdown.items} />\n ) : isLoading ? (\n <PanelMessage>Loading…</PanelMessage>\n ) : rows.length < 2 ? (\n <PanelMessage>Collecting data…</PanelMessage>\n ) : (\n <Chart\n rows={rows}\n series={series}\n variant={chartVariant}\n unit={unit}\n showZeroLine={hasMirrored}\n referenceLines={refs}\n />\n )}\n </div>\n {!breakdown && !isError && !isLoading && rows.length >= 2 && series.length + refs.length > 1 ? (\n <ChartLegend series={series} rows={rows} referenceLines={refs} unit={unit} />\n ) : null}\n {canExpand ? (\n <Modal open={expanded} onClose={() => setExpanded(false)} title={title} size=\"xl\">\n <div style={{ height: 360 }}>\n <Chart\n rows={rows}\n series={series}\n variant={expandVariant}\n unit={unit}\n showZeroLine={hasMirrored}\n referenceLines={refs}\n />\n </div>\n {series.length + refs.length > 1 ? (\n <ChartLegend series={series} rows={rows} referenceLines={refs} unit={unit} />\n ) : null}\n </Modal>\n ) : null}\n </div>\n );\n}\n\n/**\n * Header readout for a single-series panel: the latest value, formatted with the\n * series' unit. Multi-series panels render the per-series values in {@link ChartLegend}\n * below the chart instead, so this returns null for them to avoid overlapping the title.\n */\nfunction LatestReadout({ series, rows }: { series: ResolvedSeries[]; rows: MergedRow[] }) {\n const only = series.length === 1 ? series[0] : undefined;\n if (!only) return null;\n const v = latestReading(rows, only.key);\n if (v === undefined) return null;\n return <span className=\"tabular-nums\">{formatReading(v, only.unit)}</span>;\n}\n\nconst REFERENCE_LINE_COLOR = \"var(--muted-foreground, #64748b)\";\n\nfunction referenceColor(ref: TimeseriesReferenceLine): string {\n return resolveCssColor(ref.color ?? REFERENCE_LINE_COLOR);\n}\n\n/**\n * Wrapping color-keyed legend for the time-series variants: dot + label + latest\n * value, then each reference line with its fixed value.\n */\nfunction ChartLegend({\n series,\n rows,\n referenceLines,\n unit,\n}: {\n series: ResolvedSeries[];\n rows: MergedRow[];\n referenceLines: TimeseriesReferenceLine[];\n unit: string | undefined;\n}) {\n return (\n <ul className=\"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground\">\n {series.map((s) => {\n const v = latestReading(rows, s.key);\n return (\n <li key={s.key} className=\"inline-flex min-w-0 items-center gap-1.5\">\n <span\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: resolveCssColor(s.color) }}\n aria-hidden\n />\n <span className=\"truncate text-foreground\">{s.label}</span>\n {v !== undefined ? (\n <span className=\"tabular-nums\">{formatReading(v, s.unit)}</span>\n ) : null}\n </li>\n );\n })}\n {referenceLines.map((ref, i) => (\n <li key={`ref-${i}`} className=\"inline-flex min-w-0 items-center gap-1.5\">\n <span\n className=\"h-0.5 w-2.5 shrink-0\"\n style={{ backgroundColor: referenceColor(ref) }}\n aria-hidden\n />\n <span className=\"truncate text-foreground\">{ref.label}</span>\n <span className=\"tabular-nums\">{formatUnit(ref.value, ref.unit ?? unit)}</span>\n </li>\n ))}\n </ul>\n );\n}\n\n/** Breakdown header readout: `used / total · pct%`, where used is the sum of segments. */\nfunction BreakdownReadout({\n total,\n unit,\n items,\n}: {\n total: number;\n unit: string | undefined;\n items: BreakdownItem[];\n}) {\n const used = items.reduce((acc, it) => acc + (it.value ?? 0), 0);\n const pct = total > 0 ? Math.min(100, (used / total) * 100) : 0;\n return (\n <span className=\"font-mono tabular-nums\">\n {formatUnit(used, unit)} / {formatUnit(total, unit)} · {pct.toFixed(0)}%\n </span>\n );\n}\n\n/** Instantaneous stacked bar + legend list. The expand button (in the panel header) opens the graph. */\nfunction BreakdownView({\n total,\n unit,\n items,\n}: {\n total: number;\n unit: string | undefined;\n items: BreakdownItem[];\n}) {\n const segments: ProgressSegment[] = items.map((it) => ({\n count: it.value ?? 0,\n color: it.color,\n label: it.label,\n }));\n return (\n <div className=\"flex flex-col gap-2\">\n <ProgressBar segments={segments} total={total > 0 ? total : 1} height=\"h-3\" />\n {items.length > 0 ? (\n <ul className=\"grid grid-cols-1 gap-y-1 text-xs\">\n {items.map((it) => (\n <li key={it.key} className=\"flex items-center gap-2\">\n <span\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: resolveCssColor(it.color) }}\n aria-hidden\n />\n <span className=\"min-w-0 flex-1 truncate font-mono text-muted-foreground\">\n {it.label}\n </span>\n <span className=\"font-mono tabular-nums text-foreground\">\n {it.value === null ? NO_DATA_LABEL : formatUnit(it.value, it.unit ?? unit)}\n </span>\n <span className=\"w-10 text-right font-mono tabular-nums text-muted-foreground\">\n {it.value === null ? \"\" : `${it.percent.toFixed(0)}%`}\n </span>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n\ntype ChartVariant = \"area\" | \"line\" | \"stacked\";\n\nfunction Chart({\n rows,\n series,\n variant,\n unit,\n showZeroLine,\n referenceLines,\n}: {\n rows: MergedRow[];\n series: ResolvedSeries[];\n variant: ChartVariant;\n unit: string | undefined;\n showZeroLine: boolean;\n referenceLines: TimeseriesReferenceLine[];\n}) {\n const stacked = variant === \"stacked\";\n // A series with an explicit gap is drawn as one line per run (see splitGapRuns); the rest as one.\n const { rows: plotRows, plots } = useMemo(() => splitGapRuns(series, rows), [series, rows]);\n // recharts needs a CSS color value; a series may carry a Tailwind class.\n const strokeOf = (s: ResolvedSeries) => resolveCssColor(s.color);\n // Distinct units map to a left and (when present) right axis; each series draws\n // against the axis for its unit so mixed-unit panels keep independent scales.\n const { axes: yAxes, axisOfKey } = useMemo(() => assignAxes(series), [series]);\n const axisOf = (key: string): \"left\" | \"right\" => axisOfKey.get(key) ?? \"left\";\n // A reference line draws against the axis formatting its unit, else the left.\n const axisOfUnit = (u: string | undefined): \"left\" | \"right\" =>\n yAxes.find((ax) => ax.unit === u)?.id ?? \"left\";\n const axes = (\n <>\n <CartesianGrid strokeOpacity={0.12} vertical={false} />\n <XAxis\n dataKey=\"at\"\n tickFormatter={formatClock}\n tick={{ fontSize: 10 }}\n stroke=\"currentColor\"\n strokeOpacity={0.35}\n minTickGap={32}\n />\n {yAxes.map((ax) => (\n <YAxis\n key={ax.id}\n yAxisId={ax.id}\n orientation={ax.orientation}\n tick={{ fontSize: 10 }}\n stroke=\"currentColor\"\n strokeOpacity={0.35}\n width={40}\n tickFormatter={(v: number) => formatUnit(Math.abs(v), ax.unit)}\n />\n ))}\n {/* filterNull off keeps the tooltip alive at a gap, where every run of a gapped series has no\n value; SeriesTooltip then reads the row itself, so a gap says \"no data\". */}\n <Tooltip\n filterNull={false}\n content={<SeriesTooltip rows={rows} series={series} unit={unit} />}\n labelFormatter={(label) => formatClock(String(label))}\n contentStyle={{ fontSize: 12 }}\n />\n {showZeroLine ? (\n <ReferenceLine yAxisId=\"left\" y={0} stroke=\"currentColor\" strokeOpacity={0.35} />\n ) : null}\n {referenceLines.map((ref, i) => (\n <ReferenceLine\n key={`ref-${i}`}\n yAxisId={axisOfUnit(ref.unit ?? unit)}\n y={ref.value}\n stroke={referenceColor(ref)}\n strokeDasharray=\"4 4\"\n ifOverflow=\"extendDomain\"\n />\n ))}\n </>\n );\n\n return (\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n {variant === \"line\" ? (\n <LineChart data={plotRows} margin={{ top: 4, right: 8, bottom: 0, left: 0 }}>\n {axes}\n {plots.map(({ dataKey, series: s, isolatedSample }) => (\n <Line\n key={dataKey}\n yAxisId={axisOf(s.key)}\n type=\"monotone\"\n dataKey={dataKey}\n name={s.key}\n stroke={strokeOf(s)}\n strokeWidth={2}\n dot={isolatedSample ? isolatedDot(strokeOf(s)) : false}\n connectNulls\n isAnimationActive={false}\n />\n ))}\n </LineChart>\n ) : (\n <AreaChart data={plotRows} margin={{ top: 4, right: 8, bottom: 0, left: 0 }}>\n {axes}\n {plots.map(({ dataKey, series: s, isolatedSample }) => (\n <Area\n key={dataKey}\n yAxisId={axisOf(s.key)}\n type=\"monotone\"\n dataKey={dataKey}\n name={s.key}\n stroke={strokeOf(s)}\n fill={strokeOf(s)}\n {...(stacked ? { stackId: `stack-${axisOf(s.key)}` } : {})}\n fillOpacity={stacked ? 0.7 : 0.12}\n strokeWidth={stacked ? 0 : 2}\n dot={isolatedSample ? isolatedDot(strokeOf(s)) : false}\n connectNulls\n isAnimationActive={false}\n />\n ))}\n </AreaChart>\n )}\n </ResponsiveContainer>\n );\n}\n\n/** A lone sample between two gaps has no line to carry it, so it is drawn as a dot. */\nconst isolatedDot = (color: string) => ({ r: 2.5, fill: color, stroke: color });\n\ntype SeriesTooltipProps = {\n rows: MergedRow[];\n series: ResolvedSeries[];\n unit: string | undefined;\n} & Pick<DefaultTooltipContentProps, \"label\" | \"labelFormatter\" | \"contentStyle\">;\n\n/**\n * Tooltip body read from the merged row at the hovered time, not from recharts' payload: a gapped\n * series is drawn as several runs, none of which has a value at the gap, yet the gap must say\n * \"no data\". Series that simply have no row at this time (undefined) are left out, as before.\n */\nfunction SeriesTooltip({ rows, series, unit, ...rest }: SeriesTooltipProps) {\n const row = rows.find((candidate) => candidate.at === rest.label);\n const payload = series.flatMap((s) => {\n const value = row?.[s.key];\n if (value === undefined || typeof value === \"string\") return [];\n return [{ name: s.label, value: formatReading(value, s.unit ?? unit), color: resolveCssColor(s.color), dataKey: s.key, graphicalItemId: s.key }];\n });\n return <DefaultTooltipContent {...rest} payload={payload} />;\n}\n\nfunction PanelMessage({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"flex h-full items-center justify-center text-xs text-muted-foreground\">\n {children}\n </div>\n );\n}\n\nfunction PanelIcon({ icon }: { icon: string | StaticIconComponent }) {\n if (typeof icon === \"string\") {\n return <Icon name={icon} width={16} height={16} className=\"text-muted-foreground\" />;\n }\n return <Icon icon={icon} width={16} height={16} className=\"text-muted-foreground\" />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsDA,SAAS,YAAY,IAAoB;CACvC,MAAM,OAAO,IAAI,KAAK,EAAE;CACxB,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,GAAG,OAAO;CACzC,OAAO,KAAK,mBAAmB,CAAC,GAAG;EAAE,MAAM;EAAW,QAAQ;CAAU,CAAC;AAC3E;AAEA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,EACJ,OACA,MACA,MACA,QAAQ,MACR,YAAY,KACZ,SAAS,KACT,UAAU,QACV,aAAa,MACb,OACA,gBACA,UAAUA,yBAAAA,0BACV,cACE;CACJ,MAAM,cAAc,YAAY;CAGhC,MAAM,eAA6B,cAAc,SAAS;CAC1D,MAAM,gBAAgB,MAAM,iBAAiB;CAE7C,MAAM,CAAC,UAAU,gBAAA,GAAeC,MAAAA,SAAAA,CAAS,KAAK;CAE9C,MAAM,aAAA,GAAYC,MAAAA,QAAAA,OAAcC,8BAAAA,cAAc,KAAK,GAAG,CAAC,KAAK,CAAC;CAC7D,MAAM,UAAUC,yBAAAA,qBACd,UAAU,KAAK,OAAO;EAAE,IAAI,EAAE;EAAK,MAAM,EAAE;CAAK,EAAE,GAClD;EAAE,SAAS,MAAM,WAAW;EAAI;EAAO;EAAW;CAAQ,CAC5D;CACA,MAAM,OAAO,kBAAkB,CAAC;CAEhC,MAAM,QAAQ,QAAQ,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS;CACrD,MAAM,UAAU,UAAU;CAC1B,MAAM,YAAY,QAAQ,MAAM,MAAM,EAAE,SAAS,KAAK,QAAQ,OAA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,EAAE,MAAM,wBAAwB,CAAC;AACxF,YAAY,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAQjC,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAiH1D"}
1
+ {"version":3,"file":"TimeseriesPanel.d.ts","sourceRoot":"","sources":["../../src/data/TimeseriesPanel.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAQL,KAAK,oBAAoB,EAE1B,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxF,YAAY,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAQjC,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAiH1D"}