@xk2800/nextjs-template 0.7.1-beta.12 → 0.7.1-beta.14

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.
@@ -0,0 +1,164 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Check, ChevronDown, Plus } from "lucide-react"
5
+ import { cn } from "../../lib/utils"
6
+ import { Button } from "./button"
7
+ import { Input } from "./input"
8
+ import {
9
+ Command,
10
+ CommandEmpty,
11
+ CommandGroup,
12
+ CommandInput,
13
+ CommandItem,
14
+ CommandList,
15
+ CommandSeparator,
16
+ } from "./command"
17
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover"
18
+ import { Disclaimer } from "./disclaimer"
19
+ import type { SuggestionGroup } from "./category-selector"
20
+
21
+ interface SourceSelectorProps {
22
+ /** The user's existing sources. The value is the source name. */
23
+ sources: { id: string | number; name: string }[]
24
+ isLoading?: boolean
25
+ value?: string
26
+ onSourceChange?: (sourceName: string) => void
27
+ onNewSourceChange?: (newSourceName: string) => void
28
+ newSourceValue?: string
29
+ className?: string
30
+ placeholder?: string
31
+ disabled?: boolean
32
+ /** Extra names offered below the user's own sources; picking one selects that name. */
33
+ suggestionGroups?: SuggestionGroup[]
34
+ /** Small print under the new-source input. */
35
+ newSourceNote?: string
36
+ }
37
+
38
+ /** Combobox over named sources (selected by name), with optional suggestion groups and "Add new source". */
39
+ export function SourceSelector({
40
+ sources,
41
+ isLoading = false,
42
+ value,
43
+ onSourceChange,
44
+ onNewSourceChange,
45
+ newSourceValue = "",
46
+ className,
47
+ placeholder = "Select a source...",
48
+ disabled = false,
49
+ suggestionGroups,
50
+ newSourceNote,
51
+ }: SourceSelectorProps) {
52
+ const [open, setOpen] = React.useState(false)
53
+ const [showNewInput, setShowNewInput] = React.useState(false)
54
+ const groups = suggestionGroups?.filter((g) => g.items.length > 0) ?? []
55
+
56
+ const handleSourceSelect = (name: string) => {
57
+ onSourceChange?.(name)
58
+ onNewSourceChange?.("")
59
+ setShowNewInput(false)
60
+ setOpen(false)
61
+ }
62
+
63
+ const handleAddNew = () => {
64
+ onSourceChange?.("")
65
+ setShowNewInput(true)
66
+ setOpen(false)
67
+ }
68
+
69
+ const triggerLabel = isLoading
70
+ ? "Loading..."
71
+ : value
72
+ ? value
73
+ : showNewInput
74
+ ? "Add new source"
75
+ : placeholder
76
+
77
+ return (
78
+ <div className={cn("space-y-2", className)}>
79
+ <Popover open={open} onOpenChange={setOpen}>
80
+ <PopoverTrigger asChild>
81
+ <Button
82
+ variant="outline"
83
+ role="combobox"
84
+ aria-expanded={open}
85
+ className="w-full justify-between"
86
+ disabled={disabled || isLoading}
87
+ >
88
+ {triggerLabel}
89
+ <ChevronDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
90
+ </Button>
91
+ </PopoverTrigger>
92
+ <PopoverContent className="w-full p-0">
93
+ <Command>
94
+ <CommandInput placeholder="Search sources..." />
95
+ <CommandList>
96
+ <CommandEmpty>No sources found.</CommandEmpty>
97
+
98
+ <CommandGroup heading={groups.length ? "My Sources" : undefined}>
99
+ {sources.map((source) => (
100
+ <CommandItem
101
+ key={source.id}
102
+ value={source.name}
103
+ onSelect={() => handleSourceSelect(source.name)}
104
+ >
105
+ {source.name}
106
+ <Check
107
+ className={cn(
108
+ "ml-auto h-4 w-4",
109
+ value === source.name ? "opacity-100" : "opacity-0"
110
+ )}
111
+ />
112
+ </CommandItem>
113
+ ))}
114
+ <CommandItem onSelect={handleAddNew}>
115
+ <Plus className="mr-2 h-4 w-4" />
116
+ Add new source
117
+ </CommandItem>
118
+ </CommandGroup>
119
+
120
+ {groups.map((group) => (
121
+ <React.Fragment key={group.heading}>
122
+ <CommandSeparator />
123
+ <CommandGroup heading={group.heading}>
124
+ {group.items.map((s) => (
125
+ <CommandItem
126
+ key={s.name}
127
+ value={s.name}
128
+ onSelect={() => handleSourceSelect(s.name)}
129
+ >
130
+ <div className="flex flex-col">
131
+ <span>{s.name}</span>
132
+ {s.note && <span className="text-xs text-muted-foreground">{s.note}</span>}
133
+ </div>
134
+ <Check
135
+ className={cn(
136
+ "ml-auto h-4 w-4 shrink-0",
137
+ value === s.name ? "opacity-100" : "opacity-0"
138
+ )}
139
+ />
140
+ </CommandItem>
141
+ ))}
142
+ </CommandGroup>
143
+ </React.Fragment>
144
+ ))}
145
+ </CommandList>
146
+ </Command>
147
+ </PopoverContent>
148
+ </Popover>
149
+
150
+ {showNewInput && (
151
+ <>
152
+ <Input
153
+ placeholder="Enter new source name..."
154
+ value={newSourceValue}
155
+ onChange={(e) => onNewSourceChange?.(e.target.value)}
156
+ disabled={disabled}
157
+ autoFocus
158
+ />
159
+ {newSourceNote && <Disclaimer disclaimerText={newSourceNote} />}
160
+ </>
161
+ )}
162
+ </div>
163
+ )
164
+ }
@@ -27,8 +27,8 @@ declare const getCurrentSession: () => Promise<{
27
27
  image?: string | null | undefined | undefined;
28
28
  role: string | null | undefined;
29
29
  banned: boolean | null | undefined;
30
- banExpires?: Date | null | undefined;
31
30
  banReason?: string | null | undefined;
31
+ banExpires?: Date | null | undefined;
32
32
  twoFactorEnabled: boolean | null | undefined;
33
33
  };
