footprint-explainable-ui 0.3.2 → 0.4.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/README.md +42 -3
- package/dist/flowchart.cjs +314 -167
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.d.cts +15 -1
- package/dist/flowchart.d.ts +15 -1
- package/dist/flowchart.js +311 -161
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +64 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +74 -21
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -137,9 +137,34 @@ function PipelineChart({ spec }) {
|
|
|
137
137
|
}
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
###
|
|
140
|
+
### Self-contained traced flowchart (recommended)
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
`TracedFlowchartView` handles everything — overlay computation, subflow drill-down, breadcrumbs. Just pass `spec` + `snapshots`:
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
import { TracedFlowchartView } from "footprint-explainable-ui/flowchart";
|
|
146
|
+
|
|
147
|
+
function MyDebugger({ spec, snapshots }) {
|
|
148
|
+
const [idx, setIdx] = useState(0);
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<div style={{ height: 400 }}>
|
|
152
|
+
<TracedFlowchartView
|
|
153
|
+
spec={spec}
|
|
154
|
+
snapshots={snapshots}
|
|
155
|
+
snapshotIndex={idx}
|
|
156
|
+
onNodeClick={(i) => setIdx(i as number)}
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Without `snapshots`, it renders a plain static flowchart. With `snapshots`, it shows the execution trace path.
|
|
164
|
+
|
|
165
|
+
### With execution overlay (manual control)
|
|
166
|
+
|
|
167
|
+
For full control, use `specToReactFlow` directly. The overlay highlights which stages have executed, which is active, and the execution path — like a Google Maps route overlay.
|
|
143
168
|
|
|
144
169
|
```tsx
|
|
145
170
|
import { specToReactFlow, type ExecutionOverlay } from "footprint-explainable-ui/flowchart";
|
|
@@ -348,7 +373,8 @@ interface ThemeTokens {
|
|
|
348
373
|
|
|
349
374
|
| Export | Description |
|
|
350
375
|
|---|---|
|
|
351
|
-
| `
|
|
376
|
+
| `TracedFlowchartView` | Self-contained flowchart with trace overlay, subflow drill-down, breadcrumbs |
|
|
377
|
+
| `FlowchartView` | Lower-level ReactFlow wrapper with execution state coloring |
|
|
352
378
|
| `StageNode` | Custom node with state-aware coloring, step badges, pulse rings |
|
|
353
379
|
| `specToReactFlow` | Convert pipeline spec → ReactFlow nodes/edges with path overlay |
|
|
354
380
|
| `TimeTravelDebugger` | Full debugger with flowchart + all panels |
|
|
@@ -373,6 +399,19 @@ All components accept a `size` prop: `"compact"`, `"default"`, or `"detailed"`.
|
|
|
373
399
|
<MemoryInspector snapshots={snapshots} size="detailed" />
|
|
374
400
|
```
|
|
375
401
|
|
|
402
|
+
### Collapsible GanttTimeline
|
|
403
|
+
|
|
404
|
+
By default, the Gantt timeline collapses to 5 rows with an expand toggle. Auto-scrolls to keep the active stage visible:
|
|
405
|
+
|
|
406
|
+
```tsx
|
|
407
|
+
<GanttTimeline
|
|
408
|
+
snapshots={snapshots}
|
|
409
|
+
selectedIndex={idx}
|
|
410
|
+
onSelect={setIdx}
|
|
411
|
+
maxVisibleRows={5} // default — set 0 to disable collapse
|
|
412
|
+
/>
|
|
413
|
+
```
|
|
414
|
+
|
|
376
415
|
## Unstyled Mode
|
|
377
416
|
|
|
378
417
|
Strip all built-in styles for full CSS control. Components render semantic `data-fp` attributes:
|