@zayne-labs/ui-react 0.10.48 → 0.10.50

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.
Files changed (47) hide show
  1. package/dist/esm/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
  2. package/dist/esm/common/await/index.d.ts +8 -6
  3. package/dist/esm/common/await/index.js +3 -3
  4. package/dist/esm/common/client-gate/index.d.ts +2 -2
  5. package/dist/esm/common/error-boundary/index.d.ts +2 -2
  6. package/dist/esm/common/error-boundary/index.js +1 -1
  7. package/dist/esm/common/for/index.d.ts +4 -4
  8. package/dist/esm/common/for/index.js +1 -1
  9. package/dist/esm/common/presence/index.d.ts +2 -2
  10. package/dist/esm/common/presence/index.js +1 -1
  11. package/dist/esm/common/show/index.d.ts +4 -4
  12. package/dist/esm/common/show/index.js +1 -1
  13. package/dist/esm/common/slot/index.d.ts +4 -4
  14. package/dist/esm/common/slot/index.js +1 -1
  15. package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
  16. package/dist/esm/common/suspense-with-boundary/index.js +1 -1
  17. package/dist/esm/common/switch/index.d.ts +4 -4
  18. package/dist/esm/common/switch/index.js +1 -1
  19. package/dist/esm/common/teleport/index.d.ts +2 -2
  20. package/dist/esm/{for-DAM4xYij.js → getElementList-DwKrmXP0.js} +1 -1
  21. package/dist/esm/getElementList-DwKrmXP0.js.map +1 -0
  22. package/dist/esm/{presence-DpApdmSc.js → presence-Bk5WMQXn.js} +2 -2
  23. package/dist/esm/{presence-DpApdmSc.js.map → presence-Bk5WMQXn.js.map} +1 -1
  24. package/dist/esm/{show-CtivYwYS.js → show-parts-BsJLZhNL.js} +2 -2
  25. package/dist/esm/show-parts-BsJLZhNL.js.map +1 -0
  26. package/dist/esm/{slot-C7TE8pEK.js → slot-parts-Da1BsS7u.js} +2 -2
  27. package/dist/esm/slot-parts-Da1BsS7u.js.map +1 -0
  28. package/dist/esm/{index-CgqbRWLA.d.ts → suspense-with-boundary-CAT0Jm5m.d.ts} +2 -2
  29. package/dist/esm/ui/card/index.d.ts +12 -8
  30. package/dist/esm/ui/card/index.js +6 -6
  31. package/dist/esm/ui/card/index.js.map +1 -1
  32. package/dist/esm/ui/carousel/index.d.ts +9 -9
  33. package/dist/esm/ui/carousel/index.js +3 -3
  34. package/dist/esm/ui/drag-scroll/index.d.ts +6 -6
  35. package/dist/esm/ui/drop-zone/index.d.ts +28 -25
  36. package/dist/esm/ui/drop-zone/index.js +26 -12
  37. package/dist/esm/ui/drop-zone/index.js.map +1 -1
  38. package/dist/esm/ui/form/index.d.ts +22 -22
  39. package/dist/esm/ui/form/index.js +3 -3
  40. package/dist/esm/{error-boundary-BwGXKuLC.js → useErrorBoundary-CIUZVY-G.js} +1 -1
  41. package/dist/esm/useErrorBoundary-CIUZVY-G.js.map +1 -0
  42. package/dist/esm/{index-C-H0yigJ.d.ts → useErrorBoundary-DhOgXZDB.d.ts} +5 -5
  43. package/package.json +8 -8
  44. package/dist/esm/error-boundary-BwGXKuLC.js.map +0 -1
  45. package/dist/esm/for-DAM4xYij.js.map +0 -1
  46. package/dist/esm/show-CtivYwYS.js.map +0 -1
  47. package/dist/esm/slot-C7TE8pEK.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { InferProps } from "@zayne-labs/toolkit-react/utils";
2
2
  import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
3
- import * as react40 from "react";
3
+ import * as react from "react";
4
4
  import "@zayne-labs/toolkit-react";
5
- import * as _zayne_labs_toolkit_core2 from "@zayne-labs/toolkit-core";
5
+ import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
6
6
 
7
7
  //#region src/components/ui/drag-scroll/drag-scroll-context.d.ts
