hazo_auth 1.4.0 → 1.4.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 CHANGED
@@ -62,9 +62,17 @@ import { RegisterLayout } from "hazo_auth/components/layouts/register";
62
62
  import { Button } from "hazo_auth/components/ui/button";
63
63
  import { Input } from "hazo_auth/components/ui/input";
64
64
 
65
- // Import hooks
66
- import { use_hazo_auth } from "hazo_auth/hooks/use_hazo_auth";
67
- import { use_auth_status } from "hazo_auth/hooks/use_auth_status";
65
+ // Import shared components and hooks (recommended - uses barrel exports)
66
+ import {
67
+ ProfilePicMenu,
68
+ ProfilePicMenuWrapper,
69
+ use_hazo_auth,
70
+ use_auth_status
71
+ } from "hazo_auth/components/layouts/shared";
72
+
73
+ // OR import hooks directly
74
+ import { use_hazo_auth } from "hazo_auth/components/layouts/shared/hooks/use_hazo_auth";
75
+ import { use_auth_status } from "hazo_auth/components/layouts/shared/hooks/use_auth_status";
68
76
 
69
77
  // Import server-side utilities
70
78
  import { hazo_get_auth } from "hazo_auth/lib/auth/hazo_get_auth.server";
@@ -426,15 +434,23 @@ import { Input } from "hazo_auth/components/ui/input";
426
434
  import { Avatar } from "hazo_auth/components/ui/avatar";
427
435
  // ... and more shadcn-based components
428
436
 
429
- // Shared layout components
437
+ // Shared layout components and hooks (barrel import - recommended)
438
+ import {
439
+ ProfilePicMenu,
440
+ ProfilePicMenuWrapper,
441
+ FormActionButtons,
442
+ use_hazo_auth,
443
+ use_auth_status
444
+ } from "hazo_auth/components/layouts/shared";
445
+
446
+ // OR import individual components directly
430
447
  import { ProfilePicMenu } from "hazo_auth/components/layouts/shared/components/profile_pic_menu";
431
448
  import { ProfilePicMenuWrapper } from "hazo_auth/components/layouts/shared/components/profile_pic_menu_wrapper";
432
449
  import { FormActionButtons } from "hazo_auth/components/layouts/shared/components/form_action_buttons";
433
450
 
434
- // Hooks (client-side)
435
- import { use_hazo_auth } from "hazo_auth/hooks/use_hazo_auth";
436
- import { use_auth_status } from "hazo_auth/hooks/use_auth_status";
437
- import { use_login_form } from "hazo_auth/hooks/use_login_form";
451
+ // OR import hooks directly
452
+ import { use_hazo_auth } from "hazo_auth/components/layouts/shared/hooks/use_hazo_auth";
453
+ import { use_auth_status } from "hazo_auth/components/layouts/shared/hooks/use_auth_status";
438
454
 
439
455
  // Library utilities
440
456
  import { hazo_get_auth } from "hazo_auth/lib/auth/hazo_get_auth.server";
@@ -677,7 +693,7 @@ React hook for fetching authentication status and permissions on the client side
677
693
  ```typescript
678
694
  "use client";
679
695
 
680
- import { use_hazo_auth } from "hazo_auth/hooks/use_hazo_auth";
696
+ import { use_hazo_auth } from "hazo_auth/components/layouts/shared/hooks/use_hazo_auth";
681
697
 
682
698
  export function ProtectedComponent() {
683
699
  const { authenticated, user, permissions, permission_ok, loading, error, refetch } =
@@ -710,7 +726,7 @@ Simpler hook for basic authentication status checking.
710
726
  ```typescript
711
727
  "use client";
712
728
 
713
- import { use_auth_status } from "hazo_auth/hooks/use_auth_status";
729
+ import { use_auth_status } from "hazo_auth/components/layouts/shared/hooks/use_auth_status";
714
730
 
715
731
  export function UserGreeting() {
716
732
  const { authenticated, name, email, loading } = use_auth_status();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_auth",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -9,6 +9,10 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "import": "./dist/index.js"
11
11
  },
12
+ "./components": {
13
+ "types": "./dist/components/index.d.ts",
14
+ "import": "./dist/components/index.js"
15
+ },
12
16
  "./components/*": {
13
17
  "types": "./dist/components/*.d.ts",
14
18
  "import": "./dist/components/*.js"
@@ -17,18 +21,126 @@
17
21
  "types": "./dist/components/ui/*.d.ts",
18
22
  "import": "./dist/components/ui/*.js"
19
23
  },
