@gallop.software/studio 0.1.82 → 0.1.83

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.
@@ -8,7 +8,7 @@ import {
8
8
 
9
9
  // src/components/StudioUI.tsx
10
10
  import { useEffect as useEffect3, useCallback as useCallback3, useState as useState8 } from "react";
11
- import { css as css9 } from "@emotion/react";
11
+ import { css as css10 } from "@emotion/react";
12
12
 
13
13
  // src/components/StudioContext.tsx
14
14
  import { createContext, useContext } from "react";
@@ -66,7 +66,7 @@ function useStudio() {
66
66
 
67
67
  // src/components/StudioToolbar.tsx
68
68
  import { useCallback, useRef, useState as useState2 } from "react";
69
- import { css as css3, keyframes as keyframes3 } from "@emotion/react";
69
+ import { css as css4, keyframes as keyframes3 } from "@emotion/react";
70
70
 
71
71
  // src/components/StudioModal.tsx
72
72
  import React from "react";
@@ -674,14 +674,313 @@ function StudioFolderPicker({ selectedItems, currentPath, onMove, onCancel }) {
674
674
  ] }) });
675
675
  }
676
676
 
677
+ // src/components/R2SetupModal.tsx
678
+ import { css as css3 } from "@emotion/react";
679
+ import { jsx as jsx3, jsxs as jsxs3 } from "@emotion/react/jsx-runtime";
680
+ var styles3 = {
681
+ overlay: css3`
682
+ position: fixed;
683
+ inset: 0;
684
+ background: rgba(0, 0, 0, 0.6);
685
+ display: flex;
686
+ align-items: center;
687
+ justify-content: center;
688
+ z-index: 1100;
689
+ padding: 20px;
690
+ `,
691
+ modal: css3`
692
+ background: ${colors.surface};
693
+ border-radius: 12px;
694
+ max-width: 560px;
695
+ width: 100%;
696
+ max-height: 90vh;
697
+ overflow-y: auto;
698
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
699
+ `,
700
+ header: css3`
701
+ display: flex;
702
+ align-items: center;
703
+ gap: 12px;
704
+ padding: 20px 24px;
705
+ border-bottom: 1px solid ${colors.border};
706
+ `,
707
+ icon: css3`
708
+ width: 32px;
709
+ height: 32px;
710
+ color: ${colors.primary};
711
+ flex-shrink: 0;
712
+ `,
713
+ title: css3`
714
+ font-size: ${fontSize.xl};
715
+ font-weight: 600;
716
+ color: ${colors.text};
717
+ margin: 0;
718
+ `,
719
+ closeBtn: css3`
720
+ margin-left: auto;
721
+ background: none;
722
+ border: none;
723
+ padding: 4px;
724
+ cursor: pointer;
725
+ color: ${colors.textMuted};
726
+ border-radius: 4px;
727
+
728
+ &:hover {
729
+ color: ${colors.text};
730
+ background: ${colors.surfaceHover};
731
+ }
732
+ `,
733
+ closeIcon: css3`
734
+ width: 20px;
735
+ height: 20px;
736
+ `,
737
+ content: css3`
738
+ padding: 24px;
739
+ `,
740
+ intro: css3`
741
+ font-size: ${fontSize.base};
742
+ color: ${colors.textSecondary};
743
+ margin: 0 0 20px 0;
744
+ line-height: 1.6;
745
+ `,
746
+ steps: css3`
747
+ list-style: none;
748
+ padding: 0;
749
+ margin: 0;
750
+ display: flex;
751
+ flex-direction: column;
752
+ gap: 16px;
753
+ `,
754
+ step: css3`
755
+ display: flex;
756
+ gap: 12px;
757
+ `,
758
+ stepNumber: css3`
759
+ width: 28px;
760
+ height: 28px;
761
+ border-radius: 50%;
762
+ background: ${colors.primaryLight};
763
+ color: ${colors.primary};
764
+ font-size: ${fontSize.sm};
765
+ font-weight: 600;
766
+ display: flex;
767
+ align-items: center;
768
+ justify-content: center;
769
+ flex-shrink: 0;
770
+ `,
771
+ stepContent: css3`
772
+ flex: 1;
773
+ padding-top: 3px;
774
+ `,
775
+ stepTitle: css3`
776
+ font-size: ${fontSize.base};
777
+ font-weight: 500;
778
+ color: ${colors.text};
779
+ margin: 0 0 4px 0;
780
+ `,
781
+ stepDesc: css3`
782
+ font-size: ${fontSize.sm};
783
+ color: ${colors.textSecondary};
784
+ margin: 0;
785
+ line-height: 1.5;
786
+ `,
787
+ link: css3`
788
+ color: ${colors.primary};
789
+ text-decoration: none;
790
+ font-weight: 500;
791
+
792
+ &:hover {
793
+ text-decoration: underline;
794
+ }
795
+ `,
796
+ envVars: css3`
797
+ background: ${colors.background};
798
+ border: 1px solid ${colors.border};
799
+ border-radius: 8px;
800
+ padding: 16px;
801
+ margin-top: 20px;
802
+ font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
803
+ font-size: 13px;
804
+ line-height: 1.8;
805
+ color: ${colors.text};
806
+ overflow-x: auto;
807
+ `,
808
+ envVar: css3`
809
+ display: block;
810
+ `,
811
+ envKey: css3`
812
+ color: ${colors.primary};
813
+ `,
814
+ envValue: css3`
815
+ color: ${colors.textSecondary};
816
+ `,
817
+ footer: css3`
818
+ padding: 16px 24px;
819
+ border-top: 1px solid ${colors.border};
820
+ display: flex;
821
+ justify-content: flex-end;
822
+ gap: 12px;
823
+ `,
824
+ docsBtn: css3`
825
+ padding: 10px 16px;
826
+ border-radius: 6px;
827
+ font-size: ${fontSize.base};
828
+ font-weight: 500;
829
+ border: 1px solid ${colors.border};
830
+ background: ${colors.surface};
831
+ color: ${colors.text};
832
+ cursor: pointer;
833
+ text-decoration: none;
834
+ display: inline-flex;
835
+ align-items: center;
836
+ gap: 6px;
837
+ transition: all 0.15s ease;
838
+
839
+ &:hover {
840
+ background: ${colors.surfaceHover};
841
+ border-color: #d0d5dd;
842
+ }
843
+ `,
844
+ doneBtn: css3`
845
+ padding: 10px 20px;
846
+ border-radius: 6px;
847
+ font-size: ${fontSize.base};
848
+ font-weight: 500;
849
+ border: none;
850
+ background: ${colors.primary};
851
+ color: white;
852
+ cursor: pointer;
853
+ transition: background 0.15s ease;
854
+
855
+ &:hover {
856
+ background: ${colors.primaryHover};
857
+ }
858
+ `,
859
+ externalIcon: css3`
860
+ width: 14px;
861
+ height: 14px;
862
+ `
863
+ };
864
+ function R2SetupModal({ isOpen, onClose }) {
865
+ if (!isOpen) return null;
866
+ return /* @__PURE__ */ jsx3("div", { css: styles3.overlay, onClick: onClose, children: /* @__PURE__ */ jsxs3("div", { css: styles3.modal, onClick: (e) => e.stopPropagation(), children: [
867
+ /* @__PURE__ */ jsxs3("div", { css: styles3.header, children: [
868
+ /* @__PURE__ */ jsx3("svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z" }) }),
869
+ /* @__PURE__ */ jsx3("h2", { css: styles3.title, children: "Set Up CDN Storage" }),
870
+ /* @__PURE__ */ jsx3("button", { css: styles3.closeBtn, onClick: onClose, children: /* @__PURE__ */ jsx3("svg", { css: styles3.closeIcon, 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" }) }) })
871
+ ] }),
872
+ /* @__PURE__ */ jsxs3("div", { css: styles3.content, children: [
873
+ /* @__PURE__ */ jsx3("p", { css: styles3.intro, children: "Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees." }),
874
+ /* @__PURE__ */ jsxs3("ol", { css: styles3.steps, children: [
875
+ /* @__PURE__ */ jsxs3("li", { css: styles3.step, children: [
876
+ /* @__PURE__ */ jsx3("span", { css: styles3.stepNumber, children: "1" }),
877
+ /* @__PURE__ */ jsxs3("div", { css: styles3.stepContent, children: [
878
+ /* @__PURE__ */ jsx3("h4", { css: styles3.stepTitle, children: "Create a Cloudflare account" }),
879
+ /* @__PURE__ */ jsxs3("p", { css: styles3.stepDesc, children: [
880
+ "Sign up at",
881
+ " ",
882
+ /* @__PURE__ */ jsx3("a", { css: styles3.link, href: "https://dash.cloudflare.com/sign-up", target: "_blank", rel: "noopener noreferrer", children: "dash.cloudflare.com" }),
883
+ " ",
884
+ "if you don't have one already."
885
+ ] })
886
+ ] })
887
+ ] }),
888
+ /* @__PURE__ */ jsxs3("li", { css: styles3.step, children: [
889
+ /* @__PURE__ */ jsx3("span", { css: styles3.stepNumber, children: "2" }),
890
+ /* @__PURE__ */ jsxs3("div", { css: styles3.stepContent, children: [
891
+ /* @__PURE__ */ jsx3("h4", { css: styles3.stepTitle, children: "Create an R2 bucket" }),
892
+ /* @__PURE__ */ jsxs3("p", { css: styles3.stepDesc, children: [
893
+ "Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",
894
+ /* @__PURE__ */ jsx3("code", { children: "my-images" }),
895
+ "."
896
+ ] })
897
+ ] })
898
+ ] }),
899
+ /* @__PURE__ */ jsxs3("li", { css: styles3.step, children: [
900
+ /* @__PURE__ */ jsx3("span", { css: styles3.stepNumber, children: "3" }),
901
+ /* @__PURE__ */ jsxs3("div", { css: styles3.stepContent, children: [
902
+ /* @__PURE__ */ jsx3("h4", { css: styles3.stepTitle, children: "Enable public access" }),
903
+ /* @__PURE__ */ jsxs3("p", { css: styles3.stepDesc, children: [
904
+ 'In bucket settings, enable "Public Access" and copy the public URL (e.g., ',
905
+ /* @__PURE__ */ jsx3("code", { children: "https://pub-xxx.r2.dev" }),
906
+ ")."
907
+ ] })
908
+ ] })
909
+ ] }),
910
+ /* @__PURE__ */ jsxs3("li", { css: styles3.step, children: [
911
+ /* @__PURE__ */ jsx3("span", { css: styles3.stepNumber, children: "4" }),
912
+ /* @__PURE__ */ jsxs3("div", { css: styles3.stepContent, children: [
913
+ /* @__PURE__ */ jsx3("h4", { css: styles3.stepTitle, children: "Create API token" }),
914
+ /* @__PURE__ */ jsx3("p", { css: styles3.stepDesc, children: 'Go to R2 \u2192 Manage R2 API Tokens \u2192 Create API Token. Select "Object Read & Write" permissions for your bucket.' })
915
+ ] })
916
+ ] }),
917
+ /* @__PURE__ */ jsxs3("li", { css: styles3.step, children: [
918
+ /* @__PURE__ */ jsx3("span", { css: styles3.stepNumber, children: "5" }),
919
+ /* @__PURE__ */ jsxs3("div", { css: styles3.stepContent, children: [
920
+ /* @__PURE__ */ jsx3("h4", { css: styles3.stepTitle, children: "Add environment variables" }),
921
+ /* @__PURE__ */ jsxs3("p", { css: styles3.stepDesc, children: [
922
+ "Add these to your ",
923
+ /* @__PURE__ */ jsx3("code", { children: ".env.local" }),
924
+ " file:"
925
+ ] })
926
+ ] })
927
+ ] })
928
+ ] }),
929
+ /* @__PURE__ */ jsxs3("div", { css: styles3.envVars, children: [
930
+ /* @__PURE__ */ jsxs3("span", { css: styles3.envVar, children: [
931
+ /* @__PURE__ */ jsx3("span", { css: styles3.envKey, children: "CLOUDFLARE_R2_ACCOUNT_ID" }),
932
+ "=",
933
+ /* @__PURE__ */ jsx3("span", { css: styles3.envValue, children: "your_account_id" })
934
+ ] }),
935
+ /* @__PURE__ */ jsxs3("span", { css: styles3.envVar, children: [
936
+ /* @__PURE__ */ jsx3("span", { css: styles3.envKey, children: "CLOUDFLARE_R2_ACCESS_KEY_ID" }),
937
+ "=",
938
+ /* @__PURE__ */ jsx3("span", { css: styles3.envValue, children: "your_access_key" })
939
+ ] }),
940
+ /* @__PURE__ */ jsxs3("span", { css: styles3.envVar, children: [
941
+ /* @__PURE__ */ jsx3("span", { css: styles3.envKey, children: "CLOUDFLARE_R2_SECRET_ACCESS_KEY" }),
942
+ "=",
943
+ /* @__PURE__ */ jsx3("span", { css: styles3.envValue, children: "your_secret_key" })
944
+ ] }),
945
+ /* @__PURE__ */ jsxs3("span", { css: styles3.envVar, children: [
946
+ /* @__PURE__ */ jsx3("span", { css: styles3.envKey, children: "CLOUDFLARE_R2_BUCKET_NAME" }),
947
+ "=",
948
+ /* @__PURE__ */ jsx3("span", { css: styles3.envValue, children: "your_bucket_name" })
949
+ ] }),
950
+ /* @__PURE__ */ jsxs3("span", { css: styles3.envVar, children: [
951
+ /* @__PURE__ */ jsx3("span", { css: styles3.envKey, children: "CLOUDFLARE_R2_PUBLIC_URL" }),
952
+ "=",
953
+ /* @__PURE__ */ jsx3("span", { css: styles3.envValue, children: "https://pub-xxx.r2.dev" })
954
+ ] })
955
+ ] })
956
+ ] }),
957
+ /* @__PURE__ */ jsxs3("div", { css: styles3.footer, children: [
958
+ /* @__PURE__ */ jsxs3(
959
+ "a",
960
+ {
961
+ css: styles3.docsBtn,
962
+ href: "https://developers.cloudflare.com/r2/get-started/",
963
+ target: "_blank",
964
+ rel: "noopener noreferrer",
965
+ children: [
966
+ "R2 Documentation",
967
+ /* @__PURE__ */ jsx3("svg", { css: styles3.externalIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })
968
+ ]
969
+ }
970
+ ),
971
+ /* @__PURE__ */ jsx3("button", { css: styles3.doneBtn, onClick: onClose, children: "Got it" })
972
+ ] })
973
+ ] }) });
974
+ }
975
+
677
976
  // src/components/StudioToolbar.tsx
678
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "@emotion/react/jsx-runtime";
977
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
679
978
  var btnHeight = "36px";
680
979
  var spin = keyframes3`
681
980
  to { transform: rotate(360deg); }
682
981
  `;
683
- var styles3 = {
684
- toolbar: css3`
982
+ var styles4 = {
983
+ toolbar: css4`
685
984
  display: flex;
686
985
  flex-wrap: nowrap;
687
986
  align-items: center;
@@ -697,21 +996,21 @@ var styles3 = {
697
996
  padding: 12px 24px;
698
997
  }
699
998
  `,
700
- left: css3`
999
+ left: css4`
701
1000
  display: flex;
702
1001
  flex-wrap: nowrap;
703
1002
  flex-shrink: 0;
704
1003
  align-items: center;
705
1004
  gap: 8px;
706
1005
  `,
707
- right: css3`
1006
+ right: css4`
708
1007
  display: flex;
709
1008
  flex-wrap: nowrap;
710
1009
  flex-shrink: 0;
711
1010
  align-items: center;
712
1011
  gap: 8px;
713
1012
  `,
714
- btn: css3`
1013
+ btn: css4`
715
1014
  display: inline-flex;
716
1015
  align-items: center;
717
1016
  justify-content: center;
@@ -738,10 +1037,10 @@ var styles3 = {
738
1037
  opacity: 0.5;
739
1038
  }
740
1039
  `,
741
- btnIconOnly: css3`
1040
+ btnIconOnly: css4`
742
1041
  padding: 0 10px;
743
1042
  `,
744
- btnPrimary: css3`
1043
+ btnPrimary: css4`
745
1044
  background: ${colors.primary};
746
1045
  border-color: ${colors.primary};
747
1046
  color: white;
@@ -751,7 +1050,7 @@ var styles3 = {
751
1050
  border-color: ${colors.primaryHover};
752
1051
  }
753
1052
  `,
754
- btnDanger: css3`
1053
+ btnDanger: css4`
755
1054
  color: ${colors.danger};
756
1055
 
757
1056
  &:hover:not(:disabled) {
@@ -759,14 +1058,14 @@ var styles3 = {
759
1058
  border-color: ${colors.danger};
760
1059
  }
761
1060
  `,
762
- icon: css3`
1061
+ icon: css4`
763
1062
  width: 16px;
764
1063
  height: 16px;
765
1064
  `,
766
- iconSpin: css3`
1065
+ iconSpin: css4`
767
1066
  animation: ${spin} 1s linear infinite;
768
1067
  `,
769
- selectionCount: css3`
1068
+ selectionCount: css4`
770
1069
  font-size: ${fontSize.base};
771
1070
  color: ${colors.textSecondary};
772
1071
  display: flex;
@@ -774,7 +1073,7 @@ var styles3 = {
774
1073
  gap: 8px;
775
1074
  margin-right: 8px;
776
1075
  `,
777
- clearBtn: css3`
1076
+ clearBtn: css4`
778
1077
  color: ${colors.primary};
779
1078
  background: none;
780
1079
  border: none;
@@ -787,13 +1086,13 @@ var styles3 = {
787
1086
  text-decoration: underline;
788
1087
  }
789
1088
  `,
790
- divider: css3`
1089
+ divider: css4`
791
1090
  width: 1px;
792
1091
  height: 24px;
793
1092
  background: ${colors.border};
794
1093
  margin: 0 4px;
795
1094
  `,
796
- viewToggle: css3`
1095
+ viewToggle: css4`
797
1096
  display: flex;
798
1097
  align-items: center;
799
1098
  height: ${btnHeight};
@@ -802,12 +1101,12 @@ var styles3 = {
802
1101
  border-radius: 6px;
803
1102
  overflow: hidden;
804
1103
  `,
805
- searchWrapper: css3`
1104
+ searchWrapper: css4`
806
1105
  position: relative;
807
1106
  display: flex;
808
1107
  align-items: center;
809
1108
  `,
810
- searchInput: css3`
1109
+ searchInput: css4`
811
1110
  height: ${btnHeight};
812
1111
  padding: 0 32px 0 12px;
813
1112
  border: 1px solid ${colors.border};
@@ -828,7 +1127,7 @@ var styles3 = {
828
1127
  color: ${colors.textMuted};
829
1128
  }
830
1129
  `,
831
- searchClearBtn: css3`
1130
+ searchClearBtn: css4`
832
1131
  position: absolute;
833
1132
  right: 5px;
834
1133
  top: 5px;
@@ -848,7 +1147,7 @@ var styles3 = {
848
1147
  background: ${colors.primaryHover};
849
1148
  }
850
1149
  `,
851
- viewBtn: css3`
1150
+ viewBtn: css4`
852
1151
  height: 100%;
853
1152
  padding: 0 10px;
854
1153
  background: transparent;
@@ -865,7 +1164,7 @@ var styles3 = {
865
1164
  background-color: ${colors.surfaceHover};
866
1165
  }
867
1166
  `,
868
- viewBtnActive: css3`
1167
+ viewBtnActive: css4`
869
1168
  background-color: ${colors.primaryLight};
870
1169
  color: ${colors.primary};
871
1170
 
@@ -898,6 +1197,8 @@ function StudioToolbar() {
898
1197
  const [showNewFolderModal, setShowNewFolderModal] = useState2(false);
899
1198
  const [showRenameFolderModal, setShowRenameFolderModal] = useState2(false);
900
1199
  const [showMoveModal, setShowMoveModal] = useState2(false);
1200
+ const [showR2SetupModal, setShowR2SetupModal] = useState2(false);
1201
+ const [syncing, setSyncing] = useState2(false);
901
1202
  const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
902
1203
  const handleUpload = useCallback(() => {
903
1204
  fileInputRef.current?.click();
@@ -1194,9 +1495,60 @@ function StudioToolbar() {
1194
1495
  });
1195
1496
  }
1196
1497
  }, [selectedItems, clearSelection, triggerRefresh]);
1197
- const handleSyncCdn = useCallback(() => {
1198
- console.log("Sync CDN clicked", selectedItems);
1199
- }, [selectedItems]);
1498
+ const handleSyncCdn = useCallback(async () => {
1499
+ if (selectedItems.size === 0) return;
1500
+ const imageKeys = Array.from(selectedItems).filter((p) => !p.endsWith("/")).map((p) => "/" + p.replace(/^public\//, ""));
1501
+ if (imageKeys.length === 0) {
1502
+ setAlertMessage({
1503
+ title: "No Images Selected",
1504
+ message: "Please select image files to sync to CDN."
1505
+ });
1506
+ return;
1507
+ }
1508
+ setSyncing(true);
1509
+ try {
1510
+ const response = await fetch("/api/studio/sync", {
1511
+ method: "POST",
1512
+ headers: { "Content-Type": "application/json" },
1513
+ body: JSON.stringify({ imageKeys })
1514
+ });
1515
+ const data = await response.json();
1516
+ if (response.ok) {
1517
+ const syncedCount = data.synced?.length || 0;
1518
+ const errorCount = data.errors?.length || 0;
1519
+ if (errorCount > 0) {
1520
+ setAlertMessage({
1521
+ title: "Sync Partially Complete",
1522
+ message: `Synced ${syncedCount} images. ${errorCount} failed.`
1523
+ });
1524
+ } else {
1525
+ setAlertMessage({
1526
+ title: "Sync Complete",
1527
+ message: `Successfully synced ${syncedCount} images to CDN.`
1528
+ });
1529
+ }
1530
+ clearSelection();
1531
+ triggerRefresh();
1532
+ } else {
1533
+ if (data.error?.includes("R2 not configured") || data.error?.includes("CLOUDFLARE_R2")) {
1534
+ setShowR2SetupModal(true);
1535
+ } else {
1536
+ setAlertMessage({
1537
+ title: "Sync Failed",
1538
+ message: data.error || "Failed to sync to CDN."
1539
+ });
1540
+ }
1541
+ }
1542
+ } catch (error) {
1543
+ console.error("Sync error:", error);
1544
+ setAlertMessage({
1545
+ title: "Sync Failed",
1546
+ message: "Failed to sync to CDN. Check console for details."
1547
+ });
1548
+ } finally {
1549
+ setSyncing(false);
1550
+ }
1551
+ }, [selectedItems, clearSelection, triggerRefresh]);
1200
1552
  const handleCreateFolder = useCallback(async (folderName) => {
1201
1553
  setShowNewFolderModal(false);
1202
1554
  try {
@@ -1293,8 +1645,8 @@ function StudioToolbar() {
1293
1645
  if (focusedItem) {
1294
1646
  return null;
1295
1647
  }
1296
- return /* @__PURE__ */ jsxs3(Fragment2, { children: [
1297
- showDeleteConfirm && /* @__PURE__ */ jsx3(
1648
+ return /* @__PURE__ */ jsxs4(Fragment2, { children: [
1649
+ showDeleteConfirm && /* @__PURE__ */ jsx4(
1298
1650
  ConfirmModal,
1299
1651
  {
1300
1652
  title: "Delete Items",
@@ -1305,7 +1657,7 @@ function StudioToolbar() {
1305
1657
  onCancel: () => setShowDeleteConfirm(false)
1306
1658
  }
1307
1659
  ),
1308
- showProcessConfirm && /* @__PURE__ */ jsx3(
1660
+ showProcessConfirm && /* @__PURE__ */ jsx4(
1309
1661
  ConfirmModal,
1310
1662
  {
1311
1663
  title: "Process Images",
@@ -1315,7 +1667,7 @@ function StudioToolbar() {
1315
1667
  onCancel: () => setShowProcessConfirm(false)
1316
1668
  }
1317
1669
  ),
1318
- showProgress && /* @__PURE__ */ jsx3(
1670
+ showProgress && /* @__PURE__ */ jsx4(
1319
1671
  ProgressModal,
1320
1672
  {
1321
1673
  title: "Processing Images",
@@ -1332,7 +1684,7 @@ function StudioToolbar() {
1332
1684
  }
1333
1685
  }
1334
1686
  ),
1335
- showNewFolderModal && /* @__PURE__ */ jsx3(
1687
+ showNewFolderModal && /* @__PURE__ */ jsx4(
1336
1688
  InputModal,
1337
1689
  {
1338
1690
  title: "New Folder",
@@ -1343,7 +1695,7 @@ function StudioToolbar() {
1343
1695
  onCancel: () => setShowNewFolderModal(false)
1344
1696
  }
1345
1697
  ),
1346
- showMoveModal && /* @__PURE__ */ jsx3(
1698
+ showMoveModal && /* @__PURE__ */ jsx4(
1347
1699
  StudioFolderPicker,
1348
1700
  {
1349
1701
  selectedItems,
@@ -1355,7 +1707,7 @@ function StudioToolbar() {
1355
1707
  onCancel: () => setShowMoveModal(false)
1356
1708
  }
1357
1709
  ),
1358
- showRenameFolderModal && selectedFolderPath && /* @__PURE__ */ jsx3(
1710
+ showRenameFolderModal && selectedFolderPath && /* @__PURE__ */ jsx4(
1359
1711
  InputModal,
1360
1712
  {
1361
1713
  title: "Rename Folder",
@@ -1367,7 +1719,7 @@ function StudioToolbar() {
1367
1719
  onCancel: () => setShowRenameFolderModal(false)
1368
1720
  }
1369
1721
  ),
1370
- alertMessage && /* @__PURE__ */ jsx3(
1722
+ alertMessage && /* @__PURE__ */ jsx4(
1371
1723
  AlertModal,
1372
1724
  {
1373
1725
  title: alertMessage.title,
@@ -1375,8 +1727,15 @@ function StudioToolbar() {
1375
1727
  onClose: () => setAlertMessage(null)
1376
1728
  }
1377
1729
  ),
1378
- /* @__PURE__ */ jsxs3("div", { css: styles3.toolbar, children: [
1379
- /* @__PURE__ */ jsx3(
1730
+ /* @__PURE__ */ jsx4(
1731
+ R2SetupModal,
1732
+ {
1733
+ isOpen: showR2SetupModal,
1734
+ onClose: () => setShowR2SetupModal(false)
1735
+ }
1736
+ ),
1737
+ /* @__PURE__ */ jsxs4("div", { css: styles4.toolbar, children: [
1738
+ /* @__PURE__ */ jsx4(
1380
1739
  "input",
1381
1740
  {
1382
1741
  ref: fileInputRef,
@@ -1387,87 +1746,87 @@ function StudioToolbar() {
1387
1746
  style: { display: "none" }
1388
1747
  }
1389
1748
  ),
1390
- /* @__PURE__ */ jsxs3("div", { css: styles3.left, children: [
1391
- /* @__PURE__ */ jsxs3(
1749
+ /* @__PURE__ */ jsxs4("div", { css: styles4.left, children: [
1750
+ /* @__PURE__ */ jsxs4(
1392
1751
  "button",
1393
1752
  {
1394
- css: [styles3.btn, styles3.btnPrimary],
1753
+ css: [styles4.btn, styles4.btnPrimary],
1395
1754
  onClick: handleUpload,
1396
1755
  disabled: uploading || isInImagesFolder,
1397
1756
  children: [
1398
- /* @__PURE__ */ jsx3(UploadIcon, {}),
1757
+ /* @__PURE__ */ jsx4(UploadIcon, {}),
1399
1758
  uploading ? "Uploading..." : "Upload"
1400
1759
  ]
1401
1760
  }
1402
1761
  ),
1403
- /* @__PURE__ */ jsxs3(
1762
+ /* @__PURE__ */ jsxs4(
1404
1763
  "button",
1405
1764
  {
1406
- css: styles3.btn,
1765
+ css: styles4.btn,
1407
1766
  onClick: () => singleFolderSelected ? setShowRenameFolderModal(true) : setShowNewFolderModal(true),
1408
1767
  disabled: isInImagesFolder && !singleFolderSelected,
1409
1768
  title: isInImagesFolder && !singleFolderSelected ? "Cannot create folders in protected images folder" : void 0,
1410
1769
  children: [
1411
- singleFolderSelected ? /* @__PURE__ */ jsx3(RenameIcon, {}) : /* @__PURE__ */ jsx3(FolderPlusIcon, {}),
1770
+ singleFolderSelected ? /* @__PURE__ */ jsx4(RenameIcon, {}) : /* @__PURE__ */ jsx4(FolderPlusIcon, {}),
1412
1771
  singleFolderSelected ? "Rename Folder" : "New Folder"
1413
1772
  ]
1414
1773
  }
1415
1774
  ),
1416
- /* @__PURE__ */ jsx3("div", { css: styles3.divider }),
1417
- /* @__PURE__ */ jsxs3(
1775
+ /* @__PURE__ */ jsx4("div", { css: styles4.divider }),
1776
+ /* @__PURE__ */ jsxs4(
1418
1777
  "button",
1419
1778
  {
1420
- css: styles3.btn,
1779
+ css: styles4.btn,
1421
1780
  onClick: handleProcessImages,
1422
1781
  disabled: processing || isInImagesFolder,
1423
1782
  title: isInImagesFolder ? "Cannot process images folder" : void 0,
1424
1783
  children: [
1425
- /* @__PURE__ */ jsx3(ImageStackIcon, {}),
1784
+ /* @__PURE__ */ jsx4(ImageStackIcon, {}),
1426
1785
  processing ? "Processing..." : "Process Images"
1427
1786
  ]
1428
1787
  }
1429
1788
  ),
1430
- /* @__PURE__ */ jsxs3(
1789
+ /* @__PURE__ */ jsxs4(
1431
1790
  "button",
1432
1791
  {
1433
- css: [styles3.btn, styles3.btnDanger],
1792
+ css: [styles4.btn, styles4.btnDanger],
1434
1793
  onClick: handleDeleteClick,
1435
1794
  disabled: !hasSelection,
1436
1795
  children: [
1437
- /* @__PURE__ */ jsx3(TrashIcon, {}),
1796
+ /* @__PURE__ */ jsx4(TrashIcon, {}),
1438
1797
  "Delete"
1439
1798
  ]
1440
1799
  }
1441
1800
  ),
1442
- /* @__PURE__ */ jsxs3(
1801
+ /* @__PURE__ */ jsxs4(
1443
1802
  "button",
1444
1803
  {
1445
- css: styles3.btn,
1804
+ css: styles4.btn,
1446
1805
  onClick: handleMoveClick,
1447
1806
  disabled: !hasSelection,
1448
1807
  children: [
1449
- /* @__PURE__ */ jsx3(MoveIcon, {}),
1808
+ /* @__PURE__ */ jsx4(MoveIcon, {}),
1450
1809
  "Move"
1451
1810
  ]
1452
1811
  }
1453
1812
  ),
1454
- /* @__PURE__ */ jsxs3(
1813
+ /* @__PURE__ */ jsxs4(
1455
1814
  "button",
1456
1815
  {
1457
- css: styles3.btn,
1816
+ css: styles4.btn,
1458
1817
  onClick: handleSyncCdn,
1459
- disabled: !hasSelection,
1818
+ disabled: !hasSelection || syncing,
1460
1819
  children: [
1461
- /* @__PURE__ */ jsx3(CloudIcon, {}),
1462
- "Sync CDN"
1820
+ /* @__PURE__ */ jsx4(CloudIcon, {}),
1821
+ syncing ? "Syncing..." : "Sync CDN"
1463
1822
  ]
1464
1823
  }
1465
1824
  ),
1466
- /* @__PURE__ */ jsxs3("div", { css: styles3.searchWrapper, children: [
1467
- /* @__PURE__ */ jsx3(
1825
+ /* @__PURE__ */ jsxs4("div", { css: styles4.searchWrapper, children: [
1826
+ /* @__PURE__ */ jsx4(
1468
1827
  "input",
1469
1828
  {
1470
- css: styles3.searchInput,
1829
+ css: styles4.searchInput,
1471
1830
  type: "text",
1472
1831
  placeholder: "Search images...",
1473
1832
  value: searchQuery,
@@ -1475,48 +1834,48 @@ function StudioToolbar() {
1475
1834
  onKeyDown: handleSearchKeyDown
1476
1835
  }
1477
1836
  ),
1478
- searchQuery && /* @__PURE__ */ jsx3(
1837
+ searchQuery && /* @__PURE__ */ jsx4(
1479
1838
  "button",
1480
1839
  {
1481
- css: styles3.searchClearBtn,
1840
+ css: styles4.searchClearBtn,
1482
1841
  onClick: () => setSearchQuery(""),
1483
1842
  title: "Clear search",
1484
- 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" }) })
1843
+ children: /* @__PURE__ */ jsx4("svg", { width: "14", height: "14", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1485
1844
  }
1486
1845
  )
1487
1846
  ] })
1488
1847
  ] }),
1489
- /* @__PURE__ */ jsxs3("div", { css: styles3.right, children: [
1490
- hasSelection && /* @__PURE__ */ jsxs3("span", { css: styles3.selectionCount, children: [
1848
+ /* @__PURE__ */ jsxs4("div", { css: styles4.right, children: [
1849
+ hasSelection && /* @__PURE__ */ jsxs4("span", { css: styles4.selectionCount, children: [
1491
1850
  selectedItems.size,
1492
1851
  " selected",
1493
- /* @__PURE__ */ jsx3("button", { css: styles3.clearBtn, onClick: clearSelection, children: "Clear" })
1852
+ /* @__PURE__ */ jsx4("button", { css: styles4.clearBtn, onClick: clearSelection, children: "Clear" })
1494
1853
  ] }),
1495
- /* @__PURE__ */ jsx3(
1854
+ /* @__PURE__ */ jsx4(
1496
1855
  "button",
1497
1856
  {
1498
- css: [styles3.btn, styles3.btnIconOnly],
1857
+ css: [styles4.btn, styles4.btnIconOnly],
1499
1858
  onClick: handleRefresh,
1500
- children: /* @__PURE__ */ jsx3(RefreshIcon, { spinning: refreshing })
1859
+ children: /* @__PURE__ */ jsx4(RefreshIcon, { spinning: refreshing })
1501
1860
  }
1502
1861
  ),
1503
- /* @__PURE__ */ jsxs3("div", { css: styles3.viewToggle, children: [
1504
- /* @__PURE__ */ jsx3(
1862
+ /* @__PURE__ */ jsxs4("div", { css: styles4.viewToggle, children: [
1863
+ /* @__PURE__ */ jsx4(
1505
1864
  "button",
1506
1865
  {
1507
- css: [styles3.viewBtn, viewMode === "grid" && styles3.viewBtnActive],
1866
+ css: [styles4.viewBtn, viewMode === "grid" && styles4.viewBtnActive],
1508
1867
  onClick: () => setViewMode("grid"),
1509
1868
  "aria-label": "Grid view",
1510
- children: /* @__PURE__ */ jsx3(GridIcon, {})
1869
+ children: /* @__PURE__ */ jsx4(GridIcon, {})
1511
1870
  }
1512
1871
  ),
1513
- /* @__PURE__ */ jsx3(
1872
+ /* @__PURE__ */ jsx4(
1514
1873
  "button",
1515
1874
  {
1516
- css: [styles3.viewBtn, viewMode === "list" && styles3.viewBtnActive],
1875
+ css: [styles4.viewBtn, viewMode === "list" && styles4.viewBtnActive],
1517
1876
  onClick: () => setViewMode("list"),
1518
1877
  "aria-label": "List view",
1519
- children: /* @__PURE__ */ jsx3(ListIcon, {})
1878
+ children: /* @__PURE__ */ jsx4(ListIcon, {})
1520
1879
  }
1521
1880
  )
1522
1881
  ] })
@@ -1525,39 +1884,39 @@ function StudioToolbar() {
1525
1884
  ] });
1526
1885
  }
1527
1886
  function UploadIcon() {
1528
- 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" }) });
1887
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1529
1888
  }
1530
1889
  function RefreshIcon({ spinning }) {
1531
- 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" }) });
1890
+ return /* @__PURE__ */ jsx4("svg", { css: [styles4.icon, spinning && styles4.iconSpin], fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1532
1891
  }
1533
1892
  function TrashIcon() {
1534
- 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" }) });
1893
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1535
1894
  }
1536
1895
  function FolderPlusIcon() {
1537
- 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" }) });
1896
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1538
1897
  }
1539
1898
  function RenameIcon() {
1540
- return /* @__PURE__ */ jsx3("svg", { css: styles3.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) });
1899
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) });
1541
1900
  }
1542
1901
  function MoveIcon() {
1543
- 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" }) });
1902
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) });
1544
1903
  }
1545
1904
  function CloudIcon() {
1546
- 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" }) });
1905
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1547
1906
  }
1548
1907
  function GridIcon() {
1549
- 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" }) });
1908
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("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" }) });
1550
1909
  }
1551
1910
  function ListIcon() {
1552
- 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" }) });
1911
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) });
1553
1912
  }
1554
1913
  function ImageStackIcon() {
1555
- 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" }) });
1914
+ return /* @__PURE__ */ jsx4("svg", { css: styles4.icon, 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" }) });
1556
1915
  }
1557
1916
 
1558
1917
  // src/components/StudioFileGrid.tsx
1559
1918
  import { useState as useState4 } from "react";
1560
- import { css as css4, keyframes as keyframes4 } from "@emotion/react";
1919
+ import { css as css5, keyframes as keyframes4 } from "@emotion/react";
1561
1920
 
1562
1921
  // src/hooks/useFileList.ts
1563
1922
  import { useEffect as useEffect2, useState as useState3, useRef as useRef2, useCallback as useCallback2 } from "react";
@@ -1746,18 +2105,18 @@ function useFileList() {
1746
2105
  }
1747
2106
 
1748
2107
  // src/components/StudioFileGrid.tsx
1749
- import { jsx as jsx4, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
2108
+ import { jsx as jsx5, jsxs as jsxs5 } from "@emotion/react/jsx-runtime";
1750
2109
  var spin2 = keyframes4`
1751
2110
  to { transform: rotate(360deg); }
1752
2111
  `;
1753
- var styles4 = {
1754
- loading: css4`
2112
+ var styles5 = {
2113
+ loading: css5`
1755
2114
  display: flex;
1756
2115
  align-items: center;
1757
2116
  justify-content: center;
1758
2117
  height: 256px;
1759
2118
  `,
1760
- spinner: css4`
2119
+ spinner: css5`
1761
2120
  width: 32px;
1762
2121
  height: 32px;
1763
2122
  border-radius: 50%;
@@ -1765,7 +2124,7 @@ var styles4 = {
1765
2124
  border-top-color: ${colors.primary};
1766
2125
  animation: ${spin2} 0.8s linear infinite;
1767
2126
  `,
1768
- empty: css4`
2127
+ empty: css5`
1769
2128
  display: flex;
1770
2129
  flex-direction: column;
1771
2130
  align-items: center;
@@ -1773,13 +2132,13 @@ var styles4 = {
1773
2132
  height: 256px;
1774
2133
  color: ${colors.textSecondary};
1775
2134
  `,
1776
- emptyIcon: css4`
2135
+ emptyIcon: css5`
1777
2136
  width: 48px;
1778
2137
  height: 48px;
1779
2138
  margin-bottom: 16px;
1780
2139
  opacity: 0.5;
1781
2140
  `,
1782
- emptyText: css4`
2141
+ emptyText: css5`
1783
2142
  font-size: ${fontSize.base};
1784
2143
  margin: 0 0 4px 0;
1785
2144
 
@@ -1788,7 +2147,7 @@ var styles4 = {
1788
2147
  font-size: ${fontSize.sm};
1789
2148
  }
1790
2149
  `,
1791
- grid: css4`
2150
+ grid: css5`
1792
2151
  display: grid;
1793
2152
  grid-template-columns: 1fr;
1794
2153
  gap: 12px;
@@ -1798,7 +2157,7 @@ var styles4 = {
1798
2157
  @media (min-width: 1024px) { grid-template-columns: repeat(4, 1fr); }
1799
2158
  @media (min-width: 1280px) { grid-template-columns: repeat(5, 1fr); }
1800
2159
  `,
1801
- item: css4`
2160
+ item: css5`
1802
2161
  position: relative;
1803
2162
  border-radius: 8px;
1804
2163
  border: 1px solid ${colors.border};
@@ -1814,7 +2173,7 @@ var styles4 = {
1814
2173
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
1815
2174
  }
1816
2175
  `,
1817
- itemSelected: css4`
2176
+ itemSelected: css5`
1818
2177
  border-color: ${colors.primary};
1819
2178
  box-shadow: 0 0 0 1px ${colors.primary};
1820
2179
 
@@ -1823,14 +2182,14 @@ var styles4 = {
1823
2182
  box-shadow: 0 0 0 1px ${colors.primary};
1824
2183
  }
1825
2184
  `,
1826
- parentItem: css4`
2185
+ parentItem: css5`
1827
2186
  cursor: pointer;
1828
2187
 
1829
2188
  &:hover {
1830
2189
  border-color: ${colors.primary};
1831
2190
  }
1832
2191
  `,
1833
- checkboxWrapper: css4`
2192
+ checkboxWrapper: css5`
1834
2193
  position: absolute;
1835
2194
  top: 0;
1836
2195
  left: 0;
@@ -1838,13 +2197,13 @@ var styles4 = {
1838
2197
  padding: 8px;
1839
2198
  cursor: pointer;
1840
2199
  `,
1841
- checkbox: css4`
2200
+ checkbox: css5`
1842
2201
  width: 18px;
1843
2202
  height: 18px;
1844
2203
  accent-color: ${colors.primary};
1845
2204
  cursor: pointer;
1846
2205
  `,
1847
- cdnBadge: css4`
2206
+ cdnBadge: css5`
1848
2207
  position: absolute;
1849
2208
  top: 8px;
1850
2209
  right: 8px;
@@ -1856,7 +2215,7 @@ var styles4 = {
1856
2215
  padding: 2px 8px;
1857
2216
  border-radius: 4px;
1858
2217
  `,
1859
- content: css4`
2218
+ content: css5`
1860
2219
  position: relative;
1861
2220
  aspect-ratio: 1;
1862
2221
  display: flex;
@@ -1865,20 +2224,20 @@ var styles4 = {
1865
2224
  padding: 16px;
1866
2225
  background: ${colors.background};
1867
2226
  `,
1868
- folderIcon: css4`
2227
+ folderIcon: css5`
1869
2228
  width: 56px;
1870
2229
  height: 56px;
1871
2230
  color: #f9935e;
1872
2231
  `,
1873
- imagesFolderIcon: css4`
2232
+ imagesFolderIcon: css5`
1874
2233
  width: 56px;
1875
2234
  height: 56px;
1876
2235
  color: ${colors.imagesFolder};
1877
2236
  `,
1878
- imagesFolderWrapper: css4`
2237
+ imagesFolderWrapper: css5`
1879
2238
  position: relative;
1880
2239
  `,
1881
- lockIcon: css4`
2240
+ lockIcon: css5`
1882
2241
  position: absolute;
1883
2242
  bottom: 4px;
1884
2243
  right: 4px;
@@ -1889,23 +2248,23 @@ var styles4 = {
1889
2248
  border-radius: 50%;
1890
2249
  padding: 2px;
1891
2250
  `,
1892
- parentIcon: css4`
2251
+ parentIcon: css5`
1893
2252
  width: 56px;
1894
2253
  height: 56px;
1895
2254
  color: ${colors.textMuted};
1896
2255
  `,
1897
- fileIcon: css4`
2256
+ fileIcon: css5`
1898
2257
  width: 40px;
1899
2258
  height: 40px;
1900
2259
  color: ${colors.textMuted};
1901
2260
  `,
1902
- image: css4`
2261
+ image: css5`
1903
2262
  max-width: 100%;
1904
2263
  max-height: 100%;
1905
2264
  object-fit: contain;
1906
2265
  border-radius: 4px;
1907
2266
  `,
1908
- noThumbnail: css4`
2267
+ noThumbnail: css5`
1909
2268
  display: flex;
1910
2269
  flex-direction: column;
1911
2270
  align-items: center;
@@ -1925,31 +2284,31 @@ var styles4 = {
1925
2284
  background: ${colors.surfaceHover};
1926
2285
  }
1927
2286
  `,
1928
- noThumbnailIcon: css4`
2287
+ noThumbnailIcon: css5`
1929
2288
  width: 32px;
1930
2289
  height: 32px;
1931
2290
  color: ${colors.textMuted};
1932
2291
  `,
1933
- noThumbnailText: css4`
2292
+ noThumbnailText: css5`
1934
2293
  font-size: ${fontSize.xs};
1935
2294
  color: ${colors.textMuted};
1936
2295
  text-align: center;
1937
2296
  `,
1938
- label: css4`
2297
+ label: css5`
1939
2298
  padding: 10px 12px;
1940
2299
  background-color: ${colors.surface};
1941
2300
  border-top: 1px solid ${colors.borderLight};
1942
2301
  `,
1943
- labelRow: css4`
2302
+ labelRow: css5`
1944
2303
  display: flex;
1945
2304
  flex-direction: column;
1946
2305
  gap: 2px;
1947
2306
  `,
1948
- labelText: css4`
2307
+ labelText: css5`
1949
2308
  flex: 1;
1950
2309
  min-width: 0;
1951
2310
  `,
1952
- copyBtn: css4`
2311
+ copyBtn: css5`
1953
2312
  position: absolute;
1954
2313
  top: 4px;
1955
2314
  right: 4px;
@@ -1971,11 +2330,11 @@ var styles4 = {
1971
2330
  color: ${colors.text};
1972
2331
  }
1973
2332
  `,
1974
- copyIcon: css4`
2333
+ copyIcon: css5`
1975
2334
  width: 18px;
1976
2335
  height: 18px;
1977
2336
  `,
1978
- tooltip: css4`
2337
+ tooltip: css5`
1979
2338
  position: absolute;
1980
2339
  top: 50%;
1981
2340
  right: 100%;
@@ -2000,7 +2359,7 @@ var styles4 = {
2000
2359
  border-left-color: #1a1f36;
2001
2360
  }
2002
2361
  `,
2003
- openBtn: css4`
2362
+ openBtn: css5`
2004
2363
  position: absolute;
2005
2364
  bottom: 8px;
2006
2365
  right: 8px;
@@ -2024,7 +2383,7 @@ var styles4 = {
2024
2383
  border-color: ${colors.primary};
2025
2384
  }
2026
2385
  `,
2027
- name: css4`
2386
+ name: css5`
2028
2387
  font-size: ${fontSize.sm};
2029
2388
  font-weight: 500;
2030
2389
  color: ${colors.text};
@@ -2034,12 +2393,12 @@ var styles4 = {
2034
2393
  margin: 0;
2035
2394
  letter-spacing: -0.01em;
2036
2395
  `,
2037
- size: css4`
2396
+ size: css5`
2038
2397
  font-size: ${fontSize.xs};
2039
2398
  color: ${colors.textMuted};
2040
2399
  margin: 2px 0 0 0;
2041
2400
  `,
2042
- selectAllRow: css4`
2401
+ selectAllRow: css5`
2043
2402
  display: flex;
2044
2403
  align-items: center;
2045
2404
  margin-bottom: 16px;
@@ -2048,7 +2407,7 @@ var styles4 = {
2048
2407
  border-radius: 8px;
2049
2408
  border: 1px solid ${colors.border};
2050
2409
  `,
2051
- selectAllLabel: css4`
2410
+ selectAllLabel: css5`
2052
2411
  display: flex;
2053
2412
  align-items: center;
2054
2413
  gap: 10px;
@@ -2061,7 +2420,7 @@ var styles4 = {
2061
2420
  color: ${colors.text};
2062
2421
  }
2063
2422
  `,
2064
- selectAllCheckbox: css4`
2423
+ selectAllCheckbox: css5`
2065
2424
  width: 16px;
2066
2425
  height: 16px;
2067
2426
  accent-color: ${colors.primary};
@@ -2083,22 +2442,22 @@ function StudioFileGrid() {
2083
2442
  handleSelectAll
2084
2443
  } = useFileList();
2085
2444
  if (loading) {
2086
- return /* @__PURE__ */ jsx4("div", { css: styles4.loading, children: /* @__PURE__ */ jsx4("div", { css: styles4.spinner }) });
2445
+ return /* @__PURE__ */ jsx5("div", { css: styles5.loading, children: /* @__PURE__ */ jsx5("div", { css: styles5.spinner }) });
2087
2446
  }
2088
2447
  if (sortedItems.length === 0 && isAtRoot) {
2089
- return /* @__PURE__ */ jsxs4("div", { css: styles4.empty, children: [
2090
- /* @__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" }) }),
2091
- /* @__PURE__ */ jsx4("p", { css: styles4.emptyText, children: "No files in this folder" }),
2092
- /* @__PURE__ */ jsx4("p", { css: styles4.emptyText, children: "Upload images to get started" })
2448
+ return /* @__PURE__ */ jsxs5("div", { css: styles5.empty, children: [
2449
+ /* @__PURE__ */ jsx5("svg", { css: styles5.emptyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("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" }) }),
2450
+ /* @__PURE__ */ jsx5("p", { css: styles5.emptyText, children: "No files in this folder" }),
2451
+ /* @__PURE__ */ jsx5("p", { css: styles5.emptyText, children: "Upload images to get started" })
2093
2452
  ] });
2094
2453
  }
2095
- return /* @__PURE__ */ jsxs4("div", { children: [
2096
- sortedItems.length > 0 && /* @__PURE__ */ jsx4("div", { css: styles4.selectAllRow, children: /* @__PURE__ */ jsxs4("label", { css: styles4.selectAllLabel, children: [
2097
- /* @__PURE__ */ jsx4(
2454
+ return /* @__PURE__ */ jsxs5("div", { children: [
2455
+ sortedItems.length > 0 && /* @__PURE__ */ jsx5("div", { css: styles5.selectAllRow, children: /* @__PURE__ */ jsxs5("label", { css: styles5.selectAllLabel, children: [
2456
+ /* @__PURE__ */ jsx5(
2098
2457
  "input",
2099
2458
  {
2100
2459
  type: "checkbox",
2101
- css: styles4.selectAllCheckbox,
2460
+ css: styles5.selectAllCheckbox,
2102
2461
  checked: allItemsSelected,
2103
2462
  ref: (el) => {
2104
2463
  if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
@@ -2110,22 +2469,22 @@ function StudioFileGrid() {
2110
2469
  sortedItems.length,
2111
2470
  ")"
2112
2471
  ] }) }),
2113
- /* @__PURE__ */ jsxs4("div", { css: styles4.grid, children: [
2114
- !isAtRoot && !isSearching && /* @__PURE__ */ jsxs4(
2472
+ /* @__PURE__ */ jsxs5("div", { css: styles5.grid, children: [
2473
+ !isAtRoot && !isSearching && /* @__PURE__ */ jsxs5(
2115
2474
  "div",
2116
2475
  {
2117
- css: [styles4.item, styles4.parentItem],
2476
+ css: [styles5.item, styles5.parentItem],
2118
2477
  onClick: navigateUp,
2119
2478
  children: [
2120
- /* @__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" }) }) }),
2121
- /* @__PURE__ */ jsxs4("div", { css: styles4.label, children: [
2122
- /* @__PURE__ */ jsx4("p", { css: styles4.name, children: ".." }),
2123
- /* @__PURE__ */ jsx4("p", { css: styles4.size, children: "Parent folder" })
2479
+ /* @__PURE__ */ jsx5("div", { css: styles5.content, children: /* @__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" }) }) }),
2480
+ /* @__PURE__ */ jsxs5("div", { css: styles5.label, children: [
2481
+ /* @__PURE__ */ jsx5("p", { css: styles5.name, children: ".." }),
2482
+ /* @__PURE__ */ jsx5("p", { css: styles5.size, children: "Parent folder" })
2124
2483
  ] })
2125
2484
  ]
2126
2485
  }
2127
2486
  ),
2128
- sortedItems.map((item) => /* @__PURE__ */ jsx4(
2487
+ sortedItems.map((item) => /* @__PURE__ */ jsx5(
2129
2488
  GridItem,
2130
2489
  {
2131
2490
  item,
@@ -2151,46 +2510,46 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
2151
2510
  setShowCopied(true);
2152
2511
  setTimeout(() => setShowCopied(false), 1500);
2153
2512
  };
2154
- return /* @__PURE__ */ jsxs4(
2513
+ return /* @__PURE__ */ jsxs5(
2155
2514
  "div",
2156
2515
  {
2157
- css: [styles4.item, isSelected && styles4.itemSelected],
2516
+ css: [styles5.item, isSelected && styles5.itemSelected],
2158
2517
  onClick,
2159
2518
  children: [
2160
- /* @__PURE__ */ jsx4(
2519
+ /* @__PURE__ */ jsx5(
2161
2520
  "div",
2162
2521
  {
2163
- css: styles4.checkboxWrapper,
2522
+ css: styles5.checkboxWrapper,
2164
2523
  onClick: (e) => e.stopPropagation(),
2165
- children: /* @__PURE__ */ jsx4(
2524
+ children: /* @__PURE__ */ jsx5(
2166
2525
  "input",
2167
2526
  {
2168
2527
  type: "checkbox",
2169
- css: styles4.checkbox,
2528
+ css: styles5.checkbox,
2170
2529
  checked: isSelected,
2171
2530
  onChange: () => onClick({})
2172
2531
  }
2173
2532
  )
2174
2533
  }
2175
2534
  ),
2176
- item.cdnSynced && /* @__PURE__ */ jsx4("span", { css: styles4.cdnBadge, children: "CDN" }),
2177
- /* @__PURE__ */ jsxs4("div", { css: styles4.content, children: [
2178
- /* @__PURE__ */ jsxs4(
2535
+ item.cdnSynced && /* @__PURE__ */ jsx5("span", { css: styles5.cdnBadge, children: "CDN" }),
2536
+ /* @__PURE__ */ jsxs5("div", { css: styles5.content, children: [
2537
+ /* @__PURE__ */ jsxs5(
2179
2538
  "button",
2180
2539
  {
2181
- css: styles4.copyBtn,
2540
+ css: styles5.copyBtn,
2182
2541
  onClick: handleCopyPath,
2183
2542
  title: "Copy file path",
2184
2543
  children: [
2185
- showCopied && /* @__PURE__ */ jsx4("span", { css: styles4.tooltip, children: "Copied!" }),
2186
- /* @__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" }) })
2544
+ showCopied && /* @__PURE__ */ jsx5("span", { css: styles5.tooltip, children: "Copied!" }),
2545
+ /* @__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" }) })
2187
2546
  ]
2188
2547
  }
2189
2548
  ),
2190
- /* @__PURE__ */ jsx4(
2549
+ /* @__PURE__ */ jsx5(
2191
2550
  "button",
2192
2551
  {
2193
- css: styles4.openBtn,
2552
+ css: styles5.openBtn,
2194
2553
  onClick: (e) => {
2195
2554
  e.stopPropagation();
2196
2555
  onOpen();
@@ -2198,40 +2557,40 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
2198
2557
  children: "Open"
2199
2558
  }
2200
2559
  ),
2201
- isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs4("div", { css: styles4.imagesFolderWrapper, children: [
2202
- /* @__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" }) }),
2203
- /* @__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" }) })
2204
- ] }) : /* @__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(
2560
+ isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs5("div", { css: styles5.imagesFolderWrapper, children: [
2561
+ /* @__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" }) }),
2562
+ /* @__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" }) })
2563
+ ] }) : /* @__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(
2205
2564
  "img",
2206
2565
  {
2207
- css: styles4.image,
2566
+ css: styles5.image,
2208
2567
  src: item.thumbnail,
2209
2568
  alt: item.name,
2210
2569
  loading: "lazy"
2211
2570
  }
2212
- ) : isImage && !item.hasThumbnail ? /* @__PURE__ */ jsxs4(
2571
+ ) : isImage && !item.hasThumbnail ? /* @__PURE__ */ jsxs5(
2213
2572
  "button",
2214
2573
  {
2215
- css: styles4.noThumbnail,
2574
+ css: styles5.noThumbnail,
2216
2575
  onClick: (e) => {
2217
2576
  e.stopPropagation();
2218
2577
  onGenerateThumbnail();
2219
2578
  },
2220
2579
  title: "Generate thumbnail",
2221
2580
  children: [
2222
- /* @__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" }) }),
2223
- /* @__PURE__ */ jsx4("span", { css: styles4.noThumbnailText, children: "Generate" })
2581
+ /* @__PURE__ */ jsx5("svg", { css: styles5.noThumbnailIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("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" }) }),
2582
+ /* @__PURE__ */ jsx5("span", { css: styles5.noThumbnailText, children: "Generate" })
2224
2583
  ]
2225
2584
  }
2226
- ) : /* @__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" }) })
2585
+ ) : /* @__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" }) })
2227
2586
  ] }),
2228
- /* @__PURE__ */ jsx4("div", { css: styles4.label, children: /* @__PURE__ */ jsx4("div", { css: styles4.labelRow, children: /* @__PURE__ */ jsxs4("div", { css: styles4.labelText, children: [
2229
- /* @__PURE__ */ jsx4("p", { css: styles4.name, title: item.name, children: truncateMiddle(item.name) }),
2230
- isFolder ? /* @__PURE__ */ jsxs4("p", { css: styles4.size, children: [
2587
+ /* @__PURE__ */ jsx5("div", { css: styles5.label, children: /* @__PURE__ */ jsx5("div", { css: styles5.labelRow, children: /* @__PURE__ */ jsxs5("div", { css: styles5.labelText, children: [
2588
+ /* @__PURE__ */ jsx5("p", { css: styles5.name, title: item.name, children: truncateMiddle(item.name) }),
2589
+ isFolder ? /* @__PURE__ */ jsxs5("p", { css: styles5.size, children: [
2231
2590
  item.fileCount !== void 0 ? `${item.fileCount} files` : "",
2232
2591
  item.fileCount !== void 0 && item.totalSize !== void 0 ? " \xB7 " : "",
2233
2592
  item.totalSize !== void 0 ? formatFileSize(item.totalSize) : ""
2234
- ] }) : item.size !== void 0 && /* @__PURE__ */ jsx4("p", { css: styles4.size, children: formatFileSize(item.size) })
2593
+ ] }) : item.size !== void 0 && /* @__PURE__ */ jsx5("p", { css: styles5.size, children: formatFileSize(item.size) })
2235
2594
  ] }) }) })
2236
2595
  ]
2237
2596
  }
@@ -2258,19 +2617,19 @@ function truncateMiddle(str, maxLength = 24) {
2258
2617
 
2259
2618
  // src/components/StudioFileList.tsx
2260
2619
  import { useState as useState5 } from "react";
2261
- import { css as css5, keyframes as keyframes5 } from "@emotion/react";
2262
- import { jsx as jsx5, jsxs as jsxs5 } from "@emotion/react/jsx-runtime";
2620
+ import { css as css6, keyframes as keyframes5 } from "@emotion/react";
2621
+ import { jsx as jsx6, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
2263
2622
  var spin3 = keyframes5`
2264
2623
  to { transform: rotate(360deg); }
2265
2624
  `;
2266
- var styles5 = {
2267
- loading: css5`
2625
+ var styles6 = {
2626
+ loading: css6`
2268
2627
  display: flex;
2269
2628
  align-items: center;
2270
2629
  justify-content: center;
2271
2630
  height: 256px;
2272
2631
  `,
2273
- spinner: css5`
2632
+ spinner: css6`
2274
2633
  width: 32px;
2275
2634
  height: 32px;
2276
2635
  border-radius: 50%;
@@ -2278,7 +2637,7 @@ var styles5 = {
2278
2637
  border-top-color: ${colors.primary};
2279
2638
  animation: ${spin3} 0.8s linear infinite;
2280
2639
  `,
2281
- empty: css5`
2640
+ empty: css6`
2282
2641
  display: flex;
2283
2642
  flex-direction: column;
2284
2643
  align-items: center;
@@ -2286,19 +2645,19 @@ var styles5 = {
2286
2645
  height: 256px;
2287
2646
  color: ${colors.textSecondary};
2288
2647
  `,
2289
- tableWrapper: css5`
2648
+ tableWrapper: css6`
2290
2649
  background: ${colors.surface};
2291
2650
  border-radius: 8px;
2292
2651
  border: 1px solid ${colors.border};
2293
2652
  overflow-x: auto;
2294
2653
  `,
2295
- table: css5`
2654
+ table: css6`
2296
2655
  width: 100%;
2297
2656
  min-width: 600px;
2298
2657
  border-collapse: collapse;
2299
2658
  white-space: nowrap;
2300
2659
  `,
2301
- th: css5`
2660
+ th: css6`
2302
2661
  text-align: left;
2303
2662
  font-size: 11px;
2304
2663
  color: ${colors.textMuted};
@@ -2309,20 +2668,20 @@ var styles5 = {
2309
2668
  background: ${colors.background};
2310
2669
  border-bottom: 1px solid ${colors.border};
2311
2670
  `,
2312
- thCheckbox: css5`
2671
+ thCheckbox: css6`
2313
2672
  width: 48px;
2314
2673
  `,
2315
- thSize: css5`
2674
+ thSize: css6`
2316
2675
  width: 96px;
2317
2676
  `,
2318
- thDimensions: css5`
2677
+ thDimensions: css6`
2319
2678
  width: 128px;
2320
2679
  `,
2321
- thCdn: css5`
2680
+ thCdn: css6`
2322
2681
  width: 96px;
2323
2682
  `,
2324
- tbody: css5``,
2325
- row: css5`
2683
+ tbody: css6``,
2684
+ row: css6`
2326
2685
  cursor: pointer;
2327
2686
  transition: background-color 0.15s ease;
2328
2687
  user-select: none;
@@ -2335,14 +2694,14 @@ var styles5 = {
2335
2694
  border-bottom: 1px solid ${colors.borderLight};
2336
2695
  }
2337
2696
  `,
2338
- rowSelected: css5`
2697
+ rowSelected: css6`
2339
2698
  background-color: ${colors.primaryLight};
2340
2699
 
2341
2700
  &:hover {
2342
2701
  background-color: ${colors.primaryLight};
2343
2702
  }
2344
2703
  `,
2345
- parentRow: css5`
2704
+ parentRow: css6`
2346
2705
  cursor: pointer;
2347
2706
  border-bottom: 1px solid ${colors.border};
2348
2707
 
@@ -2350,22 +2709,22 @@ var styles5 = {
2350
2709
  background-color: ${colors.surfaceHover};
2351
2710
  }
2352
2711
  `,
2353
- td: css5`
2712
+ td: css6`
2354
2713
  padding: 12px 16px;
2355
2714
  `,
2356
- checkboxCell: css5`
2715
+ checkboxCell: css6`
2357
2716
  padding: 12px 16px;
2358
2717
  cursor: pointer;
2359
2718
  vertical-align: middle;
2360
2719
  `,
2361
- checkbox: css5`
2720
+ checkbox: css6`
2362
2721
  width: 18px;
2363
2722
  height: 18px;
2364
2723
  accent-color: ${colors.primary};
2365
2724
  cursor: pointer;
2366
2725
  display: block;
2367
2726
  `,
2368
- actionsCell: css5`
2727
+ actionsCell: css6`
2369
2728
  display: flex;
2370
2729
  align-items: center;
2371
2730
  justify-content: flex-end;
@@ -2373,7 +2732,7 @@ var styles5 = {
2373
2732
  margin-left: auto;
2374
2733
  flex-shrink: 0;
2375
2734
  `,
2376
- copyBtn: css5`
2735
+ copyBtn: css6`
2377
2736
  position: relative;
2378
2737
  flex-shrink: 0;
2379
2738
  height: 32px;
@@ -2396,11 +2755,11 @@ var styles5 = {
2396
2755
  color: ${colors.text};
2397
2756
  }
2398
2757
  `,
2399
- copyIcon: css5`
2758
+ copyIcon: css6`
2400
2759
  width: 16px;
2401
2760
  height: 16px;
2402
2761
  `,
2403
- tooltip: css5`
2762
+ tooltip: css6`
2404
2763
  position: absolute;
2405
2764
  top: 50%;
2406
2765
  right: 100%;
@@ -2425,13 +2784,13 @@ var styles5 = {
2425
2784
  border-left-color: #1a1f36;
2426
2785
  }
2427
2786
  `,
2428
- nameCell: css5`
2787
+ nameCell: css6`
2429
2788
  display: flex;
2430
2789
  align-items: center;
2431
2790
  gap: 12px;
2432
2791
  flex: 1;
2433
2792
  `,
2434
- thumbnailWrapper: css5`
2793
+ thumbnailWrapper: css6`
2435
2794
  width: 48px;
2436
2795
  height: 36px;
2437
2796
  display: flex;
@@ -2439,7 +2798,7 @@ var styles5 = {
2439
2798
  justify-content: center;
2440
2799
  flex-shrink: 0;
2441
2800
  `,
2442
- folderIconWrapper: css5`
2801
+ folderIconWrapper: css6`
2443
2802
  width: 48px;
2444
2803
  height: 36px;
2445
2804
  display: flex;
@@ -2447,12 +2806,12 @@ var styles5 = {
2447
2806
  justify-content: center;
2448
2807
  flex-shrink: 0;
2449
2808
  `,
2450
- folderIcon: css5`
2809
+ folderIcon: css6`
2451
2810
  width: 24px;
2452
2811
  height: 24px;
2453
2812
  color: #f9935e;
2454
2813
  `,
2455
- imagesFolderWrapper: css5`
2814
+ imagesFolderWrapper: css6`
2456
2815
  width: 48px;
2457
2816
  height: 36px;
2458
2817
  display: flex;
@@ -2462,31 +2821,31 @@ var styles5 = {
2462
2821
  position: relative;
2463
2822
  align-items: center;
2464
2823
  `,
2465
- imagesFolderIcon: css5`
2824
+ imagesFolderIcon: css6`
2466
2825
  width: 24px;
2467
2826
  height: 24px;
2468
2827
  color: ${colors.imagesFolder};
2469
2828
  `,
2470
- lockIcon: css5`
2829
+ lockIcon: css6`
2471
2830
  width: 10px;
2472
2831
  height: 10px;
2473
2832
  color: ${colors.imagesFolder};
2474
2833
  margin-left: -6px;
2475
2834
  margin-top: 8px;
2476
2835
  `,
2477
- parentIcon: css5`
2836
+ parentIcon: css6`
2478
2837
  width: 20px;
2479
2838
  height: 20px;
2480
2839
  color: ${colors.textMuted};
2481
2840
  flex-shrink: 0;
2482
2841
  `,
2483
- fileIcon: css5`
2842
+ fileIcon: css6`
2484
2843
  width: 20px;
2485
2844
  height: 20px;
2486
2845
  color: ${colors.textMuted};
2487
2846
  flex-shrink: 0;
2488
2847
  `,
2489
- thumbnail: css5`
2848
+ thumbnail: css6`
2490
2849
  max-width: 100%;
2491
2850
  max-height: 100%;
2492
2851
  width: auto;
@@ -2495,7 +2854,7 @@ var styles5 = {
2495
2854
  border-radius: 4px;
2496
2855
  border: 1px solid ${colors.borderLight};
2497
2856
  `,
2498
- noThumbnail: css5`
2857
+ noThumbnail: css6`
2499
2858
  width: 36px;
2500
2859
  height: 36px;
2501
2860
  display: flex;
@@ -2513,12 +2872,12 @@ var styles5 = {
2513
2872
  background: ${colors.surfaceHover};
2514
2873
  }
2515
2874
  `,
2516
- noThumbnailIcon: css5`
2875
+ noThumbnailIcon: css6`
2517
2876
  width: 16px;
2518
2877
  height: 16px;
2519
2878
  color: ${colors.textMuted};
2520
2879
  `,
2521
- name: css5`
2880
+ name: css6`
2522
2881
  font-size: ${fontSize.base};
2523
2882
  font-weight: 500;
2524
2883
  color: ${colors.text};
@@ -2528,11 +2887,11 @@ var styles5 = {
2528
2887
  white-space: nowrap;
2529
2888
  max-width: 300px;
2530
2889
  `,
2531
- meta: css5`
2890
+ meta: css6`
2532
2891
  font-size: ${fontSize.sm};
2533
2892
  color: ${colors.textSecondary};
2534
2893
  `,
2535
- cdnBadge: css5`
2894
+ cdnBadge: css6`
2536
2895
  display: inline-flex;
2537
2896
  align-items: center;
2538
2897
  gap: 4px;
@@ -2540,15 +2899,15 @@ var styles5 = {
2540
2899
  font-weight: 500;
2541
2900
  color: ${colors.success};
2542
2901
  `,
2543
- cdnIcon: css5`
2902
+ cdnIcon: css6`
2544
2903
  width: 12px;
2545
2904
  height: 12px;
2546
2905
  `,
2547
- cdnEmpty: css5`
2906
+ cdnEmpty: css6`
2548
2907
  font-size: ${fontSize.sm};
2549
2908
  color: ${colors.textMuted};
2550
2909
  `,
2551
- openBtn: css5`
2910
+ openBtn: css6`
2552
2911
  height: 32px;
2553
2912
  font-size: ${fontSize.sm};
2554
2913
  font-weight: 500;
@@ -2584,18 +2943,18 @@ function StudioFileList() {
2584
2943
  handleSelectAll
2585
2944
  } = useFileList();
2586
2945
  if (loading) {
2587
- return /* @__PURE__ */ jsx5("div", { css: styles5.loading, children: /* @__PURE__ */ jsx5("div", { css: styles5.spinner }) });
2946
+ return /* @__PURE__ */ jsx6("div", { css: styles6.loading, children: /* @__PURE__ */ jsx6("div", { css: styles6.spinner }) });
2588
2947
  }
2589
2948
  if (sortedItems.length === 0 && isAtRoot) {
2590
- return /* @__PURE__ */ jsx5("div", { css: styles5.empty, children: /* @__PURE__ */ jsx5("p", { children: "No files in this folder" }) });
2949
+ return /* @__PURE__ */ jsx6("div", { css: styles6.empty, children: /* @__PURE__ */ jsx6("p", { children: "No files in this folder" }) });
2591
2950
  }
2592
- return /* @__PURE__ */ jsx5("div", { css: styles5.tableWrapper, children: /* @__PURE__ */ jsxs5("table", { css: styles5.table, children: [
2593
- /* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { children: [
2594
- /* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ jsx5(
2951
+ return /* @__PURE__ */ jsx6("div", { css: styles6.tableWrapper, children: /* @__PURE__ */ jsxs6("table", { css: styles6.table, children: [
2952
+ /* @__PURE__ */ jsx6("thead", { children: /* @__PURE__ */ jsxs6("tr", { children: [
2953
+ /* @__PURE__ */ jsx6("th", { css: [styles6.th, styles6.thCheckbox], children: sortedItems.length > 0 && /* @__PURE__ */ jsx6(
2595
2954
  "input",
2596
2955
  {
2597
2956
  type: "checkbox",
2598
- css: styles5.checkbox,
2957
+ css: styles6.checkbox,
2599
2958
  checked: allItemsSelected,
2600
2959
  ref: (el) => {
2601
2960
  if (el) el.indeterminate = someItemsSelected && !allItemsSelected;
@@ -2603,23 +2962,23 @@ function StudioFileList() {
2603
2962
  onChange: handleSelectAll
2604
2963
  }
2605
2964
  ) }),
2606
- /* @__PURE__ */ jsx5("th", { css: styles5.th, children: "Name" }),
2607
- /* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thSize], children: "Size" }),
2608
- /* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thDimensions], children: "Dimensions" }),
2609
- /* @__PURE__ */ jsx5("th", { css: [styles5.th, styles5.thCdn], children: "CDN" })
2965
+ /* @__PURE__ */ jsx6("th", { css: styles6.th, children: "Name" }),
2966
+ /* @__PURE__ */ jsx6("th", { css: [styles6.th, styles6.thSize], children: "Size" }),
2967
+ /* @__PURE__ */ jsx6("th", { css: [styles6.th, styles6.thDimensions], children: "Dimensions" }),
2968
+ /* @__PURE__ */ jsx6("th", { css: [styles6.th, styles6.thCdn], children: "CDN" })
2610
2969
  ] }) }),
2611
- /* @__PURE__ */ jsxs5("tbody", { css: styles5.tbody, children: [
2612
- !isAtRoot && !isSearching && /* @__PURE__ */ jsxs5("tr", { css: styles5.parentRow, onClick: navigateUp, children: [
2613
- /* @__PURE__ */ jsx5("td", { css: styles5.td }),
2614
- /* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
2615
- /* @__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" }) }),
2616
- /* @__PURE__ */ jsx5("span", { css: styles5.name, children: ".." })
2970
+ /* @__PURE__ */ jsxs6("tbody", { css: styles6.tbody, children: [
2971
+ !isAtRoot && !isSearching && /* @__PURE__ */ jsxs6("tr", { css: styles6.parentRow, onClick: navigateUp, children: [
2972
+ /* @__PURE__ */ jsx6("td", { css: styles6.td }),
2973
+ /* @__PURE__ */ jsx6("td", { css: styles6.td, children: /* @__PURE__ */ jsxs6("div", { css: styles6.nameCell, children: [
2974
+ /* @__PURE__ */ jsx6("svg", { css: styles6.parentIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" }) }),
2975
+ /* @__PURE__ */ jsx6("span", { css: styles6.name, children: ".." })
2617
2976
  ] }) }),
2618
- /* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "--" }),
2619
- /* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: "Parent folder" }),
2620
- /* @__PURE__ */ jsx5("td", { css: styles5.td, children: "--" })
2977
+ /* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: "--" }),
2978
+ /* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: "Parent folder" }),
2979
+ /* @__PURE__ */ jsx6("td", { css: styles6.td, children: "--" })
2621
2980
  ] }),
2622
- sortedItems.map((item) => /* @__PURE__ */ jsx5(
2981
+ sortedItems.map((item) => /* @__PURE__ */ jsx6(
2623
2982
  ListRow,
2624
2983
  {
2625
2984
  item,
@@ -2645,62 +3004,62 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
2645
3004
  setShowCopied(true);
2646
3005
  setTimeout(() => setShowCopied(false), 1500);
2647
3006
  };
2648
- return /* @__PURE__ */ jsxs5(
3007
+ return /* @__PURE__ */ jsxs6(
2649
3008
  "tr",
2650
3009
  {
2651
- css: [styles5.row, isSelected && styles5.rowSelected],
3010
+ css: [styles6.row, isSelected && styles6.rowSelected],
2652
3011
  onClick,
2653
3012
  children: [
2654
- /* @__PURE__ */ jsx5(
3013
+ /* @__PURE__ */ jsx6(
2655
3014
  "td",
2656
3015
  {
2657
- css: [styles5.td, styles5.checkboxCell],
3016
+ css: [styles6.td, styles6.checkboxCell],
2658
3017
  onClick: (e) => e.stopPropagation(),
2659
- children: /* @__PURE__ */ jsx5(
3018
+ children: /* @__PURE__ */ jsx6(
2660
3019
  "input",
2661
3020
  {
2662
3021
  type: "checkbox",
2663
- css: styles5.checkbox,
3022
+ css: styles6.checkbox,
2664
3023
  checked: isSelected,
2665
3024
  onChange: () => onClick({})
2666
3025
  }
2667
3026
  )
2668
3027
  }
2669
3028
  ),
2670
- /* @__PURE__ */ jsx5("td", { css: styles5.td, children: /* @__PURE__ */ jsxs5("div", { css: styles5.nameCell, children: [
2671
- isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs5("div", { css: styles5.imagesFolderWrapper, children: [
2672
- /* @__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" }) }),
2673
- /* @__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" }) })
2674
- ] }) : /* @__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(
3029
+ /* @__PURE__ */ jsx6("td", { css: styles6.td, children: /* @__PURE__ */ jsxs6("div", { css: styles6.nameCell, children: [
3030
+ isFolder ? isImagesFolder ? /* @__PURE__ */ jsxs6("div", { css: styles6.imagesFolderWrapper, children: [
3031
+ /* @__PURE__ */ jsx6("svg", { css: styles6.imagesFolderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("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" }) }),
3032
+ /* @__PURE__ */ jsx6("svg", { css: styles6.lockIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx6("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" }) })
3033
+ ] }) : /* @__PURE__ */ jsx6("div", { css: styles6.folderIconWrapper, children: /* @__PURE__ */ jsx6("svg", { css: styles6.folderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx6("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__ */ jsx6("div", { css: styles6.thumbnailWrapper, children: /* @__PURE__ */ jsx6("img", { css: styles6.thumbnail, src: item.thumbnail, alt: item.name, loading: "lazy" }) }) : isImage && !item.hasThumbnail ? /* @__PURE__ */ jsx6("div", { css: styles6.thumbnailWrapper, children: /* @__PURE__ */ jsx6(
2675
3034
  "button",
2676
3035
  {
2677
- css: styles5.noThumbnail,
3036
+ css: styles6.noThumbnail,
2678
3037
  onClick: (e) => {
2679
3038
  e.stopPropagation();
2680
3039
  onGenerateThumbnail();
2681
3040
  },
2682
3041
  title: "Generate thumbnail",
2683
- 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" }) })
3042
+ children: /* @__PURE__ */ jsx6("svg", { css: styles6.noThumbnailIcon, 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" }) })
2684
3043
  }
2685
- ) }) : /* @__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" }) }) }),
2686
- /* @__PURE__ */ jsx5("span", { css: styles5.name, title: item.name, children: truncateMiddle2(item.name) }),
2687
- /* @__PURE__ */ jsxs5("div", { css: styles5.actionsCell, children: [
2688
- /* @__PURE__ */ jsxs5(
3044
+ ) }) : /* @__PURE__ */ jsx6("div", { css: styles6.thumbnailWrapper, children: /* @__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" }) }) }),
3045
+ /* @__PURE__ */ jsx6("span", { css: styles6.name, title: item.name, children: truncateMiddle2(item.name) }),
3046
+ /* @__PURE__ */ jsxs6("div", { css: styles6.actionsCell, children: [
3047
+ /* @__PURE__ */ jsxs6(
2689
3048
  "button",
2690
3049
  {
2691
- css: styles5.copyBtn,
3050
+ css: styles6.copyBtn,
2692
3051
  onClick: handleCopyPath,
2693
3052
  title: "Copy file path",
2694
3053
  children: [
2695
- showCopied && /* @__PURE__ */ jsx5("span", { css: styles5.tooltip, children: "Copied!" }),
2696
- /* @__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" }) })
3054
+ showCopied && /* @__PURE__ */ jsx6("span", { css: styles6.tooltip, children: "Copied!" }),
3055
+ /* @__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" }) })
2697
3056
  ]
2698
3057
  }
2699
3058
  ),
2700
- /* @__PURE__ */ jsx5(
3059
+ /* @__PURE__ */ jsx6(
2701
3060
  "button",
2702
3061
  {
2703
- css: styles5.openBtn,
3062
+ css: styles6.openBtn,
2704
3063
  onClick: (e) => {
2705
3064
  e.stopPropagation();
2706
3065
  onOpen();
@@ -2710,12 +3069,12 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
2710
3069
  )
2711
3070
  ] })
2712
3071
  ] }) }),
2713
- /* @__PURE__ */ jsx5("td", { css: [styles5.td, styles5.meta], children: isFolder ? item.fileCount !== void 0 ? `${item.fileCount} files` : "--" : item.size !== void 0 ? formatFileSize2(item.size) : "--" }),
2714
- /* @__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}` : "--" }),
2715
- /* @__PURE__ */ jsx5("td", { css: styles5.td, children: item.cdnSynced ? /* @__PURE__ */ jsxs5("span", { css: styles5.cdnBadge, children: [
2716
- /* @__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" }) }),
3072
+ /* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: isFolder ? item.fileCount !== void 0 ? `${item.fileCount} files` : "--" : item.size !== void 0 ? formatFileSize2(item.size) : "--" }),
3073
+ /* @__PURE__ */ jsx6("td", { css: [styles6.td, styles6.meta], children: isFolder ? item.totalSize !== void 0 ? formatFileSize2(item.totalSize) : "--" : item.dimensions ? `${item.dimensions.width}x${item.dimensions.height}` : "--" }),
3074
+ /* @__PURE__ */ jsx6("td", { css: styles6.td, children: item.cdnSynced ? /* @__PURE__ */ jsxs6("span", { css: styles6.cdnBadge, children: [
3075
+ /* @__PURE__ */ jsx6("svg", { css: styles6.cdnIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx6("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" }) }),
2717
3076
  "Synced"
2718
- ] }) : /* @__PURE__ */ jsx5("span", { css: styles5.cdnEmpty, children: "--" }) })
3077
+ ] }) : /* @__PURE__ */ jsx6("span", { css: styles6.cdnEmpty, children: "--" }) })
2719
3078
  ]
2720
3079
  }
2721
3080
  );
@@ -2741,8 +3100,8 @@ function truncateMiddle2(str, maxLength = 32) {
2741
3100
 
2742
3101
  // src/components/StudioDetailView.tsx
2743
3102
  import { useState as useState6 } from "react";
2744
- import { css as css6 } from "@emotion/react";
2745
- import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
3103
+ import { css as css7 } from "@emotion/react";
3104
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "@emotion/react/jsx-runtime";
2746
3105
  var IMAGE_EXTENSIONS = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".ico", ".bmp", ".tiff", ".tif"];
2747
3106
  var VIDEO_EXTENSIONS = [".mp4", ".webm", ".mov", ".avi", ".mkv", ".m4v"];
2748
3107
  function isImageFile(filename) {
@@ -2753,8 +3112,8 @@ function isVideoFile(filename) {
2753
3112
  const ext = filename.toLowerCase().substring(filename.lastIndexOf("."));
2754
3113
  return VIDEO_EXTENSIONS.includes(ext);
2755
3114
  }
2756
- var styles6 = {
2757
- overlay: css6`
3115
+ var styles7 = {
3116
+ overlay: css7`
2758
3117
  position: absolute;
2759
3118
  top: 0;
2760
3119
  left: 0;
@@ -2764,7 +3123,7 @@ var styles6 = {
2764
3123
  display: flex;
2765
3124
  background: transparent;
2766
3125
  `,
2767
- container: css6`
3126
+ container: css7`
2768
3127
  display: flex;
2769
3128
  flex: 1;
2770
3129
  margin: 24px;
@@ -2774,7 +3133,7 @@ var styles6 = {
2774
3133
  overflow: hidden;
2775
3134
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
2776
3135
  `,
2777
- main: css6`
3136
+ main: css7`
2778
3137
  position: relative;
2779
3138
  flex: 1;
2780
3139
  display: flex;
@@ -2785,7 +3144,7 @@ var styles6 = {
2785
3144
  background: ${colors.background};
2786
3145
  overflow: auto;
2787
3146
  `,
2788
- headerButtons: css6`
3147
+ headerButtons: css7`
2789
3148
  position: absolute;
2790
3149
  top: 16px;
2791
3150
  right: 16px;
@@ -2793,7 +3152,7 @@ var styles6 = {
2793
3152
  gap: 8px;
2794
3153
  z-index: 10;
2795
3154
  `,
2796
- copyBtn: css6`
3155
+ copyBtn: css7`
2797
3156
  position: relative;
2798
3157
  padding: 8px;
2799
3158
  background: ${colors.surface};
@@ -2811,12 +3170,12 @@ var styles6 = {
2811
3170
  border-color: ${colors.borderHover};
2812
3171
  }
2813
3172
  `,
2814
- copyIcon: css6`
3173
+ copyIcon: css7`
2815
3174
  width: 20px;
2816
3175
  height: 20px;
2817
3176
  color: ${colors.textSecondary};
2818
3177
  `,
2819
- tooltip: css6`
3178
+ tooltip: css7`
2820
3179
  position: absolute;
2821
3180
  right: 100%;
2822
3181
  top: 50%;
@@ -2841,7 +3200,7 @@ var styles6 = {
2841
3200
  border-left-color: #1a1f36;
2842
3201
  }
2843
3202
  `,
2844
- mainCloseBtn: css6`
3203
+ mainCloseBtn: css7`
2845
3204
  padding: 8px;
2846
3205
  background: ${colors.surface};
2847
3206
  border: 1px solid ${colors.border};
@@ -2858,32 +3217,32 @@ var styles6 = {
2858
3217
  border-color: ${colors.borderHover};
2859
3218
  }
2860
3219
  `,
2861
- mainCloseIcon: css6`
3220
+ mainCloseIcon: css7`
2862
3221
  width: 20px;
2863
3222
  height: 20px;
2864
3223
  color: ${colors.textSecondary};
2865
3224
  `,
2866
- mediaWrapper: css6`
3225
+ mediaWrapper: css7`
2867
3226
  max-width: 100%;
2868
3227
  max-height: 100%;
2869
3228
  display: flex;
2870
3229
  align-items: center;
2871
3230
  justify-content: center;
2872
3231
  `,
2873
- image: css6`
3232
+ image: css7`
2874
3233
  max-width: 100%;
2875
3234
  max-height: calc(100vh - 200px);
2876
3235
  object-fit: contain;
2877
3236
  border-radius: 8px;
2878
3237
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
2879
3238
  `,
2880
- video: css6`
3239
+ video: css7`
2881
3240
  max-width: 100%;
2882
3241
  max-height: calc(100vh - 200px);
2883
3242
  border-radius: 8px;
2884
3243
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
2885
3244
  `,
2886
- filePlaceholder: css6`
3245
+ filePlaceholder: css7`
2887
3246
  display: flex;
2888
3247
  flex-direction: column;
2889
3248
  align-items: center;
@@ -2893,19 +3252,19 @@ var styles6 = {
2893
3252
  border-radius: 12px;
2894
3253
  border: 1px solid ${colors.border};
2895
3254
  `,
2896
- fileIcon: css6`
3255
+ fileIcon: css7`
2897
3256
  width: 80px;
2898
3257
  height: 80px;
2899
3258
  color: ${colors.textMuted};
2900
3259
  margin-bottom: 16px;
2901
3260
  `,
2902
- fileName: css6`
3261
+ fileName: css7`
2903
3262
  font-size: ${fontSize.lg};
2904
3263
  font-weight: 600;
2905
3264
  color: ${colors.text};
2906
3265
  margin: 0;
2907
3266
  `,
2908
- sidebar: css6`
3267
+ sidebar: css7`
2909
3268
  width: 280px;
2910
3269
  background: ${colors.surface};
2911
3270
  border-left: 1px solid ${colors.border};
@@ -2913,36 +3272,36 @@ var styles6 = {
2913
3272
  flex-direction: column;
2914
3273
  overflow: hidden;
2915
3274
  `,
2916
- sidebarHeader: css6`
3275
+ sidebarHeader: css7`
2917
3276
  padding: 16px 20px;
2918
3277
  border-bottom: 1px solid ${colors.border};
2919
3278
  `,
2920
- sidebarTitle: css6`
3279
+ sidebarTitle: css7`
2921
3280
  font-size: ${fontSize.base};
2922
3281
  font-weight: 600;
2923
3282
  color: ${colors.text};
2924
3283
  margin: 0;
2925
3284
  `,
2926
- sidebarContent: css6`
3285
+ sidebarContent: css7`
2927
3286
  flex: 1;
2928
3287
  padding: 20px;
2929
3288
  overflow: auto;
2930
3289
  `,
2931
- info: css6`
3290
+ info: css7`
2932
3291
  display: flex;
2933
3292
  flex-direction: column;
2934
3293
  gap: 12px;
2935
3294
  margin-bottom: 24px;
2936
3295
  `,
2937
- infoRow: css6`
3296
+ infoRow: css7`
2938
3297
  display: flex;
2939
3298
  justify-content: space-between;
2940
3299
  font-size: ${fontSize.sm};
2941
3300
  `,
2942
- infoLabel: css6`
3301
+ infoLabel: css7`
2943
3302
  color: ${colors.textSecondary};
2944
3303
  `,
2945
- infoValue: css6`
3304
+ infoValue: css7`
2946
3305
  color: ${colors.text};
2947
3306
  font-weight: 500;
2948
3307
  text-align: right;
@@ -2951,7 +3310,7 @@ var styles6 = {
2951
3310
  text-overflow: ellipsis;
2952
3311
  white-space: nowrap;
2953
3312
  `,
2954
- infoValueWrap: css6`
3313
+ infoValueWrap: css7`
2955
3314
  color: ${colors.text};
2956
3315
  font-weight: 500;
2957
3316
  text-align: right;
@@ -2959,12 +3318,12 @@ var styles6 = {
2959
3318
  word-break: break-all;
2960
3319
  white-space: normal;
2961
3320
  `,
2962
- actions: css6`
3321
+ actions: css7`
2963
3322
  display: flex;
2964
3323
  flex-direction: column;
2965
3324
  gap: 8px;
2966
3325
  `,
2967
- actionBtn: css6`
3326
+ actionBtn: css7`
2968
3327
  display: flex;
2969
3328
  align-items: center;
2970
3329
  gap: 10px;
@@ -2985,7 +3344,7 @@ var styles6 = {
2985
3344
  border-color: ${colors.borderHover};
2986
3345
  }
2987
3346
  `,
2988
- actionBtnDanger: css6`
3347
+ actionBtnDanger: css7`
2989
3348
  color: ${colors.danger};
2990
3349
 
2991
3350
  &:hover {
@@ -2993,7 +3352,7 @@ var styles6 = {
2993
3352
  border-color: ${colors.danger};
2994
3353
  }
2995
3354
  `,
2996
- actionIcon: css6`
3355
+ actionIcon: css7`
2997
3356
  width: 16px;
2998
3357
  height: 16px;
2999
3358
  flex-shrink: 0;
@@ -3004,9 +3363,11 @@ function StudioDetailView() {
3004
3363
  const [showDeleteConfirm, setShowDeleteConfirm] = useState6(false);
3005
3364
  const [showRenameModal, setShowRenameModal] = useState6(false);
3006
3365
  const [showProcessConfirm, setShowProcessConfirm] = useState6(false);
3366
+ const [showR2SetupModal, setShowR2SetupModal] = useState6(false);
3007
3367
  const [processProgress, setProcessProgress] = useState6(null);
3008
3368
  const [alertMessage, setAlertMessage] = useState6(null);
3009
3369
  const [showCopied, setShowCopied] = useState6(false);
3370
+ const [syncing, setSyncing] = useState6(false);
3010
3371
  if (!focusedItem) return null;
3011
3372
  const isImage = isImageFile(focusedItem.name);
3012
3373
  const isVideo = isVideoFile(focusedItem.name);
@@ -3078,8 +3439,41 @@ function StudioDetailView() {
3078
3439
  });
3079
3440
  }
3080
3441
  };
3081
- const handleSync = () => {
3082
- console.log("Sync to CDN:", focusedItem.path);
3442
+ const handleSync = async () => {
3443
+ const imageKey = "/" + focusedItem.path.replace(/^public\//, "");
3444
+ setSyncing(true);
3445
+ try {
3446
+ const response = await fetch("/api/studio/sync", {
3447
+ method: "POST",
3448
+ headers: { "Content-Type": "application/json" },
3449
+ body: JSON.stringify({ imageKeys: [imageKey] })
3450
+ });
3451
+ const data = await response.json();
3452
+ if (response.ok) {
3453
+ setAlertMessage({
3454
+ title: "Sync Complete",
3455
+ message: "Successfully synced to CDN."
3456
+ });
3457
+ triggerRefresh();
3458
+ } else {
3459
+ if (data.error?.includes("R2 not configured") || data.error?.includes("CLOUDFLARE_R2")) {
3460
+ setShowR2SetupModal(true);
3461
+ } else {
3462
+ setAlertMessage({
3463
+ title: "Sync Failed",
3464
+ message: data.error || "Failed to sync to CDN."
3465
+ });
3466
+ }
3467
+ }
3468
+ } catch (error) {
3469
+ console.error("Sync error:", error);
3470
+ setAlertMessage({
3471
+ title: "Sync Failed",
3472
+ message: "Failed to sync to CDN. Check console for details."
3473
+ });
3474
+ } finally {
3475
+ setSyncing(false);
3476
+ }
3083
3477
  };
3084
3478
  const handleProcessImage = async () => {
3085
3479
  setShowProcessConfirm(false);
@@ -3137,18 +3531,18 @@ function StudioDetailView() {
3137
3531
  };
3138
3532
  const renderMedia = () => {
3139
3533
  if (isImage) {
3140
- return /* @__PURE__ */ jsx6("img", { css: styles6.image, src: imageSrc, alt: focusedItem.name });
3534
+ return /* @__PURE__ */ jsx7("img", { css: styles7.image, src: imageSrc, alt: focusedItem.name });
3141
3535
  }
3142
3536
  if (isVideo) {
3143
- return /* @__PURE__ */ jsx6("video", { css: styles6.video, src: imageSrc, controls: true });
3537
+ return /* @__PURE__ */ jsx7("video", { css: styles7.video, src: imageSrc, controls: true });
3144
3538
  }
3145
- return /* @__PURE__ */ jsxs6("div", { css: styles6.filePlaceholder, children: [
3146
- /* @__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" }) }),
3147
- /* @__PURE__ */ jsx6("p", { css: styles6.fileName, children: focusedItem.name })
3539
+ return /* @__PURE__ */ jsxs7("div", { css: styles7.filePlaceholder, children: [
3540
+ /* @__PURE__ */ jsx7("svg", { css: styles7.fileIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
3541
+ /* @__PURE__ */ jsx7("p", { css: styles7.fileName, children: focusedItem.name })
3148
3542
  ] });
3149
3543
  };
3150
- return /* @__PURE__ */ jsxs6(Fragment3, { children: [
3151
- showDeleteConfirm && /* @__PURE__ */ jsx6(
3544
+ return /* @__PURE__ */ jsxs7(Fragment3, { children: [
3545
+ showDeleteConfirm && /* @__PURE__ */ jsx7(
3152
3546
  ConfirmModal,
3153
3547
  {
3154
3548
  title: "Delete File",
@@ -3159,7 +3553,7 @@ function StudioDetailView() {
3159
3553
  onCancel: () => setShowDeleteConfirm(false)
3160
3554
  }
3161
3555
  ),
3162
- alertMessage && /* @__PURE__ */ jsx6(
3556
+ alertMessage && /* @__PURE__ */ jsx7(
3163
3557
  AlertModal,
3164
3558
  {
3165
3559
  title: alertMessage.title,
@@ -3167,7 +3561,14 @@ function StudioDetailView() {
3167
3561
  onClose: () => setAlertMessage(null)
3168
3562
  }
3169
3563
  ),
3170
- showRenameModal && /* @__PURE__ */ jsx6(
3564
+ /* @__PURE__ */ jsx7(
3565
+ R2SetupModal,
3566
+ {
3567
+ isOpen: showR2SetupModal,
3568
+ onClose: () => setShowR2SetupModal(false)
3569
+ }
3570
+ ),
3571
+ showRenameModal && /* @__PURE__ */ jsx7(
3171
3572
  InputModal,
3172
3573
  {
3173
3574
  title: "Rename File",
@@ -3179,7 +3580,7 @@ function StudioDetailView() {
3179
3580
  onCancel: () => setShowRenameModal(false)
3180
3581
  }
3181
3582
  ),
3182
- showProcessConfirm && /* @__PURE__ */ jsx6(
3583
+ showProcessConfirm && /* @__PURE__ */ jsx7(
3183
3584
  ConfirmModal,
3184
3585
  {
3185
3586
  title: "Process Image",
@@ -3189,7 +3590,7 @@ function StudioDetailView() {
3189
3590
  onCancel: () => setShowProcessConfirm(false)
3190
3591
  }
3191
3592
  ),
3192
- processProgress && /* @__PURE__ */ jsx6(
3593
+ processProgress && /* @__PURE__ */ jsx7(
3193
3594
  ProgressModal,
3194
3595
  {
3195
3596
  title: "Processing Image",
@@ -3197,61 +3598,61 @@ function StudioDetailView() {
3197
3598
  onClose: () => setProcessProgress(null)
3198
3599
  }
3199
3600
  ),
3200
- /* @__PURE__ */ jsx6("div", { css: styles6.overlay, onClick: handleClose, children: /* @__PURE__ */ jsxs6("div", { css: styles6.container, onClick: (e) => e.stopPropagation(), children: [
3201
- /* @__PURE__ */ jsxs6("div", { css: styles6.main, children: [
3202
- /* @__PURE__ */ jsxs6("div", { css: styles6.headerButtons, children: [
3203
- /* @__PURE__ */ jsxs6("button", { css: styles6.copyBtn, onClick: handleCopyPath, title: "Copy file path", children: [
3204
- showCopied && /* @__PURE__ */ jsx6("span", { css: styles6.tooltip, children: "Copied!" }),
3205
- /* @__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" }) })
3601
+ /* @__PURE__ */ jsx7("div", { css: styles7.overlay, onClick: handleClose, children: /* @__PURE__ */ jsxs7("div", { css: styles7.container, onClick: (e) => e.stopPropagation(), children: [
3602
+ /* @__PURE__ */ jsxs7("div", { css: styles7.main, children: [
3603
+ /* @__PURE__ */ jsxs7("div", { css: styles7.headerButtons, children: [
3604
+ /* @__PURE__ */ jsxs7("button", { css: styles7.copyBtn, onClick: handleCopyPath, title: "Copy file path", children: [
3605
+ showCopied && /* @__PURE__ */ jsx7("span", { css: styles7.tooltip, children: "Copied!" }),
3606
+ /* @__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" }) })
3206
3607
  ] }),
3207
- /* @__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" }) }) })
3608
+ /* @__PURE__ */ jsx7("button", { css: styles7.mainCloseBtn, onClick: handleClose, "aria-label": "Close", children: /* @__PURE__ */ jsx7("svg", { css: styles7.mainCloseIcon, 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" }) }) })
3208
3609
  ] }),
3209
- /* @__PURE__ */ jsx6("div", { css: styles6.mediaWrapper, children: renderMedia() })
3610
+ /* @__PURE__ */ jsx7("div", { css: styles7.mediaWrapper, children: renderMedia() })
3210
3611
  ] }),
3211
- /* @__PURE__ */ jsxs6("div", { css: styles6.sidebar, children: [
3212
- /* @__PURE__ */ jsx6("div", { css: styles6.sidebarHeader, children: /* @__PURE__ */ jsx6("h3", { css: styles6.sidebarTitle, children: "Details" }) }),
3213
- /* @__PURE__ */ jsxs6("div", { css: styles6.sidebarContent, children: [
3214
- /* @__PURE__ */ jsxs6("div", { css: styles6.info, children: [
3215
- /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
3216
- /* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Name" }),
3217
- /* @__PURE__ */ jsx6("span", { css: styles6.infoValueWrap, children: focusedItem.name })
3612
+ /* @__PURE__ */ jsxs7("div", { css: styles7.sidebar, children: [
3613
+ /* @__PURE__ */ jsx7("div", { css: styles7.sidebarHeader, children: /* @__PURE__ */ jsx7("h3", { css: styles7.sidebarTitle, children: "Details" }) }),
3614
+ /* @__PURE__ */ jsxs7("div", { css: styles7.sidebarContent, children: [
3615
+ /* @__PURE__ */ jsxs7("div", { css: styles7.info, children: [
3616
+ /* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
3617
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "Name" }),
3618
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoValueWrap, children: focusedItem.name })
3218
3619
  ] }),
3219
- /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
3220
- /* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Path" }),
3221
- /* @__PURE__ */ jsx6("span", { css: styles6.infoValueWrap, children: focusedItem.path.replace(/^public\//, "") })
3620
+ /* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
3621
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "Path" }),
3622
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoValueWrap, children: focusedItem.path.replace(/^public\//, "") })
3222
3623
  ] }),
3223
- focusedItem.size !== void 0 && /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
3224
- /* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Size" }),
3225
- /* @__PURE__ */ jsx6("span", { css: styles6.infoValue, children: formatFileSize3(focusedItem.size) })
3624
+ focusedItem.size !== void 0 && /* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
3625
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "Size" }),
3626
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoValue, children: formatFileSize3(focusedItem.size) })
3226
3627
  ] }),
3227
- focusedItem.dimensions && /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
3228
- /* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "Dimensions" }),
3229
- /* @__PURE__ */ jsxs6("span", { css: styles6.infoValue, children: [
3628
+ focusedItem.dimensions && /* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
3629
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "Dimensions" }),
3630
+ /* @__PURE__ */ jsxs7("span", { css: styles7.infoValue, children: [
3230
3631
  focusedItem.dimensions.width,
3231
3632
  " \xD7 ",
3232
3633
  focusedItem.dimensions.height
3233
3634
  ] })
3234
3635
  ] }),
3235
- /* @__PURE__ */ jsxs6("div", { css: styles6.infoRow, children: [
3236
- /* @__PURE__ */ jsx6("span", { css: styles6.infoLabel, children: "CDN Status" }),
3237
- /* @__PURE__ */ jsx6("span", { css: styles6.infoValue, children: focusedItem.cdnSynced ? "Synced" : "Not synced" })
3636
+ /* @__PURE__ */ jsxs7("div", { css: styles7.infoRow, children: [
3637
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoLabel, children: "CDN Status" }),
3638
+ /* @__PURE__ */ jsx7("span", { css: styles7.infoValue, children: focusedItem.cdnSynced ? "Synced" : "Not synced" })
3238
3639
  ] })
3239
3640
  ] }),
3240
- /* @__PURE__ */ jsxs6("div", { css: styles6.actions, children: [
3241
- /* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: () => setShowRenameModal(true), children: [
3242
- /* @__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" }) }),
3641
+ /* @__PURE__ */ jsxs7("div", { css: styles7.actions, children: [
3642
+ /* @__PURE__ */ jsxs7("button", { css: styles7.actionBtn, onClick: () => setShowRenameModal(true), children: [
3643
+ /* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
3243
3644
  "Rename"
3244
3645
  ] }),
3245
- /* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: handleSync, children: [
3246
- /* @__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" }) }),
3247
- "Sync to CDN"
3646
+ /* @__PURE__ */ jsxs7("button", { css: styles7.actionBtn, onClick: handleSync, disabled: syncing, children: [
3647
+ /* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
3648
+ syncing ? "Syncing..." : "Sync to CDN"
3248
3649
  ] }),
3249
- /* @__PURE__ */ jsxs6("button", { css: styles6.actionBtn, onClick: () => setShowProcessConfirm(true), children: [
3250
- /* @__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" }) }),
3650
+ /* @__PURE__ */ jsxs7("button", { css: styles7.actionBtn, onClick: () => setShowProcessConfirm(true), children: [
3651
+ /* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
3251
3652
  "Process Image"
3252
3653
  ] }),
3253
- /* @__PURE__ */ jsxs6("button", { css: [styles6.actionBtn, styles6.actionBtnDanger], onClick: () => setShowDeleteConfirm(true), children: [
3254
- /* @__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" }) }),
3654
+ /* @__PURE__ */ jsxs7("button", { css: [styles7.actionBtn, styles7.actionBtnDanger], onClick: () => setShowDeleteConfirm(true), children: [
3655
+ /* @__PURE__ */ jsx7("svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx7("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" }) }),
3255
3656
  "Delete"
3256
3657
  ] })
3257
3658
  ] })
@@ -3268,11 +3669,11 @@ function formatFileSize3(bytes) {
3268
3669
 
3269
3670
  // src/components/StudioSettings.tsx
3270
3671
  import { useState as useState7 } from "react";
3271
- import { css as css7 } from "@emotion/react";
3272
- import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "@emotion/react/jsx-runtime";
3672
+ import { css as css8 } from "@emotion/react";
3673
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "@emotion/react/jsx-runtime";
3273
3674
  var btnHeight2 = "36px";
3274
- var styles7 = {
3275
- btn: css7`
3675
+ var styles8 = {
3676
+ btn: css8`
3276
3677
  height: ${btnHeight2};
3277
3678
  padding: 0 12px;
3278
3679
  background: ${colors.surface};
@@ -3289,12 +3690,12 @@ var styles7 = {
3289
3690
  border-color: ${colors.borderHover};
3290
3691
  }
3291
3692
  `,
3292
- icon: css7`
3693
+ icon: css8`
3293
3694
  width: 16px;
3294
3695
  height: 16px;
3295
3696
  color: ${colors.textSecondary};
3296
3697
  `,
3297
- overlay: css7`
3698
+ overlay: css8`
3298
3699
  position: fixed;
3299
3700
  top: 0;
3300
3701
  right: 0;
@@ -3307,7 +3708,7 @@ var styles7 = {
3307
3708
  background-color: rgba(26, 31, 54, 0.4);
3308
3709
  backdrop-filter: blur(4px);
3309
3710
  `,
3310
- panel: css7`
3711
+ panel: css8`
3311
3712
  ${baseReset}
3312
3713
  position: relative;
3313
3714
  background-color: ${colors.surface};
@@ -3317,20 +3718,20 @@ var styles7 = {
3317
3718
  max-width: 512px;
3318
3719
  padding: 24px;
3319
3720
  `,
3320
- header: css7`
3721
+ header: css8`
3321
3722
  display: flex;
3322
3723
  align-items: center;
3323
3724
  justify-content: space-between;
3324
3725
  margin-bottom: 24px;
3325
3726
  `,
3326
- title: css7`
3727
+ title: css8`
3327
3728
  font-size: ${fontSize.xl};
3328
3729
  font-weight: 600;
3329
3730
  color: ${colors.text};
3330
3731
  margin: 0;
3331
3732
  letter-spacing: -0.02em;
3332
3733
  `,
3333
- closeBtn: css7`
3734
+ closeBtn: css8`
3334
3735
  padding: 6px;
3335
3736
  background: ${colors.surface};
3336
3737
  border: 1px solid ${colors.border};
@@ -3346,26 +3747,26 @@ var styles7 = {
3346
3747
  border-color: ${colors.borderHover};
3347
3748
  }
3348
3749
  `,
3349
- sections: css7`
3750
+ sections: css8`
3350
3751
  display: flex;
3351
3752
  flex-direction: column;
3352
3753
  gap: 24px;
3353
3754
  `,
3354
- sectionTitle: css7`
3755
+ sectionTitle: css8`
3355
3756
  font-size: ${fontSize.base};
3356
3757
  font-weight: 600;
3357
3758
  color: ${colors.text};
3358
3759
  margin: 0 0 12px 0;
3359
3760
  `,
3360
- description: css7`
3761
+ description: css8`
3361
3762
  font-size: ${fontSize.sm};
3362
3763
  color: ${colors.textSecondary};
3363
3764
  margin: 0 0 12px 0;
3364
3765
  `,
3365
- codeWrapper: css7`
3766
+ codeWrapper: css8`
3366
3767
  position: relative;
3367
3768
  `,
3368
- code: css7`
3769
+ code: css8`
3369
3770
  background-color: ${colors.background};
3370
3771
  border-radius: 8px;
3371
3772
  padding: 12px;
@@ -3377,7 +3778,7 @@ var styles7 = {
3377
3778
  overflow-x: auto;
3378
3779
  white-space: nowrap;
3379
3780
  `,
3380
- copyBtn: css7`
3781
+ copyBtn: css8`
3381
3782
  position: absolute;
3382
3783
  top: 8px;
3383
3784
  right: 8px;
@@ -3396,7 +3797,7 @@ var styles7 = {
3396
3797
  border-color: ${colors.borderHover};
3397
3798
  }
3398
3799
  `,
3399
- tooltip: css7`
3800
+ tooltip: css8`
3400
3801
  position: absolute;
3401
3802
  bottom: 100%;
3402
3803
  left: 50%;
@@ -3421,19 +3822,19 @@ var styles7 = {
3421
3822
  border-top-color: #1a1f36;
3422
3823
  }
3423
3824
  `,
3424
- copyIcon: css7`
3825
+ copyIcon: css8`
3425
3826
  width: 14px;
3426
3827
  height: 14px;
3427
3828
  color: ${colors.textSecondary};
3428
3829
  `,
3429
- codeLine: css7`
3830
+ codeLine: css8`
3430
3831
  margin: 0 0 4px 0;
3431
3832
 
3432
3833
  &:last-child {
3433
3834
  margin: 0;
3434
3835
  }
3435
3836
  `,
3436
- input: css7`
3837
+ input: css8`
3437
3838
  width: 100%;
3438
3839
  padding: 10px 14px;
3439
3840
  border: 1px solid ${colors.border};
@@ -3453,19 +3854,19 @@ var styles7 = {
3453
3854
  color: ${colors.textMuted};
3454
3855
  }
3455
3856
  `,
3456
- grid: css7`
3857
+ grid: css8`
3457
3858
  display: grid;
3458
3859
  grid-template-columns: repeat(3, 1fr);
3459
3860
  gap: 12px;
3460
3861
  `,
3461
- label: css7`
3862
+ label: css8`
3462
3863
  font-size: ${fontSize.xs};
3463
3864
  font-weight: 500;
3464
3865
  color: ${colors.textSecondary};
3465
3866
  display: block;
3466
3867
  margin-bottom: 6px;
3467
3868
  `,
3468
- footer: css7`
3869
+ footer: css8`
3469
3870
  margin-top: 24px;
3470
3871
  padding-top: 20px;
3471
3872
  border-top: 1px solid ${colors.border};
@@ -3473,7 +3874,7 @@ var styles7 = {
3473
3874
  justify-content: flex-end;
3474
3875
  gap: 12px;
3475
3876
  `,
3476
- cancelBtn: css7`
3877
+ cancelBtn: css8`
3477
3878
  padding: 10px 18px;
3478
3879
  font-size: ${fontSize.base};
3479
3880
  font-weight: 500;
@@ -3489,7 +3890,7 @@ var styles7 = {
3489
3890
  border-color: ${colors.borderHover};
3490
3891
  }
3491
3892
  `,
3492
- saveBtn: css7`
3893
+ saveBtn: css8`
3493
3894
  padding: 10px 18px;
3494
3895
  font-size: ${fontSize.base};
3495
3896
  font-weight: 500;
@@ -3508,11 +3909,11 @@ var styles7 = {
3508
3909
  };
3509
3910
  function StudioSettings() {
3510
3911
  const [isOpen, setIsOpen] = useState7(false);
3511
- return /* @__PURE__ */ jsxs7(Fragment4, { children: [
3512
- /* @__PURE__ */ jsx7("button", { css: styles7.btn, onClick: () => setIsOpen(true), "aria-label": "Settings", children: /* @__PURE__ */ jsxs7(
3912
+ return /* @__PURE__ */ jsxs8(Fragment4, { children: [
3913
+ /* @__PURE__ */ jsx8("button", { css: styles8.btn, onClick: () => setIsOpen(true), "aria-label": "Settings", children: /* @__PURE__ */ jsxs8(
3513
3914
  "svg",
3514
3915
  {
3515
- css: styles7.icon,
3916
+ css: styles8.icon,
3516
3917
  xmlns: "http://www.w3.org/2000/svg",
3517
3918
  viewBox: "0 0 24 24",
3518
3919
  fill: "none",
@@ -3521,12 +3922,12 @@ function StudioSettings() {
3521
3922
  strokeLinecap: "round",
3522
3923
  strokeLinejoin: "round",
3523
3924
  children: [
3524
- /* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" }),
3525
- /* @__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" })
3925
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "3" }),
3926
+ /* @__PURE__ */ jsx8("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" })
3526
3927
  ]
3527
3928
  }
3528
3929
  ) }),
3529
- isOpen && /* @__PURE__ */ jsx7(SettingsPanel, { onClose: () => setIsOpen(false) })
3930
+ isOpen && /* @__PURE__ */ jsx8(SettingsPanel, { onClose: () => setIsOpen(false) })
3530
3931
  ] });
3531
3932
  }
3532
3933
  var envTemplate = `CLOUDFLARE_R2_ACCOUNT_ID=abc123def456ghi789
@@ -3541,59 +3942,59 @@ function SettingsPanel({ onClose }) {
3541
3942
  setCopied(true);
3542
3943
  setTimeout(() => setCopied(false), 2e3);
3543
3944
  };
3544
- return /* @__PURE__ */ jsx7("div", { css: styles7.overlay, onClick: onClose, children: /* @__PURE__ */ jsxs7("div", { css: styles7.panel, onClick: (e) => e.stopPropagation(), children: [
3545
- /* @__PURE__ */ jsxs7("div", { css: styles7.header, children: [
3546
- /* @__PURE__ */ jsx7("h2", { css: styles7.title, children: "Settings" }),
3547
- /* @__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" }) }) })
3945
+ return /* @__PURE__ */ jsx8("div", { css: styles8.overlay, onClick: onClose, children: /* @__PURE__ */ jsxs8("div", { css: styles8.panel, onClick: (e) => e.stopPropagation(), children: [
3946
+ /* @__PURE__ */ jsxs8("div", { css: styles8.header, children: [
3947
+ /* @__PURE__ */ jsx8("h2", { css: styles8.title, children: "Settings" }),
3948
+ /* @__PURE__ */ jsx8("button", { css: styles8.closeBtn, onClick: onClose, children: /* @__PURE__ */ jsx8("svg", { css: styles8.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
3548
3949
  ] }),
3549
- /* @__PURE__ */ jsxs7("div", { css: styles7.sections, children: [
3550
- /* @__PURE__ */ jsxs7("section", { children: [
3551
- /* @__PURE__ */ jsx7("h3", { css: styles7.sectionTitle, children: "Cloudflare R2" }),
3552
- /* @__PURE__ */ jsx7("p", { css: styles7.description, children: "Configure in .env.local file:" }),
3553
- /* @__PURE__ */ jsxs7("div", { css: styles7.codeWrapper, children: [
3554
- /* @__PURE__ */ jsxs7("button", { css: styles7.copyBtn, onClick: handleCopy, title: "Copy to clipboard", children: [
3555
- copied && /* @__PURE__ */ jsx7("span", { css: styles7.tooltip, children: "Copied!" }),
3556
- /* @__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" }) })
3950
+ /* @__PURE__ */ jsxs8("div", { css: styles8.sections, children: [
3951
+ /* @__PURE__ */ jsxs8("section", { children: [
3952
+ /* @__PURE__ */ jsx8("h3", { css: styles8.sectionTitle, children: "Cloudflare R2" }),
3953
+ /* @__PURE__ */ jsx8("p", { css: styles8.description, children: "Configure in .env.local file:" }),
3954
+ /* @__PURE__ */ jsxs8("div", { css: styles8.codeWrapper, children: [
3955
+ /* @__PURE__ */ jsxs8("button", { css: styles8.copyBtn, onClick: handleCopy, title: "Copy to clipboard", children: [
3956
+ copied && /* @__PURE__ */ jsx8("span", { css: styles8.tooltip, children: "Copied!" }),
3957
+ /* @__PURE__ */ jsx8("svg", { css: styles8.copyIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("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" }) })
3557
3958
  ] }),
3558
- /* @__PURE__ */ jsxs7("div", { css: styles7.code, children: [
3559
- /* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_ACCOUNT_ID=abc123def456ghi789" }),
3560
- /* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id_here" }),
3561
- /* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key_here" }),
3562
- /* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_BUCKET_NAME=my-images-bucket" }),
3563
- /* @__PURE__ */ jsx7("p", { css: styles7.codeLine, children: "CLOUDFLARE_R2_PUBLIC_URL=https://cdn.yourdomain.com" })
3959
+ /* @__PURE__ */ jsxs8("div", { css: styles8.code, children: [
3960
+ /* @__PURE__ */ jsx8("p", { css: styles8.codeLine, children: "CLOUDFLARE_R2_ACCOUNT_ID=abc123def456ghi789" }),
3961
+ /* @__PURE__ */ jsx8("p", { css: styles8.codeLine, children: "CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id_here" }),
3962
+ /* @__PURE__ */ jsx8("p", { css: styles8.codeLine, children: "CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key_here" }),
3963
+ /* @__PURE__ */ jsx8("p", { css: styles8.codeLine, children: "CLOUDFLARE_R2_BUCKET_NAME=my-images-bucket" }),
3964
+ /* @__PURE__ */ jsx8("p", { css: styles8.codeLine, children: "CLOUDFLARE_R2_PUBLIC_URL=https://cdn.yourdomain.com" })
3564
3965
  ] })
3565
3966
  ] })
3566
3967
  ] }),
3567
- /* @__PURE__ */ jsxs7("section", { children: [
3568
- /* @__PURE__ */ jsx7("h3", { css: styles7.sectionTitle, children: "Thumbnail Sizes" }),
3569
- /* @__PURE__ */ jsxs7("div", { css: styles7.grid, children: [
3570
- /* @__PURE__ */ jsxs7("div", { children: [
3571
- /* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Small" }),
3572
- /* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 300 })
3968
+ /* @__PURE__ */ jsxs8("section", { children: [
3969
+ /* @__PURE__ */ jsx8("h3", { css: styles8.sectionTitle, children: "Thumbnail Sizes" }),
3970
+ /* @__PURE__ */ jsxs8("div", { css: styles8.grid, children: [
3971
+ /* @__PURE__ */ jsxs8("div", { children: [
3972
+ /* @__PURE__ */ jsx8("label", { css: styles8.label, children: "Small" }),
3973
+ /* @__PURE__ */ jsx8("input", { css: styles8.input, type: "number", defaultValue: 300 })
3573
3974
  ] }),
3574
- /* @__PURE__ */ jsxs7("div", { children: [
3575
- /* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Medium" }),
3576
- /* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 700 })
3975
+ /* @__PURE__ */ jsxs8("div", { children: [
3976
+ /* @__PURE__ */ jsx8("label", { css: styles8.label, children: "Medium" }),
3977
+ /* @__PURE__ */ jsx8("input", { css: styles8.input, type: "number", defaultValue: 700 })
3577
3978
  ] }),
3578
- /* @__PURE__ */ jsxs7("div", { children: [
3579
- /* @__PURE__ */ jsx7("label", { css: styles7.label, children: "Large" }),
3580
- /* @__PURE__ */ jsx7("input", { css: styles7.input, type: "number", defaultValue: 1400 })
3979
+ /* @__PURE__ */ jsxs8("div", { children: [
3980
+ /* @__PURE__ */ jsx8("label", { css: styles8.label, children: "Large" }),
3981
+ /* @__PURE__ */ jsx8("input", { css: styles8.input, type: "number", defaultValue: 1400 })
3581
3982
  ] })
3582
3983
  ] })
3583
3984
  ] })
3584
3985
  ] }),
3585
- /* @__PURE__ */ jsxs7("div", { css: styles7.footer, children: [
3586
- /* @__PURE__ */ jsx7("button", { css: styles7.cancelBtn, onClick: onClose, children: "Cancel" }),
3587
- /* @__PURE__ */ jsx7("button", { css: styles7.saveBtn, children: "Save Changes" })
3986
+ /* @__PURE__ */ jsxs8("div", { css: styles8.footer, children: [
3987
+ /* @__PURE__ */ jsx8("button", { css: styles8.cancelBtn, onClick: onClose, children: "Cancel" }),
3988
+ /* @__PURE__ */ jsx8("button", { css: styles8.saveBtn, children: "Save Changes" })
3588
3989
  ] })
3589
3990
  ] }) });
3590
3991
  }
3591
3992
 
3592
3993
  // src/components/ErrorModal.tsx
3593
- import { css as css8 } from "@emotion/react";
3594
- import { jsx as jsx8, jsxs as jsxs8 } from "@emotion/react/jsx-runtime";
3595
- var styles8 = {
3596
- overlay: css8`
3994
+ import { css as css9 } from "@emotion/react";
3995
+ import { jsx as jsx9, jsxs as jsxs9 } from "@emotion/react/jsx-runtime";
3996
+ var styles9 = {
3997
+ overlay: css9`
3597
3998
  position: fixed;
3598
3999
  inset: 0;
3599
4000
  background: rgba(0, 0, 0, 0.5);
@@ -3602,7 +4003,7 @@ var styles8 = {
3602
4003
  justify-content: center;
3603
4004
  z-index: 1100;
3604
4005
  `,
3605
- modal: css8`
4006
+ modal: css9`
3606
4007
  background: ${colors.surface};
3607
4008
  border-radius: 12px;
3608
4009
  padding: 24px;
@@ -3610,31 +4011,31 @@ var styles8 = {
3610
4011
  width: 90%;
3611
4012
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
3612
4013
  `,
3613
- header: css8`
4014
+ header: css9`
3614
4015
  display: flex;
3615
4016
  align-items: center;
3616
4017
  gap: 12px;
3617
4018
  margin-bottom: 12px;
3618
4019
  `,
3619
- icon: css8`
4020
+ icon: css9`
3620
4021
  width: 24px;
3621
4022
  height: 24px;
3622
4023
  color: ${colors.danger};
3623
4024
  flex-shrink: 0;
3624
4025
  `,
3625
- title: css8`
4026
+ title: css9`
3626
4027
  font-size: ${fontSize.lg};
3627
4028
  font-weight: 600;
3628
4029
  color: ${colors.text};
3629
4030
  margin: 0;
3630
4031
  `,
3631
- message: css8`
4032
+ message: css9`
3632
4033
  font-size: ${fontSize.base};
3633
4034
  color: ${colors.textSecondary};
3634
4035
  margin: 0 0 20px 0;
3635
4036
  line-height: 1.5;
3636
4037
  `,
3637
- button: css8`
4038
+ button: css9`
3638
4039
  width: 100%;
3639
4040
  padding: 10px 16px;
3640
4041
  border-radius: 6px;
@@ -3654,28 +4055,28 @@ var styles8 = {
3654
4055
  function ErrorModal() {
3655
4056
  const { error, clearError } = useStudio();
3656
4057
  if (!error) return null;
3657
- return /* @__PURE__ */ jsx8("div", { css: styles8.overlay, onClick: clearError, children: /* @__PURE__ */ jsxs8("div", { css: styles8.modal, onClick: (e) => e.stopPropagation(), children: [
3658
- /* @__PURE__ */ jsxs8("div", { css: styles8.header, children: [
3659
- /* @__PURE__ */ jsx8("svg", { css: styles8.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
3660
- /* @__PURE__ */ jsx8("h3", { css: styles8.title, children: error.title })
4058
+ return /* @__PURE__ */ jsx9("div", { css: styles9.overlay, onClick: clearError, children: /* @__PURE__ */ jsxs9("div", { css: styles9.modal, onClick: (e) => e.stopPropagation(), children: [
4059
+ /* @__PURE__ */ jsxs9("div", { css: styles9.header, children: [
4060
+ /* @__PURE__ */ jsx9("svg", { css: styles9.icon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx9("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
4061
+ /* @__PURE__ */ jsx9("h3", { css: styles9.title, children: error.title })
3661
4062
  ] }),
3662
- /* @__PURE__ */ jsx8("p", { css: styles8.message, children: error.message }),
3663
- /* @__PURE__ */ jsx8("button", { css: styles8.button, onClick: clearError, children: "OK" })
4063
+ /* @__PURE__ */ jsx9("p", { css: styles9.message, children: error.message }),
4064
+ /* @__PURE__ */ jsx9("button", { css: styles9.button, onClick: clearError, children: "OK" })
3664
4065
  ] }) });
3665
4066
  }
3666
4067
 
3667
4068
  // src/components/StudioUI.tsx
3668
- import { jsx as jsx9, jsxs as jsxs9 } from "@emotion/react/jsx-runtime";
4069
+ import { jsx as jsx10, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
3669
4070
  var btnHeight3 = "36px";
3670
- var styles9 = {
3671
- container: css9`
4071
+ var styles10 = {
4072
+ container: css10`
3672
4073
  ${baseReset}
3673
4074
  display: flex;
3674
4075
  flex-direction: column;
3675
4076
  height: 100%;
3676
4077
  background: ${colors.background};
3677
4078
  `,
3678
- header: css9`
4079
+ header: css10`
3679
4080
  display: flex;
3680
4081
  align-items: center;
3681
4082
  justify-content: space-between;
@@ -3684,7 +4085,7 @@ var styles9 = {
3684
4085
  border-bottom: 1px solid ${colors.border};
3685
4086
  position: relative;
3686
4087
  `,
3687
- title: css9`
4088
+ title: css10`
3688
4089
  font-size: ${fontSize.lg};
3689
4090
  font-weight: 600;
3690
4091
  color: ${colors.text};
@@ -3692,14 +4093,14 @@ var styles9 = {
3692
4093
  letter-spacing: -0.02em;
3693
4094
  flex-shrink: 0;
3694
4095
  `,
3695
- headerLeft: css9`
4096
+ headerLeft: css10`
3696
4097
  display: flex;
3697
4098
  align-items: center;
3698
4099
  gap: 12px;
3699
4100
  flex: 1;
3700
4101
  min-width: 0;
3701
4102
  `,
3702
- headerCenter: css9`
4103
+ headerCenter: css10`
3703
4104
  position: absolute;
3704
4105
  left: 50%;
3705
4106
  transform: translateX(-50%);
@@ -3707,7 +4108,7 @@ var styles9 = {
3707
4108
  align-items: center;
3708
4109
  max-width: 50%;
3709
4110
  `,
3710
- breadcrumbs: css9`
4111
+ breadcrumbs: css10`
3711
4112
  display: flex;
3712
4113
  align-items: center;
3713
4114
  gap: 6px;
@@ -3715,11 +4116,11 @@ var styles9 = {
3715
4116
  color: ${colors.textSecondary};
3716
4117
  overflow: hidden;
3717
4118
  `,
3718
- breadcrumbSeparator: css9`
4119
+ breadcrumbSeparator: css10`
3719
4120
  color: ${colors.border};
3720
4121
  flex-shrink: 0;
3721
4122
  `,
3722
- breadcrumbItem: css9`
4123
+ breadcrumbItem: css10`
3723
4124
  color: ${colors.textSecondary};
3724
4125
  text-decoration: none;
3725
4126
  cursor: pointer;
@@ -3730,19 +4131,19 @@ var styles9 = {
3730
4131
  color: ${colors.primary};
3731
4132
  }
3732
4133
  `,
3733
- breadcrumbCurrent: css9`
4134
+ breadcrumbCurrent: css10`
3734
4135
  color: ${colors.text};
3735
4136
  font-weight: 500;
3736
4137
  white-space: nowrap;
3737
4138
  overflow: hidden;
3738
4139
  text-overflow: ellipsis;
3739
4140
  `,
3740
- headerActions: css9`
4141
+ headerActions: css10`
3741
4142
  display: flex;
3742
4143
  align-items: center;
3743
4144
  gap: 8px;
3744
4145
  `,
3745
- headerBtn: css9`
4146
+ headerBtn: css10`
3746
4147
  height: ${btnHeight3};
3747
4148
  padding: 0 12px;
3748
4149
  background: ${colors.surface};
@@ -3759,23 +4160,23 @@ var styles9 = {
3759
4160
  border-color: ${colors.borderHover};
3760
4161
  }
3761
4162
  `,
3762
- headerIcon: css9`
4163
+ headerIcon: css10`
3763
4164
  width: 16px;
3764
4165
  height: 16px;
3765
4166
  color: ${colors.textSecondary};
3766
4167
  `,
3767
- content: css9`
4168
+ content: css10`
3768
4169
  flex: 1;
3769
4170
  display: flex;
3770
4171
  overflow: hidden;
3771
4172
  `,
3772
- fileBrowser: css9`
4173
+ fileBrowser: css10`
3773
4174
  flex: 1;
3774
4175
  min-width: 0;
3775
4176
  overflow: auto;
3776
4177
  padding: 20px 24px;
3777
4178
  `,
3778
- dropOverlay: css9`
4179
+ dropOverlay: css10`
3779
4180
  position: absolute;
3780
4181
  top: 0;
3781
4182
  left: 0;
@@ -3790,7 +4191,7 @@ var styles9 = {
3790
4191
  z-index: 50;
3791
4192
  pointer-events: none;
3792
4193
  `,
3793
- dropMessage: css9`
4194
+ dropMessage: css10`
3794
4195
  display: flex;
3795
4196
  flex-direction: column;
3796
4197
  align-items: center;
@@ -3799,7 +4200,7 @@ var styles9 = {
3799
4200
  font-size: ${fontSize.lg};
3800
4201
  font-weight: 600;
3801
4202
  `,
3802
- dropIcon: css9`
4203
+ dropIcon: css10`
3803
4204
  width: 48px;
3804
4205
  height: 48px;
3805
4206
  `
@@ -3961,42 +4362,42 @@ function StudioUI({ onClose, isVisible = true }) {
3961
4362
  showError,
3962
4363
  clearError
3963
4364
  };
3964
- return /* @__PURE__ */ jsx9(StudioContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs9("div", { css: styles9.container, children: [
3965
- /* @__PURE__ */ jsxs9("div", { css: styles9.header, children: [
3966
- /* @__PURE__ */ jsx9("div", { css: styles9.headerLeft, children: /* @__PURE__ */ jsx9("h1", { css: styles9.title, children: "Studio" }) }),
3967
- /* @__PURE__ */ jsx9("div", { css: styles9.headerCenter, children: /* @__PURE__ */ jsx9(Breadcrumbs, { currentPath, onNavigate: setCurrentPath }) }),
3968
- /* @__PURE__ */ jsxs9("div", { css: styles9.headerActions, children: [
3969
- /* @__PURE__ */ jsx9(StudioSettings, {}),
3970
- /* @__PURE__ */ jsx9(
4365
+ return /* @__PURE__ */ jsx10(StudioContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs10("div", { css: styles10.container, children: [
4366
+ /* @__PURE__ */ jsxs10("div", { css: styles10.header, children: [
4367
+ /* @__PURE__ */ jsx10("div", { css: styles10.headerLeft, children: /* @__PURE__ */ jsx10("h1", { css: styles10.title, children: "Studio" }) }),
4368
+ /* @__PURE__ */ jsx10("div", { css: styles10.headerCenter, children: /* @__PURE__ */ jsx10(Breadcrumbs, { currentPath, onNavigate: setCurrentPath }) }),
4369
+ /* @__PURE__ */ jsxs10("div", { css: styles10.headerActions, children: [
4370
+ /* @__PURE__ */ jsx10(StudioSettings, {}),
4371
+ /* @__PURE__ */ jsx10(
3971
4372
  "button",
3972
4373
  {
3973
- css: styles9.headerBtn,
4374
+ css: styles10.headerBtn,
3974
4375
  onClick: onClose,
3975
4376
  "aria-label": "Close Studio",
3976
- children: /* @__PURE__ */ jsx9(CloseIcon, {})
4377
+ children: /* @__PURE__ */ jsx10(CloseIcon, {})
3977
4378
  }
3978
4379
  )
3979
4380
  ] })
3980
4381
  ] }),
3981
- /* @__PURE__ */ jsx9(StudioToolbar, {}),
3982
- /* @__PURE__ */ jsxs9(
4382
+ /* @__PURE__ */ jsx10(StudioToolbar, {}),
4383
+ /* @__PURE__ */ jsxs10(
3983
4384
  "div",
3984
4385
  {
3985
- css: styles9.content,
4386
+ css: styles10.content,
3986
4387
  onDragOver: handleDragOver,
3987
4388
  onDragLeave: handleDragLeave,
3988
4389
  onDrop: handleDrop,
3989
4390
  children: [
3990
- isDragging && /* @__PURE__ */ jsx9("div", { css: styles9.dropOverlay, children: /* @__PURE__ */ jsxs9("div", { css: styles9.dropMessage, children: [
3991
- /* @__PURE__ */ jsx9("svg", { css: styles9.dropIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx9("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" }) }),
3992
- /* @__PURE__ */ jsx9("span", { children: "Drop files to upload" })
4391
+ isDragging && /* @__PURE__ */ jsx10("div", { css: styles10.dropOverlay, children: /* @__PURE__ */ jsxs10("div", { css: styles10.dropMessage, children: [
4392
+ /* @__PURE__ */ jsx10("svg", { css: styles10.dropIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx10("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" }) }),
4393
+ /* @__PURE__ */ jsx10("span", { children: "Drop files to upload" })
3993
4394
  ] }) }),
3994
- /* @__PURE__ */ jsx9("div", { css: styles9.fileBrowser, children: viewMode === "grid" ? /* @__PURE__ */ jsx9(StudioFileGrid, {}) : /* @__PURE__ */ jsx9(StudioFileList, {}) })
4395
+ /* @__PURE__ */ jsx10("div", { css: styles10.fileBrowser, children: viewMode === "grid" ? /* @__PURE__ */ jsx10(StudioFileGrid, {}) : /* @__PURE__ */ jsx10(StudioFileList, {}) })
3995
4396
  ]
3996
4397
  }
3997
4398
  ),
3998
- focusedItem && /* @__PURE__ */ jsx9(StudioDetailView, {}),
3999
- /* @__PURE__ */ jsx9(ErrorModal, {})
4399
+ focusedItem && /* @__PURE__ */ jsx10(StudioDetailView, {}),
4400
+ /* @__PURE__ */ jsx10(ErrorModal, {})
4000
4401
  ] }) });
4001
4402
  }
4002
4403
  function Breadcrumbs({ currentPath, onNavigate }) {
@@ -4005,12 +4406,12 @@ function Breadcrumbs({ currentPath, onNavigate }) {
4005
4406
  name: part,
4006
4407
  path: parts.slice(0, index + 1).join("/")
4007
4408
  }));
4008
- return /* @__PURE__ */ jsx9("div", { css: styles9.breadcrumbs, children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs9("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
4009
- index > 0 && /* @__PURE__ */ jsx9("span", { css: styles9.breadcrumbSeparator, children: "/" }),
4010
- index === breadcrumbs.length - 1 ? /* @__PURE__ */ jsx9("span", { css: styles9.breadcrumbCurrent, children: crumb.name }) : /* @__PURE__ */ jsx9(
4409
+ return /* @__PURE__ */ jsx10("div", { css: styles10.breadcrumbs, children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs10("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
4410
+ index > 0 && /* @__PURE__ */ jsx10("span", { css: styles10.breadcrumbSeparator, children: "/" }),
4411
+ index === breadcrumbs.length - 1 ? /* @__PURE__ */ jsx10("span", { css: styles10.breadcrumbCurrent, children: crumb.name }) : /* @__PURE__ */ jsx10(
4011
4412
  "span",
4012
4413
  {
4013
- css: styles9.breadcrumbItem,
4414
+ css: styles10.breadcrumbItem,
4014
4415
  onClick: () => onNavigate(crumb.path),
4015
4416
  children: crumb.name
4016
4417
  }
@@ -4018,10 +4419,10 @@ function Breadcrumbs({ currentPath, onNavigate }) {
4018
4419
  ] }, crumb.path)) });
4019
4420
  }
4020
4421
  function CloseIcon() {
4021
- return /* @__PURE__ */ jsxs9(
4422
+ return /* @__PURE__ */ jsxs10(
4022
4423
  "svg",
4023
4424
  {
4024
- css: styles9.headerIcon,
4425
+ css: styles10.headerIcon,
4025
4426
  xmlns: "http://www.w3.org/2000/svg",
4026
4427
  viewBox: "0 0 24 24",
4027
4428
  fill: "none",
@@ -4030,8 +4431,8 @@ function CloseIcon() {
4030
4431
  strokeLinecap: "round",
4031
4432
  strokeLinejoin: "round",
4032
4433
  children: [
4033
- /* @__PURE__ */ jsx9("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
4034
- /* @__PURE__ */ jsx9("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
4434
+ /* @__PURE__ */ jsx10("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
4435
+ /* @__PURE__ */ jsx10("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
4035
4436
  ]
4036
4437
  }
4037
4438
  );
@@ -4041,4 +4442,4 @@ export {
4041
4442
  StudioUI,
4042
4443
  StudioUI_default as default
4043
4444
  };
4044
- //# sourceMappingURL=StudioUI-VJVOSOPD.mjs.map
4445
+ //# sourceMappingURL=StudioUI-XV7HCEAF.mjs.map