footprint-explainable-ui 0.27.0 → 0.28.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/dist/flowchart.cjs +35 -2
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.d.cts +12 -1
- package/dist/flowchart.d.ts +12 -1
- package/dist/flowchart.js +35 -2
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +71 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +71 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/flowchart.d.cts
CHANGED
|
@@ -997,6 +997,17 @@ interface TracedFlowProps extends BaseComponentProps {
|
|
|
997
997
|
* none — single-active behaviour is unchanged.
|
|
998
998
|
*/
|
|
999
999
|
coActiveStageIds?: ReadonlySet<string>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Dependency-CONE overlay (the variable backward slice painted on the
|
|
1002
|
+
* chart): a map of chart node id → BFS depth (0 = the slice anchor/writer).
|
|
1003
|
+
* Nodes NOT in the map dim to near-transparency; members re-light with a
|
|
1004
|
+
* staggered transition-delay by depth — causality walks BACKWARDS across
|
|
1005
|
+
* the chart when the cone changes. Edges with either endpoint outside the
|
|
1006
|
+
* cone dim too. `undefined`/`null` = no cone, byte-identical rendering.
|
|
1007
|
+
* Keys are chart node ids (the stage part of a runtimeStageId — strip
|
|
1008
|
+
* `#N` before passing).
|
|
1009
|
+
*/
|
|
1010
|
+
sliceCone?: ReadonlyMap<string, number> | null;
|
|
1000
1011
|
/**
|
|
1001
1012
|
* Subflow ids to render as GROUP CONTAINER boxes — the subflow's member
|
|
1002
1013
|
* stages render NESTED inside the box (xyflow `parentId` + `extent`),
|
|
@@ -1024,7 +1035,7 @@ interface TracedFlowProps extends BaseComponentProps {
|
|
|
1024
1035
|
*/
|
|
1025
1036
|
children?: react.ReactNode;
|
|
1026
1037
|
}
|
|
1027
|
-
declare function TracedFlow({ graph, overlay, scrubIndex, layout: layoutProp, colors: colorOverrides, onNodeClick, onSubflowChange, groupedSubflows, mainChartBox, nodeTypes: userNodeTypes, edgeTypes: userEdgeTypes, coActiveStageIds, children, className, style, }: TracedFlowProps): react.JSX.Element;
|
|
1038
|
+
declare function TracedFlow({ graph, overlay, scrubIndex, layout: layoutProp, colors: colorOverrides, onNodeClick, onSubflowChange, groupedSubflows, mainChartBox, nodeTypes: userNodeTypes, edgeTypes: userEdgeTypes, coActiveStageIds, sliceCone, children, className, style, }: TracedFlowProps): react.JSX.Element;
|
|
1028
1039
|
|
|
1029
1040
|
interface GroupContainerNodeData {
|
|
1030
1041
|
label: string;
|
package/dist/flowchart.d.ts
CHANGED
|
@@ -997,6 +997,17 @@ interface TracedFlowProps extends BaseComponentProps {
|
|
|
997
997
|
* none — single-active behaviour is unchanged.
|
|
998
998
|
*/
|
|
999
999
|
coActiveStageIds?: ReadonlySet<string>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Dependency-CONE overlay (the variable backward slice painted on the
|
|
1002
|
+
* chart): a map of chart node id → BFS depth (0 = the slice anchor/writer).
|
|
1003
|
+
* Nodes NOT in the map dim to near-transparency; members re-light with a
|
|
1004
|
+
* staggered transition-delay by depth — causality walks BACKWARDS across
|
|
1005
|
+
* the chart when the cone changes. Edges with either endpoint outside the
|
|
1006
|
+
* cone dim too. `undefined`/`null` = no cone, byte-identical rendering.
|
|
1007
|
+
* Keys are chart node ids (the stage part of a runtimeStageId — strip
|
|
1008
|
+
* `#N` before passing).
|
|
1009
|
+
*/
|
|
1010
|
+
sliceCone?: ReadonlyMap<string, number> | null;
|
|
1000
1011
|
/**
|
|
1001
1012
|
* Subflow ids to render as GROUP CONTAINER boxes — the subflow's member
|
|
1002
1013
|
* stages render NESTED inside the box (xyflow `parentId` + `extent`),
|
|
@@ -1024,7 +1035,7 @@ interface TracedFlowProps extends BaseComponentProps {
|
|
|
1024
1035
|
*/
|
|
1025
1036
|
children?: react.ReactNode;
|
|
1026
1037
|
}
|
|
1027
|
-
declare function TracedFlow({ graph, overlay, scrubIndex, layout: layoutProp, colors: colorOverrides, onNodeClick, onSubflowChange, groupedSubflows, mainChartBox, nodeTypes: userNodeTypes, edgeTypes: userEdgeTypes, coActiveStageIds, children, className, style, }: TracedFlowProps): react.JSX.Element;
|
|
1038
|
+
declare function TracedFlow({ graph, overlay, scrubIndex, layout: layoutProp, colors: colorOverrides, onNodeClick, onSubflowChange, groupedSubflows, mainChartBox, nodeTypes: userNodeTypes, edgeTypes: userEdgeTypes, coActiveStageIds, sliceCone, children, className, style, }: TracedFlowProps): react.JSX.Element;
|
|
1028
1039
|
|
|
1029
1040
|
interface GroupContainerNodeData {
|
|
1030
1041
|
label: string;
|
package/dist/flowchart.js
CHANGED
|
@@ -2625,6 +2625,7 @@ function TracedFlow({
|
|
|
2625
2625
|
nodeTypes: userNodeTypes,
|
|
2626
2626
|
edgeTypes: userEdgeTypes,
|
|
2627
2627
|
coActiveStageIds,
|
|
2628
|
+
sliceCone,
|
|
2628
2629
|
children,
|
|
2629
2630
|
className,
|
|
2630
2631
|
style
|
|
@@ -2726,6 +2727,38 @@ function TracedFlow({
|
|
|
2726
2727
|
),
|
|
2727
2728
|
[positioned.edges, slice, colors]
|
|
2728
2729
|
);
|
|
2730
|
+
const [coneRevealed, setConeRevealed] = useState4(false);
|
|
2731
|
+
useEffect7(() => {
|
|
2732
|
+
if (!sliceCone) return;
|
|
2733
|
+
setConeRevealed(false);
|
|
2734
|
+
const raf = requestAnimationFrame(() => setConeRevealed(true));
|
|
2735
|
+
return () => cancelAnimationFrame(raf);
|
|
2736
|
+
}, [sliceCone]);
|
|
2737
|
+
const conedNodes = useMemo5(() => {
|
|
2738
|
+
if (!sliceCone || sliceCone.size === 0) return reactFlowNodes;
|
|
2739
|
+
return reactFlowNodes.map((n) => {
|
|
2740
|
+
const depth = sliceCone.get(n.id);
|
|
2741
|
+
if (depth === void 0) {
|
|
2742
|
+
return { ...n, style: { ...n.style, opacity: 0.22, transition: "opacity 260ms ease" } };
|
|
2743
|
+
}
|
|
2744
|
+
return {
|
|
2745
|
+
...n,
|
|
2746
|
+
style: {
|
|
2747
|
+
...n.style,
|
|
2748
|
+
opacity: coneRevealed ? 1 : 0.22,
|
|
2749
|
+
transition: "opacity 320ms ease",
|
|
2750
|
+
transitionDelay: `${depth * 90}ms`
|
|
2751
|
+
}
|
|
2752
|
+
};
|
|
2753
|
+
});
|
|
2754
|
+
}, [reactFlowNodes, sliceCone, coneRevealed]);
|
|
2755
|
+
const conedEdges = useMemo5(() => {
|
|
2756
|
+
if (!sliceCone || sliceCone.size === 0) return reactFlowEdges;
|
|
2757
|
+
return reactFlowEdges.map((e) => {
|
|
2758
|
+
const inCone = sliceCone.has(e.source) && sliceCone.has(e.target);
|
|
2759
|
+
return inCone ? e : { ...e, style: { ...e.style, opacity: 0.12, transition: "opacity 260ms ease" } };
|
|
2760
|
+
});
|
|
2761
|
+
}, [reactFlowEdges, sliceCone]);
|
|
2729
2762
|
const handleNodeClick = useCallback3(
|
|
2730
2763
|
(_, node) => {
|
|
2731
2764
|
const data = node.data ?? {};
|
|
@@ -2767,8 +2800,8 @@ function TracedFlow({
|
|
|
2767
2800
|
/* @__PURE__ */ jsx11("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsxs8(
|
|
2768
2801
|
ReactFlow2,
|
|
2769
2802
|
{
|
|
2770
|
-
nodes:
|
|
2771
|
-
edges:
|
|
2803
|
+
nodes: conedNodes,
|
|
2804
|
+
edges: conedEdges,
|
|
2772
2805
|
nodeTypes: mergedNodeTypes,
|
|
2773
2806
|
edgeTypes: mergedEdgeTypes,
|
|
2774
2807
|
onNodeClick: handleNodeClick,
|