@jrkropp/codex-js 0.1.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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/NOTICE +29 -0
- package/README.md +659 -0
- package/dist/DynamicToolCallResponse-D2OVpa4p.d.ts +8 -0
- package/dist/ToolRequestUserInputResponse-Bxjlpgho.d.ts +17 -0
- package/dist/chat-runtime-CMli5dzJ.d.ts +748 -0
- package/dist/chunk-FFASNDXU.js +9383 -0
- package/dist/chunk-FFASNDXU.js.map +1 -0
- package/dist/chunk-FN3SWHRH.js +934 -0
- package/dist/chunk-FN3SWHRH.js.map +1 -0
- package/dist/chunk-TZBLUZ2X.js +18640 -0
- package/dist/chunk-TZBLUZ2X.js.map +1 -0
- package/dist/chunk-ZX5OIIJX.js +3 -0
- package/dist/chunk-ZX5OIIJX.js.map +1 -0
- package/dist/client/index.d.ts +111 -0
- package/dist/client/index.js +4 -0
- package/dist/client/index.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.d.ts +74 -0
- package/dist/react/index.js +5 -0
- package/dist/react/index.js.map +1 -0
- package/dist/remote-DMPfepa9.d.ts +19 -0
- package/dist/server/index.d.ts +1999 -0
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -0
- package/dist/session-BO6EZNK7.d.ts +1829 -0
- package/dist/shadcn/index.d.ts +68 -0
- package/dist/shadcn/index.js +334 -0
- package/dist/shadcn/index.js.map +1 -0
- package/dist/sidebar-DT2XoitN.d.ts +87 -0
- package/dist/store-H2cQxdpe.d.ts +20 -0
- package/dist/styles.css +1 -0
- package/dist/testing/index.d.ts +91 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/thread_event_store-BIS0qzhi.d.ts +3843 -0
- package/package.json +89 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export { B as Button, I as Input, S as Separator, a as Sidebar, b as SidebarContent, c as SidebarFooter, d as SidebarGroup, e as SidebarGroupAction, f as SidebarGroupContent, g as SidebarGroupLabel, h as SidebarHeader, i as SidebarInput, j as SidebarInset, k as SidebarMenu, l as SidebarMenuAction, m as SidebarMenuBadge, n as SidebarMenuButton, o as SidebarMenuItem, p as SidebarMenuSkeleton, q as SidebarMenuSub, r as SidebarMenuSubButton, s as SidebarMenuSubItem, t as SidebarProvider, u as SidebarRail, v as SidebarSeparator, w as SidebarTrigger, T as Tooltip, x as TooltipContent, y as TooltipProvider, z as TooltipTrigger, A as buttonVariants, C as useSidebar } from '../sidebar-DT2XoitN.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { Collapsible as Collapsible$1, Dialog as Dialog$1, ScrollArea as ScrollArea$1 } from 'radix-ui';
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
|
+
import { Command as Command$1 } from 'cmdk';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
8
|
+
import 'class-variance-authority';
|
|
9
|
+
|
|
10
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Dialog({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DialogPortal({ ...props }: React$1.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DialogClose({ ...props }: React$1.ComponentProps<typeof Dialog$1.Close>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function DialogOverlay({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog$1.Content> & {
|
|
20
|
+
showCloseButton?: boolean;
|
|
21
|
+
}): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DialogHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
24
|
+
showCloseButton?: boolean;
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog> & {
|
|
31
|
+
title?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
showCloseButton?: boolean;
|
|
35
|
+
}): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function CommandInput({ className, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function CommandGroup({ className, ...props }: React$1.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function CommandSeparator({ className, ...props }: React$1.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function CommandItem({ className, children, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
42
|
+
declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare function ScrollArea({ className, children, hideScrollbars, scrollFade, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Root> & {
|
|
45
|
+
hideScrollbars?: boolean;
|
|
46
|
+
scrollFade?: boolean;
|
|
47
|
+
}): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollArea$1.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
declare function Sheet({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
|
|
51
|
+
declare function SheetTrigger({ ...props }: React$1.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
52
|
+
declare function SheetClose({ ...props }: React$1.ComponentProps<typeof Dialog$1.Close>): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog$1.Content> & {
|
|
54
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
55
|
+
showCloseButton?: boolean;
|
|
56
|
+
}): react_jsx_runtime.JSX.Element;
|
|
57
|
+
declare function SheetHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
58
|
+
declare function SheetFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare function SheetTitle({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare function SheetDescription({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
|
|
61
|
+
|
|
62
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
declare function useIsMobile(): boolean;
|
|
65
|
+
|
|
66
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
67
|
+
|
|
68
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, cn, useIsMobile };
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { cn, Button } from '../chunk-FN3SWHRH.js';
|
|
2
|
+
export { Button, Input, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn, useIsMobile, useSidebar } from '../chunk-FN3SWHRH.js';
|
|
3
|
+
import { Collapsible as Collapsible$1, Dialog as Dialog$1 } from 'radix-ui';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
import { Command as Command$1 } from 'cmdk';
|
|
6
|
+
import { XIcon, SearchIcon, CheckIcon } from 'lucide-react';
|
|
7
|
+
|
|
8
|
+
function Collapsible({
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, { "data-slot": "collapsible", ...props });
|
|
12
|
+
}
|
|
13
|
+
function CollapsibleTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
Collapsible$1.CollapsibleTrigger,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "collapsible-trigger",
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function CollapsibleContent({
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
Collapsible$1.CollapsibleContent,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "collapsible-content",
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function Dialog({
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "dialog", ...props });
|
|
39
|
+
}
|
|
40
|
+
function DialogTrigger({
|
|
41
|
+
...props
|
|
42
|
+
}) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
44
|
+
}
|
|
45
|
+
function DialogPortal({
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "dialog-portal", ...props });
|
|
49
|
+
}
|
|
50
|
+
function DialogClose({
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", ...props });
|
|
54
|
+
}
|
|
55
|
+
function DialogOverlay({
|
|
56
|
+
className,
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ jsx(
|
|
60
|
+
Dialog$1.Overlay,
|
|
61
|
+
{
|
|
62
|
+
"data-slot": "dialog-overlay",
|
|
63
|
+
className: cn(
|
|
64
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function DialogContent({
|
|
72
|
+
className,
|
|
73
|
+
children,
|
|
74
|
+
showCloseButton = true,
|
|
75
|
+
...props
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
79
|
+
/* @__PURE__ */ jsxs(
|
|
80
|
+
Dialog$1.Content,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "dialog-content",
|
|
83
|
+
className: cn(
|
|
84
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
children,
|
|
90
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs(
|
|
91
|
+
Button,
|
|
92
|
+
{
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
className: "absolute top-2 right-2",
|
|
95
|
+
size: "icon-sm",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx(
|
|
98
|
+
XIcon,
|
|
99
|
+
{}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
) })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
function DialogHeader({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "dialog-header",
|
|
115
|
+
className: cn("flex flex-col gap-2", className),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
function DialogFooter({
|
|
121
|
+
className,
|
|
122
|
+
showCloseButton = false,
|
|
123
|
+
children,
|
|
124
|
+
...props
|
|
125
|
+
}) {
|
|
126
|
+
return /* @__PURE__ */ jsxs(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "dialog-footer",
|
|
130
|
+
className: cn(
|
|
131
|
+
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
|
|
132
|
+
className
|
|
133
|
+
),
|
|
134
|
+
...props,
|
|
135
|
+
children: [
|
|
136
|
+
children,
|
|
137
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Close" }) })
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
function DialogTitle({
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
Dialog$1.Title,
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "dialog-title",
|
|
150
|
+
className: cn(
|
|
151
|
+
"font-heading text-base leading-none font-medium",
|
|
152
|
+
className
|
|
153
|
+
),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function DialogDescription({
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}) {
|
|
162
|
+
return /* @__PURE__ */ jsx(
|
|
163
|
+
Dialog$1.Description,
|
|
164
|
+
{
|
|
165
|
+
"data-slot": "dialog-description",
|
|
166
|
+
className: cn(
|
|
167
|
+
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
...props
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
function Command({
|
|
175
|
+
className,
|
|
176
|
+
...props
|
|
177
|
+
}) {
|
|
178
|
+
return /* @__PURE__ */ jsx(
|
|
179
|
+
Command$1,
|
|
180
|
+
{
|
|
181
|
+
"data-slot": "command",
|
|
182
|
+
className: cn(
|
|
183
|
+
"flex size-full flex-col overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground",
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function CommandDialog({
|
|
191
|
+
title = "Command Palette",
|
|
192
|
+
description = "Search for a command to run...",
|
|
193
|
+
children,
|
|
194
|
+
className,
|
|
195
|
+
showCloseButton = false,
|
|
196
|
+
...props
|
|
197
|
+
}) {
|
|
198
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
199
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
200
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
201
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
202
|
+
] }),
|
|
203
|
+
/* @__PURE__ */ jsx(
|
|
204
|
+
DialogContent,
|
|
205
|
+
{
|
|
206
|
+
className: cn("top-1/3 translate-y-0 overflow-hidden p-0", className),
|
|
207
|
+
showCloseButton,
|
|
208
|
+
children
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
] });
|
|
212
|
+
}
|
|
213
|
+
function CommandInput({
|
|
214
|
+
className,
|
|
215
|
+
...props
|
|
216
|
+
}) {
|
|
217
|
+
return /* @__PURE__ */ jsxs(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
"data-slot": "command-input-wrapper",
|
|
221
|
+
className: "flex h-10 items-center gap-2 border-b px-3",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": "true", className: "size-4 shrink-0 opacity-50" }),
|
|
224
|
+
/* @__PURE__ */ jsx(
|
|
225
|
+
Command$1.Input,
|
|
226
|
+
{
|
|
227
|
+
"data-slot": "command-input",
|
|
228
|
+
className: cn(
|
|
229
|
+
"h-9 w-full bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
230
|
+
className
|
|
231
|
+
),
|
|
232
|
+
...props
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
function CommandList({
|
|
240
|
+
className,
|
|
241
|
+
...props
|
|
242
|
+
}) {
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
Command$1.List,
|
|
245
|
+
{
|
|
246
|
+
"data-slot": "command-list",
|
|
247
|
+
className: cn(
|
|
248
|
+
"max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
249
|
+
className
|
|
250
|
+
),
|
|
251
|
+
...props
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
function CommandEmpty({
|
|
256
|
+
className,
|
|
257
|
+
...props
|
|
258
|
+
}) {
|
|
259
|
+
return /* @__PURE__ */ jsx(
|
|
260
|
+
Command$1.Empty,
|
|
261
|
+
{
|
|
262
|
+
"data-slot": "command-empty",
|
|
263
|
+
className: cn("py-6 text-center text-sm", className),
|
|
264
|
+
...props
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
function CommandGroup({
|
|
269
|
+
className,
|
|
270
|
+
...props
|
|
271
|
+
}) {
|
|
272
|
+
return /* @__PURE__ */ jsx(
|
|
273
|
+
Command$1.Group,
|
|
274
|
+
{
|
|
275
|
+
"data-slot": "command-group",
|
|
276
|
+
className: cn(
|
|
277
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
278
|
+
className
|
|
279
|
+
),
|
|
280
|
+
...props
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function CommandSeparator({
|
|
285
|
+
className,
|
|
286
|
+
...props
|
|
287
|
+
}) {
|
|
288
|
+
return /* @__PURE__ */ jsx(
|
|
289
|
+
Command$1.Separator,
|
|
290
|
+
{
|
|
291
|
+
"data-slot": "command-separator",
|
|
292
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
293
|
+
...props
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
function CommandItem({
|
|
298
|
+
className,
|
|
299
|
+
children,
|
|
300
|
+
...props
|
|
301
|
+
}) {
|
|
302
|
+
return /* @__PURE__ */ jsxs(
|
|
303
|
+
Command$1.Item,
|
|
304
|
+
{
|
|
305
|
+
"data-slot": "command-item",
|
|
306
|
+
className: cn(
|
|
307
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
308
|
+
className
|
|
309
|
+
),
|
|
310
|
+
...props,
|
|
311
|
+
children: [
|
|
312
|
+
children,
|
|
313
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto opacity-0 group-data-[checked=true]/command-item:opacity-100" })
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
function CommandShortcut({
|
|
319
|
+
className,
|
|
320
|
+
...props
|
|
321
|
+
}) {
|
|
322
|
+
return /* @__PURE__ */ jsx(
|
|
323
|
+
"span",
|
|
324
|
+
{
|
|
325
|
+
"data-slot": "command-shortcut",
|
|
326
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
327
|
+
...props
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
333
|
+
//# sourceMappingURL=index.js.map
|
|
334
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shadcn/ui/collapsible.tsx","../../src/shadcn/ui/dialog.tsx","../../src/shadcn/ui/command.tsx"],"names":["CollapsiblePrimitive","jsx","DialogPrimitive","CommandPrimitive","jsxs"],"mappings":";;;;;;;AAEA,SAAS,WAAA,CAAY;AAAA,EACnB,GAAG;AACL,CAAA,EAA2D;AACzD,EAAA,2BAAQA,aAAA,CAAqB,IAAA,EAArB,EAA0B,WAAA,EAAU,aAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACvE;AAEA,SAAS,kBAAA,CAAmB;AAAA,E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SAAA,CAAiB,SAAA;AAAA,IAAjB;AAAA,MACC,WAAA,EAAU,mBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC9C,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY;AAAA,EACnB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAuD;AACrD,EAAA,uBACEC,IAAAA;AAAA,IAACD,SAAA,CAAiB,IAAA;AAAA,IAAjB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,8UAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACDF,GAAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAU,sEAAA,EAAuE;AAAA;AAAA;AAAA,GAC9F;AAEJ;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiC;AAC/B,EAAA,uBACEA,GAAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,uDAAA,EAAyD,SAAS,CAAA;AAAA,MAC/E,GAAG;AAAA;AAAA,GACN;AAEJ","file":"index.js","sourcesContent":["import { Collapsible as CollapsiblePrimitive } from \"radix-ui\"\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n {...props}\n />\n )\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n {...props}\n />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\n\nimport { cn } from \"../lib/utils\"\nimport { Button } from \"./button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { CheckIcon, SearchIcon } from \"lucide-react\"\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"./dialog\"\nimport { cn } from \"../lib/utils\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"flex size-full flex-col overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"top-1/3 translate-y-0 overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-10 items-center gap-2 border-b px-3\"\n >\n <SearchIcon aria-hidden=\"true\" className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"h-9 w-full bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn(\"py-6 text-center text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ml-auto opacity-0 group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n"]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Separator as Separator$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
6
|
+
|
|
7
|
+
declare const buttonVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "link" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
9
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
type SidebarContextProps = {
|
|
25
|
+
state: "expanded" | "collapsed";
|
|
26
|
+
open: boolean;
|
|
27
|
+
setOpen: (open: boolean) => void;
|
|
28
|
+
openMobile: boolean;
|
|
29
|
+
setOpenMobile: (open: boolean) => void;
|
|
30
|
+
isMobile: boolean;
|
|
31
|
+
toggleSidebar: () => void;
|
|
32
|
+
};
|
|
33
|
+
declare function useSidebar(): SidebarContextProps;
|
|
34
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
35
|
+
defaultOpen?: boolean;
|
|
36
|
+
open?: boolean;
|
|
37
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
}): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React.ComponentProps<"div"> & {
|
|
40
|
+
side?: "left" | "right";
|
|
41
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
42
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
43
|
+
}): react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
45
|
+
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
46
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
47
|
+
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
49
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
50
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
51
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
52
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
54
|
+
asChild?: boolean;
|
|
55
|
+
}): react_jsx_runtime.JSX.Element;
|
|
56
|
+
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<"button"> & {
|
|
57
|
+
asChild?: boolean;
|
|
58
|
+
}): react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
62
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
63
|
+
variant?: "default" | "outline" | null | undefined;
|
|
64
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
65
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
66
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
67
|
+
asChild?: boolean;
|
|
68
|
+
isActive?: boolean;
|
|
69
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
70
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<"button"> & {
|
|
72
|
+
asChild?: boolean;
|
|
73
|
+
showOnHover?: boolean;
|
|
74
|
+
}): react_jsx_runtime.JSX.Element;
|
|
75
|
+
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
76
|
+
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
77
|
+
showIcon?: boolean;
|
|
78
|
+
}): react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
81
|
+
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<"a"> & {
|
|
82
|
+
asChild?: boolean;
|
|
83
|
+
size?: "sm" | "md";
|
|
84
|
+
isActive?: boolean;
|
|
85
|
+
}): react_jsx_runtime.JSX.Element;
|
|
86
|
+
|
|
87
|
+
export { buttonVariants as A, Button as B, useSidebar as C, Input as I, Separator as S, Tooltip as T, Sidebar as a, SidebarContent as b, SidebarFooter as c, SidebarGroup as d, SidebarGroupAction as e, SidebarGroupContent as f, SidebarGroupLabel as g, SidebarHeader as h, SidebarInput as i, SidebarInset as j, SidebarMenu as k, SidebarMenuAction as l, SidebarMenuBadge as m, SidebarMenuButton as n, SidebarMenuItem as o, SidebarMenuSkeleton as p, SidebarMenuSub as q, SidebarMenuSubButton as r, SidebarMenuSubItem as s, SidebarProvider as t, SidebarRail as u, SidebarSeparator as v, SidebarTrigger as w, TooltipContent as x, TooltipProvider as y, TooltipTrigger as z };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { C as CreateThreadParams, R as ResumeThreadParams, A as AppendThreadItemsParams, T as ThreadId, L as LoadThreadHistoryParams, b as StoredThreadHistory, c as ReadThreadParams, d as StoredThread, e as ReadThreadByRolloutPathParams, f as ListThreadsParams, g as ThreadPage, U as UpdateThreadMetadataParams, h as ArchiveThreadParams } from './thread_event_store-BIS0qzhi.js';
|
|
2
|
+
|
|
3
|
+
interface ThreadStore {
|
|
4
|
+
createThread(params: CreateThreadParams): Promise<void>;
|
|
5
|
+
resumeThread(params: ResumeThreadParams): Promise<void>;
|
|
6
|
+
appendItems(params: AppendThreadItemsParams): Promise<void>;
|
|
7
|
+
persistThread(threadId: ThreadId): Promise<void>;
|
|
8
|
+
flushThread(threadId: ThreadId): Promise<void>;
|
|
9
|
+
shutdownThread(threadId: ThreadId): Promise<void>;
|
|
10
|
+
discardThread(threadId: ThreadId): Promise<void>;
|
|
11
|
+
loadHistory(params: LoadThreadHistoryParams): Promise<StoredThreadHistory>;
|
|
12
|
+
readThread(params: ReadThreadParams): Promise<StoredThread>;
|
|
13
|
+
readThreadByRolloutPath?(params: ReadThreadByRolloutPathParams): Promise<StoredThread>;
|
|
14
|
+
listThreads(params: ListThreadsParams): Promise<ThreadPage>;
|
|
15
|
+
updateThreadMetadata(params: UpdateThreadMetadataParams): Promise<StoredThread>;
|
|
16
|
+
archiveThread(params: ArchiveThreadParams): Promise<void>;
|
|
17
|
+
unarchiveThread(params: ArchiveThreadParams): Promise<StoredThread>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type { ThreadStore as T };
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source "./";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { T as ThreadId, C as CreateThreadParams, $ as RolloutItem, d as StoredThread, R as ResumeThreadParams, A as AppendThreadItemsParams, L as LoadThreadHistoryParams, b as StoredThreadHistory, c as ReadThreadParams, e as ReadThreadByRolloutPathParams, f as ListThreadsParams, g as ThreadPage, U as UpdateThreadMetadataParams, h as ArchiveThreadParams } from '../thread_event_store-BIS0qzhi.js';
|
|
2
|
+
export { aT as RenderedThreadState, m as ThreadEventSnapshot, n as ThreadEventStore, aU as createRenderedThreadState, aV as renderThreadFromHistory } from '../thread_event_store-BIS0qzhi.js';
|
|
3
|
+
import { T as ThreadStore } from '../store-H2cQxdpe.js';
|
|
4
|
+
|
|
5
|
+
type InMemoryThreadStoreCalls = {
|
|
6
|
+
archiveThread: number;
|
|
7
|
+
appendItems: number;
|
|
8
|
+
createThread: number;
|
|
9
|
+
discardThread: number;
|
|
10
|
+
flushThread: number;
|
|
11
|
+
listThreads: number;
|
|
12
|
+
loadHistory: number;
|
|
13
|
+
persistThread: number;
|
|
14
|
+
readThread: number;
|
|
15
|
+
readThreadByRolloutPath: number;
|
|
16
|
+
resumeThread: number;
|
|
17
|
+
shutdownThread: number;
|
|
18
|
+
unarchiveThread: number;
|
|
19
|
+
updateThreadMetadata: number;
|
|
20
|
+
};
|
|
21
|
+
type InMemoryThreadStoreState = {
|
|
22
|
+
calls: InMemoryThreadStoreCalls;
|
|
23
|
+
createdThreads: Map<ThreadId, CreateThreadParams>;
|
|
24
|
+
histories: Map<ThreadId, RolloutItem[]>;
|
|
25
|
+
rolloutPaths: Map<string, ThreadId>;
|
|
26
|
+
threads: Map<ThreadId, StoredThread>;
|
|
27
|
+
};
|
|
28
|
+
type InMemoryThreadStoreSnapshot = {
|
|
29
|
+
createdThreads: Array<[ThreadId, CreateThreadParams]>;
|
|
30
|
+
histories: Array<[ThreadId, RolloutItem[]]>;
|
|
31
|
+
rolloutPaths: Array<[string, ThreadId]>;
|
|
32
|
+
threads: Array<[ThreadId, StoredThread]>;
|
|
33
|
+
};
|
|
34
|
+
declare class InMemoryThreadStore implements ThreadStore {
|
|
35
|
+
protected readonly state: InMemoryThreadStoreState;
|
|
36
|
+
static forId(id: string): InMemoryThreadStore;
|
|
37
|
+
static removeId(id: string): InMemoryThreadStore | null;
|
|
38
|
+
calls(): InMemoryThreadStoreCalls;
|
|
39
|
+
snapshot(): InMemoryThreadStoreSnapshot;
|
|
40
|
+
restoreSnapshot(snapshot: InMemoryThreadStoreSnapshot): void;
|
|
41
|
+
createThread(params: CreateThreadParams): Promise<void>;
|
|
42
|
+
resumeThread(params: ResumeThreadParams): Promise<void>;
|
|
43
|
+
appendItems(params: AppendThreadItemsParams): Promise<void>;
|
|
44
|
+
persistThread(threadId: ThreadId): Promise<void>;
|
|
45
|
+
flushThread(threadId: ThreadId): Promise<void>;
|
|
46
|
+
shutdownThread(threadId: ThreadId): Promise<void>;
|
|
47
|
+
discardThread(threadId: ThreadId): Promise<void>;
|
|
48
|
+
loadHistory(params: LoadThreadHistoryParams): Promise<StoredThreadHistory>;
|
|
49
|
+
readThread(params: ReadThreadParams): Promise<StoredThread>;
|
|
50
|
+
readThreadByRolloutPath(params: ReadThreadByRolloutPathParams): Promise<StoredThread>;
|
|
51
|
+
listThreads(params: ListThreadsParams): Promise<ThreadPage>;
|
|
52
|
+
updateThreadMetadata(params: UpdateThreadMetadataParams): Promise<StoredThread>;
|
|
53
|
+
archiveThread(params: ArchiveThreadParams): Promise<void>;
|
|
54
|
+
unarchiveThread(params: ArchiveThreadParams): Promise<StoredThread>;
|
|
55
|
+
private history;
|
|
56
|
+
private storedThread;
|
|
57
|
+
private touch;
|
|
58
|
+
private updateThreadTokenUsage;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type LocalThreadStoreConfig = {
|
|
62
|
+
codex_home: string;
|
|
63
|
+
default_model_provider_id: string;
|
|
64
|
+
};
|
|
65
|
+
declare class LocalThreadStore extends InMemoryThreadStore {
|
|
66
|
+
readonly config: LocalThreadStoreConfig;
|
|
67
|
+
constructor(config: LocalThreadStoreConfig);
|
|
68
|
+
stateDb(): null;
|
|
69
|
+
createThread(params: CreateThreadParams): Promise<void>;
|
|
70
|
+
resumeThread(params: ResumeThreadParams): Promise<void>;
|
|
71
|
+
appendItems(params: AppendThreadItemsParams): Promise<void>;
|
|
72
|
+
persistThread(threadId: ThreadId): Promise<void>;
|
|
73
|
+
flushThread(threadId: ThreadId): Promise<void>;
|
|
74
|
+
shutdownThread(threadId: ThreadId): Promise<void>;
|
|
75
|
+
discardThread(threadId: ThreadId): Promise<void>;
|
|
76
|
+
loadHistory(params: LoadThreadHistoryParams): Promise<StoredThreadHistory>;
|
|
77
|
+
readThread(params: ReadThreadParams): Promise<StoredThread>;
|
|
78
|
+
readThreadByRolloutPath(params: ReadThreadByRolloutPathParams): Promise<StoredThread>;
|
|
79
|
+
listThreads(params: ListThreadsParams): Promise<ThreadPage>;
|
|
80
|
+
updateThreadMetadata(params: UpdateThreadMetadataParams): Promise<StoredThread>;
|
|
81
|
+
archiveThread(params: ArchiveThreadParams): Promise<void>;
|
|
82
|
+
unarchiveThread(params: ArchiveThreadParams): Promise<StoredThread>;
|
|
83
|
+
liveRolloutPath(threadId: ThreadId): string;
|
|
84
|
+
private attachRolloutPath;
|
|
85
|
+
private load;
|
|
86
|
+
private save;
|
|
87
|
+
private rolloutPath;
|
|
88
|
+
private storePath;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { InMemoryThreadStore, type InMemoryThreadStoreCalls, LocalThreadStore, type LocalThreadStoreConfig, ThreadStore };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|