@alessiofrittoli/react-hooks 2.0.0 → 2.0.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.mts CHANGED
@@ -937,4 +937,4 @@ declare function useTimeout<T extends readonly unknown[]>(callback: TimerHandler
937
937
  */
938
938
  declare const useLightTimeout: <T extends readonly unknown[]>(callback: TimerHandler<T>, options?: BasicTimerOptions<T>) => void;
939
939
 
940
- export { type AddEventListenerOptions, type BasicTimerOptions, type CommonListenerOptions, type CustomEventListenerOptions, type DocumentEventListener, type DocumentListenerOptions, type ElementEventListener, type ElementListenerOptions, type ListenerOptions, type MarginType, type MarginValue, type MediaQueryChangeListener, type MediaQueryEventListener, type MediaQueryListenerOptions, type OnStartHandler, type StartTimer, type StateTimerOptions, type StateTimerReturnType, type StopTimer, type TimerHandler, type TimerId, type TimerOptions, type TimerReturnType, type UseDarkModeOptions, type UseDarkModeOutput, type UseInViewOptions, type UseIntervalWhenVisibleReturnType, type UseIntervalWhenVisibleStateReturnType, type WindowEventListener, type WindowListenerOptions, useDarkMode, useDebounce, useEventListener, useFocusTrap, useInView, useInterval, useIntervalWhenVisible, useIsClient, useIsFirstRender, useIsPortrait, useLightInterval, useLightTimeout, useLocalStorage, useMediaQuery, useScrollBlock, useSessionStorage, useStorage, useTimeout, useUpdateEffect };
940
+ export { type AddEventListenerOptions, type BasicTimerOptions, type CommonListenerOptions, type CustomEventListenerOptions, type DocumentEventListener, type DocumentListenerOptions, type ElementEventListener, type ElementListenerOptions, type ListenerOptions, type MarginType, type MarginValue, type MediaQueryChangeListener, type MediaQueryEventListener, type MediaQueryListenerOptions, type OnStartHandler, type StartTimer, type StateTimerOptions, type StateTimerReturnType, type StopTimer, type TimerHandler, type TimerId, type TimerOptions, type TimerReturnType, type UseDarkModeOptions, type UseDarkModeOutput, type UseInViewOptions, type UseInViewReturnType, type UseIntervalWhenVisibleReturnType, type UseIntervalWhenVisibleStateReturnType, type WindowEventListener, type WindowListenerOptions, useDarkMode, useDebounce, useEventListener, useFocusTrap, useInView, useInterval, useIntervalWhenVisible, useIsClient, useIsFirstRender, useIsPortrait, useLightInterval, useLightTimeout, useLocalStorage, useMediaQuery, useScrollBlock, useSessionStorage, useStorage, useTimeout, useUpdateEffect };
package/dist/index.d.ts CHANGED
@@ -937,4 +937,4 @@ declare function useTimeout<T extends readonly unknown[]>(callback: TimerHandler
937
937
  */
938
938
  declare const useLightTimeout: <T extends readonly unknown[]>(callback: TimerHandler<T>, options?: BasicTimerOptions<T>) => void;
939
939
 
940
- export { type AddEventListenerOptions, type BasicTimerOptions, type CommonListenerOptions, type CustomEventListenerOptions, type DocumentEventListener, type DocumentListenerOptions, type ElementEventListener, type ElementListenerOptions, type ListenerOptions, type MarginType, type MarginValue, type MediaQueryChangeListener, type MediaQueryEventListener, type MediaQueryListenerOptions, type OnStartHandler, type StartTimer, type StateTimerOptions, type StateTimerReturnType, type StopTimer, type TimerHandler, type TimerId, type TimerOptions, type TimerReturnType, type UseDarkModeOptions, type UseDarkModeOutput, type UseInViewOptions, type UseIntervalWhenVisibleReturnType, type UseIntervalWhenVisibleStateReturnType, type WindowEventListener, type WindowListenerOptions, useDarkMode, useDebounce, useEventListener, useFocusTrap, useInView, useInterval, useIntervalWhenVisible, useIsClient, useIsFirstRender, useIsPortrait, useLightInterval, useLightTimeout, useLocalStorage, useMediaQuery, useScrollBlock, useSessionStorage, useStorage, useTimeout, useUpdateEffect };
940
+ export { type AddEventListenerOptions, type BasicTimerOptions, type CommonListenerOptions, type CustomEventListenerOptions, type DocumentEventListener, type DocumentListenerOptions, type ElementEventListener, type ElementListenerOptions, type ListenerOptions, type MarginType, type MarginValue, type MediaQueryChangeListener, type MediaQueryEventListener, type MediaQueryListenerOptions, type OnStartHandler, type StartTimer, type StateTimerOptions, type StateTimerReturnType, type StopTimer, type TimerHandler, type TimerId, type TimerOptions, type TimerReturnType, type UseDarkModeOptions, type UseDarkModeOutput, type UseInViewOptions, type UseInViewReturnType, type UseIntervalWhenVisibleReturnType, type UseIntervalWhenVisibleStateReturnType, type WindowEventListener, type WindowListenerOptions, useDarkMode, useDebounce, useEventListener, useFocusTrap, useInView, useInterval, useIntervalWhenVisible, useIsClient, useIsFirstRender, useIsPortrait, useLightInterval, useLightTimeout, useLocalStorage, useMediaQuery, useScrollBlock, useSessionStorage, useStorage, useTimeout, useUpdateEffect };
package/package.json CHANGED
@@ -1,133 +1,139 @@
1
1
  {
2
- "name": "@alessiofrittoli/react-hooks",
3
- "version": "2.0.0",
4
- "description": "TypeScript React utility Hooks",
5
- "author": {
6
- "name": "Alessio Frittoli",
7
- "email": "info@alessiofrittoli.it",
8
- "url": "https://alessiofrittoli.it"
9
- },
10
- "license": "MIT",
11
- "funding": [
12
- {
13
- "type": "github",
14
- "url": "https://github.com/sponsors/alessiofrittoli"
15
- }
16
- ],
17
- "keywords": [
18
- "react",
19
- "react-hooks"
20
- ],
21
- "homepage": "https://github.com/alessiofrittoli/react-hooks#readme",
22
- "bugs": {
23
- "url": "https://github.com/alessiofrittoli/react-hooks/issues",
24
- "email": "info@alessiofrittoli.it"
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/alessiofrittoli/react-hooks.git"
29
- },
30
- "main": "./dist/index.js",
31
- "module": "./dist/index.mjs",
32
- "types": "./dist/index.d.ts",
33
- "files": [
34
- "dist"
35
- ],
36
- "exports": {
37
- ".": {
38
- "import": {
39
- "types": "./dist/index.d.mts",
40
- "default": "./dist/index.mjs"
41
- },
42
- "require": {
43
- "types": "./dist/index.d.ts",
44
- "default": "./dist/index.js"
45
- }
46
- },
47
- "./eslint": {
48
- "import": {
49
- "types": "./dist/eslint.d.mts",
50
- "default": "./dist/eslint.mjs"
51
- },
52
- "require": {
53
- "types": "./dist/eslint.d.ts",
54
- "default": "./dist/eslint.js"
55
- }
56
- }
57
- },
58
- "sideEffects": false,
59
- "devDependencies": {
60
- "@alessiofrittoli/event-emitter": "^1.4.0",
61
- "@alessiofrittoli/node-scripts": "^2.5.0",
62
- "@eslint/compat": "^1.2.9",
63
- "@eslint/eslintrc": "^3.3.1",
64
- "@eslint/js": "^9.26.0",
65
- "@jest/globals": "^29.7.0",
66
- "@testing-library/dom": "^10.4.0",
67
- "@testing-library/jest-dom": "^6.6.3",
68
- "@testing-library/react": "^16.3.0",
69
- "@testing-library/user-event": "^14.6.1",
70
- "@types/jest": "^29.5.14",
71
- "@types/node": "^22.15.18",
72
- "@types/react": "^19.1.4",
73
- "@types/react-dom": "^19.1.5",
74
- "concurrently": "^9.1.2",
75
- "dotenv": "^16.5.0",
76
- "eslint": "^9.26.0",
77
- "eslint-plugin-react": "^7.37.5",
78
- "eslint-plugin-react-hooks": "^5.2.0",
79
- "globals": "^16.1.0",
80
- "http-server": "^14.1.1",
81
- "jest": "^29.7.0",
82
- "jest-environment-jsdom": "^29.7.0",
83
- "react": "^19.1.0",
84
- "react-dom": "^19.1.0",
85
- "ts-jest": "^29.3.3",
86
- "ts-node": "^10.9.2",
87
- "tsup": "^8.4.0",
88
- "typescript": "^5.8.3",
89
- "typescript-eslint": "^8.32.1"
90
- },
91
- "dependencies": {
92
- "@alessiofrittoli/math-utils": "^1.13.0",
93
- "@alessiofrittoli/type-utils": "^1.8.0",
94
- "@alessiofrittoli/web-utils": "^1.10.0"
95
- },
96
- "peerDependencies": {
97
- "@types/react": "^19",
98
- "@types/react-dom": "^19",
99
- "react": "^19",
100
- "react-dom": "^19"
101
- },
102
- "scripts": {
103
- "//1a": "*********************************************************************",
104
- "//1b": "******************** DEV - BUILD - LINT - RELEASE *******************",
105
- "//1c": "*********************************************************************",
106
- "dev": "NODE_ENV=development tsup --watch",
107
- "build:prod": "NODE_ENV=production tsup",
108
- "build": "pnpm lint && pnpm test:ci && pnpm build:prod",
109
- "lint": "eslint",
110
- "release": "node scripts/publish.js --verbose --npm",
111
- "//2a": "*********************************************************************",
112
- "//2b": "***************************** UNIT TESTS ****************************",
113
- "//2c": "*********************************************************************",
114
- "test": "jest --verbose",
115
- "test:watch": "jest --watchAll --verbose",
116
- "test:ci": "jest --ci --verbose",
117
- "//3a": "*********************************************************************",
118
- "//3b": "************************ UNIT TESTS COVERAGE ************************",
119
- "//3c": "*********************************************************************",
120
- "test:coverage": "pnpm test:watch --coverage",
121
- "test:coverage:ci": "pnpm test:ci --coverage",
122
- "test:serve-coverage": "http-server ./coverage/lcov-report --gzip true -p 0 -o --silent",
123
- "test:coverage:serve": "concurrently --prefix none --kill-others \"pnpm test:coverage\" \"pnpm test:serve-coverage\"",
124
- "//4a": "*********************************************************************",
125
- "//4b": "************************ TARGETED UNIT TESTS ************************",
126
- "//4c": "*********************************************************************",
127
- "test:storage": "pnpm test:watch browser-api/storage/*",
128
- "test:browser-api": "pnpm test:watch --testPathPattern='browser-api/(?!storage/).*\\.test\\.(js|jsx|ts|tsx)'",
129
- "test:dom-api": "pnpm test:watch dom-api/*",
130
- "test:misc": "pnpm test:watch misc/*",
131
- "test:timers": "pnpm test:watch timers/*"
132
- }
133
- }
2
+ "name": "@alessiofrittoli/react-hooks",
3
+ "version": "2.0.1",
4
+ "description": "TypeScript React utility Hooks",
5
+ "author": {
6
+ "name": "Alessio Frittoli",
7
+ "email": "info@alessiofrittoli.it",
8
+ "url": "https://alessiofrittoli.it"
9
+ },
10
+ "license": "MIT",
11
+ "funding": [
12
+ {
13
+ "type": "github",
14
+ "url": "https://github.com/sponsors/alessiofrittoli"
15
+ }
16
+ ],
17
+ "keywords": [
18
+ "react",
19
+ "react-hooks"
20
+ ],
21
+ "homepage": "https://github.com/alessiofrittoli/react-hooks#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/alessiofrittoli/react-hooks/issues",
24
+ "email": "info@alessiofrittoli.it"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/alessiofrittoli/react-hooks.git"
29
+ },
30
+ "main": "./dist/index.js",
31
+ "module": "./dist/index.mjs",
32
+ "types": "./dist/index.d.ts",
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "exports": {
37
+ ".": {
38
+ "import": {
39
+ "types": "./dist/index.d.mts",
40
+ "default": "./dist/index.mjs"
41
+ },
42
+ "require": {
43
+ "types": "./dist/index.d.ts",
44
+ "default": "./dist/index.js"
45
+ }
46
+ },
47
+ "./eslint": {
48
+ "import": {
49
+ "types": "./dist/eslint.d.mts",
50
+ "default": "./dist/eslint.mjs"
51
+ },
52
+ "require": {
53
+ "types": "./dist/eslint.d.ts",
54
+ "default": "./dist/eslint.js"
55
+ }
56
+ }
57
+ },
58
+ "sideEffects": false,
59
+ "scripts": {
60
+ "//1a": "*********************************************************************",
61
+ "//1b": "******************** DEV - BUILD - LINT - RELEASE *******************",
62
+ "//1c": "*********************************************************************",
63
+ "dev": "NODE_ENV=development tsup --watch",
64
+ "build:prod": "NODE_ENV=production tsup",
65
+ "build": "pnpm lint && pnpm test:ci && pnpm build:prod",
66
+ "lint": "eslint",
67
+ "release": "node scripts/publish.js --verbose --npm",
68
+ "//2a": "*********************************************************************",
69
+ "//2b": "***************************** UNIT TESTS ****************************",
70
+ "//2c": "*********************************************************************",
71
+ "test": "jest --verbose",
72
+ "test:watch": "jest --watchAll --verbose",
73
+ "test:ci": "jest --ci --verbose",
74
+ "//3a": "*********************************************************************",
75
+ "//3b": "************************ UNIT TESTS COVERAGE ************************",
76
+ "//3c": "*********************************************************************",
77
+ "test:coverage": "pnpm test:watch --coverage",
78
+ "test:coverage:ci": "pnpm test:ci --coverage",
79
+ "test:serve-coverage": "http-server ./coverage/lcov-report --gzip true -p 0 -o --silent",
80
+ "test:coverage:serve": "concurrently --prefix none --kill-others \"pnpm test:coverage\" \"pnpm test:serve-coverage\"",
81
+ "//4a": "*********************************************************************",
82
+ "//4b": "************************ TARGETED UNIT TESTS ************************",
83
+ "//4c": "*********************************************************************",
84
+ "test:storage": "pnpm test:watch browser-api/storage/*",
85
+ "test:browser-api": "pnpm test:watch --testPathPattern='browser-api/(?!storage/).*\\.test\\.(js|jsx|ts|tsx)'",
86
+ "test:dom-api": "pnpm test:watch dom-api/*",
87
+ "test:misc": "pnpm test:watch misc/*",
88
+ "test:timers": "pnpm test:watch timers/*"
89
+ },
90
+ "pnpm": {
91
+ "onlyBuiltDependencies": [
92
+ "@alessiofrittoli/type-utils",
93
+ "esbuild"
94
+ ]
95
+ },
96
+ "devDependencies": {
97
+ "@alessiofrittoli/event-emitter": "^1.4.0",
98
+ "@alessiofrittoli/node-scripts": "^2.5.0",
99
+ "@eslint/compat": "^1.2.9",
100
+ "@eslint/eslintrc": "^3.3.1",
101
+ "@eslint/js": "^9.26.0",
102
+ "@jest/globals": "^29.7.0",
103
+ "@testing-library/dom": "^10.4.0",
104
+ "@testing-library/jest-dom": "^6.6.3",
105
+ "@testing-library/react": "^16.3.0",
106
+ "@testing-library/user-event": "^14.6.1",
107
+ "@types/jest": "^29.5.14",
108
+ "@types/node": "^22.15.18",
109
+ "@types/react": "^19.1.4",
110
+ "@types/react-dom": "^19.1.5",
111
+ "concurrently": "^9.1.2",
112
+ "dotenv": "^16.5.0",
113
+ "eslint": "^9.26.0",
114
+ "eslint-plugin-react": "^7.37.5",
115
+ "eslint-plugin-react-hooks": "^5.2.0",
116
+ "globals": "^16.1.0",
117
+ "http-server": "^14.1.1",
118
+ "jest": "^29.7.0",
119
+ "jest-environment-jsdom": "^29.7.0",
120
+ "react": "^19.1.0",
121
+ "react-dom": "^19.1.0",
122
+ "ts-jest": "^29.3.3",
123
+ "ts-node": "^10.9.2",
124
+ "tsup": "^8.4.0",
125
+ "typescript": "^5.8.3",
126
+ "typescript-eslint": "^8.32.1"
127
+ },
128
+ "dependencies": {
129
+ "@alessiofrittoli/math-utils": "^1.13.0",
130
+ "@alessiofrittoli/type-utils": "^1.8.0",
131
+ "@alessiofrittoli/web-utils": "^1.10.0"
132
+ },
133
+ "peerDependencies": {
134
+ "@types/react": "^19",
135
+ "@types/react-dom": "^19",
136
+ "react": "^19",
137
+ "react-dom": "^19"
138
+ }
139
+ }