@tscircuit/runframe 0.0.1351 → 0.0.1352

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/runner.js CHANGED
@@ -33,13 +33,49 @@ import {
33
33
  useRunFrameStore,
34
34
  useRunnerStore,
35
35
  useStyles
36
- } from "./chunk-QFFTWWHI.js";
36
+ } from "./chunk-WICK7VQM.js";
37
37
 
38
38
  // lib/components/RunFrame/RunFrame.tsx
39
39
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";
40
40
  import Debug from "debug";
41
41
  import { Loader2, Play, Square } from "lucide-react";
42
42
  import { useEffect, useReducer, useRef as useRef2, useState } from "react";
43
+ import { ErrorBoundary } from "react-error-boundary";
44
+
45
+ // lib/components/RunFrame/RunFrameErrorFallback.tsx
46
+ import { AlertTriangle } from "lucide-react";
47
+ import { jsx, jsxs } from "react/jsx-runtime";
48
+ var RunFrameErrorFallback = ({
49
+ error,
50
+ resetErrorBoundary
51
+ }) => {
52
+ return /* @__PURE__ */ jsx("section", { className: "rf-h-full rf-w-full rf-grid rf-place-items-center", children: /* @__PURE__ */ jsx("div", { className: "rf-min-h-full rf-flex rf-items-center rf-justify-center rf-px-4", children: /* @__PURE__ */ jsxs("div", { className: "rf-max-w-lg rf-w-full rf-text-center", children: [
53
+ /* @__PURE__ */ jsxs("div", { className: "rf-mb-8", children: [
54
+ /* @__PURE__ */ jsx("div", { className: "rf-inline-flex rf-items-center rf-justify-center rf-w-20 rf-h-20 rf-bg-red-100 rf-rounded-full rf-mb-6", children: /* @__PURE__ */ jsx(AlertTriangle, { className: "rf-w-10 rf-h-10 rf-text-red-600" }) }),
55
+ /* @__PURE__ */ jsx("h1", { className: "rf-text-2xl rf-font-bold rf-text-gray-900 rf-mb-3", children: "Oops! Something went wrong" }),
56
+ /* @__PURE__ */ jsx("p", { className: "rf-text-gray-600 rf-mb-4", children: "RunFrame encountered an unexpected error." }),
57
+ /* @__PURE__ */ jsx("pre", { className: "rf-text-xs no-scrollbar rf-font-mono rf-text-left rf-whitespace-pre-wrap rf-text-red-600 rf-bg-red-50 rf-border rf-border-red-200 rf-p-3 rf-rounded-lg rf-mb-4 rf-overflow-auto rf-max-h-[120px]", children: error.message }),
58
+ error.stack && /* @__PURE__ */ jsxs("details", { className: "rf-text-center rf-mb-6", children: [
59
+ /* @__PURE__ */ jsx("summary", { className: "rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700", children: "View stack trace" }),
60
+ /* @__PURE__ */ jsx("pre", { className: "rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]", children: error.stack })
61
+ ] })
62
+ ] }),
63
+ /* @__PURE__ */ jsxs("div", { className: "rf-flex rf-flex-col rf-gap-2 rf-justify-center", children: [
64
+ /* @__PURE__ */ jsx(
65
+ Button,
66
+ {
67
+ variant: "destructive",
68
+ size: "lg",
69
+ onClick: () => window.location.reload(),
70
+ children: "Refresh Dev Server"
71
+ }
72
+ ),
73
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", onClick: resetErrorBoundary, children: "Try Again" })
74
+ ] })
75
+ ] }) }) });
76
+ };
77
+
78
+ // lib/components/RunFrame/RunFrame.tsx
43
79
  import {
44
80
  orderedRenderPhases as orderedRenderPhases2
45
81
  } from "@tscircuit/core";
@@ -136,14 +172,14 @@ function useMutex() {
136
172
  }
137
173
 
138
174
  // lib/components/ui/LoadingSkeleton.tsx
