@tscircuit/runframe 0.0.370 → 0.0.372

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
@@ -1,12 +1,5 @@
1
1
  import {
2
2
  API_BASE,
3
- AlertDialog,
4
- AlertDialogCancel,
5
- AlertDialogContent,
6
- AlertDialogDescription,
7
- AlertDialogFooter,
8
- AlertDialogHeader,
9
- AlertDialogTitle,
10
3
  BomTable,
11
4
  Button,
12
5
  CadViewer,
@@ -25,6 +18,7 @@ import {
25
18
  Tabs,
26
19
  TabsList,
27
20
  TabsTrigger,
21
+ buttonVariants,
28
22
  cn,
29
23
  debug_default,
30
24
  linkify,
@@ -32,7 +26,7 @@ import {
32
26
  useOrderDialog,
33
27
  useOrderDialogCli,
34
28
  useRunFrameStore
35
- } from "./chunk-MAIBX4W6.js";
29
+ } from "./chunk-ZHZYFWBK.js";
36
30
 
37
31
  // lib/components/RunFrame/RunFrame.tsx
38
32
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";
@@ -720,12 +714,117 @@ var useEventHandler = (callback) => {
720
714
  // lib/components/RunFrameForCli/LeftHeader.tsx
721
715
  import "lucide-react";
722
716
 
723
- // lib/components/ui/checkbox.tsx
717
+ // lib/components/ui/alert-dialog.tsx
724
718
  import * as React from "react";
719
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
720
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
721
+ var AlertDialog = AlertDialogPrimitive.Root;
722
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
723
+ var AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
724
+ AlertDialogPrimitive.Overlay,
725
+ {
726
+ className: cn(
727
+ "rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0",
728
+ className
729
+ ),
730
+ ...props,
731
+ ref
732
+ }
733
+ ));
734
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
735
+ var AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3(AlertDialogPortal, { children: [
736
+ /* @__PURE__ */ jsx4(AlertDialogOverlay, {}),
737
+ /* @__PURE__ */ jsx4(
738
+ AlertDialogPrimitive.Content,
739
+ {
740
+ ref,
741
+ className: cn(
742
+ "rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950",
743
+ className
744
+ ),
745
+ ...props
746
+ }
747
+ )
748
+ ] }));
749
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
750
+ var AlertDialogHeader = ({
751
+ className,
752
+ ...props
753
+ }) => /* @__PURE__ */ jsx4(
754
+ "div",
755
+ {
756
+ className: cn(
757
+ "rf-flex rf-flex-col rf-space-y-2 rf-text-center sm:rf-text-left",
758
+ className
759
+ ),
760
+ ...props
761
+ }
762
+ );
763
+ AlertDialogHeader.displayName = "AlertDialogHeader";
764
+ var AlertDialogFooter = ({
765
+ className,
766
+ ...props
767
+ }) => /* @__PURE__ */ jsx4(
768
+ "div",
769
+ {
770
+ className: cn(
771
+ "rf-flex rf-flex-col-reverse sm:rf-flex-row sm:rf-justify-end sm:rf-space-x-2",
772
+ className
773
+ ),
774
+ ...props
775
+ }
776
+ );
777
+ AlertDialogFooter.displayName = "AlertDialogFooter";
778
+ var AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
779
+ AlertDialogPrimitive.Title,
780
+ {
781
+ ref,
782
+ className: cn("rf-text-lg rf-font-semibold", className),
783
+ ...props
784
+ }
785
+ ));
786
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
787
+ var AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
788
+ AlertDialogPrimitive.Description,
789
+ {
790
+ ref,
791
+ className: cn(
792
+ "rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",
793
+ className
794
+ ),
795
+ ...props
796
+ }
797
+ ));
798
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
799
+ var AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
800
+ AlertDialogPrimitive.Action,
801
+ {
802
+ ref,
803
+ className: cn(buttonVariants(), className),
804
+ ...props
805
+ }
806
+ ));
807
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
808
+ var AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
809
+ AlertDialogPrimitive.Cancel,
810
+ {
811
+ ref,
812
+ className: cn(
813
+ buttonVariants({ variant: "outline" }),
814
+ "rf-mt-2 sm:rf-mt-0",
815
+ className
816
+ ),
817
+ ...props
818
+ }
819
+ ));
820
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
821
+
822
+ // lib/components/ui/checkbox.tsx
823
+ import * as React2 from "react";
725
824
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
726
825
  import { Check } from "lucide-react";
