hookery 0.0.1 → 1.0.0

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.
Files changed (98) hide show
  1. package/README.md +72 -11
  2. package/dist/bridges/auth0.d.mts +16 -0
  3. package/dist/bridges/auth0.d.ts +16 -0
  4. package/dist/bridges/auth0.js +3015 -0
  5. package/dist/bridges/auth0.js.map +1 -0
  6. package/dist/bridges/auth0.mjs +2977 -0
  7. package/dist/bridges/auth0.mjs.map +1 -0
  8. package/dist/bridges/axios.d.mts +17 -0
  9. package/dist/bridges/axios.d.ts +17 -0
  10. package/dist/bridges/axios.js +15351 -0
  11. package/dist/bridges/axios.js.map +1 -0
  12. package/dist/bridges/axios.mjs +15347 -0
  13. package/dist/bridges/axios.mjs.map +1 -0
  14. package/dist/bridges/clerk.d.mts +1 -0
  15. package/dist/bridges/clerk.d.ts +1 -0
  16. package/dist/bridges/clerk.js +5991 -0
  17. package/dist/bridges/clerk.js.map +1 -0
  18. package/dist/bridges/clerk.mjs +5985 -0
  19. package/dist/bridges/clerk.mjs.map +1 -0
  20. package/dist/bridges/firebase.d.mts +14 -0
  21. package/dist/bridges/firebase.d.ts +14 -0
  22. package/dist/bridges/firebase.js +52 -0
  23. package/dist/bridges/firebase.js.map +1 -0
  24. package/dist/bridges/firebase.mjs +25 -0
  25. package/dist/bridges/firebase.mjs.map +1 -0
  26. package/dist/bridges/jotai.d.mts +11 -0
  27. package/dist/bridges/jotai.d.ts +11 -0
  28. package/dist/bridges/jotai.js +870 -0
  29. package/dist/bridges/jotai.js.map +1 -0
  30. package/dist/bridges/jotai.mjs +827 -0
  31. package/dist/bridges/jotai.mjs.map +1 -0
  32. package/dist/bridges/motion.d.mts +6 -0
  33. package/dist/bridges/motion.d.ts +6 -0
  34. package/dist/bridges/motion.js +3752 -0
  35. package/dist/bridges/motion.js.map +1 -0
  36. package/dist/bridges/motion.mjs +3721 -0
  37. package/dist/bridges/motion.mjs.map +1 -0
  38. package/dist/bridges/next.d.mts +10 -0
  39. package/dist/bridges/next.d.ts +10 -0
  40. package/dist/bridges/next.js +2588 -0
  41. package/dist/bridges/next.js.map +1 -0
  42. package/dist/bridges/next.mjs +2582 -0
  43. package/dist/bridges/next.mjs.map +1 -0
  44. package/dist/bridges/redux.d.mts +15 -0
  45. package/dist/bridges/redux.d.ts +15 -0
  46. package/dist/bridges/redux.js +410 -0
  47. package/dist/bridges/redux.js.map +1 -0
  48. package/dist/bridges/redux.mjs +402 -0
  49. package/dist/bridges/redux.mjs.map +1 -0
  50. package/dist/bridges/remix.d.mts +1 -0
  51. package/dist/bridges/remix.d.ts +1 -0
  52. package/dist/bridges/remix.js +2215 -0
  53. package/dist/bridges/remix.js.map +1 -0
  54. package/dist/bridges/remix.mjs +2174 -0
  55. package/dist/bridges/remix.mjs.map +1 -0
  56. package/dist/bridges/stripe.d.mts +15 -0
  57. package/dist/bridges/stripe.d.ts +15 -0
  58. package/dist/bridges/stripe.js +1572 -0
  59. package/dist/bridges/stripe.js.map +1 -0
  60. package/dist/bridges/stripe.mjs +1556 -0
  61. package/dist/bridges/stripe.mjs.map +1 -0
  62. package/dist/bridges/supabase.d.mts +13 -0
  63. package/dist/bridges/supabase.d.ts +13 -0
  64. package/dist/bridges/supabase.js +51 -0
  65. package/dist/bridges/supabase.js.map +1 -0
  66. package/dist/bridges/supabase.mjs +24 -0
  67. package/dist/bridges/supabase.mjs.map +1 -0
  68. package/dist/bridges/tanstack.d.mts +3 -0
  69. package/dist/bridges/tanstack.d.ts +3 -0
  70. package/dist/bridges/tanstack.js +1319 -0
  71. package/dist/bridges/tanstack.js.map +1 -0
  72. package/dist/bridges/tanstack.mjs +1281 -0
  73. package/dist/bridges/tanstack.mjs.map +1 -0
  74. package/dist/bridges/yup.d.mts +16 -0
  75. package/dist/bridges/yup.d.ts +16 -0
  76. package/dist/bridges/yup.js +80 -0
  77. package/dist/bridges/yup.js.map +1 -0
  78. package/dist/bridges/yup.mjs +43 -0
  79. package/dist/bridges/yup.mjs.map +1 -0
  80. package/dist/bridges/zod.d.mts +19 -0
  81. package/dist/bridges/zod.d.ts +19 -0
  82. package/dist/bridges/zod.js +66 -0
  83. package/dist/bridges/zod.js.map +1 -0
  84. package/dist/bridges/zod.mjs +39 -0
  85. package/dist/bridges/zod.mjs.map +1 -0
  86. package/dist/bridges/zustand.d.mts +14 -0
  87. package/dist/bridges/zustand.d.ts +14 -0
  88. package/dist/bridges/zustand.js +58 -0
  89. package/dist/bridges/zustand.js.map +1 -0
  90. package/dist/bridges/zustand.mjs +21 -0
  91. package/dist/bridges/zustand.mjs.map +1 -0
  92. package/dist/index.d.mts +3124 -8
  93. package/dist/index.d.ts +3124 -8
  94. package/dist/index.js +4290 -10
  95. package/dist/index.js.map +1 -0
  96. package/dist/index.mjs +4172 -7
  97. package/dist/index.mjs.map +1 -0
  98. package/package.json +131 -6
