hazo_auth 1.0.3 → 1.0.4
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/package.json +1 -1
- package/src/components/layouts/shared/components/already_logged_in_guard.tsx +4 -4
- package/src/components/layouts/shared/components/form_action_buttons.tsx +2 -2
- package/src/components/layouts/shared/components/form_field_wrapper.tsx +2 -2
- package/src/components/layouts/shared/components/logout_button.tsx +2 -2
- package/src/components/layouts/shared/components/password_field.tsx +3 -3
- package/src/components/layouts/shared/components/profile_pic_menu.tsx +5 -5
- package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +1 -1
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +3 -3
- package/src/components/layouts/shared/components/two_column_auth_layout.tsx +1 -1
- package/src/components/layouts/shared/components/unauthorized_guard.tsx +2 -2
- package/src/components/layouts/shared/hooks/use_hazo_auth.ts +1 -1
- package/src/components/layouts/shared/utils/validation.ts +1 -1
- package/src/lib/hazo_connect_setup.server.ts +2 -2
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
|
-
import { use_auth_status } from "
|
|
7
|
-
import { LogoutButton } from "
|
|
8
|
-
import { Button } from "
|
|
9
|
-
import { TwoColumnAuthLayout } from "
|
|
6
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
7
|
+
import { LogoutButton } from "./logout_button";
|
|
8
|
+
import { Button } from "../../../ui/button";
|
|
9
|
+
import { TwoColumnAuthLayout } from "./two_column_auth_layout";
|
|
10
10
|
import { useRouter } from "next/navigation";
|
|
11
11
|
import { Home } from "lucide-react";
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: reusable form action buttons component with submit (positive, left) and cancel (negative, right) buttons
|
|
2
2
|
// section: imports
|
|
3
3
|
import { CircleCheckBig, CircleX } from "lucide-react";
|
|
4
|
-
import { Button } from "
|
|
5
|
-
import type { ButtonPaletteDefaults } from "
|
|
4
|
+
import { Button } from "../../../ui/button";
|
|
5
|
+
import type { ButtonPaletteDefaults } from "../config/layout_customization";
|
|
6
6
|
|
|
7
7
|
// section: types
|
|
8
8
|
type FormActionButtonsProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: reusable wrapper component for form fields that standardizes label, input, and error message structure
|
|
2
2
|
// section: imports
|
|
3
|
-
import { Label } from "
|
|
4
|
-
import { FieldErrorMessage } from "
|
|
3
|
+
import { Label } from "../../../ui/label";
|
|
4
|
+
import { FieldErrorMessage } from "./field_error_message";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
type FormFieldWrapperProps = {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useRouter } from "next/navigation";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "../../../ui/button";
|
|
9
9
|
import { LogOut } from "lucide-react";
|
|
10
10
|
import { toast } from "sonner";
|
|
11
|
-
import { trigger_auth_status_refresh } from "
|
|
11
|
+
import { trigger_auth_status_refresh } from "../hooks/use_auth_status";
|
|
12
12
|
|
|
13
13
|
// section: types
|
|
14
14
|
export type LogoutButtonProps = {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { Eye, EyeOff } from "lucide-react";
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { Input } from "
|
|
9
|
-
import { FieldErrorMessage } from "
|
|
7
|
+
import { Button } from "../../../ui/button";
|
|
8
|
+
import { Input } from "../../../ui/input";
|
|
9
|
+
import { FieldErrorMessage } from "./field_error_message";
|
|
10
10
|
|
|
11
11
|
// section: types
|
|
12
12
|
export type PasswordFieldProps = {
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
import { useState, useMemo } from "react";
|
|
7
7
|
import { useRouter } from "next/navigation";
|
|
8
8
|
import Link from "next/link";
|
|
9
|
-
import { Avatar, AvatarImage, AvatarFallback } from "
|
|
10
|
-
import { Button } from "
|
|
9
|
+
import { Avatar, AvatarImage, AvatarFallback } from "../../../ui/avatar";
|
|
10
|
+
import { Button } from "../../../ui/button";
|
|
11
11
|
import {
|
|
12
12
|
DropdownMenu,
|
|
13
13
|
DropdownMenuContent,
|
|
14
14
|
DropdownMenuItem,
|
|
15
15
|
DropdownMenuSeparator,
|
|
16
16
|
DropdownMenuTrigger,
|
|
17
|
-
} from "
|
|
17
|
+
} from "../../../ui/dropdown-menu";
|
|
18
18
|
import { Settings, LogOut } from "lucide-react";
|
|
19
19
|
import { toast } from "sonner";
|
|
20
|
-
import { use_auth_status, trigger_auth_status_refresh } from "
|
|
20
|
+
import { use_auth_status, trigger_auth_status_refresh } from "../hooks/use_auth_status";
|
|
21
21
|
// Type-only import from server file is safe (types are erased at runtime)
|
|
22
|
-
import type { ProfilePicMenuMenuItem } from "
|
|
22
|
+
import type { ProfilePicMenuMenuItem } from "../../../../lib/profile_pic_menu_config.server";
|
|
23
23
|
|
|
24
24
|
// section: types
|
|
25
25
|
export type ProfilePicMenuProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: server wrapper component that loads profile picture menu configuration and passes to client component
|
|
2
2
|
// section: imports
|
|
3
3
|
import { ProfilePicMenu } from "./profile_pic_menu";
|
|
4
|
-
import { get_profile_pic_menu_config } from "
|
|
4
|
+
import { get_profile_pic_menu_config } from "../../../../lib/profile_pic_menu_config.server";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
export type ProfilePicMenuWrapperProps = {
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
SidebarProvider,
|
|
17
17
|
SidebarTrigger,
|
|
18
18
|
SidebarInset,
|
|
19
|
-
} from "
|
|
19
|
+
} from "../../../ui/sidebar";
|
|
20
20
|
import { LogIn, UserPlus, BookOpen, ExternalLink, Database, KeyRound, MailCheck, Key, Settings, User } from "lucide-react";
|
|
21
|
-
import { use_auth_status } from "
|
|
22
|
-
import { ProfilePicMenu } from "
|
|
21
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
22
|
+
import { ProfilePicMenu } from "./profile_pic_menu";
|
|
23
23
|
|
|
24
24
|
// section: types
|
|
25
25
|
type SidebarLayoutWrapperProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: reusable two-column authentication layout shell that combines visual panel and form content
|
|
2
2
|
// section: imports
|
|
3
|
-
import { VisualPanel } from "
|
|
3
|
+
import { VisualPanel } from "./visual_panel";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
type TwoColumnAuthLayoutProps = {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
|
-
import { use_auth_status } from "
|
|
7
|
-
import { Button } from "
|
|
6
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
7
|
+
import { Button } from "../../../ui/button";
|
|
8
8
|
import { useRouter } from "next/navigation";
|
|
9
9
|
import { LogIn } from "lucide-react";
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: provide shared validation utilities for email and password fields across layout components
|
|
2
2
|
// section: imports
|
|
3
|
-
import type { PasswordRequirementOptions } from "
|
|
3
|
+
import type { PasswordRequirementOptions } from "../config/layout_customization";
|
|
4
4
|
|
|
5
5
|
// section: constants
|
|
6
6
|
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -166,8 +166,8 @@ export function get_hazo_connect_config_options(): {
|
|
|
166
166
|
sqlitePath?: string;
|
|
167
167
|
enableAdminUi?: boolean;
|
|
168
168
|
readOnly?: boolean;
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
baseUrl?: string;
|
|
170
|
+
apiKey?: string;
|
|
171
171
|
} {
|
|
172
172
|
const config = get_hazo_connect_config();
|
|
173
173
|
|