footprint-explainable-ui 0.26.0 → 0.26.2
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/flowchart.cjs +17 -15
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.js +17 -15
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +17 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -624,6 +624,19 @@ interface RecorderView {
|
|
|
624
624
|
selectedIndex: number;
|
|
625
625
|
}) => React.ReactNode;
|
|
626
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* The Trace flowchart's two-colour theme (footprintjs level). `mode` selects
|
|
629
|
+
* the neutral base (unvisited / edges) for dark or light; `visited` and
|
|
630
|
+
* `current` are the two semantic colours. All optional — sensible per-mode
|
|
631
|
+
* defaults are used for anything omitted.
|
|
632
|
+
*/
|
|
633
|
+
interface TraceTheme {
|
|
634
|
+
mode?: "dark" | "light";
|
|
635
|
+
/** Executed / done nodes. */
|
|
636
|
+
visited?: string;
|
|
637
|
+
/** The node at the current cursor position ("now"). */
|
|
638
|
+
current?: string;
|
|
639
|
+
}
|
|
627
640
|
interface ExplainableShellProps extends BaseComponentProps {
|
|
628
641
|
/**
|
|
629
642
|
* Pre-converted visualization snapshots. Use when you've already called
|
|
@@ -661,6 +674,15 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
661
674
|
* time-travel trace UI.
|
|
662
675
|
*/
|
|
663
676
|
runtimeOverlay?: RuntimeOverlay | null;
|
|
677
|
+
/**
|
|
678
|
+
* Trace flowchart theme — the footprintjs-LEVEL **two-colour** scheme:
|
|
679
|
+
* `visited` (executed nodes) + `current` (the cursor node). `mode` picks the
|
|
680
|
+
* neutral base (unvisited nodes / edges follow dark/light; the background is
|
|
681
|
+
* transparent, so it inherits your container). Colours are optional — omit to
|
|
682
|
+
* use the per-mode defaults. The agent-semantic three-colour theme belongs to
|
|
683
|
+
* `<Lens>`, not here.
|
|
684
|
+
*/
|
|
685
|
+
traceTheme?: TraceTheme;
|
|
664
686
|
title?: string;
|
|
665
687
|
resultData?: Record<string, unknown> | null;
|
|
666
688
|
logs?: string[];
|
|
@@ -713,7 +735,7 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
713
735
|
*/
|
|
714
736
|
showStageId?: boolean;
|
|
715
737
|
}
|
|
716
|
-
declare function ExplainableShell({ snapshots: snapshotsProp, runtimeSnapshot, title, resultData: resultDataProp, logs, narrativeEntries, tabs, defaultTab, hideConsole, hideTabs: hideTabsProp, panelLabels, defaultExpanded, recorderViews, renderFlowchart, showStageId, traceGraph, runtimeOverlay, size, unstyled, className, style, }: ExplainableShellProps): react.JSX.Element;
|
|
738
|
+
declare function ExplainableShell({ snapshots: snapshotsProp, runtimeSnapshot, title, resultData: resultDataProp, logs, narrativeEntries, tabs, defaultTab, hideConsole, hideTabs: hideTabsProp, panelLabels, defaultExpanded, recorderViews, renderFlowchart, showStageId, traceGraph, runtimeOverlay, traceTheme, size, unstyled, className, style, }: ExplainableShellProps): react.JSX.Element;
|
|
717
739
|
|
|
718
740
|
/**
|
|
719
741
|
* TraceViewer — drop-in component that renders an `agentfootprint.exportTrace()`
|
|
@@ -1100,4 +1122,4 @@ interface CompactTimelineProps {
|
|
|
1100
1122
|
}
|
|
1101
1123
|
declare const CompactTimeline: react.NamedExoticComponent<CompactTimelineProps>;
|
|
1102
1124
|
|
|
1103
|
-
export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
|
|
1125
|
+
export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, type TraceTheme, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
|
package/dist/index.d.ts
CHANGED
|
@@ -624,6 +624,19 @@ interface RecorderView {
|
|
|
624
624
|
selectedIndex: number;
|
|
625
625
|
}) => React.ReactNode;
|
|
626
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* The Trace flowchart's two-colour theme (footprintjs level). `mode` selects
|
|
629
|
+
* the neutral base (unvisited / edges) for dark or light; `visited` and
|
|
630
|
+
* `current` are the two semantic colours. All optional — sensible per-mode
|
|
631
|
+
* defaults are used for anything omitted.
|
|
632
|
+
*/
|
|
633
|
+
interface TraceTheme {
|
|
634
|
+
mode?: "dark" | "light";
|
|
635
|
+
/** Executed / done nodes. */
|
|
636
|
+
visited?: string;
|
|
637
|
+
/** The node at the current cursor position ("now"). */
|
|
638
|
+
current?: string;
|
|
639
|
+
}
|
|
627
640
|
interface ExplainableShellProps extends BaseComponentProps {
|
|
628
641
|
/**
|
|
629
642
|
* Pre-converted visualization snapshots. Use when you've already called
|
|
@@ -661,6 +674,15 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
661
674
|
* time-travel trace UI.
|
|
662
675
|
*/
|
|
663
676
|
runtimeOverlay?: RuntimeOverlay | null;
|
|
677
|
+
/**
|
|
678
|
+
* Trace flowchart theme — the footprintjs-LEVEL **two-colour** scheme:
|
|
679
|
+
* `visited` (executed nodes) + `current` (the cursor node). `mode` picks the
|
|
680
|
+
* neutral base (unvisited nodes / edges follow dark/light; the background is
|
|
681
|
+
* transparent, so it inherits your container). Colours are optional — omit to
|
|
682
|
+
* use the per-mode defaults. The agent-semantic three-colour theme belongs to
|
|
683
|
+
* `<Lens>`, not here.
|
|
684
|
+
*/
|
|
685
|
+
traceTheme?: TraceTheme;
|
|
664
686
|
title?: string;
|
|
665
687
|
resultData?: Record<string, unknown> | null;
|
|
666
688
|
logs?: string[];
|
|
@@ -713,7 +735,7 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
713
735
|
*/
|
|
714
736
|
showStageId?: boolean;
|
|
715
737
|
}
|
|
716
|
-
declare function ExplainableShell({ snapshots: snapshotsProp, runtimeSnapshot, title, resultData: resultDataProp, logs, narrativeEntries, tabs, defaultTab, hideConsole, hideTabs: hideTabsProp, panelLabels, defaultExpanded, recorderViews, renderFlowchart, showStageId, traceGraph, runtimeOverlay, size, unstyled, className, style, }: ExplainableShellProps): react.JSX.Element;
|
|
738
|
+
declare function ExplainableShell({ snapshots: snapshotsProp, runtimeSnapshot, title, resultData: resultDataProp, logs, narrativeEntries, tabs, defaultTab, hideConsole, hideTabs: hideTabsProp, panelLabels, defaultExpanded, recorderViews, renderFlowchart, showStageId, traceGraph, runtimeOverlay, traceTheme, size, unstyled, className, style, }: ExplainableShellProps): react.JSX.Element;
|
|
717
739
|
|
|
718
740
|
/**
|
|
719
741
|
* TraceViewer — drop-in component that renders an `agentfootprint.exportTrace()`
|
|
@@ -1100,4 +1122,4 @@ interface CompactTimelineProps {
|
|
|
1100
1122
|
}
|
|
1101
1123
|
declare const CompactTimeline: react.NamedExoticComponent<CompactTimelineProps>;
|
|
1102
1124
|
|
|
1103
|
-
export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
|
|
1125
|
+
export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, type TraceTheme, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
|
package/dist/index.js
CHANGED
|
@@ -4346,8 +4346,8 @@ function SubflowBreadcrumbBar({ entries, onNavigate }) {
|
|
|
4346
4346
|
gap: 6,
|
|
4347
4347
|
padding: "6px 12px",
|
|
4348
4348
|
fontSize: 11,
|
|
4349
|
-
background:
|
|
4350
|
-
borderBottom: `1px solid ${
|
|
4349
|
+
background: theme.bgSecondary,
|
|
4350
|
+
borderBottom: `1px solid ${theme.border}`,
|
|
4351
4351
|
flexShrink: 0
|
|
4352
4352
|
},
|
|
4353
4353
|
"aria-label": "Subflow breadcrumb",
|
|
@@ -4370,7 +4370,7 @@ function SubflowBreadcrumbBar({ entries, onNavigate }) {
|
|
|
4370
4370
|
padding: 0,
|
|
4371
4371
|
fontSize: 11,
|
|
4372
4372
|
fontWeight: isLast ? 600 : 500,
|
|
4373
|
-
color: isLast ?
|
|
4373
|
+
color: isLast ? theme.textPrimary : theme.primary,
|
|
4374
4374
|
cursor: isLast ? "default" : "pointer",
|
|
4375
4375
|
textDecoration: isLast ? "none" : "underline",
|
|
4376
4376
|
fontFamily: "inherit"
|
|
@@ -4378,7 +4378,7 @@ function SubflowBreadcrumbBar({ entries, onNavigate }) {
|
|
|
4378
4378
|
children: entry.label
|
|
4379
4379
|
}
|
|
4380
4380
|
),
|
|
4381
|
-
!isLast && /* @__PURE__ */ jsx17("span", { style: { color:
|
|
4381
|
+
!isLast && /* @__PURE__ */ jsx17("span", { style: { color: theme.textMuted }, children: "\u203A" })
|
|
4382
4382
|
]
|
|
4383
4383
|
},
|
|
4384
4384
|
entry.subflowId ?? "__top__"
|
|
@@ -4391,10 +4391,9 @@ function SubflowBreadcrumbBar({ entries, onNavigate }) {
|
|
|
4391
4391
|
// src/components/GroupContainerNode/GroupContainerNode.tsx
|
|
4392
4392
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
4393
4393
|
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4394
|
-
var C = rawDefaults.colors;
|
|
4395
4394
|
function GroupContainerNode({ data }) {
|
|
4396
4395
|
const d = data;
|
|
4397
|
-
const borderColor = d.error ?
|
|
4396
|
+
const borderColor = d.error ? theme.error : d.active ? theme.primary : d.done ? theme.nodeVisited : theme.border;
|
|
4398
4397
|
return /* @__PURE__ */ jsxs17(
|
|
4399
4398
|
"div",
|
|
4400
4399
|
{
|
|
@@ -4404,8 +4403,9 @@ function GroupContainerNode({ data }) {
|
|
|
4404
4403
|
boxSizing: "border-box",
|
|
4405
4404
|
border: `1.5px ${d.active || d.done || d.error ? "solid" : "dashed"} ${borderColor}`,
|
|
4406
4405
|
borderRadius: 12,
|
|
4407
|
-
// Translucent so the dotted background + nested children
|
|
4408
|
-
|
|
4406
|
+
// Translucent (theme-derived) so the dotted background + nested children
|
|
4407
|
+
// read clearly, while still following dark/light.
|
|
4408
|
+
background: `color-mix(in srgb, ${theme.textMuted} 7%, transparent)`,
|
|
4409
4409
|
opacity: d.dimmed ? 0.4 : 1,
|
|
4410
4410
|
position: "relative"
|
|
4411
4411
|
},
|
|
@@ -4420,7 +4420,7 @@ function GroupContainerNode({ data }) {
|
|
|
4420
4420
|
padding: "8px 12px",
|
|
4421
4421
|
fontSize: 12,
|
|
4422
4422
|
fontWeight: 600,
|
|
4423
|
-
color:
|
|
4423
|
+
color: theme.textMuted,
|
|
4424
4424
|
letterSpacing: 0.2
|
|
4425
4425
|
},
|
|
4426
4426
|
children: [
|
|
@@ -6075,6 +6075,7 @@ function ExplainableShell({
|
|
|
6075
6075
|
showStageId = false,
|
|
6076
6076
|
traceGraph,
|
|
6077
6077
|
runtimeOverlay,
|
|
6078
|
+
traceTheme,
|
|
6078
6079
|
size = "default",
|
|
6079
6080
|
unstyled = false,
|
|
6080
6081
|
className,
|
|
@@ -6107,11 +6108,17 @@ function ExplainableShell({
|
|
|
6107
6108
|
}
|
|
6108
6109
|
if (i >= 0) overlayIdx = i;
|
|
6109
6110
|
}
|
|
6111
|
+
const traceColors = traceTheme && {
|
|
6112
|
+
...traceTheme.visited !== void 0 && { done: traceTheme.visited },
|
|
6113
|
+
...traceTheme.current !== void 0 && { active: traceTheme.current },
|
|
6114
|
+
...traceTheme.mode !== void 0 && { default: traceTheme.mode === "dark" ? "#94a3b8" : "#64748b" }
|
|
6115
|
+
};
|
|
6110
6116
|
return /* @__PURE__ */ jsx26(
|
|
6111
6117
|
TracedFlow,
|
|
6112
6118
|
{
|
|
6113
6119
|
graph: traceGraph,
|
|
6114
6120
|
overlay: runtimeOverlay ?? void 0,
|
|
6121
|
+
colors: traceColors || void 0,
|
|
6115
6122
|
scrubIndex: overlayIdx,
|
|
6116
6123
|
onNodeClick: (stageId) => onNodeClick?.(stageId),
|
|
6117
6124
|
onSubflowChange: (mountId) => {
|
|
@@ -6120,7 +6127,7 @@ function ExplainableShell({
|
|
|
6120
6127
|
}
|
|
6121
6128
|
);
|
|
6122
6129
|
};
|
|
6123
|
-
}, [traceGraph, runtimeOverlay]);
|
|
6130
|
+
}, [traceGraph, runtimeOverlay, traceTheme]);
|
|
6124
6131
|
const effectiveRenderFlowchart = renderFlowchart ?? tracedFlowRenderer;
|
|
6125
6132
|
const leftLabel = panelLabels?.topology ?? "Topology";
|
|
6126
6133
|
const rightLabel = panelLabels?.details ?? "Details";
|