@principal-ade/dynamic-file-tree 0.2.4 → 0.2.5

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/index.mjs CHANGED
@@ -1951,7 +1951,7 @@ var MultiFileTree = ({
1951
1951
  }, "Selected: ", selectedFile.source.name, " / ", selectedFile.path));
1952
1952
  };
1953
1953
  // src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
1954
- import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, GitCommit, ExternalLink } from "lucide-react";
1954
+ import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, GitCommit, ExternalLink, List, ListX, Eye as Eye2, EyeOff as EyeOff2 } from "lucide-react";
1955
1955
  import React13, { useMemo as useMemo9, useRef as useRef5, useState as useState7, useEffect as useEffect3 } from "react";
1956
1956
  import { Tree as Tree3 } from "react-arborist";
1957
1957
 
@@ -2122,7 +2122,7 @@ var StatusBar = ({
2122
2122
  };
2123
2123
 
2124
2124
  // src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
2125
- var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionPrefix, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap) => {
2125
+ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionPrefix, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts) => {
2126
2126
  const packagesMap = new Map;
2127
2127
  const rootStoryboards = [];
2128
2128
  for (const storyboard of storyboards) {
@@ -2166,6 +2166,33 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
2166
2166
  const workflowNodeId = versionPrefix ? `workflow:${versionPrefix}:${workflow.id}` : `workflow:${workflow.id}`;
2167
2167
  const workflowGitStatus = gitStatusMap ? lookupGitStatus(workflow.path, gitStatusMap) : null;
2168
2168
  const scenarioStatus = scenarioStatusMap?.[workflow.id];
2169
+ let scenarioChildren;
2170
+ const workflowWithContent = workflow;
2171
+ if (workflowWithContent.content?.scenarios && workflowWithContent.content.scenarios.length > 0) {
2172
+ const outcomeOrder = { expected: 0, "expected-issue": 1, "unknown-issue": 2 };
2173
+ scenarioChildren = workflowWithContent.content.scenarios.map((scenario, index) => {
2174
+ const scenarioNodeId = versionPrefix ? `scenario:${versionPrefix}:${workflow.id}/${scenario.id}` : `scenario:${workflow.id}/${scenario.id}`;
2175
+ const traceCountKey = `${workflow.id}/${scenario.id}`;
2176
+ const traceCount = scenarioTraceCounts?.[traceCountKey] ?? 0;
2177
+ return {
2178
+ id: scenarioNodeId,
2179
+ name: scenario.description,
2180
+ type: "scenario",
2181
+ scenario,
2182
+ workflow,
2183
+ storyboard,
2184
+ traceCount,
2185
+ hasTraces: traceCount > 0,
2186
+ _originalIndex: index
2187
+ };
2188
+ }).sort((a, b) => {
2189
+ const aOrder = outcomeOrder[a.scenario?.outcomeType ?? "expected"];
2190
+ const bOrder = outcomeOrder[b.scenario?.outcomeType ?? "expected"];
2191
+ if (aOrder !== bOrder)
2192
+ return aOrder - bOrder;
2193
+ return (a._originalIndex ?? 0) - (b._originalIndex ?? 0);
2194
+ }).map(({ _originalIndex, ...node }) => node);
2195
+ }
2169
2196
  return {
2170
2197
  id: workflowNodeId,
2171
2198
  name: workflow.name,
@@ -2175,7 +2202,8 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
2175
2202
  isFullyCovered: workflowCoverageMap?.[workflow.id] ?? false,
2176
2203
  hasTraces: workflowHasTraces,
2177
2204
  gitStatus: workflowGitStatus,
2178
- scenarioStatus
2205
+ scenarioStatus,
2206
+ children: scenarioChildren
2179
2207
  };
2180
2208
  }).sort((a, b) => a.name.localeCompare(b.name));
2181
2209
  if (filterMode === "with-traces") {
@@ -2260,7 +2288,7 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
2260
2288
  return allStoryboards.map(buildStoryboardNode).filter((node) => node !== null).sort((a, b) => a.name.localeCompare(b.name));
2261
2289
  }
2262
2290
  };
