@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.
Files changed (53) hide show
  1. package/README.md +67 -0
  2. package/dist/index.d.ts +22 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.mjs +1796 -0
  5. package/dist/src/components/DirectoryFilterInput.d.ts +21 -0
  6. package/dist/src/components/DirectoryFilterInput.d.ts.map +1 -0
  7. package/dist/src/components/DynamicFileTree.d.ts +19 -0
  8. package/dist/src/components/DynamicFileTree.d.ts.map +1 -0
  9. package/dist/src/components/DynamicFileTree.stories.d.ts +21 -0
  10. package/dist/src/components/DynamicFileTree.stories.d.ts.map +1 -0
  11. package/dist/src/components/FileTreeContainer.d.ts +12 -0
  12. package/dist/src/components/FileTreeContainer.d.ts.map +1 -0
  13. package/dist/src/components/FileTreeContainer.stories.d.ts +12 -0
  14. package/dist/src/components/FileTreeContainer.stories.d.ts.map +1 -0
  15. package/dist/src/components/GitOrderedFileList.d.ts +40 -0
  16. package/dist/src/components/GitOrderedFileList.d.ts.map +1 -0
  17. package/dist/src/components/GitOrderedFileList.stories.d.ts +20 -0
  18. package/dist/src/components/GitOrderedFileList.stories.d.ts.map +1 -0
  19. package/dist/src/components/GitStatusFileTree.d.ts +28 -0
  20. package/dist/src/components/GitStatusFileTree.d.ts.map +1 -0
  21. package/dist/src/components/GitStatusFileTree.stories.d.ts +22 -0
  22. package/dist/src/components/GitStatusFileTree.stories.d.ts.map +1 -0
  23. package/dist/src/components/GitStatusFileTreeContainer.d.ts +20 -0
  24. package/dist/src/components/GitStatusFileTreeContainer.d.ts.map +1 -0
  25. package/dist/src/components/GitStatusFileTreeContainer.stories.d.ts +21 -0
  26. package/dist/src/components/GitStatusFileTreeContainer.stories.d.ts.map +1 -0
  27. package/dist/src/components/MultiFileTree/MultiFileTree.d.ts +20 -0
  28. package/dist/src/components/MultiFileTree/MultiFileTree.d.ts.map +1 -0
  29. package/dist/src/components/MultiFileTree/MultiFileTree.stories.d.ts +20 -0
  30. package/dist/src/components/MultiFileTree/MultiFileTree.stories.d.ts.map +1 -0
  31. package/dist/src/components/MultiFileTree/MultiFileTreeCore.d.ts +21 -0
  32. package/dist/src/components/MultiFileTree/MultiFileTreeCore.d.ts.map +1 -0
  33. package/dist/src/components/MultiFileTree/index.d.ts +4 -0
  34. package/dist/src/components/MultiFileTree/index.d.ts.map +1 -0
  35. package/dist/src/components/MultiFileTree/types.d.ts +44 -0
  36. package/dist/src/components/MultiFileTree/types.d.ts.map +1 -0
  37. package/dist/src/components/OrderedFileList.d.ts +29 -0
  38. package/dist/src/components/OrderedFileList.d.ts.map +1 -0
  39. package/dist/src/components/OrderedFileList.stories.d.ts +23 -0
  40. package/dist/src/components/OrderedFileList.stories.d.ts.map +1 -0
  41. package/dist/src/components/TreeNode.d.ts +20 -0
  42. package/dist/src/components/TreeNode.d.ts.map +1 -0
  43. package/dist/src/hooks/useContainerHeight.d.ts +19 -0
  44. package/dist/src/hooks/useContainerHeight.d.ts.map +1 -0
  45. package/dist/src/utils/multiTree/combineRepositoryTrees.d.ts +20 -0
  46. package/dist/src/utils/multiTree/combineRepositoryTrees.d.ts.map +1 -0
  47. package/dist/src/utils/multiTree/filterFileTree.d.ts +13 -0
  48. package/dist/src/utils/multiTree/filterFileTree.d.ts.map +1 -0
  49. package/dist/src/utils/multiTree/index.d.ts +4 -0
  50. package/dist/src/utils/multiTree/index.d.ts.map +1 -0
  51. package/dist/src/utils/multiTree/pathUtils.d.ts +18 -0
  52. package/dist/src/utils/multiTree/pathUtils.d.ts.map +1 -0
  53. package/package.json +112 -0
