@mechane-ai/elements 0.20.1 → 0.22.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/README.md +7 -4
- package/dist/ai.js +111 -103
- package/dist/{categorical-values-DG0kzYxN.js → categorical-values-B_Z-X-tI.js} +2 -2
- package/dist/{chart-frame-DxAZ0h_q.js → chart-frame-CT_mfkYD.js} +1 -1
- package/dist/{chart-input-Dru0GScv.js → chart-input-C78Vq8ON.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +1 -1
- package/dist/{code-block-DlUwVaPP.js → code-block-C3wqGP_q.js} +1 -1
- package/dist/collections.js +183 -74
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +8 -8
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-BIMrgXbz.js → content-link-Dc-pl2ee.js} +1 -1
- package/dist/content.js +3 -3
- package/dist/elements.css +32 -10
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/foundations.css +7 -0
- package/dist/index.js +1 -1
- package/dist/layout.js +199 -192
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +2 -1
- package/dist/packages/collections/src/index.d.ts +1 -0
- package/dist/packages/collections/src/metrics.d.ts +64 -5
- package/dist/packages/core/src/disclosure.d.ts +4 -2
- package/dist/packages/layout/src/index.d.ts +2 -0
- package/dist/packages/layout/src/report-section.d.ts +6 -0
- package/dist/{pierre-tree-D3XsgEH6.js → pierre-tree-Ba80jL2Z.js} +2 -2
- package/dist/{src-D4zPPr32.js → src-CWA2Tigm.js} +1 -1
- package/dist/{src-0mocxTaR.js → src-D3AGX7uZ.js} +1 -1
- package/dist/{src-qU5Z5LRH.js → src-F1zdubkU.js} +121 -55
- package/package.json +1 -1
- package/styles.css +1 -1
package/README.md
CHANGED
|
@@ -142,10 +142,13 @@ acknowledgement, and draft retention.
|
|
|
142
142
|
record and store named choices rather than catalog indexes. Identity palettes remain separate from status colors.
|
|
143
143
|
|
|
144
144
|
`MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
|
|
145
|
-
record summaries. `
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
record summaries. `Metric` offers `statistic` and `headline` variants, a concise `detail`, and a passive `trend` slot.
|
|
146
|
+
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data. `ReportSection`
|
|
147
|
+
takes a `summary` element and a chart as its child, placing the number above the full-width chart that explains it. The
|
|
148
|
+
application supplies the measure, period, formatting, coverage and read state. `PageContent` owns report insets and
|
|
149
|
+
section gaps; keep full-width tables outside it so their cell insets remain the only gutter. `SettingsSection` keeps
|
|
150
|
+
wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. `FormActions` owns submission rows
|
|
151
|
+
and their internal spacing. The enclosing section owns the gap before and after the actions.
|
|
149
152
|
|
|
150
153
|
The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
|
|
151
154
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
package/dist/ai.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-
|
|
2
|
-
import { t as l } from "./content-link-
|
|
1
|
+
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-F1zdubkU.js";
|
|
2
|
+
import { t as l } from "./content-link-Dc-pl2ee.js";
|
|
3
3
|
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
|
-
import { c as f, d as p } from "./src-
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
4
|
+
import { c as f, d as p } from "./src-D3AGX7uZ.js";
|
|
5
|
+
import { c as m, u as h } from "./src-CWA2Tigm.js";
|
|
6
6
|
import { t as g } from "./accessibility-C-aIZ1Yx.js";
|
|
7
7
|
import { t as _ } from "./visible-motion-1GcUaEi4.js";
|
|
8
8
|
import * as v from "@stylexjs/stylex";
|
|
9
|
-
import { createContext as y, useContext as b, useEffect as x, useId as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { ArrowDown as
|
|
9
|
+
import { createContext as y, useContext as b, useEffect as x, useId as S, useLayoutEffect as C, useRef as w, useState as T } from "react";
|
|
10
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
11
|
+
import { ArrowDown as O, ArrowUp as ee, File as k, GitBranch as A, Square as j } from "lucide-react";
|
|
12
12
|
import { MessageScroller as M, useMessageScroller as N, useMessageScrollerScrollable as P } from "@shadcn/react/message-scroller";
|
|
13
13
|
// packages/ai/src/approval.tsx
|
|
14
14
|
function F(t) {
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ D("section", {
|
|
16
16
|
"aria-label": t.title,
|
|
17
17
|
"data-request-id": t.requestId,
|
|
18
18
|
className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ E("h3", {
|
|
21
21
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
22
22
|
children: t.title
|
|
23
23
|
}),
|
|
24
|
-
t.description !== void 0 && /* @__PURE__ */
|
|
24
|
+
t.description !== void 0 && /* @__PURE__ */ E("p", {
|
|
25
25
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
26
26
|
children: t.description
|
|
27
27
|
}),
|
|
28
28
|
t.children,
|
|
29
|
-
t.status === "pending" ? /* @__PURE__ */
|
|
29
|
+
t.status === "pending" ? /* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(e, {
|
|
30
30
|
variant: "solid",
|
|
31
31
|
onClick: t.onApprove,
|
|
32
32
|
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
33
33
|
isPending: t.busy === "approve",
|
|
34
34
|
pendingLabel: "Approving…",
|
|
35
35
|
children: t.approveLabel ?? "Approve"
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ E(e, {
|
|
37
37
|
onClick: t.onDeny,
|
|
38
38
|
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
39
39
|
isPending: t.busy === "deny",
|
|
40
40
|
pendingLabel: "Denying…",
|
|
41
41
|
children: t.denyLabel ?? "Deny"
|
|
42
|
-
})] }) : /* @__PURE__ */
|
|
42
|
+
})] }) : /* @__PURE__ */ E(s, { children: t.statusLabel })
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
// packages/ai/src/conversation.tsx
|
|
47
47
|
var I = y(void 0);
|
|
48
48
|
function L({ children: e, initialPosition: t = "end", shouldFollow: n = !0, viewportRef: r }) {
|
|
49
|
-
let i =
|
|
50
|
-
return
|
|
49
|
+
let i = w(null), a = r ?? i, [o] = T(t);
|
|
50
|
+
return C(() => {
|
|
51
51
|
typeof o == "object" && a.current?.scrollTo({
|
|
52
52
|
top: o.top,
|
|
53
53
|
left: o.left ?? 0,
|
|
54
54
|
behavior: "instant"
|
|
55
55
|
});
|
|
56
|
-
}, [o, a]), /* @__PURE__ */
|
|
56
|
+
}, [o, a]), /* @__PURE__ */ E(I.Provider, {
|
|
57
57
|
value: a,
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ E(M.Provider, {
|
|
59
59
|
autoScroll: n,
|
|
60
60
|
defaultScrollPosition: typeof o == "object" ? "start" : o,
|
|
61
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ E(M.Root, {
|
|
62
62
|
className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
63
63
|
children: e
|
|
64
64
|
})
|
|
@@ -67,7 +67,7 @@ function L({ children: e, initialPosition: t = "end", shouldFollow: n = !0, view
|
|
|
67
67
|
}
|
|
68
68
|
function R({ label: e, children: t, scrollRestorationId: n }) {
|
|
69
69
|
let r = b(I);
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ E(M.Viewport, {
|
|
71
71
|
ref: r,
|
|
72
72
|
"aria-label": e,
|
|
73
73
|
"data-scroll-restoration-id": n,
|
|
@@ -76,7 +76,7 @@ function R({ label: e, children: t, scrollRestorationId: n }) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function z({ children: e, isStreaming: t = !1 }) {
|
|
79
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ E(M.Content, {
|
|
80
80
|
"aria-live": "polite",
|
|
81
81
|
"aria-relevant": "additions",
|
|
82
82
|
"aria-busy": t,
|
|
@@ -84,36 +84,43 @@ function z({ children: e, isStreaming: t = !1 }) {
|
|
|
84
84
|
children: e
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function B({ messageId: e,
|
|
88
|
-
|
|
87
|
+
function B({ messageId: e, shouldRevealOnAppend: t = !1, children: n }) {
|
|
88
|
+
let { scrollToEnd: r } = N();
|
|
89
|
+
return C(() => {
|
|
90
|
+
t && r({ behavior: "instant" });
|
|
91
|
+
}, [
|
|
92
|
+
e,
|
|
93
|
+
t,
|
|
94
|
+
r
|
|
95
|
+
]), /* @__PURE__ */ E(M.Item, {
|
|
89
96
|
messageId: e,
|
|
90
97
|
className: "xeuugli xj0a0fe",
|
|
91
|
-
children:
|
|
98
|
+
children: n
|
|
92
99
|
});
|
|
93
100
|
}
|
|
94
101
|
function V({ children: e }) {
|
|
95
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ E("div", {
|
|
96
103
|
className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
|
|
97
104
|
children: e
|
|
98
105
|
});
|
|
99
106
|
}
|
|
100
107
|
function H({ label: e = "Jump to latest" }) {
|
|
101
108
|
let { end: t } = P();
|
|
102
|
-
return t ? /* @__PURE__ */
|
|
109
|
+
return t ? /* @__PURE__ */ E("div", {
|
|
103
110
|
className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
|
|
104
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ E(U, { label: e })
|
|
105
112
|
}) : null;
|
|
106
113
|
}
|
|
107
114
|
function U({ label: t, onActivate: n }) {
|
|
108
115
|
let { scrollToEnd: r } = N(), i = b(I);
|
|
109
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ D(e, {
|
|
110
117
|
onClick: () => {
|
|
111
118
|
n?.(), requestAnimationFrame(() => {
|
|
112
119
|
let e = i?.current;
|
|
113
120
|
e != null && (r({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
|
|
114
121
|
});
|
|
115
122
|
},
|
|
116
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ E(O, {
|
|
117
124
|
size: 14,
|
|
118
125
|
"aria-hidden": !0
|
|
119
126
|
}), t]
|
|
@@ -169,38 +176,38 @@ var W = {
|
|
|
169
176
|
$$css: !0
|
|
170
177
|
};
|
|
171
178
|
function J({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default" }) {
|
|
172
|
-
let l = c === "chat" && r === "user", u = c === "default" || a !== void 0 || i !== void 0 ? /* @__PURE__ */
|
|
179
|
+
let l = c === "chat" && r === "user", u = c === "default" || a !== void 0 || i !== void 0 ? /* @__PURE__ */ D("header", {
|
|
173
180
|
className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
|
|
174
181
|
children: [
|
|
175
|
-
a !== void 0 && /* @__PURE__ */
|
|
182
|
+
a !== void 0 && /* @__PURE__ */ E("span", {
|
|
176
183
|
className: "x3nfvp2 x2lah0s",
|
|
177
184
|
children: a
|
|
178
185
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ E("span", {
|
|
180
187
|
className: "xk4h15q xeuugli xj0a0fe",
|
|
181
188
|
children: e
|
|
182
189
|
}),
|
|
183
|
-
i !== void 0 && /* @__PURE__ */
|
|
190
|
+
i !== void 0 && /* @__PURE__ */ E("div", {
|
|
184
191
|
className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
|
|
185
192
|
children: i
|
|
186
193
|
})
|
|
187
194
|
]
|
|
188
195
|
}) : null;
|
|
189
|
-
return /* @__PURE__ */
|
|
196
|
+
return /* @__PURE__ */ D("article", {
|
|
190
197
|
id: n,
|
|
191
198
|
"aria-label": e,
|
|
192
199
|
...v.props(G.root, K[r], l && G.bubble, q),
|
|
193
200
|
children: [
|
|
194
201
|
u,
|
|
195
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ E("div", {
|
|
196
203
|
className: "xeuugli xj0a0fe x1ytb0s6",
|
|
197
204
|
children: t
|
|
198
205
|
}),
|
|
199
|
-
s !== void 0 && /* @__PURE__ */
|
|
206
|
+
s !== void 0 && /* @__PURE__ */ E("div", {
|
|
200
207
|
className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
|
|
201
208
|
children: s
|
|
202
209
|
}),
|
|
203
|
-
o !== void 0 && /* @__PURE__ */
|
|
210
|
+
o !== void 0 && /* @__PURE__ */ E("footer", {
|
|
204
211
|
className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b",
|
|
205
212
|
children: o
|
|
206
213
|
})
|
|
@@ -208,25 +215,25 @@ function J({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avat
|
|
|
208
215
|
});
|
|
209
216
|
}
|
|
210
217
|
function Y({ name: e, description: t, href: n, actions: r }) {
|
|
211
|
-
return /* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ D("div", {
|
|
212
219
|
className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
213
220
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ E(k, {
|
|
215
222
|
size: 16,
|
|
216
223
|
"aria-hidden": !0,
|
|
217
224
|
className: "x153jb6y x2lah0s"
|
|
218
225
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ D("div", {
|
|
220
227
|
className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
|
|
221
|
-
children: [n === void 0 ? /* @__PURE__ */
|
|
228
|
+
children: [n === void 0 ? /* @__PURE__ */ E("span", { children: e }) : /* @__PURE__ */ E(l, {
|
|
222
229
|
href: n,
|
|
223
230
|
children: e
|
|
224
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
231
|
+
}), t !== void 0 && /* @__PURE__ */ E("span", {
|
|
225
232
|
className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
|
|
226
233
|
children: t
|
|
227
234
|
})]
|
|
228
235
|
}),
|
|
229
|
-
r !== void 0 && /* @__PURE__ */
|
|
236
|
+
r !== void 0 && /* @__PURE__ */ E("div", {
|
|
230
237
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
|
|
231
238
|
children: r
|
|
232
239
|
})
|
|
@@ -237,36 +244,36 @@ function Y({ name: e, description: t, href: n, actions: r }) {
|
|
|
237
244
|
function X(e) {
|
|
238
245
|
if (e.kind === "link") {
|
|
239
246
|
let { kind: t, label: n, ...i } = e;
|
|
240
|
-
return /* @__PURE__ */
|
|
247
|
+
return /* @__PURE__ */ E(r, {
|
|
241
248
|
...i,
|
|
242
249
|
"aria-label": n
|
|
243
250
|
});
|
|
244
251
|
}
|
|
245
252
|
let { kind: t, label: n, ...i } = e;
|
|
246
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ E(c, {
|
|
247
254
|
...i,
|
|
248
255
|
variant: "ghost",
|
|
249
256
|
"aria-label": n
|
|
250
257
|
});
|
|
251
258
|
}
|
|
252
259
|
function Z(e) {
|
|
253
|
-
return /* @__PURE__ */
|
|
260
|
+
return /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: X(e) }), /* @__PURE__ */ E(d.Portal, { children: /* @__PURE__ */ E(d.Positioner, { children: /* @__PURE__ */ E(d.Popup, { children: e.label }) }) })] });
|
|
254
261
|
}
|
|
255
262
|
// packages/ai/src/message-boundary.tsx
|
|
256
263
|
function Q({ label: e, children: t }) {
|
|
257
|
-
return /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ D(a.Root, {
|
|
258
265
|
className: "xeuugli x1kbiq1m xykt701 xpu655y",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ D(a.Trigger, {
|
|
260
267
|
className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ E(A, {
|
|
262
269
|
size: 14,
|
|
263
270
|
"aria-hidden": !0,
|
|
264
271
|
className: "x2lah0s"
|
|
265
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ E("span", {
|
|
266
273
|
className: "xeuugli xj0a0fe",
|
|
267
274
|
children: e
|
|
268
275
|
})]
|
|
269
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ E(a.Panel, {
|
|
270
277
|
className: "x153jb6y xy8obcc xas2l8k",
|
|
271
278
|
children: t
|
|
272
279
|
})]
|
|
@@ -276,6 +283,7 @@ function Q({ label: e, children: t }) {
|
|
|
276
283
|
var $ = {
|
|
277
284
|
inlineInput: {
|
|
278
285
|
kUk6DE: "x12lumcd",
|
|
286
|
+
kSGwAc: "xamitd3",
|
|
279
287
|
$$css: !0
|
|
280
288
|
},
|
|
281
289
|
action: {
|
|
@@ -284,24 +292,24 @@ var $ = {
|
|
|
284
292
|
}
|
|
285
293
|
};
|
|
286
294
|
function te({ isCompact: e = !1 }) {
|
|
287
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ E("div", {
|
|
288
296
|
"aria-hidden": !0,
|
|
289
297
|
inert: !0,
|
|
290
298
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
291
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ D("div", {
|
|
292
300
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ E("div", {
|
|
294
302
|
...v.props(n.base, n.field, n.textarea, n.plainTextarea),
|
|
295
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ E(p, {
|
|
296
304
|
lines: e ? 1 : 2,
|
|
297
305
|
width: "22ch"
|
|
298
306
|
})
|
|
299
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ D("div", {
|
|
300
308
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ E("div", {
|
|
302
310
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
|
|
303
|
-
children: /* @__PURE__ */
|
|
304
|
-
}), /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ E(p, { width: "8ch" })
|
|
312
|
+
}), /* @__PURE__ */ E(f, {
|
|
305
313
|
isIconOnly: !0,
|
|
306
314
|
xstyle: $.action
|
|
307
315
|
})]
|
|
@@ -309,36 +317,36 @@ function te({ isCompact: e = !1 }) {
|
|
|
309
317
|
})
|
|
310
318
|
});
|
|
311
319
|
}
|
|
312
|
-
function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: _ = "Sending…", enterBehavior: y = "newline", isCompact: b = !1, description: x, error:
|
|
313
|
-
let M =
|
|
314
|
-
|
|
320
|
+
function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: _ = "Sending…", enterBehavior: y = "newline", isCompact: b = !1, description: x, error: C, controls: w, attachments: T, onStop: O, isStopPending: k = !1, stopLabel: A = "Stop response" }) {
|
|
321
|
+
let M = S(), N = u, P = b && T === void 0 && w === void 0, F = !N && !l && !f, I = p;
|
|
322
|
+
O === void 0 ? l ? I = _ : y === "submit" && (I = `${p} · Enter`) : I = k ? "Stopping…" : A;
|
|
315
323
|
function L(e) {
|
|
316
324
|
if (y !== "submit" || e.key !== "Enter" || e.repeat) return;
|
|
317
325
|
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
318
|
-
e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), F &&
|
|
326
|
+
e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), F && O === void 0 && e.currentTarget.form?.requestSubmit());
|
|
319
327
|
}
|
|
320
328
|
function R(e) {
|
|
321
|
-
e.preventDefault(), F &&
|
|
329
|
+
e.preventDefault(), F && O === void 0 && r(e);
|
|
322
330
|
}
|
|
323
|
-
return /* @__PURE__ */
|
|
331
|
+
return /* @__PURE__ */ E("form", {
|
|
324
332
|
onSubmit: R,
|
|
325
333
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
invalid:
|
|
334
|
+
children: /* @__PURE__ */ D(m.Root, {
|
|
335
|
+
invalid: C !== void 0,
|
|
328
336
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ E(m.Label, {
|
|
330
338
|
...v.props(g.hidden),
|
|
331
339
|
children: e
|
|
332
340
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ D("div", {
|
|
334
342
|
...{
|
|
335
343
|
0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
|
|
336
344
|
2: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk" },
|
|
337
345
|
1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" },
|
|
338
346
|
3: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk x1oddvo6" }
|
|
339
|
-
}[!!P << 1 |
|
|
347
|
+
}[!!P << 1 | C !== void 0],
|
|
340
348
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ E(h, {
|
|
342
350
|
appearance: "plain",
|
|
343
351
|
rows: b ? 1 : 2,
|
|
344
352
|
isCompact: b,
|
|
@@ -352,51 +360,51 @@ function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
352
360
|
maxLength: o,
|
|
353
361
|
required: s,
|
|
354
362
|
disabled: u,
|
|
355
|
-
"aria-errormessage":
|
|
363
|
+
"aria-errormessage": C === void 0 ? void 0 : M
|
|
356
364
|
}),
|
|
357
|
-
|
|
358
|
-
/* @__PURE__ */
|
|
365
|
+
T,
|
|
366
|
+
/* @__PURE__ */ D("div", {
|
|
359
367
|
...{
|
|
360
368
|
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi" },
|
|
361
369
|
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x2lah0s" }
|
|
362
370
|
}[!!P | 0],
|
|
363
|
-
children: [
|
|
371
|
+
children: [w !== void 0 && /* @__PURE__ */ E("div", {
|
|
364
372
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
|
|
365
|
-
children:
|
|
366
|
-
}), /* @__PURE__ */
|
|
373
|
+
children: w
|
|
374
|
+
}), /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: O === void 0 ? /* @__PURE__ */ E(c, {
|
|
367
375
|
xstyle: $.action,
|
|
368
376
|
type: "submit",
|
|
369
377
|
variant: "solid",
|
|
370
378
|
"aria-label": l ? _ : p,
|
|
371
379
|
disabled: u || f,
|
|
372
380
|
isPending: l,
|
|
373
|
-
children: /* @__PURE__ */
|
|
381
|
+
children: /* @__PURE__ */ E(ee, {
|
|
374
382
|
size: 16,
|
|
375
383
|
"aria-hidden": !0
|
|
376
384
|
})
|
|
377
|
-
}) : /* @__PURE__ */
|
|
385
|
+
}) : /* @__PURE__ */ E(c, {
|
|
378
386
|
xstyle: $.action,
|
|
379
387
|
type: "button",
|
|
380
388
|
"aria-label": k ? "Stopping…" : A,
|
|
381
389
|
onClick: (e) => {
|
|
382
|
-
e.preventDefault(),
|
|
390
|
+
e.preventDefault(), O();
|
|
383
391
|
},
|
|
384
392
|
disabled: u,
|
|
385
393
|
isPending: k,
|
|
386
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ E(j, {
|
|
387
395
|
size: 14,
|
|
388
396
|
"aria-hidden": !0
|
|
389
397
|
})
|
|
390
|
-
}) }), /* @__PURE__ */
|
|
398
|
+
}) }), /* @__PURE__ */ E(d.Portal, { children: /* @__PURE__ */ E(d.Positioner, { children: /* @__PURE__ */ E(d.Popup, { children: I }) }) })] })]
|
|
391
399
|
})
|
|
392
400
|
]
|
|
393
401
|
}),
|
|
394
|
-
x !== void 0 && /* @__PURE__ */
|
|
395
|
-
|
|
402
|
+
x !== void 0 && /* @__PURE__ */ E(m.Description, { children: x }),
|
|
403
|
+
C !== void 0 && /* @__PURE__ */ E(m.Error, {
|
|
396
404
|
id: M,
|
|
397
405
|
match: !0,
|
|
398
406
|
role: "alert",
|
|
399
|
-
children:
|
|
407
|
+
children: C
|
|
400
408
|
})
|
|
401
409
|
]
|
|
402
410
|
})
|
|
@@ -404,14 +412,14 @@ function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
404
412
|
}
|
|
405
413
|
// packages/ai/src/reply-indicator.tsx
|
|
406
414
|
function re({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
407
|
-
let [r, i] =
|
|
415
|
+
let [r, i] = T(t === 0), { ref: a, isActive: o } = _(n && r);
|
|
408
416
|
return x(() => {
|
|
409
417
|
let e = setTimeout(() => i(!0), t);
|
|
410
418
|
return () => clearTimeout(e);
|
|
411
|
-
}, [t]), /* @__PURE__ */
|
|
419
|
+
}, [t]), /* @__PURE__ */ E("div", {
|
|
412
420
|
ref: a,
|
|
413
|
-
className: "x153jb6y x1hz01jw xy8obcc xas2l8k",
|
|
414
|
-
children: r && /* @__PURE__ */
|
|
421
|
+
className: "x17tes2r x17oiadl x78zum5 x6s0dn4 x153jb6y x1hz01jw xy8obcc xas2l8k",
|
|
422
|
+
children: r && /* @__PURE__ */ E("span", {
|
|
415
423
|
role: "status",
|
|
416
424
|
...{
|
|
417
425
|
0: {},
|
|
@@ -425,26 +433,26 @@ function re({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
|
425
433
|
}
|
|
426
434
|
// packages/ai/src/sources.tsx
|
|
427
435
|
function ie({ sources: e, label: t = "Sources" }) {
|
|
428
|
-
return /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ D("section", {
|
|
429
437
|
"aria-label": t,
|
|
430
438
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
431
439
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ E("h3", {
|
|
433
441
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
434
442
|
children: t
|
|
435
443
|
}),
|
|
436
|
-
e.length === 0 && /* @__PURE__ */
|
|
444
|
+
e.length === 0 && /* @__PURE__ */ E("p", {
|
|
437
445
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
438
446
|
children: "No sources supplied."
|
|
439
447
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ E("ol", {
|
|
441
449
|
className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
|
|
442
|
-
children: e.map((e) => /* @__PURE__ */
|
|
450
|
+
children: e.map((e) => /* @__PURE__ */ D("li", {
|
|
443
451
|
className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ E("span", { children: /* @__PURE__ */ E(l, {
|
|
445
453
|
href: e.href,
|
|
446
454
|
children: e.title
|
|
447
|
-
}) }), e.description !== void 0 && /* @__PURE__ */
|
|
455
|
+
}) }), e.description !== void 0 && /* @__PURE__ */ E("p", {
|
|
448
456
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
449
457
|
children: e.description
|
|
450
458
|
})]
|
|
@@ -454,20 +462,20 @@ function ie({ sources: e, label: t = "Sources" }) {
|
|
|
454
462
|
});
|
|
455
463
|
}
|
|
456
464
|
function ae({ source: e, label: n }) {
|
|
457
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ E("span", {
|
|
458
466
|
className: "xt0psk2 x11njtxf xss6m8b",
|
|
459
|
-
children: /* @__PURE__ */
|
|
460
|
-
render: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ D(u.Root, { children: [/* @__PURE__ */ E(u.Trigger, {
|
|
468
|
+
render: /* @__PURE__ */ E(t, {}),
|
|
461
469
|
"aria-label": `Source ${n}: ${e.title}`,
|
|
462
470
|
children: n
|
|
463
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ E(u.Portal, { children: /* @__PURE__ */ E(u.Positioner, {
|
|
464
472
|
side: "top",
|
|
465
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ E(u.Popup, { children: /* @__PURE__ */ D(o, {
|
|
466
474
|
isCompact: !0,
|
|
467
475
|
children: [
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
e.description !== void 0 && /* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ E(u.Title, { children: e.title }),
|
|
477
|
+
e.description !== void 0 && /* @__PURE__ */ E(u.Description, { children: e.description }),
|
|
478
|
+
/* @__PURE__ */ E(l, {
|
|
471
479
|
href: e.href,
|
|
472
480
|
children: "Open source"
|
|
473
481
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, s as t } from "./chart-frame-
|
|
2
|
-
import { n } from "./chart-input-
|
|
1
|
+
import { n as e, s as t } from "./chart-frame-CT_mfkYD.js";
|
|
2
|
+
import { n } from "./chart-input-C78Vq8ON.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
// packages/charts/src/categorical-values.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./src-
|
|
2
|
-
import { r as t } from "./chart-frame-
|
|
1
|
+
import { m as e } from "./src-D3AGX7uZ.js";
|
|
2
|
+
import { r as t } from "./chart-frame-CT_mfkYD.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|
package/dist/charts/cartesian.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as e } from "../src-
|
|
2
|
-
import { i as t, n, r, t as i } from "../categorical-values-
|
|
3
|
-
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-
|
|
4
|
-
import { n as f, r as p, t as m } from "../chart-input-
|
|
1
|
+
import { u as e } from "../src-D3AGX7uZ.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "../categorical-values-B_Z-X-tI.js";
|
|
3
|
+
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-CT_mfkYD.js";
|
|
4
|
+
import { n as f, r as p, t as m } from "../chart-input-C78Vq8ON.js";
|
|
5
5
|
import { t as h } from "../plot-width--OgdohB5.js";
|
|
6
|
-
import { E as g } from "../src-
|
|
7
|
-
import { g as _ } from "../src-
|
|
6
|
+
import { E as g } from "../src-F1zdubkU.js";
|
|
7
|
+
import { g as _ } from "../src-CWA2Tigm.js";
|
|
8
8
|
import { r as v } from "../tokens.stylex-DTHHFbyl.js";
|
|
9
9
|
import * as y from "@stylexjs/stylex";
|
|
10
10
|
import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-
|
|
2
|
-
import { n as a, r as o, t as s } from "../chart-input-
|
|
1
|
+
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-CT_mfkYD.js";
|
|
2
|
+
import { n as a, r as o, t as s } from "../chart-input-C78Vq8ON.js";
|
|
3
3
|
import { t as c } from "../plot-width--OgdohB5.js";
|
|
4
4
|
import * as l from "@stylexjs/stylex";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/graph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { a as t, n, r, s as i, t as a } from "../chart-frame-
|
|
3
|
-
import { n as o, t as s } from "../chart-input-
|
|
2
|
+
import { a as t, n, r, s as i, t as a } from "../chart-frame-CT_mfkYD.js";
|
|
3
|
+
import { n as o, t as s } from "../chart-input-C78Vq8ON.js";
|
|
4
4
|
import * as c from "@stylexjs/stylex";
|
|
5
5
|
import { useId as l } from "react";
|
|
6
6
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/hierarchy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "../categorical-values-
|
|
2
|
-
import { o as r, r as i, s as a } from "../chart-frame-
|
|
3
|
-
import { t as o } from "../chart-input-
|
|
1
|
+
import { i as e, r as t, t as n } from "../categorical-values-B_Z-X-tI.js";
|
|
2
|
+
import { o as r, r as i, s as a } from "../chart-frame-CT_mfkYD.js";
|
|
3
|
+
import { t as o } from "../chart-input-C78Vq8ON.js";
|
|
4
4
|
import { t as s } from "../plot-width--OgdohB5.js";
|
|
5
5
|
import * as c from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
package/dist/charts/matrix.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e } from "../tokens.stylex-DTHHFbyl.js";
|
|
2
|
-
import { n as t, r as n, t as r } from "../chart-input-
|
|
3
|
-
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-
|
|
2
|
+
import { n as t, r as n, t as r } from "../chart-input-C78Vq8ON.js";
|
|
3
|
+
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-CT_mfkYD.js";
|
|
4
4
|
import { t as l } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
5
5
|
import * as u from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/timeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "../src-
|
|
2
|
-
import { n as t, t as n } from "../chart-input-
|
|
1
|
+
import { c as e } from "../src-F1zdubkU.js";
|
|
2
|
+
import { n as t, t as n } from "../chart-input-C78Vq8ON.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { scaleLinear as o } from "@visx/scale";
|
package/dist/charts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as ChartFrame, i as ChartLegend } from "./chart-frame-
|
|
1
|
+
export { r as ChartFrame, i as ChartLegend } from "./chart-frame-CT_mfkYD.js";
|