@danxbot/ui 7.8.0 → 7.8.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.
package/dist/index.js CHANGED
@@ -44357,17 +44357,17 @@ function rH({
44357
44357
  className: "mb-2"
44358
44358
  }
44359
44359
  ),
44360
- e.parts.map((v, S) => /* @__PURE__ */ p(
44360
+ e.parts.map((S, C) => /* @__PURE__ */ p(
44361
44361
  nH,
44362
44362
  {
44363
- part: v,
44363
+ part: S,
44364
44364
  context: x,
44365
44365
  renderers: t,
44366
44366
  components: n,
44367
44367
  onPreviewFile: l,
44368
44368
  onDownloadFile: c
44369
44369
  },
44370
- S
44370
+ C
44371
44371
  )),
44372
44372
  e.error && /* @__PURE__ */ P("p", { className: "mt-1.5 flex items-start gap-1.5 text-xs text-danger-text", children: [
44373
44373
  /* @__PURE__ */ p(me, { name: "circle-alert", size: "xs", className: "mt-px shrink-0" }),
@@ -44397,10 +44397,10 @@ function rH({
44397
44397
  }
44398
44398
  );
44399
44399
  const w = () => e.parts.map(
44400
- (v) => v.type === "text" ? v.text : v.type === "code" ? v.code : ""
44400
+ (S) => S.type === "text" ? S.text : S.type === "code" ? S.code : ""
44401
44401
  ).filter(Boolean).join(`
44402
44402
 
44403
- `);
44403
+ `), v = w().length > 0;
44404
44404
  return /* @__PURE__ */ P(
44405
44405
  "article",
44406
44406
  {
@@ -44448,20 +44448,23 @@ function rH({
44448
44448
  children: y
44449
44449
  }
44450
44450
  ),
44451
- o && o.length > 0 && !e.streaming && /* @__PURE__ */ P(
44451
+ !e.streaming && (v || o && o.length > 0) && /* @__PURE__ */ P(
44452
44452
  "div",
44453
44453
  {
44454
44454
  className: W(
44455
44455
  "mt-1.5 flex items-center gap-0.5",
44456
44456
  h && "justify-end",
44457
44457
  /* Revealed on hover or focus, but ALWAYS present in the DOM and
44458
- reachable by keyboard. Hiding them with `display:none` until
44459
- hover is the version of this pattern that locks out anyone not
44460
- using a mouse. */
44461
- "opacity-0 transition-[var(--tx-colors),opacity] duration-(--dur-fast) group-hover/message:opacity-100 group-focus-within/message:opacity-100"
44458
+ reachable by keyboard, and — the point of gating the fade on
44459
+ `(hover: hover)` rather than applying it unconditionally — a
44460
+ touch screen reports no hover at all, so hiding-until-hover
44461
+ there just means hidden. Full opacity is the default; a
44462
+ pointer that can actually hover is what earns the fade. */
44463
+ "opacity-100 transition-[var(--tx-colors),opacity] duration-(--dur-fast)",
44464
+ "[@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/message:opacity-100 [@media(hover:hover)]:group-focus-within/message:opacity-100"
44462
44465
  ),
44463
44466
  children: [
44464
- /* @__PURE__ */ p(
44467
+ v && /* @__PURE__ */ p(
44465
44468
  qv,
44466
44469
  {
44467
44470
  action: {
@@ -44481,7 +44484,7 @@ function rH({
44481
44484
  message: e
44482
44485
  }
44483
44486
  ),
44484
- o.map((v) => /* @__PURE__ */ p(qv, { action: v, message: e }, v.id))
44487
+ o?.map((S) => /* @__PURE__ */ p(qv, { action: S, message: e }, S.id))
44485
44488
  ]
44486
44489
  }
44487
44490
  )