@versini/ui-hooks 2.2.0 → 2.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/README.md +2 -26
- package/dist/index.js +9 -12
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @versini/ui-hooks
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
-
|
|
14
|
-
- Configure the top-level `parserOptions` property like this:
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaVersion: 'latest',
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
26
|
-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
27
|
-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
3
|
+
Hooks to be used in the UI-Components library.
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { useLocalStorage as
|
|
2
|
-
import { useMergeRefs as
|
|
3
|
-
import { useUncontrolled as
|
|
4
|
-
import { useUniqueId as
|
|
5
|
-
import "react";
|
|
6
|
-
import "./hooks/useEventCallback.js";
|
|
7
|
-
import "./hooks/useEventListener.js";
|
|
1
|
+
import { useLocalStorage as r } from "./hooks/useLocalStorage.js";
|
|
2
|
+
import { useMergeRefs as f } from "./hooks/useMergeRefs.js";
|
|
3
|
+
import { useUncontrolled as u } from "./hooks/useUncontrolled.js";
|
|
4
|
+
import { useUniqueId as p } from "./hooks/useUniqueId.js";
|
|
8
5
|
/*!
|
|
9
|
-
@versini/ui-hooks v2.2.
|
|
6
|
+
@versini/ui-hooks v2.2.1
|
|
10
7
|
© 2024 gizmette.com
|
|
11
8
|
*/
|
|
12
9
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
r as useLocalStorage,
|
|
11
|
+
f as useMergeRefs,
|
|
12
|
+
u as useUncontrolled,
|
|
13
|
+
p as useUniqueId
|
|
17
14
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-hooks",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/aversini/ui-components
|
|
9
|
+
"homepage": "https://github.com/aversini/ui-components",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git@github.com:aversini/ui-components.git"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dev:js": "vite build --watch --mode development",
|
|
27
27
|
"dev:types": "tsup --watch src",
|
|
28
28
|
"dev": "npm-run-all clean --parallel dev:js dev:types",
|
|
29
|
-
"lint": "
|
|
29
|
+
"lint": "biome lint src",
|
|
30
30
|
"start": "static-server dist --port 5173",
|
|
31
31
|
"test:coverage:ui": "vitest --coverage --ui",
|
|
32
32
|
"test:coverage": "vitest run --coverage",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"test": "vitest run"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"react": "^18.
|
|
38
|
-
"react-dom": "^18.
|
|
37
|
+
"react": "^18.3.1",
|
|
38
|
+
"react-dom": "^18.3.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"react": "18.
|
|
42
|
-
"react-dom": "18.
|
|
41
|
+
"react": "18.3.1",
|
|
42
|
+
"react-dom": "18.3.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "228d7682026ac0295086363e908b8ed629c086cb"
|
|
45
45
|
}
|