@ai-sdk/devtools 0.0.6 → 0.0.8
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 +8 -3
- package/src/db.ts +242 -0
- package/src/index.ts +1 -0
- package/src/middleware.ts +392 -0
- package/src/viewer/client/app.tsx +2257 -0
- package/src/viewer/client/components/icons.tsx +29 -0
- package/src/viewer/client/components/ui/badge.tsx +46 -0
- package/src/viewer/client/components/ui/button.tsx +60 -0
- package/src/viewer/client/components/ui/card.tsx +92 -0
- package/src/viewer/client/components/ui/collapsible.tsx +31 -0
- package/src/viewer/client/components/ui/drawer.tsx +133 -0
- package/src/viewer/client/components/ui/scroll-area.tsx +58 -0
- package/src/viewer/client/components/ui/tooltip.tsx +58 -0
- package/src/viewer/client/index.html +18 -0
- package/src/viewer/client/lib/utils.ts +6 -0
- package/src/viewer/client/main.tsx +6 -0
- package/src/viewer/client/styles.css +145 -0
- package/src/viewer/server.ts +286 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const AISDKLogo = () => {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
width="55.28888888888889"
|
|
5
|
+
height="16"
|
|
6
|
+
viewBox="0 0 311 90"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
d="M2.97269 86L32.6687 3.64H51.1127L80.8087 86H65.0327L58.1887 66.512H25.5927L18.7487 86H2.97269ZM30.0007 53.636H53.7807L41.9487 18.836L30.0007 53.636ZM130.894 3.64V16.748H117.67V72.892H131.59V86H88.5544V72.892H102.59V16.748H89.2504V3.64H130.894Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
></path>
|
|
14
|
+
<rect
|
|
15
|
+
x="153"
|
|
16
|
+
y="7.5"
|
|
17
|
+
width="154"
|
|
18
|
+
height="75"
|
|
19
|
+
rx="37.5"
|
|
20
|
+
stroke="currentColor"
|
|
21
|
+
strokeWidth="8"
|
|
22
|
+
></rect>
|
|
23
|
+
<path
|
|
24
|
+
d="M183.603 51.8472C184.393 56.468 187.677 59.508 193.088 59.508C197.222 59.508 200.019 57.8664 199.958 54.7048C199.897 51.5432 197.222 49.7192 190.473 48.0776C181.11 45.828 175.091 42.0584 175.091 35.1272C175.091 27.284 181.657 22.3592 191.507 22.3592C201.113 22.3592 207.68 28.2568 208.713 36.9512L199.472 37.4376C198.985 32.8776 195.824 30.02 191.264 30.02C187.251 30.02 184.393 32.0872 184.576 35.2488C184.697 38.8968 188.953 40.1128 193.574 41.268C203.241 43.396 209.382 47.5304 209.382 54.4008C209.382 62.6088 202.147 67.2296 192.845 67.2296C182.326 67.2296 174.909 61.3928 174.301 52.2728L183.603 51.8472ZM226.773 23.332C240.757 23.332 248.601 31.1144 248.601 44.9768C248.601 58.7784 240.879 66.5 227.138 66.5H211.877V23.332H226.773ZM221.119 58.7176H226.773C235.164 58.7176 239.177 54.2792 239.177 44.916C239.177 35.5528 235.164 31.1144 226.773 31.1144H221.119V58.7176ZM250.431 23.332H259.672V42.18L275.359 23.332H286.12L270.252 42.3624L287.093 66.5H276.575L264.172 48.564L259.672 53.7928V66.5H250.431V23.332Z"
|
|
25
|
+
fill="currentColor"
|
|
26
|
+
></path>
|
|
27
|
+
</svg>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
import { cn } from '@/lib/utils';
|
|
6
|
+
|
|
7
|
+
const badgeVariants = cva(
|
|
8
|
+
'inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden',
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
14
|
+
secondary:
|
|
15
|
+
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
|
16
|
+
destructive:
|
|
17
|
+
'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
18
|
+
outline:
|
|
19
|
+
'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: 'default',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
function Badge({
|
|
29
|
+
className,
|
|
30
|
+
variant,
|
|
31
|
+
asChild = false,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<'span'> &
|
|
34
|
+
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
35
|
+
const Comp = asChild ? Slot : 'span';
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Comp
|
|
39
|
+
data-slot="badge"
|
|
40
|
+
className={cn(badgeVariants({ variant }), className)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
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 hover:bg-primary/90',
|
|
13
|
+
destructive:
|
|
14
|
+
'bg-destructive text-white 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:
|
|
18
|
+
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
19
|
+
ghost:
|
|
20
|
+
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
21
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
25
|
+
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
26
|
+
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
27
|
+
icon: 'size-9',
|
|
28
|
+
'icon-sm': 'size-8',
|
|
29
|
+
'icon-lg': 'size-10',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: 'default',
|
|
34
|
+
size: 'default',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
function Button({
|
|
40
|
+
className,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
asChild = false,
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentProps<'button'> &
|
|
46
|
+
VariantProps<typeof buttonVariants> & {
|
|
47
|
+
asChild?: boolean;
|
|
48
|
+
}) {
|
|
49
|
+
const Comp = asChild ? Slot : 'button';
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Comp
|
|
53
|
+
data-slot="button"
|
|
54
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="card"
|
|
9
|
+
className={cn(
|
|
10
|
+
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
data-slot="card-header"
|
|
22
|
+
className={cn(
|
|
23
|
+
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
data-slot="card-title"
|
|
35
|
+
className={cn('leading-none font-semibold', className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
|
|
42
|
+
return (
|
|
43
|
+
<div
|
|
44
|
+
data-slot="card-description"
|
|
45
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
data-slot="card-action"
|
|
55
|
+
className={cn(
|
|
56
|
+
'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
|
|
57
|
+
className,
|
|
58
|
+
)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
data-slot="card-content"
|
|
68
|
+
className={cn('px-6', className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
data-slot="card-footer"
|
|
78
|
+
className={cn('flex items-center px-6 [.border-t]:pt-6', className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
Card,
|
|
86
|
+
CardHeader,
|
|
87
|
+
CardFooter,
|
|
88
|
+
CardTitle,
|
|
89
|
+
CardAction,
|
|
90
|
+
CardDescription,
|
|
91
|
+
CardContent,
|
|
92
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
|
|
3
|
+
function Collapsible({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
6
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function CollapsibleTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
12
|
+
return (
|
|
13
|
+
<CollapsiblePrimitive.CollapsibleTrigger
|
|
14
|
+
data-slot="collapsible-trigger"
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function CollapsibleContent({
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
23
|
+
return (
|
|
24
|
+
<CollapsiblePrimitive.CollapsibleContent
|
|
25
|
+
data-slot="collapsible-content"
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
function Drawer({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
9
|
+
return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function DrawerTrigger({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
15
|
+
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function DrawerPortal({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
21
|
+
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function DrawerClose({
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
27
|
+
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function DrawerOverlay({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
34
|
+
return (
|
|
35
|
+
<DrawerPrimitive.Overlay
|
|
36
|
+
data-slot="drawer-overlay"
|
|
37
|
+
className={cn(
|
|
38
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
|
|
39
|
+
className,
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function DrawerContent({
|
|
47
|
+
className,
|
|
48
|
+
children,
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
51
|
+
return (
|
|
52
|
+
<DrawerPortal data-slot="drawer-portal">
|
|
53
|
+
<DrawerOverlay />
|
|
54
|
+
<DrawerPrimitive.Content
|
|
55
|
+
data-slot="drawer-content"
|
|
56
|
+
className={cn(
|
|
57
|
+
'group/drawer-content bg-background fixed z-50 flex h-auto flex-col',
|
|
58
|
+
'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b',
|
|
59
|
+
'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t',
|
|
60
|
+
'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:border-l',
|
|
61
|
+
'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm',
|
|
62
|
+
className,
|
|
63
|
+
)}
|
|
64
|
+
{...props}
|
|
65
|
+
>
|
|
66
|
+
<div className="bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
67
|
+
{children}
|
|
68
|
+
</DrawerPrimitive.Content>
|
|
69
|
+
</DrawerPortal>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
data-slot="drawer-header"
|
|
77
|
+
className={cn(
|
|
78
|
+
'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',
|
|
79
|
+
className,
|
|
80
|
+
)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
87
|
+
return (
|
|
88
|
+
<div
|
|
89
|
+
data-slot="drawer-footer"
|
|
90
|
+
className={cn('mt-auto flex flex-col gap-2 p-4', className)}
|
|
91
|
+
{...props}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function DrawerTitle({
|
|
97
|
+
className,
|
|
98
|
+
...props
|
|
99
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
100
|
+
return (
|
|
101
|
+
<DrawerPrimitive.Title
|
|
102
|
+
data-slot="drawer-title"
|
|
103
|
+
className={cn('text-foreground font-semibold', className)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function DrawerDescription({
|
|
110
|
+
className,
|
|
111
|
+
...props
|
|
112
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
113
|
+
return (
|
|
114
|
+
<DrawerPrimitive.Description
|
|
115
|
+
data-slot="drawer-description"
|
|
116
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
117
|
+
{...props}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export {
|
|
123
|
+
Drawer,
|
|
124
|
+
DrawerPortal,
|
|
125
|
+
DrawerOverlay,
|
|
126
|
+
DrawerTrigger,
|
|
127
|
+
DrawerClose,
|
|
128
|
+
DrawerContent,
|
|
129
|
+
DrawerHeader,
|
|
130
|
+
DrawerFooter,
|
|
131
|
+
DrawerTitle,
|
|
132
|
+
DrawerDescription,
|
|
133
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
5
|
+
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
function ScrollArea({
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
13
|
+
return (
|
|
14
|
+
<ScrollAreaPrimitive.Root
|
|
15
|
+
data-slot="scroll-area"
|
|
16
|
+
className={cn('relative', className)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<ScrollAreaPrimitive.Viewport
|
|
20
|
+
data-slot="scroll-area-viewport"
|
|
21
|
+
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</ScrollAreaPrimitive.Viewport>
|
|
25
|
+
<ScrollBar />
|
|
26
|
+
<ScrollAreaPrimitive.Corner />
|
|
27
|
+
</ScrollAreaPrimitive.Root>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function ScrollBar({
|
|
32
|
+
className,
|
|
33
|
+
orientation = 'vertical',
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
36
|
+
return (
|
|
37
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
38
|
+
data-slot="scroll-area-scrollbar"
|
|
39
|
+
orientation={orientation}
|
|
40
|
+
className={cn(
|
|
41
|
+
'flex touch-none p-px transition-colors select-none',
|
|
42
|
+
orientation === 'vertical' &&
|
|
43
|
+
'h-full w-2.5 border-l border-l-transparent',
|
|
44
|
+
orientation === 'horizontal' &&
|
|
45
|
+
'h-2.5 flex-col border-t border-t-transparent',
|
|
46
|
+
className,
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
51
|
+
data-slot="scroll-area-thumb"
|
|
52
|
+
className="bg-border relative flex-1 rounded-full"
|
|
53
|
+
/>
|
|
54
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
+
return (
|
|
11
|
+
<TooltipPrimitive.Provider
|
|
12
|
+
data-slot="tooltip-provider"
|
|
13
|
+
delayDuration={delayDuration}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function Tooltip({
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
22
|
+
return (
|
|
23
|
+
<TooltipProvider>
|
|
24
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
+
</TooltipProvider>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function TooltipTrigger({
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
32
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function TooltipContent({
|
|
36
|
+
className,
|
|
37
|
+
sideOffset = 4,
|
|
38
|
+
children,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
41
|
+
return (
|
|
42
|
+
<TooltipPrimitive.Portal>
|
|
43
|
+
<TooltipPrimitive.Content
|
|
44
|
+
data-slot="tooltip-content"
|
|
45
|
+
sideOffset={sideOffset}
|
|
46
|
+
className={cn(
|
|
47
|
+
'bg-background text-foreground border border-border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
|
|
48
|
+
className,
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
>
|
|
52
|
+
{children}
|
|
53
|
+
</TooltipPrimitive.Content>
|
|
54
|
+
</TooltipPrimitive.Portal>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>AI SDK DevTools</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link
|
|
10
|
+
href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600;700&display=swap"
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
/>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="root"></div>
|
|
16
|
+
<script type="module" src="./main.tsx"></script>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--background: oklch(0.145 0 0);
|
|
8
|
+
--foreground: oklch(0.985 0 0);
|
|
9
|
+
--card: oklch(0.17 0 0);
|
|
10
|
+
--card-foreground: oklch(0.985 0 0);
|
|
11
|
+
--popover: oklch(0.145 0 0);
|
|
12
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
13
|
+
--primary: oklch(0.985 0 0);
|
|
14
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
15
|
+
--secondary: oklch(0.269 0 0);
|
|
16
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
17
|
+
--muted: oklch(0.269 0 0);
|
|
18
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
19
|
+
--accent: oklch(0.269 0 0);
|
|
20
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
21
|
+
--destructive: oklch(0.396 0.141 25.723);
|
|
22
|
+
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
23
|
+
--border: oklch(0.269 0 0);
|
|
24
|
+
--input: oklch(0.269 0 0);
|
|
25
|
+
--ring: oklch(0.439 0 0);
|
|
26
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
27
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
28
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
29
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
30
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
31
|
+
--radius: 0.625rem;
|
|
32
|
+
--sidebar: oklch(0.205 0 0);
|
|
33
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
34
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
35
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
37
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
38
|
+
--sidebar-border: oklch(0.269 0 0);
|
|
39
|
+
--sidebar-ring: oklch(0.439 0 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@theme inline {
|
|
43
|
+
--font-sans: "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
44
|
+
Roboto, sans-serif;
|
|
45
|
+
--font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
|
|
46
|
+
Consolas, monospace;
|
|
47
|
+
|
|
48
|
+
--color-background: var(--background);
|
|
49
|
+
--color-foreground: var(--foreground);
|
|
50
|
+
--color-card: var(--card);
|
|
51
|
+
--color-card-foreground: var(--card-foreground);
|
|
52
|
+
--color-popover: var(--popover);
|
|
53
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
54
|
+
--color-primary: var(--primary);
|
|
55
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
56
|
+
--color-secondary: var(--secondary);
|
|
57
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
58
|
+
--color-muted: var(--muted);
|
|
59
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
60
|
+
--color-accent: var(--accent);
|
|
61
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
62
|
+
--color-destructive: var(--destructive);
|
|
63
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
64
|
+
--color-border: var(--border);
|
|
65
|
+
--color-input: var(--input);
|
|
66
|
+
--color-ring: var(--ring);
|
|
67
|
+
--color-chart-1: var(--chart-1);
|
|
68
|
+
--color-chart-2: var(--chart-2);
|
|
69
|
+
--color-chart-3: var(--chart-3);
|
|
70
|
+
--color-chart-4: var(--chart-4);
|
|
71
|
+
--color-chart-5: var(--chart-5);
|
|
72
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
73
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
74
|
+
--radius-lg: var(--radius);
|
|
75
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
76
|
+
--color-sidebar: var(--sidebar);
|
|
77
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
78
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
79
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
80
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
81
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
82
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
83
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
84
|
+
|
|
85
|
+
/* Custom app colors */
|
|
86
|
+
--color-bg-primary: #0a0a0a;
|
|
87
|
+
--color-bg-secondary: #141414;
|
|
88
|
+
--color-bg-tertiary: #1a1a1a;
|
|
89
|
+
--color-bg-hover: #252525;
|
|
90
|
+
--color-text-primary: #fafafa;
|
|
91
|
+
--color-text-secondary: #a1a1a1;
|
|
92
|
+
--color-text-muted: #666666;
|
|
93
|
+
--color-blue: #3b82f6;
|
|
94
|
+
--color-blue-hover: #2563eb;
|
|
95
|
+
--color-success: #22c55e;
|
|
96
|
+
--color-warning: #eab308;
|
|
97
|
+
--color-danger: #ef4444;
|
|
98
|
+
--color-purple: #a855f7;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@layer base {
|
|
102
|
+
* {
|
|
103
|
+
@apply border-border outline-ring/50;
|
|
104
|
+
}
|
|
105
|
+
body {
|
|
106
|
+
@apply bg-background text-foreground;
|
|
107
|
+
font-family: "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
108
|
+
Roboto, sans-serif;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
code,
|
|
112
|
+
pre,
|
|
113
|
+
kbd {
|
|
114
|
+
font-family: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
|
|
115
|
+
Consolas, monospace;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Custom scrollbar styling */
|
|
119
|
+
* {
|
|
120
|
+
scrollbar-width: thin;
|
|
121
|
+
scrollbar-color: var(--border) transparent;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
*::-webkit-scrollbar {
|
|
125
|
+
width: 8px;
|
|
126
|
+
height: 8px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
*::-webkit-scrollbar-track {
|
|
130
|
+
background: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
*::-webkit-scrollbar-thumb {
|
|
134
|
+
background-color: var(--border);
|
|
135
|
+
border-radius: 4px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
139
|
+
background-color: var(--muted-foreground);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
*::-webkit-scrollbar-corner {
|
|
143
|
+
background: transparent;
|
|
144
|
+
}
|
|
145
|
+
}
|