8
8
  declare const DragScrollStoreContextProvider: (props: {
@@ -28,9 +28,9 @@ declare const DragScrollStoreContextProvider: (props: {
28
28
  shouldReplace: true;
29
29
  }) | undefined): void;
30
30
  };
31
- subscribe: _zayne_labs_toolkit_core2.SubscribeFn<DragScrollStore<HTMLElement>>;
31
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore<HTMLElement>>;
32
32
  };
33
- }) => react40.FunctionComponentElement<react40.ProviderProps<{
33
+ }) => react.FunctionComponentElement<react.ProviderProps<{
34
34
  getInitialState: () => DragScrollStore<HTMLElement>;
35
35
  getListeners: () => Set<(state: DragScrollStore<HTMLElement>, prevState: DragScrollStore<HTMLElement>) => void>;
36
36
  getState: () => DragScrollStore<HTMLElement>;
@@ -51,7 +51,7 @@ declare const DragScrollStoreContextProvider: (props: {
51
51
  shouldReplace: true;
52
52
  }) | undefined): void;
53
53
  };
54
- subscribe: _zayne_labs_toolkit_core2.SubscribeFn<DragScrollStore<HTMLElement>>;
54
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore<HTMLElement>>;
55
55
  }>>, useDragScrollStoreContext: <TResult = DragScrollStore<HTMLElement>>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DragScrollStore<HTMLElement>, TResult> | undefined) => TResult;
56
56
  //#endregion
57
57
  //#region src/components/ui/drag-scroll/drag-scroll-store.d.ts
@@ -78,7 +78,7 @@ declare const createDragScrollStore: <TElement extends HTMLElement = HTMLElement
78
78
  shouldReplace: true;
79
79
  }) | undefined): void;
80
80
  };
81
- subscribe: _zayne_labs_toolkit_core2.SubscribeFn<DragScrollStore<TElement>>;
81
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore<TElement>>;
82
82
  };
83
83
  //#endregion
84
84
  //#region src/components/ui/drag-scroll/types.d.ts
@@ -1,10 +1,10 @@
1
1
  import { InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
3
- import { Awaitable, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
4
- import * as react36 from "react";
3
+ import { Awaitable, SelectorFn, UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
4
+ import * as react from "react";
5
5
  import "@zayne-labs/toolkit-react";
6
- import * as react_jsx_runtime38 from "react/jsx-runtime";
7
- import * as _zayne_labs_toolkit_core1 from "@zayne-labs/toolkit-core";
6
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
7
+ import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
8
8
  import { FileMeta, FileOrFileMeta, FileValidationErrorContextEach, FileValidationHooksAsync, FileValidationSettingsAsync } from "@zayne-labs/toolkit-core";
9
9
 
10
10
  //#region src/components/ui/drop-zone/drop-zone-store.d.ts
@@ -31,7 +31,7 @@ declare const createDropZoneStore: (storeContext: StoreContext) => {
31
31
  shouldReplace: true;
32
32
  }) | undefined): void;
33
33
  };
34
- subscribe: _zayne_labs_toolkit_core1.SubscribeFn<DropZoneStore>;
34
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
35
35
  };
36
36
  //#endregion
37
37
  //#region src/components/ui/drop-zone/utils.d.ts
@@ -270,9 +270,9 @@ declare const DropZoneStoreContextProvider: (props: {
270
270
  shouldReplace: true;
271
271
  }) | undefined): void;
272
272
  };
273
- subscribe: _zayne_labs_toolkit_core1.SubscribeFn<DropZoneStore>;
273
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
274
274
  };
275
- }) => react36.FunctionComponentElement<react36.ProviderProps<{
275
+ }) => react.FunctionComponentElement<react.ProviderProps<{
276
276
  getInitialState: () => DropZoneStore;
277
277
  getListeners: () => Set<(state: DropZoneStore, prevState: DropZoneStore) => void>;
278
278
  getState: () => DropZoneStore;
@@ -293,7 +293,7 @@ declare const DropZoneStoreContextProvider: (props: {
293
293
  shouldReplace: true;
294
294
  }) | undefined): void;
295
295
  };
296
- subscribe: _zayne_labs_toolkit_core1.SubscribeFn<DropZoneStore>;
296
+ subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
297
297
  }>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