24
+ "./components/layouts": {
25
+ "types": "./dist/components/layouts/index.d.ts",
26
+ "import": "./dist/components/layouts/index.js"
27
+ },
20
28
  "./components/layouts/*": {
21
29
  "types": "./dist/components/layouts/*.d.ts",
22
30
  "import": "./dist/components/layouts/*.js"
23
31
  },
32
+ "./components/layouts/login": {
33
+ "types": "./dist/components/layouts/login/index.d.ts",
34
+ "import": "./dist/components/layouts/login/index.js"
35
+ },
36
+ "./components/layouts/login/*": {
37
+ "types": "./dist/components/layouts/login/*.d.ts",
38
+ "import": "./dist/components/layouts/login/*.js"
39
+ },
40
+ "./components/layouts/register": {
41
+ "types": "./dist/components/layouts/register/index.d.ts",
42
+ "import": "./dist/components/layouts/register/index.js"
43
+ },
44
+ "./components/layouts/register/*": {
45
+ "types": "./dist/components/layouts/register/*.d.ts",
46
+ "import": "./dist/components/layouts/register/*.js"
47
+ },
48
+ "./components/layouts/forgot_password": {
49
+ "types": "./dist/components/layouts/forgot_password/index.d.ts",
50
+ "import": "./dist/components/layouts/forgot_password/index.js"
51
+ },
52
+ "./components/layouts/forgot_password/*": {
53
+ "types": "./dist/components/layouts/forgot_password/*.d.ts",
54
+ "import": "./dist/components/layouts/forgot_password/*.js"
55
+ },
56
+ "./components/layouts/reset_password": {
57
+ "types": "./dist/components/layouts/reset_password/index.d.ts",
58
+ "import": "./dist/components/layouts/reset_password/index.js"
59
+ },
60
+ "./components/layouts/reset_password/*": {
61
+ "types": "./dist/components/layouts/reset_password/*.d.ts",
62
+ "import": "./dist/components/layouts/reset_password/*.js"
63
+ },
64
+ "./components/layouts/verify_email": {
65
+ "types": "./dist/components/layouts/verify_email/index.d.ts",
66
+ "import": "./dist/components/layouts/verify_email/index.js"
67
+ },
68
+ "./components/layouts/verify_email/*": {
69
+ "types": "./dist/components/layouts/verify_email/*.d.ts",
70
+ "import": "./dist/components/layouts/verify_email/*.js"
71
+ },
72
+ "./components/layouts/email_verification": {
73
+ "types": "./dist/components/layouts/email_verification/index.d.ts",
74
+ "import": "./dist/components/layouts/email_verification/index.js"
75
+ },
76
+ "./components/layouts/email_verification/*": {
77
+ "types": "./dist/components/layouts/email_verification/*.d.ts",
78
+ "import": "./dist/components/layouts/email_verification/*.js"
79
+ },
80
+ "./components/layouts/my_settings": {
81
+ "types": "./dist/components/layouts/my_settings/index.d.ts",
82
+ "import": "./dist/components/layouts/my_settings/index.js"
83
+ },
84
+ "./components/layouts/my_settings/*": {
85
+ "types": "./dist/components/layouts/my_settings/*.d.ts",
86
+ "import": "./dist/components/layouts/my_settings/*.js"
87
+ },
88
+ "./components/layouts/user_management": {
89
+ "types": "./dist/components/layouts/user_management/index.d.ts",
90
+ "import": "./dist/components/layouts/user_management/index.js"
91
+ },
92
+ "./components/layouts/user_management/*": {
93
+ "types": "./dist/components/layouts/user_management/*.d.ts",
94
+ "import": "./dist/components/layouts/user_management/*.js"
95
+ },
96
+ "./components/layouts/shared": {
97
+ "types": "./dist/components/layouts/shared/index.d.ts",
98
+ "import": "./dist/components/layouts/shared/index.js"
99
+ },
100
+ "./components/layouts/shared/*": {
101
+ "types": "./dist/components/layouts/shared/*.d.ts",
102
+ "import": "./dist/components/layouts/shared/*.js"
103
+ },
104
+ "./components/layouts/shared/components/*": {
105
+ "types": "./dist/components/layouts/shared/components/*.d.ts",
106
+ "import": "./dist/components/layouts/shared/components/*.js"
107
+ },
108
+ "./components/layouts/shared/hooks/*": {
109
+ "types": "./dist/components/layouts/shared/hooks/*.d.ts",
110
+ "import": "./dist/components/layouts/shared/hooks/*.js"
111
+ },
112
+ "./lib": {
113
+ "types": "./dist/lib/index.d.ts",
114
+ "import": "./dist/lib/index.js"
115
+ },
24
116
  "./lib/*": {
25
117
  "types": "./dist/lib/*.d.ts",
26
118
  "import": "./dist/lib/*.js"
27
119
  },
