@pstdio/ui 0.41.0 → 0.42.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/dist/{MermaidComponent-BCiI63_G.js → MermaidComponent-D7vhkpka.js} +2 -2
- package/dist/{MermaidComponent-BCiI63_G.js.map → MermaidComponent-D7vhkpka.js.map} +1 -1
- package/dist/alert-MQ47wy7f.js +388 -0
- package/dist/alert-MQ47wy7f.js.map +1 -0
- package/dist/chat-ui.d.ts +36 -5
- package/dist/chat-ui.js +1777 -1422
- package/dist/chat-ui.js.map +1 -1
- package/dist/collection-view-fields-D3cysHNT.d.ts +232 -0
- package/dist/collection-view-grouping-D4nZk8-3.js +90 -0
- package/dist/collection-view-grouping-D4nZk8-3.js.map +1 -0
- package/dist/collection-view-search-CpjJy76w.js +1973 -0
- package/dist/collection-view-search-CpjJy76w.js.map +1 -0
- package/dist/collection-view.d.ts +4 -0
- package/dist/collection-view.js +2 -0
- package/dist/{data-table-stats-row-EiTEONdY.js → data-table-stats-row-64magT2g.js} +2 -2
- package/dist/{data-table-stats-row-EiTEONdY.js.map → data-table-stats-row-64magT2g.js.map} +1 -1
- package/dist/data-table.d.ts +3 -1
- package/dist/data-table.js +279 -277
- package/dist/data-table.js.map +1 -1
- package/dist/{diff-drawer-BwZBOObe.js → diff-drawer-IYpQ-QQK.js} +192 -191
- package/dist/diff-drawer-IYpQ-QQK.js.map +1 -0
- package/dist/{diff-viewer-kOOd7C7h.js → diff-viewer-C-0VAt9P.js} +4 -4
- package/dist/{diff-viewer-kOOd7C7h.js.map → diff-viewer-C-0VAt9P.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-DPxc0e5z.js → display-sort-control-f3rbILsV.js} +87 -86
- package/dist/{display-sort-control-DPxc0e5z.js.map → display-sort-control-f3rbILsV.js.map} +1 -1
- package/dist/drop-indicator-HjlBSIeV.js +27 -0
- package/dist/drop-indicator-HjlBSIeV.js.map +1 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js +1449 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js.map +1 -0
- package/dist/host-storage-BIo5azql.js +31 -0
- package/dist/host-storage-BIo5azql.js.map +1 -0
- package/dist/host-storage-J0089Hyk.d.ts +17 -0
- package/dist/icon-options-Tt6Wzhtv.js +308 -0
- package/dist/icon-options-Tt6Wzhtv.js.map +1 -0
- package/dist/{index-C9mywhyX.d.ts → index-B79hwNcB.d.ts} +17 -1
- package/dist/index-CKsd23jv.d.ts +80 -0
- package/dist/{index-D3UJyWWh.d.ts → index-ICoad2I_.d.ts} +4 -223
- package/dist/index.d.ts +22 -6
- package/dist/index.js +1174 -1112
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -1
- package/dist/kanban-renderer.js +531 -528
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-Z4SHkseA.js +1195 -0
- package/dist/list-row-Z4SHkseA.js.map +1 -0
- package/dist/markdown-editor-Dd4mor7l.js +3236 -0
- package/dist/markdown-editor-Dd4mor7l.js.map +1 -0
- package/dist/number-input-7K66wnSC.js +63 -0
- package/dist/number-input-7K66wnSC.js.map +1 -0
- package/dist/param-editor-Dnix-fJo.js +225 -0
- package/dist/param-editor-Dnix-fJo.js.map +1 -0
- package/dist/param-editor-field-B3vLST-B.js +2394 -0
- package/dist/param-editor-field-B3vLST-B.js.map +1 -0
- package/dist/param-editor.js +4 -2
- package/dist/prism-OG4H7Hu4.js +334 -0
- package/dist/prism-OG4H7Hu4.js.map +1 -0
- package/dist/queued-follow-up-Bj_vtMgd.js +208 -0
- package/dist/queued-follow-up-Bj_vtMgd.js.map +1 -0
- package/dist/rich-text-BgEnAHr2.js +1160 -0
- package/dist/rich-text-BgEnAHr2.js.map +1 -0
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +4 -2
- package/dist/terminal.js +1 -1
- package/dist/{theme-at0rtSnX.js → theme-CMJdH59Z.js} +224 -90
- package/dist/theme-CMJdH59Z.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-jarhD31R.js +1652 -0
- package/dist/tree-list-jarhD31R.js.map +1 -0
- package/dist/use-virtualizer-uj43XjBp.js +10 -0
- package/dist/use-virtualizer-uj43XjBp.js.map +1 -0
- package/dist/{host-storage-DP0RLj4i.d.ts → workspace-badge-BKtB805G.d.ts} +6 -16
- package/package.json +6 -2
- package/dist/chat-question-bubble-w2vMbFsS.js +0 -68
- package/dist/chat-question-bubble-w2vMbFsS.js.map +0 -1
- package/dist/diff-drawer-BwZBOObe.js.map +0 -1
- package/dist/list-row-DM0DiIrN.js +0 -1167
- package/dist/list-row-DM0DiIrN.js.map +0 -1
- package/dist/prism-JVIsQMoJ.js +0 -1029
- package/dist/prism-JVIsQMoJ.js.map +0 -1
- package/dist/rich-text-DM24VNQZ.js +0 -10447
- package/dist/rich-text-DM24VNQZ.js.map +0 -1
- package/dist/theme-at0rtSnX.js.map +0 -1
- package/dist/tree-list-Cqgl8mnN.js +0 -1621
- package/dist/tree-list-Cqgl8mnN.js.map +0 -1
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { n as e } from "./scroll-area-Cr1lNXAr.js";
|
|
2
|
+
import { Badge as t, IconButton as n, Image as r, Popover as i, Slider as a, Switch as o, Text as s, chakra as c } from "@chakra-ui/react";
|
|
3
|
+
import { c as l } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import * as f from "react";
|
|
6
|
+
import { useEffect as p, useState as m } from "react";
|
|
7
|
+
import { File as h, FileArchive as g, FileChartLine as _, FileCode as v, FileCog as y, FileImage as b, FileJson as x, FileSpreadsheet as S, FileText as C, X as w } from "lucide-react";
|
|
8
|
+
//#region src/components/overlays/attachment-chip.tsx
|
|
9
|
+
var T = (e) => e.type.startsWith("image/"), E = (e) => e < 1024 ? `${e.toString()} B` : e < 1048576 ? `${Math.round(e / 1024).toString()} KB` : `${(e / 1048576).toFixed(1)} MB`, D = (e) => {
|
|
10
|
+
let a = l(22), { file: o, removeLabel: f, disabled: h, onRemove: g } = e, [_, v] = m(null), y, b;
|
|
11
|
+
a[0] === o ? (y = a[1], b = a[2]) : (y = () => {
|
|
12
|
+
if (!T(o)) return;
|
|
13
|
+
let e = URL.createObjectURL(o);
|
|
14
|
+
return v(e), () => URL.revokeObjectURL(e);
|
|
15
|
+
}, b = [o], a[0] = o, a[1] = y, a[2] = b), p(y, b);
|
|
16
|
+
let x;
|
|
17
|
+
a[3] === o.name ? x = a[4] : (x = /* @__PURE__ */ u(s, {
|
|
18
|
+
as: "span",
|
|
19
|
+
textStyle: "label/XS/medium",
|
|
20
|
+
lineClamp: 1,
|
|
21
|
+
maxW: "180px",
|
|
22
|
+
children: o.name
|
|
23
|
+
}), a[3] = o.name, a[4] = x);
|
|
24
|
+
let S = x, C;
|
|
25
|
+
a[5] !== o.name || a[6] !== S || a[7] !== _ ? (C = _ ? /* @__PURE__ */ d(i.Root, {
|
|
26
|
+
positioning: { placement: "top" },
|
|
27
|
+
children: [/* @__PURE__ */ u(i.Trigger, {
|
|
28
|
+
asChild: !0,
|
|
29
|
+
children: /* @__PURE__ */ u(c.button, {
|
|
30
|
+
type: "button",
|
|
31
|
+
cursor: "pointer",
|
|
32
|
+
minW: "0",
|
|
33
|
+
display: "inline-flex",
|
|
34
|
+
children: S
|
|
35
|
+
})
|
|
36
|
+
}), /* @__PURE__ */ u(i.Positioner, { children: /* @__PURE__ */ u(i.Content, {
|
|
37
|
+
w: "auto",
|
|
38
|
+
p: "2xs",
|
|
39
|
+
bg: "bg",
|
|
40
|
+
children: /* @__PURE__ */ u(r, {
|
|
41
|
+
src: _,
|
|
42
|
+
alt: o.name,
|
|
43
|
+
maxW: "240px",
|
|
44
|
+
maxH: "240px",
|
|
45
|
+
borderRadius: "sm"
|
|
46
|
+
})
|
|
47
|
+
}) })]
|
|
48
|
+
}) : S, a[5] = o.name, a[6] = S, a[7] = _, a[8] = C) : C = a[8];
|
|
49
|
+
let D;
|
|
50
|
+
a[9] === o.size ? D = a[10] : (D = E(o.size), a[9] = o.size, a[10] = D);
|
|
51
|
+
let O;
|
|
52
|
+
a[11] === D ? O = a[12] : (O = /* @__PURE__ */ u(s, {
|
|
53
|
+
as: "span",
|
|
54
|
+
textStyle: "label/XS/regular",
|
|
55
|
+
color: "fg.subtle",
|
|
56
|
+
children: D
|
|
57
|
+
}), a[11] = D, a[12] = O);
|
|
58
|
+
let k;
|
|
59
|
+
a[13] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ u(w, { size: 12 }), a[13] = k) : k = a[13];
|
|
60
|
+
let A;
|
|
61
|
+
a[14] !== h || a[15] !== g || a[16] !== f ? (A = /* @__PURE__ */ u(n, {
|
|
62
|
+
size: "2xs",
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
"aria-label": f,
|
|
65
|
+
disabled: h,
|
|
66
|
+
onClick: g,
|
|
67
|
+
children: k
|
|
68
|
+
}), a[14] = h, a[15] = g, a[16] = f, a[17] = A) : A = a[17];
|
|
69
|
+
let j;
|
|
70
|
+
return a[18] !== C || a[19] !== O || a[20] !== A ? (j = /* @__PURE__ */ d(t, {
|
|
71
|
+
variant: "chip",
|
|
72
|
+
gap: "2xs",
|
|
73
|
+
pr: "2xs",
|
|
74
|
+
children: [
|
|
75
|
+
C,
|
|
76
|
+
O,
|
|
77
|
+
A
|
|
78
|
+
]
|
|
79
|
+
}), a[18] = C, a[19] = O, a[20] = A, a[21] = j) : j = a[21], j;
|
|
80
|
+
}, O = (e) => {
|
|
81
|
+
let n = l(2), r;
|
|
82
|
+
return n[0] === e ? r = n[1] : (r = /* @__PURE__ */ u(t, {
|
|
83
|
+
size: "sm",
|
|
84
|
+
variant: "chip",
|
|
85
|
+
...e
|
|
86
|
+
}), n[0] = e, n[1] = r), r;
|
|
87
|
+
}, k = (e) => {
|
|
88
|
+
let t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
89
|
+
return [
|
|
90
|
+
"csv",
|
|
91
|
+
"tsv",
|
|
92
|
+
"xlsx",
|
|
93
|
+
"xls",
|
|
94
|
+
"parquet"
|
|
95
|
+
].includes(t) ? S : [
|
|
96
|
+
"sql",
|
|
97
|
+
"py",
|
|
98
|
+
"js",
|
|
99
|
+
"ts",
|
|
100
|
+
"jsx",
|
|
101
|
+
"tsx",
|
|
102
|
+
"java",
|
|
103
|
+
"cpp",
|
|
104
|
+
"c",
|
|
105
|
+
"h",
|
|
106
|
+
"css",
|
|
107
|
+
"scss",
|
|
108
|
+
"sass",
|
|
109
|
+
"php",
|
|
110
|
+
"rb",
|
|
111
|
+
"go",
|
|
112
|
+
"rs",
|
|
113
|
+
"kt",
|
|
114
|
+
"swift"
|
|
115
|
+
].includes(t) ? v : [
|
|
116
|
+
"json",
|
|
117
|
+
"jsonl",
|
|
118
|
+
"ndjson"
|
|
119
|
+
].includes(t) ? e.includes("/visualizations/") ? _ : x : [
|
|
120
|
+
"md",
|
|
121
|
+
"txt",
|
|
122
|
+
"rst",
|
|
123
|
+
"org",
|
|
124
|
+
"pdf",
|
|
125
|
+
"doc",
|
|
126
|
+
"docx",
|
|
127
|
+
"rtf"
|
|
128
|
+
].includes(t) ? C : [
|
|
129
|
+
"yaml",
|
|
130
|
+
"yml",
|
|
131
|
+
"toml",
|
|
132
|
+
"ini",
|
|
133
|
+
"conf",
|
|
134
|
+
"config"
|
|
135
|
+
].includes(t) ? y : [
|
|
136
|
+
"png",
|
|
137
|
+
"jpg",
|
|
138
|
+
"jpeg",
|
|
139
|
+
"gif",
|
|
140
|
+
"svg",
|
|
141
|
+
"webp",
|
|
142
|
+
"ico"
|
|
143
|
+
].includes(t) ? b : [
|
|
144
|
+
"zip",
|
|
145
|
+
"tar",
|
|
146
|
+
"gz",
|
|
147
|
+
"rar",
|
|
148
|
+
"7z"
|
|
149
|
+
].includes(t) ? g : h;
|
|
150
|
+
}, A = {
|
|
151
|
+
sm: {
|
|
152
|
+
container: {
|
|
153
|
+
height: "5",
|
|
154
|
+
lineHeight: { base: "5" },
|
|
155
|
+
px: "xs"
|
|
156
|
+
},
|
|
157
|
+
iconSize: 12,
|
|
158
|
+
textStyle: "label/XS"
|
|
159
|
+
},
|
|
160
|
+
md: {
|
|
161
|
+
container: {
|
|
162
|
+
height: "6",
|
|
163
|
+
lineHeight: { base: "6" },
|
|
164
|
+
px: "xs"
|
|
165
|
+
},
|
|
166
|
+
iconSize: 14,
|
|
167
|
+
textStyle: "label/S/regular"
|
|
168
|
+
}
|
|
169
|
+
}, j = {
|
|
170
|
+
neutral: {
|
|
171
|
+
color: "fg",
|
|
172
|
+
bg: "bg.subtle",
|
|
173
|
+
borderColor: "border",
|
|
174
|
+
_hover: { bg: "bg.hover" }
|
|
175
|
+
},
|
|
176
|
+
accent: {
|
|
177
|
+
color: "var(--schub-foreground-accent)",
|
|
178
|
+
bg: "var(--schub-accent-subtle)",
|
|
179
|
+
borderColor: "var(--schub-accent-subtle)",
|
|
180
|
+
_hover: { bg: "var(--schub-accent-subtle)" }
|
|
181
|
+
}
|
|
182
|
+
}, M = "md", N = "neutral", P = (t) => {
|
|
183
|
+
let r = l(39), i, a, o, f, p, m, h, g;
|
|
184
|
+
r[0] === t ? (i = r[1], a = r[2], o = r[3], f = r[4], p = r[5], m = r[6], h = r[7], g = r[8]) : ({fileName: i, onSelect: f, onRemove: o, size: m, tone: h, icon: a, tooltip: g, ...p} = t, r[0] = t, r[1] = i, r[2] = a, r[3] = o, r[4] = f, r[5] = p, r[6] = m, r[7] = h, r[8] = g);
|
|
185
|
+
let _ = m === void 0 ? M : m, v = h === void 0 ? N : h, y;
|
|
186
|
+
r[9] === i ? y = r[10] : (y = k(i), r[9] = i, r[10] = y);
|
|
187
|
+
let b = y, x = A[_], S = j[v], C = f ? "pointer" : "default", T;
|
|
188
|
+
r[11] !== i || r[12] !== f ? (T = (e) => {
|
|
189
|
+
e.stopPropagation(), f?.(i);
|
|
190
|
+
}, r[11] = i, r[12] = f, r[13] = T) : T = r[13];
|
|
191
|
+
let E;
|
|
192
|
+
r[14] !== b || r[15] !== a || r[16] !== x.iconSize ? (E = a ?? /* @__PURE__ */ u(b, { size: x.iconSize }), r[14] = b, r[15] = a, r[16] = x.iconSize, r[17] = E) : E = r[17];
|
|
193
|
+
let D;
|
|
194
|
+
r[18] === E ? D = r[19] : (D = /* @__PURE__ */ u(c.span, {
|
|
195
|
+
display: "inline-flex",
|
|
196
|
+
flexShrink: 0,
|
|
197
|
+
children: E
|
|
198
|
+
}), r[18] = E, r[19] = D);
|
|
199
|
+
let O = g ?? i, P;
|
|
200
|
+
r[20] === Symbol.for("react.memo_cache_sentinel") ? (P = { base: "14rem" }, r[20] = P) : P = r[20];
|
|
201
|
+
let F;
|
|
202
|
+
r[21] !== i || r[22] !== x.textStyle ? (F = /* @__PURE__ */ u(s, {
|
|
203
|
+
maxW: P,
|
|
204
|
+
textOverflow: "ellipsis",
|
|
205
|
+
whiteSpace: "nowrap",
|
|
206
|
+
overflow: "hidden",
|
|
207
|
+
textStyle: x.textStyle,
|
|
208
|
+
children: i
|
|
209
|
+
}), r[21] = i, r[22] = x.textStyle, r[23] = F) : F = r[23];
|
|
210
|
+
let I;
|
|
211
|
+
r[24] !== O || r[25] !== F ? (I = /* @__PURE__ */ u(e, {
|
|
212
|
+
content: O,
|
|
213
|
+
children: F
|
|
214
|
+
}), r[24] = O, r[25] = F, r[26] = I) : I = r[26];
|
|
215
|
+
let L;
|
|
216
|
+
r[27] !== i || r[28] !== o ? (L = o && /* @__PURE__ */ u(n, {
|
|
217
|
+
"aria-label": `Remove ${i}`,
|
|
218
|
+
size: "2xs",
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
_hover: { bg: "transparent" },
|
|
221
|
+
onClick: (e) => {
|
|
222
|
+
e.stopPropagation(), o?.(i);
|
|
223
|
+
},
|
|
224
|
+
children: /* @__PURE__ */ u(w, { size: 12 })
|
|
225
|
+
}), r[27] = i, r[28] = o, r[29] = L) : L = r[29];
|
|
226
|
+
let R;
|
|
227
|
+
return r[30] !== p || r[31] !== x.container || r[32] !== I || r[33] !== L || r[34] !== C || r[35] !== T || r[36] !== D || r[37] !== S ? (R = /* @__PURE__ */ d(c.span, {
|
|
228
|
+
display: "flex",
|
|
229
|
+
flexDirection: "row",
|
|
230
|
+
alignItems: "center",
|
|
231
|
+
borderWidth: "1px",
|
|
232
|
+
borderRadius: "xs",
|
|
233
|
+
gap: "2xs",
|
|
234
|
+
cursor: C,
|
|
235
|
+
...S,
|
|
236
|
+
...x.container,
|
|
237
|
+
onClick: T,
|
|
238
|
+
...p,
|
|
239
|
+
children: [
|
|
240
|
+
D,
|
|
241
|
+
I,
|
|
242
|
+
L
|
|
243
|
+
]
|
|
244
|
+
}), r[30] = p, r[31] = x.container, r[32] = I, r[33] = L, r[34] = C, r[35] = T, r[36] = D, r[37] = S, r[38] = R) : R = r[38], R;
|
|
245
|
+
}, F = f.forwardRef(function(e, t) {
|
|
246
|
+
let n = l(9), r, i;
|
|
247
|
+
n[0] === e ? (r = n[1], i = n[2]) : ({children: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
248
|
+
let o;
|
|
249
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ u(a.Track, {
|
|
250
|
+
height: "2px",
|
|
251
|
+
borderRadius: "0",
|
|
252
|
+
bg: "bg.muted",
|
|
253
|
+
children: /* @__PURE__ */ u(a.Range, { bg: "fg" })
|
|
254
|
+
}), n[3] = o) : o = n[3];
|
|
255
|
+
let s;
|
|
256
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ d(a.Control, { children: [o, /* @__PURE__ */ u(a.Thumbs, {
|
|
257
|
+
boxSize: "0.5rem",
|
|
258
|
+
bg: "fg",
|
|
259
|
+
borderWidth: "1px",
|
|
260
|
+
borderColor: "bg",
|
|
261
|
+
borderRadius: "none",
|
|
262
|
+
boxShadow: "none",
|
|
263
|
+
transition: "width 0.12s ease, height 0.12s ease, border-color 0.2s ease-in-out",
|
|
264
|
+
_hover: {
|
|
265
|
+
boxSize: "0.75rem",
|
|
266
|
+
borderColor: "border.accent-light"
|
|
267
|
+
},
|
|
268
|
+
_active: {
|
|
269
|
+
boxSize: "0.875rem",
|
|
270
|
+
borderColor: "border.accent-light"
|
|
271
|
+
},
|
|
272
|
+
_focusVisible: {
|
|
273
|
+
borderColor: "border.accent-light",
|
|
274
|
+
outline: "none",
|
|
275
|
+
boxShadow: "none"
|
|
276
|
+
}
|
|
277
|
+
})] }), n[4] = s) : s = n[4];
|
|
278
|
+
let c;
|
|
279
|
+
return n[5] !== r || n[6] !== t || n[7] !== i ? (c = /* @__PURE__ */ d(a.Root, {
|
|
280
|
+
ref: t,
|
|
281
|
+
variant: "solid",
|
|
282
|
+
...i,
|
|
283
|
+
children: [s, r]
|
|
284
|
+
}), n[5] = r, n[6] = t, n[7] = i, n[8] = c) : c = n[8], c;
|
|
285
|
+
}), I = f.forwardRef(function(e, t) {
|
|
286
|
+
let n = l(32), r, i, a, s, c, f, p;
|
|
287
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3], s = n[4], c = n[5], f = n[6], p = n[7]) : ({inputProps: i, children: r, rootRef: s, trackLabel: p, thumbLabel: f, disabled: c, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = s, n[5] = c, n[6] = f, n[7] = p);
|
|
288
|
+
let m = c !== void 0 && c, h = m ? "not-allowed" : "pointer", g;
|
|
289
|
+
n[8] !== i || n[9] !== t ? (g = /* @__PURE__ */ u(o.HiddenInput, {
|
|
290
|
+
ref: t,
|
|
291
|
+
...i
|
|
292
|
+
}), n[8] = i, n[9] = t, n[10] = g) : g = n[10];
|
|
293
|
+
let _;
|
|
294
|
+
n[11] === f ? _ = n[12] : (_ = f && /* @__PURE__ */ u(o.ThumbIndicator, {
|
|
295
|
+
fallback: f?.off,
|
|
296
|
+
children: f?.on
|
|
297
|
+
}), n[11] = f, n[12] = _);
|
|
298
|
+
let v;
|
|
299
|
+
n[13] === _ ? v = n[14] : (v = /* @__PURE__ */ u(o.Thumb, { children: _ }), n[13] = _, n[14] = v);
|
|
300
|
+
let y;
|
|
301
|
+
n[15] === p ? y = n[16] : (y = p && /* @__PURE__ */ u(o.Indicator, {
|
|
302
|
+
fallback: p.off,
|
|
303
|
+
children: p.on
|
|
304
|
+
}), n[15] = p, n[16] = y);
|
|
305
|
+
let b;
|
|
306
|
+
n[17] !== h || n[18] !== v || n[19] !== y ? (b = /* @__PURE__ */ d(o.Control, {
|
|
307
|
+
cursor: h,
|
|
308
|
+
children: [v, y]
|
|
309
|
+
}), n[17] = h, n[18] = v, n[19] = y, n[20] = b) : b = n[20];
|
|
310
|
+
let x;
|
|
311
|
+
n[21] !== r || n[22] !== h ? (x = r != null && /* @__PURE__ */ u(o.Label, {
|
|
312
|
+
cursor: h,
|
|
313
|
+
children: r
|
|
314
|
+
}), n[21] = r, n[22] = h, n[23] = x) : x = n[23];
|
|
315
|
+
let S;
|
|
316
|
+
return n[24] !== m || n[25] !== h || n[26] !== a || n[27] !== s || n[28] !== g || n[29] !== b || n[30] !== x ? (S = /* @__PURE__ */ d(o.Root, {
|
|
317
|
+
ref: s,
|
|
318
|
+
disabled: m,
|
|
319
|
+
cursor: h,
|
|
320
|
+
...a,
|
|
321
|
+
children: [
|
|
322
|
+
g,
|
|
323
|
+
b,
|
|
324
|
+
x
|
|
325
|
+
]
|
|
326
|
+
}), n[24] = m, n[25] = h, n[26] = a, n[27] = s, n[28] = g, n[29] = b, n[30] = x, n[31] = S) : S = n[31], S;
|
|
327
|
+
}), L = (e) => e.default ?? e, R = async () => {
|
|
328
|
+
let e = globalThis;
|
|
329
|
+
e.Prism ||= L(await import("prismjs"));
|
|
330
|
+
};
|
|
331
|
+
//#endregion
|
|
332
|
+
export { k as a, P as i, I as n, O as o, F as r, D as s, R as t };
|
|
333
|
+
|
|
334
|
+
//# sourceMappingURL=prism-OG4H7Hu4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prism-OG4H7Hu4.js","names":["Badge","chakra","IconButton","Image","Popover","Text","X","useEffect","useState","AttachmentChipProps","file","File","removeLabel","disabled","onRemove","isImage","type","startsWith","formatSize","bytes","toString","Math","round","toFixed","AttachmentChip","props","$","_c","previewUrl","setPreviewUrl","t0","t1","url","URL","createObjectURL","revokeObjectURL","t2","name","t3","placement","t4","size","t5","t6","Symbol","for","t7","t8","_c","BadgeProps","Badge","ChipProps","Omit","Chip","props","$","_c","t0","_c","LucideIcon","File","FileArchive","FileChartLine","FileCode","FileCog","FileImage","FileJson","FileSpreadsheet","FileText","getFileTypeIcon","filename","extension","split","pop","toLowerCase","includes","HTMLChakraProps","chakra","IconButton","Spacer","Text","LucideIcon","AlertTriangle","X","ReactNode","Tooltip","getFileTypeIcon","SIZE_STYLES","sm","container","height","lineHeight","base","px","iconSize","textStyle","md","const","TONE_STYLES","neutral","color","bg","borderColor","_hover","accent","MissingResourceBadgeProps","referenceId","onRemove","MissingResourceBadge","props","$","_c","t0","Symbol","for","t1","t2","t3","t4","t5","e","stopPropagation","t6","ResourceBadgeSize","ResourceBadgeTone","ResourceBadgeProps","Omit","fileName","onSelect","size","tone","icon","tooltip","DEFAULT_SIZE","DEFAULT_TONE","ResourceBadge","rest","undefined","IconComp","sizeStyles","toneStyles","t7","t8","t9","t10","t11","e_0","t12","_c","Tooltip","Slider","ChakraSlider","React","SliderProps","RootProps","forwardRef","HTMLDivElement","props","ref","$","_c","children","rest","t0","Symbol","for","t1","boxSize","borderColor","outline","boxShadow","t2","Slider","_c","ChakraSlider","Switch","ChakraSwitch","React","SwitchProps","RootProps","inputProps","InputHTMLAttributes","HTMLInputElement","rootRef","RefObject","HTMLLabelElement","trackLabel","on","ReactNode","off","thumbLabel","forwardRef","props","ref","$","_c","children","rest","t0","disabled","undefined","interactiveCursor","t1","t2","t3","t4","t5","t6","t7","Switch","_c","ChakraSwitch","readDefaultExport","module","default","installPrismGlobal","globalScope","globalThis","Prism","prismModule","Tooltip$1","React","isImage","file","formatSize","bytes","AttachmentChip","$","c","props","previewUrl","setPreviewUrl","useState","t0","t1","url","useEffect","t2","Text","name","t3","Popover","chakra","Image","t4","t5","t6","X","t7","disabled","onRemove","removeLabel","IconButton","t8","Badge","Chip","getFileTypeIcon","extension","filename","FileSpreadsheet","FileCode","FileChartLine","FileJson","FileText","FileCog","FileImage","FileArchive","File","SIZE_STYLES","TONE_STYLES","DEFAULT_SIZE","DEFAULT_TONE","ResourceBadge","fileName","icon","onSelect","rest","tooltip","size","tone","IconComp","sizeStyles","toneStyles","t9","t10","t11","e_0","t12","Slider$1","children","Slider","ref","Switch$1","inputProps","rootRef","thumbLabel","trackLabel","interactiveCursor","Switch","readDefaultExport","module","installPrismGlobal","globalScope"],"sources":["../src/components/overlays/attachment-chip.tsx","../src/components/primitives/chip.tsx","../src/utils/get-file-type-icon.ts","../src/components/primitives/resource-badge.tsx","../src/components/primitives/slider.tsx","../src/components/primitives/switch.tsx","../src/utils/prism.ts"],"sourcesContent":["import { Badge, chakra, IconButton, Image, Popover, Text } from \"@chakra-ui/react\";\nimport { X } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\n\nexport interface AttachmentChipProps {\n file: File;\n /** Accessible label for the remove control; the caller owns translation. */\n removeLabel: string;\n disabled?: boolean;\n onRemove: () => void;\n}\n\nconst isImage = (file: File) => file.type.startsWith(\"image/\");\n\nconst formatSize = (bytes: number) => {\n if (bytes < 1024) return `${bytes.toString()} B`;\n if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024).toString()} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n};\n\n/**\n * A file queued for upload, before the resource it belongs to exists. Removal\n * lives on the chip because there is no other surface between picking a file\n * and submitting where a mistaken attachment can be taken back.\n */\nexport const AttachmentChip = (props: AttachmentChipProps) => {\n const { file, removeLabel, disabled, onRemove } = props;\n const [previewUrl, setPreviewUrl] = useState<string | null>(null);\n\n // Object URLs are only needed for image previews; revoke on unmount/file swap\n // so we don't leak blobs while the dialog is open.\n useEffect(() => {\n if (!isImage(file)) return;\n const url = URL.createObjectURL(file);\n setPreviewUrl(url);\n return () => URL.revokeObjectURL(url);\n }, [file]);\n\n const name = (\n <Text as=\"span\" textStyle=\"label/XS/medium\" lineClamp={1} maxW=\"180px\">\n {file.name}\n </Text>\n );\n\n return (\n <Badge variant=\"chip\" gap=\"2xs\" pr=\"2xs\">\n {previewUrl ? (\n <Popover.Root positioning={{ placement: \"top\" }}>\n <Popover.Trigger asChild>\n <chakra.button type=\"button\" cursor=\"pointer\" minW=\"0\" display=\"inline-flex\">\n {name}\n </chakra.button>\n </Popover.Trigger>\n <Popover.Positioner>\n <Popover.Content w=\"auto\" p=\"2xs\" bg=\"bg\">\n <Image src={previewUrl} alt={file.name} maxW=\"240px\" maxH=\"240px\" borderRadius=\"sm\" />\n </Popover.Content>\n </Popover.Positioner>\n </Popover.Root>\n ) : (\n name\n )}\n <Text as=\"span\" textStyle=\"label/XS/regular\" color=\"fg.subtle\">\n {formatSize(file.size)}\n </Text>\n <IconButton size=\"2xs\" variant=\"ghost\" aria-label={removeLabel} disabled={disabled} onClick={onRemove}>\n <X size={12} />\n </IconButton>\n </Badge>\n );\n};\n","import type { BadgeProps } from \"@chakra-ui/react\";\nimport { Badge } from \"@chakra-ui/react\";\n\nexport interface ChipProps extends Omit<BadgeProps, \"size\" | \"variant\"> {}\n\nexport const Chip = (props: ChipProps) => <Badge size=\"sm\" variant=\"chip\" {...props} />;\n","import type { LucideIcon } from \"lucide-react\";\nimport {\n File,\n FileArchive,\n FileChartLine,\n FileCode,\n FileCog,\n FileImage,\n FileJson,\n FileSpreadsheet,\n FileText,\n} from \"lucide-react\";\n\nexport const getFileTypeIcon = (filename: string): LucideIcon => {\n const extension = filename.split(\".\").pop()?.toLowerCase() ?? \"\";\n\n if ([\"csv\", \"tsv\", \"xlsx\", \"xls\", \"parquet\"].includes(extension)) return FileSpreadsheet;\n if (\n [\n \"sql\",\n \"py\",\n \"js\",\n \"ts\",\n \"jsx\",\n \"tsx\",\n \"java\",\n \"cpp\",\n \"c\",\n \"h\",\n \"css\",\n \"scss\",\n \"sass\",\n \"php\",\n \"rb\",\n \"go\",\n \"rs\",\n \"kt\",\n \"swift\",\n ].includes(extension)\n ) {\n return FileCode;\n }\n if ([\"json\", \"jsonl\", \"ndjson\"].includes(extension)) {\n if (filename.includes(\"/visualizations/\")) return FileChartLine;\n return FileJson;\n }\n if ([\"md\", \"txt\", \"rst\", \"org\", \"pdf\", \"doc\", \"docx\", \"rtf\"].includes(extension)) return FileText;\n if ([\"yaml\", \"yml\", \"toml\", \"ini\", \"conf\", \"config\"].includes(extension)) return FileCog;\n if ([\"png\", \"jpg\", \"jpeg\", \"gif\", \"svg\", \"webp\", \"ico\"].includes(extension)) return FileImage;\n if ([\"zip\", \"tar\", \"gz\", \"rar\", \"7z\"].includes(extension)) return FileArchive;\n return File;\n};\n","import type { HTMLChakraProps } from \"@chakra-ui/react\";\nimport { chakra, IconButton, Spacer, Text } from \"@chakra-ui/react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { AlertTriangle, X } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { Tooltip } from \"@/components/primitives/tooltip\";\nimport { getFileTypeIcon } from \"@/utils/get-file-type-icon\";\n\nconst SIZE_STYLES = {\n sm: {\n container: {\n height: \"5\",\n lineHeight: { base: \"5\" },\n px: \"xs\",\n },\n iconSize: 12,\n textStyle: \"label/XS\",\n },\n md: {\n container: {\n height: \"6\",\n lineHeight: { base: \"6\" },\n px: \"xs\",\n },\n iconSize: 14,\n textStyle: \"label/S/regular\",\n },\n} as const;\n\nconst TONE_STYLES = {\n neutral: {\n color: \"fg\",\n bg: \"bg.subtle\",\n borderColor: \"border\",\n _hover: {\n bg: \"bg.hover\",\n },\n },\n accent: {\n color: \"var(--schub-foreground-accent)\",\n bg: \"var(--schub-accent-subtle)\",\n borderColor: \"var(--schub-accent-subtle)\",\n _hover: {\n bg: \"var(--schub-accent-subtle)\",\n },\n },\n} as const;\n\nexport interface MissingResourceBadgeProps {\n referenceId: string;\n onRemove?: (referenceId: string) => void;\n}\n\n/**\n * Shown when a reference points to a resource that no longer exists\n */\nexport const MissingResourceBadge = (props: MissingResourceBadgeProps) => {\n const { referenceId, onRemove } = props;\n return (\n <chakra.span\n height=\"24px\"\n lineHeight={{ base: \"24px\" }}\n gap=\"2xs\"\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingX=\"xs\"\n borderRadius=\"9999px\"\n color=\"blacks.50\"\n bg=\"red.500\"\n _hover={{\n bg: \"red.600\",\n }}\n >\n <chakra.span mr=\"xs\" display=\"inline-flex\">\n <AlertTriangle size={14} />\n </chakra.span>\n <Text maxW={{ base: \"17.5rem\" }} textOverflow=\"ellipsis\" whiteSpace=\"nowrap\" overflow=\"hidden\">\n Missing Reference\n </Text>\n <Spacer />\n {onRemove && (\n <IconButton\n color=\"blacks.50\"\n aria-label=\"Remove reference\"\n size=\"2xs\"\n ml=\"sm\"\n variant=\"ghost\"\n _hover={{\n bg: \"transparent\",\n }}\n onClick={(e) => {\n e.stopPropagation();\n onRemove?.(referenceId);\n }}\n >\n <X size={12} />\n </IconButton>\n )}\n </chakra.span>\n );\n};\n\nexport type ResourceBadgeSize = keyof typeof SIZE_STYLES;\nexport type ResourceBadgeTone = keyof typeof TONE_STYLES;\n\nexport interface ResourceBadgeProps extends Omit<HTMLChakraProps<\"span\">, \"onSelect\"> {\n fileName: string;\n onRemove?: (fileName: string) => void;\n onSelect?: (fileName: string) => void;\n size?: ResourceBadgeSize;\n tone?: ResourceBadgeTone;\n icon?: ReactNode;\n tooltip?: string;\n}\n\nconst DEFAULT_SIZE: ResourceBadgeSize = \"md\";\nconst DEFAULT_TONE: ResourceBadgeTone = \"neutral\";\n\nexport const ResourceBadge = (props: ResourceBadgeProps) => {\n const { fileName, onSelect, onRemove, size = DEFAULT_SIZE, tone = DEFAULT_TONE, icon, tooltip, ...rest } = props;\n const IconComp: LucideIcon = getFileTypeIcon(fileName);\n const sizeStyles = SIZE_STYLES[size];\n const toneStyles = TONE_STYLES[tone];\n\n return (\n <chakra.span\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n borderWidth=\"1px\"\n borderRadius=\"xs\"\n gap=\"2xs\"\n cursor={onSelect ? \"pointer\" : \"default\"}\n {...toneStyles}\n {...sizeStyles.container}\n onClick={(e) => {\n e.stopPropagation();\n onSelect?.(fileName);\n }}\n {...rest}\n >\n <chakra.span display=\"inline-flex\" flexShrink={0}>\n {icon ?? <IconComp size={sizeStyles.iconSize} />}\n </chakra.span>\n <Tooltip content={tooltip ?? fileName}>\n <Text\n maxW={{ base: \"14rem\" }}\n textOverflow=\"ellipsis\"\n whiteSpace=\"nowrap\"\n overflow=\"hidden\"\n textStyle={sizeStyles.textStyle}\n >\n {fileName}\n </Text>\n </Tooltip>\n {onRemove && (\n <IconButton\n aria-label={`Remove ${fileName}`}\n size=\"2xs\"\n variant=\"ghost\"\n _hover={{\n bg: \"transparent\",\n }}\n onClick={(e) => {\n e.stopPropagation();\n onRemove?.(fileName);\n }}\n >\n <X size={12} />\n </IconButton>\n )}\n </chakra.span>\n );\n};\n","import { Slider as ChakraSlider } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface SliderProps extends ChakraSlider.RootProps {}\n\nexport const Slider = React.forwardRef<HTMLDivElement, SliderProps>(function Slider(props, ref) {\n const { children, ...rest } = props;\n\n return (\n <ChakraSlider.Root ref={ref} variant=\"solid\" {...rest}>\n <ChakraSlider.Control>\n <ChakraSlider.Track height=\"2px\" borderRadius=\"0\" bg=\"bg.muted\">\n <ChakraSlider.Range bg=\"fg\" />\n </ChakraSlider.Track>\n <ChakraSlider.Thumbs\n boxSize=\"0.5rem\"\n bg=\"fg\"\n borderWidth=\"1px\"\n borderColor=\"bg\"\n borderRadius=\"none\"\n boxShadow=\"none\"\n transition=\"width 0.12s ease, height 0.12s ease, border-color 0.2s ease-in-out\"\n _hover={{ boxSize: \"0.75rem\", borderColor: \"border.accent-light\" }}\n _active={{ boxSize: \"0.875rem\", borderColor: \"border.accent-light\" }}\n _focusVisible={{ borderColor: \"border.accent-light\", outline: \"none\", boxShadow: \"none\" }}\n />\n </ChakraSlider.Control>\n {children}\n </ChakraSlider.Root>\n );\n});\n","import { Switch as ChakraSwitch } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface SwitchProps extends ChakraSwitch.RootProps {\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n rootRef?: React.RefObject<HTMLLabelElement | null>;\n trackLabel?: { on: React.ReactNode; off: React.ReactNode };\n thumbLabel?: { on: React.ReactNode; off: React.ReactNode };\n}\n\nexport const Switch = React.forwardRef<HTMLInputElement, SwitchProps>(function Switch(props, ref) {\n const { inputProps, children, rootRef, trackLabel, thumbLabel, disabled = false, ...rest } = props;\n const interactiveCursor = disabled ? \"not-allowed\" : \"pointer\";\n\n return (\n <ChakraSwitch.Root ref={rootRef} disabled={disabled} cursor={interactiveCursor} {...rest}>\n <ChakraSwitch.HiddenInput ref={ref} {...inputProps} />\n <ChakraSwitch.Control cursor={interactiveCursor}>\n <ChakraSwitch.Thumb>\n {thumbLabel && (\n <ChakraSwitch.ThumbIndicator fallback={thumbLabel?.off}>{thumbLabel?.on}</ChakraSwitch.ThumbIndicator>\n )}\n </ChakraSwitch.Thumb>\n {trackLabel && <ChakraSwitch.Indicator fallback={trackLabel.off}>{trackLabel.on}</ChakraSwitch.Indicator>}\n </ChakraSwitch.Control>\n {children != null && <ChakraSwitch.Label cursor={interactiveCursor}>{children}</ChakraSwitch.Label>}\n </ChakraSwitch.Root>\n );\n});\n","const readDefaultExport = (module: { default?: unknown }) => module.default ?? module;\n\nexport const installPrismGlobal = async () => {\n const globalScope = globalThis as typeof globalThis & { Prism?: unknown };\n if (globalScope.Prism) return;\n\n const prismModule = await import(\"prismjs\");\n globalScope.Prism = readDefaultExport(prismModule);\n};\n"],"mappings":";;;;;;;;AAYA,IAA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EAAwB5B,KAAAA;EAAmBgB;EAAkBE,QAAAA;EAAiB,GAAMJ;EAApF,UAAA;GACEK;GACAI;GAQCC;EACH;KAAoBb,EAAA,MAAAK,GAAAL,EAAA,MAAAO,GAAAP,EAAA,MAAAG,GAAAH,EAAA,MAAAX,GAAAW,EAAA,MAAAQ,GAAAR,EAAA,MAAAY,GAAAZ,EAAA,MAAAa,GAAAb,EAAA,MAAAc,KAAAA,IAAAd,EAAA,KAXpBc;AAWoB,CAEvB,GC5BKI,KAAqBC,MAAkCA,EAAOC,WAAWD,GAElEE,IAAqB,YAAY;CAC5C,IAAMC,IAAcC;CACpB,AAGAD,EAAYE,UAAQN,EAAkBO,MADZ,OAAO,UACgB;AACnD"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { defineRecipe as e, defineSlotRecipe as t } from "@chakra-ui/react";
|
|
2
|
+
//#region src/theme/recipes/chat-question-bubble.ts
|
|
3
|
+
var n = e({
|
|
4
|
+
base: {
|
|
5
|
+
display: "flex",
|
|
6
|
+
flexWrap: "wrap",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
gap: "xs",
|
|
9
|
+
px: "sm",
|
|
10
|
+
py: "xs",
|
|
11
|
+
width: "fit-content",
|
|
12
|
+
maxWidth: "full",
|
|
13
|
+
textAlign: "left",
|
|
14
|
+
textStyle: "label/S/regular",
|
|
15
|
+
borderRadius: "xs",
|
|
16
|
+
border: "border",
|
|
17
|
+
borderColor: "border",
|
|
18
|
+
color: "fg",
|
|
19
|
+
bg: "bg.subtle",
|
|
20
|
+
cursor: "pointer",
|
|
21
|
+
_hover: { bg: "bg.hover" },
|
|
22
|
+
_expanded: {
|
|
23
|
+
bg: "bg.active",
|
|
24
|
+
borderColor: "border.accent"
|
|
25
|
+
},
|
|
26
|
+
_focusVisible: {
|
|
27
|
+
outline: "2px solid {colors.border.accent}",
|
|
28
|
+
outlineOffset: "2px"
|
|
29
|
+
},
|
|
30
|
+
"& [data-question-text]": {
|
|
31
|
+
minWidth: "0",
|
|
32
|
+
maxWidth: "full",
|
|
33
|
+
whiteSpace: "pre-wrap",
|
|
34
|
+
overflowWrap: "anywhere"
|
|
35
|
+
},
|
|
36
|
+
"& [data-question-answer-row]": {
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
gap: "xs",
|
|
40
|
+
maxWidth: "full"
|
|
41
|
+
},
|
|
42
|
+
"& [data-question-answer]": {
|
|
43
|
+
color: "fg.muted",
|
|
44
|
+
fontWeight: "medium",
|
|
45
|
+
overflowWrap: "anywhere",
|
|
46
|
+
minWidth: "0"
|
|
47
|
+
},
|
|
48
|
+
"& svg": {
|
|
49
|
+
width: "3",
|
|
50
|
+
height: "3",
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
color: "fg.muted"
|
|
53
|
+
},
|
|
54
|
+
"&[data-state=answered]": {
|
|
55
|
+
cursor: "default",
|
|
56
|
+
_hover: { bg: "bg.subtle" },
|
|
57
|
+
"& [data-question-answer]": { color: "fg" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
variants: { multiline: { true: {
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
alignItems: "start"
|
|
63
|
+
} } }
|
|
64
|
+
}), r = t({
|
|
65
|
+
slots: [
|
|
66
|
+
"root",
|
|
67
|
+
"row",
|
|
68
|
+
"actions",
|
|
69
|
+
"sendNow",
|
|
70
|
+
"draft",
|
|
71
|
+
"notice",
|
|
72
|
+
"handle",
|
|
73
|
+
"content",
|
|
74
|
+
"sendNowHit"
|
|
75
|
+
],
|
|
76
|
+
base: {
|
|
77
|
+
content: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
gap: "2xs",
|
|
81
|
+
textAlign: "left",
|
|
82
|
+
bg: "transparent",
|
|
83
|
+
border: 0,
|
|
84
|
+
p: 0,
|
|
85
|
+
color: "inherit",
|
|
86
|
+
cursor: "pointer",
|
|
87
|
+
width: "full",
|
|
88
|
+
_focusVisible: {
|
|
89
|
+
outline: "2px solid {colors.border.accent}",
|
|
90
|
+
outlineOffset: "2px"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
sendNowHit: {
|
|
94
|
+
position: "absolute",
|
|
95
|
+
bottom: "100%",
|
|
96
|
+
insetX: 0,
|
|
97
|
+
h: "touch-target",
|
|
98
|
+
zIndex: 2
|
|
99
|
+
},
|
|
100
|
+
handle: {
|
|
101
|
+
touchAction: "none",
|
|
102
|
+
cursor: "grab",
|
|
103
|
+
flexShrink: 0
|
|
104
|
+
},
|
|
105
|
+
root: {
|
|
106
|
+
position: "relative",
|
|
107
|
+
minH: "0",
|
|
108
|
+
flexShrink: 1,
|
|
109
|
+
border: "border",
|
|
110
|
+
borderBottomWidth: "0",
|
|
111
|
+
borderTopRadius: "xs",
|
|
112
|
+
bg: "bg",
|
|
113
|
+
"&[data-send-now-visible=true]": { borderTopRadius: "0" }
|
|
114
|
+
},
|
|
115
|
+
row: {
|
|
116
|
+
position: "relative",
|
|
117
|
+
display: "flex",
|
|
118
|
+
gap: "xs",
|
|
119
|
+
alignItems: "start",
|
|
120
|
+
px: "xs",
|
|
121
|
+
py: "xs",
|
|
122
|
+
borderBottom: "border.subtle",
|
|
123
|
+
textStyle: "label/S/regular",
|
|
124
|
+
color: "fg",
|
|
125
|
+
cursor: "pointer",
|
|
126
|
+
"&[data-drag-source=true]": { opacity: .5 },
|
|
127
|
+
"&[data-combine-target=true]": {
|
|
128
|
+
bg: "bg.button.primary.default",
|
|
129
|
+
color: "fg.button.primary.default"
|
|
130
|
+
},
|
|
131
|
+
_focusVisible: {
|
|
132
|
+
outline: "2px solid {colors.border.accent}",
|
|
133
|
+
outlineOffset: "-2px"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
actions: {
|
|
137
|
+
pe: "2xs",
|
|
138
|
+
opacity: 0,
|
|
139
|
+
pointerEvents: "none",
|
|
140
|
+
"&[data-visible=true]": {
|
|
141
|
+
opacity: 1,
|
|
142
|
+
pointerEvents: "auto"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
sendNow: {
|
|
146
|
+
position: "absolute",
|
|
147
|
+
bottom: "0",
|
|
148
|
+
insetX: "0",
|
|
149
|
+
height: "queue-send-now",
|
|
150
|
+
borderTopRadius: "xs",
|
|
151
|
+
borderBottomRadius: "0",
|
|
152
|
+
borderWidth: "1px",
|
|
153
|
+
borderBottomWidth: "0",
|
|
154
|
+
borderStyle: "solid",
|
|
155
|
+
borderColor: "transparent",
|
|
156
|
+
backgroundImage: "linear-gradient(to right, {colors.border} 4px, transparent 4px), linear-gradient(to bottom, {colors.border} 4px, transparent 4px), linear-gradient(to bottom, {colors.border} 4px, transparent 4px)",
|
|
157
|
+
backgroundSize: "8px 1px, 1px 8px, 1px 8px",
|
|
158
|
+
backgroundRepeat: "repeat-x, repeat-y, repeat-y",
|
|
159
|
+
backgroundPosition: "top left, top left, top right",
|
|
160
|
+
backgroundOrigin: "border-box",
|
|
161
|
+
bg: "transparent",
|
|
162
|
+
color: "fg.muted",
|
|
163
|
+
display: "flex",
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
justifyContent: "center",
|
|
166
|
+
gap: "2xs",
|
|
167
|
+
textStyle: "label/XS",
|
|
168
|
+
zIndex: 2,
|
|
169
|
+
"&::before": {
|
|
170
|
+
content: "\"\"",
|
|
171
|
+
position: "absolute",
|
|
172
|
+
insetX: "0",
|
|
173
|
+
bottom: "0",
|
|
174
|
+
height: "touch-target"
|
|
175
|
+
},
|
|
176
|
+
"&[data-targeted=true]": {
|
|
177
|
+
bg: "bg.button.primary.default",
|
|
178
|
+
color: "fg.button.primary.default",
|
|
179
|
+
backgroundImage: "none",
|
|
180
|
+
borderStyle: "solid",
|
|
181
|
+
borderColor: "fg.button.primary.default/30"
|
|
182
|
+
},
|
|
183
|
+
"&[aria-disabled=true]": { color: "fg.subtle" }
|
|
184
|
+
},
|
|
185
|
+
draft: {
|
|
186
|
+
border: "border",
|
|
187
|
+
borderTopWidth: "0",
|
|
188
|
+
borderBottomRadius: "xs",
|
|
189
|
+
px: "xs",
|
|
190
|
+
py: "xs",
|
|
191
|
+
bg: "bg",
|
|
192
|
+
color: "fg.muted",
|
|
193
|
+
textStyle: "label/S/regular",
|
|
194
|
+
cursor: "pointer",
|
|
195
|
+
textAlign: "left"
|
|
196
|
+
},
|
|
197
|
+
notice: {
|
|
198
|
+
px: "xs",
|
|
199
|
+
py: "2xs",
|
|
200
|
+
color: "fg.error",
|
|
201
|
+
textStyle: "label/S/regular"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
//#endregion
|
|
206
|
+
export { n, r as t };
|
|
207
|
+
|
|
208
|
+
//# sourceMappingURL=queued-follow-up-Bj_vtMgd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queued-follow-up-Bj_vtMgd.js","names":["defineRecipe","chatQuestionBubbleRecipe","base","display","flexWrap","alignItems","gap","px","py","width","maxWidth","textAlign","textStyle","borderRadius","border","borderColor","color","bg","cursor","_hover","_expanded","_focusVisible","outline","outlineOffset","minWidth","whiteSpace","overflowWrap","fontWeight","height","flexShrink","variants","multiline","true","flexDirection","defineSlotRecipe","queuedFollowUpRecipe","slots","base","content","display","flexDirection","gap","textAlign","bg","border","p","color","cursor","width","_focusVisible","outline","outlineOffset","sendNowHit","position","bottom","insetX","h","zIndex","handle","touchAction","flexShrink","root","minH","borderBottomWidth","borderTopRadius","row","alignItems","px","py","borderBottom","textStyle","opacity","actions","pe","pointerEvents","sendNow","height","borderBottomRadius","borderWidth","borderStyle","borderColor","backgroundImage","backgroundSize","backgroundRepeat","backgroundPosition","backgroundOrigin","justifyContent","draft","borderTopWidth","notice","chatQuestionBubbleRecipe","defineRecipe","queuedFollowUpRecipe","defineSlotRecipe"],"sources":["../src/theme/recipes/chat-question-bubble.ts","../src/theme/recipes/queued-follow-up.ts"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const chatQuestionBubbleRecipe = defineRecipe({\n base: {\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \"xs\",\n px: \"sm\",\n py: \"xs\",\n width: \"fit-content\",\n maxWidth: \"full\",\n textAlign: \"left\",\n textStyle: \"label/S/regular\",\n borderRadius: \"xs\",\n border: \"border\",\n borderColor: \"border\",\n color: \"fg\",\n bg: \"bg.subtle\",\n cursor: \"pointer\",\n _hover: { bg: \"bg.hover\" },\n _expanded: { bg: \"bg.active\", borderColor: \"border.accent\" },\n _focusVisible: { outline: \"2px solid {colors.border.accent}\", outlineOffset: \"2px\" },\n \"& [data-question-text]\": { minWidth: \"0\", maxWidth: \"full\", whiteSpace: \"pre-wrap\", overflowWrap: \"anywhere\" },\n \"& [data-question-answer-row]\": { display: \"flex\", alignItems: \"center\", gap: \"xs\", maxWidth: \"full\" },\n \"& [data-question-answer]\": { color: \"fg.muted\", fontWeight: \"medium\", overflowWrap: \"anywhere\", minWidth: \"0\" },\n \"& svg\": { width: \"3\", height: \"3\", flexShrink: 0, color: \"fg.muted\" },\n \"&[data-state=answered]\": {\n cursor: \"default\",\n _hover: { bg: \"bg.subtle\" },\n \"& [data-question-answer]\": { color: \"fg\" },\n },\n },\n variants: {\n multiline: {\n true: { flexDirection: \"column\", alignItems: \"start\" },\n },\n },\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nexport const queuedFollowUpRecipe = defineSlotRecipe({\n slots: [\"root\", \"row\", \"actions\", \"sendNow\", \"draft\", \"notice\", \"handle\", \"content\", \"sendNowHit\"],\n base: {\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"2xs\",\n textAlign: \"left\",\n bg: \"transparent\",\n border: 0,\n p: 0,\n color: \"inherit\",\n cursor: \"pointer\",\n width: \"full\",\n _focusVisible: { outline: \"2px solid {colors.border.accent}\", outlineOffset: \"2px\" },\n },\n sendNowHit: { position: \"absolute\", bottom: \"100%\", insetX: 0, h: \"touch-target\", zIndex: 2 },\n handle: { touchAction: \"none\", cursor: \"grab\", flexShrink: 0 },\n root: {\n position: \"relative\",\n minH: \"0\",\n flexShrink: 1,\n border: \"border\",\n borderBottomWidth: \"0\",\n borderTopRadius: \"xs\",\n bg: \"bg\",\n \"&[data-send-now-visible=true]\": { borderTopRadius: \"0\" },\n },\n row: {\n position: \"relative\",\n display: \"flex\",\n gap: \"xs\",\n alignItems: \"start\",\n px: \"xs\",\n py: \"xs\",\n borderBottom: \"border.subtle\",\n textStyle: \"label/S/regular\",\n color: \"fg\",\n cursor: \"pointer\",\n \"&[data-drag-source=true]\": { opacity: 0.5 },\n \"&[data-combine-target=true]\": { bg: \"bg.button.primary.default\", color: \"fg.button.primary.default\" },\n _focusVisible: { outline: \"2px solid {colors.border.accent}\", outlineOffset: \"-2px\" },\n },\n actions: {\n pe: \"2xs\",\n opacity: 0,\n pointerEvents: \"none\",\n \"&[data-visible=true]\": { opacity: 1, pointerEvents: \"auto\" },\n },\n sendNow: {\n position: \"absolute\",\n bottom: \"0\",\n insetX: \"0\",\n height: \"queue-send-now\",\n borderTopRadius: \"xs\",\n borderBottomRadius: \"0\",\n borderWidth: \"1px\",\n borderBottomWidth: \"0\",\n borderStyle: \"solid\",\n borderColor: \"transparent\",\n backgroundImage:\n \"linear-gradient(to right, {colors.border} 4px, transparent 4px), linear-gradient(to bottom, {colors.border} 4px, transparent 4px), linear-gradient(to bottom, {colors.border} 4px, transparent 4px)\",\n backgroundSize: \"8px 1px, 1px 8px, 1px 8px\",\n backgroundRepeat: \"repeat-x, repeat-y, repeat-y\",\n backgroundPosition: \"top left, top left, top right\",\n backgroundOrigin: \"border-box\",\n bg: \"transparent\",\n color: \"fg.muted\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"2xs\",\n textStyle: \"label/XS\",\n zIndex: 2,\n \"&::before\": { content: '\"\"', position: \"absolute\", insetX: \"0\", bottom: \"0\", height: \"touch-target\" },\n \"&[data-targeted=true]\": {\n bg: \"bg.button.primary.default\",\n color: \"fg.button.primary.default\",\n backgroundImage: \"none\",\n borderStyle: \"solid\",\n borderColor: \"fg.button.primary.default/30\",\n },\n \"&[aria-disabled=true]\": { color: \"fg.subtle\" },\n },\n draft: {\n border: \"border\",\n borderTopWidth: \"0\",\n borderBottomRadius: \"xs\",\n px: \"xs\",\n py: \"xs\",\n bg: \"bg\",\n color: \"fg.muted\",\n textStyle: \"label/S/regular\",\n cursor: \"pointer\",\n textAlign: \"left\",\n },\n notice: { px: \"xs\", py: \"2xs\", color: \"fg.error\", textStyle: \"label/S/regular\" },\n },\n});\n"],"mappings":";;AAEA,IAAaC,IAA2BD,EAAa;CACnDE,MAAM;EACJC,SAAS;EACTC,UAAU;EACVC,YAAY;EACZC,KAAK;EACLC,IAAI;EACJC,IAAI;EACJC,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,cAAc;EACdC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,QAAQ,EAAEF,IAAI,WAAW;EACzBG,WAAW;GAAEH,IAAI;GAAaF,aAAa;EAAgB;EAC3DM,eAAe;GAAEC,SAAS;GAAoCC,eAAe;EAAM;EACnF,0BAA0B;GAAEC,UAAU;GAAKd,UAAU;GAAQe,YAAY;GAAYC,cAAc;EAAW;EAC9G,gCAAgC;GAAEvB,SAAS;GAAQE,YAAY;GAAUC,KAAK;GAAMI,UAAU;EAAO;EACrG,4BAA4B;GAAEM,OAAO;GAAYW,YAAY;GAAUD,cAAc;GAAYF,UAAU;EAAI;EAC/G,SAAS;GAAEf,OAAO;GAAKmB,QAAQ;GAAKC,YAAY;GAAGb,OAAO;EAAW;EACrE,0BAA0B;GACxBE,QAAQ;GACRC,QAAQ,EAAEF,IAAI,YAAY;GAC1B,4BAA4B,EAAED,OAAO,KAAK;EAC5C;CACF;CACAc,UAAU,EACRC,WAAW,EACTC,MAAM;EAAEC,eAAe;EAAU5B,YAAY;CAAQ,EACvD,EACF;AACF,CA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