hazo_auth 1.6.7 → 3.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.
Files changed (152) hide show
  1. package/README.md +114 -14
  2. package/SETUP_CHECKLIST.md +65 -1
  3. package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -1
  4. package/dist/components/layouts/email_verification/hooks/use_email_verification.js +5 -3
  5. package/dist/components/layouts/email_verification/index.d.ts +2 -1
  6. package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
  7. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -1
  8. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +3 -1
  9. package/dist/components/layouts/forgot_password/index.d.ts +2 -1
  10. package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
  11. package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
  12. package/dist/components/layouts/login/hooks/use_login_form.js +3 -1
  13. package/dist/components/layouts/login/index.d.ts +2 -1
  14. package/dist/components/layouts/login/index.d.ts.map +1 -1
  15. package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts.map +1 -1
  16. package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +3 -1
  17. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts.map +1 -1
  18. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +4 -2
  19. package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
  20. package/dist/components/layouts/my_settings/hooks/use_my_settings.js +7 -5
  21. package/dist/components/layouts/my_settings/index.d.ts +2 -1
  22. package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
  23. package/dist/components/layouts/my_settings/index.js +3 -2
  24. package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
  25. package/dist/components/layouts/register/hooks/use_register_form.js +3 -1
  26. package/dist/components/layouts/register/index.d.ts +2 -1
  27. package/dist/components/layouts/register/index.d.ts.map +1 -1
  28. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -1
  29. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +4 -2
  30. package/dist/components/layouts/reset_password/index.d.ts +2 -1
  31. package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
  32. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts +2 -1
  33. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts.map +1 -1
  34. package/dist/components/layouts/shared/components/logout_button.d.ts.map +1 -1
  35. package/dist/components/layouts/shared/components/logout_button.js +3 -1
  36. package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -1
  37. package/dist/components/layouts/shared/components/profile_pic_menu.js +8 -4
  38. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts +2 -1
  39. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts.map +1 -1
  40. package/dist/components/layouts/shared/components/visual_panel.d.ts +2 -1
  41. package/dist/components/layouts/shared/components/visual_panel.d.ts.map +1 -1
  42. package/dist/components/layouts/shared/components/visual_panel.js +2 -1
  43. package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -1
  44. package/dist/components/layouts/shared/hooks/use_auth_status.js +4 -2
  45. package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
  46. package/dist/components/layouts/shared/hooks/use_hazo_auth.js +4 -2
  47. package/dist/components/layouts/shared/index.d.ts +0 -2
  48. package/dist/components/layouts/shared/index.d.ts.map +1 -1
  49. package/dist/components/layouts/shared/index.js +2 -2
  50. package/dist/components/layouts/user_management/components/roles_matrix.d.ts.map +1 -1
  51. package/dist/components/layouts/user_management/components/roles_matrix.js +8 -6
  52. package/dist/components/layouts/user_management/index.d.ts.map +1 -1
  53. package/dist/components/layouts/user_management/index.js +15 -13
  54. package/dist/contexts/hazo_auth_config.d.ts +18 -0
  55. package/dist/contexts/hazo_auth_config.d.ts.map +1 -0
  56. package/dist/contexts/hazo_auth_config.js +10 -0
  57. package/dist/contexts/hazo_auth_provider.d.ts +73 -0
  58. package/dist/contexts/hazo_auth_provider.d.ts.map +1 -0
  59. package/dist/contexts/hazo_auth_provider.js +82 -0
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +3 -0
  63. package/dist/lib/config/default_config.d.ts +237 -0
  64. package/dist/lib/config/default_config.d.ts.map +1 -0
  65. package/dist/lib/config/default_config.js +159 -0
  66. package/dist/lib/email_verification_config.server.d.ts +4 -0
  67. package/dist/lib/email_verification_config.server.d.ts.map +1 -1
  68. package/dist/lib/email_verification_config.server.js +12 -0
  69. package/dist/lib/forgot_password_config.server.d.ts +4 -0
  70. package/dist/lib/forgot_password_config.server.d.ts.map +1 -1
  71. package/dist/lib/forgot_password_config.server.js +12 -0
  72. package/dist/lib/login_config.server.d.ts +4 -0
  73. package/dist/lib/login_config.server.d.ts.map +1 -1
  74. package/dist/lib/login_config.server.js +10 -0
  75. package/dist/lib/password_requirements_config.server.d.ts +1 -1
  76. package/dist/lib/password_requirements_config.server.d.ts.map +1 -1
  77. package/dist/lib/password_requirements_config.server.js +8 -7
  78. package/dist/lib/register_config.server.d.ts +4 -0
  79. package/dist/lib/register_config.server.d.ts.map +1 -1
  80. package/dist/lib/register_config.server.js +10 -0
  81. package/dist/lib/reset_password_config.server.d.ts +4 -0
  82. package/dist/lib/reset_password_config.server.d.ts.map +1 -1
  83. package/dist/lib/reset_password_config.server.js +10 -0
  84. package/dist/page_components/forgot_password.d.ts.map +1 -1
  85. package/dist/page_components/forgot_password.js +14 -0
  86. package/dist/page_components/login.d.ts +4 -0
  87. package/dist/page_components/login.d.ts.map +1 -1
  88. package/dist/page_components/login.js +14 -0
  89. package/dist/page_components/register.d.ts.map +1 -1
  90. package/dist/page_components/register.js +14 -0
  91. package/dist/page_components/reset_password.d.ts.map +1 -1
  92. package/dist/page_components/reset_password.js +14 -0
  93. package/dist/page_components/verify_email.d.ts.map +1 -1
  94. package/dist/page_components/verify_email.js +14 -0
  95. package/dist/pages/forgot_password.d.ts +52 -0
  96. package/dist/pages/forgot_password.d.ts.map +1 -0
  97. package/dist/pages/forgot_password.js +41 -0
  98. package/dist/pages/index.d.ts +33 -0
  99. package/dist/pages/index.d.ts.map +1 -0
  100. package/dist/pages/index.js +28 -0
  101. package/dist/pages/login.d.ts +43 -0
  102. package/dist/pages/login.d.ts.map +1 -0
  103. package/dist/pages/login.js +45 -0
  104. package/dist/pages/my_settings.d.ts +54 -0
  105. package/dist/pages/my_settings.d.ts.map +1 -0
  106. package/dist/pages/my_settings.js +57 -0
  107. package/dist/pages/register.d.ts +44 -0
  108. package/dist/pages/register.d.ts.map +1 -0
  109. package/dist/pages/register.js +46 -0
  110. package/dist/pages/reset_password.d.ts +43 -0
  111. package/dist/pages/reset_password.d.ts.map +1 -0
  112. package/dist/pages/reset_password.js +42 -0
  113. package/dist/pages/verify_email.d.ts +52 -0
  114. package/dist/pages/verify_email.d.ts.map +1 -0
  115. package/dist/pages/verify_email.js +41 -0
  116. package/dist/server_pages/forgot_password.d.ts +53 -0
  117. package/dist/server_pages/forgot_password.d.ts.map +1 -0
  118. package/dist/server_pages/forgot_password.js +40 -0
  119. package/dist/server_pages/forgot_password_client_wrapper.d.ts +15 -0
  120. package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -0
  121. package/dist/server_pages/forgot_password_client_wrapper.js +27 -0
  122. package/dist/server_pages/index.d.ts +13 -0
  123. package/dist/server_pages/index.d.ts.map +1 -0
  124. package/dist/server_pages/index.js +7 -0
  125. package/dist/server_pages/login.d.ts +43 -0
  126. package/dist/server_pages/login.d.ts.map +1 -0
  127. package/dist/server_pages/login.js +39 -0
  128. package/dist/server_pages/login_client_wrapper.d.ts +13 -0
  129. package/dist/server_pages/login_client_wrapper.d.ts.map +1 -0
  130. package/dist/server_pages/login_client_wrapper.js +29 -0
  131. package/dist/server_pages/my_settings.d.ts +53 -0
  132. package/dist/server_pages/my_settings.d.ts.map +1 -0
  133. package/dist/server_pages/my_settings.js +57 -0
  134. package/dist/server_pages/register.d.ts +45 -0
  135. package/dist/server_pages/register.d.ts.map +1 -0
  136. package/dist/server_pages/register.js +41 -0
  137. package/dist/server_pages/register_client_wrapper.d.ts +13 -0
  138. package/dist/server_pages/register_client_wrapper.d.ts.map +1 -0
  139. package/dist/server_pages/register_client_wrapper.js +27 -0
  140. package/dist/server_pages/reset_password.d.ts +44 -0
  141. package/dist/server_pages/reset_password.d.ts.map +1 -0
  142. package/dist/server_pages/reset_password.js +40 -0
  143. package/dist/server_pages/reset_password_client_wrapper.d.ts +13 -0
  144. package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -0
  145. package/dist/server_pages/reset_password_client_wrapper.js +27 -0
  146. package/dist/server_pages/verify_email.d.ts +53 -0
  147. package/dist/server_pages/verify_email.d.ts.map +1 -0
  148. package/dist/server_pages/verify_email.js +40 -0
  149. package/dist/server_pages/verify_email_client_wrapper.d.ts +15 -0
  150. package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -0
  151. package/dist/server_pages/verify_email_client_wrapper.js +27 -0
  152. package/package.json +34 -10
