@versini/ui-hooks 4.2.0 → 4.2.1
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/dist/index.d.ts +12 -1
- package/dist/index.js +15 -13
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
|
|
3
|
+
interface HotkeyItemOptions {
|
|
4
|
+
preventDefault?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type HotkeyItem = [
|
|
8
|
+
string,
|
|
9
|
+
(event: KeyboardEvent) => void,
|
|
10
|
+
HotkeyItemOptions?
|
|
11
|
+
];
|
|
12
|
+
declare function useHotkeys(hotkeys: HotkeyItem[], tagsToIgnore?: string[], triggerOnContentEditable?: boolean): void;
|
|
13
|
+
|
|
3
14
|
/**
|
|
4
15
|
* Custom hook that returns a function indicating whether the component
|
|
5
16
|
* is mounted or not.
|
|
@@ -129,4 +140,4 @@ type UseUniqueIdOptions = string | number | {
|
|
|
129
140
|
};
|
|
130
141
|
declare function useUniqueId(options?: UseUniqueIdOptions): string | undefined;
|
|
131
142
|
|
|
132
|
-
export { useIsMounted, useLocalStorage, useMergeRefs, useResizeObserver, useUncontrolled, useUniqueId };
|
|
143
|
+
export { useHotkeys, useIsMounted, useLocalStorage, useMergeRefs, useResizeObserver, useUncontrolled, useUniqueId };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useHotkeys as r } from "./hooks/useHotkeys.js";
|
|
2
|
+
import { useIsMounted as t } from "./hooks/useIsMounted.js";
|
|
3
|
+
import { useLocalStorage as f } from "./hooks/useLocalStorage.js";
|
|
4
|
+
import { useMergeRefs as p } from "./hooks/useMergeRefs.js";
|
|
5
|
+
import { useResizeObserver as n } from "./hooks/useResizeObserver.js";
|
|
6
|
+
import { useUncontrolled as l } from "./hooks/useUncontrolled.js";
|
|
7
|
+
import { useUniqueId as c } from "./hooks/useUniqueId.js";
|
|
7
8
|
/*!
|
|
8
|
-
@versini/ui-hooks v4.2.
|
|
9
|
+
@versini/ui-hooks v4.2.1
|
|
9
10
|
© 2024 gizmette.com
|
|
10
11
|
*/
|
|
11
12
|
export {
|
|
12
|
-
r as
|
|
13
|
-
t as
|
|
14
|
-
f as
|
|
15
|
-
p as
|
|
16
|
-
n as
|
|
17
|
-
l as
|
|
13
|
+
r as useHotkeys,
|
|
14
|
+
t as useIsMounted,
|
|
15
|
+
f as useLocalStorage,
|
|
16
|
+
p as useMergeRefs,
|
|
17
|
+
n as useResizeObserver,
|
|
18
|
+
l as useUncontrolled,
|
|
19
|
+
c as useUniqueId
|
|
18
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-hooks",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"react": "18.3.1",
|
|
42
42
|
"react-dom": "18.3.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b4cbab083052f7f45b00e98c2992fffa31d05c1f"
|
|
45
45
|
}
|