@lumerahq/ui 0.21.1 → 0.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/{RecordSheet-CXRyQ-f4.js → RecordSheet-C8dir0Jk.js} +152 -86
- package/dist/components/agent-chat/ActivityStrip.d.ts.map +1 -1
- package/dist/components/agent-chat/Markdown.d.ts.map +1 -1
- package/dist/components/agent-chat/chat-markdown.d.ts +5 -0
- package/dist/components/agent-chat/chat-markdown.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{highlighted-body-OFNGDK62-SNNtuMQ-.js → highlighted-body-OFNGDK62-B8vEiteo.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/mermaid-GHXKKRXX-B7c_UL36.js +4 -0
- package/dist/ui.css +12 -0
- package/package.json +1 -1
- package/dist/mermaid-GHXKKRXX-CljtQFU4.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `@lumerahq/ui`. Earlier releases are not documented here.
|
|
4
4
|
|
|
5
|
+
## 0.21.3
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Agent chat no longer loads images from other sites. Agents read outside content, so injected instructions could make one write an image whose URL carries data from the conversation, and the browser would send it as soon as the message showed. An image in a message now loads only from the app's own origin and with no query string. Any other image shows as plain text with its alt text. `chatMarkdownComponents` carries the same guard.
|
|
10
|
+
|
|
11
|
+
### Adoption
|
|
12
|
+
|
|
13
|
+
- Existing customer apps get this when they upgrade `@lumerahq/ui` and republish.
|
|
14
|
+
- In-app images in chat no longer have Streamdown's hover download button.
|
|
15
|
+
|
|
5
16
|
## 0.21.1
|
|
6
17
|
|
|
7
18
|
### Fixed
|
|
@@ -85,24 +85,24 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
85
85
|
Component.displayName = toPascalCase(iconName);
|
|
86
86
|
return Component;
|
|
87
87
|
};
|
|
88
|
-
const __iconNode$
|
|
88
|
+
const __iconNode$E = [
|
|
89
89
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
90
90
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
91
91
|
];
|
|
92
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
93
|
-
const __iconNode$
|
|
92
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$E);
|
|
93
|
+
const __iconNode$D = [
|
|
94
94
|
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
95
95
|
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
96
96
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
97
97
|
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
98
98
|
];
|
|
99
|
-
const ArrowUpDown = createLucideIcon("arrow-up-down", __iconNode$
|
|
100
|
-
const __iconNode$
|
|
99
|
+
const ArrowUpDown = createLucideIcon("arrow-up-down", __iconNode$D);
|
|
100
|
+
const __iconNode$C = [
|
|
101
101
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
102
102
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
103
103
|
];
|
|
104
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
105
|
-
const __iconNode$
|
|
104
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$C);
|
|
105
|
+
const __iconNode$B = [
|
|
106
106
|
["path", { d: "M12 8V4H8", key: "hb8ula" }],
|
|
107
107
|
["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
|
|
108
108
|
["path", { d: "M2 14h2", key: "vft8re" }],
|
|
@@ -110,8 +110,8 @@ const __iconNode$A = [
|
|
|
110
110
|
["path", { d: "M15 13v2", key: "1xurst" }],
|
|
111
111
|
["path", { d: "M9 13v2", key: "rq6x2g" }]
|
|
112
112
|
];
|
|
113
|
-
const Bot = createLucideIcon("bot", __iconNode$
|
|
114
|
-
const __iconNode$
|
|
113
|
+
const Bot = createLucideIcon("bot", __iconNode$B);
|
|
114
|
+
const __iconNode$A = [
|
|
115
115
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
116
116
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
117
117
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -121,67 +121,67 @@ const __iconNode$z = [
|
|
|
121
121
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
122
122
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
123
123
|
];
|
|
124
|
-
const Brain = createLucideIcon("brain", __iconNode$
|
|
125
|
-
const __iconNode$
|
|
126
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
127
|
-
const __iconNode$
|
|
128
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
129
|
-
const __iconNode$
|
|
130
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
131
|
-
const __iconNode$
|
|
132
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
133
|
-
const __iconNode$
|
|
134
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
135
|
-
const __iconNode$
|
|
124
|
+
const Brain = createLucideIcon("brain", __iconNode$A);
|
|
125
|
+
const __iconNode$z = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
126
|
+
const Check = createLucideIcon("check", __iconNode$z);
|
|
127
|
+
const __iconNode$y = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
128
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$y);
|
|
129
|
+
const __iconNode$x = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
130
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$x);
|
|
131
|
+
const __iconNode$w = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
132
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$w);
|
|
133
|
+
const __iconNode$v = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
134
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$v);
|
|
135
|
+
const __iconNode$u = [
|
|
136
136
|
["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
|
|
137
137
|
["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
|
|
138
138
|
];
|
|
139
|
-
const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$
|
|
140
|
-
const __iconNode$
|
|
139
|
+
const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$u);
|
|
140
|
+
const __iconNode$t = [
|
|
141
141
|
["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
|
|
142
142
|
["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
|
|
143
143
|
];
|
|
144
|
-
const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$
|
|
145
|
-
const __iconNode$
|
|
144
|
+
const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$t);
|
|
145
|
+
const __iconNode$s = [
|
|
146
146
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
147
147
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
148
148
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
149
149
|
];
|
|
150
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
151
|
-
const __iconNode$
|
|
150
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$s);
|
|
151
|
+
const __iconNode$r = [
|
|
152
152
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
153
153
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
154
154
|
];
|
|
155
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
156
|
-
const __iconNode$
|
|
155
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$r);
|
|
156
|
+
const __iconNode$q = [
|
|
157
157
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
158
158
|
["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
|
|
159
159
|
];
|
|
160
|
-
const CircleStop = createLucideIcon("circle-stop", __iconNode$
|
|
161
|
-
const __iconNode$
|
|
160
|
+
const CircleStop = createLucideIcon("circle-stop", __iconNode$q);
|
|
161
|
+
const __iconNode$p = [
|
|
162
162
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
163
163
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
164
164
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
165
165
|
];
|
|
166
|
-
const CircleX = createLucideIcon("circle-x", __iconNode$
|
|
167
|
-
const __iconNode$
|
|
166
|
+
const CircleX = createLucideIcon("circle-x", __iconNode$p);
|
|
167
|
+
const __iconNode$o = [
|
|
168
168
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
169
169
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
170
170
|
];
|
|
171
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
172
|
-
const __iconNode$
|
|
171
|
+
const Code = createLucideIcon("code", __iconNode$o);
|
|
172
|
+
const __iconNode$n = [
|
|
173
173
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
174
174
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
175
175
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
176
176
|
];
|
|
177
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
178
|
-
const __iconNode$
|
|
177
|
+
const Download = createLucideIcon("download", __iconNode$n);
|
|
178
|
+
const __iconNode$m = [
|
|
179
179
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
180
180
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
181
181
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
182
182
|
];
|
|
183
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
184
|
-
const __iconNode$
|
|
183
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$m);
|
|
184
|
+
const __iconNode$l = [
|
|
185
185
|
[
|
|
186
186
|
"path",
|
|
187
187
|
{
|
|
@@ -195,8 +195,8 @@ const __iconNode$k = [
|
|
|
195
195
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
196
196
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
197
197
|
];
|
|
198
|
-
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$
|
|
199
|
-
const __iconNode$
|
|
198
|
+
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$l);
|
|
199
|
+
const __iconNode$k = [
|
|
200
200
|
[
|
|
201
201
|
"path",
|
|
202
202
|
{
|
|
@@ -209,8 +209,8 @@ const __iconNode$j = [
|
|
|
209
209
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
210
210
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
211
211
|
];
|
|
212
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
213
|
-
const __iconNode$
|
|
212
|
+
const FileText = createLucideIcon("file-text", __iconNode$k);
|
|
213
|
+
const __iconNode$j = [
|
|
214
214
|
[
|
|
215
215
|
"path",
|
|
216
216
|
{
|
|
@@ -220,8 +220,8 @@ const __iconNode$i = [
|
|
|
220
220
|
],
|
|
221
221
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
222
222
|
];
|
|
223
|
-
const File = createLucideIcon("file", __iconNode$
|
|
224
|
-
const __iconNode$
|
|
223
|
+
const File = createLucideIcon("file", __iconNode$j);
|
|
224
|
+
const __iconNode$i = [
|
|
225
225
|
[
|
|
226
226
|
"path",
|
|
227
227
|
{
|
|
@@ -230,13 +230,28 @@ const __iconNode$h = [
|
|
|
230
230
|
}
|
|
231
231
|
]
|
|
232
232
|
];
|
|
233
|
-
const Funnel = createLucideIcon("funnel", __iconNode$
|
|
234
|
-
const __iconNode$
|
|
233
|
+
const Funnel = createLucideIcon("funnel", __iconNode$i);
|
|
234
|
+
const __iconNode$h = [
|
|
235
235
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
236
236
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
237
237
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
238
238
|
];
|
|
239
|
-
const Globe = createLucideIcon("globe", __iconNode$
|
|
239
|
+
const Globe = createLucideIcon("globe", __iconNode$h);
|
|
240
|
+
const __iconNode$g = [
|
|
241
|
+
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }],
|
|
242
|
+
["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }],
|
|
243
|
+
["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }],
|
|
244
|
+
["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }],
|
|
245
|
+
[
|
|
246
|
+
"path",
|
|
247
|
+
{
|
|
248
|
+
d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",
|
|
249
|
+
key: "mmje98"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }]
|
|
253
|
+
];
|
|
254
|
+
const ImageOff = createLucideIcon("image-off", __iconNode$g);
|
|
240
255
|
const __iconNode$f = [
|
|
241
256
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
242
257
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
@@ -23975,7 +23990,7 @@ var lr = (e) => {
|
|
|
23975
23990
|
for (; t > 0 && e[t - 1] === `
|
|
23976
23991
|
`; ) t--;
|
|
23977
23992
|
return e.slice(0, t);
|
|
23978
|
-
}, cr = lazy(() => import("./highlighted-body-OFNGDK62-
|
|
23993
|
+
}, cr = lazy(() => import("./highlighted-body-OFNGDK62-B8vEiteo.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), st = ({ code: e, language: t, className: o, children: n, isIncomplete: r = false, startLine: s2, lineNumbers: a, ...l }) => {
|
|
23979
23994
|
let i = y2(), d2 = useMemo(() => lr(e), [e]), c2 = useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
|
|
23980
23995
|
`).map((p2) => [{ content: p2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
|
|
23981
23996
|
return jsx(nt.Provider, { value: { code: e }, children: jsxs(ot, { isIncomplete: r, language: t, children: [jsx(rt, { language: t }), n ? jsx("div", { className: i("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: jsx("div", { className: i("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: n }) }) : null, jsx(Suspense, { fallback: jsx(At, { className: o, language: t, lineNumbers: a, result: c2, startLine: s2, ...l }), children: jsx(cr, { className: o, code: d2, language: t, lineNumbers: a, raw: c2, startLine: s2, ...l }) })] }) });
|
|
@@ -24337,7 +24352,7 @@ var vo = ({ children: e, className: t, showControls: o, showCopy: n = true, show
|
|
|
24337
24352
|
let l = y2(), i = o && n, d2 = o && r, c2 = o && s2, p2 = i || d2 || c2;
|
|
24338
24353
|
return jsxs("div", { className: l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [p2 ? jsxs("div", { className: l("flex items-center justify-end gap-1"), children: [i ? jsx(Te, {}) : null, d2 ? jsx(Pe, {}) : null, c2 ? jsx(Co, { showCopy: i, showDownload: d2, children: e }) : null] }) : null, jsx("div", { className: l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"), children: jsx("table", { className: l("w-full divide-y divide-border", t), "data-streamdown": "table", ...a, children: e }) })] });
|
|
24339
24354
|
};
|
|
24340
|
-
var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-
|
|
24355
|
+
var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-B7c_UL36.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
|
|
24341
24356
|
function qe(e, t) {
|
|
24342
24357
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
24343
24358
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -24990,6 +25005,91 @@ function summarizeActivityLabels(labels, shown = 3) {
|
|
|
24990
25005
|
const extra = encoded.length - head.length;
|
|
24991
25006
|
return head.join(" · ") + (extra > 0 ? ` · +${extra} more` : "");
|
|
24992
25007
|
}
|
|
25008
|
+
const INCOMPLETE_IMAGE_SRC = "streamdown:incomplete-image";
|
|
25009
|
+
function isChatImageAllowed(src) {
|
|
25010
|
+
if (typeof window === "undefined") {
|
|
25011
|
+
return false;
|
|
25012
|
+
}
|
|
25013
|
+
try {
|
|
25014
|
+
const appUrl = window.location.href;
|
|
25015
|
+
const url = new URL(src, appUrl);
|
|
25016
|
+
return url.origin === new URL(appUrl).origin && url.search === "";
|
|
25017
|
+
} catch {
|
|
25018
|
+
return false;
|
|
25019
|
+
}
|
|
25020
|
+
}
|
|
25021
|
+
function ChatImage({ src, alt, title, width, height, className }) {
|
|
25022
|
+
if (typeof src !== "string" || !src) {
|
|
25023
|
+
return null;
|
|
25024
|
+
}
|
|
25025
|
+
if (src === INCOMPLETE_IMAGE_SRC) {
|
|
25026
|
+
return /* @__PURE__ */ jsx(
|
|
25027
|
+
"span",
|
|
25028
|
+
{
|
|
25029
|
+
className: "my-4 inline-block h-24 w-48 animate-pulse rounded-lg bg-muted",
|
|
25030
|
+
"data-streamdown": "image-placeholder"
|
|
25031
|
+
}
|
|
25032
|
+
);
|
|
25033
|
+
}
|
|
25034
|
+
if (!isChatImageAllowed(src)) {
|
|
25035
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex max-w-full items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: [
|
|
25036
|
+
/* @__PURE__ */ jsx(ImageOff, { className: "size-3 shrink-0" }),
|
|
25037
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 break-words", children: alt ? `Image from another site not shown: ${alt}` : "Image from another site not shown" })
|
|
25038
|
+
] });
|
|
25039
|
+
}
|
|
25040
|
+
return /* @__PURE__ */ jsx(
|
|
25041
|
+
"img",
|
|
25042
|
+
{
|
|
25043
|
+
alt,
|
|
25044
|
+
className: cn$2("my-2 max-w-full rounded-lg", className),
|
|
25045
|
+
height,
|
|
25046
|
+
src,
|
|
25047
|
+
title,
|
|
25048
|
+
width
|
|
25049
|
+
}
|
|
25050
|
+
);
|
|
25051
|
+
}
|
|
25052
|
+
const chatImageGuardComponents = {
|
|
25053
|
+
img: ChatImage,
|
|
25054
|
+
source: () => null
|
|
25055
|
+
};
|
|
25056
|
+
function heading(Tag) {
|
|
25057
|
+
return ({ node: _node, className, ...props }) => {
|
|
25058
|
+
const Component = Tag;
|
|
25059
|
+
return /* @__PURE__ */ jsx(
|
|
25060
|
+
Component,
|
|
25061
|
+
{
|
|
25062
|
+
...props,
|
|
25063
|
+
className: cn$2("mb-1 mt-3 text-sm font-semibold text-foreground first:mt-0", className)
|
|
25064
|
+
}
|
|
25065
|
+
);
|
|
25066
|
+
};
|
|
25067
|
+
}
|
|
25068
|
+
const chatMarkdownComponents = {
|
|
25069
|
+
h1: heading("h1"),
|
|
25070
|
+
h2: heading("h2"),
|
|
25071
|
+
h3: heading("h3"),
|
|
25072
|
+
h4: heading("h4"),
|
|
25073
|
+
h5: heading("h5"),
|
|
25074
|
+
h6: heading("h6"),
|
|
25075
|
+
p: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("p", { ...props, className: cn$2("my-1.5 first:mt-0 last:mb-0", className) }),
|
|
25076
|
+
ul: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("ul", { ...props, className: cn$2("my-1.5 ml-[1.1rem] list-disc space-y-1 first:mt-0 last:mb-0", className) }),
|
|
25077
|
+
ol: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("ol", { ...props, className: cn$2("my-1.5 ml-[1.1rem] list-decimal space-y-1 first:mt-0 last:mb-0", className) }),
|
|
25078
|
+
li: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("li", { ...props, className: cn$2("[&>p]:my-0", className) }),
|
|
25079
|
+
a: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx(
|
|
25080
|
+
"a",
|
|
25081
|
+
{
|
|
25082
|
+
...props,
|
|
25083
|
+
target: "_blank",
|
|
25084
|
+
rel: "noreferrer",
|
|
25085
|
+
className: cn$2("font-medium text-primary underline underline-offset-2", className)
|
|
25086
|
+
}
|
|
25087
|
+
),
|
|
25088
|
+
strong: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("strong", { ...props, className: cn$2("font-semibold text-foreground", className) }),
|
|
25089
|
+
blockquote: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("blockquote", { ...props, className: cn$2("my-2 border-l-2 border-border pl-3 text-muted-foreground", className) }),
|
|
25090
|
+
hr: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("hr", { ...props, className: cn$2("my-3 border-border", className) }),
|
|
25091
|
+
...chatImageGuardComponents
|
|
25092
|
+
};
|
|
24993
25093
|
const artifactRenderer = {
|
|
24994
25094
|
match(tc) {
|
|
24995
25095
|
return tc.name === "create_artifact";
|
|
@@ -26307,6 +26407,7 @@ function ThinkingBlock({ content: content2, isStreaming }) {
|
|
|
26307
26407
|
{
|
|
26308
26408
|
animated: isStreaming,
|
|
26309
26409
|
className: "prose prose-xs max-w-none text-xs text-muted-foreground dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
26410
|
+
components: chatImageGuardComponents,
|
|
26310
26411
|
isAnimating: isStreaming,
|
|
26311
26412
|
mode: isStreaming ? "streaming" : "static",
|
|
26312
26413
|
children: content2
|
|
@@ -27781,42 +27882,6 @@ function formatFileSize(bytes) {
|
|
|
27781
27882
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
27782
27883
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
27783
27884
|
}
|
|
27784
|
-
function heading(Tag) {
|
|
27785
|
-
return ({ node: _node, className, ...props }) => {
|
|
27786
|
-
const Component = Tag;
|
|
27787
|
-
return /* @__PURE__ */ jsx(
|
|
27788
|
-
Component,
|
|
27789
|
-
{
|
|
27790
|
-
...props,
|
|
27791
|
-
className: cn$2("mb-1 mt-3 text-sm font-semibold text-foreground first:mt-0", className)
|
|
27792
|
-
}
|
|
27793
|
-
);
|
|
27794
|
-
};
|
|
27795
|
-
}
|
|
27796
|
-
const chatMarkdownComponents = {
|
|
27797
|
-
h1: heading("h1"),
|
|
27798
|
-
h2: heading("h2"),
|
|
27799
|
-
h3: heading("h3"),
|
|
27800
|
-
h4: heading("h4"),
|
|
27801
|
-
h5: heading("h5"),
|
|
27802
|
-
h6: heading("h6"),
|
|
27803
|
-
p: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("p", { ...props, className: cn$2("my-1.5 first:mt-0 last:mb-0", className) }),
|
|
27804
|
-
ul: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("ul", { ...props, className: cn$2("my-1.5 ml-[1.1rem] list-disc space-y-1 first:mt-0 last:mb-0", className) }),
|
|
27805
|
-
ol: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("ol", { ...props, className: cn$2("my-1.5 ml-[1.1rem] list-decimal space-y-1 first:mt-0 last:mb-0", className) }),
|
|
27806
|
-
li: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("li", { ...props, className: cn$2("[&>p]:my-0", className) }),
|
|
27807
|
-
a: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx(
|
|
27808
|
-
"a",
|
|
27809
|
-
{
|
|
27810
|
-
...props,
|
|
27811
|
-
target: "_blank",
|
|
27812
|
-
rel: "noreferrer",
|
|
27813
|
-
className: cn$2("font-medium text-primary underline underline-offset-2", className)
|
|
27814
|
-
}
|
|
27815
|
-
),
|
|
27816
|
-
strong: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("strong", { ...props, className: cn$2("font-semibold text-foreground", className) }),
|
|
27817
|
-
blockquote: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("blockquote", { ...props, className: cn$2("my-2 border-l-2 border-border pl-3 text-muted-foreground", className) }),
|
|
27818
|
-
hr: ({ node: _node, className, ...props }) => /* @__PURE__ */ jsx("hr", { ...props, className: cn$2("my-3 border-border", className) })
|
|
27819
|
-
};
|
|
27820
27885
|
function AgentChatMarkdown({ children: children2, isStreaming, variant = "prose", className }) {
|
|
27821
27886
|
if (variant === "chat") {
|
|
27822
27887
|
return /* @__PURE__ */ jsx(
|
|
@@ -27839,6 +27904,7 @@ function AgentChatMarkdown({ children: children2, isStreaming, variant = "prose"
|
|
|
27839
27904
|
"prose prose-sm max-w-none text-foreground dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
27840
27905
|
className
|
|
27841
27906
|
),
|
|
27907
|
+
components: chatImageGuardComponents,
|
|
27842
27908
|
isAnimating: isStreaming,
|
|
27843
27909
|
mode: isStreaming ? "streaming" : "static",
|
|
27844
27910
|
children: children2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityStrip.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/ActivityStrip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActivityStrip.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/ActivityStrip.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,qBAAqB,EAAqB,MAAM,SAAS,CAAC;AAExE,yDAAyD;AACzD,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,KAAK,EAAE,qBAAqB,CAAC;IAC7B,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,yDAAyD;AACzD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CA+ElF;AAeD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,2CAqBjG;AAED,gIAAgI;AAChI,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,2CAQjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/Markdown.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAiB,EAAE,SAAS,EAAE,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/Markdown.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAiB,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CA4BhH"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { Components } from 'streamdown';
|
|
2
|
+
/**
|
|
3
|
+
* The image guard on its own, for a <Streamdown> that keeps its own typography.
|
|
4
|
+
* <picture><source srcset> is the other way a URL reaches the DOM.
|
|
5
|
+
*/
|
|
6
|
+
export declare const chatImageGuardComponents: Components;
|
|
2
7
|
export declare const chatMarkdownComponents: Components;
|
|
3
8
|
//# sourceMappingURL=chat-markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/chat-markdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../src/components/agent-chat/chat-markdown.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsE7C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAGtC,CAAC;AAcF,eAAO,MAAM,sBAAsB,EAAE,UAqCpC,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, b, c, d, e, f, g, h, D, i, j, k, R, S, T, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, E, F, G } from "../RecordSheet-
|
|
1
|
+
import { A, a, b, c, d, e, f, g, h, D, i, j, k, R, S, T, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, E, F, G } from "../RecordSheet-C8dir0Jk.js";
|
|
2
2
|
export {
|
|
3
3
|
A as ActivityStrip,
|
|
4
4
|
a as AgentChat,
|
package/dist/{highlighted-body-OFNGDK62-SNNtuMQ-.js → highlighted-body-OFNGDK62-B8vEiteo.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as R$1, L as Li, J as At } from "./RecordSheet-
|
|
1
|
+
import { I as R$1, L as Li, J as At } from "./RecordSheet-C8dir0Jk.js";
|
|
2
2
|
import { useContext, useState, useEffect } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var R = ({ code: s, language: e, raw: t, className: h, startLine: d, lineNumbers: m, ...p }) => {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, b, c, d, e, f, g, h, D, i, j, k, R, S, T, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, E, F, G } from "./RecordSheet-
|
|
1
|
+
import { A, a, b, c, d, e, f, g, h, D, i, j, k, R, S, T, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, E, F, G } from "./RecordSheet-C8dir0Jk.js";
|
|
2
2
|
import { a as a2, u as u2, b as b2, c as c2, d as d2 } from "./use-automation-run-C8Sz1K2R.js";
|
|
3
3
|
import { u as u3, a as a3, b as b3, c as c3, d as d3, e as e2, f as f2, g as g2 } from "./use-sql-table-D4wkMzsk.js";
|
|
4
4
|
import { B as B2, E as E2, a as a4, b as b4, c as c4, d as d4, e as e3, f as f3, g as g3, h as h2, i as i2, j as j2, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, t as t2, u as u4, v as v2, w as w2, x as x2, y as y2, z as z2, A as A2, C as C2, D as D2, F as F2, G as G2, H, I, J, K, L, M, N, O, P, Q, R as R2, S as S2, T as T2, U, V, W, X, Y, Z, _, $, a0, a1, a2 as a22 } from "./automations-CwXZdHMe.js";
|
package/dist/ui.css
CHANGED
|
@@ -670,6 +670,10 @@
|
|
|
670
670
|
margin-block: calc(var(--spacing) * 3);
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
+
.my-4 {
|
|
674
|
+
margin-block: calc(var(--spacing) * 4);
|
|
675
|
+
}
|
|
676
|
+
|
|
673
677
|
.mt-0\.5 {
|
|
674
678
|
margin-top: calc(var(--spacing) * .5);
|
|
675
679
|
}
|
|
@@ -816,6 +820,10 @@
|
|
|
816
820
|
display: inline;
|
|
817
821
|
}
|
|
818
822
|
|
|
823
|
+
.inline-block {
|
|
824
|
+
display: inline-block;
|
|
825
|
+
}
|
|
826
|
+
|
|
819
827
|
.inline-flex {
|
|
820
828
|
display: inline-flex;
|
|
821
829
|
}
|
|
@@ -1154,6 +1162,10 @@
|
|
|
1154
1162
|
width: calc(var(--spacing) * 8);
|
|
1155
1163
|
}
|
|
1156
1164
|
|
|
1165
|
+
.w-48 {
|
|
1166
|
+
width: calc(var(--spacing) * 48);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1157
1169
|
.w-56 {
|
|
1158
1170
|
width: calc(var(--spacing) * 56);
|
|
1159
1171
|
}
|
package/package.json
CHANGED