@mechane-ai/elements 0.8.0 → 0.10.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.
Files changed (94) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +67 -40
  3. package/dist/ai.js +274 -209
  4. package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DLRE4EEW.js} +4 -4
  5. package/dist/{chart-frame-DgPdIguO.js → chart-frame-et6f6Vhg.js} +22 -14
  6. package/dist/{chart-input-Sac4StHN.js → chart-input-CdLkFomi.js} +2 -2
  7. package/dist/charts/cartesian.js +529 -450
  8. package/dist/charts/distribution.js +302 -261
  9. package/dist/charts/graph.js +137 -103
  10. package/dist/charts/hierarchy.js +7 -7
  11. package/dist/charts/matrix.js +187 -174
  12. package/dist/charts/timeline.js +118 -92
  13. package/dist/charts.js +1 -1
  14. package/dist/code-block-D77maJBB.js +180 -0
  15. package/dist/collections.js +388 -300
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +81 -63
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +115 -96
  20. package/dist/content/tree.js +43 -38
  21. package/dist/{content-link-Dd8gapwc.js → content-link-BpSZeTNK.js} +6 -2
  22. package/dist/content.js +169 -150
  23. package/dist/{assets/stylex.css → elements.css} +862 -338
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +31 -31
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +286 -187
  29. package/dist/navigation/commands.js +45 -42
  30. package/dist/{navigation-yxK3iQXo.js → navigation-D2_sGy3C.js} +2 -2
  31. package/dist/navigation.js +10 -10
  32. package/dist/overlays.js +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +2 -1
  34. package/dist/packages/ai/src/index.d.ts +4 -0
  35. package/dist/packages/ai/src/message-action.d.ts +10 -0
  36. package/dist/packages/ai/src/message-boundary.d.ts +6 -0
  37. package/dist/packages/ai/src/message.d.ts +2 -1
  38. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -0
  39. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  40. package/dist/packages/charts/src/chart-frame.d.ts +3 -0
  41. package/dist/packages/charts/src/chart-theme.d.ts +2 -1
  42. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +22 -2
  43. package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
  44. package/dist/packages/collections/src/data-table.d.ts +6 -0
  45. package/dist/packages/collections/src/index.d.ts +2 -2
  46. package/dist/packages/collections/src/timeline.d.ts +10 -3
  47. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -1
  48. package/dist/packages/content/src/viewer-styles.d.ts +64 -0
  49. package/dist/packages/core/src/actions.d.ts +7 -0
  50. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
  51. package/dist/packages/core/src/agent-avatar.d.ts +17 -0
  52. package/dist/packages/core/src/copy-value.d.ts +2 -1
  53. package/dist/packages/core/src/index.d.ts +6 -2
  54. package/dist/packages/core/src/surfaces.d.ts +5 -0
  55. package/dist/packages/feedback/src/index.d.ts +4 -1
  56. package/dist/packages/feedback/src/toast.d.ts +5 -27
  57. package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
  58. package/dist/packages/forms/src/field-styles.d.ts +28 -0
  59. package/dist/packages/forms/src/forms.d.ts +2 -1
  60. package/dist/packages/forms/src/index.d.ts +2 -0
  61. package/dist/packages/forms/src/selection-styles.d.ts +18 -2
  62. package/dist/packages/foundations/src/overlay-styles.d.ts +3 -1
  63. package/dist/packages/foundations/src/popup-styles.d.ts +7 -0
  64. package/dist/packages/foundations/src/tokens.stylex.d.ts +61 -0
  65. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  66. package/dist/packages/layout/src/frame.stylex.d.ts +1 -0
  67. package/dist/packages/layout/src/index.d.ts +2 -1
  68. package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
  69. package/dist/packages/layout/src/sidebar.d.ts +7 -1
  70. package/dist/packages/layout/src/view-stack.d.ts +13 -0
  71. package/dist/packages/layout/src/workbench.d.ts +5 -2
  72. package/dist/packages/overlays/src/alert-dialog.d.ts +5 -2
  73. package/dist/packages/overlays/src/dialog.d.ts +7 -3
  74. package/dist/pierre-diff--zsiHCCB.js +71 -0
  75. package/dist/pierre-theme-D9hnHv3Z.js +126 -0
  76. package/dist/{pierre-tree-DdE1boiT.js → pierre-tree-BFxEuxwb.js} +3 -3
  77. package/dist/src-Be7NLG8c.js +1242 -0
  78. package/dist/src-CBspCKfO.js +969 -0
  79. package/dist/src-Cs0dRc4X.js +617 -0
  80. package/dist/src-sU9b0oZW.js +1168 -0
  81. package/dist/theme.js +1 -1
  82. package/dist/tokens.js +69 -10
  83. package/dist/viewer-styles-CpHqp5Qv.js +70 -0
  84. package/package.json +2 -1
  85. package/packages/foundations/src/tokens.stylex.ts +61 -0
  86. package/styles.css +1 -1
  87. package/dist/code-block-BRNdtTaP.js +0 -175
  88. package/dist/pierre-diff-CZdzgiYm.js +0 -66
  89. package/dist/pierre-theme-BpESNIsV.js +0 -96
  90. package/dist/popup-styles-CvtZDE2t.js +0 -135
  91. package/dist/src-Bc5sEhdO.js +0 -680
  92. package/dist/src-CfDf8TY8.js +0 -466
  93. package/dist/src-DV0BNk1M.js +0 -360
  94. package/dist/src-Eg_ytPjv.js +0 -1107