34
34
  } | null>;
@@ -61,8 +61,8 @@ declare const requireAuth: () => Promise<{
61
61
  image?: string | null | undefined | undefined;
62
62
  role: string | null | undefined;
63
63
  banned: boolean | null | undefined;
64
- banExpires?: Date | null | undefined;
65
64
  banReason?: string | null | undefined;
65
+ banExpires?: Date | null | undefined;
66
66
  twoFactorEnabled: boolean | null | undefined;
67
67
  };
68
68
  }>;
@@ -95,8 +95,8 @@ declare function requireRole(requiredRole: 'user' | 'admin'): Promise<{
95
95
  image?: string | null | undefined | undefined;
96
96
  role: string | null | undefined;
97
97
  banned: boolean | null | undefined;
98
- banExpires?: Date | null | undefined;
99
98
  banReason?: string | null | undefined;
99
+ banExpires?: Date | null | undefined;
100
100
  twoFactorEnabled: boolean | null | undefined;
101
101
  };
102
102
  }>;
@@ -27,8 +27,8 @@ declare const getCurrentSession: () => Promise<{
27
27
  image?: string | null | undefined | undefined;
28
28
  role: string | null | undefined;
29
29
  banned: boolean | null | undefined;
30
- banExpires?: Date | null | undefined;
31
30
  banReason?: string | null | undefined;
31
+ banExpires?: Date | null | undefined;
32
32
  twoFactorEnabled: boolean | null | undefined;
33
33
  };
34
34
  } | null>;
@@ -61,8 +61,8 @@ declare const requireAuth: () => Promise<{
61
61
  image?: string | null | undefined | undefined;
62
62
  role: string | null | undefined;
63
63
  banned: boolean | null | undefined;
64
- banExpires?: Date | null | undefined;
65
64
  banReason?: string | null | undefined;
65
+ banExpires?: Date | null | undefined;
66
66
  twoFactorEnabled: boolean | null | undefined;
67
67
  };
68
68
  }>;
@@ -95,8 +95,8 @@ declare function requireRole(requiredRole: 'user' | 'admin'): Promise<{
95
95
  image?: string | null | undefined | undefined;
96
96
  role: string | null | undefined;
97
97
  banned: boolean | null | undefined;
98
- banExpires?: Date | null | undefined;
99
98
  banReason?: string | null | undefined;
99
+ banExpires?: Date | null | undefined;
100
100
  twoFactorEnabled: boolean | null | undefined;
101
101
  };
102
102
  }>;
