@principal-ade/dynamic-file-tree 0.1.27
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/README.md +67 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1796 -0
- package/dist/src/components/DirectoryFilterInput.d.ts +21 -0
- package/dist/src/components/DirectoryFilterInput.d.ts.map +1 -0
- package/dist/src/components/DynamicFileTree.d.ts +19 -0
- package/dist/src/components/DynamicFileTree.d.ts.map +1 -0
- package/dist/src/components/DynamicFileTree.stories.d.ts +21 -0
- package/dist/src/components/DynamicFileTree.stories.d.ts.map +1 -0
- package/dist/src/components/FileTreeContainer.d.ts +12 -0
- package/dist/src/components/FileTreeContainer.d.ts.map +1 -0
- package/dist/src/components/FileTreeContainer.stories.d.ts +12 -0
- package/dist/src/components/FileTreeContainer.stories.d.ts.map +1 -0
- package/dist/src/components/GitOrderedFileList.d.ts +40 -0
- package/dist/src/components/GitOrderedFileList.d.ts.map +1 -0
- package/dist/src/components/GitOrderedFileList.stories.d.ts +20 -0
- package/dist/src/components/GitOrderedFileList.stories.d.ts.map +1 -0
- package/dist/src/components/GitStatusFileTree.d.ts +28 -0
- package/dist/src/components/GitStatusFileTree.d.ts.map +1 -0
- package/dist/src/components/GitStatusFileTree.stories.d.ts +22 -0
- package/dist/src/components/GitStatusFileTree.stories.d.ts.map +1 -0
- package/dist/src/components/GitStatusFileTreeContainer.d.ts +20 -0
- package/dist/src/components/GitStatusFileTreeContainer.d.ts.map +1 -0
- package/dist/src/components/GitStatusFileTreeContainer.stories.d.ts +21 -0
- package/dist/src/components/GitStatusFileTreeContainer.stories.d.ts.map +1 -0
- package/dist/src/components/MultiFileTree/MultiFileTree.d.ts +20 -0
- package/dist/src/components/MultiFileTree/MultiFileTree.d.ts.map +1 -0
- package/dist/src/components/MultiFileTree/MultiFileTree.stories.d.ts +20 -0
- package/dist/src/components/MultiFileTree/MultiFileTree.stories.d.ts.map +1 -0
- package/dist/src/components/MultiFileTree/MultiFileTreeCore.d.ts +21 -0
- package/dist/src/components/MultiFileTree/MultiFileTreeCore.d.ts.map +1 -0
- package/dist/src/components/MultiFileTree/index.d.ts +4 -0
- package/dist/src/components/MultiFileTree/index.d.ts.map +1 -0
- package/dist/src/components/MultiFileTree/types.d.ts +44 -0
- package/dist/src/components/MultiFileTree/types.d.ts.map +1 -0
- package/dist/src/components/OrderedFileList.d.ts +29 -0
- package/dist/src/components/OrderedFileList.d.ts.map +1 -0
- package/dist/src/components/OrderedFileList.stories.d.ts +23 -0
- package/dist/src/components/OrderedFileList.stories.d.ts.map +1 -0
- package/dist/src/components/TreeNode.d.ts +20 -0
- package/dist/src/components/TreeNode.d.ts.map +1 -0
- package/dist/src/hooks/useContainerHeight.d.ts +19 -0
- package/dist/src/hooks/useContainerHeight.d.ts.map +1 -0
- package/dist/src/utils/multiTree/combineRepositoryTrees.d.ts +20 -0
- package/dist/src/utils/multiTree/combineRepositoryTrees.d.ts.map +1 -0
- package/dist/src/utils/multiTree/filterFileTree.d.ts +13 -0
- package/dist/src/utils/multiTree/filterFileTree.d.ts.map +1 -0
- package/dist/src/utils/multiTree/index.d.ts +4 -0
- package/dist/src/utils/multiTree/index.d.ts.map +1 -0
- package/dist/src/utils/multiTree/pathUtils.d.ts +18 -0
- package/dist/src/utils/multiTree/pathUtils.d.ts.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DirectoryInfo, FileInfo } from '@principal-ai/repository-abstraction';
|
|
2
|
+
/**
|
|
3
|
+
* Safely extract name from path
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractNameFromPath(path: string | undefined): string;
|
|
6
|
+
/**
|
|
7
|
+
* Parse a unified path to extract repository name and original path
|
|
8
|
+
*/
|
|
9
|
+
export interface ParsedPath {
|
|
10
|
+
sourceName: string;
|
|
11
|
+
originalPath: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function parseUnifiedPath(path: string): ParsedPath;
|
|
14
|
+
/**
|
|
15
|
+
* Recursively update paths in a tree node to include a prefix
|
|
16
|
+
*/
|
|
17
|
+
export declare function updateTreePaths(node: DirectoryInfo | FileInfo, prefix: string): DirectoryInfo | FileInfo;
|
|
18
|
+
//# sourceMappingURL=pathUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/multiTree/pathUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIpE;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CASzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,aAAa,GAAG,QAAQ,EAC9B,MAAM,EAAE,MAAM,GACb,aAAa,GAAG,QAAQ,CAkC1B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@principal-ade/dynamic-file-tree",
|
|
3
|
+
"version": "0.1.27",
|
|
4
|
+
"description": "React component for selective directory filtering and file tree visualization",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.mjs",
|
|
14
|
+
"default": "./dist/index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "bun run clean && bun run build:esm && bun run build:types",
|
|
20
|
+
"build:esm": "bun build ./index.ts --outfile ./dist/index.mjs --format esm --target browser --external react --external react-dom --external lucide-react --external react-arborist --external @principal-ade/industry-theme --external @principal-ai/repository-abstraction",
|
|
21
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --declarationMap",
|
|
22
|
+
"dev": "bun run build --watch",
|
|
23
|
+
"test": "bun test",
|
|
24
|
+
"test:watch": "bun test --watch",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
27
|
+
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
28
|
+
"format": "prettier --write .",
|
|
29
|
+
"format:check": "prettier --check .",
|
|
30
|
+
"clean": "rm -rf dist coverage",
|
|
31
|
+
"storybook": "storybook dev -p 6007",
|
|
32
|
+
"build-storybook": "storybook build",
|
|
33
|
+
"prepare": "husky",
|
|
34
|
+
"prepublishOnly": "npm run build"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"react",
|
|
38
|
+
"file-tree",
|
|
39
|
+
"directory-filter",
|
|
40
|
+
"tree-view",
|
|
41
|
+
"file-browser"
|
|
42
|
+
],
|
|
43
|
+
"author": "PrincipleMD Team",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@principal-ade/industry-theme": "latest",
|
|
47
|
+
"react-arborist": "^3.4.3",
|
|
48
|
+
"typescript": "^5.0.4"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@principal-ai/repository-abstraction": "^0.2.3",
|
|
52
|
+
"lucide-react": ">=0.263.0",
|
|
53
|
+
"react": ">=19.0.0",
|
|
54
|
+
"react-dom": ">=19.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"react": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"react-dom": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"lucide-react": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@eslint/js": "^9.32.0",
|
|
69
|
+
"@storybook/addon-docs": "^9.1.3",
|
|
70
|
+
"@storybook/addon-onboarding": "^9.1.3",
|
|
71
|
+
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
72
|
+
"@storybook/react-webpack5": "^9.1.3",
|
|
73
|
+
"@testing-library/react": "^16.3.0",
|
|
74
|
+
"@types/bun": "latest",
|
|
75
|
+
"@types/jest": "^29.5.12",
|
|
76
|
+
"@types/node": "^22.15.26",
|
|
77
|
+
"@types/react": "^19.1.12",
|
|
78
|
+
"@types/react-dom": "^19.1.8",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
81
|
+
"eslint": "^9.32.0",
|
|
82
|
+
"eslint-config-prettier": "^10.1.8",
|
|
83
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
84
|
+
"eslint-plugin-import": "^2.32.0",
|
|
85
|
+
"eslint-plugin-storybook": "^9.1.3",
|
|
86
|
+
"hast-util-sanitize": "^5.0.2",
|
|
87
|
+
"highlight.js": "^11.11.1",
|
|
88
|
+
"husky": "^9.1.7",
|
|
89
|
+
"jest": "^29.7.0",
|
|
90
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
91
|
+
"jsdom": "^26.1.0",
|
|
92
|
+
"lint-staged": "^16.1.5",
|
|
93
|
+
"lucide-react": "^0.542.0",
|
|
94
|
+
"prettier": "^3.6.2",
|
|
95
|
+
"react": "^19.1.1",
|
|
96
|
+
"react-dom": "^19.1.1",
|
|
97
|
+
"react-markdown": "^10.1.0",
|
|
98
|
+
"react-zoom-pan-pinch": "^3.7.0",
|
|
99
|
+
"rehype-highlight": "^7.0.2",
|
|
100
|
+
"rehype-raw": "^7.0.0",
|
|
101
|
+
"rehype-sanitize": "^6.0.0",
|
|
102
|
+
"rehype-slug": "^6.0.0",
|
|
103
|
+
"remark-gfm": "^4.0.1",
|
|
104
|
+
"storybook": "^9.1.3",
|
|
105
|
+
"typescript-eslint": "^8.38.0"
|
|
106
|
+
},
|
|
107
|
+
"files": [
|
|
108
|
+
"dist",
|
|
109
|
+
"README.md",
|
|
110
|
+
"LICENSE"
|
|
111
|
+
]
|
|
112
|
+
}
|