@danxbot/ui 15.37.0 → 15.38.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/dist/index.js CHANGED
@@ -44994,7 +44994,20 @@ function xM({
44994
44994
  card's handler on keyboard activation, which is where that trick
44995
44995
  quietly breaks. */
44996
44996
  "relative z-10 flex items-center gap-0.5",
44997
- p && "absolute top-1.5 right-1.5"
44997
+ /* DX-4039: a tile's cluster WRAPS inside the tile, never clips. Under
44998
+ `pointer: coarse` every action is `dx-tap`'s 44px, so three fill the
44999
+ 144px tile (3*44 + 2*2 = 136 of the 138 left of the 6px right inset)
45000
+ and a fourth has no room on the row, where `overflow-hidden` on the
45001
+ tile would cut it off. Bounded by `left-0` and right-aligned, the
45002
+ overflow drops to a second row instead. `left-0`, not the 6px that
45003
+ mirrors the right: 132px would wrap the third. A fine pointer's 24px
45004
+ actions never reach the edge, so it is unchanged.
45005
+
45006
+ The box now spans the tile's width, so it is `pointer-events-none`
45007
+ and only its controls take the pointer (`[&>*]`): otherwise the empty
45008
+ part of the row would swallow taps meant for the preview trigger
45009
+ beneath it. */
45010
+ p && "pointer-events-none absolute top-1.5 right-1.5 left-0 flex-wrap justify-end [&>*]:pointer-events-auto"
44998
45011
  ),
44999
45012
  children: [
45000
45013
  r,
@@ -45108,7 +45121,7 @@ function jw({
45108
45121
  "dx-tap grid size-6 shrink-0 cursor-pointer place-items-center rounded-md outline-none",
45109
45122
  "transition-[var(--tx-colors),opacity] duration-(--dur-fast)",
45110
45123
  "focus-visible:ring-2 focus-visible:ring-focus-ring",
45111
- o ? "bg-black/45 text-white opacity-0 backdrop-blur-[2px] hover:bg-black/70 group-hover/attachment:opacity-100 group-focus-within/attachment:opacity-100 focus-visible:opacity-100" : "text-tertiary hover:bg-surface-hover hover:text-primary",
45124
+ o ? "bg-black/45 text-white opacity-0 backdrop-blur-[2px] hover:bg-black/70 group-hover/attachment:opacity-100 group-focus-within/attachment:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100" : "text-tertiary hover:bg-surface-hover hover:text-primary",
45112
45125
  r && "pointer-events-none opacity-40"
45113
45126
  ),
45114
45127
  children: /* @__PURE__ */ d(ue, { name: e, size: "xs" })
@@ -45121,37 +45134,39 @@ function Fj({
45121
45134
  onDownload: n,
45122
45135
  renderBody: r
45123
45136
  }) {
45124
- const o = e ? ix(e) && !!e.url : !1, s = e ? ax(e) && !!e.url : !1, i = e && r ? r(e) : null;
45137
+ const [o, s] = ae(e);
45138
+ e !== null && e !== o && s(e);
45139
+ const i = e ?? o, a = i ? ix(i) && !!i.url : !1, c = i ? ax(i) && !!i.url : !1, l = i && r ? r(i) : null;
45125
45140
  return /* @__PURE__ */ d(
45126
45141
  ps,
45127
45142
  {
45128
45143
  open: e !== null,
45129
45144
  onOpenChange: t,
45130
45145
  size: "lg",
45131
- title: e?.name ?? "Attachment",
45132
- description: e?.size === void 0 ? void 0 : Ls(e.size),
45133
- actions: e && n ? /* @__PURE__ */ M(et, { variant: "outline", onClick: () => n(e), children: [
45146
+ title: i?.name ?? "Attachment",
45147
+ description: i?.size === void 0 ? void 0 : Ls(i.size),
45148
+ actions: i && n ? /* @__PURE__ */ M(et, { variant: "outline", onClick: () => n(i), children: [
45134
45149
  /* @__PURE__ */ d(ue, { name: "download", size: "sm" }),
45135
45150
  "Download"
45136
45151
  ] }) : void 0,
45137
- children: i ?? (s && e?.url ? /* @__PURE__ */ d(
45152
+ children: l ?? (c && i?.url ? /* @__PURE__ */ d(
45138
45153
  bM,
45139
45154
  {
45140
- src: e.url,
45141
- title: e.name,
45142
- poster: e.thumbnailUrl,
45143
- onDownload: n ? () => n(e) : void 0,
45155
+ src: i.url,
45156
+ title: i.name,
45157
+ poster: i.thumbnailUrl,
45158
+ onDownload: n ? () => n(i) : void 0,
45144
45159
  className: "mx-auto max-h-[60vh] w-full"
45145
45160
  }
45146
- ) : o && e?.url ? /* @__PURE__ */ d(
45161
+ ) : a && i?.url ? /* @__PURE__ */ d(
45147
45162
  "img",
45148
45163
  {
45149
- src: e.url,
45150
- alt: e.name,
45164
+ src: i.url,
45165
+ alt: i.name,
45151
45166
  className: "mx-auto max-h-[60vh] w-auto rounded-lg object-contain"
45152
45167
  }
45153
45168
  ) : /* @__PURE__ */ M("div", { className: "flex flex-col items-center gap-3 py-10 text-center", children: [
45154
- /* @__PURE__ */ d(ue, { name: e ? sx(e) : "file", size: "xl", className: "text-tertiary" }),
45169
+ /* @__PURE__ */ d(ue, { name: i ? sx(i) : "file", size: "xl", className: "text-tertiary" }),
45155
45170
  /* @__PURE__ */ d("p", { className: "max-w-sm text-sm text-tertiary", children: "No preview for this kind of file. Download it to open in the application that understands it." })
45156
45171
  ] }))
45157
45172
  }