create-better-t-stack 3.9.0 → 3.11.0

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 (77) hide show
  1. package/README.md +2 -1
  2. package/dist/cli.mjs +1 -1
  3. package/dist/index.d.mts +7 -3
  4. package/dist/index.mjs +1 -1
  5. package/dist/{src-DLvUK0Qf.mjs → src-XVvJUQ_h.mjs} +270 -93
  6. package/package.json +44 -44
  7. package/templates/auth/better-auth/convex/backend/convex/auth.config.ts.hbs +5 -7
  8. package/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs +17 -17
  9. package/templates/auth/better-auth/convex/backend/convex/http.ts.hbs +4 -4
  10. package/templates/auth/better-auth/convex/web/react/next/src/app/api/auth/[...all]/route.ts.hbs +2 -2
  11. package/templates/auth/better-auth/convex/web/react/next/src/components/user-menu.tsx.hbs +10 -10
  12. package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-server.ts.hbs +13 -5
  13. package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/user-menu.tsx.hbs +14 -12
  14. package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/user-menu.tsx.hbs +13 -16
  15. package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-server.ts.hbs +11 -5
  16. package/templates/auth/better-auth/convex/web/react/tanstack-start/src/routes/api/auth/$.ts.hbs +4 -4
  17. package/templates/auth/better-auth/fullstack/tanstack-start/src/routes/api/auth/$.ts.hbs +1 -1
  18. package/templates/auth/better-auth/web/react/next/src/components/user-menu.tsx.hbs +17 -15
  19. package/templates/auth/better-auth/web/react/react-router/src/components/user-menu.tsx.hbs +16 -15
  20. package/templates/auth/better-auth/web/react/tanstack-router/src/components/{user-menu.tsx → user-menu.tsx.hbs} +16 -15
  21. package/templates/auth/better-auth/web/react/tanstack-start/src/components/{user-menu.tsx → user-menu.tsx.hbs} +16 -15
  22. package/templates/backend/convex/packages/backend/convex/README.md +4 -4
  23. package/templates/backend/convex/packages/backend/convex/convex.config.ts.hbs +17 -0
  24. package/templates/backend/convex/packages/backend/convex/tsconfig.json.hbs +1 -1
  25. package/templates/examples/ai/convex/packages/backend/convex/agent.ts.hbs +9 -0
  26. package/templates/examples/ai/convex/packages/backend/convex/chat.ts.hbs +67 -0
  27. package/templates/examples/ai/native/bare/app/(drawer)/ai.tsx.hbs +301 -3
  28. package/templates/examples/ai/native/unistyles/app/(drawer)/ai.tsx.hbs +296 -10
  29. package/templates/examples/ai/native/uniwind/app/(drawer)/ai.tsx.hbs +180 -1
  30. package/templates/examples/ai/web/react/next/src/app/ai/page.tsx.hbs +172 -9
  31. package/templates/examples/ai/web/react/react-router/src/routes/ai.tsx.hbs +156 -6
  32. package/templates/examples/ai/web/react/tanstack-router/src/routes/ai.tsx.hbs +156 -4
  33. package/templates/examples/ai/web/react/tanstack-start/src/routes/ai.tsx.hbs +159 -6
  34. package/templates/frontend/react/next/package.json.hbs +8 -7
  35. package/templates/frontend/react/next/src/app/layout.tsx.hbs +28 -1
  36. package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +4 -6
  37. package/templates/frontend/react/next/src/components/providers.tsx.hbs +14 -4
  38. package/templates/frontend/react/react-router/package.json.hbs +2 -1
  39. package/templates/frontend/react/{tanstack-router/src/components/mode-toggle.tsx → react-router/src/components/mode-toggle.tsx.hbs} +4 -6
  40. package/templates/frontend/react/tanstack-router/package.json.hbs +2 -1
  41. package/templates/frontend/react/{react-router/src/components/mode-toggle.tsx → tanstack-router/src/components/mode-toggle.tsx.hbs} +4 -6
  42. package/templates/frontend/react/tanstack-start/package.json.hbs +2 -1
  43. package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +6 -0
  44. package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +13 -14
  45. package/templates/frontend/react/tanstack-start/vite.config.ts.hbs +5 -0
  46. package/templates/frontend/react/web-base/components.json +5 -2
  47. package/templates/frontend/react/web-base/src/components/ui/button.tsx.hbs +57 -0
  48. package/templates/frontend/react/web-base/src/components/ui/card.tsx.hbs +103 -0
  49. package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx.hbs +26 -0
  50. package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx.hbs +262 -0
  51. package/templates/frontend/react/web-base/src/components/ui/input.tsx.hbs +20 -0
  52. package/templates/frontend/react/web-base/src/components/ui/label.tsx.hbs +20 -0
  53. package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx.hbs +13 -0
  54. package/templates/frontend/react/web-base/src/components/ui/sonner.tsx.hbs +44 -0
  55. package/templates/frontend/react/web-base/src/index.css.hbs +58 -64
  56. package/templates/auth/better-auth/convex/backend/convex/convex.config.ts.hbs +0 -7
  57. package/templates/examples/ai/web/react/base/src/components/response.tsx.hbs +0 -22
  58. package/templates/frontend/react/web-base/src/components/ui/button.tsx +0 -56
  59. package/templates/frontend/react/web-base/src/components/ui/card.tsx +0 -75
  60. package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +0 -27
  61. package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +0 -228
  62. package/templates/frontend/react/web-base/src/components/ui/input.tsx +0 -21
  63. package/templates/frontend/react/web-base/src/components/ui/label.tsx +0 -19
  64. package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +0 -13
  65. package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +0 -25
  66. /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  67. /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  68. /package/templates/auth/better-auth/web/react/tanstack-router/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  69. /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  70. /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  71. /package/templates/auth/better-auth/web/react/tanstack-start/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  72. /package/templates/auth/better-auth/web/solid/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  73. /package/templates/auth/better-auth/web/solid/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  74. /package/templates/auth/better-auth/web/solid/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  75. /package/templates/frontend/react/react-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
  76. /package/templates/frontend/react/tanstack-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
  77. /package/templates/frontend/react/web-base/src/lib/{utils.ts → utils.ts.hbs} +0 -0
