@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
@@ -1 +1 @@
1
- {"version":3,"file":"Workspace.regions.js","names":["_Fragment"],"sources":["../../src/layout/Workspace.regions.tsx"],"sourcesContent":["import { type CSSProperties } from \"react\";\nimport { ResizeHandle } from \"./ResizeHandle\";\nimport { UiChevronDown, UiChevronRight } from \"../icons\";\nimport { cn } from \"../lib/utils\";\nimport {\n WORKSPACE_COLLAPSED_RAIL_WIDTH,\n WORKSPACE_DEFAULT_SIDE_WIDTH,\n type WorkspaceLayoutState,\n type WorkspacePaneSpec,\n type WorkspaceSideArrangement,\n} from \"./Workspace.model\";\n\nexport type WorkspaceUpdate = (\n change: (current: WorkspaceLayoutState) => WorkspaceLayoutState,\n) => void;\n\n/**\n * Which headers sit under the workspace's absolutely positioned top-right\n * controls, and from which width: the center pane in the stacked layout, then\n * whichever pane owns the top-right corner once the regions sit side by side\n * (the first right pane while the right side is shown, otherwise the center).\n */\nexport type WorkspaceTopRightReserve = \"always\" | \"stacked\" | \"wide\";\n\nconst TOP_RIGHT_RESERVE_CLASS: Record<WorkspaceTopRightReserve, string> = {\n always: \"pr-[var(--workspace-top-right-reserve,0px)]\",\n stacked:\n \"pr-[var(--workspace-top-right-reserve,0px)] @3xl/workspace:pr-2\",\n wide: \"@3xl/workspace:pr-[var(--workspace-top-right-reserve,0px)]\",\n};\n\n/** `\"wide\"` rails the header only once the regions sit side by side; narrower, it stays a full-width row. */\ntype PaneCompact = boolean | \"wide\";\n\nconst COMPACT_CLASS = {\n header: {\n always: \"min-h-12 flex-col flex-nowrap px-1 py-2\",\n wide: \"@3xl/workspace:min-h-12 @3xl/workspace:flex-col @3xl/workspace:flex-nowrap @3xl/workspace:px-1 @3xl/workspace:py-2\",\n },\n toggle: { always: \"flex-col\", wide: \"@3xl/workspace:flex-col\" },\n label: {\n always: \"[writing-mode:vertical-rl]\",\n wide: \"@3xl/workspace:[writing-mode:vertical-rl]\",\n },\n} as const;\n\nconst COMPACT_WIDE_TRAILING_CLASS = \"@3xl/workspace:hidden\";\n\ntype PaneViewProps = {\n pane: WorkspacePaneSpec;\n collapsed: boolean;\n compact: PaneCompact;\n /** Fills the full height of a column once collapsed, so its rail runs the whole side. */\n fillColumn?: boolean;\n reserveTopRight?: WorkspaceTopRightReserve | undefined;\n onToggle: () => void;\n};\n\nfunction WorkspacePaneView({\n pane,\n collapsed,\n compact,\n fillColumn,\n reserveTopRight,\n onToggle,\n}: PaneViewProps) {\n const mode = compact === \"wide\" ? \"wide\" : \"always\";\n const compactClass = (part: keyof typeof COMPACT_CLASS) =>\n compact ? COMPACT_CLASS[part][mode] : undefined;\n const headerContent = (\n <>\n {pane.collapsible !== false &&\n (collapsed ? (\n <UiChevronRight className=\"size-3.5 shrink-0\" />\n ) : (\n <UiChevronDown className=\"size-3.5 shrink-0\" />\n ))}\n {pane.slots?.headerLeading}\n {pane.icon && (\n <span className=\"flex size-4 shrink-0 items-center justify-center\">\n {pane.icon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate text-xs font-semibold\",\n compactClass(\"label\"),\n )}\n >\n {pane.label}\n </span>\n </>\n );\n\n return (\n <section\n data-testid={`workspace-pane-${pane.id}`}\n className={cn(\n \"flex min-h-0 min-w-0 flex-col overflow-hidden bg-background\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n collapsed && fillColumn && \"@3xl/workspace:flex-1\",\n pane.className,\n )}\n >\n {pane.showHeader !== false ? (\n <header\n className={cn(\n // A crowded header wraps its trailing slot onto a second row instead of clipping it.\n \"flex min-h-9 shrink-0 flex-wrap items-center gap-x-1 border-b border-border bg-muted/40 px-2\",\n compactClass(\"header\"),\n reserveTopRight && TOP_RIGHT_RESERVE_CLASS[reserveTopRight],\n )}\n >\n {pane.collapsible === false ? (\n <div className=\"flex min-w-0 flex-[1_1_16rem] items-center gap-1.5\">\n {headerContent}\n </div>\n ) : (\n <button\n type=\"button\"\n className={cn(\n \"flex min-w-0 flex-[1_1_16rem] items-center gap-1.5 rounded-sm text-left hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n compactClass(\"toggle\"),\n )}\n aria-expanded={!collapsed}\n aria-label={`${collapsed ? \"Expand\" : \"Collapse\"} ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n onClick={onToggle}\n >\n {headerContent}\n </button>\n )}\n {compact !== true && pane.slots?.headerTrailing && (\n <div\n className={cn(\n \"ml-auto flex max-w-full shrink-0 flex-wrap items-center justify-end gap-1 py-0.5\",\n compact && COMPACT_WIDE_TRAILING_CLASS,\n )}\n >\n {pane.slots.headerTrailing}\n </div>\n )}\n </header>\n ) : null}\n {!collapsed && (\n <div\n className={cn(\n \"min-h-0 min-w-0 flex-1 overflow-auto\",\n pane.contentClassName,\n )}\n >\n {pane.content}\n </div>\n )}\n </section>\n );\n}\n\ntype SideRegionProps = {\n location: \"left\" | \"right\";\n panes: WorkspacePaneSpec[];\n /** \"columns\" lays the panes next to each other once the workspace is wide enough; \"stack\" divides one shared region. */\n arrangement: WorkspaceSideArrangement;\n state: WorkspaceLayoutState;\n update: WorkspaceUpdate;\n /** Applies to the pane that owns the top-right corner: the first pane of a stack, the last column of a right side. */\n reserveTopRight?: WorkspaceTopRightReserve;\n};\n\nconst DEFAULT_COLUMN_MIN_WIDTH = 160;\nconst DEFAULT_COLUMN_MAX_WIDTH = 720;\n\n/** A column's width while open; `collapsed` columns shrink to a rail. */\nfunction columnWidth(pane: WorkspacePaneSpec, state: WorkspaceLayoutState) {\n if (state.collapsed[pane.id]) return WORKSPACE_COLLAPSED_RAIL_WIDTH;\n return (\n state.paneWidths[pane.id] ?? pane.width ?? WORKSPACE_DEFAULT_SIDE_WIDTH\n );\n}\n\ntype SideColumnProps = {\n location: \"left\" | \"right\";\n pane: WorkspacePaneSpec;\n width: number;\n collapsed: boolean;\n reserveTopRight: WorkspaceTopRightReserve | undefined;\n update: WorkspaceUpdate;\n};\n\n/** One pane of a \"columns\" side: full width while stacked, its own resizable width once the regions sit side by side. */\nfunction WorkspaceSideColumn({\n location,\n pane,\n width,\n collapsed,\n reserveTopRight,\n update,\n}: SideColumnProps) {\n return (\n <div\n data-testid={`workspace-stack-${pane.id}`}\n style={{ \"--workspace-pane-width\": `${width}px` } as CSSProperties}\n className={cn(\n \"relative flex min-h-0 flex-col @3xl/workspace:h-full @3xl/workspace:w-[var(--workspace-pane-width)] @3xl/workspace:flex-none\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n )}\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={collapsed ? \"wide\" : false}\n fillColumn\n reserveTopRight={reserveTopRight}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {!collapsed && pane.resizable !== false && (\n <ResizeHandle\n orientation=\"vertical\"\n value={width}\n min={pane.minWidth ?? DEFAULT_COLUMN_MIN_WIDTH}\n max={pane.maxWidth ?? DEFAULT_COLUMN_MAX_WIDTH}\n pointerFactor={location === \"left\" ? 1 : -1}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId={`workspace-resize-pane-${pane.id}`}\n className={cn(\n \"hidden @3xl/workspace:block\",\n location === \"left\" ? \"right-0\" : \"left-0\",\n )}\n onChange={(nextWidth) =>\n update((current) => ({\n ...current,\n paneWidths: { ...current.paneWidths, [pane.id]: nextWidth },\n }))\n }\n />\n )}\n </div>\n );\n}\n\nexport function WorkspaceSideRegion({\n location,\n panes,\n arrangement,\n state,\n update,\n reserveTopRight,\n}: SideRegionProps) {\n if (panes.length === 0) return null;\n const columns = arrangement === \"columns\";\n const sideCollapsed = state.sideCollapsed[location];\n const allCollapsed = panes.every((pane) => state.collapsed[pane.id]);\n const width = sideCollapsed\n ? 0\n : columns\n ? panes.reduce((total, pane) => total + columnWidth(pane, state), 0)\n : allCollapsed\n ? WORKSPACE_COLLAPSED_RAIL_WIDTH\n : location === \"left\"\n ? state.leftWidth\n : state.rightWidth;\n const min = Math.max(...panes.map((pane) => pane.minWidth ?? 160));\n const max = Math.min(...panes.map((pane) => pane.maxWidth ?? 720));\n const canResize =\n !columns &&\n !sideCollapsed &&\n !allCollapsed &&\n panes.some((pane) => pane.resizable !== false);\n const style = { \"--workspace-region-width\": `${width}px` } as CSSProperties;\n // Open panes flex-share the region, so changing one pane's basis by d moves its\n // rendered edge by only d*(open-1)/open; scale the drag so the handle tracks the cursor.\n const openCount = panes.filter(\n (pane) => !(state.collapsed[pane.id] ?? false),\n ).length;\n const stackPointerFactor = openCount > 1 ? openCount / (openCount - 1) : 1;\n\n return (\n <aside\n data-testid={`workspace-region-${location}`}\n aria-hidden={sideCollapsed}\n style={style}\n className={cn(\n \"relative order-2 flex min-h-0 w-full flex-col overflow-hidden border-border @3xl/workspace:row-span-2 @3xl/workspace:h-full @3xl/workspace:w-[var(--workspace-region-width)]\",\n location === \"left\"\n ? \"@3xl/workspace:order-none @3xl/workspace:col-start-1 @3xl/workspace:row-start-1 @3xl/workspace:border-r\"\n : \"order-3 @3xl/workspace:order-none @3xl/workspace:col-start-3 @3xl/workspace:row-start-1 @3xl/workspace:border-l\",\n columns && \"@3xl/workspace:flex-row\",\n sideCollapsed && \"hidden border-0 @3xl/workspace:flex\",\n )}\n >\n {!sideCollapsed &&\n columns &&\n panes.map((pane, index) => (\n <WorkspaceSideColumn\n key={pane.id}\n location={location}\n pane={pane}\n width={columnWidth(pane, state)}\n collapsed={state.collapsed[pane.id] ?? false}\n reserveTopRight={\n index === (location === \"right\" ? panes.length - 1 : 0)\n ? reserveTopRight\n : undefined\n }\n update={update}\n />\n ))}\n {!sideCollapsed &&\n !columns &&\n panes.map((pane, index) => {\n const collapsed = state.collapsed[pane.id] ?? false;\n const nextPane = panes[index + 1];\n return (\n <div\n key={pane.id}\n data-testid={`workspace-stack-${pane.id}`}\n className={cn(\n \"relative flex min-h-0 flex-col\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n )}\n style={\n !collapsed && state.stackHeights[pane.id] !== undefined\n ? { flexBasis: `${state.stackHeights[pane.id]}px` }\n : undefined\n }\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={allCollapsed}\n reserveTopRight={index === 0 ? reserveTopRight : undefined}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {!collapsed &&\n nextPane &&\n pane.resizable !== false &&\n nextPane.resizable !== false && (\n <ResizeHandle\n orientation=\"horizontal\"\n // Seed from the pane's current flex basis (0 when unsized) so the\n // drag starts where the divider actually is — no snap on first move.\n value={state.stackHeights[pane.id] ?? 0}\n min={pane.minHeight ?? 72}\n max={pane.maxHeight ?? 640}\n pointerFactor={stackPointerFactor}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId={`workspace-resize-stack-${pane.id}`}\n className=\"bottom-0 hidden @3xl/workspace:block\"\n onChange={(height) =>\n update((current) => ({\n ...current,\n stackHeights: {\n ...current.stackHeights,\n [pane.id]: height,\n },\n }))\n }\n />\n )}\n </div>\n );\n })}\n {canResize && (\n <ResizeHandle\n orientation=\"vertical\"\n value={width}\n min={min}\n max={max}\n pointerFactor={location === \"left\" ? 1 : -1}\n label={`Resize ${location} workspace panes`}\n testId={`workspace-resize-${location}`}\n className={cn(\"hidden @3xl/workspace:block\", location === \"left\" ? \"right-0\" : \"left-0\")}\n onChange={(nextWidth) =>\n update((current) => ({\n ...current,\n [location === \"left\" ? \"leftWidth\" : \"rightWidth\"]: nextWidth,\n }))\n }\n />\n )}\n </aside>\n );\n}\n\ntype SingleRegionProps = {\n pane: WorkspacePaneSpec;\n state: WorkspaceLayoutState;\n update: WorkspaceUpdate;\n reserveTopRight?: WorkspaceTopRightReserve;\n};\n\nexport function WorkspaceSingleRegion({\n pane,\n state,\n update,\n reserveTopRight,\n}: SingleRegionProps) {\n const collapsed = state.collapsed[pane.id] ?? false;\n const isBottom = pane.location === \"bottom\";\n const style =\n isBottom && !collapsed\n ? ({\n \"--workspace-bottom-height\": `${state.bottomHeight}px`,\n } as CSSProperties)\n : undefined;\n return (\n <div\n data-testid={`workspace-region-${pane.location}`}\n style={style}\n className={cn(\n \"relative flex min-h-0 min-w-0 flex-col overflow-hidden\",\n isBottom\n ? \"order-4 w-full border-t border-border @3xl/workspace:order-none @3xl/workspace:col-start-2 @3xl/workspace:row-start-2 @3xl/workspace:h-[var(--workspace-bottom-height)]\"\n : \"order-1 min-h-80 @3xl/workspace:order-none @3xl/workspace:col-start-2 @3xl/workspace:row-start-1 @3xl/workspace:min-h-0\",\n )}\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={false}\n reserveTopRight={reserveTopRight}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {isBottom && !collapsed && pane.resizable !== false && (\n <ResizeHandle\n orientation=\"horizontal\"\n value={state.bottomHeight}\n min={pane.minHeight ?? 96}\n max={pane.maxHeight ?? 640}\n pointerFactor={-1}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId=\"workspace-resize-bottom\"\n className=\"top-0 hidden @3xl/workspace:block\"\n onChange={(bottomHeight) =>\n update((current) => ({ ...current, bottomHeight }))\n }\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAwBA,IAAM,0BAAoE;CACxE,QAAQ;CACR,SACE;CACF,MAAM;AACR;AAKA,IAAM,gBAAgB;CACpB,QAAQ;EACN,QAAQ;EACR,MAAM;CACR;CACA,QAAQ;EAAE,QAAQ;EAAY,MAAM;CAA0B;CAC9D,OAAO;EACL,QAAQ;EACR,MAAM;CACR;AACF;AAEA,IAAM,8BAA8B;AAYpC,SAAS,kBAAkB,EACzB,MACA,WACA,SACA,YACA,iBACA,YACgB;CAChB,MAAM,OAAO,YAAY,SAAS,SAAS;CAC3C,MAAM,gBAAgB,SACpB,UAAU,cAAc,KAAK,CAAC,QAAQ,KAAA;CACxC,MAA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,SAAS;GACQ;GACjB,gBACE,QAAQ,aAAa;IACnB,GAAG;IACH,WAAW;KAAE,GAAG,QAAQ;MAAY,KAAK,KAAK,CAAC;IAAU;GAC3D,EAAE;EAEL,CAAA,GACA,YAAY,CAAC,aAAa,KAAK,cAAc,SAC5C,oBAAC,cAAD;GACE,aAAY;GACZ,OAAO,MAAM;GACb,KAAK,KAAK,aAAa;GACvB,KAAK,KAAK,aAAa;GACvB,eAAe;GACf,OAAO,UAAU,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,KAAK;GACpE,QAAO;GACP,WAAU;GACV,WAAW,iBACT,QAAQ,aAAa;IAAE,GAAG;IAAS;GAAa,EAAE;EAErD,CAAA,CAEA;;AAET"}
1
+ {"version":3,"file":"Workspace.regions.js","names":["_Fragment"],"sources":["../../src/layout/Workspace.regions.tsx"],"sourcesContent":["import { type CSSProperties } from \"react\";\nimport { ResizeHandle } from \"./ResizeHandle\";\nimport { UiChevronDown, UiChevronRight } from \"../icons\";\nimport { cn } from \"../lib/utils\";\nimport {\n WORKSPACE_COLLAPSED_RAIL_WIDTH,\n WORKSPACE_DEFAULT_SIDE_WIDTH,\n resolveBottomHeightBounds,\n type WorkspaceLayoutState,\n type WorkspacePaneSpec,\n type WorkspaceSideArrangement,\n} from \"./Workspace.model\";\n\nexport type WorkspaceUpdate = (\n change: (current: WorkspaceLayoutState) => WorkspaceLayoutState,\n) => void;\n\n/**\n * Which headers sit under the workspace's absolutely positioned top-right\n * controls, and from which width: the center pane in the stacked layout, then\n * whichever pane owns the top-right corner once the regions sit side by side\n * (the first right pane while the right side is shown, otherwise the center).\n */\nexport type WorkspaceTopRightReserve = \"always\" | \"stacked\" | \"wide\";\n\nconst TOP_RIGHT_RESERVE_CLASS: Record<WorkspaceTopRightReserve, string> = {\n always: \"pr-[var(--workspace-top-right-reserve,0px)]\",\n stacked:\n \"pr-[var(--workspace-top-right-reserve,0px)] @3xl/workspace:pr-2\",\n wide: \"@3xl/workspace:pr-[var(--workspace-top-right-reserve,0px)]\",\n};\n\n/** `\"wide\"` rails the header only once the regions sit side by side; narrower, it stays a full-width row. */\ntype PaneCompact = boolean | \"wide\";\n\nconst COMPACT_CLASS = {\n header: {\n always: \"min-h-12 flex-col flex-nowrap px-1 py-2\",\n wide: \"@3xl/workspace:min-h-12 @3xl/workspace:flex-col @3xl/workspace:flex-nowrap @3xl/workspace:px-1 @3xl/workspace:py-2\",\n },\n toggle: { always: \"flex-col\", wide: \"@3xl/workspace:flex-col\" },\n label: {\n always: \"[writing-mode:vertical-rl]\",\n wide: \"@3xl/workspace:[writing-mode:vertical-rl]\",\n },\n} as const;\n\nconst COMPACT_WIDE_TRAILING_CLASS = \"@3xl/workspace:hidden\";\n\ntype PaneViewProps = {\n pane: WorkspacePaneSpec;\n collapsed: boolean;\n compact: PaneCompact;\n /** Fills the full height of a column once collapsed, so its rail runs the whole side. */\n fillColumn?: boolean;\n reserveTopRight?: WorkspaceTopRightReserve | undefined;\n onToggle: () => void;\n};\n\nfunction WorkspacePaneView({\n pane,\n collapsed,\n compact,\n fillColumn,\n reserveTopRight,\n onToggle,\n}: PaneViewProps) {\n const mode = compact === \"wide\" ? \"wide\" : \"always\";\n const compactClass = (part: keyof typeof COMPACT_CLASS) =>\n compact ? COMPACT_CLASS[part][mode] : undefined;\n const headerContent = (\n <>\n {pane.collapsible !== false &&\n (collapsed ? (\n <UiChevronRight className=\"size-3.5 shrink-0\" />\n ) : (\n <UiChevronDown className=\"size-3.5 shrink-0\" />\n ))}\n {pane.slots?.headerLeading}\n {pane.icon && (\n <span className=\"flex size-4 shrink-0 items-center justify-center\">\n {pane.icon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate text-xs font-semibold\",\n compactClass(\"label\"),\n )}\n >\n {pane.label}\n </span>\n </>\n );\n\n return (\n <section\n data-testid={`workspace-pane-${pane.id}`}\n className={cn(\n \"flex min-h-0 min-w-0 flex-col overflow-hidden bg-background\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n collapsed && fillColumn && \"@3xl/workspace:flex-1\",\n pane.className,\n )}\n >\n {pane.showHeader !== false ? (\n <header\n className={cn(\n // A crowded header wraps its trailing slot onto a second row instead of clipping it.\n \"flex min-h-9 shrink-0 flex-wrap items-center gap-x-1 border-b border-border bg-muted/40 px-2\",\n compactClass(\"header\"),\n reserveTopRight && TOP_RIGHT_RESERVE_CLASS[reserveTopRight],\n )}\n >\n {pane.collapsible === false ? (\n <div className=\"flex min-w-0 flex-[1_1_16rem] items-center gap-1.5\">\n {headerContent}\n </div>\n ) : (\n <button\n type=\"button\"\n className={cn(\n \"flex min-w-0 flex-[1_1_16rem] items-center gap-1.5 rounded-sm text-left hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n compactClass(\"toggle\"),\n )}\n aria-expanded={!collapsed}\n aria-label={`${collapsed ? \"Expand\" : \"Collapse\"} ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n onClick={onToggle}\n >\n {headerContent}\n </button>\n )}\n {compact !== true && pane.slots?.headerTrailing && (\n <div\n className={cn(\n \"ml-auto flex max-w-full shrink-0 flex-wrap items-center justify-end gap-1 py-0.5\",\n compact && COMPACT_WIDE_TRAILING_CLASS,\n )}\n >\n {pane.slots.headerTrailing}\n </div>\n )}\n </header>\n ) : null}\n {!collapsed && (\n <div\n className={cn(\n \"min-h-0 min-w-0 flex-1 overflow-auto\",\n pane.contentClassName,\n )}\n >\n {pane.content}\n </div>\n )}\n </section>\n );\n}\n\ntype SideRegionProps = {\n location: \"left\" | \"right\";\n panes: WorkspacePaneSpec[];\n /** \"columns\" lays the panes next to each other once the workspace is wide enough; \"stack\" divides one shared region. */\n arrangement: WorkspaceSideArrangement;\n state: WorkspaceLayoutState;\n update: WorkspaceUpdate;\n /** Applies to the pane that owns the top-right corner: the first pane of a stack, the last column of a right side. */\n reserveTopRight?: WorkspaceTopRightReserve;\n};\n\nconst DEFAULT_COLUMN_MIN_WIDTH = 160;\nconst DEFAULT_COLUMN_MAX_WIDTH = 720;\n\n/** A column's width while open; `collapsed` columns shrink to a rail. */\nfunction columnWidth(pane: WorkspacePaneSpec, state: WorkspaceLayoutState) {\n if (state.collapsed[pane.id]) return WORKSPACE_COLLAPSED_RAIL_WIDTH;\n return (\n state.paneWidths[pane.id] ?? pane.width ?? WORKSPACE_DEFAULT_SIDE_WIDTH\n );\n}\n\ntype SideColumnProps = {\n location: \"left\" | \"right\";\n pane: WorkspacePaneSpec;\n width: number;\n collapsed: boolean;\n reserveTopRight: WorkspaceTopRightReserve | undefined;\n update: WorkspaceUpdate;\n};\n\n/** One pane of a \"columns\" side: full width while stacked, its own resizable width once the regions sit side by side. */\nfunction WorkspaceSideColumn({\n location,\n pane,\n width,\n collapsed,\n reserveTopRight,\n update,\n}: SideColumnProps) {\n return (\n <div\n data-testid={`workspace-stack-${pane.id}`}\n style={{ \"--workspace-pane-width\": `${width}px` } as CSSProperties}\n className={cn(\n \"relative flex min-h-0 flex-col @3xl/workspace:h-full @3xl/workspace:w-[var(--workspace-pane-width)] @3xl/workspace:flex-none\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n )}\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={collapsed ? \"wide\" : false}\n fillColumn\n reserveTopRight={reserveTopRight}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {!collapsed && pane.resizable !== false && (\n <ResizeHandle\n orientation=\"vertical\"\n value={width}\n min={pane.minWidth ?? DEFAULT_COLUMN_MIN_WIDTH}\n max={pane.maxWidth ?? DEFAULT_COLUMN_MAX_WIDTH}\n pointerFactor={location === \"left\" ? 1 : -1}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId={`workspace-resize-pane-${pane.id}`}\n className={cn(\n \"hidden @3xl/workspace:block\",\n location === \"left\" ? \"right-0\" : \"left-0\",\n )}\n onChange={(nextWidth) =>\n update((current) => ({\n ...current,\n paneWidths: { ...current.paneWidths, [pane.id]: nextWidth },\n }))\n }\n />\n )}\n </div>\n );\n}\n\nexport function WorkspaceSideRegion({\n location,\n panes,\n arrangement,\n state,\n update,\n reserveTopRight,\n}: SideRegionProps) {\n if (panes.length === 0) return null;\n const columns = arrangement === \"columns\";\n const sideCollapsed = state.sideCollapsed[location];\n const allCollapsed = panes.every((pane) => state.collapsed[pane.id]);\n const width = sideCollapsed\n ? 0\n : columns\n ? panes.reduce((total, pane) => total + columnWidth(pane, state), 0)\n : allCollapsed\n ? WORKSPACE_COLLAPSED_RAIL_WIDTH\n : location === \"left\"\n ? state.leftWidth\n : state.rightWidth;\n const min = Math.max(...panes.map((pane) => pane.minWidth ?? 160));\n const max = Math.min(...panes.map((pane) => pane.maxWidth ?? 720));\n const canResize =\n !columns &&\n !sideCollapsed &&\n !allCollapsed &&\n panes.some((pane) => pane.resizable !== false);\n const style = { \"--workspace-region-width\": `${width}px` } as CSSProperties;\n // Open panes flex-share the region, so changing one pane's basis by d moves its\n // rendered edge by only d*(open-1)/open; scale the drag so the handle tracks the cursor.\n const openCount = panes.filter(\n (pane) => !(state.collapsed[pane.id] ?? false),\n ).length;\n const stackPointerFactor = openCount > 1 ? openCount / (openCount - 1) : 1;\n\n return (\n <aside\n data-testid={`workspace-region-${location}`}\n aria-hidden={sideCollapsed}\n style={style}\n className={cn(\n \"relative order-2 flex min-h-0 w-full flex-col overflow-hidden border-border @3xl/workspace:row-span-2 @3xl/workspace:h-full @3xl/workspace:w-[var(--workspace-region-width)]\",\n location === \"left\"\n ? \"@3xl/workspace:order-none @3xl/workspace:col-start-1 @3xl/workspace:row-start-1 @3xl/workspace:border-r\"\n : \"order-3 @3xl/workspace:order-none @3xl/workspace:col-start-3 @3xl/workspace:row-start-1 @3xl/workspace:border-l\",\n columns && \"@3xl/workspace:flex-row\",\n sideCollapsed && \"hidden border-0 @3xl/workspace:flex\",\n )}\n >\n {!sideCollapsed &&\n columns &&\n panes.map((pane, index) => (\n <WorkspaceSideColumn\n key={pane.id}\n location={location}\n pane={pane}\n width={columnWidth(pane, state)}\n collapsed={state.collapsed[pane.id] ?? false}\n reserveTopRight={\n index === (location === \"right\" ? panes.length - 1 : 0)\n ? reserveTopRight\n : undefined\n }\n update={update}\n />\n ))}\n {!sideCollapsed &&\n !columns &&\n panes.map((pane, index) => {\n const collapsed = state.collapsed[pane.id] ?? false;\n const nextPane = panes[index + 1];\n return (\n <div\n key={pane.id}\n data-testid={`workspace-stack-${pane.id}`}\n className={cn(\n \"relative flex min-h-0 flex-col\",\n collapsed ? \"shrink-0\" : \"flex-1\",\n )}\n style={\n !collapsed && state.stackHeights[pane.id] !== undefined\n ? { flexBasis: `${state.stackHeights[pane.id]}px` }\n : undefined\n }\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={allCollapsed}\n reserveTopRight={index === 0 ? reserveTopRight : undefined}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {!collapsed &&\n nextPane &&\n pane.resizable !== false &&\n nextPane.resizable !== false && (\n <ResizeHandle\n orientation=\"horizontal\"\n // Seed from the pane's current flex basis (0 when unsized) so the\n // drag starts where the divider actually is — no snap on first move.\n value={state.stackHeights[pane.id] ?? 0}\n min={pane.minHeight ?? 72}\n max={pane.maxHeight ?? 640}\n pointerFactor={stackPointerFactor}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId={`workspace-resize-stack-${pane.id}`}\n className=\"bottom-0 hidden @3xl/workspace:block\"\n onChange={(height) =>\n update((current) => ({\n ...current,\n stackHeights: {\n ...current.stackHeights,\n [pane.id]: height,\n },\n }))\n }\n />\n )}\n </div>\n );\n })}\n {canResize && (\n <ResizeHandle\n orientation=\"vertical\"\n value={width}\n min={min}\n max={max}\n pointerFactor={location === \"left\" ? 1 : -1}\n label={`Resize ${location} workspace panes`}\n testId={`workspace-resize-${location}`}\n className={cn(\"hidden @3xl/workspace:block\", location === \"left\" ? \"right-0\" : \"left-0\")}\n onChange={(nextWidth) =>\n update((current) => ({\n ...current,\n [location === \"left\" ? \"leftWidth\" : \"rightWidth\"]: nextWidth,\n }))\n }\n />\n )}\n </aside>\n );\n}\n\ntype SingleRegionProps = {\n pane: WorkspacePaneSpec;\n state: WorkspaceLayoutState;\n update: WorkspaceUpdate;\n reserveTopRight?: WorkspaceTopRightReserve;\n /** Measured workspace height the bottom pane's fractional bounds resolve against; 0 until measured. */\n workspaceHeight?: number;\n hidden?: boolean;\n};\n\nexport function WorkspaceSingleRegion({\n pane,\n state,\n update,\n reserveTopRight,\n workspaceHeight = 0,\n hidden,\n}: SingleRegionProps) {\n const collapsed = state.collapsed[pane.id] ?? false;\n const isBottom = pane.location === \"bottom\";\n const bounds = resolveBottomHeightBounds(pane, workspaceHeight);\n // A stored height can sit outside the range of a workspace that has since been resized.\n const bottomHeight = Math.max(bounds.min, Math.min(bounds.max, state.bottomHeight));\n const style =\n isBottom && !collapsed\n ? ({\n \"--workspace-bottom-height\": `${bottomHeight}px`,\n } as CSSProperties)\n : undefined;\n return (\n <div\n data-testid={`workspace-region-${pane.location}`}\n hidden={hidden}\n style={style}\n className={cn(\n \"relative min-h-0 min-w-0 flex-col overflow-hidden\",\n hidden ? \"hidden\" : \"flex\",\n isBottom\n ? \"order-4 w-full border-t border-border @3xl/workspace:order-none @3xl/workspace:col-start-2 @3xl/workspace:row-start-2 @3xl/workspace:h-[var(--workspace-bottom-height)]\"\n : \"order-1 min-h-80 @3xl/workspace:order-none @3xl/workspace:col-start-2 @3xl/workspace:row-start-1 @3xl/workspace:min-h-0\",\n )}\n >\n <WorkspacePaneView\n pane={pane}\n collapsed={collapsed}\n compact={false}\n reserveTopRight={reserveTopRight}\n onToggle={() =>\n update((current) => ({\n ...current,\n collapsed: { ...current.collapsed, [pane.id]: !collapsed },\n }))\n }\n />\n {isBottom && !collapsed && pane.resizable !== false && (\n <ResizeHandle\n orientation=\"horizontal\"\n value={bottomHeight}\n min={bounds.min}\n max={bounds.max}\n pointerFactor={-1}\n label={`Resize ${typeof pane.label === \"string\" ? pane.label : pane.id}`}\n testId=\"workspace-resize-bottom\"\n className=\"top-0 hidden @3xl/workspace:block\"\n onChange={(bottomHeight) =>\n update((current) => ({ ...current, bottomHeight }))\n }\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAyBA,IAAM,0BAAoE;CACxE,QAAQ;CACR,SACE;CACF,MAAM;AACR;AAKA,IAAM,gBAAgB;CACpB,QAAQ;EACN,QAAQ;EACR,MAAM;CACR;CACA,QAAQ;EAAE,QAAQ;EAAY,MAAM;CAA0B;CAC9D,OAAO;EACL,QAAQ;EACR,MAAM;CACR;AACF;AAEA,IAAM,8BAA8B;AAYpC,SAAS,kBAAkB,EACzB,MACA,WACA,SACA,YACA,iBACA,YACgB;CAChB,MAAM,OAAO,YAAY,SAAS,SAAS;CAC3C,MAAM,gBAAgB,SACpB,UAAU,cAAc,KAAK,CAAC,QAAQ,KAAA;CACxC,MAAM,gBACJ,qBAAAA,YAAA,EAAA,UAAA;EACG,KAAK,gBAAgB,UACnB,YACC,oBAAC,gBAAD,EAAgB,WAAU,oBAAqB,CAAA,IAE/C,oBAAC,eAAD,EAAe,WAAU,oBAAqB,CAAA;EAEjD,KAAK,OAAO;EACZ,KAAK,QACJ,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,KAAK;EACF,CAAA;EAER,oBAAC,QAAD;GACE,WAAW,GACT,iDACA,aAAa,OAAO,CACtB;GAEC,UAAA,KAAK;EACF,CAAA;CACN,EAAA,CAAA;CAGJ,OACE,qBAAC,WAAD;EACE,eAAa,kBAAkB,KAAK;EACpC,WAAW,GACT,+DACA,YAAY,aAAa,UACzB,aAAa,cAAc,yBAC3B,KAAK,SACP;EAPF,UAAA,CASG,KAAK,eAAe,QACnB,qBAAC,UAAD;GACE,WAAW,GAET,gGACA,aAAa,QAAQ,GACrB,mBAAmB,wBAAwB,gBAC7C;GANF,UAAA,C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-19,6 +19,24 @@ var DURATION_SCALE_MS = {
19
19
  m: 6e4,
20
20
  h: 36e5
21
21
  };
22
+ /** The units a duration filter's bound can be stored in. Span durations sit
23
+ * below a millisecond, so the sub-millisecond units are storage units too. */
24
+ var DURATION_STORAGE_UNITS = [
25
+ "ns",
26
+ "us",
27
+ "ms",
28
+ "s",
29
+ "m",
30
+ "h"
31
+ ];
32
+ /** The declared storage unit of a duration bound, "ms" when none is declared.
33
+ * One answer for every surface that builds a duration control, so a unit one
34
+ * of them accepts cannot crash another. */
35
+ function durationStorageUnit(unit) {
36
+ const resolved = unit || "ms";
37
+ if (!DURATION_STORAGE_UNITS.includes(resolved)) throw new Error(`Unsupported duration storage unit ${resolved}`);
38
+ return resolved;
39
+ }
22
40
  /** Reads a decimal number at `start`, or null when there is not one there. */
23
41
  function readDurationNumber(value, start) {
24
42
  let next = start;
@@ -65,7 +83,9 @@ function isAsciiDigit(value) {
65
83
  return value !== void 0 && value >= "0" && value <= "9";
66
84
  }
67
85
  exports.DURATION_SCALE_MS = DURATION_SCALE_MS;
86
+ exports.DURATION_STORAGE_UNITS = DURATION_STORAGE_UNITS;
68
87
  exports.DURATION_UNITS = DURATION_UNITS;
88
+ exports.durationStorageUnit = durationStorageUnit;
69
89
  exports.durationUnitAt = durationUnitAt;
70
90
  exports.parseGoDurationMs = parseGoDurationMs;
71
91
  exports.readDurationNumber = readDurationNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"duration.cjs","names":[],"sources":["../../src/lib/duration.ts"],"sourcesContent":["// Go `time.ParseDuration` syntax, scanned linearly. The obvious regex\n// (`/^(\\d+(\\.\\d+)?(ns|us|ms|s|m|h))+$/`) nests a quantifier inside a repeated\n// group and backtracks exponentially on inputs like \"000000000000x\".\n\nexport const DURATION_UNITS = [\n \"ns\",\n \"us\",\n \"µs\",\n \"μs\",\n \"ms\",\n \"s\",\n \"m\",\n \"h\",\n] as const;\n\nexport type DurationUnit = (typeof DURATION_UNITS)[number];\n\nexport const DURATION_SCALE_MS: Record<DurationUnit, number> = {\n ns: 1 / 1_000_000,\n us: 1 / 1_000,\n µs: 1 / 1_000,\n μs: 1 / 1_000,\n ms: 1,\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n};\n\n/** Reads a decimal number at `start`, or null when there is not one there. */\nexport function readDurationNumber(\n value: string,\n start: number,\n): { value: number; next: number } | null {\n let next = start;\n let integerDigits = 0;\n while (isAsciiDigit(value[next])) {\n integerDigits++;\n next++;\n }\n let fractionalDigits = 0;\n if (value[next] === \".\") {\n next++;\n while (isAsciiDigit(value[next])) {\n fractionalDigits++;\n next++;\n }\n }\n if (integerDigits === 0 && fractionalDigits === 0) return null;\n return { value: Number(value.slice(start, next)), next };\n}\n\nexport function durationUnitAt(value: string, start: number): DurationUnit | null {\n for (const unit of DURATION_UNITS) {\n if (value.startsWith(unit, start)) return unit;\n }\n return null;\n}\n\n/**\n * Total milliseconds for an unsigned Go duration (\"1h30m\"), or null when the\n * whole string is not a sequence of number+unit components.\n */\nexport function parseGoDurationMs(value: string): number | null {\n let offset = 0;\n let totalMs = 0;\n while (offset < value.length) {\n const component = readDurationNumber(value, offset);\n const unit = component && durationUnitAt(value, component.next);\n if (!component || !unit) return null;\n totalMs += component.value * DURATION_SCALE_MS[unit];\n offset = component.next + unit.length;\n }\n return offset === 0 ? null : totalMs;\n}\n\nfunction isAsciiDigit(value: string | undefined): boolean {\n return value !== undefined && value >= \"0\" && value <= \"9\";\n}\n"],"mappings":";AAIA,IAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,IAAa,oBAAkD;CAC7D,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AAGA,SAAgB,mBACd,OACA,OACwC;CACxC,IAAI,OAAO;CACX,IAAI,gBAAgB;CACpB,OAAO,aAAa,MAAM,KAAK,GAAG;EAChC;EACA;CACF;CACA,IAAI,mBAAmB;CACvB,IAAI,MAAM,UAAU,KAAK;EACvB;EACA,OAAO,aAAa,MAAM,KAAK,GAAG;GAChC;GACA;EACF;CACF;CACA,IAAI,kBAAkB,KAAK,qBAAqB,GAAG,OAAO;CAC1D,OAAO;EAAE,OAAO,OAAO,MAAM,MAAM,OAAO,IAAI,CAAC;EAAG;CAAK;AACzD;AAEA,SAAgB,eAAe,OAAe,OAAoC;CAChF,KAAK,MAAM,QAAQ,gBACjB,IAAI,MAAM,WAAW,MAAM,KAAK,GAAG,OAAO;CAE5C,OAAO;AACT;;;;;AAMA,SAAgB,kBAAkB,OAA8B;CAC9D,IAAI,SAAS;CACb,IAAI,UAAU;CACd,OAAO,SAAS,MAAM,QAAQ;EAC5B,MAAM,YAAY,mBAAmB,OAAO,MAAM;EAClD,MAAM,OAAO,aAAa,eAAe,OAAO,UAAU,IAAI;EAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,OAAO;EAChC,WAAW,UAAU,QAAQ,kBAAkB;EAC/C,SAAS,UAAU,OAAO,KAAK;CACjC;CACA,OAAO,WAAW,IAAI,OAAO;AAC/B;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,UAAU,KAAA,KAAa,SAAS,OAAO,SAAS;AACzD"}
1
+ {"version":3,"file":"duration.cjs","names":[],"sources":["../../src/lib/duration.ts"],"sourcesContent":["// Go `time.ParseDuration` syntax, scanned linearly. The obvious regex\n// (`/^(\\d+(\\.\\d+)?(ns|us|ms|s|m|h))+$/`) nests a quantifier inside a repeated\n// group and backtracks exponentially on inputs like \"000000000000x\".\n\nexport const DURATION_UNITS = [\n \"ns\",\n \"us\",\n \"µs\",\n \"μs\",\n \"ms\",\n \"s\",\n \"m\",\n \"h\",\n] as const;\n\nexport type DurationUnit = (typeof DURATION_UNITS)[number];\n\nexport const DURATION_SCALE_MS: Record<DurationUnit, number> = {\n ns: 1 / 1_000_000,\n us: 1 / 1_000,\n µs: 1 / 1_000,\n μs: 1 / 1_000,\n ms: 1,\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n};\n\n/** The units a duration filter's bound can be stored in. Span durations sit\n * below a millisecond, so the sub-millisecond units are storage units too. */\nexport const DURATION_STORAGE_UNITS = [\"ns\", \"us\", \"ms\", \"s\", \"m\", \"h\"] as const;\n\nexport type DurationStorageUnit = (typeof DURATION_STORAGE_UNITS)[number];\n\n/** The declared storage unit of a duration bound, \"ms\" when none is declared.\n * One answer for every surface that builds a duration control, so a unit one\n * of them accepts cannot crash another. */\nexport function durationStorageUnit(unit: string | undefined): DurationStorageUnit {\n const resolved = unit || \"ms\";\n if (!(DURATION_STORAGE_UNITS as readonly string[]).includes(resolved)) {\n throw new Error(`Unsupported duration storage unit ${resolved}`);\n }\n return resolved as DurationStorageUnit;\n}\n\n/** Reads a decimal number at `start`, or null when there is not one there. */\nexport function readDurationNumber(\n value: string,\n start: number,\n): { value: number; next: number } | null {\n let next = start;\n let integerDigits = 0;\n while (isAsciiDigit(value[next])) {\n integerDigits++;\n next++;\n }\n let fractionalDigits = 0;\n if (value[next] === \".\") {\n next++;\n while (isAsciiDigit(value[next])) {\n fractionalDigits++;\n next++;\n }\n }\n if (integerDigits === 0 && fractionalDigits === 0) return null;\n return { value: Number(value.slice(start, next)), next };\n}\n\nexport function durationUnitAt(value: string, start: number): DurationUnit | null {\n for (const unit of DURATION_UNITS) {\n if (value.startsWith(unit, start)) return unit;\n }\n return null;\n}\n\n/**\n * Total milliseconds for an unsigned Go duration (\"1h30m\"), or null when the\n * whole string is not a sequence of number+unit components.\n */\nexport function parseGoDurationMs(value: string): number | null {\n let offset = 0;\n let totalMs = 0;\n while (offset < value.length) {\n const component = readDurationNumber(value, offset);\n const unit = component && durationUnitAt(value, component.next);\n if (!component || !unit) return null;\n totalMs += component.value * DURATION_SCALE_MS[unit];\n offset = component.next + unit.length;\n }\n return offset === 0 ? null : totalMs;\n}\n\nfunction isAsciiDigit(value: string | undefined): boolean {\n return value !== undefined && value >= \"0\" && value <= \"9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OAAO,WAAW,IAAI,OAAO;AAC/B;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,UAAU,KAAA,KAAa,SAAS,OAAO,SAAS;AACzD"}
@@ -1,6 +1,14 @@
1
1
  export declare const DURATION_UNITS: readonly ["ns", "us", "µs", "μs", "ms", "s", "m", "h"];
2
2
  export type DurationUnit = (typeof DURATION_UNITS)[number];
3
3
  export declare const DURATION_SCALE_MS: Record<DurationUnit, number>;
4
+ /** The units a duration filter's bound can be stored in. Span durations sit
5
+ * below a millisecond, so the sub-millisecond units are storage units too. */
6
+ export declare const DURATION_STORAGE_UNITS: readonly ["ns", "us", "ms", "s", "m", "h"];
7
+ export type DurationStorageUnit = (typeof DURATION_STORAGE_UNITS)[number];
8
+ /** The declared storage unit of a duration bound, "ms" when none is declared.
9
+ * One answer for every surface that builds a duration control, so a unit one
10
+ * of them accepts cannot crash another. */
11
+ export declare function durationStorageUnit(unit: string | undefined): DurationStorageUnit;
4
12
  /** Reads a decimal number at `start`, or null when there is not one there. */
5
13
  export declare function readDurationNumber(value: string, start: number): {
6
14
  value: number;
@@ -1 +1 @@
1
- {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../src/lib/duration.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,wDASjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAS1D,CAAC;AAEF,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiBxC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAKhF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9D"}
1
+ {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../src/lib/duration.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,wDASjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAS1D,CAAC;AAEF;+EAC+E;AAC/E,eAAO,MAAM,sBAAsB,4CAA6C,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;4CAE4C;AAC5C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAMjF;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiBxC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAKhF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9D"}
@@ -19,6 +19,24 @@ var DURATION_SCALE_MS = {
19
19
  m: 6e4,
20
20
  h: 36e5
21
21
  };
22
+ /** The units a duration filter's bound can be stored in. Span durations sit
23
+ * below a millisecond, so the sub-millisecond units are storage units too. */
24
+ var DURATION_STORAGE_UNITS = [
25
+ "ns",
26
+ "us",
27
+ "ms",
28
+ "s",
29
+ "m",
30
+ "h"
31
+ ];
32
+ /** The declared storage unit of a duration bound, "ms" when none is declared.
33
+ * One answer for every surface that builds a duration control, so a unit one
34
+ * of them accepts cannot crash another. */
35
+ function durationStorageUnit(unit) {
36
+ const resolved = unit || "ms";
37
+ if (!DURATION_STORAGE_UNITS.includes(resolved)) throw new Error(`Unsupported duration storage unit ${resolved}`);
38
+ return resolved;
39
+ }
22
40
  /** Reads a decimal number at `start`, or null when there is not one there. */
23
41
  function readDurationNumber(value, start) {
24
42
  let next = start;
@@ -64,6 +82,6 @@ function parseGoDurationMs(value) {
64
82
  function isAsciiDigit(value) {
65
83
  return value !== void 0 && value >= "0" && value <= "9";
66
84
  }
67
- export { DURATION_SCALE_MS, DURATION_UNITS, durationUnitAt, parseGoDurationMs, readDurationNumber };
85
+ export { DURATION_SCALE_MS, DURATION_STORAGE_UNITS, DURATION_UNITS, durationStorageUnit, durationUnitAt, parseGoDurationMs, readDurationNumber };
68
86
 
69
87
  //# sourceMappingURL=duration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"duration.js","names":[],"sources":["../../src/lib/duration.ts"],"sourcesContent":["// Go `time.ParseDuration` syntax, scanned linearly. The obvious regex\n// (`/^(\\d+(\\.\\d+)?(ns|us|ms|s|m|h))+$/`) nests a quantifier inside a repeated\n// group and backtracks exponentially on inputs like \"000000000000x\".\n\nexport const DURATION_UNITS = [\n \"ns\",\n \"us\",\n \"µs\",\n \"μs\",\n \"ms\",\n \"s\",\n \"m\",\n \"h\",\n] as const;\n\nexport type DurationUnit = (typeof DURATION_UNITS)[number];\n\nexport const DURATION_SCALE_MS: Record<DurationUnit, number> = {\n ns: 1 / 1_000_000,\n us: 1 / 1_000,\n µs: 1 / 1_000,\n μs: 1 / 1_000,\n ms: 1,\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n};\n\n/** Reads a decimal number at `start`, or null when there is not one there. */\nexport function readDurationNumber(\n value: string,\n start: number,\n): { value: number; next: number } | null {\n let next = start;\n let integerDigits = 0;\n while (isAsciiDigit(value[next])) {\n integerDigits++;\n next++;\n }\n let fractionalDigits = 0;\n if (value[next] === \".\") {\n next++;\n while (isAsciiDigit(value[next])) {\n fractionalDigits++;\n next++;\n }\n }\n if (integerDigits === 0 && fractionalDigits === 0) return null;\n return { value: Number(value.slice(start, next)), next };\n}\n\nexport function durationUnitAt(value: string, start: number): DurationUnit | null {\n for (const unit of DURATION_UNITS) {\n if (value.startsWith(unit, start)) return unit;\n }\n return null;\n}\n\n/**\n * Total milliseconds for an unsigned Go duration (\"1h30m\"), or null when the\n * whole string is not a sequence of number+unit components.\n */\nexport function parseGoDurationMs(value: string): number | null {\n let offset = 0;\n let totalMs = 0;\n while (offset < value.length) {\n const component = readDurationNumber(value, offset);\n const unit = component && durationUnitAt(value, component.next);\n if (!component || !unit) return null;\n totalMs += component.value * DURATION_SCALE_MS[unit];\n offset = component.next + unit.length;\n }\n return offset === 0 ? null : totalMs;\n}\n\nfunction isAsciiDigit(value: string | undefined): boolean {\n return value !== undefined && value >= \"0\" && value <= \"9\";\n}\n"],"mappings":";AAIA,IAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,IAAa,oBAAkD;CAC7D,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AAGA,SAAgB,mBACd,OACA,OACwC;CACxC,IAAI,OAAO;CACX,IAAI,gBAAgB;CACpB,OAAO,aAAa,MAAM,KAAK,GAAG;EAChC;EACA;CACF;CACA,IAAI,mBAAmB;CACvB,IAAI,MAAM,UAAU,KAAK;EACvB;EACA,OAAO,aAAa,MAAM,KAAK,GAAG;GAChC;GACA;EACF;CACF;CACA,IAAI,kBAAkB,KAAK,qBAAqB,GAAG,OAAO;CAC1D,OAAO;EAAE,OAAO,OAAO,MAAM,MAAM,OAAO,IAAI,CAAC;EAAG;CAAK;AACzD;AAEA,SAAgB,eAAe,OAAe,OAAoC;CAChF,KAAK,MAAM,QAAQ,gBACjB,IAAI,MAAM,WAAW,MAAM,KAAK,GAAG,OAAO;CAE5C,OAAO;AACT;;;;;AAMA,SAAgB,kBAAkB,OAA8B;CAC9D,IAAI,SAAS;CACb,IAAI,UAAU;CACd,OAAO,SAAS,MAAM,QAAQ;EAC5B,MAAM,YAAY,mBAAmB,OAAO,MAAM;EAClD,MAAM,OAAO,aAAa,eAAe,OAAO,UAAU,IAAI;EAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,OAAO;EAChC,WAAW,UAAU,QAAQ,kBAAkB;EAC/C,SAAS,UAAU,OAAO,KAAK;CACjC;CACA,OAAO,WAAW,IAAI,OAAO;AAC/B;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,UAAU,KAAA,KAAa,SAAS,OAAO,SAAS;AACzD"}
1
+ {"version":3,"file":"duration.js","names":[],"sources":["../../src/lib/duration.ts"],"sourcesContent":["// Go `time.ParseDuration` syntax, scanned linearly. The obvious regex\n// (`/^(\\d+(\\.\\d+)?(ns|us|ms|s|m|h))+$/`) nests a quantifier inside a repeated\n// group and backtracks exponentially on inputs like \"000000000000x\".\n\nexport const DURATION_UNITS = [\n \"ns\",\n \"us\",\n \"µs\",\n \"μs\",\n \"ms\",\n \"s\",\n \"m\",\n \"h\",\n] as const;\n\nexport type DurationUnit = (typeof DURATION_UNITS)[number];\n\nexport const DURATION_SCALE_MS: Record<DurationUnit, number> = {\n ns: 1 / 1_000_000,\n us: 1 / 1_000,\n µs: 1 / 1_000,\n μs: 1 / 1_000,\n ms: 1,\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n};\n\n/** The units a duration filter's bound can be stored in. Span durations sit\n * below a millisecond, so the sub-millisecond units are storage units too. */\nexport const DURATION_STORAGE_UNITS = [\"ns\", \"us\", \"ms\", \"s\", \"m\", \"h\"] as const;\n\nexport type DurationStorageUnit = (typeof DURATION_STORAGE_UNITS)[number];\n\n/** The declared storage unit of a duration bound, \"ms\" when none is declared.\n * One answer for every surface that builds a duration control, so a unit one\n * of them accepts cannot crash another. */\nexport function durationStorageUnit(unit: string | undefined): DurationStorageUnit {\n const resolved = unit || \"ms\";\n if (!(DURATION_STORAGE_UNITS as readonly string[]).includes(resolved)) {\n throw new Error(`Unsupported duration storage unit ${resolved}`);\n }\n return resolved as DurationStorageUnit;\n}\n\n/** Reads a decimal number at `start`, or null when there is not one there. */\nexport function readDurationNumber(\n value: string,\n start: number,\n): { value: number; next: number } | null {\n let next = start;\n let integerDigits = 0;\n while (isAsciiDigit(value[next])) {\n integerDigits++;\n next++;\n }\n let fractionalDigits = 0;\n if (value[next] === \".\") {\n next++;\n while (isAsciiDigit(value[next])) {\n fractionalDigits++;\n next++;\n }\n }\n if (integerDigits === 0 && fractionalDigits === 0) return null;\n return { value: Number(value.slice(start, next)), next };\n}\n\nexport function durationUnitAt(value: string, start: number): DurationUnit | null {\n for (const unit of DURATION_UNITS) {\n if (value.startsWith(unit, start)) return unit;\n }\n return null;\n}\n\n/**\n * Total milliseconds for an unsigned Go duration (\"1h30m\"), or null when the\n * whole string is not a sequence of number+unit components.\n */\nexport function parseGoDurationMs(value: string): number | null {\n let offset = 0;\n let totalMs = 0;\n while (offset < value.length) {\n const component = readDurationNumber(value, offset);\n const unit = component && durationUnitAt(value, component.next);\n if (!component || !unit) return null;\n totalMs += component.value * DURATION_SCALE_MS[unit];\n offset = component.next + unit.length;\n }\n return offset === 0 ? null : totalMs;\n}\n\nfunction isAsciiDigit(value: string | undefined): boolean {\n return value !== undefined && value >= \"0\" && value <= \"9\";\n}\n"],"mappings":";AAIA,IAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,IAAa,oBAAkD;CAC7D,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;AACL;;;AAIA,IAAa,yBAAyB;CAAC;CAAM;CAAM;CAAM;CAAK;CAAK;AAAG;;;;AAOtE,SAAgB,oBAAoB,MAA+C;CACjF,MAAM,WAAW,QAAQ;CACzB,IAAI,CAAE,uBAA6C,SAAS,QAAQ,GAClE,MAAM,IAAI,MAAM,qCAAqC,UAAU;CAEjE,OAAO;AACT;;AAGA,SAAgB,mBACd,OACA,OACwC;CACxC,IAAI,OAAO;CACX,IAAI,gBAAgB;CACpB,OAAO,aAAa,MAAM,KAAK,GAAG;EAChC;EACA;CACF;CACA,IAAI,mBAAmB;CACvB,IAAI,MAAM,UAAU,KAAK;EACvB;EACA,OAAO,aAAa,MAAM,KAAK,GAAG;GAChC;GACA;EACF;CACF;CACA,IAAI,kBAAkB,KAAK,qBAAqB,GAAG,OAAO;CAC1D,OAAO;EAAE,OAAO,OAAO,MAAM,MAAM,OAAO,IAAI,CAAC;EAAG;CAAK;AACzD;AAEA,SAAgB,eAAe,OAAe,OAAoC;CAChF,KAAK,MAAM,QAAQ,gBACjB,IAAI,MAAM,WAAW,MAAM,KAAK,GAAG,OAAO;CAE5C,OAAO;AACT;;;;;AAMA,SAAgB,kBAAkB,OAA8B;CAC9D,IAAI,SAAS;CACb,IAAI,UAAU;CACd,OAAO,SAAS,MAAM,QAAQ;EAC5B,MAAM,YAAY,mBAAmB,OAAO,MAAM;EAClD,MAAM,OAAO,aAAa,eAAe,OAAO,UAAU,IAAI;EAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,OAAO;EAChC,WAAW,UAAU,QAAQ,kBAAkB;EAC/C,SAAS,UAAU,OAAO,KAAK;CACjC;CACA,OAAO,WAAW,IAAI,OAAO;AAC/B;AAEA,SAAS,aAAa,OAAoC;CACxD,OAAO,UAAU,KAAA,KAAa,SAAS,OAAO,SAAS;AACzD"}
@@ -21,38 +21,42 @@ function MonacoEditor({ value, onChange, readOnly = false, language, path, heigh
21
21
  children: "Monaco workers are not configured."
22
22
  });
23
23
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
24
- className: "overflow-hidden rounded-md border border-input",
24
+ className: "relative w-full min-w-0 overflow-hidden rounded-md border border-input",
25
+ style: { height },
25
26
  "data-slot": "monaco-editor",
26
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_monaco_editor_react.default, {
27
- value,
28
- onChange: (next) => onChange?.(next ?? ""),
29
- language,
30
- path,
31
- height,
32
- theme,
33
- keepCurrentModel: true,
34
- ...beforeMount ? { beforeMount } : {},
35
- onMount: (instance, monacoInstance) => {
36
- if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);
37
- onMount?.(instance, monacoInstance);
38
- },
39
- ...onValidate ? { onValidate } : {},
40
- options: {
41
- readOnly,
42
- automaticLayout: true,
43
- fontFamily: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)",
44
- fontSize: 13,
45
- lineHeight: 20,
46
- minimap: { enabled: false },
47
- scrollBeyondLastLine: false,
48
- tabSize: 2,
49
- wordWrap: "on",
50
- quickSuggestions: {
51
- other: true,
52
- comments: true,
53
- strings: true
27
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
28
+ className: "absolute inset-0",
29
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_monaco_editor_react.default, {
30
+ value,
31
+ onChange: (next) => onChange?.(next ?? ""),
32
+ language,
33
+ path,
34
+ height: "100%",
35
+ theme,
36
+ keepCurrentModel: true,
37
+ ...beforeMount ? { beforeMount } : {},
38
+ onMount: (instance, monacoInstance) => {
39
+ if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);
40
+ onMount?.(instance, monacoInstance);
41
+ },
42
+ ...onValidate ? { onValidate } : {},
43
+ options: {
44
+ readOnly,
45
+ automaticLayout: true,
46
+ fontFamily: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)",
47
+ fontSize: 13,
48
+ lineHeight: 20,
49
+ minimap: { enabled: false },
50
+ scrollBeyondLastLine: false,
51
+ tabSize: 2,
52
+ wordWrap: "on",
53
+ quickSuggestions: {
54
+ other: true,
55
+ comments: true,
56
+ strings: true
57
+ }
54
58
  }
55
- }
59
+ })
56
60
  })
57
61
  });
58
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MonacoEditor.cjs","names":["loader","useMonacoWorkerFactory","useResolvedTheme","useRef","Editor"],"sources":["../../src/monaco/MonacoEditor.tsx"],"sourcesContent":["import Editor, { loader, type Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\nimport { useRef } from \"react\";\nimport { useResolvedTheme } from \"../hooks/use-theme\";\nimport { useMonacoWorkerFactory } from \"./use-monaco-worker\";\nimport type { MonacoEditorProps } from \"./types\";\n\nloader.config({ monaco });\n\nexport function MonacoEditor({\n value,\n onChange,\n readOnly = false,\n language,\n path,\n height = \"20rem\",\n beforeMount,\n onMount,\n onValidate,\n}: MonacoEditorProps) {\n if (!readOnly && !onChange) throw new Error(\"MonacoEditor requires onChange when editing\");\n const workers = useMonacoWorkerFactory();\n const theme = useResolvedTheme() === \"dark\" ? \"vs-dark\" : \"light\";\n // @monaco-editor/react keeps the first onMount it sees, so read the value at\n // mount time through a ref rather than that render's closure.\n const latestValue = useRef(value);\n latestValue.current = value;\n\n if (!workers) {\n return <div role=\"alert\" className=\"rounded-md border border-destructive/40 p-3 text-sm text-destructive\">Monaco workers are not configured.</div>;\n }\n\n return (\n <div className=\"overflow-hidden rounded-md border border-input\" data-slot=\"monaco-editor\">\n <Editor\n value={value}\n onChange={(next) => onChange?.(next ?? \"\")}\n language={language}\n path={path}\n height={height}\n theme={theme}\n keepCurrentModel\n {...(beforeMount ? { beforeMount } : {})}\n onMount={(instance, monacoInstance) => {\n // keepCurrentModel remounts onto the model already at `path`, which\n // still holds the text from when the previous editor unmounted.\n if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);\n onMount?.(instance, monacoInstance);\n }}\n {...(onValidate ? { onValidate } : {})}\n options={{\n readOnly,\n automaticLayout: true,\n fontFamily: \"var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)\",\n fontSize: 13,\n lineHeight: 20,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n tabSize: 2,\n wordWrap: \"on\",\n quickSuggestions: { other: true, comments: true, strings: true },\n }}\n />\n </div>\n );\n}\n\nexport type { Monaco };\n"],"mappings":";;;;;;;;;;AAOAA,qBAAAA,OAAO,OAAO,EAAE,QAAA,cAAO,CAAC;AAExB,SAAgB,aAAa,EAC3B,OACA,UACA,WAAW,OACX,UACA,MACA,SAAS,SACT,aACA,SACA,cACoB;CACpB,IAAI,CAAC,YAAY,CAAC,UAAU,MAAM,IAAI,MAAM,6CAA6C;CACzF,MAAM,UAAUC,0BAAAA,uBAAuB;CACvC,MAAM,QAAQC,kBAAAA,iBAAiB,MAAM,SAAS,YAAY;CAG1D,MAAM,eAAA,GAAcC,MAAAA,OAAAA,CAAO,KAAK;CAChC,YAAY,UAAU;CAEtB,IAAI,CAAC,SACH,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,MAAK;EAAQ,WAAU;EAAuE,UAAA;CAAuC,CAAA;CAGnJ,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAU;EAAiD,aAAU;EACxE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;GACS;GACP,WAAW,SAAS,WAAW,QAAQ,EAAE;GAC/B;GACJ;GACE;GACD;GACP,kBAAA;GACA,GAAK,cAAc,EAAE,YAAY,IAAI,CAAC;GACtC,UAAU,UAAU,mBAAmB;IAGrC,IAAI,SAAS,SAAS,MAAM,YAAY,SAAS,SAAS,SAAS,YAAY,OAAO;IACtF,UAAU,UAAU,cAAc;GACpC;GACA,GAAK,aAAa,EAAE,WAAW,IAAI,CAAC;GACpC,SAAS;IACP;IACA,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,SAAS,EAAE,SAAS,MAAM;IAC1B,sBAAsB;IACtB,SAAS;IACT,UAAU;IACV,kBAAkB;KAAE,OAAO;KAAM,UAAU;KAAM,SAAS;IAAK;GACjE;EACD,CAAA;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"MonacoEditor.cjs","names":["loader","useMonacoWorkerFactory","useResolvedTheme","useRef","Editor"],"sources":["../../src/monaco/MonacoEditor.tsx"],"sourcesContent":["import Editor, { loader, type Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\nimport { useRef } from \"react\";\nimport { useResolvedTheme } from \"../hooks/use-theme\";\nimport { useMonacoWorkerFactory } from \"./use-monaco-worker\";\nimport type { MonacoEditorProps } from \"./types\";\n\nloader.config({ monaco });\n\nexport function MonacoEditor({\n value,\n onChange,\n readOnly = false,\n language,\n path,\n height = \"20rem\",\n beforeMount,\n onMount,\n onValidate,\n}: MonacoEditorProps) {\n if (!readOnly && !onChange) throw new Error(\"MonacoEditor requires onChange when editing\");\n const workers = useMonacoWorkerFactory();\n const theme = useResolvedTheme() === \"dark\" ? \"vs-dark\" : \"light\";\n // @monaco-editor/react keeps the first onMount it sees, so read the value at\n // mount time through a ref rather than that render's closure.\n const latestValue = useRef(value);\n latestValue.current = value;\n\n if (!workers) {\n return <div role=\"alert\" className=\"rounded-md border border-destructive/40 p-3 text-sm text-destructive\">Monaco workers are not configured.</div>;\n }\n\n // The frame owns the size; the editor fills it absolutely. Monaco writes its\n // measured pixel width onto its own nodes, so an in-flow editor widened every\n // shrink-to-fit ancestor (a dialog grew to the editor's width), and a\n // percentage height resolved against a frame with none of its own.\n return (\n <div className=\"relative w-full min-w-0 overflow-hidden rounded-md border border-input\" style={{ height }} data-slot=\"monaco-editor\">\n <div className=\"absolute inset-0\">\n <Editor\n value={value}\n onChange={(next) => onChange?.(next ?? \"\")}\n language={language}\n path={path}\n height=\"100%\"\n theme={theme}\n keepCurrentModel\n {...(beforeMount ? { beforeMount } : {})}\n onMount={(instance, monacoInstance) => {\n // keepCurrentModel remounts onto the model already at `path`, which\n // still holds the text from when the previous editor unmounted.\n if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);\n onMount?.(instance, monacoInstance);\n }}\n {...(onValidate ? { onValidate } : {})}\n options={{\n readOnly,\n automaticLayout: true,\n fontFamily: \"var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)\",\n fontSize: 13,\n lineHeight: 20,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n tabSize: 2,\n wordWrap: \"on\",\n quickSuggestions: { other: true, comments: true, strings: true },\n }}\n />\n </div>\n </div>\n );\n}\n\nexport type { Monaco };\n"],"mappings":";;;;;;;;;;AAOAA,qBAAAA,OAAO,OAAO,EAAE,QAAA,cAAO,CAAC;AAExB,SAAgB,aAAa,EAC3B,OACA,UACA,WAAW,OACX,UACA,MACA,SAAS,SACT,aACA,SACA,cACoB;CACpB,IAAI,CAAC,YAAY,CAAC,UAAU,MAAM,IAAI,MAAM,6CAA6C;CACzF,MAAM,UAAUC,0BAAAA,uBAAuB;CACvC,MAAM,QAAQC,kBAAAA,iBAAiB,MAAM,SAAS,YAAY;CAG1D,MAAM,eAAA,GAAcC,MAAAA,OAAAA,CAAO,KAAK;CAChC,YAAY,UAAU;CAEtB,IAAI,CAAC,SACH,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,MAAK;EAAQ,WAAU;EAAuE,UAAA;CAAuC,CAAA;CAOnJ,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAU;EAAyE,OAAO,EAAE,OAAO;EAAG,aAAU;EACnH,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAU;GACf,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD;IACS;IACP,WAAW,SAAS,WAAW,QAAQ,EAAE;IAC/B;IACJ;IACN,QAAO;IACA;IACP,kBAAA;IACA,GAAK,cAAc,EAAE,YAAY,IAAI,CAAC;IACtC,UAAU,UAAU,mBAAmB;KAGrC,IAAI,SAAS,SAAS,MAAM,YAAY,SAAS,SAAS,SAAS,YAAY,OAAO;KACtF,UAAU,UAAU,cAAc;IACpC;IACA,GAAK,aAAa,EAAE,WAAW,IAAI,CAAC;IACpC,SAAS;KACP;KACA,iBAAiB;KACjB,YAAY;KACZ,UAAU;KACV,YAAY;KACZ,SAAS,EAAE,SAAS,MAAM;KAC1B,sBAAsB;KACtB,SAAS;KACT,UAAU;KACV,kBAAkB;MAAE,OAAO;MAAM,UAAU;MAAM,SAAS;KAAK;IACjE;GACD,CAAA;EACI,CAAA;CACF,CAAA;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"MonacoEditor.d.ts","sourceRoot":"","sources":["../../src/monaco/MonacoEditor.tsx"],"names":[],"mappings":"AAAA,OAAe,EAAU,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,MAAgB,EAChB,WAAW,EACX,OAAO,EACP,UAAU,GACX,EAAE,iBAAiB,+BA8CnB;AAED,YAAY,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"MonacoEditor.d.ts","sourceRoot":"","sources":["../../src/monaco/MonacoEditor.tsx"],"names":[],"mappings":"AAAA,OAAe,EAAU,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,MAAgB,EAChB,WAAW,EACX,OAAO,EACP,UAAU,GACX,EAAE,iBAAiB,+BAoDnB;AAED,YAAY,EAAE,MAAM,EAAE,CAAC"}
@@ -18,38 +18,42 @@ function MonacoEditor({ value, onChange, readOnly = false, language, path, heigh
18
18
  children: "Monaco workers are not configured."
19
19
  });
