@tabularis/explain 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +104 -0
- package/dist/diagnostics-DPSgsjFk.d.ts +157 -0
- package/dist/flow.d.ts +40 -0
- package/dist/flow.js +171 -0
- package/dist/index.d.ts +325 -0
- package/dist/index.js +1792 -0
- package/dist/react.d.ts +91 -0
- package/dist/react.js +1617 -0
- package/package.json +95 -0
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { E as ExplainPlan, b as ExplainMetrics, e as ExplainDiagnostic, a as ExplainNode, i as ExplainNodeMetrics } from './diagnostics-DPSgsjFk.js';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { NodeProps, Node } from '@xyflow/react';
|
|
5
|
+
import { ExplainPlanNodeData } from './flow.js';
|
|
6
|
+
|
|
7
|
+
interface ExplainGraphProps {
|
|
8
|
+
plan: ExplainPlan;
|
|
9
|
+
metrics: ExplainMetrics;
|
|
10
|
+
diagnostics: Map<string, ExplainDiagnostic[]>;
|
|
11
|
+
selectedNodeId: string | null;
|
|
12
|
+
onSelectNode: (nodeId: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const ExplainGraph: ({ plan, metrics, diagnostics, selectedNodeId, onSelectNode, }: ExplainGraphProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface ExplainTableViewProps {
|
|
17
|
+
plan: ExplainPlan;
|
|
18
|
+
metrics: ExplainMetrics;
|
|
19
|
+
diagnostics: Map<string, ExplainDiagnostic[]>;
|
|
20
|
+
selectedId: string | null;
|
|
21
|
+
onSelect: (id: string) => void;
|
|
22
|
+
}
|
|
23
|
+
declare function ExplainTableView({ plan, metrics, diagnostics, selectedId, onSelect, }: ExplainTableViewProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
interface ExplainDiagramViewProps {
|
|
26
|
+
plan: ExplainPlan;
|
|
27
|
+
metrics: ExplainMetrics;
|
|
28
|
+
diagnostics: Map<string, ExplainDiagnostic[]>;
|
|
29
|
+
selectedId: string | null;
|
|
30
|
+
onSelect: (id: string) => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One row per plan node, each with a bar proportional to the chosen metric.
|
|
34
|
+
* Rows follow plan order and share the selection with the graph view, so a node
|
|
35
|
+
* picked here stays picked when switching views.
|
|
36
|
+
*/
|
|
37
|
+
declare function ExplainDiagramView({ plan, metrics, diagnostics, selectedId, onSelect, }: ExplainDiagramViewProps): react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
interface ExplainStatsViewProps {
|
|
40
|
+
plan: ExplainPlan;
|
|
41
|
+
metrics: ExplainMetrics;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Plan-wide aggregates: where the time goes by node type, which relations are
|
|
45
|
+
* read and how often, and which indexes the planner picked.
|
|
46
|
+
*/
|
|
47
|
+
declare function ExplainStatsView({ plan, metrics }: ExplainStatsViewProps): react_jsx_runtime.JSX.Element;
|
|
48
|
+
|
|
49
|
+
interface ExplainNodeDetailsProps {
|
|
50
|
+
node: ExplainNode | null;
|
|
51
|
+
hasAnalyzeData: boolean;
|
|
52
|
+
/** Derived exclusive metrics for `node`, when the caller has them. */
|
|
53
|
+
metrics?: ExplainNodeMetrics | null;
|
|
54
|
+
diagnostics?: ExplainDiagnostic[];
|
|
55
|
+
}
|
|
56
|
+
declare function ExplainNodeDetails({ node, hasAnalyzeData, metrics, diagnostics, }: ExplainNodeDetailsProps): react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
interface ExplainOverviewBarProps {
|
|
59
|
+
plan: ExplainPlan;
|
|
60
|
+
metrics: ExplainMetrics;
|
|
61
|
+
onSelectNode: (nodeId: string) => void;
|
|
62
|
+
}
|
|
63
|
+
declare function ExplainOverviewBar({ plan, metrics, onSelectNode, }: ExplainOverviewBarProps): react_jsx_runtime.JSX.Element;
|
|
64
|
+
|
|
65
|
+
type ExplainViewMode = "graph" | "diagram" | "table" | "stats" | "raw" | "ai";
|
|
66
|
+
interface ExplainSummaryBarProps {
|
|
67
|
+
plan: ExplainPlan | null;
|
|
68
|
+
viewMode: ExplainViewMode;
|
|
69
|
+
onViewModeChange: (mode: ExplainViewMode) => void;
|
|
70
|
+
aiEnabled: boolean;
|
|
71
|
+
}
|
|
72
|
+
declare const ExplainSummaryBar: react.MemoExoticComponent<({ plan, viewMode, onViewModeChange, aiEnabled }: ExplainSummaryBarProps) => react_jsx_runtime.JSX.Element | null>;
|
|
73
|
+
|
|
74
|
+
interface ExplainDiagnosticChipsProps {
|
|
75
|
+
diagnostics: ExplainDiagnostic[];
|
|
76
|
+
/** Show icons only, for dense contexts such as table rows. */
|
|
77
|
+
iconsOnly?: boolean;
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
/** Compact severity chips, one per finding on a node. */
|
|
81
|
+
declare function ExplainDiagnosticChips({ diagnostics, iconsOnly, className, }: ExplainDiagnosticChipsProps): react_jsx_runtime.JSX.Element | null;
|
|
82
|
+
interface ExplainDiagnosticListProps {
|
|
83
|
+
diagnostics: ExplainDiagnostic[];
|
|
84
|
+
}
|
|
85
|
+
/** Findings with their explanation, for the node details panel. */
|
|
86
|
+
declare function ExplainDiagnosticList({ diagnostics, }: ExplainDiagnosticListProps): react_jsx_runtime.JSX.Element | null;
|
|
87
|
+
|
|
88
|
+
type ExplainPlanNodeType = Node<ExplainPlanNodeData, "explainPlan">;
|
|
89
|
+
declare const ExplainPlanNodeComponent: react.MemoExoticComponent<({ data }: NodeProps<ExplainPlanNodeType>) => react_jsx_runtime.JSX.Element>;
|
|
90
|
+
|
|
91
|
+
export { ExplainDiagnosticChips, ExplainDiagnosticList, ExplainDiagramView, ExplainGraph, ExplainNodeDetails, ExplainOverviewBar, ExplainPlanNodeComponent, ExplainPlanNodeData, type ExplainPlanNodeType, ExplainStatsView, ExplainSummaryBar, ExplainTableView, type ExplainViewMode };
|