@gallop.software/studio 0.1.79 → 0.1.81
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/{StudioUI-JGKWCQSR.js → StudioUI-RH4ZXWKP.js} +103 -159
- package/dist/StudioUI-RH4ZXWKP.js.map +1 -0
- package/dist/{StudioUI-DRDR7N4T.mjs → StudioUI-SS3YMS53.mjs} +103 -159
- package/dist/StudioUI-SS3YMS53.mjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/StudioUI-DRDR7N4T.mjs.map +0 -1
- package/dist/StudioUI-JGKWCQSR.js.map +0 -1
|
@@ -891,6 +891,7 @@ function StudioToolbar() {
|
|
|
891
891
|
const [imagesToProcess, setImagesToProcess] = useState2([]);
|
|
892
892
|
const [alertMessage, setAlertMessage] = useState2(null);
|
|
893
893
|
const [showNewFolderModal, setShowNewFolderModal] = useState2(false);
|
|
894
|
+
const [showRenameFolderModal, setShowRenameFolderModal] = useState2(false);
|
|
894
895
|
const [showMoveModal, setShowMoveModal] = useState2(false);
|
|
895
896
|
const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
|
|
896
897
|
const handleUpload = useCallback(() => {
|
|
@@ -947,13 +948,13 @@ function StudioToolbar() {
|
|
|
947
948
|
const handleProcessImages = useCallback(async () => {
|
|
948
949
|
const hasSelection2 = selectedItems.size > 0;
|
|
949
950
|
if (hasSelection2) {
|
|
950
|
-
const
|
|
951
|
+
const selectedPaths2 = Array.from(selectedItems);
|
|
951
952
|
const imageExtensions = ["jpg", "jpeg", "png", "gif", "webp", "svg", "ico", "bmp", "tiff", "tif"];
|
|
952
|
-
const selectedImagePaths =
|
|
953
|
+
const selectedImagePaths = selectedPaths2.filter((p) => {
|
|
953
954
|
const ext = p.split(".").pop()?.toLowerCase() || "";
|
|
954
955
|
return imageExtensions.includes(ext);
|
|
955
956
|
});
|
|
956
|
-
const selectedFolders =
|
|
957
|
+
const selectedFolders = selectedPaths2.filter((p) => !p.includes(".") || p.endsWith("/"));
|
|
957
958
|
if (selectedFolders.length > 0) {
|
|
958
959
|
try {
|
|
959
960
|
const response = await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(selectedFolders.join(","))}`);
|
|
@@ -1263,6 +1264,27 @@ function StudioToolbar() {
|
|
|
1263
1264
|
}
|
|
1264
1265
|
}, [setSearchQuery]);
|
|
1265
1266
|
const hasSelection = selectedItems.size > 0;
|
|
1267
|
+
const selectedPaths = Array.from(selectedItems);
|
|
1268
|
+
const singleFolderSelected = selectedPaths.length === 1 && !selectedPaths[0].includes(".");
|
|
1269
|
+
const selectedFolderPath = singleFolderSelected ? selectedPaths[0] : null;
|
|
1270
|
+
const selectedFolderName = selectedFolderPath ? selectedFolderPath.split("/").pop() || "" : "";
|
|
1271
|
+
const handleRenameFolder = useCallback(async (newName) => {
|
|
1272
|
+
if (!selectedFolderPath) return;
|
|
1273
|
+
setShowRenameFolderModal(false);
|
|
1274
|
+
try {
|
|
1275
|
+
const response = await fetch("/api/studio/rename", {
|
|
1276
|
+
method: "POST",
|
|
1277
|
+
headers: { "Content-Type": "application/json" },
|
|
1278
|
+
body: JSON.stringify({ oldPath: selectedFolderPath, newName })
|
|
1279
|
+
});
|
|
1280
|
+
if (response.ok) {
|
|
1281
|
+
clearSelection();
|
|
1282
|
+
triggerRefresh();
|
|
1283
|
+
}
|
|
1284
|
+
} catch (error) {
|
|
1285
|
+
console.error("Failed to rename folder:", error);
|
|
1286
|
+
}
|
|
1287
|
+
}, [selectedFolderPath, clearSelection, triggerRefresh]);
|
|
1266
1288
|
if (focusedItem) {
|
|
1267
1289
|
return null;
|
|
1268
1290
|
}
|
|
@@ -1328,6 +1350,18 @@ function StudioToolbar() {
|
|
|
1328
1350
|
onCancel: () => setShowMoveModal(false)
|
|
1329
1351
|
}
|
|
1330
1352
|
),
|
|
1353
|
+
showRenameFolderModal && selectedFolderPath && /* @__PURE__ */ jsx3(
|
|
1354
|
+
InputModal,
|
|
1355
|
+
{
|
|
1356
|
+
title: "Rename Folder",
|
|
1357
|
+
message: "Enter a new name for the folder:",
|
|
1358
|
+
placeholder: selectedFolderName,
|
|
1359
|
+
defaultValue: selectedFolderName,
|
|
1360
|
+
confirmLabel: "Rename",
|
|
1361
|
+
onConfirm: handleRenameFolder,
|
|
1362
|
+
onCancel: () => setShowRenameFolderModal(false)
|
|
1363
|
+
}
|
|
1364
|
+
),
|
|
1331
1365
|
alertMessage && /* @__PURE__ */ jsx3(
|
|
1332
1366
|
AlertModal,
|
|
1333
1367
|
{
|
|
@@ -1365,12 +1399,12 @@ function StudioToolbar() {
|
|
|
1365
1399
|
"button",
|
|
1366
1400
|
{
|
|
1367
1401
|
css: styles3.btn,
|
|
1368
|
-
onClick: () => setShowNewFolderModal(true),
|
|
1369
|
-
disabled: isInImagesFolder,
|
|
1370
|
-
title: isInImagesFolder ? "Cannot create folders in protected images folder" : void 0,
|
|
1402
|
+
onClick: () => singleFolderSelected ? setShowRenameFolderModal(true) : setShowNewFolderModal(true),
|
|
1403
|
+
disabled: isInImagesFolder && !singleFolderSelected,
|
|
1404
|
+
title: isInImagesFolder && !singleFolderSelected ? "Cannot create folders in protected images folder" : void 0,
|
|
1371
1405
|
children: [
|
|
1372
|
-
/* @__PURE__ */ jsx3(FolderPlusIcon, {}),
|
|
1373
|
-
"New Folder"
|
|
1406
|
+
singleFolderSelected ? /* @__PURE__ */ jsx3(RenameIcon, {}) : /* @__PURE__ */ jsx3(FolderPlusIcon, {}),
|
|
1407
|
+
singleFolderSelected ? "Rename Folder" : "New Folder"
|
|
1374
1408
|
]
|
|
1375
1409
|
}
|
|
1376
1410
|
),
|
|
@@ -1497,6 +1531,9 @@ function TrashIcon() {
|
|
|
1497
1531
|
function FolderPlusIcon() {
|
|
1498
1532
|
return /* @__PURE__ */ jsx3("svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z" }) });
|
|
1499
1533
|
}
|
|
1534
|
+
function RenameIcon() {
|
|
1535
|
+
return /* @__PURE__ */ jsx3("svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) });
|
|
1536
|
+
}
|
|
1500
1537
|
function MoveIcon() {
|
|
1501
1538
|
return /* @__PURE__ */ jsx3("svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) });
|
|
1502
1539
|
}
|
|
@@ -1719,15 +1756,11 @@ var styles4 = {
|
|
|
1719
1756
|
flex: 1;
|
|
1720
1757
|
min-width: 0;
|
|
1721
1758
|
`,
|
|
1722
|
-
|
|
1759
|
+
copyBtn: css4`
|
|
1723
1760
|
position: absolute;
|
|
1724
1761
|
top: 4px;
|
|
1725
1762
|
right: 4px;
|
|
1726
1763
|
z-index: 10;
|
|
1727
|
-
display: flex;
|
|
1728
|
-
gap: 2px;
|
|
1729
|
-
`,
|
|
1730
|
-
copyBtn: css4`
|
|
1731
1764
|
height: 28px;
|
|
1732
1765
|
width: 28px;
|
|
1733
1766
|
color: ${colors.textMuted};
|
|
@@ -1740,7 +1773,6 @@ var styles4 = {
|
|
|
1740
1773
|
display: flex;
|
|
1741
1774
|
align-items: center;
|
|
1742
1775
|
justify-content: center;
|
|
1743
|
-
position: relative;
|
|
1744
1776
|
|
|
1745
1777
|
&:hover {
|
|
1746
1778
|
color: ${colors.text};
|
|
@@ -1846,7 +1878,6 @@ function StudioFileGrid() {
|
|
|
1846
1878
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
1847
1879
|
const [items, setItems] = useState3([]);
|
|
1848
1880
|
const [loading, setLoading] = useState3(true);
|
|
1849
|
-
const [renameItem, setRenameItem] = useState3(null);
|
|
1850
1881
|
const isInitialLoad = useRef2(true);
|
|
1851
1882
|
const lastPath = useRef2(currentPath);
|
|
1852
1883
|
useEffect2(() => {
|
|
@@ -1915,22 +1946,6 @@ function StudioFileGrid() {
|
|
|
1915
1946
|
console.error("Failed to generate thumbnail:", error);
|
|
1916
1947
|
}
|
|
1917
1948
|
};
|
|
1918
|
-
const handleRename = async (newName) => {
|
|
1919
|
-
if (!renameItem) return;
|
|
1920
|
-
setRenameItem(null);
|
|
1921
|
-
try {
|
|
1922
|
-
const response = await fetch("/api/studio/rename", {
|
|
1923
|
-
method: "POST",
|
|
1924
|
-
headers: { "Content-Type": "application/json" },
|
|
1925
|
-
body: JSON.stringify({ oldPath: renameItem.path, newName })
|
|
1926
|
-
});
|
|
1927
|
-
if (response.ok) {
|
|
1928
|
-
triggerRefresh();
|
|
1929
|
-
}
|
|
1930
|
-
} catch (error) {
|
|
1931
|
-
console.error("Failed to rename:", error);
|
|
1932
|
-
}
|
|
1933
|
-
};
|
|
1934
1949
|
const allItemsSelected = sortedItems.length > 0 && sortedItems.every((item) => selectedItems.has(item.path));
|
|
1935
1950
|
const someItemsSelected = sortedItems.some((item) => selectedItems.has(item.path));
|
|
1936
1951
|
const handleSelectAll = () => {
|
|
@@ -1941,18 +1956,6 @@ function StudioFileGrid() {
|
|
|
1941
1956
|
}
|
|
1942
1957
|
};
|
|
1943
1958
|
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
1944
|
-
renameItem && /* @__PURE__ */ jsx4(
|
|
1945
|
-
InputModal,
|
|
1946
|
-
{
|
|
1947
|
-
title: renameItem.type === "folder" ? "Rename Folder" : "Rename File",
|
|
1948
|
-
message: "Enter a new name:",
|
|
1949
|
-
placeholder: renameItem.name,
|
|
1950
|
-
defaultValue: renameItem.name,
|
|
1951
|
-
confirmLabel: "Rename",
|
|
1952
|
-
onConfirm: handleRename,
|
|
1953
|
-
onCancel: () => setRenameItem(null)
|
|
1954
|
-
}
|
|
1955
|
-
),
|
|
1956
1959
|
sortedItems.length > 0 && /* @__PURE__ */ jsx4("div", { css: styles4.selectAllRow, children: /* @__PURE__ */ jsxs4("label", { css: styles4.selectAllLabel, children: [
|
|
1957
1960
|
/* @__PURE__ */ jsx4(
|
|
1958
1961
|
"input",
|
|
@@ -1992,15 +1995,14 @@ function StudioFileGrid() {
|
|
|
1992
1995
|
isSelected: selectedItems.has(item.path),
|
|
1993
1996
|
onClick: (e) => handleItemClick(item, e),
|
|
1994
1997
|
onOpen: () => handleOpen(item),
|
|
1995
|
-
onGenerateThumbnail: () => handleGenerateThumbnail(item)
|
|
1996
|
-
onRename: () => setRenameItem(item)
|
|
1998
|
+
onGenerateThumbnail: () => handleGenerateThumbnail(item)
|
|
1997
1999
|
},
|
|
1998
2000
|
item.path
|
|
1999
2001
|
))
|
|
2000
2002
|
] })
|
|
2001
2003
|
] });
|
|
2002
2004
|
}
|
|
2003
|
-
function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail
|
|
2005
|
+
function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
2004
2006
|
const [showCopied, setShowCopied] = useState3(false);
|
|
2005
2007
|
const isFolder = item.type === "folder";
|
|
2006
2008
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
@@ -2036,32 +2038,18 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail, onRe
|
|
|
2036
2038
|
),
|
|
2037
2039
|
item.cdnSynced && /* @__PURE__ */ jsx4("span", { css: styles4.cdnBadge, children: "CDN" }),
|
|
2038
2040
|
/* @__PURE__ */ jsxs4("div", { css: styles4.content, children: [
|
|
2039
|
-
/* @__PURE__ */ jsxs4(
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
children:
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
),
|
|
2052
|
-
/* @__PURE__ */ jsx4(
|
|
2053
|
-
"button",
|
|
2054
|
-
{
|
|
2055
|
-
css: styles4.copyBtn,
|
|
2056
|
-
onClick: (e) => {
|
|
2057
|
-
e.stopPropagation();
|
|
2058
|
-
onRename();
|
|
2059
|
-
},
|
|
2060
|
-
title: "Rename",
|
|
2061
|
-
children: /* @__PURE__ */ jsx4("svg", { css: styles4.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) })
|
|
2062
|
-
}
|
|
2063
|
-
)
|
|
2064
|
-
] }),
|
|
2041
|
+
/* @__PURE__ */ jsxs4(
|
|
2042
|
+
"button",
|
|
2043
|
+
{
|
|
2044
|
+
css: styles4.copyBtn,
|
|
2045
|
+
onClick: handleCopyPath,
|
|
2046
|
+
title: "Copy file path",
|
|
2047
|
+
children: [
|
|
2048
|
+
showCopied && /* @__PURE__ */ jsx4("span", { css: styles4.tooltip, children: "Copied!" }),
|
|
2049
|
+
/* @__PURE__ */ jsx4("svg", { css: styles4.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" }) })
|
|
2050
|
+
]
|
|
2051
|
+
}
|
|
2052
|
+
),
|
|
2065
2053
|
/* @__PURE__ */ jsx4(
|
|
2066
2054
|
"button",
|
|
2067
2055
|
{
|
|
@@ -2447,7 +2435,6 @@ function StudioFileList() {
|
|
|
2447
2435
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
2448
2436
|
const [items, setItems] = useState4([]);
|
|
2449
2437
|
const [loading, setLoading] = useState4(true);
|
|
2450
|
-
const [renameItem, setRenameItem] = useState4(null);
|
|
2451
2438
|
const isInitialLoad = useRef3(true);
|
|
2452
2439
|
const lastPath = useRef3(currentPath);
|
|
2453
2440
|
useEffect3(() => {
|
|
@@ -2512,22 +2499,6 @@ function StudioFileList() {
|
|
|
2512
2499
|
console.error("Failed to generate thumbnail:", error);
|
|
2513
2500
|
}
|
|
2514
2501
|
};
|
|
2515
|
-
const handleRename = async (newName) => {
|
|
2516
|
-
if (!renameItem) return;
|
|
2517
|
-
setRenameItem(null);
|
|
2518
|
-
try {
|
|
2519
|
-
const response = await fetch("/api/studio/rename", {
|
|
2520
|
-
method: "POST",
|
|
2521
|
-
headers: { "Content-Type": "application/json" },
|
|
2522
|
-
body: JSON.stringify({ oldPath: renameItem.path, newName })
|
|
2523
|
-
});
|
|
2524
|
-
if (response.ok) {
|
|
2525
|
-
triggerRefresh();
|
|
2526
|
-
}
|
|
2527
|
-
} catch (error) {
|
|
2528
|
-
console.error("Failed to rename:", error);
|
|
2529
|
-
}
|
|
2530
|
-
};
|
|
2531
2502
|
const allItemsSelected = sortedItems.length > 0 && sortedItems.every((item) => selectedItems.has(item.path));
|
|
2532
2503
|
const someItemsSelected = sortedItems.some((item) => selectedItems.has(item.path));
|
|
2533
2504
|
const handleSelectAll = () => {
|
|
@@ -2537,66 +2508,51 @@ function StudioFileList() {
|
|
|
2537
2508
|
selectAll(sortedItems);
|
|
2538
2509
|
}
|
|
2539
2510
|
};
|
|
2540
|
-
return /* @__PURE__ */
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
onCancel: () => setRenameItem(null)
|
|
2551
|
-
}
|
|
2552
|
-
),
|
|
2553
|
-
/* @__PURE__ */ jsxs5("table", { css: styles5.table, children: [
|
|
2554
|
-
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { children: [
|
|
2555
|
-
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ jsx5(
|
|
2556
|
-
"input",
|
|
2557
|
-
{
|
|
2558
|
-
type: "checkbox",
|
|
2559
|
-
css: styles5.checkbox,
|
|
2560
|
-
checked: allItemsSelected,
|
|
2561
|
-
ref: (el) => {
|
|
2562
|
-
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
2563
|
-
},
|
|
2564
|
-
onChange: handleSelectAll
|
|
2565
|
-
}
|
|
2566
|
-
) }),
|
|
2567
|
-
/* @__PURE__ */ jsx5("th", { css: styles5.th, children: "Name" }),
|
|
2568
|
-
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thSize], children: "Size" }),
|
|
2569
|
-
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
|
|
2570
|
-
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
|
|
2571
|
-
] }) }),
|
|
2572
|
-
/* @__PURE__ */ jsxs5("tbody", { css: styles5.tbody, children: [
|
|
2573
|
-
!isAtRoot && !isSearching && /* @__PURE__ */ jsxs5("tr", { css: styles5.parentRow, onClick: navigateUp, children: [
|
|
2574
|
-
/* @__PURE__ */ jsx5("td", { css: styles5.td }),
|
|
2575
|
-
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
|
|
2576
|
-
/* @__PURE__ */ jsx5("svg", { css: styles5.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }),
|
|
2577
|
-
/* @__PURE__ */ jsx5("span", { css: styles5.name, children: ".." })
|
|
2578
|
-
] }) }),
|
|
2579
|
-
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "--" }),
|
|
2580
|
-
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
|
|
2581
|
-
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: "--" })
|
|
2582
|
-
] }),
|
|
2583
|
-
sortedItems.map((item) => /* @__PURE__ */ jsx5(
|
|
2584
|
-
ListRow,
|
|
2585
|
-
{
|
|
2586
|
-
item,
|
|
2587
|
-
isSelected: selectedItems.has(item.path),
|
|
2588
|
-
onClick: (e) => handleItemClick(item, e),
|
|
2589
|
-
onOpen: () => handleOpen(item),
|
|
2590
|
-
onGenerateThumbnail: () => handleGenerateThumbnail(item),
|
|
2591
|
-
onRename: () => setRenameItem(item)
|
|
2511
|
+
return /* @__PURE__ */ jsx5("div", { css: styles5.tableWrapper, children: /* @__PURE__ */ jsxs5("table", { css: styles5.table, children: [
|
|
2512
|
+
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { children: [
|
|
2513
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ jsx5(
|
|
2514
|
+
"input",
|
|
2515
|
+
{
|
|
2516
|
+
type: "checkbox",
|
|
2517
|
+
css: styles5.checkbox,
|
|
2518
|
+
checked: allItemsSelected,
|
|
2519
|
+
ref: (el) => {
|
|
2520
|
+
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
2592
2521
|
},
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2522
|
+
onChange: handleSelectAll
|
|
2523
|
+
}
|
|
2524
|
+
) }),
|
|
2525
|
+
/* @__PURE__ */ jsx5("th", { css: styles5.th, children: "Name" }),
|
|
2526
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thSize], children: "Size" }),
|
|
2527
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
|
|
2528
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
|
|
2529
|
+
] }) }),
|
|
2530
|
+
/* @__PURE__ */ jsxs5("tbody", { css: styles5.tbody, children: [
|
|
2531
|
+
!isAtRoot && !isSearching && /* @__PURE__ */ jsxs5("tr", { css: styles5.parentRow, onClick: navigateUp, children: [
|
|
2532
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td }),
|
|
2533
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
|
|
2534
|
+
/* @__PURE__ */ jsx5("svg", { css: styles5.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }),
|
|
2535
|
+
/* @__PURE__ */ jsx5("span", { css: styles5.name, children: ".." })
|
|
2536
|
+
] }) }),
|
|
2537
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "--" }),
|
|
2538
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
|
|
2539
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: "--" })
|
|
2540
|
+
] }),
|
|
2541
|
+
sortedItems.map((item) => /* @__PURE__ */ jsx5(
|
|
2542
|
+
ListRow,
|
|
2543
|
+
{
|
|
2544
|
+
item,
|
|
2545
|
+
isSelected: selectedItems.has(item.path),
|
|
2546
|
+
onClick: (e) => handleItemClick(item, e),
|
|
2547
|
+
onOpen: () => handleOpen(item),
|
|
2548
|
+
onGenerateThumbnail: () => handleGenerateThumbnail(item)
|
|
2549
|
+
},
|
|
2550
|
+
item.path
|
|
2551
|
+
))
|
|
2596
2552
|
] })
|
|
2597
|
-
] });
|
|
2553
|
+
] }) });
|
|
2598
2554
|
}
|
|
2599
|
-
function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail
|
|
2555
|
+
function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
2600
2556
|
const [showCopied, setShowCopied] = useState4(false);
|
|
2601
2557
|
const isFolder = item.type === "folder";
|
|
2602
2558
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
@@ -2660,18 +2616,6 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail, onRen
|
|
|
2660
2616
|
]
|
|
2661
2617
|
}
|
|
2662
2618
|
),
|
|
2663
|
-
/* @__PURE__ */ jsx5(
|
|
2664
|
-
"button",
|
|
2665
|
-
{
|
|
2666
|
-
css: styles5.copyBtn,
|
|
2667
|
-
onClick: (e) => {
|
|
2668
|
-
e.stopPropagation();
|
|
2669
|
-
onRename();
|
|
2670
|
-
},
|
|
2671
|
-
title: "Rename",
|
|
2672
|
-
children: /* @__PURE__ */ jsx5("svg", { css: styles5.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) })
|
|
2673
|
-
}
|
|
2674
|
-
),
|
|
2675
2619
|
/* @__PURE__ */ jsx5(
|
|
2676
2620
|
"button",
|
|
2677
2621
|
{
|
|
@@ -3930,4 +3874,4 @@ export {
|
|
|
3930
3874
|
StudioUI,
|
|
3931
3875
|
StudioUI_default as default
|
|
3932
3876
|
};
|
|
3933
|
-
//# sourceMappingURL=StudioUI-
|
|
3877
|
+
//# sourceMappingURL=StudioUI-SS3YMS53.mjs.map
|