larkup 0.1.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.
- package/.env +2 -0
- package/app/actions/vercel.ts +417 -0
- package/app/api/chat/route.ts +192 -0
- package/app/api/chat/status/route.ts +55 -0
- package/app/api/chat/suggestions/route.ts +115 -0
- package/app/api/config/route.ts +73 -0
- package/app/api/config/test/route.ts +67 -0
- package/app/api/config/test-embedding/route.ts +40 -0
- package/app/api/config/test-llm/route.ts +47 -0
- package/app/api/config/test-provider/route.ts +36 -0
- package/app/api/demo/route.ts +176 -0
- package/app/api/deploy/ssh/route.ts +340 -0
- package/app/api/documents/route.ts +90 -0
- package/app/api/firecrawl/local/route.ts +46 -0
- package/app/api/index/route.ts +113 -0
- package/app/api/jobs/[id]/route.ts +44 -0
- package/app/api/jobs/route.ts +116 -0
- package/app/api/parse-file/route.ts +39 -0
- package/app/api/search/google/route.ts +162 -0
- package/app/api/search/route.ts +29 -0
- package/app/api/server/download/route.ts +112 -0
- package/app/api/server/generate/route.ts +46 -0
- package/app/api/server/local/route.ts +42 -0
- package/app/api/servers/route.ts +137 -0
- package/app/api/vector-stores/install/route.ts +65 -0
- package/app/api/vector-stores/status/route.ts +26 -0
- package/app/chat/page.tsx +15 -0
- package/app/configure/page.tsx +53 -0
- package/app/data/page.tsx +15 -0
- package/app/demo/page.tsx +15 -0
- package/app/favicon.ico +0 -0
- package/app/globals.css +190 -0
- package/app/index-data/page.tsx +15 -0
- package/app/layout.tsx +51 -0
- package/app/page.tsx +34 -0
- package/app/server/page.tsx +22 -0
- package/app/simple/chat/page.tsx +17 -0
- package/app/simple/docs/page.tsx +21 -0
- package/app/simple/layout.tsx +9 -0
- package/app/simple/settings/page.tsx +627 -0
- package/app/template.tsx +16 -0
- package/app/themes.css +733 -0
- package/components/alerts/generic-alert.tsx +74 -0
- package/components/app-sidebar.tsx +187 -0
- package/components/app-topnav.tsx +195 -0
- package/components/chat/chat-settings-modal.tsx +209 -0
- package/components/chat/chat-workspace.tsx +348 -0
- package/components/chat/knowledge-base-result.tsx +97 -0
- package/components/chat/message-item.tsx +103 -0
- package/components/client-layout-wrapper.tsx +182 -0
- package/components/configure/configure-form.tsx +1683 -0
- package/components/configure/store-fields.tsx +152 -0
- package/components/data/corpus-panel.tsx +499 -0
- package/components/data/data-workspace.tsx +272 -0
- package/components/data/firecrawl-notice.tsx +236 -0
- package/components/data/jobs-panel.tsx +485 -0
- package/components/data/paste-panel.tsx +79 -0
- package/components/data/scrape-panel.tsx +964 -0
- package/components/data/upload-panel.tsx +714 -0
- package/components/demo/demo-workspace.tsx +419 -0
- package/components/global-settings.tsx +286 -0
- package/components/index/index-workspace.tsx +482 -0
- package/components/onboarding/simple-setup.tsx +702 -0
- package/components/onboarding/tech-setup.tsx +121 -0
- package/components/onboarding/welcome-screen.tsx +183 -0
- package/components/page-header.tsx +44 -0
- package/components/server/code-viewer.tsx +87 -0
- package/components/server/deploy-button.tsx +1390 -0
- package/components/server/server-workspace.tsx +392 -0
- package/components/simple/sdk-connect-dialog.tsx +201 -0
- package/components/simple/simple-index-button.tsx +83 -0
- package/components/simple/simple-sidebar.tsx +161 -0
- package/components/theme-customizer-provider.tsx +171 -0
- package/components/theme-switcher.tsx +445 -0
- package/components/ui/alert-dialog.tsx +187 -0
- package/components/ui/alert.tsx +76 -0
- package/components/ui/badge.tsx +52 -0
- package/components/ui/button.tsx +59 -0
- package/components/ui/card.tsx +103 -0
- package/components/ui/checkbox.tsx +28 -0
- package/components/ui/collapsible.tsx +21 -0
- package/components/ui/dialog.tsx +159 -0
- package/components/ui/dropdown-menu.tsx +281 -0
- package/components/ui/input.tsx +22 -0
- package/components/ui/label.tsx +20 -0
- package/components/ui/popover.tsx +90 -0
- package/components/ui/progress.tsx +83 -0
- package/components/ui/provider-icon.tsx +94 -0
- package/components/ui/scroll-area.tsx +55 -0
- package/components/ui/select.tsx +248 -0
- package/components/ui/separator.tsx +25 -0
- package/components/ui/sheet.tsx +138 -0
- package/components/ui/skeleton.tsx +13 -0
- package/components/ui/sonner.tsx +63 -0
- package/components/ui/switch.tsx +32 -0
- package/components/ui/table.tsx +116 -0
- package/components/ui/tabs.tsx +84 -0
- package/components/ui/textarea.tsx +18 -0
- package/components/ui/tooltip.tsx +66 -0
- package/components/workspace/delete-server-dialog.tsx +71 -0
- package/components/workspace/server-form-dialog.tsx +103 -0
- package/components/workspace/server-switcher.tsx +163 -0
- package/components/workspace/workspace-provider.tsx +177 -0
- package/components/workspace/workspace-top-bar.tsx +23 -0
- package/components.json +21 -0
- package/lib/error-formatter.ts +15 -0
- package/lib/utils.ts +6 -0
- package/next-env.d.ts +6 -0
- package/next.config.mjs +18 -0
- package/package.json +65 -0
- package/postcss.config.mjs +8 -0
- package/public/docker.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/github.svg +3 -0
- package/public/hetzner.svg +1 -0
- package/public/icons/aws.svg +38 -0
- package/public/icons/azure.svg +1 -0
- package/public/icons/chroma.png +0 -0
- package/public/icons/cohere.svg +30 -0
- package/public/icons/digital-ocean.webp +0 -0
- package/public/icons/firecrawl2.png +0 -0
- package/public/icons/gcp.svg +1 -0
- package/public/icons/gemini.svg +1 -0
- package/public/icons/jina.svg +1 -0
- package/public/icons/lancedb2.png +0 -0
- package/public/icons/mistral.svg +469 -0
- package/public/icons/nomic.png +0 -0
- package/public/icons/openai.svg +1 -0
- package/public/icons/pgvector2.png +0 -0
- package/public/icons/pinecone.png +0 -0
- package/public/icons/qdrant.svg +35 -0
- package/public/icons/supabase.png +0 -0
- package/public/icons/vercel copy.svg +1 -0
- package/public/icons/vercel.svg +1 -0
- package/public/icons/voyage-light.png +0 -0
- package/public/icons/weaviate.webp +0 -0
- package/public/logo-light.png +0 -0
- package/public/logo.png +0 -0
- package/public/logo9.png +0 -0
- package/public/vercel.svg +1 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
8
|
+
|
|
9
|
+
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
10
|
+
return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
|
|
14
|
+
return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
|
|
18
|
+
return (
|
|
19
|
+
<MenuPrimitive.Trigger
|
|
20
|
+
data-slot="dropdown-menu-trigger"
|
|
21
|
+
{...props}
|
|
22
|
+
className={cn("cursor-pointer", props.className)}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function DropdownMenuContent({
|
|
28
|
+
align = "start",
|
|
29
|
+
alignOffset = 0,
|
|
30
|
+
side = "bottom",
|
|
31
|
+
sideOffset = 4,
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: MenuPrimitive.Popup.Props &
|
|
35
|
+
Pick<
|
|
36
|
+
MenuPrimitive.Positioner.Props,
|
|
37
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
38
|
+
>) {
|
|
39
|
+
return (
|
|
40
|
+
<MenuPrimitive.Portal>
|
|
41
|
+
<MenuPrimitive.Positioner
|
|
42
|
+
className="isolate z-50 outline-none"
|
|
43
|
+
align={align}
|
|
44
|
+
alignOffset={alignOffset}
|
|
45
|
+
side={side}
|
|
46
|
+
sideOffset={sideOffset}
|
|
47
|
+
>
|
|
48
|
+
<MenuPrimitive.Popup
|
|
49
|
+
data-slot="dropdown-menu-content"
|
|
50
|
+
className={cn(
|
|
51
|
+
"z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
</MenuPrimitive.Positioner>
|
|
57
|
+
</MenuPrimitive.Portal>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
|
|
62
|
+
return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function DropdownMenuLabel({
|
|
66
|
+
className,
|
|
67
|
+
inset,
|
|
68
|
+
...props
|
|
69
|
+
}: MenuPrimitive.GroupLabel.Props & {
|
|
70
|
+
inset?: boolean;
|
|
71
|
+
}) {
|
|
72
|
+
return (
|
|
73
|
+
<MenuPrimitive.GroupLabel
|
|
74
|
+
data-slot="dropdown-menu-label"
|
|
75
|
+
data-inset={inset}
|
|
76
|
+
className={cn(
|
|
77
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
78
|
+
className,
|
|
79
|
+
)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function DropdownMenuItem({
|
|
86
|
+
className,
|
|
87
|
+
inset,
|
|
88
|
+
variant = "default",
|
|
89
|
+
...props
|
|
90
|
+
}: MenuPrimitive.Item.Props & {
|
|
91
|
+
inset?: boolean;
|
|
92
|
+
variant?: "default" | "destructive";
|
|
93
|
+
}) {
|
|
94
|
+
return (
|
|
95
|
+
<MenuPrimitive.Item
|
|
96
|
+
data-slot="dropdown-menu-item"
|
|
97
|
+
data-inset={inset}
|
|
98
|
+
data-variant={variant}
|
|
99
|
+
className={cn(
|
|
100
|
+
"group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1.5 text-sm outline-hidden select-none not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
101
|
+
" hover:bg-background ",
|
|
102
|
+
className,
|
|
103
|
+
)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
|
|
110
|
+
return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function DropdownMenuSubTrigger({
|
|
114
|
+
className,
|
|
115
|
+
inset,
|
|
116
|
+
children,
|
|
117
|
+
...props
|
|
118
|
+
}: MenuPrimitive.SubmenuTrigger.Props & {
|
|
119
|
+
inset?: boolean;
|
|
120
|
+
}) {
|
|
121
|
+
return (
|
|
122
|
+
<MenuPrimitive.SubmenuTrigger
|
|
123
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
124
|
+
data-inset={inset}
|
|
125
|
+
className={cn(
|
|
126
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
127
|
+
"h-8",
|
|
128
|
+
className,
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
<ChevronRightIcon className="ml-auto" />
|
|
134
|
+
</MenuPrimitive.SubmenuTrigger>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function DropdownMenuSubContent({
|
|
139
|
+
align = "start",
|
|
140
|
+
alignOffset = -3,
|
|
141
|
+
side = "right",
|
|
142
|
+
sideOffset = 0,
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
146
|
+
return (
|
|
147
|
+
<DropdownMenuContent
|
|
148
|
+
data-slot="dropdown-menu-sub-content"
|
|
149
|
+
className={cn(
|
|
150
|
+
"w-auto min-w-[196px]! rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
151
|
+
"",
|
|
152
|
+
className,
|
|
153
|
+
)}
|
|
154
|
+
align={align}
|
|
155
|
+
alignOffset={alignOffset}
|
|
156
|
+
side={side}
|
|
157
|
+
sideOffset={sideOffset}
|
|
158
|
+
{...props}
|
|
159
|
+
/>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function DropdownMenuCheckboxItem({
|
|
164
|
+
className,
|
|
165
|
+
children,
|
|
166
|
+
checked,
|
|
167
|
+
inset,
|
|
168
|
+
...props
|
|
169
|
+
}: MenuPrimitive.CheckboxItem.Props & {
|
|
170
|
+
inset?: boolean;
|
|
171
|
+
}) {
|
|
172
|
+
return (
|
|
173
|
+
<MenuPrimitive.CheckboxItem
|
|
174
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
175
|
+
data-inset={inset}
|
|
176
|
+
className={cn(
|
|
177
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
178
|
+
className,
|
|
179
|
+
)}
|
|
180
|
+
checked={checked}
|
|
181
|
+
{...props}
|
|
182
|
+
>
|
|
183
|
+
<span
|
|
184
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
185
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
186
|
+
>
|
|
187
|
+
<MenuPrimitive.CheckboxItemIndicator>
|
|
188
|
+
<CheckIcon />
|
|
189
|
+
</MenuPrimitive.CheckboxItemIndicator>
|
|
190
|
+
</span>
|
|
191
|
+
{children}
|
|
192
|
+
</MenuPrimitive.CheckboxItem>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
|
|
197
|
+
return (
|
|
198
|
+
<MenuPrimitive.RadioGroup
|
|
199
|
+
data-slot="dropdown-menu-radio-group"
|
|
200
|
+
{...props}
|
|
201
|
+
/>
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function DropdownMenuRadioItem({
|
|
206
|
+
className,
|
|
207
|
+
children,
|
|
208
|
+
inset,
|
|
209
|
+
...props
|
|
210
|
+
}: MenuPrimitive.RadioItem.Props & {
|
|
211
|
+
inset?: boolean;
|
|
212
|
+
}) {
|
|
213
|
+
return (
|
|
214
|
+
<MenuPrimitive.RadioItem
|
|
215
|
+
data-slot="dropdown-menu-radio-item"
|
|
216
|
+
data-inset={inset}
|
|
217
|
+
className={cn(
|
|
218
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
219
|
+
className,
|
|
220
|
+
)}
|
|
221
|
+
{...props}
|
|
222
|
+
>
|
|
223
|
+
<span
|
|
224
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
225
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
226
|
+
>
|
|
227
|
+
<MenuPrimitive.RadioItemIndicator>
|
|
228
|
+
<CheckIcon />
|
|
229
|
+
</MenuPrimitive.RadioItemIndicator>
|
|
230
|
+
</span>
|
|
231
|
+
{children}
|
|
232
|
+
</MenuPrimitive.RadioItem>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function DropdownMenuSeparator({
|
|
237
|
+
className,
|
|
238
|
+
...props
|
|
239
|
+
}: MenuPrimitive.Separator.Props) {
|
|
240
|
+
return (
|
|
241
|
+
<MenuPrimitive.Separator
|
|
242
|
+
data-slot="dropdown-menu-separator"
|
|
243
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
244
|
+
{...props}
|
|
245
|
+
/>
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function DropdownMenuShortcut({
|
|
250
|
+
className,
|
|
251
|
+
...props
|
|
252
|
+
}: React.ComponentProps<"span">) {
|
|
253
|
+
return (
|
|
254
|
+
<span
|
|
255
|
+
data-slot="dropdown-menu-shortcut"
|
|
256
|
+
className={cn(
|
|
257
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
258
|
+
className,
|
|
259
|
+
)}
|
|
260
|
+
{...props}
|
|
261
|
+
/>
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export {
|
|
266
|
+
DropdownMenu,
|
|
267
|
+
DropdownMenuPortal,
|
|
268
|
+
DropdownMenuTrigger,
|
|
269
|
+
DropdownMenuContent,
|
|
270
|
+
DropdownMenuGroup,
|
|
271
|
+
DropdownMenuLabel,
|
|
272
|
+
DropdownMenuItem,
|
|
273
|
+
DropdownMenuCheckboxItem,
|
|
274
|
+
DropdownMenuRadioGroup,
|
|
275
|
+
DropdownMenuRadioItem,
|
|
276
|
+
DropdownMenuSeparator,
|
|
277
|
+
DropdownMenuShortcut,
|
|
278
|
+
DropdownMenuSub,
|
|
279
|
+
DropdownMenuSubTrigger,
|
|
280
|
+
DropdownMenuSubContent,
|
|
281
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
"h-9 w-full min-w-0 rounded-lg border border-input bg-white px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
13
|
+
|
|
14
|
+
"placeholder:text-black/35! placeholder:text-[13px]",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
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
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Label }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
9
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
13
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function PopoverContent({
|
|
17
|
+
className,
|
|
18
|
+
align = "center",
|
|
19
|
+
alignOffset = 0,
|
|
20
|
+
side = "bottom",
|
|
21
|
+
sideOffset = 4,
|
|
22
|
+
...props
|
|
23
|
+
}: PopoverPrimitive.Popup.Props &
|
|
24
|
+
Pick<
|
|
25
|
+
PopoverPrimitive.Positioner.Props,
|
|
26
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
27
|
+
>) {
|
|
28
|
+
return (
|
|
29
|
+
<PopoverPrimitive.Portal>
|
|
30
|
+
<PopoverPrimitive.Positioner
|
|
31
|
+
align={align}
|
|
32
|
+
alignOffset={alignOffset}
|
|
33
|
+
side={side}
|
|
34
|
+
sideOffset={sideOffset}
|
|
35
|
+
className="isolate z-50"
|
|
36
|
+
>
|
|
37
|
+
<PopoverPrimitive.Popup
|
|
38
|
+
data-slot="popover-content"
|
|
39
|
+
className={cn(
|
|
40
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
</PopoverPrimitive.Positioner>
|
|
46
|
+
</PopoverPrimitive.Portal>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
51
|
+
return (
|
|
52
|
+
<div
|
|
53
|
+
data-slot="popover-header"
|
|
54
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
61
|
+
return (
|
|
62
|
+
<PopoverPrimitive.Title
|
|
63
|
+
data-slot="popover-title"
|
|
64
|
+
className={cn("font-medium", className)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function PopoverDescription({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: PopoverPrimitive.Description.Props) {
|
|
74
|
+
return (
|
|
75
|
+
<PopoverPrimitive.Description
|
|
76
|
+
data-slot="popover-description"
|
|
77
|
+
className={cn("text-muted-foreground", className)}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
Popover,
|
|
85
|
+
PopoverContent,
|
|
86
|
+
PopoverDescription,
|
|
87
|
+
PopoverHeader,
|
|
88
|
+
PopoverTitle,
|
|
89
|
+
PopoverTrigger,
|
|
90
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
function Progress({
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
value,
|
|
11
|
+
...props
|
|
12
|
+
}: ProgressPrimitive.Root.Props) {
|
|
13
|
+
return (
|
|
14
|
+
<ProgressPrimitive.Root
|
|
15
|
+
value={value}
|
|
16
|
+
data-slot="progress"
|
|
17
|
+
className={cn("flex flex-wrap gap-3", className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
<ProgressTrack>
|
|
22
|
+
<ProgressIndicator />
|
|
23
|
+
</ProgressTrack>
|
|
24
|
+
</ProgressPrimitive.Root>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
29
|
+
return (
|
|
30
|
+
<ProgressPrimitive.Track
|
|
31
|
+
className={cn(
|
|
32
|
+
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
33
|
+
className
|
|
34
|
+
)}
|
|
35
|
+
data-slot="progress-track"
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function ProgressIndicator({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}: ProgressPrimitive.Indicator.Props) {
|
|
45
|
+
return (
|
|
46
|
+
<ProgressPrimitive.Indicator
|
|
47
|
+
data-slot="progress-indicator"
|
|
48
|
+
className={cn("h-full bg-primary transition-all", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
55
|
+
return (
|
|
56
|
+
<ProgressPrimitive.Label
|
|
57
|
+
className={cn("text-sm font-medium", className)}
|
|
58
|
+
data-slot="progress-label"
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
65
|
+
return (
|
|
66
|
+
<ProgressPrimitive.Value
|
|
67
|
+
className={cn(
|
|
68
|
+
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
69
|
+
className
|
|
70
|
+
)}
|
|
71
|
+
data-slot="progress-value"
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
Progress,
|
|
79
|
+
ProgressTrack,
|
|
80
|
+
ProgressIndicator,
|
|
81
|
+
ProgressLabel,
|
|
82
|
+
ProgressValue,
|
|
83
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
import { EmbeddingProvider } from "@larkup/core/types";
|
|
3
|
+
|
|
4
|
+
export type ProviderMeta = {
|
|
5
|
+
label: string;
|
|
6
|
+
iconSrc: string;
|
|
7
|
+
pillBg: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const PROVIDER_META: Record<EmbeddingProvider, ProviderMeta> = {
|
|
11
|
+
openai: {
|
|
12
|
+
label: "OpenAI",
|
|
13
|
+
iconSrc: "/icons/openai.svg",
|
|
14
|
+
pillBg: "bg-neutral-100 dark:bg-neutral-800",
|
|
15
|
+
},
|
|
16
|
+
google: {
|
|
17
|
+
label: "Google",
|
|
18
|
+
iconSrc: "/icons/gemini.svg",
|
|
19
|
+
pillBg: "bg-blue-50 dark:bg-blue-950/40",
|
|
20
|
+
},
|
|
21
|
+
cohere: {
|
|
22
|
+
label: "Cohere",
|
|
23
|
+
iconSrc: "/icons/cohere.svg",
|
|
24
|
+
pillBg: "bg-orange-50 dark:bg-orange-950/40",
|
|
25
|
+
},
|
|
26
|
+
voyage: {
|
|
27
|
+
label: "Voyage AI",
|
|
28
|
+
iconSrc: "/icons/voyage-light.png",
|
|
29
|
+
pillBg: "bg-slate-100 dark:bg-slate-800",
|
|
30
|
+
},
|
|
31
|
+
mistral: {
|
|
32
|
+
label: "Mistral",
|
|
33
|
+
iconSrc: "/icons/mistral.svg",
|
|
34
|
+
pillBg: "bg-amber-50 dark:bg-amber-950/40",
|
|
35
|
+
},
|
|
36
|
+
jina: {
|
|
37
|
+
label: "Jina AI",
|
|
38
|
+
iconSrc: "/icons/jina.svg",
|
|
39
|
+
pillBg: "bg-rose-50 dark:bg-rose-950/40",
|
|
40
|
+
},
|
|
41
|
+
nomic: {
|
|
42
|
+
label: "Nomic",
|
|
43
|
+
iconSrc: "/icons/nomic.png",
|
|
44
|
+
pillBg: "bg-teal-50 dark:bg-teal-950/40",
|
|
45
|
+
},
|
|
46
|
+
custom: {
|
|
47
|
+
label: "Custom",
|
|
48
|
+
iconSrc: "/logo.png",
|
|
49
|
+
pillBg: "bg-slate-100 dark:bg-slate-800",
|
|
50
|
+
},
|
|
51
|
+
vercel_ai_gateway: {
|
|
52
|
+
label: "Vercel AI Gateway",
|
|
53
|
+
iconSrc: "/icons/vercel.svg",
|
|
54
|
+
pillBg: "bg-white dark:bg-white text-white dark:text-black",
|
|
55
|
+
},
|
|
56
|
+
deepseek: {
|
|
57
|
+
label: "DeepSeek",
|
|
58
|
+
iconSrc: "/logo.png", // Replace with DeepSeek icon if available
|
|
59
|
+
pillBg: "bg-blue-50 dark:bg-blue-950/40",
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export function ProviderIcon({
|
|
64
|
+
src,
|
|
65
|
+
alt,
|
|
66
|
+
pillBg,
|
|
67
|
+
size = 20,
|
|
68
|
+
}: {
|
|
69
|
+
src: string;
|
|
70
|
+
alt: string;
|
|
71
|
+
pillBg: string;
|
|
72
|
+
size?: number;
|
|
73
|
+
}) {
|
|
74
|
+
return (
|
|
75
|
+
<span
|
|
76
|
+
className={cn(
|
|
77
|
+
"inline-flex shrink-0 items-center justify-center rounded",
|
|
78
|
+
pillBg,
|
|
79
|
+
)}
|
|
80
|
+
style={{ width: size, height: size }}
|
|
81
|
+
>
|
|
82
|
+
{src ? (
|
|
83
|
+
<img
|
|
84
|
+
src={src}
|
|
85
|
+
alt={alt}
|
|
86
|
+
width={size - 4}
|
|
87
|
+
height={size - 4}
|
|
88
|
+
className="object-contain"
|
|
89
|
+
style={{ maxWidth: size - 4, maxHeight: size - 4 }}
|
|
90
|
+
/>
|
|
91
|
+
) : null}
|
|
92
|
+
</span>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
function ScrollArea({
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}: ScrollAreaPrimitive.Root.Props) {
|
|
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="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
|
+
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
36
|
+
return (
|
|
37
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
38
|
+
data-slot="scroll-area-scrollbar"
|
|
39
|
+
data-orientation={orientation}
|
|
40
|
+
orientation={orientation}
|
|
41
|
+
className={cn(
|
|
42
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
43
|
+
className,
|
|
44
|
+
)}
|
|
45
|
+
{...props}
|
|
46
|
+
>
|
|
47
|
+
<ScrollAreaPrimitive.Thumb
|
|
48
|
+
data-slot="scroll-area-thumb"
|
|
49
|
+
className="relative flex-1 rounded-full bg-border"
|
|
50
|
+
/>
|
|
51
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { ScrollArea, ScrollBar };
|