20
20
  return /* @__PURE__ */ jsx("div", {
21
- className: "overflow-hidden rounded-md border border-input",
21
+ className: "relative w-full min-w-0 overflow-hidden rounded-md border border-input",
22
+ style: { height },
22
23
  "data-slot": "monaco-editor",
23
- children: /* @__PURE__ */ jsx(Editor, {
24
- value,
25
- onChange: (next) => onChange?.(next ?? ""),
26
- language,
27
- path,
28
- height,
29
- theme,
30
- keepCurrentModel: true,
31
- ...beforeMount ? { beforeMount } : {},
32
- onMount: (instance, monacoInstance) => {
33
- if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);
34
- onMount?.(instance, monacoInstance);
35
- },
36
- ...onValidate ? { onValidate } : {},
37
- options: {
38
- readOnly,
39
- automaticLayout: true,
40
- fontFamily: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)",
41
- fontSize: 13,
42
- lineHeight: 20,
43
- minimap: { enabled: false },
44
- scrollBeyondLastLine: false,
45
- tabSize: 2,
46
- wordWrap: "on",
47
- quickSuggestions: {
48
- other: true,
49
- comments: true,
50
- strings: true
24
+ children: /* @__PURE__ */ jsx("div", {
25
+ className: "absolute inset-0",
26
+ children: /* @__PURE__ */ jsx(Editor, {
27
+ value,
28
+ onChange: (next) => onChange?.(next ?? ""),
29
+ language,
30
+ path,
31
+ height: "100%",
32
+ theme,
33
+ keepCurrentModel: true,
34
+ ...beforeMount ? { beforeMount } : {},
35
+ onMount: (instance, monacoInstance) => {
36
+ if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);
37
+ onMount?.(instance, monacoInstance);
38
+ },
39
+ ...onValidate ? { onValidate } : {},
40
+ options: {
41
+ readOnly,
42
+ automaticLayout: true,
43
+ fontFamily: "var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)",
44
+ fontSize: 13,
45
+ lineHeight: 20,
46
+ minimap: { enabled: false },
47
+ scrollBeyondLastLine: false,
48
+ tabSize: 2,
49
+ wordWrap: "on",
50
+ quickSuggestions: {
51
+ other: true,
52
+ comments: true,
53
+ strings: true
54
+ }
51
55
  }
52
- }
56
+ })
53
57
  })
54
58
  });
