@cognite/aura 0.1.1 → 0.1.2
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/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +249 -237
- package/dist/components/ui/core/button/button.d.ts +1 -1
- package/dist/components/ui/core/card/card.d.ts +17 -0
- package/dist/components/ui/core/card/card.js +143 -0
- package/dist/components/ui/core/card/card.metadata.d.ts +8 -0
- package/dist/components/ui/core/card/card.metadata.js +9 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/core/combobox/combobox.d.ts +15 -0
- package/dist/components/ui/core/combobox/combobox.metadata.d.ts +2 -0
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/dialog/dialog.js +49 -50
- package/dist/components/ui/core/helper-text/helper-text.js +1 -1
- package/dist/components/ui/core/inline-citation/inline-citation.js +3 -3
- package/dist/components/ui/core/input-group/input-group.d.ts +1 -1
- package/dist/components/ui/core/message/message.d.ts +1 -1
- package/dist/components/ui/core/message/message.js +5 -9
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +1 -1
- package/dist/components/ui/core/prompt-input/prompt-input.js +18 -18
- package/dist/components/ui/core/reasoning/reasoning.js +4 -1
- package/dist/components/ui/core/sources/sources.js +2 -2
- package/dist/components/ui/core/tool/tool.js +1 -1
- package/dist/index.js +249 -237
- package/dist/styles.css +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import { IconDotsVertical as n } from "@tabler/icons-react";
|
|
4
|
+
import { cn as o } from "../../../../lib/utils.js";
|
|
5
|
+
import { Button as i } from "../button/button.js";
|
|
6
|
+
import { DropdownMenu as l, DropdownMenuTrigger as m, DropdownMenuContent as p } from "../dropdown-menu/dropdown-menu.js";
|
|
7
|
+
const u = d(
|
|
8
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref: t,
|
|
12
|
+
"data-slot": "card",
|
|
13
|
+
className: o(
|
|
14
|
+
"bg-card text-card-foreground flex flex-col rounded-lg hover:bg-accent",
|
|
15
|
+
a
|
|
16
|
+
),
|
|
17
|
+
...r
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
u.displayName = "Card";
|
|
22
|
+
const h = d(
|
|
23
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref: t,
|
|
27
|
+
"data-slot": "card-header",
|
|
28
|
+
className: o(
|
|
29
|
+
"@container/card-header group/card-header grid auto-rows-min items-start gap-1.5 px-4 pt-4 [.border-b]:pb-6",
|
|
30
|
+
"grid-cols-[1fr]",
|
|
31
|
+
"has-data-[slot=card-icon]:grid-cols-[auto_1fr]",
|
|
32
|
+
"has-data-[slot=card-header-right]:grid-cols-[1fr_auto]",
|
|
33
|
+
"has-data-[slot=card-icon]:has-data-[slot=card-header-right]:grid-cols-[auto_1fr_auto]",
|
|
34
|
+
a
|
|
35
|
+
),
|
|
36
|
+
...r
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
h.displayName = "CardHeader";
|
|
41
|
+
const f = d(
|
|
42
|
+
({ className: a, children: r, ...t }, s) => /* @__PURE__ */ e(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: s,
|
|
46
|
+
"data-slot": "card-icon",
|
|
47
|
+
className: o("col-start-1 row-start-1 h-full", a),
|
|
48
|
+
...t,
|
|
49
|
+
children: /* @__PURE__ */ e("div", { className: "flex items-center h-full", children: r })
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
f.displayName = "CardIcon";
|
|
54
|
+
const g = d(({ className: a, as: r = "h3", ...t }, s) => /* @__PURE__ */ e(
|
|
55
|
+
r,
|
|
56
|
+
{
|
|
57
|
+
ref: s,
|
|
58
|
+
"data-slot": "card-title",
|
|
59
|
+
className: o(
|
|
60
|
+
"tracking-tightest text-foreground font-medium text-lg row-start-1",
|
|
61
|
+
"group-has-data-[slot=card-icon]/card-header:col-start-2",
|
|
62
|
+
a
|
|
63
|
+
),
|
|
64
|
+
...t
|
|
65
|
+
}
|
|
66
|
+
));
|
|
67
|
+
g.displayName = "CardTitle";
|
|
68
|
+
const C = d(
|
|
69
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
70
|
+
"p",
|
|
71
|
+
{
|
|
72
|
+
ref: t,
|
|
73
|
+
"data-slot": "card-description",
|
|
74
|
+
className: o(
|
|
75
|
+
"text-muted-foreground text-sm row-start-2",
|
|
76
|
+
"group-has-data-[slot=card-icon]/card-header:col-start-2",
|
|
77
|
+
a
|
|
78
|
+
),
|
|
79
|
+
...r
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
C.displayName = "CardDescription";
|
|
84
|
+
const N = d(
|
|
85
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
ref: t,
|
|
89
|
+
"data-slot": "card-header-right",
|
|
90
|
+
className: o(
|
|
91
|
+
"row-span-2 row-start-1 self-start justify-self-end",
|
|
92
|
+
a
|
|
93
|
+
),
|
|
94
|
+
...r
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
N.displayName = "CardHeaderRight";
|
|
99
|
+
const x = d(({ children: a, align: r = "end", ...t }, s) => /* @__PURE__ */ c(l, { ...t, children: [
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
m,
|
|
102
|
+
{
|
|
103
|
+
render: /* @__PURE__ */ e(i, { variant: "ghost", size: "icon-sm", ref: s, children: /* @__PURE__ */ e(n, {}) })
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ e(p, { align: r, children: a })
|
|
107
|
+
] }));
|
|
108
|
+
x.displayName = "CardActions";
|
|
109
|
+
const w = d(
|
|
110
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
ref: t,
|
|
114
|
+
"data-slot": "card-content",
|
|
115
|
+
className: o("p-4", a),
|
|
116
|
+
...r
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
);
|
|
120
|
+
w.displayName = "CardContent";
|
|
121
|
+
const y = d(
|
|
122
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
ref: t,
|
|
126
|
+
"data-slot": "card-footer",
|
|
127
|
+
className: o("flex px-4 pb-4", a),
|
|
128
|
+
...r
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
);
|
|
132
|
+
y.displayName = "CardFooter";
|
|
133
|
+
export {
|
|
134
|
+
u as Card,
|
|
135
|
+
x as CardActions,
|
|
136
|
+
w as CardContent,
|
|
137
|
+
C as CardDescription,
|
|
138
|
+
y as CardFooter,
|
|
139
|
+
h as CardHeader,
|
|
140
|
+
N as CardHeaderRight,
|
|
141
|
+
f as CardIcon,
|
|
142
|
+
g as CardTitle
|
|
143
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentMeta } from '../../../../lib/types';
|
|
2
|
+
/**
|
|
3
|
+
* Card Component Metadata
|
|
4
|
+
*
|
|
5
|
+
* This metadata is used by the documentation system to generate
|
|
6
|
+
* component documentation pages and provide context for LLMs.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CardMetadata: ComponentMeta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "Card",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A flexible card layout with header, content, action, and footer slots.",
|
|
5
|
+
llmUsage: "Use `<Card>` with `<CardHeader>`, `<CardTitle>`, `<CardDescription>`, `<CardContent>`, and `<CardFooter>` for structured content containers."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as CardMetadata
|
|
9
|
+
};
|
|
@@ -15,7 +15,7 @@ type CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {
|
|
|
15
15
|
};
|
|
16
16
|
declare const CodeBlockCopyButton: import('react').ForwardRefExoticComponent<Omit<CodeBlockCopyButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
17
17
|
declare const CodeBlockCollapseButton: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
18
|
-
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" |
|
|
18
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
19
19
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
20
20
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
21
21
|
export { CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Button } from '../button/button';
|
|
3
|
+
type ComboboxProps = Omit<ComponentProps<typeof Button>, 'value' | 'onChange'> & {
|
|
4
|
+
options: Array<{
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}>;
|
|
8
|
+
value?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
emptyText?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const Combobox: import('react').ForwardRefExoticComponent<Omit<ComboboxProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
15
|
+
export { Combobox };
|
|
@@ -31,7 +31,7 @@ declare const CommandInput: import('react').ForwardRefExoticComponent<Omit<Omit<
|
|
|
31
31
|
ref?: React.Ref<HTMLInputElement>;
|
|
32
32
|
} & {
|
|
33
33
|
asChild?: boolean;
|
|
34
|
-
}, "key" | keyof import('react').InputHTMLAttributes<HTMLInputElement> | "asChild">, "
|
|
34
|
+
}, "key" | keyof import('react').InputHTMLAttributes<HTMLInputElement> | "asChild">, "onChange" | "type" | "value"> & {
|
|
35
35
|
value?: string;
|
|
36
36
|
onValueChange?: (search: string) => void;
|
|
37
37
|
} & import('react').RefAttributes<HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -75,7 +75,7 @@ declare const CommandItem: import('react').ForwardRefExoticComponent<Omit<{
|
|
|
75
75
|
ref?: React.Ref<HTMLDivElement>;
|
|
76
76
|
} & {
|
|
77
77
|
asChild?: boolean;
|
|
78
|
-
}, "key" | keyof import('react').HTMLAttributes<HTMLDivElement> | "asChild">, "
|
|
78
|
+
}, "key" | keyof import('react').HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
79
79
|
disabled?: boolean;
|
|
80
80
|
onSelect?: (value: string) => void;
|
|
81
81
|
value?: string;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Dialog as
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as e } from "@base-ui/react/dialog";
|
|
3
3
|
import { IconX as d } from "@tabler/icons-react";
|
|
4
4
|
import { usePortalContainer as c } from "../../../../lib/portal-container-context.js";
|
|
5
5
|
import { cn as i } from "../../../../lib/utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { Button as g } from "../button/button.js";
|
|
7
|
+
function b({ ...t }) {
|
|
8
|
+
return /* @__PURE__ */ a(e.Root, { "data-slot": "dialog", ...t });
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */ e
|
|
10
|
+
function v({ children: t, ...o }) {
|
|
11
|
+
return /* @__PURE__ */ a(e.Trigger, { "data-slot": "dialog-trigger", ...o, children: t });
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function p({ ...t }) {
|
|
13
14
|
const o = c();
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
15
|
+
return /* @__PURE__ */ a(
|
|
16
|
+
e.Portal,
|
|
16
17
|
{
|
|
17
18
|
"data-slot": "dialog-portal",
|
|
18
19
|
container: o,
|
|
@@ -20,18 +21,18 @@ function g({ ...t }) {
|
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function N({
|
|
24
25
|
children: t,
|
|
25
26
|
...o
|
|
26
27
|
}) {
|
|
27
|
-
return /* @__PURE__ */ e
|
|
28
|
+
return /* @__PURE__ */ a(e.Close, { "data-slot": "dialog-close", ...o, children: t });
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function m({
|
|
30
31
|
className: t,
|
|
31
32
|
...o
|
|
32
33
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
34
|
+
return /* @__PURE__ */ a(
|
|
35
|
+
e.Backdrop,
|
|
35
36
|
{
|
|
36
37
|
"data-slot": "dialog-overlay",
|
|
37
38
|
className: i(
|
|
@@ -42,17 +43,17 @@ function u({
|
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function C({
|
|
46
47
|
className: t,
|
|
47
48
|
children: o,
|
|
48
|
-
showCloseButton:
|
|
49
|
-
closeButtonLabel:
|
|
49
|
+
showCloseButton: r = !0,
|
|
50
|
+
closeButtonLabel: n = "Close",
|
|
50
51
|
...s
|
|
51
52
|
}) {
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
53
|
+
return /* @__PURE__ */ l(p, { "data-slot": "dialog-portal", children: [
|
|
54
|
+
/* @__PURE__ */ a(m, {}),
|
|
55
|
+
/* @__PURE__ */ l(
|
|
56
|
+
e.Popup,
|
|
56
57
|
{
|
|
57
58
|
"data-slot": "dialog-content",
|
|
58
59
|
className: i(
|
|
@@ -62,20 +63,18 @@ function v({
|
|
|
62
63
|
...s,
|
|
63
64
|
children: [
|
|
64
65
|
o,
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
r && /* @__PURE__ */ a(
|
|
67
|
+
e.Close,
|
|
67
68
|
{
|
|
68
69
|
"data-slot": "dialog-close",
|
|
69
|
-
render: /* @__PURE__ */
|
|
70
|
-
|
|
70
|
+
render: /* @__PURE__ */ a(
|
|
71
|
+
g,
|
|
71
72
|
{
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
className: "
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: r })
|
|
78
|
-
]
|
|
73
|
+
variant: "ghost",
|
|
74
|
+
size: "icon-sm",
|
|
75
|
+
className: "absolute top-5 right-4 opacity-70 hover:opacity-100",
|
|
76
|
+
"aria-label": n,
|
|
77
|
+
children: /* @__PURE__ */ a(d, { className: "h-4 w-4" })
|
|
79
78
|
}
|
|
80
79
|
)
|
|
81
80
|
}
|
|
@@ -85,8 +84,8 @@ function v({
|
|
|
85
84
|
)
|
|
86
85
|
] });
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
87
|
+
function w({ className: t, ...o }) {
|
|
88
|
+
return /* @__PURE__ */ a(
|
|
90
89
|
"div",
|
|
91
90
|
{
|
|
92
91
|
"data-slot": "dialog-header",
|
|
@@ -99,7 +98,7 @@ function N({ className: t, ...o }) {
|
|
|
99
98
|
);
|
|
100
99
|
}
|
|
101
100
|
function k({ className: t, ...o }) {
|
|
102
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ a(
|
|
103
102
|
"div",
|
|
104
103
|
{
|
|
105
104
|
"data-slot": "dialog-footer",
|
|
@@ -111,12 +110,12 @@ function k({ className: t, ...o }) {
|
|
|
111
110
|
}
|
|
112
111
|
);
|
|
113
112
|
}
|
|
114
|
-
function
|
|
113
|
+
function P({
|
|
115
114
|
className: t,
|
|
116
115
|
...o
|
|
117
116
|
}) {
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
|
|
117
|
+
return /* @__PURE__ */ a(
|
|
118
|
+
e.Title,
|
|
120
119
|
{
|
|
121
120
|
"data-slot": "dialog-title",
|
|
122
121
|
className: i(
|
|
@@ -127,12 +126,12 @@ function C({
|
|
|
127
126
|
}
|
|
128
127
|
);
|
|
129
128
|
}
|
|
130
|
-
function
|
|
129
|
+
function T({
|
|
131
130
|
className: t,
|
|
132
131
|
...o
|
|
133
132
|
}) {
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
|
|
133
|
+
return /* @__PURE__ */ a(
|
|
134
|
+
e.Description,
|
|
136
135
|
{
|
|
137
136
|
"data-slot": "dialog-description",
|
|
138
137
|
className: i(
|
|
@@ -144,14 +143,14 @@ function w({
|
|
|
144
143
|
);
|
|
145
144
|
}
|
|
146
145
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
b as Dialog,
|
|
147
|
+
N as DialogClose,
|
|
148
|
+
C as DialogContent,
|
|
149
|
+
T as DialogDescription,
|
|
151
150
|
k as DialogFooter,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
w as DialogHeader,
|
|
152
|
+
m as DialogOverlay,
|
|
153
|
+
p as DialogPortal,
|
|
154
|
+
P as DialogTitle,
|
|
155
|
+
v as DialogTrigger
|
|
157
156
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g, isValidElement as u } from "react";
|
|
3
3
|
import { IconExclamationCircle as h } from "@tabler/icons-react";
|
|
4
4
|
import { cva as i } from "class-variance-authority";
|
|
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as d, Fragment as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as r } from "react";
|
|
3
3
|
import { cn as o, getHostname as m } from "../../../../lib/utils.js";
|
|
4
4
|
import { Badge as g } from "../badge/badge.js";
|
|
5
|
-
import { HoverCard as f,
|
|
5
|
+
import { HoverCard as f, HoverCardContent as x, HoverCardTrigger as b } from "../hover-card/hover-card.js";
|
|
6
6
|
const h = r(
|
|
7
7
|
({ className: e, ...n }, t) => /* @__PURE__ */ i(
|
|
8
8
|
"span",
|
|
@@ -49,7 +49,7 @@ const q = (e) => /* @__PURE__ */ i(
|
|
|
49
49
|
className: t,
|
|
50
50
|
...a
|
|
51
51
|
}) => /* @__PURE__ */ i(
|
|
52
|
-
|
|
52
|
+
b,
|
|
53
53
|
{
|
|
54
54
|
render: /* @__PURE__ */ d(
|
|
55
55
|
g,
|
|
@@ -76,7 +76,7 @@ const q = (e) => /* @__PURE__ */ i(
|
|
|
76
76
|
className: e,
|
|
77
77
|
...n
|
|
78
78
|
}) => /* @__PURE__ */ i(
|
|
79
|
-
|
|
79
|
+
x,
|
|
80
80
|
{
|
|
81
81
|
"data-slot": "inline-citation-card-body",
|
|
82
82
|
className: o("relative w-80 p-0", e),
|
|
@@ -4,7 +4,7 @@ declare const InputGroupAddon: import('react').ForwardRefExoticComponent<Omit<im
|
|
|
4
4
|
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const InputGroupButton: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('@base-ui/react').ButtonProps & VariantProps<(props?: ({
|
|
7
|
-
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" |
|
|
7
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
8
8
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "size"> & VariantProps<(props?: ({
|
|
10
10
|
size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
|
|
@@ -52,4 +52,4 @@ type MessageAttachmentsProps = ComponentProps<'div'>;
|
|
|
52
52
|
declare function MessageAttachments({ children, className, ...props }: MessageAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
53
|
type MessageToolbarProps = ComponentProps<'div'>;
|
|
54
54
|
declare const MessageToolbar: ({ className, children, ...props }: MessageToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
-
export { Message,
|
|
55
|
+
export { Message, MessageAction, MessageActions, MessageAttachment, MessageAttachments, MessageAvatar, MessageAvatarIcon, MessageBranch, MessageBranchContent, MessageBranchNext, MessageBranchPage, MessageBranchPrevious, MessageBranchSelector, MessageContent, MessageResponse, MessageToolbar, };
|
|
@@ -12,7 +12,7 @@ const T = ({ className: t, isResponse: o = !1, ...a }) => /* @__PURE__ */ e(
|
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "message",
|
|
14
14
|
className: d(
|
|
15
|
-
"group flex w-full items-start justify-start gap-3
|
|
15
|
+
"group flex w-full items-start justify-start gap-3 mb-0 py-3",
|
|
16
16
|
o ? "is-assistant items-start" : "is-user flex-row-reverse",
|
|
17
17
|
t
|
|
18
18
|
),
|
|
@@ -27,9 +27,9 @@ const T = ({ className: t, isResponse: o = !1, ...a }) => /* @__PURE__ */ e(
|
|
|
27
27
|
{
|
|
28
28
|
"data-slot": "message-content",
|
|
29
29
|
className: d(
|
|
30
|
-
"is-user:dark flex flex-col gap-
|
|
30
|
+
"is-user:dark flex flex-col gap-4 rounded-md text-base leading-tight tracking-tightest",
|
|
31
31
|
"max-w-4/5",
|
|
32
|
-
"group-[.is-user]:bg-accent group-[.is-user]:p-2 group-[.is-user]:text-accent-foreground",
|
|
32
|
+
"group-[.is-user]:overflow-hidden group-[.is-user]:bg-accent group-[.is-user]:p-2 group-[.is-user]:text-accent-foreground",
|
|
33
33
|
"group-[.is-assistant]:text-foreground group-[.is-assistant]:pt-1",
|
|
34
34
|
o
|
|
35
35
|
),
|
|
@@ -44,7 +44,7 @@ const T = ({ className: t, isResponse: o = !1, ...a }) => /* @__PURE__ */ e(
|
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "message-actions",
|
|
47
|
-
className: d("flex items-center gap-2", t),
|
|
47
|
+
className: d("flex items-center gap-2 pt-2", t),
|
|
48
48
|
...a,
|
|
49
49
|
children: o
|
|
50
50
|
}
|
|
@@ -100,11 +100,7 @@ const f = {
|
|
|
100
100
|
li: ({ children: t }) => /* @__PURE__ */ e("li", { className: "py-0", children: t }),
|
|
101
101
|
blockquote: ({ children: t }) => /* @__PURE__ */ e("blockquote", { className: "my-3 pr-2 pl-2 border-l border-l-border text-sm text-muted-foreground font-normal tracking-tight not-italic", children: t }),
|
|
102
102
|
hr: () => /* @__PURE__ */ e("hr", { className: "my-4 border-border" }),
|
|
103
|
-
a: ({
|
|
104
|
-
children: t,
|
|
105
|
-
href: o,
|
|
106
|
-
...a
|
|
107
|
-
}) => /* @__PURE__ */ e(
|
|
103
|
+
a: ({ children: t, href: o, ...a }) => /* @__PURE__ */ e(
|
|
108
104
|
"a",
|
|
109
105
|
{
|
|
110
106
|
className: "text-foreground-link no-underline hover:underline underline-offset-4",
|
|
@@ -44,7 +44,7 @@ type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
|
|
|
44
44
|
declare const PromptInputTools: import('react').ForwardRefExoticComponent<PromptInputToolsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
45
45
|
type PromptInputButtonProps = ComponentProps<typeof InputGroupButton>;
|
|
46
46
|
declare const PromptInputButton: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
47
|
-
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" |
|
|
47
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
48
48
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
49
49
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "size"> & import('class-variance-authority').VariantProps<(props?: ({
|
|
50
50
|
size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as H, forwardRef as p,
|
|
2
|
+
import { createContext as H, forwardRef as p, useState as N, useContext as b, useCallback as A, useMemo as E } from "react";
|
|
3
3
|
import { IconSend as D, IconLoader2 as z, IconSquare as B, IconX as L, IconPlus as k, IconInfoCircle as G } from "@tabler/icons-react";
|
|
4
4
|
import { cn as r } from "../../../../lib/utils.js";
|
|
5
|
-
import { Command as F,
|
|
6
|
-
import { DropdownMenu as W,
|
|
5
|
+
import { Command as F, CommandEmpty as j, CommandGroup as K, CommandInput as V, CommandItem as q, CommandList as R, CommandSeparator as O } from "../command/command.js";
|
|
6
|
+
import { DropdownMenu as W, DropdownMenuContent as X, DropdownMenuItem as J, DropdownMenuTrigger as Q } from "../dropdown-menu/dropdown-menu.js";
|
|
7
7
|
import { HelperText as C } from "../helper-text/helper-text.js";
|
|
8
|
-
import { HoverCard as U,
|
|
8
|
+
import { HoverCard as U, HoverCardContent as Y, HoverCardTrigger as Z } from "../hover-card/hover-card.js";
|
|
9
9
|
import { InputGroupTextarea as _, InputGroupAddon as x, InputGroupButton as h, InputGroup as $ } from "../input-group/input-group.js";
|
|
10
|
-
import { Select as tt,
|
|
10
|
+
import { Select as tt, SelectContent as et, SelectItem as ot, SelectTrigger as nt, SelectValue as rt } from "../select/select.js";
|
|
11
11
|
const g = H(
|
|
12
12
|
null
|
|
13
13
|
), Jt = () => {
|
|
@@ -182,7 +182,7 @@ const dt = ({
|
|
|
182
182
|
children: e,
|
|
183
183
|
...n
|
|
184
184
|
}) => /* @__PURE__ */ o(
|
|
185
|
-
|
|
185
|
+
Q,
|
|
186
186
|
{
|
|
187
187
|
render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(k, { className: "size-4" }) })
|
|
188
188
|
}
|
|
@@ -191,12 +191,12 @@ dt.displayName = "PromptInputActionMenuTrigger";
|
|
|
191
191
|
const It = ({
|
|
192
192
|
className: t,
|
|
193
193
|
...e
|
|
194
|
-
}) => /* @__PURE__ */ o(
|
|
194
|
+
}) => /* @__PURE__ */ o(X, { align: "start", className: r(t), ...e });
|
|
195
195
|
It.displayName = "PromptInputActionMenuContent";
|
|
196
196
|
const Pt = ({
|
|
197
197
|
className: t,
|
|
198
198
|
...e
|
|
199
|
-
}) => /* @__PURE__ */ o(
|
|
199
|
+
}) => /* @__PURE__ */ o(J, { className: r(t), ...e });
|
|
200
200
|
Pt.displayName = "PromptInputActionMenuItem";
|
|
201
201
|
const yt = p(
|
|
202
202
|
({
|
|
@@ -231,7 +231,7 @@ const gt = ({
|
|
|
231
231
|
className: t,
|
|
232
232
|
...e
|
|
233
233
|
}) => /* @__PURE__ */ o(
|
|
234
|
-
|
|
234
|
+
nt,
|
|
235
235
|
{
|
|
236
236
|
className: r(
|
|
237
237
|
"border-none bg-transparent font-medium text-muted-foreground shadow-none transition-colors",
|
|
@@ -245,12 +245,12 @@ gt.displayName = "PromptInputModelSelectTrigger";
|
|
|
245
245
|
const ft = ({
|
|
246
246
|
className: t,
|
|
247
247
|
...e
|
|
248
|
-
}) => /* @__PURE__ */ o(
|
|
248
|
+
}) => /* @__PURE__ */ o(et, { className: r(t), ...e });
|
|
249
249
|
ft.displayName = "PromptInputModelSelectContent";
|
|
250
250
|
const Ct = ({
|
|
251
251
|
className: t,
|
|
252
252
|
...e
|
|
253
|
-
}) => /* @__PURE__ */ o(
|
|
253
|
+
}) => /* @__PURE__ */ o(ot, { className: r(t), ...e });
|
|
254
254
|
Ct.displayName = "PromptInputModelSelectItem";
|
|
255
255
|
const bt = ({
|
|
256
256
|
className: t,
|
|
@@ -263,12 +263,12 @@ const xt = ({
|
|
|
263
263
|
...n
|
|
264
264
|
}) => /* @__PURE__ */ o(U, { closeDelay: e, openDelay: t, ...n });
|
|
265
265
|
xt.displayName = "PromptInputHoverCard";
|
|
266
|
-
const ht = (t) => /* @__PURE__ */ o(
|
|
266
|
+
const ht = (t) => /* @__PURE__ */ o(Z, { ...t });
|
|
267
267
|
ht.displayName = "PromptInputHoverCardTrigger";
|
|
268
268
|
const vt = ({
|
|
269
269
|
align: t = "start",
|
|
270
270
|
...e
|
|
271
|
-
}) => /* @__PURE__ */ o(
|
|
271
|
+
}) => /* @__PURE__ */ o(Y, { align: t, ...e });
|
|
272
272
|
vt.displayName = "PromptInputHoverCardContent";
|
|
273
273
|
const Tt = p(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
274
274
|
"div",
|
|
@@ -337,27 +337,27 @@ At.displayName = "PromptInputCommand";
|
|
|
337
337
|
const Et = ({
|
|
338
338
|
className: t,
|
|
339
339
|
...e
|
|
340
|
-
}) => /* @__PURE__ */ o(
|
|
340
|
+
}) => /* @__PURE__ */ o(V, { className: r(t), ...e });
|
|
341
341
|
Et.displayName = "PromptInputCommandInput";
|
|
342
342
|
const Dt = ({
|
|
343
343
|
className: t,
|
|
344
344
|
...e
|
|
345
|
-
}) => /* @__PURE__ */ o(
|
|
345
|
+
}) => /* @__PURE__ */ o(R, { className: r(t), ...e });
|
|
346
346
|
Dt.displayName = "PromptInputCommandList";
|
|
347
347
|
const zt = ({
|
|
348
348
|
className: t,
|
|
349
349
|
...e
|
|
350
|
-
}) => /* @__PURE__ */ o(
|
|
350
|
+
}) => /* @__PURE__ */ o(j, { className: r(t), ...e });
|
|
351
351
|
zt.displayName = "PromptInputCommandEmpty";
|
|
352
352
|
const Bt = ({
|
|
353
353
|
className: t,
|
|
354
354
|
...e
|
|
355
|
-
}) => /* @__PURE__ */ o(
|
|
355
|
+
}) => /* @__PURE__ */ o(K, { className: r(t), ...e });
|
|
356
356
|
Bt.displayName = "PromptInputCommandGroup";
|
|
357
357
|
const Lt = ({
|
|
358
358
|
className: t,
|
|
359
359
|
...e
|
|
360
|
-
}) => /* @__PURE__ */ o(
|
|
360
|
+
}) => /* @__PURE__ */ o(q, { className: r(t), ...e });
|
|
361
361
|
Lt.displayName = "PromptInputCommandItem";
|
|
362
362
|
const kt = ({
|
|
363
363
|
className: t,
|
|
@@ -8,7 +8,10 @@ const l = g(!0), p = () => c(l), b = s(
|
|
|
8
8
|
{
|
|
9
9
|
ref: a,
|
|
10
10
|
"data-slot": "reasoning",
|
|
11
|
-
className: i(
|
|
11
|
+
className: i(
|
|
12
|
+
"relative flex w-full flex-col gap-2 not-prose py-2",
|
|
13
|
+
t
|
|
14
|
+
),
|
|
12
15
|
...o,
|
|
13
16
|
children: e
|
|
14
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { IconMist as f } from "@tabler/icons-react";
|
|
3
3
|
import { cn as l } from "../../../../lib/utils.js";
|
|
4
4
|
import { InlineCitation as p, InlineCitationLink as x } from "../inline-citation/inline-citation.js";
|
|
@@ -8,7 +8,7 @@ const S = ({ className: r, title: e, children: t, ...o }) => {
|
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
10
|
"data-slot": "sources",
|
|
11
|
-
className: l("flex flex-col gap-2", r),
|
|
11
|
+
className: l("flex flex-col gap-2 py-2", r),
|
|
12
12
|
...o,
|
|
13
13
|
children: [
|
|
14
14
|
n ? null : i,
|
|
@@ -58,7 +58,7 @@ const v = s(({ className: t, ...o }, l) => /* @__PURE__ */ e(
|
|
|
58
58
|
ref: l,
|
|
59
59
|
"data-slot": "tool-content",
|
|
60
60
|
className: d(
|
|
61
|
-
"flex flex-col
|
|
61
|
+
"data-open:flex flex-col py-3 gap-6 text-popover-foreground outline-none",
|
|
62
62
|
t
|
|
63
63
|
),
|
|
64
64
|
...o
|