reifyui 0.16.0 → 0.16.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.
@@ -214,6 +214,8 @@ export interface FileCardProps {
214
214
  onCopy?: () => Promise<void> | void;
215
215
  /** the file open in the preview */
216
216
  active?: boolean;
217
+ /** an image's own picture (a url the browser can load, e.g. an object url) instead of its kind's icon */
218
+ thumb?: string;
217
219
  className?: string;
218
220
  }
219
221
  export function FileCard(props: FileCardProps): ReactElement;
@@ -47,7 +47,7 @@ import {
47
47
  useElapsed,
48
48
  useNow,
49
49
  useStickToBottom
50
- } from "./chunk-4SVQGVJH.js";
50
+ } from "./chunk-UP3CNKZR.js";
51
51
  import "./chunk-QCISEB67.js";
52
52
  import "./chunk-PZ5AY32C.js";
53
53
 
@@ -1900,7 +1900,7 @@ function bytesLabel(n) {
1900
1900
  if (n < 1048576) return `${Math.round(n / 1024)} KB`;
1901
1901
  return `${(n / 1048576).toFixed(1)} MB`;
1902
1902
  }
1903
- function FileCard({ name, origin = "output", bytes, onPreview, onDownload, onCopy, active = false, className = "" }) {
1903
+ function FileCard({ name, origin = "output", bytes, onPreview, onDownload, onCopy, active = false, thumb, className = "" }) {
1904
1904
  const [copied, setCopied] = useState4("");
1905
1905
  useEffect4(() => {
1906
1906
  if (!copied) return void 0;
@@ -1927,7 +1927,7 @@ function FileCard({ name, origin = "output", bytes, onPreview, onDownload, onCop
1927
1927
  } : void 0,
1928
1928
  title: name,
1929
1929
  children: [
1930
- /* @__PURE__ */ jsx3("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx3(FileTypeIcon, { name, size: 32 }) }),
1930
+ thumb ? /* @__PURE__ */ jsx3("span", { className: "uic-filecard-thumb", children: /* @__PURE__ */ jsx3("img", { src: thumb, alt: "" }) }) : /* @__PURE__ */ jsx3("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx3(FileTypeIcon, { name, size: 32 }) }),
1931
1931
  /* @__PURE__ */ jsxs2("span", { className: "uic-filecard-meta", children: [
1932
1932
  /* @__PURE__ */ jsx3("span", { className: "uic-filecard-name", children: name }),
1933
1933
  /* @__PURE__ */ jsx3("span", { className: "uic-filecard-sub", children: subtitle(name, origin, bytes) })
@@ -2304,4 +2304,4 @@ export {
2304
2304
  FileCard,
2305
2305
  FilePreview
2306
2306
  };
2307
- //# sourceMappingURL=chunk-4SVQGVJH.js.map
2307
+ //# sourceMappingURL=chunk-UP3CNKZR.js.map