@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.
@@ -1715,6 +1715,46 @@ function AgentWorkbenchSidebar({
1715
1715
  }
1716
1716
  ) });
1717
1717
  }
1718
+ function AgentWorkbenchExploreCardMedia({
1719
+ item,
1720
+ src = item.imageUrl,
1721
+ className,
1722
+ onError
1723
+ }) {
1724
+ if (!src) return null;
1725
+ const variant = item.mediaVariant ?? "cover";
1726
+ const isLogo = variant === "logo";
1727
+ const showLabel = variant === "cover-with-label";
1728
+ const treatmentClass = item.mediaTreatment === "monochrome-light" ? "brightness-0 invert" : item.mediaTreatment === "invert" ? "invert" : "";
1729
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1730
+ /* @__PURE__ */ jsx(
1731
+ "span",
1732
+ {
1733
+ className: cn2(
1734
+ isLogo ? "flex size-full items-center justify-center bg-[var(--monkeys-color-card-dark)] p-5" : "block size-full",
1735
+ className
1736
+ ),
1737
+ children: /* @__PURE__ */ jsx(
1738
+ "img",
1739
+ {
1740
+ src,
1741
+ alt: "",
1742
+ className: cn2(
1743
+ "transition-transform duration-300 group-hover:scale-[1.03]",
1744
+ isLogo ? "max-h-full max-w-full object-contain" : "size-full object-cover",
1745
+ treatmentClass
1746
+ ),
1747
+ onError
1748
+ }
1749
+ )
1750
+ }
1751
+ ),
1752
+ 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: [
1753
+ /* @__PURE__ */ jsx("span", { className: "block text-base font-semibold leading-tight", children: item.title }),
1754
+ item.subtitle ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[11px] leading-tight text-white/75", children: item.subtitle }) : null
1755
+ ] }) : null
1756
+ ] });
1757
+ }
1718
1758
  function AgentWorkbenchExploreSidebar({
1719
1759
  sessions,
1720
1760
  groups,
@@ -1848,19 +1888,13 @@ function AgentWorkbenchExploreSidebar({
1848
1888
  type: "button",
1849
1889
  "aria-label": item.title,
1850
1890
  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",
1891
+ style: Number.isFinite(activeGroup.itemAspectRatio) && Number(activeGroup.itemAspectRatio) > 0 ? { aspectRatio: activeGroup.itemAspectRatio } : void 0,
1851
1892
  onClick: () => onIntent?.({
1852
1893
  type: "select-item",
1853
1894
  groupId: activeGroup.id,
1854
1895
  item
1855
1896
  }),
1856
- children: renderItemMedia?.(item, activeGroup) ?? (item.imageUrl ? /* @__PURE__ */ jsx(
1857
- "img",
1858
- {
1859
- src: item.imageUrl,
1860
- alt: "",
1861
- className: "size-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
1862
- }
1863
- ) : null)
1897
+ children: renderItemMedia?.(item, activeGroup) ?? /* @__PURE__ */ jsx(AgentWorkbenchExploreCardMedia, { item })
1864
1898
  },
1865
1899
  item.id
1866
1900
  )) })
@@ -3549,6 +3583,6 @@ function AgentWorkbenchArtifactWorkspace({
3549
3583
  );
3550
3584
  }
3551
3585
 
3552
- export { AgentWorkbenchAction, AgentWorkbenchActivity, AgentWorkbenchArtifactSummary, AgentWorkbenchArtifactWorkspace, AgentWorkbenchComposer, AgentWorkbenchExploreSidebar, AgentWorkbenchProcess, AgentWorkbenchQuickStart, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchThread, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
3586
+ export { AgentWorkbenchAction, AgentWorkbenchActivity, AgentWorkbenchArtifactSummary, AgentWorkbenchArtifactWorkspace, AgentWorkbenchComposer, AgentWorkbenchExploreCardMedia, AgentWorkbenchExploreSidebar, AgentWorkbenchProcess, AgentWorkbenchQuickStart, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchThread, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
3553
3587
  //# sourceMappingURL=index.mjs.map
3554
3588
  //# sourceMappingURL=index.mjs.map