@inf-monkeys-tech/monkeys-design 1.0.54 → 1.0.56

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.mjs CHANGED
@@ -18248,6 +18248,46 @@ function AgentWorkbenchSidebar({
18248
18248
  }
18249
18249
  ) });
18250
18250
  }
18251
+ function AgentWorkbenchExploreCardMedia({
18252
+ item,
18253
+ src = item.imageUrl,
18254
+ className,
18255
+ onError
18256
+ }) {
18257
+ if (!src) return null;
18258
+ const variant = item.mediaVariant ?? "cover";
18259
+ const isLogo = variant === "logo";
18260
+ const showLabel = variant === "cover-with-label";
18261
+ const treatmentClass = item.mediaTreatment === "monochrome-light" ? "brightness-0 invert" : item.mediaTreatment === "invert" ? "invert" : "";
18262
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
18263
+ /* @__PURE__ */ jsx(
18264
+ "span",
18265
+ {
18266
+ className: cn2(
18267
+ isLogo ? "flex size-full items-center justify-center bg-[var(--monkeys-color-card-dark)] p-5" : "block size-full",
18268
+ className
18269
+ ),
18270
+ children: /* @__PURE__ */ jsx(
18271
+ "img",
18272
+ {
18273
+ src,
18274
+ alt: "",
18275
+ className: cn2(
18276
+ "transition-transform duration-300 group-hover:scale-[1.03]",
18277
+ isLogo ? "max-h-full max-w-full object-contain" : "size-full object-cover",
18278
+ treatmentClass
18279
+ ),
18280
+ onError
18281
+ }
18282
+ )
18283
+ }
18284
+ ),
18285
+ showLabel ? /* @__PURE__ */ jsxs("span", { className: "pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent px-3 pb-2.5 pt-8 text-white", children: [
18286
+ /* @__PURE__ */ jsx("span", { className: "block text-base font-semibold leading-tight", children: item.title }),
18287
+ item.subtitle ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[11px] leading-tight text-white/75", children: item.subtitle }) : null
18288
+ ] }) : null
18289
+ ] });
18290
+ }
18251
18291
  function AgentWorkbenchExploreSidebar({
18252
18292
  sessions,
18253
18293
  groups,
@@ -18381,19 +18421,13 @@ function AgentWorkbenchExploreSidebar({
18381
18421
  type: "button",
18382
18422
  "aria-label": item.title,
18383
18423
  className: "group relative aspect-[1.27] overflow-hidden rounded-xl border border-white/15 bg-card text-left transition hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
18424
+ style: Number.isFinite(activeGroup.itemAspectRatio) && Number(activeGroup.itemAspectRatio) > 0 ? { aspectRatio: activeGroup.itemAspectRatio } : void 0,
18384
18425
  onClick: () => onIntent?.({
18385
18426
  type: "select-item",
18386
18427
  groupId: activeGroup.id,
18387
18428
  item
18388
18429
  }),
18389
- children: renderItemMedia?.(item, activeGroup) ?? (item.imageUrl ? /* @__PURE__ */ jsx(
18390
- "img",
18391
- {
18392
- src: item.imageUrl,
18393
- alt: "",
18394
- className: "size-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
18395
- }
18396
- ) : null)
18430
+ children: renderItemMedia?.(item, activeGroup) ?? /* @__PURE__ */ jsx(AgentWorkbenchExploreCardMedia, { item })
18397
18431
  },
18398
18432
  item.id
18399
18433
  )) })