@gallop.software/studio 0.1.80 → 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-OAZ7CTB4.js → StudioUI-RH4ZXWKP.js} +91 -175
- package/dist/StudioUI-RH4ZXWKP.js.map +1 -0
- package/dist/{StudioUI-VPNL5NMI.mjs → StudioUI-SS3YMS53.mjs} +91 -175
- 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-OAZ7CTB4.js.map +0 -1
- package/dist/StudioUI-VPNL5NMI.mjs.map +0 -1
|
@@ -891,6 +891,7 @@ function StudioToolbar() {
|
|
|
891
891
|
const [imagesToProcess, setImagesToProcess] = _react.useState.call(void 0, []);
|
|
892
892
|
const [alertMessage, setAlertMessage] = _react.useState.call(void 0, null);
|
|
893
893
|
const [showNewFolderModal, setShowNewFolderModal] = _react.useState.call(void 0, false);
|
|
894
|
+
const [showRenameFolderModal, setShowRenameFolderModal] = _react.useState.call(void 0, false);
|
|
894
895
|
const [showMoveModal, setShowMoveModal] = _react.useState.call(void 0, false);
|
|
895
896
|
const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
|
|
896
897
|
const handleUpload = _react.useCallback.call(void 0, () => {
|
|
@@ -947,13 +948,13 @@ function StudioToolbar() {
|
|
|
947
948
|
const handleProcessImages = _react.useCallback.call(void 0, 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 = _optionalChain([p, 'access', _5 => _5.split, 'call', _6 => _6("."), 'access', _7 => _7.pop, 'call', _8 => _8(), 'optionalAccess', _9 => _9.toLowerCase, 'call', _10 => _10()]) || "";
|
|
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 = _react.useCallback.call(void 0, 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__ */ _jsxruntime.jsx.call(void 0,
|
|
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__ */ _jsxruntime.jsx.call(void 0,
|
|
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__ */ _jsxruntime.jsx.call(void 0, FolderPlusIcon, {}),
|
|
1373
|
-
"New Folder"
|
|
1406
|
+
singleFolderSelected ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RenameIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, 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__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) });
|
|
1502
1539
|
}
|
|
@@ -1582,10 +1619,6 @@ var styles4 = {
|
|
|
1582
1619
|
&:hover {
|
|
1583
1620
|
border-color: #d0d5dd;
|
|
1584
1621
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
|
|
1585
|
-
|
|
1586
|
-
button[title="Rename"] {
|
|
1587
|
-
opacity: 1;
|
|
1588
|
-
}
|
|
1589
1622
|
}
|
|
1590
1623
|
`,
|
|
1591
1624
|
itemSelected: _react3.css`
|
|
@@ -1745,35 +1778,6 @@ var styles4 = {
|
|
|
1745
1778
|
color: ${_chunkUFCWGUAGjs.colors.text};
|
|
1746
1779
|
}
|
|
1747
1780
|
`,
|
|
1748
|
-
nameRow: _react3.css`
|
|
1749
|
-
display: flex;
|
|
1750
|
-
align-items: center;
|
|
1751
|
-
gap: 4px;
|
|
1752
|
-
`,
|
|
1753
|
-
renameBtn: _react3.css`
|
|
1754
|
-
flex-shrink: 0;
|
|
1755
|
-
height: 20px;
|
|
1756
|
-
width: 20px;
|
|
1757
|
-
color: ${_chunkUFCWGUAGjs.colors.textMuted};
|
|
1758
|
-
background: transparent;
|
|
1759
|
-
border: none;
|
|
1760
|
-
padding: 0;
|
|
1761
|
-
cursor: pointer;
|
|
1762
|
-
border-radius: 4px;
|
|
1763
|
-
transition: all 0.15s ease;
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
justify-content: center;
|
|
1767
|
-
opacity: 0;
|
|
1768
|
-
|
|
1769
|
-
&:hover {
|
|
1770
|
-
color: ${_chunkUFCWGUAGjs.colors.text};
|
|
1771
|
-
}
|
|
1772
|
-
`,
|
|
1773
|
-
renameIcon: _react3.css`
|
|
1774
|
-
width: 14px;
|
|
1775
|
-
height: 14px;
|
|
1776
|
-
`,
|
|
1777
1781
|
copyIcon: _react3.css`
|
|
1778
1782
|
width: 18px;
|
|
1779
1783
|
height: 18px;
|
|
@@ -1874,7 +1878,6 @@ function StudioFileGrid() {
|
|
|
1874
1878
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
1875
1879
|
const [items, setItems] = _react.useState.call(void 0, []);
|
|
1876
1880
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
1877
|
-
const [renameItem, setRenameItem] = _react.useState.call(void 0, null);
|
|
1878
1881
|
const isInitialLoad = _react.useRef.call(void 0, true);
|
|
1879
1882
|
const lastPath = _react.useRef.call(void 0, currentPath);
|
|
1880
1883
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1943,22 +1946,6 @@ function StudioFileGrid() {
|
|
|
1943
1946
|
console.error("Failed to generate thumbnail:", error);
|
|
1944
1947
|
}
|
|
1945
1948
|
};
|
|
1946
|
-
const handleRename = async (newName) => {
|
|
1947
|
-
if (!renameItem) return;
|
|
1948
|
-
setRenameItem(null);
|
|
1949
|
-
try {
|
|
1950
|
-
const response = await fetch("/api/studio/rename", {
|
|
1951
|
-
method: "POST",
|
|
1952
|
-
headers: { "Content-Type": "application/json" },
|
|
1953
|
-
body: JSON.stringify({ oldPath: renameItem.path, newName })
|
|
1954
|
-
});
|
|
1955
|
-
if (response.ok) {
|
|
1956
|
-
triggerRefresh();
|
|
1957
|
-
}
|
|
1958
|
-
} catch (error) {
|
|
1959
|
-
console.error("Failed to rename:", error);
|
|
1960
|
-
}
|
|
1961
|
-
};
|
|
1962
1949
|
const allItemsSelected = sortedItems.length > 0 && sortedItems.every((item) => selectedItems.has(item.path));
|
|
1963
1950
|
const someItemsSelected = sortedItems.some((item) => selectedItems.has(item.path));
|
|
1964
1951
|
const handleSelectAll = () => {
|
|
@@ -1969,18 +1956,6 @@ function StudioFileGrid() {
|
|
|
1969
1956
|
}
|
|
1970
1957
|
};
|
|
1971
1958
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
1972
|
-
renameItem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1973
|
-
InputModal,
|
|
1974
|
-
{
|
|
1975
|
-
title: renameItem.type === "folder" ? "Rename Folder" : "Rename File",
|
|
1976
|
-
message: "Enter a new name:",
|
|
1977
|
-
placeholder: renameItem.name,
|
|
1978
|
-
defaultValue: renameItem.name,
|
|
1979
|
-
confirmLabel: "Rename",
|
|
1980
|
-
onConfirm: handleRename,
|
|
1981
|
-
onCancel: () => setRenameItem(null)
|
|
1982
|
-
}
|
|
1983
|
-
),
|
|
1984
1959
|
sortedItems.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles4.selectAllRow, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { css: styles4.selectAllLabel, children: [
|
|
1985
1960
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1986
1961
|
"input",
|
|
@@ -2020,15 +1995,14 @@ function StudioFileGrid() {
|
|
|
2020
1995
|
isSelected: selectedItems.has(item.path),
|
|
2021
1996
|
onClick: (e) => handleItemClick(item, e),
|
|
2022
1997
|
onOpen: () => handleOpen(item),
|
|
2023
|
-
onGenerateThumbnail: () => handleGenerateThumbnail(item)
|
|
2024
|
-
onRename: () => setRenameItem(item)
|
|
1998
|
+
onGenerateThumbnail: () => handleGenerateThumbnail(item)
|
|
2025
1999
|
},
|
|
2026
2000
|
item.path
|
|
2027
2001
|
))
|
|
2028
2002
|
] })
|
|
2029
2003
|
] });
|
|
2030
2004
|
}
|
|
2031
|
-
function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail
|
|
2005
|
+
function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
2032
2006
|
const [showCopied, setShowCopied] = _react.useState.call(void 0, false);
|
|
2033
2007
|
const isFolder = item.type === "folder";
|
|
2034
2008
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
@@ -2115,21 +2089,7 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail, onRe
|
|
|
2115
2089
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles4.fileIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" }) })
|
|
2116
2090
|
] }),
|
|
2117
2091
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles4.label, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles4.labelRow, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles4.labelText, children: [
|
|
2118
|
-
/* @__PURE__ */ _jsxruntime.
|
|
2119
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { css: styles4.name, title: item.name, children: truncateMiddle(item.name) }),
|
|
2120
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2121
|
-
"button",
|
|
2122
|
-
{
|
|
2123
|
-
css: styles4.renameBtn,
|
|
2124
|
-
onClick: (e) => {
|
|
2125
|
-
e.stopPropagation();
|
|
2126
|
-
onRename();
|
|
2127
|
-
},
|
|
2128
|
-
title: "Rename",
|
|
2129
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles4.renameIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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" }) })
|
|
2130
|
-
}
|
|
2131
|
-
)
|
|
2132
|
-
] }),
|
|
2092
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { css: styles4.name, title: item.name, children: truncateMiddle(item.name) }),
|
|
2133
2093
|
isFolder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { css: styles4.size, children: [
|
|
2134
2094
|
item.fileCount !== void 0 ? `${item.fileCount} files` : "",
|
|
2135
2095
|
item.fileCount !== void 0 && item.totalSize !== void 0 ? " \xB7 " : "",
|
|
@@ -2475,7 +2435,6 @@ function StudioFileList() {
|
|
|
2475
2435
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
2476
2436
|
const [items, setItems] = _react.useState.call(void 0, []);
|
|
2477
2437
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
2478
|
-
const [renameItem, setRenameItem] = _react.useState.call(void 0, null);
|
|
2479
2438
|
const isInitialLoad = _react.useRef.call(void 0, true);
|
|
2480
2439
|
const lastPath = _react.useRef.call(void 0, currentPath);
|
|
2481
2440
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2540,22 +2499,6 @@ function StudioFileList() {
|
|
|
2540
2499
|
console.error("Failed to generate thumbnail:", error);
|
|
2541
2500
|
}
|
|
2542
2501
|
};
|
|
2543
|
-
const handleRename = async (newName) => {
|
|
2544
|
-
if (!renameItem) return;
|
|
2545
|
-
setRenameItem(null);
|
|
2546
|
-
try {
|
|
2547
|
-
const response = await fetch("/api/studio/rename", {
|
|
2548
|
-
method: "POST",
|
|
2549
|
-
headers: { "Content-Type": "application/json" },
|
|
2550
|
-
body: JSON.stringify({ oldPath: renameItem.path, newName })
|
|
2551
|
-
});
|
|
2552
|
-
if (response.ok) {
|
|
2553
|
-
triggerRefresh();
|
|
2554
|
-
}
|
|
2555
|
-
} catch (error) {
|
|
2556
|
-
console.error("Failed to rename:", error);
|
|
2557
|
-
}
|
|
2558
|
-
};
|
|
2559
2502
|
const allItemsSelected = sortedItems.length > 0 && sortedItems.every((item) => selectedItems.has(item.path));
|
|
2560
2503
|
const someItemsSelected = sortedItems.some((item) => selectedItems.has(item.path));
|
|
2561
2504
|
const handleSelectAll = () => {
|
|
@@ -2565,66 +2508,51 @@ function StudioFileList() {
|
|
|
2565
2508
|
selectAll(sortedItems);
|
|
2566
2509
|
}
|
|
2567
2510
|
};
|
|
2568
|
-
return /* @__PURE__ */ _jsxruntime.
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
onCancel: () => setRenameItem(null)
|
|
2579
|
-
}
|
|
2580
|
-
),
|
|
2581
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { css: styles5.table, children: [
|
|
2582
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { children: [
|
|
2583
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2584
|
-
"input",
|
|
2585
|
-
{
|
|
2586
|
-
type: "checkbox",
|
|
2587
|
-
css: styles5.checkbox,
|
|
2588
|
-
checked: allItemsSelected,
|
|
2589
|
-
ref: (el) => {
|
|
2590
|
-
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
2591
|
-
},
|
|
2592
|
-
onChange: handleSelectAll
|
|
2593
|
-
}
|
|
2594
|
-
) }),
|
|
2595
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: styles5.th, children: "Name" }),
|
|
2596
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thSize], children: "Size" }),
|
|
2597
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
|
|
2598
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
|
|
2599
|
-
] }) }),
|
|
2600
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tbody", { css: styles5.tbody, children: [
|
|
2601
|
-
!isAtRoot && !isSearching && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { css: styles5.parentRow, onClick: navigateUp, children: [
|
|
2602
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td }),
|
|
2603
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles5.nameCell, children: [
|
|
2604
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles5.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }),
|
|
2605
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles5.name, children: ".." })
|
|
2606
|
-
] }) }),
|
|
2607
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles5.td, styles5.meta], children: "--" }),
|
|
2608
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
|
|
2609
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td, children: "--" })
|
|
2610
|
-
] }),
|
|
2611
|
-
sortedItems.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2612
|
-
ListRow,
|
|
2613
|
-
{
|
|
2614
|
-
item,
|
|
2615
|
-
isSelected: selectedItems.has(item.path),
|
|
2616
|
-
onClick: (e) => handleItemClick(item, e),
|
|
2617
|
-
onOpen: () => handleOpen(item),
|
|
2618
|
-
onGenerateThumbnail: () => handleGenerateThumbnail(item),
|
|
2619
|
-
onRename: () => setRenameItem(item)
|
|
2511
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles5.tableWrapper, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { css: styles5.table, children: [
|
|
2512
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { children: [
|
|
2513
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2514
|
+
"input",
|
|
2515
|
+
{
|
|
2516
|
+
type: "checkbox",
|
|
2517
|
+
css: styles5.checkbox,
|
|
2518
|
+
checked: allItemsSelected,
|
|
2519
|
+
ref: (el) => {
|
|
2520
|
+
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
2620
2521
|
},
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2522
|
+
onChange: handleSelectAll
|
|
2523
|
+
}
|
|
2524
|
+
) }),
|
|
2525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: styles5.th, children: "Name" }),
|
|
2526
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thSize], children: "Size" }),
|
|
2527
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
|
|
2528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
|
|
2529
|
+
] }) }),
|
|
2530
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tbody", { css: styles5.tbody, children: [
|
|
2531
|
+
!isAtRoot && !isSearching && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { css: styles5.parentRow, onClick: navigateUp, children: [
|
|
2532
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td }),
|
|
2533
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles5.nameCell, children: [
|
|
2534
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles5.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }),
|
|
2535
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles5.name, children: ".." })
|
|
2536
|
+
] }) }),
|
|
2537
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles5.td, styles5.meta], children: "--" }),
|
|
2538
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
|
|
2539
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles5.td, children: "--" })
|
|
2540
|
+
] }),
|
|
2541
|
+
sortedItems.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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
|
+
))
|
|
2624
2552
|
] })
|
|
2625
|
-
] });
|
|
2553
|
+
] }) });
|
|
2626
2554
|
}
|
|
2627
|
-
function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail
|
|
2555
|
+
function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
2628
2556
|
const [showCopied, setShowCopied] = _react.useState.call(void 0, false);
|
|
2629
2557
|
const isFolder = item.type === "folder";
|
|
2630
2558
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
@@ -2688,18 +2616,6 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail, onRen
|
|
|
2688
2616
|
]
|
|
2689
2617
|
}
|
|
2690
2618
|
),
|
|
2691
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2692
|
-
"button",
|
|
2693
|
-
{
|
|
2694
|
-
css: styles5.copyBtn,
|
|
2695
|
-
onClick: (e) => {
|
|
2696
|
-
e.stopPropagation();
|
|
2697
|
-
onRename();
|
|
2698
|
-
},
|
|
2699
|
-
title: "Rename",
|
|
2700
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles5.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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" }) })
|
|
2701
|
-
}
|
|
2702
|
-
),
|
|
2703
2619
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2704
2620
|
"button",
|
|
2705
2621
|
{
|
|
@@ -3958,4 +3874,4 @@ var StudioUI_default = StudioUI;
|
|
|
3958
3874
|
|
|
3959
3875
|
|
|
3960
3876
|
exports.StudioUI = StudioUI; exports.default = StudioUI_default;
|
|
3961
|
-
//# sourceMappingURL=StudioUI-
|
|
3877
|
+
//# sourceMappingURL=StudioUI-RH4ZXWKP.js.map
|