@cognite/aura 0.1.0 → 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 +7 -1
- package/dist/components/index.js +251 -0
- 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/{lab/topbar/topbar.metadata.d.ts → core/combobox/combobox.metadata.d.ts} +1 -1
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/dialog/dialog.js +56 -55
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +40 -38
- package/dist/components/ui/core/helper-text/helper-text.js +1 -1
- package/dist/components/ui/core/hover-card/hover-card.js +48 -44
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +2 -2
- 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 +187 -120
- package/dist/components/ui/core/popover/popover.js +55 -0
- 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/select/select.js +37 -35
- package/dist/components/ui/core/sources/sources.js +68 -0
- package/dist/components/ui/core/tool/tool.js +1 -1
- package/dist/components/ui/core/tooltip/tooltip.js +42 -38
- package/dist/index.js +249 -227
- package/dist/lib/portal-container-context.d.ts +2 -0
- package/dist/lib/portal-container-context.js +12 -0
- package/dist/lib/utils.js +44 -30
- package/dist/styles.css +1 -0
- package/package.json +17 -6
- package/dist/components/ui/lab/breadcrumb/breadcrumb.d.ts +0 -134
- package/dist/components/ui/lab/breadcrumb/breadcrumb.metadata.d.ts +0 -2
- package/dist/components/ui/lab/topbar/topbar.d.ts +0 -10
- package/dist/lib/component-status-config.d.ts +0 -12
|
@@ -1,169 +1,236 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as i, memo as b } from "react";
|
|
3
3
|
import "@tabler/icons-react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { cn as l } from "../../../../lib/utils.js";
|
|
4
|
+
import { Streamdown as _ } from "streamdown";
|
|
5
|
+
import { cn as d } from "../../../../lib/utils.js";
|
|
7
6
|
import "../avatar/avatar.js";
|
|
8
|
-
import { Button as
|
|
7
|
+
import { Button as p } from "../button/button.js";
|
|
9
8
|
import "../button-group/button-group.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const V = ({ className: e, isResponse: s = !1, ...o }) => /* @__PURE__ */ t(
|
|
9
|
+
import { Tooltip as u, TooltipTrigger as w, TooltipContent as g } from "../tooltip/tooltip.js";
|
|
10
|
+
const T = ({ className: t, isResponse: o = !1, ...a }) => /* @__PURE__ */ e(
|
|
13
11
|
"div",
|
|
14
12
|
{
|
|
15
13
|
"data-slot": "message",
|
|
16
|
-
className:
|
|
17
|
-
"group flex w-full items-start justify-start gap-3
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
className: d(
|
|
15
|
+
"group flex w-full items-start justify-start gap-3 mb-0 py-3",
|
|
16
|
+
o ? "is-assistant items-start" : "is-user flex-row-reverse",
|
|
17
|
+
t
|
|
20
18
|
),
|
|
21
|
-
...
|
|
19
|
+
...a
|
|
22
20
|
}
|
|
23
|
-
),
|
|
24
|
-
children:
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
}) => /* @__PURE__ */
|
|
21
|
+
), R = ({
|
|
22
|
+
children: t,
|
|
23
|
+
className: o,
|
|
24
|
+
...a
|
|
25
|
+
}) => /* @__PURE__ */ e(
|
|
28
26
|
"div",
|
|
29
27
|
{
|
|
30
28
|
"data-slot": "message-content",
|
|
31
|
-
className:
|
|
32
|
-
"is-user:dark flex flex-col gap-
|
|
29
|
+
className: d(
|
|
30
|
+
"is-user:dark flex flex-col gap-4 rounded-md text-base leading-tight tracking-tightest",
|
|
33
31
|
"max-w-4/5",
|
|
34
|
-
"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",
|
|
35
33
|
"group-[.is-assistant]:text-foreground group-[.is-assistant]:pt-1",
|
|
36
|
-
|
|
34
|
+
o
|
|
37
35
|
),
|
|
38
|
-
...
|
|
39
|
-
children:
|
|
36
|
+
...a,
|
|
37
|
+
children: t
|
|
40
38
|
}
|
|
41
|
-
),
|
|
42
|
-
className:
|
|
43
|
-
children:
|
|
44
|
-
...
|
|
45
|
-
}) => /* @__PURE__ */
|
|
39
|
+
), z = ({
|
|
40
|
+
className: t,
|
|
41
|
+
children: o,
|
|
42
|
+
...a
|
|
43
|
+
}) => /* @__PURE__ */ e(
|
|
46
44
|
"div",
|
|
47
45
|
{
|
|
48
46
|
"data-slot": "message-actions",
|
|
49
|
-
className:
|
|
50
|
-
...
|
|
51
|
-
children:
|
|
47
|
+
className: d("flex items-center gap-2 pt-2", t),
|
|
48
|
+
...a,
|
|
49
|
+
children: o
|
|
52
50
|
}
|
|
53
|
-
),
|
|
54
|
-
tooltip:
|
|
55
|
-
children:
|
|
56
|
-
label:
|
|
57
|
-
className:
|
|
51
|
+
), A = ({
|
|
52
|
+
tooltip: t,
|
|
53
|
+
children: o,
|
|
54
|
+
label: a,
|
|
55
|
+
className: n,
|
|
58
56
|
variant: m = "ghost",
|
|
59
|
-
size:
|
|
60
|
-
...
|
|
57
|
+
size: c = "sm",
|
|
58
|
+
...l
|
|
61
59
|
}) => {
|
|
62
|
-
const
|
|
63
|
-
|
|
60
|
+
const r = /* @__PURE__ */ s(
|
|
61
|
+
p,
|
|
64
62
|
{
|
|
65
63
|
"data-slot": "message-action",
|
|
66
|
-
className:
|
|
64
|
+
className: d(
|
|
67
65
|
"relative icon-sm text-muted-foreground hover:text-foreground",
|
|
68
|
-
|
|
66
|
+
n
|
|
69
67
|
),
|
|
70
|
-
size:
|
|
68
|
+
size: c,
|
|
71
69
|
type: "button",
|
|
72
70
|
variant: m,
|
|
73
|
-
...
|
|
71
|
+
...l,
|
|
74
72
|
children: [
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
73
|
+
o,
|
|
74
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: a || t })
|
|
77
75
|
]
|
|
78
76
|
}
|
|
79
77
|
);
|
|
80
|
-
return
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
] }) :
|
|
78
|
+
return t ? /* @__PURE__ */ s(u, { children: [
|
|
79
|
+
/* @__PURE__ */ e(w, { render: r }),
|
|
80
|
+
/* @__PURE__ */ e(g, { children: /* @__PURE__ */ e("p", { children: t }) })
|
|
81
|
+
] }) : r;
|
|
84
82
|
};
|
|
85
|
-
|
|
83
|
+
i(
|
|
86
84
|
null
|
|
87
85
|
);
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
children:
|
|
91
|
-
}) => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
)
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
h3: ({ children: e }) => /* @__PURE__ */ t("h3", { className: "mt-4 mb-1 scroll-m-20 text-base font-medium tracking-tighter", children: e }),
|
|
107
|
-
h4: ({ children: e }) => /* @__PURE__ */ t("h4", { className: "mt-2 mb-0 scroll-m-20 text-sm font-medium tracking-normal", children: e }),
|
|
108
|
-
h5: ({ children: e }) => /* @__PURE__ */ t("h5", { className: "mt-0 mb-0 scroll-m-20 text-xs font-medium tracking-tighter", children: e }),
|
|
109
|
-
h6: ({ children: e }) => /* @__PURE__ */ t("h6", { className: "mt-0 mb-0 scroll-m-20 text-2xs font-medium tracking-tighter", children: e }),
|
|
110
|
-
p: ({ children: e }) => /* @__PURE__ */ t("p", { className: "mt-2 mb-3 text-base font-normal leading-7 tracking-tightest", children: e }),
|
|
111
|
-
strong: ({ children: e }) => /* @__PURE__ */ t("strong", { className: "font-medium", children: e }),
|
|
112
|
-
em: ({ children: e }) => /* @__PURE__ */ t("em", { className: "italic", children: e }),
|
|
113
|
-
ul: ({ children: e }) => /* @__PURE__ */ t("ul", { className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-disc text-base font-normal tracking-tightest", children: e }),
|
|
114
|
-
ol: ({ children: e }) => /* @__PURE__ */ t("ol", { className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-decimal text-base font-normal tracking-tightest", children: e }),
|
|
115
|
-
li: ({ children: e }) => /* @__PURE__ */ t("li", { className: "py-0", children: e }),
|
|
116
|
-
blockquote: ({ children: e }) => /* @__PURE__ */ t("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: e }),
|
|
117
|
-
hr: () => /* @__PURE__ */ t("hr", { className: "my-4 border-border" }),
|
|
118
|
-
a: ({
|
|
119
|
-
children: e,
|
|
120
|
-
href: s,
|
|
121
|
-
...o
|
|
122
|
-
}) => /* @__PURE__ */ t(
|
|
86
|
+
const f = {
|
|
87
|
+
h1: ({ children: t }) => /* @__PURE__ */ e("h1", { className: "mt-0 mb-2 scroll-m-20 text-xl font-medium tracking-tightest", children: t }),
|
|
88
|
+
h2: ({ children: t }) => /* @__PURE__ */ e("h2", { className: "mt-4 mb-1 scroll-m-20 text-lg font-medium tracking-tightest", children: t }),
|
|
89
|
+
h3: ({ children: t }) => /* @__PURE__ */ e("h3", { className: "mt-4 mb-1 scroll-m-20 text-base font-medium tracking-tighter", children: t }),
|
|
90
|
+
h4: ({ children: t }) => /* @__PURE__ */ e("h4", { className: "mt-2 mb-0 scroll-m-20 text-sm font-medium tracking-normal", children: t }),
|
|
91
|
+
h5: ({ children: t }) => /* @__PURE__ */ e("h5", { className: "mt-0 mb-0 scroll-m-20 text-xs font-medium tracking-tighter", children: t }),
|
|
92
|
+
h6: ({ children: t }) => /* @__PURE__ */ e("h6", { className: "mt-0 mb-0 scroll-m-20 text-2xs font-medium tracking-tighter", children: t }),
|
|
93
|
+
p: ({ children: t }) => /* @__PURE__ */ e("p", { className: "mt-2 mb-3 text-base font-normal leading-5 tracking-tightest", children: t }),
|
|
94
|
+
strong: ({ children: t }) => /* @__PURE__ */ e("strong", { className: "font-medium", children: t }),
|
|
95
|
+
em: ({ children: t }) => /* @__PURE__ */ e("em", { className: "italic", children: t }),
|
|
96
|
+
b: ({ children: t }) => /* @__PURE__ */ e("b", { className: "font-medium", children: t }),
|
|
97
|
+
i: ({ children: t }) => /* @__PURE__ */ e("i", { className: "italic", children: t }),
|
|
98
|
+
ul: ({ children: t }) => /* @__PURE__ */ e("ul", { className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-disc text-base font-normal tracking-tightest", children: t }),
|
|
99
|
+
ol: ({ children: t }) => /* @__PURE__ */ e("ol", { className: "ml-8.25 mb-3 pt-2 pl-0 pb-0 list-decimal text-base font-normal tracking-tightest", children: t }),
|
|
100
|
+
li: ({ children: t }) => /* @__PURE__ */ e("li", { className: "py-0", children: t }),
|
|
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
|
+
hr: () => /* @__PURE__ */ e("hr", { className: "my-4 border-border" }),
|
|
103
|
+
a: ({ children: t, href: o, ...a }) => /* @__PURE__ */ e(
|
|
123
104
|
"a",
|
|
124
105
|
{
|
|
125
106
|
className: "text-foreground-link no-underline hover:underline underline-offset-4",
|
|
126
|
-
href:
|
|
127
|
-
...
|
|
128
|
-
children:
|
|
107
|
+
href: o,
|
|
108
|
+
...a,
|
|
109
|
+
children: t
|
|
129
110
|
}
|
|
130
111
|
),
|
|
131
|
-
table: ({ children:
|
|
132
|
-
thead: ({ children:
|
|
133
|
-
tbody: ({ children:
|
|
134
|
-
tr: ({ children:
|
|
135
|
-
th: ({ children:
|
|
136
|
-
td: ({ children:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
p,
|
|
112
|
+
table: ({ children: t }) => /* @__PURE__ */ e("table", { className: "my-6 w-full", children: t }),
|
|
113
|
+
thead: ({ children: t }) => /* @__PURE__ */ e("thead", { children: t }),
|
|
114
|
+
tbody: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
|
|
115
|
+
tr: ({ children: t }) => /* @__PURE__ */ e("tr", { className: "m-0 border-t p-0 even:bg-muted", children: t }),
|
|
116
|
+
th: ({ children: t }) => /* @__PURE__ */ e("th", { className: "border px-4 py-2 text-left font-bold", children: t }),
|
|
117
|
+
td: ({ children: t }) => /* @__PURE__ */ e("td", { className: "border px-4 py-2 text-left", children: t })
|
|
118
|
+
}, k = b(
|
|
119
|
+
({ className: t, components: o, ...a }) => /* @__PURE__ */ e(
|
|
120
|
+
_,
|
|
141
121
|
{
|
|
142
122
|
"data-slot": "message-response",
|
|
143
|
-
className:
|
|
123
|
+
className: d(
|
|
144
124
|
"size-full",
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
"[
|
|
153
|
-
|
|
125
|
+
// Blockquote paragraph overrides
|
|
126
|
+
"[&_blockquote_p]:text-sm",
|
|
127
|
+
"[&_blockquote_p]:tracking-tight",
|
|
128
|
+
// Inline code
|
|
129
|
+
"[&_code]:relative",
|
|
130
|
+
"[&_code]:rounded",
|
|
131
|
+
"[&_code]:bg-muted",
|
|
132
|
+
"[&_code]:px-[0.3rem]",
|
|
133
|
+
"[&_code]:py-[0.2rem]",
|
|
134
|
+
"[&_code]:font-mono",
|
|
135
|
+
"[&_code]:text-sm",
|
|
136
|
+
"[&_code]:font-semibold",
|
|
137
|
+
// Code blocks (Streamdown container)
|
|
138
|
+
'[&_div[data-streamdown="code-block"]]:my-4',
|
|
139
|
+
'[&_div[data-streamdown="code-block"]]:w-full',
|
|
140
|
+
'[&_div[data-streamdown="code-block"]]:overflow-hidden',
|
|
141
|
+
'[&_div[data-streamdown="code-block"]]:rounded-xl',
|
|
142
|
+
'[&_div[data-streamdown="code-block"]]:border',
|
|
143
|
+
'[&_div[data-streamdown="code-block"]]:border-border',
|
|
144
|
+
// Code block header
|
|
145
|
+
'[&_div[data-streamdown="code-block-header"]]:flex',
|
|
146
|
+
'[&_div[data-streamdown="code-block-header"]]:items-center',
|
|
147
|
+
'[&_div[data-streamdown="code-block-header"]]:justify-between',
|
|
148
|
+
'[&_div[data-streamdown="code-block-header"]]:bg-muted/80',
|
|
149
|
+
'[&_div[data-streamdown="code-block-header"]]:px-4',
|
|
150
|
+
'[&_div[data-streamdown="code-block-header"]]:py-3',
|
|
151
|
+
'[&_div[data-streamdown="code-block-header"]]:text-xs',
|
|
152
|
+
'[&_div[data-streamdown="code-block-header"]]:text-muted-foreground',
|
|
153
|
+
// Pre element inside code block
|
|
154
|
+
'[&_div[data-streamdown="code-block"]_pre]:m-0',
|
|
155
|
+
'[&_div[data-streamdown="code-block"]_pre]:overflow-x-auto',
|
|
156
|
+
'[&_div[data-streamdown="code-block"]_pre]:border-t',
|
|
157
|
+
'[&_div[data-streamdown="code-block"]_pre]:border-border',
|
|
158
|
+
'[&_div[data-streamdown="code-block"]_pre]:bg-background!',
|
|
159
|
+
'[&_div[data-streamdown="code-block"]_pre]:p-4',
|
|
160
|
+
'[&_div[data-streamdown="code-block"]_pre]:text-sm',
|
|
161
|
+
'[&_div[data-streamdown="code-block"]_pre]:text-foreground!',
|
|
162
|
+
// Code element inside pre
|
|
163
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:static',
|
|
164
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:rounded-none',
|
|
165
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:bg-transparent',
|
|
166
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:p-0',
|
|
167
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:font-mono',
|
|
168
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:text-sm',
|
|
169
|
+
'[&_div[data-streamdown="code-block"]_pre_code]:font-normal',
|
|
170
|
+
// Code block buttons
|
|
171
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:cursor-pointer',
|
|
172
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:p-1',
|
|
173
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:text-muted-foreground',
|
|
174
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:transition-all',
|
|
175
|
+
'[&_button[data-streamdown="code-block-copy-button"]]:hover:text-foreground',
|
|
176
|
+
'[&_button[data-streamdown="code-block-download-button"]]:cursor-pointer',
|
|
177
|
+
'[&_button[data-streamdown="code-block-download-button"]]:p-1',
|
|
178
|
+
'[&_button[data-streamdown="code-block-download-button"]]:text-muted-foreground',
|
|
179
|
+
'[&_button[data-streamdown="code-block-download-button"]]:transition-all',
|
|
180
|
+
'[&_button[data-streamdown="code-block-download-button"]]:hover:text-foreground',
|
|
181
|
+
// Regular pre blocks (not in Streamdown code blocks)
|
|
182
|
+
"[&_pre:not([data-streamdown])]:my-3",
|
|
183
|
+
"[&_pre:not([data-streamdown])]:mx-0",
|
|
184
|
+
"[&_pre:not([data-streamdown])]:overflow-x-auto",
|
|
185
|
+
"[&_pre:not([data-streamdown])]:rounded-md",
|
|
186
|
+
"[&_pre:not([data-streamdown])]:border",
|
|
187
|
+
"[&_pre:not([data-streamdown])]:bg-card",
|
|
188
|
+
"[&_pre:not([data-streamdown])]:p-4",
|
|
189
|
+
"[&_pre:not([data-streamdown])]:text-foreground",
|
|
190
|
+
"[&_pre:not([data-streamdown])]:text-sm",
|
|
191
|
+
"[&_pre:not([data-streamdown])_code]:static",
|
|
192
|
+
"[&_pre:not([data-streamdown])_code]:rounded-none",
|
|
193
|
+
"[&_pre:not([data-streamdown])_code]:bg-transparent",
|
|
194
|
+
"[&_pre:not([data-streamdown])_code]:px-0",
|
|
195
|
+
"[&_pre:not([data-streamdown])_code]:py-0",
|
|
196
|
+
"[&_pre:not([data-streamdown])_code]:font-mono",
|
|
197
|
+
"[&_pre:not([data-streamdown])_code]:text-sm",
|
|
198
|
+
"[&_pre:not([data-streamdown])_code]:font-normal",
|
|
199
|
+
// Mermaid diagram blocks
|
|
200
|
+
'[&_div[data-streamdown="mermaid-block"]]:bg-card',
|
|
201
|
+
'[&_div[data-streamdown="mermaid-block"]]:text-card-foreground',
|
|
202
|
+
'[&_div[data-streamdown="mermaid-block"]]:flex',
|
|
203
|
+
'[&_div[data-streamdown="mermaid-block"]]:flex-col',
|
|
204
|
+
'[&_div[data-streamdown="mermaid-block"]]:rounded-lg',
|
|
205
|
+
'[&_div[data-streamdown="mermaid-block"]]:hover:bg-accent',
|
|
206
|
+
'[&_div[data-streamdown="mermaid-block"]]:border-0',
|
|
207
|
+
// Ensure mermaid container is tall enough for the toolbar
|
|
208
|
+
'[&_div[data-streamdown="mermaid-block"]_.relative.w-full]:!min-h-28',
|
|
209
|
+
// Mermaid fullscreen overlay: boost z-index above eos footer (z-150)
|
|
210
|
+
'[&_div[data-streamdown="mermaid-block"]_>div>.fixed]:!z-[200]',
|
|
211
|
+
// Mermaid fullscreen toolbar: pin to viewport top-left (only in fullscreen via .inset-0)
|
|
212
|
+
'[&_div[data-streamdown="mermaid-block"]_.fixed.inset-0_.flex-col.absolute]:!fixed',
|
|
213
|
+
'[&_div[data-streamdown="mermaid-block"]_.fixed.inset-0_.flex-col.absolute]:!top-4',
|
|
214
|
+
'[&_div[data-streamdown="mermaid-block"]_.fixed.inset-0_.flex-col.absolute]:!bottom-auto',
|
|
215
|
+
'[&_div[data-streamdown="mermaid-block"]_.fixed.inset-0_.flex-col.absolute]:!right-auto',
|
|
216
|
+
'[&_div[data-streamdown="mermaid-block"]_.fixed.inset-0_.flex-col.absolute]:!left-4',
|
|
217
|
+
// First and last child margin resets
|
|
218
|
+
"[&>*:first-child]:mt-0",
|
|
219
|
+
"[&>*:last-child]:mb-0",
|
|
220
|
+
t
|
|
154
221
|
),
|
|
155
|
-
components: { ...
|
|
222
|
+
components: { ...f, ...o },
|
|
156
223
|
controls: !1,
|
|
157
|
-
...
|
|
224
|
+
...a
|
|
158
225
|
}
|
|
159
226
|
),
|
|
160
|
-
(
|
|
227
|
+
(t, o) => t.children === o.children
|
|
161
228
|
);
|
|
162
|
-
|
|
229
|
+
k.displayName = "MessageResponse";
|
|
163
230
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
231
|
+
T as Message,
|
|
232
|
+
A as MessageAction,
|
|
233
|
+
z as MessageActions,
|
|
234
|
+
R as MessageContent,
|
|
235
|
+
k as MessageResponse
|
|
169
236
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { Popover as t } from "@base-ui/react/popover";
|
|
4
|
+
import { usePortalContainer as l } from "../../../../lib/portal-container-context.js";
|
|
5
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
6
|
+
function c(o) {
|
|
7
|
+
return /* @__PURE__ */ r(t.Root, { "data-slot": "popover", ...o });
|
|
8
|
+
}
|
|
9
|
+
c.displayName = "Popover";
|
|
10
|
+
function z({
|
|
11
|
+
children: o,
|
|
12
|
+
...e
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ r(t.Trigger, { "data-slot": "popover-trigger", ...e, children: o });
|
|
15
|
+
}
|
|
16
|
+
const g = m(
|
|
17
|
+
({
|
|
18
|
+
className: o,
|
|
19
|
+
align: e = "center",
|
|
20
|
+
alignOffset: a = 0,
|
|
21
|
+
side: n = "bottom",
|
|
22
|
+
sideOffset: i = 4,
|
|
23
|
+
...d
|
|
24
|
+
}, p) => {
|
|
25
|
+
const s = l();
|
|
26
|
+
return /* @__PURE__ */ r(t.Portal, { container: s, children: /* @__PURE__ */ r(
|
|
27
|
+
t.Positioner,
|
|
28
|
+
{
|
|
29
|
+
align: e,
|
|
30
|
+
alignOffset: a,
|
|
31
|
+
side: n,
|
|
32
|
+
sideOffset: i,
|
|
33
|
+
className: "isolate z-50",
|
|
34
|
+
children: /* @__PURE__ */ r(
|
|
35
|
+
t.Popup,
|
|
36
|
+
{
|
|
37
|
+
ref: p,
|
|
38
|
+
"data-slot": "popover-content",
|
|
39
|
+
className: f(
|
|
40
|
+
"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-[var(--transform-origin)] rounded-lg border border-border p-3 gap-2 shadow-md outline-none",
|
|
41
|
+
o
|
|
42
|
+
),
|
|
43
|
+
...d
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
) });
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
g.displayName = "PopoverContent";
|
|
51
|
+
export {
|
|
52
|
+
c as Popover,
|
|
53
|
+
g as PopoverContent,
|
|
54
|
+
z as PopoverTrigger
|
|
55
|
+
};
|
|
@@ -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
|
}
|