package/README.md CHANGED
@@ -1,23 +1,84 @@
1
1
  # Hookery 🪝
2
2
 
3
- A collection of high-quality, performant React hooks.
3
+ The ultimate collection of **100+ high-quality React hooks**. Built for modern web applications with a focus on **performance**, **type safety**, and **developer experience**.
4
4
 
5
- > ⚠️ **Coming Soon** - This package is under active development.
5
+ [![npm version](https://img.shields.io/npm/v/hookery.svg?style=flat-square)](https://www.npmjs.com/package/hookery)
6
+ [![npm downloads](https://img.shields.io/npm/dm/hookery.svg?style=flat-square)](https://www.npmjs.com/package/hookery)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
6
9
 
7
- ## Installation
10
+ ## 🚀 Why Hookery?
11
+
12
+ - **🛡️ 100% Type Safe**: Written in TypeScript with strict type inference and zero "any".
13
+ - **⚡ Performance First**: Zero unnecessary re-renders with optimized memoization.
14
+ - **📦 Tree-shakeable**: Support for ESM and CJS; import only what you use.
15
+ - **🔌 SSR Ready**: First-class support for Next.js, Remix, and Astro.
16
+ - **🤖 Modern Workflows**: Pre-built hooks for AI streaming, Media recording, and Hardware APIs.
17
+
18
+ ## 📦 Installation
8
19
 
9
20
  ```bash
10
21
  npm install hookery
22
+ # or
23
+ yarn add hookery
24
+ # or
25
+ pnpm add hookery
26
+ ```
27
+
28
+ ## 💡 Quick Start
29
+
30
+ ```tsx
31
+ import { useLocalStorage, useToggle, useWindowSize } from 'hookery';
32
+
33
+ function App() {
34
+ const [isDark, toggleDark] = useToggle(false);
35
+ const { width, height } = useWindowSize();
36
+ const { value: user } = useLocalStorage('user_pref', { name: 'Guest' });
37
+
38
+ return (
39
+ <div>
40
+ <h1>Hello, {user.name}!</h1>
41
+ <p>Window Size: {width} x {height}</p>
42
+ <button onClick={toggleDark}>
43
+ Switch to {isDark ? 'Light' : 'Dark'} Mode
44
+ </button>
45
+ </div>
46
+ );
47
+ }
11
48
  ```
12
49
 
13
- ## Features (Planned)
50
+ ## 📚 Categories
51
+
52
+ | Category | Hooks |
53
+ | :--- | :--- |
54
+ | **State** | `useToggle`, `useCounter`, `useHistory`, `useLocalStorage`, `useSet`, `useMap` |
55
+ | **DOM** | `useClickOutside`, `useHover`, `useIntersection`, `useResizeObserver`, `useScroll` |
56
+ | **Async** | `useFetch`, `useAsync`, `useLLMStream`, `useWebSocket`, `useWorker` |
57
+ | **Media** | `useMediaDevices`, `useMediaRecorder`, `useVideoRef`, `useAudioRef` |
58
+ | **Advanced** | `useForm`, `useTable`, `useVirtualList`, `useInfiniteScroll`, `useShortcuts` |
59
+
60
+ ## 🛠️ Browser & Hardware APIs
61
+
62
+ Hookery provides clean abstractions for many modern browser APIs:
63
+ - **`useSTT` & `useTTS`**: Voice recognition and synthesis.
64
+ - **`useFileSystem`**: Local File System Access.
65
+ - **`useBluetooth` & `useWebRTC`**: Hardware and P2P communication.
66
+ - **`useEyeDropper`**: System color picker.
67
+
68
+ ## 🤝 Contributing
69
+
70
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
71
+
72
+ 1. Fork the Project
73
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
74
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
75
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
76
+ 5. Open a Pull Request
77
+
78
+ ## 📄 License
14
79
 
15
- - 🚀 **High Performance** - Zero unnecessary re-renders
16
- - 📦 **Tree-shakeable** - Only import what you need
17
- - 🔒 **TypeScript First** - Full type safety
18
- - ⚡ **SSR Ready** - Works with Next.js, Remix, and more
19
- - 🎯 **React 18/19** - Built for modern React
80
+ Distributed under the MIT License. See `LICENSE` for more information.
20
81
 
21
- ## License
82
+ ---
22
83
 
23
- MIT © Mohamed Shaban
84
+ Built with ❤️ by [Mohamed Shaban](https://github.com/Moshaban09)
@@ -0,0 +1,16 @@
1
+ import * as _auth0_auth0_spa_js from '@auth0/auth0-spa-js';
2
+ export { useAuth0 } from '@auth0/auth0-react';
3
+
4
+ /**
5
+ * useAuth0User
6
+ *
7
+ * Simplified access to user and loading state.
8
+ */
9
+ declare function useAuth0User(): {
10
+ user: _auth0_auth0_spa_js.User | undefined;
11
+ isAuthenticated: boolean;
12
+ isLoading: boolean;
13
+ error: Error | undefined;
14
+ };
15
+
16
+ export { useAuth0User };
@@ -0,0 +1,16 @@
1
+ import * as _auth0_auth0_spa_js from '@auth0/auth0-spa-js';
2
+ export { useAuth0 } from '@auth0/auth0-react';
3
+
4
+ /**
5
+ * useAuth0User
6
+ *
7
+ * Simplified access to user and loading state.
8
+ */
9
+ declare function useAuth0User(): {
10
+ user: _auth0_auth0_spa_js.User | undefined;
11
+ isAuthenticated: boolean;
12
+ isLoading: boolean;
13
+ error: Error | undefined;
14
+ };
15
+
16
+ export { useAuth0User };