55
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MonacoEditor.js","names":[],"sources":["../../src/monaco/MonacoEditor.tsx"],"sourcesContent":["import Editor, { loader, type Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\nimport { useRef } from \"react\";\nimport { useResolvedTheme } from \"../hooks/use-theme\";\nimport { useMonacoWorkerFactory } from \"./use-monaco-worker\";\nimport type { MonacoEditorProps } from \"./types\";\n\nloader.config({ monaco });\n\nexport function MonacoEditor({\n value,\n onChange,\n readOnly = false,\n language,\n path,\n height = \"20rem\",\n beforeMount,\n onMount,\n onValidate,\n}: MonacoEditorProps) {\n if (!readOnly && !onChange) throw new Error(\"MonacoEditor requires onChange when editing\");\n const workers = useMonacoWorkerFactory();\n const theme = useResolvedTheme() === \"dark\" ? \"vs-dark\" : \"light\";\n // @monaco-editor/react keeps the first onMount it sees, so read the value at\n // mount time through a ref rather than that render's closure.\n const latestValue = useRef(value);\n latestValue.current = value;\n\n if (!workers) {\n return <div role=\"alert\" className=\"rounded-md border border-destructive/40 p-3 text-sm text-destructive\">Monaco workers are not configured.</div>;\n }\n\n return (\n <div className=\"overflow-hidden rounded-md border border-input\" data-slot=\"monaco-editor\">\n <Editor\n value={value}\n onChange={(next) => onChange?.(next ?? \"\")}\n language={language}\n path={path}\n height={height}\n theme={theme}\n keepCurrentModel\n {...(beforeMount ? { beforeMount } : {})}\n onMount={(instance, monacoInstance) => {\n // keepCurrentModel remounts onto the model already at `path`, which\n // still holds the text from when the previous editor unmounted.\n if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);\n onMount?.(instance, monacoInstance);\n }}\n {...(onValidate ? { onValidate } : {})}\n options={{\n readOnly,\n automaticLayout: true,\n fontFamily: \"var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)\",\n fontSize: 13,\n lineHeight: 20,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n tabSize: 2,\n wordWrap: \"on\",\n quickSuggestions: { other: true, comments: true, strings: true },\n }}\n />\n </div>\n );\n}\n\nexport type { Monaco };\n"],"mappings":";;;;;;;AAOA,OAAO,OAAO,EAAE,OAAO,CAAC;AAExB,SAAgB,aAAa,EAC3B,OACA,UACA,WAAW,OACX,UACA,MACA,SAAS,SACT,aACA,SACA,cACoB;CACpB,IAAI,CAAC,YAAY,CAAC,UAAU,MAAM,IAAI,MAAM,6CAA6C;CACzF,MAAM,UAAU,uBAAuB;CACvC,MAAM,QAAQ,iBAAiB,MAAM,SAAS,YAAY;CAG1D,MAAM,cAAc,OAAO,KAAK;CAChC,YAAY,UAAU;CAEtB,IAAI,CAAC,SACH,OAAO,oBAAC,OAAD;EAAK,MAAK;EAAQ,WAAU;EAAuE,UAAA;CAAuC,CAAA;CAGnJ,OACE,oBAAC,OAAD;EAAK,WAAU;EAAiD,aAAU;EACxE,UAAA,oBAAC,QAAD;GACS;GACP,WAAW,SAAS,WAAW,QAAQ,EAAE;GAC/B;GACJ;GACE;GACD;GACP,kBAAA;GACA,GAAK,cAAc,EAAE,YAAY,IAAI,CAAC;GACtC,UAAU,UAAU,mBAAmB;IAGrC,IAAI,SAAS,SAAS,MAAM,YAAY,SAAS,SAAS,SAAS,YAAY,OAAO;IACtF,UAAU,UAAU,cAAc;GACpC;GACA,GAAK,aAAa,EAAE,WAAW,IAAI,CAAC;GACpC,SAAS;IACP;IACA,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,SAAS,EAAE,SAAS,MAAM;IAC1B,sBAAsB;IACtB,SAAS;IACT,UAAU;IACV,kBAAkB;KAAE,OAAO;KAAM,UAAU;KAAM,SAAS;IAAK;GACjE;EACD,CAAA;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"MonacoEditor.js","names":[],"sources":["../../src/monaco/MonacoEditor.tsx"],"sourcesContent":["import Editor, { loader, type Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\nimport { useRef } from \"react\";\nimport { useResolvedTheme } from \"../hooks/use-theme\";\nimport { useMonacoWorkerFactory } from \"./use-monaco-worker\";\nimport type { MonacoEditorProps } from \"./types\";\n\nloader.config({ monaco });\n\nexport function MonacoEditor({\n value,\n onChange,\n readOnly = false,\n language,\n path,\n height = \"20rem\",\n beforeMount,\n onMount,\n onValidate,\n}: MonacoEditorProps) {\n if (!readOnly && !onChange) throw new Error(\"MonacoEditor requires onChange when editing\");\n const workers = useMonacoWorkerFactory();\n const theme = useResolvedTheme() === \"dark\" ? \"vs-dark\" : \"light\";\n // @monaco-editor/react keeps the first onMount it sees, so read the value at\n // mount time through a ref rather than that render's closure.\n const latestValue = useRef(value);\n latestValue.current = value;\n\n if (!workers) {\n return <div role=\"alert\" className=\"rounded-md border border-destructive/40 p-3 text-sm text-destructive\">Monaco workers are not configured.</div>;\n }\n\n // The frame owns the size; the editor fills it absolutely. Monaco writes its\n // measured pixel width onto its own nodes, so an in-flow editor widened every\n // shrink-to-fit ancestor (a dialog grew to the editor's width), and a\n // percentage height resolved against a frame with none of its own.\n return (\n <div className=\"relative w-full min-w-0 overflow-hidden rounded-md border border-input\" style={{ height }} data-slot=\"monaco-editor\">\n <div className=\"absolute inset-0\">\n <Editor\n value={value}\n onChange={(next) => onChange?.(next ?? \"\")}\n language={language}\n path={path}\n height=\"100%\"\n theme={theme}\n keepCurrentModel\n {...(beforeMount ? { beforeMount } : {})}\n onMount={(instance, monacoInstance) => {\n // keepCurrentModel remounts onto the model already at `path`, which\n // still holds the text from when the previous editor unmounted.\n if (instance.getValue() !== latestValue.current) instance.setValue(latestValue.current);\n onMount?.(instance, monacoInstance);\n }}\n {...(onValidate ? { onValidate } : {})}\n options={{\n readOnly,\n automaticLayout: true,\n fontFamily: \"var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace)\",\n fontSize: 13,\n lineHeight: 20,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n tabSize: 2,\n wordWrap: \"on\",\n quickSuggestions: { other: true, comments: true, strings: true },\n }}\n />\n </div>\n </div>\n );\n}\n\nexport type { Monaco };\n"],"mappings":";;;;;;;AAOA,OAAO,OAAO,EAAE,OAAO,CAAC;AAExB,SAAgB,aAAa,EAC3B,OACA,UACA,WAAW,OACX,UACA,MACA,SAAS,SACT,aACA,SACA,cACoB;CACpB,IAAI,CAAC,YAAY,CAAC,UAAU,MAAM,IAAI,MAAM,6CAA6C;CACzF,MAAM,UAAU,uBAAuB;CACvC,MAAM,QAAQ,iBAAiB,MAAM,SAAS,YAAY;CAG1D,MAAM,cAAc,OAAO,KAAK;CAChC,YAAY,UAAU;CAEtB,IAAI,CAAC,SACH,OAAO,oBAAC,OAAD;EAAK,MAAK;EAAQ,WAAU;EAAuE,UAAA;CAAuC,CAAA;CAOnJ,OACE,oBAAC,OAAD;EAAK,WAAU;EAAyE,OAAO,EAAE,OAAO;EAAG,aAAU;EACnH,UAAA,oBAAC,OAAD;GAAK,WAAU;GACf,UAAA,oBAAC,QAAD;IACS;IACP,WAAW,SAAS,WAAW,QAAQ,EAAE;IAC/B;IACJ;IACN,QAAO;IACA;IACP,kBAAA;IACA,GAAK,cAAc,EAAE,YAAY,IAAI,CAAC;IACtC,UAAU,UAAU,mBAAmB;KAGrC,IAAI,SAAS,SAAS,MAAM,YAAY,SAAS,SAAS,SAAS,YAAY,OAAO;KACtF,UAAU,UAAU,cAAc;IACpC;IACA,GAAK,aAAa,EAAE,WAAW,IAAI,CAAC;IACpC,SAAS;KACP;KACA,iBAAiB;KACjB,YAAY;KACZ,UAAU;KACV,YAAY;KACZ,SAAS,EAAE,SAAS,MAAM;KAC1B,sBAAsB;KACtB,SAAS;KACT,UAAU;KACV,kBAAkB;MAAE,OAAO;MAAM,UAAU;MAAM,SAAS;KAAK;IACjE;GACD,CAAA;EACI,CAAA;CACF,CAAA;AAET"}
@@ -8,12 +8,13 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  /**
9
9
  * "Are you sure", with an optional warning banner and remember-my-choice.
10
10
  *
11
- * Escape and the close button cancel. Checking the box and confirming persists
11
+ * Escape and the close button cancel. `pending` and `error` carry an async action's progress and
12
+ * refusal in the same dialog. Checking the box and confirming persists
12
13
  * the answer to localStorage before `onConfirm` fires. Pair with `useConfirm`
13
14
  * for a promise-returning prompt and `useConfirmMemory` for the banner that
14
15
  * offers to ask again.
15
16
  */
