@xk2800/nextjs-template 0.7.1-beta.1 → 0.7.1-beta.3

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.
@@ -4,6 +4,8 @@ import * as React from "react"
4
4
  import { Camera, ImagePlus, Upload, X } from "lucide-react"
5
5
 
6
6
  import { Button } from "./button"
7
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog"
8
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet"
7
9
  import { cn } from "../../lib/utils"
8
10
 
9
11
  type FileUploadProps = {
@@ -13,6 +15,13 @@ type FileUploadProps = {
13
15
  gallery?: boolean
14
16
  /** Drop files onto the component. */
15
17
  dragDrop?: boolean
18
+ /**
19
+ * Pressing the drop zone opens the picker instead of showing separate buttons. With both
20
+ * `camera` and `gallery` the user is asked which one; with one, it opens directly. Needs `dragDrop`.
21
+ */
22
+ clickable?: boolean
23
+ /** How a touch-screen user is asked "camera or gallery" with `clickable`: a bottom sheet or a centered modal. */
24
+ chooser?: "sheet" | "modal"
16
25
  /** Same format as `<input accept>`. Also enforced on dropped files. */
17
26
  accept?: string
18
27
  multiple?: boolean
@@ -23,6 +32,14 @@ type FileUploadProps = {
23
32
  icon?: React.ReactNode
24
33
  /** Drop zone text. Defaults to "Drag and drop files here" (or "a file" when `multiple` is false). */
25
34
  label?: React.ReactNode
35
+ /** Smaller sub text under the drop zone label. */
36
+ description?: React.ReactNode
37
+ /** Extra classes for the dashed drop zone box. */
38
+ dropzoneClassName?: string
39
+ /** Extra classes for the label text. */
40
+ labelClassName?: string
41
+ /** Extra classes for the description text. */
42
+ descriptionClassName?: string
26
43
  onFilesChange?: (files: File[]) => void
27
44
  className?: string
28
45
  }
@@ -41,6 +58,8 @@ function FileUpload({
41
58
  camera = false,
42
59
  gallery = false,
43
60
  dragDrop = false,
61
+ clickable = false,
62
+ chooser = "sheet",
44
63
  accept = "image/*",
45
64
  multiple = true,
46
65
  maxFiles,
@@ -48,6 +67,10 @@ function FileUpload({
48
67
  disabled = false,
49
68
  icon = <Upload className="size-6" />,
50
69
  label,
70
+ description,
71
+ dropzoneClassName,
72
+ labelClassName,
73
+ descriptionClassName,
51
74
  onFilesChange,
52
75
  className,
53
76
  }: FileUploadProps) {
@@ -56,6 +79,8 @@ function FileUpload({
56
79
  const [dragging, setDragging] = React.useState(false)
57
80
  const cameraRef = React.useRef<HTMLInputElement>(null)
58
81
  const galleryRef = React.useRef<HTMLInputElement>(null)
82
+ const [askOpen, setAskOpen] = React.useState(false)
83
+ const pointerType = React.useRef("")
59
84
 
60
85
  // Created and revoked in the same effect: with useMemo, Strict Mode's
61
86
  // simulated unmount revoked the URLs and the remount reused the dead ones.
@@ -100,6 +125,37 @@ function FileUpload({
100
125
 
101
126
  if (!camera && !gallery && !dragDrop) return null
102
127
 
128
+ // Pressing the drop zone only does something if there's a picker to open.
129
+ const pickable = clickable && !disabled && (camera || gallery)
130
+ // The camera only means something on touch devices, so mouse and keyboard skip the
131
+ // question and open the gallery (or the only source there is).
132
+ const openDefault = () => (gallery ? galleryRef : cameraRef).current?.click()
133
+ const units = multiple ? "files" : "a file"
134
+
135
+ const askTitle = `Add ${multiple ? "photos" : "a photo"}`
136
+ const askDescription = "Take a new photo or pick from your gallery."
137
+ const askButtons = (
138
+ <div className="grid gap-2">
139
+ {[
140
+ { ref: cameraRef, Icon: Camera, text: "Take photo" },
141
+ { ref: galleryRef, Icon: ImagePlus, text: "Choose from gallery" },
142
+ ].map(({ ref, Icon, text }) => (
143
+ <Button
144
+ key={text}
145
+ type="button"
146
+ variant="outline"
147
+ className="h-12 justify-start"
148
+ onClick={() => {
149
+ setAskOpen(false)
150
+ ref.current?.click()
151
+ }}
152
+ >
153
+ <Icon /> {text}
154
+ </Button>
155
+ ))}
156
+ </div>
157
+ )
158
+
103
159
  const buttons = (
104
160
  <div className="flex flex-wrap justify-center gap-2">
105
161
  {camera && (
@@ -126,6 +182,28 @@ function FileUpload({
126
182
 
127
183
  {dragDrop ? (
128
184
  <div
185
+ role={pickable ? "button" : undefined}
186
+ tabIndex={pickable ? 0 : undefined}
187
+ onPointerDown={pickable ? (e) => (pointerType.current = e.pointerType) : undefined}
188
+ onClick={
189
+ pickable
190
+ ? () => {
191
+ if (camera && gallery && pointerType.current !== "mouse") setAskOpen(true)
192
+ else openDefault()
193
+ pointerType.current = ""
194
+ }
195
+ : undefined
196
+ }
197
+ onKeyDown={
198
+ pickable
199
+ ? (e) => {
200
+ if (e.key === "Enter" || e.key === " ") {
201
+ e.preventDefault()
202
+ openDefault()
203
+ }
204
+ }
205
+ : undefined
206
+ }
129
207
  onDragOver={(e) => {
130
208
  e.preventDefault()
131
209
  if (!disabled) setDragging(true)
@@ -139,18 +217,58 @@ function FileUpload({
139
217
  aria-disabled={disabled}
140
218
  className={cn(
141
219
  "flex flex-col items-center gap-3 rounded-lg border-2 border-dashed p-6 text-center text-sm text-muted-foreground transition-colors",
220
+ pickable && "cursor-pointer outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring",
221
+ // Before the state classes so a custom border can't hide the drag highlight.
222
+ dropzoneClassName,
142
223
  dragging && "border-primary bg-primary/5",
143
224
  disabled && "opacity-50"
144
225
  )}
145
226
  >
146
227
  {icon}
147
- <p>{label ?? `Drag and drop ${multiple ? "files" : "a file"} here`}</p>
148
- {buttons}
228
+ <div className="space-y-1">
229
+ <p className={labelClassName}>
230
+ {label ??
231
+ (pickable ? (
232
+ <>
233
+ <span className="pointer-coarse:hidden">Drag and drop {units} here, or click to browse</span>
234
+ <span className="hidden pointer-coarse:inline">Tap to add {units}</span>
235
+ </>
236
+ ) : (
237
+ `Drag and drop ${units} here`
238
+ ))}
239
+ </p>
240
+ {description && <p className={cn("text-xs", descriptionClassName)}>{description}</p>}
241
+ </div>
242
+ {!pickable && buttons}
149
243
  </div>
150
244
  ) : (
151
245
  buttons
152
246
  )}
153
247
 
248
+ {pickable && camera && gallery && (
249
+ chooser === "modal" ? (
250
+ <Dialog open={askOpen} onOpenChange={setAskOpen}>
251
+ <DialogContent className="sm:max-w-sm">
252
+ <DialogHeader>
253
+ <DialogTitle>{askTitle}</DialogTitle>
254
+ <DialogDescription>{askDescription}</DialogDescription>
255
+ </DialogHeader>
256
+ {askButtons}
257
+ </DialogContent>
258
+ </Dialog>
259
+ ) : (
260
+ <Sheet open={askOpen} onOpenChange={setAskOpen}>
261
+ <SheetContent side="bottom" className="mx-auto max-w-lg rounded-t-xl pb-[max(1rem,env(safe-area-inset-bottom))]">
262
+ <SheetHeader className="pb-0">
263
+ <SheetTitle>{askTitle}</SheetTitle>
264
+ <SheetDescription>{askDescription}</SheetDescription>
265
+ </SheetHeader>
266
+ <div className="px-4">{askButtons}</div>
267
+ </SheetContent>
268
+ </Sheet>
269
+ )
270
+ )}
271
+
154
272
  {error && (
155
273
  <p role="alert" className="text-sm text-destructive">
156
274
  {error}
@@ -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.1",
3
+ "version": "0.7.1-beta.3",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",