@principal-ade/dynamic-file-tree 0.1.66 → 0.1.68
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.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +254 -95
- package/dist/src/components/CanvasListTree/CanvasListTreeCore.d.ts.map +1 -1
- package/dist/src/components/CanvasListTree/types.d.ts +3 -0
- package/dist/src/components/CanvasListTree/types.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts +4 -0
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/types.d.ts +3 -0
- package/dist/src/components/StoryboardWorkflowsTree/types.d.ts.map +1 -1
- package/dist/src/components/WorkflowScenarioTree/WorkflowScenarioTree.stories.d.ts.map +1 -1
- package/dist/src/utils/gitStatus.d.ts +35 -0
- package/dist/src/utils/gitStatus.d.ts.map +1 -0
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type { GitOrderedFileListProps } from './src/components/GitOrderedFileLis
|
|
|
13
13
|
export { FileTreeContainer } from './src/components/FileTreeContainer';
|
|
14
14
|
export type { FileTreeContainerProps } from './src/components/FileTreeContainer';
|
|
15
15
|
export { GitStatusFileTree } from './src/components/GitStatusFileTree';
|
|
16
|
-
export type { GitStatusFileTreeProps
|
|
16
|
+
export type { GitStatusFileTreeProps } from './src/components/GitStatusFileTree';
|
|
17
17
|
export { GitStatusFileTreeContainer } from './src/components/GitStatusFileTreeContainer';
|
|
18
18
|
export type { GitStatusFileTreeContainerProps } from './src/components/GitStatusFileTreeContainer';
|
|
19
19
|
export { MultiFileTree, MultiFileTreeCore } from './src/components/MultiFileTree';
|
|
@@ -31,4 +31,6 @@ export { TelemetryCoverageFileTreeContainer } from './src/components/TelemetryCo
|
|
|
31
31
|
export type { TelemetryCoverageFileTreeContainerProps } from './src/components/TelemetryCoverageFileTreeContainer';
|
|
32
32
|
export { combineRepositoryTrees, filterFileTreeByPaths, parseUnifiedPath, updateTreePaths, extractNameFromPath, } from './src/utils/multiTree';
|
|
33
33
|
export type { CombineTreesOptions, ParsedPath } from './src/utils/multiTree';
|
|
34
|
+
export { buildGitStatusMap, lookupGitStatus, getGitStatusDisplay, } from './src/utils/gitStatus';
|
|
35
|
+
export type { GitStatus, GitFileStatus, GitStatusDisplay, } from './src/utils/gitStatus';
|
|
34
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAGxG,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGhG,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,YAAY,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAGnF,OAAO,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V,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,MAAM,uBAAuB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1890,9 +1890,118 @@ var MultiFileTree = ({
|
|
|
1890
1890
|
};
|
|
1891
1891
|
// src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
|
|
1892
1892
|
import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, CheckCircle2, GitCommit, CircleDot, Circle } from "lucide-react";
|
|
1893
|
-
import
|
|
1893
|
+
import React12, { useMemo as useMemo9, useRef as useRef5 } from "react";
|
|
1894
1894
|
import { Tree as Tree3 } from "react-arborist";
|
|
1895
|
-
|
|
1895
|
+
|
|
1896
|
+
// src/utils/gitStatus.tsx
|
|
1897
|
+
import React11 from "react";
|
|
1898
|
+
import {
|
|
1899
|
+
Plus as Plus3,
|
|
1900
|
+
Minus as Minus3,
|
|
1901
|
+
Edit as Edit3,
|
|
1902
|
+
AlertCircle as AlertCircle4,
|
|
1903
|
+
GitBranch as GitBranch3,
|
|
1904
|
+
FileQuestion as FileQuestion3
|
|
1905
|
+
} from "lucide-react";
|
|
1906
|
+
function getGitStatusDisplay3(status, theme) {
|
|
1907
|
+
switch (status) {
|
|
1908
|
+
case "M":
|
|
1909
|
+
case "MM":
|
|
1910
|
+
return {
|
|
1911
|
+
icon: /* @__PURE__ */ React11.createElement(Edit3, {
|
|
1912
|
+
size: 14
|
|
1913
|
+
}),
|
|
1914
|
+
color: theme.colors.primary || "#007bff",
|
|
1915
|
+
label: "Modified"
|
|
1916
|
+
};
|
|
1917
|
+
case "A":
|
|
1918
|
+
return {
|
|
1919
|
+
icon: /* @__PURE__ */ React11.createElement(Plus3, {
|
|
1920
|
+
size: 14
|
|
1921
|
+
}),
|
|
1922
|
+
color: "#28a745",
|
|
1923
|
+
label: "Added"
|
|
1924
|
+
};
|
|
1925
|
+
case "D":
|
|
1926
|
+
return {
|
|
1927
|
+
icon: /* @__PURE__ */ React11.createElement(Minus3, {
|
|
1928
|
+
size: 14
|
|
1929
|
+
}),
|
|
1930
|
+
color: "#dc3545",
|
|
1931
|
+
label: "Deleted"
|
|
1932
|
+
};
|
|
1933
|
+
case "R":
|
|
1934
|
+
return {
|
|
1935
|
+
icon: /* @__PURE__ */ React11.createElement(GitBranch3, {
|
|
1936
|
+
size: 14
|
|
1937
|
+
}),
|
|
1938
|
+
color: "#6f42c1",
|
|
1939
|
+
label: "Renamed"
|
|
1940
|
+
};
|
|
1941
|
+
case "C":
|
|
1942
|
+
return {
|
|
1943
|
+
icon: /* @__PURE__ */ React11.createElement(GitBranch3, {
|
|
1944
|
+
size: 14
|
|
1945
|
+
}),
|
|
1946
|
+
color: "#20c997",
|
|
1947
|
+
label: "Copied"
|
|
1948
|
+
};
|
|
1949
|
+
case "U":
|
|
1950
|
+
return {
|
|
1951
|
+
icon: /* @__PURE__ */ React11.createElement(AlertCircle4, {
|
|
1952
|
+
size: 14
|
|
1953
|
+
}),
|
|
1954
|
+
color: "#fd7e14",
|
|
1955
|
+
label: "Unmerged"
|
|
1956
|
+
};
|
|
1957
|
+
case "??":
|
|
1958
|
+
return {
|
|
1959
|
+
icon: /* @__PURE__ */ React11.createElement(FileQuestion3, {
|
|
1960
|
+
size: 14
|
|
1961
|
+
}),
|
|
1962
|
+
color: "#6c757d",
|
|
1963
|
+
label: "Untracked"
|
|
1964
|
+
};
|
|
1965
|
+
case "AM":
|
|
1966
|
+
return {
|
|
1967
|
+
icon: /* @__PURE__ */ React11.createElement(Plus3, {
|
|
1968
|
+
size: 14
|
|
1969
|
+
}),
|
|
1970
|
+
color: "#17a2b8",
|
|
1971
|
+
label: "Added & Modified"
|
|
1972
|
+
};
|
|
1973
|
+
default:
|
|
1974
|
+
return null;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
function buildGitStatusMap(gitStatusData) {
|
|
1978
|
+
const map = new Map;
|
|
1979
|
+
for (const fileStatus of gitStatusData) {
|
|
1980
|
+
if (fileStatus.status) {
|
|
1981
|
+
map.set(fileStatus.filePath, fileStatus.status);
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
return map;
|
|
1985
|
+
}
|
|
1986
|
+
function lookupGitStatus(filePath, gitStatusMap) {
|
|
1987
|
+
if (!filePath)
|
|
1988
|
+
return null;
|
|
1989
|
+
if (gitStatusMap.has(filePath)) {
|
|
1990
|
+
return gitStatusMap.get(filePath) || null;
|
|
1991
|
+
}
|
|
1992
|
+
const fileName = filePath.split("/").pop();
|
|
1993
|
+
if (fileName) {
|
|
1994
|
+
for (const [gitPath, status] of gitStatusMap.entries()) {
|
|
1995
|
+
if (gitPath.endsWith(fileName) || gitPath.endsWith(filePath)) {
|
|
1996
|
+
return status;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
return null;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
// src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
|
|
2004
|
+
var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionPrefix, gitStatusMap) => {
|
|
1896
2005
|
const packagesMap = new Map;
|
|
1897
2006
|
const rootStoryboards = [];
|
|
1898
2007
|
for (const storyboard of storyboards) {
|
|
@@ -1907,27 +2016,32 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
1907
2016
|
const buildStoryboardNode = (storyboard) => {
|
|
1908
2017
|
const children = [];
|
|
1909
2018
|
const canvasId = versionPrefix ? `canvas:${versionPrefix}:${storyboard.id}` : `canvas:${storyboard.id}`;
|
|
2019
|
+
const canvasGitStatus = gitStatusMap ? lookupGitStatus(storyboard.canvas.path, gitStatusMap) : null;
|
|
1910
2020
|
children.push({
|
|
1911
2021
|
id: canvasId,
|
|
1912
2022
|
name: "Storyboard",
|
|
1913
2023
|
type: "canvas",
|
|
1914
2024
|
canvas: storyboard.canvas,
|
|
1915
|
-
storyboard
|
|
2025
|
+
storyboard,
|
|
2026
|
+
gitStatus: canvasGitStatus
|
|
1916
2027
|
});
|
|
1917
2028
|
if (storyboard.canvas.markdownPath) {
|
|
1918
2029
|
const overviewId = versionPrefix ? `overview:${versionPrefix}:${storyboard.id}` : `overview:${storyboard.id}`;
|
|
2030
|
+
const overviewGitStatus = gitStatusMap ? lookupGitStatus(storyboard.canvas.markdownPath, gitStatusMap) : null;
|
|
1919
2031
|
children.push({
|
|
1920
2032
|
id: overviewId,
|
|
1921
2033
|
name: "Overview",
|
|
1922
2034
|
type: "overview",
|
|
1923
2035
|
storyboard,
|
|
1924
|
-
markdownPath: storyboard.canvas.markdownPath
|
|
2036
|
+
markdownPath: storyboard.canvas.markdownPath,
|
|
2037
|
+
gitStatus: overviewGitStatus
|
|
1925
2038
|
});
|
|
1926
2039
|
}
|
|
1927
2040
|
if (storyboard.workflows.length > 0) {
|
|
1928
2041
|
let workflowNodes = storyboard.workflows.map((workflow) => {
|
|
1929
2042
|
const workflowHasTraces = traceWorkflowsSet?.has(workflow.id) ?? false;
|
|
1930
2043
|
const workflowNodeId = versionPrefix ? `workflow:${versionPrefix}:${workflow.id}` : `workflow:${workflow.id}`;
|
|
2044
|
+
const workflowGitStatus = gitStatusMap ? lookupGitStatus(workflow.path, gitStatusMap) : null;
|
|
1931
2045
|
return {
|
|
1932
2046
|
id: workflowNodeId,
|
|
1933
2047
|
name: workflow.name,
|
|
@@ -1935,7 +2049,8 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
1935
2049
|
workflow,
|
|
1936
2050
|
storyboard,
|
|
1937
2051
|
isFullyCovered: workflowCoverageMap?.[workflow.id] ?? false,
|
|
1938
|
-
hasTraces: workflowHasTraces
|
|
2052
|
+
hasTraces: workflowHasTraces,
|
|
2053
|
+
gitStatus: workflowGitStatus
|
|
1939
2054
|
};
|
|
1940
2055
|
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
1941
2056
|
if (filterMode === "with-traces") {
|
|
@@ -2020,7 +2135,7 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2020
2135
|
return allStoryboards.map(buildStoryboardNode).filter((node) => node !== null).sort((a, b) => a.name.localeCompare(b.name));
|
|
2021
2136
|
}
|
|
2022
2137
|
};
|
|
2023
|
-
var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMode, traceWorkflowsSet) => {
|
|
2138
|
+
var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMode, traceWorkflowsSet, gitStatusMap) => {
|
|
2024
2139
|
const result = [];
|
|
2025
2140
|
for (const snapshot of versionSnapshots) {
|
|
2026
2141
|
const versionKey = `${snapshot.repositoryUrl}@${snapshot.commitSha}`;
|
|
@@ -2032,7 +2147,7 @@ var buildTreeDataFromVersions = (versionSnapshots, workflowCoverageMap, filterMo
|
|
|
2032
2147
|
if (filterMode === "without-traces" && !versionHasUntracedWorkflows) {
|
|
2033
2148
|
continue;
|
|
2034
2149
|
}
|
|
2035
|
-
const storyboardChildren = buildTreeDataFromStoryboards(snapshot.storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionKey);
|
|
2150
|
+
const storyboardChildren = buildTreeDataFromStoryboards(snapshot.storyboards, workflowCoverageMap, traceWorkflowsSet, filterMode, versionKey, gitStatusMap);
|
|
2036
2151
|
if (storyboardChildren.length === 0) {
|
|
2037
2152
|
continue;
|
|
2038
2153
|
}
|
|
@@ -2065,9 +2180,13 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2065
2180
|
workflowCoverageMap,
|
|
2066
2181
|
versionSnapshots,
|
|
2067
2182
|
workflowFilterMode = "all",
|
|
2068
|
-
traceWorkflowsSet
|
|
2183
|
+
traceWorkflowsSet,
|
|
2184
|
+
gitStatusData
|
|
2069
2185
|
}) => {
|
|
2070
2186
|
const dndProps = getDndProps(enableDragAndDrop);
|
|
2187
|
+
const gitStatusMap = useMemo9(() => {
|
|
2188
|
+
return gitStatusData ? buildGitStatusMap(gitStatusData) : new Map;
|
|
2189
|
+
}, [gitStatusData]);
|
|
2071
2190
|
const rowHeight = useMemo9(() => {
|
|
2072
2191
|
const paddingValue = parseFloat(verticalNodePadding);
|
|
2073
2192
|
const contentLineHeight = 20;
|
|
@@ -2076,60 +2195,77 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2076
2195
|
}, [verticalNodePadding]);
|
|
2077
2196
|
const treeData = useMemo9(() => {
|
|
2078
2197
|
if (versionSnapshots && versionSnapshots.length > 0) {
|
|
2079
|
-
return buildTreeDataFromVersions(versionSnapshots, workflowCoverageMap, workflowFilterMode, traceWorkflowsSet);
|
|
2198
|
+
return buildTreeDataFromVersions(versionSnapshots, workflowCoverageMap, workflowFilterMode, traceWorkflowsSet, gitStatusMap);
|
|
2080
2199
|
} else {
|
|
2081
|
-
return buildTreeDataFromStoryboards(storyboards, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode);
|
|
2200
|
+
return buildTreeDataFromStoryboards(storyboards, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, undefined, gitStatusMap);
|
|
2082
2201
|
}
|
|
2083
|
-
}, [storyboards, versionSnapshots, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode]);
|
|
2202
|
+
}, [storyboards, versionSnapshots, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, gitStatusMap]);
|
|
2084
2203
|
const NodeRenderer = (props) => {
|
|
2085
2204
|
const { node } = props;
|
|
2086
2205
|
const data = node.data;
|
|
2087
|
-
const icon = data.type === "version" ? /* @__PURE__ */
|
|
2206
|
+
const icon = data.type === "version" ? /* @__PURE__ */ React12.createElement(GitCommit, {
|
|
2088
2207
|
size: 16
|
|
2089
|
-
}) : data.type === "package" ? /* @__PURE__ */
|
|
2208
|
+
}) : data.type === "package" ? /* @__PURE__ */ React12.createElement(Package, {
|
|
2090
2209
|
size: 16
|
|
2091
|
-
}) : data.type === "storyboard" ? /* @__PURE__ */
|
|
2210
|
+
}) : data.type === "storyboard" ? /* @__PURE__ */ React12.createElement(FolderKanban, {
|
|
2092
2211
|
size: 16
|
|
2093
|
-
}) : data.type === "overview" ? /* @__PURE__ */
|
|
2212
|
+
}) : data.type === "overview" ? /* @__PURE__ */ React12.createElement(BookOpen, {
|
|
2094
2213
|
size: 16
|
|
2095
|
-
}) : data.type === "canvas" ? /* @__PURE__ */
|
|
2214
|
+
}) : data.type === "canvas" ? /* @__PURE__ */ React12.createElement(LayoutDashboard, {
|
|
2096
2215
|
size: 16
|
|
2097
|
-
}) : data.type === "workflows" ? /* @__PURE__ */
|
|
2216
|
+
}) : data.type === "workflows" ? /* @__PURE__ */ React12.createElement(FolderOpen, {
|
|
2098
2217
|
size: 16
|
|
2099
|
-
}) : /* @__PURE__ */
|
|
2218
|
+
}) : /* @__PURE__ */ React12.createElement(Workflow, {
|
|
2100
2219
|
size: 16
|
|
2101
2220
|
});
|
|
2102
2221
|
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;
|
|
2103
2222
|
const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" || data.type === "workflows" || data.type === "workflow" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2104
2223
|
const rightContent = (() => {
|
|
2224
|
+
const indicators = [];
|
|
2225
|
+
if (data.gitStatus && (data.type === "canvas" || data.type === "overview" || data.type === "workflow")) {
|
|
2226
|
+
const gitDisplay = getGitStatusDisplay3(data.gitStatus, theme);
|
|
2227
|
+
if (gitDisplay) {
|
|
2228
|
+
indicators.push(/* @__PURE__ */ React12.createElement("div", {
|
|
2229
|
+
key: "git",
|
|
2230
|
+
style: { display: "flex", alignItems: "center", color: gitDisplay.color, marginLeft: "6px" }
|
|
2231
|
+
}, gitDisplay.icon));
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2105
2234
|
if (data.type === "workflow") {
|
|
2106
2235
|
if (data.isFullyCovered) {
|
|
2107
|
-
|
|
2236
|
+
indicators.push(/* @__PURE__ */ React12.createElement(CheckCircle2, {
|
|
2237
|
+
key: "coverage",
|
|
2108
2238
|
size: 14,
|
|
2109
2239
|
style: { color: "#10b981", marginLeft: "6px" }
|
|
2110
|
-
});
|
|
2240
|
+
}));
|
|
2111
2241
|
} else if (data.hasTraces !== undefined) {
|
|
2112
|
-
|
|
2242
|
+
indicators.push(data.hasTraces ? /* @__PURE__ */ React12.createElement(CircleDot, {
|
|
2243
|
+
key: "traces",
|
|
2113
2244
|
size: 14,
|
|
2114
2245
|
style: { color: "#10b981", marginLeft: "6px" }
|
|
2115
|
-
}) : /* @__PURE__ */
|
|
2246
|
+
}) : /* @__PURE__ */ React12.createElement(Circle, {
|
|
2247
|
+
key: "traces",
|
|
2116
2248
|
size: 14,
|
|
2117
2249
|
style: { color: theme.colors.textMuted, marginLeft: "6px" }
|
|
2118
|
-
});
|
|
2250
|
+
}));
|
|
2119
2251
|
}
|
|
2120
2252
|
}
|
|
2121
2253
|
if ((data.type === "version" || data.type === "storyboard") && data.hasTraces !== undefined) {
|
|
2122
|
-
|
|
2254
|
+
indicators.push(data.hasTraces ? /* @__PURE__ */ React12.createElement(CircleDot, {
|
|
2255
|
+
key: "traces",
|
|
2123
2256
|
size: 14,
|
|
2124
2257
|
style: { color: "#10b981", marginLeft: "6px" }
|
|
2125
|
-
}) : /* @__PURE__ */
|
|
2258
|
+
}) : /* @__PURE__ */ React12.createElement(Circle, {
|
|
2259
|
+
key: "traces",
|
|
2126
2260
|
size: 14,
|
|
2127
2261
|
style: { color: theme.colors.textMuted, marginLeft: "6px" }
|
|
2128
|
-
});
|
|
2262
|
+
}));
|
|
2129
2263
|
}
|
|
2130
|
-
return
|
|
2264
|
+
return indicators.length > 0 ? /* @__PURE__ */ React12.createElement("div", {
|
|
2265
|
+
style: { display: "flex", alignItems: "center" }
|
|
2266
|
+
}, indicators) : undefined;
|
|
2131
2267
|
})();
|
|
2132
|
-
return /* @__PURE__ */
|
|
2268
|
+
return /* @__PURE__ */ React12.createElement(TreeNode, {
|
|
2133
2269
|
...props,
|
|
2134
2270
|
theme,
|
|
2135
2271
|
nameColor,
|
|
@@ -2157,7 +2293,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2157
2293
|
};
|
|
2158
2294
|
const initialHeight = 600;
|
|
2159
2295
|
const [containerRef, containerHeight] = useContainerHeight(initialHeight);
|
|
2160
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
2161
2297
|
ref: containerRef,
|
|
2162
2298
|
style: {
|
|
2163
2299
|
backgroundColor: theme.colors.background,
|
|
@@ -2166,7 +2302,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2166
2302
|
height: "100%",
|
|
2167
2303
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2168
2304
|
}
|
|
2169
|
-
}, /* @__PURE__ */
|
|
2305
|
+
}, /* @__PURE__ */ React12.createElement(Tree3, {
|
|
2170
2306
|
data: treeData,
|
|
2171
2307
|
onSelect: handleSelect,
|
|
2172
2308
|
openByDefault: defaultOpen,
|
|
@@ -2184,7 +2320,7 @@ function hasWorkflowContent(node) {
|
|
|
2184
2320
|
}
|
|
2185
2321
|
// src/components/WorkflowScenarioTree/WorkflowScenarioTreeCore.tsx
|
|
2186
2322
|
import { Package as Package2, Workflow as Workflow2, GitCommit as GitCommit2, ListChecks, List } from "lucide-react";
|
|
2187
|
-
import
|
|
2323
|
+
import React13, { useMemo as useMemo10 } from "react";
|
|
2188
2324
|
import { Tree as Tree4 } from "react-arborist";
|
|
2189
2325
|
var buildTreeDataFromWorkflows = (workflows, workflowTraceCounts, scenarioTraceCounts, filterMode, minTraceCount) => {
|
|
2190
2326
|
const packagesMap = new Map;
|
|
@@ -2349,20 +2485,20 @@ var WorkflowScenarioTreeCore = ({
|
|
|
2349
2485
|
const NodeRenderer = (props) => {
|
|
2350
2486
|
const { node } = props;
|
|
2351
2487
|
const data = node.data;
|
|
2352
|
-
const icon = data.type === "version" ? /* @__PURE__ */
|
|
2488
|
+
const icon = data.type === "version" ? /* @__PURE__ */ React13.createElement(GitCommit2, {
|
|
2353
2489
|
size: 16
|
|
2354
|
-
}) : data.type === "package" ? /* @__PURE__ */
|
|
2490
|
+
}) : data.type === "package" ? /* @__PURE__ */ React13.createElement(Package2, {
|
|
2355
2491
|
size: 16
|
|
2356
|
-
}) : data.type === "workflow" ? /* @__PURE__ */
|
|
2492
|
+
}) : data.type === "workflow" ? /* @__PURE__ */ React13.createElement(Workflow2, {
|
|
2357
2493
|
size: 16
|
|
2358
|
-
}) : data.type === "scenario" ? data.hasTraces ? /* @__PURE__ */
|
|
2494
|
+
}) : data.type === "scenario" ? data.hasTraces ? /* @__PURE__ */ React13.createElement(ListChecks, {
|
|
2359
2495
|
size: 16
|
|
2360
|
-
}) : /* @__PURE__ */
|
|
2496
|
+
}) : /* @__PURE__ */ React13.createElement(List, {
|
|
2361
2497
|
size: 16
|
|
2362
2498
|
}) : null;
|
|
2363
2499
|
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;
|
|
2364
2500
|
const nodeHorizontalPadding = data.type === "workflow" || data.type === "scenario" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2365
|
-
const rightContent = data.traceCount !== undefined ? /* @__PURE__ */
|
|
2501
|
+
const rightContent = data.traceCount !== undefined ? /* @__PURE__ */ React13.createElement("span", {
|
|
2366
2502
|
style: {
|
|
2367
2503
|
marginLeft: "8px",
|
|
2368
2504
|
fontSize: "12px",
|
|
@@ -2370,7 +2506,7 @@ var WorkflowScenarioTreeCore = ({
|
|
|
2370
2506
|
fontWeight: 500
|
|
2371
2507
|
}
|
|
2372
2508
|
}, data.traceCount) : undefined;
|
|
2373
|
-
return /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ React13.createElement(TreeNode, {
|
|
2374
2510
|
...props,
|
|
2375
2511
|
theme,
|
|
2376
2512
|
nameColor,
|
|
@@ -2391,7 +2527,7 @@ var WorkflowScenarioTreeCore = ({
|
|
|
2391
2527
|
};
|
|
2392
2528
|
const initialHeight = 600;
|
|
2393
2529
|
const [containerRef, containerHeight] = useContainerHeight(initialHeight);
|
|
2394
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
2395
2531
|
ref: containerRef,
|
|
2396
2532
|
style: {
|
|
2397
2533
|
backgroundColor: theme.colors.background,
|
|
@@ -2400,7 +2536,7 @@ var WorkflowScenarioTreeCore = ({
|
|
|
2400
2536
|
height: "100%",
|
|
2401
2537
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2402
2538
|
}
|
|
2403
|
-
}, /* @__PURE__ */
|
|
2539
|
+
}, /* @__PURE__ */ React13.createElement(Tree4, {
|
|
2404
2540
|
data: treeData,
|
|
2405
2541
|
onSelect: handleSelect,
|
|
2406
2542
|
openByDefault: defaultOpen,
|
|
@@ -2413,9 +2549,9 @@ var WorkflowScenarioTreeCore = ({
|
|
|
2413
2549
|
};
|
|
2414
2550
|
// src/components/CanvasListTree/CanvasListTreeCore.tsx
|
|
2415
2551
|
import { Package as Package3, Folder, LayoutDashboard as LayoutDashboard2, FileText } from "lucide-react";
|
|
2416
|
-
import
|
|
2552
|
+
import React14, { useMemo as useMemo11, useRef as useRef6 } from "react";
|
|
2417
2553
|
import { Tree as Tree5 } from "react-arborist";
|
|
2418
|
-
var buildTreeData = (canvases) => {
|
|
2554
|
+
var buildTreeData = (canvases, gitStatusMap) => {
|
|
2419
2555
|
const packagesMap = new Map;
|
|
2420
2556
|
const rootCanvases = [];
|
|
2421
2557
|
for (const canvas of canvases) {
|
|
@@ -2429,19 +2565,23 @@ var buildTreeData = (canvases) => {
|
|
|
2429
2565
|
}
|
|
2430
2566
|
const buildCanvasNode = (canvas) => {
|
|
2431
2567
|
const children = [];
|
|
2568
|
+
const canvasGitStatus = gitStatusMap ? lookupGitStatus(canvas.path, gitStatusMap) : null;
|
|
2432
2569
|
children.push({
|
|
2433
2570
|
id: `canvas:${canvas.id}`,
|
|
2434
2571
|
name: "Canvas",
|
|
2435
2572
|
type: "canvas",
|
|
2436
|
-
canvas
|
|
2573
|
+
canvas,
|
|
2574
|
+
gitStatus: canvasGitStatus
|
|
2437
2575
|
});
|
|
2438
2576
|
if (canvas.markdownPath) {
|
|
2577
|
+
const overviewGitStatus = gitStatusMap ? lookupGitStatus(canvas.markdownPath, gitStatusMap) : null;
|
|
2439
2578
|
children.push({
|
|
2440
2579
|
id: `overview:${canvas.id}`,
|
|
2441
2580
|
name: "Overview",
|
|
2442
2581
|
type: "overview",
|
|
2443
2582
|
canvas,
|
|
2444
|
-
markdownPath: canvas.markdownPath
|
|
2583
|
+
markdownPath: canvas.markdownPath,
|
|
2584
|
+
gitStatus: overviewGitStatus
|
|
2445
2585
|
});
|
|
2446
2586
|
}
|
|
2447
2587
|
return {
|
|
@@ -2504,35 +2644,51 @@ var CanvasListTreeCore = ({
|
|
|
2504
2644
|
horizontalNodePadding = "16px",
|
|
2505
2645
|
verticalNodePadding = "6px",
|
|
2506
2646
|
verticalPadding = "20px",
|
|
2507
|
-
enableDragAndDrop = false
|
|
2647
|
+
enableDragAndDrop = false,
|
|
2648
|
+
gitStatusData
|
|
2508
2649
|
}) => {
|
|
2509
2650
|
const dndProps = getDndProps(enableDragAndDrop);
|
|
2651
|
+
const gitStatusMap = useMemo11(() => {
|
|
2652
|
+
return gitStatusData ? buildGitStatusMap(gitStatusData) : new Map;
|
|
2653
|
+
}, [gitStatusData]);
|
|
2510
2654
|
const rowHeight = useMemo11(() => {
|
|
2511
2655
|
const paddingValue = parseFloat(verticalNodePadding);
|
|
2512
2656
|
const contentLineHeight = 20;
|
|
2513
2657
|
const borderHeight = 2;
|
|
2514
2658
|
return contentLineHeight + paddingValue * 2 + borderHeight;
|
|
2515
2659
|
}, [verticalNodePadding]);
|
|
2516
|
-
const treeData = useMemo11(() => buildTreeData(canvases), [canvases]);
|
|
2660
|
+
const treeData = useMemo11(() => buildTreeData(canvases, gitStatusMap), [canvases, gitStatusMap]);
|
|
2517
2661
|
const NodeRenderer = (props) => {
|
|
2518
2662
|
const { node } = props;
|
|
2519
2663
|
const data = node.data;
|
|
2520
|
-
const icon = data.type === "package" ? /* @__PURE__ */
|
|
2664
|
+
const icon = data.type === "package" ? /* @__PURE__ */ React14.createElement(Package3, {
|
|
2521
2665
|
size: 16
|
|
2522
|
-
}) : data.type === "canvas-folder" ? /* @__PURE__ */
|
|
2666
|
+
}) : data.type === "canvas-folder" ? /* @__PURE__ */ React14.createElement(Folder, {
|
|
2523
2667
|
size: 16
|
|
2524
|
-
}) : data.type === "overview" ? /* @__PURE__ */
|
|
2668
|
+
}) : data.type === "overview" ? /* @__PURE__ */ React14.createElement(FileText, {
|
|
2525
2669
|
size: 16
|
|
2526
|
-
}) : /* @__PURE__ */
|
|
2670
|
+
}) : /* @__PURE__ */ React14.createElement(LayoutDashboard2, {
|
|
2527
2671
|
size: 16
|
|
2528
2672
|
});
|
|
2529
2673
|
const nameColor = data.type === "package" ? theme.colors.primary : data.type === "canvas-folder" ? theme.colors.textSecondary : data.type === "overview" ? theme.colors.info || "#3b82f6" : theme.colors.warning || "#f59e0b";
|
|
2530
2674
|
const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2531
|
-
|
|
2675
|
+
const rightContent = (() => {
|
|
2676
|
+
if (data.gitStatus && (data.type === "canvas" || data.type === "overview")) {
|
|
2677
|
+
const gitDisplay = getGitStatusDisplay3(data.gitStatus, theme);
|
|
2678
|
+
if (gitDisplay) {
|
|
2679
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
2680
|
+
style: { display: "flex", alignItems: "center", color: gitDisplay.color, marginLeft: "6px" }
|
|
2681
|
+
}, gitDisplay.icon);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
return;
|
|
2685
|
+
})();
|
|
2686
|
+
return /* @__PURE__ */ React14.createElement(TreeNode, {
|
|
2532
2687
|
...props,
|
|
2533
2688
|
theme,
|
|
2534
2689
|
nameColor,
|
|
2535
2690
|
leftIcon: icon,
|
|
2691
|
+
rightContent,
|
|
2536
2692
|
horizontalNodePadding: nodeHorizontalPadding,
|
|
2537
2693
|
verticalNodePadding
|
|
2538
2694
|
});
|
|
@@ -2555,7 +2711,7 @@ var CanvasListTreeCore = ({
|
|
|
2555
2711
|
};
|
|
2556
2712
|
const initialHeight = 600;
|
|
2557
2713
|
const [containerRef, containerHeight] = useContainerHeight(initialHeight);
|
|
2558
|
-
return /* @__PURE__ */
|
|
2714
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
2559
2715
|
ref: containerRef,
|
|
2560
2716
|
style: {
|
|
2561
2717
|
backgroundColor: theme.colors.background,
|
|
@@ -2564,7 +2720,7 @@ var CanvasListTreeCore = ({
|
|
|
2564
2720
|
height: "100%",
|
|
2565
2721
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2566
2722
|
}
|
|
2567
|
-
}, /* @__PURE__ */
|
|
2723
|
+
}, /* @__PURE__ */ React14.createElement(Tree5, {
|
|
2568
2724
|
initialData: treeData,
|
|
2569
2725
|
onSelect: handleSelect,
|
|
2570
2726
|
openByDefault: defaultOpen,
|
|
@@ -2583,9 +2739,9 @@ import {
|
|
|
2583
2739
|
Circle as Circle2,
|
|
2584
2740
|
TestTube
|
|
2585
2741
|
} from "lucide-react";
|
|
2586
|
-
import
|
|
2742
|
+
import React15, { useMemo as useMemo12, useRef as useRef7 } from "react";
|
|
2587
2743
|
import { Tree as Tree6 } from "react-arborist";
|
|
2588
|
-
var TelemetryCoverageContext =
|
|
2744
|
+
var TelemetryCoverageContext = React15.createContext(null);
|
|
2589
2745
|
var DEFAULT_TEST_PATTERNS = [
|
|
2590
2746
|
/\.test\.[jt]sx?$/,
|
|
2591
2747
|
/\.spec\.[jt]sx?$/,
|
|
@@ -2602,7 +2758,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2602
2758
|
switch (status) {
|
|
2603
2759
|
case "covered":
|
|
2604
2760
|
return {
|
|
2605
|
-
icon: /* @__PURE__ */
|
|
2761
|
+
icon: /* @__PURE__ */ React15.createElement(Activity, {
|
|
2606
2762
|
size: 14
|
|
2607
2763
|
}),
|
|
2608
2764
|
color: "#22c55e",
|
|
@@ -2611,7 +2767,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2611
2767
|
};
|
|
2612
2768
|
case "partial":
|
|
2613
2769
|
return {
|
|
2614
|
-
icon: /* @__PURE__ */
|
|
2770
|
+
icon: /* @__PURE__ */ React15.createElement(CircleDot2, {
|
|
2615
2771
|
size: 14
|
|
2616
2772
|
}),
|
|
2617
2773
|
color: "#eab308",
|
|
@@ -2620,7 +2776,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2620
2776
|
};
|
|
2621
2777
|
case "none":
|
|
2622
2778
|
return {
|
|
2623
|
-
icon: /* @__PURE__ */
|
|
2779
|
+
icon: /* @__PURE__ */ React15.createElement(Circle2, {
|
|
2624
2780
|
size: 14
|
|
2625
2781
|
}),
|
|
2626
2782
|
color: "#6b7280",
|
|
@@ -2731,7 +2887,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2731
2887
|
}, [coverageData]);
|
|
2732
2888
|
const NodeRenderer = (props) => {
|
|
2733
2889
|
const { node } = props;
|
|
2734
|
-
const ctx =
|
|
2890
|
+
const ctx = React15.useContext(TelemetryCoverageContext);
|
|
2735
2891
|
const coverage = ctx?.coverageMap.get(node.data.id);
|
|
2736
2892
|
const hasTracedChildren = ctx?.hasTracedChildrenMap.get(node.data.id);
|
|
2737
2893
|
const coverageDisplay = coverage ? getCoverageStatusDisplay(coverage, theme) : null;
|
|
@@ -2743,11 +2899,11 @@ var TelemetryCoverageFileTree = ({
|
|
|
2743
2899
|
} else if (node.data.isTestFile) {
|
|
2744
2900
|
nameColor = "#6b728080";
|
|
2745
2901
|
}
|
|
2746
|
-
const leftIcon = node.data.isTestFile && !coverage ? /* @__PURE__ */
|
|
2902
|
+
const leftIcon = node.data.isTestFile && !coverage ? /* @__PURE__ */ React15.createElement(TestTube, {
|
|
2747
2903
|
size: 14,
|
|
2748
2904
|
style: { marginRight: 4, color: "#6b7280" }
|
|
2749
2905
|
}) : null;
|
|
2750
|
-
const rightContent = coverageDisplay ? /* @__PURE__ */
|
|
2906
|
+
const rightContent = coverageDisplay ? /* @__PURE__ */ React15.createElement("div", {
|
|
2751
2907
|
style: {
|
|
2752
2908
|
display: "flex",
|
|
2753
2909
|
alignItems: "center",
|
|
@@ -2755,14 +2911,14 @@ var TelemetryCoverageFileTree = ({
|
|
|
2755
2911
|
marginRight: "8px"
|
|
2756
2912
|
},
|
|
2757
2913
|
title: coverageDisplay.label
|
|
2758
|
-
}, coverageDisplay.icon, /* @__PURE__ */
|
|
2914
|
+
}, coverageDisplay.icon, /* @__PURE__ */ React15.createElement("span", {
|
|
2759
2915
|
style: {
|
|
2760
2916
|
marginLeft: "4px",
|
|
2761
2917
|
fontSize: theme.fontSizes[0],
|
|
2762
2918
|
fontWeight: "bold",
|
|
2763
2919
|
fontFamily: "monospace"
|
|
2764
2920
|
}
|
|
2765
|
-
}, coverageDisplay.badge)) : node.data.isTestFile ? /* @__PURE__ */
|
|
2921
|
+
}, coverageDisplay.badge)) : node.data.isTestFile ? /* @__PURE__ */ React15.createElement("div", {
|
|
2766
2922
|
style: {
|
|
2767
2923
|
display: "flex",
|
|
2768
2924
|
alignItems: "center",
|
|
@@ -2771,10 +2927,10 @@ var TelemetryCoverageFileTree = ({
|
|
|
2771
2927
|
opacity: 0.5
|
|
2772
2928
|
},
|
|
2773
2929
|
title: "No telemetry instrumentation"
|
|
2774
|
-
}, /* @__PURE__ */
|
|
2930
|
+
}, /* @__PURE__ */ React15.createElement(Circle2, {
|
|
2775
2931
|
size: 14
|
|
2776
2932
|
})) : null;
|
|
2777
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ React15.createElement(TreeNode, {
|
|
2778
2934
|
...props,
|
|
2779
2935
|
theme,
|
|
2780
2936
|
rightContent,
|
|
@@ -2847,7 +3003,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2847
3003
|
return initialHeight;
|
|
2848
3004
|
}, [autoHeight, treeData, openByDefault, initialHeight]);
|
|
2849
3005
|
const [containerRef, containerHeight] = useContainerHeight(calculatedHeight);
|
|
2850
|
-
return /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
2851
3007
|
ref: containerRef,
|
|
2852
3008
|
style: {
|
|
2853
3009
|
backgroundColor: transparentBackground ? "transparent" : theme.colors.background,
|
|
@@ -2856,9 +3012,9 @@ var TelemetryCoverageFileTree = ({
|
|
|
2856
3012
|
...autoHeight ? {} : { height: "100%" },
|
|
2857
3013
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2858
3014
|
}
|
|
2859
|
-
}, /* @__PURE__ */
|
|
3015
|
+
}, /* @__PURE__ */ React15.createElement(TelemetryCoverageContext.Provider, {
|
|
2860
3016
|
value: { coverageMap, hasTracedChildrenMap }
|
|
2861
|
-
}, /* @__PURE__ */
|
|
3017
|
+
}, /* @__PURE__ */ React15.createElement(Tree6, {
|
|
2862
3018
|
data: treeData,
|
|
2863
3019
|
onSelect: handleSelect,
|
|
2864
3020
|
...selectedFile !== undefined && { selection: selectedFile },
|
|
@@ -2886,8 +3042,8 @@ var calculateTelemetryCoverageStats = (coverageData) => {
|
|
|
2886
3042
|
};
|
|
2887
3043
|
};
|
|
2888
3044
|
// src/components/TelemetryCoverageFileTreeContainer.tsx
|
|
2889
|
-
import { RefreshCw as RefreshCw2, Eye as Eye2, EyeOff as EyeOff2, AlertCircle as
|
|
2890
|
-
import
|
|
3045
|
+
import { RefreshCw as RefreshCw2, Eye as Eye2, EyeOff as EyeOff2, AlertCircle as AlertCircle5, Activity as Activity2 } from "lucide-react";
|
|
3046
|
+
import React16, { useState as useState7, useMemo as useMemo13 } from "react";
|
|
2891
3047
|
var TelemetryCoverageFileTreeContainer = ({
|
|
2892
3048
|
fileTree,
|
|
2893
3049
|
theme,
|
|
@@ -2920,34 +3076,34 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2920
3076
|
setShowUncoveredFiles(!showUncoveredFiles);
|
|
2921
3077
|
};
|
|
2922
3078
|
const percentageColor = stats.percentage >= 80 ? "#22c55e" : stats.percentage >= 50 ? "#eab308" : stats.percentage > 0 ? "#f97316" : "#6b7280";
|
|
2923
|
-
return /* @__PURE__ */
|
|
3079
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
2924
3080
|
style: { display: "flex", flexDirection: "column", height: "100%" }
|
|
2925
|
-
}, showControls && /* @__PURE__ */
|
|
3081
|
+
}, showControls && /* @__PURE__ */ React16.createElement("div", {
|
|
2926
3082
|
style: {
|
|
2927
3083
|
padding: "12px",
|
|
2928
3084
|
borderBottom: `1px solid ${theme.colors.border || "#e0e0e0"}`,
|
|
2929
3085
|
backgroundColor: theme.colors.backgroundSecondary || theme.colors.background
|
|
2930
3086
|
}
|
|
2931
|
-
}, /* @__PURE__ */
|
|
3087
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
2932
3088
|
style: {
|
|
2933
3089
|
display: "flex",
|
|
2934
3090
|
alignItems: "center",
|
|
2935
3091
|
justifyContent: "space-between",
|
|
2936
3092
|
marginBottom: "8px"
|
|
2937
3093
|
}
|
|
2938
|
-
}, /* @__PURE__ */
|
|
3094
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
2939
3095
|
style: { display: "flex", alignItems: "center", gap: "8px" }
|
|
2940
|
-
}, /* @__PURE__ */
|
|
3096
|
+
}, /* @__PURE__ */ React16.createElement(Activity2, {
|
|
2941
3097
|
size: 16,
|
|
2942
3098
|
color: theme.colors.primary
|
|
2943
|
-
}), /* @__PURE__ */
|
|
3099
|
+
}), /* @__PURE__ */ React16.createElement("h3", {
|
|
2944
3100
|
style: {
|
|
2945
3101
|
margin: 0,
|
|
2946
3102
|
fontSize: theme.fontSizes[1],
|
|
2947
3103
|
fontWeight: "bold",
|
|
2948
3104
|
color: theme.colors.text
|
|
2949
3105
|
}
|
|
2950
|
-
}, title), stats.testFiles > 0 && /* @__PURE__ */
|
|
3106
|
+
}, title), stats.testFiles > 0 && /* @__PURE__ */ React16.createElement("span", {
|
|
2951
3107
|
style: {
|
|
2952
3108
|
backgroundColor: percentageColor,
|
|
2953
3109
|
color: "#ffffff",
|
|
@@ -2957,14 +3113,14 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2957
3113
|
fontWeight: "bold",
|
|
2958
3114
|
fontFamily: "monospace"
|
|
2959
3115
|
}
|
|
2960
|
-
}, stats.percentage, "%"), isLoading && /* @__PURE__ */
|
|
3116
|
+
}, stats.percentage, "%"), isLoading && /* @__PURE__ */ React16.createElement(RefreshCw2, {
|
|
2961
3117
|
size: 16,
|
|
2962
3118
|
color: theme.colors.text,
|
|
2963
3119
|
className: "telemetry-coverage-spinner",
|
|
2964
3120
|
style: { animation: "spin 1s linear infinite" }
|
|
2965
|
-
})), /* @__PURE__ */
|
|
3121
|
+
})), /* @__PURE__ */ React16.createElement("div", {
|
|
2966
3122
|
style: { display: "flex", gap: "8px" }
|
|
2967
|
-
}, /* @__PURE__ */
|
|
3123
|
+
}, /* @__PURE__ */ React16.createElement("button", {
|
|
2968
3124
|
onClick: toggleShowUncoveredFiles,
|
|
2969
3125
|
style: {
|
|
2970
3126
|
background: "none",
|
|
@@ -2979,11 +3135,11 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2979
3135
|
color: theme.colors.text
|
|
2980
3136
|
},
|
|
2981
3137
|
title: showUncoveredFiles ? "Show only covered files" : "Show all test files"
|
|
2982
|
-
}, showUncoveredFiles ? /* @__PURE__ */
|
|
3138
|
+
}, showUncoveredFiles ? /* @__PURE__ */ React16.createElement(EyeOff2, {
|
|
2983
3139
|
size: 14
|
|
2984
|
-
}) : /* @__PURE__ */
|
|
3140
|
+
}) : /* @__PURE__ */ React16.createElement(Eye2, {
|
|
2985
3141
|
size: 14
|
|
2986
|
-
}), showUncoveredFiles ? "Hide uncovered" : "Show all"), onRefresh && /* @__PURE__ */
|
|
3142
|
+
}), showUncoveredFiles ? "Hide uncovered" : "Show all"), onRefresh && /* @__PURE__ */ React16.createElement("button", {
|
|
2987
3143
|
onClick: handleRefresh,
|
|
2988
3144
|
disabled: isLoading,
|
|
2989
3145
|
style: {
|
|
@@ -3000,9 +3156,9 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
3000
3156
|
opacity: isLoading ? 0.6 : 1
|
|
3001
3157
|
},
|
|
3002
3158
|
title: "Refresh coverage data"
|
|
3003
|
-
}, /* @__PURE__ */
|
|
3159
|
+
}, /* @__PURE__ */ React16.createElement(RefreshCw2, {
|
|
3004
3160
|
size: 14
|
|
3005
|
-
}), "Refresh"))), error && /* @__PURE__ */
|
|
3161
|
+
}), "Refresh"))), error && /* @__PURE__ */ React16.createElement("div", {
|
|
3006
3162
|
style: {
|
|
3007
3163
|
display: "flex",
|
|
3008
3164
|
alignItems: "center",
|
|
@@ -3015,36 +3171,36 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
3015
3171
|
color: "#856404",
|
|
3016
3172
|
marginBottom: "8px"
|
|
3017
3173
|
}
|
|
3018
|
-
}, /* @__PURE__ */
|
|
3174
|
+
}, /* @__PURE__ */ React16.createElement(AlertCircle5, {
|
|
3019
3175
|
size: 14
|
|
3020
|
-
}), error), !error && stats.testFiles > 0 && /* @__PURE__ */
|
|
3176
|
+
}), error), !error && stats.testFiles > 0 && /* @__PURE__ */ React16.createElement("div", {
|
|
3021
3177
|
style: {
|
|
3022
3178
|
display: "flex",
|
|
3023
3179
|
gap: "16px",
|
|
3024
3180
|
fontSize: theme.fontSizes[0],
|
|
3025
3181
|
color: theme.colors.textSecondary || "#666"
|
|
3026
3182
|
}
|
|
3027
|
-
}, /* @__PURE__ */
|
|
3183
|
+
}, /* @__PURE__ */ React16.createElement("span", null, /* @__PURE__ */ React16.createElement("strong", {
|
|
3028
3184
|
style: { color: "#22c55e" }
|
|
3029
|
-
}, stats.coveredFiles), " covered"), stats.partialFiles > 0 && /* @__PURE__ */
|
|
3185
|
+
}, stats.coveredFiles), " covered"), stats.partialFiles > 0 && /* @__PURE__ */ React16.createElement("span", null, /* @__PURE__ */ React16.createElement("strong", {
|
|
3030
3186
|
style: { color: "#eab308" }
|
|
3031
|
-
}, stats.partialFiles), " partial"), /* @__PURE__ */
|
|
3187
|
+
}, stats.partialFiles), " partial"), /* @__PURE__ */ React16.createElement("span", null, /* @__PURE__ */ React16.createElement("strong", {
|
|
3032
3188
|
style: { color: "#6b7280" }
|
|
3033
|
-
}, stats.uncoveredFiles), " uncovered"), /* @__PURE__ */
|
|
3189
|
+
}, stats.uncoveredFiles), " uncovered"), /* @__PURE__ */ React16.createElement("span", {
|
|
3034
3190
|
style: { marginLeft: "auto" }
|
|
3035
|
-
}, stats.totalTraced, "/", stats.totalTests, " tests traced")), !error && stats.testFiles === 0 && /* @__PURE__ */
|
|
3191
|
+
}, stats.totalTraced, "/", stats.totalTests, " tests traced")), !error && stats.testFiles === 0 && /* @__PURE__ */ React16.createElement("div", {
|
|
3036
3192
|
style: {
|
|
3037
3193
|
fontSize: theme.fontSizes[0],
|
|
3038
3194
|
color: theme.colors.textSecondary || "#666"
|
|
3039
3195
|
}
|
|
3040
|
-
}, "No test files with coverage data found")), /* @__PURE__ */
|
|
3196
|
+
}, "No test files with coverage data found")), /* @__PURE__ */ React16.createElement(DirectoryFilterInput, {
|
|
3041
3197
|
fileTree,
|
|
3042
3198
|
theme,
|
|
3043
3199
|
filters,
|
|
3044
3200
|
onFiltersChange: setFilters
|
|
3045
|
-
}), /* @__PURE__ */
|
|
3201
|
+
}), /* @__PURE__ */ React16.createElement("div", {
|
|
3046
3202
|
style: { flex: 1, marginTop: "1rem", overflow: "hidden" }
|
|
3047
|
-
}, /* @__PURE__ */
|
|
3203
|
+
}, /* @__PURE__ */ React16.createElement(TelemetryCoverageFileTree, {
|
|
3048
3204
|
fileTree,
|
|
3049
3205
|
theme,
|
|
3050
3206
|
coverageData,
|
|
@@ -3065,12 +3221,15 @@ export {
|
|
|
3065
3221
|
useContainerHeight,
|
|
3066
3222
|
updateTreePaths,
|
|
3067
3223
|
parseUnifiedPath,
|
|
3224
|
+
lookupGitStatus,
|
|
3068
3225
|
hasWorkflowContent,
|
|
3226
|
+
getGitStatusDisplay3 as getGitStatusDisplay,
|
|
3069
3227
|
getDndProps,
|
|
3070
3228
|
filterFileTreeByPaths,
|
|
3071
3229
|
extractNameFromPath,
|
|
3072
3230
|
combineRepositoryTrees,
|
|
3073
3231
|
calculateTelemetryCoverageStats,
|
|
3232
|
+
buildGitStatusMap,
|
|
3074
3233
|
WorkflowScenarioTreeCore,
|
|
3075
3234
|
TreeNode,
|
|
3076
3235
|
TelemetryCoverageFileTreeContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAuHjB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6J5D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Theme } from '@principal-ade/industry-theme';
|
|
2
2
|
import type { DiscoveredCanvas } from '@principal-ai/principal-view-core';
|
|
3
3
|
import type { TreeNodeData } from '../TreeNode';
|
|
4
|
+
import type { GitFileStatus, GitStatus } from '../../utils/gitStatus';
|
|
4
5
|
export type { DiscoveredCanvas };
|
|
5
6
|
export type CanvasListNodeType = 'package' | 'canvas-folder' | 'canvas' | 'overview';
|
|
6
7
|
export interface CanvasListNodeData extends TreeNodeData {
|
|
@@ -10,6 +11,7 @@ export interface CanvasListNodeData extends TreeNodeData {
|
|
|
10
11
|
packageName?: string;
|
|
11
12
|
scope?: 'package' | 'root';
|
|
12
13
|
markdownPath?: string;
|
|
14
|
+
gitStatus?: GitStatus;
|
|
13
15
|
}
|
|
14
16
|
export interface CanvasListTreeProps {
|
|
15
17
|
canvases: DiscoveredCanvas[];
|
|
@@ -22,5 +24,6 @@ export interface CanvasListTreeProps {
|
|
|
22
24
|
verticalNodePadding?: string;
|
|
23
25
|
verticalPadding?: string;
|
|
24
26
|
enableDragAndDrop?: boolean;
|
|
27
|
+
gitStatusData?: GitFileStatus[];
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,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AAC;IAG5B,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC"}
|
|
@@ -26,4 +26,8 @@ export declare const VersionGroupingWithFilter: Story;
|
|
|
26
26
|
export declare const VersionEvolution: Story;
|
|
27
27
|
export declare const MultiServiceVersionGrouping: Story;
|
|
28
28
|
export declare const VersionGroupingWithCoverage: Story;
|
|
29
|
+
export declare const WithGitStatus: Story;
|
|
30
|
+
export declare const GitStatusAllTypes: Story;
|
|
31
|
+
export declare const GitStatusWithVersionGrouping: Story;
|
|
32
|
+
export declare const GitStatusMixedScenarios: Story;
|
|
29
33
|
//# sourceMappingURL=StoryboardWorkflowsTree.stories.d.ts.map
|
package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map
CHANGED
|
@@ -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,OAAO,2BAA2B,CAAC,CAAC;AAE1D,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,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StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAQ/C,OAAO,KAAK,EAEV,4BAA4B,EAK7B,MAAM,SAAS,CAAC;AAkQjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAiO9E,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Theme } from '@principal-ade/industry-theme';
|
|
2
2
|
import type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, VersionSnapshot } from '@principal-ai/principal-view-core';
|
|
3
3
|
import type { TreeNodeData } from '../TreeNode';
|
|
4
|
+
import type { GitFileStatus, GitStatus } from '../../utils/gitStatus';
|
|
4
5
|
export type { DiscoveredStoryboard, DiscoveredCanvas, DiscoveredWorkflow, DiscoveredWorkflowWithContent, WorkflowTemplate, VersionSnapshot };
|
|
5
6
|
export type StoryboardWorkflowNodeType = 'version' | 'package' | 'storyboard' | 'overview' | 'canvas' | 'workflows' | 'workflow';
|
|
6
7
|
/**
|
|
@@ -24,6 +25,7 @@ export interface StoryboardWorkflowNodeData extends TreeNodeData {
|
|
|
24
25
|
hasTraces?: boolean;
|
|
25
26
|
repositoryUrl?: string;
|
|
26
27
|
commitSha?: string;
|
|
28
|
+
gitStatus?: GitStatus;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Type guard to check if a workflow node has full content (WorkflowTemplate with scenarios)
|
|
@@ -48,5 +50,6 @@ export interface StoryboardWorkflowsTreeProps {
|
|
|
48
50
|
versionSnapshots?: VersionSnapshot[];
|
|
49
51
|
workflowFilterMode?: StoryboardFilterMode;
|
|
50
52
|
traceWorkflowsSet?: Set<string>;
|
|
53
|
+
gitStatusData?: GitFileStatus[];
|
|
51
54
|
}
|
|
52
55
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
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,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGtE,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,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M,EAAE,OAAO,CAAC,CAAC;IAG9C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAGhC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowScenarioTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WorkflowScenarioTree/WorkflowScenarioTree.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"WorkflowScenarioTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WorkflowScenarioTree/WorkflowScenarioTree.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAsOtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,wBAAwB,CAI/C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEvD,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAuG5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAwC1B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '@principal-ade/industry-theme';
|
|
3
|
+
export type GitStatus = 'M' | 'A' | 'D' | 'R' | 'C' | 'U' | '??' | '!!' | 'AM' | 'MM' | null;
|
|
4
|
+
export interface GitFileStatus {
|
|
5
|
+
filePath: string;
|
|
6
|
+
indexStatus: string;
|
|
7
|
+
workingTreeStatus: string;
|
|
8
|
+
status: GitStatus;
|
|
9
|
+
}
|
|
10
|
+
export interface GitStatusDisplay {
|
|
11
|
+
icon: React.ReactElement;
|
|
12
|
+
color: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get git status icon, color, and label for a given status
|
|
17
|
+
* @param status - The git status
|
|
18
|
+
* @param theme - The application theme
|
|
19
|
+
* @returns Display information or null if no status
|
|
20
|
+
*/
|
|
21
|
+
export declare function getGitStatusDisplay(status: GitStatus, theme: Theme): GitStatusDisplay | null;
|
|
22
|
+
/**
|
|
23
|
+
* Build a map of file paths to their git status
|
|
24
|
+
* @param gitStatusData - Array of git file status information
|
|
25
|
+
* @returns Map of file path to git status
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildGitStatusMap(gitStatusData: GitFileStatus[]): Map<string, GitStatus>;
|
|
28
|
+
/**
|
|
29
|
+
* Lookup git status for a file path, handling both absolute and relative paths
|
|
30
|
+
* @param filePath - The file path to lookup
|
|
31
|
+
* @param gitStatusMap - Map of file paths to git status
|
|
32
|
+
* @returns Git status or null if not found
|
|
33
|
+
*/
|
|
34
|
+
export declare function lookupGitStatus(filePath: string | undefined, gitStatusMap: Map<string, GitStatus>): GitStatus | null;
|
|
35
|
+
//# sourceMappingURL=gitStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/gitStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAW3D,MAAM,MAAM,SAAS,GACjB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAGT,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;CACnB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,gBAAgB,GAAG,IAAI,CAsD5F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAUxF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GACnC,SAAS,GAAG,IAAI,CAmBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principal-ade/dynamic-file-tree",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.68",
|
|
4
4
|
"description": "React component for selective directory filtering and file tree visualization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@principal-ade/industry-theme": ">=0.1.0",
|
|
51
|
-
"@principal-ai/principal-view-core": "^0.
|
|
51
|
+
"@principal-ai/principal-view-core": "^0.23.0",
|
|
52
52
|
"@principal-ai/repository-abstraction": "^0.5.2",
|
|
53
53
|
"lucide-react": ">=0.263.0",
|
|
54
54
|
"react": ">=19.0.0",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@eslint/js": "^9.32.0",
|
|
73
73
|
"@principal-ade/industry-theme": "^0.1.0",
|
|
74
|
-
"@principal-ai/principal-view-core": "^0.
|
|
74
|
+
"@principal-ai/principal-view-core": "^0.23.0",
|
|
75
75
|
"@principal-ai/repository-abstraction": "^0.5.2",
|
|
76
|
-
"@storybook/addon-docs": "^
|
|
77
|
-
"@storybook/addon-onboarding": "^
|
|
76
|
+
"@storybook/addon-docs": "^10.0.0",
|
|
77
|
+
"@storybook/addon-onboarding": "^10.0.0",
|
|
78
78
|
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
79
|
-
"@storybook/react-webpack5": "^
|
|
79
|
+
"@storybook/react-webpack5": "^10.0.0",
|
|
80
80
|
"@testing-library/react": "^16.3.0",
|
|
81
81
|
"@types/bun": "latest",
|
|
82
82
|
"@types/jest": "^29.5.12",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"rehype-sanitize": "^6.0.0",
|
|
109
109
|
"rehype-slug": "^6.0.0",
|
|
110
110
|
"remark-gfm": "^4.0.1",
|
|
111
|
-
"storybook": "^
|
|
111
|
+
"storybook": "^10.0.0",
|
|
112
112
|
"typescript-eslint": "^8.38.0"
|
|
113
113
|
},
|
|
114
114
|
"files": [
|