-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: support sibling and remove method
- Loading branch information
1 parent
ee914e9
commit 2e4ae72
Showing
8 changed files
with
535 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@zag-js/collection": patch | ||
--- | ||
|
||
**TreeCollection**: Add support for new methods: | ||
|
||
- `getPreviousSibling`: Get the previous sibling node of the given node. | ||
- `getNextSibling`: Get the next sibling node of the given node. | ||
- `remove`: Remove the given node from the collection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
export { GridCollection, type GridCollectionOptions } from "./grid-collection" | ||
export { | ||
TreeCollection, | ||
type TreeCollectionOptions, | ||
type TreeCollectionMethods, | ||
type TreeNode, | ||
type FlatTreeNode, | ||
type TreeSkipFn, | ||
filePathToTree, | ||
type FilePathTreeNode, | ||
flattenedToTree, | ||
} from "./tree-collection" | ||
export { TreeCollection, filePathToTree, flattenedToTree } from "./tree-collection" | ||
export { ListCollection } from "./list-collection" | ||
export type { | ||
CollectionItem, | ||
CollectionMethods, | ||
CollectionOptions, | ||
CollectionSearchOptions, | ||
CollectionSearchState, | ||
TreeCollectionOptions, | ||
TreeCollectionMethods, | ||
TreeNode, | ||
FlatTreeNode, | ||
FilePathTreeNode, | ||
TreeSkipFn, | ||
} from "./types" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.