@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.
- package/dist/esm/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
- package/dist/esm/common/await/index.d.ts +8 -6
- package/dist/esm/common/await/index.js +3 -3
- package/dist/esm/common/client-gate/index.d.ts +2 -2
- package/dist/esm/common/error-boundary/index.d.ts +2 -2
- package/dist/esm/common/error-boundary/index.js +1 -1
- package/dist/esm/common/for/index.d.ts +4 -4
- package/dist/esm/common/for/index.js +1 -1
- package/dist/esm/common/presence/index.d.ts +2 -2
- package/dist/esm/common/presence/index.js +1 -1
- package/dist/esm/common/show/index.d.ts +4 -4
- package/dist/esm/common/show/index.js +1 -1
- package/dist/esm/common/slot/index.d.ts +4 -4
- package/dist/esm/common/slot/index.js +1 -1
- package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
- package/dist/esm/common/suspense-with-boundary/index.js +1 -1
- package/dist/esm/common/switch/index.d.ts +4 -4
- package/dist/esm/common/switch/index.js +1 -1
- package/dist/esm/common/teleport/index.d.ts +2 -2
- package/dist/esm/{for-DAM4xYij.js → getElementList-DwKrmXP0.js} +1 -1
- package/dist/esm/getElementList-DwKrmXP0.js.map +1 -0
- package/dist/esm/{presence-DpApdmSc.js → presence-Bk5WMQXn.js} +2 -2
- package/dist/esm/{presence-DpApdmSc.js.map → presence-Bk5WMQXn.js.map} +1 -1
- package/dist/esm/{show-CtivYwYS.js → show-parts-BsJLZhNL.js} +2 -2
- package/dist/esm/show-parts-BsJLZhNL.js.map +1 -0
- package/dist/esm/{slot-C7TE8pEK.js → slot-parts-Da1BsS7u.js} +2 -2
- package/dist/esm/slot-parts-Da1BsS7u.js.map +1 -0
- package/dist/esm/{index-CgqbRWLA.d.ts → suspense-with-boundary-CAT0Jm5m.d.ts} +2 -2
- package/dist/esm/ui/card/index.d.ts +12 -8
- package/dist/esm/ui/card/index.js +6 -6
- package/dist/esm/ui/card/index.js.map +1 -1
- package/dist/esm/ui/carousel/index.d.ts +9 -9
- package/dist/esm/ui/carousel/index.js +3 -3
- package/dist/esm/ui/drag-scroll/index.d.ts +6 -6
- package/dist/esm/ui/drop-zone/index.d.ts +28 -25
- package/dist/esm/ui/drop-zone/index.js +26 -12
- package/dist/esm/ui/drop-zone/index.js.map +1 -1
- package/dist/esm/ui/form/index.d.ts +22 -22
- package/dist/esm/ui/form/index.js +3 -3
- package/dist/esm/{error-boundary-BwGXKuLC.js → useErrorBoundary-CIUZVY-G.js} +1 -1
- package/dist/esm/useErrorBoundary-CIUZVY-G.js.map +1 -0
- package/dist/esm/{index-C-H0yigJ.d.ts → useErrorBoundary-DhOgXZDB.d.ts} +5 -5
- package/package.json +8 -8
- package/dist/esm/error-boundary-BwGXKuLC.js.map +0 -1
- package/dist/esm/for-DAM4xYij.js.map +0 -1
- package/dist/esm/show-CtivYwYS.js.map +0 -1
- 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
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
import "@zayne-labs/toolkit-react";
|
|
5
|
-
import * as
|
|
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:
|
|
31
|
+
subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore<HTMLElement>>;
|
|
32
32
|
};
|
|
33
|
-
}) =>
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
7
|
-
import * as
|
|
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:
|
|
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:
|
|
273
|
+
subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
|
|
274
274
|
};
|
|
275
|
-
}) =>
|
|
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:
|
|
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):
|
|
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>):
|
|
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>):
|
|
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):
|
|
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>):
|
|
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):
|
|
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>):
|
|
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>):
|
|
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):
|
|
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>):
|
|
362
|
-
type
|
|
363
|
-
|
|
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>):
|
|
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):
|
|
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):
|
|
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-
|
|
4
|
-
import { n as SlotRoot } from "../../slot-
|
|
5
|
-
import { t as Presence } from "../../presence-
|
|
6
|
-
import { n as For } from "../../
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
961
|
-
default: return resolvedRenderPreviewObject.default
|
|
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) {
|