@mechane-ai/elements 0.29.0 → 0.30.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.
@@ -1,7 +1,7 @@
1
1
  import { v as e } from "./src-E3Or8tkO.js";
2
2
  import { r as t } from "./tokens.stylex-BoRZ3D8s.js";
3
3
  import { t as n } from "./use-scroll-tab-index-Dxpdh4W7.js";
4
- import { t as r } from "./viewer-styles-CpHqp5Qv.js";
4
+ import { t as r } from "./viewer-styles-DsFYri4K.js";
5
5
  import { t as i } from "./pierre-theme-DsrSwl5m.js";
6
6
  import * as a from "@stylexjs/stylex";
7
7
  import { useEffect as o, useRef as s, useState as c } from "react";
@@ -104,47 +104,48 @@ function _({ token: e }) {
104
104
  children: e.content
105
105
  });
106
106
  }
107
- function v({ code: t, language: i = "text", filename: o, isStreaming: s = !1, shouldWrap: c = !1, showLineNumbers: d = !0, selectedLines: f, annotations: m = [], maxHeight: v = 400, maxLines: y = 2e3 }) {
108
- let b = p(t, i), x = n(), S = t.slice(0, g).split(/\r\n|\n|\r/u), C = S.slice(0, Math.max(1, y)).map((e, t) => ({
107
+ function v({ code: t, variant: i = "default", language: o = "text", filename: s, isStreaming: c = !1, shouldWrap: d = !1, showLineNumbers: f = !0, selectedLines: m, annotations: v = [], maxHeight: y = 400, maxLines: b = 2e3 }) {
108
+ let x = p(t, o), S = n(), C = t.slice(0, g).split(/\r\n|\n|\r/u), w = C.slice(0, Math.max(1, b)).map((e, t) => ({
109
109
  text: e,
110
110
  line: t + 1
111
- })), w = o ?? i;
111
+ })), T = s ?? o, E = i === "embedded";
112
112
  return /* @__PURE__ */ u("section", {
113
- "aria-label": o ?? "Code",
114
- ...a.props(r.root),
113
+ "aria-label": s ?? "Code",
114
+ ...a.props(r.root, E && r.embedded),
115
115
  children: [
116
116
  /* @__PURE__ */ u("div", {
117
- ...a.props(r.header),
117
+ ...a.props(r.header, E && r.embeddedHeader),
118
118
  children: [/* @__PURE__ */ u("span", {
119
119
  ...a.props(r.label),
120
- children: [w, s && " · streaming"]
120
+ children: [T, c && !E && " · streaming"]
121
121
  }), /* @__PURE__ */ l(e, {
122
- label: o ?? "code",
122
+ label: s ?? "code",
123
123
  value: t,
124
+ display: E ? "icon" : "value",
124
125
  children: "Copy"
125
126
  })]
126
127
  }),
127
128
  /* @__PURE__ */ l("div", {
128
- ref: x.ref,
129
+ ref: S.ref,
129
130
  role: "region",
130
- "aria-label": `${w} source`,
131
- tabIndex: x.tabIndex,
132
- ...a.props(r.scrollRegion, h.viewport(v)),
131
+ "aria-label": `${T} source`,
132
+ tabIndex: S.tabIndex,
133
+ ...a.props(r.scrollRegion, h.viewport(y)),
133
134
  children: /* @__PURE__ */ l("pre", {
134
135
  ...{
135
136
  0: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xk8lq53" },
136
137
  1: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xeuugli x126k92a xj0a0fe" }
137
- }[!!c | 0],
138
+ }[!!d | 0],
138
139
  children: /* @__PURE__ */ l("code", {
139
140
  className: "xjb2p0i",
140
- children: C.map(({ text: e, line: t }) => {
141
- let n = b === void 0 ? void 0 : b.lines[t - 1], r = f !== void 0 && t >= f.start && t <= (f.end ?? f.start), i = m.find((e) => e.line === t);
141
+ children: w.map(({ text: e, line: t }) => {
142
+ let n = x === void 0 ? void 0 : x.lines[t - 1], r = m !== void 0 && t >= m.start && t <= (m.end ?? m.start), i = v.find((e) => e.line === t);
142
143
  return /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ u("span", {
143
144
  ...{
144
145
  0: { className: "x78zum5 x16exltd" },
145
146
  1: { className: "x78zum5 x16exltd x1r8u7ye" }
146
147
  }[!!r | 0],
147
- children: [d && /* @__PURE__ */ l("span", {
148
+ children: [f && /* @__PURE__ */ l("span", {
148
149
  "aria-hidden": !0,
149
150
  className: "x1rg5ohu x2lah0s xl3ry0p x5g2kb4 xp4054r x153jb6y x87ps6o",
150
151
  children: t
@@ -160,7 +161,7 @@ function v({ code: t, language: i = "text", filename: o, isStreaming: s = !1, sh
160
161
  })
161
162
  })
162
163
  }),
163
- S.length > C.length && /* @__PURE__ */ l("div", {
164
+ C.length > w.length && /* @__PURE__ */ l("div", {
164
165
  ...a.props(r.note),
165
166
  children: "Additional lines omitted. Copy includes the complete source."
166
167
  }),
@@ -172,7 +173,7 @@ function v({ code: t, language: i = "text", filename: o, isStreaming: s = !1, sh
172
173
  ...a.props(r.note),
173
174
  children: "No source text."
174
175
  }),
175
- b !== void 0 && b.hasFailed && /* @__PURE__ */ l("div", {
176
+ x !== void 0 && x.hasFailed && /* @__PURE__ */ l("div", {
176
177
  ...a.props(r.note),
177
178
  children: "Syntax highlighting unavailable. The source is shown unchanged."
178
179
  })
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-DPeyW4sm.js";
1
+ export { t as CodeBlock } from "../code-block-BX51BVe1.js";
@@ -1,6 +1,6 @@
1
1
  import { D as e, _ as t, v as n } from "../src-E3Or8tkO.js";
2
- import { t as r } from "../code-block-DPeyW4sm.js";
3
- import { t as i } from "../viewer-styles-CpHqp5Qv.js";
2
+ import { t as r } from "../code-block-BX51BVe1.js";
3
+ import { t as i } from "../viewer-styles-DsFYri4K.js";
4
4
  import * as a from "@stylexjs/stylex";
5
5
  import { useEffect as o, useState as s } from "react";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -44,7 +44,7 @@ function m(t) {
44
44
  let e = !0;
45
45
  async function t() {
46
46
  if (!A) try {
47
- let t = await import("../pierre-diff-C3U_qae6.js"), n = t.prepareDiff(x);
47
+ let t = await import("../pierre-diff-DOkqEUqx.js"), n = t.prepareDiff(x);
48
48
  e && w({
49
49
  source: x,
50
50
  Component: t.PierreDiff,
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
2
2
  import { t } from "../visible-motion-1GcUaEi4.js";
3
- import { t as n } from "../code-block-DPeyW4sm.js";
3
+ import { t as n } from "../code-block-BX51BVe1.js";
4
4
  import { n as r, t as i } from "../content-link-5oRGjDHa.js";
5
- import { t as a } from "../viewer-styles-CpHqp5Qv.js";
5
+ import { t as a } from "../viewer-styles-DsFYri4K.js";
6
6
  import * as o from "@stylexjs/stylex";
7
7
  import { Children as s, createContext as c, createElement as l, memo as u, useContext as d } from "react";
8
8
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { D as e } from "../src-E3Or8tkO.js";
2
2
  import { t } from "../use-scroll-tab-index-Dxpdh4W7.js";
3
- import { t as n } from "../viewer-styles-CpHqp5Qv.js";
3
+ import { t as n } from "../viewer-styles-DsFYri4K.js";
4
4
  import * as r from "@stylexjs/stylex";
5
5
  import { useEffect as i, useState as a } from "react";
6
6
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
package/dist/content.js CHANGED
@@ -1,394 +1 @@
1
- import { D as e, _ as t, v as n, w as r } from "./src-E3Or8tkO.js";
2
- import { t as i } from "./use-scroll-tab-index-Dxpdh4W7.js";
3
- import { t as a } from "./viewer-styles-CpHqp5Qv.js";
4
- import { t as o } from "./code-block-DPeyW4sm.js";
5
- import { t as s } from "./content-link-5oRGjDHa.js";
6
- import * as c from "@stylexjs/stylex";
7
- import { useCallback as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
8
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
9
- import { Check as g, Circle as _, CircleDashed as v, CircleHelp as y, Clock as b, X as x } from "lucide-react";
10
- import S from "strip-ansi";
11
- // packages/content/src/json-viewer.tsx
12
- var C = { body: {
13
- kmVPX3: "x1mvvolr",
14
- kVQacm: "xysyzu8",
15
- kskxy: "x1phlbz0",
16
- kMv6JI: "xiard35",
17
- kGuDYH: "xy8obcc",
18
- $$css: !0
19
- } }, w = 500;
20
- function T({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a }) {
21
- let [o, s] = p(r === 0);
22
- if (typeof e != "object" || !e) {
23
- let n = JSON.stringify(e), r = n.length > w;
24
- return /* @__PURE__ */ h("div", {
25
- className: "xeuugli x126k92a xj0a0fe",
26
- children: [
27
- /* @__PURE__ */ h("span", {
28
- className: "x153jb6y",
29
- children: [t, ": "]
30
- }),
31
- /* @__PURE__ */ m("span", {
32
- ...{
33
- 0: { className: "xbixft" },
34
- 1: { className: "x7ixh4y" }
35
- }[typeof e == "string" | 0],
36
- children: n.slice(0, w)
37
- }),
38
- r && /* @__PURE__ */ m("span", {
39
- className: "x153jb6y x1hz01jw",
40
- children: "… (value truncated)"
41
- })
42
- ]
43
- });
44
- }
45
- let c = Object.entries(e), l = Array.isArray(e) ? `${c.length} items` : `${c.length} fields`;
46
- return r >= i ? /* @__PURE__ */ h("div", {
47
- className: "xeuugli x126k92a xj0a0fe",
48
- children: [/* @__PURE__ */ h("span", {
49
- className: "x153jb6y",
50
- children: [t, ": "]
51
- }), /* @__PURE__ */ h("span", {
52
- className: "x153jb6y x1hz01jw",
53
- children: [l, " · depth limit"]
54
- })]
55
- }) : /* @__PURE__ */ h("details", {
56
- open: o,
57
- onToggle: (e) => s(e.currentTarget.open),
58
- className: "xeuugli x126k92a xj0a0fe",
59
- children: [/* @__PURE__ */ h("summary", {
60
- className: "x9f619 x1ypdohk x16exltd x17oiadl xt970qd x1r6zayv xjbqb8w xif5pkx x1s9zmfe x19rmrnh x13qnu6 x9v5kkp x1bqaal",
61
- children: [
62
- /* @__PURE__ */ h("span", {
63
- className: "x153jb6y",
64
- children: [t, ": "]
65
- }),
66
- Array.isArray(e) ? "[]" : "{}",
67
- " ",
68
- /* @__PURE__ */ m("span", {
69
- className: "x153jb6y x1hz01jw",
70
- children: l
71
- })
72
- ]
73
- }), o && /* @__PURE__ */ h("div", {
74
- className: "xo02m6d xpilrb4 x1t7ytsu x97x49r xa1dmyi",
75
- children: [c.slice(0, a).map(([e, t]) => {
76
- let o = `${n}/${e.replaceAll("~", "~0").replaceAll("/", "~1")}`;
77
- return /* @__PURE__ */ m(T, {
78
- name: JSON.stringify(e),
79
- path: o,
80
- value: t,
81
- depth: r + 1,
82
- maxDepth: i,
83
- maxEntries: a
84
- }, o);
85
- }), c.length > a && /* @__PURE__ */ h("div", {
86
- className: "x153jb6y x1hz01jw",
87
- children: [c.length - a, " more entries · copy to inspect the complete value"]
88
- })]
89
- })]
90
- });
91
- }
92
- function E({ value: e, label: t, maxDepth: r = 6, maxEntries: o = 50 }) {
93
- let s = i(), u = l(() => JSON.stringify(e, null, 2), [e]);
94
- return /* @__PURE__ */ h("section", {
95
- "aria-label": t,
96
- ...c.props(a.root),
97
- children: [/* @__PURE__ */ h("div", {
98
- ...c.props(a.header),
99
- children: [/* @__PURE__ */ m("span", {
100
- ...c.props(a.label),
101
- children: t
102
- }), /* @__PURE__ */ m(n, {
103
- label: t,
104
- value: u,
105
- children: "Copy JSON"
106
- })]
107
- }), /* @__PURE__ */ m("div", {
108
- ref: s.ref,
109
- role: "region",
110
- "aria-label": `${t} fields`,
111
- tabIndex: s.tabIndex,
112
- ...c.props(a.scrollRegion, C.body),
113
- children: /* @__PURE__ */ m(T, {
114
- name: "root",
115
- path: "",
116
- value: e,
117
- depth: 0,
118
- maxDepth: Math.max(1, r),
119
- maxEntries: Math.max(1, o)
120
- })
121
- })]
122
- });
123
- }
124
- // packages/content/src/log-viewer.tsx
125
- var D = {
126
- kVQacm: "xysyzu8",
127
- kmVPX3: "x1mvvolr",
128
- kogj98: "x1ghz6dp",
129
- kMv6JI: "xiard35",
130
- kGuDYH: "xy8obcc",
131
- kLWn49: "x1778rvt",
132
- khDVqt: "x126k92a",
133
- kHjlTd: "xj0a0fe",
134
- kKi2Bq: "xeq4nuv",
135
- $$css: !0
136
- }, O = {
137
- output: (e) => [
138
- D,
139
- {
140
- kskxy: e == null ? e : "x1jols5v",
141
- $$css: !0
142
- },
143
- { "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
144
- ],
145
- notice: {
146
- kt9PQ7: "xso031l",
147
- kfdmCh: "x1q0q8m5",
148
- kL6WhQ: "x1qndepd",
149
- $$css: !0
150
- }
151
- }, k = 2e5;
152
- function A({ output: e, label: t, maxLines: o = 500, maxHeight: s = 320, isRunning: l = !1 }) {
153
- let g = i(), _ = g.viewport, v = f(!1), [y, b] = p(!0), x = S(e), C = x.slice(-2e5).split("\n"), w = C.slice(-Math.max(1, o)), T = C.length - w.length;
154
- return u(() => {
155
- y && _.current !== null && (_.current.scrollTop = _.current.scrollHeight);
156
- }, [e, y]), d(() => {
157
- !l && v.current && (v.current = !1, _.current?.focus({ preventScroll: !0 }));
158
- }, [l]), /* @__PURE__ */ h("section", {
159
- "aria-label": t,
160
- ...c.props(a.root),
161
- children: [
162
- /* @__PURE__ */ h("div", {
163
- ...c.props(a.header),
164
- children: [/* @__PURE__ */ h("span", {
165
- ...c.props(a.label),
166
- children: [t, l && " · running"]
167
- }), /* @__PURE__ */ h("div", {
168
- ...c.props(a.actions),
169
- children: [l && /* @__PURE__ */ m(r, {
170
- variant: "ghost",
171
- onClick: () => b(!y),
172
- onFocus: () => {
173
- v.current = !0;
174
- },
175
- onBlur: () => {
176
- v.current = !1;
177
- },
178
- children: y ? "Pause following" : "Follow output"
179
- }), /* @__PURE__ */ m(n, {
180
- value: e,
181
- label: t,
182
- children: "Copy"
183
- })]
184
- })]
185
- }),
186
- T > 0 && /* @__PURE__ */ h("div", {
187
- ...c.props(a.note, O.notice),
188
- children: [T, " earlier lines omitted from this view. Copy includes the supplied output."]
189
- }),
190
- x.length > k && /* @__PURE__ */ m("div", {
191
- ...c.props(a.note, O.notice),
192
- children: "Preview limited to the last 200,000 characters. Copy includes the supplied output."
193
- }),
194
- /* @__PURE__ */ m("pre", {
195
- ref: g.ref,
196
- role: "region",
197
- "aria-label": `${t} output`,
198
- tabIndex: g.tabIndex,
199
- onScroll: (e) => {
200
- let t = e.currentTarget;
201
- b(t.scrollHeight - t.scrollTop - t.clientHeight < 8);
202
- },
203
- ...c.props(a.scrollRegion, O.output(s)),
204
- children: x.length === 0 ? "No output recorded." : w.join("\n")
205
- })
206
- ]
207
- });
208
- }
209
- // packages/content/src/media-viewer.tsx
210
- var j = {
211
- viewport: {
212
- k1xSpc: "xrvj5dj",
213
- kgQiWS: "x1ku5rj1",
214
- kzqmXN: "xh8yej3",
215
- kOBAk4: "x186iv6y",
216
- kskxy: "xcwfpss",
217
- k7Eaqz: "xeuugli",
218
- kVQacm: "xb3r6kr",
219
- kWkggS: "x1r7kqkb",
220
- $$css: !0
221
- },
222
- placeholder: {
223
- kWkggS: "x1fa40ue",
224
- $$css: !0
225
- }
226
- };
227
- function M() {
228
- return /* @__PURE__ */ m("div", {
229
- "aria-hidden": !0,
230
- ...c.props(a.root, j.viewport, j.placeholder)
231
- });
232
- }
233
- function N({ kind: e, src: t, label: n, widthPixels: r, heightPixels: i, onError: o }) {
234
- return /* @__PURE__ */ m("div", {
235
- ...c.props(a.root, j.viewport),
236
- children: e === "image" ? /* @__PURE__ */ m("img", {
237
- src: t,
238
- alt: n,
239
- width: r,
240
- height: i,
241
- onError: o,
242
- className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
243
- }) : /* @__PURE__ */ m("video", {
244
- src: t,
245
- "aria-label": n,
246
- width: r,
247
- height: i,
248
- controls: !0,
249
- muted: !0,
250
- playsInline: !0,
251
- preload: "metadata",
252
- onError: o,
253
- className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
254
- })
255
- });
256
- }
257
- // packages/content/src/stack-trace.tsx
258
- function P({ message: e, frames: t }) {
259
- return /* @__PURE__ */ h("section", {
260
- "aria-label": "Stack trace",
261
- ...c.props(a.root),
262
- children: [/* @__PURE__ */ m("p", {
263
- className: "x1ghz6dp x1mvvolr xso031l x1q0q8m5 x1qndepd xr5kp14 xk4h15q xj0a0fe",
264
- children: e
265
- }), t.length === 0 ? /* @__PURE__ */ m("p", {
266
- className: "x1ghz6dp x1mvvolr x153jb6y",
267
- children: "No frames recorded."
268
- }) : /* @__PURE__ */ m("ol", {
269
- className: "x1ghz6dp x1717udv x3ct3a4",
270
- children: t.map((e) => {
271
- let t = [
272
- e.file,
273
- e.line,
274
- e.column
275
- ].filter((e) => e !== void 0).join(":");
276
- return /* @__PURE__ */ h("li", {
277
- className: "x78zum5 xdt5ytf x1hnptsi xeuugli xj0a0fe x1mvvolr xso031l x1t1lzn6 x1q0q8m5 x1qndepd",
278
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m(s, {
279
- href: e.href,
280
- children: e.name
281
- }), t.length > 0 && /* @__PURE__ */ m("span", {
282
- className: "x1lliihq x153jb6y xiard35 xy8obcc xj0a0fe",
283
- children: t
284
- })] }), e.code !== void 0 && /* @__PURE__ */ m(o, {
285
- code: e.code,
286
- language: e.language,
287
- filename: e.file
288
- })]
289
- }, e.id);
290
- })
291
- })]
292
- });
293
- }
294
- // packages/content/src/trace.tsx
295
- var F = {
296
- pending: {
297
- kMwMTN: "x153jb6y",
298
- $$css: !0
299
- },
300
- running: {
301
- kMwMTN: "xbixft",
302
- $$css: !0
303
- },
304
- complete: {
305
- kMwMTN: "x7ixh4y",
306
- $$css: !0
307
- },
308
- failed: {
309
- kMwMTN: "xr5kp14",
310
- $$css: !0
311
- },
312
- skipped: {
313
- kMwMTN: "x153jb6y",
314
- $$css: !0
315
- },
316
- unknown: {
317
- kMwMTN: "x153jb6y",
318
- $$css: !0
319
- }
320
- }, I = {
321
- pending: F.pending,
322
- running: F.running,
323
- complete: F.complete,
324
- failed: F.failed,
325
- skipped: F.skipped,
326
- unknown: F.unknown
327
- }, L = {
328
- pending: b,
329
- running: _,
330
- complete: g,
331
- failed: x,
332
- skipped: v,
333
- unknown: y
334
- };
335
- function R({ label: e, children: t }) {
336
- return /* @__PURE__ */ m("ol", {
337
- "aria-label": e,
338
- className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
339
- children: t
340
- });
341
- }
342
- function z({ label: e, children: t }) {
343
- return /* @__PURE__ */ m("ol", {
344
- "aria-label": e,
345
- className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft x3bg4vu",
346
- children: t
347
- });
348
- }
349
- function B({ id: n, label: r, status: i, statusLabel: a, description: o, detail: s, isSelected: l, onSelect: u, children: d }) {
350
- let f = L[i];
351
- return /* @__PURE__ */ h("li", {
352
- "data-item-id": n,
353
- className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
354
- children: [/* @__PURE__ */ h("div", {
355
- "aria-hidden": !0,
356
- className: "x78zum5 xdt5ytf x6s0dn4 xunmzkg x1lk341d",
357
- children: [/* @__PURE__ */ m(f, {
358
- size: 14,
359
- ...c.props(I[i])
360
- }), /* @__PURE__ */ m("span", { className: "x1i1rx1s x1f6qilh x98rzlu x1fa40ue" })]
361
- }), /* @__PURE__ */ h("div", {
362
- className: "x78zum5 xdt5ytf xunmzkg xeuugli",
363
- children: [
364
- /* @__PURE__ */ m("div", {
365
- ...{
366
- 0: { className: "xk4h15q xj0a0fe" },
367
- 1: { className: "xk4h15q xj0a0fe xujl8zx xda060z" }
368
- }[l === !0 | 0],
369
- children: u === void 0 ? r : /* @__PURE__ */ m(e, {
370
- "aria-pressed": l,
371
- onClick: () => u(n),
372
- children: r
373
- })
374
- }),
375
- /* @__PURE__ */ m("span", {
376
- className: "xy8obcc xas2l8k x153jb6y xj0a0fe",
377
- children: a
378
- }),
379
- o !== void 0 && /* @__PURE__ */ m("p", {
380
- className: "x1ghz6dp x153jb6y xj0a0fe",
381
- children: o
382
- }),
383
- s !== void 0 && /* @__PURE__ */ h(t.Root, { children: [/* @__PURE__ */ m(t.Trigger, { children: "Details" }), /* @__PURE__ */ m(t.Panel, { children: s })] }),
384
- d
385
- ]
386
- })]
387
- });
388
- }
389
- var V = {
390
- Root: R,
391
- Item: B,
392
- Group: z
393
- };
394
- export { E as JsonViewer, A as LogViewer, N as MediaViewer, M as MediaViewerPlaceholder, P as StackTrace, V as Trace };
1
+ export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-DlNMCgVy.js";
package/dist/elements.css CHANGED
@@ -1784,6 +1784,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1784
1784
  white-space: pre-wrap;
1785
1785
  }
1786
1786
 
1787
+ .x1sdyfia {
1788
+ white-space: pre;
1789
+ }
1790
+
1787
1791
  .x11ru5tl, .x1vjfegm {
1788
1792
  z-index: 1;
1789
1793
  }
@@ -2558,6 +2562,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2558
2562
  min-height: 144px;
2559
2563
  }
2560
2564
 
2565
+ .x1tn5z8q {
2566
+ min-height: 1lh;
2567
+ }
2568
+
2561
2569
  .x1wiwyrm {
2562
2570
  min-height: 52px;
2563
2571
  }
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { CommandDetailsProps } from './command-details.tsx';
3
+ export type CommandStatus = 'pending' | 'running' | 'complete' | 'failed' | 'stopped' | 'unknown';
4
+ export type CommandActivityProps = Omit<CommandDetailsProps, 'isRunning'> & {
5
+ readonly status: CommandStatus;
6
+ };
7
+ export declare function CommandActivity({ status, ...details }: CommandActivityProps): ReactNode;
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CommandDetailsProps = {
3
+ readonly command?: string | undefined;
4
+ readonly output?: string | undefined;
5
+ readonly commandNotice?: string | undefined;
6
+ readonly outputNotice?: string | undefined;
7
+ readonly outputLanguage?: string;
8
+ readonly isRunning?: boolean;
9
+ };
10
+ export declare function CommandDetails({ command, output, commandNotice, outputNotice, outputLanguage, isRunning, }: CommandDetailsProps): ReactNode;
@@ -1,5 +1,9 @@
1
1
  export type { ApprovalProps } from './approval.tsx';
2
2
  export { Approval } from './approval.tsx';
3
+ export { CommandActivity } from './command-activity.tsx';
4
+ export type { CommandActivityProps, CommandStatus } from './command-activity.tsx';
5
+ export { CommandDetails } from './command-details.tsx';
6
+ export type { CommandDetailsProps } from './command-details.tsx';
3
7
  export type { ConversationRootProps, ConversationViewportProps, ConversationContentProps, ConversationItemProps, ConversationJumpProps, ConversationControlsProps, ConversationLatestButtonProps, } from './conversation.tsx';
4
8
  export { Conversation } from './conversation.tsx';
5
9
  export type { MessageKind, MessageProps, MessageAttachmentProps } from './message.tsx';
@@ -9,6 +9,7 @@ export type CodeSelection = {
9
9
  };
10
10
  export type CodeBlockProps = {
11
11
  readonly code: string;
12
+ readonly variant?: 'default' | 'embedded';
12
13
  readonly language?: string | undefined;
13
14
  readonly filename?: string | undefined;
14
15
  readonly isStreaming?: boolean;
@@ -19,4 +20,4 @@ export type CodeBlockProps = {
19
20
  readonly maxHeight?: number;
20
21
  readonly maxLines?: number;
21
22
  };
22
- export declare function CodeBlock({ code, language, filename, isStreaming, shouldWrap, showLineNumbers, selectedLines, annotations, maxHeight, maxLines, }: CodeBlockProps): ReactNode;
23
+ export declare function CodeBlock({ code, variant, language, filename, isStreaming, shouldWrap, showLineNumbers, selectedLines, annotations, maxHeight, maxLines, }: CodeBlockProps): ReactNode;
@@ -2,8 +2,9 @@ import type { ReactNode } from 'react';
2
2
  export type LogViewerProps = {
3
3
  readonly output: string;
4
4
  readonly label: string;
5
+ readonly variant?: 'default' | 'embedded';
5
6
  readonly maxLines?: number;
6
7
  readonly maxHeight?: number;
7
8
  readonly isRunning?: boolean;
8
9
  };
9
- export declare function LogViewer({ output, label, maxLines, maxHeight, isRunning, }: LogViewerProps): ReactNode;
10
+ export declare function LogViewer({ output, label, variant, maxLines, maxHeight, isRunning, }: LogViewerProps): ReactNode;
@@ -12,6 +12,14 @@ export declare const viewerStyles: Readonly<{
12
12
  readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
13
13
  readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
14
14
  }>;
15
+ readonly embedded: Readonly<{
16
+ readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
17
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
18
+ }>;
19
+ readonly embeddedHeader: Readonly<{
20
+ readonly borderBlockEndWidth: stylex.StyleXClassNameFor<"borderBlockEndWidth", 0>;
21
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
22
+ }>;
15
23
  readonly header: Readonly<{
16
24
  readonly display: stylex.StyleXClassNameFor<"display", "flex">;
17
25
  readonly flexWrap: stylex.StyleXClassNameFor<"flexWrap", "wrap">;
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
2
2
  import { n as t, t as n } from "./pierre-theme-DsrSwl5m.js";
3
- import { t as r } from "./viewer-styles-CpHqp5Qv.js";
3
+ import { t as r } from "./viewer-styles-DsFYri4K.js";
4
4
  import * as i from "@stylexjs/stylex";
5
5
  import { useCallback as a, useState as o } from "react";
6
6
  import { jsx as s } from "react/jsx-runtime";