@@ -0,0 +1,26 @@
1
+ import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'
2
+
3
+ import { CheckIcon } from 'lucide-react'
4
+ import { cn } from '@/lib/utils'
5
+
6
+ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
7
+ return (
8
+ <CheckboxPrimitive.Root
9
+ data-slot="checkbox"
10
+ className={cn(
11
+ 'border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-none border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-1 aria-invalid:ring-1 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50',
12
+ className,
13
+ )}
14
+ {...props}
15
+ >
16
+ <CheckboxPrimitive.Indicator
17
+ data-slot="checkbox-indicator"
18
+ className="[&>svg]:size-3.5 grid place-content-center text-current transition-none"
19
+ >
20
+ <CheckIcon />
21
+ </CheckboxPrimitive.Indicator>
22
+ </CheckboxPrimitive.Root>
23
+ )
24
+ }
25
+
26
+ export { Checkbox }
@@ -0,0 +1,262 @@
1
+ import * as React from 'react'
2
+ import { Menu as MenuPrimitive } from '@base-ui/react/menu'
3
+
4
+ import { CheckIcon, ChevronRightIcon } from 'lucide-react'
5
+ import { cn } from '@/lib/utils'
6
+
7
+ function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
8
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
9
+ }
10
+
11
+ function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
12
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
13
+ }
14
+
15
+ function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
16
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
17
+ }
18
+
19
+ function DropdownMenuContent({
20
+ align = 'start',
21
+ alignOffset = 0,
22
+ side = 'bottom',
23
+ sideOffset = 4,
24
+ className,
25
+ ...props
26
+ }: MenuPrimitive.Popup.Props &
27
+ Pick<
28
+ MenuPrimitive.Positioner.Props,
29
+ 'align' | 'alignOffset' | 'side' | 'sideOffset'
30
+ >) {
31
+ return (
32
+ <MenuPrimitive.Portal>
33
+ <MenuPrimitive.Positioner
34
+ className="isolate z-50 outline-none"
35
+ align={align}
36
+ alignOffset={alignOffset}
37
+ side={side}
38
+ sideOffset={sideOffset}
39
+ >
40
+ <MenuPrimitive.Popup
41
+ data-slot="dropdown-menu-content"
42
+ className={cn(
43
+ 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-none shadow-md ring-1 duration-100 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden',
44
+ className,
45
+ )}
46
+ {...props}
47
+ />
48
+ </MenuPrimitive.Positioner>
49
+ </MenuPrimitive.Portal>
50
+ )
51
+ }
52
+
53
+ function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
54
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
55
+ }
56
+
57
+ function DropdownMenuLabel({
58
+ className,
59
+ inset,
60
+ ...props
61
+ }: MenuPrimitive.GroupLabel.Props & {
62
+ inset?: boolean
63
+ }) {
64
+ return (
65
+ <MenuPrimitive.GroupLabel
66
+ data-slot="dropdown-menu-label"
67
+ data-inset={inset}
68
+ className={cn(
69
+ 'text-muted-foreground px-2 py-2 text-xs data-[inset]:pl-8',
70
+ className,
71
+ )}
72
+ {...props}
73
+ />
74
+ )
75
+ }
76
+
77
+ function DropdownMenuItem({
78
+ className,
79
+ inset,
80
+ variant = 'default',
81
+ ...props
82
+ }: MenuPrimitive.Item.Props & {
83
+ inset?: boolean
84
+ variant?: 'default' | 'destructive'
85
+ }) {
86
+ return (
87
+ <MenuPrimitive.Item
88
+ data-slot="dropdown-menu-item"
89
+ data-inset={inset}
90
+ data-variant={variant}
91
+ className={cn(
92
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-2 py-2 text-xs [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
93
+ className,
94
+ )}
95
+ {...props}
96
+ />
97
+ )
98
+ }
99
+
100
+ function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
101
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
102
+ }
103
+
104
+ function DropdownMenuSubTrigger({
105
+ className,
106
+ inset,
107
+ children,
108
+ ...props
109
+ }: MenuPrimitive.SubmenuTrigger.Props & {
110
+ inset?: boolean
111
+ }) {
112
+ return (
113
+ <MenuPrimitive.SubmenuTrigger
114
+ data-slot="dropdown-menu-sub-trigger"
115
+ data-inset={inset}
116
+ className={cn(
117
+ "focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-2 py-2 text-xs [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
118
+ className,
119
+ )}
120
+ {...props}
121
+ >
122
+ {children}
123
+ <ChevronRightIcon className="ml-auto" />
124
+ </MenuPrimitive.SubmenuTrigger>
125
+ )
126
+ }
127
+
128
+ function DropdownMenuSubContent({
129
+ align = 'start',
130
+ alignOffset = -3,
131
+ side = 'right',
132
+ sideOffset = 0,
133
+ className,
134
+ ...props
135
+ }: React.ComponentProps<typeof DropdownMenuContent>) {
136
+ return (
137
+ <DropdownMenuContent
138
+ data-slot="dropdown-menu-sub-content"
139
+ className={cn(
140
+ 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-none shadow-lg ring-1 duration-100 w-auto',
141
+ className,
142
+ )}
143
+ align={align}
144
+ alignOffset={alignOffset}
145
+ side={side}
146
+ sideOffset={sideOffset}
147
+ {...props}
148
+ />
149
+ )
150
+ }
151
+
152
+ function DropdownMenuCheckboxItem({
153
+ className,
154
+ children,
155
+ checked,
156
+ ...props
157
+ }: MenuPrimitive.CheckboxItem.Props) {
158
+ return (
159
+ <MenuPrimitive.CheckboxItem
160
+ data-slot="dropdown-menu-checkbox-item"
161
+ className={cn(
162
+ "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
163
+ className,
164
+ )}
165
+ checked={checked}
166
+ {...props}
167
+ >
168
+ <span
169
+ className="pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none"
170
+ data-slot="dropdown-menu-checkbox-item-indicator"
171
+ >
172
+ <MenuPrimitive.CheckboxItemIndicator>
173
+ <CheckIcon />
174
+ </MenuPrimitive.CheckboxItemIndicator>
175
+ </span>
176
+ {children}
177
+ </MenuPrimitive.CheckboxItem>
178
+ )
179
+ }
180
+
181
+ function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
182
+ return (
183
+ <MenuPrimitive.RadioGroup
184
+ data-slot="dropdown-menu-radio-group"
185
+ {...props}
186
+ />
187
+ )
188
+ }
189
+
190
+ function DropdownMenuRadioItem({
191
+ className,
192
+ children,
193
+ ...props
194
+ }: MenuPrimitive.RadioItem.Props) {
195
+ return (
196
+ <MenuPrimitive.RadioItem
197
+ data-slot="dropdown-menu-radio-item"
198
+ className={cn(
199
+ "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
200
+ className,
201
+ )}
202
+ {...props}
203
+ >
204
+ <span
205
+ className="pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none"
206
+ data-slot="dropdown-menu-radio-item-indicator"
207
+ >
208
+ <MenuPrimitive.RadioItemIndicator>
209
+ <CheckIcon />
210
+ </MenuPrimitive.RadioItemIndicator>
211
+ </span>
212
+ {children}
213
+ </MenuPrimitive.RadioItem>
214
+ )
215
+ }
216
+
217
+ function DropdownMenuSeparator({
218
+ className,
219
+ ...props
220
+ }: MenuPrimitive.Separator.Props) {
221
+ return (
222
+ <MenuPrimitive.Separator
223
+ data-slot="dropdown-menu-separator"
224
+ className={cn('bg-border -mx-1 h-px', className)}
225
+ {...props}
226
+ />
227
+ )
228
+ }
229
+
230
+ function DropdownMenuShortcut({
231
+ className,
232
+ ...props
233
+ }: React.ComponentProps<'span'>) {
234
+ return (
235
+ <span
236
+ data-slot="dropdown-menu-shortcut"
237
+ className={cn(
238
+ 'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',
239
+ className,
240
+ )}
241
+ {...props}
242
+ />
243
+ )
244
+ }
245
+
246
+ export {
247
+ DropdownMenu,
248
+ DropdownMenuPortal,
249
+ DropdownMenuTrigger,
250
+ DropdownMenuContent,
251
+ DropdownMenuGroup,
252
+ DropdownMenuLabel,
253
+ DropdownMenuItem,
254
+ DropdownMenuCheckboxItem,
255
+ DropdownMenuRadioGroup,
256
+ DropdownMenuRadioItem,
257
+ DropdownMenuSeparator,
258
+ DropdownMenuShortcut,
259
+ DropdownMenuSub,
260
+ DropdownMenuSubTrigger,
261
+ DropdownMenuSubContent,
262
+ }
@@ -0,0 +1,20 @@
1
+ import * as React from 'react'
2
+ import { Input as InputPrimitive } from '@base-ui/react/input'
3
+
4
+ import { cn } from '@/lib/utils'
5
+
6
+ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
7
+ return (
8
+ <InputPrimitive
9
+ type={type}
10
+ data-slot="input"
11
+ className={cn(
12
+ 'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
13
+ className,
14
+ )}
15
+ {...props}
16
+ />
17
+ )
18
+ }
19
+
20
+ export { Input }
@@ -0,0 +1,20 @@
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+
5
+ import { cn } from '@/lib/utils'
6
+
7
+ function Label({ className, ...props }: React.ComponentProps<'label'>) {
8
+ return (
9
+ <label
10
+ data-slot="label"
11
+ className={cn(
12
+ 'gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed',
13
+ className,
14
+ )}
15
+ {...props}
16
+ />
17
+ )
18
+ }
19
+
20
+ export { Label }
@@ -0,0 +1,13 @@
1
+ import { cn } from '@/lib/utils'
2
+
3
+ function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {
4
+ return (
5
+ <div
6
+ data-slot="skeleton"
7
+ className={cn('bg-muted rounded-none animate-pulse', className)}
8
+ {...props}
9
+ />
10
+ )
11
+ }
12
+
13
+ export { Skeleton }
@@ -0,0 +1,44 @@
1
+ import { useTheme } from 'next-themes'
2
+ import { Toaster as Sonner } from 'sonner'
3
+ import {
4
+ CircleCheckIcon,
5
+ InfoIcon,
6
+ Loader2Icon,
7
+ OctagonXIcon,
8
+ TriangleAlertIcon,
9
+ } from 'lucide-react'
10
+ import type {ToasterProps} from 'sonner';
11
+
12
+ const Toaster = ({ ...props }: ToasterProps) => {
13
+ const { theme = 'system' } = useTheme()
14
+
15
+ return (
16
+ <Sonner
17
+ theme={theme as ToasterProps['theme']}
18
+ className="toaster group"
19
+ icons=\{{
20
+ success: <CircleCheckIcon className="size-4" />,
21
+ info: <InfoIcon className="size-4" />,
22
+ warning: <TriangleAlertIcon className="size-4" />,
23
+ error: <OctagonXIcon className="size-4" />,
24
+ loading: <Loader2Icon className="size-4 animate-spin" />,
25
+ }}
26
+ style={
27
+ {
28
+ '--normal-bg': 'var(--popover)',
29
+ '--normal-text': 'var(--popover-foreground)',
30
+ '--normal-border': 'var(--border)',
31
+ '--border-radius': 'var(--radius)',
32
+ } as React.CSSProperties
33
+ }
34
+ toastOptions=\{{
35
+ classNames: {
36
+ toast: 'cn-toast',
37
+ },
38
+ }}
39
+ {...props}
40
+ />
41
+ )
42
+ }
43
+
44
+ export { Toaster }
@@ -1,27 +1,13 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
1
+ @import 'tailwindcss';
2
+ @import 'tw-animate-css';
3
+ @import 'shadcn/tailwind.css';
3
4
  {{#if (includes examples "ai")}}
4
- @source "../node_modules/streamdown/dist/index.js";
5
+ @source "../node_modules/streamdown/dist/*.js";
5
6
  {{/if}}
6
7
 
7
- @custom-variant dark (&:where(.dark, .dark *));
8
-
9
- @theme {
10
- --font-sans: "Inter", "Geist", ui-sans-serif, system-ui, sans-serif,
11
- "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
12
- }
13
-
14
- html,
15
- body {
16
- @apply bg-white dark:bg-gray-950;
17
-
18
- @media (prefers-color-scheme: dark) {
19
- color-scheme: dark;
20
- }
21
- }
8
+ @custom-variant dark (&:is(.dark *));
22
9
 
23
10
  :root {
24
- --radius: 0.625rem;
25
11
  --background: oklch(1 0 0);
26
12
  --foreground: oklch(0.145 0 0);
27
13
  --card: oklch(1 0 0);
@@ -36,15 +22,16 @@ body {
36
22
  --muted-foreground: oklch(0.556 0 0);
37
23
  --accent: oklch(0.97 0 0);
38
24
  --accent-foreground: oklch(0.205 0 0);
39
- --destructive: oklch(0.577 0.245 27.325);
25
+ --destructive: oklch(0.58 0.22 27);
40
26
  --border: oklch(0.922 0 0);
41
27
  --input: oklch(0.922 0 0);
42
28
  --ring: oklch(0.708 0 0);
43
- --chart-1: oklch(0.646 0.222 41.116);
44
- --chart-2: oklch(0.6 0.118 184.704);
45
- --chart-3: oklch(0.398 0.07 227.392);
46
- --chart-4: oklch(0.828 0.189 84.429);
47
- --chart-5: oklch(0.769 0.188 70.08);
29
+ --chart-1: oklch(0.809 0.105 251.813);
30
+ --chart-2: oklch(0.623 0.214 259.815);
31
+ --chart-3: oklch(0.546 0.245 262.881);
32
+ --chart-4: oklch(0.488 0.243 264.376);
33
+ --chart-5: oklch(0.424 0.199 265.638);
34
+ --radius: 0.625rem;
48
35
  --sidebar: oklch(0.985 0 0);
49
36
  --sidebar-foreground: oklch(0.145 0 0);
50
37
  --sidebar-primary: oklch(0.205 0 0);
@@ -62,23 +49,23 @@ body {
62
49
  --card-foreground: oklch(0.985 0 0);
63
50
  --popover: oklch(0.205 0 0);
64
51
  --popover-foreground: oklch(0.985 0 0);
65
- --primary: oklch(0.922 0 0);
52
+ --primary: oklch(0.87 0 0);
66
53
  --primary-foreground: oklch(0.205 0 0);
67
54
  --secondary: oklch(0.269 0 0);
68
55
  --secondary-foreground: oklch(0.985 0 0);
69
56
  --muted: oklch(0.269 0 0);
70
57
  --muted-foreground: oklch(0.708 0 0);
71
- --accent: oklch(0.269 0 0);
58
+ --accent: oklch(0.371 0 0);
72
59
  --accent-foreground: oklch(0.985 0 0);
73
60
  --destructive: oklch(0.704 0.191 22.216);
74
61
  --border: oklch(1 0 0 / 10%);
75
62
  --input: oklch(1 0 0 / 15%);
76
63
  --ring: oklch(0.556 0 0);
77
- --chart-1: oklch(0.488 0.243 264.376);
78
- --chart-2: oklch(0.696 0.17 162.48);
79
- --chart-3: oklch(0.769 0.188 70.08);
80
- --chart-4: oklch(0.627 0.265 303.9);
81
- --chart-5: oklch(0.645 0.246 16.439);
64
+ --chart-1: oklch(0.809 0.105 251.813);
65
+ --chart-2: oklch(0.623 0.214 259.815);
66
+ --chart-3: oklch(0.546 0.245 262.881);
67
+ --chart-4: oklch(0.488 0.243 264.376);
68
+ --chart-5: oklch(0.424 0.199 265.638);
82
69
  --sidebar: oklch(0.205 0 0);
83
70
  --sidebar-foreground: oklch(0.985 0 0);
84
71
  --sidebar-primary: oklch(0.488 0.243 264.376);
@@ -90,41 +77,45 @@ body {
90
77
  }
91
78
 
92
79
  @theme inline {
80
+ --font-sans: 'Inter Variable', sans-serif;
81
+ --color-sidebar-ring: var(--sidebar-ring);
82
+ --color-sidebar-border: var(--sidebar-border);
83
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
84
+ --color-sidebar-accent: var(--sidebar-accent);
85
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
86
+ --color-sidebar-primary: var(--sidebar-primary);
87
+ --color-sidebar-foreground: var(--sidebar-foreground);
88
+ --color-sidebar: var(--sidebar);
89
+ --color-chart-5: var(--chart-5);
90
+ --color-chart-4: var(--chart-4);
91
+ --color-chart-3: var(--chart-3);
92
+ --color-chart-2: var(--chart-2);
93
+ --color-chart-1: var(--chart-1);
94
+ --color-ring: var(--ring);
95
+ --color-input: var(--input);
96
+ --color-border: var(--border);
97
+ --color-destructive: var(--destructive);
98
+ --color-accent-foreground: var(--accent-foreground);
99
+ --color-accent: var(--accent);
100
+ --color-muted-foreground: var(--muted-foreground);
101
+ --color-muted: var(--muted);
102
+ --color-secondary-foreground: var(--secondary-foreground);
103
+ --color-secondary: var(--secondary);
104
+ --color-primary-foreground: var(--primary-foreground);
105
+ --color-primary: var(--primary);
106
+ --color-popover-foreground: var(--popover-foreground);
107
+ --color-popover: var(--popover);
108
+ --color-card-foreground: var(--card-foreground);
109
+ --color-card: var(--card);
110
+ --color-foreground: var(--foreground);
111
+ --color-background: var(--background);
93
112
  --radius-sm: calc(var(--radius) - 4px);
94
113
  --radius-md: calc(var(--radius) - 2px);
95
114
  --radius-lg: var(--radius);
96
115
  --radius-xl: calc(var(--radius) + 4px);
97
- --color-background: var(--background);
98
- --color-foreground: var(--foreground);
99
- --color-card: var(--card);
100
- --color-card-foreground: var(--card-foreground);
101
- --color-popover: var(--popover);
102
- --color-popover-foreground: var(--popover-foreground);
103
- --color-primary: var(--primary);
104
- --color-primary-foreground: var(--primary-foreground);
105
- --color-secondary: var(--secondary);
106
- --color-secondary-foreground: var(--secondary-foreground);
107
- --color-muted: var(--muted);
108
- --color-muted-foreground: var(--muted-foreground);
109
- --color-accent: var(--accent);
110
- --color-accent-foreground: var(--accent-foreground);
111
- --color-destructive: var(--destructive);
112
- --color-border: var(--border);
113
- --color-input: var(--input);
114
- --color-ring: var(--ring);
115
- --color-chart-1: var(--chart-1);
116
- --color-chart-2: var(--chart-2);
117
- --color-chart-3: var(--chart-3);
118
- --color-chart-4: var(--chart-4);
119
- --color-chart-5: var(--chart-5);
120
- --color-sidebar: var(--sidebar);
121
- --color-sidebar-foreground: var(--sidebar-foreground);
122
- --color-sidebar-primary: var(--sidebar-primary);
123
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
124
- --color-sidebar-accent: var(--sidebar-accent);
125
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
126
- --color-sidebar-border: var(--sidebar-border);
127
- --color-sidebar-ring: var(--sidebar-ring);
116
+ --radius-2xl: calc(var(--radius) + 8px);
117
+ --radius-3xl: calc(var(--radius) + 12px);
118
+ --radius-4xl: calc(var(--radius) + 16px);
128
119
  }
129
120
 
130
121
  @layer base {
@@ -132,6 +123,9 @@ body {
132
123
  @apply border-border outline-ring/50;
133
124
  }
134
125
  body {
135
- @apply bg-background text-foreground;
126
+ @apply font-sans bg-background text-foreground;
127
+ }
128
+ html {
129
+ @apply font-sans;
136
130
  }
137
131
  }
@@ -1,7 +0,0 @@
1
- import { defineApp } from "convex/server";
2
- import betterAuth from "@convex-dev/better-auth/convex.config";
3
-
4
- const app = defineApp();
5
- app.use(betterAuth);
6
-
7
- export default app;
@@ -1,22 +0,0 @@
1
- "use client";
2
-
3
- import { type ComponentProps, memo } from "react";
4
- import { Streamdown } from "streamdown";
5
- import { cn } from "@/lib/utils";
6
-
7
- type ResponseProps = ComponentProps<typeof Streamdown>;
8
-
9
- export const Response = memo(
10
- ({ className, ...props }: ResponseProps) => (
11
- <Streamdown
12
- className={cn(
13
- "size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
14
- className,
15
- )}
16
- {...props}
17
- />
18
- ),
19
- (prevProps, nextProps) => prevProps.children === nextProps.children,
20
- );
21
-
22
- Response.displayName = "Response";
@@ -1,56 +0,0 @@
1
- import * as React from "react";
2
- import { Slot as SlotPrimitive } from "radix-ui";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const buttonVariants = cva(
8
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
13
- destructive:
14
- "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
15
- outline:
16
- "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
17
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
18
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
19
- link: "text-primary underline-offset-4 hover:underline",
20
- },
21
- size: {
22
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
23
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
24
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
25
- icon: "size-9",
26
- },
27
- },
28
- defaultVariants: {
29
- variant: "default",
30
- size: "default",
31
- },
32
- },
33
- );
34
-
35
- function Button({
36
- className,
37
- variant,
38
- size,
39
- asChild = false,
40
- ...props
41
- }: React.ComponentProps<"button"> &
42
- VariantProps<typeof buttonVariants> & {
43
- asChild?: boolean;
44
- }) {
45
- const Comp = asChild ? SlotPrimitive.Slot : "button";
46
-
47
- return (
48
- <Comp
49
- data-slot="button"
50
- className={cn(buttonVariants({ variant, size, className }))}
51
- {...props}
52
- />
53
- );
54
- }
55
-
56
- export { Button, buttonVariants };