139
- import { jsx, jsxs } from "react/jsx-runtime";
175
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
140
176
  var LoadingSkeleton = ({
141
177
  message = "Loading files..."
142
178
  }) => {
143
- return /* @__PURE__ */ jsxs("div", { className: "rf-flex rf-flex-col rf-w-full rf-h-full", children: [
144
- /* @__PURE__ */ jsxs("div", { className: "rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b", children: [
145
- /* @__PURE__ */ jsx("div", { className: "rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse" }),
146
- /* @__PURE__ */ jsx("div", { className: "rf-flex rf-gap-6 rf-ml-auto", children: ["PCB", "Schematic", "3D"].map((_, i) => /* @__PURE__ */ jsx(
179
+ return /* @__PURE__ */ jsxs2("div", { className: "rf-flex rf-flex-col rf-w-full rf-h-full", children: [
180
+ /* @__PURE__ */ jsxs2("div", { className: "rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b", children: [
181
+ /* @__PURE__ */ jsx2("div", { className: "rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse" }),
182
+ /* @__PURE__ */ jsx2("div", { className: "rf-flex rf-gap-6 rf-ml-auto", children: ["PCB", "Schematic", "3D"].map((_, i) => /* @__PURE__ */ jsx2(
147
183
  "div",
148
184
  {
149
185
  className: "rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"
@@ -151,7 +187,7 @@ var LoadingSkeleton = ({
151
187
  i
152
188
  )) })
153
189
  ] }),
154
- /* @__PURE__ */ jsx("div", { className: "rf-flex-1 rf-p-4", children: /* @__PURE__ */ jsx("div", { className: "rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center", children: /* @__PURE__ */ jsx("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-4", children: /* @__PURE__ */ jsx("div", { className: "rf-text-sm rf-text-gray-400 dark:rf-text-gray-500", children: message }) }) }) })
190
+ /* @__PURE__ */ jsx2("div", { className: "rf-flex-1 rf-p-4", children: /* @__PURE__ */ jsx2("div", { className: "rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center", children: /* @__PURE__ */ jsx2("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-4", children: /* @__PURE__ */ jsx2("div", { className: "rf-text-sm rf-text-gray-400 dark:rf-text-gray-500", children: message }) }) }) })
155
191
  ] });
156
192
  };
157
193
 
@@ -200,7 +236,7 @@ var buildRunCompletedPayload = ({
200
236
  };
201
237
 
202
238
  // lib/components/RunFrame/RunFrame.tsx
203
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
239
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
204
240
  var numRenderPhases = 26;
205
241
  var debug = Debug("run-frame:RunFrame");
206
242
  var fetchLatestEvalVersion = async () => {
@@ -589,9 +625,9 @@ var RunFrame = (props) => {
589
625
  });
590
626
  };
591
627
  if (props.isLoadingFiles) {
592
- return /* @__PURE__ */ jsx2(LoadingSkeleton, {});
628
+ return /* @__PURE__ */ jsx3(LoadingSkeleton, {});
593
629
  }
594
- return /* @__PURE__ */ jsx2(
630
+ return /* @__PURE__ */ jsx3(ErrorBoundary, { FallbackComponent: RunFrameErrorFallback, children: /* @__PURE__ */ jsx3(
595
631
  CircuitJsonPreview,
596
632
  {
597
633
  code: fsMap.get(props.entrypoint ?? props.mainComponentPath),
@@ -603,9 +639,9 @@ var RunFrame = (props) => {
603
639
  autoroutingGraphics,
604
640
  autoroutingLog,
605
641
  onReportAutoroutingLog: props.onReportAutoroutingLog || handleReportAutoroutingLog,
606
- leftHeaderContent: /* @__PURE__ */ jsxs2(Fragment, { children: [
607
- props.showRunButton && /* @__PURE__ */ jsxs2("div", { className: "rf-relative rf-inline-flex", children: [
608
- /* @__PURE__ */ jsxs2(
642
+ leftHeaderContent: /* @__PURE__ */ jsxs3(Fragment, { children: [
643
+ props.showRunButton && /* @__PURE__ */ jsxs3("div", { className: "rf-relative rf-inline-flex", children: [
644
+ /* @__PURE__ */ jsxs3(
609
645
  "button",
610
646
  {
611
647
  type: "button",
@@ -617,11 +653,11 @@ var RunFrame = (props) => {
617
653
  children: [
618
654
  "Run",
619
655
  " ",
620
- isRunning || !dependenciesLoaded ? /* @__PURE__ */ jsx2(Loader2, { className: "rf-w-3 rf-h-3 rf-animate-spin" }) : /* @__PURE__ */ jsx2(Play, { className: "rf-w-3 rf-h-3" })
656
+ isRunning || !dependenciesLoaded ? /* @__PURE__ */ jsx3(Loader2, { className: "rf-w-3 rf-h-3 rf-animate-spin" }) : /* @__PURE__ */ jsx3(Play, { className: "rf-w-3 rf-h-3" })
621
657
  ]
622
658
  }
623
659
  ),
624
- isRunning && /* @__PURE__ */ jsx2("div", { className: "rf-flex rf-items-center rf-ml-1", children: /* @__PURE__ */ jsx2(
660
+ isRunning && /* @__PURE__ */ jsx3("div", { className: "rf-flex rf-items-center rf-ml-1", children: /* @__PURE__ */ jsx3(
625
661
  Button,
626
662
  {
627
663
  onClick: (e) => {
@@ -643,7 +679,7 @@ var RunFrame = (props) => {
643
679
  variant: "ghost",
644
680
  size: "icon",
645
681
  className: "rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",
646
- children: /* @__PURE__ */ jsx2(
682
+ children: /* @__PURE__ */ jsx3(
647
683
  Square,
648
684
  {
649
685
  className: "!rf-h-2.5 !rf-w-2.5",
@@ -654,7 +690,7 @@ var RunFrame = (props) => {
654
690
  }
655
691
  ) })
656
692
  ] }),
657
- props.showFileMenu !== false && /* @__PURE__ */ jsx2(FileMenuLeftHeader, { isWebEmbedded: props.isWebEmbedded }),
693
+ props.showFileMenu !== false && /* @__PURE__ */ jsx3(FileMenuLeftHeader, { isWebEmbedded: props.isWebEmbedded }),
658
694
  props.leftHeaderContent
659
695
  ] }),
660
696
  onActiveTabChange: setActiveTab,
@@ -672,7 +708,7 @@ var RunFrame = (props) => {
672
708
  incRunCountTrigger(1);
673
709
  }
674
710
  }
675
- );
711
+ ) });
676
712
  };
677
713
 
678
714
  // lib/components/RunFrameWithApi/RunFrameWithApi.tsx
@@ -860,8 +896,8 @@ import * as React from "react";
860
896
  import "@radix-ui/react-dialog";
861
897
  import { Command as CommandPrimitive } from "cmdk";
862
898
  import { Search } from "lucide-react";
863
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
864
- var Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
899
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
900
+ var Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
865
901
  CommandPrimitive,
866
902
  {
867
903
  ref,
@@ -873,14 +909,14 @@ var Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
873
909
  }
874
910
  ));
875
911
  Command.displayName = CommandPrimitive.displayName;
876
- var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3(
912
+ var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(
877
913
  "div",
878
914
  {
879
915
  className: "rf-flex rf-items-center rf-border-b rf-px-3",
880
916
  "cmdk-input-wrapper": "",
881
917
  children: [
882
- /* @__PURE__ */ jsx3(Search, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50" }),
883
- /* @__PURE__ */ jsx3(
918
+ /* @__PURE__ */ jsx4(Search, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50" }),
919
+ /* @__PURE__ */ jsx4(
884
920
  CommandPrimitive.Input,
885
921
  {
886
922
  ref,
@@ -895,7 +931,7 @@ var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
895
931
  }
896
932
  ));
897
933
  CommandInput.displayName = CommandPrimitive.Input.displayName;
898
- var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
934
+ var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
899
935
  CommandPrimitive.List,
900
936
  {
901
937
  ref,
@@ -907,7 +943,7 @@ var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
907
943
  }
908
944
  ));
909
945
  CommandList.displayName = CommandPrimitive.List.displayName;
910
- var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx3(
946
+ var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx4(
911
947
  CommandPrimitive.Empty,
912
948
  {
913
949
  ref,
@@ -916,7 +952,7 @@ var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx3(
916
952
  }
917
953
  ));
918
954
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
919
- var CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
955
+ var CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
920
956
  CommandPrimitive.Group,
921
957
  {
922
958
  ref,
@@ -928,7 +964,7 @@ var CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
928
964
  }
929
965
  ));
930
966
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
931
- var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
967
+ var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
932
968
  CommandPrimitive.Separator,
933
969
  {
934
970
  ref,
@@ -940,7 +976,7 @@ var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__
940
976
  }
941
977
  ));
942
978
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
943
- var CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
979
+ var CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
944
980
  CommandPrimitive.Item,
945
981
  {
946
982
  ref,
@@ -956,7 +992,7 @@ var CommandShortcut = ({
956
992
  className,
957
993
  ...props
958
994
  }) => {
959
- return /* @__PURE__ */ jsx3(
995
+ return /* @__PURE__ */ jsx4(
960
996
  "span",
961
997
  {
962
998
  className: cn(
@@ -972,10 +1008,10 @@ CommandShortcut.displayName = "CommandShortcut";
972
1008
  // lib/components/ui/popover.tsx
973
1009
  import * as React2 from "react";
974
1010
  import * as PopoverPrimitive from "@radix-ui/react-popover";
975
- import { jsx as jsx4 } from "react/jsx-runtime";
1011
+ import { jsx as jsx5 } from "react/jsx-runtime";
976
1012
  var Popover = PopoverPrimitive.Root;
977
1013
  var PopoverTrigger = PopoverPrimitive.Trigger;
978
- var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
1014
+ var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx5(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx5(
979
1015
  PopoverPrimitive.Content,
980
1016
  {
981
1017
  ref,
@@ -1082,15 +1118,15 @@ function getCurrentFolderContents(tree, currentFolder) {
1082
1118
  }
1083
1119
 
1084
1120
  // lib/components/RunFrameWithApi/EnhancedFileSelectorCombobox/EnhancedFileSelectorCombobox.tsx
1085
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1121
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1086
1122
  var defaultFileIcon = (fileName) => {
1087
1123
  if (fileName.endsWith(".tsx") || fileName.endsWith(".jsx")) {
1088
- return /* @__PURE__ */ jsx5(Code, { className: "rf-h-4 rf-w-4 rf-text-blue-500" });
1124
+ return /* @__PURE__ */ jsx6(Code, { className: "rf-h-4 rf-w-4 rf-text-blue-500" });
1089
1125
  }
1090
1126
  if (fileName.endsWith(".md") || fileName.endsWith(".txt")) {
1091
- return /* @__PURE__ */ jsx5(FileText, { className: "rf-h-4 rf-w-4 rf-text-gray-600" });
1127
+ return /* @__PURE__ */ jsx6(FileText, { className: "rf-h-4 rf-w-4 rf-text-gray-600" });
1092
1128
  }
1093
- return /* @__PURE__ */ jsx5(File, { className: "rf-h-4 rf-w-4 rf-text-gray-500" });
1129
+ return /* @__PURE__ */ jsx6(File, { className: "rf-h-4 rf-w-4 rf-text-gray-500" });
1094
1130
  };
1095
1131
  var defaultFileFilter = (filename) => {
1096
1132
  return filename.endsWith(".tsx") || filename.endsWith(".circuit.json") || filename.endsWith(".jsx");
@@ -1280,7 +1316,7 @@ var EnhancedFileSelectorCombobox = ({
1280
1316
  const maxWidth = isSearching ? "rf-max-w-[600px]" : "rf-max-w-[1000px]";
1281
1317
  return `rf-w-full rf-min-w-[600px] ${maxWidth}`;
1282
1318
  };
1283
- return /* @__PURE__ */ jsx5("div", { className: "rf-flex rf-items-center rf-gap-1", children: /* @__PURE__ */ jsxs4(
1319
+ return /* @__PURE__ */ jsx6("div", { className: "rf-flex rf-items-center rf-gap-1", children: /* @__PURE__ */ jsxs5(
1284
1320
  Popover,
1285
1321
  {
1286
1322
  open,
@@ -1292,7 +1328,7 @@ var EnhancedFileSelectorCombobox = ({
1292
1328
  }
1293
1329
  },
1294
1330
  children: [
1295
- /* @__PURE__ */ jsx5(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
1331
+ /* @__PURE__ */ jsx6(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs5(
1296
1332
  Button,
1297
1333
  {
1298
1334
  variant: "outline",
@@ -1300,20 +1336,20 @@ var EnhancedFileSelectorCombobox = ({
1300
1336
  "aria-expanded": open,
1301
1337
  className: "rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",
1302
1338
  children: [
1303
- /* @__PURE__ */ jsx5("span", { className: "rf-truncate rf-text-left", children: file ? getDisplayName(file) : placeholder }),
1304
- /* @__PURE__ */ jsx5(ChevronsUpDown, { className: "rf-opacity-50 rf-flex-shrink-0" })
1339
+ /* @__PURE__ */ jsx6("span", { className: "rf-truncate rf-text-left", children: file ? getDisplayName(file) : placeholder }),
1340
+ /* @__PURE__ */ jsx6(ChevronsUpDown, { className: "rf-opacity-50 rf-flex-shrink-0" })
1305
1341
  ]
1306
1342
  }
1307
1343
  ) }),
1308
- /* @__PURE__ */ jsx5(
1344
+ /* @__PURE__ */ jsx6(
1309
1345
  PopoverContent,
1310
1346
  {
1311
1347
  className: cn(
1312
1348
  "!rf-p-0 !rf-overflow-hidden !rf-z-[200]",
1313
1349
  getDropdownWidth()
1314
1350
  ),
1315
- children: /* @__PURE__ */ jsxs4(Command, { shouldFilter: false, children: [
1316
- /* @__PURE__ */ jsx5(
1351
+ children: /* @__PURE__ */ jsxs5(Command, { shouldFilter: false, children: [
1352
+ /* @__PURE__ */ jsx6(
1317
1353
  CommandInput,
1318
1354
  {
1319
1355
  placeholder: searchPlaceholder,
@@ -1322,9 +1358,9 @@ var EnhancedFileSelectorCombobox = ({
1322
1358
  onValueChange: setSearchValue
1323
1359
  }
1324
1360
  ),
1325
- /* @__PURE__ */ jsxs4("div", { className: "rf-px-3 rf-py-2 rf-border-t rf-border-b rf-border-gray-200 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2", children: [
1326
- /* @__PURE__ */ jsx5("div", { className: "rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1", children: /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-min-w-0", children: [
1327
- /* @__PURE__ */ jsx5(
1361
+ /* @__PURE__ */ jsxs5("div", { className: "rf-px-3 rf-py-2 rf-border-t rf-border-b rf-border-gray-200 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2", children: [
1362
+ /* @__PURE__ */ jsx6("div", { className: "rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1", children: /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-min-w-0", children: [
1363
+ /* @__PURE__ */ jsx6(
1328
1364
  "button",
1329
1365
  {
1330
1366
  onClick: () => handleNavigateToFolder(null),
@@ -1334,20 +1370,20 @@ var EnhancedFileSelectorCombobox = ({
1334
1370
  ),
1335
1371
  currentFolder?.split("/").filter(Boolean).map((segment, index, array) => {
1336
1372
  const pathToSegment = array.slice(0, index + 1).join("/");
1337
- return /* @__PURE__ */ jsxs4(
1373
+ return /* @__PURE__ */ jsxs5(
1338
1374
  "span",
1339
1375
  {
1340
1376
  className: "rf-flex rf-items-center rf-min-w-0",
1341
1377
  children: [
1342
- /* @__PURE__ */ jsx5("span", { className: "rf-mx-1 rf-flex-shrink-0", children: "/" }),
1343
- index === array.length - 1 ? /* @__PURE__ */ jsx5(
1378
+ /* @__PURE__ */ jsx6("span", { className: "rf-mx-1 rf-flex-shrink-0", children: "/" }),
1379
+ index === array.length - 1 ? /* @__PURE__ */ jsx6(
1344
1380
  "span",
1345
1381
  {
1346
1382
  className: "rf-text-slate-800 rf-truncate rf-max-w-[200px]",
1347
1383
  title: segment,
1348
1384
  children: segment
1349
1385
  }
1350
- ) : /* @__PURE__ */ jsx5(
1386
+ ) : /* @__PURE__ */ jsx6(
1351
1387
  "button",
1352
1388
  {
1353
1389
  onClick: () => handleNavigateToFolder(pathToSegment),
@@ -1362,38 +1398,38 @@ var EnhancedFileSelectorCombobox = ({
1362
1398
  );
1363
1399
  })
1364
1400
  ] }) }),
1365
- /* @__PURE__ */ jsx5("div", { className: "rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0", children: currentFolder && /* @__PURE__ */ jsxs4(
1401
+ /* @__PURE__ */ jsx6("div", { className: "rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0", children: currentFolder && /* @__PURE__ */ jsxs5(
1366
1402
  "button",
1367
1403
  {
1368
1404
  onClick: navigateUp,
1369
1405
  className: "rf-flex rf-items-center rf-gap-1 rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-colors",
1370
1406
  title: "Go up one level",
1371
1407
  children: [
1372
- /* @__PURE__ */ jsx5(ArrowUp, { className: "rf-h-3 rf-w-3" }),
1373
- /* @__PURE__ */ jsx5("span", { className: "rf-text-xs rf-font-medium", children: "Up" })
1408
+ /* @__PURE__ */ jsx6(ArrowUp, { className: "rf-h-3 rf-w-3" }),
1409
+ /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-font-medium", children: "Up" })
1374
1410
  ]
1375
1411
  }
1376
1412
  ) })
1377
1413
  ] }),
1378
- /* @__PURE__ */ jsx5(CommandList, { className: "rf-max-h-[70vh] rf-overflow-y-auto", children: !isSearching ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
1379
- /* @__PURE__ */ jsx5(CommandEmpty, { children: emptyMessage }),
1380
- recentFiles.length > 0 && /* @__PURE__ */ jsx5(
1414
+ /* @__PURE__ */ jsx6(CommandList, { className: "rf-max-h-[70vh] rf-overflow-y-auto", children: !isSearching ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
1415
+ /* @__PURE__ */ jsx6(CommandEmpty, { children: emptyMessage }),
1416
+ recentFiles.length > 0 && /* @__PURE__ */ jsx6(
1381
1417
  CommandGroup,
1382
1418
  {
1383
- heading: /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-gap-0", children: [
1384
- /* @__PURE__ */ jsx5("span", { className: "rf-leading-none", children: "Recent Files" }),
1385
- /* @__PURE__ */ jsx5(
1419
+ heading: /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-gap-0", children: [
1420
+ /* @__PURE__ */ jsx6("span", { className: "rf-leading-none", children: "Recent Files" }),
1421
+ /* @__PURE__ */ jsx6(
1386
1422
  "button",
1387
1423
  {
1388
1424
  onClick: () => setShowRecents(!showRecents),
1389
1425
  className: "rf-flex rf-items-center rf-justify-center rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-0 rf-w-3.5 rf-h-3.5 rf-ml-2",
1390
1426
  title: showRecents ? "Hide recent files" : "Show recent files",
1391
- children: showRecents ? /* @__PURE__ */ jsx5(Eye, { className: "rf-h-3.5 rf-w-3.5" }) : /* @__PURE__ */ jsx5(EyeOff, { className: "rf-h-3.5 rf-w-3.5" })
1427
+ children: showRecents ? /* @__PURE__ */ jsx6(Eye, { className: "rf-h-3.5 rf-w-3.5" }) : /* @__PURE__ */ jsx6(EyeOff, { className: "rf-h-3.5 rf-w-3.5" })
1392
1428
  }
1393
1429
  )
1394
1430
  ] }),
1395
1431
  className: "rf-border-b rf-border-gray-200 rf-pb-1 rf-bg-blue-50/30",
1396
- children: showRecents && recentFiles.map((item, index) => /* @__PURE__ */ jsxs4(
1432
+ children: showRecents && recentFiles.map((item, index) => /* @__PURE__ */ jsxs5(
1397
1433
  CommandItem,
1398
1434
  {
1399
1435
  value: `recent:${item.path}`,
@@ -1402,10 +1438,10 @@ var EnhancedFileSelectorCombobox = ({
1402
1438
  item.path === currentFile && "rf-font-medium"
1403
1439
  ),
1404
1440
  children: [
1405
- item.type === "saved" ? /* @__PURE__ */ jsx5("span", { title: "Recently saved", children: /* @__PURE__ */ jsx5(Save, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500" }) }) : /* @__PURE__ */ jsx5("span", { title: "Recently viewed", children: /* @__PURE__ */ jsx5(Clock, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500" }) }),
1441
+ item.type === "saved" ? /* @__PURE__ */ jsx6("span", { title: "Recently saved", children: /* @__PURE__ */ jsx6(Save, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500" }) }) : /* @__PURE__ */ jsx6("span", { title: "Recently viewed", children: /* @__PURE__ */ jsx6(Clock, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500" }) }),
1406
1442
  getDisplayName(item.path.split("/").pop() || ""),
1407
- /* @__PURE__ */ jsx5("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(item.path) }),
1408
- /* @__PURE__ */ jsx5(
1443
+ /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(item.path) }),
1444
+ /* @__PURE__ */ jsx6(
1409
1445
  Check,
1410
1446
  {
1411
1447
  className: cn(
@@ -1420,12 +1456,12 @@ var EnhancedFileSelectorCombobox = ({
1420
1456
  ))
1421
1457
  }
1422
1458
  ),
1423
- pinnedFiles.length > 0 && /* @__PURE__ */ jsx5(
1459
+ pinnedFiles.length > 0 && /* @__PURE__ */ jsx6(
1424
1460
  CommandGroup,
1425
1461
  {
1426
1462
  heading: "Favorites",
1427
1463
  className: "rf-border-b rf-border-gray-200 rf-pb-1 rf-bg-amber-50/30",
1428
- children: pinnedFiles.filter((path) => filteredFiles.includes(path)).map((path, index) => /* @__PURE__ */ jsxs4(
1464
+ children: pinnedFiles.filter((path) => filteredFiles.includes(path)).map((path, index) => /* @__PURE__ */ jsxs5(
1429
1465
  CommandItem,
1430
1466
  {
1431
1467
  value: `favorite:${path}`,
@@ -1435,7 +1471,7 @@ var EnhancedFileSelectorCombobox = ({
1435
1471
  "rf-group"
1436
1472
  ),
1437
1473
  children: [
1438
- onToggleFavorite && /* @__PURE__ */ jsx5(
1474
+ onToggleFavorite && /* @__PURE__ */ jsx6(
1439
1475
  "button",
1440
1476
  {
1441
1477
  type: "button",
@@ -1446,12 +1482,12 @@ var EnhancedFileSelectorCombobox = ({
1446
1482
  className: "rf-mr-2 rf-p-0 rf-bg-transparent rf-border-none",
1447
1483
  "aria-label": "Remove from favorites",
1448
1484
  title: "Remove from favorites",
1449
- children: /* @__PURE__ */ jsx5(Star, { className: "rf-h-4 rf-w-4 rf-text-amber-500 rf-fill-amber-500" })
1485
+ children: /* @__PURE__ */ jsx6(Star, { className: "rf-h-4 rf-w-4 rf-text-amber-500 rf-fill-amber-500" })
1450
1486
  }
1451
1487
  ),
1452
1488
  getDisplayName(path.split("/").pop() || ""),
1453
- /* @__PURE__ */ jsx5("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(path) }),
1454
- /* @__PURE__ */ jsx5(
1489
+ /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(path) }),
1490
+ /* @__PURE__ */ jsx6(
1455
1491
  Check,
1456
1492
  {
1457
1493
  className: cn(
@@ -1466,11 +1502,11 @@ var EnhancedFileSelectorCombobox = ({
1466
1502
  ))
1467
1503
  }
1468
1504
  ),
1469
- currentFiles.length > 0 && /* @__PURE__ */ jsx5(
1505
+ currentFiles.length > 0 && /* @__PURE__ */ jsx6(
1470
1506
  CommandGroup,
1471
1507
  {
1472
1508
  className: `rf-border-b rf-border-gray-200 rf-pb-1`,
1473
- children: currentFiles.map((fileNode, index) => /* @__PURE__ */ jsxs4(
1509
+ children: currentFiles.map((fileNode, index) => /* @__PURE__ */ jsxs5(
1474
1510
  CommandItem,
1475
1511
  {
1476
1512
  value: `current:${fileNode.path}`,
@@ -1480,10 +1516,10 @@ var EnhancedFileSelectorCombobox = ({
1480
1516
  "rf-group"
1481
1517
  ),
1482
1518
  children: [
1483
- /* @__PURE__ */ jsx5("span", { className: "rf-mr-2", children: defaultFileIcon(fileNode.name) }),
1519
+ /* @__PURE__ */ jsx6("span", { className: "rf-mr-2", children: defaultFileIcon(fileNode.name) }),
1484
1520
  getDisplayName(fileNode.name),
1485
- /* @__PURE__ */ jsxs4("div", { className: "rf-ml-auto rf-flex rf-items-center rf-gap-1", children: [
1486
- onToggleFavorite && /* @__PURE__ */ jsx5(
1521
+ /* @__PURE__ */ jsxs5("div", { className: "rf-ml-auto rf-flex rf-items-center rf-gap-1", children: [
1522
+ onToggleFavorite && /* @__PURE__ */ jsx6(
1487
1523
  "button",
1488
1524
  {
1489
1525
  type: "button",
@@ -1497,7 +1533,7 @@ var EnhancedFileSelectorCombobox = ({
1497
1533
  ),
1498
1534
  "aria-label": pinnedFiles.includes(fileNode.path) ? "Remove from favorites" : "Add to favorites",
1499
1535
  title: pinnedFiles.includes(fileNode.path) ? "Remove from favorites" : "Add to favorites",
1500
- children: /* @__PURE__ */ jsx5(
1536
+ children: /* @__PURE__ */ jsx6(
1501
1537
  Star,
1502
1538
  {
1503
1539
  className: cn(
@@ -1508,7 +1544,7 @@ var EnhancedFileSelectorCombobox = ({
1508
1544
  )
1509
1545
  }
1510
1546
  ),
1511
- /* @__PURE__ */ jsx5(
1547
+ /* @__PURE__ */ jsx6(
1512
1548
  Check,
1513
1549
  {
1514
1550
  className: cn(
@@ -1524,34 +1560,34 @@ var EnhancedFileSelectorCombobox = ({
1524
1560
  ))
1525
1561
  }
1526
1562
  ),
1527
- currentFolders.length > 0 && /* @__PURE__ */ jsx5(
1563
+ currentFolders.length > 0 && /* @__PURE__ */ jsx6(
1528
1564
  CommandGroup,
1529
1565
  {
1530
1566
  className: `rf-border-b rf-border-gray-200 rf-pb-1`,
1531
- children: currentFolders.map((folderNode) => /* @__PURE__ */ jsxs4(
1567
+ children: currentFolders.map((folderNode) => /* @__PURE__ */ jsxs5(
1532
1568
  CommandItem,
1533
1569
  {
1534
1570
  value: `folder-${folderNode.path}`,
1535
1571
  onSelect: () => handleNavigateToFolder(folderNode.path),
1536
1572
  className: "rf-text-slate-600 hover:rf-text-slate-900",
1537
1573
  children: [
1538
- /* @__PURE__ */ jsx5(Folder, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600" }),
1574
+ /* @__PURE__ */ jsx6(Folder, { className: "rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600" }),
1539
1575
  folderNode.name,
1540
- /* @__PURE__ */ jsx5(ChevronRight, { className: "rf-ml-auto rf-h-4 rf-w-4" })
1576
+ /* @__PURE__ */ jsx6(ChevronRight, { className: "rf-ml-auto rf-h-4 rf-w-4" })
1541
1577
  ]
1542
1578
  },
1543
1579
  folderNode.path
1544
1580
  ))
1545
1581
  }
1546
1582
  ),
1547
- currentFiles.length === 0 && currentFolders.length === 0 && /* @__PURE__ */ jsx5("div", { className: "rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm", children: "No files or folders in this directory" })
1548
- ] }) : /* @__PURE__ */ jsx5(Fragment2, { children: searchResults.currentDirResults.length === 0 && searchResults.globalResults.length === 0 ? /* @__PURE__ */ jsxs4(CommandEmpty, { children: [
1583
+ currentFiles.length === 0 && currentFolders.length === 0 && /* @__PURE__ */ jsx6("div", { className: "rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm", children: "No files or folders in this directory" })
1584
+ ] }) : /* @__PURE__ */ jsx6(Fragment2, { children: searchResults.currentDirResults.length === 0 && searchResults.globalResults.length === 0 ? /* @__PURE__ */ jsxs5(CommandEmpty, { children: [
1549
1585
  'No files found matching "',
1550
1586
  searchValue,
1551
1587
  '".'
1552
- ] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
1553
- searchResults.currentDirResults.length > 0 && /* @__PURE__ */ jsx5(CommandGroup, { className: "rf-border-b rf-border-gray-200 rf-pb-1", children: searchResults.currentDirResults.map(
1554
- (file2, index) => /* @__PURE__ */ jsxs4(
1588
+ ] }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1589
+ searchResults.currentDirResults.length > 0 && /* @__PURE__ */ jsx6(CommandGroup, { className: "rf-border-b rf-border-gray-200 rf-pb-1", children: searchResults.currentDirResults.map(
1590
+ (file2, index) => /* @__PURE__ */ jsxs5(
1555
1591
  CommandItem,
1556
1592
  {
1557
1593
  value: `search-current:${file2.path}`,
@@ -1565,11 +1601,11 @@ var EnhancedFileSelectorCombobox = ({
1565
1601
  "rf-group"
1566
1602
  ),
1567
1603
  children: [
1568
- /* @__PURE__ */ jsx5("span", { className: "rf-mr-2", children: defaultFileIcon(file2.fileName) }),
1569
- /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-w-full rf-min-w-0", children: [
1570
- /* @__PURE__ */ jsx5("span", { className: "rf-truncate rf-flex-1", children: getDisplayName(file2.fileName) }),
1571
- /* @__PURE__ */ jsx5("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: currentFolder || "/" }),
1572
- onToggleFavorite && /* @__PURE__ */ jsx5(
1604
+ /* @__PURE__ */ jsx6("span", { className: "rf-mr-2", children: defaultFileIcon(file2.fileName) }),
1605
+ /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-w-full rf-min-w-0", children: [
1606
+ /* @__PURE__ */ jsx6("span", { className: "rf-truncate rf-flex-1", children: getDisplayName(file2.fileName) }),
1607
+ /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: currentFolder || "/" }),
1608
+ onToggleFavorite && /* @__PURE__ */ jsx6(
1573
1609
  "button",
1574
1610
  {
1575
1611
  type: "button",
@@ -1583,7 +1619,7 @@ var EnhancedFileSelectorCombobox = ({
1583
1619
  ),
1584
1620
  "aria-label": pinnedFiles.includes(file2.path) ? "Remove from favorites" : "Add to favorites",
1585
1621
  title: pinnedFiles.includes(file2.path) ? "Remove from favorites" : "Add to favorites",
1586
- children: /* @__PURE__ */ jsx5(
1622
+ children: /* @__PURE__ */ jsx6(
1587
1623
  Star,
1588
1624
  {
1589
1625
  className: cn(
@@ -1594,14 +1630,14 @@ var EnhancedFileSelectorCombobox = ({
1594
1630
  )
1595
1631
  }
1596
1632
  ),
1597
- file2.path === currentFile && /* @__PURE__ */ jsx5(Check, { className: "rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0" })
1633
+ file2.path === currentFile && /* @__PURE__ */ jsx6(Check, { className: "rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0" })
1598
1634
  ] })
1599
1635
  ]
1600
1636
  },
1601
1637
  file2.path
1602
1638
  )
1603
1639
  ) }),
1604
- searchResults.globalResults.length > 0 && /* @__PURE__ */ jsx5(CommandGroup, { className: "rf-pb-1", children: searchResults.globalResults.map((file2) => /* @__PURE__ */ jsxs4(
1640
+ searchResults.globalResults.length > 0 && /* @__PURE__ */ jsx6(CommandGroup, { className: "rf-pb-1", children: searchResults.globalResults.map((file2) => /* @__PURE__ */ jsxs5(
1605
1641
  CommandItem,
1606
1642
  {
1607
1643
  value: `search-global:${file2.path}`,
@@ -1615,11 +1651,11 @@ var EnhancedFileSelectorCombobox = ({
1615
1651
  "rf-group"
1616
1652
  ),
1617
1653
  children: [
1618
- /* @__PURE__ */ jsx5("span", { className: "rf-mr-2", children: defaultFileIcon(file2.fileName) }),
1619
- /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-w-full rf-min-w-0", children: [
1620
- /* @__PURE__ */ jsx5("span", { className: "rf-truncate rf-flex-1", children: getDisplayName(file2.fileName) }),
1621
- /* @__PURE__ */ jsx5("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(file2.path) }),
1622
- onToggleFavorite && /* @__PURE__ */ jsx5(
1654
+ /* @__PURE__ */ jsx6("span", { className: "rf-mr-2", children: defaultFileIcon(file2.fileName) }),
1655
+ /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-w-full rf-min-w-0", children: [
1656
+ /* @__PURE__ */ jsx6("span", { className: "rf-truncate rf-flex-1", children: getDisplayName(file2.fileName) }),
1657
+ /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]", children: getDirectoryPath2(file2.path) }),
1658
+ onToggleFavorite && /* @__PURE__ */ jsx6(
1623
1659
  "button",
1624
1660
  {
1625
1661
  onClick: (e) => {
@@ -1631,7 +1667,7 @@ var EnhancedFileSelectorCombobox = ({
1631
1667
  pinnedFiles.includes(file2.path) ? "rf-opacity-100" : "rf-opacity-0 group-hover:rf-opacity-100"
1632
1668
  ),
1633
1669
  title: pinnedFiles.includes(file2.path) ? "Remove from favorites" : "Add to favorites",
1634
- children: /* @__PURE__ */ jsx5(
1670
+ children: /* @__PURE__ */ jsx6(
1635
1671
  Star,
1636
1672
  {
1637
1673
  className: cn(
@@ -1642,7 +1678,7 @@ var EnhancedFileSelectorCombobox = ({
1642
1678
  )
1643
1679
  }
1644
1680
  ),
1645
- file2.path === currentFile && /* @__PURE__ */ jsx5(Check, { className: "rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0" })
1681
+ file2.path === currentFile && /* @__PURE__ */ jsx6(Check, { className: "rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0" })
1646
1682
  ] })
1647
1683
  ]
1648
1684
  },
@@ -1699,7 +1735,7 @@ var getUiFileFilter = () => (filename) => {
1699
1735
  var DEFAULT_UI_FILE_FILTER = getUiFileFilter();
1700
1736
 
1701
1737
  // lib/components/RunFrameWithApi/RunFrameWithApi.tsx
1702
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1738
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1703
1739
  var debug4 = Debug3("run-frame:RunFrameWithApi");
1704
1740
  var guessEntrypoint = (files) => files.find((file) => file.includes("entrypoint.")) ?? files.find((file) => file.includes("index.")) ?? files.find((file) => file.includes("main.")) ?? files.find((file) => file.endsWith(".tsx"));
1705
1741
  var guessManualEditsFilePath = (files) => files.find((file) => file.includes("manual-edits.")) ?? files.find((file) => file.includes("manual-edit.")) ?? files.find((file) => file.endsWith(".json"));
@@ -1838,7 +1874,7 @@ var RunFrameWithApi = (props) => {
1838
1874
  },
1839
1875
  [pushEvent]
1840
1876
  );
1841
- return /* @__PURE__ */ jsx6(
1877
+ return /* @__PURE__ */ jsx7(
1842
1878
  RunFrame,
1843
1879
  {
1844
1880
  fsMap,
@@ -1848,9 +1884,9 @@ var RunFrameWithApi = (props) => {
1848
1884
  forceLatestEvalVersion: props.forceLatestEvalVersion,
1849
1885
  evalWebWorkerBlobUrl: props.evalWebWorkerBlobUrl ?? props.workerBlobUrl,
1850
1886
  enableFetchProxy: props.enableFetchProxy,
1851
- leftHeaderContent: /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full", children: [
1887
+ leftHeaderContent: /* @__PURE__ */ jsxs6("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full", children: [
1852
1888
  props.leftHeaderContent,
1853
- props.showFilesSwitch && /* @__PURE__ */ jsx6("div", { className: "rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2", children: /* @__PURE__ */ jsx6(
1889
+ props.showFilesSwitch && /* @__PURE__ */ jsx7("div", { className: "rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2", children: /* @__PURE__ */ jsx7(
1854
1890
  EnhancedFileSelectorCombobox,
1855
1891
  {
1856
1892
  currentFile: componentPath,
@@ -1919,7 +1955,7 @@ import { useCallback as useCallback6, useState as useState8 } from "react";
1919
1955
 
1920
1956
  // lib/components/RunFrameForCli/LoginDialog.tsx
1921
1957
  import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef4, useState as useState7 } from "react";
1922
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1958
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1923
1959
  var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
1924
1960
  var LoginDialog = ({
1925
1961
  isOpen,
@@ -2038,21 +2074,21 @@ var LoginDialog = ({
2038
2074
  return null;
2039
2075
  }
2040
2076
  };
2041
- return /* @__PURE__ */ jsx7(
2077
+ return /* @__PURE__ */ jsx8(
2042
2078
  Dialog,
2043
2079
  {
2044
2080
  open: isOpen,
2045
2081
  onOpenChange: (open) => !open && !isLoading && handleCancel(),
2046
- children: /* @__PURE__ */ jsxs6(DialogContent, { className: "rf-max-w-md", children: [
2047
- /* @__PURE__ */ jsxs6(DialogHeader, { children: [
2048
- /* @__PURE__ */ jsx7(DialogTitle, { children: "Sign In Required" }),
2049
- /* @__PURE__ */ jsx7(DialogDescription, { children: loginState === "idle" || loginState === "error" ? "Sign in to continue. A new browser window will open for authentication." : "Complete the login process in the opened browser window." })
2082
+ children: /* @__PURE__ */ jsxs7(DialogContent, { className: "rf-max-w-md", children: [
2083
+ /* @__PURE__ */ jsxs7(DialogHeader, { children: [
2084
+ /* @__PURE__ */ jsx8(DialogTitle, { children: "Sign In Required" }),
2085
+ /* @__PURE__ */ jsx8(DialogDescription, { children: loginState === "idle" || loginState === "error" ? "Sign in to continue. A new browser window will open for authentication." : "Complete the login process in the opened browser window." })
2050
2086
  ] }),
2051
- /* @__PURE__ */ jsxs6("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4", children: [
2052
- loginState === "idle" || loginState === "error" ? /* @__PURE__ */ jsx7(Button, { onClick: handleSignIn, className: "rf-w-full", children: "Sign In" }) : /* @__PURE__ */ jsxs6("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full", children: [
2053
- loginState !== "success" && /* @__PURE__ */ jsx7("div", { className: "rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full" }),
2054
- /* @__PURE__ */ jsx7("p", { className: "rf-text-sm rf-text-gray-600 rf-text-center", children: getStatusMessage() }),
2055
- loginUrl && loginState === "waiting" && /* @__PURE__ */ jsx7(
2087
+ /* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4", children: [
2088
+ loginState === "idle" || loginState === "error" ? /* @__PURE__ */ jsx8(Button, { onClick: handleSignIn, className: "rf-w-full", children: "Sign In" }) : /* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full", children: [
2089
+ loginState !== "success" && /* @__PURE__ */ jsx8("div", { className: "rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full" }),
2090
+ /* @__PURE__ */ jsx8("p", { className: "rf-text-sm rf-text-gray-600 rf-text-center", children: getStatusMessage() }),
2091
+ loginUrl && loginState === "waiting" && /* @__PURE__ */ jsx8(
2056
2092
  "a",
2057
2093
  {
2058
2094
  href: loginUrl,
@@ -2063,8 +2099,8 @@ var LoginDialog = ({
2063
2099
  }
2064
2100
  )
2065
2101
  ] }),
2066
- errorMessage && loginState === "error" && /* @__PURE__ */ jsx7("p", { className: "rf-text-sm rf-text-red-600 rf-text-center", children: errorMessage }),
2067
- isLoading && /* @__PURE__ */ jsx7(
2102
+ errorMessage && loginState === "error" && /* @__PURE__ */ jsx8("p", { className: "rf-text-sm rf-text-red-600 rf-text-center", children: errorMessage }),
2103
+ isLoading && /* @__PURE__ */ jsx8(
2068
2104
  Button,
2069
2105
  {
2070
2106
  variant: "outline",
@@ -2090,7 +2126,7 @@ var useLoginDialog = () => {
2090
2126
  setIsOpen(false);
2091
2127
  }, []);
2092
2128
  return {
2093
- LoginDialog: /* @__PURE__ */ jsx7(
2129
+ LoginDialog: /* @__PURE__ */ jsx8(
2094
2130
  LoginDialog,
2095
2131
  {
2096
2132
  isOpen,
@@ -2103,7 +2139,7 @@ var useLoginDialog = () => {
2103
2139
  };
2104
2140
 
2105
2141
  // lib/components/RunFrameForCli/RunFrameForCli.tsx
2106
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
2142
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
2107
2143
  var RunFrameForCli = (props) => {
2108
2144
  const [shouldLoadLatestEval, setLoadLatestEval] = useLocalStorageState(
2109
2145
  "load-latest-eval",
@@ -2124,9 +2160,9 @@ var RunFrameForCli = (props) => {
2124
2160
  window.history.replaceState(null, "", newUrl);
2125
2161
  }, []);
2126
2162
  const { LoginDialog: LoginDialog2, openLoginDialog } = useLoginDialog();
2127
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
2163
+ return /* @__PURE__ */ jsxs8(Fragment3, { children: [
2128
2164
  LoginDialog2,
2129
- /* @__PURE__ */ jsx8(
2165
+ /* @__PURE__ */ jsx9(
2130
2166
  RunFrameWithApi,
2131
2167
  {
2132
2168
  debug: props.debug,
@@ -2139,8 +2175,8 @@ var RunFrameForCli = (props) => {
2139
2175
  enableFetchProxy: props.enableFetchProxy,
2140
2176
  initialMainComponentPath,
2141
2177
  onMainComponentPathChange: updateMainComponentHash,
2142
- leftHeaderContent: /* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
2143
- /* @__PURE__ */ jsx8(
2178
+ leftHeaderContent: /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
2179
+ /* @__PURE__ */ jsx9(
2144
2180
  FileMenuLeftHeader,
2145
2181
  {
2146
2182
  isWebEmbedded: false,
@@ -2306,7 +2342,7 @@ var importComponentFromJlcpcb = async (jlcpcbPartNumber, opts) => {
2306
2342
 
2307
2343
  // lib/components/ImportComponentDialog/ImportComponentDialog.tsx
2308
2344
  import Debug4 from "debug";
2309
- import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
2345
+ import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2310
2346
  var debug5 = Debug4("run-frame:ImportComponentDialog");
2311
2347
  var ImportComponentDialog = ({
2312
2348
  isOpen,
@@ -2432,8 +2468,8 @@ var ImportComponentDialog = ({
2432
2468
  fetchPackageDetails(component.owner, packageName);
2433
2469
  }
2434
2470
  };
2435
- return /* @__PURE__ */ jsxs8(Dialog, { open: isOpen, onOpenChange: () => onClose(), children: [
2436
- /* @__PURE__ */ jsxs8(
2471
+ return /* @__PURE__ */ jsxs9(Dialog, { open: isOpen, onOpenChange: () => onClose(), children: [
2472
+ /* @__PURE__ */ jsxs9(
2437
2473
  DialogContent,
2438
2474
  {
2439
2475
  style: {
@@ -2441,18 +2477,18 @@ var ImportComponentDialog = ({
2441
2477
  },
2442
2478
  className: "rf-rounded-sm rf-max-h-[90vh] rf-overflow-y-auto rf-flex rf-flex-col",
2443
2479
  children: [
2444
- /* @__PURE__ */ jsxs8(DialogHeader, { children: [
2445
- /* @__PURE__ */ jsx9(DialogTitle, { className: "rf-text-lg sm:rf-text-xl", children: "Import Component" }),
2446
- /* @__PURE__ */ jsx9(DialogDescription, { className: "rf-text-sm", children: "Search for components from tscircuit.com or JLCPCB parts library." })
2480
+ /* @__PURE__ */ jsxs9(DialogHeader, { children: [
2481
+ /* @__PURE__ */ jsx10(DialogTitle, { className: "rf-text-lg sm:rf-text-xl", children: "Import Component" }),
2482
+ /* @__PURE__ */ jsx10(DialogDescription, { className: "rf-text-sm", children: "Search for components from tscircuit.com or JLCPCB parts library." })
2447
2483
  ] }),
2448
- /* @__PURE__ */ jsxs8(
2484
+ /* @__PURE__ */ jsxs9(
2449
2485
  Tabs,
2450
2486
  {
2451
2487
  value: activeTab,
2452
2488
  onValueChange: (value) => setActiveTab(value),
2453
2489
  children: [
2454
- /* @__PURE__ */ jsxs8(TabsList, { className: "rf-grid rf-w-full rf-grid-cols-1 sm:rf-grid-cols-3 rf-h-auto", children: [
2455
- /* @__PURE__ */ jsx9(
2490
+ /* @__PURE__ */ jsxs9(TabsList, { className: "rf-grid rf-w-full rf-grid-cols-1 sm:rf-grid-cols-3 rf-h-auto", children: [
2491
+ /* @__PURE__ */ jsx10(
2456
2492
  TabsTrigger,
2457
2493
  {
2458
2494
  value: "tscircuit.com",
@@ -2460,13 +2496,13 @@ var ImportComponentDialog = ({
2460
2496
  children: "tscircuit.com"
2461
2497
  }
2462
2498
  ),
2463
- /* @__PURE__ */ jsx9(TabsTrigger, { value: "jlcpcb", className: "rf-text-xs sm:rf-text-sm", children: "JLCPCB Parts" }),
2464
- /* @__PURE__ */ jsx9(TabsTrigger, { value: "kicad", className: "rf-text-xs sm:rf-text-sm", children: "KiCad" })
2499
+ /* @__PURE__ */ jsx10(TabsTrigger, { value: "jlcpcb", className: "rf-text-xs sm:rf-text-sm", children: "JLCPCB Parts" }),
2500
+ /* @__PURE__ */ jsx10(TabsTrigger, { value: "kicad", className: "rf-text-xs sm:rf-text-sm", children: "KiCad" })
2465
2501
  ] }),
2466
- /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-items-center rf-gap-2 rf-mt-4", children: [
2467
- /* @__PURE__ */ jsxs8("div", { className: "rf-relative rf-flex-grow", children: [
2468
- /* @__PURE__ */ jsx9(Search2, { className: "rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground" }),
2469
- /* @__PURE__ */ jsx9(
2502
+ /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-items-center rf-gap-2 rf-mt-4", children: [
2503
+ /* @__PURE__ */ jsxs9("div", { className: "rf-relative rf-flex-grow", children: [
2504
+ /* @__PURE__ */ jsx10(Search2, { className: "rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground" }),
2505
+ /* @__PURE__ */ jsx10(
2470
2506
  Input,
2471
2507
  {
2472
2508
  placeholder: activeTab === "tscircuit.com" ? "Search components..." : activeTab === "kicad" ? "Search KiCad footprints..." : "Search JLCPCB parts (e.g. C14663)...",
@@ -2479,33 +2515,33 @@ var ImportComponentDialog = ({
2479
2515
  }
2480
2516
  )
2481
2517
  ] }),
2482
- /* @__PURE__ */ jsx9(
2518
+ /* @__PURE__ */ jsx10(
2483
2519
  Button,
2484
2520
  {
2485
2521
  onClick: handleSearch,
2486
2522
  disabled: isLoading || searchQuery.trim().length < 1,
2487
2523
  className: "sm:rf-px-4 rf-px-3",
2488
- children: isLoading ? /* @__PURE__ */ jsx9(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
2489
- /* @__PURE__ */ jsx9(Search2, { className: "rf-h-4 rf-w-4 sm:rf-hidden" }),
2490
- /* @__PURE__ */ jsx9("span", { className: "rf-hidden sm:rf-inline", children: "Search" })
2524
+ children: isLoading ? /* @__PURE__ */ jsx10(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }) : /* @__PURE__ */ jsxs9(Fragment4, { children: [
2525
+ /* @__PURE__ */ jsx10(Search2, { className: "rf-h-4 rf-w-4 sm:rf-hidden" }),
2526
+ /* @__PURE__ */ jsx10("span", { className: "rf-hidden sm:rf-inline", children: "Search" })
2491
2527
  ] })
2492
2528
  }
2493
2529
  )
2494
2530
  ] }),
2495
- /* @__PURE__ */ jsx9("div", { className: "rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-border rf-rounded-md", children: searchResults.length > 0 ? /* @__PURE__ */ jsx9("div", { className: "rf-divide-y", children: searchResults.map((result) => /* @__PURE__ */ jsxs8(
2531
+ /* @__PURE__ */ jsx10("div", { className: "rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-border rf-rounded-md", children: searchResults.length > 0 ? /* @__PURE__ */ jsx10("div", { className: "rf-divide-y", children: searchResults.map((result) => /* @__PURE__ */ jsxs9(
2496
2532
  "div",
2497
2533
  {
2498
2534
  className: `rf-p-3 rf-flex rf-flex-col sm:rf-grid sm:rf-grid-cols-[1fr_auto] rf-items-start sm:rf-items-center rf-cursor-pointer hover:rf-bg-zinc-100 rf-gap-2 ${selectedComponent?.id === result.id ? "rf-bg-zinc-100" : ""}`,
2499
2535
  onClick: () => setSelectedComponent(result),
2500
2536
  children: [
2501
- /* @__PURE__ */ jsxs8("div", { className: "rf-min-w-0 rf-overflow-hidden", children: [
2502
- /* @__PURE__ */ jsx9("div", { className: "rf-font-medium rf-text-sm rf-truncate", children: result.name }),
2503
- /* @__PURE__ */ jsxs8("div", { className: "rf-text-xs rf-text-zinc-500 rf-truncate", children: [
2504
- result.partNumber && /* @__PURE__ */ jsx9("span", { className: "rf-mr-2", children: result.partNumber }),
2537
+ /* @__PURE__ */ jsxs9("div", { className: "rf-min-w-0 rf-overflow-hidden", children: [
2538
+ /* @__PURE__ */ jsx10("div", { className: "rf-font-medium rf-text-sm rf-truncate", children: result.name }),
2539
+ /* @__PURE__ */ jsxs9("div", { className: "rf-text-xs rf-text-zinc-500 rf-truncate", children: [
2540
+ result.partNumber && /* @__PURE__ */ jsx10("span", { className: "rf-mr-2", children: result.partNumber }),
2505
2541
  result.description
2506
2542
  ] })
2507
2543
  ] }),
2508
- /* @__PURE__ */ jsx9("div", { className: "rf-flex rf-gap-2 rf-flex-shrink-0 rf-w-full sm:rf-w-auto", children: result.source === "tscircuit.com" && /* @__PURE__ */ jsx9(
2544
+ /* @__PURE__ */ jsx10("div", { className: "rf-flex rf-gap-2 rf-flex-shrink-0 rf-w-full sm:rf-w-auto", children: result.source === "tscircuit.com" && /* @__PURE__ */ jsx10(
2509
2545
  Button,
2510
2546
  {
2511
2547
  variant: "outline",
@@ -2521,15 +2557,15 @@ var ImportComponentDialog = ({
2521
2557
  ]
2522
2558
  },
2523
2559
  result.id
2524
- )) }) : isLoading ? /* @__PURE__ */ jsxs8("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: [
2525
- /* @__PURE__ */ jsx9(Loader22, { className: "rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2" }),
2526
- /* @__PURE__ */ jsx9("p", { children: "Searching..." })
2527
- ] }) : /* @__PURE__ */ jsx9("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: hasSearched ? "No results found" : "Enter a search term to find components" }) })
2560
+ )) }) : isLoading ? /* @__PURE__ */ jsxs9("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: [
2561
+ /* @__PURE__ */ jsx10(Loader22, { className: "rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2" }),
2562
+ /* @__PURE__ */ jsx10("p", { children: "Searching..." })
2563
+ ] }) : /* @__PURE__ */ jsx10("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: hasSearched ? "No results found" : "Enter a search term to find components" }) })
2528
2564
  ]
2529
2565
  }
2530
2566
  ),
2531
- /* @__PURE__ */ jsxs8(DialogFooter, { className: "rf-flex rf-flex-col sm:rf-flex-row rf-gap-2", children: [
2532
- /* @__PURE__ */ jsx9(
2567
+ /* @__PURE__ */ jsxs9(DialogFooter, { className: "rf-flex rf-flex-col sm:rf-flex-row rf-gap-2", children: [
2568
+ /* @__PURE__ */ jsx10(
2533
2569
  Button,
2534
2570
  {
2535
2571
  variant: "outline",
@@ -2538,7 +2574,7 @@ var ImportComponentDialog = ({
2538
2574
  children: "Cancel"
2539
2575
  }
2540
2576
  ),
2541
- /* @__PURE__ */ jsx9(
2577
+ /* @__PURE__ */ jsx10(
2542
2578
  Button,
2543
2579
  {
2544
2580
  onClick: () => {
@@ -2555,7 +2591,7 @@ var ImportComponentDialog = ({
2555
2591
  ]
2556
2592
  }
2557
2593
  ),
2558
- /* @__PURE__ */ jsx9(Dialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */ jsxs8(
2594
+ /* @__PURE__ */ jsx10(Dialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */ jsxs9(
2559
2595
  DialogContent,
2560
2596
  {
2561
2597
  showOverlay: false,
@@ -2564,7 +2600,7 @@ var ImportComponentDialog = ({
2564
2600
  },
2565
2601
  className: "rf-max-w-5xl !rf-overflow-y-auto rf-max-h-[90vh] rf-overflow-hidden rf-flex rf-flex-col rf-rounded-sm",
2566
2602
  children: [
2567
- /* @__PURE__ */ jsx9(DialogHeader, { className: "rf-pb-4 rf-border-b", children: /* @__PURE__ */ jsx9("div", { className: "rf-flex rf-items-start rf-justify-between rf-gap-4", children: /* @__PURE__ */ jsx9("div", { className: "rf-flex-1 rf-min-w-0", children: /* @__PURE__ */ jsx9(DialogTitle, { className: "rf-text-xl rf-font-semibold rf-truncate", children: detailsComponent?.source === "kicad" ? detailsComponent?.name : /* @__PURE__ */ jsx9(
2603
+ /* @__PURE__ */ jsx10(DialogHeader, { className: "rf-pb-4 rf-border-b", children: /* @__PURE__ */ jsx10("div", { className: "rf-flex rf-items-start rf-justify-between rf-gap-4", children: /* @__PURE__ */ jsx10("div", { className: "rf-flex-1 rf-min-w-0", children: /* @__PURE__ */ jsx10(DialogTitle, { className: "rf-text-xl rf-font-semibold rf-truncate", children: detailsComponent?.source === "kicad" ? detailsComponent?.name : /* @__PURE__ */ jsx10(
2568
2604
  "a",
2569
2605
  {
2570
2606
  href: `https://tscircuit.com/${detailsComponent?.owner}/${detailsComponent?.name}`,
@@ -2574,10 +2610,10 @@ var ImportComponentDialog = ({
2574
2610
  children: detailsComponent?.name?.split("/").pop() || detailsComponent?.name
2575
2611
  }
2576
2612
  ) }) }) }) }),
2577
- /* @__PURE__ */ jsx9("div", { className: "rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6", children: detailsComponent?.source === "tscircuit.com" ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
2578
- /* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9("div", { className: "rf-space-y-3", children: detailsComponent?.owner && /* @__PURE__ */ jsxs8("div", { children: [
2579
- /* @__PURE__ */ jsx9("label", { className: "rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide", children: "Created by" }),
2580
- /* @__PURE__ */ jsx9("div", { className: "rf-mt-1 rf-text-sm rf-font-medium", children: /* @__PURE__ */ jsx9(
2613
+ /* @__PURE__ */ jsx10("div", { className: "rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6", children: detailsComponent?.source === "tscircuit.com" ? /* @__PURE__ */ jsxs9(Fragment4, { children: [
2614
+ /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "rf-space-y-3", children: detailsComponent?.owner && /* @__PURE__ */ jsxs9("div", { children: [
2615
+ /* @__PURE__ */ jsx10("label", { className: "rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide", children: "Created by" }),
2616
+ /* @__PURE__ */ jsx10("div", { className: "rf-mt-1 rf-text-sm rf-font-medium", children: /* @__PURE__ */ jsx10(
2581
2617
  "a",
2582
2618
  {
2583
2619
  href: `https://tscircuit.com/${detailsComponent?.owner}`,
@@ -2588,16 +2624,16 @@ var ImportComponentDialog = ({
2588
2624
  }
2589
2625
  ) })
2590
2626
  ] }) }) }),
2591
- /* @__PURE__ */ jsxs8("div", { children: [
2592
- /* @__PURE__ */ jsx9("h3", { className: "rf-text-lg rf-font-semibold rf-mb-4", children: "Preview" }),
2593
- /* @__PURE__ */ jsxs8(
2627
+ /* @__PURE__ */ jsxs9("div", { children: [
2628
+ /* @__PURE__ */ jsx10("h3", { className: "rf-text-lg rf-font-semibold rf-mb-4", children: "Preview" }),
2629
+ /* @__PURE__ */ jsxs9(
2594
2630
  Tabs,
2595
2631
  {
2596
2632
  value: previewActiveTab,
2597
2633
  onValueChange: (value) => setPreviewActiveTab(value),
2598
2634
  children: [
2599
- /* @__PURE__ */ jsxs8(TabsList, { className: "rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400", children: [
2600
- /* @__PURE__ */ jsx9(
2635
+ /* @__PURE__ */ jsxs9(TabsList, { className: "rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400", children: [
2636
+ /* @__PURE__ */ jsx10(
2601
2637
  TabsTrigger,
2602
2638
  {
2603
2639
  value: "pcb",
@@ -2605,7 +2641,7 @@ var ImportComponentDialog = ({
2605
2641
  children: "PCB"
2606
2642
  }
2607
2643
  ),
2608
- /* @__PURE__ */ jsx9(
2644
+ /* @__PURE__ */ jsx10(
2609
2645
  TabsTrigger,
2610
2646
  {
2611
2647
  value: "schematic",
@@ -2614,13 +2650,13 @@ var ImportComponentDialog = ({
2614
2650
  }
2615
2651
  )
2616
2652
  ] }),
2617
- /* @__PURE__ */ jsxs8("div", { className: "rf-mt-4", children: [
2618
- /* @__PURE__ */ jsx9(
2653
+ /* @__PURE__ */ jsxs9("div", { className: "rf-mt-4", children: [
2654
+ /* @__PURE__ */ jsx10(
2619
2655
  TabsContent,
2620
2656
  {
2621
2657
  value: "pcb",
2622
2658
  className: "rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",
2623
- children: detailsComponent?.owner && detailsComponent?.name ? /* @__PURE__ */ jsx9("div", { className: "rf-w-full rf-h-fit rf-min-h-[300px] rf-bg-white rf-flex rf-items-center rf-justify-center rf-p-4", children: /* @__PURE__ */ jsx9(
2659
+ children: detailsComponent?.owner && detailsComponent?.name ? /* @__PURE__ */ jsx10("div", { className: "rf-w-full rf-h-fit rf-min-h-[300px] rf-bg-white rf-flex rf-items-center rf-justify-center rf-p-4", children: /* @__PURE__ */ jsx10(
2624
2660
  "img",
2625
2661
  {
2626
2662
  src: `https://registry-api.tscircuit.com/packages/images/${detailsComponent.owner}/${detailsComponent.name}/pcb.png`,
@@ -2635,18 +2671,18 @@ var ImportComponentDialog = ({
2635
2671
  }
2636
2672
  }
2637
2673
  }
2638
- ) }) : /* @__PURE__ */ jsx9("div", { className: "rf-h-[400px] rf-flex rf-items-center rf-justify-center rf-text-gray-500", children: /* @__PURE__ */ jsxs8("div", { className: "rf-text-center", children: [
2639
- /* @__PURE__ */ jsx9("div", { className: "rf-text-sm rf-font-medium", children: "No PCB preview available" }),
2640
- /* @__PURE__ */ jsx9("div", { className: "rf-text-xs rf-mt-1", children: "Preview cannot be generated" })
2674
+ ) }) : /* @__PURE__ */ jsx10("div", { className: "rf-h-[400px] rf-flex rf-items-center rf-justify-center rf-text-gray-500", children: /* @__PURE__ */ jsxs9("div", { className: "rf-text-center", children: [
2675
+ /* @__PURE__ */ jsx10("div", { className: "rf-text-sm rf-font-medium", children: "No PCB preview available" }),
2676
+ /* @__PURE__ */ jsx10("div", { className: "rf-text-xs rf-mt-1", children: "Preview cannot be generated" })
2641
2677
  ] }) })
2642
2678
  }
2643
2679
  ),
2644
- /* @__PURE__ */ jsx9(
2680
+ /* @__PURE__ */ jsx10(
2645
2681
  TabsContent,
2646
2682
  {
2647
2683
  value: "schematic",
2648
2684
  className: "rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",
2649
- children: detailsComponent?.owner && detailsComponent?.name ? /* @__PURE__ */ jsx9("div", { className: "rf-w-full rf-h-fit rf-min-h-[300px] rf-bg-white rf-flex rf-items-center rf-justify-center rf-p-4", children: /* @__PURE__ */ jsx9(
2685
+ children: detailsComponent?.owner && detailsComponent?.name ? /* @__PURE__ */ jsx10("div", { className: "rf-w-full rf-h-fit rf-min-h-[300px] rf-bg-white rf-flex rf-items-center rf-justify-center rf-p-4", children: /* @__PURE__ */ jsx10(
2650
2686
  "img",
2651
2687
  {
2652
2688
  src: `https://registry-api.tscircuit.com/packages/images/${detailsComponent.owner}/${detailsComponent.name}/schematic.png`,
@@ -2661,9 +2697,9 @@ var ImportComponentDialog = ({
2661
2697
  }
2662
2698
  }
2663
2699
  }
2664
- ) }) : /* @__PURE__ */ jsx9("div", { className: "rf-h-[400px] rf-flex rf-items-center rf-justify-center rf-text-gray-500", children: /* @__PURE__ */ jsxs8("div", { className: "rf-text-center", children: [
2665
- /* @__PURE__ */ jsx9("div", { className: "rf-text-sm rf-font-medium", children: "No schematic preview available" }),
2666
- /* @__PURE__ */ jsx9("div", { className: "rf-text-xs rf-mt-1", children: "Preview cannot be generated" })
2700
+ ) }) : /* @__PURE__ */ jsx10("div", { className: "rf-h-[400px] rf-flex rf-items-center rf-justify-center rf-text-gray-500", children: /* @__PURE__ */ jsxs9("div", { className: "rf-text-center", children: [
2701
+ /* @__PURE__ */ jsx10("div", { className: "rf-text-sm rf-font-medium", children: "No schematic preview available" }),
2702
+ /* @__PURE__ */ jsx10("div", { className: "rf-text-xs rf-mt-1", children: "Preview cannot be generated" })
2667
2703
  ] }) })
2668
2704
  }
2669
2705
  )
@@ -2672,21 +2708,21 @@ var ImportComponentDialog = ({
2672
2708
  }
2673
2709
  )
2674
2710
  ] }),
2675
- packageDetails?.ai_description && /* @__PURE__ */ jsxs8("div", { children: [
2676
- /* @__PURE__ */ jsx9("h3", { className: "rf-text-lg rf-font-semibold rf-mb-3", children: "AI Description" }),
2677
- /* @__PURE__ */ jsx9("div", { className: "rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4", children: /* @__PURE__ */ jsx9("p", { className: "rf-text-sm rf-text-gray-700 rf-leading-relaxed", children: packageDetails.ai_description }) })
2711
+ packageDetails?.ai_description && /* @__PURE__ */ jsxs9("div", { children: [
2712
+ /* @__PURE__ */ jsx10("h3", { className: "rf-text-lg rf-font-semibold rf-mb-3", children: "AI Description" }),
2713
+ /* @__PURE__ */ jsx10("div", { className: "rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4", children: /* @__PURE__ */ jsx10("p", { className: "rf-text-sm rf-text-gray-700 rf-leading-relaxed", children: packageDetails.ai_description }) })
2678
2714
  ] }),
2679
- packageDetails?.ai_usage_instructions && /* @__PURE__ */ jsxs8("div", { children: [
2680
- /* @__PURE__ */ jsx9("h3", { className: "rf-text-lg rf-font-semibold rf-mb-3", children: "Usage Instructions" }),
2681
- /* @__PURE__ */ jsx9("div", { className: "rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4", children: /* @__PURE__ */ jsx9("p", { className: "rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap", children: packageDetails.ai_usage_instructions }) })
2715
+ packageDetails?.ai_usage_instructions && /* @__PURE__ */ jsxs9("div", { children: [
2716
+ /* @__PURE__ */ jsx10("h3", { className: "rf-text-lg rf-font-semibold rf-mb-3", children: "Usage Instructions" }),
2717
+ /* @__PURE__ */ jsx10("div", { className: "rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4", children: /* @__PURE__ */ jsx10("p", { className: "rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap", children: packageDetails.ai_usage_instructions }) })
2682
2718
  ] }),
2683
- packageDetailsLoading && /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-justify-center rf-text-center rf-items-center rf-gap-2 rf-text-gray-500", children: [
2684
- /* @__PURE__ */ jsx9(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }),
2685
- /* @__PURE__ */ jsx9("span", { className: "rf-text-sm", children: "Loading package details..." })
2719
+ packageDetailsLoading && /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-justify-center rf-text-center rf-items-center rf-gap-2 rf-text-gray-500", children: [
2720
+ /* @__PURE__ */ jsx10(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }),
2721
+ /* @__PURE__ */ jsx10("span", { className: "rf-text-sm", children: "Loading package details..." })
2686
2722
  ] })
2687
2723
  ] }) : null }),
2688
- /* @__PURE__ */ jsxs8(DialogFooter, { className: "rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-items-stretch sm:rf-items-center rf-gap-2", children: [
2689
- /* @__PURE__ */ jsx9("div", { className: "rf-flex-1 rf-order-3 sm:rf-order-1", children: detailsComponent?.source === "tscircuit.com" && /* @__PURE__ */ jsxs8(
2724
+ /* @__PURE__ */ jsxs9(DialogFooter, { className: "rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-items-stretch sm:rf-items-center rf-gap-2", children: [
2725
+ /* @__PURE__ */ jsx10("div", { className: "rf-flex-1 rf-order-3 sm:rf-order-1", children: detailsComponent?.source === "tscircuit.com" && /* @__PURE__ */ jsxs9(
2690
2726
  Button,
2691
2727
  {
2692
2728
  variant: "outline",
@@ -2697,13 +2733,13 @@ var ImportComponentDialog = ({
2697
2733
  window.open(url, "_blank");
2698
2734
  },
2699
2735
  children: [
2700
- /* @__PURE__ */ jsx9(ExternalLink, { className: "rf-h-4 rf-w-4" }),
2736
+ /* @__PURE__ */ jsx10(ExternalLink, { className: "rf-h-4 rf-w-4" }),
2701
2737
  "View on tscircuit.com"
2702
2738
  ]
2703
2739
  }
2704
2740
  ) }),
2705
- /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-flex-col sm:rf-flex-row rf-gap-2 sm:rf-gap-3 rf-order-1 sm:rf-order-2", children: [
2706
- /* @__PURE__ */ jsx9(
2741
+ /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-flex-col sm:rf-flex-row rf-gap-2 sm:rf-gap-3 rf-order-1 sm:rf-order-2", children: [
2742
+ /* @__PURE__ */ jsx10(
2707
2743
  Button,
2708
2744
  {
2709
2745
  variant: "outline",
@@ -2712,7 +2748,7 @@ var ImportComponentDialog = ({
2712
2748
  children: "Close"
2713
2749
  }
2714
2750
  ),
2715
- /* @__PURE__ */ jsx9(
2751
+ /* @__PURE__ */ jsx10(
2716
2752
  Button,
2717
2753
  {
2718
2754
  onClick: () => {
@@ -2738,13 +2774,13 @@ var ImportComponentDialog = ({
2738
2774
  import { useCallback as useCallback7, useEffect as useEffect10, useState as useState10 } from "react";
2739
2775
 
2740
2776
  // lib/components/RunFrameStaticBuildViewer/CircuitJsonFileSelectorCombobox.tsx
2741
- import { jsx as jsx10 } from "react/jsx-runtime";
2777
+ import { jsx as jsx11 } from "react/jsx-runtime";
2742
2778
  var CircuitJsonFileSelectorCombobox = ({
2743
2779
  files,
2744
2780
  onFileChange,
2745
2781
  currentFile
2746
2782
  }) => {
2747
- return /* @__PURE__ */ jsx10(
2783
+ return /* @__PURE__ */ jsx11(
2748
2784
  EnhancedFileSelectorCombobox,
2749
2785
  {
2750
2786
  files,
@@ -2759,8 +2795,8 @@ var CircuitJsonFileSelectorCombobox = ({
2759
2795
  };
2760
2796
 
2761
2797
  // lib/components/RunFrameStaticBuildViewer/RunFrameStaticBuildViewer.tsx
2762
- import { ErrorBoundary } from "react-error-boundary";
2763
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
2798
+ import { ErrorBoundary as ErrorBoundary2 } from "react-error-boundary";
2799
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
2764
2800
  var RunFrameStaticBuildViewer = (props) => {
2765
2801
  useStyles();
2766
2802
  const [currentCircuitJsonPath, setCurrentCircuitJsonPath] = useState10(
@@ -2874,22 +2910,22 @@ var RunFrameStaticBuildViewer = (props) => {
2874
2910
  [loadCircuitJsonFile]
2875
2911
  );
2876
2912
  if (availableFiles.length === 0) {
2877
- return /* @__PURE__ */ jsx11("div", { className: "rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center", children: /* @__PURE__ */ jsxs9("div", { className: "rf-text-center rf-p-8", children: [
2878
- /* @__PURE__ */ jsx11("h3", { className: "rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2", children: "No Circuit JSON Files Found" }),
2879
- /* @__PURE__ */ jsx11("p", { className: "rf-text-sm rf-text-gray-600", children: "Please provide circuit JSON files to view." })
2913
+ return /* @__PURE__ */ jsx12("div", { className: "rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center", children: /* @__PURE__ */ jsxs10("div", { className: "rf-text-center rf-p-8", children: [
2914
+ /* @__PURE__ */ jsx12("h3", { className: "rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2", children: "No Circuit JSON Files Found" }),
2915
+ /* @__PURE__ */ jsx12("p", { className: "rf-text-sm rf-text-gray-600", children: "Please provide circuit JSON files to view." })
2880
2916
  ] }) });
2881
2917
  }
2882
2918
  const currentFileFailed = failedFiles.has(currentCircuitJsonPath);
2883
- return /* @__PURE__ */ jsx11(
2884
- ErrorBoundary,
2919
+ return /* @__PURE__ */ jsx12(
2920
+ ErrorBoundary2,
2885
2921
  {
2886
- fallbackRender: ({ error }) => /* @__PURE__ */ jsx11("div", { className: "rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200", children: /* @__PURE__ */ jsxs9("div", { className: "rf-p-4", children: [
2887
- /* @__PURE__ */ jsx11("h3", { className: "rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3", children: "Error loading Circuit JSON Preview" }),
2888
- /* @__PURE__ */ jsx11("p", { className: "rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2", children: error.message })
2922
+ fallbackRender: ({ error }) => /* @__PURE__ */ jsx12("div", { className: "rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200", children: /* @__PURE__ */ jsxs10("div", { className: "rf-p-4", children: [
2923
+ /* @__PURE__ */ jsx12("h3", { className: "rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3", children: "Error loading Circuit JSON Preview" }),
2924
+ /* @__PURE__ */ jsx12("p", { className: "rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2", children: error.message })
2889
2925
  ] }) }),
2890
- children: currentFileFailed ? /* @__PURE__ */ jsxs9("div", { className: "rf-w-full rf-h-full rf-flex rf-flex-col", children: [
2891
- /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200", children: [
2892
- (props.showFileMenu ?? true) && /* @__PURE__ */ jsx11(
2926
+ children: currentFileFailed ? /* @__PURE__ */ jsxs10("div", { className: "rf-w-full rf-h-full rf-flex rf-flex-col", children: [
2927
+ /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200", children: [
2928
+ (props.showFileMenu ?? true) && /* @__PURE__ */ jsx12(
2893
2929
  FileMenuLeftHeader,
2894
2930
  {
2895
2931
  isWebEmbedded: true,
@@ -2897,7 +2933,7 @@ var RunFrameStaticBuildViewer = (props) => {
2897
2933
  projectName: props.projectName
2898
2934
  }
2899
2935
  ),
2900
- availableFiles.length > 1 && /* @__PURE__ */ jsx11("div", { className: "rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx11(
2936
+ availableFiles.length > 1 && /* @__PURE__ */ jsx12("div", { className: "rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx12(
2901
2937
  CircuitJsonFileSelectorCombobox,
2902
2938
  {
2903
2939
  currentFile: currentCircuitJsonPath,
@@ -2906,14 +2942,14 @@ var RunFrameStaticBuildViewer = (props) => {
2906
2942
  }
2907
2943
  ) })
2908
2944
  ] }),
2909
- /* @__PURE__ */ jsx11("div", { className: "rf-flex-1 rf-flex rf-items-center rf-justify-center", children: /* @__PURE__ */ jsxs9("div", { className: "rf-text-center rf-p-8", children: [
2910
- /* @__PURE__ */ jsx11("h3", { className: "rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2", children: "Failed to Load Circuit File" }),
2911
- /* @__PURE__ */ jsxs9("p", { className: "rf-text-sm rf-text-gray-600 rf-mb-4", children: [
2945
+ /* @__PURE__ */ jsx12("div", { className: "rf-flex-1 rf-flex rf-items-center rf-justify-center", children: /* @__PURE__ */ jsxs10("div", { className: "rf-text-center rf-p-8", children: [
2946
+ /* @__PURE__ */ jsx12("h3", { className: "rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2", children: "Failed to Load Circuit File" }),
2947
+ /* @__PURE__ */ jsxs10("p", { className: "rf-text-sm rf-text-gray-600 rf-mb-4", children: [
2912
2948
  "Could not load: ",
2913
2949
  currentCircuitJsonPath
2914
2950
  ] }),
2915
- /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-2", children: [
2916
- /* @__PURE__ */ jsx11(
2951
+ /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-2", children: [
2952
+ /* @__PURE__ */ jsx12(
2917
2953
  "button",
2918
2954
  {
2919
2955
  onClick: () => retryFailedFile(currentCircuitJsonPath),
@@ -2921,10 +2957,10 @@ var RunFrameStaticBuildViewer = (props) => {
2921
2957
  children: "Retry"
2922
2958
  }
2923
2959
  ),
2924
- availableFiles.length > 1 && /* @__PURE__ */ jsx11("p", { className: "rf-text-xs rf-text-gray-500", children: "Or select a different file from the dropdown above" })
2960
+ availableFiles.length > 1 && /* @__PURE__ */ jsx12("p", { className: "rf-text-xs rf-text-gray-500", children: "Or select a different file from the dropdown above" })
2925
2961
  ] })
2926
2962
  ] }) })
2927
- ] }) : /* @__PURE__ */ jsx11(
2963
+ ] }) : /* @__PURE__ */ jsx12(
2928
2964
  CircuitJsonPreview,
2929
2965
  {
2930
2966
  circuitJson,
@@ -2933,8 +2969,8 @@ var RunFrameStaticBuildViewer = (props) => {
2933
2969
  showFileMenu: false,
2934
2970
  isWebEmbedded: false,
2935
2971
  projectName: props.projectName,
2936
- leftHeaderContent: /* @__PURE__ */ jsxs9("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full", children: [
2937
- (props.showFileMenu ?? true) && /* @__PURE__ */ jsx11(
2972
+ leftHeaderContent: /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full", children: [
2973
+ (props.showFileMenu ?? true) && /* @__PURE__ */ jsx12(
2938
2974
  FileMenuLeftHeader,
2939
2975
  {
2940
2976
  isWebEmbedded: true,
@@ -2942,11 +2978,11 @@ var RunFrameStaticBuildViewer = (props) => {
2942
2978
  projectName: props.projectName
2943
2979
  }
2944
2980
  ),
2945
- availableFiles.length > 1 && /* @__PURE__ */ jsx11(
2981
+ availableFiles.length > 1 && /* @__PURE__ */ jsx12(
2946
2982
  "div",
2947
2983
  {
2948
2984
  className: `rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${isLoadingCurrentFile ? "rf-opacity-50" : ""}`,
2949
- children: /* @__PURE__ */ jsx11(
2985
+ children: /* @__PURE__ */ jsx12(
2950
2986
  CircuitJsonFileSelectorCombobox,
2951
2987
  {
2952
2988
  currentFile: currentCircuitJsonPath,