@gallop.software/studio 0.1.59 → 0.1.61
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-AFND32FZ.mjs → StudioUI-D6NQXFE4.mjs} +823 -464
- package/dist/StudioUI-D6NQXFE4.mjs.map +1 -0
- package/dist/{StudioUI-ZYRI3X32.js → StudioUI-P6VW6YF3.js} +546 -187
- package/dist/StudioUI-P6VW6YF3.js.map +1 -0
- package/dist/handlers.d.mts +6 -0
- package/dist/handlers.d.ts +6 -0
- package/dist/handlers.js +243 -0
- package/dist/handlers.js.map +1 -1
- package/dist/handlers.mjs +243 -0
- package/dist/handlers.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/StudioUI-AFND32FZ.mjs.map +0 -1
- package/dist/StudioUI-ZYRI3X32.js.map +0 -1
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "./chunk-HXE6XCG2.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/StudioUI.tsx
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { css as
|
|
10
|
+
import { useEffect as useEffect4, useCallback as useCallback2, useState as useState7 } from "react";
|
|
11
|
+
import { css as css8 } from "@emotion/react";
|
|
12
12
|
|
|
13
13
|
// src/components/StudioContext.tsx
|
|
14
14
|
import { createContext, useContext } from "react";
|
|
@@ -60,8 +60,8 @@ function useStudio() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// src/components/StudioToolbar.tsx
|
|
63
|
-
import { useCallback, useRef, useState } from "react";
|
|
64
|
-
import { css as
|
|
63
|
+
import { useCallback, useRef, useState as useState2 } from "react";
|
|
64
|
+
import { css as css3, keyframes as keyframes3 } from "@emotion/react";
|
|
65
65
|
|
|
66
66
|
// src/components/StudioModal.tsx
|
|
67
67
|
import React from "react";
|
|
@@ -377,14 +377,257 @@ function ProgressModal({
|
|
|
377
377
|
] }) });
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
+
// src/components/StudioFolderPicker.tsx
|
|
381
|
+
import { useState, useEffect } from "react";
|
|
382
|
+
import { css as css2, keyframes as keyframes2 } from "@emotion/react";
|
|
383
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "@emotion/react/jsx-runtime";
|
|
384
|
+
var fadeIn2 = keyframes2`
|
|
385
|
+
from { opacity: 0; }
|
|
386
|
+
to { opacity: 1; }
|
|
387
|
+
`;
|
|
388
|
+
var slideIn2 = keyframes2`
|
|
389
|
+
from {
|
|
390
|
+
opacity: 0;
|
|
391
|
+
transform: translateY(-8px) scale(0.98);
|
|
392
|
+
}
|
|
393
|
+
to {
|
|
394
|
+
opacity: 1;
|
|
395
|
+
transform: translateY(0) scale(1);
|
|
396
|
+
}
|
|
397
|
+
`;
|
|
398
|
+
var styles2 = {
|
|
399
|
+
overlay: css2`
|
|
400
|
+
position: fixed;
|
|
401
|
+
inset: 0;
|
|
402
|
+
background-color: rgba(26, 31, 54, 0.4);
|
|
403
|
+
backdrop-filter: blur(4px);
|
|
404
|
+
display: flex;
|
|
405
|
+
align-items: center;
|
|
406
|
+
justify-content: center;
|
|
407
|
+
z-index: 10000;
|
|
408
|
+
animation: ${fadeIn2} 0.15s ease-out;
|
|
409
|
+
font-family: ${fontStack};
|
|
410
|
+
`,
|
|
411
|
+
modal: css2`
|
|
412
|
+
${baseReset}
|
|
413
|
+
background-color: ${colors.surface};
|
|
414
|
+
border-radius: 12px;
|
|
415
|
+
box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
|
|
416
|
+
max-width: 480px;
|
|
417
|
+
width: 90%;
|
|
418
|
+
max-height: 80vh;
|
|
419
|
+
display: flex;
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
animation: ${slideIn2} 0.2s ease-out;
|
|
422
|
+
overflow: hidden;
|
|
423
|
+
`,
|
|
424
|
+
header: css2`
|
|
425
|
+
padding: 24px 24px 0;
|
|
426
|
+
`,
|
|
427
|
+
title: css2`
|
|
428
|
+
font-size: ${fontSize.lg};
|
|
429
|
+
font-weight: 600;
|
|
430
|
+
color: ${colors.text};
|
|
431
|
+
margin: 0;
|
|
432
|
+
letter-spacing: -0.02em;
|
|
433
|
+
`,
|
|
434
|
+
body: css2`
|
|
435
|
+
padding: 12px 24px 24px;
|
|
436
|
+
flex: 1;
|
|
437
|
+
overflow-y: auto;
|
|
438
|
+
min-height: 200px;
|
|
439
|
+
max-height: 400px;
|
|
440
|
+
`,
|
|
441
|
+
message: css2`
|
|
442
|
+
font-size: ${fontSize.base};
|
|
443
|
+
color: ${colors.textSecondary};
|
|
444
|
+
margin: 0 0 16px;
|
|
445
|
+
line-height: 1.6;
|
|
446
|
+
`,
|
|
447
|
+
folderList: css2`
|
|
448
|
+
display: flex;
|
|
449
|
+
flex-direction: column;
|
|
450
|
+
gap: 2px;
|
|
451
|
+
`,
|
|
452
|
+
folderItem: css2`
|
|
453
|
+
display: flex;
|
|
454
|
+
align-items: center;
|
|
455
|
+
gap: 8px;
|
|
456
|
+
padding: 10px 12px;
|
|
457
|
+
border-radius: 6px;
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
transition: all 0.15s ease;
|
|
460
|
+
border: 1px solid transparent;
|
|
461
|
+
|
|
462
|
+
&:hover {
|
|
463
|
+
background-color: ${colors.surfaceHover};
|
|
464
|
+
}
|
|
465
|
+
`,
|
|
466
|
+
folderItemSelected: css2`
|
|
467
|
+
background-color: ${colors.primaryLight};
|
|
468
|
+
border-color: ${colors.primary};
|
|
469
|
+
|
|
470
|
+
&:hover {
|
|
471
|
+
background-color: ${colors.primaryLight};
|
|
472
|
+
}
|
|
473
|
+
`,
|
|
474
|
+
folderIcon: css2`
|
|
475
|
+
width: 20px;
|
|
476
|
+
height: 20px;
|
|
477
|
+
color: #f9935e;
|
|
478
|
+
flex-shrink: 0;
|
|
479
|
+
`,
|
|
480
|
+
folderName: css2`
|
|
481
|
+
font-size: ${fontSize.base};
|
|
482
|
+
color: ${colors.text};
|
|
483
|
+
flex: 1;
|
|
484
|
+
`,
|
|
485
|
+
footer: css2`
|
|
486
|
+
display: flex;
|
|
487
|
+
justify-content: flex-end;
|
|
488
|
+
gap: 12px;
|
|
489
|
+
padding: 16px 24px;
|
|
490
|
+
border-top: 1px solid ${colors.border};
|
|
491
|
+
background-color: ${colors.background};
|
|
492
|
+
`,
|
|
493
|
+
btn: css2`
|
|
494
|
+
padding: 10px 18px;
|
|
495
|
+
font-size: ${fontSize.base};
|
|
496
|
+
font-weight: 500;
|
|
497
|
+
border-radius: 6px;
|
|
498
|
+
cursor: pointer;
|
|
499
|
+
transition: all 0.15s ease;
|
|
500
|
+
letter-spacing: -0.01em;
|
|
501
|
+
`,
|
|
502
|
+
btnCancel: css2`
|
|
503
|
+
background-color: ${colors.surface};
|
|
504
|
+
border: 1px solid ${colors.border};
|
|
505
|
+
color: ${colors.text};
|
|
506
|
+
|
|
507
|
+
&:hover {
|
|
508
|
+
background-color: ${colors.surfaceHover};
|
|
509
|
+
border-color: ${colors.borderHover};
|
|
510
|
+
}
|
|
511
|
+
`,
|
|
512
|
+
btnConfirm: css2`
|
|
513
|
+
background-color: ${colors.primary};
|
|
514
|
+
border: 1px solid ${colors.primary};
|
|
515
|
+
color: white;
|
|
516
|
+
|
|
517
|
+
&:hover:not(:disabled) {
|
|
518
|
+
background-color: ${colors.primaryHover};
|
|
519
|
+
border-color: ${colors.primaryHover};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
&:disabled {
|
|
523
|
+
opacity: 0.5;
|
|
524
|
+
cursor: not-allowed;
|
|
525
|
+
}
|
|
526
|
+
`,
|
|
527
|
+
loading: css2`
|
|
528
|
+
display: flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
justify-content: center;
|
|
531
|
+
padding: 40px;
|
|
532
|
+
color: ${colors.textSecondary};
|
|
533
|
+
`,
|
|
534
|
+
spinner: css2`
|
|
535
|
+
width: 24px;
|
|
536
|
+
height: 24px;
|
|
537
|
+
border-radius: 50%;
|
|
538
|
+
border: 3px solid ${colors.border};
|
|
539
|
+
border-top-color: ${colors.primary};
|
|
540
|
+
animation: spin 0.8s linear infinite;
|
|
541
|
+
|
|
542
|
+
@keyframes spin {
|
|
543
|
+
to { transform: rotate(360deg); }
|
|
544
|
+
}
|
|
545
|
+
`
|
|
546
|
+
};
|
|
547
|
+
function StudioFolderPicker({ selectedItems, onMove, onCancel }) {
|
|
548
|
+
const [folders, setFolders] = useState([]);
|
|
549
|
+
const [loading, setLoading] = useState(true);
|
|
550
|
+
const [selectedFolder, setSelectedFolder] = useState(null);
|
|
551
|
+
useEffect(() => {
|
|
552
|
+
async function loadFolders() {
|
|
553
|
+
try {
|
|
554
|
+
const response = await fetch("/api/studio/list-folders");
|
|
555
|
+
if (response.ok) {
|
|
556
|
+
const data = await response.json();
|
|
557
|
+
console.log("Loaded folders:", data);
|
|
558
|
+
setFolders(data.folders || []);
|
|
559
|
+
} else {
|
|
560
|
+
console.error("Failed to load folders:", response.status, await response.text());
|
|
561
|
+
}
|
|
562
|
+
} catch (error) {
|
|
563
|
+
console.error("Failed to load folders:", error);
|
|
564
|
+
} finally {
|
|
565
|
+
setLoading(false);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
loadFolders();
|
|
569
|
+
}, []);
|
|
570
|
+
const selectedPaths = Array.from(selectedItems);
|
|
571
|
+
const availableFolders = folders.filter((folder) => {
|
|
572
|
+
return !selectedPaths.some(
|
|
573
|
+
(selected) => folder.path === selected || folder.path.startsWith(selected + "/")
|
|
574
|
+
);
|
|
575
|
+
});
|
|
576
|
+
const handleConfirm = () => {
|
|
577
|
+
if (selectedFolder) {
|
|
578
|
+
onMove(selectedFolder);
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
return /* @__PURE__ */ jsx2("div", { css: styles2.overlay, onClick: onCancel, children: /* @__PURE__ */ jsxs2("div", { css: styles2.modal, onClick: (e) => e.stopPropagation(), children: [
|
|
582
|
+
/* @__PURE__ */ jsx2("div", { css: styles2.header, children: /* @__PURE__ */ jsx2("h3", { css: styles2.title, children: "Move Items" }) }),
|
|
583
|
+
/* @__PURE__ */ jsxs2("div", { css: styles2.body, children: [
|
|
584
|
+
/* @__PURE__ */ jsxs2("p", { css: styles2.message, children: [
|
|
585
|
+
"Select a destination folder for ",
|
|
586
|
+
selectedItems.size,
|
|
587
|
+
" item",
|
|
588
|
+
selectedItems.size !== 1 ? "s" : "",
|
|
589
|
+
":"
|
|
590
|
+
] }),
|
|
591
|
+
loading ? /* @__PURE__ */ jsx2("div", { css: styles2.loading, children: /* @__PURE__ */ jsx2("div", { css: styles2.spinner }) }) : availableFolders.length === 0 ? /* @__PURE__ */ jsx2("div", { css: styles2.loading, children: "No available folders to move to." }) : /* @__PURE__ */ jsx2("div", { css: styles2.folderList, children: availableFolders.map((folder) => /* @__PURE__ */ jsxs2(
|
|
592
|
+
"div",
|
|
593
|
+
{
|
|
594
|
+
css: [
|
|
595
|
+
styles2.folderItem,
|
|
596
|
+
selectedFolder === folder.path && styles2.folderItemSelected
|
|
597
|
+
],
|
|
598
|
+
style: { paddingLeft: 12 + folder.depth * 16 },
|
|
599
|
+
onClick: () => setSelectedFolder(folder.path),
|
|
600
|
+
children: [
|
|
601
|
+
/* @__PURE__ */ jsx2("svg", { css: styles2.folderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx2("path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }),
|
|
602
|
+
/* @__PURE__ */ jsx2("span", { css: styles2.folderName, children: folder.name })
|
|
603
|
+
]
|
|
604
|
+
},
|
|
605
|
+
folder.path
|
|
606
|
+
)) })
|
|
607
|
+
] }),
|
|
608
|
+
/* @__PURE__ */ jsxs2("div", { css: styles2.footer, children: [
|
|
609
|
+
/* @__PURE__ */ jsx2("button", { css: [styles2.btn, styles2.btnCancel], onClick: onCancel, children: "Cancel" }),
|
|
610
|
+
/* @__PURE__ */ jsx2(
|
|
611
|
+
"button",
|
|
612
|
+
{
|
|
613
|
+
css: [styles2.btn, styles2.btnConfirm],
|
|
614
|
+
onClick: handleConfirm,
|
|
615
|
+
disabled: !selectedFolder,
|
|
616
|
+
children: "Move Here"
|
|
617
|
+
}
|
|
618
|
+
)
|
|
619
|
+
] })
|
|
620
|
+
] }) });
|
|
621
|
+
}
|
|
622
|
+
|
|
380
623
|
// src/components/StudioToolbar.tsx
|
|
381
|
-
import { Fragment as Fragment2, jsx as
|
|
624
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "@emotion/react/jsx-runtime";
|
|
382
625
|
var btnHeight = "36px";
|
|
383
|
-
var spin =
|
|
626
|
+
var spin = keyframes3`
|
|
384
627
|
to { transform: rotate(360deg); }
|
|
385
628
|
`;
|
|
386
|
-
var
|
|
387
|
-
toolbar:
|
|
629
|
+
var styles3 = {
|
|
630
|
+
toolbar: css3`
|
|
388
631
|
display: flex;
|
|
389
632
|
flex-wrap: nowrap;
|
|
390
633
|
align-items: center;
|
|
@@ -400,21 +643,21 @@ var styles2 = {
|
|
|
400
643
|
padding: 12px 24px;
|
|
401
644
|
}
|
|
402
645
|
`,
|
|
403
|
-
left:
|
|
646
|
+
left: css3`
|
|
404
647
|
display: flex;
|
|
405
648
|
flex-wrap: nowrap;
|
|
406
649
|
flex-shrink: 0;
|
|
407
650
|
align-items: center;
|
|
408
651
|
gap: 8px;
|
|
409
652
|
`,
|
|
410
|
-
right:
|
|
653
|
+
right: css3`
|
|
411
654
|
display: flex;
|
|
412
655
|
flex-wrap: nowrap;
|
|
413
656
|
flex-shrink: 0;
|
|
414
657
|
align-items: center;
|
|
415
658
|
gap: 8px;
|
|
416
659
|
`,
|
|
417
|
-
btn:
|
|
660
|
+
btn: css3`
|
|
418
661
|
display: inline-flex;
|
|
419
662
|
align-items: center;
|
|
420
663
|
justify-content: center;
|
|
@@ -441,10 +684,10 @@ var styles2 = {
|
|
|
441
684
|
opacity: 0.5;
|
|
442
685
|
}
|
|
443
686
|
`,
|
|
444
|
-
btnIconOnly:
|
|
687
|
+
btnIconOnly: css3`
|
|
445
688
|
padding: 0 10px;
|
|
446
689
|
`,
|
|
447
|
-
btnPrimary:
|
|
690
|
+
btnPrimary: css3`
|
|
448
691
|
background: ${colors.primary};
|
|
449
692
|
border-color: ${colors.primary};
|
|
450
693
|
color: white;
|
|
@@ -454,7 +697,7 @@ var styles2 = {
|
|
|
454
697
|
border-color: ${colors.primaryHover};
|
|
455
698
|
}
|
|
456
699
|
`,
|
|
457
|
-
btnDanger:
|
|
700
|
+
btnDanger: css3`
|
|
458
701
|
color: ${colors.danger};
|
|
459
702
|
|
|
460
703
|
&:hover:not(:disabled) {
|
|
@@ -462,14 +705,14 @@ var styles2 = {
|
|
|
462
705
|
border-color: ${colors.danger};
|
|
463
706
|
}
|
|
464
707
|
`,
|
|
465
|
-
icon:
|
|
708
|
+
icon: css3`
|
|
466
709
|
width: 16px;
|
|
467
710
|
height: 16px;
|
|
468
711
|
`,
|
|
469
|
-
iconSpin:
|
|
712
|
+
iconSpin: css3`
|
|
470
713
|
animation: ${spin} 1s linear infinite;
|
|
471
714
|
`,
|
|
472
|
-
selectionCount:
|
|
715
|
+
selectionCount: css3`
|
|
473
716
|
font-size: ${fontSize.base};
|
|
474
717
|
color: ${colors.textSecondary};
|
|
475
718
|
display: flex;
|
|
@@ -477,7 +720,7 @@ var styles2 = {
|
|
|
477
720
|
gap: 8px;
|
|
478
721
|
margin-right: 8px;
|
|
479
722
|
`,
|
|
480
|
-
clearBtn:
|
|
723
|
+
clearBtn: css3`
|
|
481
724
|
color: ${colors.primary};
|
|
482
725
|
background: none;
|
|
483
726
|
border: none;
|
|
@@ -490,13 +733,13 @@ var styles2 = {
|
|
|
490
733
|
text-decoration: underline;
|
|
491
734
|
}
|
|
492
735
|
`,
|
|
493
|
-
divider:
|
|
736
|
+
divider: css3`
|
|
494
737
|
width: 1px;
|
|
495
738
|
height: 24px;
|
|
496
739
|
background: ${colors.border};
|
|
497
740
|
margin: 0 4px;
|
|
498
741
|
`,
|
|
499
|
-
viewToggle:
|
|
742
|
+
viewToggle: css3`
|
|
500
743
|
display: flex;
|
|
501
744
|
align-items: center;
|
|
502
745
|
height: ${btnHeight};
|
|
@@ -505,12 +748,12 @@ var styles2 = {
|
|
|
505
748
|
border-radius: 6px;
|
|
506
749
|
overflow: hidden;
|
|
507
750
|
`,
|
|
508
|
-
searchWrapper:
|
|
751
|
+
searchWrapper: css3`
|
|
509
752
|
position: relative;
|
|
510
753
|
display: flex;
|
|
511
754
|
align-items: center;
|
|
512
755
|
`,
|
|
513
|
-
searchInput:
|
|
756
|
+
searchInput: css3`
|
|
514
757
|
height: ${btnHeight};
|
|
515
758
|
padding: 0 32px 0 12px;
|
|
516
759
|
border: 1px solid ${colors.border};
|
|
@@ -531,7 +774,7 @@ var styles2 = {
|
|
|
531
774
|
color: ${colors.textMuted};
|
|
532
775
|
}
|
|
533
776
|
`,
|
|
534
|
-
searchClearBtn:
|
|
777
|
+
searchClearBtn: css3`
|
|
535
778
|
position: absolute;
|
|
536
779
|
right: 5px;
|
|
537
780
|
top: 5px;
|
|
@@ -551,7 +794,7 @@ var styles2 = {
|
|
|
551
794
|
background: ${colors.primaryHover};
|
|
552
795
|
}
|
|
553
796
|
`,
|
|
554
|
-
viewBtn:
|
|
797
|
+
viewBtn: css3`
|
|
555
798
|
height: 100%;
|
|
556
799
|
padding: 0 10px;
|
|
557
800
|
background: transparent;
|
|
@@ -568,7 +811,7 @@ var styles2 = {
|
|
|
568
811
|
background-color: ${colors.surfaceHover};
|
|
569
812
|
}
|
|
570
813
|
`,
|
|
571
|
-
viewBtnActive:
|
|
814
|
+
viewBtnActive: css3`
|
|
572
815
|
background-color: ${colors.primaryLight};
|
|
573
816
|
color: ${colors.primary};
|
|
574
817
|
|
|
@@ -582,22 +825,24 @@ function StudioToolbar() {
|
|
|
582
825
|
const { selectedItems, viewMode, setViewMode, clearSelection, currentPath, triggerRefresh, focusedItem } = useStudio();
|
|
583
826
|
const fileInputRef = useRef(null);
|
|
584
827
|
const abortControllerRef = useRef(null);
|
|
585
|
-
const [uploading, setUploading] =
|
|
586
|
-
const [refreshing, setRefreshing] =
|
|
587
|
-
const [processing, setProcessing] =
|
|
588
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
589
|
-
const [showProcessConfirm, setShowProcessConfirm] =
|
|
590
|
-
const [showProgress, setShowProgress] =
|
|
591
|
-
const [progressState, setProgressState] =
|
|
828
|
+
const [uploading, setUploading] = useState2(false);
|
|
829
|
+
const [refreshing, setRefreshing] = useState2(false);
|
|
830
|
+
const [processing, setProcessing] = useState2(false);
|
|
831
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = useState2(false);
|
|
832
|
+
const [showProcessConfirm, setShowProcessConfirm] = useState2(false);
|
|
833
|
+
const [showProgress, setShowProgress] = useState2(false);
|
|
834
|
+
const [progressState, setProgressState] = useState2({
|
|
592
835
|
current: 0,
|
|
593
836
|
total: 0,
|
|
594
837
|
percent: 0,
|
|
595
838
|
status: "processing"
|
|
596
839
|
});
|
|
597
|
-
const [processCount, setProcessCount] =
|
|
598
|
-
const [processMode, setProcessMode] =
|
|
599
|
-
const [imagesToProcess, setImagesToProcess] =
|
|
600
|
-
const [alertMessage, setAlertMessage] =
|
|
840
|
+
const [processCount, setProcessCount] = useState2(0);
|
|
841
|
+
const [processMode, setProcessMode] = useState2("all");
|
|
842
|
+
const [imagesToProcess, setImagesToProcess] = useState2([]);
|
|
843
|
+
const [alertMessage, setAlertMessage] = useState2(null);
|
|
844
|
+
const [showNewFolderModal, setShowNewFolderModal] = useState2(false);
|
|
845
|
+
const [showMoveModal, setShowMoveModal] = useState2(false);
|
|
601
846
|
const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
|
|
602
847
|
const handleUpload = useCallback(() => {
|
|
603
848
|
fileInputRef.current?.click();
|
|
@@ -897,6 +1142,66 @@ function StudioToolbar() {
|
|
|
897
1142
|
const handleSyncCdn = useCallback(() => {
|
|
898
1143
|
console.log("Sync CDN clicked", selectedItems);
|
|
899
1144
|
}, [selectedItems]);
|
|
1145
|
+
const handleCreateFolder = useCallback(async (folderName) => {
|
|
1146
|
+
setShowNewFolderModal(false);
|
|
1147
|
+
try {
|
|
1148
|
+
const response = await fetch("/api/studio/create-folder", {
|
|
1149
|
+
method: "POST",
|
|
1150
|
+
headers: { "Content-Type": "application/json" },
|
|
1151
|
+
body: JSON.stringify({ parentPath: currentPath, name: folderName })
|
|
1152
|
+
});
|
|
1153
|
+
if (response.ok) {
|
|
1154
|
+
triggerRefresh();
|
|
1155
|
+
} else {
|
|
1156
|
+
const error = await response.json();
|
|
1157
|
+
setAlertMessage({
|
|
1158
|
+
title: "Create Folder Failed",
|
|
1159
|
+
message: error.error || "Unknown error"
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
} catch (error) {
|
|
1163
|
+
console.error("Create folder error:", error);
|
|
1164
|
+
setAlertMessage({
|
|
1165
|
+
title: "Create Folder Failed",
|
|
1166
|
+
message: "Failed to create folder. Check console for details."
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
}, [currentPath, triggerRefresh]);
|
|
1170
|
+
const handleMoveClick = useCallback(() => {
|
|
1171
|
+
if (selectedItems.size === 0) return;
|
|
1172
|
+
setShowMoveModal(true);
|
|
1173
|
+
}, [selectedItems]);
|
|
1174
|
+
const handleMoveConfirm = useCallback(async (destination) => {
|
|
1175
|
+
try {
|
|
1176
|
+
const response = await fetch("/api/studio/move", {
|
|
1177
|
+
method: "POST",
|
|
1178
|
+
headers: { "Content-Type": "application/json" },
|
|
1179
|
+
body: JSON.stringify({ paths: Array.from(selectedItems), destination })
|
|
1180
|
+
});
|
|
1181
|
+
const data = await response.json();
|
|
1182
|
+
if (response.ok) {
|
|
1183
|
+
clearSelection();
|
|
1184
|
+
triggerRefresh();
|
|
1185
|
+
if (data.errors && data.errors.length > 0) {
|
|
1186
|
+
setAlertMessage({
|
|
1187
|
+
title: "Move Completed with Errors",
|
|
1188
|
+
message: data.errors.join("\n")
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
} else {
|
|
1192
|
+
setAlertMessage({
|
|
1193
|
+
title: "Move Failed",
|
|
1194
|
+
message: data.error || "Unknown error"
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
} catch (error) {
|
|
1198
|
+
console.error("Move error:", error);
|
|
1199
|
+
setAlertMessage({
|
|
1200
|
+
title: "Move Failed",
|
|
1201
|
+
message: "Failed to move items. Check console for details."
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
}, [selectedItems, clearSelection, triggerRefresh]);
|
|
900
1205
|
const { searchQuery, setSearchQuery } = useStudio();
|
|
901
1206
|
const handleSearch = useCallback((e) => {
|
|
902
1207
|
setSearchQuery(e.target.value);
|
|
@@ -915,8 +1220,8 @@ function StudioToolbar() {
|
|
|
915
1220
|
if (focusedItem) {
|
|
916
1221
|
return null;
|
|
917
1222
|
}
|
|
918
|
-
return /* @__PURE__ */
|
|
919
|
-
showDeleteConfirm && /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
1224
|
+
showDeleteConfirm && /* @__PURE__ */ jsx3(
|
|
920
1225
|
ConfirmModal,
|
|
921
1226
|
{
|
|
922
1227
|
title: "Delete Items",
|
|
@@ -927,7 +1232,7 @@ function StudioToolbar() {
|
|
|
927
1232
|
onCancel: () => setShowDeleteConfirm(false)
|
|
928
1233
|
}
|
|
929
1234
|
),
|
|
930
|
-
showProcessConfirm && /* @__PURE__ */
|
|
1235
|
+
showProcessConfirm && /* @__PURE__ */ jsx3(
|
|
931
1236
|
ConfirmModal,
|
|
932
1237
|
{
|
|
933
1238
|
title: "Process Images",
|
|
@@ -937,7 +1242,7 @@ function StudioToolbar() {
|
|
|
937
1242
|
onCancel: () => setShowProcessConfirm(false)
|
|
938
1243
|
}
|
|
939
1244
|
),
|
|
940
|
-
showProgress && /* @__PURE__ */
|
|
1245
|
+
showProgress && /* @__PURE__ */ jsx3(
|
|
941
1246
|
ProgressModal,
|
|
942
1247
|
{
|
|
943
1248
|
title: "Processing Images",
|
|
@@ -954,7 +1259,29 @@ function StudioToolbar() {
|
|
|
954
1259
|
}
|
|
955
1260
|
}
|
|
956
1261
|
),
|
|
957
|
-
|
|
1262
|
+
showNewFolderModal && /* @__PURE__ */ jsx3(
|
|
1263
|
+
InputModal,
|
|
1264
|
+
{
|
|
1265
|
+
title: "New Folder",
|
|
1266
|
+
message: "Enter a name for the new folder:",
|
|
1267
|
+
placeholder: "Folder name",
|
|
1268
|
+
confirmLabel: "Create",
|
|
1269
|
+
onConfirm: handleCreateFolder,
|
|
1270
|
+
onCancel: () => setShowNewFolderModal(false)
|
|
1271
|
+
}
|
|
1272
|
+
),
|
|
1273
|
+
showMoveModal && /* @__PURE__ */ jsx3(
|
|
1274
|
+
StudioFolderPicker,
|
|
1275
|
+
{
|
|
1276
|
+
selectedItems,
|
|
1277
|
+
onMove: (destination) => {
|
|
1278
|
+
setShowMoveModal(false);
|
|
1279
|
+
handleMoveConfirm(destination);
|
|
1280
|
+
},
|
|
1281
|
+
onCancel: () => setShowMoveModal(false)
|
|
1282
|
+
}
|
|
1283
|
+
),
|
|
1284
|
+
alertMessage && /* @__PURE__ */ jsx3(
|
|
958
1285
|
AlertModal,
|
|
959
1286
|
{
|
|
960
1287
|
title: alertMessage.title,
|
|
@@ -962,8 +1289,8 @@ function StudioToolbar() {
|
|
|
962
1289
|
onClose: () => setAlertMessage(null)
|
|
963
1290
|
}
|
|
964
1291
|
),
|
|
965
|
-
/* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ jsxs3("div", { css: styles3.toolbar, children: [
|
|
1293
|
+
/* @__PURE__ */ jsx3(
|
|
967
1294
|
"input",
|
|
968
1295
|
{
|
|
969
1296
|
ref: fileInputRef,
|
|
@@ -974,63 +1301,89 @@ function StudioToolbar() {
|
|
|
974
1301
|
style: { display: "none" }
|
|
975
1302
|
}
|
|
976
1303
|
),
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ jsxs3("div", { css: styles3.left, children: [
|
|
1305
|
+
/* @__PURE__ */ jsxs3(
|
|
979
1306
|
"button",
|
|
980
1307
|
{
|
|
981
|
-
css: [
|
|
1308
|
+
css: [styles3.btn, styles3.btnPrimary],
|
|
982
1309
|
onClick: handleUpload,
|
|
983
1310
|
disabled: uploading || isInImagesFolder,
|
|
984
1311
|
children: [
|
|
985
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ jsx3(UploadIcon, {}),
|
|
986
1313
|
uploading ? "Uploading..." : "Upload"
|
|
987
1314
|
]
|
|
988
1315
|
}
|
|
989
1316
|
),
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
|
|
1317
|
+
/* @__PURE__ */ jsxs3(
|
|
1318
|
+
"button",
|
|
1319
|
+
{
|
|
1320
|
+
css: styles3.btn,
|
|
1321
|
+
onClick: () => setShowNewFolderModal(true),
|
|
1322
|
+
disabled: isInImagesFolder,
|
|
1323
|
+
title: isInImagesFolder ? "Cannot create folders in protected images folder" : void 0,
|
|
1324
|
+
children: [
|
|
1325
|
+
/* @__PURE__ */ jsx3(FolderPlusIcon, {}),
|
|
1326
|
+
"New Folder"
|
|
1327
|
+
]
|
|
1328
|
+
}
|
|
1329
|
+
),
|
|
1330
|
+
/* @__PURE__ */ jsx3("div", { css: styles3.divider }),
|
|
1331
|
+
/* @__PURE__ */ jsxs3(
|
|
992
1332
|
"button",
|
|
993
1333
|
{
|
|
994
|
-
css:
|
|
1334
|
+
css: styles3.btn,
|
|
995
1335
|
onClick: handleProcessImages,
|
|
996
1336
|
disabled: processing || isInImagesFolder || hasImagesSelected,
|
|
997
1337
|
title: isInImagesFolder || hasImagesSelected ? "Cannot process protected images folder" : void 0,
|
|
998
1338
|
children: [
|
|
999
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx3(ImageStackIcon, {}),
|
|
1000
1340
|
processing ? "Processing..." : "Process Images"
|
|
1001
1341
|
]
|
|
1002
1342
|
}
|
|
1003
1343
|
),
|
|
1004
|
-
/* @__PURE__ */
|
|
1344
|
+
/* @__PURE__ */ jsxs3(
|
|
1005
1345
|
"button",
|
|
1006
1346
|
{
|
|
1007
|
-
css: [
|
|
1347
|
+
css: [styles3.btn, styles3.btnDanger],
|
|
1008
1348
|
onClick: handleDeleteClick,
|
|
1009
1349
|
disabled: !hasSelection || hasImagesSelected,
|
|
1010
1350
|
title: hasImagesSelected ? "Cannot delete protected images folder items" : void 0,
|
|
1011
1351
|
children: [
|
|
1012
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ jsx3(TrashIcon, {}),
|
|
1013
1353
|
"Delete"
|
|
1014
1354
|
]
|
|
1015
1355
|
}
|
|
1016
1356
|
),
|
|
1017
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ jsxs3(
|
|
1018
1358
|
"button",
|
|
1019
1359
|
{
|
|
1020
|
-
css:
|
|
1360
|
+
css: styles3.btn,
|
|
1361
|
+
onClick: handleMoveClick,
|
|
1362
|
+
disabled: !hasSelection || hasImagesSelected,
|
|
1363
|
+
title: hasImagesSelected ? "Cannot move protected images folder items" : void 0,
|
|
1364
|
+
children: [
|
|
1365
|
+
/* @__PURE__ */ jsx3(MoveIcon, {}),
|
|
1366
|
+
"Move"
|
|
1367
|
+
]
|
|
1368
|
+
}
|
|
1369
|
+
),
|
|
1370
|
+
/* @__PURE__ */ jsxs3(
|
|
1371
|
+
"button",
|
|
1372
|
+
{
|
|
1373
|
+
css: styles3.btn,
|
|
1021
1374
|
onClick: handleSyncCdn,
|
|
1022
1375
|
disabled: !hasSelection,
|
|
1023
1376
|
children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ jsx3(CloudIcon, {}),
|
|
1025
1378
|
"Sync CDN"
|
|
1026
1379
|
]
|
|
1027
1380
|
}
|
|
1028
1381
|
),
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1382
|
+
/* @__PURE__ */ jsxs3("div", { css: styles3.searchWrapper, children: [
|
|
1383
|
+
/* @__PURE__ */ jsx3(
|
|
1031
1384
|
"input",
|
|
1032
1385
|
{
|
|
1033
|
-
css:
|
|
1386
|
+
css: styles3.searchInput,
|
|
1034
1387
|
type: "text",
|
|
1035
1388
|
placeholder: "Search images...",
|
|
1036
1389
|
value: searchQuery,
|
|
@@ -1038,48 +1391,48 @@ function StudioToolbar() {
|
|
|
1038
1391
|
onKeyDown: handleSearchKeyDown
|
|
1039
1392
|
}
|
|
1040
1393
|
),
|
|
1041
|
-
searchQuery && /* @__PURE__ */
|
|
1394
|
+
searchQuery && /* @__PURE__ */ jsx3(
|
|
1042
1395
|
"button",
|
|
1043
1396
|
{
|
|
1044
|
-
css:
|
|
1397
|
+
css: styles3.searchClearBtn,
|
|
1045
1398
|
onClick: () => setSearchQuery(""),
|
|
1046
1399
|
title: "Clear search",
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1400
|
+
children: /* @__PURE__ */ jsx3("svg", { width: "14", height: "14", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1048
1401
|
}
|
|
1049
1402
|
)
|
|
1050
1403
|
] })
|
|
1051
1404
|
] }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
hasSelection && /* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsxs3("div", { css: styles3.right, children: [
|
|
1406
|
+
hasSelection && /* @__PURE__ */ jsxs3("span", { css: styles3.selectionCount, children: [
|
|
1054
1407
|
selectedItems.size,
|
|
1055
1408
|
" selected",
|
|
1056
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ jsx3("button", { css: styles3.clearBtn, onClick: clearSelection, children: "Clear" })
|
|
1057
1410
|
] }),
|
|
1058
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ jsx3(
|
|
1059
1412
|
"button",
|
|
1060
1413
|
{
|
|
1061
|
-
css: [
|
|
1414
|
+
css: [styles3.btn, styles3.btnIconOnly],
|
|
1062
1415
|
onClick: handleRefresh,
|
|
1063
|
-
children: /* @__PURE__ */
|
|
1416
|
+
children: /* @__PURE__ */ jsx3(RefreshIcon, { spinning: refreshing })
|
|
1064
1417
|
}
|
|
1065
1418
|
),
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ jsxs3("div", { css: styles3.viewToggle, children: [
|
|
1420
|
+
/* @__PURE__ */ jsx3(
|
|
1068
1421
|
"button",
|
|
1069
1422
|
{
|
|
1070
|
-
css: [
|
|
1423
|
+
css: [styles3.viewBtn, viewMode === "grid" && styles3.viewBtnActive],
|
|
1071
1424
|
onClick: () => setViewMode("grid"),
|
|
1072
1425
|
"aria-label": "Grid view",
|
|
1073
|
-
children: /* @__PURE__ */
|
|
1426
|
+
children: /* @__PURE__ */ jsx3(GridIcon, {})
|
|
1074
1427
|
}
|
|
1075
1428
|
),
|
|
1076
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ jsx3(
|
|
1077
1430
|
"button",
|
|
1078
1431
|
{
|
|
1079
|
-
css: [
|
|
1432
|
+
css: [styles3.viewBtn, viewMode === "list" && styles3.viewBtnActive],
|
|
1080
1433
|
onClick: () => setViewMode("list"),
|
|
1081
1434
|
"aria-label": "List view",
|
|
1082
|
-
children: /* @__PURE__ */
|
|
1435
|
+
children: /* @__PURE__ */ jsx3(ListIcon, {})
|
|
1083
1436
|
}
|
|
1084
1437
|
)
|
|
1085
1438
|
] })
|
|
@@ -1088,42 +1441,48 @@ function StudioToolbar() {
|
|
|
1088
1441
|
] });
|
|
1089
1442
|
}
|
|
1090
1443
|
function UploadIcon() {
|
|
1091
|
-
return /* @__PURE__ */
|
|
1444
|
+
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: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) });
|
|
1092
1445
|
}
|
|
1093
1446
|
function RefreshIcon({ spinning }) {
|
|
1094
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ jsx3("svg", { css: [styles3.icon, spinning && styles3.iconSpin], fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) });
|
|
1095
1448
|
}
|
|
1096
1449
|
function TrashIcon() {
|
|
1097
|
-
return /* @__PURE__ */
|
|
1450
|
+
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: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) });
|
|
1451
|
+
}
|
|
1452
|
+
function FolderPlusIcon() {
|
|
1453
|
+
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" }) });
|
|
1454
|
+
}
|
|
1455
|
+
function MoveIcon() {
|
|
1456
|
+
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" }) });
|
|
1098
1457
|
}
|
|
1099
1458
|
function CloudIcon() {
|
|
1100
|
-
return /* @__PURE__ */
|
|
1459
|
+
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: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) });
|
|
1101
1460
|
}
|
|
1102
1461
|
function GridIcon() {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1462
|
+
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: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" }) });
|
|
1104
1463
|
}
|
|
1105
1464
|
function ListIcon() {
|
|
1106
|
-
return /* @__PURE__ */
|
|
1465
|
+
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: "M4 6h16M4 10h16M4 14h16M4 18h16" }) });
|
|
1107
1466
|
}
|
|
1108
1467
|
function ImageStackIcon() {
|
|
1109
|
-
return /* @__PURE__ */
|
|
1468
|
+
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: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) });
|
|
1110
1469
|
}
|
|
1111
1470
|
|
|
1112
1471
|
// src/components/StudioFileGrid.tsx
|
|
1113
|
-
import { useEffect, useState as
|
|
1114
|
-
import { css as
|
|
1115
|
-
import { jsx as
|
|
1116
|
-
var spin2 =
|
|
1472
|
+
import { useEffect as useEffect2, useState as useState3, useRef as useRef2 } from "react";
|
|
1473
|
+
import { css as css4, keyframes as keyframes4 } from "@emotion/react";
|
|
1474
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
|
|
1475
|
+
var spin2 = keyframes4`
|
|
1117
1476
|
to { transform: rotate(360deg); }
|
|
1118
1477
|
`;
|
|
1119
|
-
var
|
|
1120
|
-
loading:
|
|
1478
|
+
var styles4 = {
|
|
1479
|
+
loading: css4`
|
|
1121
1480
|
display: flex;
|
|
1122
1481
|
align-items: center;
|
|
1123
1482
|
justify-content: center;
|
|
1124
1483
|
height: 256px;
|
|
1125
1484
|
`,
|
|
1126
|
-
spinner:
|
|
1485
|
+
spinner: css4`
|
|
1127
1486
|
width: 32px;
|
|
1128
1487
|
height: 32px;
|
|
1129
1488
|
border-radius: 50%;
|
|
@@ -1131,7 +1490,7 @@ var styles3 = {
|
|
|
1131
1490
|
border-top-color: ${colors.primary};
|
|
1132
1491
|
animation: ${spin2} 0.8s linear infinite;
|
|
1133
1492
|
`,
|
|
1134
|
-
empty:
|
|
1493
|
+
empty: css4`
|
|
1135
1494
|
display: flex;
|
|
1136
1495
|
flex-direction: column;
|
|
1137
1496
|
align-items: center;
|
|
@@ -1139,13 +1498,13 @@ var styles3 = {
|
|
|
1139
1498
|
height: 256px;
|
|
1140
1499
|
color: ${colors.textSecondary};
|
|
1141
1500
|
`,
|
|
1142
|
-
emptyIcon:
|
|
1501
|
+
emptyIcon: css4`
|
|
1143
1502
|
width: 48px;
|
|
1144
1503
|
height: 48px;
|
|
1145
1504
|
margin-bottom: 16px;
|
|
1146
1505
|
opacity: 0.5;
|
|
1147
1506
|
`,
|
|
1148
|
-
emptyText:
|
|
1507
|
+
emptyText: css4`
|
|
1149
1508
|
font-size: ${fontSize.base};
|
|
1150
1509
|
margin: 0 0 4px 0;
|
|
1151
1510
|
|
|
@@ -1154,7 +1513,7 @@ var styles3 = {
|
|
|
1154
1513
|
font-size: ${fontSize.sm};
|
|
1155
1514
|
}
|
|
1156
1515
|
`,
|
|
1157
|
-
grid:
|
|
1516
|
+
grid: css4`
|
|
1158
1517
|
display: grid;
|
|
1159
1518
|
grid-template-columns: 1fr;
|
|
1160
1519
|
gap: 12px;
|
|
@@ -1164,7 +1523,7 @@ var styles3 = {
|
|
|
1164
1523
|
@media (min-width: 1024px) { grid-template-columns: repeat(4, 1fr); }
|
|
1165
1524
|
@media (min-width: 1280px) { grid-template-columns: repeat(5, 1fr); }
|
|
1166
1525
|
`,
|
|
1167
|
-
item:
|
|
1526
|
+
item: css4`
|
|
1168
1527
|
position: relative;
|
|
1169
1528
|
border-radius: 8px;
|
|
1170
1529
|
border: 1px solid ${colors.border};
|
|
@@ -1180,7 +1539,7 @@ var styles3 = {
|
|
|
1180
1539
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
|
|
1181
1540
|
}
|
|
1182
1541
|
`,
|
|
1183
|
-
itemSelected:
|
|
1542
|
+
itemSelected: css4`
|
|
1184
1543
|
border-color: ${colors.primary};
|
|
1185
1544
|
box-shadow: 0 0 0 1px ${colors.primary};
|
|
1186
1545
|
|
|
@@ -1189,14 +1548,14 @@ var styles3 = {
|
|
|
1189
1548
|
box-shadow: 0 0 0 1px ${colors.primary};
|
|
1190
1549
|
}
|
|
1191
1550
|
`,
|
|
1192
|
-
parentItem:
|
|
1551
|
+
parentItem: css4`
|
|
1193
1552
|
cursor: pointer;
|
|
1194
1553
|
|
|
1195
1554
|
&:hover {
|
|
1196
1555
|
border-color: ${colors.primary};
|
|
1197
1556
|
}
|
|
1198
1557
|
`,
|
|
1199
|
-
checkboxWrapper:
|
|
1558
|
+
checkboxWrapper: css4`
|
|
1200
1559
|
position: absolute;
|
|
1201
1560
|
top: 0;
|
|
1202
1561
|
left: 0;
|
|
@@ -1204,13 +1563,13 @@ var styles3 = {
|
|
|
1204
1563
|
padding: 8px;
|
|
1205
1564
|
cursor: pointer;
|
|
1206
1565
|
`,
|
|
1207
|
-
checkbox:
|
|
1566
|
+
checkbox: css4`
|
|
1208
1567
|
width: 18px;
|
|
1209
1568
|
height: 18px;
|
|
1210
1569
|
accent-color: ${colors.primary};
|
|
1211
1570
|
cursor: pointer;
|
|
1212
1571
|
`,
|
|
1213
|
-
cdnBadge:
|
|
1572
|
+
cdnBadge: css4`
|
|
1214
1573
|
position: absolute;
|
|
1215
1574
|
top: 8px;
|
|
1216
1575
|
right: 8px;
|
|
@@ -1222,7 +1581,7 @@ var styles3 = {
|
|
|
1222
1581
|
padding: 2px 8px;
|
|
1223
1582
|
border-radius: 4px;
|
|
1224
1583
|
`,
|
|
1225
|
-
content:
|
|
1584
|
+
content: css4`
|
|
1226
1585
|
position: relative;
|
|
1227
1586
|
aspect-ratio: 1;
|
|
1228
1587
|
display: flex;
|
|
@@ -1231,20 +1590,20 @@ var styles3 = {
|
|
|
1231
1590
|
padding: 16px;
|
|
1232
1591
|
background: ${colors.background};
|
|
1233
1592
|
`,
|
|
1234
|
-
folderIcon:
|
|
1593
|
+
folderIcon: css4`
|
|
1235
1594
|
width: 56px;
|
|
1236
1595
|
height: 56px;
|
|
1237
1596
|
color: #f9935e;
|
|
1238
1597
|
`,
|
|
1239
|
-
imagesFolderIcon:
|
|
1598
|
+
imagesFolderIcon: css4`
|
|
1240
1599
|
width: 56px;
|
|
1241
1600
|
height: 56px;
|
|
1242
1601
|
color: ${colors.imagesFolder};
|
|
1243
1602
|
`,
|
|
1244
|
-
imagesFolderWrapper:
|
|
1603
|
+
imagesFolderWrapper: css4`
|
|
1245
1604
|
position: relative;
|
|
1246
1605
|
`,
|
|
1247
|
-
lockIcon:
|
|
1606
|
+
lockIcon: css4`
|
|
1248
1607
|
position: absolute;
|
|
1249
1608
|
bottom: 4px;
|
|
1250
1609
|
right: 4px;
|
|
@@ -1255,23 +1614,23 @@ var styles3 = {
|
|
|
1255
1614
|
border-radius: 50%;
|
|
1256
1615
|
padding: 2px;
|
|
1257
1616
|
`,
|
|
1258
|
-
parentIcon:
|
|
1617
|
+
parentIcon: css4`
|
|
1259
1618
|
width: 56px;
|
|
1260
1619
|
height: 56px;
|
|
1261
1620
|
color: ${colors.textMuted};
|
|
1262
1621
|
`,
|
|
1263
|
-
fileIcon:
|
|
1622
|
+
fileIcon: css4`
|
|
1264
1623
|
width: 40px;
|
|
1265
1624
|
height: 40px;
|
|
1266
1625
|
color: ${colors.textMuted};
|
|
1267
1626
|
`,
|
|
1268
|
-
image:
|
|
1627
|
+
image: css4`
|
|
1269
1628
|
max-width: 100%;
|
|
1270
1629
|
max-height: 100%;
|
|
1271
1630
|
object-fit: contain;
|
|
1272
1631
|
border-radius: 4px;
|
|
1273
1632
|
`,
|
|
1274
|
-
noThumbnail:
|
|
1633
|
+
noThumbnail: css4`
|
|
1275
1634
|
display: flex;
|
|
1276
1635
|
flex-direction: column;
|
|
1277
1636
|
align-items: center;
|
|
@@ -1291,31 +1650,31 @@ var styles3 = {
|
|
|
1291
1650
|
background: ${colors.surfaceHover};
|
|
1292
1651
|
}
|
|
1293
1652
|
`,
|
|
1294
|
-
noThumbnailIcon:
|
|
1653
|
+
noThumbnailIcon: css4`
|
|
1295
1654
|
width: 32px;
|
|
1296
1655
|
height: 32px;
|
|
1297
1656
|
color: ${colors.textMuted};
|
|
1298
1657
|
`,
|
|
1299
|
-
noThumbnailText:
|
|
1658
|
+
noThumbnailText: css4`
|
|
1300
1659
|
font-size: ${fontSize.xs};
|
|
1301
1660
|
color: ${colors.textMuted};
|
|
1302
1661
|
text-align: center;
|
|
1303
1662
|
`,
|
|
1304
|
-
label:
|
|
1663
|
+
label: css4`
|
|
1305
1664
|
padding: 10px 12px;
|
|
1306
1665
|
background-color: ${colors.surface};
|
|
1307
1666
|
border-top: 1px solid ${colors.borderLight};
|
|
1308
1667
|
`,
|
|
1309
|
-
labelRow:
|
|
1668
|
+
labelRow: css4`
|
|
1310
1669
|
display: flex;
|
|
1311
1670
|
flex-direction: column;
|
|
1312
1671
|
gap: 2px;
|
|
1313
1672
|
`,
|
|
1314
|
-
labelText:
|
|
1673
|
+
labelText: css4`
|
|
1315
1674
|
flex: 1;
|
|
1316
1675
|
min-width: 0;
|
|
1317
1676
|
`,
|
|
1318
|
-
copyBtn:
|
|
1677
|
+
copyBtn: css4`
|
|
1319
1678
|
position: absolute;
|
|
1320
1679
|
top: 4px;
|
|
1321
1680
|
right: 4px;
|
|
@@ -1337,11 +1696,11 @@ var styles3 = {
|
|
|
1337
1696
|
color: ${colors.text};
|
|
1338
1697
|
}
|
|
1339
1698
|
`,
|
|
1340
|
-
copyIcon:
|
|
1699
|
+
copyIcon: css4`
|
|
1341
1700
|
width: 18px;
|
|
1342
1701
|
height: 18px;
|
|
1343
1702
|
`,
|
|
1344
|
-
tooltip:
|
|
1703
|
+
tooltip: css4`
|
|
1345
1704
|
position: absolute;
|
|
1346
1705
|
top: 50%;
|
|
1347
1706
|
right: 100%;
|
|
@@ -1366,7 +1725,7 @@ var styles3 = {
|
|
|
1366
1725
|
border-left-color: #1a1f36;
|
|
1367
1726
|
}
|
|
1368
1727
|
`,
|
|
1369
|
-
openBtn:
|
|
1728
|
+
openBtn: css4`
|
|
1370
1729
|
position: absolute;
|
|
1371
1730
|
bottom: 8px;
|
|
1372
1731
|
right: 8px;
|
|
@@ -1390,7 +1749,7 @@ var styles3 = {
|
|
|
1390
1749
|
border-color: ${colors.primary};
|
|
1391
1750
|
}
|
|
1392
1751
|
`,
|
|
1393
|
-
name:
|
|
1752
|
+
name: css4`
|
|
1394
1753
|
font-size: ${fontSize.sm};
|
|
1395
1754
|
font-weight: 500;
|
|
1396
1755
|
color: ${colors.text};
|
|
@@ -1400,12 +1759,12 @@ var styles3 = {
|
|
|
1400
1759
|
margin: 0;
|
|
1401
1760
|
letter-spacing: -0.01em;
|
|
1402
1761
|
`,
|
|
1403
|
-
size:
|
|
1762
|
+
size: css4`
|
|
1404
1763
|
font-size: ${fontSize.xs};
|
|
1405
1764
|
color: ${colors.textMuted};
|
|
1406
1765
|
margin: 2px 0 0 0;
|
|
1407
1766
|
`,
|
|
1408
|
-
selectAllRow:
|
|
1767
|
+
selectAllRow: css4`
|
|
1409
1768
|
display: flex;
|
|
1410
1769
|
align-items: center;
|
|
1411
1770
|
margin-bottom: 16px;
|
|
@@ -1414,7 +1773,7 @@ var styles3 = {
|
|
|
1414
1773
|
border-radius: 8px;
|
|
1415
1774
|
border: 1px solid ${colors.border};
|
|
1416
1775
|
`,
|
|
1417
|
-
selectAllLabel:
|
|
1776
|
+
selectAllLabel: css4`
|
|
1418
1777
|
display: flex;
|
|
1419
1778
|
align-items: center;
|
|
1420
1779
|
gap: 10px;
|
|
@@ -1427,7 +1786,7 @@ var styles3 = {
|
|
|
1427
1786
|
color: ${colors.text};
|
|
1428
1787
|
}
|
|
1429
1788
|
`,
|
|
1430
|
-
selectAllCheckbox:
|
|
1789
|
+
selectAllCheckbox: css4`
|
|
1431
1790
|
width: 16px;
|
|
1432
1791
|
height: 16px;
|
|
1433
1792
|
accent-color: ${colors.primary};
|
|
@@ -1435,11 +1794,11 @@ var styles3 = {
|
|
|
1435
1794
|
};
|
|
1436
1795
|
function StudioFileGrid() {
|
|
1437
1796
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
1438
|
-
const [items, setItems] =
|
|
1439
|
-
const [loading, setLoading] =
|
|
1797
|
+
const [items, setItems] = useState3([]);
|
|
1798
|
+
const [loading, setLoading] = useState3(true);
|
|
1440
1799
|
const isInitialLoad = useRef2(true);
|
|
1441
1800
|
const lastPath = useRef2(currentPath);
|
|
1442
|
-
|
|
1801
|
+
useEffect2(() => {
|
|
1443
1802
|
async function loadItems() {
|
|
1444
1803
|
const isPathChange = lastPath.current !== currentPath;
|
|
1445
1804
|
if (isInitialLoad.current || isPathChange) {
|
|
@@ -1462,14 +1821,14 @@ function StudioFileGrid() {
|
|
|
1462
1821
|
loadItems();
|
|
1463
1822
|
}, [currentPath, refreshKey, searchQuery]);
|
|
1464
1823
|
if (loading) {
|
|
1465
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ jsx4("div", { css: styles4.loading, children: /* @__PURE__ */ jsx4("div", { css: styles4.spinner }) });
|
|
1466
1825
|
}
|
|
1467
1826
|
const isAtRoot = currentPath === "public";
|
|
1468
1827
|
if (items.length === 0 && isAtRoot) {
|
|
1469
|
-
return /* @__PURE__ */
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ jsxs4("div", { css: styles4.empty, children: [
|
|
1829
|
+
/* @__PURE__ */ jsx4("svg", { css: styles4.emptyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
|
|
1830
|
+
/* @__PURE__ */ jsx4("p", { css: styles4.emptyText, children: "No files in this folder" }),
|
|
1831
|
+
/* @__PURE__ */ jsx4("p", { css: styles4.emptyText, children: "Upload images to get started" })
|
|
1473
1832
|
] });
|
|
1474
1833
|
}
|
|
1475
1834
|
const isSearching = searchQuery && searchQuery.length >= 2;
|
|
@@ -1514,13 +1873,13 @@ function StudioFileGrid() {
|
|
|
1514
1873
|
selectAll(sortedItems);
|
|
1515
1874
|
}
|
|
1516
1875
|
};
|
|
1517
|
-
return /* @__PURE__ */
|
|
1518
|
-
sortedItems.length > 0 && /* @__PURE__ */
|
|
1519
|
-
/* @__PURE__ */
|
|
1876
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
1877
|
+
sortedItems.length > 0 && /* @__PURE__ */ jsx4("div", { css: styles4.selectAllRow, children: /* @__PURE__ */ jsxs4("label", { css: styles4.selectAllLabel, children: [
|
|
1878
|
+
/* @__PURE__ */ jsx4(
|
|
1520
1879
|
"input",
|
|
1521
1880
|
{
|
|
1522
1881
|
type: "checkbox",
|
|
1523
|
-
css:
|
|
1882
|
+
css: styles4.selectAllCheckbox,
|
|
1524
1883
|
checked: allItemsSelected,
|
|
1525
1884
|
ref: (el) => {
|
|
1526
1885
|
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
@@ -1532,22 +1891,22 @@ function StudioFileGrid() {
|
|
|
1532
1891
|
sortedItems.length,
|
|
1533
1892
|
")"
|
|
1534
1893
|
] }) }),
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
!isAtRoot && !isSearching && /* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ jsxs4("div", { css: styles4.grid, children: [
|
|
1895
|
+
!isAtRoot && !isSearching && /* @__PURE__ */ jsxs4(
|
|
1537
1896
|
"div",
|
|
1538
1897
|
{
|
|
1539
|
-
css: [
|
|
1898
|
+
css: [styles4.item, styles4.parentItem],
|
|
1540
1899
|
onClick: navigateUp,
|
|
1541
1900
|
children: [
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ jsx4("div", { css: styles4.content, children: /* @__PURE__ */ jsx4("svg", { css: styles4.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }) }),
|
|
1902
|
+
/* @__PURE__ */ jsxs4("div", { css: styles4.label, children: [
|
|
1903
|
+
/* @__PURE__ */ jsx4("p", { css: styles4.name, children: ".." }),
|
|
1904
|
+
/* @__PURE__ */ jsx4("p", { css: styles4.size, children: "Parent folder" })
|
|
1546
1905
|
] })
|
|
1547
1906
|
]
|
|
1548
1907
|
}
|
|
1549
1908
|
),
|
|
1550
|
-
sortedItems.map((item) => /* @__PURE__ */
|
|
1909
|
+
sortedItems.map((item) => /* @__PURE__ */ jsx4(
|
|
1551
1910
|
GridItem,
|
|
1552
1911
|
{
|
|
1553
1912
|
item,
|
|
@@ -1562,7 +1921,7 @@ function StudioFileGrid() {
|
|
|
1562
1921
|
] });
|
|
1563
1922
|
}
|
|
1564
1923
|
function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
1565
|
-
const [showCopied, setShowCopied] =
|
|
1924
|
+
const [showCopied, setShowCopied] = useState3(false);
|
|
1566
1925
|
const isFolder = item.type === "folder";
|
|
1567
1926
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
1568
1927
|
const isImagesFolder = isFolder && (item.name === "images" || item.path.includes("/images/"));
|
|
@@ -1573,46 +1932,46 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
1573
1932
|
setShowCopied(true);
|
|
1574
1933
|
setTimeout(() => setShowCopied(false), 1500);
|
|
1575
1934
|
};
|
|
1576
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsxs4(
|
|
1577
1936
|
"div",
|
|
1578
1937
|
{
|
|
1579
|
-
css: [
|
|
1938
|
+
css: [styles4.item, isSelected && styles4.itemSelected],
|
|
1580
1939
|
onClick,
|
|
1581
1940
|
children: [
|
|
1582
|
-
/* @__PURE__ */
|
|
1941
|
+
/* @__PURE__ */ jsx4(
|
|
1583
1942
|
"div",
|
|
1584
1943
|
{
|
|
1585
|
-
css:
|
|
1944
|
+
css: styles4.checkboxWrapper,
|
|
1586
1945
|
onClick: (e) => e.stopPropagation(),
|
|
1587
|
-
children: /* @__PURE__ */
|
|
1946
|
+
children: /* @__PURE__ */ jsx4(
|
|
1588
1947
|
"input",
|
|
1589
1948
|
{
|
|
1590
1949
|
type: "checkbox",
|
|
1591
|
-
css:
|
|
1950
|
+
css: styles4.checkbox,
|
|
1592
1951
|
checked: isSelected,
|
|
1593
1952
|
onChange: () => onClick({})
|
|
1594
1953
|
}
|
|
1595
1954
|
)
|
|
1596
1955
|
}
|
|
1597
1956
|
),
|
|
1598
|
-
item.cdnSynced && /* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1957
|
+
item.cdnSynced && /* @__PURE__ */ jsx4("span", { css: styles4.cdnBadge, children: "CDN" }),
|
|
1958
|
+
/* @__PURE__ */ jsxs4("div", { css: styles4.content, children: [
|
|
1959
|
+
/* @__PURE__ */ jsxs4(
|
|
1601
1960
|
"button",
|
|
1602
1961
|
{
|
|
1603
|
-
css:
|
|
1962
|
+
css: styles4.copyBtn,
|
|
1604
1963
|
onClick: handleCopyPath,
|
|
1605
1964
|
title: "Copy file path",
|
|
1606
1965
|
children: [
|
|
1607
|
-
showCopied && /* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1966
|
+
showCopied && /* @__PURE__ */ jsx4("span", { css: styles4.tooltip, children: "Copied!" }),
|
|
1967
|
+
/* @__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" }) })
|
|
1609
1968
|
]
|
|
1610
1969
|
}
|
|
1611
1970
|
),
|
|
1612
|
-
/* @__PURE__ */
|
|
1971
|
+
/* @__PURE__ */ jsx4(
|
|
1613
1972
|
"button",
|
|
1614
1973
|
{
|
|
1615
|
-
css:
|
|
1974
|
+
css: styles4.openBtn,
|
|
1616
1975
|
onClick: (e) => {
|
|
1617
1976
|
e.stopPropagation();
|
|
1618
1977
|
onOpen();
|
|
@@ -1620,40 +1979,40 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
1620
1979
|
children: "Open"
|
|
1621
1980
|
}
|
|
1622
1981
|
),
|
|
1623
|
-
isFolder ? isImagesFolder ? /* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
-
] }) : /* @__PURE__ */
|
|
1982
|
+
isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs4("div", { css: styles4.imagesFolderWrapper, children: [
|
|
1983
|
+
/* @__PURE__ */ jsx4("svg", { css: styles4.imagesFolderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }),
|
|
1984
|
+
/* @__PURE__ */ jsx4("svg", { css: styles4.lockIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx4("path", { fillRule: "evenodd", d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z", clipRule: "evenodd" }) })
|
|
1985
|
+
] }) : /* @__PURE__ */ jsx4("svg", { css: styles4.folderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }) : isImage && item.hasThumbnail ? /* @__PURE__ */ jsx4(
|
|
1627
1986
|
"img",
|
|
1628
1987
|
{
|
|
1629
|
-
css:
|
|
1988
|
+
css: styles4.image,
|
|
1630
1989
|
src: item.thumbnail,
|
|
1631
1990
|
alt: item.name,
|
|
1632
1991
|
loading: "lazy"
|
|
1633
1992
|
}
|
|
1634
|
-
) : isImage && !item.hasThumbnail ? /* @__PURE__ */
|
|
1993
|
+
) : isImage && !item.hasThumbnail ? /* @__PURE__ */ jsxs4(
|
|
1635
1994
|
"button",
|
|
1636
1995
|
{
|
|
1637
|
-
css:
|
|
1996
|
+
css: styles4.noThumbnail,
|
|
1638
1997
|
onClick: (e) => {
|
|
1639
1998
|
e.stopPropagation();
|
|
1640
1999
|
onGenerateThumbnail();
|
|
1641
2000
|
},
|
|
1642
2001
|
title: "Generate thumbnail",
|
|
1643
2002
|
children: [
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
/* @__PURE__ */
|
|
2003
|
+
/* @__PURE__ */ jsx4("svg", { css: styles4.noThumbnailIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
|
|
2004
|
+
/* @__PURE__ */ jsx4("span", { css: styles4.noThumbnailText, children: "Generate" })
|
|
1646
2005
|
]
|
|
1647
2006
|
}
|
|
1648
|
-
) : /* @__PURE__ */
|
|
2007
|
+
) : /* @__PURE__ */ jsx4("svg", { css: styles4.fileIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) })
|
|
1649
2008
|
] }),
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
isFolder ? /* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ jsx4("div", { css: styles4.label, children: /* @__PURE__ */ jsx4("div", { css: styles4.labelRow, children: /* @__PURE__ */ jsxs4("div", { css: styles4.labelText, children: [
|
|
2010
|
+
/* @__PURE__ */ jsx4("p", { css: styles4.name, title: item.name, children: truncateMiddle(item.name) }),
|
|
2011
|
+
isFolder ? /* @__PURE__ */ jsxs4("p", { css: styles4.size, children: [
|
|
1653
2012
|
item.fileCount !== void 0 ? `${item.fileCount} files` : "",
|
|
1654
2013
|
item.fileCount !== void 0 && item.totalSize !== void 0 ? " \xB7 " : "",
|
|
1655
2014
|
item.totalSize !== void 0 ? formatFileSize(item.totalSize) : ""
|
|
1656
|
-
] }) : item.size !== void 0 && /* @__PURE__ */
|
|
2015
|
+
] }) : item.size !== void 0 && /* @__PURE__ */ jsx4("p", { css: styles4.size, children: formatFileSize(item.size) })
|
|
1657
2016
|
] }) }) })
|
|
1658
2017
|
]
|
|
1659
2018
|
}
|
|
@@ -1679,20 +2038,20 @@ function truncateMiddle(str, maxLength = 24) {
|
|
|
1679
2038
|
}
|
|
1680
2039
|
|
|
1681
2040
|
// src/components/StudioFileList.tsx
|
|
1682
|
-
import { useEffect as
|
|
1683
|
-
import { css as
|
|
1684
|
-
import { jsx as
|
|
1685
|
-
var spin3 =
|
|
2041
|
+
import { useEffect as useEffect3, useState as useState4, useRef as useRef3 } from "react";
|
|
2042
|
+
import { css as css5, keyframes as keyframes5 } from "@emotion/react";
|
|
2043
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "@emotion/react/jsx-runtime";
|
|
2044
|
+
var spin3 = keyframes5`
|
|
1686
2045
|
to { transform: rotate(360deg); }
|
|
1687
2046
|
`;
|
|
1688
|
-
var
|
|
1689
|
-
loading:
|
|
2047
|
+
var styles5 = {
|
|
2048
|
+
loading: css5`
|
|
1690
2049
|
display: flex;
|
|
1691
2050
|
align-items: center;
|
|
1692
2051
|
justify-content: center;
|
|
1693
2052
|
height: 256px;
|
|
1694
2053
|
`,
|
|
1695
|
-
spinner:
|
|
2054
|
+
spinner: css5`
|
|
1696
2055
|
width: 32px;
|
|
1697
2056
|
height: 32px;
|
|
1698
2057
|
border-radius: 50%;
|
|
@@ -1700,7 +2059,7 @@ var styles4 = {
|
|
|
1700
2059
|
border-top-color: ${colors.primary};
|
|
1701
2060
|
animation: ${spin3} 0.8s linear infinite;
|
|
1702
2061
|
`,
|
|
1703
|
-
empty:
|
|
2062
|
+
empty: css5`
|
|
1704
2063
|
display: flex;
|
|
1705
2064
|
flex-direction: column;
|
|
1706
2065
|
align-items: center;
|
|
@@ -1708,19 +2067,19 @@ var styles4 = {
|
|
|
1708
2067
|
height: 256px;
|
|
1709
2068
|
color: ${colors.textSecondary};
|
|
1710
2069
|
`,
|
|
1711
|
-
tableWrapper:
|
|
2070
|
+
tableWrapper: css5`
|
|
1712
2071
|
background: ${colors.surface};
|
|
1713
2072
|
border-radius: 8px;
|
|
1714
2073
|
border: 1px solid ${colors.border};
|
|
1715
2074
|
overflow-x: auto;
|
|
1716
2075
|
`,
|
|
1717
|
-
table:
|
|
2076
|
+
table: css5`
|
|
1718
2077
|
width: 100%;
|
|
1719
2078
|
min-width: 600px;
|
|
1720
2079
|
border-collapse: collapse;
|
|
1721
2080
|
white-space: nowrap;
|
|
1722
2081
|
`,
|
|
1723
|
-
th:
|
|
2082
|
+
th: css5`
|
|
1724
2083
|
text-align: left;
|
|
1725
2084
|
font-size: 11px;
|
|
1726
2085
|
color: ${colors.textMuted};
|
|
@@ -1731,20 +2090,20 @@ var styles4 = {
|
|
|
1731
2090
|
background: ${colors.background};
|
|
1732
2091
|
border-bottom: 1px solid ${colors.border};
|
|
1733
2092
|
`,
|
|
1734
|
-
thCheckbox:
|
|
2093
|
+
thCheckbox: css5`
|
|
1735
2094
|
width: 48px;
|
|
1736
2095
|
`,
|
|
1737
|
-
thSize:
|
|
2096
|
+
thSize: css5`
|
|
1738
2097
|
width: 96px;
|
|
1739
2098
|
`,
|
|
1740
|
-
thDimensions:
|
|
2099
|
+
thDimensions: css5`
|
|
1741
2100
|
width: 128px;
|
|
1742
2101
|
`,
|
|
1743
|
-
thCdn:
|
|
2102
|
+
thCdn: css5`
|
|
1744
2103
|
width: 96px;
|
|
1745
2104
|
`,
|
|
1746
|
-
tbody:
|
|
1747
|
-
row:
|
|
2105
|
+
tbody: css5``,
|
|
2106
|
+
row: css5`
|
|
1748
2107
|
cursor: pointer;
|
|
1749
2108
|
transition: background-color 0.15s ease;
|
|
1750
2109
|
user-select: none;
|
|
@@ -1757,14 +2116,14 @@ var styles4 = {
|
|
|
1757
2116
|
border-bottom: 1px solid ${colors.borderLight};
|
|
1758
2117
|
}
|
|
1759
2118
|
`,
|
|
1760
|
-
rowSelected:
|
|
2119
|
+
rowSelected: css5`
|
|
1761
2120
|
background-color: ${colors.primaryLight};
|
|
1762
2121
|
|
|
1763
2122
|
&:hover {
|
|
1764
2123
|
background-color: ${colors.primaryLight};
|
|
1765
2124
|
}
|
|
1766
2125
|
`,
|
|
1767
|
-
parentRow:
|
|
2126
|
+
parentRow: css5`
|
|
1768
2127
|
cursor: pointer;
|
|
1769
2128
|
border-bottom: 1px solid ${colors.border};
|
|
1770
2129
|
|
|
@@ -1772,22 +2131,22 @@ var styles4 = {
|
|
|
1772
2131
|
background-color: ${colors.surfaceHover};
|
|
1773
2132
|
}
|
|
1774
2133
|
`,
|
|
1775
|
-
td:
|
|
2134
|
+
td: css5`
|
|
1776
2135
|
padding: 12px 16px;
|
|
1777
2136
|
`,
|
|
1778
|
-
checkboxCell:
|
|
2137
|
+
checkboxCell: css5`
|
|
1779
2138
|
padding: 12px 16px;
|
|
1780
2139
|
cursor: pointer;
|
|
1781
2140
|
vertical-align: middle;
|
|
1782
2141
|
`,
|
|
1783
|
-
checkbox:
|
|
2142
|
+
checkbox: css5`
|
|
1784
2143
|
width: 18px;
|
|
1785
2144
|
height: 18px;
|
|
1786
2145
|
accent-color: ${colors.primary};
|
|
1787
2146
|
cursor: pointer;
|
|
1788
2147
|
display: block;
|
|
1789
2148
|
`,
|
|
1790
|
-
actionsCell:
|
|
2149
|
+
actionsCell: css5`
|
|
1791
2150
|
display: flex;
|
|
1792
2151
|
align-items: center;
|
|
1793
2152
|
justify-content: flex-end;
|
|
@@ -1795,7 +2154,7 @@ var styles4 = {
|
|
|
1795
2154
|
margin-left: auto;
|
|
1796
2155
|
flex-shrink: 0;
|
|
1797
2156
|
`,
|
|
1798
|
-
copyBtn:
|
|
2157
|
+
copyBtn: css5`
|
|
1799
2158
|
position: relative;
|
|
1800
2159
|
flex-shrink: 0;
|
|
1801
2160
|
height: 32px;
|
|
@@ -1818,11 +2177,11 @@ var styles4 = {
|
|
|
1818
2177
|
color: ${colors.text};
|
|
1819
2178
|
}
|
|
1820
2179
|
`,
|
|
1821
|
-
copyIcon:
|
|
2180
|
+
copyIcon: css5`
|
|
1822
2181
|
width: 16px;
|
|
1823
2182
|
height: 16px;
|
|
1824
2183
|
`,
|
|
1825
|
-
tooltip:
|
|
2184
|
+
tooltip: css5`
|
|
1826
2185
|
position: absolute;
|
|
1827
2186
|
top: 50%;
|
|
1828
2187
|
right: 100%;
|
|
@@ -1847,13 +2206,13 @@ var styles4 = {
|
|
|
1847
2206
|
border-left-color: #1a1f36;
|
|
1848
2207
|
}
|
|
1849
2208
|
`,
|
|
1850
|
-
nameCell:
|
|
2209
|
+
nameCell: css5`
|
|
1851
2210
|
display: flex;
|
|
1852
2211
|
align-items: center;
|
|
1853
2212
|
gap: 12px;
|
|
1854
2213
|
flex: 1;
|
|
1855
2214
|
`,
|
|
1856
|
-
thumbnailWrapper:
|
|
2215
|
+
thumbnailWrapper: css5`
|
|
1857
2216
|
width: 48px;
|
|
1858
2217
|
height: 36px;
|
|
1859
2218
|
display: flex;
|
|
@@ -1861,7 +2220,7 @@ var styles4 = {
|
|
|
1861
2220
|
justify-content: center;
|
|
1862
2221
|
flex-shrink: 0;
|
|
1863
2222
|
`,
|
|
1864
|
-
folderIconWrapper:
|
|
2223
|
+
folderIconWrapper: css5`
|
|
1865
2224
|
width: 48px;
|
|
1866
2225
|
height: 36px;
|
|
1867
2226
|
display: flex;
|
|
@@ -1869,12 +2228,12 @@ var styles4 = {
|
|
|
1869
2228
|
justify-content: center;
|
|
1870
2229
|
flex-shrink: 0;
|
|
1871
2230
|
`,
|
|
1872
|
-
folderIcon:
|
|
2231
|
+
folderIcon: css5`
|
|
1873
2232
|
width: 24px;
|
|
1874
2233
|
height: 24px;
|
|
1875
2234
|
color: #f9935e;
|
|
1876
2235
|
`,
|
|
1877
|
-
imagesFolderWrapper:
|
|
2236
|
+
imagesFolderWrapper: css5`
|
|
1878
2237
|
width: 48px;
|
|
1879
2238
|
height: 36px;
|
|
1880
2239
|
display: flex;
|
|
@@ -1884,31 +2243,31 @@ var styles4 = {
|
|
|
1884
2243
|
position: relative;
|
|
1885
2244
|
align-items: center;
|
|
1886
2245
|
`,
|
|
1887
|
-
imagesFolderIcon:
|
|
2246
|
+
imagesFolderIcon: css5`
|
|
1888
2247
|
width: 24px;
|
|
1889
2248
|
height: 24px;
|
|
1890
2249
|
color: ${colors.imagesFolder};
|
|
1891
2250
|
`,
|
|
1892
|
-
lockIcon:
|
|
2251
|
+
lockIcon: css5`
|
|
1893
2252
|
width: 10px;
|
|
1894
2253
|
height: 10px;
|
|
1895
2254
|
color: ${colors.imagesFolder};
|
|
1896
2255
|
margin-left: -6px;
|
|
1897
2256
|
margin-top: 8px;
|
|
1898
2257
|
`,
|
|
1899
|
-
parentIcon:
|
|
2258
|
+
parentIcon: css5`
|
|
1900
2259
|
width: 20px;
|
|
1901
2260
|
height: 20px;
|
|
1902
2261
|
color: ${colors.textMuted};
|
|
1903
2262
|
flex-shrink: 0;
|
|
1904
2263
|
`,
|
|
1905
|
-
fileIcon:
|
|
2264
|
+
fileIcon: css5`
|
|
1906
2265
|
width: 20px;
|
|
1907
2266
|
height: 20px;
|
|
1908
2267
|
color: ${colors.textMuted};
|
|
1909
2268
|
flex-shrink: 0;
|
|
1910
2269
|
`,
|
|
1911
|
-
thumbnail:
|
|
2270
|
+
thumbnail: css5`
|
|
1912
2271
|
max-width: 100%;
|
|
1913
2272
|
max-height: 100%;
|
|
1914
2273
|
width: auto;
|
|
@@ -1917,7 +2276,7 @@ var styles4 = {
|
|
|
1917
2276
|
border-radius: 4px;
|
|
1918
2277
|
border: 1px solid ${colors.borderLight};
|
|
1919
2278
|
`,
|
|
1920
|
-
noThumbnail:
|
|
2279
|
+
noThumbnail: css5`
|
|
1921
2280
|
width: 36px;
|
|
1922
2281
|
height: 36px;
|
|
1923
2282
|
display: flex;
|
|
@@ -1935,12 +2294,12 @@ var styles4 = {
|
|
|
1935
2294
|
background: ${colors.surfaceHover};
|
|
1936
2295
|
}
|
|
1937
2296
|
`,
|
|
1938
|
-
noThumbnailIcon:
|
|
2297
|
+
noThumbnailIcon: css5`
|
|
1939
2298
|
width: 16px;
|
|
1940
2299
|
height: 16px;
|
|
1941
2300
|
color: ${colors.textMuted};
|
|
1942
2301
|
`,
|
|
1943
|
-
name:
|
|
2302
|
+
name: css5`
|
|
1944
2303
|
font-size: ${fontSize.base};
|
|
1945
2304
|
font-weight: 500;
|
|
1946
2305
|
color: ${colors.text};
|
|
@@ -1950,11 +2309,11 @@ var styles4 = {
|
|
|
1950
2309
|
white-space: nowrap;
|
|
1951
2310
|
max-width: 300px;
|
|
1952
2311
|
`,
|
|
1953
|
-
meta:
|
|
2312
|
+
meta: css5`
|
|
1954
2313
|
font-size: ${fontSize.sm};
|
|
1955
2314
|
color: ${colors.textSecondary};
|
|
1956
2315
|
`,
|
|
1957
|
-
cdnBadge:
|
|
2316
|
+
cdnBadge: css5`
|
|
1958
2317
|
display: inline-flex;
|
|
1959
2318
|
align-items: center;
|
|
1960
2319
|
gap: 4px;
|
|
@@ -1962,15 +2321,15 @@ var styles4 = {
|
|
|
1962
2321
|
font-weight: 500;
|
|
1963
2322
|
color: ${colors.success};
|
|
1964
2323
|
`,
|
|
1965
|
-
cdnIcon:
|
|
2324
|
+
cdnIcon: css5`
|
|
1966
2325
|
width: 12px;
|
|
1967
2326
|
height: 12px;
|
|
1968
2327
|
`,
|
|
1969
|
-
cdnEmpty:
|
|
2328
|
+
cdnEmpty: css5`
|
|
1970
2329
|
font-size: ${fontSize.sm};
|
|
1971
2330
|
color: ${colors.textMuted};
|
|
1972
2331
|
`,
|
|
1973
|
-
openBtn:
|
|
2332
|
+
openBtn: css5`
|
|
1974
2333
|
height: 32px;
|
|
1975
2334
|
font-size: ${fontSize.sm};
|
|
1976
2335
|
font-weight: 500;
|
|
@@ -1992,11 +2351,11 @@ var styles4 = {
|
|
|
1992
2351
|
};
|
|
1993
2352
|
function StudioFileList() {
|
|
1994
2353
|
const { currentPath, setCurrentPath, navigateUp, selectedItems, toggleSelection, selectRange, lastSelectedPath, selectAll, clearSelection, refreshKey, setFocusedItem, triggerRefresh, searchQuery } = useStudio();
|
|
1995
|
-
const [items, setItems] =
|
|
1996
|
-
const [loading, setLoading] =
|
|
2354
|
+
const [items, setItems] = useState4([]);
|
|
2355
|
+
const [loading, setLoading] = useState4(true);
|
|
1997
2356
|
const isInitialLoad = useRef3(true);
|
|
1998
2357
|
const lastPath = useRef3(currentPath);
|
|
1999
|
-
|
|
2358
|
+
useEffect3(() => {
|
|
2000
2359
|
async function loadItems() {
|
|
2001
2360
|
const isPathChange = lastPath.current !== currentPath;
|
|
2002
2361
|
if (isInitialLoad.current || isPathChange) {
|
|
@@ -2019,11 +2378,11 @@ function StudioFileList() {
|
|
|
2019
2378
|
loadItems();
|
|
2020
2379
|
}, [currentPath, refreshKey, searchQuery]);
|
|
2021
2380
|
if (loading) {
|
|
2022
|
-
return /* @__PURE__ */
|
|
2381
|
+
return /* @__PURE__ */ jsx5("div", { css: styles5.loading, children: /* @__PURE__ */ jsx5("div", { css: styles5.spinner }) });
|
|
2023
2382
|
}
|
|
2024
2383
|
const isAtRoot = currentPath === "public";
|
|
2025
2384
|
if (items.length === 0 && isAtRoot) {
|
|
2026
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx5("div", { css: styles5.empty, children: /* @__PURE__ */ jsx5("p", { children: "No files in this folder" }) });
|
|
2027
2386
|
}
|
|
2028
2387
|
const isSearching = searchQuery && searchQuery.length >= 2;
|
|
2029
2388
|
const sortedItems = [...items].sort((a, b) => {
|
|
@@ -2067,13 +2426,13 @@ function StudioFileList() {
|
|
|
2067
2426
|
selectAll(sortedItems);
|
|
2068
2427
|
}
|
|
2069
2428
|
};
|
|
2070
|
-
return /* @__PURE__ */
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2429
|
+
return /* @__PURE__ */ jsx5("div", { css: styles5.tableWrapper, children: /* @__PURE__ */ jsxs5("table", { css: styles5.table, children: [
|
|
2430
|
+
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { children: [
|
|
2431
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ jsx5(
|
|
2073
2432
|
"input",
|
|
2074
2433
|
{
|
|
2075
2434
|
type: "checkbox",
|
|
2076
|
-
css:
|
|
2435
|
+
css: styles5.checkbox,
|
|
2077
2436
|
checked: allItemsSelected,
|
|
2078
2437
|
ref: (el) => {
|
|
2079
2438
|
if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
|
|
@@ -2081,23 +2440,23 @@ function StudioFileList() {
|
|
|
2081
2440
|
onChange: handleSelectAll
|
|
2082
2441
|
}
|
|
2083
2442
|
) }),
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
/* @__PURE__ */
|
|
2087
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ jsx5("th", { css: styles5.th, children: "Name" }),
|
|
2444
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thSize], children: "Size" }),
|
|
2445
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
|
|
2446
|
+
/* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
|
|
2088
2447
|
] }) }),
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
!isAtRoot && !isSearching && /* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2092
|
-
/* @__PURE__ */
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ jsxs5("tbody", { css: styles5.tbody, children: [
|
|
2449
|
+
!isAtRoot && !isSearching && /* @__PURE__ */ jsxs5("tr", { css: styles5.parentRow, onClick: navigateUp, children: [
|
|
2450
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td }),
|
|
2451
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
|
|
2452
|
+
/* @__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" }) }),
|
|
2453
|
+
/* @__PURE__ */ jsx5("span", { css: styles5.name, children: ".." })
|
|
2095
2454
|
] }) }),
|
|
2096
|
-
/* @__PURE__ */
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "--" }),
|
|
2456
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
|
|
2457
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: "--" })
|
|
2099
2458
|
] }),
|
|
2100
|
-
sortedItems.map((item) => /* @__PURE__ */
|
|
2459
|
+
sortedItems.map((item) => /* @__PURE__ */ jsx5(
|
|
2101
2460
|
ListRow,
|
|
2102
2461
|
{
|
|
2103
2462
|
item,
|
|
@@ -2112,7 +2471,7 @@ function StudioFileList() {
|
|
|
2112
2471
|
] }) });
|
|
2113
2472
|
}
|
|
2114
2473
|
function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
2115
|
-
const [showCopied, setShowCopied] =
|
|
2474
|
+
const [showCopied, setShowCopied] = useState4(false);
|
|
2116
2475
|
const isFolder = item.type === "folder";
|
|
2117
2476
|
const isImage = !isFolder && item.thumbnail !== void 0;
|
|
2118
2477
|
const isImagesFolder = isFolder && (item.name === "images" || item.path.includes("/images/"));
|
|
@@ -2123,62 +2482,62 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
2123
2482
|
setShowCopied(true);
|
|
2124
2483
|
setTimeout(() => setShowCopied(false), 1500);
|
|
2125
2484
|
};
|
|
2126
|
-
return /* @__PURE__ */
|
|
2485
|
+
return /* @__PURE__ */ jsxs5(
|
|
2127
2486
|
"tr",
|
|
2128
2487
|
{
|
|
2129
|
-
css: [
|
|
2488
|
+
css: [styles5.row, isSelected && styles5.rowSelected],
|
|
2130
2489
|
onClick,
|
|
2131
2490
|
children: [
|
|
2132
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ jsx5(
|
|
2133
2492
|
"td",
|
|
2134
2493
|
{
|
|
2135
|
-
css: [
|
|
2494
|
+
css: [styles5.td, styles5.checkboxCell],
|
|
2136
2495
|
onClick: (e) => e.stopPropagation(),
|
|
2137
|
-
children: /* @__PURE__ */
|
|
2496
|
+
children: /* @__PURE__ */ jsx5(
|
|
2138
2497
|
"input",
|
|
2139
2498
|
{
|
|
2140
2499
|
type: "checkbox",
|
|
2141
|
-
css:
|
|
2500
|
+
css: styles5.checkbox,
|
|
2142
2501
|
checked: isSelected,
|
|
2143
2502
|
onChange: () => onClick({})
|
|
2144
2503
|
}
|
|
2145
2504
|
)
|
|
2146
2505
|
}
|
|
2147
2506
|
),
|
|
2148
|
-
/* @__PURE__ */
|
|
2149
|
-
isFolder ? isImagesFolder ? /* @__PURE__ */
|
|
2150
|
-
/* @__PURE__ */
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
] }) : /* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
|
|
2508
|
+
isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs5("div", { css: styles5.imagesFolderWrapper, children: [
|
|
2509
|
+
/* @__PURE__ */ jsx5("svg", { css: styles5.imagesFolderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }),
|
|
2510
|
+
/* @__PURE__ */ jsx5("svg", { css: styles5.lockIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx5("path", { fillRule: "evenodd", d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z", clipRule: "evenodd" }) })
|
|
2511
|
+
] }) : /* @__PURE__ */ jsx5("div", { css: styles5.folderIconWrapper, children: /* @__PURE__ */ jsx5("svg", { css: styles5.folderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }) }) : isImage && item.hasThumbnail ? /* @__PURE__ */ jsx5("div", { css: styles5.thumbnailWrapper, children: /* @__PURE__ */ jsx5("img", { css: styles5.thumbnail, src: item.thumbnail, alt: item.name, loading: "lazy" }) }) : isImage && !item.hasThumbnail ? /* @__PURE__ */ jsx5("div", { css: styles5.thumbnailWrapper, children: /* @__PURE__ */ jsx5(
|
|
2153
2512
|
"button",
|
|
2154
2513
|
{
|
|
2155
|
-
css:
|
|
2514
|
+
css: styles5.noThumbnail,
|
|
2156
2515
|
onClick: (e) => {
|
|
2157
2516
|
e.stopPropagation();
|
|
2158
2517
|
onGenerateThumbnail();
|
|
2159
2518
|
},
|
|
2160
2519
|
title: "Generate thumbnail",
|
|
2161
|
-
children: /* @__PURE__ */
|
|
2520
|
+
children: /* @__PURE__ */ jsx5("svg", { css: styles5.noThumbnailIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) })
|
|
2162
2521
|
}
|
|
2163
|
-
) }) : /* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2522
|
+
) }) : /* @__PURE__ */ jsx5("div", { css: styles5.thumbnailWrapper, children: /* @__PURE__ */ jsx5("svg", { css: styles5.fileIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("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" }) }) }),
|
|
2523
|
+
/* @__PURE__ */ jsx5("span", { css: styles5.name, title: item.name, children: truncateMiddle2(item.name) }),
|
|
2524
|
+
/* @__PURE__ */ jsxs5("div", { css: styles5.actionsCell, children: [
|
|
2525
|
+
/* @__PURE__ */ jsxs5(
|
|
2167
2526
|
"button",
|
|
2168
2527
|
{
|
|
2169
|
-
css:
|
|
2528
|
+
css: styles5.copyBtn,
|
|
2170
2529
|
onClick: handleCopyPath,
|
|
2171
2530
|
title: "Copy file path",
|
|
2172
2531
|
children: [
|
|
2173
|
-
showCopied && /* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2532
|
+
showCopied && /* @__PURE__ */ jsx5("span", { css: styles5.tooltip, children: "Copied!" }),
|
|
2533
|
+
/* @__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: "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" }) })
|
|
2175
2534
|
]
|
|
2176
2535
|
}
|
|
2177
2536
|
),
|
|
2178
|
-
/* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ jsx5(
|
|
2179
2538
|
"button",
|
|
2180
2539
|
{
|
|
2181
|
-
css:
|
|
2540
|
+
css: styles5.openBtn,
|
|
2182
2541
|
onClick: (e) => {
|
|
2183
2542
|
e.stopPropagation();
|
|
2184
2543
|
onOpen();
|
|
@@ -2188,12 +2547,12 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
|
|
|
2188
2547
|
)
|
|
2189
2548
|
] })
|
|
2190
2549
|
] }) }),
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: isFolder ? item.fileCount !== void 0 ? `${item.fileCount} files` : "--" : item.size !== void 0 ? formatFileSize2(item.size) : "--" }),
|
|
2551
|
+
/* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: isFolder ? item.totalSize !== void 0 ? formatFileSize2(item.totalSize) : "--" : item.dimensions ? `${item.dimensions.width}x${item.dimensions.height}` : "--" }),
|
|
2552
|
+
/* @__PURE__ */ jsx5("td", { css: styles5.td, children: item.cdnSynced ? /* @__PURE__ */ jsxs5("span", { css: styles5.cdnBadge, children: [
|
|
2553
|
+
/* @__PURE__ */ jsx5("svg", { css: styles5.cdnIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx5("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }),
|
|
2195
2554
|
"Synced"
|
|
2196
|
-
] }) : /* @__PURE__ */
|
|
2555
|
+
] }) : /* @__PURE__ */ jsx5("span", { css: styles5.cdnEmpty, children: "--" }) })
|
|
2197
2556
|
]
|
|
2198
2557
|
}
|
|
2199
2558
|
);
|
|
@@ -2218,9 +2577,9 @@ function truncateMiddle2(str, maxLength = 32) {
|
|
|
2218
2577
|
}
|
|
2219
2578
|
|
|
2220
2579
|
// src/components/StudioDetailView.tsx
|
|
2221
|
-
import { useState as
|
|
2222
|
-
import { css as
|
|
2223
|
-
import { Fragment as Fragment3, jsx as
|
|
2580
|
+
import { useState as useState5 } from "react";
|
|
2581
|
+
import { css as css6 } from "@emotion/react";
|
|
2582
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
|
|
2224
2583
|
var IMAGE_EXTENSIONS = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".ico", ".bmp", ".tiff", ".tif"];
|
|
2225
2584
|
var VIDEO_EXTENSIONS = [".mp4", ".webm", ".mov", ".avi", ".mkv", ".m4v"];
|
|
2226
2585
|
function isImageFile(filename) {
|
|
@@ -2231,8 +2590,8 @@ function isVideoFile(filename) {
|
|
|
2231
2590
|
const ext = filename.toLowerCase().substring(filename.lastIndexOf("."));
|
|
2232
2591
|
return VIDEO_EXTENSIONS.includes(ext);
|
|
2233
2592
|
}
|
|
2234
|
-
var
|
|
2235
|
-
overlay:
|
|
2593
|
+
var styles6 = {
|
|
2594
|
+
overlay: css6`
|
|
2236
2595
|
position: absolute;
|
|
2237
2596
|
top: 0;
|
|
2238
2597
|
left: 0;
|
|
@@ -2242,7 +2601,7 @@ var styles5 = {
|
|
|
2242
2601
|
display: flex;
|
|
2243
2602
|
background: transparent;
|
|
2244
2603
|
`,
|
|
2245
|
-
container:
|
|
2604
|
+
container: css6`
|
|
2246
2605
|
display: flex;
|
|
2247
2606
|
flex: 1;
|
|
2248
2607
|
margin: 24px;
|
|
@@ -2252,7 +2611,7 @@ var styles5 = {
|
|
|
2252
2611
|
overflow: hidden;
|
|
2253
2612
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
|
2254
2613
|
`,
|
|
2255
|
-
main:
|
|
2614
|
+
main: css6`
|
|
2256
2615
|
position: relative;
|
|
2257
2616
|
flex: 1;
|
|
2258
2617
|
display: flex;
|
|
@@ -2263,7 +2622,7 @@ var styles5 = {
|
|
|
2263
2622
|
background: ${colors.background};
|
|
2264
2623
|
overflow: auto;
|
|
2265
2624
|
`,
|
|
2266
|
-
headerButtons:
|
|
2625
|
+
headerButtons: css6`
|
|
2267
2626
|
position: absolute;
|
|
2268
2627
|
top: 16px;
|
|
2269
2628
|
right: 16px;
|
|
@@ -2271,7 +2630,7 @@ var styles5 = {
|
|
|
2271
2630
|
gap: 8px;
|
|
2272
2631
|
z-index: 10;
|
|
2273
2632
|
`,
|
|
2274
|
-
copyBtn:
|
|
2633
|
+
copyBtn: css6`
|
|
2275
2634
|
position: relative;
|
|
2276
2635
|
padding: 8px;
|
|
2277
2636
|
background: ${colors.surface};
|
|
@@ -2289,12 +2648,12 @@ var styles5 = {
|
|
|
2289
2648
|
border-color: ${colors.borderHover};
|
|
2290
2649
|
}
|
|
2291
2650
|
`,
|
|
2292
|
-
copyIcon:
|
|
2651
|
+
copyIcon: css6`
|
|
2293
2652
|
width: 20px;
|
|
2294
2653
|
height: 20px;
|
|
2295
2654
|
color: ${colors.textSecondary};
|
|
2296
2655
|
`,
|
|
2297
|
-
tooltip:
|
|
2656
|
+
tooltip: css6`
|
|
2298
2657
|
position: absolute;
|
|
2299
2658
|
right: 100%;
|
|
2300
2659
|
top: 50%;
|
|
@@ -2319,7 +2678,7 @@ var styles5 = {
|
|
|
2319
2678
|
border-left-color: #1a1f36;
|
|
2320
2679
|
}
|
|
2321
2680
|
`,
|
|
2322
|
-
mainCloseBtn:
|
|
2681
|
+
mainCloseBtn: css6`
|
|
2323
2682
|
padding: 8px;
|
|
2324
2683
|
background: ${colors.surface};
|
|
2325
2684
|
border: 1px solid ${colors.border};
|
|
@@ -2336,32 +2695,32 @@ var styles5 = {
|
|
|
2336
2695
|
border-color: ${colors.borderHover};
|
|
2337
2696
|
}
|
|
2338
2697
|
`,
|
|
2339
|
-
mainCloseIcon:
|
|
2698
|
+
mainCloseIcon: css6`
|
|
2340
2699
|
width: 20px;
|
|
2341
2700
|
height: 20px;
|
|
2342
2701
|
color: ${colors.textSecondary};
|
|
2343
2702
|
`,
|
|
2344
|
-
mediaWrapper:
|
|
2703
|
+
mediaWrapper: css6`
|
|
2345
2704
|
max-width: 100%;
|
|
2346
2705
|
max-height: 100%;
|
|
2347
2706
|
display: flex;
|
|
2348
2707
|
align-items: center;
|
|
2349
2708
|
justify-content: center;
|
|
2350
2709
|
`,
|
|
2351
|
-
image:
|
|
2710
|
+
image: css6`
|
|
2352
2711
|
max-width: 100%;
|
|
2353
2712
|
max-height: calc(100vh - 200px);
|
|
2354
2713
|
object-fit: contain;
|
|
2355
2714
|
border-radius: 8px;
|
|
2356
2715
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
2357
2716
|
`,
|
|
2358
|
-
video:
|
|
2717
|
+
video: css6`
|
|
2359
2718
|
max-width: 100%;
|
|
2360
2719
|
max-height: calc(100vh - 200px);
|
|
2361
2720
|
border-radius: 8px;
|
|
2362
2721
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
2363
2722
|
`,
|
|
2364
|
-
filePlaceholder:
|
|
2723
|
+
filePlaceholder: css6`
|
|
2365
2724
|
display: flex;
|
|
2366
2725
|
flex-direction: column;
|
|
2367
2726
|
align-items: center;
|
|
@@ -2371,19 +2730,19 @@ var styles5 = {
|
|
|
2371
2730
|
border-radius: 12px;
|
|
2372
2731
|
border: 1px solid ${colors.border};
|
|
2373
2732
|
`,
|
|
2374
|
-
fileIcon:
|
|
2733
|
+
fileIcon: css6`
|
|
2375
2734
|
width: 80px;
|
|
2376
2735
|
height: 80px;
|
|
2377
2736
|
color: ${colors.textMuted};
|
|
2378
2737
|
margin-bottom: 16px;
|
|
2379
2738
|
`,
|
|
2380
|
-
fileName:
|
|
2739
|
+
fileName: css6`
|
|
2381
2740
|
font-size: ${fontSize.lg};
|
|
2382
2741
|
font-weight: 600;
|
|
2383
2742
|
color: ${colors.text};
|
|
2384
2743
|
margin: 0;
|
|
2385
2744
|
`,
|
|
2386
|
-
sidebar:
|
|
2745
|
+
sidebar: css6`
|
|
2387
2746
|
width: 280px;
|
|
2388
2747
|
background: ${colors.surface};
|
|
2389
2748
|
border-left: 1px solid ${colors.border};
|
|
@@ -2391,36 +2750,36 @@ var styles5 = {
|
|
|
2391
2750
|
flex-direction: column;
|
|
2392
2751
|
overflow: hidden;
|
|
2393
2752
|
`,
|
|
2394
|
-
sidebarHeader:
|
|
2753
|
+
sidebarHeader: css6`
|
|
2395
2754
|
padding: 16px 20px;
|
|
2396
2755
|
border-bottom: 1px solid ${colors.border};
|
|
2397
2756
|
`,
|
|
2398
|
-
sidebarTitle:
|
|
2757
|
+
sidebarTitle: css6`
|
|
2399
2758
|
font-size: ${fontSize.base};
|
|
2400
2759
|
font-weight: 600;
|
|
2401
2760
|
color: ${colors.text};
|
|
2402
2761
|
margin: 0;
|
|
2403
2762
|
`,
|
|
2404
|
-
sidebarContent:
|
|
2763
|
+
sidebarContent: css6`
|
|
2405
2764
|
flex: 1;
|
|
2406
2765
|
padding: 20px;
|
|
2407
2766
|
overflow: auto;
|
|
2408
2767
|
`,
|
|
2409
|
-
info:
|
|
2768
|
+
info: css6`
|
|
2410
2769
|
display: flex;
|
|
2411
2770
|
flex-direction: column;
|
|
2412
2771
|
gap: 12px;
|
|
2413
2772
|
margin-bottom: 24px;
|
|
2414
2773
|
`,
|
|
2415
|
-
infoRow:
|
|
2774
|
+
infoRow: css6`
|
|
2416
2775
|
display: flex;
|
|
2417
2776
|
justify-content: space-between;
|
|
2418
2777
|
font-size: ${fontSize.sm};
|
|
2419
2778
|
`,
|
|
2420
|
-
infoLabel:
|
|
2779
|
+
infoLabel: css6`
|
|
2421
2780
|
color: ${colors.textSecondary};
|
|
2422
2781
|
`,
|
|
2423
|
-
infoValue:
|
|
2782
|
+
infoValue: css6`
|
|
2424
2783
|
color: ${colors.text};
|
|
2425
2784
|
font-weight: 500;
|
|
2426
2785
|
text-align: right;
|
|
@@ -2429,7 +2788,7 @@ var styles5 = {
|
|
|
2429
2788
|
text-overflow: ellipsis;
|
|
2430
2789
|
white-space: nowrap;
|
|
2431
2790
|
`,
|
|
2432
|
-
infoValueWrap:
|
|
2791
|
+
infoValueWrap: css6`
|
|
2433
2792
|
color: ${colors.text};
|
|
2434
2793
|
font-weight: 500;
|
|
2435
2794
|
text-align: right;
|
|
@@ -2437,12 +2796,12 @@ var styles5 = {
|
|
|
2437
2796
|
word-break: break-all;
|
|
2438
2797
|
white-space: normal;
|
|
2439
2798
|
`,
|
|
2440
|
-
actions:
|
|
2799
|
+
actions: css6`
|
|
2441
2800
|
display: flex;
|
|
2442
2801
|
flex-direction: column;
|
|
2443
2802
|
gap: 8px;
|
|
2444
2803
|
`,
|
|
2445
|
-
actionBtn:
|
|
2804
|
+
actionBtn: css6`
|
|
2446
2805
|
display: flex;
|
|
2447
2806
|
align-items: center;
|
|
2448
2807
|
gap: 10px;
|
|
@@ -2463,7 +2822,7 @@ var styles5 = {
|
|
|
2463
2822
|
border-color: ${colors.borderHover};
|
|
2464
2823
|
}
|
|
2465
2824
|
`,
|
|
2466
|
-
actionBtnDanger:
|
|
2825
|
+
actionBtnDanger: css6`
|
|
2467
2826
|
color: ${colors.danger};
|
|
2468
2827
|
|
|
2469
2828
|
&:hover {
|
|
@@ -2471,7 +2830,7 @@ var styles5 = {
|
|
|
2471
2830
|
border-color: ${colors.danger};
|
|
2472
2831
|
}
|
|
2473
2832
|
`,
|
|
2474
|
-
actionIcon:
|
|
2833
|
+
actionIcon: css6`
|
|
2475
2834
|
width: 16px;
|
|
2476
2835
|
height: 16px;
|
|
2477
2836
|
flex-shrink: 0;
|
|
@@ -2479,12 +2838,12 @@ var styles5 = {
|
|
|
2479
2838
|
};
|
|
2480
2839
|
function StudioDetailView() {
|
|
2481
2840
|
const { focusedItem, setFocusedItem, triggerRefresh, clearSelection } = useStudio();
|
|
2482
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
2483
|
-
const [showRenameModal, setShowRenameModal] =
|
|
2484
|
-
const [showProcessConfirm, setShowProcessConfirm] =
|
|
2485
|
-
const [processProgress, setProcessProgress] =
|
|
2486
|
-
const [alertMessage, setAlertMessage] =
|
|
2487
|
-
const [showCopied, setShowCopied] =
|
|
2841
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = useState5(false);
|
|
2842
|
+
const [showRenameModal, setShowRenameModal] = useState5(false);
|
|
2843
|
+
const [showProcessConfirm, setShowProcessConfirm] = useState5(false);
|
|
2844
|
+
const [processProgress, setProcessProgress] = useState5(null);
|
|
2845
|
+
const [alertMessage, setAlertMessage] = useState5(null);
|
|
2846
|
+
const [showCopied, setShowCopied] = useState5(false);
|
|
2488
2847
|
if (!focusedItem) return null;
|
|
2489
2848
|
const isImage = isImageFile(focusedItem.name);
|
|
2490
2849
|
const isVideo = isVideoFile(focusedItem.name);
|
|
@@ -2615,18 +2974,18 @@ function StudioDetailView() {
|
|
|
2615
2974
|
};
|
|
2616
2975
|
const renderMedia = () => {
|
|
2617
2976
|
if (isImage) {
|
|
2618
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ jsx6("img", { css: styles6.image, src: imageSrc, alt: focusedItem.name });
|
|
2619
2978
|
}
|
|
2620
2979
|
if (isVideo) {
|
|
2621
|
-
return /* @__PURE__ */
|
|
2980
|
+
return /* @__PURE__ */ jsx6("video", { css: styles6.video, src: imageSrc, controls: true });
|
|
2622
2981
|
}
|
|
2623
|
-
return /* @__PURE__ */
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ jsxs6("div", { css: styles6.filePlaceholder, children: [
|
|
2983
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.fileIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("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" }) }),
|
|
2984
|
+
/* @__PURE__ */ jsx6("p", { css: styles6.fileName, children: focusedItem.name })
|
|
2626
2985
|
] });
|
|
2627
2986
|
};
|
|
2628
|
-
return /* @__PURE__ */
|
|
2629
|
-
showDeleteConfirm && /* @__PURE__ */
|
|
2987
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
2988
|
+
showDeleteConfirm && /* @__PURE__ */ jsx6(
|
|
2630
2989
|
ConfirmModal,
|
|
2631
2990
|
{
|
|
2632
2991
|
title: "Delete File",
|
|
@@ -2637,7 +2996,7 @@ function StudioDetailView() {
|
|
|
2637
2996
|
onCancel: () => setShowDeleteConfirm(false)
|
|
2638
2997
|
}
|
|
2639
2998
|
),
|
|
2640
|
-
alertMessage && /* @__PURE__ */
|
|
2999
|
+
alertMessage && /* @__PURE__ */ jsx6(
|
|
2641
3000
|
AlertModal,
|
|
2642
3001
|
{
|
|
2643
3002
|
title: alertMessage.title,
|
|
@@ -2645,7 +3004,7 @@ function StudioDetailView() {
|
|
|
2645
3004
|
onClose: () => setAlertMessage(null)
|
|
2646
3005
|
}
|
|
2647
3006
|
),
|
|
2648
|
-
showRenameModal && /* @__PURE__ */
|
|
3007
|
+
showRenameModal && /* @__PURE__ */ jsx6(
|
|
2649
3008
|
InputModal,
|
|
2650
3009
|
{
|
|
2651
3010
|
title: "Rename File",
|
|
@@ -2657,7 +3016,7 @@ function StudioDetailView() {
|
|
|
2657
3016
|
onCancel: () => setShowRenameModal(false)
|
|
2658
3017
|
}
|
|
2659
3018
|
),
|
|
2660
|
-
showProcessConfirm && /* @__PURE__ */
|
|
3019
|
+
showProcessConfirm && /* @__PURE__ */ jsx6(
|
|
2661
3020
|
ConfirmModal,
|
|
2662
3021
|
{
|
|
2663
3022
|
title: "Process Image",
|
|
@@ -2667,7 +3026,7 @@ function StudioDetailView() {
|
|
|
2667
3026
|
onCancel: () => setShowProcessConfirm(false)
|
|
2668
3027
|
}
|
|
2669
3028
|
),
|
|
2670
|
-
processProgress && /* @__PURE__ */
|
|
3029
|
+
processProgress && /* @__PURE__ */ jsx6(
|
|
2671
3030
|
ProgressModal,
|
|
2672
3031
|
{
|
|
2673
3032
|
title: "Processing Image",
|
|
@@ -2675,61 +3034,61 @@ function StudioDetailView() {
|
|
|
2675
3034
|
onClose: () => setProcessProgress(null)
|
|
2676
3035
|
}
|
|
2677
3036
|
),
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
showCopied && /* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
3037
|
+
/* @__PURE__ */ jsx6("div", { css: styles6.overlay, onClick: handleClose, children: /* @__PURE__ */ jsxs6("div", { css: styles6.container, onClick: (e) => e.stopPropagation(), children: [
|
|
3038
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.main, children: [
|
|
3039
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.headerButtons, children: [
|
|
3040
|
+
/* @__PURE__ */ jsxs6("button", { css: styles6.copyBtn, onClick: handleCopyPath, title: "Copy file path", children: [
|
|
3041
|
+
showCopied && /* @__PURE__ */ jsx6("span", { css: styles6.tooltip, children: "Copied!" }),
|
|
3042
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("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" }) })
|
|
2684
3043
|
] }),
|
|
2685
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsx6("button", { css: styles6.mainCloseBtn, onClick: handleClose, "aria-label": "Close", children: /* @__PURE__ */ jsx6("svg", { css: styles6.mainCloseIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
|
|
2686
3045
|
] }),
|
|
2687
|
-
/* @__PURE__ */
|
|
3046
|
+
/* @__PURE__ */ jsx6("div", { css: styles6.mediaWrapper, children: renderMedia() })
|
|
2688
3047
|
] }),
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
2691
|
-
/* @__PURE__ */
|
|
2692
|
-
/* @__PURE__ */
|
|
2693
|
-
/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
/* @__PURE__ */
|
|
3048
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.sidebar, children: [
|
|
3049
|
+
/* @__PURE__ */ jsx6("div", { css: styles6.sidebarHeader, children: /* @__PURE__ */ jsx6("h3", { css: styles6.sidebarTitle, children: "Details" }) }),
|
|
3050
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.sidebarContent, children: [
|
|
3051
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.info, children: [
|
|
3052
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
|
|
3053
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Name" }),
|
|
3054
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoValueWrap, children: focusedItem.name })
|
|
2696
3055
|
] }),
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2699
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
|
|
3057
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Path" }),
|
|
3058
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoValueWrap, children: focusedItem.path.replace(/^public\//, "") })
|
|
2700
3059
|
] }),
|
|
2701
|
-
focusedItem.size !== void 0 && /* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
/* @__PURE__ */
|
|
3060
|
+
focusedItem.size !== void 0 && /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
|
|
3061
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Size" }),
|
|
3062
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoValue, children: formatFileSize3(focusedItem.size) })
|
|
2704
3063
|
] }),
|
|
2705
|
-
focusedItem.dimensions && /* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
3064
|
+
focusedItem.dimensions && /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
|
|
3065
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Dimensions" }),
|
|
3066
|
+
/* @__PURE__ */ jsxs6("span", { css: styles6.infoValue, children: [
|
|
2708
3067
|
focusedItem.dimensions.width,
|
|
2709
3068
|
" \xD7 ",
|
|
2710
3069
|
focusedItem.dimensions.height
|
|
2711
3070
|
] })
|
|
2712
3071
|
] }),
|
|
2713
|
-
/* @__PURE__ */
|
|
2714
|
-
/* @__PURE__ */
|
|
2715
|
-
/* @__PURE__ */
|
|
3072
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
|
|
3073
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "CDN Status" }),
|
|
3074
|
+
/* @__PURE__ */ jsx6("span", { css: styles6.infoValue, children: focusedItem.cdnSynced ? "Synced" : "Not synced" })
|
|
2716
3075
|
] })
|
|
2717
3076
|
] }),
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsxs6("div", { css: styles6.actions, children: [
|
|
3078
|
+
/* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: () => setShowRenameModal(true), children: [
|
|
3079
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("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" }) }),
|
|
2721
3080
|
"Rename"
|
|
2722
3081
|
] }),
|
|
2723
|
-
/* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: handleSync, children: [
|
|
3083
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }),
|
|
2725
3084
|
"Sync to CDN"
|
|
2726
3085
|
] }),
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: () => setShowProcessConfirm(true), children: [
|
|
3087
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
|
|
2729
3088
|
"Process Image"
|
|
2730
3089
|
] }),
|
|
2731
|
-
/* @__PURE__ */
|
|
2732
|
-
/* @__PURE__ */
|
|
3090
|
+
/* @__PURE__ */ jsxs6("button", { css: [styles6.actionBtn, styles6.actionBtnDanger], onClick: () => setShowDeleteConfirm(true), children: [
|
|
3091
|
+
/* @__PURE__ */ jsx6("svg", { css: styles6.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) }),
|
|
2733
3092
|
"Delete"
|
|
2734
3093
|
] })
|
|
2735
3094
|
] })
|
|
@@ -2745,12 +3104,12 @@ function formatFileSize3(bytes) {
|
|
|
2745
3104
|
}
|
|
2746
3105
|
|
|
2747
3106
|
// src/components/StudioSettings.tsx
|
|
2748
|
-
import { useState as
|
|
2749
|
-
import { css as
|
|
2750
|
-
import { Fragment as Fragment4, jsx as
|
|
3107
|
+
import { useState as useState6 } from "react";
|
|
3108
|
+
import { css as css7 } from "@emotion/react";
|
|
3109
|
+
import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "@emotion/react/jsx-runtime";
|
|
2751
3110
|
var btnHeight2 = "36px";
|
|
2752
|
-
var
|
|
2753
|
-
btn:
|
|
3111
|
+
var styles7 = {
|
|
3112
|
+
btn: css7`
|
|
2754
3113
|
height: ${btnHeight2};
|
|
2755
3114
|
padding: 0 12px;
|
|
2756
3115
|
background: ${colors.surface};
|
|
@@ -2767,12 +3126,12 @@ var styles6 = {
|
|
|
2767
3126
|
border-color: ${colors.borderHover};
|
|
2768
3127
|
}
|
|
2769
3128
|
`,
|
|
2770
|
-
icon:
|
|
3129
|
+
icon: css7`
|
|
2771
3130
|
width: 16px;
|
|
2772
3131
|
height: 16px;
|
|
2773
3132
|
color: ${colors.textSecondary};
|
|
2774
3133
|
`,
|
|
2775
|
-
overlay:
|
|
3134
|
+
overlay: css7`
|
|
2776
3135
|
position: fixed;
|
|
2777
3136
|
top: 0;
|
|
2778
3137
|
right: 0;
|
|
@@ -2785,7 +3144,7 @@ var styles6 = {
|
|
|
2785
3144
|
background-color: rgba(26, 31, 54, 0.4);
|
|
2786
3145
|
backdrop-filter: blur(4px);
|
|
2787
3146
|
`,
|
|
2788
|
-
panel:
|
|
3147
|
+
panel: css7`
|
|
2789
3148
|
${baseReset}
|
|
2790
3149
|
position: relative;
|
|
2791
3150
|
background-color: ${colors.surface};
|
|
@@ -2795,20 +3154,20 @@ var styles6 = {
|
|
|
2795
3154
|
max-width: 512px;
|
|
2796
3155
|
padding: 24px;
|
|
2797
3156
|
`,
|
|
2798
|
-
header:
|
|
3157
|
+
header: css7`
|
|
2799
3158
|
display: flex;
|
|
2800
3159
|
align-items: center;
|
|
2801
3160
|
justify-content: space-between;
|
|
2802
3161
|
margin-bottom: 24px;
|
|
2803
3162
|
`,
|
|
2804
|
-
title:
|
|
3163
|
+
title: css7`
|
|
2805
3164
|
font-size: ${fontSize.xl};
|
|
2806
3165
|
font-weight: 600;
|
|
2807
3166
|
color: ${colors.text};
|
|
2808
3167
|
margin: 0;
|
|
2809
3168
|
letter-spacing: -0.02em;
|
|
2810
3169
|
`,
|
|
2811
|
-
closeBtn:
|
|
3170
|
+
closeBtn: css7`
|
|
2812
3171
|
padding: 6px;
|
|
2813
3172
|
background: ${colors.surface};
|
|
2814
3173
|
border: 1px solid ${colors.border};
|
|
@@ -2824,26 +3183,26 @@ var styles6 = {
|
|
|
2824
3183
|
border-color: ${colors.borderHover};
|
|
2825
3184
|
}
|
|
2826
3185
|
`,
|
|
2827
|
-
sections:
|
|
3186
|
+
sections: css7`
|
|
2828
3187
|
display: flex;
|
|
2829
3188
|
flex-direction: column;
|
|
2830
3189
|
gap: 24px;
|
|
2831
3190
|
`,
|
|
2832
|
-
sectionTitle:
|
|
3191
|
+
sectionTitle: css7`
|
|
2833
3192
|
font-size: ${fontSize.base};
|
|
2834
3193
|
font-weight: 600;
|
|
2835
3194
|
color: ${colors.text};
|
|
2836
3195
|
margin: 0 0 12px 0;
|
|
2837
3196
|
`,
|
|
2838
|
-
description:
|
|
3197
|
+
description: css7`
|
|
2839
3198
|
font-size: ${fontSize.sm};
|
|
2840
3199
|
color: ${colors.textSecondary};
|
|
2841
3200
|
margin: 0 0 12px 0;
|
|
2842
3201
|
`,
|
|
2843
|
-
codeWrapper:
|
|
3202
|
+
codeWrapper: css7`
|
|
2844
3203
|
position: relative;
|
|
2845
3204
|
`,
|
|
2846
|
-
code:
|
|
3205
|
+
code: css7`
|
|
2847
3206
|
background-color: ${colors.background};
|
|
2848
3207
|
border-radius: 8px;
|
|
2849
3208
|
padding: 12px;
|
|
@@ -2855,7 +3214,7 @@ var styles6 = {
|
|
|
2855
3214
|
overflow-x: auto;
|
|
2856
3215
|
white-space: nowrap;
|
|
2857
3216
|
`,
|
|
2858
|
-
copyBtn:
|
|
3217
|
+
copyBtn: css7`
|
|
2859
3218
|
position: absolute;
|
|
2860
3219
|
top: 8px;
|
|
2861
3220
|
right: 8px;
|
|
@@ -2874,7 +3233,7 @@ var styles6 = {
|
|
|
2874
3233
|
border-color: ${colors.borderHover};
|
|
2875
3234
|
}
|
|
2876
3235
|
`,
|
|
2877
|
-
tooltip:
|
|
3236
|
+
tooltip: css7`
|
|
2878
3237
|
position: absolute;
|
|
2879
3238
|
bottom: 100%;
|
|
2880
3239
|
left: 50%;
|
|
@@ -2899,19 +3258,19 @@ var styles6 = {
|
|
|
2899
3258
|
border-top-color: #1a1f36;
|
|
2900
3259
|
}
|
|
2901
3260
|
`,
|
|
2902
|
-
copyIcon:
|
|
3261
|
+
copyIcon: css7`
|
|
2903
3262
|
width: 14px;
|
|
2904
3263
|
height: 14px;
|
|
2905
3264
|
color: ${colors.textSecondary};
|
|
2906
3265
|
`,
|
|
2907
|
-
codeLine:
|
|
3266
|
+
codeLine: css7`
|
|
2908
3267
|
margin: 0 0 4px 0;
|
|
2909
3268
|
|
|
2910
3269
|
&:last-child {
|
|
2911
3270
|
margin: 0;
|
|
2912
3271
|
}
|
|
2913
3272
|
`,
|
|
2914
|
-
input:
|
|
3273
|
+
input: css7`
|
|
2915
3274
|
width: 100%;
|
|
2916
3275
|
padding: 10px 14px;
|
|
2917
3276
|
border: 1px solid ${colors.border};
|
|
@@ -2931,19 +3290,19 @@ var styles6 = {
|
|
|
2931
3290
|
color: ${colors.textMuted};
|
|
2932
3291
|
}
|
|
2933
3292
|
`,
|
|
2934
|
-
grid:
|
|
3293
|
+
grid: css7`
|
|
2935
3294
|
display: grid;
|
|
2936
3295
|
grid-template-columns: repeat(3, 1fr);
|
|
2937
3296
|
gap: 12px;
|
|
2938
3297
|
`,
|
|
2939
|
-
label:
|
|
3298
|
+
label: css7`
|
|
2940
3299
|
font-size: ${fontSize.xs};
|
|
2941
3300
|
font-weight: 500;
|
|
2942
3301
|
color: ${colors.textSecondary};
|
|
2943
3302
|
display: block;
|
|
2944
3303
|
margin-bottom: 6px;
|
|
2945
3304
|
`,
|
|
2946
|
-
footer:
|
|
3305
|
+
footer: css7`
|
|
2947
3306
|
margin-top: 24px;
|
|
2948
3307
|
padding-top: 20px;
|
|
2949
3308
|
border-top: 1px solid ${colors.border};
|
|
@@ -2951,7 +3310,7 @@ var styles6 = {
|
|
|
2951
3310
|
justify-content: flex-end;
|
|
2952
3311
|
gap: 12px;
|
|
2953
3312
|
`,
|
|
2954
|
-
cancelBtn:
|
|
3313
|
+
cancelBtn: css7`
|
|
2955
3314
|
padding: 10px 18px;
|
|
2956
3315
|
font-size: ${fontSize.base};
|
|
2957
3316
|
font-weight: 500;
|
|
@@ -2967,7 +3326,7 @@ var styles6 = {
|
|
|
2967
3326
|
border-color: ${colors.borderHover};
|
|
2968
3327
|
}
|
|
2969
3328
|
`,
|
|
2970
|
-
saveBtn:
|
|
3329
|
+
saveBtn: css7`
|
|
2971
3330
|
padding: 10px 18px;
|
|
2972
3331
|
font-size: ${fontSize.base};
|
|
2973
3332
|
font-weight: 500;
|
|
@@ -2985,12 +3344,12 @@ var styles6 = {
|
|
|
2985
3344
|
`
|
|
2986
3345
|
};
|
|
2987
3346
|
function StudioSettings() {
|
|
2988
|
-
const [isOpen, setIsOpen] =
|
|
2989
|
-
return /* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
3347
|
+
const [isOpen, setIsOpen] = useState6(false);
|
|
3348
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
3349
|
+
/* @__PURE__ */ jsx7("button", { css: styles7.btn, onClick: () => setIsOpen(true), "aria-label": "Settings", children: /* @__PURE__ */ jsxs7(
|
|
2991
3350
|
"svg",
|
|
2992
3351
|
{
|
|
2993
|
-
css:
|
|
3352
|
+
css: styles7.icon,
|
|
2994
3353
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2995
3354
|
viewBox: "0 0 24 24",
|
|
2996
3355
|
fill: "none",
|
|
@@ -2999,12 +3358,12 @@ function StudioSettings() {
|
|
|
2999
3358
|
strokeLinecap: "round",
|
|
3000
3359
|
strokeLinejoin: "round",
|
|
3001
3360
|
children: [
|
|
3002
|
-
/* @__PURE__ */
|
|
3003
|
-
/* @__PURE__ */
|
|
3361
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" }),
|
|
3362
|
+
/* @__PURE__ */ jsx7("path", { d: "M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z" })
|
|
3004
3363
|
]
|
|
3005
3364
|
}
|
|
3006
3365
|
) }),
|
|
3007
|
-
isOpen && /* @__PURE__ */
|
|
3366
|
+
isOpen && /* @__PURE__ */ jsx7(SettingsPanel, { onClose: () => setIsOpen(false) })
|
|
3008
3367
|
] });
|
|
3009
3368
|
}
|
|
3010
3369
|
var envTemplate = `CLOUDFLARE_R2_ACCOUNT_ID=abc123def456ghi789
|
|
@@ -3013,72 +3372,72 @@ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key_here
|
|
|
3013
3372
|
CLOUDFLARE_R2_BUCKET_NAME=my-images-bucket
|
|
3014
3373
|
CLOUDFLARE_R2_PUBLIC_URL=https://cdn.yourdomain.com`;
|
|
3015
3374
|
function SettingsPanel({ onClose }) {
|
|
3016
|
-
const [copied, setCopied] =
|
|
3375
|
+
const [copied, setCopied] = useState6(false);
|
|
3017
3376
|
const handleCopy = () => {
|
|
3018
3377
|
navigator.clipboard.writeText(envTemplate);
|
|
3019
3378
|
setCopied(true);
|
|
3020
3379
|
setTimeout(() => setCopied(false), 2e3);
|
|
3021
3380
|
};
|
|
3022
|
-
return /* @__PURE__ */
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3381
|
+
return /* @__PURE__ */ jsx7("div", { css: styles7.overlay, onClick: onClose, children: /* @__PURE__ */ jsxs7("div", { css: styles7.panel, onClick: (e) => e.stopPropagation(), children: [
|
|
3382
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.header, children: [
|
|
3383
|
+
/* @__PURE__ */ jsx7("h2", { css: styles7.title, children: "Settings" }),
|
|
3384
|
+
/* @__PURE__ */ jsx7("button", { css: styles7.closeBtn, onClick: onClose, children: /* @__PURE__ */ jsx7("svg", { css: styles7.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
|
|
3026
3385
|
] }),
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
/* @__PURE__ */
|
|
3029
|
-
/* @__PURE__ */
|
|
3030
|
-
/* @__PURE__ */
|
|
3031
|
-
/* @__PURE__ */
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
copied && /* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3386
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.sections, children: [
|
|
3387
|
+
/* @__PURE__ */ jsxs7("section", { children: [
|
|
3388
|
+
/* @__PURE__ */ jsx7("h3", { css: styles7.sectionTitle, children: "Cloudflare R2" }),
|
|
3389
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.description, children: "Configure in .env.local file:" }),
|
|
3390
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.codeWrapper, children: [
|
|
3391
|
+
/* @__PURE__ */ jsxs7("button", { css: styles7.copyBtn, onClick: handleCopy, title: "Copy to clipboard", children: [
|
|
3392
|
+
copied && /* @__PURE__ */ jsx7("span", { css: styles7.tooltip, children: "Copied!" }),
|
|
3393
|
+
/* @__PURE__ */ jsx7("svg", { css: styles7.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) })
|
|
3035
3394
|
] }),
|
|
3036
|
-
/* @__PURE__ */
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
/* @__PURE__ */
|
|
3039
|
-
/* @__PURE__ */
|
|
3040
|
-
/* @__PURE__ */
|
|
3041
|
-
/* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.code, children: [
|
|
3396
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_ACCOUNT_ID=abc123def456ghi789" }),
|
|
3397
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id_here" }),
|
|
3398
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key_here" }),
|
|
3399
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_BUCKET_NAME=my-images-bucket" }),
|
|
3400
|
+
/* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_PUBLIC_URL=https://cdn.yourdomain.com" })
|
|
3042
3401
|
] })
|
|
3043
3402
|
] })
|
|
3044
3403
|
] }),
|
|
3045
|
-
/* @__PURE__ */
|
|
3046
|
-
/* @__PURE__ */
|
|
3047
|
-
/* @__PURE__ */
|
|
3048
|
-
/* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3050
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ jsxs7("section", { children: [
|
|
3405
|
+
/* @__PURE__ */ jsx7("h3", { css: styles7.sectionTitle, children: "Thumbnail Sizes" }),
|
|
3406
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.grid, children: [
|
|
3407
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3408
|
+
/* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Small" }),
|
|
3409
|
+
/* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 300 })
|
|
3051
3410
|
] }),
|
|
3052
|
-
/* @__PURE__ */
|
|
3053
|
-
/* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
3411
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3412
|
+
/* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Medium" }),
|
|
3413
|
+
/* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 700 })
|
|
3055
3414
|
] }),
|
|
3056
|
-
/* @__PURE__ */
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3415
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3416
|
+
/* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Large" }),
|
|
3417
|
+
/* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 1400 })
|
|
3059
3418
|
] })
|
|
3060
3419
|
] })
|
|
3061
3420
|
] })
|
|
3062
3421
|
] }),
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3422
|
+
/* @__PURE__ */ jsxs7("div", { css: styles7.footer, children: [
|
|
3423
|
+
/* @__PURE__ */ jsx7("button", { css: styles7.cancelBtn, onClick: onClose, children: "Cancel" }),
|
|
3424
|
+
/* @__PURE__ */ jsx7("button", { css: styles7.saveBtn, children: "Save Changes" })
|
|
3066
3425
|
] })
|
|
3067
3426
|
] }) });
|
|
3068
3427
|
}
|
|
3069
3428
|
|
|
3070
3429
|
// src/components/StudioUI.tsx
|
|
3071
|
-
import { jsx as
|
|
3430
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "@emotion/react/jsx-runtime";
|
|
3072
3431
|
var btnHeight3 = "36px";
|
|
3073
|
-
var
|
|
3074
|
-
container:
|
|
3432
|
+
var styles8 = {
|
|
3433
|
+
container: css8`
|
|
3075
3434
|
${baseReset}
|
|
3076
3435
|
display: flex;
|
|
3077
3436
|
flex-direction: column;
|
|
3078
3437
|
height: 100%;
|
|
3079
3438
|
background: ${colors.background};
|
|
3080
3439
|
`,
|
|
3081
|
-
header:
|
|
3440
|
+
header: css8`
|
|
3082
3441
|
display: flex;
|
|
3083
3442
|
align-items: center;
|
|
3084
3443
|
justify-content: space-between;
|
|
@@ -3086,19 +3445,19 @@ var styles7 = {
|
|
|
3086
3445
|
background: ${colors.surface};
|
|
3087
3446
|
border-bottom: 1px solid ${colors.border};
|
|
3088
3447
|
`,
|
|
3089
|
-
title:
|
|
3448
|
+
title: css8`
|
|
3090
3449
|
font-size: ${fontSize.lg};
|
|
3091
3450
|
font-weight: 600;
|
|
3092
3451
|
color: ${colors.text};
|
|
3093
3452
|
margin: 0;
|
|
3094
3453
|
letter-spacing: -0.02em;
|
|
3095
3454
|
`,
|
|
3096
|
-
headerActions:
|
|
3455
|
+
headerActions: css8`
|
|
3097
3456
|
display: flex;
|
|
3098
3457
|
align-items: center;
|
|
3099
3458
|
gap: 8px;
|
|
3100
3459
|
`,
|
|
3101
|
-
headerBtn:
|
|
3460
|
+
headerBtn: css8`
|
|
3102
3461
|
height: ${btnHeight3};
|
|
3103
3462
|
padding: 0 12px;
|
|
3104
3463
|
background: ${colors.surface};
|
|
@@ -3115,23 +3474,23 @@ var styles7 = {
|
|
|
3115
3474
|
border-color: ${colors.borderHover};
|
|
3116
3475
|
}
|
|
3117
3476
|
`,
|
|
3118
|
-
headerIcon:
|
|
3477
|
+
headerIcon: css8`
|
|
3119
3478
|
width: 16px;
|
|
3120
3479
|
height: 16px;
|
|
3121
3480
|
color: ${colors.textSecondary};
|
|
3122
3481
|
`,
|
|
3123
|
-
content:
|
|
3482
|
+
content: css8`
|
|
3124
3483
|
flex: 1;
|
|
3125
3484
|
display: flex;
|
|
3126
3485
|
overflow: hidden;
|
|
3127
3486
|
`,
|
|
3128
|
-
fileBrowser:
|
|
3487
|
+
fileBrowser: css8`
|
|
3129
3488
|
flex: 1;
|
|
3130
3489
|
min-width: 0;
|
|
3131
3490
|
overflow: auto;
|
|
3132
3491
|
padding: 20px 24px;
|
|
3133
3492
|
`,
|
|
3134
|
-
dropOverlay:
|
|
3493
|
+
dropOverlay: css8`
|
|
3135
3494
|
position: absolute;
|
|
3136
3495
|
top: 0;
|
|
3137
3496
|
left: 0;
|
|
@@ -3146,7 +3505,7 @@ var styles7 = {
|
|
|
3146
3505
|
z-index: 50;
|
|
3147
3506
|
pointer-events: none;
|
|
3148
3507
|
`,
|
|
3149
|
-
dropMessage:
|
|
3508
|
+
dropMessage: css8`
|
|
3150
3509
|
display: flex;
|
|
3151
3510
|
flex-direction: column;
|
|
3152
3511
|
align-items: center;
|
|
@@ -3155,22 +3514,22 @@ var styles7 = {
|
|
|
3155
3514
|
font-size: ${fontSize.lg};
|
|
3156
3515
|
font-weight: 600;
|
|
3157
3516
|
`,
|
|
3158
|
-
dropIcon:
|
|
3517
|
+
dropIcon: css8`
|
|
3159
3518
|
width: 48px;
|
|
3160
3519
|
height: 48px;
|
|
3161
3520
|
`
|
|
3162
3521
|
};
|
|
3163
3522
|
function StudioUI({ onClose, isVisible = true }) {
|
|
3164
|
-
const [currentPath, setCurrentPathInternal] =
|
|
3165
|
-
const [selectedItems, setSelectedItems] =
|
|
3166
|
-
const [lastSelectedPath, setLastSelectedPath] =
|
|
3167
|
-
const [viewMode, setViewMode] =
|
|
3168
|
-
const [focusedItem, setFocusedItem] =
|
|
3169
|
-
const [meta, setMeta] =
|
|
3170
|
-
const [isLoading, setIsLoading] =
|
|
3171
|
-
const [refreshKey, setRefreshKey] =
|
|
3172
|
-
const [searchQuery, setSearchQuery] =
|
|
3173
|
-
const [isDragging, setIsDragging] =
|
|
3523
|
+
const [currentPath, setCurrentPathInternal] = useState7("public");
|
|
3524
|
+
const [selectedItems, setSelectedItems] = useState7(/* @__PURE__ */ new Set());
|
|
3525
|
+
const [lastSelectedPath, setLastSelectedPath] = useState7(null);
|
|
3526
|
+
const [viewMode, setViewMode] = useState7("grid");
|
|
3527
|
+
const [focusedItem, setFocusedItem] = useState7(null);
|
|
3528
|
+
const [meta, setMeta] = useState7(null);
|
|
3529
|
+
const [isLoading, setIsLoading] = useState7(false);
|
|
3530
|
+
const [refreshKey, setRefreshKey] = useState7(0);
|
|
3531
|
+
const [searchQuery, setSearchQuery] = useState7("");
|
|
3532
|
+
const [isDragging, setIsDragging] = useState7(false);
|
|
3174
3533
|
const triggerRefresh = useCallback2(() => {
|
|
3175
3534
|
setRefreshKey((k) => k + 1);
|
|
3176
3535
|
}, []);
|
|
@@ -3269,7 +3628,7 @@ function StudioUI({ onClose, isVisible = true }) {
|
|
|
3269
3628
|
},
|
|
3270
3629
|
[onClose, focusedItem]
|
|
3271
3630
|
);
|
|
3272
|
-
|
|
3631
|
+
useEffect4(() => {
|
|
3273
3632
|
if (isVisible) {
|
|
3274
3633
|
document.addEventListener("keydown", handleKeyDown);
|
|
3275
3634
|
document.body.style.overflow = "hidden";
|
|
@@ -3307,47 +3666,47 @@ function StudioUI({ onClose, isVisible = true }) {
|
|
|
3307
3666
|
searchQuery,
|
|
3308
3667
|
setSearchQuery
|
|
3309
3668
|
};
|
|
3310
|
-
return /* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3313
|
-
/* @__PURE__ */
|
|
3314
|
-
/* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsx8(StudioContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8("div", { css: styles8.container, children: [
|
|
3670
|
+
/* @__PURE__ */ jsxs8("div", { css: styles8.header, children: [
|
|
3671
|
+
/* @__PURE__ */ jsx8("h1", { css: styles8.title, children: "Studio" }),
|
|
3672
|
+
/* @__PURE__ */ jsxs8("div", { css: styles8.headerActions, children: [
|
|
3673
|
+
/* @__PURE__ */ jsx8(StudioSettings, {}),
|
|
3674
|
+
/* @__PURE__ */ jsx8(
|
|
3316
3675
|
"button",
|
|
3317
3676
|
{
|
|
3318
|
-
css:
|
|
3677
|
+
css: styles8.headerBtn,
|
|
3319
3678
|
onClick: onClose,
|
|
3320
3679
|
"aria-label": "Close Studio",
|
|
3321
|
-
children: /* @__PURE__ */
|
|
3680
|
+
children: /* @__PURE__ */ jsx8(CloseIcon, {})
|
|
3322
3681
|
}
|
|
3323
3682
|
)
|
|
3324
3683
|
] })
|
|
3325
3684
|
] }),
|
|
3326
|
-
/* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3685
|
+
/* @__PURE__ */ jsx8(StudioToolbar, {}),
|
|
3686
|
+
/* @__PURE__ */ jsxs8(
|
|
3328
3687
|
"div",
|
|
3329
3688
|
{
|
|
3330
|
-
css:
|
|
3689
|
+
css: styles8.content,
|
|
3331
3690
|
onDragOver: handleDragOver,
|
|
3332
3691
|
onDragLeave: handleDragLeave,
|
|
3333
3692
|
onDrop: handleDrop,
|
|
3334
3693
|
children: [
|
|
3335
|
-
isDragging && /* @__PURE__ */
|
|
3336
|
-
/* @__PURE__ */
|
|
3337
|
-
/* @__PURE__ */
|
|
3694
|
+
isDragging && /* @__PURE__ */ jsx8("div", { css: styles8.dropOverlay, children: /* @__PURE__ */ jsxs8("div", { css: styles8.dropMessage, children: [
|
|
3695
|
+
/* @__PURE__ */ jsx8("svg", { css: styles8.dropIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) }),
|
|
3696
|
+
/* @__PURE__ */ jsx8("span", { children: "Drop files to upload" })
|
|
3338
3697
|
] }) }),
|
|
3339
|
-
/* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ jsx8("div", { css: styles8.fileBrowser, children: viewMode === "grid" ? /* @__PURE__ */ jsx8(StudioFileGrid, {}) : /* @__PURE__ */ jsx8(StudioFileList, {}) })
|
|
3340
3699
|
]
|
|
3341
3700
|
}
|
|
3342
3701
|
),
|
|
3343
|
-
focusedItem && /* @__PURE__ */
|
|
3702
|
+
focusedItem && /* @__PURE__ */ jsx8(StudioDetailView, {})
|
|
3344
3703
|
] }) });
|
|
3345
3704
|
}
|
|
3346
3705
|
function CloseIcon() {
|
|
3347
|
-
return /* @__PURE__ */
|
|
3706
|
+
return /* @__PURE__ */ jsxs8(
|
|
3348
3707
|
"svg",
|
|
3349
3708
|
{
|
|
3350
|
-
css:
|
|
3709
|
+
css: styles8.headerIcon,
|
|
3351
3710
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3352
3711
|
viewBox: "0 0 24 24",
|
|
3353
3712
|
fill: "none",
|
|
@@ -3356,8 +3715,8 @@ function CloseIcon() {
|
|
|
3356
3715
|
strokeLinecap: "round",
|
|
3357
3716
|
strokeLinejoin: "round",
|
|
3358
3717
|
children: [
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ jsx8("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3719
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3361
3720
|
]
|
|
3362
3721
|
}
|
|
3363
3722
|
);
|
|
@@ -3367,4 +3726,4 @@ export {
|
|
|
3367
3726
|
StudioUI,
|
|
3368
3727
|
StudioUI_default as default
|
|
3369
3728
|
};
|
|
3370
|
-
//# sourceMappingURL=StudioUI-
|
|
3729
|
+
//# sourceMappingURL=StudioUI-D6NQXFE4.mjs.map
|