@tabularis/explain 0.2.0 → 0.3.1
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/README.md +6 -3
- package/dist/{diagnostics-DPSgsjFk.d.ts → diagnostics-DYKMtJZS.d.ts} +4 -4
- package/dist/flow.d.ts +1 -1
- package/dist/flow.js +2 -8
- package/dist/index.d.ts +157 -19
- package/dist/index.js +570 -50
- package/dist/react.d.ts +22 -8
- package/dist/react.js +774 -311
- package/dist/tableColumns-BWoGh7tK.d.ts +30 -0
- package/package.json +5 -3
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as ExplainPlan, b as ExplainMetrics,
|
|
2
|
+
import { E as ExplainPlan, b as ExplainMetrics, d as ExplainDiagnostic, a as ExplainNode, c as ExplainNodeMetrics } from './diagnostics-DYKMtJZS.js';
|
|
3
|
+
import { b as ExplainTableColumnId } from './tableColumns-BWoGh7tK.js';
|
|
3
4
|
import * as react from 'react';
|
|
4
5
|
import { NodeProps, Node } from '@xyflow/react';
|
|
5
6
|
import { ExplainPlanNodeData } from './flow.js';
|
|
@@ -19,8 +20,18 @@ interface ExplainTableViewProps {
|
|
|
19
20
|
diagnostics: Map<string, ExplainDiagnostic[]>;
|
|
20
21
|
selectedId: string | null;
|
|
21
22
|
onSelect: (id: string) => void;
|
|
23
|
+
onExportCsv?: () => void;
|
|
24
|
+
isExportingCsv?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Column order, `#` excluded. Without it the view keeps its own order,
|
|
27
|
+
* which is lost when it unmounts; pass it with `onColumnOrderChange` to keep
|
|
28
|
+
* the user's order.
|
|
29
|
+
*/
|
|
30
|
+
columnOrder?: readonly ExplainTableColumnId[];
|
|
31
|
+
onColumnOrderChange?: (order: readonly ExplainTableColumnId[]) => void;
|
|
32
|
+
onCopyDetails?: (text: string) => Promise<boolean | void> | boolean | void;
|
|
22
33
|
}
|
|
23
|
-
declare function ExplainTableView({ plan, metrics, diagnostics, selectedId, onSelect, }: ExplainTableViewProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function ExplainTableView({ plan, metrics, diagnostics, selectedId, onSelect, onExportCsv, isExportingCsv, columnOrder, onColumnOrderChange, onCopyDetails, }: ExplainTableViewProps): react_jsx_runtime.JSX.Element;
|
|
24
35
|
|
|
25
36
|
interface ExplainDiagramViewProps {
|
|
26
37
|
plan: ExplainPlan;
|
|
@@ -28,13 +39,14 @@ interface ExplainDiagramViewProps {
|
|
|
28
39
|
diagnostics: Map<string, ExplainDiagnostic[]>;
|
|
29
40
|
selectedId: string | null;
|
|
30
41
|
onSelect: (id: string) => void;
|
|
42
|
+
onCopyDetails?: (text: string) => Promise<boolean | void> | boolean | void;
|
|
31
43
|
}
|
|
32
44
|
/**
|
|
33
45
|
* One row per plan node, each with a bar proportional to the chosen metric.
|
|
34
46
|
* Rows follow plan order and share the selection with the graph view, so a node
|
|
35
47
|
* picked here stays picked when switching views.
|
|
36
48
|
*/
|
|
37
|
-
declare function ExplainDiagramView({ plan, metrics, diagnostics, selectedId, onSelect, }: ExplainDiagramViewProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
declare function ExplainDiagramView({ plan, metrics, diagnostics, selectedId, onSelect, onCopyDetails, }: ExplainDiagramViewProps): react_jsx_runtime.JSX.Element;
|
|
38
50
|
|
|
39
51
|
interface ExplainStatsViewProps {
|
|
40
52
|
plan: ExplainPlan;
|
|
@@ -52,17 +64,19 @@ interface ExplainNodeDetailsProps {
|
|
|
52
64
|
/** Derived exclusive metrics for `node`, when the caller has them. */
|
|
53
65
|
metrics?: ExplainNodeMetrics | null;
|
|
54
66
|
diagnostics?: ExplainDiagnostic[];
|
|
67
|
+
onCopyDetails?: (text: string) => Promise<boolean | void> | boolean | void;
|
|
68
|
+
className?: string;
|
|
55
69
|
}
|
|
56
|
-
declare function ExplainNodeDetails({ node, hasAnalyzeData, metrics, diagnostics, }: ExplainNodeDetailsProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
declare function ExplainNodeDetails({ node, hasAnalyzeData, metrics, diagnostics, onCopyDetails, className, }: ExplainNodeDetailsProps): react_jsx_runtime.JSX.Element;
|
|
57
71
|
|
|
58
72
|
interface ExplainOverviewBarProps {
|
|
59
73
|
plan: ExplainPlan;
|
|
60
74
|
metrics: ExplainMetrics;
|
|
61
75
|
onSelectNode: (nodeId: string) => void;
|
|
62
76
|
}
|
|
63
|
-
declare function ExplainOverviewBar({ plan, metrics, onSelectNode
|
|
77
|
+
declare function ExplainOverviewBar({ plan, metrics, onSelectNode }: ExplainOverviewBarProps): react_jsx_runtime.JSX.Element;
|
|
64
78
|
|
|
65
|
-
type ExplainViewMode =
|
|
79
|
+
type ExplainViewMode = 'graph' | 'diagram' | 'table' | 'stats' | 'raw' | 'ai';
|
|
66
80
|
interface ExplainSummaryBarProps {
|
|
67
81
|
plan: ExplainPlan | null;
|
|
68
82
|
viewMode: ExplainViewMode;
|
|
@@ -83,9 +97,9 @@ interface ExplainDiagnosticListProps {
|
|
|
83
97
|
diagnostics: ExplainDiagnostic[];
|
|
84
98
|
}
|
|
85
99
|
/** Findings with their explanation, for the node details panel. */
|
|
86
|
-
declare function ExplainDiagnosticList({ diagnostics
|
|
100
|
+
declare function ExplainDiagnosticList({ diagnostics }: ExplainDiagnosticListProps): react_jsx_runtime.JSX.Element | null;
|
|
87
101
|
|
|
88
|
-
type ExplainPlanNodeType = Node<ExplainPlanNodeData,
|
|
102
|
+
type ExplainPlanNodeType = Node<ExplainPlanNodeData, 'explainPlan'>;
|
|
89
103
|
declare const ExplainPlanNodeComponent: react.MemoExoticComponent<({ data }: NodeProps<ExplainPlanNodeType>) => react_jsx_runtime.JSX.Element>;
|
|
90
104
|
|
|
91
105
|
export { ExplainDiagnosticChips, ExplainDiagnosticList, ExplainDiagramView, ExplainGraph, ExplainNodeDetails, ExplainOverviewBar, ExplainPlanNodeComponent, ExplainPlanNodeData, type ExplainPlanNodeType, ExplainStatsView, ExplainSummaryBar, ExplainTableView, type ExplainViewMode };
|