298
298
  type FileItemContextType = {
299
299
  fileState: FileState;
@@ -303,29 +303,29 @@ type FileItemContextType = {
303
303
  type DropZoneRootProps = UseDropZoneProps & {
304
304
  children: React.ReactNode;
305
305
  };
306
- declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime38.JSX.Element;
306
+ declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime0.JSX.Element;
307
307
  type DropZoneContextProps<TSlice> = {
308
308
  children: React.ReactNode | ((context: TSlice) => React.ReactNode);
309
309
  selector?: SelectorFn<DropZoneStore, TSlice>;
310
310
  };
311
- declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react36.ReactNode;
311
+ declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react.ReactNode;
312
312
  type DropZoneContainerProps = PartInputProps["container"] & {
313
313
  asChild?: boolean;
314
314
  };
315
- declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime38.JSX.Element;
315
+ declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime0.JSX.Element;
316
316
  type DropZoneInputProps = PartInputProps["input"] & {
317
317
  asChild?: boolean;
318
318
  };
319
- declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime38.JSX.Element;
319
+ declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime0.JSX.Element;
320
320
  type DropZoneAreaProps<TSlice> = DropZoneContextProps<TSlice> & PartInputProps["container"] & {
321
321
  classNames?: Partial<Record<Extract<keyof PartInputProps, "container" | "input">, string>>;
322
322
  extraProps?: Partial<Pick<PartInputProps, "container" | "input">>;
323
323
  };
324
- declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime38.JSX.Element;
324
+ declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime0.JSX.Element;
325
325
  type DropZoneTriggerProps = PartInputProps["trigger"] & {
326
326
  asChild?: boolean;
327
327
  };
328
- declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime38.JSX.Element;
328
+ declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime0.JSX.Element;
329
329
  type ListPerItemContext = Pick<DropZoneStore, "actions"> & {
330
330
  array: DropZoneStore["fileStateArray"];
331
331
  fileState: DropZoneStore["fileStateArray"][number];
@@ -344,26 +344,29 @@ type DropZoneFileListProps = Omit<PartInputProps["fileList"], "children"> & {
344
344
  asChild?: boolean;
345
345
  forceMount?: boolean;
346
346
  } & (FileListManualListVariant | FileListPerItemVariant);
347
- declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime38.JSX.Element;
347
+ declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime0.JSX.Element;
348
348
  type DropZoneFileItemProps = FileItemContextType & PartInputProps["fileItem"] & {
349
349
  asChild?: boolean;
350
350
  };
351
- declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime38.JSX.Element;
351
+ declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime0.JSX.Element;
352
352
  type DropZoneFileItemDeleteProps = PartInputProps["fileItemDelete"] & {
353
353
  asChild?: boolean;
354
354
  };
355
- declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime38.JSX.Element;
355
+ declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime0.JSX.Element;
356
356
  type DropZoneFileItemProgressProps = PartInputProps["fileItemProgress"] & {
357
357
  asChild?: boolean;
358
358
  forceMount?: boolean;
359
359
  size?: number;
360
360
  };
361
- declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime38.JSX.Element | null;
362
- type RenderPreviewDetails<TElement extends React.ElementType = "svg"> = {
363
- node?: React.ReactNode;
364
- } & {
365
- props?: InferProps<TElement>;
361
+ declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime0.JSX.Element | null;
362
+ type NodeCtx<TElement extends React.ElementType> = {
363
+ getProps: (innerProps: Partial<InferProps<TElement>>) => InferProps<TElement>;
366
364
  };
365
+ type RenderPreviewDetails<TElement extends React.ElementType = "svg"> = UnionDiscriminator<[{
366
+ props: InferProps<TElement>;
367
+ }, {
368
+ node: React.ReactNode | ((ctx: NodeCtx<TElement>) => React.ReactNode);
369
+ }]>;
367
370
  type RenderPropContext = Pick<FileItemContextType, "fileState"> & {
368
371
  fileExtension: string;
369
372
  fileType: string;
@@ -387,7 +390,7 @@ type DropZoneFileItemPreviewProps = Omit<PartInputProps["fileItemPreview"], "chi
387
390
  }) => React.ReactNode);
388
391
  renderPreview?: boolean | RenderPreview;
389
392
  };
390
- declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime38.JSX.Element | null;
393
+ declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime0.JSX.Element | null;
391
394
  type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "children"> & Partial<Pick<FileItemContextType, "fileState">> & {
392
395
  asChild?: boolean;
393
396
  children?: React.ReactNode | ((context: Pick<FileItemContextType, "fileState">) => React.ReactNode);
@@ -397,12 +400,12 @@ type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "c
397
400
  };
398
401
  size?: "default" | "sm";
399
402
  };