16
- function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", remember, onConfirm, onCancel }) {
17
+ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", remember, onConfirm, onCancel, pending = false, error }) {
17
18
  const [checked, setChecked] = (0, react.useState)(false);
18
19
  (0, react.useEffect)(() => {
19
20
  if (open) setChecked(false);
@@ -25,6 +26,7 @@ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm"
25
26
  title,
26
27
  size: "sm",
27
28
  expandable: false,
29
+ error,
28
30
  footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
29
31
  className: "flex justify-end gap-density-2",
30
32
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
@@ -37,6 +39,7 @@ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm"
37
39
  type: "button",
38
40
  variant,
39
41
  size: "sm",
42
+ loading: pending,
40
43
  onClick: () => {
41
44
  if (rememberable && checked) require_confirmMemory.rememberConfirm(remember.key);
42
45
  onConfirm();
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog.cjs","names":["useState","canRememberConfirm","Modal","Button","Callout"],"sources":["../../src/overlay/ConfirmDialog.tsx"],"sourcesContent":["import { useEffect, useState, type ReactNode } from \"react\";\nimport { Button } from \"../components/button\";\nimport { Callout } from \"../data/Callout\";\nimport { Modal } from \"./Modal\";\nimport { canRememberConfirm, rememberConfirm } from \"./confirmMemory\";\n\nexport type ConfirmOptions = {\n /** Heading, and the dialog's accessible label when it is a string. */\n title: ReactNode;\n /** What proceeding does. */\n message?: ReactNode;\n /** The risk, drawn as a warning banner above the message. */\n warning?: ReactNode;\n /** Defaults to \"Confirm\". */\n confirmLabel?: string;\n /** Defaults to \"Cancel\". */\n cancelLabel?: string;\n variant?: \"default\" | \"destructive\";\n /**\n * Offers \"Remember my choice\". Only a confirmation is remembered — a\n * remembered cancel would block the action with no prompt left to undo it —\n * and a remembered key makes `useConfirm` resolve without asking. The key is\n * the scope of the answer, so include whatever it must not leak across (an\n * environment, a tenant).\n */\n remember?: { key: string; label?: string };\n};\n\nexport type ConfirmDialogProps = ConfirmOptions & {\n open: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n};\n\n/**\n * \"Are you sure\", with an optional warning banner and remember-my-choice.\n *\n * Escape and the close button cancel. Checking the box and confirming persists\n * the answer to localStorage before `onConfirm` fires. Pair with `useConfirm`\n * for a promise-returning prompt and `useConfirmMemory` for the banner that\n * offers to ask again.\n */\nexport function ConfirmDialog({\n open,\n title,\n message,\n warning,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n variant = \"default\",\n remember,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) {\n const [checked, setChecked] = useState(false);\n useEffect(() => {\n if (open) setChecked(false);\n }, [open]);\n const rememberable = remember !== undefined && canRememberConfirm();\n\n return (\n <Modal\n open={open}\n onClose={onCancel}\n title={title}\n size=\"sm\"\n expandable={false}\n footer={\n <div className=\"flex justify-end gap-density-2\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={onCancel}>\n {cancelLabel}\n </Button>\n <Button\n type=\"button\"\n variant={variant}\n size=\"sm\"\n onClick={() => {\n if (rememberable && checked) rememberConfirm(remember.key);\n onConfirm();\n }}\n >\n {confirmLabel}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-density-3\">\n {warning ? (\n <Callout variant=\"warning\" className=\"my-0\">\n {warning}\n </Callout>\n ) : null}\n {message ? <p className=\"text-sm text-muted-foreground\">{message}</p> : null}\n {rememberable ? (\n <label className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n className=\"size-4 shrink-0 rounded border-input\"\n checked={checked}\n onChange={(event) => setChecked(event.target.checked)}\n />\n {remember.label ?? \"Remember my choice\"}\n </label>\n ) : null}\n </div>\n </Modal>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0CA,SAAgB,cAAc,EAC5B,MACA,OACA,SACA,SACA,eAAe,WACf,cAAc,UACd,UAAU,WACV,UACA,WACA,YACqB;CACrB,MAAM,CAAC,SAAS,eAAA,GAAcA,MAAAA,SAAAA,CAAS,KAAK;CAC5C,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,MAAM,WAAW,KAAK;CAC5B,GAAG,CAAC,IAAI,CAAC;CACT,MAAM,eAAe,aAAa,KAAA,KAAaC,sBAAAA,mBAAmB;CAElE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;EACQ;EACN,SAAS;EACF;EACP,MAAK;EACL,YAAY;EACZ,QACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,QAAD;IAAQ,MAAK;IAAS,SAAQ;IAAQ,MAAK;IAAK,SAAS;IACtD,UAAA;GACK,CAAA,GACR,iBAAA,GAAA,kBAAA,IAAA,CAACA,eAAAA,QAAD;IACE,MAAK;IACI;IACT,MAAK;IACL,eAAe;KACb,IAAI,gBAAgB,SAAS,sBAAA,gBAAgB,SAAS,GAAG;KACzD,UAAU;IACZ;IAEC,UAAA;GACK,CAAA,CACL;;EAGP,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,UACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD;KAAS,SAAQ;KAAU,WAAU;KAClC,UAAA;IACM,CAAA,IACP;IACH,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KAAG,WAAU;KAAiC,UAAA;IAAW,CAAA,IAAI;IACvE,eACC,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;KAAO,WAAU;KAAjB,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;MACE,MAAK;MACL,WAAU;MACD;MACT,WAAW,UAAU,WAAW,MAAM,OAAO,OAAO;KACrD,CAAA,GACA,SAAS,SAAS,oBACd;IACL,CAAA,IAAA;GACD;;CACA,CAAA;AAEX"}
1
+ {"version":3,"file":"ConfirmDialog.cjs","names":["useState","canRememberConfirm","Modal","Button","Callout"],"sources":["../../src/overlay/ConfirmDialog.tsx"],"sourcesContent":["import { useEffect, useState, type ReactNode } from \"react\";\nimport { Button } from \"../components/button\";\nimport { Callout } from \"../data/Callout\";\nimport { Modal } from \"./Modal\";\nimport { canRememberConfirm, rememberConfirm } from \"./confirmMemory\";\n\nexport type ConfirmOptions = {\n /** Heading, and the dialog's accessible label when it is a string. */\n title: ReactNode;\n /** What proceeding does. */\n message?: ReactNode;\n /** The risk, drawn as a warning banner above the message. */\n warning?: ReactNode;\n /** Defaults to \"Confirm\". */\n confirmLabel?: string;\n /** Defaults to \"Cancel\". */\n cancelLabel?: string;\n variant?: \"default\" | \"destructive\";\n /**\n * Offers \"Remember my choice\". Only a confirmation is remembered — a\n * remembered cancel would block the action with no prompt left to undo it —\n * and a remembered key makes `useConfirm` resolve without asking. The key is\n * the scope of the answer, so include whatever it must not leak across (an\n * environment, a tenant).\n */\n remember?: { key: string; label?: string };\n};\n\nexport type ConfirmDialogProps = ConfirmOptions & {\n open: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n /**\n * The confirmed action is in flight: the confirm button is disabled and marked busy so it cannot\n * fire twice. Cancel, Escape and the close button still call `onCancel`, as in the library's other\n * submit dialogs (`Modal` has no pending state of its own); the host decides whether that aborts.\n */\n pending?: boolean;\n /**\n * Why the action failed, e.g. a server refusal. Shown as `Modal`'s alert above the footer and\n * announced when it appears. Not for the risk the action carries: that is `warning`.\n */\n error?: ReactNode;\n};\n\n/**\n * \"Are you sure\", with an optional warning banner and remember-my-choice.\n *\n * Escape and the close button cancel. `pending` and `error` carry an async action's progress and\n * refusal in the same dialog. Checking the box and confirming persists\n * the answer to localStorage before `onConfirm` fires. Pair with `useConfirm`\n * for a promise-returning prompt and `useConfirmMemory` for the banner that\n * offers to ask again.\n */\nexport function ConfirmDialog({\n open,\n title,\n message,\n warning,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n variant = \"default\",\n remember,\n onConfirm,\n onCancel,\n pending = false,\n error,\n}: ConfirmDialogProps) {\n const [checked, setChecked] = useState(false);\n useEffect(() => {\n if (open) setChecked(false);\n }, [open]);\n const rememberable = remember !== undefined && canRememberConfirm();\n\n return (\n <Modal\n open={open}\n onClose={onCancel}\n title={title}\n size=\"sm\"\n expandable={false}\n error={error}\n footer={\n <div className=\"flex justify-end gap-density-2\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={onCancel}>\n {cancelLabel}\n </Button>\n <Button\n type=\"button\"\n variant={variant}\n size=\"sm\"\n loading={pending}\n onClick={() => {\n if (rememberable && checked) rememberConfirm(remember.key);\n onConfirm();\n }}\n >\n {confirmLabel}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-density-3\">\n {warning ? (\n <Callout variant=\"warning\" className=\"my-0\">\n {warning}\n </Callout>\n ) : null}\n {message ? <p className=\"text-sm text-muted-foreground\">{message}</p> : null}\n {rememberable ? (\n <label className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n className=\"size-4 shrink-0 rounded border-input\"\n checked={checked}\n onChange={(event) => setChecked(event.target.checked)}\n />\n {remember.label ?? \"Remember my choice\"}\n </label>\n ) : null}\n </div>\n </Modal>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsDA,SAAgB,cAAc,EAC5B,MACA,OACA,SACA,SACA,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AO,OAAO;KACrD,CAAA,GACA,SAAS,SAAS,oBACd;IACL,CAAA,IAAA;GACD;;CACA,CAAA;AAEX"}
@@ -27,14 +27,26 @@ export type ConfirmDialogProps = ConfirmOptions & {
27
27
  open: boolean;
28
28
  onConfirm: () => void;
29
29
  onCancel: () => void;
30
+ /**
31
+ * The confirmed action is in flight: the confirm button is disabled and marked busy so it cannot
32
+ * fire twice. Cancel, Escape and the close button still call `onCancel`, as in the library's other
33
+ * submit dialogs (`Modal` has no pending state of its own); the host decides whether that aborts.
34
+ */
35
+ pending?: boolean;
36
+ /**
37
+ * Why the action failed, e.g. a server refusal. Shown as `Modal`'s alert above the footer and
38
+ * announced when it appears. Not for the risk the action carries: that is `warning`.
39
+ */
40
+ error?: ReactNode;
30
41
  };
31
42
  /**
32
43
  * "Are you sure", with an optional warning banner and remember-my-choice.
33
44
  *
34
- * Escape and the close button cancel. Checking the box and confirming persists
45
+ * Escape and the close button cancel. `pending` and `error` carry an async action's progress and
46
+ * refusal in the same dialog. Checking the box and confirming persists
35
47
  * the answer to localStorage before `onConfirm` fires. Pair with `useConfirm`
36
48
  * for a promise-returning prompt and `useConfirmMemory` for the banner that
37
49
  * offers to ask again.
38
50
  */
39
- export declare function ConfirmDialog({ open, title, message, warning, confirmLabel, cancelLabel, variant, remember, onConfirm, onCancel, }: ConfirmDialogProps): import("react").JSX.Element;
51
+ export declare function ConfirmDialog({ open, title, message, warning, confirmLabel, cancelLabel, variant, remember, onConfirm, onCancel, pending, error, }: ConfirmDialogProps): import("react").JSX.Element;
40
52
  //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/overlay/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG;IAC3B,sEAAsE;IACtE,KAAK,EAAE,SAAS,CAAC;IACj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MG;IACH,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAwB,EACxB,WAAsB,EACtB,OAAmB,EACnB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAe,EACf,KAAK,GACN,EAAE,kBAAkB,+BAwDpB"}
@@ -8,12 +8,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  /**
9
9
  * "Are you sure", with an optional warning banner and remember-my-choice.
10
10
  *
11
- * Escape and the close button cancel. Checking the box and confirming persists
11
+ * Escape and the close button cancel. `pending` and `error` carry an async action's progress and
12
+ * refusal in the same dialog. Checking the box and confirming persists
12
13
  * the answer to localStorage before `onConfirm` fires. Pair with `useConfirm`
13
14
  * for a promise-returning prompt and `useConfirmMemory` for the banner that
14
15
  * offers to ask again.
15
16
  */
16
- function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", remember, onConfirm, onCancel }) {
17
+ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", remember, onConfirm, onCancel, pending = false, error }) {
17
18
  const [checked, setChecked] = useState(false);
18
19
  useEffect(() => {
19
20
  if (open) setChecked(false);
@@ -25,6 +26,7 @@ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm"
25
26
  title,
26
27
  size: "sm",
27
28
  expandable: false,
29
+ error,
28
30
  footer: /* @__PURE__ */ jsxs("div", {
29
31
  className: "flex justify-end gap-density-2",
30
32
  children: [/* @__PURE__ */ jsx(Button, {
@@ -37,6 +39,7 @@ function ConfirmDialog({ open, title, message, warning, confirmLabel = "Confirm"
37
39
  type: "button",
38
40
  variant,
39
41
  size: "sm",
42
+ loading: pending,
40
43
  onClick: () => {
41
44
  if (rememberable && checked) rememberConfirm(remember.key);
42
45
  onConfirm();