120
+ "./lib/auth/*": {
121
+ "types": "./dist/lib/auth/*.d.ts",
122
+ "import": "./dist/lib/auth/*.js"
123
+ },
124
+ "./lib/config/*": {
125
+ "types": "./dist/lib/config/*.d.ts",
126
+ "import": "./dist/lib/config/*.js"
127
+ },
128
+ "./lib/services/*": {
129
+ "types": "./dist/lib/services/*.d.ts",
130
+ "import": "./dist/lib/services/*.js"
131
+ },
132
+ "./lib/utils/*": {
133
+ "types": "./dist/lib/utils/*.d.ts",
134
+ "import": "./dist/lib/utils/*.js"
135
+ },
28
136
  "./hooks/*": {
29
137
  "types": "./dist/hooks/*.d.ts",
30
138
  "import": "./dist/hooks/*.js"
31
139
  },
140
+ "./server": {
141
+ "types": "./dist/server/index.d.ts",
142
+ "import": "./dist/server/index.js"
143
+ },
32
144
  "./server/*": {
33
145
  "types": "./dist/server/*.d.ts",
34
146
  "import": "./dist/server/*.js"
@@ -15,17 +15,17 @@ export { POST as loginPOST } from "hazo_auth/app/api/hazo_auth/login/route";
15
15
  export { POST as registerPOST } from "hazo_auth/app/api/hazo_auth/register/route";
16
16
  export { POST as forgotPasswordPOST } from "hazo_auth/app/api/hazo_auth/forgot_password/route";
17
17
  export { POST as resetPasswordPOST } from "hazo_auth/app/api/hazo_auth/reset_password/route";
18
- export { POST as verifyEmailPOST } from "hazo_auth/app/api/hazo_auth/verify_email/route";
18
+ export { GET as verifyEmailGET } from "hazo_auth/app/api/hazo_auth/verify_email/route";
19
19
  export { POST as resendVerificationPOST } from "hazo_auth/app/api/hazo_auth/resend_verification/route";
20
20
  export { POST as logoutPOST } from "hazo_auth/app/api/hazo_auth/logout/route";
21
21
  export { POST as getAuthPOST } from "hazo_auth/app/api/hazo_auth/get_auth/route";
22
- export { GET as mePOST } from "hazo_auth/app/api/hazo_auth/me/route";
22
+ export { GET as meGET } from "hazo_auth/app/api/hazo_auth/me/route";
23
23
  export { POST as changePasswordPOST } from "hazo_auth/app/api/hazo_auth/change_password/route";
24
- export { POST as updateUserPOST } from "hazo_auth/app/api/hazo_auth/update_user/route";
24
+ export { PATCH as updateUserPATCH } from "hazo_auth/app/api/hazo_auth/update_user/route";
25
25
  export { POST as invalidateCachePOST } from "hazo_auth/app/api/hazo_auth/invalidate_cache/route";
26
26
  export { GET as libraryPhotosGET } from "hazo_auth/app/api/hazo_auth/library_photos/route";
27
27
  export { POST as uploadProfilePicturePOST } from "hazo_auth/app/api/hazo_auth/upload_profile_picture/route";
28
- export { POST as removeProfilePicturePOST } from "hazo_auth/app/api/hazo_auth/remove_profile_picture/route";
28
+ export { DELETE as removeProfilePictureDELETE } from "hazo_auth/app/api/hazo_auth/remove_profile_picture/route";
29
29
  export { GET as validateResetTokenGET } from "hazo_auth/app/api/hazo_auth/validate_reset_token/route";
30
30
 
31
31
  // section: shell_exports