400
- declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime38.JSX.Element | null;
403
+ declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime0.JSX.Element | null;
401
404
  type DropZoneFileClearProps = PartInputProps["fileItemClear"] & {
402
405
  asChild?: boolean;
403
406
  forceMount?: boolean;
404
407
  };
405
- declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime38.JSX.Element | null;
408
+ declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime0.JSX.Element | null;
406
409
  declare namespace drop_zone_parts_d_exports {
407
410
  export { DropZoneArea as Area, DropZoneContainer as Container, DropZoneContext as Context, DropZoneFileClear as FileClear, DropZoneFileItem as FileItem, DropZoneFileItemDelete as FileItemDelete, DropZoneFileItemMetadata as FileItemMetadata, DropZoneFileItemPreview as FileItemPreview, DropZoneFileItemProgress as FileItemProgress, DropZoneFileList as FileList, DropZoneInput as Input, DropZoneRoot as Root, DropZoneTrigger as Trigger };
408
411
  }
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
- import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
4
- import { n as SlotRoot } from "../../slot-C7TE8pEK.js";
5
- import { t as Presence } from "../../presence-DpApdmSc.js";
6
- import { n as For } from "../../for-DAM4xYij.js";
3
+ import { t as __exportAll } from "../../chunk-BYypO7fO.js";
4
+ import { n as SlotRoot } from "../../slot-parts-Da1BsS7u.js";
5
+ import { t as Presence } from "../../presence-Bk5WMQXn.js";
6
+ import { n as For } from "../../getElementList-DwKrmXP0.js";
7
7
  import { t as cnMerge } from "../../cn-2hIN1AQ7.js";
8
8
  import { composeRefs, composeTwoEventHandlers } from "@zayne-labs/toolkit-react/utils";
9
9
  import { isBoolean, isFile, isFunction, isNumber, isObject, isString } from "@zayne-labs/toolkit-type-helpers";
@@ -896,6 +896,9 @@ function DropZoneFileItemPreview(props) {
896
896
  children: [renderPreview && fallbackPreview(), resolvedChildren]
897
897
  });
898
898
  }
899
+ const resolvePreviewNode = (details, getProps = ((props) => props)) => {
900
+ return isFunction(details?.node) ? details.node({ getProps }) : details?.node;
901
+ };
899
902
  const getFilePreviewOrIcon = (context) => {
900
903
  const { fileExtension, fileState, fileType, renderPreview } = context;
901
904
  const renderPreviewValue = isBoolean(renderPreview) ? {} : renderPreview;
@@ -905,17 +908,28 @@ const getFilePreviewOrIcon = (context) => {
905
908
  fileType
906
909
  }) : renderPreviewValue;
