@principal-ade/dynamic-file-tree 0.1.48 → 0.1.49
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 +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +63 -238
- package/package.json +1 -1
- package/dist/src/components/CanvasNarrativeTree/CanvasNarrativeTree.stories.d.ts +0 -20
- package/dist/src/components/CanvasNarrativeTree/CanvasNarrativeTree.stories.d.ts.map +0 -1
- package/dist/src/components/CanvasNarrativeTree/CanvasNarrativeTreeCore.d.ts +0 -4
- package/dist/src/components/CanvasNarrativeTree/CanvasNarrativeTreeCore.d.ts.map +0 -1
- package/dist/src/components/CanvasNarrativeTree/types.d.ts +0 -38
- package/dist/src/components/CanvasNarrativeTree/types.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,8 +18,6 @@ export { GitStatusFileTreeContainer } from './src/components/GitStatusFileTreeCo
|
|
|
18
18
|
export type { GitStatusFileTreeContainerProps } from './src/components/GitStatusFileTreeContainer';
|
|
19
19
|
export { MultiFileTree, MultiFileTreeCore } from './src/components/MultiFileTree';
|
|
20
20
|
export type { MultiFileTreeProps, MultiFileTreeCoreProps } from './src/components/MultiFileTree';
|
|
21
|
-
export { CanvasNarrativeTreeCore } from './src/components/CanvasNarrativeTree/CanvasNarrativeTreeCore';
|
|
22
|
-
export type { CanvasNarrativeTreeCoreProps, CanvasNarrativeNodeData, CanvasNarrativeNodeType, DiscoveredCanvas, NarrativeFile, } from './src/components/CanvasNarrativeTree/types';
|
|
23
21
|
export { StoryboardWorkflowsTreeCore } from './src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore';
|
|
24
22
|
export type { StoryboardWorkflowsTreeProps, StoryboardWorkflowNodeData, StoryboardWorkflowNodeType, DiscoveredStoryboard, DiscoveredWorkflow, } from './src/components/StoryboardWorkflowsTree/types';
|
|
25
23
|
export { TelemetryCoverageFileTree, calculateTelemetryCoverageStats, } from './src/components/TelemetryCoverageFileTree';
|
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,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAGjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EACV,sBAAsB,EACtB,aAAa,EACb,SAAS,EACV,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,YAAY,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAGnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAClF,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAGjG,OAAO,EAAE,
|
|
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,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAGjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EACV,sBAAsB,EACtB,aAAa,EACb,SAAS,EACV,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,YAAY,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAGnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAClF,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAGjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,YAAY,EACV,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EACL,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,qDAAqD,CAAC;AACzG,YAAY,EAAE,uCAAuC,EAAE,MAAM,qDAAqD,CAAC;AAGnH,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1870,185 +1870,11 @@ var MultiFileTree = ({
|
|
|
1870
1870
|
}
|
|
1871
1871
|
}, "Selected: ", selectedFile.source.name, " / ", selectedFile.path));
|
|
1872
1872
|
};
|
|
1873
|
-
// src/components/
|
|
1874
|
-
import { Package,
|
|
1873
|
+
// src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
|
|
1874
|
+
import { Package, FolderKanban, FileText, Workflow } from "lucide-react";
|
|
1875
1875
|
import React11, { useMemo as useMemo9 } from "react";
|
|
1876
1876
|
import { Tree as Tree3 } from "react-arborist";
|
|
1877
|
-
var buildTreeData = (
|
|
1878
|
-
const packagesMap = new Map;
|
|
1879
|
-
const rootCanvases = [];
|
|
1880
|
-
for (const canvas of canvases) {
|
|
1881
|
-
if (canvas.scope === "package" && canvas.packageName) {
|
|
1882
|
-
const existing = packagesMap.get(canvas.packageName) || [];
|
|
1883
|
-
existing.push(canvas);
|
|
1884
|
-
packagesMap.set(canvas.packageName, existing);
|
|
1885
|
-
} else {
|
|
1886
|
-
rootCanvases.push(canvas);
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
const canvasToNarratives = new Map;
|
|
1890
|
-
for (const narrative of narratives) {
|
|
1891
|
-
const canvasPath = narrative.template.canvas;
|
|
1892
|
-
if (canvasPath) {
|
|
1893
|
-
for (const canvas of canvases) {
|
|
1894
|
-
if (canvas.path === canvasPath || canvas.path.endsWith(canvasPath)) {
|
|
1895
|
-
const existing = canvasToNarratives.get(canvas.id) || [];
|
|
1896
|
-
existing.push(narrative);
|
|
1897
|
-
canvasToNarratives.set(canvas.id, existing);
|
|
1898
|
-
break;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
const buildCanvasNode = (canvas) => {
|
|
1904
|
-
const narrativesForCanvas = canvasToNarratives.get(canvas.id) || [];
|
|
1905
|
-
const children = [];
|
|
1906
|
-
children.push({
|
|
1907
|
-
id: `storyboard:${canvas.id}`,
|
|
1908
|
-
name: "Storyboard",
|
|
1909
|
-
type: "storyboard",
|
|
1910
|
-
canvas
|
|
1911
|
-
});
|
|
1912
|
-
const narrativeNodes = narrativesForCanvas.map(({ file, template }) => ({
|
|
1913
|
-
id: `narrative:${file.id}`,
|
|
1914
|
-
name: file.name,
|
|
1915
|
-
type: "narrative",
|
|
1916
|
-
narrative: file,
|
|
1917
|
-
narrativeTemplate: template,
|
|
1918
|
-
canvas
|
|
1919
|
-
})).sort((a, b) => a.name.localeCompare(b.name));
|
|
1920
|
-
children.push(...narrativeNodes);
|
|
1921
|
-
return {
|
|
1922
|
-
id: `canvas:${canvas.id}`,
|
|
1923
|
-
name: canvas.name,
|
|
1924
|
-
type: "canvas",
|
|
1925
|
-
canvas,
|
|
1926
|
-
children
|
|
1927
|
-
};
|
|
1928
|
-
};
|
|
1929
|
-
const hasMultiplePackages = packagesMap.size > 1;
|
|
1930
|
-
const hasRootAndPackages = packagesMap.size > 0 && rootCanvases.length > 0;
|
|
1931
|
-
const shouldShowPackageLevel = hasMultiplePackages || hasRootAndPackages;
|
|
1932
|
-
if (shouldShowPackageLevel) {
|
|
1933
|
-
const result = [];
|
|
1934
|
-
for (const [packageName, packageCanvases] of packagesMap) {
|
|
1935
|
-
const canvasNodes = packageCanvases.map(buildCanvasNode).sort((a, b) => a.name.localeCompare(b.name));
|
|
1936
|
-
result.push({
|
|
1937
|
-
id: `package:${packageName}`,
|
|
1938
|
-
name: packageName,
|
|
1939
|
-
type: "package",
|
|
1940
|
-
packageName,
|
|
1941
|
-
scope: "package",
|
|
1942
|
-
children: canvasNodes
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
if (rootCanvases.length > 0) {
|
|
1946
|
-
const rootCanvasNodes = rootCanvases.map(buildCanvasNode).sort((a, b) => a.name.localeCompare(b.name));
|
|
1947
|
-
result.push({
|
|
1948
|
-
id: "package:root",
|
|
1949
|
-
name: "Root",
|
|
1950
|
-
type: "package",
|
|
1951
|
-
packageName: "root",
|
|
1952
|
-
scope: "root",
|
|
1953
|
-
children: rootCanvasNodes
|
|
1954
|
-
});
|
|
1955
|
-
}
|
|
1956
|
-
return result.sort((a, b) => {
|
|
1957
|
-
if (a.packageName === "root")
|
|
1958
|
-
return 1;
|
|
1959
|
-
if (b.packageName === "root")
|
|
1960
|
-
return -1;
|
|
1961
|
-
return a.name.localeCompare(b.name);
|
|
1962
|
-
});
|
|
1963
|
-
} else {
|
|
1964
|
-
const allCanvases = [...rootCanvases];
|
|
1965
|
-
for (const packageCanvases of packagesMap.values()) {
|
|
1966
|
-
allCanvases.push(...packageCanvases);
|
|
1967
|
-
}
|
|
1968
|
-
return allCanvases.map(buildCanvasNode).sort((a, b) => a.name.localeCompare(b.name));
|
|
1969
|
-
}
|
|
1970
|
-
};
|
|
1971
|
-
var CanvasNarrativeTreeCore = ({
|
|
1972
|
-
canvases,
|
|
1973
|
-
narratives,
|
|
1974
|
-
theme,
|
|
1975
|
-
onClick,
|
|
1976
|
-
selectedNodeId,
|
|
1977
|
-
defaultOpen = false,
|
|
1978
|
-
initialOpenState,
|
|
1979
|
-
horizontalNodePadding = "16px",
|
|
1980
|
-
verticalNodePadding = "6px",
|
|
1981
|
-
verticalPadding = "20px",
|
|
1982
|
-
enableDragAndDrop = false
|
|
1983
|
-
}) => {
|
|
1984
|
-
const dndProps = getDndProps(enableDragAndDrop);
|
|
1985
|
-
const rowHeight = useMemo9(() => {
|
|
1986
|
-
const paddingValue = parseFloat(verticalNodePadding);
|
|
1987
|
-
const contentLineHeight = 20;
|
|
1988
|
-
const borderHeight = 2;
|
|
1989
|
-
return contentLineHeight + paddingValue * 2 + borderHeight;
|
|
1990
|
-
}, [verticalNodePadding]);
|
|
1991
|
-
const treeData = useMemo9(() => buildTreeData(canvases, narratives), [canvases, narratives]);
|
|
1992
|
-
const NodeRenderer = (props) => {
|
|
1993
|
-
const { node } = props;
|
|
1994
|
-
const data = node.data;
|
|
1995
|
-
const icon = data.type === "package" ? /* @__PURE__ */ React11.createElement(Package, {
|
|
1996
|
-
size: 16
|
|
1997
|
-
}) : data.type === "canvas" ? /* @__PURE__ */ React11.createElement(Workflow, {
|
|
1998
|
-
size: 16
|
|
1999
|
-
}) : data.type === "storyboard" ? /* @__PURE__ */ React11.createElement(FileText, {
|
|
2000
|
-
size: 16
|
|
2001
|
-
}) : /* @__PURE__ */ React11.createElement(Scroll, {
|
|
2002
|
-
size: 16
|
|
2003
|
-
});
|
|
2004
|
-
const nameColor = data.type === "package" ? theme.colors.primary : data.type === "canvas" ? theme.colors.success : data.type === "storyboard" ? theme.colors.warning || "#f59e0b" : theme.colors.textSecondary;
|
|
2005
|
-
const nodeHorizontalPadding = data.type === "narrative" || data.type === "storyboard" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2006
|
-
return /* @__PURE__ */ React11.createElement(TreeNode, {
|
|
2007
|
-
...props,
|
|
2008
|
-
theme,
|
|
2009
|
-
nameColor,
|
|
2010
|
-
leftIcon: icon,
|
|
2011
|
-
horizontalNodePadding: nodeHorizontalPadding,
|
|
2012
|
-
verticalNodePadding
|
|
2013
|
-
});
|
|
2014
|
-
};
|
|
2015
|
-
const handleSelect = (selectedNodes) => {
|
|
2016
|
-
if (selectedNodes.length === 0)
|
|
2017
|
-
return;
|
|
2018
|
-
const node = selectedNodes[0];
|
|
2019
|
-
const nodeData = node.data;
|
|
2020
|
-
if (nodeData.type === "storyboard" || nodeData.type === "narrative") {
|
|
2021
|
-
onClick(nodeData);
|
|
2022
|
-
}
|
|
2023
|
-
};
|
|
2024
|
-
const initialHeight = 600;
|
|
2025
|
-
const [containerRef, containerHeight] = useContainerHeight(initialHeight);
|
|
2026
|
-
return /* @__PURE__ */ React11.createElement("div", {
|
|
2027
|
-
ref: containerRef,
|
|
2028
|
-
style: {
|
|
2029
|
-
backgroundColor: theme.colors.background,
|
|
2030
|
-
color: theme.colors.text,
|
|
2031
|
-
fontFamily: theme.fonts.body,
|
|
2032
|
-
height: "100%",
|
|
2033
|
-
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2034
|
-
}
|
|
2035
|
-
}, /* @__PURE__ */ React11.createElement(Tree3, {
|
|
2036
|
-
initialData: treeData,
|
|
2037
|
-
onSelect: handleSelect,
|
|
2038
|
-
openByDefault: defaultOpen,
|
|
2039
|
-
...initialOpenState !== undefined && { initialOpenState },
|
|
2040
|
-
...selectedNodeId !== undefined && { selection: selectedNodeId },
|
|
2041
|
-
width: "100%",
|
|
2042
|
-
height: containerHeight,
|
|
2043
|
-
rowHeight,
|
|
2044
|
-
...dndProps
|
|
2045
|
-
}, NodeRenderer));
|
|
2046
|
-
};
|
|
2047
|
-
// src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
|
|
2048
|
-
import { Package as Package2, FolderKanban, FileText as FileText2, Workflow as Workflow2 } from "lucide-react";
|
|
2049
|
-
import React12, { useMemo as useMemo10 } from "react";
|
|
2050
|
-
import { Tree as Tree4 } from "react-arborist";
|
|
2051
|
-
var buildTreeData2 = (storyboards) => {
|
|
1877
|
+
var buildTreeData = (storyboards) => {
|
|
2052
1878
|
const packagesMap = new Map;
|
|
2053
1879
|
const rootStoryboards = [];
|
|
2054
1880
|
for (const storyboard of storyboards) {
|
|
@@ -2064,7 +1890,7 @@ var buildTreeData2 = (storyboards) => {
|
|
|
2064
1890
|
const children = [];
|
|
2065
1891
|
children.push({
|
|
2066
1892
|
id: `canvas:${storyboard.id}`,
|
|
2067
|
-
name: "
|
|
1893
|
+
name: "Storyboard",
|
|
2068
1894
|
type: "canvas",
|
|
2069
1895
|
canvas: storyboard.canvas,
|
|
2070
1896
|
storyboard
|
|
@@ -2140,28 +1966,28 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2140
1966
|
enableDragAndDrop = false
|
|
2141
1967
|
}) => {
|
|
2142
1968
|
const dndProps = getDndProps(enableDragAndDrop);
|
|
2143
|
-
const rowHeight =
|
|
1969
|
+
const rowHeight = useMemo9(() => {
|
|
2144
1970
|
const paddingValue = parseFloat(verticalNodePadding);
|
|
2145
1971
|
const contentLineHeight = 20;
|
|
2146
1972
|
const borderHeight = 2;
|
|
2147
1973
|
return contentLineHeight + paddingValue * 2 + borderHeight;
|
|
2148
1974
|
}, [verticalNodePadding]);
|
|
2149
|
-
const treeData =
|
|
1975
|
+
const treeData = useMemo9(() => buildTreeData(storyboards), [storyboards]);
|
|
2150
1976
|
const NodeRenderer = (props) => {
|
|
2151
1977
|
const { node } = props;
|
|
2152
1978
|
const data = node.data;
|
|
2153
|
-
const icon = data.type === "package" ? /* @__PURE__ */
|
|
1979
|
+
const icon = data.type === "package" ? /* @__PURE__ */ React11.createElement(Package, {
|
|
2154
1980
|
size: 16
|
|
2155
|
-
}) : data.type === "storyboard" ? /* @__PURE__ */
|
|
1981
|
+
}) : data.type === "storyboard" ? /* @__PURE__ */ React11.createElement(FolderKanban, {
|
|
2156
1982
|
size: 16
|
|
2157
|
-
}) : data.type === "canvas" ? /* @__PURE__ */
|
|
1983
|
+
}) : data.type === "canvas" ? /* @__PURE__ */ React11.createElement(FileText, {
|
|
2158
1984
|
size: 16
|
|
2159
|
-
}) : /* @__PURE__ */
|
|
1985
|
+
}) : /* @__PURE__ */ React11.createElement(Workflow, {
|
|
2160
1986
|
size: 16
|
|
2161
1987
|
});
|
|
2162
1988
|
const nameColor = data.type === "package" ? theme.colors.primary : data.type === "storyboard" ? theme.colors.success : data.type === "canvas" ? theme.colors.warning || "#f59e0b" : theme.colors.textSecondary;
|
|
2163
1989
|
const nodeHorizontalPadding = data.type === "canvas" || data.type === "workflow" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2164
|
-
return /* @__PURE__ */
|
|
1990
|
+
return /* @__PURE__ */ React11.createElement(TreeNode, {
|
|
2165
1991
|
...props,
|
|
2166
1992
|
theme,
|
|
2167
1993
|
nameColor,
|
|
@@ -2181,7 +2007,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2181
2007
|
};
|
|
2182
2008
|
const initialHeight = 600;
|
|
2183
2009
|
const [containerRef, containerHeight] = useContainerHeight(initialHeight);
|
|
2184
|
-
return /* @__PURE__ */
|
|
2010
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
2185
2011
|
ref: containerRef,
|
|
2186
2012
|
style: {
|
|
2187
2013
|
backgroundColor: theme.colors.background,
|
|
@@ -2190,7 +2016,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2190
2016
|
height: "100%",
|
|
2191
2017
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2192
2018
|
}
|
|
2193
|
-
}, /* @__PURE__ */
|
|
2019
|
+
}, /* @__PURE__ */ React11.createElement(Tree3, {
|
|
2194
2020
|
initialData: treeData,
|
|
2195
2021
|
onSelect: handleSelect,
|
|
2196
2022
|
openByDefault: defaultOpen,
|
|
@@ -2209,9 +2035,9 @@ import {
|
|
|
2209
2035
|
Circle,
|
|
2210
2036
|
TestTube
|
|
2211
2037
|
} from "lucide-react";
|
|
2212
|
-
import
|
|
2213
|
-
import { Tree as
|
|
2214
|
-
var TelemetryCoverageContext =
|
|
2038
|
+
import React12, { useMemo as useMemo10 } from "react";
|
|
2039
|
+
import { Tree as Tree4 } from "react-arborist";
|
|
2040
|
+
var TelemetryCoverageContext = React12.createContext(null);
|
|
2215
2041
|
var DEFAULT_TEST_PATTERNS = [
|
|
2216
2042
|
/\.test\.[jt]sx?$/,
|
|
2217
2043
|
/\.spec\.[jt]sx?$/,
|
|
@@ -2228,7 +2054,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2228
2054
|
switch (status) {
|
|
2229
2055
|
case "covered":
|
|
2230
2056
|
return {
|
|
2231
|
-
icon: /* @__PURE__ */
|
|
2057
|
+
icon: /* @__PURE__ */ React12.createElement(Activity, {
|
|
2232
2058
|
size: 14
|
|
2233
2059
|
}),
|
|
2234
2060
|
color: "#22c55e",
|
|
@@ -2237,7 +2063,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2237
2063
|
};
|
|
2238
2064
|
case "partial":
|
|
2239
2065
|
return {
|
|
2240
|
-
icon: /* @__PURE__ */
|
|
2066
|
+
icon: /* @__PURE__ */ React12.createElement(CircleDot, {
|
|
2241
2067
|
size: 14
|
|
2242
2068
|
}),
|
|
2243
2069
|
color: "#eab308",
|
|
@@ -2246,7 +2072,7 @@ var getCoverageStatusDisplay = (coverage, _theme) => {
|
|
|
2246
2072
|
};
|
|
2247
2073
|
case "none":
|
|
2248
2074
|
return {
|
|
2249
|
-
icon: /* @__PURE__ */
|
|
2075
|
+
icon: /* @__PURE__ */ React12.createElement(Circle, {
|
|
2250
2076
|
size: 14
|
|
2251
2077
|
}),
|
|
2252
2078
|
color: "#6b7280",
|
|
@@ -2348,7 +2174,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2348
2174
|
enableDragAndDrop = false
|
|
2349
2175
|
}) => {
|
|
2350
2176
|
const dndProps = getDndProps(enableDragAndDrop);
|
|
2351
|
-
const coverageMap =
|
|
2177
|
+
const coverageMap = useMemo10(() => {
|
|
2352
2178
|
const map = new Map;
|
|
2353
2179
|
coverageData.forEach((item) => {
|
|
2354
2180
|
map.set(item.filePath, item);
|
|
@@ -2357,7 +2183,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2357
2183
|
}, [coverageData]);
|
|
2358
2184
|
const NodeRenderer = (props) => {
|
|
2359
2185
|
const { node } = props;
|
|
2360
|
-
const ctx =
|
|
2186
|
+
const ctx = React12.useContext(TelemetryCoverageContext);
|
|
2361
2187
|
const coverage = ctx?.coverageMap.get(node.data.id);
|
|
2362
2188
|
const hasTracedChildren = ctx?.hasTracedChildrenMap.get(node.data.id);
|
|
2363
2189
|
const coverageDisplay = coverage ? getCoverageStatusDisplay(coverage, theme) : null;
|
|
@@ -2369,11 +2195,11 @@ var TelemetryCoverageFileTree = ({
|
|
|
2369
2195
|
} else if (node.data.isTestFile) {
|
|
2370
2196
|
nameColor = "#6b728080";
|
|
2371
2197
|
}
|
|
2372
|
-
const leftIcon = node.data.isTestFile && !coverage ? /* @__PURE__ */
|
|
2198
|
+
const leftIcon = node.data.isTestFile && !coverage ? /* @__PURE__ */ React12.createElement(TestTube, {
|
|
2373
2199
|
size: 14,
|
|
2374
2200
|
style: { marginRight: 4, color: "#6b7280" }
|
|
2375
2201
|
}) : null;
|
|
2376
|
-
const rightContent = coverageDisplay ? /* @__PURE__ */
|
|
2202
|
+
const rightContent = coverageDisplay ? /* @__PURE__ */ React12.createElement("div", {
|
|
2377
2203
|
style: {
|
|
2378
2204
|
display: "flex",
|
|
2379
2205
|
alignItems: "center",
|
|
@@ -2381,14 +2207,14 @@ var TelemetryCoverageFileTree = ({
|
|
|
2381
2207
|
marginRight: "8px"
|
|
2382
2208
|
},
|
|
2383
2209
|
title: coverageDisplay.label
|
|
2384
|
-
}, coverageDisplay.icon, /* @__PURE__ */
|
|
2210
|
+
}, coverageDisplay.icon, /* @__PURE__ */ React12.createElement("span", {
|
|
2385
2211
|
style: {
|
|
2386
2212
|
marginLeft: "4px",
|
|
2387
2213
|
fontSize: theme.fontSizes[0],
|
|
2388
2214
|
fontWeight: "bold",
|
|
2389
2215
|
fontFamily: "monospace"
|
|
2390
2216
|
}
|
|
2391
|
-
}, coverageDisplay.badge)) : node.data.isTestFile ? /* @__PURE__ */
|
|
2217
|
+
}, coverageDisplay.badge)) : node.data.isTestFile ? /* @__PURE__ */ React12.createElement("div", {
|
|
2392
2218
|
style: {
|
|
2393
2219
|
display: "flex",
|
|
2394
2220
|
alignItems: "center",
|
|
@@ -2397,10 +2223,10 @@ var TelemetryCoverageFileTree = ({
|
|
|
2397
2223
|
opacity: 0.5
|
|
2398
2224
|
},
|
|
2399
2225
|
title: "No telemetry instrumentation"
|
|
2400
|
-
}, /* @__PURE__ */
|
|
2226
|
+
}, /* @__PURE__ */ React12.createElement(Circle, {
|
|
2401
2227
|
size: 14
|
|
2402
2228
|
})) : null;
|
|
2403
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ React12.createElement(TreeNode, {
|
|
2404
2230
|
...props,
|
|
2405
2231
|
theme,
|
|
2406
2232
|
rightContent,
|
|
@@ -2415,16 +2241,16 @@ var TelemetryCoverageFileTree = ({
|
|
|
2415
2241
|
}
|
|
2416
2242
|
});
|
|
2417
2243
|
};
|
|
2418
|
-
const treeStructure =
|
|
2244
|
+
const treeStructure = useMemo10(() => {
|
|
2419
2245
|
return transformTreeStructure2(fileTree, showOnlyTestFiles, testFilePatterns);
|
|
2420
2246
|
}, [fileTree, showOnlyTestFiles, testFilePatterns]);
|
|
2421
|
-
const treeData =
|
|
2247
|
+
const treeData = useMemo10(() => {
|
|
2422
2248
|
if (showUncoveredFiles) {
|
|
2423
2249
|
return treeStructure;
|
|
2424
2250
|
}
|
|
2425
2251
|
return filterCoveredNodes(treeStructure, coverageMap);
|
|
2426
2252
|
}, [treeStructure, showUncoveredFiles, coverageMap]);
|
|
2427
|
-
const hasTracedChildrenMap =
|
|
2253
|
+
const hasTracedChildrenMap = useMemo10(() => {
|
|
2428
2254
|
const map = new Map;
|
|
2429
2255
|
const markTracedParents = (nodes) => {
|
|
2430
2256
|
let hasTraced = false;
|
|
@@ -2456,7 +2282,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2456
2282
|
onDirectorySelect(selectedDirs);
|
|
2457
2283
|
}
|
|
2458
2284
|
};
|
|
2459
|
-
const calculatedHeight =
|
|
2285
|
+
const calculatedHeight = useMemo10(() => {
|
|
2460
2286
|
if (autoHeight) {
|
|
2461
2287
|
const visibleNodeCount = countVisibleNodes3(treeData, openByDefault);
|
|
2462
2288
|
return visibleNodeCount * 28;
|
|
@@ -2464,7 +2290,7 @@ var TelemetryCoverageFileTree = ({
|
|
|
2464
2290
|
return initialHeight;
|
|
2465
2291
|
}, [autoHeight, treeData, openByDefault, initialHeight]);
|
|
2466
2292
|
const [containerRef, containerHeight] = useContainerHeight(calculatedHeight);
|
|
2467
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
2468
2294
|
ref: containerRef,
|
|
2469
2295
|
style: {
|
|
2470
2296
|
backgroundColor: transparentBackground ? "transparent" : theme.colors.background,
|
|
@@ -2473,9 +2299,9 @@ var TelemetryCoverageFileTree = ({
|
|
|
2473
2299
|
...autoHeight ? {} : { height: "100%" },
|
|
2474
2300
|
...verticalPadding ? { paddingTop: verticalPadding, paddingBottom: verticalPadding } : {}
|
|
2475
2301
|
}
|
|
2476
|
-
}, /* @__PURE__ */
|
|
2302
|
+
}, /* @__PURE__ */ React12.createElement(TelemetryCoverageContext.Provider, {
|
|
2477
2303
|
value: { coverageMap, hasTracedChildrenMap }
|
|
2478
|
-
}, /* @__PURE__ */
|
|
2304
|
+
}, /* @__PURE__ */ React12.createElement(Tree4, {
|
|
2479
2305
|
data: treeData,
|
|
2480
2306
|
onSelect: handleSelect,
|
|
2481
2307
|
...selectedFile !== undefined && { selection: selectedFile },
|
|
@@ -2504,7 +2330,7 @@ var calculateTelemetryCoverageStats = (coverageData) => {
|
|
|
2504
2330
|
};
|
|
2505
2331
|
// src/components/TelemetryCoverageFileTreeContainer.tsx
|
|
2506
2332
|
import { RefreshCw as RefreshCw2, Eye as Eye2, EyeOff as EyeOff2, AlertCircle as AlertCircle4, Activity as Activity2 } from "lucide-react";
|
|
2507
|
-
import
|
|
2333
|
+
import React13, { useState as useState7, useMemo as useMemo11 } from "react";
|
|
2508
2334
|
var TelemetryCoverageFileTreeContainer = ({
|
|
2509
2335
|
fileTree,
|
|
2510
2336
|
theme,
|
|
@@ -2526,10 +2352,10 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2526
2352
|
}) => {
|
|
2527
2353
|
const [filters, setFilters] = useState7([]);
|
|
2528
2354
|
const [showUncoveredFiles, setShowUncoveredFiles] = useState7(true);
|
|
2529
|
-
const selectedDirectories =
|
|
2355
|
+
const selectedDirectories = useMemo11(() => {
|
|
2530
2356
|
return filters.filter((f) => f.mode === "include").map((f) => f.path);
|
|
2531
2357
|
}, [filters]);
|
|
2532
|
-
const stats =
|
|
2358
|
+
const stats = useMemo11(() => calculateTelemetryCoverageStats(coverageData), [coverageData]);
|
|
2533
2359
|
const handleRefresh = () => {
|
|
2534
2360
|
onRefresh?.();
|
|
2535
2361
|
};
|
|
@@ -2537,34 +2363,34 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2537
2363
|
setShowUncoveredFiles(!showUncoveredFiles);
|
|
2538
2364
|
};
|
|
2539
2365
|
const percentageColor = stats.percentage >= 80 ? "#22c55e" : stats.percentage >= 50 ? "#eab308" : stats.percentage > 0 ? "#f97316" : "#6b7280";
|
|
2540
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
2541
2367
|
style: { display: "flex", flexDirection: "column", height: "100%" }
|
|
2542
|
-
}, showControls && /* @__PURE__ */
|
|
2368
|
+
}, showControls && /* @__PURE__ */ React13.createElement("div", {
|
|
2543
2369
|
style: {
|
|
2544
2370
|
padding: "12px",
|
|
2545
2371
|
borderBottom: `1px solid ${theme.colors.border || "#e0e0e0"}`,
|
|
2546
2372
|
backgroundColor: theme.colors.backgroundSecondary || theme.colors.background
|
|
2547
2373
|
}
|
|
2548
|
-
}, /* @__PURE__ */
|
|
2374
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
2549
2375
|
style: {
|
|
2550
2376
|
display: "flex",
|
|
2551
2377
|
alignItems: "center",
|
|
2552
2378
|
justifyContent: "space-between",
|
|
2553
2379
|
marginBottom: "8px"
|
|
2554
2380
|
}
|
|
2555
|
-
}, /* @__PURE__ */
|
|
2381
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
2556
2382
|
style: { display: "flex", alignItems: "center", gap: "8px" }
|
|
2557
|
-
}, /* @__PURE__ */
|
|
2383
|
+
}, /* @__PURE__ */ React13.createElement(Activity2, {
|
|
2558
2384
|
size: 16,
|
|
2559
2385
|
color: theme.colors.primary
|
|
2560
|
-
}), /* @__PURE__ */
|
|
2386
|
+
}), /* @__PURE__ */ React13.createElement("h3", {
|
|
2561
2387
|
style: {
|
|
2562
2388
|
margin: 0,
|
|
2563
2389
|
fontSize: theme.fontSizes[1],
|
|
2564
2390
|
fontWeight: "bold",
|
|
2565
2391
|
color: theme.colors.text
|
|
2566
2392
|
}
|
|
2567
|
-
}, title), stats.testFiles > 0 && /* @__PURE__ */
|
|
2393
|
+
}, title), stats.testFiles > 0 && /* @__PURE__ */ React13.createElement("span", {
|
|
2568
2394
|
style: {
|
|
2569
2395
|
backgroundColor: percentageColor,
|
|
2570
2396
|
color: "#ffffff",
|
|
@@ -2574,14 +2400,14 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2574
2400
|
fontWeight: "bold",
|
|
2575
2401
|
fontFamily: "monospace"
|
|
2576
2402
|
}
|
|
2577
|
-
}, stats.percentage, "%"), isLoading && /* @__PURE__ */
|
|
2403
|
+
}, stats.percentage, "%"), isLoading && /* @__PURE__ */ React13.createElement(RefreshCw2, {
|
|
2578
2404
|
size: 16,
|
|
2579
2405
|
color: theme.colors.text,
|
|
2580
2406
|
className: "telemetry-coverage-spinner",
|
|
2581
2407
|
style: { animation: "spin 1s linear infinite" }
|
|
2582
|
-
})), /* @__PURE__ */
|
|
2408
|
+
})), /* @__PURE__ */ React13.createElement("div", {
|
|
2583
2409
|
style: { display: "flex", gap: "8px" }
|
|
2584
|
-
}, /* @__PURE__ */
|
|
2410
|
+
}, /* @__PURE__ */ React13.createElement("button", {
|
|
2585
2411
|
onClick: toggleShowUncoveredFiles,
|
|
2586
2412
|
style: {
|
|
2587
2413
|
background: "none",
|
|
@@ -2596,11 +2422,11 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2596
2422
|
color: theme.colors.text
|
|
2597
2423
|
},
|
|
2598
2424
|
title: showUncoveredFiles ? "Show only covered files" : "Show all test files"
|
|
2599
|
-
}, showUncoveredFiles ? /* @__PURE__ */
|
|
2425
|
+
}, showUncoveredFiles ? /* @__PURE__ */ React13.createElement(EyeOff2, {
|
|
2600
2426
|
size: 14
|
|
2601
|
-
}) : /* @__PURE__ */
|
|
2427
|
+
}) : /* @__PURE__ */ React13.createElement(Eye2, {
|
|
2602
2428
|
size: 14
|
|
2603
|
-
}), showUncoveredFiles ? "Hide uncovered" : "Show all"), onRefresh && /* @__PURE__ */
|
|
2429
|
+
}), showUncoveredFiles ? "Hide uncovered" : "Show all"), onRefresh && /* @__PURE__ */ React13.createElement("button", {
|
|
2604
2430
|
onClick: handleRefresh,
|
|
2605
2431
|
disabled: isLoading,
|
|
2606
2432
|
style: {
|
|
@@ -2617,9 +2443,9 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2617
2443
|
opacity: isLoading ? 0.6 : 1
|
|
2618
2444
|
},
|
|
2619
2445
|
title: "Refresh coverage data"
|
|
2620
|
-
}, /* @__PURE__ */
|
|
2446
|
+
}, /* @__PURE__ */ React13.createElement(RefreshCw2, {
|
|
2621
2447
|
size: 14
|
|
2622
|
-
}), "Refresh"))), error && /* @__PURE__ */
|
|
2448
|
+
}), "Refresh"))), error && /* @__PURE__ */ React13.createElement("div", {
|
|
2623
2449
|
style: {
|
|
2624
2450
|
display: "flex",
|
|
2625
2451
|
alignItems: "center",
|
|
@@ -2632,36 +2458,36 @@ var TelemetryCoverageFileTreeContainer = ({
|
|
|
2632
2458
|
color: "#856404",
|
|
2633
2459
|
marginBottom: "8px"
|
|
2634
2460
|
}
|
|
2635
|
-
}, /* @__PURE__ */
|
|
2461
|
+
}, /* @__PURE__ */ React13.createElement(AlertCircle4, {
|
|
2636
2462
|
size: 14
|
|
2637
|
-
}), error), !error && stats.testFiles > 0 && /* @__PURE__ */
|
|
2463
|
+
}), error), !error && stats.testFiles > 0 && /* @__PURE__ */ React13.createElement("div", {
|
|
2638
2464
|
style: {
|
|
2639
2465
|
display: "flex",
|
|
2640
2466
|
gap: "16px",
|
|
2641
2467
|
fontSize: theme.fontSizes[0],
|
|
2642
2468
|
color: theme.colors.textSecondary || "#666"
|
|
2643
2469
|
}
|
|
2644
|
-
}, /* @__PURE__ */
|
|
2470
|
+
}, /* @__PURE__ */ React13.createElement("span", null, /* @__PURE__ */ React13.createElement("strong", {
|
|
2645
2471
|
style: { color: "#22c55e" }
|
|
2646
|
-
}, stats.coveredFiles), " covered"), stats.partialFiles > 0 && /* @__PURE__ */
|
|
2472
|
+
}, stats.coveredFiles), " covered"), stats.partialFiles > 0 && /* @__PURE__ */ React13.createElement("span", null, /* @__PURE__ */ React13.createElement("strong", {
|
|
2647
2473
|
style: { color: "#eab308" }
|
|
2648
|
-
}, stats.partialFiles), " partial"), /* @__PURE__ */
|
|
2474
|
+
}, stats.partialFiles), " partial"), /* @__PURE__ */ React13.createElement("span", null, /* @__PURE__ */ React13.createElement("strong", {
|
|
2649
2475
|
style: { color: "#6b7280" }
|
|
2650
|
-
}, stats.uncoveredFiles), " uncovered"), /* @__PURE__ */
|
|
2476
|
+
}, stats.uncoveredFiles), " uncovered"), /* @__PURE__ */ React13.createElement("span", {
|
|
2651
2477
|
style: { marginLeft: "auto" }
|
|
2652
|
-
}, stats.totalTraced, "/", stats.totalTests, " tests traced")), !error && stats.testFiles === 0 && /* @__PURE__ */
|
|
2478
|
+
}, stats.totalTraced, "/", stats.totalTests, " tests traced")), !error && stats.testFiles === 0 && /* @__PURE__ */ React13.createElement("div", {
|
|
2653
2479
|
style: {
|
|
2654
2480
|
fontSize: theme.fontSizes[0],
|
|
2655
2481
|
color: theme.colors.textSecondary || "#666"
|
|
2656
2482
|
}
|
|
2657
|
-
}, "No test files with coverage data found")), /* @__PURE__ */
|
|
2483
|
+
}, "No test files with coverage data found")), /* @__PURE__ */ React13.createElement(DirectoryFilterInput, {
|
|
2658
2484
|
fileTree,
|
|
2659
2485
|
theme,
|
|
2660
2486
|
filters,
|
|
2661
2487
|
onFiltersChange: setFilters
|
|
2662
|
-
}), /* @__PURE__ */
|
|
2488
|
+
}), /* @__PURE__ */ React13.createElement("div", {
|
|
2663
2489
|
style: { flex: 1, marginTop: "1rem", overflow: "hidden" }
|
|
2664
|
-
}, /* @__PURE__ */
|
|
2490
|
+
}, /* @__PURE__ */ React13.createElement(TelemetryCoverageFileTree, {
|
|
2665
2491
|
fileTree,
|
|
2666
2492
|
theme,
|
|
2667
2493
|
coverageData,
|
|
@@ -2699,6 +2525,5 @@ export {
|
|
|
2699
2525
|
GitOrderedFileList,
|
|
2700
2526
|
FileTreeContainer,
|
|
2701
2527
|
DynamicFileTree,
|
|
2702
|
-
DirectoryFilterInput
|
|
2703
|
-
CanvasNarrativeTreeCore
|
|
2528
|
+
DirectoryFilterInput
|
|
2704
2529
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CanvasNarrativeTreeCore } from './CanvasNarrativeTreeCore';
|
|
3
|
-
declare const meta: Meta<typeof CanvasNarrativeTreeCore>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CanvasNarrativeTreeCore>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const SinglePackage: Story;
|
|
8
|
-
export declare const RootCanvasOnly: Story;
|
|
9
|
-
export declare const NoNarratives: Story;
|
|
10
|
-
export declare const CollapsedByDefault: Story;
|
|
11
|
-
export declare const WithSelection: Story;
|
|
12
|
-
export declare const RegalTheme: Story;
|
|
13
|
-
export declare const TerminalTheme: Story;
|
|
14
|
-
export declare const MatrixTheme: Story;
|
|
15
|
-
export declare const MatrixMinimalTheme: Story;
|
|
16
|
-
export declare const SlateTheme: Story;
|
|
17
|
-
export declare const InteractiveDemo: Story;
|
|
18
|
-
export declare const ThemeComparison: Story;
|
|
19
|
-
export declare const CustomPadding: Story;
|
|
20
|
-
//# sourceMappingURL=CanvasNarrativeTree.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasNarrativeTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasNarrativeTree/CanvasNarrativeTree.stories.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAgMpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,uBAAuB,CAO9C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEtD,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAQhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAQhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAuE7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAiE7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAW3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasNarrativeTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasNarrativeTree/CanvasNarrativeTreeCore.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAEV,4BAA4B,EAG7B,MAAM,SAAS,CAAC;AA0IjB,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA0H1E,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@principal-ade/industry-theme';
|
|
2
|
-
import type { DiscoveredCanvas, WorkflowTemplate } from '@principal-ai/principal-view-core';
|
|
3
|
-
import type { TreeNodeData } from '../TreeNode';
|
|
4
|
-
export interface NarrativeFile {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
path: string;
|
|
8
|
-
packageName?: string;
|
|
9
|
-
canvasPath?: string;
|
|
10
|
-
}
|
|
11
|
-
export type { DiscoveredCanvas, WorkflowTemplate };
|
|
12
|
-
export type CanvasNarrativeNodeType = 'package' | 'canvas' | 'storyboard' | 'narrative';
|
|
13
|
-
export interface CanvasNarrativeNodeData extends TreeNodeData {
|
|
14
|
-
type: CanvasNarrativeNodeType;
|
|
15
|
-
children?: CanvasNarrativeNodeData[];
|
|
16
|
-
canvas?: DiscoveredCanvas;
|
|
17
|
-
narrative?: NarrativeFile;
|
|
18
|
-
narrativeTemplate?: WorkflowTemplate;
|
|
19
|
-
packageName?: string;
|
|
20
|
-
scope?: 'package' | 'root';
|
|
21
|
-
}
|
|
22
|
-
export interface CanvasNarrativeTreeCoreProps {
|
|
23
|
-
canvases: DiscoveredCanvas[];
|
|
24
|
-
narratives: Array<{
|
|
25
|
-
file: NarrativeFile;
|
|
26
|
-
template: WorkflowTemplate;
|
|
27
|
-
}>;
|
|
28
|
-
theme: Theme;
|
|
29
|
-
onClick: (node: CanvasNarrativeNodeData) => void;
|
|
30
|
-
selectedNodeId?: string;
|
|
31
|
-
defaultOpen?: boolean;
|
|
32
|
-
initialOpenState?: Record<string, boolean>;
|
|
33
|
-
horizontalNodePadding?: string;
|
|
34
|
-
verticalNodePadding?: string;
|
|
35
|
-
verticalPadding?: string;
|
|
36
|
-
enableDragAndDrop?: boolean;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasNarrativeTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;AAEnD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;AAExF,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAGrC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,QAAQ,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;IACvE,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
|