package/dist/ai.js CHANGED
@@ -1,124 +1,125 @@
1
- import { b as e, f as t, p as n, t as r, v as i } from "./src-Bc5sEhdO.js";
2
- import { t as a } from "./content-link-Dd8gapwc.js";
3
- import { c as o, u as s } from "./src-Eg_ytPjv.js";
4
- import { r as c } from "./src-CfDf8TY8.js";
5
- import * as l from "@stylexjs/stylex";
6
- import { createContext as u, useContext as d, useId as f, useRef as p } from "react";
7
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
- import { ArrowDown as g, ArrowUp as _, ExternalLink as v, File as y, Square as b } from "lucide-react";
9
- import { MessageScroller as x, useMessageScroller as S, useMessageScrollerScrollable as C } from "@shadcn/react/message-scroller";
1
+ import { C as e, E as t, T as n, f as r, g as i, p as a, t as o, w as s } from "./src-sU9b0oZW.js";
2
+ import { t as c } from "./content-link-BpSZeTNK.js";
3
+ import { r as l, t as u } from "./src-Cs0dRc4X.js";
4
+ import { c as d, u as f } from "./src-Be7NLG8c.js";
5
+ import { t as p } from "./accessibility-C-aIZ1Yx.js";
6
+ import * as m from "@stylexjs/stylex";
7
+ import { createContext as h, useContext as g, useId as _, useRef as v } from "react";
8
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { ArrowDown as x, ArrowUp as S, File as C, GitBranch as w, Square as T } from "lucide-react";
10
+ import { MessageScroller as E, useMessageScroller as D, useMessageScrollerScrollable as O } from "@shadcn/react/message-scroller";
10
11
  // packages/ai/src/approval.tsx