@@ -0,0 +1,21 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import type { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export interface DirectoryFilter {
5
+ id: string;
6
+ path: string;
7
+ mode: 'include' | 'exclude';
8
+ }
9
+ export interface DirectoryFilterInputProps {
10
+ fileTree: FileTree;
11
+ theme: Theme;
12
+ filters?: DirectoryFilter[];
13
+ onFiltersChange?: (filters: DirectoryFilter[]) => void;
14
+ placeholder?: string;
15
+ }
16
+ /**
17
+ * DirectoryFilterInput - A searchable input for selecting directories from a FileTree
18
+ * Inspired by the directory filter in electron-app's LocalSearchPanel
19
+ */
20
+ export declare const DirectoryFilterInput: React.FC<DirectoryFilterInputProps>;
21
+ //# sourceMappingURL=DirectoryFilterInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DirectoryFilterInput.d.ts","sourceRoot":"","sources":["../../../src/components/DirectoryFilterInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqTpE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export interface DynamicFileTreeProps {
5
+ fileTree: FileTree;
6
+ theme: Theme;
7
+ selectedDirectories?: string[];
8
+ selectedFile?: string;
9
+ onDirectorySelect?: (directories: string[]) => void;
10
+ onFileSelect?: (filePath: string) => void;
11
+ initialOpenState?: Record<string, boolean>;
12
+ defaultOpen?: boolean;
13
+ horizontalNodePadding?: string;
14
+ onContextMenu?: (event: React.MouseEvent, nodePath: string, isFolder: boolean) => void;
15
+ initialHeight?: number;
16
+ autoHeight?: boolean;
17
+ }
18
+ export declare const DynamicFileTree: React.FC<DynamicFileTreeProps>;
19
+ //# sourceMappingURL=DynamicFileTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicFileTree.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicFileTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAgB,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAkB,MAAM,OAAO,CAAC;AAgBvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAqGD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4G1D,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { DynamicFileTree } from './DynamicFileTree';
3
+ declare const meta: Meta<typeof DynamicFileTree>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DynamicFileTree>;
6
+ export declare const Default: Story;
7
+ export declare const WithFilteredDirectories: Story;
8
+ export declare const EmptyTree: Story;
9
+ export declare const RegalTheme: Story;
10
+ export declare const TerminalTheme: Story;
11
+ export declare const MatrixTheme: Story;
12
+ export declare const MatrixMinimalTheme: Story;
13
+ export declare const SlateTheme: Story;
14
+ export declare const InteractiveSelection: Story;
15
+ export declare const SelectionWithThemes: Story;
16
+ export declare const LongFileNamesTruncation: Story;
17
+ export declare const HyphenatedFileNames: Story;
18
+ export declare const CustomInitialHeight: Story;
19
+ export declare const AutoHeightSmall: Story;
20
+ export declare const AutoHeightExpandable: Story;
21
+ //# sourceMappingURL=DynamicFileTree.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicFileTree.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicFileTree.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0EpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAQtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAMrC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAsBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KA+BlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAmDjC,CAAC;AA8CF,eAAO,MAAM,uBAAuB,EAAE,KAyBrC,CAAC;AAkDF,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA0BjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA2B7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAkElC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export interface FileTreeContainerProps {
5
+ fileTree: FileTree;
6
+ theme: Theme;
7
+ selectedFile?: string;
8
+ onFileSelect?: (filePath: string) => void;
9
+ onContextMenu?: (event: React.MouseEvent, nodePath: string, isFolder: boolean) => void;
10
+ }
11
+ export declare const FileTreeContainer: React.FC<FileTreeContainerProps>;
12
+ //# sourceMappingURL=FileTreeContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileTreeContainer.d.ts","sourceRoot":"","sources":["../../../src/components/FileTreeContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACxF;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmC9D,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { FileTreeContainer } from './FileTreeContainer';
3
+ declare const meta: Meta<typeof FileTreeContainer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof FileTreeContainer>;
6
+ export declare const Default: Story;
7
+ export declare const EmptyTree: Story;
8
+ export declare const DirectorySelectionHighlight: Story;
9
+ export declare const CascadingSelectionDemo: Story;
10
+ export declare const WithContextMenu: Story;
11
+ export declare const WithDifferentThemes: Story;
12
+ //# sourceMappingURL=FileTreeContainer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileTreeContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/components/FileTreeContainer.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA2ExD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAQxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAsBvB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,KAsCzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAmDpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAwI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAoDjC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export type GitStatus = 'M' | 'A' | 'D' | 'R' | 'C' | 'U' | '??' | '!!' | 'AM' | 'MM' | null;
5
+ export interface GitFileStatus {
6
+ filePath: string;
7
+ indexStatus: string;
8
+ workingTreeStatus: string;
9
+ status: GitStatus;
10
+ }
11
+ export type SortBy = 'lastModified' | 'size' | 'name' | 'gitStatus';
12
+ export type SortOrder = 'asc' | 'desc';
13
+ export interface GitOrderedFileListProps {
14
+ /** The file tree to extract and display files from */
15
+ fileTree: FileTree;
16
+ /** Theme for styling the component */
17
+ theme: Theme;
18
+ /** Git status data for files */
19
+ gitStatusData: GitFileStatus[];
20
+ /** Callback when a file is selected */
21
+ onFileSelect?: (filePath: string) => void;
22
+ /** Optional padding for the container */
23
+ padding?: string;
24
+ /** Currently selected file path */
25
+ selectedFile?: string;
26
+ /** What to sort by (default: 'lastModified') */
27
+ sortBy?: SortBy;
28
+ /** Sort order: 'asc' (ascending) or 'desc' (descending, default) */
29
+ sortOrder?: SortOrder;
30
+ /** Show only files with git changes (default: false) */
31
+ showOnlyChanged?: boolean;
32
+ /** Optional callback for context menu */
33
+ onContextMenu?: (event: React.MouseEvent, filePath: string) => void;
34
+ }
35
+ /**
36
+ * GitOrderedFileList component displays all files from a file tree
37
+ * with git status indicators, in a flat list ordered by various criteria
38
+ */
39
+ export declare const GitOrderedFileList: React.FC<GitOrderedFileListProps>;
40
+ //# sourceMappingURL=GitOrderedFileList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitOrderedFileList.d.ts","sourceRoot":"","sources":["../../../src/components/GitOrderedFileList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAA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AC"}
@@ -0,0 +1,20 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { GitOrderedFileList } from './GitOrderedFileList';
3
+ declare const meta: Meta<typeof GitOrderedFileList>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof GitOrderedFileList>;
6
+ export declare const Default: Story;
7
+ export declare const ShowOnlyChanged: Story;
8
+ export declare const SortByGitStatus: Story;
9
+ export declare const SortBySize: Story;
10
+ export declare const SortByName: Story;
11
+ export declare const AllStatusTypes: Story;
12
+ export declare const NoChanges: Story;
13
+ export declare const InteractiveControls: Story;
14
+ export declare const RegalTheme: Story;
15
+ export declare const TerminalTheme: Story;
16
+ export declare const MatrixTheme: Story;
17
+ export declare const MatrixMinimalTheme: Story;
18
+ export declare const SlateTheme: Story;
19
+ export declare const ThemeComparison: Story;
20
+ //# sourceMappingURL=GitOrderedFileList.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitOrderedFileList.stories.d.ts","sourceRoot":"","sources":["../../../src/components/GitOrderedFileList.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAmJzE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAmBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjD,eAAO,MAAM,OAAO,EAAE,KA0BrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA2B7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA4B7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA2BxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA2B5B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA0BvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAwGjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAiD7B,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export type GitStatus = 'M' | 'A' | 'D' | 'R' | 'C' | 'U' | '??' | '!!' | 'AM' | 'MM' | null;
5
+ export interface GitFileStatus {
6
+ filePath: string;
7
+ indexStatus: string;
8
+ workingTreeStatus: string;
9
+ status: GitStatus;
10
+ }
11
+ export interface GitStatusFileTreeProps {
12
+ fileTree: FileTree;
13
+ theme: Theme;
14
+ gitStatusData: GitFileStatus[];
15
+ selectedDirectories?: string[];
16
+ selectedFile?: string;
17
+ onDirectorySelect?: (directories: string[]) => void;
18
+ onFileSelect?: (filePath: string) => void;
19
+ showUnchangedFiles?: boolean;
20
+ transparentBackground?: boolean;
21
+ horizontalNodePadding?: string;
22
+ onContextMenu?: (event: React.MouseEvent, nodePath: string, isFolder: boolean) => void;
23
+ openByDefault?: boolean;
24
+ initialHeight?: number;
25
+ autoHeight?: boolean;
26
+ }
27
+ export declare const GitStatusFileTree: React.FC<GitStatusFileTreeProps>;
28
+ //# sourceMappingURL=GitStatusFileTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitStatusFileTree.d.ts","sourceRoot":"","sources":["../../../src/components/GitStatusFileTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAA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@storybook/react';
2
+ import { GitStatusFileTree } from './GitStatusFileTree';
3
+ declare const meta: Meta<typeof GitStatusFileTree>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof GitStatusFileTree>;
6
+ export declare const Default: Story;
7
+ export declare const OnlyChangedFiles: Story;
8
+ export declare const NoChanges: Story;
9
+ export declare const ManyChanges: Story;
10
+ export declare const AllStatusTypes: Story;
11
+ export declare const LargeRepository: Story;
12
+ export declare const MergeConflicts: Story;
13
+ export declare const EmptyRepository: Story;
14
+ export declare const FilteredView: Story;
15
+ export declare const InteractiveDemo: Story;
16
+ export declare const PerformanceTest: Story;
17
+ export declare const RegalTheme: Story;
18
+ export declare const TerminalTheme: Story;
19
+ export declare const MatrixTheme: Story;
20
+ export declare const MatrixMinimalTheme: Story;
21
+ export declare const SlateTheme: Story;
22
+ //# sourceMappingURL=GitStatusFileTree.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitStatusFileTree.stories.d.ts","sourceRoot":"","sources":["../../../src/components/GitStatusFileTree.stories.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAiB,MAAM,qBAAqB,CAAC;AA8OvE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CASxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC;AAoDF,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,KAyB7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,KAwD7B,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAe3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAehC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ import { GitFileStatus } from './GitStatusFileTree';
5
+ export interface GitStatusFileTreeContainerProps {
6
+ fileTree: FileTree;
7
+ theme: Theme;
8
+ gitStatusData: GitFileStatus[];
9
+ selectedFile?: string;
10
+ onFileSelect?: (filePath: string) => void;
11
+ onRefresh?: () => void;
12
+ isLoading?: boolean;
13
+ error?: string | null;
14
+ showControls?: boolean;
15
+ onContextMenu?: (event: React.MouseEvent, nodePath: string, isFolder: boolean) => void;
16
+ initialHeight?: number;
17
+ autoHeight?: boolean;
18
+ }
19
+ export declare const GitStatusFileTreeContainer: React.FC<GitStatusFileTreeContainerProps>;
20
+ //# sourceMappingURL=GitStatusFileTreeContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitStatusFileTreeContainer.d.ts","sourceRoot":"","sources":["../../../src/components/GitStatusFileTreeContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAqB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGvE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAoLhF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { GitStatusFileTreeContainer } from './GitStatusFileTreeContainer';
3
+ declare const meta: Meta<typeof GitStatusFileTreeContainer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof GitStatusFileTreeContainer>;
6
+ export declare const Default: Story;
7
+ export declare const WithoutControls: Story;
8
+ export declare const AutoRefreshEnabled: Story;
9
+ export declare const ActiveDevelopment: Story;
10
+ export declare const CodeReview: Story;
11
+ export declare const LargeRepository: Story;
12
+ export declare const ErrorState: Story;
13
+ export declare const LoadingState: Story;
14
+ export declare const IDEIntegration: Story;
15
+ export declare const WebAppIntegration: Story;
16
+ export declare const RegalTheme: Story;
17
+ export declare const TerminalTheme: Story;
18
+ export declare const MatrixTheme: Story;
19
+ export declare const WithContextMenu: Story;
20
+ export declare const InteractivePlayground: Story;
21
+ //# sourceMappingURL=GitStatusFileTreeContainer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitStatusFileTreeContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/components/GitStatusFileTreeContainer.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgK1E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,0BAA0B,CA6CjD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAIzD,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAehC,CAAC;AAIF,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA6B7B,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,KAgB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAe3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,KAyL7B,CAAC;AAIF,eAAO,MAAM,qBAAqB,EAAE,KAqBnC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { MultiFileTreeProps } from './types';
3
+ /**
4
+ * MultiFileTree - Complete component for displaying multiple repository trees
5
+ *
6
+ * This component provides a full UI for viewing and filtering multiple repository trees,
7
+ * including header, filters, view mode toggle, and file selection indicator.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <MultiFileTree
12
+ * sources={loadedSources}
13
+ * theme={theme}
14
+ * title="Repository Explorer"
15
+ * onFileSelect={(source, path) => console.log('Selected:', source.id, path)}
16
+ * />
17
+ * ```
18
+ */
19
+ export declare const MultiFileTree: React.FC<MultiFileTreeProps>;
20
+ //# sourceMappingURL=MultiFileTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiFileTree.d.ts","sourceRoot":"","sources":["../../../../src/components/MultiFileTree/MultiFileTree.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuQtD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { MultiFileTree } from './MultiFileTree';
3
+ declare const meta: Meta<typeof MultiFileTree>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MultiFileTree>;
6
+ export declare const Default: Story;
7
+ export declare const TwoRepositories: Story;
8
+ export declare const SingleRepository: Story;
9
+ export declare const WithoutHeader: Story;
10
+ export declare const WithoutFilters: Story;
11
+ export declare const WithoutViewModeToggle: Story;
12
+ export declare const MinimalUI: Story;
13
+ export declare const RegalTheme: Story;
14
+ export declare const TerminalTheme: Story;
15
+ export declare const MatrixTheme: Story;
16
+ export declare const MatrixMinimalTheme: Story;
17
+ export declare const SlateTheme: Story;
18
+ export declare const InteractiveDemo: Story;
19
+ export declare const ThemeComparison: Story;
20
+ //# sourceMappingURL=MultiFileTree.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiFileTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/MultiFileTree/MultiFileTree.stories.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA8ThD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAOpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAgD7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAoD7B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { MultiFileTreeCoreProps } from './types';
3
+ /**
4
+ * MultiFileTreeCore - Headless component for displaying multiple repository trees
5
+ *
6
+ * This component combines multiple repository trees into a unified view and handles
7
+ * filtering based on selected directories. It delegates all state management to the parent.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <MultiFileTreeCore
12
+ * sources={loadedSources}
13
+ * theme={theme}
14
+ * selectedDirectories={selectedDirs}
15
+ * viewMode="all"
16
+ * onFileSelect={(source, path) => console.log('Selected:', source.id, path)}
17
+ * />
18
+ * ```
19
+ */
20
+ export declare const MultiFileTreeCore: React.FC<MultiFileTreeCoreProps>;
21
+ //# sourceMappingURL=MultiFileTreeCore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiFileTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/MultiFileTree/MultiFileTreeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAiD9D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { MultiFileTree } from './MultiFileTree';
2
+ export { MultiFileTreeCore } from './MultiFileTreeCore';
3
+ export type { MultiFileTreeProps, MultiFileTreeCoreProps } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/MultiFileTree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { Theme } from '@principal-ade/industry-theme';
2
+ import type { FileTreeSource, LoadedFileTreeSource } from '@principal-ai/repository-abstraction';
3
+ import { DirectoryFilter } from '../DirectoryFilterInput';
4
+ export interface MultiFileTreeCoreProps {
5
+ /** Array of loaded file tree sources to display */
6
+ sources: LoadedFileTreeSource[];
7
+ /** Theme for styling the component */
8
+ theme: Theme;
9
+ /** Currently selected directory paths */
10
+ selectedDirectories?: string[];
11
+ /** Current directory filters */
12
+ filters?: DirectoryFilter[];
13
+ /** View mode: 'all' shows all files, 'selected' shows only filtered directories */
14
+ viewMode?: 'all' | 'selected';
15
+ /** Callback when a file is selected */
16
+ onFileSelect?: (source: FileTreeSource, filePath: string) => void;
17
+ /** Callback when directory filters change */
18
+ onFiltersChange?: (filters: DirectoryFilter[]) => void;
19
+ /** Callback when view mode changes */
20
+ onViewModeChange?: (mode: 'all' | 'selected') => void;
21
+ /** Initial open state for tree nodes (map of node ID to boolean) */
22
+ initialOpenState?: Record<string, boolean>;
23
+ /** Default to opening all nodes (default: false - closed) */
24
+ defaultOpen?: boolean;
25
+ /** Horizontal padding for each node (e.g., "8px", "1rem") */
26
+ horizontalNodePadding?: string;
27
+ }
28
+ export interface MultiFileTreeProps extends Omit<MultiFileTreeCoreProps, 'filters' | 'viewMode' | 'onFiltersChange' | 'onViewModeChange'> {
29
+ /** Show the header with title and view mode toggle */
30
+ showHeader?: boolean;
31
+ /** Show the directory filter input */
32
+ showFilters?: boolean;
33
+ /** Show the view mode toggle buttons */
34
+ showViewModeToggle?: boolean;
35
+ /** Show the selected file indicator */
36
+ showSelectedFileIndicator?: boolean;
37
+ /** Initial view mode */
38
+ initialViewMode?: 'all' | 'selected';
39
+ /** Custom root directory name (default: "Repositories") */
40
+ rootDirectoryName?: string;
41
+ /** Custom title for the header */
42
+ title?: string;
43
+ }
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/MultiFileTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,OAAO,EAAE,oBAAoB,EAAE,CA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1,29 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import { FileTree } from '@principal-ai/repository-abstraction';
3
+ import React from 'react';
4
+ export type SortBy = 'lastModified' | 'size' | 'name';
5
+ export type SortOrder = 'asc' | 'desc';
6
+ export interface OrderedFileListProps {
7
+ /** The file tree to extract and display files from */
8
+ fileTree: FileTree;
9
+ /** Theme for styling the component */
10
+ theme: Theme;
11
+ /** Callback when a file is selected */
12
+ onFileSelect?: (filePath: string) => void;
13
+ /** Optional padding for the container */
14
+ padding?: string;
15
+ /** Currently selected file path */
16
+ selectedFile?: string;
17
+ /** What to sort by (default: 'lastModified') */
18
+ sortBy?: SortBy;
19
+ /** Sort order: 'asc' (ascending) or 'desc' (descending, default) */
20
+ sortOrder?: SortOrder;
21
+ /** Optional callback for context menu */
22
+ onContextMenu?: (event: React.MouseEvent, filePath: string) => void;
23
+ }
24
+ /**
25
+ * OrderedFileList component displays all files from a file tree
26
+ * in a flat list ordered by various criteria (modification time, size, or name)
27
+ */
28
+ export declare const OrderedFileList: React.FC<OrderedFileListProps>;
29
+ //# sourceMappingURL=OrderedFileList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderedFileList.d.ts","sourceRoot":"","sources":["../../../src/components/OrderedFileList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAY,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,MAAM,MAAM,MAAM,GAAG,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IACnC,sDAAsD;IACtD,QAAQ,EAAE,QAAQ,CAAC;IAEnB,sCAAsC;IACtC,KAAK,EAAE,KAAK,CAAC;IAEb,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oEAAoE;IACpE,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,yCAAyC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8M1D,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { OrderedFileList } from './OrderedFileList';
3
+ declare const meta: Meta<typeof OrderedFileList>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof OrderedFileList>;
6
+ export declare const Default: Story;
7
+ export declare const SortBySize: Story;
8
+ export declare const SortBySizeAscending: Story;
9
+ export declare const SortByName: Story;
10
+ export declare const SortByNameDescending: Story;
11
+ export declare const OldestFirst: Story;
12
+ export declare const WithSelection: Story;
13
+ export declare const EmptyTree: Story;
14
+ export declare const RegalTheme: Story;
15
+ export declare const TerminalTheme: Story;
16
+ export declare const MatrixTheme: Story;
17
+ export declare const MatrixMinimalTheme: Story;
18
+ export declare const SlateTheme: Story;
19
+ export declare const InteractiveSelection: Story;
20
+ export declare const ThemeComparison: Story;
21
+ export declare const LargeFileList: Story;
22
+ export declare const LongFileNamesTruncation: Story;
23
+ //# sourceMappingURL=OrderedFileList.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderedFileList.stories.d.ts","sourceRoot":"","sources":["../../../src/components/OrderedFileList.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsGpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAgBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA2BjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA2BxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KA2BlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAsBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAyFlC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA4C7B,CAAC;AAuCF,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC;AAkCF,eAAO,MAAM,uBAAuB,EAAE,KA0BrC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { Theme } from '@principal-ade/industry-theme';
2
+ import React, { ReactNode } from 'react';
3
+ import { NodeRendererProps } from 'react-arborist';
4
+ export interface TreeNodeData {
5
+ id: string;
6
+ name: string;
7
+ children?: TreeNodeData[];
8
+ [key: string]: unknown;
9
+ }
10
+ export interface TreeNodeProps<T extends TreeNodeData> extends NodeRendererProps<T> {
11
+ theme: Theme;
12
+ rightContent?: ReactNode;
13
+ extraContent?: ReactNode;
14
+ isSelectedDirectory?: boolean;
15
+ nameColor?: string;
16
+ horizontalNodePadding?: string;
17
+ onContextMenu?: (event: React.MouseEvent, node: NodeRendererProps<T>['node']) => void;
18
+ }
19
+ export declare function TreeNode<T extends TreeNodeData>({ node, style, dragHandle, theme, rightContent, extraContent, isSelectedDirectory, nameColor, horizontalNodePadding, onContextMenu, }: TreeNodeProps<T>): React.JSX.Element;
20
+ //# sourceMappingURL=TreeNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeNode.d.ts","sourceRoot":"","sources":["../../../src/components/TreeNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,YAAY,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IACjF,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CACvF;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,YAAY,EAAE,EAC/C,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,mBAA2B,EAC3B,SAAS,EACT,qBAA6B,EAC7B,aAAa,GACd,EAAE,aAAa,CAAC,CAAC,CAAC,qBAuFlB"}
@@ -0,0 +1,19 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * Custom hook to track and update container height dynamically.
4
+ * Listens to window resize events and updates the height accordingly.
5
+ *
6
+ * @param initialHeight - Initial height in pixels (default: 600)
7
+ * @returns Tuple of [containerRef, containerHeight]
8
+ *
9
+ * @example
10
+ * const [containerRef, height] = useContainerHeight();
11
+ *
12
+ * return (
13
+ * <div ref={containerRef}>
14
+ * <Tree height={height} ... />
15
+ * </div>
16
+ * );
17
+ */
18
+ export declare const useContainerHeight: (initialHeight?: number) => [RefObject<HTMLDivElement | null>, number];
19
+ //# sourceMappingURL=useContainerHeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContainerHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/useContainerHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAe,MAAY,KAAG,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,MAAM,CAoBzG,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { FileTree, LoadedFileTreeSource } from '@principal-ai/repository-abstraction';
2
+ /**
3
+ * Options for combining repository trees
4
+ */
5
+ export interface CombineTreesOptions {
6
+ /** Name for the virtual root directory (default: "Repositories") */
7
+ rootDirectoryName?: string;
8
+ }
9
+ /**
10
+ * Combine multiple repository trees into a single unified tree
11
+ *
12
+ * Each repository becomes a top-level directory under a virtual root.
13
+ * All paths are prefixed with the source name.
14
+ *
15
+ * @param sources - Array of loaded file tree sources
16
+ * @param options - Configuration options
17
+ * @returns A single unified FileTree
18
+ */
19
+ export declare function combineRepositoryTrees(sources: LoadedFileTreeSource[], options?: CombineTreesOptions): FileTree;
20
+ //# sourceMappingURL=combineRepositoryTrees.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combineRepositoryTrees.d.ts","sourceRoot":"","sources":["../../../../src/utils/multiTree/combineRepositoryTrees.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAGR,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAI9C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,oBAAoB,EAAE,EAC/B,OAAO,GAAE,mBAAwB,GAChC,QAAQ,CA6IV"}
@@ -0,0 +1,13 @@
1
+ import { FileTree } from '@principal-ai/repository-abstraction';
2
+ /**
3
+ * Filter a FileTree based on selected directory paths
4
+ *
5
+ * Only directories and files that match or are descendants of the selected paths
6
+ * will be included in the result.
7
+ *
8
+ * @param tree - The FileTree to filter
9
+ * @param selectedPaths - Array of directory paths to include
10
+ * @returns A filtered FileTree
11
+ */
12
+ export declare function filterFileTreeByPaths(tree: FileTree, selectedPaths: string[]): FileTree;
13
+ //# sourceMappingURL=filterFileTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterFileTree.d.ts","sourceRoot":"","sources":["../../../../src/utils/multiTree/filterFileTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA2B,MAAM,sCAAsC,CAAC;AAEzF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,MAAM,EAAE,GACtB,QAAQ,CAkEV"}
@@ -0,0 +1,4 @@
1
+ export { combineRepositoryTrees, type CombineTreesOptions, } from './combineRepositoryTrees';
2
+ export { filterFileTreeByPaths } from './filterFileTree';
3
+ export { extractNameFromPath, parseUnifiedPath, updateTreePaths, type ParsedPath, } from './pathUtils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/multiTree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC"}