footprint-explainable-ui 0.19.0 → 0.20.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 +34 -8
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.d.cts +72 -5
- package/dist/flowchart.d.ts +72 -5
- package/dist/flowchart.js +89 -63
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +75 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4101,6 +4101,9 @@ var DEFAULT_COLORS = {
|
|
|
4101
4101
|
loop: rawDefaults.colors.warning
|
|
4102
4102
|
};
|
|
4103
4103
|
function toStageNodeWithOverlay(node, doneStageIds, activeStageId, errorMessage, executedOrderIds) {
|
|
4104
|
+
if (node.type !== void 0 && node.type !== "stage") {
|
|
4105
|
+
return node;
|
|
4106
|
+
}
|
|
4104
4107
|
const isDone = doneStageIds.has(node.id);
|
|
4105
4108
|
const isActive = activeStageId === node.id;
|
|
4106
4109
|
const wasExecuted = isDone || isActive;
|
|
@@ -4165,7 +4168,7 @@ function styleEdgeWithOverlay(edge, doneStageIds, activeStageId, colors) {
|
|
|
4165
4168
|
}
|
|
4166
4169
|
return styled;
|
|
4167
4170
|
}
|
|
4168
|
-
var
|
|
4171
|
+
var DEFAULT_NODE_TYPES = { stageNode: StageNode };
|
|
4169
4172
|
function TracedFlow({
|
|
4170
4173
|
graph,
|
|
4171
4174
|
overlay,
|
|
@@ -4174,6 +4177,9 @@ function TracedFlow({
|
|
|
4174
4177
|
colors: colorOverrides,
|
|
4175
4178
|
onNodeClick,
|
|
4176
4179
|
onSubflowChange,
|
|
4180
|
+
nodeTypes: userNodeTypes,
|
|
4181
|
+
edgeTypes: userEdgeTypes,
|
|
4182
|
+
children,
|
|
4177
4183
|
className,
|
|
4178
4184
|
style
|
|
4179
4185
|
}) {
|
|
@@ -4182,6 +4188,10 @@ function TracedFlow({
|
|
|
4182
4188
|
() => ({ ...DEFAULT_COLORS, ...colorOverrides ?? {} }),
|
|
4183
4189
|
[colorOverrides]
|
|
4184
4190
|
);
|
|
4191
|
+
const mergedNodeTypes = (0, import_react21.useMemo)(
|
|
4192
|
+
() => userNodeTypes ? { ...DEFAULT_NODE_TYPES, ...userNodeTypes } : DEFAULT_NODE_TYPES,
|
|
4193
|
+
[userNodeTypes]
|
|
4194
|
+
);
|
|
4185
4195
|
const drill = useSubflowDrill(graph, onSubflowChange);
|
|
4186
4196
|
const filteredGraph = (0, import_react21.useMemo)(
|
|
4187
4197
|
() => filterGraphForDrill(graph, drill.currentSubflowId),
|
|
@@ -4260,17 +4270,21 @@ function TracedFlow({
|
|
|
4260
4270
|
onNavigate: drill.setCurrentSubflowId
|
|
4261
4271
|
}
|
|
4262
4272
|
),
|
|
4263
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.
|
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4264
4274
|
import_react22.ReactFlow,
|
|
4265
4275
|
{
|
|
4266
4276
|
nodes: reactFlowNodes,
|
|
4267
4277
|
edges: reactFlowEdges,
|
|
4268
|
-
nodeTypes,
|
|
4278
|
+
nodeTypes: mergedNodeTypes,
|
|
4279
|
+
...userEdgeTypes && { edgeTypes: userEdgeTypes },
|
|
4269
4280
|
onNodeClick: handleNodeClick,
|
|
4270
4281
|
onInit: setRfInstance,
|
|
4271
4282
|
fitView: true,
|
|
4272
4283
|
proOptions: { hideAttribution: true },
|
|
4273
|
-
children:
|
|
4284
|
+
children: [
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react22.Background, { variant: import_react22.BackgroundVariant.Dots, gap: 20, size: 1 }),
|
|
4286
|
+
children
|
|
4287
|
+
]
|
|
4274
4288
|
}
|
|
4275
4289
|
) })
|
|
4276
4290
|
]
|