@@ -0,0 +1,52 @@
1
+ export type ForgotPasswordPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Password recovery illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ /**
18
+ * Optional path to sign in page
19
+ * @default "/hazo_auth/login" (from default_config.ts)
20
+ */
21
+ sign_in_path?: string;
22
+ /**
23
+ * Optional sign in link label
24
+ * @default "Back to login" (from default_config.ts)
25
+ */
26
+ sign_in_label?: string;
27
+ };
28
+ /**
29
+ * Zero-config ForgotPasswordPage server component
30
+ *
31
+ * This component initializes everything server-side:
32
+ * - Database connection via hazo_connect singleton
33
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
34
+ * - Layout data client
35
+ *
36
+ * Usage in consuming apps:
37
+ * ```tsx
38
+ * // app/forgot-password/page.tsx
39
+ * import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
40
+ *
41
+ * export default function Page() {
42
+ * return <ForgotPasswordPage />;
43
+ * }
44
+ * ```
45
+ *
46
+ * Zero configuration required - works out of the box!
47
+ *
48
+ * @param props - Optional visual and navigation customization props
49
+ * @returns Server-rendered forgot password page
50
+ */
51
+ export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, }: ForgotPasswordPageProps): import("react/jsx-runtime").JSX.Element;
52
+ //# sourceMappingURL=forgot_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/pages/forgot_password.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,SAAsC,EACtC,SAA4C,EAC5C,sBAAkC,EAClC,YAAgD,EAChD,aAAkD,GACnD,EAAE,uBAAuB,2CAwBzB"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config ForgotPasswordPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_forgot_password_config } from "../lib/forgot_password_config.server";
7
+ import ForgotPasswordLayout from "../components/layouts/forgot_password";
8
+ import { DEFAULT_UI_SHELL, DEFAULT_FORGOT_PASSWORD } from "../lib/config/default_config";
9
+ // section: component
10
+ /**
11
+ * Zero-config ForgotPasswordPage server component
12
+ *
13
+ * This component initializes everything server-side:
14
+ * - Database connection via hazo_connect singleton
15
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
16
+ * - Layout data client
17
+ *
18
+ * Usage in consuming apps:
19
+ * ```tsx
20
+ * // app/forgot-password/page.tsx
21
+ * import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
22
+ *
23
+ * export default function Page() {
24
+ * return <ForgotPasswordPage />;
25
+ * }
26
+ * ```
27
+ *
28
+ * Zero configuration required - works out of the box!
29
+ *
30
+ * @param props - Optional visual and navigation customization props
31
+ * @returns Server-rendered forgot password page
32
+ */
33
+ export default function ForgotPasswordPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Password recovery illustration", image_background_color = "#f1f5f9", sign_in_path = DEFAULT_FORGOT_PASSWORD.loginPath, sign_in_label = DEFAULT_FORGOT_PASSWORD.loginLabel, }) {
34
+ // Initialize database connection server-side
35
+ const hazoConnect = get_hazo_connect_instance();
36
+ const dataClient = createLayoutDataClient(hazoConnect);
37
+ // Load configuration from INI file (with defaults)
38
+ const config = get_forgot_password_config();
39
+ // Render layout with all server-initialized dependencies
40
+ return (_jsx(ForgotPasswordLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, sign_in_path: sign_in_path, sign_in_label: sign_in_label, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
41
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Zero-config page components for hazo_auth v2.0+
3
+ *
4
+ * These are server components that initialize everything on the server:
5
+ * - Database connection via hazo_connect singleton
6
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
7
+ * - All required dependencies and props
8
+ *
9
+ * Usage in consuming apps:
10
+ * ```tsx
11
+ * // app/login/page.tsx
12
+ * import { LoginPage } from "hazo_auth/pages";
13
+ *
14
+ * export default function Page() {
15
+ * return <LoginPage />;
16
+ * }
17
+ * ```
18
+ *
19
+ * All pages work out-of-the-box with ZERO configuration required!
20
+ */
21
+ export { default as LoginPage } from "./login";
22
+ export { default as RegisterPage } from "./register";
23
+ export { default as VerifyEmailPage } from "./verify_email";
24
+ export { default as ForgotPasswordPage } from "./forgot_password";
25
+ export { default as ResetPasswordPage } from "./reset_password";
26
+ export { default as MySettingsPage } from "./my_settings";
27
+ export type { LoginPageProps } from "./login";
28
+ export type { RegisterPageProps } from "./register";
29
+ export type { VerifyEmailPageProps } from "./verify_email";
30
+ export type { ForgotPasswordPageProps } from "./forgot_password";
31
+ export type { ResetPasswordPageProps } from "./reset_password";
32
+ export type { MySettingsPageProps } from "./my_settings";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pages/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAG1D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ // file_description: Barrel export for all zero-config page components
2
+ // section: exports
3
+ /**
4
+ * Zero-config page components for hazo_auth v2.0+
5
+ *
6
+ * These are server components that initialize everything on the server:
7
+ * - Database connection via hazo_connect singleton
8
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
9
+ * - All required dependencies and props
10
+ *
11
+ * Usage in consuming apps:
12
+ * ```tsx
13
+ * // app/login/page.tsx
14
+ * import { LoginPage } from "hazo_auth/pages";
15
+ *
16
+ * export default function Page() {
17
+ * return <LoginPage />;
18
+ * }
19
+ * ```
20
+ *
21
+ * All pages work out-of-the-box with ZERO configuration required!
22
+ */
23
+ export { default as LoginPage } from "./login";
24
+ export { default as RegisterPage } from "./register";
25
+ export { default as VerifyEmailPage } from "./verify_email";
26
+ export { default as ForgotPasswordPage } from "./forgot_password";
27
+ export { default as ResetPasswordPage } from "./reset_password";
28
+ export { default as MySettingsPage } from "./my_settings";
@@ -0,0 +1,43 @@
1
+ export type LoginPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Login illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ };
18
+ /**
19
+ * Zero-config LoginPage server component
20
+ *
21
+ * This component initializes everything server-side:
22
+ * - Database connection via hazo_connect singleton
23
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
24
+ * - Logger instance
25
+ * - Layout data client
26
+ *
27
+ * Usage in consuming apps:
28
+ * ```tsx
29
+ * // app/login/page.tsx
30
+ * import { LoginPage } from "hazo_auth/pages/login";
31
+ *
32
+ * export default function Page() {
33
+ * return <LoginPage />;
34
+ * }
35
+ * ```
36
+ *
37
+ * Zero configuration required - works out of the box!
38
+ *
39
+ * @param props - Optional visual customization props
40
+ * @returns Server-rendered login page
41
+ */
42
+ export default function LoginPage({ image_src, image_alt, image_background_color, }: LoginPageProps): import("react/jsx-runtime").JSX.Element;
43
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/pages/login.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAsC,EACtC,SAAgC,EAChC,sBAAkC,GACnC,EAAE,cAAc,2CAgChB"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config LoginPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_login_config } from "../lib/login_config.server";
7
+ import { create_app_logger } from "../lib/app_logger";
8
+ import LoginLayout from "../components/layouts/login";
9
+ import { DEFAULT_UI_SHELL } from "../lib/config/default_config";
10
+ // section: component
11
+ /**
12
+ * Zero-config LoginPage server component
13
+ *
14
+ * This component initializes everything server-side:
15
+ * - Database connection via hazo_connect singleton
16
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
17
+ * - Logger instance
18
+ * - Layout data client
19
+ *
20
+ * Usage in consuming apps:
21
+ * ```tsx
22
+ * // app/login/page.tsx
23
+ * import { LoginPage } from "hazo_auth/pages/login";
24
+ *
25
+ * export default function Page() {
26
+ * return <LoginPage />;
27
+ * }
28
+ * ```
29
+ *
30
+ * Zero configuration required - works out of the box!
31
+ *
32
+ * @param props - Optional visual customization props
33
+ * @returns Server-rendered login page
34
+ */
35
+ export default function LoginPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Login illustration", image_background_color = "#f1f5f9", }) {
36
+ // Initialize database connection server-side
37
+ const hazoConnect = get_hazo_connect_instance();
38
+ const dataClient = createLayoutDataClient(hazoConnect);
39
+ // Load configuration from INI file (with defaults)
40
+ const config = get_login_config();
41
+ // Create logger instance
42
+ const logger = create_app_logger();
43
+ // Render layout with all server-initialized dependencies
44
+ return (_jsx(LoginLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, logger: logger, redirectRoute: config.redirectRoute, successMessage: config.successMessage, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, forgot_password_path: config.forgotPasswordPath, forgot_password_label: config.forgotPasswordLabel, create_account_path: config.createAccountPath, create_account_label: config.createAccountLabel }));
45
+ }
@@ -0,0 +1,54 @@
1
+ export type MySettingsPageProps = {
2
+ /**
3
+ * Optional className for custom styling
4
+ * Allows embedding in existing layouts
5
+ */
6
+ className?: string;
7
+ };
8
+ /**
9
+ * Zero-config MySettingsPage server component
10
+ *
11
+ * This component initializes everything server-side:
12
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
13
+ * - User field visibility settings
14
+ * - Password requirements
15
+ * - Profile picture configuration
16
+ * - UI messages and labels
17
+ *
18
+ * Usage in consuming apps:
19
+ *
20
+ * **As a full page:**
21
+ * ```tsx
22
+ * // app/settings/page.tsx
23
+ * import { MySettingsPage } from "hazo_auth/pages/my_settings";
24
+ *
25
+ * export default function Page() {
26
+ * return <MySettingsPage />;
27
+ * }
28
+ * ```
29
+ *
30
+ * **Embedded in a dashboard:**
31
+ * ```tsx
32
+ * // app/dashboard/page.tsx
33
+ * import { MySettingsPage } from "hazo_auth/pages/my_settings";
34
+ *
35
+ * export default function Page() {
36
+ * return (
37
+ * <div className="dashboard-container">
38
+ * <Sidebar />
39
+ * <main>
40
+ * <MySettingsPage className="max-w-4xl mx-auto" />
41
+ * </main>
42
+ * </div>
43
+ * );
44
+ * }
45
+ * ```
46
+ *
47
+ * Zero configuration required - works out of the box!
48
+ * The component is fully embeddable and adapts to its container.
49
+ *
50
+ * @param props - Optional className for custom styling
51
+ * @returns Server-rendered my settings component
52
+ */
53
+ export default function MySettingsPage({ className, }: MySettingsPageProps): import("react/jsx-runtime").JSX.Element;
54
+ //# sourceMappingURL=my_settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/pages/my_settings.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,GACV,EAAE,mBAAmB,2CA8BrB"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config MySettingsPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_my_settings_config } from "../lib/my_settings_config.server";
5
+ import MySettingsLayout from "../components/layouts/my_settings";
6
+ // section: component
7
+ /**
8
+ * Zero-config MySettingsPage server component
9
+ *
10
+ * This component initializes everything server-side:
11
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
12
+ * - User field visibility settings
13
+ * - Password requirements
14
+ * - Profile picture configuration
15
+ * - UI messages and labels
16
+ *
17
+ * Usage in consuming apps:
18
+ *
19
+ * **As a full page:**
20
+ * ```tsx
21
+ * // app/settings/page.tsx
22
+ * import { MySettingsPage } from "hazo_auth/pages/my_settings";
23
+ *
24
+ * export default function Page() {
25
+ * return <MySettingsPage />;
26
+ * }
27
+ * ```
28
+ *
29
+ * **Embedded in a dashboard:**
30
+ * ```tsx
31
+ * // app/dashboard/page.tsx
32
+ * import { MySettingsPage } from "hazo_auth/pages/my_settings";
33
+ *
34
+ * export default function Page() {
35
+ * return (
36
+ * <div className="dashboard-container">
37
+ * <Sidebar />
38
+ * <main>
39
+ * <MySettingsPage className="max-w-4xl mx-auto" />
40
+ * </main>
41
+ * </div>
42
+ * );
43
+ * }
44
+ * ```
45
+ *
46
+ * Zero configuration required - works out of the box!
47
+ * The component is fully embeddable and adapts to its container.
48
+ *
49
+ * @param props - Optional className for custom styling
50
+ * @returns Server-rendered my settings component
51
+ */
52
+ export default function MySettingsPage({ className, }) {
53
+ // Load configuration from INI file (with defaults)
54
+ const config = get_my_settings_config();
55
+ // Render layout with all server-initialized configuration
56
+ return (_jsx(MySettingsLayout, { className: className, password_requirements: config.passwordRequirements, profilePicture: config.profilePicture, userFields: config.userFields, unauthorizedMessage: config.unauthorizedMessage, loginButtonLabel: config.loginButtonLabel, loginPath: config.loginPath, heading: config.heading, subHeading: config.subHeading, profilePhotoLabel: config.profilePhotoLabel, profilePhotoRecommendation: config.profilePhotoRecommendation, uploadPhotoButtonLabel: config.uploadPhotoButtonLabel, removePhotoButtonLabel: config.removePhotoButtonLabel, profileInformationLabel: config.profileInformationLabel, passwordLabel: config.passwordLabel, currentPasswordLabel: config.currentPasswordLabel, newPasswordLabel: config.newPasswordLabel, confirmPasswordLabel: config.confirmPasswordLabel, messages: config.messages, uiSizes: config.uiSizes, fileTypes: config.fileTypes }));
57
+ }
@@ -0,0 +1,44 @@
1
+ export type RegisterPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * Defaults from hazo_auth_config.ini or "/globe.svg"
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * Defaults from hazo_auth_config.ini or "Registration illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * Defaults from hazo_auth_config.ini or "#e2e8f0"
15
+ */
16
+ image_background_color?: string;
17
+ };
18
+ /**
19
+ * Zero-config RegisterPage server component
20
+ *
21
+ * This component initializes everything server-side:
22
+ * - Database connection via hazo_connect singleton
23
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
24
+ * - Password requirements
25
+ * - User field visibility
26
+ * - Layout data client
27
+ *
28
+ * Usage in consuming apps:
29
+ * ```tsx
30
+ * // app/register/page.tsx
31
+ * import { RegisterPage } from "hazo_auth/pages/register";
32
+ *
33
+ * export default function Page() {
34
+ * return <RegisterPage />;
35
+ * }
36
+ * ```
37
+ *
38
+ * Zero configuration required - works out of the box!
39
+ *
40
+ * @param props - Optional visual customization props
41
+ * @returns Server-rendered register page
42
+ */
43
+ export default function RegisterPage({ image_src, image_alt, image_background_color, }: RegisterPageProps): import("react/jsx-runtime").JSX.Element;
44
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/pages/register.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,sBAAsB,GACvB,EAAE,iBAAiB,2CA+BnB"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config RegisterPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_register_config } from "../lib/register_config.server";
7
+ import RegisterLayout from "../components/layouts/register";
8
+ // section: component
9
+ /**
10
+ * Zero-config RegisterPage server component
11
+ *
12
+ * This component initializes everything server-side:
13
+ * - Database connection via hazo_connect singleton
14
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
15
+ * - Password requirements
16
+ * - User field visibility
17
+ * - Layout data client
18
+ *
19
+ * Usage in consuming apps:
20
+ * ```tsx
21
+ * // app/register/page.tsx
22
+ * import { RegisterPage } from "hazo_auth/pages/register";
23
+ *
24
+ * export default function Page() {
25
+ * return <RegisterPage />;
26
+ * }
27
+ * ```
28
+ *
29
+ * Zero configuration required - works out of the box!
30
+ *
31
+ * @param props - Optional visual customization props
32
+ * @returns Server-rendered register page
33
+ */
34
+ export default function RegisterPage({ image_src, image_alt, image_background_color, }) {
35
+ // Initialize database connection server-side
36
+ const hazoConnect = get_hazo_connect_instance();
37
+ const dataClient = createLayoutDataClient(hazoConnect);
38
+ // Load configuration from INI file (with defaults)
39
+ const config = get_register_config();
40
+ // Use props if provided, otherwise fall back to config
41
+ const finalImageSrc = image_src || config.imageSrc || "/globe.svg";
42
+ const finalImageAlt = image_alt || config.imageAlt || "Registration illustration";
43
+ const finalImageBackgroundColor = image_background_color || config.imageBackgroundColor || "#e2e8f0";
44
+ // Render layout with all server-initialized dependencies
45
+ return (_jsx(RegisterLayout, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, data_client: dataClient, show_name_field: config.showNameField, password_requirements: config.passwordRequirements, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, signInPath: config.signInPath, signInLabel: config.signInLabel }));
46
+ }
@@ -0,0 +1,43 @@
1
+ export type ResetPasswordPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Reset password illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ };
18
+ /**
19
+ * Zero-config ResetPasswordPage server component
20
+ *
21
+ * This component initializes everything server-side:
22
+ * - Database connection via hazo_connect singleton
23
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
24
+ * - Password requirements
25
+ * - Layout data client
26
+ *
27
+ * Usage in consuming apps:
28
+ * ```tsx
29
+ * // app/reset-password/page.tsx
30
+ * import { ResetPasswordPage } from "hazo_auth/pages/reset_password";
31
+ *
32
+ * export default function Page() {
33
+ * return <ResetPasswordPage />;
34
+ * }
35
+ * ```
36
+ *
37
+ * Zero configuration required - works out of the box!
38
+ *
39
+ * @param props - Optional visual customization props
40
+ * @returns Server-rendered reset password page
41
+ */
42
+ export default function ResetPasswordPage({ image_src, image_alt, image_background_color, }: ResetPasswordPageProps): import("react/jsx-runtime").JSX.Element;
43
+ //# sourceMappingURL=reset_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset_password.d.ts","sourceRoot":"","sources":["../../src/pages/reset_password.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAsC,EACtC,SAAyC,EACzC,sBAAkC,GACnC,EAAE,sBAAsB,2CA2BxB"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config ResetPasswordPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_reset_password_config } from "../lib/reset_password_config.server";
7
+ import ResetPasswordLayout from "../components/layouts/reset_password";
8
+ import { DEFAULT_UI_SHELL } from "../lib/config/default_config";
9
+ // section: component
10
+ /**
11
+ * Zero-config ResetPasswordPage server component
12
+ *
13
+ * This component initializes everything server-side:
14
+ * - Database connection via hazo_connect singleton
15
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
16
+ * - Password requirements
17
+ * - Layout data client
18
+ *
19
+ * Usage in consuming apps:
20
+ * ```tsx
21
+ * // app/reset-password/page.tsx
22
+ * import { ResetPasswordPage } from "hazo_auth/pages/reset_password";
23
+ *
24
+ * export default function Page() {
25
+ * return <ResetPasswordPage />;
26
+ * }
27
+ * ```
28
+ *
29
+ * Zero configuration required - works out of the box!
30
+ *
31
+ * @param props - Optional visual customization props
32
+ * @returns Server-rendered reset password page
33
+ */
34
+ export default function ResetPasswordPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Reset password illustration", image_background_color = "#f1f5f9", }) {
35
+ // Initialize database connection server-side
36
+ const hazoConnect = get_hazo_connect_instance();
37
+ const dataClient = createLayoutDataClient(hazoConnect);
38
+ // Load configuration from INI file (with defaults)
39
+ const config = get_reset_password_config();
40
+ // Render layout with all server-initialized dependencies
41
+ return (_jsx(ResetPasswordLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, password_requirements: config.passwordRequirements, errorMessage: config.errorMessage, successMessage: config.successMessage, loginPath: config.loginPath, forgotPasswordPath: config.forgotPasswordPath, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
42
+ }
@@ -0,0 +1,52 @@
1
+ export type VerifyEmailPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Email verification illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ /**
18
+ * Optional redirect delay in seconds after successful verification
19
+ * @default 5 (from default_config.ts)
20
+ */
21
+ redirect_delay?: number;
22
+ /**
23
+ * Optional path to login page
24
+ * @default "/hazo_auth/login" (from default_config.ts)
25
+ */
26
+ login_path?: string;
27
+ };
28
+ /**
29
+ * Zero-config VerifyEmailPage server component
30
+ *
31
+ * This component initializes everything server-side:
32
+ * - Database connection via hazo_connect singleton
33
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
34
+ * - Layout data client
35
+ *
36
+ * Usage in consuming apps:
37
+ * ```tsx
38
+ * // app/verify-email/page.tsx
39
+ * import { VerifyEmailPage } from "hazo_auth/pages/verify_email";
40
+ *
41
+ * export default function Page() {
42
+ * return <VerifyEmailPage />;
43
+ * }
44
+ * ```
45
+ *
46
+ * Zero configuration required - works out of the box!
47
+ *
48
+ * @param props - Optional visual and behavior customization props
49
+ * @returns Server-rendered email verification page
50
+ */
51
+ export default function VerifyEmailPage({ image_src, image_alt, image_background_color, redirect_delay, login_path, }: VerifyEmailPageProps): import("react/jsx-runtime").JSX.Element;
52
+ //# sourceMappingURL=verify_email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify_email.d.ts","sourceRoot":"","sources":["../../src/pages/verify_email.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,SAAsC,EACtC,SAA6C,EAC7C,sBAAkC,EAClC,cAAyD,EACzD,UAAiD,GAClD,EAAE,oBAAoB,2CAyBtB"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config VerifyEmailPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_email_verification_config } from "../lib/email_verification_config.server";
7
+ import EmailVerificationLayout from "../components/layouts/email_verification";
8
+ import { DEFAULT_UI_SHELL, DEFAULT_EMAIL_VERIFICATION } from "../lib/config/default_config";
9
+ // section: component
10
+ /**
11
+ * Zero-config VerifyEmailPage server component
12
+ *
13
+ * This component initializes everything server-side:
14
+ * - Database connection via hazo_connect singleton
15
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
16
+ * - Layout data client
17
+ *
18
+ * Usage in consuming apps:
19
+ * ```tsx
20
+ * // app/verify-email/page.tsx
21
+ * import { VerifyEmailPage } from "hazo_auth/pages/verify_email";
22
+ *
23
+ * export default function Page() {
24
+ * return <VerifyEmailPage />;
25
+ * }
26
+ * ```
27
+ *
28
+ * Zero configuration required - works out of the box!
29
+ *
30
+ * @param props - Optional visual and behavior customization props
31
+ * @returns Server-rendered email verification page
32
+ */
33
+ export default function VerifyEmailPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Email verification illustration", image_background_color = "#f1f5f9", redirect_delay = DEFAULT_EMAIL_VERIFICATION.redirectDelay, login_path = DEFAULT_EMAIL_VERIFICATION.loginPath, }) {
34
+ // Initialize database connection server-side
35
+ const hazoConnect = get_hazo_connect_instance();
36
+ const dataClient = createLayoutDataClient(hazoConnect);
37
+ // Load configuration from INI file (with defaults)
38
+ const config = get_email_verification_config();
39
+ // Render layout with all server-initialized dependencies
40
+ return (_jsx(EmailVerificationLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, redirect_delay: redirect_delay, login_path: login_path, sign_in_label: "Back to login", already_logged_in_message: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
41
+ }