@gallop.software/studio 0.1.59 → 0.1.60

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