-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [1.5.2](v1.5.1...v1.5.2) (2022-06-26) ### Bug Fixes * remove unnecessary useMemos ([#24](#24)) ([8ffc30c](8ffc30c))
- Loading branch information
1 parent
8ffc30c
commit cc791b3
Showing
4 changed files
with
25 additions
and
17 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
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,6 +1,6 @@ | ||
{ | ||
"name": "exploration", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "", | ||
"license": "MIT", | ||
"author": "Jared Lunde <[email protected]> (https://jaredlunde.com/)", | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,26 +1,28 @@ | ||
import * as React from "react"; | ||
import type * as React from "react"; | ||
import type { FileTree } from "./file-tree"; | ||
import type { Subject } from "./tree/subject"; | ||
/** | ||
* A plugin hook for adding roving focus to file tree nodes. | ||
* | ||
* @param fileTree - A file tree | ||
*/ | ||
export declare function useRovingFocus<Meta>(fileTree: FileTree<Meta>): UseRovingFocusPlugin; | ||
export declare function useRovingFocus<Meta>( | ||
fileTree: FileTree<Meta> | ||
): UseRovingFocusPlugin; | ||
export interface RovingFocusProps { | ||
tabIndex: number; | ||
onFocus(e: React.FocusEvent<HTMLElement>): void; | ||
onBlur(e: React.FocusEvent<HTMLElement>): void; | ||
tabIndex: number; | ||
onFocus(e: React.FocusEvent<HTMLElement>): void; | ||
onBlur(e: React.FocusEvent<HTMLElement>): void; | ||
} | ||
export interface UseRovingFocusPlugin { | ||
/** | ||
* A subject that you can use to observe to changes to the focused node. | ||
*/ | ||
didChange: Subject<number>; | ||
/** | ||
* Get the React props for a given node ID. | ||
* | ||
* @param nodeId - A node ID | ||
*/ | ||
getProps: (nodeId: number) => RovingFocusProps; | ||
/** | ||
* A subject that you can use to observe to changes to the focused node. | ||
*/ | ||
didChange: Subject<number>; | ||
/** | ||
* Get the React props for a given node ID. | ||
* | ||
* @param nodeId - A node ID | ||
*/ | ||
getProps: (nodeId: number) => RovingFocusProps; | ||
} |