@flanksource/clicky-ui 0.3.78 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/Combobox.cjs +9 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +9 -3
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +1 -1
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.js +1 -1
- package/dist/components/ComboboxMenu.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/traces/otel/OtelTraceBrowser.cjs +18 -9
- package/dist/data/traces/otel/OtelTraceBrowser.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.js +19 -10
- package/dist/data/traces/otel/OtelTraceBrowser.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.cjs +10 -8
- package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.js +10 -8
- package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
- package/dist/data/traces/otel/QueryBar.cjs +6 -5
- package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
- package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
- package/dist/data/traces/otel/QueryBar.js +6 -5
- package/dist/data/traces/otel/QueryBar.js.map +1 -1
- package/dist/data/traces/otel/browser-state.cjs +17 -4
- package/dist/data/traces/otel/browser-state.cjs.map +1 -1
- package/dist/data/traces/otel/browser-state.d.ts +2 -1
- package/dist/data/traces/otel/browser-state.d.ts.map +1 -1
- package/dist/data/traces/otel/browser-state.js +17 -4
- package/dist/data/traces/otel/browser-state.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -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/index.cjs +6 -5
- package/dist/index.js +7 -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 +106 -37
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +107 -38
- 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 +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
- 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 +8 -6
- 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 +9 -7
- 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 +3 -3
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +3 -3
- 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 +4982 -4979
- package/dist/runtime/importmap.json +2168 -2146
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-types.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,mBAAmB,kCAAkC,CAAC;AACtD,mBAAmB,mCAAmC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AE,YAAY,CAAC;IAE5B,QAAQ,CAAC,EAAE,aAAa,CAAC;IAGzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,gBAAgB,CAAC;IAG3E,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,aAAa,CAAC;IAGrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,IAAI,CAAC,EAAE,SAAS,CAAC;IAGjB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAG5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const require_hostEvaluation = require("../expressions/playground/hostEvaluation.cjs");
|
|
2
|
+
// src/components/jsonPathPlaygroundEvaluator.ts
|
|
3
|
+
function typeName(value) {
|
|
4
|
+
if (value === null) return "null";
|
|
5
|
+
return Array.isArray(value) ? "array" : typeof value;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Evaluates the playground's input as one row, on the evaluator the field was
|
|
9
|
+
* given — the backend that will read the path for real, not a browser stand-in.
|
|
10
|
+
*
|
|
11
|
+
* One match answers as itself and several as the list of them, which is how the
|
|
12
|
+
* dialog always presented a result; none answers an empty result, so the
|
|
13
|
+
* samples view calls a path that selects nothing "empty" rather than "valid".
|
|
14
|
+
*/
|
|
15
|
+
function jsonPathPlaygroundEvaluator({ evaluate, root, onEvaluated }) {
|
|
16
|
+
return async ({ source, input = "" }) => {
|
|
17
|
+
if (!evaluate) return require_hostEvaluation.evalFailure("This field has no JSONPath evaluator, so a path can be picked from the object graph but not previewed.");
|
|
18
|
+
const parsed = require_hostEvaluation.parseInputDocument(input);
|
|
19
|
+
if ("error" in parsed) return require_hostEvaluation.evalFailure(parsed.error);
|
|
20
|
+
const column = root();
|
|
21
|
+
const started = performance.now();
|
|
22
|
+
let result;
|
|
23
|
+
try {
|
|
24
|
+
result = await evaluate({
|
|
25
|
+
jsonpath: source,
|
|
26
|
+
...column === void 0 ? {} : { source: column },
|
|
27
|
+
row: parsed.value
|
|
28
|
+
});
|
|
29
|
+
} catch (cause) {
|
|
30
|
+
return require_hostEvaluation.evalFailure(`The JSONPath evaluator failed: ${cause.message}`);
|
|
31
|
+
}
|
|
32
|
+
const durationMs = performance.now() - started;
|
|
33
|
+
onEvaluated?.(result);
|
|
34
|
+
if (result.error) return {
|
|
35
|
+
...require_hostEvaluation.evalFailure(result.error),
|
|
36
|
+
durationMs
|
|
37
|
+
};
|
|
38
|
+
if (result.count === 0) return {
|
|
39
|
+
result: "",
|
|
40
|
+
durationMs
|
|
41
|
+
};
|
|
42
|
+
const value = result.count === 1 ? result.matches[0] : result.matches;
|
|
43
|
+
return {
|
|
44
|
+
result: require_hostEvaluation.resultText(value),
|
|
45
|
+
value,
|
|
46
|
+
type: typeName(value),
|
|
47
|
+
durationMs
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.jsonPathPlaygroundEvaluator = jsonPathPlaygroundEvaluator;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=jsonPathPlaygroundEvaluator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonPathPlaygroundEvaluator.cjs","names":["evalFailure","parseInputDocument","resultText"],"sources":["../../src/components/jsonPathPlaygroundEvaluator.ts"],"sourcesContent":["import type { EvalRequest, EvalResponse } from \"../expressions/playground/api.ts\";\nimport { evalFailure, parseInputDocument, resultText } from \"../expressions/playground/hostEvaluation.ts\";\nimport type { JSONPathEvalRequest, JSONPathEvalResult } from \"./JSONPathPlayground\";\n\nexport interface JSONPathPlaygroundEvaluatorOptions {\n /** The field's evaluator; absent where the field can only browse. */\n evaluate: ((request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>) | undefined;\n /**\n * The column the path is rooted at, read when each evaluation starts: picking\n * a node out of a JSON-encoded column changes it between two runs.\n */\n root: () => string | undefined;\n /** Sees each evaluation as the field's evaluator answered it. */\n onEvaluated?: (result: JSONPathEvalResult) => void;\n}\n\nfunction typeName(value: unknown): string {\n if (value === null) return \"null\";\n return Array.isArray(value) ? \"array\" : typeof value;\n}\n\n/**\n * Evaluates the playground's input as one row, on the evaluator the field was\n * given — the backend that will read the path for real, not a browser stand-in.\n *\n * One match answers as itself and several as the list of them, which is how the\n * dialog always presented a result; none answers an empty result, so the\n * samples view calls a path that selects nothing \"empty\" rather than \"valid\".\n */\nexport function jsonPathPlaygroundEvaluator({\n evaluate,\n root,\n onEvaluated,\n}: JSONPathPlaygroundEvaluatorOptions): (request: EvalRequest) => Promise<EvalResponse> {\n return async ({ source, input = \"\" }) => {\n if (!evaluate) {\n return evalFailure(\n \"This field has no JSONPath evaluator, so a path can be picked from the object graph but not previewed.\",\n );\n }\n const parsed = parseInputDocument(input);\n if (\"error\" in parsed) return evalFailure(parsed.error);\n\n const column = root();\n const started = performance.now();\n let result: JSONPathEvalResult;\n try {\n result = await evaluate({ jsonpath: source, ...(column === undefined ? {} : { source: column }), row: parsed.value });\n } catch (cause) {\n return evalFailure(`The JSONPath evaluator failed: ${(cause as Error).message}`);\n }\n const durationMs = performance.now() - started;\n onEvaluated?.(result);\n\n if (result.error) return { ...evalFailure(result.error), durationMs };\n if (result.count === 0) return { result: \"\", durationMs };\n\n const value = result.count === 1 ? result.matches[0] : result.matches;\n return { result: resultText(value), value, type: typeName(value), durationMs };\n };\n}\n"],"mappings":";;AAgBA,SAAS,SAAS,OAAwB;CACxC,IAAI,UAAU,MAAM,OAAO;CAC3B,OAAO,MAAM,QAAQ,KAAK,IAAI,UAAU,OAAO;AACjD;;;;;;;;;AAUA,SAAgB,4BAA4B,EAC1C,UACA,MACA,eACsF;CACtF,OAAO,OAAO,EAAE,QAAQ,QAAQ,SAAS;EACvC,IAAI,CAAC,UACH,OAAOA,uBAAAA,YACL,wGACF;EAEF,MAAM,SAASC,uBAAAA,mBAAmB,KAAK;EACvC,IAAI,WAAW,QAAQ,OAAOD,uBAAAA,YAAY,OAAO,KAAK;EAEtD,MAAM,SAAS,KAAK;EACpB,MAAM,UAAU,YAAY,IAAI;EAChC,IAAI;EACJ,IAAI;GACF,SAAS,MAAM,SAAS;IAAE,UAAU;IAAQ,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,OAAO;IAAI,KAAK,OAAO;GAAM,CAAC;EACtH,SAAS,OAAO;GACd,OAAOA,uBAAAA,YAAY,kCAAmC,MAAgB,SAAS;EACjF;EACA,MAAM,aAAa,YAAY,IAAI,IAAI;EACvC,cAAc,MAAM;EAEpB,IAAI,OAAO,OAAO,OAAO;GAAE,GAAGA,uBAAAA,YAAY,OAAO,KAAK;GAAG;EAAW;EACpE,IAAI,OAAO,UAAU,GAAG,OAAO;GAAE,QAAQ;GAAI;EAAW;EAExD,MAAM,QAAQ,OAAO,UAAU,IAAI,OAAO,QAAQ,KAAK,OAAO;EAC9D,OAAO;GAAE,QAAQE,uBAAAA,WAAW,KAAK;GAAG;GAAO,MAAM,SAAS,KAAK;GAAG;EAAW;CAC/E;AACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EvalRequest, EvalResponse } from '../expressions/playground/api.js';
|
|
2
|
+
import { JSONPathEvalRequest, JSONPathEvalResult } from './JSONPathPlayground.js';
|
|
3
|
+
export interface JSONPathPlaygroundEvaluatorOptions {
|
|
4
|
+
/** The field's evaluator; absent where the field can only browse. */
|
|
5
|
+
evaluate: ((request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>) | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The column the path is rooted at, read when each evaluation starts: picking
|
|
8
|
+
* a node out of a JSON-encoded column changes it between two runs.
|
|
9
|
+
*/
|
|
10
|
+
root: () => string | undefined;
|
|
11
|
+
/** Sees each evaluation as the field's evaluator answered it. */
|
|
12
|
+
onEvaluated?: (result: JSONPathEvalResult) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Evaluates the playground's input as one row, on the evaluator the field was
|
|
16
|
+
* given — the backend that will read the path for real, not a browser stand-in.
|
|
17
|
+
*
|
|
18
|
+
* One match answers as itself and several as the list of them, which is how the
|
|
19
|
+
* dialog always presented a result; none answers an empty result, so the
|
|
20
|
+
* samples view calls a path that selects nothing "empty" rather than "valid".
|
|
21
|
+
*/
|
|
22
|
+
export declare function jsonPathPlaygroundEvaluator({ evaluate, root, onEvaluated, }: JSONPathPlaygroundEvaluatorOptions): (request: EvalRequest) => Promise<EvalResponse>;
|
|
23
|
+
//# sourceMappingURL=jsonPathPlaygroundEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonPathPlaygroundEvaluator.d.ts","sourceRoot":"","sources":["../../src/components/jsonPathPlaygroundEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,MAAM,WAAW,kCAAkC;IACjD,qEAAqE;IACrE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,SAAS,CAAC;IACtF;;;OAGG;IACH,IAAI,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC/B,iEAAiE;IACjE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACpD;AAOD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,WAAW,GACZ,EAAE,kCAAkC,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CA2BtF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { evalFailure, parseInputDocument, resultText } from "../expressions/playground/hostEvaluation.js";
|
|
2
|
+
// src/components/jsonPathPlaygroundEvaluator.ts
|
|
3
|
+
function typeName(value) {
|
|
4
|
+
if (value === null) return "null";
|
|
5
|
+
return Array.isArray(value) ? "array" : typeof value;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Evaluates the playground's input as one row, on the evaluator the field was
|
|
9
|
+
* given — the backend that will read the path for real, not a browser stand-in.
|
|
10
|
+
*
|
|
11
|
+
* One match answers as itself and several as the list of them, which is how the
|
|
12
|
+
* dialog always presented a result; none answers an empty result, so the
|
|
13
|
+
* samples view calls a path that selects nothing "empty" rather than "valid".
|
|
14
|
+
*/
|
|
15
|
+
function jsonPathPlaygroundEvaluator({ evaluate, root, onEvaluated }) {
|
|
16
|
+
return async ({ source, input = "" }) => {
|
|
17
|
+
if (!evaluate) return evalFailure("This field has no JSONPath evaluator, so a path can be picked from the object graph but not previewed.");
|
|
18
|
+
const parsed = parseInputDocument(input);
|
|
19
|
+
if ("error" in parsed) return evalFailure(parsed.error);
|
|
20
|
+
const column = root();
|
|
21
|
+
const started = performance.now();
|
|
22
|
+
let result;
|
|
23
|
+
try {
|
|
24
|
+
result = await evaluate({
|
|
25
|
+
jsonpath: source,
|
|
26
|
+
...column === void 0 ? {} : { source: column },
|
|
27
|
+
row: parsed.value
|
|
28
|
+
});
|
|
29
|
+
} catch (cause) {
|
|
30
|
+
return evalFailure(`The JSONPath evaluator failed: ${cause.message}`);
|
|
31
|
+
}
|
|
32
|
+
const durationMs = performance.now() - started;
|
|
33
|
+
onEvaluated?.(result);
|
|
34
|
+
if (result.error) return {
|
|
35
|
+
...evalFailure(result.error),
|
|
36
|
+
durationMs
|
|
37
|
+
};
|
|
38
|
+
if (result.count === 0) return {
|
|
39
|
+
result: "",
|
|
40
|
+
durationMs
|
|
41
|
+
};
|
|
42
|
+
const value = result.count === 1 ? result.matches[0] : result.matches;
|
|
43
|
+
return {
|
|
44
|
+
result: resultText(value),
|
|
45
|
+
value,
|
|
46
|
+
type: typeName(value),
|
|
47
|
+
durationMs
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export { jsonPathPlaygroundEvaluator };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=jsonPathPlaygroundEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonPathPlaygroundEvaluator.js","names":[],"sources":["../../src/components/jsonPathPlaygroundEvaluator.ts"],"sourcesContent":["import type { EvalRequest, EvalResponse } from \"../expressions/playground/api.ts\";\nimport { evalFailure, parseInputDocument, resultText } from \"../expressions/playground/hostEvaluation.ts\";\nimport type { JSONPathEvalRequest, JSONPathEvalResult } from \"./JSONPathPlayground\";\n\nexport interface JSONPathPlaygroundEvaluatorOptions {\n /** The field's evaluator; absent where the field can only browse. */\n evaluate: ((request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>) | undefined;\n /**\n * The column the path is rooted at, read when each evaluation starts: picking\n * a node out of a JSON-encoded column changes it between two runs.\n */\n root: () => string | undefined;\n /** Sees each evaluation as the field's evaluator answered it. */\n onEvaluated?: (result: JSONPathEvalResult) => void;\n}\n\nfunction typeName(value: unknown): string {\n if (value === null) return \"null\";\n return Array.isArray(value) ? \"array\" : typeof value;\n}\n\n/**\n * Evaluates the playground's input as one row, on the evaluator the field was\n * given — the backend that will read the path for real, not a browser stand-in.\n *\n * One match answers as itself and several as the list of them, which is how the\n * dialog always presented a result; none answers an empty result, so the\n * samples view calls a path that selects nothing \"empty\" rather than \"valid\".\n */\nexport function jsonPathPlaygroundEvaluator({\n evaluate,\n root,\n onEvaluated,\n}: JSONPathPlaygroundEvaluatorOptions): (request: EvalRequest) => Promise<EvalResponse> {\n return async ({ source, input = \"\" }) => {\n if (!evaluate) {\n return evalFailure(\n \"This field has no JSONPath evaluator, so a path can be picked from the object graph but not previewed.\",\n );\n }\n const parsed = parseInputDocument(input);\n if (\"error\" in parsed) return evalFailure(parsed.error);\n\n const column = root();\n const started = performance.now();\n let result: JSONPathEvalResult;\n try {\n result = await evaluate({ jsonpath: source, ...(column === undefined ? {} : { source: column }), row: parsed.value });\n } catch (cause) {\n return evalFailure(`The JSONPath evaluator failed: ${(cause as Error).message}`);\n }\n const durationMs = performance.now() - started;\n onEvaluated?.(result);\n\n if (result.error) return { ...evalFailure(result.error), durationMs };\n if (result.count === 0) return { result: \"\", durationMs };\n\n const value = result.count === 1 ? result.matches[0] : result.matches;\n return { result: resultText(value), value, type: typeName(value), durationMs };\n };\n}\n"],"mappings":";;AAgBA,SAAS,SAAS,OAAwB;CACxC,IAAI,UAAU,MAAM,OAAO;CAC3B,OAAO,MAAM,QAAQ,KAAK,IAAI,UAAU,OAAO;AACjD;;;;;;;;;AAUA,SAAgB,4BAA4B,EAC1C,UACA,MACA,eACsF;CACtF,OAAO,OAAO,EAAE,QAAQ,QAAQ,SAAS;EACvC,IAAI,CAAC,UACH,OAAO,YACL,wGACF;EAEF,MAAM,SAAS,mBAAmB,KAAK;EACvC,IAAI,WAAW,QAAQ,OAAO,YAAY,OAAO,KAAK;EAEtD,MAAM,SAAS,KAAK;EACpB,MAAM,UAAU,YAAY,IAAI;EAChC,IAAI;EACJ,IAAI;GACF,SAAS,MAAM,SAAS;IAAE,UAAU;IAAQ,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,OAAO;IAAI,KAAK,OAAO;GAAM,CAAC;EACtH,SAAS,OAAO;GACd,OAAO,YAAY,kCAAmC,MAAgB,SAAS;EACjF;EACA,MAAM,aAAa,YAAY,IAAI,IAAI;EACvC,cAAc,MAAM;EAEpB,IAAI,OAAO,OAAO,OAAO;GAAE,GAAG,YAAY,OAAO,KAAK;GAAG;EAAW;EACpE,IAAI,OAAO,UAAU,GAAG,OAAO;GAAE,QAAQ;GAAI;EAAW;EAExD,MAAM,QAAQ,OAAO,UAAU,IAAI,OAAO,QAAQ,KAAK,OAAO;EAC9D,OAAO;GAAE,QAAQ,WAAW,KAAK;GAAG;GAAO,MAAM,SAAS,KAAK;GAAG;EAAW;CAC/E;AACF"}
|
|
@@ -149,6 +149,7 @@ function createLazyJSONPathTree(json, options = {}) {
|
|
|
149
149
|
roots: json === void 0 ? [] : [rootNode],
|
|
150
150
|
getChildren: (node) => node.children,
|
|
151
151
|
hasMoreChildren: (node) => node.children === void 0 && expandable(node),
|
|
152
|
+
expandable,
|
|
152
153
|
loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),
|
|
153
154
|
materializePath: (expression) => {
|
|
154
155
|
const segments = literalSegments(expression);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonPathTree.cjs","names":[],"sources":["../../src/components/jsonPathTree.ts"],"sourcesContent":["// The JSON→JSONPath tree model shared by the inline picker dropdown and the\n// full playground dialog.\n//\n// The two want opposite things from the same walk. The dropdown is a *preview*\n// of a row that has to render the instant it opens, so it builds eagerly and\n// pays for that with caps: depth, property count, and one array element. The\n// playground is a *browser* of the row, so it must have no caps at all — which\n// is only affordable if the walk is lazy, materialising a level at a time as the\n// operator opens it.\n\nconst SIMPLE_PROPERTY = /^[A-Za-z_$][A-Za-z0-9_$]*$/;\n\nexport const DEFAULT_MAX_DEPTH = 12;\nexport const DEFAULT_MAX_OBJECT_PROPERTIES = 100;\n/**\n * Entries the uncapped tree renders under one node before it stops and says so.\n *\n * Depth is what the playground removes the limit on; breadth still has to render\n * as DOM rows the moment a node opens, and a hundred-thousand-element array\n * would take the tab down. The remainder is reported in a visible row rather\n * than dropped quietly — an index past it is still reachable by typing it.\n */\nexport const DEFAULT_MAX_CHILDREN = 1000;\n\nexport type JSONPathNodeKind = \"array\" | \"object\" | \"scalar\" | \"more\";\n\nexport interface JSONPathNode {\n key: string;\n path: string;\n value: unknown;\n kind: JSONPathNodeKind;\n summary: string;\n children?: JSONPathNode[];\n /**\n * The top-level column this node's path is rooted at, set only inside a\n * subtree decoded out of a JSON-encoded string. Such a path cannot be read\n * from the row directly — the backend reaches it by way of the column's\n * `source`, so the two have to be committed together.\n */\n root?: string;\n /**\n * The JSON-in-a-string boundaries crossed on the way down to this node,\n * innermost first. `root` names only the top-level column, because that is\n * what the backend's `source` takes — which loses the rest of the chain when\n * the encoded value is nested, and says nothing about what it decoded to.\n * A caller rebuilding an accessor needs both.\n */\n origin?: JSONPathOrigin;\n /** Number of entries the node holds, before any paging. */\n childCount: number;\n}\n\n/** One JSON-in-a-string boundary: where it was, and what came out of it. */\nexport interface JSONPathOrigin {\n /** Path of the string node the document was decoded out of, in its own scope. */\n path: string;\n /** Kind of the decoded document — which decoder crosses this boundary. */\n kind: \"array\" | \"object\";\n /** The boundary enclosing this one, when JSON is encoded inside JSON. */\n outer?: JSONPathOrigin;\n}\n\nexport interface BuildJSONPathNodeOptions {\n maxDepth?: number;\n maxObjectProperties?: number;\n /** \"first\" exposes only element [0] of an array; \"all\" exposes every element. */\n arrayMode?: \"first\" | \"all\";\n}\n\nexport function jsonPathKind(value: unknown): JSONPathNodeKind {\n if (Array.isArray(value)) return \"array\";\n return value !== null && typeof value === \"object\" ? \"object\" : \"scalar\";\n}\n\nexport function appendJSONPath(path: string, key: string | number): string {\n if (typeof key === \"number\") return `${path}[${key}]`;\n return SIMPLE_PROPERTY.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;\n}\n\nexport function summarizeJSON(value: unknown): string {\n if (Array.isArray(value)) return `[${value.length} item${value.length === 1 ? \"\" : \"s\"}]`;\n if (value !== null && typeof value === \"object\") {\n const count = Object.keys(value).length;\n return `{${count} ${count === 1 ? \"property\" : \"properties\"}}`;\n }\n if (typeof value === \"string\") return JSON.stringify(value.length > 80 ? `${value.slice(0, 77)}…` : value);\n return String(value);\n}\n\nfunction entryCount(value: unknown): number {\n if (Array.isArray(value)) return value.length;\n if (value !== null && typeof value === \"object\") return Object.keys(value).length;\n return 0;\n}\n\n/**\n * The eager, capped walk behind the inline dropdown. Deep, wide, or long values\n * are truncated on purpose: the dropdown opens on a click and cannot afford to\n * walk an arbitrary document first.\n */\nexport function buildJSONPathNode(\n value: unknown,\n path: string,\n depth: number,\n options: BuildJSONPathNodeOptions = {},\n): JSONPathNode {\n const {\n maxDepth = DEFAULT_MAX_DEPTH,\n maxObjectProperties = DEFAULT_MAX_OBJECT_PROPERTIES,\n arrayMode = \"first\",\n } = options;\n const kind = jsonPathKind(value);\n const node: JSONPathNode = {\n key: path,\n path,\n value,\n kind,\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (kind === \"scalar\" || depth >= maxDepth) return node;\n const entries = Array.isArray(value)\n ? arrayMode === \"all\"\n ? value.map((entry, index) => [index, entry] as const)\n : value.length > 0\n ? [[0, value[0]] as const]\n : []\n : Object.entries(value as Record<string, unknown>).slice(0, maxObjectProperties);\n node.children = entries.map(([key, child]) =>\n buildJSONPathNode(child, appendJSONPath(path, key), depth + 1, options),\n );\n return node;\n}\n\nexport interface LazyJSONPathTreeOptions {\n maxChildren?: number;\n /**\n * Namespaces every node key. Two trees over different documents share their\n * paths, and Tree keys its React elements by node key — without a distinct\n * prefix, swapping the document underneath reuses the old subtree along with\n * the children it had already loaded.\n */\n keyPrefix?: string;\n /**\n * Descend into a string that parses as JSON. Providers routinely hand back a\n * document as an encoded column, and the backend already decodes one when a\n * column names it as its `source` — without this the picker shows the single\n * most interesting column in such a row as an opaque blob.\n */\n parseEmbeddedJSON?: boolean;\n}\n\nexport interface LazyJSONPathTree {\n roots: JSONPathNode[];\n /** Children already materialised, or undefined while the branch is unopened. */\n getChildren: (node: JSONPathNode) => JSONPathNode[] | undefined;\n hasMoreChildren: (node: JSONPathNode) => boolean;\n loadChildren: (node: JSONPathNode) => Promise<JSONPathNode[]>;\n /**\n * Materialise the branch a literal expression addresses and return its node,\n * so a tree can reveal the value it opened with. Returns undefined for an\n * expression that selects rather than addresses (a wildcard, a descent, a\n * filter) or for one the document does not carry.\n */\n materializePath: (expression: string) => JSONPathNode | undefined;\n}\n\n/**\n * An uncapped tree over `json`: every property, every array element, any depth.\n *\n * Nothing is walked until it is opened, so an arbitrarily deep or wide document\n * costs only what the operator actually looks at. Nodes are cached by path so\n * re-opening a branch returns the *same objects* — `TreeNode` compares the\n * selected node by identity, and a rebuilt node would silently lose the\n * highlight.\n */\nexport function createLazyJSONPathTree(\n json: unknown,\n options: LazyJSONPathTreeOptions = {},\n): LazyJSONPathTree {\n const { maxChildren = DEFAULT_MAX_CHILDREN, parseEmbeddedJSON = true, keyPrefix = \"\" } = options;\n const nodes = new Map<string, JSONPathNode>();\n\n // hasMoreChildren runs on every render of every visible row, so the decode is\n // memoised per node rather than re-parsing a long string each time.\n const decoded = new Map<string, unknown>();\n\n function embedded(node: JSONPathNode): unknown {\n if (!parseEmbeddedJSON || typeof node.value !== \"string\") return undefined;\n if (decoded.has(node.key)) return decoded.get(node.key);\n const text = node.value.trim();\n let parsed: unknown = undefined;\n if (text.startsWith(\"{\") || text.startsWith(\"[\")) {\n try {\n const candidate: unknown = JSON.parse(text);\n if (jsonPathKind(candidate) !== \"scalar\") parsed = candidate;\n } catch {\n parsed = undefined;\n }\n }\n decoded.set(node.key, parsed);\n return parsed;\n }\n\n // What a node's children are drawn from: its own value, or the document\n // decoded out of it when it holds JSON as text. An embedded document restarts\n // at `$` because that is where the backend evaluates it from once the column\n // is named as a `source`.\n function contents(node: JSONPathNode): {\n value: unknown;\n path: string;\n root?: string;\n origin?: JSONPathOrigin;\n } {\n const inner = embedded(node);\n const scope: { value: unknown; path: string; root?: string; origin?: JSONPathOrigin } =\n inner === undefined\n ? { value: node.value, path: node.path }\n : { value: inner, path: \"$\" };\n const root = inner === undefined ? node.root : node.root ?? sourceColumn(node.path);\n if (root !== undefined) scope.root = root;\n // A boundary is only visible here: this is the one place that knows both\n // which node held the text and what the text decoded to. embedded() has\n // already rejected anything scalar, so the kind is array or object.\n const origin =\n inner === undefined\n ? node.origin\n : {\n path: node.path,\n kind: jsonPathKind(inner) as \"array\" | \"object\",\n ...(node.origin ? { outer: node.origin } : {}),\n };\n if (origin !== undefined) scope.origin = origin;\n return scope;\n }\n\n function node(\n value: unknown,\n path: string,\n key: string,\n root: string | undefined,\n origin: JSONPathOrigin | undefined,\n ): JSONPathNode {\n const cached = nodes.get(key);\n if (cached) return cached;\n const created: JSONPathNode = {\n key,\n path,\n value,\n kind: jsonPathKind(value),\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (root !== undefined) created.root = root;\n if (origin !== undefined) created.origin = origin;\n nodes.set(key, created);\n return created;\n }\n\n function entriesOf(value: unknown): Array<readonly [string | number, unknown]> {\n if (Array.isArray(value)) return value.map((entry, index) => [index, entry] as const);\n if (value !== null && typeof value === \"object\") return Object.entries(value as Record<string, unknown>);\n return [];\n }\n\n function materializeChildren(parent: JSONPathNode): JSONPathNode[] {\n if (parent.children) return parent.children;\n const scope = contents(parent);\n const entries = entriesOf(scope.value);\n const limit = Math.min(entries.length, maxChildren);\n const children = entries.slice(0, limit).map(([key, value]) => {\n const path = appendJSONPath(scope.path, key);\n // The key namespaces on the parent so an embedded document — which\n // restarts its paths at `$` — cannot collide with the outer row.\n return node(value, path, `${parent.key}>${path}`, scope.root, scope.origin);\n });\n if (limit < entries.length) {\n children.push({\n key: `${parent.key}>…`,\n path: scope.path,\n value: undefined,\n kind: \"more\",\n summary: `${entries.length - limit} more not shown — address them by index`,\n childCount: entries.length - limit,\n });\n }\n parent.children = children;\n return children;\n }\n\n function expandable(node: JSONPathNode): boolean {\n if (node.kind === \"more\") return false;\n if (node.kind !== \"scalar\") return node.childCount > 0;\n const inner = embedded(node);\n return inner !== undefined && entryCount(inner) > 0;\n }\n\n const rootNode = node(json, \"$\", `${keyPrefix}$`, undefined, undefined);\n\n return {\n roots: json === undefined ? [] : [rootNode],\n getChildren: (node) => node.children,\n hasMoreChildren: (node) => node.children === undefined && expandable(node),\n loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),\n materializePath: (expression) => {\n const segments = literalSegments(expression);\n if (!segments) return undefined;\n let current = rootNode;\n for (const segment of segments) {\n const target = appendJSONPath(contents(current).path, segment);\n const next = materializeChildren(current).find((child) => child.path === target);\n if (!next) return undefined;\n current = next;\n }\n return current;\n },\n };\n}\n\n/** The top-level column a row-rooted path starts at, e.g. `$.payload.x` → `payload`. */\nfunction sourceColumn(path: string): string | undefined {\n return literalSegments(path)?.slice(0, 1).map(String)[0];\n}\n\n/**\n * The literal key/index chain an expression addresses, or undefined when it\n * selects instead — a wildcard, a descent, or a filter matches a set whose shape\n * depends on the document, so there is no single branch to walk to.\n */\nexport function literalSegments(expression: string): Array<string | number> | undefined {\n let rest = expression.trim();\n if (rest === \"\") return undefined;\n if (!rest.startsWith(\"$\")) return undefined;\n rest = rest.slice(1);\n const segments: Array<string | number> = [];\n while (rest.length > 0) {\n if (rest.startsWith(\"..\")) return undefined;\n if (rest.startsWith(\".\")) {\n const match = /^\\.([A-Za-z_$][A-Za-z0-9_$]*)/.exec(rest);\n if (!match) return undefined;\n segments.push(match[1]!);\n rest = rest.slice(match[0].length);\n continue;\n }\n if (rest.startsWith(\"[\")) {\n const close = rest.indexOf(\"]\");\n if (close < 0) return undefined;\n const inner = rest.slice(1, close).trim();\n if (/^\\d+$/.test(inner)) segments.push(Number(inner));\n else if (/^\"(?:[^\"\\\\]|\\\\.)*\"$/.test(inner)) segments.push(JSON.parse(inner) as string);\n else if (/^'[^']*'$/.test(inner)) segments.push(inner.slice(1, -1));\n else return undefined;\n rest = rest.slice(close + 1);\n continue;\n }\n return undefined;\n }\n return segments;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AAC;AACxD;;;;;;AAOA,SAAgB,gBAAgB,YAAwD;CACtF,IAAI,OAAO,WAAW,KAAK;CAC3B,IAAI,SAAS,IAAI,OAAO,KAAA;CACxB,IAAI,CAAC,KAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CAClC,OAAO,KAAK,MAAM,CAAC;CACnB,MAAM,WAAmC,CAAC;CAC1C,OAAO,KAAK,SAAS,GAAG;EACtB,IAAI,KAAK,WAAW,IAAI,GAAG,OAAO,KAAA;EAClC,IAAI,KAAK,WAAW,GAAG,GAAG;GACxB,MAAM,QAAQ,gCAAgC,KAAK,IAAI;GACvD,IAAI,CAAC,OAAO,OAAO,KAAA;GACnB,SAAS,KAAK,MAAM,EAAG;GACvB,OAAO,KAAK,MAAM,MAAM,EAAE,CAAC,MAAM;GACjC;EACF;EACA,IAAI,KAAK,WAAW,GAAG,GAAG;GACxB,MAAM,QAAQ,KAAK,QAAQ,GAAG;GAC9B,IAAI,QAAQ,GAAG,OAAO,KAAA;GACtB,MAAM,QAAQ,KAAK,MAAM,GAAG,KAAK,CAAC,CAAC,KAAK;GACxC,IAAI,QAAQ,KAAK,KAAK,GAAG,SAAS,KAAK,OAAO,KAAK,CAAC;QAC/C,IAAI,sBAAsB,KAAK,KAAK,GAAG,SAAS,KAAK,KAAK,MAAM,KAAK,CAAW;QAChF,IAAI,YAAY,KAAK,KAAK,GAAG,SAAS,KAAK,MAAM,MAAM,GAAG,EAAE,CAAC;QAC7D,OAAO,KAAA;GACZ,OAAO,KAAK,MAAM,QAAQ,CAAC;GAC3B;EACF;EACA;CACF;CACA,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"jsonPathTree.cjs","names":[],"sources":["../../src/components/jsonPathTree.ts"],"sourcesContent":["// The JSON→JSONPath tree model shared by the inline picker dropdown and the\n// full playground dialog.\n//\n// The two want opposite things from the same walk. The dropdown is a *preview*\n// of a row that has to render the instant it opens, so it builds eagerly and\n// pays for that with caps: depth, property count, and one array element. The\n// playground is a *browser* of the row, so it must have no caps at all — which\n// is only affordable if the walk is lazy, materialising a level at a time as the\n// operator opens it.\n\nconst SIMPLE_PROPERTY = /^[A-Za-z_$][A-Za-z0-9_$]*$/;\n\nexport const DEFAULT_MAX_DEPTH = 12;\nexport const DEFAULT_MAX_OBJECT_PROPERTIES = 100;\n/**\n * Entries the uncapped tree renders under one node before it stops and says so.\n *\n * Depth is what the playground removes the limit on; breadth still has to render\n * as DOM rows the moment a node opens, and a hundred-thousand-element array\n * would take the tab down. The remainder is reported in a visible row rather\n * than dropped quietly — an index past it is still reachable by typing it.\n */\nexport const DEFAULT_MAX_CHILDREN = 1000;\n\nexport type JSONPathNodeKind = \"array\" | \"object\" | \"scalar\" | \"more\";\n\nexport interface JSONPathNode {\n key: string;\n path: string;\n value: unknown;\n kind: JSONPathNodeKind;\n summary: string;\n children?: JSONPathNode[];\n /**\n * The top-level column this node's path is rooted at, set only inside a\n * subtree decoded out of a JSON-encoded string. Such a path cannot be read\n * from the row directly — the backend reaches it by way of the column's\n * `source`, so the two have to be committed together.\n */\n root?: string;\n /**\n * The JSON-in-a-string boundaries crossed on the way down to this node,\n * innermost first. `root` names only the top-level column, because that is\n * what the backend's `source` takes — which loses the rest of the chain when\n * the encoded value is nested, and says nothing about what it decoded to.\n * A caller rebuilding an accessor needs both.\n */\n origin?: JSONPathOrigin;\n /** Number of entries the node holds, before any paging. */\n childCount: number;\n}\n\n/** One JSON-in-a-string boundary: where it was, and what came out of it. */\nexport interface JSONPathOrigin {\n /** Path of the string node the document was decoded out of, in its own scope. */\n path: string;\n /** Kind of the decoded document — which decoder crosses this boundary. */\n kind: \"array\" | \"object\";\n /** The boundary enclosing this one, when JSON is encoded inside JSON. */\n outer?: JSONPathOrigin;\n}\n\nexport interface BuildJSONPathNodeOptions {\n maxDepth?: number;\n maxObjectProperties?: number;\n /** \"first\" exposes only element [0] of an array; \"all\" exposes every element. */\n arrayMode?: \"first\" | \"all\";\n}\n\nexport function jsonPathKind(value: unknown): JSONPathNodeKind {\n if (Array.isArray(value)) return \"array\";\n return value !== null && typeof value === \"object\" ? \"object\" : \"scalar\";\n}\n\nexport function appendJSONPath(path: string, key: string | number): string {\n if (typeof key === \"number\") return `${path}[${key}]`;\n return SIMPLE_PROPERTY.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;\n}\n\nexport function summarizeJSON(value: unknown): string {\n if (Array.isArray(value)) return `[${value.length} item${value.length === 1 ? \"\" : \"s\"}]`;\n if (value !== null && typeof value === \"object\") {\n const count = Object.keys(value).length;\n return `{${count} ${count === 1 ? \"property\" : \"properties\"}}`;\n }\n if (typeof value === \"string\") return JSON.stringify(value.length > 80 ? `${value.slice(0, 77)}…` : value);\n return String(value);\n}\n\nfunction entryCount(value: unknown): number {\n if (Array.isArray(value)) return value.length;\n if (value !== null && typeof value === \"object\") return Object.keys(value).length;\n return 0;\n}\n\n/**\n * The eager, capped walk behind the inline dropdown. Deep, wide, or long values\n * are truncated on purpose: the dropdown opens on a click and cannot afford to\n * walk an arbitrary document first.\n */\nexport function buildJSONPathNode(\n value: unknown,\n path: string,\n depth: number,\n options: BuildJSONPathNodeOptions = {},\n): JSONPathNode {\n const {\n maxDepth = DEFAULT_MAX_DEPTH,\n maxObjectProperties = DEFAULT_MAX_OBJECT_PROPERTIES,\n arrayMode = \"first\",\n } = options;\n const kind = jsonPathKind(value);\n const node: JSONPathNode = {\n key: path,\n path,\n value,\n kind,\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (kind === \"scalar\" || depth >= maxDepth) return node;\n const entries = Array.isArray(value)\n ? arrayMode === \"all\"\n ? value.map((entry, index) => [index, entry] as const)\n : value.length > 0\n ? [[0, value[0]] as const]\n : []\n : Object.entries(value as Record<string, unknown>).slice(0, maxObjectProperties);\n node.children = entries.map(([key, child]) =>\n buildJSONPathNode(child, appendJSONPath(path, key), depth + 1, options),\n );\n return node;\n}\n\nexport interface LazyJSONPathTreeOptions {\n maxChildren?: number;\n /**\n * Namespaces every node key. Two trees over different documents share their\n * paths, and Tree keys its React elements by node key — without a distinct\n * prefix, swapping the document underneath reuses the old subtree along with\n * the children it had already loaded.\n */\n keyPrefix?: string;\n /**\n * Descend into a string that parses as JSON. Providers routinely hand back a\n * document as an encoded column, and the backend already decodes one when a\n * column names it as its `source` — without this the picker shows the single\n * most interesting column in such a row as an opaque blob.\n */\n parseEmbeddedJSON?: boolean;\n}\n\nexport interface LazyJSONPathTree {\n roots: JSONPathNode[];\n /** Children already materialised, or undefined while the branch is unopened. */\n getChildren: (node: JSONPathNode) => JSONPathNode[] | undefined;\n hasMoreChildren: (node: JSONPathNode) => boolean;\n /**\n * Whether the node has children at all, loaded or not — an object or array\n * with entries, or a string that decodes to one. `hasMoreChildren` is false\n * once a branch has loaded; a caller drawing its own expander needs this.\n */\n expandable: (node: JSONPathNode) => boolean;\n loadChildren: (node: JSONPathNode) => Promise<JSONPathNode[]>;\n /**\n * Materialise the branch a literal expression addresses and return its node,\n * so a tree can reveal the value it opened with. Returns undefined for an\n * expression that selects rather than addresses (a wildcard, a descent, a\n * filter) or for one the document does not carry.\n */\n materializePath: (expression: string) => JSONPathNode | undefined;\n}\n\n/**\n * An uncapped tree over `json`: every property, every array element, any depth.\n *\n * Nothing is walked until it is opened, so an arbitrarily deep or wide document\n * costs only what the operator actually looks at. Nodes are cached by path so\n * re-opening a branch returns the *same objects* — `TreeNode` compares the\n * selected node by identity, and a rebuilt node would silently lose the\n * highlight.\n */\nexport function createLazyJSONPathTree(\n json: unknown,\n options: LazyJSONPathTreeOptions = {},\n): LazyJSONPathTree {\n const { maxChildren = DEFAULT_MAX_CHILDREN, parseEmbeddedJSON = true, keyPrefix = \"\" } = options;\n const nodes = new Map<string, JSONPathNode>();\n\n // hasMoreChildren runs on every render of every visible row, so the decode is\n // memoised per node rather than re-parsing a long string each time.\n const decoded = new Map<string, unknown>();\n\n function embedded(node: JSONPathNode): unknown {\n if (!parseEmbeddedJSON || typeof node.value !== \"string\") return undefined;\n if (decoded.has(node.key)) return decoded.get(node.key);\n const text = node.value.trim();\n let parsed: unknown = undefined;\n if (text.startsWith(\"{\") || text.startsWith(\"[\")) {\n try {\n const candidate: unknown = JSON.parse(text);\n if (jsonPathKind(candidate) !== \"scalar\") parsed = candidate;\n } catch {\n parsed = undefined;\n }\n }\n decoded.set(node.key, parsed);\n return parsed;\n }\n\n // What a node's children are drawn from: its own value, or the document\n // decoded out of it when it holds JSON as text. An embedded document restarts\n // at `$` because that is where the backend evaluates it from once the column\n // is named as a `source`.\n function contents(node: JSONPathNode): {\n value: unknown;\n path: string;\n root?: string;\n origin?: JSONPathOrigin;\n } {\n const inner = embedded(node);\n const scope: { value: unknown; path: string; root?: string; origin?: JSONPathOrigin } =\n inner === undefined\n ? { value: node.value, path: node.path }\n : { value: inner, path: \"$\" };\n const root = inner === undefined ? node.root : node.root ?? sourceColumn(node.path);\n if (root !== undefined) scope.root = root;\n // A boundary is only visible here: this is the one place that knows both\n // which node held the text and what the text decoded to. embedded() has\n // already rejected anything scalar, so the kind is array or object.\n const origin =\n inner === undefined\n ? node.origin\n : {\n path: node.path,\n kind: jsonPathKind(inner) as \"array\" | \"object\",\n ...(node.origin ? { outer: node.origin } : {}),\n };\n if (origin !== undefined) scope.origin = origin;\n return scope;\n }\n\n function node(\n value: unknown,\n path: string,\n key: string,\n root: string | undefined,\n origin: JSONPathOrigin | undefined,\n ): JSONPathNode {\n const cached = nodes.get(key);\n if (cached) return cached;\n const created: JSONPathNode = {\n key,\n path,\n value,\n kind: jsonPathKind(value),\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (root !== undefined) created.root = root;\n if (origin !== undefined) created.origin = origin;\n nodes.set(key, created);\n return created;\n }\n\n function entriesOf(value: unknown): Array<readonly [string | number, unknown]> {\n if (Array.isArray(value)) return value.map((entry, index) => [index, entry] as const);\n if (value !== null && typeof value === \"object\") return Object.entries(value as Record<string, unknown>);\n return [];\n }\n\n function materializeChildren(parent: JSONPathNode): JSONPathNode[] {\n if (parent.children) return parent.children;\n const scope = contents(parent);\n const entries = entriesOf(scope.value);\n const limit = Math.min(entries.length, maxChildren);\n const children = entries.slice(0, limit).map(([key, value]) => {\n const path = appendJSONPath(scope.path, key);\n // The key namespaces on the parent so an embedded document — which\n // restarts its paths at `$` — cannot collide with the outer row.\n return node(value, path, `${parent.key}>${path}`, scope.root, scope.origin);\n });\n if (limit < entries.length) {\n children.push({\n key: `${parent.key}>…`,\n path: scope.path,\n value: undefined,\n kind: \"more\",\n summary: `${entries.length - limit} more not shown — address them by index`,\n childCount: entries.length - limit,\n });\n }\n parent.children = children;\n return children;\n }\n\n function expandable(node: JSONPathNode): boolean {\n if (node.kind === \"more\") return false;\n if (node.kind !== \"scalar\") return node.childCount > 0;\n const inner = embedded(node);\n return inner !== undefined && entryCount(inner) > 0;\n }\n\n const rootNode = node(json, \"$\", `${keyPrefix}$`, undefined, undefined);\n\n return {\n roots: json === undefined ? [] : [rootNode],\n getChildren: (node) => node.children,\n hasMoreChildren: (node) => node.children === undefined && expandable(node),\n expandable,\n loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),\n materializePath: (expression) => {\n const segments = literalSegments(expression);\n if (!segments) return undefined;\n let current = rootNode;\n for (const segment of segments) {\n const target = appendJSONPath(contents(current).path, segment);\n const next = materializeChildren(current).find((child) => child.path === target);\n if (!next) return undefined;\n current = next;\n }\n return current;\n },\n };\n}\n\n/** The top-level column a row-rooted path starts at, e.g. `$.payload.x` → `payload`. */\nfunction sourceColumn(path: string): string | undefined {\n return literalSegments(path)?.slice(0, 1).map(String)[0];\n}\n\n/**\n * The literal key/index chain an expression addresses, or undefined when it\n * selects instead — a wildcard, a descent, or a filter matches a set whose shape\n * depends on the document, so there is no single branch to walk to.\n */\nexport function literalSegments(expression: string): Array<string | number> | undefined {\n let rest = expression.trim();\n if (rest === \"\") return undefined;\n if (!rest.startsWith(\"$\")) return undefined;\n rest = rest.slice(1);\n const segments: Array<string | number> = [];\n while (rest.length > 0) {\n if (rest.startsWith(\"..\")) return undefined;\n if (rest.startsWith(\".\")) {\n const match = /^\\.([A-Za-z_$][A-Za-z0-9_$]*)/.exec(rest);\n if (!match) return undefined;\n segments.push(match[1]!);\n rest = rest.slice(match[0].length);\n continue;\n }\n if (rest.startsWith(\"[\")) {\n const close = rest.indexOf(\"]\");\n if (close < 0) return undefined;\n const inner = rest.slice(1, close).trim();\n if (/^\\d+$/.test(inner)) segments.push(Number(inner));\n else if (/^\"(?:[^\"\\\\]|\\\\.)*\"$/.test(inner)) segments.push(JSON.parse(inner) as string);\n else if (/^'[^']*'$/.test(inner)) segments.push(inner.slice(1, -1));\n else return undefined;\n rest = rest.slice(close + 1);\n continue;\n }\n return undefined;\n }\n return segments;\n}\n"],"mappings":";AAUA,IAAM,kBAAkB;;;;;;;;;AAYxB,IAAa,uBAAuB;AA+CpC,SAAgB,aAAa,OAAkC;CAC7D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,OAAO,UAAU,QAAQ,OAAO,UAAU,WAAW,WAAW;AAClE;AAEA,SAAgB,eAAe,MAAc,KAA8B;CACzE,IAAI,OAAO,QAAQ,UAAU,OAAO,GAAG,KAAK,GAAG,IAAI;CACnD,OAAO,gBAAgB,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,UAAU,GAAG,EAAE;AACvF;AAEA,SAAgB,cAAc,OAAwB;CACpD,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,OAAO,OAAO,MAAM,WAAW,IAAI,KAAK,IAAI;CACvF,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;EAC/C,MAAM,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC;EACjC,OAAO,IAAI,MAAM,GAAG,UAAU,IAAI,aAAa,aAAa;CAC9D;CACA,IAAI,OAAO,UAAU,UAAU,OAAO,KAAK,UAAU,MAAM,SAAS,KAAK,GAAG,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,KAAK;CACzG,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KAAK,MAAM,KAAK,CAAW;QAChF,IAAI,YAAY,KAAK,KAAK,GAAG,SAAS,KAAK,MAAM,MAAM,GAAG,EAAE,CAAC;QAC7D,OAAO,KAAA;GACZ,OAAO,KAAK,MAAM,QAAQ,CAAC;GAC3B;EACF;EACA;CACF;CACA,OAAO;AACT"}
|
|
@@ -81,6 +81,12 @@ export interface LazyJSONPathTree {
|
|
|
81
81
|
/** Children already materialised, or undefined while the branch is unopened. */
|
|
82
82
|
getChildren: (node: JSONPathNode) => JSONPathNode[] | undefined;
|
|
83
83
|
hasMoreChildren: (node: JSONPathNode) => boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the node has children at all, loaded or not — an object or array
|
|
86
|
+
* with entries, or a string that decodes to one. `hasMoreChildren` is false
|
|
87
|
+
* once a branch has loaded; a caller drawing its own expander needs this.
|
|
88
|
+
*/
|
|
89
|
+
expandable: (node: JSONPathNode) => boolean;
|
|
84
90
|
loadChildren: (node: JSONPathNode) => Promise<JSONPathNode[]>;
|
|
85
91
|
/**
|
|
86
92
|
* Materialise the branch a literal expression addresses and return its node,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonPathTree.d.ts","sourceRoot":"","sources":["../../src/components/jsonPathTree.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IA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BAAsB,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CA2IlB;AAOD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CA6BtF"}
|
|
@@ -149,6 +149,7 @@ function createLazyJSONPathTree(json, options = {}) {
|
|
|
149
149
|
roots: json === void 0 ? [] : [rootNode],
|
|
150
150
|
getChildren: (node) => node.children,
|
|
151
151
|
hasMoreChildren: (node) => node.children === void 0 && expandable(node),
|
|
152
|
+
expandable,
|
|
152
153
|
loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),
|
|
153
154
|
materializePath: (expression) => {
|
|
154
155
|
const segments = literalSegments(expression);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonPathTree.js","names":[],"sources":["../../src/components/jsonPathTree.ts"],"sourcesContent":["// The JSON→JSONPath tree model shared by the inline picker dropdown and the\n// full playground dialog.\n//\n// The two want opposite things from the same walk. The dropdown is a *preview*\n// of a row that has to render the instant it opens, so it builds eagerly and\n// pays for that with caps: depth, property count, and one array element. The\n// playground is a *browser* of the row, so it must have no caps at all — which\n// is only affordable if the walk is lazy, materialising a level at a time as the\n// operator opens it.\n\nconst SIMPLE_PROPERTY = /^[A-Za-z_$][A-Za-z0-9_$]*$/;\n\nexport const DEFAULT_MAX_DEPTH = 12;\nexport const DEFAULT_MAX_OBJECT_PROPERTIES = 100;\n/**\n * Entries the uncapped tree renders under one node before it stops and says so.\n *\n * Depth is what the playground removes the limit on; breadth still has to render\n * as DOM rows the moment a node opens, and a hundred-thousand-element array\n * would take the tab down. The remainder is reported in a visible row rather\n * than dropped quietly — an index past it is still reachable by typing it.\n */\nexport const DEFAULT_MAX_CHILDREN = 1000;\n\nexport type JSONPathNodeKind = \"array\" | \"object\" | \"scalar\" | \"more\";\n\nexport interface JSONPathNode {\n key: string;\n path: string;\n value: unknown;\n kind: JSONPathNodeKind;\n summary: string;\n children?: JSONPathNode[];\n /**\n * The top-level column this node's path is rooted at, set only inside a\n * subtree decoded out of a JSON-encoded string. Such a path cannot be read\n * from the row directly — the backend reaches it by way of the column's\n * `source`, so the two have to be committed together.\n */\n root?: string;\n /**\n * The JSON-in-a-string boundaries crossed on the way down to this node,\n * innermost first. `root` names only the top-level column, because that is\n * what the backend's `source` takes — which loses the rest of the chain when\n * the encoded value is nested, and says nothing about what it decoded to.\n * A caller rebuilding an accessor needs both.\n */\n origin?: JSONPathOrigin;\n /** Number of entries the node holds, before any paging. */\n childCount: number;\n}\n\n/** One JSON-in-a-string boundary: where it was, and what came out of it. */\nexport interface JSONPathOrigin {\n /** Path of the string node the document was decoded out of, in its own scope. */\n path: string;\n /** Kind of the decoded document — which decoder crosses this boundary. */\n kind: \"array\" | \"object\";\n /** The boundary enclosing this one, when JSON is encoded inside JSON. */\n outer?: JSONPathOrigin;\n}\n\nexport interface BuildJSONPathNodeOptions {\n maxDepth?: number;\n maxObjectProperties?: number;\n /** \"first\" exposes only element [0] of an array; \"all\" exposes every element. */\n arrayMode?: \"first\" | \"all\";\n}\n\nexport function jsonPathKind(value: unknown): JSONPathNodeKind {\n if (Array.isArray(value)) return \"array\";\n return value !== null && typeof value === \"object\" ? \"object\" : \"scalar\";\n}\n\nexport function appendJSONPath(path: string, key: string | number): string {\n if (typeof key === \"number\") return `${path}[${key}]`;\n return SIMPLE_PROPERTY.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;\n}\n\nexport function summarizeJSON(value: unknown): string {\n if (Array.isArray(value)) return `[${value.length} item${value.length === 1 ? \"\" : \"s\"}]`;\n if (value !== null && typeof value === \"object\") {\n const count = Object.keys(value).length;\n return `{${count} ${count === 1 ? \"property\" : \"properties\"}}`;\n }\n if (typeof value === \"string\") return JSON.stringify(value.length > 80 ? `${value.slice(0, 77)}…` : value);\n return String(value);\n}\n\nfunction entryCount(value: unknown): number {\n if (Array.isArray(value)) return value.length;\n if (value !== null && typeof value === \"object\") return Object.keys(value).length;\n return 0;\n}\n\n/**\n * The eager, capped walk behind the inline dropdown. Deep, wide, or long values\n * are truncated on purpose: the dropdown opens on a click and cannot afford to\n * walk an arbitrary document first.\n */\nexport function buildJSONPathNode(\n value: unknown,\n path: string,\n depth: number,\n options: BuildJSONPathNodeOptions = {},\n): JSONPathNode {\n const {\n maxDepth = DEFAULT_MAX_DEPTH,\n maxObjectProperties = DEFAULT_MAX_OBJECT_PROPERTIES,\n arrayMode = \"first\",\n } = options;\n const kind = jsonPathKind(value);\n const node: JSONPathNode = {\n key: path,\n path,\n value,\n kind,\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (kind === \"scalar\" || depth >= maxDepth) return node;\n const entries = Array.isArray(value)\n ? arrayMode === \"all\"\n ? value.map((entry, index) => [index, entry] as const)\n : value.length > 0\n ? [[0, value[0]] as const]\n : []\n : Object.entries(value as Record<string, unknown>).slice(0, maxObjectProperties);\n node.children = entries.map(([key, child]) =>\n buildJSONPathNode(child, appendJSONPath(path, key), depth + 1, options),\n );\n return node;\n}\n\nexport interface LazyJSONPathTreeOptions {\n maxChildren?: number;\n /**\n * Namespaces every node key. Two trees over different documents share their\n * paths, and Tree keys its React elements by node key — without a distinct\n * prefix, swapping the document underneath reuses the old subtree along with\n * the children it had already loaded.\n */\n keyPrefix?: string;\n /**\n * Descend into a string that parses as JSON. Providers routinely hand back a\n * document as an encoded column, and the backend already decodes one when a\n * column names it as its `source` — without this the picker shows the single\n * most interesting column in such a row as an opaque blob.\n */\n parseEmbeddedJSON?: boolean;\n}\n\nexport interface LazyJSONPathTree {\n roots: JSONPathNode[];\n /** Children already materialised, or undefined while the branch is unopened. */\n getChildren: (node: JSONPathNode) => JSONPathNode[] | undefined;\n hasMoreChildren: (node: JSONPathNode) => boolean;\n loadChildren: (node: JSONPathNode) => Promise<JSONPathNode[]>;\n /**\n * Materialise the branch a literal expression addresses and return its node,\n * so a tree can reveal the value it opened with. Returns undefined for an\n * expression that selects rather than addresses (a wildcard, a descent, a\n * filter) or for one the document does not carry.\n */\n materializePath: (expression: string) => JSONPathNode | undefined;\n}\n\n/**\n * An uncapped tree over `json`: every property, every array element, any depth.\n *\n * Nothing is walked until it is opened, so an arbitrarily deep or wide document\n * costs only what the operator actually looks at. Nodes are cached by path so\n * re-opening a branch returns the *same objects* — `TreeNode` compares the\n * selected node by identity, and a rebuilt node would silently lose the\n * highlight.\n */\nexport function createLazyJSONPathTree(\n json: unknown,\n options: LazyJSONPathTreeOptions = {},\n): LazyJSONPathTree {\n const { maxChildren = DEFAULT_MAX_CHILDREN, parseEmbeddedJSON = true, keyPrefix = \"\" } = options;\n const nodes = new Map<string, JSONPathNode>();\n\n // hasMoreChildren runs on every render of every visible row, so the decode is\n // memoised per node rather than re-parsing a long string each time.\n const decoded = new Map<string, unknown>();\n\n function embedded(node: JSONPathNode): unknown {\n if (!parseEmbeddedJSON || typeof node.value !== \"string\") return undefined;\n if (decoded.has(node.key)) return decoded.get(node.key);\n const text = node.value.trim();\n let parsed: unknown = undefined;\n if (text.startsWith(\"{\") || text.startsWith(\"[\")) {\n try {\n const candidate: unknown = JSON.parse(text);\n if (jsonPathKind(candidate) !== \"scalar\") parsed = candidate;\n } catch {\n parsed = undefined;\n }\n }\n decoded.set(node.key, parsed);\n return parsed;\n }\n\n // What a node's children are drawn from: its own value, or the document\n // decoded out of it when it holds JSON as text. An embedded document restarts\n // at `$` because that is where the backend evaluates it from once the column\n // is named as a `source`.\n function contents(node: JSONPathNode): {\n value: unknown;\n path: string;\n root?: string;\n origin?: JSONPathOrigin;\n } {\n const inner = embedded(node);\n const scope: { value: unknown; path: string; root?: string; origin?: JSONPathOrigin } =\n inner === undefined\n ? { value: node.value, path: node.path }\n : { value: inner, path: \"$\" };\n const root = inner === undefined ? node.root : node.root ?? sourceColumn(node.path);\n if (root !== undefined) scope.root = root;\n // A boundary is only visible here: this is the one place that knows both\n // which node held the text and what the text decoded to. embedded() has\n // already rejected anything scalar, so the kind is array or object.\n const origin =\n inner === undefined\n ? node.origin\n : {\n path: node.path,\n kind: jsonPathKind(inner) as \"array\" | \"object\",\n ...(node.origin ? { outer: node.origin } : {}),\n };\n if (origin !== undefined) scope.origin = origin;\n return scope;\n }\n\n function node(\n value: unknown,\n path: string,\n key: string,\n root: string | undefined,\n origin: JSONPathOrigin | undefined,\n ): JSONPathNode {\n const cached = nodes.get(key);\n if (cached) return cached;\n const created: JSONPathNode = {\n key,\n path,\n value,\n kind: jsonPathKind(value),\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (root !== undefined) created.root = root;\n if (origin !== undefined) created.origin = origin;\n nodes.set(key, created);\n return created;\n }\n\n function entriesOf(value: unknown): Array<readonly [string | number, unknown]> {\n if (Array.isArray(value)) return value.map((entry, index) => [index, entry] as const);\n if (value !== null && typeof value === \"object\") return Object.entries(value as Record<string, unknown>);\n return [];\n }\n\n function materializeChildren(parent: JSONPathNode): JSONPathNode[] {\n if (parent.children) return parent.children;\n const scope = contents(parent);\n const entries = entriesOf(scope.value);\n const limit = Math.min(entries.length, maxChildren);\n const children = entries.slice(0, limit).map(([key, value]) => {\n const path = appendJSONPath(scope.path, key);\n // The key namespaces on the parent so an embedded document — which\n // restarts its paths at `$` — cannot collide with the outer row.\n return node(value, path, `${parent.key}>${path}`, scope.root, scope.origin);\n });\n if (limit < entries.length) {\n children.push({\n key: `${parent.key}>…`,\n path: scope.path,\n value: undefined,\n kind: \"more\",\n summary: `${entries.length - limit} more not shown — address them by index`,\n childCount: entries.length - limit,\n });\n }\n parent.children = children;\n return children;\n }\n\n function expandable(node: JSONPathNode): boolean {\n if (node.kind === \"more\") return false;\n if (node.kind !== \"scalar\") return node.childCount > 0;\n const inner = embedded(node);\n return inner !== undefined && entryCount(inner) > 0;\n }\n\n const rootNode = node(json, \"$\", `${keyPrefix}$`, undefined, undefined);\n\n return {\n roots: json === undefined ? [] : [rootNode],\n getChildren: (node) => node.children,\n hasMoreChildren: (node) => node.children === undefined && expandable(node),\n loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),\n materializePath: (expression) => {\n const segments = literalSegments(expression);\n if (!segments) return undefined;\n let current = rootNode;\n for (const segment of segments) {\n const target = appendJSONPath(contents(current).path, segment);\n const next = materializeChildren(current).find((child) => child.path === target);\n if (!next) return undefined;\n current = next;\n }\n return current;\n },\n };\n}\n\n/** The top-level column a row-rooted path starts at, e.g. `$.payload.x` → `payload`. */\nfunction sourceColumn(path: string): string | undefined {\n return literalSegments(path)?.slice(0, 1).map(String)[0];\n}\n\n/**\n * The literal key/index chain an expression addresses, or undefined when it\n * selects instead — a wildcard, a descent, or a filter matches a set whose shape\n * depends on the document, so there is no single branch to walk to.\n */\nexport function literalSegments(expression: string): Array<string | number> | undefined {\n let rest = expression.trim();\n if (rest === \"\") return undefined;\n if (!rest.startsWith(\"$\")) return undefined;\n rest = rest.slice(1);\n const segments: Array<string | number> = [];\n while (rest.length > 0) {\n if (rest.startsWith(\"..\")) return undefined;\n if (rest.startsWith(\".\")) {\n const match = /^\\.([A-Za-z_$][A-Za-z0-9_$]*)/.exec(rest);\n if (!match) return undefined;\n segments.push(match[1]!);\n rest = rest.slice(match[0].length);\n continue;\n }\n if (rest.startsWith(\"[\")) {\n const close = rest.indexOf(\"]\");\n if (close < 0) return undefined;\n const inner = rest.slice(1, close).trim();\n if (/^\\d+$/.test(inner)) segments.push(Number(inner));\n else if (/^\"(?:[^\"\\\\]|\\\\.)*\"$/.test(inner)) segments.push(JSON.parse(inner) as string);\n else if (/^'[^']*'$/.test(inner)) segments.push(inner.slice(1, -1));\n else return undefined;\n rest = rest.slice(close + 1);\n continue;\n }\n return undefined;\n }\n return segments;\n}\n"],"mappings":";AAUA,IAAM,kBAAkB;;;;;;;;;AAYxB,IAAa,uBAAuB;AA+CpC,SAAgB,aAAa,OAAkC;CAC7D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,OAAO,UAAU,QAAQ,OAAO,UAAU,WAAW,WA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AAM,CAAC;CACnB,MAAM,WAAmC,CAAC;CAC1C,OAAO,KAAK,SAAS,GAAG;EACtB,IAAI,KAAK,WAAW,IAAI,GAAG,OAAO,KAAA;EAClC,IAAI,KAAK,WAAW,GAAG,GAAG;GACxB,MAAM,QAAQ,gCAAgC,KAAK,IAAI;GACvD,IAAI,CAAC,OAAO,OAAO,KAAA;GACnB,SAAS,KAAK,MAAM,EAAG;GACvB,OAAO,KAAK,MAAM,MAAM,EAAE,CAAC,MAAM;GACjC;EACF;EACA,IAAI,KAAK,WAAW,GAAG,GAAG;GACxB,MAAM,QAAQ,KAAK,QAAQ,GAAG;GAC9B,IAAI,QAAQ,GAAG,OAAO,KAAA;GACtB,MAAM,QAAQ,KAAK,MAAM,GAAG,KAAK,CAAC,CAAC,KAAK;GACxC,IAAI,QAAQ,KAAK,KAAK,GAAG,SAAS,KAAK,OAAO,KAAK,CAAC;QAC/C,IAAI,sBAAsB,KAAK,KAAK,GAAG,SAAS,KAAK,KAAK,MAAM,KAAK,CAAW;QAChF,IAAI,YAAY,KAAK,KAAK,GAAG,SAAS,KAAK,MAAM,MAAM,GAAG,EAAE,CAAC;QAC7D,OAAO,KAAA;GACZ,OAAO,KAAK,MAAM,QAAQ,CAAC;GAC3B;EACF;EACA;CACF;CACA,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"jsonPathTree.js","names":[],"sources":["../../src/components/jsonPathTree.ts"],"sourcesContent":["// The JSON→JSONPath tree model shared by the inline picker dropdown and the\n// full playground dialog.\n//\n// The two want opposite things from the same walk. The dropdown is a *preview*\n// of a row that has to render the instant it opens, so it builds eagerly and\n// pays for that with caps: depth, property count, and one array element. The\n// playground is a *browser* of the row, so it must have no caps at all — which\n// is only affordable if the walk is lazy, materialising a level at a time as the\n// operator opens it.\n\nconst SIMPLE_PROPERTY = /^[A-Za-z_$][A-Za-z0-9_$]*$/;\n\nexport const DEFAULT_MAX_DEPTH = 12;\nexport const DEFAULT_MAX_OBJECT_PROPERTIES = 100;\n/**\n * Entries the uncapped tree renders under one node before it stops and says so.\n *\n * Depth is what the playground removes the limit on; breadth still has to render\n * as DOM rows the moment a node opens, and a hundred-thousand-element array\n * would take the tab down. The remainder is reported in a visible row rather\n * than dropped quietly — an index past it is still reachable by typing it.\n */\nexport const DEFAULT_MAX_CHILDREN = 1000;\n\nexport type JSONPathNodeKind = \"array\" | \"object\" | \"scalar\" | \"more\";\n\nexport interface JSONPathNode {\n key: string;\n path: string;\n value: unknown;\n kind: JSONPathNodeKind;\n summary: string;\n children?: JSONPathNode[];\n /**\n * The top-level column this node's path is rooted at, set only inside a\n * subtree decoded out of a JSON-encoded string. Such a path cannot be read\n * from the row directly — the backend reaches it by way of the column's\n * `source`, so the two have to be committed together.\n */\n root?: string;\n /**\n * The JSON-in-a-string boundaries crossed on the way down to this node,\n * innermost first. `root` names only the top-level column, because that is\n * what the backend's `source` takes — which loses the rest of the chain when\n * the encoded value is nested, and says nothing about what it decoded to.\n * A caller rebuilding an accessor needs both.\n */\n origin?: JSONPathOrigin;\n /** Number of entries the node holds, before any paging. */\n childCount: number;\n}\n\n/** One JSON-in-a-string boundary: where it was, and what came out of it. */\nexport interface JSONPathOrigin {\n /** Path of the string node the document was decoded out of, in its own scope. */\n path: string;\n /** Kind of the decoded document — which decoder crosses this boundary. */\n kind: \"array\" | \"object\";\n /** The boundary enclosing this one, when JSON is encoded inside JSON. */\n outer?: JSONPathOrigin;\n}\n\nexport interface BuildJSONPathNodeOptions {\n maxDepth?: number;\n maxObjectProperties?: number;\n /** \"first\" exposes only element [0] of an array; \"all\" exposes every element. */\n arrayMode?: \"first\" | \"all\";\n}\n\nexport function jsonPathKind(value: unknown): JSONPathNodeKind {\n if (Array.isArray(value)) return \"array\";\n return value !== null && typeof value === \"object\" ? \"object\" : \"scalar\";\n}\n\nexport function appendJSONPath(path: string, key: string | number): string {\n if (typeof key === \"number\") return `${path}[${key}]`;\n return SIMPLE_PROPERTY.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;\n}\n\nexport function summarizeJSON(value: unknown): string {\n if (Array.isArray(value)) return `[${value.length} item${value.length === 1 ? \"\" : \"s\"}]`;\n if (value !== null && typeof value === \"object\") {\n const count = Object.keys(value).length;\n return `{${count} ${count === 1 ? \"property\" : \"properties\"}}`;\n }\n if (typeof value === \"string\") return JSON.stringify(value.length > 80 ? `${value.slice(0, 77)}…` : value);\n return String(value);\n}\n\nfunction entryCount(value: unknown): number {\n if (Array.isArray(value)) return value.length;\n if (value !== null && typeof value === \"object\") return Object.keys(value).length;\n return 0;\n}\n\n/**\n * The eager, capped walk behind the inline dropdown. Deep, wide, or long values\n * are truncated on purpose: the dropdown opens on a click and cannot afford to\n * walk an arbitrary document first.\n */\nexport function buildJSONPathNode(\n value: unknown,\n path: string,\n depth: number,\n options: BuildJSONPathNodeOptions = {},\n): JSONPathNode {\n const {\n maxDepth = DEFAULT_MAX_DEPTH,\n maxObjectProperties = DEFAULT_MAX_OBJECT_PROPERTIES,\n arrayMode = \"first\",\n } = options;\n const kind = jsonPathKind(value);\n const node: JSONPathNode = {\n key: path,\n path,\n value,\n kind,\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (kind === \"scalar\" || depth >= maxDepth) return node;\n const entries = Array.isArray(value)\n ? arrayMode === \"all\"\n ? value.map((entry, index) => [index, entry] as const)\n : value.length > 0\n ? [[0, value[0]] as const]\n : []\n : Object.entries(value as Record<string, unknown>).slice(0, maxObjectProperties);\n node.children = entries.map(([key, child]) =>\n buildJSONPathNode(child, appendJSONPath(path, key), depth + 1, options),\n );\n return node;\n}\n\nexport interface LazyJSONPathTreeOptions {\n maxChildren?: number;\n /**\n * Namespaces every node key. Two trees over different documents share their\n * paths, and Tree keys its React elements by node key — without a distinct\n * prefix, swapping the document underneath reuses the old subtree along with\n * the children it had already loaded.\n */\n keyPrefix?: string;\n /**\n * Descend into a string that parses as JSON. Providers routinely hand back a\n * document as an encoded column, and the backend already decodes one when a\n * column names it as its `source` — without this the picker shows the single\n * most interesting column in such a row as an opaque blob.\n */\n parseEmbeddedJSON?: boolean;\n}\n\nexport interface LazyJSONPathTree {\n roots: JSONPathNode[];\n /** Children already materialised, or undefined while the branch is unopened. */\n getChildren: (node: JSONPathNode) => JSONPathNode[] | undefined;\n hasMoreChildren: (node: JSONPathNode) => boolean;\n /**\n * Whether the node has children at all, loaded or not — an object or array\n * with entries, or a string that decodes to one. `hasMoreChildren` is false\n * once a branch has loaded; a caller drawing its own expander needs this.\n */\n expandable: (node: JSONPathNode) => boolean;\n loadChildren: (node: JSONPathNode) => Promise<JSONPathNode[]>;\n /**\n * Materialise the branch a literal expression addresses and return its node,\n * so a tree can reveal the value it opened with. Returns undefined for an\n * expression that selects rather than addresses (a wildcard, a descent, a\n * filter) or for one the document does not carry.\n */\n materializePath: (expression: string) => JSONPathNode | undefined;\n}\n\n/**\n * An uncapped tree over `json`: every property, every array element, any depth.\n *\n * Nothing is walked until it is opened, so an arbitrarily deep or wide document\n * costs only what the operator actually looks at. Nodes are cached by path so\n * re-opening a branch returns the *same objects* — `TreeNode` compares the\n * selected node by identity, and a rebuilt node would silently lose the\n * highlight.\n */\nexport function createLazyJSONPathTree(\n json: unknown,\n options: LazyJSONPathTreeOptions = {},\n): LazyJSONPathTree {\n const { maxChildren = DEFAULT_MAX_CHILDREN, parseEmbeddedJSON = true, keyPrefix = \"\" } = options;\n const nodes = new Map<string, JSONPathNode>();\n\n // hasMoreChildren runs on every render of every visible row, so the decode is\n // memoised per node rather than re-parsing a long string each time.\n const decoded = new Map<string, unknown>();\n\n function embedded(node: JSONPathNode): unknown {\n if (!parseEmbeddedJSON || typeof node.value !== \"string\") return undefined;\n if (decoded.has(node.key)) return decoded.get(node.key);\n const text = node.value.trim();\n let parsed: unknown = undefined;\n if (text.startsWith(\"{\") || text.startsWith(\"[\")) {\n try {\n const candidate: unknown = JSON.parse(text);\n if (jsonPathKind(candidate) !== \"scalar\") parsed = candidate;\n } catch {\n parsed = undefined;\n }\n }\n decoded.set(node.key, parsed);\n return parsed;\n }\n\n // What a node's children are drawn from: its own value, or the document\n // decoded out of it when it holds JSON as text. An embedded document restarts\n // at `$` because that is where the backend evaluates it from once the column\n // is named as a `source`.\n function contents(node: JSONPathNode): {\n value: unknown;\n path: string;\n root?: string;\n origin?: JSONPathOrigin;\n } {\n const inner = embedded(node);\n const scope: { value: unknown; path: string; root?: string; origin?: JSONPathOrigin } =\n inner === undefined\n ? { value: node.value, path: node.path }\n : { value: inner, path: \"$\" };\n const root = inner === undefined ? node.root : node.root ?? sourceColumn(node.path);\n if (root !== undefined) scope.root = root;\n // A boundary is only visible here: this is the one place that knows both\n // which node held the text and what the text decoded to. embedded() has\n // already rejected anything scalar, so the kind is array or object.\n const origin =\n inner === undefined\n ? node.origin\n : {\n path: node.path,\n kind: jsonPathKind(inner) as \"array\" | \"object\",\n ...(node.origin ? { outer: node.origin } : {}),\n };\n if (origin !== undefined) scope.origin = origin;\n return scope;\n }\n\n function node(\n value: unknown,\n path: string,\n key: string,\n root: string | undefined,\n origin: JSONPathOrigin | undefined,\n ): JSONPathNode {\n const cached = nodes.get(key);\n if (cached) return cached;\n const created: JSONPathNode = {\n key,\n path,\n value,\n kind: jsonPathKind(value),\n summary: summarizeJSON(value),\n childCount: entryCount(value),\n };\n if (root !== undefined) created.root = root;\n if (origin !== undefined) created.origin = origin;\n nodes.set(key, created);\n return created;\n }\n\n function entriesOf(value: unknown): Array<readonly [string | number, unknown]> {\n if (Array.isArray(value)) return value.map((entry, index) => [index, entry] as const);\n if (value !== null && typeof value === \"object\") return Object.entries(value as Record<string, unknown>);\n return [];\n }\n\n function materializeChildren(parent: JSONPathNode): JSONPathNode[] {\n if (parent.children) return parent.children;\n const scope = contents(parent);\n const entries = entriesOf(scope.value);\n const limit = Math.min(entries.length, maxChildren);\n const children = entries.slice(0, limit).map(([key, value]) => {\n const path = appendJSONPath(scope.path, key);\n // The key namespaces on the parent so an embedded document — which\n // restarts its paths at `$` — cannot collide with the outer row.\n return node(value, path, `${parent.key}>${path}`, scope.root, scope.origin);\n });\n if (limit < entries.length) {\n children.push({\n key: `${parent.key}>…`,\n path: scope.path,\n value: undefined,\n kind: \"more\",\n summary: `${entries.length - limit} more not shown — address them by index`,\n childCount: entries.length - limit,\n });\n }\n parent.children = children;\n return children;\n }\n\n function expandable(node: JSONPathNode): boolean {\n if (node.kind === \"more\") return false;\n if (node.kind !== \"scalar\") return node.childCount > 0;\n const inner = embedded(node);\n return inner !== undefined && entryCount(inner) > 0;\n }\n\n const rootNode = node(json, \"$\", `${keyPrefix}$`, undefined, undefined);\n\n return {\n roots: json === undefined ? [] : [rootNode],\n getChildren: (node) => node.children,\n hasMoreChildren: (node) => node.children === undefined && expandable(node),\n expandable,\n loadChildren: (parent) => Promise.resolve(materializeChildren(parent)),\n materializePath: (expression) => {\n const segments = literalSegments(expression);\n if (!segments) return undefined;\n let current = rootNode;\n for (const segment of segments) {\n const target = appendJSONPath(contents(current).path, segment);\n const next = materializeChildren(current).find((child) => child.path === target);\n if (!next) return undefined;\n current = next;\n }\n return current;\n },\n };\n}\n\n/** The top-level column a row-rooted path starts at, e.g. `$.payload.x` → `payload`. */\nfunction sourceColumn(path: string): string | undefined {\n return literalSegments(path)?.slice(0, 1).map(String)[0];\n}\n\n/**\n * The literal key/index chain an expression addresses, or undefined when it\n * selects instead — a wildcard, a descent, or a filter matches a set whose shape\n * depends on the document, so there is no single branch to walk to.\n */\nexport function literalSegments(expression: string): Array<string | number> | undefined {\n let rest = expression.trim();\n if (rest === \"\") return undefined;\n if (!rest.startsWith(\"$\")) return undefined;\n rest = rest.slice(1);\n const segments: Array<string | number> = [];\n while (rest.length > 0) {\n if (rest.startsWith(\"..\")) return undefined;\n if (rest.startsWith(\".\")) {\n const match = /^\\.([A-Za-z_$][A-Za-z0-9_$]*)/.exec(rest);\n if (!match) return undefined;\n segments.push(match[1]!);\n rest = rest.slice(match[0].length);\n continue;\n }\n if (rest.startsWith(\"[\")) {\n const close = rest.indexOf(\"]\");\n if (close < 0) return undefined;\n const inner = rest.slice(1, close).trim();\n if (/^\\d+$/.test(inner)) segments.push(Number(inner));\n else if (/^\"(?:[^\"\\\\]|\\\\.)*\"$/.test(inner)) segments.push(JSON.parse(inner) as string);\n else if (/^'[^']*'$/.test(inner)) segments.push(inner.slice(1, -1));\n else return undefined;\n rest = rest.slice(close + 1);\n continue;\n }\n return undefined;\n }\n return segments;\n}\n"],"mappings":";AAUA,IAAM,kBAAkB;;;;;;;;;AAYxB,IAAa,uBAAuB;AA+CpC,SAAgB,aAAa,OAAkC;CAC7D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,OAAO,UAAU,QAAQ,OAAO,UAAU,WAAW,WAAW;AAClE;AAEA,SAAgB,eAAe,MAAc,KAA8B;CACzE,IAAI,OAAO,QAAQ,UAAU,OAAO,GAAG,KAAK,GAAG,IAAI;CACnD,OAAO,gBAAgB,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,UAAU,GAAG,EAAE;AACvF;AAEA,SAAgB,cAAc,OAAwB;CACpD,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,OAAO,OAAO,MAAM,WAAW,IAAI,KAAK,IAAI;CACvF,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;EAC/C,MAAM,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC;EACjC,OAAO,IAAI,MAAM,GAAG,UAAU,IAAI,aAAa,aAAa;CAC9D;CACA,IAAI,OAAO,UAAU,UAAU,OAAO,KAAK,UAAU,MAAM,SAAS,KAAK,GAAG,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,KAAK;CACzG,OAAO,OAAO,KAAK;AACrB;AAEA,SAAS,WAAW,OAAwB;CAC1C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM;CACvC,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK,KAAK,CAAC,CAAC;CAC3E,OA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O;AACT"}
|
package/dist/data/Clicky.cjs
CHANGED
|
@@ -1437,15 +1437,24 @@ function ClickyTable({ columns, rows, autoFilter, onTableRowClick, getTableRowHr
|
|
|
1437
1437
|
...column.grow !== void 0 ? { grow: column.grow } : {},
|
|
1438
1438
|
...column.shrink !== void 0 ? { shrink: column.shrink } : {},
|
|
1439
1439
|
...column.minWidth !== void 0 ? { minWidth: column.minWidth } : {},
|
|
1440
|
-
...column.maxWidth !== void 0 ? { maxWidth: column.maxWidth } : {}
|
|
1441
|
-
|
|
1442
|
-
if (column.kind === "timestamp" && !tagColumn && !keyValueColumn && !jsonColumn) return {
|
|
1443
|
-
...base,
|
|
1444
|
-
kind: "timestamp",
|
|
1445
|
-
accessor: (row) => clickyCellRawValue(row.cells[column.name], column),
|
|
1446
|
-
serverFilterValue: (value) => typeof value === "string" || typeof value === "number" ? String(value) : void 0,
|
|
1447
|
-
serverFilterLabel: (value, row) => typeof value === "string" || typeof value === "number" ? String(value) : clickyNodeText(row.cells[column.name])
|
|
1440
|
+
...column.maxWidth !== void 0 ? { maxWidth: column.maxWidth } : {},
|
|
1441
|
+
...column.maxWidthChars !== void 0 ? { maxWidthChars: column.maxWidthChars } : {}
|
|
1448
1442
|
};
|
|
1443
|
+
const ageColumn = column.type === "age";
|
|
1444
|
+
if ((column.kind === "timestamp" || ageColumn) && !tagColumn && !keyValueColumn && !jsonColumn) {
|
|
1445
|
+
const mode = ageColumn ? "relative" : column.type === "datetime" ? "absolute" : void 0;
|
|
1446
|
+
return {
|
|
1447
|
+
...base,
|
|
1448
|
+
kind: "timestamp",
|
|
1449
|
+
...mode ? { timestamp: {
|
|
1450
|
+
...base.timestamp,
|
|
1451
|
+
mode
|
|
1452
|
+
} } : {},
|
|
1453
|
+
accessor: (row) => clickyCellRawValue(row.cells[column.name], column),
|
|
1454
|
+
serverFilterValue: (value) => typeof value === "string" || typeof value === "number" ? String(value) : void 0,
|
|
1455
|
+
serverFilterLabel: (value, row) => typeof value === "string" || typeof value === "number" ? String(value) : clickyNodeText(row.cells[column.name])
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1449
1458
|
if (keyValueColumn) return {
|
|
1450
1459
|
...base,
|
|
1451
1460
|
kind: "tags",
|
|
@@ -1593,8 +1602,20 @@ function isClickyTagColumn(column) {
|
|
|
1593
1602
|
function isClickyKeyValueColumn(column) {
|
|
1594
1603
|
return column.type === "key_value" || column.type === "key_values";
|
|
1595
1604
|
}
|
|
1605
|
+
var EMPTY_TAG_VALUES = /* @__PURE__ */ new Set([
|
|
1606
|
+
"",
|
|
1607
|
+
"\"\"",
|
|
1608
|
+
"null",
|
|
1609
|
+
"[]",
|
|
1610
|
+
"{}"
|
|
1611
|
+
]);
|
|
1596
1612
|
function ClickyKeyValueCell({ node }) {
|
|
1597
|
-
const
|
|
1613
|
+
const all = clickyNodeKeyValues(node);
|
|
1614
|
+
const pairs = all.filter((pair) => !EMPTY_TAG_VALUES.has(clickyNodeCanonicalText(pair.value).trim()));
|
|
1615
|
+
if (all.length > 0 && pairs.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1616
|
+
className: "text-muted-foreground",
|
|
1617
|
+
children: "—"
|
|
1618
|
+
});
|
|
1598
1619
|
if (pairs.length === 0) {
|
|
1599
1620
|
const fallback = clickyNodeText(node).trim();
|
|
1600
1621
|
return fallback ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1605,15 +1626,13 @@ function ClickyKeyValueCell({ node }) {
|
|
|
1605
1626
|
children: "—"
|
|
1606
1627
|
});
|
|
1607
1628
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClickyNodeRenderer, { node: pair.value })
|
|
1616
|
-
})] }, `${pair.key}-${index}`))
|
|
1629
|
+
const tags = require_tag_utils.normalizeTags(pairs.map((pair) => ({
|
|
1630
|
+
key: pair.key,
|
|
1631
|
+
value: clickyNodeCanonicalText(pair.value)
|
|
1632
|
+
})));
|
|
1633
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TagList.TagList, {
|
|
1634
|
+
tags,
|
|
1635
|
+
maxVisible: 3
|
|
1617
1636
|
});
|
|
1618
1637
|
}
|
|
1619
1638
|
function ClickyJSONCell({ node }) {
|