@flanksource/clicky-ui 0.3.77 → 0.3.79
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.
- package/NOTICE.md +16 -0
- package/dist/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +33 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +18 -2
- package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.js +6 -6
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/api.cjs.map +1 -1
- package/dist/expressions/playground/api.d.ts +10 -0
- package/dist/expressions/playground/api.d.ts.map +1 -1
- package/dist/expressions/playground/api.js.map +1 -1
- package/dist/expressions/playground/hostEvaluation.cjs +67 -0
- package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
- package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
- package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
- package/dist/expressions/playground/hostEvaluation.js +63 -0
- package/dist/expressions/playground/hostEvaluation.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.js +8 -3
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.js +6 -2
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
- package/dist/expressions/playground.d.ts +1 -1
- package/dist/expressions/playground.d.ts.map +1 -1
- package/dist/hooks/use-element-height.cjs +26 -0
- package/dist/hooks/use-element-height.cjs.map +1 -0
- package/dist/hooks/use-element-height.d.ts +10 -0
- package/dist/hooks/use-element-height.d.ts.map +1 -0
- package/dist/hooks/use-element-height.js +26 -0
- package/dist/hooks/use-element-height.js.map +1 -0
- package/dist/icons/components/UiGlobeShare.cjs +33 -0
- package/dist/icons/components/UiGlobeShare.cjs.map +1 -0
- package/dist/icons/components/UiGlobeShare.d.ts +9 -0
- package/dist/icons/components/UiGlobeShare.d.ts.map +1 -0
- package/dist/icons/components/UiGlobeShare.js +31 -0
- package/dist/icons/components/UiGlobeShare.js.map +1 -0
- package/dist/icons/components/UiKubernetesLink.cjs +38 -0
- package/dist/icons/components/UiKubernetesLink.cjs.map +1 -0
- package/dist/icons/components/UiKubernetesLink.d.ts +9 -0
- package/dist/icons/components/UiKubernetesLink.d.ts.map +1 -0
- package/dist/icons/components/UiKubernetesLink.js +36 -0
- package/dist/icons/components/UiKubernetesLink.js.map +1 -0
- package/dist/icons/components/UiLogoAws.cjs +29 -0
- package/dist/icons/components/UiLogoAws.cjs.map +1 -0
- package/dist/icons/components/UiLogoAws.d.ts +9 -0
- package/dist/icons/components/UiLogoAws.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAws.js +27 -0
- package/dist/icons/components/UiLogoAws.js.map +1 -0
- package/dist/icons/components/UiLogoAzure.cjs +29 -0
- package/dist/icons/components/UiLogoAzure.cjs.map +1 -0
- package/dist/icons/components/UiLogoAzure.d.ts +9 -0
- package/dist/icons/components/UiLogoAzure.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAzure.js +27 -0
- package/dist/icons/components/UiLogoAzure.js.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.cjs +29 -0
- package/dist/icons/components/UiLogoAzureDevops.cjs.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.d.ts +9 -0
- package/dist/icons/components/UiLogoAzureDevops.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.js +27 -0
- package/dist/icons/components/UiLogoAzureDevops.js.map +1 -0
- package/dist/icons/components/UiLogoGit.cjs +29 -0
- package/dist/icons/components/UiLogoGit.cjs.map +1 -0
- package/dist/icons/components/UiLogoGit.d.ts +9 -0
- package/dist/icons/components/UiLogoGit.d.ts.map +1 -0
- package/dist/icons/components/UiLogoGit.js +27 -0
- package/dist/icons/components/UiLogoGit.js.map +1 -0
- package/dist/icons/components/UiLogoGithub.cjs +29 -0
- package/dist/icons/components/UiLogoGithub.cjs.map +1 -0
- package/dist/icons/components/UiLogoGithub.d.ts +9 -0
- package/dist/icons/components/UiLogoGithub.d.ts.map +1 -0
- package/dist/icons/components/UiLogoGithub.js +27 -0
- package/dist/icons/components/UiLogoGithub.js.map +1 -0
- package/dist/icons/components/UiLogoJava.cjs +29 -0
- package/dist/icons/components/UiLogoJava.cjs.map +1 -0
- package/dist/icons/components/UiLogoJava.d.ts +9 -0
- package/dist/icons/components/UiLogoJava.d.ts.map +1 -0
- package/dist/icons/components/UiLogoJava.js +27 -0
- package/dist/icons/components/UiLogoJava.js.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.cjs +29 -0
- package/dist/icons/components/UiLogoKubernetes.cjs.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.d.ts +9 -0
- package/dist/icons/components/UiLogoKubernetes.d.ts.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.js +27 -0
- package/dist/icons/components/UiLogoKubernetes.js.map +1 -0
- package/dist/icons/components/UiLogoMssql.cjs +29 -0
- package/dist/icons/components/UiLogoMssql.cjs.map +1 -0
- package/dist/icons/components/UiLogoMssql.d.ts +9 -0
- package/dist/icons/components/UiLogoMssql.d.ts.map +1 -0
- package/dist/icons/components/UiLogoMssql.js +27 -0
- package/dist/icons/components/UiLogoMssql.js.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.cjs +29 -0
- package/dist/icons/components/UiLogoOpenjdk.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.d.ts +9 -0
- package/dist/icons/components/UiLogoOpenjdk.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.js +27 -0
- package/dist/icons/components/UiLogoOpenjdk.js.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.cjs +29 -0
- package/dist/icons/components/UiLogoOpensearch.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.d.ts +9 -0
- package/dist/icons/components/UiLogoOpensearch.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.js +27 -0
- package/dist/icons/components/UiLogoOpensearch.js.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.cjs +29 -0
- package/dist/icons/components/UiLogoOpentelemetry.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.d.ts +9 -0
- package/dist/icons/components/UiLogoOpentelemetry.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.js +27 -0
- package/dist/icons/components/UiLogoOpentelemetry.js.map +1 -0
- package/dist/icons/components/UiLogoPostgres.cjs +29 -0
- package/dist/icons/components/UiLogoPostgres.cjs.map +1 -0
- package/dist/icons/components/UiLogoPostgres.d.ts +9 -0
- package/dist/icons/components/UiLogoPostgres.d.ts.map +1 -0
- package/dist/icons/components/UiLogoPostgres.js +27 -0
- package/dist/icons/components/UiLogoPostgres.js.map +1 -0
- package/dist/icons/components/UiLogoSqlite.cjs +29 -0
- package/dist/icons/components/UiLogoSqlite.cjs.map +1 -0
- package/dist/icons/components/UiLogoSqlite.d.ts +9 -0
- package/dist/icons/components/UiLogoSqlite.d.ts.map +1 -0
- package/dist/icons/components/UiLogoSqlite.js +27 -0
- package/dist/icons/components/UiLogoSqlite.js.map +1 -0
- package/dist/icons/components/UiWebLink.cjs +40 -0
- package/dist/icons/components/UiWebLink.cjs.map +1 -0
- package/dist/icons/components/UiWebLink.d.ts +9 -0
- package/dist/icons/components/UiWebLink.d.ts.map +1 -0
- package/dist/icons/components/UiWebLink.js +38 -0
- package/dist/icons/components/UiWebLink.js.map +1 -0
- package/dist/icons/index.d.ts +16 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +32 -0
- package/dist/icons/registry.cjs.map +1 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +32 -0
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons.cjs +32 -0
- package/dist/icons.js +17 -1
- package/dist/index.cjs +38 -5
- package/dist/index.js +23 -7
- package/dist/jvm/classes/PatchedClassList.cjs +11 -2
- package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
- package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
- package/dist/jvm/classes/PatchedClassList.js +11 -2
- package/dist/jvm/classes/PatchedClassList.js.map +1 -1
- package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
- package/dist/jvm/model/patches.cjs +4 -2
- package/dist/jvm/model/patches.cjs.map +1 -1
- package/dist/jvm/model/patches.d.ts +3 -1
- package/dist/jvm/model/patches.d.ts.map +1 -1
- package/dist/jvm/model/patches.js +4 -2
- package/dist/jvm/model/patches.js.map +1 -1
- package/dist/jvm/protocol/client.d.ts +7 -2
- package/dist/jvm/protocol/client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.cjs +30 -11
- package/dist/jvm/protocol/operation-client.cjs.map +1 -1
- package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.js +30 -11
- package/dist/jvm/protocol/operation-client.js.map +1 -1
- package/dist/jvm/protocol/query-keys.cjs +1 -1
- package/dist/jvm/protocol/query-keys.cjs.map +1 -1
- package/dist/jvm/protocol/query-keys.d.ts +1 -1
- package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
- package/dist/jvm/protocol/query-keys.js +1 -1
- package/dist/jvm/protocol/query-keys.js.map +1 -1
- package/dist/jvm/protocol/status.cjs +38 -0
- package/dist/jvm/protocol/status.cjs.map +1 -0
- package/dist/jvm/protocol/status.d.ts +13 -0
- package/dist/jvm/protocol/status.d.ts.map +1 -0
- package/dist/jvm/protocol/status.js +38 -0
- package/dist/jvm/protocol/status.js.map +1 -0
- package/dist/jvm/protocol/types.d.ts +16 -4
- package/dist/jvm/protocol/types.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.cjs +7 -1
- package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
- package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.js +7 -1
- package/dist/jvm/runtime/GcSummary.js.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
- package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.js +12 -11
- package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
- package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.js +4 -9
- package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
- package/dist/jvm/surfaces/jvm-context.cjs +23 -4
- package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
- package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
- package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
- package/dist/jvm/surfaces/jvm-context.js +23 -5
- package/dist/jvm/surfaces/jvm-context.js.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
- package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.js +2 -2
- package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
- package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.js +3 -2
- package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
- package/dist/jvm/threads/ThreadDetail.cjs +6 -2
- package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
- package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
- package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
- package/dist/jvm/threads/ThreadDetail.js +6 -2
- package/dist/jvm/threads/ThreadDetail.js.map +1 -1
- package/dist/jvm.cjs +3 -0
- package/dist/jvm.d.ts +2 -1
- package/dist/jvm.d.ts.map +1 -1
- package/dist/jvm.js +3 -2
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +16 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +21 -2
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.js +21 -2
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/Workspace.cjs +66 -21
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +6 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +66 -21
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.model.cjs +20 -0
- package/dist/layout/Workspace.model.cjs.map +1 -1
- package/dist/layout/Workspace.model.d.ts +17 -0
- package/dist/layout/Workspace.model.d.ts.map +1 -1
- package/dist/layout/Workspace.model.js +20 -1
- package/dist/layout/Workspace.model.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +10 -6
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.d.ts +4 -1
- package/dist/layout/Workspace.regions.d.ts.map +1 -1
- package/dist/layout/Workspace.regions.js +10 -6
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/duration.cjs +20 -0
- package/dist/lib/duration.cjs.map +1 -1
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.d.ts.map +1 -1
- package/dist/lib/duration.js +19 -1
- package/dist/lib/duration.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +34 -30
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +34 -30
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/overlay/ConfirmDialog.cjs +5 -2
- package/dist/overlay/ConfirmDialog.cjs.map +1 -1
- package/dist/overlay/ConfirmDialog.d.ts +14 -2
- package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
- package/dist/overlay/ConfirmDialog.js +5 -2
- package/dist/overlay/ConfirmDialog.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +94 -285
- package/dist/profiles/cel/celEditor.cjs.map +1 -1
- package/dist/profiles/cel/celEditor.d.ts +10 -15
- package/dist/profiles/cel/celEditor.d.ts.map +1 -1
- package/dist/profiles/cel/celEditor.js +97 -287
- package/dist/profiles/cel/celEditor.js.map +1 -1
- package/dist/profiles/cel/celExpression.cjs +1 -61
- package/dist/profiles/cel/celExpression.cjs.map +1 -1
- package/dist/profiles/cel/celExpression.d.ts +2 -38
- package/dist/profiles/cel/celExpression.d.ts.map +1 -1
- package/dist/profiles/cel/celExpression.js +2 -58
- package/dist/profiles/cel/celExpression.js.map +1 -1
- package/dist/profiles/cel/celPlayground.cjs +122 -0
- package/dist/profiles/cel/celPlayground.cjs.map +1 -0
- package/dist/profiles/cel/celPlayground.d.ts +43 -0
- package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
- package/dist/profiles/cel/celPlayground.js +118 -0
- package/dist/profiles/cel/celPlayground.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.js +2 -2
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
- package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
- package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
- package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
- package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
- package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
- package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +126 -38
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts +5 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +127 -39
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorModel.cjs +65 -19
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorModel.js +64 -18
- package/dist/profiles/editor/profileEditorModel.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +129 -29
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +137 -88
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +138 -90
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +23 -7
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.cjs +93 -0
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -0
- package/dist/profiles/editor/profileSaveAsDialog.d.ts +17 -0
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -0
- package/dist/profiles/editor/profileSaveAsDialog.js +93 -0
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.js +70 -0
- package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
- package/dist/profiles/editor/samplePaths.cjs +54 -0
- package/dist/profiles/editor/samplePaths.cjs.map +1 -0
- package/dist/profiles/editor/samplePaths.d.ts +27 -0
- package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
- package/dist/profiles/editor/samplePaths.js +53 -0
- package/dist/profiles/editor/samplePaths.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -1
- package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
- package/dist/profiles/fields/profileFieldControls.cjs +3 -2
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldControls.js +3 -2
- package/dist/profiles/fields/profileFieldControls.js.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.js +99 -186
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/fields/profileFieldList.cjs +23 -1
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldList.js +23 -1
- package/dist/profiles/fields/profileFieldList.js.map +1 -1
- package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
- package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.js +110 -0
- package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
- package/dist/profiles/fields/profileFieldSample.cjs +182 -0
- package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
- package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldSample.js +180 -0
- package/dist/profiles/fields/profileFieldSample.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.js +104 -0
- package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.js +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
- package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.js +59 -0
- package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +79 -79
- package/dist/profiles/processor/processorConfig.cjs.map +1 -1
- package/dist/profiles/processor/processorConfig.d.ts +30 -3
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
- package/dist/profiles/processor/processorConfig.js +78 -78
- package/dist/profiles/processor/processorConfig.js.map +1 -1
- package/dist/profiles/processor/processorPipeline.cjs +24 -8
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
- package/dist/profiles/processor/processorPipeline.d.ts +3 -3
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipeline.js +25 -9
- package/dist/profiles/processor/processorPipeline.js.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.js +39 -95
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.js +3 -2
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
- package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +10 -1
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
- package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.js +39 -0
- package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
- package/dist/profiles.cjs +9 -11
- package/dist/profiles.js +8 -8
- package/dist/rpc/EntityExplorerApp.cjs +7 -3
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +16 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +7 -3
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/InlineError.cjs +30 -10
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +10 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +30 -10
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +9 -6
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +9 -6
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/SessionHeader.cjs +117 -111
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts +3 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +117 -111
- package/dist/rpc/SessionHeader.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +2 -6
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -5
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/surfaceNav.cjs +5 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -1
- package/dist/rpc/surfaceNav.d.ts.map +1 -1
- package/dist/rpc/surfaceNav.js +5 -0
- package/dist/rpc/surfaceNav.js.map +1 -1
- package/dist/runtime/barrels.json +8944 -8877
- package/dist/runtime/importmap.json +2168 -2129
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
- package/dist/profiles/cel/celEditorResults.cjs +0 -158
- package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
- package/dist/profiles/cel/celEditorResults.d.ts +0 -37
- package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
- package/dist/profiles/cel/celEditorResults.js +0 -156
- package/dist/profiles/cel/celEditorResults.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const require_CodeBlock = require("../../CodeBlock.cjs");
|
|
2
|
+
const require_ResolutionTrace = require("./ResolutionTrace.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let yaml = require("yaml");
|
|
5
|
+
// src/data/ai/runtime-profiles/ResolutionPreview.tsx
|
|
6
|
+
/** The runtime server's authoritative answer for the selected record: its
|
|
7
|
+
* effective spec as YAML, and the order the server applied layers in. */
|
|
8
|
+
function ResolutionPreview({ state }) {
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10
|
+
className: "space-y-4 p-4",
|
|
11
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12
|
+
className: "flex items-center gap-2",
|
|
13
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
14
|
+
className: "flex-1 text-sm font-semibold",
|
|
15
|
+
children: "Resolved by runtime server"
|
|
16
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusLabel, { status: state.status })]
|
|
17
|
+
}), state.status === "error" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18
|
+
role: "alert",
|
|
19
|
+
className: "rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",
|
|
20
|
+
children: state.error
|
|
21
|
+
}) : state.status === "loading" || !state.result ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22
|
+
className: "text-sm text-muted-foreground",
|
|
23
|
+
children: "Waiting for an authoritative response."
|
|
24
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
25
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
26
|
+
children: "Effective spec"
|
|
27
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CodeBlock.CodeBlock, {
|
|
28
|
+
language: "yaml",
|
|
29
|
+
source: (0, yaml.stringify)(state.result.resolved.spec),
|
|
30
|
+
copyable: true
|
|
31
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
32
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
33
|
+
children: "Server order"
|
|
34
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ResolutionTrace.ResolutionTrace, { trace: state.result.resolved.trace })] })] })]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function StatusLabel({ status }) {
|
|
38
|
+
if (status === "resolved") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
39
|
+
className: "text-xs font-medium text-emerald-600",
|
|
40
|
+
children: "Resolved"
|
|
41
|
+
});
|
|
42
|
+
if (status === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
43
|
+
className: "text-xs font-medium text-destructive",
|
|
44
|
+
children: "Failed"
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
47
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
48
|
+
children: "Resolving…"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.ResolutionPreview = ResolutionPreview;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=ResolutionPreview.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolutionPreview.cjs","names":["_Fragment","CodeBlock","stringify","ResolutionTrace"],"sources":["../../../../src/data/ai/runtime-profiles/ResolutionPreview.tsx"],"sourcesContent":["import { stringify } from \"yaml\";\nimport { CodeBlock } from \"../../CodeBlock\";\nimport { ResolutionTrace } from \"./ResolutionTrace\";\nimport type { RuntimeProfileResolutionState } from \"./types\";\n\n/** The runtime server's authoritative answer for the selected record: its\n * effective spec as YAML, and the order the server applied layers in. */\nexport function ResolutionPreview({\n state,\n}: {\n state: RuntimeProfileResolutionState;\n}) {\n return (\n <div className=\"space-y-4 p-4\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"flex-1 text-sm font-semibold\">\n Resolved by runtime server\n </h2>\n <StatusLabel status={state.status} />\n </div>\n {state.status === \"error\" ? (\n <div\n role=\"alert\"\n className=\"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive\"\n >\n {state.error}\n </div>\n ) : state.status === \"loading\" || !state.result ? (\n <p className=\"text-sm text-muted-foreground\">\n Waiting for an authoritative response.\n </p>\n ) : (\n <>\n <div>\n <h3 className=\"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n Effective spec\n </h3>\n <CodeBlock\n language=\"yaml\"\n source={stringify(state.result.resolved.spec)}\n copyable\n />\n </div>\n <div>\n <h3 className=\"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n Server order\n </h3>\n <ResolutionTrace trace={state.result.resolved.trace} />\n </div>\n </>\n )}\n </div>\n );\n}\n\nfunction StatusLabel({\n status,\n}: {\n status: RuntimeProfileResolutionState[\"status\"];\n}) {\n if (status === \"resolved\") {\n return (\n <span className=\"text-xs font-medium text-emerald-600\">Resolved</span>\n );\n }\n if (status === \"error\") {\n return <span className=\"text-xs font-medium text-destructive\">Failed</span>;\n }\n return (\n <span className=\"text-xs font-medium text-muted-foreground\">\n Resolving…\n </span>\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,kBAAkB,EAChC,SAGC;CACD,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;IAAI,WAAU;IAA+B,UAAA;GAEzC,CAAA,GACJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,EAAa,QAAQ,MAAM,OAAS,CAAA,CACjC;EACJ,CAAA,GAAA,MAAM,WAAW,UAChB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,MAAK;GACL,WAAU;GAET,UAAA,MAAM;EACJ,CAAA,IACH,MAAM,WAAW,aAAa,CAAC,MAAM,SACvC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;GAAG,WAAU;GAAgC,UAAA;EAE1C,CAAA,IAEH,iBAAA,GAAA,kBAAA,KAAA,CAAAA,kBAAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;GAAI,WAAU;GAA2E,UAAA;EAErF,CAAA,GACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;GACE,UAAS;GACT,SAAA,GAAQC,KAAAA,UAAAA,CAAU,MAAM,OAAO,SAAS,IAAI;GAC5C,UAAA;EACD,CAAA,CACE,EAAA,CAAA,GACL,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;GAAI,WAAU;GAA2E,UAAA;EAErF,CAAA,GACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,iBAAD,EAAiB,OAAO,MAAM,OAAO,SAAS,MAAQ,CAAA,CACnD,EAAA,CAAA,CACL,EAAA,CAAA,CAED;;AAET;AAEA,SAAS,YAAY,EACnB,UAGC;CACD,IAAI,WAAW,YACb,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAM,WAAU;EAAuC,UAAA;CAAc,CAAA;CAGzE,IAAI,WAAW,SACb,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAM,WAAU;EAAuC,UAAA;CAAY,CAAA;CAE5E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAM,WAAU;EAA4C,UAAA;CAEtD,CAAA;AAEV"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RuntimeProfileResolutionState } from './types.js';
|
|
2
|
+
/** The runtime server's authoritative answer for the selected record: its
|
|
3
|
+
* effective spec as YAML, and the order the server applied layers in. */
|
|
4
|
+
export declare function ResolutionPreview({ state, }: {
|
|
5
|
+
state: RuntimeProfileResolutionState;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ResolutionPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolutionPreview.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/runtime-profiles/ResolutionPreview.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;0EAC0E;AAC1E,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,GACN,EAAE;IACD,KAAK,EAAE,6BAA6B,CAAC;CACtC,+BA0CA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CodeBlock } from "../../CodeBlock.js";
|
|
2
|
+
import { ResolutionTrace } from "./ResolutionTrace.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { stringify } from "yaml";
|
|
5
|
+
// src/data/ai/runtime-profiles/ResolutionPreview.tsx
|
|
6
|
+
/** The runtime server's authoritative answer for the selected record: its
|
|
7
|
+
* effective spec as YAML, and the order the server applied layers in. */
|
|
8
|
+
function ResolutionPreview({ state }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: "space-y-4 p-4",
|
|
11
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: "flex items-center gap-2",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
14
|
+
className: "flex-1 text-sm font-semibold",
|
|
15
|
+
children: "Resolved by runtime server"
|
|
16
|
+
}), /* @__PURE__ */ jsx(StatusLabel, { status: state.status })]
|
|
17
|
+
}), state.status === "error" ? /* @__PURE__ */ jsx("div", {
|
|
18
|
+
role: "alert",
|
|
19
|
+
className: "rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",
|
|
20
|
+
children: state.error
|
|
21
|
+
}) : state.status === "loading" || !state.result ? /* @__PURE__ */ jsx("p", {
|
|
22
|
+
className: "text-sm text-muted-foreground",
|
|
23
|
+
children: "Waiting for an authoritative response."
|
|
24
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
25
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
26
|
+
children: "Effective spec"
|
|
27
|
+
}), /* @__PURE__ */ jsx(CodeBlock, {
|
|
28
|
+
language: "yaml",
|
|
29
|
+
source: stringify(state.result.resolved.spec),
|
|
30
|
+
copyable: true
|
|
31
|
+
})] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
32
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
33
|
+
children: "Server order"
|
|
34
|
+
}), /* @__PURE__ */ jsx(ResolutionTrace, { trace: state.result.resolved.trace })] })] })]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function StatusLabel({ status }) {
|
|
38
|
+
if (status === "resolved") return /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: "text-xs font-medium text-emerald-600",
|
|
40
|
+
children: "Resolved"
|
|
41
|
+
});
|
|
42
|
+
if (status === "error") return /* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "text-xs font-medium text-destructive",
|
|
44
|
+
children: "Failed"
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
48
|
+
children: "Resolving…"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export { ResolutionPreview };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=ResolutionPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolutionPreview.js","names":["_Fragment"],"sources":["../../../../src/data/ai/runtime-profiles/ResolutionPreview.tsx"],"sourcesContent":["import { stringify } from \"yaml\";\nimport { CodeBlock } from \"../../CodeBlock\";\nimport { ResolutionTrace } from \"./ResolutionTrace\";\nimport type { RuntimeProfileResolutionState } from \"./types\";\n\n/** The runtime server's authoritative answer for the selected record: its\n * effective spec as YAML, and the order the server applied layers in. */\nexport function ResolutionPreview({\n state,\n}: {\n state: RuntimeProfileResolutionState;\n}) {\n return (\n <div className=\"space-y-4 p-4\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"flex-1 text-sm font-semibold\">\n Resolved by runtime server\n </h2>\n <StatusLabel status={state.status} />\n </div>\n {state.status === \"error\" ? (\n <div\n role=\"alert\"\n className=\"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive\"\n >\n {state.error}\n </div>\n ) : state.status === \"loading\" || !state.result ? (\n <p className=\"text-sm text-muted-foreground\">\n Waiting for an authoritative response.\n </p>\n ) : (\n <>\n <div>\n <h3 className=\"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n Effective spec\n </h3>\n <CodeBlock\n language=\"yaml\"\n source={stringify(state.result.resolved.spec)}\n copyable\n />\n </div>\n <div>\n <h3 className=\"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n Server order\n </h3>\n <ResolutionTrace trace={state.result.resolved.trace} />\n </div>\n </>\n )}\n </div>\n );\n}\n\nfunction StatusLabel({\n status,\n}: {\n status: RuntimeProfileResolutionState[\"status\"];\n}) {\n if (status === \"resolved\") {\n return (\n <span className=\"text-xs font-medium text-emerald-600\">Resolved</span>\n );\n }\n if (status === \"error\") {\n return <span className=\"text-xs font-medium text-destructive\">Failed</span>;\n }\n return (\n <span className=\"text-xs font-medium text-muted-foreground\">\n Resolving…\n </span>\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,kBAAkB,EAChC,SAGC;CACD,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,MAAD;IAAI,WAAU;IAA+B,UAAA;GAEzC,CAAA,GACJ,oBAAC,aAAD,EAAa,QAAQ,MAAM,OAAS,CAAA,CACjC;EACJ,CAAA,GAAA,MAAM,WAAW,UAChB,oBAAC,OAAD;GACE,MAAK;GACL,WAAU;GAET,UAAA,MAAM;EACJ,CAAA,IACH,MAAM,WAAW,aAAa,CAAC,MAAM,SACvC,oBAAC,KAAD;GAAG,WAAU;GAAgC,UAAA;EAE1C,CAAA,IAEH,qBAAAA,UAAA,EAAA,UAAA,CACE,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,MAAD;GAAI,WAAU;GAA2E,UAAA;EAErF,CAAA,GACJ,oBAAC,WAAD;GACE,UAAS;GACT,QAAQ,UAAU,MAAM,OAAO,SAAS,IAAI;GAC5C,UAAA;EACD,CAAA,CACE,EAAA,CAAA,GACL,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,MAAD;GAAI,WAAU;GAA2E,UAAA;EAErF,CAAA,GACJ,oBAAC,iBAAD,EAAiB,OAAO,MAAM,OAAO,SAAS,MAAQ,CAAA,CACnD,EAAA,CAAA,CACL,EAAA,CAAA,CAED;;AAET;AAEA,SAAS,YAAY,EACnB,UAGC;CACD,IAAI,WAAW,YACb,OACE,oBAAC,QAAD;EAAM,WAAU;EAAuC,UAAA;CAAc,CAAA;CAGzE,IAAI,WAAW,SACb,OAAO,oBAAC,QAAD;EAAM,WAAU;EAAuC,UAAA;CAAY,CAAA;CAE5E,OACE,oBAAC,QAAD;EAAM,WAAU;EAA4C,UAAA;CAEtD,CAAA;AAEV"}
|
|
@@ -5,7 +5,7 @@ export { ProfileSpecEditor } from './ProfileSpecEditor.js';
|
|
|
5
5
|
export { PresetSpecEditor } from './PresetSpecEditor.js';
|
|
6
6
|
export { OrderedPresetSelect } from './OrderedPresetSelect.js';
|
|
7
7
|
export { RuntimeLibraryList, type RuntimeLibraryItem, } from './RuntimeLibraryList.js';
|
|
8
|
-
export {
|
|
8
|
+
export { ResolutionPreview } from './ResolutionPreview.js';
|
|
9
9
|
export { ResolutionTrace } from './ResolutionTrace.js';
|
|
10
10
|
export { PermissionStrategiesEditor } from './PermissionStrategiesEditor.js';
|
|
11
11
|
export { RuntimeStatusNotice } from './RuntimeStatusNotice.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/runtime-profiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/runtime-profiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,KAAK,8BAA8B,GACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,UAAU,GACX,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,6BAA6B,EAC7B,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_UiPaperPlaneRight = require("../../icons/components/UiPaperPlaneRight.cjs");
|
|
2
|
+
const require_UiPlay = require("../../icons/components/UiPlay.cjs");
|
|
3
|
+
const require_UiQueue = require("../../icons/components/UiQueue.cjs");
|
|
4
|
+
// src/data/ai/sessionSubmitVariant.ts
|
|
5
|
+
/** How a message sent now reaches the session, mirroring the server's routing:
|
|
6
|
+
* a running turn is steered when the runtime supports it, otherwise the message
|
|
7
|
+
* is queued behind it; an idle session continues with a new turn. */
|
|
8
|
+
function sessionSubmitVariant(status, capabilities) {
|
|
9
|
+
if (status === "running" && capabilities.steer) return {
|
|
10
|
+
kind: "steer",
|
|
11
|
+
icon: require_UiPaperPlaneRight.UiPaperPlaneRight,
|
|
12
|
+
variant: "secondary",
|
|
13
|
+
description: "Steer: send into the turn that is running now"
|
|
14
|
+
};
|
|
15
|
+
if (status === "running") return {
|
|
16
|
+
kind: "queue",
|
|
17
|
+
icon: require_UiQueue.UiQueue,
|
|
18
|
+
variant: "outline",
|
|
19
|
+
description: "Queue: send as a follow-up after the current turn finishes"
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
kind: "continue",
|
|
23
|
+
icon: require_UiPlay.UiPlay,
|
|
24
|
+
variant: "default",
|
|
25
|
+
description: "Continue this session with a new turn"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.sessionSubmitVariant = sessionSubmitVariant;
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=sessionSubmitVariant.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionSubmitVariant.cjs","names":["UiPaperPlaneRight","UiQueue","UiPlay"],"sources":["../../../src/data/ai/sessionSubmitVariant.ts"],"sourcesContent":["import { UiPaperPlaneRight, UiPlay, UiQueue } from \"../../icons\";\nimport type { PromptSubmitVariant } from \"../chat/PromptInput\";\nimport type { SessionChatCapabilities, SessionChatComposerProps } from \"./SessionChatComposer\";\n\n/** How a message sent now reaches the session, mirroring the server's routing:\n * a running turn is steered when the runtime supports it, otherwise the message\n * is queued behind it; an idle session continues with a new turn. */\nexport function sessionSubmitVariant(\n status: SessionChatComposerProps[\"status\"],\n capabilities: SessionChatCapabilities,\n): PromptSubmitVariant {\n if (status === \"running\" && capabilities.steer) {\n return {\n kind: \"steer\",\n icon: UiPaperPlaneRight,\n variant: \"secondary\",\n description: \"Steer: send into the turn that is running now\",\n };\n }\n if (status === \"running\") {\n return {\n kind: \"queue\",\n icon: UiQueue,\n variant: \"outline\",\n description: \"Queue: send as a follow-up after the current turn finishes\",\n };\n }\n return {\n kind: \"continue\",\n icon: UiPlay,\n variant: \"default\",\n description: \"Continue this session with a new turn\",\n };\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,qBACd,QACA,cACqB;CACrB,IAAI,WAAW,aAAa,aAAa,OACvC,OAAO;EACL,MAAM;EACN,MAAMA,0BAAAA;EACN,SAAS;EACT,aAAa;CACf;CAEF,IAAI,WAAW,WACb,OAAO;EACL,MAAM;EACN,MAAMC,gBAAAA;EACN,SAAS;EACT,aAAa;CACf;CAEF,OAAO;EACL,MAAM;EACN,MAAMC,eAAAA;EACN,SAAS;EACT,aAAa;CACf;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PromptSubmitVariant } from '../chat/PromptInput.js';
|
|
2
|
+
import { SessionChatCapabilities, SessionChatComposerProps } from './SessionChatComposer.js';
|
|
3
|
+
/** How a message sent now reaches the session, mirroring the server's routing:
|
|
4
|
+
* a running turn is steered when the runtime supports it, otherwise the message
|
|
5
|
+
* is queued behind it; an idle session continues with a new turn. */
|
|
6
|
+
export declare function sessionSubmitVariant(status: SessionChatComposerProps["status"], capabilities: SessionChatCapabilities): PromptSubmitVariant;
|
|
7
|
+
//# sourceMappingURL=sessionSubmitVariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionSubmitVariant.d.ts","sourceRoot":"","sources":["../../../src/data/ai/sessionSubmitVariant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE/F;;sEAEsE;AACtE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,EAC1C,YAAY,EAAE,uBAAuB,GACpC,mBAAmB,CAuBrB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { UiPaperPlaneRight } from "../../icons/components/UiPaperPlaneRight.js";
|
|
2
|
+
import { UiPlay } from "../../icons/components/UiPlay.js";
|
|
3
|
+
import { UiQueue } from "../../icons/components/UiQueue.js";
|
|
4
|
+
// src/data/ai/sessionSubmitVariant.ts
|
|
5
|
+
/** How a message sent now reaches the session, mirroring the server's routing:
|
|
6
|
+
* a running turn is steered when the runtime supports it, otherwise the message
|
|
7
|
+
* is queued behind it; an idle session continues with a new turn. */
|
|
8
|
+
function sessionSubmitVariant(status, capabilities) {
|
|
9
|
+
if (status === "running" && capabilities.steer) return {
|
|
10
|
+
kind: "steer",
|
|
11
|
+
icon: UiPaperPlaneRight,
|
|
12
|
+
variant: "secondary",
|
|
13
|
+
description: "Steer: send into the turn that is running now"
|
|
14
|
+
};
|
|
15
|
+
if (status === "running") return {
|
|
16
|
+
kind: "queue",
|
|
17
|
+
icon: UiQueue,
|
|
18
|
+
variant: "outline",
|
|
19
|
+
description: "Queue: send as a follow-up after the current turn finishes"
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
kind: "continue",
|
|
23
|
+
icon: UiPlay,
|
|
24
|
+
variant: "default",
|
|
25
|
+
description: "Continue this session with a new turn"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export { sessionSubmitVariant };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=sessionSubmitVariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionSubmitVariant.js","names":[],"sources":["../../../src/data/ai/sessionSubmitVariant.ts"],"sourcesContent":["import { UiPaperPlaneRight, UiPlay, UiQueue } from \"../../icons\";\nimport type { PromptSubmitVariant } from \"../chat/PromptInput\";\nimport type { SessionChatCapabilities, SessionChatComposerProps } from \"./SessionChatComposer\";\n\n/** How a message sent now reaches the session, mirroring the server's routing:\n * a running turn is steered when the runtime supports it, otherwise the message\n * is queued behind it; an idle session continues with a new turn. */\nexport function sessionSubmitVariant(\n status: SessionChatComposerProps[\"status\"],\n capabilities: SessionChatCapabilities,\n): PromptSubmitVariant {\n if (status === \"running\" && capabilities.steer) {\n return {\n kind: \"steer\",\n icon: UiPaperPlaneRight,\n variant: \"secondary\",\n description: \"Steer: send into the turn that is running now\",\n };\n }\n if (status === \"running\") {\n return {\n kind: \"queue\",\n icon: UiQueue,\n variant: \"outline\",\n description: \"Queue: send as a follow-up after the current turn finishes\",\n };\n }\n return {\n kind: \"continue\",\n icon: UiPlay,\n variant: \"default\",\n description: \"Continue this session with a new turn\",\n };\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,qBACd,QACA,cACqB;CACrB,IAAI,WAAW,aAAa,aAAa,OACvC,OAAO;EACL,MAAM;EACN,MAAM;EACN,SAAS;EACT,aAAa;CACf;CAEF,IAAI,WAAW,WACb,OAAO;EACL,MAAM;EACN,MAAM;EACN,SAAS;EACT,aAAa;CACf;CAEF,OAAO;EACL,MAAM;EACN,MAAM;EACN,SAAS;EACT,aAAa;CACf;AACF"}
|
|
@@ -2,12 +2,23 @@ const require_utils = require("../../lib/utils.cjs");
|
|
|
2
2
|
const require_timestamp_format = require("./timestamp-format.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
// src/data/cells/Timestamp.tsx
|
|
5
|
+
function isScalarValue(value) {
|
|
6
|
+
return typeof value === "number" || typeof value === "string" && value.trim() !== "";
|
|
7
|
+
}
|
|
5
8
|
function Timestamp({ value, format, showTitleOnHover = true, className }) {
|
|
6
9
|
const parsed = require_timestamp_format.parseTimestamp(value);
|
|
7
|
-
if (!parsed)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
if (!parsed) {
|
|
11
|
+
if (!isScalarValue(value)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12
|
+
className: require_utils.cn("text-muted-foreground", className),
|
|
13
|
+
children: "—"
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16
|
+
className: require_utils.cn("whitespace-nowrap text-destructive", className),
|
|
17
|
+
title: "Not a recognised timestamp",
|
|
18
|
+
"data-timestamp-invalid": "true",
|
|
19
|
+
children: String(value)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
11
22
|
const display = require_timestamp_format.formatTimestamp(parsed, format);
|
|
12
23
|
const title = showTitleOnHover ? parsed.toISOString() : void 0;
|
|
13
24
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timestamp.cjs","names":["parseTimestamp","cn","formatTimestamp"],"sources":["../../../src/data/cells/Timestamp.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { formatTimestamp, parseTimestamp, type TimestampFormat } from \"./timestamp-format\";\n\nexport type TimestampProps = {\n value: unknown;\n format: TimestampFormat;\n showTitleOnHover?: boolean;\n className?: string;\n};\n\nexport function Timestamp({ value, format, showTitleOnHover = true, className }: TimestampProps) {\n const parsed = parseTimestamp(value);\n if (!parsed) return <span className={cn(\"text-muted-foreground\", className)}>—</span>;\n\n const display = formatTimestamp(parsed, format);\n const title = showTitleOnHover ? parsed.toISOString() : undefined;\n\n return (\n <span\n className={cn(\"tabular-nums whitespace-nowrap text-muted-foreground\", className)}\n title={title}\n >\n {display}\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAgB,UAAU,EAAE,OAAO,QAAQ,mBAAmB,MAAM,aAA6B;CAC/F,MAAM,SAASA,yBAAAA,eAAe,KAAK;CACnC,IAAI,CAAC,QAAQ,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;
|
|
1
|
+
{"version":3,"file":"Timestamp.cjs","names":["parseTimestamp","cn","formatTimestamp"],"sources":["../../../src/data/cells/Timestamp.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { formatTimestamp, parseTimestamp, type TimestampFormat } from \"./timestamp-format\";\n\nexport type TimestampProps = {\n value: unknown;\n format: TimestampFormat;\n showTitleOnHover?: boolean;\n className?: string;\n};\n\nfunction isScalarValue(value: unknown): value is string | number {\n return typeof value === \"number\" || (typeof value === \"string\" && value.trim() !== \"\");\n}\n\nexport function Timestamp({ value, format, showTitleOnHover = true, className }: TimestampProps) {\n const parsed = parseTimestamp(value);\n if (!parsed) {\n if (!isScalarValue(value)) return <span className={cn(\"text-muted-foreground\", className)}>—</span>;\n // A value is present but is not an instant this cell can read. Showing it\n // verbatim keeps a mis-declared column visible; a dash would pass for \"no data\".\n return (\n <span\n className={cn(\"whitespace-nowrap text-destructive\", className)}\n title=\"Not a recognised timestamp\"\n data-timestamp-invalid=\"true\"\n >\n {String(value)}\n </span>\n );\n }\n\n const display = formatTimestamp(parsed, format);\n const title = showTitleOnHover ? parsed.toISOString() : undefined;\n\n return (\n <span\n className={cn(\"tabular-nums whitespace-nowrap text-muted-foreground\", className)}\n title={title}\n >\n {display}\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAS,cAAc,OAA0C;CAC/D,OAAO,OAAO,UAAU,YAAa,OAAO,UAAU,YAAY,MAAM,KAAK,MAAM;AACrF;AAEA,SAAgB,UAAU,EAAE,OAAO,QAAQ,mBAAmB,MAAM,aAA6B;CAC/F,MAAM,SAASA,yBAAAA,eAAe,KAAK;CACnC,IAAI,CAAC,QAAQ;EACX,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAWC,cAAAA,GAAG,yBAAyB,SAAS;GAAG,UAAA;EAAO,CAAA;EAGlG,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,WAAWA,cAAAA,GAAG,sCAAsC,SAAS;GAC7D,OAAM;GACN,0BAAuB;GAEtB,UAAA,OAAO,KAAK;EACT,CAAA;CAEV;CAEA,MAAM,UAAUC,yBAAAA,gBAAgB,QAAQ,MAAM;CAC9C,MAAM,QAAQ,mBAAmB,OAAO,YAAY,IAAI,KAAA;CAExD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,WAAWD,cAAAA,GAAG,wDAAwD,SAAS;EACxE;EAEN,UAAA;CACG,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timestamp.d.ts","sourceRoot":"","sources":["../../../src/data/cells/Timestamp.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3F,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"Timestamp.d.ts","sourceRoot":"","sources":["../../../src/data/cells/Timestamp.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3F,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAuB,EAAE,SAAS,EAAE,EAAE,cAAc,+BA4B9F"}
|
|
@@ -2,12 +2,23 @@ import { cn } from "../../lib/utils.js";
|
|
|
2
2
|
import { formatTimestamp, parseTimestamp } from "./timestamp-format.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
// src/data/cells/Timestamp.tsx
|
|
5
|
+
function isScalarValue(value) {
|
|
6
|
+
return typeof value === "number" || typeof value === "string" && value.trim() !== "";
|
|
7
|
+
}
|
|
5
8
|
function Timestamp({ value, format, showTitleOnHover = true, className }) {
|
|
6
9
|
const parsed = parseTimestamp(value);
|
|
7
|
-
if (!parsed)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
if (!parsed) {
|
|
11
|
+
if (!isScalarValue(value)) return /* @__PURE__ */ jsx("span", {
|
|
12
|
+
className: cn("text-muted-foreground", className),
|
|
13
|
+
children: "—"
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: cn("whitespace-nowrap text-destructive", className),
|
|
17
|
+
title: "Not a recognised timestamp",
|
|
18
|
+
"data-timestamp-invalid": "true",
|
|
19
|
+
children: String(value)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
11
22
|
const display = formatTimestamp(parsed, format);
|
|
12
23
|
const title = showTitleOnHover ? parsed.toISOString() : void 0;
|
|
13
24
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timestamp.js","names":[],"sources":["../../../src/data/cells/Timestamp.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { formatTimestamp, parseTimestamp, type TimestampFormat } from \"./timestamp-format\";\n\nexport type TimestampProps = {\n value: unknown;\n format: TimestampFormat;\n showTitleOnHover?: boolean;\n className?: string;\n};\n\nexport function Timestamp({ value, format, showTitleOnHover = true, className }: TimestampProps) {\n const parsed = parseTimestamp(value);\n if (!parsed) return <span className={cn(\"text-muted-foreground\", className)}>—</span>;\n\n const display = formatTimestamp(parsed, format);\n const title = showTitleOnHover ? parsed.toISOString() : undefined;\n\n return (\n <span\n className={cn(\"tabular-nums whitespace-nowrap text-muted-foreground\", className)}\n title={title}\n >\n {display}\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAgB,UAAU,EAAE,OAAO,QAAQ,mBAAmB,MAAM,aAA6B;CAC/F,MAAM,SAAS,eAAe,KAAK;CACnC,IAAI,CAAC,QAAQ,OAAO,oBAAC,QAAD;
|
|
1
|
+
{"version":3,"file":"Timestamp.js","names":[],"sources":["../../../src/data/cells/Timestamp.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { formatTimestamp, parseTimestamp, type TimestampFormat } from \"./timestamp-format\";\n\nexport type TimestampProps = {\n value: unknown;\n format: TimestampFormat;\n showTitleOnHover?: boolean;\n className?: string;\n};\n\nfunction isScalarValue(value: unknown): value is string | number {\n return typeof value === \"number\" || (typeof value === \"string\" && value.trim() !== \"\");\n}\n\nexport function Timestamp({ value, format, showTitleOnHover = true, className }: TimestampProps) {\n const parsed = parseTimestamp(value);\n if (!parsed) {\n if (!isScalarValue(value)) return <span className={cn(\"text-muted-foreground\", className)}>—</span>;\n // A value is present but is not an instant this cell can read. Showing it\n // verbatim keeps a mis-declared column visible; a dash would pass for \"no data\".\n return (\n <span\n className={cn(\"whitespace-nowrap text-destructive\", className)}\n title=\"Not a recognised timestamp\"\n data-timestamp-invalid=\"true\"\n >\n {String(value)}\n </span>\n );\n }\n\n const display = formatTimestamp(parsed, format);\n const title = showTitleOnHover ? parsed.toISOString() : undefined;\n\n return (\n <span\n className={cn(\"tabular-nums whitespace-nowrap text-muted-foreground\", className)}\n title={title}\n >\n {display}\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAS,cAAc,OAA0C;CAC/D,OAAO,OAAO,UAAU,YAAa,OAAO,UAAU,YAAY,MAAM,KAAK,MAAM;AACrF;AAEA,SAAgB,UAAU,EAAE,OAAO,QAAQ,mBAAmB,MAAM,aAA6B;CAC/F,MAAM,SAAS,eAAe,KAAK;CACnC,IAAI,CAAC,QAAQ;EACX,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,oBAAC,QAAD;GAAM,WAAW,GAAG,yBAAyB,SAAS;GAAG,UAAA;EAAO,CAAA;EAGlG,OACE,oBAAC,QAAD;GACE,WAAW,GAAG,sCAAsC,SAAS;GAC7D,OAAM;GACN,0BAAuB;GAEtB,UAAA,OAAO,KAAK;EACT,CAAA;CAEV;CAEA,MAAM,UAAU,gBAAgB,QAAQ,MAAM;CAC9C,MAAM,QAAQ,mBAAmB,OAAO,YAAY,IAAI,KAAA;CAExD,OACE,oBAAC,QAAD;EACE,WAAW,GAAG,wDAAwD,SAAS;EACxE;EAEN,UAAA;CACG,CAAA;AAEV"}
|
|
@@ -37,19 +37,37 @@ var TIMESTAMP_RANGE_PRESETS = [
|
|
|
37
37
|
to: "now"
|
|
38
38
|
}
|
|
39
39
|
];
|
|
40
|
+
var EPOCH_STRING = /^\d{9,}$/;
|
|
41
|
+
/**
|
|
42
|
+
* epochToMilliseconds names the unit of an epoch by its magnitude: below 1e12 is
|
|
43
|
+
* seconds, below 1e14 milliseconds, below 1e17 microseconds, anything above
|
|
44
|
+
* nanoseconds. Between 1973 and 2100 the four ranges are 3 orders of magnitude
|
|
45
|
+
* apart (seconds ~1e9, ms ~1e12, µs ~1e15, ns ~1e18), so no real instant is
|
|
46
|
+
* ambiguous. The seconds/milliseconds boundary at 1e12 is the one the numeric
|
|
47
|
+
* branch always had; the µs and ns bands are the span-time units Jaeger and
|
|
48
|
+
* OpenTelemetry store, which would otherwise read as a year tens of thousands
|
|
49
|
+
* of years out.
|
|
50
|
+
*/
|
|
51
|
+
function epochToMilliseconds(epoch) {
|
|
52
|
+
const magnitude = Math.abs(epoch);
|
|
53
|
+
if (magnitude < 0xe8d4a51000) return epoch * 1e3;
|
|
54
|
+
if (magnitude < 0x5af3107a4000) return epoch;
|
|
55
|
+
if (magnitude < 0x16345785d8a0000) return epoch / 1e3;
|
|
56
|
+
return epoch / 1e6;
|
|
57
|
+
}
|
|
58
|
+
function validDate(ms) {
|
|
59
|
+
const d = new Date(ms);
|
|
60
|
+
return Number.isNaN(d.getTime()) ? null : d;
|
|
61
|
+
}
|
|
40
62
|
function parseTimestamp(value) {
|
|
41
63
|
if (value == null) return null;
|
|
42
64
|
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;
|
|
43
|
-
if (typeof value === "number")
|
|
44
|
-
const ms = value < 0xe8d4a51000 ? value * 1e3 : value;
|
|
45
|
-
const d = new Date(ms);
|
|
46
|
-
return Number.isNaN(d.getTime()) ? null : d;
|
|
47
|
-
}
|
|
65
|
+
if (typeof value === "number") return validDate(epochToMilliseconds(value));
|
|
48
66
|
if (typeof value === "string") {
|
|
49
67
|
const trimmed = value.trim();
|
|
50
68
|
if (!trimmed) return null;
|
|
51
|
-
|
|
52
|
-
return
|
|
69
|
+
if (EPOCH_STRING.test(trimmed)) return validDate(epochToMilliseconds(Number(trimmed)));
|
|
70
|
+
return validDate(new Date(trimmed).getTime());
|
|
53
71
|
}
|
|
54
72
|
return null;
|
|
55
73
|
}
|
|
@@ -68,7 +86,9 @@ var ANCHORED_PATTERN = /^now\/([wMqy])(?:\s*([+-])\s*(\d+)\s*([wMqy]))?$/;
|
|
|
68
86
|
* - "now-15m", "now-1h", "now+30s", "now-7d", "now-2w" (units: s/m/h/d/w/M/q/y)
|
|
69
87
|
* - "now/w", "now/M", "now/q", "now/y" with optional calendar offsets
|
|
70
88
|
* - any value parseable by `parseTimestamp` (ISO, epoch ms/s, Date)
|
|
71
|
-
*
|
|
89
|
+
* The rounding forms start the period in UTC (weeks start on Monday 00:00 UTC), not in the viewer's
|
|
90
|
+
* or a selected time zone. "now/d" is not supported (no day anchor): it is unparseable, so it
|
|
91
|
+
* returns null. Returns null for unparseable input.
|
|
72
92
|
*/
|
|
73
93
|
function resolveDateMath(value, now = /* @__PURE__ */ new Date()) {
|
|
74
94
|
if (value == null) return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp-format.cjs","names":[],"sources":["../../../src/data/cells/timestamp-format.ts"],"sourcesContent":["import type { TimeRangePreset, TimeRangePresetGroup } from \"../../components/TimeRange\";\n\nexport const LAST_24_HOURS = { label: \"Last 24 hours\", from: \"now-24h\", to: \"now\" };\n\nexport const TIMESTAMP_RANGE_PRESETS: TimeRangePreset[] = [\n { label: \"Last 5 minutes\", from: \"now-5m\", to: \"now\" },\n { label: \"Last 15 minutes\", from: \"now-15m\", to: \"now\" },\n { label: \"Last 1 hour\", from: \"now-1h\", to: \"now\" },\n { label: \"Last 6 hours\", from: \"now-6h\", to: \"now\" },\n LAST_24_HOURS,\n { label: \"Last 7 days\", from: \"now-7d\", to: \"now\" },\n { label: \"Last 30 days\", from: \"now-30d\", to: \"now\" },\n];\n\nexport type TimestampMode = \"auto\" | \"absolute\" | \"relative\" | \"time\";\n\nexport type TimestampFormat = \"relative\" | \"time\" | \"short\" | \"iso\";\n\nexport type TimestampOptions = {\n /** Rendering mode for timestamp cells. */\n mode?: TimestampMode;\n /** Show the full timestamp in a tooltip even for absolute/ISO formats. */\n alwaysShowFullOnHover?: boolean;\n /**\n * When the column is on a DataTable with `autoFilter`, DataTable mounts a\n * \"Time range\" picker (matching the trace UI) and filters rows whose\n * timestamp falls outside the selected range. Set `false` to suppress.\n */\n autoRangeFilter?: boolean;\n /** Override the trace-style preset list (\"Last 15 minutes\", etc.). */\n rangePresets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n /** Enable absolute date+time input and timezone selection for range filters. */\n timeEnabled?: boolean;\n /** Default timezone used when encoding absolute date+time range values. */\n timeZone?: string;\n /** Selectable timezones shown when `timeEnabled` is true. */\n timeZones?: string[];\n /**\n * Default range applied on first render. Either side may use date-math\n * (`now-24h`, `now`) or any value parseable by `parseTimestamp`.\n */\n defaultRange?: { from?: string; to?: string };\n};\n\nexport function parseTimestamp(value: unknown): Date | null {\n if (value == null) return null;\n if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;\n\n if (typeof value === \"number\") {\n const ms = value < 1e12 ? value * 1000 : value;\n const d = new Date(ms);\n return Number.isNaN(d.getTime()) ? null : d;\n }\n\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (!trimmed) return null;\n const d = new Date(trimmed);\n return Number.isNaN(d.getTime()) ? null : d;\n }\n\n return null;\n}\n\nconst UNIT_MS: Record<string, number> = {\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n d: 86_400_000,\n w: 604_800_000,\n};\n\nconst RELATIVE_PATTERN = /^now\\s*([+-])\\s*(\\d+)\\s*([smhdwMqy])$/;\nconst ANCHORED_PATTERN = /^now\\/([wMqy])(?:\\s*([+-])\\s*(\\d+)\\s*([wMqy]))?$/;\n\n/**\n * Resolves date-math strings to an absolute Date. Recognised forms:\n * - \"now\"\n * - \"now-15m\", \"now-1h\", \"now+30s\", \"now-7d\", \"now-2w\" (units: s/m/h/d/w/M/q/y)\n * - \"now/w\", \"now/M\", \"now/q\", \"now/y\" with optional calendar offsets\n * - any value parseable by `parseTimestamp` (ISO, epoch ms/s, Date)\n * Returns null for unparseable input.\n */\nexport function resolveDateMath(value: unknown, now: Date = new Date()): Date | null {\n if (value == null) return null;\n\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (!trimmed) return null;\n\n if (trimmed.toLowerCase() === \"now\") return new Date(now.getTime());\n\n const anchoredMatch = trimmed.match(ANCHORED_PATTERN);\n if (anchoredMatch) {\n const [, anchor, sign, amount, unit] = anchoredMatch;\n let anchored = startOfPeriod(now, anchor!);\n if (sign && amount && unit) {\n anchored = addPeriod(anchored, unit, Number(amount) * (sign === \"-\" ? -1 : 1));\n }\n return anchored;\n }\n\n const match = trimmed.match(RELATIVE_PATTERN);\n if (match) {\n const [, sign, amount, unit] = match;\n const calendarUnit = unit!;\n if (isCalendarUnit(calendarUnit)) {\n return addPeriod(now, calendarUnit, Number(amount) * (sign === \"-\" ? -1 : 1));\n }\n const unitMs = UNIT_MS[calendarUnit.toLowerCase()];\n if (!unitMs) return null;\n const delta = Number(amount) * unitMs * (sign === \"-\" ? -1 : 1);\n return new Date(now.getTime() + delta);\n }\n }\n\n return parseTimestamp(value);\n}\n\nfunction isCalendarUnit(unit: string) {\n return unit === \"M\" || unit === \"q\" || unit === \"y\";\n}\n\nfunction startOfPeriod(date: Date, unit: string) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const day = date.getUTCDate();\n\n if (unit === \"w\") {\n const start = new Date(Date.UTC(year, month, day));\n const dayOfWeek = start.getUTCDay();\n const daysSinceMonday = (dayOfWeek + 6) % 7;\n start.setUTCDate(start.getUTCDate() - daysSinceMonday);\n return start;\n }\n if (unit === \"M\") return new Date(Date.UTC(year, month, 1));\n if (unit === \"q\") return new Date(Date.UTC(year, Math.floor(month / 3) * 3, 1));\n if (unit === \"y\") return new Date(Date.UTC(year, 0, 1));\n return new Date(date.getTime());\n}\n\nfunction addPeriod(date: Date, unit: string, amount: number) {\n const next = new Date(date.getTime());\n if (unit === \"w\") {\n next.setUTCDate(next.getUTCDate() + amount * 7);\n } else if (unit === \"M\") {\n next.setUTCMonth(next.getUTCMonth() + amount);\n } else if (unit === \"q\") {\n next.setUTCMonth(next.getUTCMonth() + amount * 3);\n } else if (unit === \"y\") {\n next.setUTCFullYear(next.getUTCFullYear() + amount);\n } else {\n const unitMs = UNIT_MS[unit.toLowerCase()];\n if (unitMs) next.setTime(next.getTime() + amount * unitMs);\n }\n return next;\n}\n\nconst MS_PER_MINUTE = 60_000;\nconst MS_PER_DAY = 86_400_000;\n\nexport function chooseTimestampFormat(values: Date[]): TimestampFormat {\n if (values.length === 0) return \"iso\";\n\n let min = Infinity;\n let max = -Infinity;\n for (const d of values) {\n const t = d.getTime();\n if (t < min) min = t;\n if (t > max) max = t;\n }\n const span = max - min;\n\n if (span <= MS_PER_MINUTE) return \"relative\";\n\n const minDate = new Date(min);\n const maxDate = new Date(max);\n\n if (\n minDate.getFullYear() === maxDate.getFullYear() &&\n minDate.getMonth() === maxDate.getMonth() &&\n minDate.getDate() === maxDate.getDate()\n ) {\n return \"time\";\n }\n\n if (minDate.getFullYear() === maxDate.getFullYear() && span <= MS_PER_DAY * 365) {\n return \"short\";\n }\n\n return \"iso\";\n}\n\nexport function formatTimestamp(\n date: Date,\n format: TimestampFormat,\n now: Date = new Date(),\n): string {\n switch (format) {\n case \"relative\":\n return formatRelativeTime(date, now);\n case \"time\":\n return date.toLocaleTimeString(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n });\n case \"short\":\n return date.toLocaleString(undefined, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n case \"iso\":\n default:\n return formatIso(date);\n }\n}\n\nfunction formatIso(date: Date): string {\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, \"0\");\n const dd = String(date.getDate()).padStart(2, \"0\");\n const hh = String(date.getHours()).padStart(2, \"0\");\n const min = String(date.getMinutes()).padStart(2, \"0\");\n return `${yyyy}-${mm}-${dd} ${hh}:${min}`;\n}\n\nexport type RelativeTimeOptions = {\n /**\n * \"phrase\" (default) reads \"30s ago\" / \"in 5m\" / \"just now\". \"token\" is the\n * list-row form — now / 5m / 2h / 3d / 4w / 1y, floored so a token never\n * claims the next unit early — for a meta line where \"ago\" is implied.\n */\n style?: \"phrase\" | \"token\";\n};\n\nconst TOKEN_UNITS: ReadonlyArray<[unit: string, seconds: number]> = [\n [\"y\", 365 * 86400],\n [\"w\", 7 * 86400],\n [\"d\", 86400],\n [\"h\", 3600],\n [\"m\", 60],\n];\n\n// formatRelativeTime renders a compact \"30s ago\" / \"in 5m\" / \"just now\" string,\n// or with style \"token\" the bare now / 5m / 2h / 3d / 4w token.\nexport function formatRelativeTime(\n date: Date,\n now: Date = new Date(),\n options: RelativeTimeOptions = {},\n): string {\n const diffMs = now.getTime() - date.getTime();\n const future = diffMs < 0;\n const abs = Math.abs(diffMs);\n if (options.style === \"token\") {\n const seconds = Math.floor(abs / 1000);\n const match = TOKEN_UNITS.find(([, size]) => seconds >= size);\n if (!match) return \"now\";\n const token = `${Math.floor(seconds / match[1])}${match[0]}`;\n return future ? `in ${token}` : token;\n }\n const sec = Math.round(abs / 1000);\n\n let value: string;\n if (sec < 1) value = \"just now\";\n else if (sec < 60) value = `${sec}s`;\n else if (sec < 3600) value = `${Math.round(sec / 60)}m`;\n else if (sec < 86400) value = `${Math.round(sec / 3600)}h`;\n else value = `${Math.round(sec / 86400)}d`;\n\n if (value === \"just now\") return value;\n return future ? `in ${value}` : `${value} ago`;\n}\n\n// formatDateTimeRelative renders a value as an absolute locale date+time plus a\n// parenthesised relative hint, e.g. \"Apr 15, 2026, 12:00 PM (2h ago)\". It is the\n// shared \"locale + relative\" presentation used for date-typed values across the\n// form, filter, and combobox surfaces. Unparseable strings pass through\n// unchanged (so a template token or freeform value is preserved); nullish input\n// yields an empty string. The hint is dropped when the value reads \"just now\".\nexport function formatDateTimeRelative(value: unknown, now: Date = new Date()): string {\n const parsed = parseTimestamp(value);\n if (!parsed) return typeof value === \"string\" ? value : \"\";\n const absolute = parsed.toLocaleString(undefined, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const relative = formatRelativeTime(parsed, now);\n return relative === \"just now\" ? absolute : `${absolute} (${relative})`;\n}\n\nexport function modeToFormat(mode: TimestampMode, dataFormat: TimestampFormat): TimestampFormat {\n switch (mode) {\n case \"absolute\":\n return \"iso\";\n case \"relative\":\n return \"relative\";\n case \"time\":\n return \"time\";\n case \"auto\":\n default:\n return dataFormat;\n }\n}\n"],"mappings":";AAEA,IAAa,gBAAgB;CAAE,OAAO;CAAiB,MAAM;CAAW,IAAI;AAAM;AAElF,IAAa,0BAA6C;CACxD;EAAE,OAAO;EAAkB,MAAM;EAAU,IAAI;CAAM;CACrD;EAAE,OAAO;EAAmB,MAAM;EAAW,IAAI;CAAM;CACvD;EAAE,OAAO;EAAe,MAAM;EAAU,IAAI;CAAM;CAClD;EAAE,OAAO;EAAgB,MAAM;EAAU,IAAI;CAAM;CACnD;CACA;EAAE,OAAO;EAAe,MAAM;EAAU,IAAI;CAAM;CAClD;EAAE,OAAO;EAAgB,MAAM;EAAW,IAAI;CAAM;AACtD;AAgCA,SAAgB,eAAe,OAA6B;CAC1D,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,iBAAiB,MAAM,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,YAAY,OAAO;CACjC,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM;AAC3C;AAQA,SAAgB,uBAAuB,OAAgB,sBAAY,IAAI,KAAK,GAAW;CACrF,MAAM,SAAS,eAAe,KAAK;CACnC,IAAI,CAAC,QAAQ,OAAO,OAAO,UAAU,WAAW,QAAQ;CACxD,MAAM,WAAW,OAAO,eAAe,KAAA,GAAW;EAChD,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;CACV,CAAC;CACD,MAAM,WAAW,mBAAmB,QAAQ,GAAG;CAC/C,OAAO,aAAa,aAAa,WAAW,GAAG,SAAS,IAAI,SAAS;AACvE;AAEA,SAAgB,aAAa,MAAqB,YAA8C;CAC9F,QAAQ,MAAR;EACE,KAAK,YACH,OAAO;EACT,KAAK,YACH,OAAO;EACT,KAAK,QACH,OAAO;EAET,SACE,OAAO;CACX;AACF"}
|
|
1
|
+
{"version":3,"file":"timestamp-format.cjs","names":[],"sources":["../../../src/data/cells/timestamp-format.ts"],"sourcesContent":["import type { TimeRangePreset, TimeRangePresetGroup } from \"../../components/TimeRange\";\n\nexport const LAST_24_HOURS = { label: \"Last 24 hours\", from: \"now-24h\", to: \"now\" };\n\nexport const TIMESTAMP_RANGE_PRESETS: TimeRangePreset[] = [\n { label: \"Last 5 minutes\", from: \"now-5m\", to: \"now\" },\n { label: \"Last 15 minutes\", from: \"now-15m\", to: \"now\" },\n { label: \"Last 1 hour\", from: \"now-1h\", to: \"now\" },\n { label: \"Last 6 hours\", from: \"now-6h\", to: \"now\" },\n LAST_24_HOURS,\n { label: \"Last 7 days\", from: \"now-7d\", to: \"now\" },\n { label: \"Last 30 days\", from: \"now-30d\", to: \"now\" },\n];\n\nexport type TimestampMode = \"auto\" | \"absolute\" | \"relative\" | \"time\";\n\nexport type TimestampFormat = \"relative\" | \"time\" | \"short\" | \"iso\";\n\nexport type TimestampOptions = {\n /** Rendering mode for timestamp cells. */\n mode?: TimestampMode;\n /** Show the full timestamp in a tooltip even for absolute/ISO formats. */\n alwaysShowFullOnHover?: boolean;\n /**\n * When the column is on a DataTable with `autoFilter`, DataTable mounts a\n * \"Time range\" picker (matching the trace UI) and filters rows whose\n * timestamp falls outside the selected range. Set `false` to suppress.\n */\n autoRangeFilter?: boolean;\n /** Override the trace-style preset list (\"Last 15 minutes\", etc.). */\n rangePresets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n /** Enable absolute date+time input and timezone selection for range filters. */\n timeEnabled?: boolean;\n /** Default timezone used when encoding absolute date+time range values. */\n timeZone?: string;\n /** Selectable timezones shown when `timeEnabled` is true. */\n timeZones?: string[];\n /**\n * Default range applied on first render. Either side may use date-math\n * (`now-24h`, `now`) or any value parseable by `parseTimestamp`.\n */\n defaultRange?: { from?: string; to?: string };\n};\n\n// An all-digit string this long is an epoch, not a year: even in seconds nine\n// digits reach back to 1973. Shorter ones (\"2026\") stay with the date parser.\nconst EPOCH_STRING = /^\\d{9,}$/;\n\n/**\n * epochToMilliseconds names the unit of an epoch by its magnitude: below 1e12 is\n * seconds, below 1e14 milliseconds, below 1e17 microseconds, anything above\n * nanoseconds. Between 1973 and 2100 the four ranges are 3 orders of magnitude\n * apart (seconds ~1e9, ms ~1e12, µs ~1e15, ns ~1e18), so no real instant is\n * ambiguous. The seconds/milliseconds boundary at 1e12 is the one the numeric\n * branch always had; the µs and ns bands are the span-time units Jaeger and\n * OpenTelemetry store, which would otherwise read as a year tens of thousands\n * of years out.\n */\nfunction epochToMilliseconds(epoch: number): number {\n const magnitude = Math.abs(epoch);\n if (magnitude < 1e12) return epoch * 1000;\n if (magnitude < 1e14) return epoch;\n if (magnitude < 1e17) return epoch / 1e3;\n return epoch / 1e6;\n}\n\nfunction validDate(ms: number): Date | null {\n const d = new Date(ms);\n return Number.isNaN(d.getTime()) ? null : d;\n}\n\nexport function parseTimestamp(value: unknown): Date | null {\n if (value == null) return null;\n if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;\n\n if (typeof value === \"number\") return validDate(epochToMilliseconds(value));\n\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (!trimmed) return null;\n if (EPOCH_STRING.test(trimmed)) return validDate(epochToMilliseconds(Number(trimmed)));\n return validDate(new Date(trimmed).getTime());\n }\n\n return null;\n}\n\nconst UNIT_MS: Record<string, number> = {\n s: 1_000,\n m: 60_000,\n h: 3_600_000,\n d: 86_400_000,\n w: 604_800_000,\n};\n\nconst RELATIVE_PATTERN = /^now\\s*([+-])\\s*(\\d+)\\s*([smhdwMqy])$/;\nconst ANCHORED_PATTERN = /^now\\/([wMqy])(?:\\s*([+-])\\s*(\\d+)\\s*([wMqy]))?$/;\n\n/**\n * Resolves date-math strings to an absolute Date. Recognised forms:\n * - \"now\"\n * - \"now-15m\", \"now-1h\", \"now+30s\", \"now-7d\", \"now-2w\" (units: s/m/h/d/w/M/q/y)\n * - \"now/w\", \"now/M\", \"now/q\", \"now/y\" with optional calendar offsets\n * - any value parseable by `parseTimestamp` (ISO, epoch ms/s, Date)\n * The rounding forms start the period in UTC (weeks start on Monday 00:00 UTC), not in the viewer's\n * or a selected time zone. \"now/d\" is not supported (no day anchor): it is unparseable, so it\n * returns null. Returns null for unparseable input.\n */\nexport function resolveDateMath(value: unknown, now: Date = new Date()): Date | null {\n if (value == null) return null;\n\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (!trimmed) return null;\n\n if (trimmed.toLowerCase() === \"now\") return new Date(now.getTime());\n\n const anchoredMatch = trimmed.match(ANCHORED_PATTERN);\n if (anchoredMatch) {\n const [, anchor, sign, amount, unit] = anchoredMatch;\n let anchored = startOfPeriod(now, anchor!);\n if (sign && amount && unit) {\n anchored = addPeriod(anchored, unit, Number(amount) * (sign === \"-\" ? -1 : 1));\n }\n return anchored;\n }\n\n const match = trimmed.match(RELATIVE_PATTERN);\n if (match) {\n const [, sign, amount, unit] = match;\n const calendarUnit = unit!;\n if (isCalendarUnit(calendarUnit)) {\n return addPeriod(now, calendarUnit, Number(amount) * (sign === \"-\" ? -1 : 1));\n }\n const unitMs = UNIT_MS[calendarUnit.toLowerCase()];\n if (!unitMs) return null;\n const delta = Number(amount) * unitMs * (sign === \"-\" ? -1 : 1);\n return new Date(now.getTime() + delta);\n }\n }\n\n return parseTimestamp(value);\n}\n\nfunction isCalendarUnit(unit: string) {\n return unit === \"M\" || unit === \"q\" || unit === \"y\";\n}\n\nfunction startOfPeriod(date: Date, unit: string) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const day = date.getUTCDate();\n\n if (unit === \"w\") {\n const start = new Date(Date.UTC(year, month, day));\n const dayOfWeek = start.getUTCDay();\n const daysSinceMonday = (dayOfWeek + 6) % 7;\n start.setUTCDate(start.getUTCDate() - daysSinceMonday);\n return start;\n }\n if (unit === \"M\") return new Date(Date.UTC(year, month, 1));\n if (unit === \"q\") return new Date(Date.UTC(year, Math.floor(month / 3) * 3, 1));\n if (unit === \"y\") return new Date(Date.UTC(year, 0, 1));\n return new Date(date.getTime());\n}\n\nfunction addPeriod(date: Date, unit: string, amount: number) {\n const next = new Date(date.getTime());\n if (unit === \"w\") {\n next.setUTCDate(next.getUTCDate() + amount * 7);\n } else if (unit === \"M\") {\n next.setUTCMonth(next.getUTCMonth() + amount);\n } else if (unit === \"q\") {\n next.setUTCMonth(next.getUTCMonth() + amount * 3);\n } else if (unit === \"y\") {\n next.setUTCFullYear(next.getUTCFullYear() + amount);\n } else {\n const unitMs = UNIT_MS[unit.toLowerCase()];\n if (unitMs) next.setTime(next.getTime() + amount * unitMs);\n }\n return next;\n}\n\nconst MS_PER_MINUTE = 60_000;\nconst MS_PER_DAY = 86_400_000;\n\nexport function chooseTimestampFormat(values: Date[]): TimestampFormat {\n if (values.length === 0) return \"iso\";\n\n let min = Infinity;\n let max = -Infinity;\n for (const d of values) {\n const t = d.getTime();\n if (t < min) min = t;\n if (t > max) max = t;\n }\n const span = max - min;\n\n if (span <= MS_PER_MINUTE) return \"relative\";\n\n const minDate = new Date(min);\n const maxDate = new Date(max);\n\n if (\n minDate.getFullYear() === maxDate.getFullYear() &&\n minDate.getMonth() === maxDate.getMonth() &&\n minDate.getDate() === maxDate.getDate()\n ) {\n return \"time\";\n }\n\n if (minDate.getFullYear() === maxDate.getFullYear() && span <= MS_PER_DAY * 365) {\n return \"short\";\n }\n\n return \"iso\";\n}\n\nexport function formatTimestamp(\n date: Date,\n format: TimestampFormat,\n now: Date = new Date(),\n): string {\n switch (format) {\n case \"relative\":\n return formatRelativeTime(date, now);\n case \"time\":\n return date.toLocaleTimeString(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n });\n case \"short\":\n return date.toLocaleString(undefined, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n case \"iso\":\n default:\n return formatIso(date);\n }\n}\n\nfunction formatIso(date: Date): string {\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, \"0\");\n const dd = String(date.getDate()).padStart(2, \"0\");\n const hh = String(date.getHours()).padStart(2, \"0\");\n const min = String(date.getMinutes()).padStart(2, \"0\");\n return `${yyyy}-${mm}-${dd} ${hh}:${min}`;\n}\n\nexport type RelativeTimeOptions = {\n /**\n * \"phrase\" (default) reads \"30s ago\" / \"in 5m\" / \"just now\". \"token\" is the\n * list-row form — now / 5m / 2h / 3d / 4w / 1y, floored so a token never\n * claims the next unit early — for a meta line where \"ago\" is implied.\n */\n style?: \"phrase\" | \"token\";\n};\n\nconst TOKEN_UNITS: ReadonlyArray<[unit: string, seconds: number]> = [\n [\"y\", 365 * 86400],\n [\"w\", 7 * 86400],\n [\"d\", 86400],\n [\"h\", 3600],\n [\"m\", 60],\n];\n\n// formatRelativeTime renders a compact \"30s ago\" / \"in 5m\" / \"just now\" string,\n// or with style \"token\" the bare now / 5m / 2h / 3d / 4w token.\nexport function formatRelativeTime(\n date: Date,\n now: Date = new Date(),\n options: RelativeTimeOptions = {},\n): string {\n const diffMs = now.getTime() - date.getTime();\n const future = diffMs < 0;\n const abs = Math.abs(diffMs);\n if (options.style === \"token\") {\n const seconds = Math.floor(abs / 1000);\n const match = TOKEN_UNITS.find(([, size]) => seconds >= size);\n if (!match) return \"now\";\n const token = `${Math.floor(seconds / match[1])}${match[0]}`;\n return future ? `in ${token}` : token;\n }\n const sec = Math.round(abs / 1000);\n\n let value: string;\n if (sec < 1) value = \"just now\";\n else if (sec < 60) value = `${sec}s`;\n else if (sec < 3600) value = `${Math.round(sec / 60)}m`;\n else if (sec < 86400) value = `${Math.round(sec / 3600)}h`;\n else value = `${Math.round(sec / 86400)}d`;\n\n if (value === \"just now\") return value;\n return future ? `in ${value}` : `${value} ago`;\n}\n\n// formatDateTimeRelative renders a value as an absolute locale date+time plus a\n// parenthesised relative hint, e.g. \"Apr 15, 2026, 12:00 PM (2h ago)\". It is the\n// shared \"locale + relative\" presentation used for date-typed values across the\n// form, filter, and combobox surfaces. Unparseable strings pass through\n// unchanged (so a template token or freeform value is preserved); nullish input\n// yields an empty string. The hint is dropped when the value reads \"just now\".\nexport function formatDateTimeRelative(value: unknown, now: Date = new Date()): string {\n const parsed = parseTimestamp(value);\n if (!parsed) return typeof value === \"string\" ? value : \"\";\n const absolute = parsed.toLocaleString(undefined, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n const relative = formatRelativeTime(parsed, now);\n return relative === \"just now\" ? absolute : `${absolute} (${relative})`;\n}\n\nexport function modeToFormat(mode: TimestampMode, dataFormat: TimestampFormat): TimestampFormat {\n switch (mode) {\n case \"absolute\":\n return \"iso\";\n case \"relative\":\n return \"relative\";\n case \"time\":\n return \"time\";\n case \"auto\":\n default:\n return dataFormat;\n }\n}\n"],"mappings":";AAEA,IAAa,gBAAgB;CAAE,OAAO;CAAiB,MAAM;CAAW,IAAI;AAAM;AAElF,IAAa,0BAA6C;CACxD;EAAE,OAAO;EAAkB,MAAM;EAAU,IAAI;CAAM;CACrD;EAAE,OAAO;E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|
|
46
46
|
* - "now-15m", "now-1h", "now+30s", "now-7d", "now-2w" (units: s/m/h/d/w/M/q/y)
|
|
47
47
|
* - "now/w", "now/M", "now/q", "now/y" with optional calendar offsets
|
|
48
48
|
* - any value parseable by `parseTimestamp` (ISO, epoch ms/s, Date)
|
|
49
|
-
*
|
|
49
|
+
* The rounding forms start the period in UTC (weeks start on Monday 00:00 UTC), not in the viewer's
|
|
50
|
+
* or a selected time zone. "now/d" is not supported (no day anchor): it is unparseable, so it
|
|
51
|
+
* returns null. Returns null for unparseable input.
|
|
50
52
|
*/
|
|
51
53
|
export declare function resolveDateMath(value: unknown, now?: Date): Date | null;
|
|
52
54
|
export declare function chooseTimestampFormat(values: Date[]): TimestampFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp-format.d.ts","sourceRoot":"","sources":["../../../src/data/cells/timestamp-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAExF,eAAO,MAAM,aAAa;;;;CAAyD,CAAC;AAEpF,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAQpD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAA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CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C,CAAC;AA6BF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAc1D;AAaD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,GAAE,IAAiB,GAAG,IAAI,GAAG,IAAI,CAkCnF;AA4CD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,CA8BrE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,eAAe,EACvB,GAAG,GAAE,IAAiB,GACrB,MAAM,CAqBR;AAWD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC5B,CAAC;AAYF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,GAAG,GAAE,IAAiB,EACtB,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAsBR;AAQD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,CAYrF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,GAAG,eAAe,CAY9F"}
|
|
@@ -37,19 +37,37 @@ var TIMESTAMP_RANGE_PRESETS = [
|
|
|
37
37
|
to: "now"
|
|
38
38
|
}
|
|
39
39
|
];
|
|
40
|
+
var EPOCH_STRING = /^\d{9,}$/;
|
|
41
|
+
/**
|
|
42
|
+
* epochToMilliseconds names the unit of an epoch by its magnitude: below 1e12 is
|
|
43
|
+
* seconds, below 1e14 milliseconds, below 1e17 microseconds, anything above
|
|
44
|
+
* nanoseconds. Between 1973 and 2100 the four ranges are 3 orders of magnitude
|
|
45
|
+
* apart (seconds ~1e9, ms ~1e12, µs ~1e15, ns ~1e18), so no real instant is
|
|
46
|
+
* ambiguous. The seconds/milliseconds boundary at 1e12 is the one the numeric
|
|
47
|
+
* branch always had; the µs and ns bands are the span-time units Jaeger and
|
|
48
|
+
* OpenTelemetry store, which would otherwise read as a year tens of thousands
|
|
49
|
+
* of years out.
|
|
50
|
+
*/
|
|
51
|
+
function epochToMilliseconds(epoch) {
|
|
52
|
+
const magnitude = Math.abs(epoch);
|
|
53
|
+
if (magnitude < 0xe8d4a51000) return epoch * 1e3;
|
|
54
|
+
if (magnitude < 0x5af3107a4000) return epoch;
|
|
55
|
+
if (magnitude < 0x16345785d8a0000) return epoch / 1e3;
|
|
56
|
+
return epoch / 1e6;
|
|
57
|
+
}
|
|
58
|
+
function validDate(ms) {
|
|
59
|
+
const d = new Date(ms);
|
|
60
|
+
return Number.isNaN(d.getTime()) ? null : d;
|
|
61
|
+
}
|
|
40
62
|
function parseTimestamp(value) {
|
|
41
63
|
if (value == null) return null;
|
|
42
64
|
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;
|
|
43
|
-
if (typeof value === "number")
|
|
44
|
-
const ms = value < 0xe8d4a51000 ? value * 1e3 : value;
|
|
45
|
-
const d = new Date(ms);
|
|
46
|
-
return Number.isNaN(d.getTime()) ? null : d;
|
|
47
|
-
}
|
|
65
|
+
if (typeof value === "number") return validDate(epochToMilliseconds(value));
|
|
48
66
|
if (typeof value === "string") {
|
|
49
67
|
const trimmed = value.trim();
|
|
50
68
|
if (!trimmed) return null;
|
|
51
|
-
|
|
52
|
-
return
|
|
69
|
+
if (EPOCH_STRING.test(trimmed)) return validDate(epochToMilliseconds(Number(trimmed)));
|
|
70
|
+
return validDate(new Date(trimmed).getTime());
|
|
53
71
|
}
|
|
54
72
|
return null;
|
|
55
73
|
}
|
|
@@ -68,7 +86,9 @@ var ANCHORED_PATTERN = /^now\/([wMqy])(?:\s*([+-])\s*(\d+)\s*([wMqy]))?$/;
|
|
|
68
86
|
* - "now-15m", "now-1h", "now+30s", "now-7d", "now-2w" (units: s/m/h/d/w/M/q/y)
|
|
69
87
|
* - "now/w", "now/M", "now/q", "now/y" with optional calendar offsets
|
|
70
88
|
* - any value parseable by `parseTimestamp` (ISO, epoch ms/s, Date)
|
|
71
|
-
*
|
|
89
|
+
* The rounding forms start the period in UTC (weeks start on Monday 00:00 UTC), not in the viewer's
|
|
90
|
+
* or a selected time zone. "now/d" is not supported (no day anchor): it is unparseable, so it
|
|
91
|
+
* returns null. Returns null for unparseable input.
|
|
72
92
|
*/
|
|
73
93
|
function resolveDateMath(value, now = /* @__PURE__ */ new Date()) {
|
|
74
94
|
if (value == null) return null;
|