@muhgholy/next-drive 4.1.0 → 4.3.0
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/README.md +18 -33
- package/dist/{chunk-OGVU5UBC.cjs → chunk-25MNL2OG.cjs} +369 -190
- package/dist/chunk-25MNL2OG.cjs.map +1 -0
- package/dist/{chunk-RGE7EYMF.js → chunk-MTGJTRD5.js} +360 -181
- package/dist/chunk-MTGJTRD5.js.map +1 -0
- package/dist/{chunk-CFLH4TCQ.cjs → chunk-TA6L5FYG.cjs} +3 -22
- package/dist/chunk-TA6L5FYG.cjs.map +1 -0
- package/dist/{chunk-T43C7MQ6.js → chunk-TMSG5WJZ.js} +4 -22
- package/dist/chunk-TMSG5WJZ.js.map +1 -0
- package/dist/client/components/dialog.d.ts.map +1 -1
- package/dist/client/components/drive/explorer.d.ts.map +1 -1
- package/dist/client/components/drive/file-grid.d.ts.map +1 -1
- package/dist/client/context.d.ts +2 -9
- package/dist/client/context.d.ts.map +1 -1
- package/dist/client/hooks/useUpload.d.ts +1 -1
- package/dist/client/hooks/useUpload.d.ts.map +1 -1
- package/dist/client/index.cjs +118 -118
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.css +1 -1
- package/dist/client/index.d.ts +1 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +15 -15
- package/dist/client/index.js.map +1 -1
- package/dist/client/utils.d.ts +2 -9
- package/dist/client/utils.d.ts.map +1 -1
- package/dist/server/config.d.ts +1 -1
- package/dist/server/config.d.ts.map +1 -1
- package/dist/server/controllers/drive.d.ts +0 -2
- package/dist/server/controllers/drive.d.ts.map +1 -1
- package/dist/server/express.cjs +12 -12
- package/dist/server/express.cjs.map +1 -1
- package/dist/server/express.d.ts +2 -2
- package/dist/server/express.d.ts.map +1 -1
- package/dist/server/express.js +3 -3
- package/dist/server/express.js.map +1 -1
- package/dist/server/index.cjs +15 -19
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/providers/google.d.ts.map +1 -1
- package/dist/server/providers/local.d.ts.map +1 -1
- package/dist/server/utils/ffmpeg.d.ts +7 -13
- package/dist/server/utils/ffmpeg.d.ts.map +1 -1
- package/dist/server/utils/folderValidation.d.ts +12 -6
- package/dist/server/utils/folderValidation.d.ts.map +1 -1
- package/dist/server/utils/imageConvert.d.ts +7 -14
- package/dist/server/utils/imageConvert.d.ts.map +1 -1
- package/dist/server/utils/metadata.d.ts +4 -22
- package/dist/server/utils/metadata.d.ts.map +1 -1
- package/dist/server/utils/migration.d.ts +2 -0
- package/dist/server/utils/migration.d.ts.map +1 -0
- package/dist/server/utils.d.ts +0 -1
- package/dist/server/utils.d.ts.map +1 -1
- package/dist/server/zod/schemas.d.ts +2 -8
- package/dist/server/zod/schemas.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +0 -2
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/lib/database/storage/account.d.ts +1 -1
- package/dist/types/lib/database/storage/account.d.ts.map +1 -1
- package/dist/types/server/config.d.ts +0 -5
- package/dist/types/server/config.d.ts.map +1 -1
- package/dist/types/server/express.d.ts +1 -5
- package/dist/types/server/express.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +2 -0
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/server/metadata.d.ts +11 -0
- package/dist/types/server/metadata.d.ts.map +1 -0
- package/dist/types/server/migration.d.ts +6 -0
- package/dist/types/server/migration.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-CFLH4TCQ.cjs.map +0 -1
- package/dist/chunk-OGVU5UBC.cjs.map +0 -1
- package/dist/chunk-RGE7EYMF.js.map +0 -1
- package/dist/chunk-T43C7MQ6.js.map +0 -1
- package/dist/client/index.css.map +0 -1
package/dist/client/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('./index.css');
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkTA6L5FYG_cjs = require('../chunk-TA6L5FYG.cjs');
|
|
5
5
|
var chunkA65ZAA2Z_cjs = require('../chunk-A65ZAA2Z.cjs');
|
|
6
6
|
var React3 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -227,11 +227,8 @@ var DriveProvider = (props) => {
|
|
|
227
227
|
setSelectedFileIds((prev) => prev.filter((sid) => sid !== id));
|
|
228
228
|
await callAPI("restore", { method: "POST", query: { id } });
|
|
229
229
|
}, [callAPI]);
|
|
230
|
-
const createUrl = React3.useCallback((driveFile
|
|
231
|
-
return
|
|
232
|
-
}, [apiEndpoint]);
|
|
233
|
-
const createSrcSet = React3.useCallback((driveFile, format) => {
|
|
234
|
-
return chunkCFLH4TCQ_cjs.driveCreateSrcSet(driveFile, apiEndpoint, format);
|
|
230
|
+
const createUrl = React3.useCallback((driveFile) => {
|
|
231
|
+
return chunkTA6L5FYG_cjs.driveCreateUrl(driveFile, apiEndpoint);
|
|
235
232
|
}, [apiEndpoint]);
|
|
236
233
|
React3__namespace.default.useEffect(() => {
|
|
237
234
|
const stored = localStorage.getItem("drive_active_account");
|
|
@@ -299,7 +296,6 @@ var DriveProvider = (props) => {
|
|
|
299
296
|
loadMore,
|
|
300
297
|
// Utilities
|
|
301
298
|
createUrl,
|
|
302
|
-
createSrcSet,
|
|
303
299
|
callAPI,
|
|
304
300
|
// Optimistic Actions
|
|
305
301
|
createFolder,
|
|
@@ -437,12 +433,13 @@ var useUpload = (apiEndpoint, activeAccountId, withCredentials = false, onUpload
|
|
|
437
433
|
addLog(item.id, "success", `All ${totalChunks} chunks uploaded successfully`);
|
|
438
434
|
updateUpload(item.id, { status: "complete", currentChunk: totalChunks });
|
|
439
435
|
} catch (error) {
|
|
440
|
-
|
|
436
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
437
|
+
if (errorMessage === "Cancelled") {
|
|
441
438
|
addLog(item.id, "warning", "Upload cancelled by user");
|
|
442
439
|
updateUpload(item.id, { status: "cancelled" });
|
|
443
440
|
} else {
|
|
444
|
-
addLog(item.id, "error", `Upload failed: ${
|
|
445
|
-
updateUpload(item.id, { status: "error", error:
|
|
441
|
+
addLog(item.id, "error", `Upload failed: ${errorMessage}`);
|
|
442
|
+
updateUpload(item.id, { status: "error", error: errorMessage });
|
|
446
443
|
}
|
|
447
444
|
} finally {
|
|
448
445
|
abortControllers.current.delete(item.id);
|
|
@@ -546,7 +543,7 @@ function Button({
|
|
|
546
543
|
Comp,
|
|
547
544
|
{
|
|
548
545
|
"data-slot": "button",
|
|
549
|
-
className:
|
|
546
|
+
className: chunkTA6L5FYG_cjs.cn(buttonVariants({ variant, size, className })),
|
|
550
547
|
...props
|
|
551
548
|
}
|
|
552
549
|
);
|
|
@@ -565,7 +562,7 @@ function Dialog2Content({
|
|
|
565
562
|
SheetPrimitive__namespace.Overlay,
|
|
566
563
|
{
|
|
567
564
|
"data-slot": "dialog2-overlay",
|
|
568
|
-
className:
|
|
565
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
569
566
|
"nd:fixed nd:inset-0 nd:z-50 nd:bg-black/60 nd:backdrop-blur-sm",
|
|
570
567
|
"nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out",
|
|
571
568
|
"nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0"
|
|
@@ -576,7 +573,7 @@ function Dialog2Content({
|
|
|
576
573
|
SheetPrimitive__namespace.Content,
|
|
577
574
|
{
|
|
578
575
|
"data-slot": "dialog2-content",
|
|
579
|
-
className:
|
|
576
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
580
577
|
"nd:overflow-hidden",
|
|
581
578
|
// Base styles
|
|
582
579
|
"nd:fixed nd:z-50 nd:flex nd:flex-col nd:bg-background nd:shadow-2xl nd:outline-none",
|
|
@@ -601,7 +598,7 @@ function Dialog2Content({
|
|
|
601
598
|
SheetPrimitive__namespace.Close,
|
|
602
599
|
{
|
|
603
600
|
"data-slot": "dialog2-close",
|
|
604
|
-
className:
|
|
601
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
605
602
|
"nd:absolute nd:top-3 nd:right-3 nd:z-10",
|
|
606
603
|
"nd:flex nd:items-center nd:justify-center nd:size-8 nd:rounded-full",
|
|
607
604
|
"nd:bg-muted/80 nd:hover:bg-muted nd:text-muted-foreground nd:hover:text-foreground",
|
|
@@ -624,7 +621,7 @@ function Dialog2Header({ className, ...props }) {
|
|
|
624
621
|
"div",
|
|
625
622
|
{
|
|
626
623
|
"data-slot": "dialog2-header",
|
|
627
|
-
className:
|
|
624
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
628
625
|
"nd:flex nd:items-center nd:justify-between nd:shrink-0 nd:px-4 nd:h-14 nd:border-b nd:bg-background/95 nd:backdrop-blur-sm",
|
|
629
626
|
className
|
|
630
627
|
),
|
|
@@ -637,7 +634,7 @@ function Dialog2Body({ className, ...props }) {
|
|
|
637
634
|
"div",
|
|
638
635
|
{
|
|
639
636
|
"data-slot": "dialog2-body",
|
|
640
|
-
className:
|
|
637
|
+
className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:min-h-0 nd:overflow-hidden", className),
|
|
641
638
|
...props
|
|
642
639
|
}
|
|
643
640
|
);
|
|
@@ -647,7 +644,7 @@ function Dialog2Footer({ className, ...props }) {
|
|
|
647
644
|
"div",
|
|
648
645
|
{
|
|
649
646
|
"data-slot": "dialog2-footer",
|
|
650
|
-
className:
|
|
647
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
651
648
|
"nd:flex nd:items-center nd:justify-end nd:gap-2 nd:shrink-0 nd:px-4 nd:py-3 nd:border-t nd:bg-background/95 nd:backdrop-blur-sm",
|
|
652
649
|
className
|
|
653
650
|
),
|
|
@@ -663,7 +660,7 @@ function Dialog2Title({
|
|
|
663
660
|
SheetPrimitive__namespace.Title,
|
|
664
661
|
{
|
|
665
662
|
"data-slot": "dialog2-title",
|
|
666
|
-
className:
|
|
663
|
+
className: chunkTA6L5FYG_cjs.cn("nd:text-base nd:font-semibold", className),
|
|
667
664
|
...props
|
|
668
665
|
}
|
|
669
666
|
);
|
|
@@ -674,7 +671,7 @@ var SheetPortal = SheetPrimitive__namespace.Portal;
|
|
|
674
671
|
var SheetOverlay = React3__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
675
672
|
SheetPrimitive__namespace.Overlay,
|
|
676
673
|
{
|
|
677
|
-
className:
|
|
674
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
678
675
|
"nd:fixed nd:inset-0 nd:z-50 nd:bg-black/80 nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0",
|
|
679
676
|
className
|
|
680
677
|
),
|
|
@@ -705,7 +702,7 @@ var SheetContent = React3__namespace.forwardRef(({ side = "right", className, ch
|
|
|
705
702
|
SheetPrimitive__namespace.Content,
|
|
706
703
|
{
|
|
707
704
|
ref,
|
|
708
|
-
className:
|
|
705
|
+
className: chunkTA6L5FYG_cjs.cn(sheetVariants({ side }), className),
|
|
709
706
|
...props,
|
|
710
707
|
children: [
|
|
711
708
|
children,
|
|
@@ -722,7 +719,7 @@ var SheetTitle = React3__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
722
719
|
SheetPrimitive__namespace.Title,
|
|
723
720
|
{
|
|
724
721
|
ref,
|
|
725
|
-
className:
|
|
722
|
+
className: chunkTA6L5FYG_cjs.cn("nd:text-lg nd:font-semibold nd:text-foreground", className),
|
|
726
723
|
...props
|
|
727
724
|
}
|
|
728
725
|
));
|
|
@@ -731,7 +728,7 @@ var SheetDescription = React3__namespace.forwardRef(({ className, ...props }, re
|
|
|
731
728
|
SheetPrimitive__namespace.Description,
|
|
732
729
|
{
|
|
733
730
|
ref,
|
|
734
|
-
className:
|
|
731
|
+
className: chunkTA6L5FYG_cjs.cn("nd:text-sm nd:text-muted-foreground", className),
|
|
735
732
|
...props
|
|
736
733
|
}
|
|
737
734
|
));
|
|
@@ -754,7 +751,7 @@ function DialogOverlay({
|
|
|
754
751
|
SheetPrimitive__namespace.Overlay,
|
|
755
752
|
{
|
|
756
753
|
"data-slot": "dialog-overlay",
|
|
757
|
-
className:
|
|
754
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
758
755
|
"nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:fixed nd:inset-0 nd:z-50 nd:bg-black/50",
|
|
759
756
|
className
|
|
760
757
|
),
|
|
@@ -774,7 +771,7 @@ function DialogContent({
|
|
|
774
771
|
SheetPrimitive__namespace.Content,
|
|
775
772
|
{
|
|
776
773
|
"data-slot": "dialog-content",
|
|
777
|
-
className:
|
|
774
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
778
775
|
"nd:bg-background nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:fixed nd:top-[50%] nd:left-[50%] nd:z-50 nd:grid nd:w-full nd:max-w-[calc(100%-2rem)] nd:translate-x-[-50%] nd:translate-y-[-50%] nd:gap-4 nd:rounded-lg nd:border nd:p-6 nd:shadow-lg nd:duration-200 nd:sm:max-w-lg",
|
|
779
776
|
className
|
|
780
777
|
),
|
|
@@ -802,7 +799,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
802
799
|
"div",
|
|
803
800
|
{
|
|
804
801
|
"data-slot": "dialog-header",
|
|
805
|
-
className:
|
|
802
|
+
className: chunkTA6L5FYG_cjs.cn("nd:flex nd:flex-col nd:gap-2 nd:text-center nd:sm:text-left", className),
|
|
806
803
|
...props
|
|
807
804
|
}
|
|
808
805
|
);
|
|
@@ -812,7 +809,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
812
809
|
"div",
|
|
813
810
|
{
|
|
814
811
|
"data-slot": "dialog-footer",
|
|
815
|
-
className:
|
|
812
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
816
813
|
"nd:flex nd:flex-col-reverse nd:gap-2 nd:sm:flex-row nd:sm:justify-end",
|
|
817
814
|
className
|
|
818
815
|
),
|
|
@@ -828,7 +825,7 @@ function DialogTitle({
|
|
|
828
825
|
SheetPrimitive__namespace.Title,
|
|
829
826
|
{
|
|
830
827
|
"data-slot": "dialog-title",
|
|
831
|
-
className:
|
|
828
|
+
className: chunkTA6L5FYG_cjs.cn("nd:text-lg nd:leading-none nd:font-semibold", className),
|
|
832
829
|
...props
|
|
833
830
|
}
|
|
834
831
|
);
|
|
@@ -841,7 +838,7 @@ function DialogDescription({
|
|
|
841
838
|
SheetPrimitive__namespace.Description,
|
|
842
839
|
{
|
|
843
840
|
"data-slot": "dialog-description",
|
|
844
|
-
className:
|
|
841
|
+
className: chunkTA6L5FYG_cjs.cn("nd:text-muted-foreground nd:text-sm", className),
|
|
845
842
|
...props
|
|
846
843
|
}
|
|
847
844
|
);
|
|
@@ -853,7 +850,7 @@ var DropdownMenuSubTrigger = React3__namespace.forwardRef(({ className, inset, c
|
|
|
853
850
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
854
851
|
{
|
|
855
852
|
ref,
|
|
856
|
-
className:
|
|
853
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
857
854
|
"nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:data-[state=open]:bg-accent",
|
|
858
855
|
inset && "nd:pl-8",
|
|
859
856
|
className
|
|
@@ -870,7 +867,7 @@ var DropdownMenuSubContent = React3__namespace.forwardRef(({ className, ...props
|
|
|
870
867
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
871
868
|
{
|
|
872
869
|
ref,
|
|
873
|
-
className:
|
|
870
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
874
871
|
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-lg nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
875
872
|
className
|
|
876
873
|
),
|
|
@@ -883,7 +880,7 @@ var DropdownMenuContent = React3__namespace.forwardRef(({ className, sideOffset
|
|
|
883
880
|
{
|
|
884
881
|
ref,
|
|
885
882
|
sideOffset,
|
|
886
|
-
className:
|
|
883
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
887
884
|
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
888
885
|
className
|
|
889
886
|
),
|
|
@@ -895,7 +892,7 @@ var DropdownMenuItem = React3__namespace.forwardRef(({ className, inset, ...prop
|
|
|
895
892
|
DropdownMenuPrimitive__namespace.Item,
|
|
896
893
|
{
|
|
897
894
|
ref,
|
|
898
|
-
className:
|
|
895
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
899
896
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
900
897
|
inset && "nd:pl-8",
|
|
901
898
|
className
|
|
@@ -908,7 +905,7 @@ var DropdownMenuCheckboxItem = React3__namespace.forwardRef(({ className, childr
|
|
|
908
905
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
909
906
|
{
|
|
910
907
|
ref,
|
|
911
|
-
className:
|
|
908
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
912
909
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
913
910
|
className
|
|
914
911
|
),
|
|
@@ -925,7 +922,7 @@ var DropdownMenuRadioItem = React3__namespace.forwardRef(({ className, children,
|
|
|
925
922
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
926
923
|
{
|
|
927
924
|
ref,
|
|
928
|
-
className:
|
|
925
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
929
926
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
930
927
|
className
|
|
931
928
|
),
|
|
@@ -941,7 +938,7 @@ var DropdownMenuLabel = React3__namespace.forwardRef(({ className, inset, ...pro
|
|
|
941
938
|
DropdownMenuPrimitive__namespace.Label,
|
|
942
939
|
{
|
|
943
940
|
ref,
|
|
944
|
-
className:
|
|
941
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
945
942
|
"nd:px-2 nd:py-1.5 nd:text-sm nd:font-semibold",
|
|
946
943
|
inset && "nd:pl-8",
|
|
947
944
|
className
|
|
@@ -954,7 +951,7 @@ var DropdownMenuSeparator = React3__namespace.forwardRef(({ className, ...props
|
|
|
954
951
|
DropdownMenuPrimitive__namespace.Separator,
|
|
955
952
|
{
|
|
956
953
|
ref,
|
|
957
|
-
className:
|
|
954
|
+
className: chunkTA6L5FYG_cjs.cn("-nd:mx-1 nd:my-1 nd:h-px nd:bg-muted", className),
|
|
958
955
|
...props
|
|
959
956
|
}
|
|
960
957
|
));
|
|
@@ -983,7 +980,7 @@ function Alert({
|
|
|
983
980
|
{
|
|
984
981
|
"data-slot": "alert",
|
|
985
982
|
role: "alert",
|
|
986
|
-
className:
|
|
983
|
+
className: chunkTA6L5FYG_cjs.cn(alertVariants({ variant }), className),
|
|
987
984
|
...props
|
|
988
985
|
}
|
|
989
986
|
);
|
|
@@ -993,7 +990,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
993
990
|
"div",
|
|
994
991
|
{
|
|
995
992
|
"data-slot": "alert-title",
|
|
996
|
-
className:
|
|
993
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
997
994
|
"nd:col-start-2 nd:line-clamp-1 nd:min-h-4 nd:font-medium nd:tracking-tight",
|
|
998
995
|
className
|
|
999
996
|
),
|
|
@@ -1009,7 +1006,7 @@ function AlertDescription({
|
|
|
1009
1006
|
"div",
|
|
1010
1007
|
{
|
|
1011
1008
|
"data-slot": "alert-description",
|
|
1012
|
-
className:
|
|
1009
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1013
1010
|
"nd:text-muted-foreground nd:col-start-2 nd:grid nd:justify-items-start nd:gap-1 nd:text-sm nd:[&_p]:leading-relaxed",
|
|
1014
1011
|
className
|
|
1015
1012
|
),
|
|
@@ -1023,7 +1020,7 @@ function Input({ className, type, ...props }) {
|
|
|
1023
1020
|
{
|
|
1024
1021
|
type,
|
|
1025
1022
|
"data-slot": "input",
|
|
1026
|
-
className:
|
|
1023
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1027
1024
|
"file:nd:text-foreground placeholder:nd:text-muted-foreground selection:nd:bg-primary selection:nd:text-primary-foreground nd:dark:bg-input/30 nd:border-input nd:h-9 nd:w-full nd:min-w-0 nd:rounded-md nd:border nd:bg-transparent nd:px-3 nd:py-1 nd:text-base nd:shadow-xs nd:transition-[color,box-shadow] nd:outline-none file:nd:inline-flex file:nd:h-7 file:nd:border-0 file:nd:bg-transparent file:nd:text-sm file:nd:font-medium nd:disabled:pointer-events-none nd:disabled:cursor-not-allowed nd:disabled:opacity-50 nd:md:text-sm",
|
|
1028
1025
|
"nd:focus-visible:border-ring nd:focus-visible:ring-ring/50 nd:focus-visible:ring-[3px]",
|
|
1029
1026
|
"aria-invalid:nd:ring-destructive/20 dark:aria-invalid:nd:ring-destructive/40 aria-invalid:nd:border-destructive",
|
|
@@ -1041,7 +1038,7 @@ function Label2({
|
|
|
1041
1038
|
LabelPrimitive__namespace.Root,
|
|
1042
1039
|
{
|
|
1043
1040
|
"data-slot": "label",
|
|
1044
|
-
className:
|
|
1041
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1045
1042
|
"nd:flex nd:items-center nd:gap-2 nd:text-sm nd:leading-none nd:font-medium nd:select-none group-nd:data-[disabled=true]:pointer-events-none group-nd:data-[disabled=true]:opacity-50 peer-nd:disabled:cursor-not-allowed peer-nd:disabled:opacity-50",
|
|
1046
1043
|
className
|
|
1047
1044
|
),
|
|
@@ -1063,7 +1060,8 @@ var DialogConfirmation = (props) => {
|
|
|
1063
1060
|
setIsLoading(true);
|
|
1064
1061
|
setError(null);
|
|
1065
1062
|
try {
|
|
1066
|
-
const
|
|
1063
|
+
const confirmFn = onConfirm;
|
|
1064
|
+
const response = await (inputs ? confirmFn(inputsValue) : confirmFn());
|
|
1067
1065
|
if (response[0]) {
|
|
1068
1066
|
onClose();
|
|
1069
1067
|
} else {
|
|
@@ -1354,7 +1352,7 @@ function Progress({
|
|
|
1354
1352
|
ProgressPrimitive__namespace.Root,
|
|
1355
1353
|
{
|
|
1356
1354
|
"data-slot": "progress",
|
|
1357
|
-
className:
|
|
1355
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1358
1356
|
"nd:bg-primary/20 nd:relative nd:h-2 nd:w-full nd:overflow-hidden nd:rounded-full",
|
|
1359
1357
|
className
|
|
1360
1358
|
),
|
|
@@ -1363,7 +1361,7 @@ function Progress({
|
|
|
1363
1361
|
ProgressPrimitive__namespace.Indicator,
|
|
1364
1362
|
{
|
|
1365
1363
|
"data-slot": "progress-indicator",
|
|
1366
|
-
className:
|
|
1364
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1367
1365
|
"nd:bg-primary nd:h-full nd:flex-1 nd:transition-all",
|
|
1368
1366
|
isIndeterminate && "nd:w-1/3 nd:animate-[indeterminate_1.5s_ease-in-out_infinite]",
|
|
1369
1367
|
!isIndeterminate && "nd:w-full",
|
|
@@ -1381,7 +1379,7 @@ var ContextMenuSubTrigger = React3__namespace.forwardRef(({ className, inset, ch
|
|
|
1381
1379
|
ContextMenuPrimitive__namespace.SubTrigger,
|
|
1382
1380
|
{
|
|
1383
1381
|
ref,
|
|
1384
|
-
className:
|
|
1382
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1385
1383
|
"nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[state=open]:bg-accent nd:data-[state=open]:text-accent-foreground",
|
|
1386
1384
|
inset && "nd:pl-8",
|
|
1387
1385
|
className
|
|
@@ -1398,7 +1396,7 @@ var ContextMenuSubContent = React3__namespace.forwardRef(({ className, ...props
|
|
|
1398
1396
|
ContextMenuPrimitive__namespace.SubContent,
|
|
1399
1397
|
{
|
|
1400
1398
|
ref,
|
|
1401
|
-
className:
|
|
1399
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1402
1400
|
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
1403
1401
|
className
|
|
1404
1402
|
),
|
|
@@ -1410,7 +1408,7 @@ var ContextMenuContent = React3__namespace.forwardRef(({ className, ...props },
|
|
|
1410
1408
|
ContextMenuPrimitive__namespace.Content,
|
|
1411
1409
|
{
|
|
1412
1410
|
ref,
|
|
1413
|
-
className:
|
|
1411
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1414
1412
|
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:animate-in nd:fade-in-80 nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
1415
1413
|
className
|
|
1416
1414
|
),
|
|
@@ -1422,7 +1420,7 @@ var ContextMenuItem = React3__namespace.forwardRef(({ className, inset, ...props
|
|
|
1422
1420
|
ContextMenuPrimitive__namespace.Item,
|
|
1423
1421
|
{
|
|
1424
1422
|
ref,
|
|
1425
|
-
className:
|
|
1423
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1426
1424
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1427
1425
|
inset && "nd:pl-8",
|
|
1428
1426
|
className
|
|
@@ -1435,7 +1433,7 @@ var ContextMenuCheckboxItem = React3__namespace.forwardRef(({ className, childre
|
|
|
1435
1433
|
ContextMenuPrimitive__namespace.CheckboxItem,
|
|
1436
1434
|
{
|
|
1437
1435
|
ref,
|
|
1438
|
-
className:
|
|
1436
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1439
1437
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1440
1438
|
className
|
|
1441
1439
|
),
|
|
@@ -1452,7 +1450,7 @@ var ContextMenuRadioItem = React3__namespace.forwardRef(({ className, children,
|
|
|
1452
1450
|
ContextMenuPrimitive__namespace.RadioItem,
|
|
1453
1451
|
{
|
|
1454
1452
|
ref,
|
|
1455
|
-
className:
|
|
1453
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1456
1454
|
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1457
1455
|
className
|
|
1458
1456
|
),
|
|
@@ -1468,7 +1466,7 @@ var ContextMenuLabel = React3__namespace.forwardRef(({ className, inset, ...prop
|
|
|
1468
1466
|
ContextMenuPrimitive__namespace.Label,
|
|
1469
1467
|
{
|
|
1470
1468
|
ref,
|
|
1471
|
-
className:
|
|
1469
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1472
1470
|
"nd:px-2 nd:py-1.5 nd:text-sm nd:font-semibold nd:text-foreground",
|
|
1473
1471
|
inset && "nd:pl-8",
|
|
1474
1472
|
className
|
|
@@ -1481,7 +1479,7 @@ var ContextMenuSeparator = React3__namespace.forwardRef(({ className, ...props }
|
|
|
1481
1479
|
ContextMenuPrimitive__namespace.Separator,
|
|
1482
1480
|
{
|
|
1483
1481
|
ref,
|
|
1484
|
-
className:
|
|
1482
|
+
className: chunkTA6L5FYG_cjs.cn("-nd:mx-1 nd:my-1 nd:h-px nd:bg-border", className),
|
|
1485
1483
|
...props
|
|
1486
1484
|
}
|
|
1487
1485
|
));
|
|
@@ -1724,7 +1722,7 @@ var FileItem = (props) => {
|
|
|
1724
1722
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { onContextMenu: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1725
1723
|
"div",
|
|
1726
1724
|
{
|
|
1727
|
-
className:
|
|
1725
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
1728
1726
|
"group nd:relative nd:cursor-pointer nd:transition-all nd:select-none",
|
|
1729
1727
|
"nd:focus:outline-none nd:focus-visible:ring-2 nd:focus-visible:ring-primary",
|
|
1730
1728
|
viewMode === "GRID" ? "nd:flex nd:flex-col nd:rounded-lg nd:sm:rounded-xl nd:border nd:bg-card nd:dark:bg-card/50 nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:overflow-hidden" : "nd:flex nd:items-center nd:gap-2 nd:sm:gap-3 nd:p-1.5 nd:sm:p-2 nd:rounded-lg nd:border nd:border-transparent nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:hover:border-border",
|
|
@@ -1745,19 +1743,19 @@ var FileItem = (props) => {
|
|
|
1745
1743
|
className: "nd:size-full nd:object-cover nd:transition-transform group-nd:hover:scale-105 nd:duration-300",
|
|
1746
1744
|
loading: "lazy"
|
|
1747
1745
|
}
|
|
1748
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children:
|
|
1746
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children: chunkTA6L5FYG_cjs.getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-8 nd:sm:size-10 nd:md:size-12 nd:text-muted-foreground/60") }),
|
|
1749
1747
|
isSelected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:absolute nd:top-1.5 nd:right-1.5 nd:sm:top-2 nd:sm:right-2 nd:size-5 nd:bg-primary nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md nd:animate-in nd:zoom-in-50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-2 nd:bg-primary-foreground nd:rounded-full" }) }),
|
|
1750
1748
|
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:absolute nd:bottom-1.5 nd:right-1.5 nd:sm:bottom-2 nd:sm:right-2 nd:lg:hidden nd:size-5 nd:sm:size-6 nd:bg-primary/90 nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nd:size-3 nd:sm:size-3.5 nd:text-primary-foreground" }) })
|
|
1751
1749
|
] }),
|
|
1752
1750
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:p-1.5 nd:sm:p-2", children: [
|
|
1753
1751
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate nd:leading-tight", title: item.name, children: item.name }),
|
|
1754
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" :
|
|
1752
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" : chunkTA6L5FYG_cjs.formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1755
1753
|
] })
|
|
1756
1754
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1757
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-10 nd:shrink-0 nd:rounded-lg nd:overflow-hidden nd:bg-muted/50 nd:dark:bg-muted/30 nd:flex nd:items-center nd:justify-center", children: isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-cover", loading: "lazy" }) :
|
|
1755
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-10 nd:shrink-0 nd:rounded-lg nd:overflow-hidden nd:bg-muted/50 nd:dark:bg-muted/30 nd:flex nd:items-center nd:justify-center", children: isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-cover", loading: "lazy" }) : chunkTA6L5FYG_cjs.getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-5 nd:text-muted-foreground") }),
|
|
1758
1756
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
1759
1757
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", title: item.name, children: item.name }),
|
|
1760
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: isFolder ? "Folder" :
|
|
1758
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: isFolder ? "Folder" : chunkTA6L5FYG_cjs.formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1761
1759
|
] }),
|
|
1762
1760
|
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nd:size-4 nd:text-muted-foreground nd:lg:hidden nd:shrink-0" })
|
|
1763
1761
|
] })
|
|
@@ -1817,7 +1815,7 @@ var DriveFileGrid = (props) => {
|
|
|
1817
1815
|
let filtered = items;
|
|
1818
1816
|
if (mimeFilter) {
|
|
1819
1817
|
filtered = filtered.filter(
|
|
1820
|
-
(item) =>
|
|
1818
|
+
(item) => chunkTA6L5FYG_cjs.matchesMimeFilter(
|
|
1821
1819
|
item.information.type === "FILE" ? item.information.mime : "",
|
|
1822
1820
|
item.information.type === "FOLDER",
|
|
1823
1821
|
mimeFilter
|
|
@@ -1828,7 +1826,8 @@ var DriveFileGrid = (props) => {
|
|
|
1828
1826
|
if (a.information.type === "FOLDER" && b.information.type !== "FOLDER") return -1;
|
|
1829
1827
|
if (a.information.type !== "FOLDER" && b.information.type === "FOLDER") return 1;
|
|
1830
1828
|
if (sortBy.field === "order") return 0;
|
|
1831
|
-
let valA
|
|
1829
|
+
let valA;
|
|
1830
|
+
let valB;
|
|
1832
1831
|
if (sortBy.field === "name") {
|
|
1833
1832
|
valA = a.name.toLowerCase();
|
|
1834
1833
|
valB = b.name.toLowerCase();
|
|
@@ -1903,7 +1902,7 @@ var DriveFileGrid = (props) => {
|
|
|
1903
1902
|
};
|
|
1904
1903
|
const enableDrag = currentView === "BROWSE";
|
|
1905
1904
|
if (isLoading && items.length === 0) {
|
|
1906
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1905
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:flex nd:flex-col", className), children: [
|
|
1907
1906
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:h-1 nd:w-full nd:shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1908
1907
|
Progress,
|
|
1909
1908
|
{
|
|
@@ -1916,10 +1915,10 @@ var DriveFileGrid = (props) => {
|
|
|
1916
1915
|
] });
|
|
1917
1916
|
}
|
|
1918
1917
|
if (error) {
|
|
1919
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1918
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:flex nd:items-center nd:justify-center nd:p-8", className), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-destructive nd:font-medium nd:text-center", children: error }) });
|
|
1920
1919
|
}
|
|
1921
1920
|
if (processedItems.length === 0) {
|
|
1922
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1921
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:flex nd:flex-col nd:items-center nd:justify-center nd:p-8 nd:text-center", className), children: [
|
|
1923
1922
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-16 nd:rounded-2xl nd:bg-muted/50 nd:dark:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { className: "nd:size-8 nd:text-muted-foreground/60" }) }),
|
|
1924
1923
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "This folder is empty" })
|
|
1925
1924
|
] });
|
|
@@ -1933,7 +1932,7 @@ var DriveFileGrid = (props) => {
|
|
|
1933
1932
|
indicatorClassName: "nd:bg-primary"
|
|
1934
1933
|
}
|
|
1935
1934
|
) }),
|
|
1936
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1935
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:overflow-y-auto nd:min-h-0 nd:p-2 nd:sm:p-3 nd:md:p-4", className), children: [
|
|
1937
1936
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:space-y-4 nd:sm:space-y-6", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1938
1937
|
groupBy !== "NONE" && /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "nd:text-xs nd:font-semibold nd:text-muted-foreground nd:uppercase nd:tracking-wide nd:mb-2 nd:sm:mb-3 nd:px-1", children: [
|
|
1939
1938
|
groupName,
|
|
@@ -1944,7 +1943,7 @@ var DriveFileGrid = (props) => {
|
|
|
1944
1943
|
")"
|
|
1945
1944
|
] })
|
|
1946
1945
|
] }),
|
|
1947
|
-
/* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: groupItems.map((i) => i.id), strategy: sortable.rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1946
|
+
/* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: groupItems.map((i) => i.id), strategy: sortable.rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
1948
1947
|
viewMode === "GRID" ? "nd:grid nd:grid-cols-3 nd:sm:grid-cols-4 nd:md:grid-cols-5 nd:lg:grid-cols-6 nd:xl:grid-cols-7 nd:gap-2 nd:sm:gap-3" : "nd:flex nd:flex-col nd:gap-1"
|
|
1949
1948
|
), children: groupItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
1949
|
SortableItem,
|
|
@@ -2045,7 +2044,7 @@ var DriveHeader = ({ className }) => {
|
|
|
2045
2044
|
createFolder
|
|
2046
2045
|
} = useDrive();
|
|
2047
2046
|
const [dialogs, setDialogs] = React3.useState({ delete: false, emptyTrash: false, newFolder: false });
|
|
2048
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2047
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex nd:flex-wrap nd:items-center nd:gap-2 nd:bg-muted/30 nd:dark:bg-muted/20 nd:p-2", className), children: [
|
|
2049
2048
|
currentView === "BROWSE" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2050
2049
|
Button,
|
|
2051
2050
|
{
|
|
@@ -2133,11 +2132,11 @@ var DriveHeader = ({ className }) => {
|
|
|
2133
2132
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "start", children: [
|
|
2134
2133
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setGroupBy("NONE"), children: [
|
|
2135
2134
|
groupBy === "NONE" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2136
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2135
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkTA6L5FYG_cjs.cn(groupBy !== "NONE" && "nd:pl-5.5"), children: "No Grouping" })
|
|
2137
2136
|
] }),
|
|
2138
2137
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setGroupBy("CREATED_AT"), children: [
|
|
2139
2138
|
groupBy === "CREATED_AT" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2140
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2139
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkTA6L5FYG_cjs.cn(groupBy !== "CREATED_AT" && "nd:pl-5.5"), children: "Created Date" })
|
|
2141
2140
|
] })
|
|
2142
2141
|
] })
|
|
2143
2142
|
] }),
|
|
@@ -2187,43 +2186,43 @@ var DriveHeader = ({ className }) => {
|
|
|
2187
2186
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", children: [
|
|
2188
2187
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "order", order: 1 }), children: [
|
|
2189
2188
|
sortBy.field === "order" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2190
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2189
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkTA6L5FYG_cjs.cn(sortBy.field !== "order" && "nd:pl-5.5"), children: "Custom Order" })
|
|
2191
2190
|
] }),
|
|
2192
2191
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "id", order: 1 }), children: [
|
|
2193
2192
|
sortBy.field === "id" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2194
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2193
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkTA6L5FYG_cjs.cn(sortBy.field !== "id" && "nd:pl-5.5"), children: "Default" })
|
|
2195
2194
|
] }),
|
|
2196
2195
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
2197
2196
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "createdAt", order: -1 }), children: [
|
|
2198
2197
|
sortBy.field === "createdAt" && sortBy.order === -1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2199
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className:
|
|
2198
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "createdAt" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2200
2199
|
"Date: Newest"
|
|
2201
2200
|
] }),
|
|
2202
2201
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "createdAt", order: 1 }), children: [
|
|
2203
2202
|
sortBy.field === "createdAt" && sortBy.order === 1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2204
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className:
|
|
2203
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "createdAt" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2205
2204
|
"Date: Oldest"
|
|
2206
2205
|
] }),
|
|
2207
2206
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
2208
2207
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "name", order: 1 }), children: [
|
|
2209
2208
|
sortBy.field === "name" && sortBy.order === 1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2210
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDownAZ, { className:
|
|
2209
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDownAZ, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "name" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2211
2210
|
"Name: A to Z"
|
|
2212
2211
|
] }),
|
|
2213
2212
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "name", order: -1 }), children: [
|
|
2214
2213
|
sortBy.field === "name" && sortBy.order === -1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2215
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpAZ, { className:
|
|
2214
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpAZ, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "name" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2216
2215
|
"Name: Z to A"
|
|
2217
2216
|
] }),
|
|
2218
2217
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
2219
2218
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "size", order: -1 }), children: [
|
|
2220
2219
|
sortBy.field === "size" && sortBy.order === -1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2221
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown01, { className:
|
|
2220
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown01, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "size" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2222
2221
|
"Size: Large"
|
|
2223
2222
|
] }),
|
|
2224
2223
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "size", order: 1 }), children: [
|
|
2225
2224
|
sortBy.field === "size" && sortBy.order === 1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2226
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp01, { className:
|
|
2225
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp01, { className: chunkTA6L5FYG_cjs.cn("nd:size-3.5 nd:mr-2", sortBy.field === "size" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2227
2226
|
"Size: Small"
|
|
2228
2227
|
] })
|
|
2229
2228
|
] })
|
|
@@ -2236,7 +2235,7 @@ var DriveHeader = ({ className }) => {
|
|
|
2236
2235
|
type: "button",
|
|
2237
2236
|
variant: "ghost",
|
|
2238
2237
|
size: "icon",
|
|
2239
|
-
className:
|
|
2238
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2240
2239
|
"nd:h-8 nd:w-8",
|
|
2241
2240
|
viewMode === "GRID" && "nd:bg-background nd:shadow-sm nd:hover:bg-background nd:dark:bg-background/80"
|
|
2242
2241
|
),
|
|
@@ -2252,7 +2251,7 @@ var DriveHeader = ({ className }) => {
|
|
|
2252
2251
|
type: "button",
|
|
2253
2252
|
variant: "ghost",
|
|
2254
2253
|
size: "icon",
|
|
2255
|
-
className:
|
|
2254
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2256
2255
|
"nd:h-8 nd:w-8",
|
|
2257
2256
|
viewMode === "LIST" && "nd:bg-background nd:shadow-sm nd:hover:bg-background nd:dark:bg-background/80"
|
|
2258
2257
|
),
|
|
@@ -2331,7 +2330,7 @@ var DroppablePathItem = (props) => {
|
|
|
2331
2330
|
"span",
|
|
2332
2331
|
{
|
|
2333
2332
|
ref: setNodeRef,
|
|
2334
|
-
className:
|
|
2333
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2335
2334
|
"nd:font-medium nd:text-foreground nd:px-1 nd:text-xs nd:sm:text-sm nd:truncate nd:max-w-30 nd:sm:max-w-none",
|
|
2336
2335
|
isOver && !isCurrentFolder && "nd:bg-primary/20 nd:rounded"
|
|
2337
2336
|
),
|
|
@@ -2347,7 +2346,7 @@ var DroppablePathItem = (props) => {
|
|
|
2347
2346
|
ref: setNodeRef,
|
|
2348
2347
|
variant: "ghost",
|
|
2349
2348
|
size: "sm",
|
|
2350
|
-
className:
|
|
2349
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2351
2350
|
"nd:h-6 nd:font-normal nd:text-xs nd:sm:text-sm nd:px-1.5 nd:sm:px-2 nd:truncate nd:max-w-25 nd:sm:max-w-37.5",
|
|
2352
2351
|
isOver && !isCurrentFolder && "nd:ring-2 nd:ring-primary nd:bg-primary/10 nd:scale-105"
|
|
2353
2352
|
),
|
|
@@ -2360,7 +2359,7 @@ var DroppablePathItem = (props) => {
|
|
|
2360
2359
|
};
|
|
2361
2360
|
var DrivePathBar = ({ className }) => {
|
|
2362
2361
|
const { path, navigateToFolder } = useDrive();
|
|
2363
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
2362
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunkTA6L5FYG_cjs.cn("nd:flex nd:items-center nd:gap-1 nd:sm:gap-1.5 nd:text-sm nd:text-muted-foreground nd:overflow-x-auto nd:flex-nowrap nd:min-w-0", className), "aria-label": "Breadcrumb", role: "navigation", children: path.map((item, index) => {
|
|
2364
2363
|
const isLast = index === path.length - 1;
|
|
2365
2364
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "nd:flex nd:items-center nd:gap-1 nd:sm:gap-1.5 nd:shrink-0", children: [
|
|
2366
2365
|
index > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-muted-foreground/50 nd:text-xs", "aria-hidden": "true", children: "/" }),
|
|
@@ -2439,7 +2438,7 @@ var LogViewerDialog = (props) => {
|
|
|
2439
2438
|
logs.map((log, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2440
2439
|
"div",
|
|
2441
2440
|
{
|
|
2442
|
-
className:
|
|
2441
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2443
2442
|
"nd:flex nd:items-start nd:gap-2 nd:p-2 nd:rounded-md nd:border nd:text-sm",
|
|
2444
2443
|
log.type === "error" && "nd:bg-destructive/5 nd:border-destructive/20",
|
|
2445
2444
|
log.type === "warning" && "nd:bg-yellow-500/5 nd:border-yellow-500/20",
|
|
@@ -2447,7 +2446,7 @@ var LogViewerDialog = (props) => {
|
|
|
2447
2446
|
log.type === "info" && "nd:bg-muted/50 nd:border-border"
|
|
2448
2447
|
),
|
|
2449
2448
|
children: [
|
|
2450
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2449
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
2451
2450
|
"nd:shrink-0 nd:size-1.5 nd:rounded-full nd:mt-1.5",
|
|
2452
2451
|
log.type === "error" && "nd:bg-destructive",
|
|
2453
2452
|
log.type === "warning" && "nd:bg-yellow-500",
|
|
@@ -2495,7 +2494,7 @@ var DriveUpload = (props) => {
|
|
|
2495
2494
|
}, [uploads, showUploadsDialog, manuallyOpened]);
|
|
2496
2495
|
const filterFiles = React3.useCallback((files) => {
|
|
2497
2496
|
if (!accept) return files;
|
|
2498
|
-
return files.filter((file) =>
|
|
2497
|
+
return files.filter((file) => chunkTA6L5FYG_cjs.matchesMimeFilter(file.type, false, accept));
|
|
2499
2498
|
}, [accept]);
|
|
2500
2499
|
const handleFiles = React3.useCallback((files) => {
|
|
2501
2500
|
if (!files || files.length === 0) return;
|
|
@@ -2542,7 +2541,7 @@ var DriveUpload = (props) => {
|
|
|
2542
2541
|
/* @__PURE__ */ jsxRuntime.jsx(UploadStatusIcon, { status: upload.status }),
|
|
2543
2542
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
2544
2543
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", children: upload.name }),
|
|
2545
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className:
|
|
2544
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: chunkTA6L5FYG_cjs.cn(
|
|
2546
2545
|
"nd:text-xs nd:break-words",
|
|
2547
2546
|
upload.status === "error" ? "nd:text-destructive" : "nd:text-muted-foreground"
|
|
2548
2547
|
), children: [
|
|
@@ -2627,7 +2626,7 @@ var DriveUpload = (props) => {
|
|
|
2627
2626
|
size: "sm",
|
|
2628
2627
|
disabled: isLoading,
|
|
2629
2628
|
title: "Refresh",
|
|
2630
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className:
|
|
2629
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: chunkTA6L5FYG_cjs.cn("nd:size-4 nd:shrink-0", isLoading && "nd:animate-spin") })
|
|
2631
2630
|
}
|
|
2632
2631
|
),
|
|
2633
2632
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2667,7 +2666,7 @@ var DriveUpload = (props) => {
|
|
|
2667
2666
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2668
2667
|
"div",
|
|
2669
2668
|
{
|
|
2670
|
-
className:
|
|
2669
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
2671
2670
|
"nd:flex nd:flex-col nd:items-center nd:justify-center nd:p-8 nd:border-2 nd:border-dashed nd:rounded-lg nd:cursor-pointer nd:transition-colors",
|
|
2672
2671
|
isDragging ? "nd:border-primary nd:bg-primary/5" : "nd:border-muted-foreground/25 nd:hover:border-primary/50 nd:hover:bg-muted/50"
|
|
2673
2672
|
),
|
|
@@ -2729,23 +2728,23 @@ var DriveStorageIndicator = (props) => {
|
|
|
2729
2728
|
const isFull = percentage >= 100;
|
|
2730
2729
|
const stateColor = isFull ? "nd:text-destructive" : isNearFull ? "nd:text-yellow-600 nd:dark:text-yellow-500" : "nd:text-primary";
|
|
2731
2730
|
if (compact) {
|
|
2732
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2731
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex nd:items-center nd:gap-3 nd:text-xs nd:font-medium nd:text-muted-foreground", className), children: [
|
|
2733
2732
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nd:shrink-0 nd:flex nd:items-center nd:gap-1.5", children: [
|
|
2734
2733
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cloud, { className: "nd:size-3.5" }),
|
|
2735
2734
|
"Storage"
|
|
2736
2735
|
] }),
|
|
2737
|
-
/* @__PURE__ */ jsxRuntime.jsx(Progress, { value: percentage, indicatorClassName:
|
|
2736
|
+
/* @__PURE__ */ jsxRuntime.jsx(Progress, { value: percentage, indicatorClassName: chunkTA6L5FYG_cjs.cn("nd:bg-gradient-to-r nd:from-blue-500 nd:to-cyan-500", isNearFull && "nd:from-yellow-500 nd:to-orange-500", isFull && "nd:bg-destructive"), className: "nd:w-24 nd:sm:w-32" }),
|
|
2738
2737
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nd:shrink-0 nd:whitespace-nowrap", children: [
|
|
2739
|
-
|
|
2738
|
+
chunkTA6L5FYG_cjs.formatBytes(usedInBytes),
|
|
2740
2739
|
" / ",
|
|
2741
|
-
|
|
2740
|
+
chunkTA6L5FYG_cjs.formatBytes(totalInBytes)
|
|
2742
2741
|
] })
|
|
2743
2742
|
] });
|
|
2744
2743
|
}
|
|
2745
2744
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2746
2745
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:justify-between nd:gap-2 nd:mb-2", children: [
|
|
2747
2746
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:gap-2", children: [
|
|
2748
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cloud, { className:
|
|
2747
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cloud, { className: chunkTA6L5FYG_cjs.cn("nd:size-4", stateColor) }),
|
|
2749
2748
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-xs nd:font-medium nd:text-muted-foreground", children: "Storage" })
|
|
2750
2749
|
] }),
|
|
2751
2750
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nd:text-xs nd:font-semibold nd:tabular-nums", children: [
|
|
@@ -2758,17 +2757,17 @@ var DriveStorageIndicator = (props) => {
|
|
|
2758
2757
|
{
|
|
2759
2758
|
value: percentage,
|
|
2760
2759
|
className: "nd:h-1.5",
|
|
2761
|
-
indicatorClassName:
|
|
2760
|
+
indicatorClassName: chunkTA6L5FYG_cjs.cn(
|
|
2762
2761
|
"nd:transition-all nd:duration-500",
|
|
2763
2762
|
isFull ? "nd:bg-destructive" : isNearFull ? "nd:bg-yellow-500" : "nd:bg-gradient-to-r nd:from-blue-500 nd:to-purple-500"
|
|
2764
2763
|
)
|
|
2765
2764
|
}
|
|
2766
2765
|
),
|
|
2767
2766
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:justify-between nd:items-center nd:mt-1.5", children: [
|
|
2768
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children:
|
|
2769
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children:
|
|
2767
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children: chunkTA6L5FYG_cjs.formatBytes(usedInBytes) }),
|
|
2768
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children: chunkTA6L5FYG_cjs.formatBytes(totalInBytes) })
|
|
2770
2769
|
] }),
|
|
2771
|
-
isNearFull && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2770
|
+
isNearFull && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
2772
2771
|
"nd:flex nd:items-center nd:gap-1.5 nd:text-[10px] nd:font-medium nd:px-2 nd:py-1 nd:rounded-md nd:mt-2",
|
|
2773
2772
|
isFull ? "nd:bg-destructive/10 nd:text-destructive" : "nd:bg-yellow-500/10 nd:text-yellow-600 nd:dark:text-yellow-500"
|
|
2774
2773
|
), children: [
|
|
@@ -2895,7 +2894,7 @@ var ChooserSidebar = (props) => {
|
|
|
2895
2894
|
) : /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { open: dropdownOpen, onOpenChange: setDropdownOpen, children: [
|
|
2896
2895
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", className: "nd:flex-1 nd:min-w-0 nd:justify-between nd:px-2 nd:h-11 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30", children: [
|
|
2897
2896
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:gap-2 nd:text-left nd:min-w-0 nd:flex-1", children: [
|
|
2898
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2897
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
2899
2898
|
"nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
2900
2899
|
activeAccountId ? "nd:bg-blue-500/10 nd:text-blue-600 nd:dark:bg-blue-500/20 nd:dark:text-blue-400" : "nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400"
|
|
2901
2900
|
), children: activeAccountId ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "nd:size-3.5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { className: "nd:size-3.5" }) }),
|
|
@@ -2975,7 +2974,7 @@ var ChooserSidebar = (props) => {
|
|
|
2975
2974
|
Button,
|
|
2976
2975
|
{
|
|
2977
2976
|
variant: "ghost",
|
|
2978
|
-
className:
|
|
2977
|
+
className: chunkTA6L5FYG_cjs.cn("nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium", currentView !== "TRASH" ? "nd:bg-primary/10 nd:text-primary nd:hover:bg-primary/15" : "nd:hover:bg-muted/50"),
|
|
2979
2978
|
onClick: () => {
|
|
2980
2979
|
setCurrentView("BROWSE");
|
|
2981
2980
|
onNavigate?.();
|
|
@@ -2990,7 +2989,7 @@ var ChooserSidebar = (props) => {
|
|
|
2990
2989
|
Button,
|
|
2991
2990
|
{
|
|
2992
2991
|
variant: "ghost",
|
|
2993
|
-
className:
|
|
2992
|
+
className: chunkTA6L5FYG_cjs.cn("nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium", currentView === "TRASH" ? "nd:bg-destructive/10 nd:text-destructive nd:hover:bg-destructive/15" : "nd:hover:bg-muted/50"),
|
|
2994
2993
|
onClick: () => {
|
|
2995
2994
|
setCurrentView("TRASH");
|
|
2996
2995
|
onNavigate?.();
|
|
@@ -3084,7 +3083,7 @@ var DriveFileChooser = (props) => {
|
|
|
3084
3083
|
}, [multiple, value, onChange]);
|
|
3085
3084
|
const hasSelection = value && (Array.isArray(value) ? value.length > 0 : true);
|
|
3086
3085
|
const displayFiles = React3.useMemo(() => !value ? [] : Array.isArray(value) ? value : [value], [value]);
|
|
3087
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3086
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:w-full", className), children: [
|
|
3088
3087
|
!hasSelection ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3089
3088
|
Button,
|
|
3090
3089
|
{
|
|
@@ -3092,26 +3091,26 @@ var DriveFileChooser = (props) => {
|
|
|
3092
3091
|
variant: "outline",
|
|
3093
3092
|
onClick: () => setIsOpen(true),
|
|
3094
3093
|
disabled,
|
|
3095
|
-
className:
|
|
3094
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
3096
3095
|
"nd:w-full nd:h-auto nd:justify-start nd:gap-3 nd:px-3 nd:py-2.5 nd:border-dashed",
|
|
3097
3096
|
error && "nd:border-destructive"
|
|
3098
3097
|
),
|
|
3099
3098
|
children: [
|
|
3100
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3099
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
3101
3100
|
"nd:size-9 nd:rounded-lg nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
3102
3101
|
error ? "nd:bg-destructive/10 nd:text-destructive" : "nd:bg-muted/50 nd:text-muted-foreground"
|
|
3103
3102
|
), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "nd:size-4" }) }),
|
|
3104
3103
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex-1 nd:min-w-0 nd:text-left", children: [
|
|
3105
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: chunkTA6L5FYG_cjs.cn("nd:text-sm nd:font-medium", error && "nd:text-destructive"), children: multiple ? "Select files" : "Select a file" }),
|
|
3106
3105
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:font-normal nd:truncate", children: placeholder })
|
|
3107
3106
|
] })
|
|
3108
3107
|
]
|
|
3109
3108
|
}
|
|
3110
3109
|
) : (
|
|
3111
3110
|
/* Selected Files Display */
|
|
3112
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3111
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:rounded-lg nd:border", error ? "nd:border-destructive" : "nd:border-border", disabled && "nd:opacity-50"), children: [
|
|
3113
3112
|
!multiple && displayFiles[0] && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:gap-3 nd:p-2.5", children: [
|
|
3114
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-12 nd:rounded-lg nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: displayFiles[0].file.mime.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: createUrl(displayFiles[0]
|
|
3113
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-12 nd:rounded-lg nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: displayFiles[0].file.mime.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: createUrl(displayFiles[0]), alt: displayFiles[0].file.name, className: "nd:size-full nd:object-cover" }) : chunkTA6L5FYG_cjs.getFileIcon(displayFiles[0].file.mime, false, "nd:size-6 nd:text-muted-foreground") }),
|
|
3115
3114
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
3116
3115
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", children: displayFiles[0].file.name }),
|
|
3117
3116
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: displayFiles[0].file.mime || "File" })
|
|
@@ -3135,7 +3134,7 @@ var DriveFileChooser = (props) => {
|
|
|
3135
3134
|
] })
|
|
3136
3135
|
] }),
|
|
3137
3136
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:max-h-40 nd:overflow-y-auto nd:divide-y nd:divide-border/50", children: displayFiles.map((file) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:gap-2.5 nd:px-3 nd:py-2 nd:hover:bg-muted/20", children: [
|
|
3138
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-8 nd:rounded nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: file.file.mime.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: createUrl(file
|
|
3137
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-8 nd:rounded nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: file.file.mime.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: createUrl(file), alt: file.file.name, className: "nd:size-full nd:object-cover" }) : chunkTA6L5FYG_cjs.getFileIcon(file.file.mime, false, "nd:size-4 nd:text-muted-foreground") }),
|
|
3139
3138
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:flex-1 nd:text-sm nd:truncate", children: file.file.name }),
|
|
3140
3139
|
!disabled && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "nd:size-7 nd:shrink-0", onClick: () => handleRemove(file.id), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "nd:size-3.5" }) })
|
|
3141
3140
|
] }, file.id)) })
|
|
@@ -3301,7 +3300,7 @@ var SidebarContent = (props) => {
|
|
|
3301
3300
|
) : /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { open: dropdownOpen, onOpenChange: setDropdownOpen, children: [
|
|
3302
3301
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", className: "nd:flex-1 nd:min-w-0 nd:justify-between nd:px-2 nd:h-11 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30", children: [
|
|
3303
3302
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:flex nd:items-center nd:gap-2.5 nd:text-left nd:min-w-0 nd:flex-1", children: [
|
|
3304
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3303
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
3305
3304
|
"nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
3306
3305
|
activeAccountId ? "nd:bg-blue-500/10 nd:text-blue-600 nd:dark:bg-blue-500/20 nd:dark:text-blue-400" : "nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400"
|
|
3307
3306
|
), children: activeAccountId ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "nd:size-3.5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { className: "nd:size-3.5" }) }),
|
|
@@ -3396,7 +3395,7 @@ var SidebarContent = (props) => {
|
|
|
3396
3395
|
Button,
|
|
3397
3396
|
{
|
|
3398
3397
|
variant: "ghost",
|
|
3399
|
-
className:
|
|
3398
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
3400
3399
|
"nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium",
|
|
3401
3400
|
currentView !== "TRASH" ? "nd:bg-primary/10 nd:text-primary nd:hover:bg-primary/15 nd:dark:bg-primary/15 nd:dark:hover:bg-primary/20" : "nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30"
|
|
3402
3401
|
),
|
|
@@ -3414,7 +3413,7 @@ var SidebarContent = (props) => {
|
|
|
3414
3413
|
Button,
|
|
3415
3414
|
{
|
|
3416
3415
|
variant: "ghost",
|
|
3417
|
-
className:
|
|
3416
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
3418
3417
|
"nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium",
|
|
3419
3418
|
currentView === "TRASH" ? "nd:bg-destructive/10 nd:text-destructive nd:hover:bg-destructive/15 nd:dark:bg-destructive/15" : "nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30"
|
|
3420
3419
|
),
|
|
@@ -3585,7 +3584,7 @@ var DriveExplorer = (props) => {
|
|
|
3585
3584
|
const processedItems = React3.useMemo(() => {
|
|
3586
3585
|
let filtered = items;
|
|
3587
3586
|
if (mimeFilter) {
|
|
3588
|
-
filtered = filtered.filter((item) =>
|
|
3587
|
+
filtered = filtered.filter((item) => chunkTA6L5FYG_cjs.matchesMimeFilter(item.information.type === "FILE" ? item.information.mime : "", item.information.type === "FOLDER", mimeFilter));
|
|
3589
3588
|
}
|
|
3590
3589
|
return [...filtered].sort((a, b) => {
|
|
3591
3590
|
if (a.information.type === "FOLDER" && b.information.type !== "FOLDER") return -1;
|
|
@@ -3595,7 +3594,8 @@ var DriveExplorer = (props) => {
|
|
|
3595
3594
|
if (field === "order") {
|
|
3596
3595
|
return 0;
|
|
3597
3596
|
}
|
|
3598
|
-
let valA
|
|
3597
|
+
let valA;
|
|
3598
|
+
let valB;
|
|
3599
3599
|
if (field === "name") {
|
|
3600
3600
|
valA = a.name.toLowerCase();
|
|
3601
3601
|
valB = b.name.toLowerCase();
|
|
@@ -3677,7 +3677,7 @@ var DriveExplorer = (props) => {
|
|
|
3677
3677
|
}
|
|
3678
3678
|
if (processedItems.length === 0) {
|
|
3679
3679
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContextMenu, { children: [
|
|
3680
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3680
|
+
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex nd:flex-col nd:items-center nd:justify-center nd:py-12 nd:text-center nd:flex-1", className), children: [
|
|
3681
3681
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-12 nd:rounded-full nd:bg-muted nd:flex nd:items-center nd:justify-center nd:mb-3", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { className: "nd:size-6 nd:text-muted-foreground" }) }),
|
|
3682
3682
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "No files found" })
|
|
3683
3683
|
] }) }),
|
|
@@ -3698,7 +3698,7 @@ var DriveExplorer = (props) => {
|
|
|
3698
3698
|
] }),
|
|
3699
3699
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:lg:hidden nd:px-3 nd:py-2 nd:border-b nd:bg-background/95 nd:dark:bg-background/80 nd:backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsx(DrivePathBar, {}) }),
|
|
3700
3700
|
stateContent || /* @__PURE__ */ jsxRuntime.jsxs(ContextMenu, { children: [
|
|
3701
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3701
|
+
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTA6L5FYG_cjs.cn("nd:flex-1 nd:overflow-y-auto nd:min-h-0 nd:container nd:mx-auto nd:p-2 nd:sm:p-3 nd:md:p-4", className), children: [
|
|
3702
3702
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:space-y-4 nd:sm:space-y-6 nd:pb-8 nd:sm:pb-12", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:space-y-3", children: [
|
|
3703
3703
|
groupBy !== "NONE" && /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "nd:text-sm nd:font-medium nd:text-muted-foreground nd:flex nd:items-center nd:gap-2", children: [
|
|
3704
3704
|
groupName,
|
|
@@ -3709,7 +3709,7 @@ var DriveExplorer = (props) => {
|
|
|
3709
3709
|
")"
|
|
3710
3710
|
] })
|
|
3711
3711
|
] }),
|
|
3712
|
-
/* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: groupItems.map((i) => i.id), strategy: sortable.rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3712
|
+
/* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: groupItems.map((i) => i.id), strategy: sortable.rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkTA6L5FYG_cjs.cn(
|
|
3713
3713
|
viewMode === "GRID" ? "nd:grid nd:grid-cols-2 nd:sm:grid-cols-3 nd:md:grid-cols-4 nd:lg:grid-cols-5 nd:xl:grid-cols-6 2nd:xl:grid-cols-7 nd:gap-2 nd:sm:gap-3 nd:md:gap-4" : "nd:flex nd:flex-col nd:gap-1"
|
|
3714
3714
|
), children: groupItems.map((item) => {
|
|
3715
3715
|
const isSelected = selectedFileIds.includes(item.id);
|
|
@@ -3723,7 +3723,7 @@ var DriveExplorer = (props) => {
|
|
|
3723
3723
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3724
3724
|
"div",
|
|
3725
3725
|
{
|
|
3726
|
-
className:
|
|
3726
|
+
className: chunkTA6L5FYG_cjs.cn(
|
|
3727
3727
|
"group nd:relative nd:cursor-pointer nd:transition-all nd:focus:outline-none nd:focus:ring-2 nd:focus:ring-primary nd:focus:ring-offset-2",
|
|
3728
3728
|
viewMode === "GRID" ? "nd:flex nd:flex-col nd:rounded-xl nd:border nd:bg-card nd:dark:bg-card/50 nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:hover:shadow-sm nd:overflow-hidden" : "nd:flex nd:items-center nd:p-2 nd:rounded-lg nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:gap-3 nd:border nd:border-transparent nd:hover:border-border",
|
|
3729
3729
|
isSelected && "nd:ring-2 nd:ring-primary nd:border-primary/50 nd:bg-accent/30 nd:dark:bg-accent/20",
|
|
@@ -3739,18 +3739,18 @@ var DriveExplorer = (props) => {
|
|
|
3739
3739
|
tabIndex: 0,
|
|
3740
3740
|
children: viewMode === "GRID" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3741
3741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:aspect-square nd:w-full nd:bg-muted/20 nd:dark:bg-muted/10 nd:flex nd:items-center nd:justify-center nd:overflow-hidden nd:relative", children: [
|
|
3742
|
-
isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain nd:transition-transform group-nd:hover:scale-105 nd:duration-300", loading: "lazy" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children:
|
|
3742
|
+
isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain nd:transition-transform group-nd:hover:scale-105 nd:duration-300", loading: "lazy" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children: chunkTA6L5FYG_cjs.getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-10 nd:text-muted-foreground/70") }),
|
|
3743
3743
|
isSelected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:absolute nd:top-2 nd:right-2 nd:size-5 nd:bg-primary nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-sm nd:animate-in nd:zoom-in-50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-2 nd:bg-primary-foreground nd:rounded-full" }) }),
|
|
3744
3744
|
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:absolute nd:bottom-2 nd:right-2 nd:lg:hidden nd:size-6 nd:bg-primary/90 nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nd:size-3.5 nd:text-primary-foreground" }) })
|
|
3745
3745
|
] }),
|
|
3746
3746
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nd:p-2.5", children: [
|
|
3747
3747
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", title: item.name, children: item.name }),
|
|
3748
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" :
|
|
3748
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" : chunkTA6L5FYG_cjs.formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
3749
3749
|
] })
|
|
3750
3750
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3751
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-9 nd:shrink-0 nd:rounded-md nd:overflow-hidden nd:bg-muted/40 nd:dark:bg-muted/20 nd:flex nd:items-center nd:justify-center nd:border", children: isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain", loading: "lazy" }) :
|
|
3751
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nd:size-9 nd:shrink-0 nd:rounded-md nd:overflow-hidden nd:bg-muted/40 nd:dark:bg-muted/20 nd:flex nd:items-center nd:justify-center nd:border", children: isThumbnailable ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain", loading: "lazy" }) : chunkTA6L5FYG_cjs.getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-4 nd:text-muted-foreground") }),
|
|
3752
3752
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate nd:flex-1", title: item.name, children: item.name }),
|
|
3753
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-xs nd:text-muted-foreground nd:w-20 nd:text-right nd:shrink-0", children: isFolder ? "-" :
|
|
3753
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nd:text-xs nd:text-muted-foreground nd:w-20 nd:text-right nd:shrink-0", children: isFolder ? "-" : chunkTA6L5FYG_cjs.formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) }),
|
|
3754
3754
|
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nd:size-4 nd:text-muted-foreground nd:lg:hidden nd:shrink-0" })
|
|
3755
3755
|
] })
|
|
3756
3756
|
}
|