11
- function w(e) {
12
- return /* @__PURE__ */ h("section", {
13
- "aria-label": e.title,
14
- "data-request-id": e.requestId,
15
- className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
12
+ function k(t) {
13
+ return /* @__PURE__ */ b("section", {
14
+ "aria-label": t.title,
15
+ "data-request-id": t.requestId,
16
+ className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
16
17
  children: [
17
- /* @__PURE__ */ m("h3", {
18
- className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn xj0a0fe",
19
- children: e.title
18
+ /* @__PURE__ */ y("h3", {
19
+ className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
20
+ children: t.title
20
21
  }),
21
- e.description !== void 0 && /* @__PURE__ */ m("p", {
22
+ t.description !== void 0 && /* @__PURE__ */ y("p", {
22
23
  className: "x1ghz6dp x153jb6y xj0a0fe",
23
- children: e.description
24
+ children: t.description
24
25
  }),
25
- e.children,
26
- e.status === "pending" ? /* @__PURE__ */ h(t, { children: [/* @__PURE__ */ m(i, {
26
+ t.children,
27
+ t.status === "pending" ? /* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(e, {
27
28
  variant: "solid",
28
- onClick: e.onApprove,
29
- disabled: e.disabled === !0 || e.busy !== void 0,
30
- pending: e.busy === "approve",
29
+ onClick: t.onApprove,
30
+ disabled: t.disabled === !0 || t.busy !== void 0,
31
+ pending: t.busy === "approve",
31
32
  pendingLabel: "Approving…",
32
- children: e.approveLabel ?? "Approve"
33
- }), /* @__PURE__ */ m(i, {
34
- onClick: e.onDeny,
35
- disabled: e.disabled === !0 || e.busy !== void 0,
36
- pending: e.busy === "deny",
33
+ children: t.approveLabel ?? "Approve"
34
+ }), /* @__PURE__ */ y(e, {
35
+ onClick: t.onDeny,
36
+ disabled: t.disabled === !0 || t.busy !== void 0,
37
+ pending: t.busy === "deny",
37
38
  pendingLabel: "Denying…",
38
- children: e.denyLabel ?? "Deny"
39
- })] }) : /* @__PURE__ */ m(r, { children: e.statusLabel })
39
+ children: t.denyLabel ?? "Deny"
40
+ })] }) : /* @__PURE__ */ y(o, { children: t.statusLabel })
40
41
  ]
41
42
  });
42
43
  }
43
44
  // packages/ai/src/conversation.tsx
44
- var T = u(void 0);
45
- function E({ children: e, initialPosition: t = "end", follow: n = !0 }) {
46
- let r = p(null);
47
- return /* @__PURE__ */ m(T.Provider, {
45
+ var A = h(void 0);
46
+ function j({ children: e, initialPosition: t = "end", follow: n = !0 }) {
47
+ let r = v(null);
48
+ return /* @__PURE__ */ y(A.Provider, {
48
49
  value: r,
49
- children: /* @__PURE__ */ m(x.Provider, {
50
+ children: /* @__PURE__ */ y(E.Provider, {
50
51
  autoScroll: n,
51
52
  defaultScrollPosition: t,
52
- children: /* @__PURE__ */ m(x.Root, {
53
- className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
53
+ children: /* @__PURE__ */ y(E.Root, {
54
+ className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
54
55
  children: e
55
56
  })
56
57
  })
57
58
  });
58
59
  }
59
- function D({ label: e, children: t }) {
60
- let n = d(T);
61
- return /* @__PURE__ */ m(x.Viewport, {
62
- ref: n,
60
+ function M({ label: e, children: t, scrollRestorationId: n }) {
61
+ let r = g(A);
62
+ return /* @__PURE__ */ y(E.Viewport, {
63
+ ref: r,
63
64
  "aria-label": e,
64
- className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu x1ok0vyi x13qnu6 x9v5kkp x19rmrnh x1bqaal",
65
+ "data-scroll-restoration-id": n,
66
+ className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu x1ok0vyi x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal",
65
67
  children: t
66
68
  });
67
69
  }
68
- function O({ children: e, streaming: t = !1 }) {
69
- return /* @__PURE__ */ m(x.Content, {
70
+ function N({ children: e, streaming: t = !1 }) {
71
+ return /* @__PURE__ */ y(E.Content, {
70
72
  "aria-live": "polite",
71
73
  "aria-relevant": "additions",
72
74
  "aria-busy": t,
73
- className: "x78zum5 xdt5ytf x1j825kq x1c8xbx5 xeuugli",
75
+ className: "x9f619 x78zum5 xdt5ytf x1j825kq xi2fr2z x1m92p3w xvueqy4 xh8yej3 xe10afn xeuugli",
74
76
  children: e
75
77
  });
76
78
  }
77
- function k({ messageId: e, children: t }) {
78
- return /* @__PURE__ */ m(x.Item, {
79
+ function P({ messageId: e, children: t }) {
80
+ return /* @__PURE__ */ y(E.Item, {
79
81
  messageId: e,
80
82
  className: "xeuugli xj0a0fe",
81
83
  children: t
82
84
  });
83
85
  }
84
- function A({ label: e = "Jump to latest" }) {
85
- let { scrollToEnd: t } = S(), { end: n } = C(), r = d(T);
86
- return n ? /* @__PURE__ */ m("div", {
87
- className: "x10l6tqk xwthv0x x1nrll8i xuuh30",
88
- children: /* @__PURE__ */ h(i, {
86
+ function F({ label: t = "Jump to latest" }) {
87
+ let { scrollToEnd: n } = D(), { end: r } = O(), i = g(A);
88
+ return r ? /* @__PURE__ */ y("div", {
89
+ className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
90
+ children: /* @__PURE__ */ b(e, {
89
91
  onClick: () => {
90
- t({ behavior: "instant" }), r?.current?.focus({ preventScroll: !0 });
92
+ n({ behavior: "instant" }), i?.current?.focus({ preventScroll: !0 });
91
93
  },
92
- children: [/* @__PURE__ */ m(g, {
94
+ children: [/* @__PURE__ */ y(x, {
93
95
  size: 16,
94
96
  "aria-hidden": !0
95
- }), e]
97
+ }), t]
96
98
  })
97
99
  }) : null;
98
100
  }
99
- var j = {
100
- Root: E,
101
- Viewport: D,
102
- Content: O,
103
- Item: k,
104
- JumpToLatest: A
105
- }, M = {
101
+ var I = {
102
+ Root: j,
103
+ Viewport: M,
104
+ Content: N,
105
+ Item: P,
106
+ JumpToLatest: F
107
+ }, L = {
106
108
  root: {
107
109
  k1xSpc: "x78zum5",
108
110
  kXwgrk: "xdt5ytf",
109
- kOIVth: "x1n8ia3y",
111
+ kOIVth: "x1hnptsi",
110
112
  k7Eaqz: "xeuugli",
111
113
  kMwMTN: "xbixft",
112
114
  kMv6JI: "x1hz01jw",
113
115
  kGuDYH: "xtqrqnz",
114
116
  kLWn49: "x1778rvt",
117
+ k63SB2: "xj57cvi",
115
118
  $$css: !0
116
119
  },
117
120
  user: {
118
- kmVPX3: "x1c8xbx5",
119
- kMzoRj: "xmkeg23",
120
- ksu8eU: "x1y0btm7",
121
- kVAM5u: "x1ey3b81",
121
+ k8WAf4: "x1qokhjc",
122
+ kg3NbH: "x1m92p3w",
122
123
  kaIpWk: "x1ok0vyi",
123
124
  kWkggS: "x1r7kqkb",
124
125
  $$css: !0
@@ -129,191 +130,255 @@ var j = {
129
130
  k8WAf4: "xn9t2bk",
130
131
  $$css: !0
131
132
  }
132
- }, N = {
133
- user: M.user,
134
- assistant: M.assistant,
135
- system: M.system
133
+ }, R = {
134
+ user: L.user,
135
+ assistant: L.assistant,
136
+ system: L.system
137
+ }, z = {
138
+ "x-default-marker": "x-default-marker",
139
+ $$css: !0
136
140
  };
137
- function P({ author: e, children: t, id: n, kind: r = "assistant", meta: i, actions: a, attachments: o }) {
138
- return /* @__PURE__ */ h("article", {
141
+ function B({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
142
+ return /* @__PURE__ */ b("article", {
139
143
  id: n,
140
144
  "aria-label": e,
141
- ...l.props(M.root, N[r]),
145
+ ...m.props(L.root, R[r], z),
142
146
  children: [
143
- /* @__PURE__ */ h("header", {
144
- className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
145
- children: [/* @__PURE__ */ m("span", {
146
- className: "xk50ysn xj0a0fe",
147
- children: e
148
- }), i !== void 0 && /* @__PURE__ */ m("div", {
149
- className: "x153jb6y xy8obcc xas2l8k",
150
- children: i
151
- })]
147
+ /* @__PURE__ */ b("header", {
148
+ className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
149
+ children: [
150
+ a !== void 0 && /* @__PURE__ */ y("span", {
151
+ className: "x3nfvp2 x2lah0s",
152
+ children: a
153
+ }),
154
+ /* @__PURE__ */ y("span", {
155
+ className: "xk4h15q xeuugli xj0a0fe",
156
+ children: e
157
+ }),
158
+ i !== void 0 && /* @__PURE__ */ y("div", {
159
+ className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
160
+ children: i
161
+ })
162
+ ]
152
163
  }),
153
- /* @__PURE__ */ m("div", {
154
- className: "xeuugli xj0a0fe",
164
+ /* @__PURE__ */ y("div", {
165
+ className: "xeuugli xj0a0fe x1ytb0s6",
155
166
  children: t
156
167
  }),
157
- o !== void 0 && /* @__PURE__ */ m("div", {
158
- className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi",
159
- children: o
168
+ s !== void 0 && /* @__PURE__ */ y("div", {
169
+ className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
170
+ children: s
160
171
  }),
161
- a !== void 0 && /* @__PURE__ */ m("footer", {
162
- className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi",
163
- children: a
172
+ o !== void 0 && /* @__PURE__ */ y("footer", {
173
+ className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
174
+ children: o
164
175
  })
165
176
  ]
166
177
  });
167
178
  }
168
- function F({ name: e, description: t, href: n, actions: r }) {
169
- return /* @__PURE__ */ h("div", {
170
- className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt",
179
+ function V({ name: e, description: t, href: n, actions: r }) {
180
+ return /* @__PURE__ */ b("div", {
181
+ className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
171
182
  children: [
172
- /* @__PURE__ */ m(y, {
183
+ /* @__PURE__ */ y(C, {
173
184
  size: 16,
174
185
  "aria-hidden": !0,
175
186
  className: "x153jb6y x2lah0s"
176
187
  }),
177
- /* @__PURE__ */ h("div", {
178
- className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
179
- children: [n === void 0 ? /* @__PURE__ */ m("span", { children: e }) : /* @__PURE__ */ m(a, {
188
+ /* @__PURE__ */ b("div", {
189
+ className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
190
+ children: [n === void 0 ? /* @__PURE__ */ y("span", { children: e }) : /* @__PURE__ */ y(c, {
180
191
  href: n,
181
192
  children: e
182
- }), t !== void 0 && /* @__PURE__ */ m("span", {
183
- className: "x153jb6y xy8obcc xas2l8k",
193
+ }), t !== void 0 && /* @__PURE__ */ y("span", {
194
+ className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
184
195
  children: t
185
196
  })]
186
197
  }),
187
- r
198
+ r !== void 0 && /* @__PURE__ */ y("div", {
199
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
200
+ children: r
201
+ })
188
202
  ]
189
203
  });
190
204
  }
205
+ // packages/ai/src/message-action.tsx
206
+ function H(e) {
207
+ if (e.kind === "link") {
208
+ let { kind: t, label: r, ...i } = e;
209
+ return /* @__PURE__ */ y(n, {
210
+ ...i,
211
+ "aria-label": r
212
+ });
213
+ }
214
+ let { kind: t, label: r, ...i } = e;
215
+ return /* @__PURE__ */ y(s, {
216
+ ...i,
217
+ variant: "ghost",
218
+ "aria-label": r
219
+ });
220
+ }
221
+ function U(e) {
222
+ return /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: H(e) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: e.label }) }) })] });
223
+ }
224
+ // packages/ai/src/message-boundary.tsx
225
+ function W({ label: e, children: t }) {
226
+ return /* @__PURE__ */ b(i.Root, {
227
+ className: "xeuugli x1kbiq1m xykt701 xpu655y",
228
+ children: [/* @__PURE__ */ b(i.Trigger, {
229
+ className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
230
+ children: [/* @__PURE__ */ y(w, {
231
+ size: 14,
232
+ "aria-hidden": !0,
233
+ className: "x2lah0s"
234
+ }), /* @__PURE__ */ y("span", {
235
+ className: "xeuugli xj0a0fe",
236
+ children: e
237
+ })]
238
+ }), /* @__PURE__ */ y(i.Panel, {
239
+ className: "x153jb6y xy8obcc xas2l8k",
240
+ children: t
241
+ })]
242
+ });
243
+ }
191
244
  // packages/ai/src/prompt-input.tsx
192
- var I = { action: {
245
+ var G = { action: {
193
246
  keTefX: "xvc5jky",
194
247
  $$css: !0
195
248
  } };
196
- function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "prompt", placeholder: c, maxLength: l, required: u = !0, pending: d = !1, disabled: p = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: y = "Sending…", enterBehavior: x = "newline", compact: S = !1, description: C, error: w, controls: T, attachments: E, onStop: D, stopPending: O = !1, stopLabel: k = "Stop response" }) {
197
- let A = f(), j = p || d;
198
- function M(e) {
199
- if (x !== "submit" || e.key !== "Enter" || e.repeat) return;
249
+ function K({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: c = !0, pending: l = !1, disabled: h = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: x = "Sending…", enterBehavior: C = "newline", compact: w = !1, description: E, error: D, controls: O, attachments: k, onStop: A, stopPending: j = !1, stopLabel: M = "Stop response" }) {
250
+ let N = _(), P = h || l, F = v;
251
+ A === void 0 ? l ? F = x : C === "submit" && (F = `${v} · Enter`) : F = j ? "Stopping…" : M;
252
+ function I(e) {
253
+ if (C !== "submit" || e.key !== "Enter" || e.repeat) return;
200
254
  let t = e.altKey || e.ctrlKey || e.metaKey;
201
- e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !j && !g && D === void 0 && e.currentTarget.form?.requestSubmit());
255
+ e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !P && !g && A === void 0 && e.currentTarget.form?.requestSubmit());
202
256
  }
203
- function N(e) {
204
- e.preventDefault(), !j && !g && D === void 0 && r(e);
257
+ function L(e) {
258
+ e.preventDefault(), !P && !g && A === void 0 && r(e);
205
259
  }
206
- return /* @__PURE__ */ h("form", {
207
- onSubmit: N,
208
- className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
209
- children: [
210
- /* @__PURE__ */ h(o.Root, {
211
- invalid: w !== void 0,
212
- children: [
213
- /* @__PURE__ */ m(o.Label, { children: e }),
214
- /* @__PURE__ */ m(s, {
215
- compact: S,
216
- name: a,
217
- value: t,
218
- onChange: (e) => n(e.currentTarget.value),
219
- onKeyDown: M,
220
- placeholder: c,
221
- maxLength: l,
222
- required: u,
223
- disabled: p,
224
- readOnly: d,
225
- "aria-errormessage": w === void 0 ? void 0 : A
226
- }),
227
- C !== void 0 && /* @__PURE__ */ m(o.Description, { children: C }),
228
- w !== void 0 && /* @__PURE__ */ m(o.Error, {
229
- id: A,
230
- match: !0,
231
- role: "alert",
232
- children: w
233
- })
234
- ]
235
- }),
236
- E,
237
- /* @__PURE__ */ h("div", {
238
- className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1n8ia3y",
239
- children: [/* @__PURE__ */ m("div", {
240
- className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
241
- children: T
242
- }), D === void 0 ? /* @__PURE__ */ h(i, {
243
- xstyle: I.action,
244
- type: "submit",
245
- variant: "solid",
246
- disabled: p || g,
247
- pending: d,
248
- pendingLabel: y,
249
- children: [/* @__PURE__ */ m(_, {
250
- size: 16,
251
- "aria-hidden": !0
252
- }), v]
253
- }) : /* @__PURE__ */ h(i, {
254
- xstyle: I.action,
255
- type: "button",
256
- onClick: (e) => {
257
- e.preventDefault(), D();
258
- },
259
- disabled: p,
260
- pending: O,
261
- pendingLabel: "Stopping…",
262
- children: [/* @__PURE__ */ m(b, {
263
- size: 14,
264
- "aria-hidden": !0
265
- }), k]
266
- })]
267
- })
268
- ]
260
+ return /* @__PURE__ */ y("form", {
261
+ onSubmit: L,
262
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
263
+ children: /* @__PURE__ */ b(d.Root, {
264
+ invalid: D !== void 0,
265
+ children: [
266
+ /* @__PURE__ */ y(d.Label, {
267
+ ...m.props(p.hidden),
268
+ children: e
269
+ }),
270
+ /* @__PURE__ */ b("div", {
271
+ ...{
272
+ 0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
273
+ 1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" }
274
+ }[D !== void 0 | 0],
275
+ children: [
276
+ /* @__PURE__ */ y(f, {
277
+ appearance: "plain",
278
+ rows: w ? 1 : 2,
279
+ compact: w,
280
+ name: i,
281
+ value: t,
282
+ onChange: (e) => n(e.currentTarget.value),
283
+ onKeyDown: I,
284
+ placeholder: a ?? e,
285
+ maxLength: o,
286
+ required: c,
287
+ disabled: h,
288
+ readOnly: l,
289
+ "aria-errormessage": D === void 0 ? void 0 : N
290
+ }),
291
+ k,
292
+ /* @__PURE__ */ b("div", {
293
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
294
+ children: [O !== void 0 && /* @__PURE__ */ y("div", {
295
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
296
+ children: O
297
+ }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(s, {
298
+ xstyle: G.action,
299
+ type: "submit",
300
+ variant: "solid",
301
+ "aria-label": l ? x : v,
302
+ disabled: h || g,
303
+ pending: l,
304
+ children: /* @__PURE__ */ y(S, {
305
+ size: 16,
306
+ "aria-hidden": !0
307
+ })
308
+ }) : /* @__PURE__ */ y(s, {
309
+ xstyle: G.action,
310
+ type: "button",
311
+ "aria-label": j ? "Stopping…" : M,
312
+ onClick: (e) => {
313
+ e.preventDefault(), A();
314
+ },
315
+ disabled: h,
316
+ pending: j,
317
+ children: /* @__PURE__ */ y(T, {
318
+ size: 14,
319
+ "aria-hidden": !0
320
+ })
321
+ }) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: F }) }) })] })]
322
+ })
323
+ ]
324
+ }),
325
+ E !== void 0 && /* @__PURE__ */ y(d.Description, { children: E }),
326
+ D !== void 0 && /* @__PURE__ */ y(d.Error, {
327
+ id: N,
328
+ match: !0,
329
+ role: "alert",
330
+ children: D
331
+ })
332
+ ]
333
+ })
269
334
  });
270
335
  }
271
336
  // packages/ai/src/sources.tsx
272
- function R({ sources: e, label: t = "Sources" }) {
273
- return /* @__PURE__ */ h("section", {
337
+ function q({ sources: e, label: t = "Sources" }) {
338
+ return /* @__PURE__ */ b("section", {
274
339
  "aria-label": t,
275
- className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
276
- children: [/* @__PURE__ */ m("h3", {
277
- className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn",
278
- children: t
279
- }), /* @__PURE__ */ m("ol", {
280
- className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
281
- children: e.map((e) => /* @__PURE__ */ h("li", {
282
- className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
283
- children: [/* @__PURE__ */ h("span", {
284
- className: "x3nfvp2 x1pha0wt xunmzkg x1a02dak",
285
- children: [/* @__PURE__ */ m(a, {
340
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
341
+ children: [
342
+ /* @__PURE__ */ y("h3", {
343
+ className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
344
+ children: t
345
+ }),
346
+ e.length === 0 && /* @__PURE__ */ y("p", {
347
+ className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
348
+ children: "No sources supplied."
349
+ }),
350
+ /* @__PURE__ */ y("ol", {
351
+ className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
352
+ children: e.map((e) => /* @__PURE__ */ b("li", {
353
+ className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
354
+ children: [/* @__PURE__ */ y("span", { children: /* @__PURE__ */ y(c, {
286
355
  href: e.href,
287
356
  children: e.title
288
- }), /* @__PURE__ */ m(v, {
289
- size: 12,
290
- "aria-hidden": !0,
291
- className: "x2lah0s x153jb6y"
357
+ }) }), e.description !== void 0 && /* @__PURE__ */ y("p", {
358
+ className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
359
+ children: e.description
292
360
  })]
293
- }), e.description !== void 0 && /* @__PURE__ */ m("p", {
294
- className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
295
- children: e.description
296
- })]
297
- }, e.id))
298
- })]
361
+ }, e.id))
362
+ })
363
+ ]
299
364
  });
300
365
  }
301
- function z({ source: t, label: r }) {
302
- return /* @__PURE__ */ m("span", {
366
+ function J({ source: e, label: n }) {
367
+ return /* @__PURE__ */ y("span", {
303
368
  className: "xt0psk2 x11njtxf xss6m8b",
304
- children: /* @__PURE__ */ h(c.Root, { children: [/* @__PURE__ */ m(c.Trigger, {
305
- render: /* @__PURE__ */ m(e, {}),
306
- "aria-label": `Source ${r}: ${t.title}`,
307
- children: r
308
- }), /* @__PURE__ */ m(c.Portal, { children: /* @__PURE__ */ m(c.Positioner, {
369
+ children: /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
370
+ render: /* @__PURE__ */ y(t, {}),
371
+ "aria-label": `Source ${n}: ${e.title}`,
372
+ children: n
373
+ }), /* @__PURE__ */ y(l.Portal, { children: /* @__PURE__ */ y(l.Positioner, {
309
374
  side: "top",
310
- children: /* @__PURE__ */ m(c.Popup, { children: /* @__PURE__ */ h(n, {
375
+ children: /* @__PURE__ */ y(l.Popup, { children: /* @__PURE__ */ b(a, {
311
376
  compact: !0,
312
377
  children: [
313
- /* @__PURE__ */ m(c.Title, { children: t.title }),
314
- t.description !== void 0 && /* @__PURE__ */ m(c.Description, { children: t.description }),
315
- /* @__PURE__ */ m(a, {
316
- href: t.href,
378
+ /* @__PURE__ */ y(l.Title, { children: e.title }),
379
+ e.description !== void 0 && /* @__PURE__ */ y(l.Description, { children: e.description }),
380
+ /* @__PURE__ */ y(c, {
381
+ href: e.href,
317
382
  children: "Open source"
318
383
  })
319
384
  ]
@@ -321,4 +386,4 @@ function z({ source: t, label: r }) {
321
386
  }) })] })
322
387
  });
323
388
  }
324
- export { w as Approval, j as Conversation, z as InlineCitation, P as Message, F as MessageAttachment, L as PromptInput, R as Sources };
389
+ export { k as Approval, I as Conversation, J as InlineCitation, B as Message, U as MessageAction, V as MessageAttachment, W as MessageBoundary, K as PromptInput, q as Sources };
@@ -1,5 +1,5 @@
1
- import { n as e, o as t } from "./chart-frame-DgPdIguO.js";
2
- import { n } from "./chart-input-Sac4StHN.js";
1
+ import { n as e, s as t } from "./chart-frame-et6f6Vhg.js";
2
+ import { n } from "./chart-input-CdLkFomi.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
@@ -43,13 +43,13 @@ function f({ items: n, selection: o }) {
43
43
  selected: o?.selectedId === n.id,
44
44
  onSelect: o === void 0 ? void 0 : () => o.onSelect(n.id),
45
45
  children: [/* @__PURE__ */ a("span", {
46
- className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
46
+ className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
47
47
  children: [/* @__PURE__ */ i("span", {
48
48
  "aria-hidden": !0,
49
49
  ...r.props(s.swatch(t[n.tone]))
50
50
  }), n.label]
51
51
  }), /* @__PURE__ */ i("span", {
52
- className: "x153jb6y xp4054r",
52
+ className: "x153jb6y xp4054r xeuugli x193iq5w",
53
53
  children: n.valueLabel
54
54
  })]
55
55
  }) }, n.id))