@@ -826,8 +826,8 @@ declare const authClient: better_auth_react.ReactAuthClient<{
826
826
  $Infer: {
827
827
  body: {
828
828
  permissions: {
829
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
830
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
829
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
830
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
831
831
  };
832
832
  } & {
833
833
  userId?: string | undefined;
@@ -916,8 +916,8 @@ declare const authClient: better_auth_react.ReactAuthClient<{
916
916
  admin: {
917
917
  checkRolePermission: <R extends "user" | "admin">(data: {
918
918
  permissions: {
919
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
920
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
919
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
920
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
921
921
  };
922
922
  } & {
923
923
  role: R;
@@ -2423,8 +2423,8 @@ declare const useSession: () => {
2423
2423
  banned: boolean | null | undefined;
2424
2424
  } & {
2425
2425
  role?: string | null | undefined;
2426
- banExpires?: Date | null | undefined;
2427
2426
  banReason?: string | null | undefined;
2427
+ banExpires?: Date | null | undefined;
2428
2428
  } & {
2429
2429
  twoFactorEnabled: boolean | null | undefined;
2430
2430
  } & {}>;
@@ -2450,7 +2450,7 @@ declare const useSession: () => {
2450
2450
  };
2451
2451
  declare const signIn: {
2452
2452
  social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2453
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2453
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2454
2454
  callbackURL?: string | undefined;
2455
2455
  newUserCallbackURL?: string | undefined;
2456
2456
  errorCallbackURL?: string | undefined;
@@ -2475,7 +2475,7 @@ declare const signIn: {
2475
2475
  additionalParams?: Record<string, string> | undefined;
2476
2476
  additionalData?: Record<string, any> | undefined;
2477
2477
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0: better_auth.Prettify<Omit<{
2478
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2478
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2479
2479
  callbackURL?: string | undefined;
2480
2480
  newUserCallbackURL?: string | undefined;
2481
2481
  errorCallbackURL?: string | undefined;
@@ -2502,7 +2502,7 @@ declare const signIn: {
2502
2502
  } & {
2503
2503
  fetchOptions?: FetchOptions | undefined;
2504
2504
  }, "provider"> & {
2505
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2505
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2506
2506
  fetchOptions?: FetchOptions | undefined;
2507
2507
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2508
2508
  redirect: boolean;
@@ -2533,8 +2533,8 @@ declare const signIn: {
2533
2533
  banned: boolean | null | undefined;
2534
2534
  } & {
2535
2535
  role?: string | null | undefined;
2536
- banExpires?: Date | null | undefined;
2537
2536
  banReason?: string | null | undefined;
2537
+ banExpires?: Date | null | undefined;
2538
2538
  } & {
2539
2539
  twoFactorEnabled: boolean | null | undefined;
2540
2540
  } & {}>;
@@ -2581,8 +2581,8 @@ declare const signIn: {
2581
2581
  banned: boolean | null | undefined;
2582
2582
  } & {
2583
2583
  role?: string | null | undefined;
2584
- banExpires?: Date | null | undefined;
2585
2584
  banReason?: string | null | undefined;
2585
+ banExpires?: Date | null | undefined;
2586
2586
  } & {
2587
2587
  twoFactorEnabled: boolean | null | undefined;
2588
2588
  } & {}>;
@@ -3481,8 +3481,8 @@ declare const signUp: {
3481
3481
  $Infer: {
3482
3482
  body: {
3483
3483
  permissions: {
3484
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
3485
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3484
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
3485
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3486
3486
  };
3487
3487
  } & {
3488
3488
  userId?: string | undefined;
@@ -3571,8 +3571,8 @@ declare const signUp: {
3571
3571
  admin: {
3572
3572
  checkRolePermission: <R extends "user" | "admin">(data: {
3573
3573
  permissions: {
3574
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
3575
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3574
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
3575
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3576
3576
  };
3577
3577
  } & {
3578
3578
  role: R;
@@ -5155,8 +5155,8 @@ declare const signUp: {
5155
5155
  banned: boolean | null | undefined;
5156
5156
  } & {
5157
5157
  role?: string | null | undefined;
5158
- banExpires?: Date | null | undefined;
5159
5158
  banReason?: string | null | undefined;
5159
+ banExpires?: Date | null | undefined;
5160
5160
  } & {
5161
5161
  twoFactorEnabled: boolean | null | undefined;
5162
5162
  } & {}>;
@@ -5184,8 +5184,8 @@ declare const signUp: {
5184
5184
  banned: boolean | null | undefined;
5185
5185
  } & {
5186
5186
  role?: string | null | undefined;
5187
- banExpires?: Date | null | undefined;
5188
5187
  banReason?: string | null | undefined;
5188
+ banExpires?: Date | null | undefined;
5189
5189
  } & {
5190
5190
  twoFactorEnabled: boolean | null | undefined;
5191
5191
  } & {}>;
@@ -826,8 +826,8 @@ declare const authClient: better_auth_react.ReactAuthClient<{
826
826
  $Infer: {
827
827
  body: {
828
828
  permissions: {
829
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
830
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
829
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
830
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
831
831
  };
832
832
  } & {
833
833
  userId?: string | undefined;
@@ -916,8 +916,8 @@ declare const authClient: better_auth_react.ReactAuthClient<{
916
916
  admin: {
917
917
  checkRolePermission: <R extends "user" | "admin">(data: {
918
918
  permissions: {
919
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
920
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
919
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
920
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
921
921
  };
922
922
  } & {
923
923
  role: R;
@@ -2423,8 +2423,8 @@ declare const useSession: () => {
2423
2423
  banned: boolean | null | undefined;
2424
2424
  } & {
2425
2425
  role?: string | null | undefined;
2426
- banExpires?: Date | null | undefined;
2427
2426
  banReason?: string | null | undefined;
2427
+ banExpires?: Date | null | undefined;
2428
2428
  } & {
2429
2429
  twoFactorEnabled: boolean | null | undefined;
2430
2430
  } & {}>;
@@ -2450,7 +2450,7 @@ declare const useSession: () => {
2450
2450
  };
2451
2451
  declare const signIn: {
2452
2452
  social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2453
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2453
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2454
2454
  callbackURL?: string | undefined;
2455
2455
  newUserCallbackURL?: string | undefined;
2456
2456
  errorCallbackURL?: string | undefined;
@@ -2475,7 +2475,7 @@ declare const signIn: {
2475
2475
  additionalParams?: Record<string, string> | undefined;
2476
2476
  additionalData?: Record<string, any> | undefined;
2477
2477
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0: better_auth.Prettify<Omit<{
2478
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2478
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2479
2479
  callbackURL?: string | undefined;
2480
2480
  newUserCallbackURL?: string | undefined;
2481
2481
  errorCallbackURL?: string | undefined;
@@ -2502,7 +2502,7 @@ declare const signIn: {
2502
2502
  } & {
2503
2503
  fetchOptions?: FetchOptions | undefined;
2504
2504
  }, "provider"> & {
2505
- provider: "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
2505
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
2506
2506
  fetchOptions?: FetchOptions | undefined;
2507
2507
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2508
2508
  redirect: boolean;
@@ -2533,8 +2533,8 @@ declare const signIn: {
2533
2533
  banned: boolean | null | undefined;
2534
2534
  } & {
2535
2535
  role?: string | null | undefined;
2536
- banExpires?: Date | null | undefined;
2537
2536
  banReason?: string | null | undefined;
2537
+ banExpires?: Date | null | undefined;
2538
2538
  } & {
2539
2539
  twoFactorEnabled: boolean | null | undefined;
2540
2540
  } & {}>;
@@ -2581,8 +2581,8 @@ declare const signIn: {
2581
2581
  banned: boolean | null | undefined;
2582
2582
  } & {
2583
2583
  role?: string | null | undefined;
2584
- banExpires?: Date | null | undefined;
2585
2584
  banReason?: string | null | undefined;
2585
+ banExpires?: Date | null | undefined;
2586
2586
  } & {
2587
2587
  twoFactorEnabled: boolean | null | undefined;
2588
2588
  } & {}>;
@@ -3481,8 +3481,8 @@ declare const signUp: {
3481
3481
  $Infer: {
3482
3482
  body: {
3483
3483
  permissions: {
3484
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
3485
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3484
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
3485
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3486
3486
  };
3487
3487
  } & {
3488
3488
  userId?: string | undefined;
@@ -3571,8 +3571,8 @@ declare const signUp: {
3571
3571
  admin: {
3572
3572
  checkRolePermission: <R extends "user" | "admin">(data: {
3573
3573
  permissions: {
3574
- readonly user?: ("set-role" | "delete" | "update" | "list" | "create" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "set-email" | "get")[] | undefined;
3575
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3574
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
3575
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3576
3576
  };
3577
3577
  } & {
3578
3578
  role: R;
@@ -5155,8 +5155,8 @@ declare const signUp: {
5155
5155
  banned: boolean | null | undefined;
5156
5156
  } & {
5157
5157
  role?: string | null | undefined;
5158
- banExpires?: Date | null | undefined;
5159
5158
  banReason?: string | null | undefined;
5159
+ banExpires?: Date | null | undefined;
5160
5160
  } & {
5161
5161
  twoFactorEnabled: boolean | null | undefined;
5162
5162
  } & {}>;
@@ -5184,8 +5184,8 @@ declare const signUp: {
5184
5184
  banned: boolean | null | undefined;
5185
5185
  } & {
5186
5186
  role?: string | null | undefined;
5187
- banExpires?: Date | null | undefined;
5188
5187
  banReason?: string | null | undefined;
5188
+ banExpires?: Date | null | undefined;
5189
5189
  } & {
5190
5190
  twoFactorEnabled: boolean | null | undefined;
5191
5191
  } & {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xk2800/nextjs-template",
3
- "version": "0.7.1-beta.12",
3
+ "version": "0.7.1-beta.14",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -272,31 +272,21 @@
272
272
  "next": "^15.0.0 || ^16.0.0",
273
273
  "react": "^19.0.0",
274
274
  "react-dom": "^19.0.0",
275
- "@radix-ui/react-alert-dialog": "^1.1.0",
276
- "@radix-ui/react-avatar": "^1.1.0",
277
- "@radix-ui/react-dialog": "^1.1.0",
278
- "@radix-ui/react-dropdown-menu": "^2.1.0",
279
- "@radix-ui/react-label": "^2.1.0",
280
- "@radix-ui/react-separator": "^1.1.0",
281
- "@radix-ui/react-slot": "^1.2.0",
282
275
  "class-variance-authority": "^0.7.0",
283
276
  "clsx": "^2.1.0",
284
277
  "tailwind-merge": "^3.3.0",
285
278
  "lucide-react": "^1.16.0",
286
279
  "react-icons": "^5.5.0",
287
280
  "next-themes": "^0.4.0",
288
- "sonner": "^2.0.0"
281
+ "sonner": "^2.0.0",
282
+ "cmdk": "^1.1.1",
283
+ "date-fns": "^4.1.0",
284
+ "react-day-picker": "^10.0.0",
285
+ "recharts": "^3.8.1"
289
286
  },
290
287
  "devDependencies": {
291
288
  "@eslint/eslintrc": "^3",
292
289
  "@inquirer/prompts": "^8.5.2",
293
- "@radix-ui/react-alert-dialog": "^1.1.15",
294
- "@radix-ui/react-avatar": "^1.1.11",
295
- "@radix-ui/react-dialog": "^1.1.15",
296
- "@radix-ui/react-dropdown-menu": "^2.1.16",
297
- "@radix-ui/react-label": "^2.1.8",
298
- "@radix-ui/react-separator": "^1.1.8",
299
- "@radix-ui/react-slot": "^1.2.4",
300
290
  "@storybook/addon-docs": "10.6.2",
301
291
  "@storybook/nextjs-vite": "10.6.2",
302
292
  "@tailwindcss/postcss": "^4",
@@ -310,6 +300,8 @@
310
300
  "bun-types": "^1.4.2",
311
301
  "class-variance-authority": "^0.7.1",
312
302
  "clsx": "^2.1.1",
303
+ "cmdk": "^1.1.1",
304
+ "date-fns": "^4.1.0",
313
305
  "dotenv": "^17.2.3",
314
306
  "drizzle-kit": "^0.31.1",
315
307
  "eslint": "^10",
@@ -319,8 +311,10 @@
319
311
  "next-themes": "^0.4.6",
320
312
  "playwright": "^1.62.0",
321
313
  "react": "^19.0.0",
314
+ "react-day-picker": "^10.0.0",
322
315
  "react-dom": "^19.0.0",
323
316
  "react-icons": "^5.5.0",
317
+ "recharts": "^3.8.1",
324
318
  "sonner": "^2.0.7",
325
319
  "storybook": "10.6.2",
326
320
  "tailwind-merge": "^3.3.1",
@@ -330,5 +324,19 @@
330
324
  "tw-animate-css": "^1.3.6",
331
325
  "typescript": "^6.0.3",
332
326
  "vite": "^8.3.4"
327
+ },
328
+ "peerDependenciesMeta": {
329
+ "cmdk": {
330
+ "optional": true
331
+ },
332
+ "date-fns": {
333
+ "optional": true
334
+ },
335
+ "react-day-picker": {
336
+ "optional": true
337
+ },
338
+ "recharts": {
339
+ "optional": true
340
+ }
333
341
  }
334
342
  }