@mechane-ai/elements 0.22.0 → 0.22.1

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 (2) hide show
  1. package/dist/ai.js +22 -14
  2. package/package.json +1 -1
package/dist/ai.js CHANGED
@@ -161,6 +161,10 @@ var W = {
161
161
  kaIpWk: "xy32g2j",
162
162
  $$css: !0
163
163
  },
164
+ chatReply: {
165
+ kAzted: "x17tes2r x17oiadl",
166
+ $$css: !0
167
+ },
164
168
  assistant: { $$css: !0 },
165
169
  system: {
166
170
  kMwMTN: "x153jb6y",
@@ -172,11 +176,15 @@ var W = {
172
176
  assistant: G.assistant,
173
177
  system: G.system
174
178
  }, q = {
179
+ user: G.bubble,
180
+ assistant: G.chatReply,
181
+ system: null
182
+ }, J = {
175
183
  "x-default-marker": "x-default-marker",
176
184
  $$css: !0
177
185
  };
178
- function J({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default" }) {
179
- let l = c === "chat" && r === "user", u = c === "default" || a !== void 0 || i !== void 0 ? /* @__PURE__ */ D("header", {
186
+ function Y({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default" }) {
187
+ let l = c === "chat", u = !l || a !== void 0 || i !== void 0 ? /* @__PURE__ */ D("header", {
180
188
  className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
181
189
  children: [
182
190
  a !== void 0 && /* @__PURE__ */ E("span", {
@@ -196,7 +204,7 @@ function J({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avat
196
204
  return /* @__PURE__ */ D("article", {
197
205
  id: n,
198
206
  "aria-label": e,
199
- ...v.props(G.root, K[r], l && G.bubble, q),
207
+ ...v.props(G.root, K[r], l && q[r], J),
200
208
  children: [
201
209
  u,
202
210
  /* @__PURE__ */ E("div", {
@@ -214,7 +222,7 @@ function J({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avat
214
222
  ]
215
223
  });
216
224
  }
217
- function Y({ name: e, description: t, href: n, actions: r }) {
225
+ function X({ name: e, description: t, href: n, actions: r }) {
218
226
  return /* @__PURE__ */ D("div", {
219
227
  className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
220
228
  children: [
@@ -241,7 +249,7 @@ function Y({ name: e, description: t, href: n, actions: r }) {
241
249
  });
242
250
  }
243
251
  // packages/ai/src/message-action.tsx
244
- function X(e) {
252
+ function Z(e) {
245
253
  if (e.kind === "link") {
246
254
  let { kind: t, label: n, ...i } = e;
247
255
  return /* @__PURE__ */ E(r, {
@@ -256,11 +264,11 @@ function X(e) {
256
264
  "aria-label": n
257
265
  });
258
266
  }
259
- function Z(e) {
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 }) }) })] });
267
+ function Q(e) {
268
+ return /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: Z(e) }), /* @__PURE__ */ E(d.Portal, { children: /* @__PURE__ */ E(d.Positioner, { children: /* @__PURE__ */ E(d.Popup, { children: e.label }) }) })] });
261
269
  }
262
270
  // packages/ai/src/message-boundary.tsx
263
- function Q({ label: e, children: t }) {
271
+ function te({ label: e, children: t }) {
264
272
  return /* @__PURE__ */ D(a.Root, {
265
273
  className: "xeuugli x1kbiq1m xykt701 xpu655y",
266
274
  children: [/* @__PURE__ */ D(a.Trigger, {
@@ -291,7 +299,7 @@ var $ = {
291
299
  $$css: !0
292
300
  }
293
301
  };
294
- function te({ isCompact: e = !1 }) {
302
+ function ne({ isCompact: e = !1 }) {
295
303
  return /* @__PURE__ */ E("div", {
296
304
  "aria-hidden": !0,
297
305
  inert: !0,
@@ -317,7 +325,7 @@ function te({ isCompact: e = !1 }) {
317
325
  })
318
326
  });
319
327
  }
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" }) {
328
+ function re({ 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
329
  let M = S(), N = u, P = b && T === void 0 && w === void 0, F = !N && !l && !f, I = p;
322
330
  O === void 0 ? l ? I = _ : y === "submit" && (I = `${p} · Enter`) : I = k ? "Stopping…" : A;
323
331
  function L(e) {
@@ -411,7 +419,7 @@ function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
411
419
  });
412
420
  }
413
421
  // packages/ai/src/reply-indicator.tsx
414
- function re({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
422
+ function ie({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
415
423
  let [r, i] = T(t === 0), { ref: a, isActive: o } = _(n && r);
416
424
  return x(() => {
417
425
  let e = setTimeout(() => i(!0), t);
@@ -432,7 +440,7 @@ function re({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
432
440
  });
433
441
  }
434
442
  // packages/ai/src/sources.tsx
435
- function ie({ sources: e, label: t = "Sources" }) {
443
+ function ae({ sources: e, label: t = "Sources" }) {
436
444
  return /* @__PURE__ */ D("section", {
437
445
  "aria-label": t,
438
446
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
@@ -461,7 +469,7 @@ function ie({ sources: e, label: t = "Sources" }) {
461
469
  ]
462
470
  });
463
471
  }
464
- function ae({ source: e, label: n }) {
472
+ function oe({ source: e, label: n }) {
465
473
  return /* @__PURE__ */ E("span", {
466
474
  className: "xt0psk2 x11njtxf xss6m8b",
467
475
  children: /* @__PURE__ */ D(u.Root, { children: [/* @__PURE__ */ E(u.Trigger, {
@@ -484,4 +492,4 @@ function ae({ source: e, label: n }) {
484
492
  }) })] })
485
493
  });
486
494
  }
487
- export { F as Approval, W as Conversation, ae as InlineCitation, J as Message, Z as MessageAction, Y as MessageAttachment, Q as MessageBoundary, ne as PromptInput, te as PromptInputPlaceholder, re as ReplyIndicator, ie as Sources };
495
+ export { F as Approval, W as Conversation, oe as InlineCitation, Y as Message, Q as MessageAction, X as MessageAttachment, te as MessageBoundary, re as PromptInput, ne as PromptInputPlaceholder, ie as ReplyIndicator, ae as Sources };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {