@aiquants/directory-tree 3.0.1 → 3.0.2
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 +7 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ The main component for rendering the directory tree.
|
|
|
116
116
|
#### Props
|
|
117
117
|
|
|
118
118
|
| Prop | Type | Required | Description |
|
|
119
|
-
|
|
|
119
|
+
| --- | --- | --- | --- |
|
|
120
120
|
| `entries` | `DirectoryEntry[]` | Yes | Array of root directory entries to display |
|
|
121
121
|
| `expansion` | `object` | Yes | Configuration for tree expansion state and behavior |
|
|
122
122
|
| `selection` | `object` | Yes | Configuration for item selection |
|
|
@@ -126,7 +126,7 @@ The main component for rendering the directory tree.
|
|
|
126
126
|
#### Expansion Options (`expansion`)
|
|
127
127
|
|
|
128
128
|
| Prop | Type | Required | Default | Description |
|
|
129
|
-
|
|
|
129
|
+
| --- | --- | --- | --- | --- |
|
|
130
130
|
| `toggle` | `(path: string) => void` | Yes | - | Function to toggle directory expansion state |
|
|
131
131
|
| `isExpanded` | `(path: string) => boolean` | Yes | - | Function to check if a directory is expanded |
|
|
132
132
|
| `expandMultiple` | `(paths: string[]) => void` | Yes | - | Function to expand multiple directories |
|
|
@@ -138,7 +138,7 @@ The main component for rendering the directory tree.
|
|
|
138
138
|
#### Selection Options (`selection`)
|
|
139
139
|
|
|
140
140
|
| Prop | Type | Required | Default | Description |
|
|
141
|
-
|
|
|
141
|
+
| --- | --- | --- | --- | --- |
|
|
142
142
|
| `onEntryClick` | `(event: DirectoryTreeClickEvent) => void` | Yes | - | Callback function triggered when an entry is clicked |
|
|
143
143
|
| `selectedPath` | `string \| null` | No | - | The currently selected file path |
|
|
144
144
|
| `mode` | `'none' \| 'single' \| 'multiple'` | No | `'none'` | Selection mode for items |
|
|
@@ -148,7 +148,7 @@ The main component for rendering the directory tree.
|
|
|
148
148
|
#### Visual Options (`visual`)
|
|
149
149
|
|
|
150
150
|
| Prop | Type | Required | Default | Description |
|
|
151
|
-
|
|
|
151
|
+
| --- | --- | --- | --- | --- |
|
|
152
152
|
| `className` | `string` | No | - | Optional CSS class name for the container |
|
|
153
153
|
| `style` | `React.CSSProperties` | No | - | Optional inline styles for the container |
|
|
154
154
|
| `lineColor` | `string` | No | `'#A0AEC0'` | The color of the tree lines |
|
|
@@ -206,20 +206,20 @@ A hook for managing directory tree state with localStorage persistence.
|
|
|
206
206
|
#### Parameters
|
|
207
207
|
|
|
208
208
|
| Parameter | Type | Description |
|
|
209
|
-
|
|
|
209
|
+
| --- | --- | --- |
|
|
210
210
|
| `options` | `UseDirectoryTreeStateProps` | Configuration options |
|
|
211
211
|
|
|
212
212
|
#### Options
|
|
213
213
|
|
|
214
214
|
| Option | Type | Description |
|
|
215
|
-
|
|
|
215
|
+
| --- | --- | --- |
|
|
216
216
|
| `initialExpanded` | `Set<string>` | Initially expanded directories |
|
|
217
217
|
| `storageKey` | `string` | localStorage key for persistence (default: 'directory-tree-state') |
|
|
218
218
|
|
|
219
219
|
#### Returns
|
|
220
220
|
|
|
221
221
|
| Property | Type | Description |
|
|
222
|
-
|
|
|
222
|
+
| --- | --- | --- |
|
|
223
223
|
| `expanded` | `Set<string>` | Currently expanded directories |
|
|
224
224
|
| `toggle` | `(path: string) => void` | Toggle directory expansion |
|
|
225
225
|
| `isExpanded` | `(path: string) => boolean` | Check if directory is expanded |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/directory-tree",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "High-performance directory tree component for React with virtual scrolling and file selection",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@heroicons/react": "^2.2.0",
|
|
28
28
|
"@phosphor-icons/react": "^2.1.10",
|
|
29
29
|
"tailwind-merge": "^3.4.0",
|
|
30
|
-
"@aiquants/virtualscroll": "1.18.
|
|
30
|
+
"@aiquants/virtualscroll": "1.18.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "^19.2.7",
|