907
910
  switch (true) {
908
- case fileType.startsWith("image/"): return resolvedRenderPreviewObject.image?.node ?? /* @__PURE__ */ jsx("img", {
911
+ case fileType.startsWith("image/"): return resolvePreviewNode(resolvedRenderPreviewObject.image, (innerProps) => ({
912
+ ...innerProps,
913
+ alt: innerProps.alt ?? fileState.file.name ?? "",
914
+ className: cnMerge("size-full object-cover", innerProps.className),
915
+ src: innerProps.src ?? fileState.preview
916
+ })) ?? /* @__PURE__ */ jsx("img", {
909
917
  ...resolvedRenderPreviewObject.image?.props,
910
918
  src: fileState.preview,
911
919
  alt: fileState.file.name ?? "",
912
920
  className: cnMerge("size-full object-cover", resolvedRenderPreviewObject.image?.props?.className)
913
921
  });
914
- case fileType.startsWith("video/"): return resolvedRenderPreviewObject.video?.node ?? /* @__PURE__ */ jsx(FileVideoIcon, {
922
+ case fileType.startsWith("video/"): return resolvePreviewNode(resolvedRenderPreviewObject.video, (innerProps) => ({
923
+ ...innerProps,
924
+ className: cnMerge("size-full object-cover", innerProps.className)
925
+ })) ?? /* @__PURE__ */ jsx(FileVideoIcon, {
915
926
  ...resolvedRenderPreviewObject.video?.props,
916
927
  className: cnMerge("size-full object-cover", resolvedRenderPreviewObject.video?.props?.className)
917
928
  });
918
- case fileType.startsWith("audio/"): return resolvedRenderPreviewObject.audio?.node ?? /* @__PURE__ */ jsx(FileAudioIcon, {
929
+ case fileType.startsWith("audio/"): return resolvePreviewNode(resolvedRenderPreviewObject.audio, (innerProps) => ({
930
+ ...innerProps,
931
+ className: cnMerge("size-full object-cover", innerProps.className)
932
+ })) ?? /* @__PURE__ */ jsx(FileAudioIcon, {
919
933
  ...resolvedRenderPreviewObject.audio?.props,
920
934
  className: cnMerge("size-full object-cover", resolvedRenderPreviewObject.audio?.props?.className)
921
935
  });
@@ -924,7 +938,7 @@ const getFilePreviewOrIcon = (context) => {
924
938
  "pdf",
925
939
  "rtf",
926
940
  "txt"
927
- ].includes(fileExtension): return resolvedRenderPreviewObject.text?.node ?? /* @__PURE__ */ jsx(FileTextIcon, { ...resolvedRenderPreviewObject.text?.props });
941
+ ].includes(fileExtension): return resolvePreviewNode(resolvedRenderPreviewObject.text) ?? /* @__PURE__ */ jsx(FileTextIcon, { ...resolvedRenderPreviewObject.text?.props });
928
942
  case [
929
943
  "c",
930
944
  "cpp",
@@ -941,7 +955,7 @@ const getFilePreviewOrIcon = (context) => {
941
955
  "ts",
942
956
  "tsx",
943
957
  "xml"
944
- ].includes(fileExtension): return resolvedRenderPreviewObject.code?.node ?? /* @__PURE__ */ jsx(FileCodeIcon, { ...resolvedRenderPreviewObject.code?.props });
958
+ ].includes(fileExtension): return resolvePreviewNode(resolvedRenderPreviewObject.code) ?? /* @__PURE__ */ jsx(FileCodeIcon, { ...resolvedRenderPreviewObject.code?.props });
945
959
  case [
946
960
  "7z",
947
961
  "bz2",
@@ -949,7 +963,7 @@ const getFilePreviewOrIcon = (context) => {
949
963
  "rar",
950
964
  "tar",
951
965
  "zip"
952
- ].includes(fileExtension): return resolvedRenderPreviewObject.archive?.node ?? /* @__PURE__ */ jsx(FileArchiveIcon, { ...resolvedRenderPreviewObject.archive?.props });
966
+ ].includes(fileExtension): return resolvePreviewNode(resolvedRenderPreviewObject.archive) ?? /* @__PURE__ */ jsx(FileArchiveIcon, { ...resolvedRenderPreviewObject.archive?.props });
953
967
  case [
954
968
  "apk",
955
969
  "app",
@@ -957,8 +971,8 @@ const getFilePreviewOrIcon = (context) => {
957
971
  "exe",
958
972
  "msi",
959
973
  "rpm"
960
- ].includes(fileExtension): return resolvedRenderPreviewObject.executable?.node ?? /* @__PURE__ */ jsx(FileCogIcon, { ...resolvedRenderPreviewObject.executable?.props });
961
- default: return resolvedRenderPreviewObject.default?.node ?? /* @__PURE__ */ jsx(FileIcon, { ...resolvedRenderPreviewObject.default?.props });
974
+ ].includes(fileExtension): return resolvePreviewNode(resolvedRenderPreviewObject.executable) ?? /* @__PURE__ */ jsx(FileCogIcon, { ...resolvedRenderPreviewObject.executable?.props });
975
+ default: return resolvePreviewNode(resolvedRenderPreviewObject.default) ?? /* @__PURE__ */ jsx(FileIcon, { ...resolvedRenderPreviewObject.default?.props });
962
976
  }
963
977
  };
964
978
  function DropZoneFileItemMetadata(props) {