2263
- var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMode, traceWorkflowsSet, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap) => {
2291
+ var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMode, traceWorkflowsSet, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts) => {
2264
2292
  const result = [];
2265
2293
  const repoCountMap = new Map;
2266
2294
  for (const snapshot of versionSnapshots) {
@@ -2277,7 +2305,7 @@ var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMo
2277
2305
  if (filterMode === "without-traces" && !versionHasUntracedWorkflows) {
2278
2306
  continue;
2279
2307
  }
2280
- const storyboardChildren = buildTreeDataFromStoryboards(snapshot.storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionKey, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap);
2308
+ const storyboardChildren = buildTreeDataFromStoryboards(snapshot.storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionKey, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts);
2281
2309
  if (storyboardChildren.length === 0) {
2282
2310
  continue;
2283
2311
  }
@@ -2432,7 +2460,10 @@ var StoryboardWorkflowsTreeCore = ({
2432
2460
  scenarioStatusMap,
2433
2461
  canvasNodeStatusMap,
2434
2462
  statusBarDisplay = "both",
2435
- onVersionOpen
2463
+ onVersionOpen,
2464
+ scenarioTraceCounts,
2465
+ scenarioVisibilityMap,
2466
+ onScenarioVisibilityToggle
2436
2467
  }) => {
2437
2468
  const dndProps = getDndProps(enableDragAndDrop);
2438
2469
  const parentDndManager = useParentDndManager();
@@ -2447,11 +2478,11 @@ var StoryboardWorkflowsTreeCore = ({
2447
2478
  }, [verticalNodePadding]);
2448
2479
  const treeData = useMemo9(() => {
2449
2480
  if (versionSnapshots && versionSnapshots.length > 0) {
2450
- return buildTreeDataFromVersions(versionSnapshots, workflowCoverageMap, workflowFilterMode, traceWorkflowsSet, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap);
2481
+ return buildTreeDataFromVersions(versionSnapshots, workflowCoverageMap, workflowFilterMode, traceWorkflowsSet, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts);
2451
2482
  } else {
2452
- return buildTreeDataFromStoryboards(storyboards, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, undefined, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap);
2483
+ return buildTreeDataFromStoryboards(storyboards, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, undefined, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts);
2453
2484
  }
2454
- }, [storyboards, versionSnapshots, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap]);
2485
+ }, [storyboards, versionSnapshots, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts]);
2455
2486
  const NodeRenderer = (props) => {
2456
2487
  const { node } = props;
2457
2488
  const data = node.data;
@@ -2467,11 +2498,15 @@ var StoryboardWorkflowsTreeCore = ({
2467
2498
  size: 16
2468
2499
  }) : data.type === "workflows" ? /* @__PURE__ */ React13.createElement(FolderOpen, {
2469
2500
  size: 16
2501
+ }) : data.type === "scenario" ? data.scenario?.outcomeType === "expected-issue" || data.scenario?.outcomeType === "unknown-issue" ? /* @__PURE__ */ React13.createElement(ListX, {
2502
+ size: 16
2503
+ }) : /* @__PURE__ */ React13.createElement(List, {
2504
+ size: 16
2470
2505
  }) : /* @__PURE__ */ React13.createElement(Workflow, {
2471
2506
  size: 16
2472
2507
  });
2473
- const nameColor = data.type === "version" ? data.hasTraces ? "#a855f7" : theme.colors.textMuted : data.type === "package" ? theme.colors.primary : data.type === "storyboard" ? data.hasTraces ? theme.colors.success : theme.colors.textSecondary : data.type === "overview" ? theme.colors.info || "#3b82f6" : data.type === "canvas" ? theme.colors.warning || "#f59e0b" : data.type === "workflows" ? theme.colors.text : data.type === "workflow" ? data.hasTraces ? theme.colors.textSecondary : theme.colors.textMuted : theme.colors.textSecondary;
2474
- const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" || data.type === "workflows" || data.type === "workflow" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
2508
+ const nameColor = data.type === "version" ? data.hasTraces ? "#a855f7" : theme.colors.textMuted : data.type === "package" ? theme.colors.primary : data.type === "storyboard" ? data.hasTraces ? theme.colors.success : theme.colors.textSecondary : data.type === "overview" ? theme.colors.info || "#3b82f6" : data.type === "canvas" ? theme.colors.warning || "#f59e0b" : data.type === "workflows" ? theme.colors.text : data.type === "workflow" ? data.hasTraces ? theme.colors.textSecondary : theme.colors.textMuted : data.type === "scenario" ? data.hasTraces ? theme.colors.textSecondary : theme.colors.textMuted : theme.colors.textSecondary;
2509
+ const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" || data.type === "workflows" || data.type === "workflow" || data.type === "scenario" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
2475
2510
  const rightContent = (() => {
2476
2511
  const indicators = [];
2477
2512
  if (data.type === "storyboard" && data.storyboard && scenarioStatusMap && (statusBarDisplay === "traces" || statusBarDisplay === "both")) {
@@ -2550,6 +2585,54 @@ var StoryboardWorkflowsTreeCore = ({
2550
2585
  }
2551
2586
  }
2552
2587
  }
2588
+ if (data.type === "scenario") {
2589
+ if (data.traceCount !== undefined) {
2590
+ indicators.push(/* @__PURE__ */ React13.createElement("span", {
2591
+ key: "trace-count",
2592
+ style: {
2593
+ marginLeft: "6px",
2594
+ fontSize: "11px",
2595
+ color: data.traceCount > 0 ? "#3b82f6" : theme.colors.textMuted
2596
+ }
2597
+ }, data.traceCount));
2598
+ }
2599
+ if (onScenarioVisibilityToggle && data.scenario) {
2600
+ const scenarioKey = `${data.workflow?.id}/${data.scenario.id}`;
2601
+ const isVisible = scenarioVisibilityMap?.[scenarioKey] ?? !(data.scenario.filterDefault ?? false);
2602
+ const EyeIcon = isVisible ? Eye2 : EyeOff2;
2603
+ indicators.push(/* @__PURE__ */ React13.createElement("button", {
2604
+ key: "visibility-toggle",
2605
+ onClick: (e) => {
2606
+ e.stopPropagation();
2607
+ onScenarioVisibilityToggle(scenarioKey, !isVisible);
2608
+ },
2609
+ style: {
2610
+ display: "flex",
2611
+ alignItems: "center",
2612
+ justifyContent: "center",
2613
+ marginLeft: "6px",
2614
+ padding: "2px",
2615
+ background: "transparent",
2616
+ border: "none",
2617
+ cursor: "pointer",
2618
+ color: isVisible ? theme.colors.textMuted : theme.colors.textMuted,
2619
+ opacity: isVisible ? 1 : 0.5,
2620
+ borderRadius: "4px"
2621
+ },
2622
+ onMouseEnter: (e) => {
2623
+ e.currentTarget.style.color = theme.colors.text;
2624
+ e.currentTarget.style.background = theme.colors.backgroundHover || "rgba(255,255,255,0.1)";
2625
+ },
2626
+ onMouseLeave: (e) => {
2627
+ e.currentTarget.style.color = theme.colors.textMuted;
2628
+ e.currentTarget.style.background = "transparent";
2629
+ },
2630
+ title: isVisible ? "Hide scenario" : "Show scenario"
2631
+ }, /* @__PURE__ */ React13.createElement(EyeIcon, {
2632
+ size: 14
2633
+ })));
2634
+ }
2635
+ }
2553
2636
  if (data.gitStatus && (data.type === "canvas" || data.type === "overview" || data.type === "workflow")) {
2554
2637
  const gitDisplay = getGitStatusDisplay3(data.gitStatus, theme);
2555
2638
  if (gitDisplay) {
@@ -2619,7 +2702,7 @@ var StoryboardWorkflowsTreeCore = ({
2619
2702
  return;
2620
2703
  }
2621
2704
  lastSelectionRef.current = { nodeId: nodeData.id, timestamp: now };
2622
- if (nodeData.type === "overview" || nodeData.type === "canvas" || nodeData.type === "workflow") {
2705
+ if (nodeData.type === "overview" || nodeData.type === "canvas" || nodeData.type === "workflow" || nodeData.type === "scenario") {
2623
2706
  onClick(nodeData);
2624
2707
  }
2625
2708
  };
@@ -2673,7 +2756,7 @@ function hasWorkflowContent(node) {
2673
2756
  return node.workflow !== undefined && "content" in node.workflow && node.workflow.content !== undefined;
2674
2757
  }
2675
2758
  // src/components/WorkflowScenarioTree/WorkflowScenarioTreeCore.tsx
2676
- import { Package as Package2, Workflow as Workflow2, GitCommit as GitCommit2, ListChecks, List } from "lucide-react";
2759
+ import { Package as Package2, Workflow as Workflow2, GitCommit as GitCommit2, ListChecks, List as List2 } from "lucide-react";
2677
2760
  import React14, { useMemo as useMemo10 } from "react";
2678
2761
  import { Tree as Tree4 } from "react-arborist";
2679
2762
  var buildTreeDataFromWorkflows = (workflows, workflowTraceCounts, scenarioTraceCounts, filterMode, minTraceCount) => {
@@ -2848,7 +2931,7 @@ var WorkflowScenarioTreeCore = ({
2848
2931
  size: 16
2849
2932
  }) : data.type === "scenario" ? data.hasTraces ? /* @__PURE__ */ React14.createElement(ListChecks, {
2850
2933
  size: 16
2851
- }) : /* @__PURE__ */ React14.createElement(List, {
2934
+ }) : /* @__PURE__ */ React14.createElement(List2, {
2852
2935
  size: 16
2853
2936
  }) : null;
2854
2937
  const nameColor = data.type === "version" ? data.hasTraces ? "#a855f7" : theme.colors.textMuted : data.type === "package" ? theme.colors.primary : data.type === "workflow" ? data.hasTraces ? theme.colors.success : theme.colors.textSecondary : data.hasTraces ? theme.colors.secondary : theme.colors.textMuted;
@@ -3707,7 +3790,7 @@ var calculateTelemetryCoverageStats = (coverageData) => {
3707
3790
  };
3708
3791
  };
3709
3792
  // src/components/TelemetryCoverageFileTreeContainer.tsx
3710
- import { RefreshCw as RefreshCw2, Eye as Eye2, EyeOff as EyeOff2, AlertCircle as AlertCircle5, Activity as Activity2 } from "lucide-react";
3793
+ import { RefreshCw as RefreshCw2, Eye as Eye3, EyeOff as EyeOff3, AlertCircle as AlertCircle5, Activity as Activity2 } from "lucide-react";
3711
3794
  import React18, { useState as useState9, useMemo as useMemo14 } from "react";
3712
3795
  var TelemetryCoverageFileTreeContainer = ({
3713
3796
  fileTree,
@@ -3800,9 +3883,9 @@ var TelemetryCoverageFileTreeContainer = ({
3800
3883
  color: theme.colors.text
3801
3884
  },
3802
3885
  title: showUncoveredFiles ? "Show only covered files" : "Show all test files"
3803
- }, showUncoveredFiles ? /* @__PURE__ */ React18.createElement(EyeOff2, {
3886
+ }, showUncoveredFiles ? /* @__PURE__ */ React18.createElement(EyeOff3, {
3804
3887
  size: 14
3805
- }) : /* @__PURE__ */ React18.createElement(Eye2, {
3888
+ }) : /* @__PURE__ */ React18.createElement(Eye3, {
3806
3889
  size: 14
3807
3890
  }), showUncoveredFiles ? "Hide uncovered" : "Show all"), onRefresh && /* @__PURE__ */ React18.createElement("button", {
3808
3891
  onClick: handleRefresh,
@@ -32,4 +32,12 @@ export declare const GitStatusWithVersionGrouping: Story;
32
32
  export declare const GitStatusMixedScenarios: Story;
33
33
  export declare const DragAndDropTest: Story;
34
34
  export declare const WithStatusBars: Story;
35
+ /**
36
+ * Workflows with Scenarios
37
+ *
38
+ * When workflows have content with scenarios (DiscoveredWorkflowWithContent),
39
+ * the scenarios are shown as expandable children under the workflow node.
40
+ * Each scenario displays its description and trace count.
41
+ */
42
+ export declare const WorkflowsWithScenarios: Story;
35
43
  //# sourceMappingURL=StoryboardWorkflowsTree.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StoryboardWorkflowsTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAyP5E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,2BAA2B,CAOlD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,O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EF,eAAO,MAAM,oBAAoB,EAAE,KAiBlC,CAAC;AA4CF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAqEvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAyFvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAiH9B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KA2GzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAyEzC,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,KAwF3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KA0H/B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAwF1C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAuIrC,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,KAqK7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAoH5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,KA0JpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAEV,4BAA4B,EAO7B,MAAM,SAAS,CAAC;AAgZjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA6X9E,CAAC"}
1
+ {"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AAubjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAuc9E,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type { Theme } from '@principal-ade/industry-theme';
2
- import type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, VersionSnapshot } from '@principal-ai/principal-view-core';
2
+ import type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, WorkflowScenario, ScenarioOutcomeType, VersionSnapshot } from '@principal-ai/principal-view-core';
3
3
  import type { GitFileStatus, GitStatus } from '../../utils/gitStatus';
4
4
  import type { TreeNodeData, DragConfig } from '../TreeNode';
5
- export type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, VersionSnapshot };
6
- export type StoryboardWorkflowNodeType = 'version' | 'package' | 'storyboard' | 'overview' | 'canvas' | 'workflows' | 'workflow';
5
+ export type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, WorkflowScenario, ScenarioOutcomeType, VersionSnapshot };
6
+ export type StoryboardWorkflowNodeType = 'version' | 'package' | 'storyboard' | 'overview' | 'canvas' | 'workflows' | 'workflow' | 'scenario';
7
7
  /**
8
8
  * Storyboard filter mode for filtering workflows by trace status
9
9
  * - 'all': Show all workflows (default)
@@ -47,6 +47,8 @@ export interface StoryboardWorkflowNodeData extends TreeNodeData {
47
47
  storyboard?: DiscoveredStoryboard;
48
48
  canvas?: DiscoveredCanvas;
49
49
  workflow?: DiscoveredWorkflow | DiscoveredWorkflowWithContent;
50
+ scenario?: WorkflowScenario;
51
+ traceCount?: number;
50
52
  packageName?: string;
51
53
  scope?: 'package' | 'root';
52
54
  markdownPath?: string;
@@ -101,6 +103,12 @@ export interface StoryboardWorkflowsTreeProps {
101
103
  canvasNodeStatusMap?: Record<string, CanvasNodeStatus>;
102
104
  /** Which status bars to display: 'implementation', 'traces', or 'both' (default: 'both') */
103
105
  statusBarDisplay?: StatusBarDisplay;
106
+ /** Map of scenario ID to trace count (format: "workflowId/scenarioId") */
107
+ scenarioTraceCounts?: Record<string, number>;
108
+ /** Map of scenario ID to visibility state (format: "workflowId/scenarioId"). True = visible (eye open), false = hidden (eye closed) */
109
+ scenarioVisibilityMap?: Record<string, boolean>;
110
+ /** Callback when scenario visibility is toggled */
111
+ onScenarioVisibilityToggle?: (scenarioId: string, isVisible: boolean) => void;
104
112
  /**
105
113
  * Enable dragging nodes to other panels (e.g., terminal).
106
114
  * When enabled, nodes will transfer their path/data using the panel-framework-core format.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEtL,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG5D,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAE7I,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAEjI;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,0CAA0C;IAC1C,SAAS,EAAE,KAAK,CAAC;QAC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,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAG9E;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,UAAU,GAAG,SAAS,CAAC;IAE7E;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principal-ade/dynamic-file-tree",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "React component for selective directory filtering and file tree visualization",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -81,7 +81,7 @@
81
81
  "@principal-ade/industry-theme": "^0.1.8",
82
82
  "@principal-ade/panel-framework-core": "^0.5.1",
83
83
  "@principal-ai/alexandria-core-library": "^0.3.3",
84
- "@principal-ai/principal-view-core": "^0.24.43",
84
+ "@principal-ai/principal-view-core": "0.24.58",
85
85
  "@principal-ai/repository-abstraction": "^0.5.7",
86
86
  "@storybook/addon-docs": "^10.2.14",
87
87
  "@storybook/addon-onboarding": "^10.2.14",