727
- import { jsx as jsx4 } from "react/jsx-runtime";
728
- var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
826
+ import { jsx as jsx5 } from "react/jsx-runtime";
827
+ var Checkbox = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
729
828
  CheckboxPrimitive.Root,
730
829
  {
731
830
  ref,
@@ -734,13 +833,13 @@ var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
734
833
  className
735
834
  ),
736
835
  ...props,
737
- children: /* @__PURE__ */ jsx4(
836
+ children: /* @__PURE__ */ jsx5(
738
837
  CheckboxPrimitive.Indicator,
739
838
  {
740
839
  className: cn(
741
840
  "rf-flex rf-items-center rf-justify-center rf-text-current"
742
841
  ),
743
- children: /* @__PURE__ */ jsx4(Check, { className: "rf-h-4 rf-w-4" })
842
+ children: /* @__PURE__ */ jsx5(Check, { className: "rf-h-4 rf-w-4" })
744
843
  }
745
844
  )
746
845
  }
@@ -753,11 +852,11 @@ import { useState as useState5, useEffect as useEffect7 } from "react";
753
852
  import { Loader2 as Loader22, Search, ExternalLink } from "lucide-react";
754
853
 
755
854
  // lib/components/ui/input.tsx
756
- import * as React2 from "react";
757
- import { jsx as jsx5 } from "react/jsx-runtime";
758
- var Input = React2.forwardRef(
855
+ import * as React3 from "react";
856
+ import { jsx as jsx6 } from "react/jsx-runtime";
857
+ var Input = React3.forwardRef(
759
858
  ({ className, type, ...props }, ref) => {
760
- return /* @__PURE__ */ jsx5(
859
+ return /* @__PURE__ */ jsx6(
761
860
  "input",
762
861
  {
763
862
  type,
@@ -839,7 +938,7 @@ var mapTscircuitSnippetToSearchResult = (tscircuitSnippet) => {
839
938
 
840
939
  // lib/components/ImportComponentDialog/ImportComponentDialog.tsx
841
940
  import { createSvgUrl as createPngUrl } from "@tscircuit/create-snippet-url";
842
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
941
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
843
942
  var ImportComponentDialog = ({
844
943
  isOpen,
845
944
  onClose,
@@ -901,26 +1000,26 @@ var ImportComponentDialog = ({
901
1000
  setDetailsComponent(component);
902
1001
  setDetailsOpen(true);
903
1002
  };
904
- return /* @__PURE__ */ jsxs3(AlertDialog, { open: isOpen, onOpenChange: () => onClose(), children: [
905
- /* @__PURE__ */ jsxs3(AlertDialogContent, { className: "rf-max-w-3xl rf-w-full rf-max-h-[90vh] rf-overflow-y-auto rf-flex rf-flex-col", children: [
906
- /* @__PURE__ */ jsxs3(AlertDialogHeader, { children: [
907
- /* @__PURE__ */ jsx6(AlertDialogTitle, { children: "Import Component" }),
908
- /* @__PURE__ */ jsx6(AlertDialogDescription, { children: "Search for components from tscircuit.com or JLCPCB parts library." })
1003
+ return /* @__PURE__ */ jsxs4(AlertDialog, { open: isOpen, onOpenChange: () => onClose(), children: [
1004
+ /* @__PURE__ */ jsxs4(AlertDialogContent, { className: "rf-max-w-3xl rf-w-full rf-max-h-[90vh] rf-overflow-y-auto rf-flex rf-flex-col", children: [
1005
+ /* @__PURE__ */ jsxs4(AlertDialogHeader, { children: [
1006
+ /* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Import Component" }),
1007
+ /* @__PURE__ */ jsx7(AlertDialogDescription, { children: "Search for components from tscircuit.com or JLCPCB parts library." })
909
1008
  ] }),
910
- /* @__PURE__ */ jsxs3(
1009
+ /* @__PURE__ */ jsxs4(
911
1010
  Tabs,
912
1011
  {
913
1012
  value: activeTab,
914
1013
  onValueChange: (value) => setActiveTab(value),
915
1014
  children: [
916
- /* @__PURE__ */ jsxs3(TabsList, { className: "rf-grid rf-w-full rf-grid-cols-2", children: [
917
- /* @__PURE__ */ jsx6(TabsTrigger, { value: "tscircuit.com", children: "tscircuit.com" }),
918
- /* @__PURE__ */ jsx6(TabsTrigger, { value: "jlcpcb", children: "JLCPCB Parts" })
1015
+ /* @__PURE__ */ jsxs4(TabsList, { className: "rf-grid rf-w-full rf-grid-cols-2", children: [
1016
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "tscircuit.com", children: "tscircuit.com" }),
1017
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "jlcpcb", children: "JLCPCB Parts" })
919
1018
  ] }),
920
- /* @__PURE__ */ jsxs3("div", { className: "rf-flex rf-items-center rf-gap-2 rf-mt-4", children: [
921
- /* @__PURE__ */ jsxs3("div", { className: "rf-relative rf-flex-grow", children: [
922
- /* @__PURE__ */ jsx6(Search, { className: "rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground" }),
923
- /* @__PURE__ */ jsx6(
1019
+ /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-gap-2 rf-mt-4", children: [
1020
+ /* @__PURE__ */ jsxs4("div", { className: "rf-relative rf-flex-grow", children: [
1021
+ /* @__PURE__ */ jsx7(Search, { className: "rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground" }),
1022
+ /* @__PURE__ */ jsx7(
924
1023
  Input,
925
1024
  {
926
1025
  placeholder: activeTab === "tscircuit.com" ? "Search components..." : "Search JLCPCB parts (e.g. C14663)...",
@@ -931,22 +1030,22 @@ var ImportComponentDialog = ({
931
1030
  }
932
1031
  )
933
1032
  ] }),
934
- /* @__PURE__ */ jsx6(Button, { onClick: handleSearch, disabled: isLoading, children: isLoading ? /* @__PURE__ */ jsx6(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }) : "Search" })
1033
+ /* @__PURE__ */ jsx7(Button, { onClick: handleSearch, disabled: isLoading, children: isLoading ? /* @__PURE__ */ jsx7(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }) : "Search" })
935
1034
  ] }),
936
- /* @__PURE__ */ jsx6("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__ */ jsx6("div", { className: "rf-divide-y", children: searchResults.map((result) => /* @__PURE__ */ jsxs3(
1035
+ /* @__PURE__ */ jsx7("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__ */ jsx7("div", { className: "rf-divide-y", children: searchResults.map((result) => /* @__PURE__ */ jsxs4(
937
1036
  "div",
938
1037
  {
939
1038
  className: `rf-p-3 rf-flex rf-items-center rf-justify-between rf-cursor-pointer hover:rf-bg-zinc-100 ${selectedComponent?.id === result.id ? "rf-bg-zinc-100" : ""}`,
940
1039
  onClick: () => setSelectedComponent(result),
941
1040
  children: [
942
- /* @__PURE__ */ jsxs3("div", { children: [
943
- /* @__PURE__ */ jsx6("div", { className: "rf-font-medium", children: result.name }),
944
- /* @__PURE__ */ jsxs3("div", { className: "rf-text-sm rf-text-zinc-500", children: [
945
- result.partNumber && /* @__PURE__ */ jsx6("span", { className: "rf-mr-2", children: result.partNumber }),
1041
+ /* @__PURE__ */ jsxs4("div", { children: [
1042
+ /* @__PURE__ */ jsx7("div", { className: "rf-font-medium", children: result.name }),
1043
+ /* @__PURE__ */ jsxs4("div", { className: "rf-text-sm rf-text-zinc-500", children: [
1044
+ result.partNumber && /* @__PURE__ */ jsx7("span", { className: "rf-mr-2", children: result.partNumber }),
946
1045
  result.description
947
1046
  ] })
948
1047
  ] }),
949
- /* @__PURE__ */ jsx6("div", { className: "rf-flex rf-gap-2", children: result.source === "tscircuit.com" && /* @__PURE__ */ jsx6(
1048
+ /* @__PURE__ */ jsx7("div", { className: "rf-flex rf-gap-2", children: result.source === "tscircuit.com" && /* @__PURE__ */ jsx7(
950
1049
  Button,
951
1050
  {
952
1051
  variant: "outline",
@@ -961,16 +1060,16 @@ var ImportComponentDialog = ({
961
1060
  ]
962
1061
  },
963
1062
  result.id
964
- )) }) : isLoading ? /* @__PURE__ */ jsxs3("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: [
965
- /* @__PURE__ */ jsx6(Loader22, { className: "rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2" }),
966
- /* @__PURE__ */ jsx6("p", { children: "Searching..." })
967
- ] }) : /* @__PURE__ */ jsx6("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: hasSearched ? "No results found" : "Enter a search term to find components" }) })
1063
+ )) }) : isLoading ? /* @__PURE__ */ jsxs4("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: [
1064
+ /* @__PURE__ */ jsx7(Loader22, { className: "rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2" }),
1065
+ /* @__PURE__ */ jsx7("p", { children: "Searching..." })
1066
+ ] }) : /* @__PURE__ */ jsx7("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: hasSearched ? "No results found" : "Enter a search term to find components" }) })
968
1067
  ]
969
1068
  }
970
1069
  ),
971
- /* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [
972
- /* @__PURE__ */ jsx6(AlertDialogCancel, { onClick: onClose, children: "Cancel" }),
973
- /* @__PURE__ */ jsx6(
1070
+ /* @__PURE__ */ jsxs4(AlertDialogFooter, { children: [
1071
+ /* @__PURE__ */ jsx7(AlertDialogCancel, { onClick: onClose, children: "Cancel" }),
1072
+ /* @__PURE__ */ jsx7(
974
1073
  Button,
975
1074
  {
976
1075
  onClick: () => {
@@ -985,58 +1084,58 @@ var ImportComponentDialog = ({
985
1084
  )
986
1085
  ] })
987
1086
  ] }),
988
- /* @__PURE__ */ jsx6(AlertDialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */ jsxs3(AlertDialogContent, { className: "!rf-max-h-[70%] !rf-overflow-y-auto rf-flex rf-flex-col !rf-max-w-[60vw] !rf-overflow-x-hidden", children: [
989
- /* @__PURE__ */ jsxs3(AlertDialogHeader, { children: [
990
- /* @__PURE__ */ jsx6(AlertDialogTitle, { children: detailsComponent?.name }),
991
- /* @__PURE__ */ jsx6(AlertDialogDescription, { children: "Detailed information about the selected component" }),
992
- /* @__PURE__ */ jsxs3("div", { className: "rf-text-sm rf-text-muted-foreground", children: [
993
- detailsComponent?.partNumber && /* @__PURE__ */ jsx6("div", { className: "rf-font-mono rf-text-sm rf-mb-2", children: detailsComponent.partNumber }),
1087
+ /* @__PURE__ */ jsx7(AlertDialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */ jsxs4(AlertDialogContent, { className: "!rf-max-h-[70%] !rf-overflow-y-auto rf-flex rf-flex-col !rf-max-w-[60vw] !rf-overflow-x-hidden", children: [
1088
+ /* @__PURE__ */ jsxs4(AlertDialogHeader, { children: [
1089
+ /* @__PURE__ */ jsx7(AlertDialogTitle, { children: detailsComponent?.name }),
1090
+ /* @__PURE__ */ jsx7(AlertDialogDescription, { children: "Detailed information about the selected component" }),
1091
+ /* @__PURE__ */ jsxs4("div", { className: "rf-text-sm rf-text-muted-foreground", children: [
1092
+ detailsComponent?.partNumber && /* @__PURE__ */ jsx7("div", { className: "rf-font-mono rf-text-sm rf-mb-2", children: detailsComponent.partNumber }),
994
1093
  detailsComponent?.description
995
1094
  ] })
996
1095
  ] }),
997
- detailsComponent?.source === "jlcpcb" && /* @__PURE__ */ jsxs3("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
998
- /* @__PURE__ */ jsx6("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "JLCPCB Details" }),
999
- /* @__PURE__ */ jsxs3("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: [
1000
- detailsComponent.package && /* @__PURE__ */ jsxs3("div", { className: "rf-flex rf-flex-col", children: [
1001
- /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-zinc-500", children: "Package" }),
1002
- /* @__PURE__ */ jsx6("span", { className: "rf-font-medium", children: detailsComponent.package })
1096
+ detailsComponent?.source === "jlcpcb" && /* @__PURE__ */ jsxs4("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
1097
+ /* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "JLCPCB Details" }),
1098
+ /* @__PURE__ */ jsxs4("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: [
1099
+ detailsComponent.package && /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-flex-col", children: [
1100
+ /* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Package" }),
1101
+ /* @__PURE__ */ jsx7("span", { className: "rf-font-medium", children: detailsComponent.package })
1003
1102
  ] }),
1004
- detailsComponent.price !== void 0 && /* @__PURE__ */ jsxs3("div", { className: "rf-flex rf-flex-col", children: [
1005
- /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-zinc-500", children: "Price" }),
1006
- /* @__PURE__ */ jsxs3("span", { className: "rf-font-medium", children: [
1103
+ detailsComponent.price !== void 0 && /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-flex-col", children: [
1104
+ /* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Price" }),
1105
+ /* @__PURE__ */ jsxs4("span", { className: "rf-font-medium", children: [
1007
1106
  "$",
1008
1107
  detailsComponent.price.toFixed(4)
1009
1108
  ] })
1010
1109
  ] })
1011
1110
  ] })
1012
1111
  ] }),
1013
- detailsComponent?.source === "tscircuit.com" && /* @__PURE__ */ jsxs3("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4 !rf-max-w-[60vw] !rf-overflow-x-hidden", children: [
1014
- /* @__PURE__ */ jsx6("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "tscircuit Details" }),
1015
- /* @__PURE__ */ jsx6("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: detailsComponent.owner && /* @__PURE__ */ jsxs3("div", { className: "rf-flex rf-flex-col", children: [
1016
- /* @__PURE__ */ jsx6("span", { className: "rf-text-xs rf-text-zinc-500", children: "Owner" }),
1017
- /* @__PURE__ */ jsx6("span", { className: "rf-font-medium", children: detailsComponent.owner })
1112
+ detailsComponent?.source === "tscircuit.com" && /* @__PURE__ */ jsxs4("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4 !rf-max-w-[60vw] !rf-overflow-x-hidden", children: [
1113
+ /* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "tscircuit Details" }),
1114
+ /* @__PURE__ */ jsx7("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: detailsComponent.owner && /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-flex-col", children: [
1115
+ /* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Owner" }),
1116
+ /* @__PURE__ */ jsx7("span", { className: "rf-font-medium", children: detailsComponent.owner })
1018
1117
  ] }) }),
1019
- detailsComponent.code && /* @__PURE__ */ jsxs3("div", { className: "rf-mt-2", children: [
1020
- /* @__PURE__ */ jsx6("div", { className: "rf-text-xs rf-text-zinc-500 rf-mb-1", children: "Code Preview" }),
1021
- /* @__PURE__ */ jsxs3("pre", { className: "rf-bg-zinc-50 rf-p-2 rf-rounded rf-text-xs rf-font-mono rf-max-h-32 rf-overflow-y-auto", children: [
1118
+ detailsComponent.code && /* @__PURE__ */ jsxs4("div", { className: "rf-mt-2", children: [
1119
+ /* @__PURE__ */ jsx7("div", { className: "rf-text-xs rf-text-zinc-500 rf-mb-1", children: "Code Preview" }),
1120
+ /* @__PURE__ */ jsxs4("pre", { className: "rf-bg-zinc-50 rf-p-2 rf-rounded rf-text-xs rf-font-mono rf-max-h-32 rf-overflow-y-auto", children: [
1022
1121
  detailsComponent.code.substring(0, 500),
1023
1122
  detailsComponent.code.length > 500 && "..."
1024
1123
  ] })
1025
1124
  ] })
1026
1125
  ] }),
1027
- /* @__PURE__ */ jsxs3("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
1028
- /* @__PURE__ */ jsx6("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "Preview" }),
1029
- detailsComponent?.source === "tscircuit.com" && detailsComponent.code ? /* @__PURE__ */ jsx6("div", { className: "rf-flex rf-justify-center", children: /* @__PURE__ */ jsx6("div", { className: "rf-border rf-rounded rf-p-4 rf-bg-zinc-50", children: /* @__PURE__ */ jsx6(
1126
+ /* @__PURE__ */ jsxs4("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
1127
+ /* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "Preview" }),
1128
+ detailsComponent?.source === "tscircuit.com" && detailsComponent.code ? /* @__PURE__ */ jsx7("div", { className: "rf-flex rf-justify-center", children: /* @__PURE__ */ jsx7("div", { className: "rf-border rf-rounded rf-p-4 rf-bg-zinc-50", children: /* @__PURE__ */ jsx7(
1030
1129
  "img",
1031
1130
  {
1032
1131
  src: createPngUrl(detailsComponent.code, "pcb"),
1033
1132
  alt: detailsComponent.name,
1034
1133
  className: "rf-w-full rf-aspect-video rf-object-contain"
1035
1134
  }
1036
- ) }) }) : /* @__PURE__ */ jsx6("div", { className: "rf-text-center rf-text-zinc-500 rf-p-4", children: "No preview available" })
1135
+ ) }) }) : /* @__PURE__ */ jsx7("div", { className: "rf-text-center rf-text-zinc-500 rf-p-4", children: "No preview available" })
1037
1136
  ] }),
1038
- /* @__PURE__ */ jsxs3("div", { className: "rf-flex rf-justify-between", children: [
1039
- /* @__PURE__ */ jsxs3(
1137
+ /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-justify-between", children: [
1138
+ /* @__PURE__ */ jsxs4(
1040
1139
  Button,
1041
1140
  {
1042
1141
  variant: "outline",
@@ -1051,11 +1150,11 @@ var ImportComponentDialog = ({
1051
1150
  " ",
1052
1151
  detailsComponent?.source === "jlcpcb" ? "JLCPCB" : "tscircuit.com",
1053
1152
  " ",
1054
- /* @__PURE__ */ jsx6(ExternalLink, { className: "rf-h-3 rf-w-3" })
1153
+ /* @__PURE__ */ jsx7(ExternalLink, { className: "rf-h-3 rf-w-3" })
1055
1154
  ]
1056
1155
  }
1057
1156
  ),
1058
- /* @__PURE__ */ jsx6(
1157
+ /* @__PURE__ */ jsx7(
1059
1158
  Button,
1060
1159
  {
1061
1160
  onClick: () => {
@@ -1205,7 +1304,7 @@ var importComponentFromJlcpcb = async (jlcpcbPartNumber) => {
1205
1304
  };
1206
1305
 
1207
1306
  // lib/components/RunFrameForCli/LeftHeader.tsx
1208
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1307
+ import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1209
1308
  var RunframeCliLeftHeader = (props) => {
1210
1309
  const lastRunEvalVersion = useRunnerStore((s) => s.lastRunEvalVersion);
1211
1310
  const [snippetName, setSnippetName] = useState6(null);
@@ -1296,11 +1395,11 @@ var RunframeCliLeftHeader = (props) => {
1296
1395
  };
1297
1396
  const circuitJson = useRunFrameStore((state) => state.circuitJson);
1298
1397
  const [isImportDialogOpen, setIsImportDialogOpen] = useState6(false);
1299
- return /* @__PURE__ */ jsxs4(Fragment2, { children: [
1300
- /* @__PURE__ */ jsxs4(DropdownMenu, { children: [
1301
- /* @__PURE__ */ jsx7(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("div", { className: "rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative", children: "File" }) }),
1302
- /* @__PURE__ */ jsxs4(DropdownMenuContent, { children: [
1303
- /* @__PURE__ */ jsx7(
1398
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
1399
+ /* @__PURE__ */ jsxs5(DropdownMenu, { children: [
1400
+ /* @__PURE__ */ jsx8(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx8("div", { className: "rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative", children: "File" }) }),
1401
+ /* @__PURE__ */ jsxs5(DropdownMenuContent, { children: [
1402
+ /* @__PURE__ */ jsx8(
1304
1403
  DropdownMenuItem,
1305
1404
  {
1306
1405
  className: "rf-text-xs",
@@ -1309,7 +1408,7 @@ var RunframeCliLeftHeader = (props) => {
1309
1408
  children: isSaving ? "Saving..." : "Push"
1310
1409
  }
1311
1410
  ),
1312
- parseInt(window.location.port) > 5e3 && /* @__PURE__ */ jsx7(
1411
+ parseInt(window.location.port) > 5e3 && /* @__PURE__ */ jsx8(
1313
1412
  DropdownMenuItem,
1314
1413
  {
1315
1414
  className: "rf-text-xs",
@@ -1319,7 +1418,7 @@ var RunframeCliLeftHeader = (props) => {
1319
1418
  children: "Order"
1320
1419
  }
1321
1420
  ),
1322
- /* @__PURE__ */ jsx7(
1421
+ /* @__PURE__ */ jsx8(
1323
1422
  DropdownMenuItem,
1324
1423
  {
1325
1424
  className: "rf-text-xs",
@@ -1328,8 +1427,8 @@ var RunframeCliLeftHeader = (props) => {
1328
1427
  children: "Import"
1329
1428
  }
1330
1429
  ),
1331
- /* @__PURE__ */ jsxs4(DropdownMenuSub, { children: [
1332
- /* @__PURE__ */ jsx7(
1430
+ /* @__PURE__ */ jsxs5(DropdownMenuSub, { children: [
1431
+ /* @__PURE__ */ jsx8(
1333
1432
  DropdownMenuSubTrigger,
1334
1433
  {
1335
1434
  className: "rf-text-xs",
@@ -1337,7 +1436,7 @@ var RunframeCliLeftHeader = (props) => {
1337
1436
  children: isExporting ? "Exporting..." : "Export"
1338
1437
  }
1339
1438
  ),
1340
- /* @__PURE__ */ jsx7(DropdownMenuPortal, { children: /* @__PURE__ */ jsx7(DropdownMenuSubContent, { children: availableExports.map((exp, i) => /* @__PURE__ */ jsx7(
1439
+ /* @__PURE__ */ jsx8(DropdownMenuPortal, { children: /* @__PURE__ */ jsx8(DropdownMenuSubContent, { children: availableExports.map((exp, i) => /* @__PURE__ */ jsx8(
1341
1440
  DropdownMenuItem,
1342
1441
  {
1343
1442
  onSelect: () => {
@@ -1352,16 +1451,16 @@ var RunframeCliLeftHeader = (props) => {
1352
1451
  });
1353
1452
  },
1354
1453
  disabled: isExporting,
1355
- children: /* @__PURE__ */ jsx7("span", { className: "rf-text-xs", children: exp.name })
1454
+ children: /* @__PURE__ */ jsx8("span", { className: "rf-text-xs", children: exp.name })
1356
1455
  },
1357
1456
  i
1358
1457
  )) }) })
1359
1458
  ] }),
1360
- /* @__PURE__ */ jsxs4(DropdownMenuSub, { children: [
1361
- /* @__PURE__ */ jsx7(DropdownMenuSubTrigger, { className: "rf-text-xs", children: "Advanced" }),
1362
- /* @__PURE__ */ jsx7(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs4(DropdownMenuSubContent, { children: [
1363
- /* @__PURE__ */ jsx7(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
1364
- /* @__PURE__ */ jsx7(
1459
+ /* @__PURE__ */ jsxs5(DropdownMenuSub, { children: [
1460
+ /* @__PURE__ */ jsx8(DropdownMenuSubTrigger, { className: "rf-text-xs", children: "Advanced" }),
1461
+ /* @__PURE__ */ jsx8(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs5(DropdownMenuSubContent, { children: [
1462
+ /* @__PURE__ */ jsx8(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
1463
+ /* @__PURE__ */ jsx8(
1365
1464
  Checkbox,
1366
1465
  {
1367
1466
  id: "load-latest-eval",
@@ -1371,7 +1470,7 @@ var RunframeCliLeftHeader = (props) => {
1371
1470
  }
1372
1471
  }
1373
1472
  ),
1374
- /* @__PURE__ */ jsx7(
1473
+ /* @__PURE__ */ jsx8(
1375
1474
  "label",
1376
1475
  {
1377
1476
  htmlFor: "load-latest-eval",
@@ -1380,31 +1479,31 @@ var RunframeCliLeftHeader = (props) => {
1380
1479
  }
1381
1480
  )
1382
1481
  ] }) }),
1383
- lastRunEvalVersion && /* @__PURE__ */ jsx7(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx7("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs4("span", { className: "rf-text-xs", children: [
1482
+ lastRunEvalVersion && /* @__PURE__ */ jsx8(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx8("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs5("span", { className: "rf-text-xs", children: [
1384
1483
  "@tscircuit/eval@",
1385
1484
  lastRunEvalVersion
1386
1485
  ] }) }) }),
1387
- /* @__PURE__ */ jsx7(
1486
+ /* @__PURE__ */ jsx8(
1388
1487
  DropdownMenuItem,
1389
1488
  {
1390
1489
  className: "rf-flex rf-items-center rf-gap-2",
1391
1490
  onClick: () => {
1392
1491
  window.open("/api/admin", "_blank");
1393
1492
  },
1394
- children: /* @__PURE__ */ jsx7("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx7("span", { className: "rf-text-xs", children: "CLI Admin Panel" }) })
1493
+ children: /* @__PURE__ */ jsx8("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx8("span", { className: "rf-text-xs", children: "CLI Admin Panel" }) })
1395
1494
  }
1396
1495
  )
1397
1496
  ] }) })
1398
1497
  ] })
1399
1498
  ] }),
1400
- /* @__PURE__ */ jsx7(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */ jsxs4(AlertDialogContent, { children: [
1401
- /* @__PURE__ */ jsxs4(AlertDialogHeader, { children: [
1402
- /* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Error Saving Snippet" }),
1403
- /* @__PURE__ */ jsx7(AlertDialogDescription, { children: errorMessage })
1499
+ /* @__PURE__ */ jsx8(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */ jsxs5(AlertDialogContent, { children: [
1500
+ /* @__PURE__ */ jsxs5(AlertDialogHeader, { children: [
1501
+ /* @__PURE__ */ jsx8(AlertDialogTitle, { children: "Error Saving Snippet" }),
1502
+ /* @__PURE__ */ jsx8(AlertDialogDescription, { children: errorMessage })
1404
1503
  ] }),
1405
- /* @__PURE__ */ jsx7(AlertDialogFooter, { children: /* @__PURE__ */ jsx7(AlertDialogCancel, { onClick: () => setIsError(false), children: "Dismiss" }) })
1504
+ /* @__PURE__ */ jsx8(AlertDialogFooter, { children: /* @__PURE__ */ jsx8(AlertDialogCancel, { onClick: () => setIsError(false), children: "Dismiss" }) })
1406
1505
  ] }) }),
1407
- /* @__PURE__ */ jsx7(
1506
+ /* @__PURE__ */ jsx8(
1408
1507
  SelectSnippetDialog,
1409
1508
  {
1410
1509
  snippetNames: availableSnippets ?? [],
@@ -1423,7 +1522,7 @@ var RunframeCliLeftHeader = (props) => {
1423
1522
  }
1424
1523
  )
1425
1524
  ] }),
1426
- /* @__PURE__ */ jsx7(
1525
+ /* @__PURE__ */ jsx8(
1427
1526
  ImportComponentDialog,
1428
1527
  {
1429
1528
  isOpen: isImportDialogOpen,
@@ -1456,8 +1555,8 @@ var RunframeCliLeftHeader = (props) => {
1456
1555
  }
1457
1556
  }
1458
1557
  ),
1459
- /* @__PURE__ */ jsx7(Toaster, { position: "top-center", reverseOrder: false }),
1460
- /* @__PURE__ */ jsx7(
1558
+ /* @__PURE__ */ jsx8(Toaster, { position: "top-center", reverseOrder: false }),
1559
+ /* @__PURE__ */ jsx8(
1461
1560
  orderDialog.OrderDialog,
1462
1561
  {
1463
1562
  isOpen: orderDialog.isOpen,
@@ -1470,21 +1569,21 @@ var RunframeCliLeftHeader = (props) => {
1470
1569
  };
1471
1570
 
1472
1571
  // lib/components/RunFrameForCli/RunFrameForCli.tsx
1473
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1572
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1474
1573
  var RunFrameForCli = (props) => {
1475
1574
  const [shouldLoadLatestEval, setLoadLatestEval] = useLocalStorageState(
1476
1575
  "load-latest-eval",
1477
1576
  true
1478
1577
  );
1479
- return /* @__PURE__ */ jsx8(
1578
+ return /* @__PURE__ */ jsx9(
1480
1579
  RunFrameWithApi,
1481
1580
  {
1482
1581
  debug: props.debug,
1483
1582
  forceLatestEvalVersion: shouldLoadLatestEval,
1484
1583
  defaultToFullScreen: true,
1485
1584
  showToggleFullScreen: false,
1486
- leftHeaderContent: /* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
1487
- /* @__PURE__ */ jsx8(
1585
+ leftHeaderContent: /* @__PURE__ */ jsxs6("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
1586
+ /* @__PURE__ */ jsx9(
1488
1587
  RunframeCliLeftHeader,
1489
1588
  {
1490
1589
  shouldLoadLatestEval,