@retinalabsllc/zairusjs 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3449,20 +3449,20 @@ var UniversalDriveView = ({
|
|
|
3449
3449
|
const globalProgress = uploadQueue.length > 0 ? Math.round(uploadQueue.reduce((acc, job) => acc + job.progress, 0) / (uploadQueue.length * 100) * 100) : 0;
|
|
3450
3450
|
const isUILocked = isLoading || isSubmitting;
|
|
3451
3451
|
const lockClass = isUILocked ? "pointer-events-none opacity-60" : "";
|
|
3452
|
-
return /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 max-w-5xl w-full mx-auto p-6 bg-white rounded-2xl animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react65.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4
|
|
3452
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col gap-6 max-w-5xl w-full mx-auto p-6 bg-white rounded-2xl animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react65.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 transition-opacity ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h1", { className: "text-xl text-black tracking-tight mb-1" }, "Drive"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-500" }, "Secure cloud storage optimized for your workspace.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: onRefresh, title: "Refresh Directory", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.RefreshIcon, size: 18 })), selectedIds.length > 0 && /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, selectedIds.length === 1 && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => {
|
|
3453
3453
|
const item = items.find((i) => i.id === selectedIds[0]);
|
|
3454
3454
|
if (item) setRenameModal({ isOpen: true, id: item.id, name: item.name });
|
|
3455
3455
|
setFolderInputVal(item?.name || "");
|
|
3456
|
-
}, title: "Rename", className: "p-2.5
|
|
3456
|
+
}, title: "Rename", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FileEditIcon, size: 18 })), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => onShareItems(items.filter((i) => selectedIds.includes(i.id))), title: "Share", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Share03Icon, size: 18 })), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => openExplorer("copy"), title: "Copy", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Copy01Icon, size: 18 })), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => openExplorer("move"), title: "Move", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.ArrowRight02Icon, size: 18 }))), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => {
|
|
3457
3457
|
setFolderInputVal("");
|
|
3458
3458
|
setIsNewFolderModalOpen(true);
|
|
3459
|
-
}, title: "New Folder", className: "p-2.5
|
|
3459
|
+
}, title: "New Folder", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FolderAddIcon, size: 18 })), /* @__PURE__ */ import_react65.default.createElement("label", { title: "Upload Files", className: "p-2.5 cursor-pointer transition-all" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.CloudUploadIcon, size: 18 }), /* @__PURE__ */ import_react65.default.createElement("input", { type: "file", multiple: true, className: "hidden", onChange: (e) => e.target.files && onUploadFiles(e.target.files) })))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full sm:max-w-xs relative" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "text", placeholder: "Search Drive...", value: localSearch, onChange: (e) => setLocalSearch(e.target.value), className: "w-full pl-4 pr-10 py-2.5 text-xs border border-neutral-100 rounded-full outline-none focus:border-black transition-colors" })), selectedIds.length > 0 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-3 bg-neutral-50 px-4 py-2 rounded-full animate-in fade-in duration-200" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-500 uppercase" }, selectedIds.length, " Selected"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => {
|
|
3460
3460
|
onMoveToTrash(selectedIds);
|
|
3461
3461
|
setSelectedIds([]);
|
|
3462
3462
|
}, className: "text-neutral-500 hover:text-red-600 p-1 flex items-center gap-1.5 text-xs outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Delete02Icon, size: 14 }), " Move to Trash"))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex items-center gap-1.5 overflow-x-auto text-xs py-1 text-neutral-400 whitespace-nowrap ${lockClass}` }, folderBreadcrumbs.map((crumb, idx) => /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ import_react65.default.createElement("span", null, "/"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => {
|
|
3463
3463
|
setSelectedIds([]);
|
|
3464
3464
|
onNavigateFolder(crumb.id);
|
|
3465
|
-
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react65.default.createElement("thead", null, /* @__PURE__ */ import_react65.default.createElement("tr", { className: "border-b border-neutral-100 bg-white" }, /* @__PURE__ */ import_react65.default.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-4 h-4 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ import_react65.default.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ import_react65.default.createElement("tr", null, /* @__PURE__ */ import_react65.default.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FolderIcon, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3465
|
+
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react65.default.createElement("thead", null, /* @__PURE__ */ import_react65.default.createElement("tr", { className: "border-b border-neutral-100 bg-white" }, /* @__PURE__ */ import_react65.default.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-4 h-4 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ import_react65.default.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ import_react65.default.createElement("tr", null, /* @__PURE__ */ import_react65.default.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FolderIcon, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3466
3466
|
const isChecked = selectedIds.includes(item.id);
|
|
3467
3467
|
return /* @__PURE__ */ import_react65.default.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3468
3468
|
e.preventDefault();
|
|
@@ -3481,7 +3481,7 @@ var UniversalDriveView = ({
|
|
|
3481
3481
|
}, className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, isNewFolderModalOpen ? "Create Directory" : "Rename Element"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Please provide a valid alphanumeric name.")), /* @__PURE__ */ import_react65.default.createElement(TextInput, { placeholder: "Name (e.g., Q3 Invoices)", value: folderInputVal, onChange: setFolderInputVal }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ import_react65.default.createElement("button", { type: "button", onClick: () => {
|
|
3482
3482
|
setIsNewFolderModalOpen(false);
|
|
3483
3483
|
setRenameModal({ isOpen: false, id: "", name: "" });
|
|
3484
|
-
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), explorer.isOpen && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ import_react65.default.createElement("span", null, "/"), /* @__PURE__ */ import_react65.default.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Loading03Icon, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No
|
|
3484
|
+
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), explorer.isOpen && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ import_react65.default.createElement("span", null, "/"), /* @__PURE__ */ import_react65.default.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Loading03Icon, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ import_react65.default.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No Directories.") : /* @__PURE__ */ import_react65.default.createElement("div", { className: "divide-y divide-neutral-50" }, explorer.folders.map((f) => /* @__PURE__ */ import_react65.default.createElement("div", { key: f.id, onClick: () => navigateExplorer(f.id), className: "flex items-center gap-3 p-3 hover:bg-neutral-50 cursor-pointer transition-colors" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FolderIcon, size: 16, className: "text-black" }), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-sm text-black truncate" }, f.name))))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => setExplorer((p) => ({ ...p, isOpen: false })), disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ import_react65.default.createElement(ThreeDActionButton, { onClick: executeExplorerAction, isLoading: isSubmitting }, "Paste Here")))));
|
|
3485
3485
|
};
|
|
3486
3486
|
|
|
3487
3487
|
// src/components/DriveItemOpener.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -3434,20 +3434,20 @@ var UniversalDriveView = ({
|
|
|
3434
3434
|
const globalProgress = uploadQueue.length > 0 ? Math.round(uploadQueue.reduce((acc, job) => acc + job.progress, 0) / (uploadQueue.length * 100) * 100) : 0;
|
|
3435
3435
|
const isUILocked = isLoading || isSubmitting;
|
|
3436
3436
|
const lockClass = isUILocked ? "pointer-events-none opacity-60" : "";
|
|
3437
|
-
return /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col gap-6 max-w-5xl w-full mx-auto p-6 bg-white rounded-2xl animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React40.createElement(ManagedToaster, null), /* @__PURE__ */ React40.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4
|
|
3437
|
+
return /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col gap-6 max-w-5xl w-full mx-auto p-6 bg-white rounded-2xl animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React40.createElement(ManagedToaster, null), /* @__PURE__ */ React40.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 transition-opacity ${lockClass}` }, /* @__PURE__ */ React40.createElement("div", null, /* @__PURE__ */ React40.createElement("h1", { className: "text-xl text-black tracking-tight mb-1" }, "Drive"), /* @__PURE__ */ React40.createElement("p", { className: "text-xs text-neutral-500" }, "Secure cloud storage optimized for your workspace.")), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React40.createElement("button", { onClick: onRefresh, title: "Refresh Directory", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: RefreshIcon, size: 18 })), selectedIds.length > 0 && /* @__PURE__ */ React40.createElement(React40.Fragment, null, selectedIds.length === 1 && /* @__PURE__ */ React40.createElement("button", { onClick: () => {
|
|
3438
3438
|
const item = items.find((i) => i.id === selectedIds[0]);
|
|
3439
3439
|
if (item) setRenameModal({ isOpen: true, id: item.id, name: item.name });
|
|
3440
3440
|
setFolderInputVal(item?.name || "");
|
|
3441
|
-
}, title: "Rename", className: "p-2.5
|
|
3441
|
+
}, title: "Rename", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FileEditIcon, size: 18 })), /* @__PURE__ */ React40.createElement("button", { onClick: () => onShareItems(items.filter((i) => selectedIds.includes(i.id))), title: "Share", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Share03Icon, size: 18 })), /* @__PURE__ */ React40.createElement("button", { onClick: () => openExplorer("copy"), title: "Copy", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Copy01Icon, size: 18 })), /* @__PURE__ */ React40.createElement("button", { onClick: () => openExplorer("move"), title: "Move", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: ArrowRight02Icon, size: 18 }))), /* @__PURE__ */ React40.createElement("button", { onClick: () => {
|
|
3442
3442
|
setFolderInputVal("");
|
|
3443
3443
|
setIsNewFolderModalOpen(true);
|
|
3444
|
-
}, title: "New Folder", className: "p-2.5
|
|
3444
|
+
}, title: "New Folder", className: "p-2.5 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FolderAddIcon, size: 18 })), /* @__PURE__ */ React40.createElement("label", { title: "Upload Files", className: "p-2.5 cursor-pointer transition-all" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: CloudUploadIcon, size: 18 }), /* @__PURE__ */ React40.createElement("input", { type: "file", multiple: true, className: "hidden", onChange: (e) => e.target.files && onUploadFiles(e.target.files) })))), /* @__PURE__ */ React40.createElement("div", { className: `flex flex-col sm:flex-row sm:items-center justify-between gap-4 ${lockClass}` }, /* @__PURE__ */ React40.createElement("div", { className: "w-full sm:max-w-xs relative" }, /* @__PURE__ */ React40.createElement("input", { type: "text", placeholder: "Search Drive...", value: localSearch, onChange: (e) => setLocalSearch(e.target.value), className: "w-full pl-4 pr-10 py-2.5 text-xs border border-neutral-100 rounded-full outline-none focus:border-black transition-colors" })), selectedIds.length > 0 && /* @__PURE__ */ React40.createElement("div", { className: "flex items-center gap-3 bg-neutral-50 px-4 py-2 rounded-full animate-in fade-in duration-200" }, /* @__PURE__ */ React40.createElement("span", { className: "text-[11px] tracking-widest text-neutral-500 uppercase" }, selectedIds.length, " Selected"), /* @__PURE__ */ React40.createElement("button", { onClick: () => {
|
|
3445
3445
|
onMoveToTrash(selectedIds);
|
|
3446
3446
|
setSelectedIds([]);
|
|
3447
3447
|
}, className: "text-neutral-500 hover:text-red-600 p-1 flex items-center gap-1.5 text-xs outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Delete02Icon2, size: 14 }), " Move to Trash"))), /* @__PURE__ */ React40.createElement("div", { className: `flex items-center gap-1.5 overflow-x-auto text-xs py-1 text-neutral-400 whitespace-nowrap ${lockClass}` }, folderBreadcrumbs.map((crumb, idx) => /* @__PURE__ */ React40.createElement(React40.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ React40.createElement("span", null, "/"), /* @__PURE__ */ React40.createElement("button", { onClick: () => {
|
|
3448
3448
|
setSelectedIds([]);
|
|
3449
3449
|
onNavigateFolder(crumb.id);
|
|
3450
|
-
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React40.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React40.createElement("thead", null, /* @__PURE__ */ React40.createElement("tr", { className: "border-b border-neutral-100 bg-white" }, /* @__PURE__ */ React40.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ React40.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-4 h-4 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ React40.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ React40.createElement("tr", null, /* @__PURE__ */ React40.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FolderIcon2, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ React40.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3450
|
+
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React40.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React40.createElement("thead", null, /* @__PURE__ */ React40.createElement("tr", { className: "border-b border-neutral-100 bg-white" }, /* @__PURE__ */ React40.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ React40.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-4 h-4 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ React40.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ React40.createElement("tr", null, /* @__PURE__ */ React40.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FolderIcon2, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ React40.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3451
3451
|
const isChecked = selectedIds.includes(item.id);
|
|
3452
3452
|
return /* @__PURE__ */ React40.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3453
3453
|
e.preventDefault();
|
|
@@ -3466,7 +3466,7 @@ var UniversalDriveView = ({
|
|
|
3466
3466
|
}, className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React40.createElement("div", null, /* @__PURE__ */ React40.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, isNewFolderModalOpen ? "Create Directory" : "Rename Element"), /* @__PURE__ */ React40.createElement("p", { className: "text-[11px] text-neutral-400" }, "Please provide a valid alphanumeric name.")), /* @__PURE__ */ React40.createElement(TextInput, { placeholder: "Name (e.g., Q3 Invoices)", value: folderInputVal, onChange: setFolderInputVal }), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ React40.createElement("button", { type: "button", onClick: () => {
|
|
3467
3467
|
setIsNewFolderModalOpen(false);
|
|
3468
3468
|
setRenameModal({ isOpen: false, id: "", name: "" });
|
|
3469
|
-
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React40.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), explorer.isOpen && /* @__PURE__ */ React40.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ React40.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ React40.createElement("div", null, /* @__PURE__ */ React40.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ React40.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ React40.createElement(React40.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ React40.createElement("span", null, "/"), /* @__PURE__ */ React40.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ React40.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Loading03Icon12, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ React40.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No
|
|
3469
|
+
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React40.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), explorer.isOpen && /* @__PURE__ */ React40.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ React40.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ React40.createElement("div", null, /* @__PURE__ */ React40.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ React40.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ React40.createElement(React40.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ React40.createElement("span", null, "/"), /* @__PURE__ */ React40.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ React40.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Loading03Icon12, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ React40.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No Directories.") : /* @__PURE__ */ React40.createElement("div", { className: "divide-y divide-neutral-50" }, explorer.folders.map((f) => /* @__PURE__ */ React40.createElement("div", { key: f.id, onClick: () => navigateExplorer(f.id), className: "flex items-center gap-3 p-3 hover:bg-neutral-50 cursor-pointer transition-colors" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FolderIcon2, size: 16, className: "text-black" }), /* @__PURE__ */ React40.createElement("span", { className: "text-sm text-black truncate" }, f.name))))), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ React40.createElement("button", { onClick: () => setExplorer((p) => ({ ...p, isOpen: false })), disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React40.createElement(ThreeDActionButton, { onClick: executeExplorerAction, isLoading: isSubmitting }, "Paste Here")))));
|
|
3470
3470
|
};
|
|
3471
3471
|
|
|
3472
3472
|
// src/components/DriveItemOpener.tsx
|