@tscircuit/runframe 0.0.314 → 0.0.315
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/{chunk-PC663PVG.js → chunk-MZVSWVSS.js} +1 -1
- package/dist/preview.js +1 -1
- package/dist/runner.d.ts +3 -2
- package/dist/runner.js +104 -125
- package/dist/standalone-preview.min.js +1 -1
- package/dist/standalone.min.js +517 -517
- package/package.json +2 -2
package/dist/runner.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
buttonVariants,
|
|
21
21
|
cn,
|
|
22
22
|
linkify
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MZVSWVSS.js";
|
|
24
24
|
|
|
25
25
|
// lib/components/RunFrame/RunFrame.tsx
|
|
26
26
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -401,14 +401,6 @@ var RunFrame = (props) => {
|
|
|
401
401
|
globalThis.runFrameWorker = worker;
|
|
402
402
|
props.onRenderStarted?.();
|
|
403
403
|
const fsMapObj2 = fsMap instanceof Map ? Object.fromEntries(fsMap.entries()) : fsMap;
|
|
404
|
-
if (!fsMapObj2[props.entrypoint]) {
|
|
405
|
-
setError({
|
|
406
|
-
error: `Entrypoint not found (entrypoint: "${props.entrypoint}", fsMapKeys: ${Object.keys(fsMapObj2).join(", ")})`,
|
|
407
|
-
stack: ""
|
|
408
|
-
});
|
|
409
|
-
setIsRunning(false);
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
404
|
const renderIds = /* @__PURE__ */ new Set();
|
|
413
405
|
const startRenderTime = Date.now();
|
|
414
406
|
let lastRenderLogSet = Date.now();
|
|
@@ -655,7 +647,7 @@ var useEditEventController = () => {
|
|
|
655
647
|
// lib/components/RunFrameWithApi/RunFrameWithApi.tsx
|
|
656
648
|
import { useEffect as useEffect3 } from "react";
|
|
657
649
|
import { applyEditEventsToManualEditsFile as applyEditEventsToManualEditsFile2 } from "@tscircuit/core";
|
|
658
|
-
import { jsx as jsx2
|
|
650
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
659
651
|
var debug5 = Debug3("run-frame:RunFrameWithApi");
|
|
660
652
|
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"));
|
|
661
653
|
var guessManualEditsFilePath = (files) => files.find((file) => file.includes("manual-edits.")) ?? files.find((file) => file.includes("manual-edit.")) ?? files.find((file) => file.endsWith(".json"));
|
|
@@ -691,19 +683,6 @@ var RunFrameWithApi = (props) => {
|
|
|
691
683
|
startPolling();
|
|
692
684
|
return () => stopPolling();
|
|
693
685
|
}, [startPolling, stopPolling]);
|
|
694
|
-
const entrypoint = guessEntrypoint(Array.from(fsMap.keys())) ?? "entrypoint.tsx";
|
|
695
|
-
useEffect3(() => {
|
|
696
|
-
debug5(`entrypoint set to ${entrypoint}`, {
|
|
697
|
-
fsKeys: Array.from(fsMap.keys())
|
|
698
|
-
});
|
|
699
|
-
}, [entrypoint]);
|
|
700
|
-
if (!fsMap.get(entrypoint)) {
|
|
701
|
-
return /* @__PURE__ */ jsxs2("div", { children: [
|
|
702
|
-
"No entrypoint found for Run Frame! Found files:",
|
|
703
|
-
" ",
|
|
704
|
-
Array.from(fsMap.keys()).join(",")
|
|
705
|
-
] });
|
|
706
|
-
}
|
|
707
686
|
return /* @__PURE__ */ jsx2(
|
|
708
687
|
RunFrame,
|
|
709
688
|
{
|
|
@@ -721,7 +700,6 @@ var RunFrameWithApi = (props) => {
|
|
|
721
700
|
debug5("onRenderFinished / markRenderComplete");
|
|
722
701
|
markRenderComplete();
|
|
723
702
|
},
|
|
724
|
-
entrypoint,
|
|
725
703
|
editEvents: editEventsForRender,
|
|
726
704
|
onEditEvent: (ee) => {
|
|
727
705
|
pushEditEvent(ee);
|
|
@@ -784,7 +762,7 @@ import { useEffect as useEffect8, useMemo as useMemo2, useState as useState10 }
|
|
|
784
762
|
|
|
785
763
|
// lib/components/RunFrameForCli/SelectSnippetDialog.tsx
|
|
786
764
|
import { useState as useState4 } from "react";
|
|
787
|
-
import { jsx as jsx3, jsxs as
|
|
765
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
788
766
|
var SelectSnippetDialog = ({
|
|
789
767
|
snippetNames,
|
|
790
768
|
onSelect,
|
|
@@ -807,7 +785,7 @@ var SelectSnippetDialog = ({
|
|
|
807
785
|
}
|
|
808
786
|
}
|
|
809
787
|
};
|
|
810
|
-
return /* @__PURE__ */ jsx3("div", { className: "rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]", children: /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ jsx3("div", { className: "rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]", children: /* @__PURE__ */ jsxs2("div", { className: "rf-bg-white rf-rounded-lg rf-p-6 rf-w-96", children: [
|
|
811
789
|
/* @__PURE__ */ jsx3("h2", { className: "rf-text-lg rf-font-semibold rf-mb-4", children: "Select Snippet" }),
|
|
812
790
|
/* @__PURE__ */ jsx3(
|
|
813
791
|
"input",
|
|
@@ -820,7 +798,7 @@ var SelectSnippetDialog = ({
|
|
|
820
798
|
onKeyDown: handleKeyDown
|
|
821
799
|
}
|
|
822
800
|
),
|
|
823
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ jsxs2("div", { className: "rf-h-60 rf-overflow-y-auto", children: [
|
|
824
802
|
filteredSnippets.map((name) => /* @__PURE__ */ jsx3(
|
|
825
803
|
"button",
|
|
826
804
|
{
|
|
@@ -831,7 +809,7 @@ var SelectSnippetDialog = ({
|
|
|
831
809
|
},
|
|
832
810
|
name
|
|
833
811
|
)),
|
|
834
|
-
showCreateNew && /* @__PURE__ */
|
|
812
|
+
showCreateNew && /* @__PURE__ */ jsxs2(
|
|
835
813
|
"button",
|
|
836
814
|
{
|
|
837
815
|
type: "button",
|
|
@@ -845,7 +823,7 @@ var SelectSnippetDialog = ({
|
|
|
845
823
|
}
|
|
846
824
|
)
|
|
847
825
|
] }),
|
|
848
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ jsxs2("div", { className: "rf-mt-4 rf-flex rf-justify-end rf-gap-2", children: [
|
|
849
827
|
/* @__PURE__ */ jsx3(
|
|
850
828
|
"button",
|
|
851
829
|
{
|
|
@@ -890,7 +868,7 @@ import "lucide-react";
|
|
|
890
868
|
// lib/components/ui/alert-dialog.tsx
|
|
891
869
|
import * as React from "react";
|
|
892
870
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
893
|
-
import { jsx as jsx4, jsxs as
|
|
871
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
894
872
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
895
873
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
896
874
|
var AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
@@ -905,7 +883,7 @@ var AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
905
883
|
}
|
|
906
884
|
));
|
|
907
885
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
908
|
-
var AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
886
|
+
var AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3(AlertDialogPortal, { children: [
|
|
909
887
|
/* @__PURE__ */ jsx4(AlertDialogOverlay, {}),
|
|
910
888
|
/* @__PURE__ */ jsx4(
|
|
911
889
|
AlertDialogPrimitive.Content,
|
|
@@ -1111,7 +1089,7 @@ var mapTscircuitSnippetToSearchResult = (tscircuitSnippet) => {
|
|
|
1111
1089
|
|
|
1112
1090
|
// lib/components/ImportComponentDialog/ImportComponentDialog.tsx
|
|
1113
1091
|
import { createSvgUrl as createPngUrl } from "@tscircuit/create-snippet-url";
|
|
1114
|
-
import { jsx as jsx7, jsxs as
|
|
1092
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1115
1093
|
var ImportComponentDialog = ({
|
|
1116
1094
|
isOpen,
|
|
1117
1095
|
onClose,
|
|
@@ -1173,24 +1151,24 @@ var ImportComponentDialog = ({
|
|
|
1173
1151
|
setDetailsComponent(component);
|
|
1174
1152
|
setDetailsOpen(true);
|
|
1175
1153
|
};
|
|
1176
|
-
return /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1154
|
+
return /* @__PURE__ */ jsxs4(AlertDialog, { open: isOpen, onOpenChange: () => onClose(), children: [
|
|
1155
|
+
/* @__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: [
|
|
1156
|
+
/* @__PURE__ */ jsxs4(AlertDialogHeader, { children: [
|
|
1179
1157
|
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: "Import Component" }),
|
|
1180
1158
|
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "Search for components from tscircuit.com or JLCPCB parts library." })
|
|
1181
1159
|
] }),
|
|
1182
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ jsxs4(
|
|
1183
1161
|
Tabs,
|
|
1184
1162
|
{
|
|
1185
1163
|
value: activeTab,
|
|
1186
1164
|
onValueChange: (value) => setActiveTab(value),
|
|
1187
1165
|
children: [
|
|
1188
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ jsxs4(TabsList, { className: "rf-grid rf-w-full rf-grid-cols-2", children: [
|
|
1189
1167
|
/* @__PURE__ */ jsx7(TabsTrigger, { value: "tscircuit.com", children: "tscircuit.com" }),
|
|
1190
1168
|
/* @__PURE__ */ jsx7(TabsTrigger, { value: "jlcpcb", children: "JLCPCB Parts" })
|
|
1191
1169
|
] }),
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-items-center rf-gap-2 rf-mt-4", children: [
|
|
1171
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-relative rf-flex-grow", children: [
|
|
1194
1172
|
/* @__PURE__ */ jsx7(Search, { className: "rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground" }),
|
|
1195
1173
|
/* @__PURE__ */ jsx7(
|
|
1196
1174
|
Input,
|
|
@@ -1205,15 +1183,15 @@ var ImportComponentDialog = ({
|
|
|
1205
1183
|
] }),
|
|
1206
1184
|
/* @__PURE__ */ jsx7(Button, { onClick: handleSearch, disabled: isLoading, children: isLoading ? /* @__PURE__ */ jsx7(Loader22, { className: "rf-h-4 rf-w-4 rf-animate-spin" }) : "Search" })
|
|
1207
1185
|
] }),
|
|
1208
|
-
/* @__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__ */
|
|
1186
|
+
/* @__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(
|
|
1209
1187
|
"div",
|
|
1210
1188
|
{
|
|
1211
1189
|
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" : ""}`,
|
|
1212
1190
|
onClick: () => setSelectedComponent(result),
|
|
1213
1191
|
children: [
|
|
1214
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1215
1193
|
/* @__PURE__ */ jsx7("div", { className: "rf-font-medium", children: result.name }),
|
|
1216
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-text-sm rf-text-zinc-500", children: [
|
|
1217
1195
|
result.partNumber && /* @__PURE__ */ jsx7("span", { className: "rf-mr-2", children: result.partNumber }),
|
|
1218
1196
|
result.description
|
|
1219
1197
|
] })
|
|
@@ -1233,14 +1211,14 @@ var ImportComponentDialog = ({
|
|
|
1233
1211
|
]
|
|
1234
1212
|
},
|
|
1235
1213
|
result.id
|
|
1236
|
-
)) }) : isLoading ? /* @__PURE__ */
|
|
1214
|
+
)) }) : isLoading ? /* @__PURE__ */ jsxs4("div", { className: "rf-p-8 rf-text-center rf-text-zinc-500", children: [
|
|
1237
1215
|
/* @__PURE__ */ jsx7(Loader22, { className: "rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2" }),
|
|
1238
1216
|
/* @__PURE__ */ jsx7("p", { children: "Searching..." })
|
|
1239
1217
|
] }) : /* @__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" }) })
|
|
1240
1218
|
]
|
|
1241
1219
|
}
|
|
1242
1220
|
),
|
|
1243
|
-
/* @__PURE__ */
|
|
1221
|
+
/* @__PURE__ */ jsxs4(AlertDialogFooter, { children: [
|
|
1244
1222
|
/* @__PURE__ */ jsx7(AlertDialogCancel, { onClick: onClose, children: "Cancel" }),
|
|
1245
1223
|
/* @__PURE__ */ jsx7(
|
|
1246
1224
|
Button,
|
|
@@ -1257,46 +1235,46 @@ var ImportComponentDialog = ({
|
|
|
1257
1235
|
)
|
|
1258
1236
|
] })
|
|
1259
1237
|
] }),
|
|
1260
|
-
/* @__PURE__ */ jsx7(AlertDialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__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: [
|
|
1239
|
+
/* @__PURE__ */ jsxs4(AlertDialogHeader, { children: [
|
|
1262
1240
|
/* @__PURE__ */ jsx7(AlertDialogTitle, { children: detailsComponent?.name }),
|
|
1263
1241
|
/* @__PURE__ */ jsx7(AlertDialogDescription, { children: "Detailed information about the selected component" }),
|
|
1264
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-text-sm rf-text-muted-foreground", children: [
|
|
1265
1243
|
detailsComponent?.partNumber && /* @__PURE__ */ jsx7("div", { className: "rf-font-mono rf-text-sm rf-mb-2", children: detailsComponent.partNumber }),
|
|
1266
1244
|
detailsComponent?.description
|
|
1267
1245
|
] })
|
|
1268
1246
|
] }),
|
|
1269
|
-
detailsComponent?.source === "jlcpcb" && /* @__PURE__ */
|
|
1247
|
+
detailsComponent?.source === "jlcpcb" && /* @__PURE__ */ jsxs4("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
|
|
1270
1248
|
/* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "JLCPCB Details" }),
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
detailsComponent.package && /* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: [
|
|
1250
|
+
detailsComponent.package && /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-flex-col", children: [
|
|
1273
1251
|
/* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Package" }),
|
|
1274
1252
|
/* @__PURE__ */ jsx7("span", { className: "rf-font-medium", children: detailsComponent.package })
|
|
1275
1253
|
] }),
|
|
1276
|
-
detailsComponent.price !== void 0 && /* @__PURE__ */
|
|
1254
|
+
detailsComponent.price !== void 0 && /* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-flex-col", children: [
|
|
1277
1255
|
/* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Price" }),
|
|
1278
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsxs4("span", { className: "rf-font-medium", children: [
|
|
1279
1257
|
"$",
|
|
1280
1258
|
detailsComponent.price.toFixed(4)
|
|
1281
1259
|
] })
|
|
1282
1260
|
] })
|
|
1283
1261
|
] })
|
|
1284
1262
|
] }),
|
|
1285
|
-
detailsComponent?.source === "tscircuit.com" && /* @__PURE__ */
|
|
1263
|
+
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: [
|
|
1286
1264
|
/* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "tscircuit Details" }),
|
|
1287
|
-
/* @__PURE__ */ jsx7("div", { className: "rf-grid rf-grid-cols-2 rf-gap-2", children: detailsComponent.owner && /* @__PURE__ */
|
|
1265
|
+
/* @__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: [
|
|
1288
1266
|
/* @__PURE__ */ jsx7("span", { className: "rf-text-xs rf-text-zinc-500", children: "Owner" }),
|
|
1289
1267
|
/* @__PURE__ */ jsx7("span", { className: "rf-font-medium", children: detailsComponent.owner })
|
|
1290
1268
|
] }) }),
|
|
1291
|
-
detailsComponent.code && /* @__PURE__ */
|
|
1269
|
+
detailsComponent.code && /* @__PURE__ */ jsxs4("div", { className: "rf-mt-2", children: [
|
|
1292
1270
|
/* @__PURE__ */ jsx7("div", { className: "rf-text-xs rf-text-zinc-500 rf-mb-1", children: "Code Preview" }),
|
|
1293
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__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: [
|
|
1294
1272
|
detailsComponent.code.substring(0, 500),
|
|
1295
1273
|
detailsComponent.code.length > 500 && "..."
|
|
1296
1274
|
] })
|
|
1297
1275
|
] })
|
|
1298
1276
|
] }),
|
|
1299
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-my-4 rf-border rf-rounded-md rf-p-4", children: [
|
|
1300
1278
|
/* @__PURE__ */ jsx7("div", { className: "rf-text-sm rf-font-medium rf-mb-2", children: "Preview" }),
|
|
1301
1279
|
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(
|
|
1302
1280
|
"img",
|
|
@@ -1307,8 +1285,8 @@ var ImportComponentDialog = ({
|
|
|
1307
1285
|
}
|
|
1308
1286
|
) }) }) : /* @__PURE__ */ jsx7("div", { className: "rf-text-center rf-text-zinc-500 rf-p-4", children: "No preview available" })
|
|
1309
1287
|
] }),
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ jsxs4("div", { className: "rf-flex rf-justify-between", children: [
|
|
1289
|
+
/* @__PURE__ */ jsxs4(
|
|
1312
1290
|
Button,
|
|
1313
1291
|
{
|
|
1314
1292
|
variant: "outline",
|
|
@@ -1447,6 +1425,7 @@ import { fetchEasyEDAComponent, convertRawEasyToTsx } from "easyeda/browser";
|
|
|
1447
1425
|
import ky from "ky";
|
|
1448
1426
|
var importComponentFromJlcpcb = async (jlcpcbPartNumber) => {
|
|
1449
1427
|
const component = await fetchEasyEDAComponent(jlcpcbPartNumber, {
|
|
1428
|
+
// @ts-ignore
|
|
1450
1429
|
fetch: (url, options) => {
|
|
1451
1430
|
return fetch(`${API_BASE}/proxy`, {
|
|
1452
1431
|
...options,
|
|
@@ -1490,7 +1469,7 @@ import { QueryClient, QueryClientProvider } from "react-query";
|
|
|
1490
1469
|
import { MapPin } from "lucide-react";
|
|
1491
1470
|
import { useState as useState6 } from "react";
|
|
1492
1471
|
import { toast as toast2 } from "react-hot-toast";
|
|
1493
|
-
import { jsx as jsx8, jsxs as
|
|
1472
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1494
1473
|
var CheckoutOrder = ({
|
|
1495
1474
|
finalCost,
|
|
1496
1475
|
onConfirmCheckout,
|
|
@@ -1558,14 +1537,14 @@ var CheckoutOrder = ({
|
|
|
1558
1537
|
toast2.success("Your PCB order has been placed successfully.");
|
|
1559
1538
|
onConfirmCheckout();
|
|
1560
1539
|
};
|
|
1561
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ jsxs5("div", { className: "rf-bg-white rf-rounded-xl rf-p-6 rf-mx-auto", children: [
|
|
1562
1541
|
/* @__PURE__ */ jsx8("h2", { className: "rf-text-2xl rf-font-bold rf-mb-6", children: "Checkout" }),
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-grid rf-grid-cols-1 md:rf-grid-cols-2 rf-gap-8", children: [
|
|
1543
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-6", children: [
|
|
1565
1544
|
/* @__PURE__ */ jsx8("h3", { className: "rf-text-lg rf-font-semibold", children: "Shipping Address" }),
|
|
1566
|
-
savedAddresses.length > 0 && /* @__PURE__ */
|
|
1545
|
+
savedAddresses.length > 0 && /* @__PURE__ */ jsxs5("div", { className: "rf-space-y-4", children: [
|
|
1567
1546
|
/* @__PURE__ */ jsx8("div", { className: "rf-text-sm rf-font-medium rf-text-gray-500", children: "Saved Addresses" }),
|
|
1568
|
-
/* @__PURE__ */ jsx8("div", { className: "rf-flex rf-flex-wrap rf-gap-3", children: savedAddresses.map((address) => /* @__PURE__ */
|
|
1547
|
+
/* @__PURE__ */ jsx8("div", { className: "rf-flex rf-flex-wrap rf-gap-3", children: savedAddresses.map((address) => /* @__PURE__ */ jsxs5(
|
|
1569
1548
|
"button",
|
|
1570
1549
|
{
|
|
1571
1550
|
type: "button",
|
|
@@ -1583,8 +1562,8 @@ var CheckoutOrder = ({
|
|
|
1583
1562
|
address.id
|
|
1584
1563
|
)) })
|
|
1585
1564
|
] }),
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */ jsx8("div", { className: "rf-grid rf-grid-cols-2 rf-gap-4", children: /* @__PURE__ */
|
|
1565
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-4", children: [
|
|
1566
|
+
/* @__PURE__ */ jsx8("div", { className: "rf-grid rf-grid-cols-2 rf-gap-4", children: /* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1588
1567
|
/* @__PURE__ */ jsx8("label", { htmlFor: "name", children: "Address Name" }),
|
|
1589
1568
|
/* @__PURE__ */ jsx8(
|
|
1590
1569
|
Input,
|
|
@@ -1597,7 +1576,7 @@ var CheckoutOrder = ({
|
|
|
1597
1576
|
}
|
|
1598
1577
|
)
|
|
1599
1578
|
] }) }),
|
|
1600
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1601
1580
|
/* @__PURE__ */ jsx8("label", { htmlFor: "street", children: "Street Address" }),
|
|
1602
1581
|
/* @__PURE__ */ jsx8(
|
|
1603
1582
|
Input,
|
|
@@ -1610,8 +1589,8 @@ var CheckoutOrder = ({
|
|
|
1610
1589
|
}
|
|
1611
1590
|
)
|
|
1612
1591
|
] }),
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-grid rf-grid-cols-2 rf-gap-4", children: [
|
|
1593
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1615
1594
|
/* @__PURE__ */ jsx8("label", { htmlFor: "city", children: "City" }),
|
|
1616
1595
|
/* @__PURE__ */ jsx8(
|
|
1617
1596
|
Input,
|
|
@@ -1624,7 +1603,7 @@ var CheckoutOrder = ({
|
|
|
1624
1603
|
}
|
|
1625
1604
|
)
|
|
1626
1605
|
] }),
|
|
1627
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1628
1607
|
/* @__PURE__ */ jsx8("label", { htmlFor: "state", children: "State" }),
|
|
1629
1608
|
/* @__PURE__ */ jsx8(
|
|
1630
1609
|
Input,
|
|
@@ -1638,8 +1617,8 @@ var CheckoutOrder = ({
|
|
|
1638
1617
|
)
|
|
1639
1618
|
] })
|
|
1640
1619
|
] }),
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-grid rf-grid-cols-2 rf-gap-4", children: [
|
|
1621
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1643
1622
|
/* @__PURE__ */ jsx8("label", { htmlFor: "zipCode", children: "Zip Code" }),
|
|
1644
1623
|
/* @__PURE__ */ jsx8(
|
|
1645
1624
|
Input,
|
|
@@ -1652,7 +1631,7 @@ var CheckoutOrder = ({
|
|
|
1652
1631
|
}
|
|
1653
1632
|
)
|
|
1654
1633
|
] }),
|
|
1655
|
-
/* @__PURE__ */
|
|
1634
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-2", children: [
|
|
1656
1635
|
/* @__PURE__ */ jsx8("label", { htmlFor: "country", children: "Country" }),
|
|
1657
1636
|
/* @__PURE__ */ jsx8(
|
|
1658
1637
|
Input,
|
|
@@ -1668,42 +1647,42 @@ var CheckoutOrder = ({
|
|
|
1668
1647
|
] })
|
|
1669
1648
|
] })
|
|
1670
1649
|
] }),
|
|
1671
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-bg-gray-50 rf-p-6 rf-rounded-lg", children: [
|
|
1672
1651
|
/* @__PURE__ */ jsx8("h3", { className: "rf-text-lg rf-font-semibold rf-mb-4", children: "Order Summary" }),
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-space-y-4", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200", children: [
|
|
1675
1654
|
/* @__PURE__ */ jsx8("span", { className: "rf-text-gray-600", children: "PCB Manufacturing" }),
|
|
1676
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ jsxs5("span", { className: "rf-font-medium", children: [
|
|
1677
1656
|
"$",
|
|
1678
1657
|
(finalCost * 0.6).toFixed(2)
|
|
1679
1658
|
] })
|
|
1680
1659
|
] }),
|
|
1681
|
-
/* @__PURE__ */
|
|
1660
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200", children: [
|
|
1682
1661
|
/* @__PURE__ */ jsx8("span", { className: "rf-text-gray-600", children: "Components" }),
|
|
1683
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ jsxs5("span", { className: "rf-font-medium", children: [
|
|
1684
1663
|
"$",
|
|
1685
1664
|
(finalCost * 0.3).toFixed(2)
|
|
1686
1665
|
] })
|
|
1687
1666
|
] }),
|
|
1688
|
-
/* @__PURE__ */
|
|
1667
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200", children: [
|
|
1689
1668
|
/* @__PURE__ */ jsx8("span", { className: "rf-text-gray-600", children: "Assembly" }),
|
|
1690
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ jsxs5("span", { className: "rf-font-medium", children: [
|
|
1691
1670
|
"$",
|
|
1692
1671
|
(finalCost * 0.1).toFixed(2)
|
|
1693
1672
|
] })
|
|
1694
1673
|
] }),
|
|
1695
|
-
/* @__PURE__ */
|
|
1674
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200", children: [
|
|
1696
1675
|
/* @__PURE__ */ jsx8("span", { className: "rf-text-gray-600", children: "Shipping" }),
|
|
1697
1676
|
/* @__PURE__ */ jsx8("span", { className: "rf-font-medium", children: "$15.00" })
|
|
1698
1677
|
] }),
|
|
1699
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-flex rf-justify-between rf-py-2 rf-text-lg rf-font-bold", children: [
|
|
1700
1679
|
/* @__PURE__ */ jsx8("span", { children: "Total" }),
|
|
1701
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ jsxs5("span", { children: [
|
|
1702
1681
|
"$",
|
|
1703
1682
|
(finalCost + 15).toFixed(2)
|
|
1704
1683
|
] })
|
|
1705
1684
|
] }),
|
|
1706
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsxs5("div", { className: "rf-pt-4", children: [
|
|
1707
1686
|
/* @__PURE__ */ jsx8(
|
|
1708
1687
|
Button,
|
|
1709
1688
|
{
|
|
@@ -1732,10 +1711,10 @@ var CheckoutOrder = ({
|
|
|
1732
1711
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1733
1712
|
import { Check as Check2, ChevronDown, ChevronUp } from "lucide-react";
|
|
1734
1713
|
import * as React5 from "react";
|
|
1735
|
-
import { jsx as jsx9, jsxs as
|
|
1714
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1736
1715
|
var Select = SelectPrimitive.Root;
|
|
1737
1716
|
var SelectValue = SelectPrimitive.Value;
|
|
1738
|
-
var SelectTrigger = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1717
|
+
var SelectTrigger = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
1739
1718
|
SelectPrimitive.Trigger,
|
|
1740
1719
|
{
|
|
1741
1720
|
ref,
|
|
@@ -1777,7 +1756,7 @@ var SelectScrollDownButton = React5.forwardRef(({ className, ...props }, ref) =>
|
|
|
1777
1756
|
}
|
|
1778
1757
|
));
|
|
1779
1758
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1780
|
-
var SelectContent = React5.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx9(SelectPrimitive.Portal, { children: /* @__PURE__ */
|
|
1759
|
+
var SelectContent = React5.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx9(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs6(
|
|
1781
1760
|
SelectPrimitive.Content,
|
|
1782
1761
|
{
|
|
1783
1762
|
ref,
|
|
@@ -1817,7 +1796,7 @@ var SelectLabel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1817
1796
|
}
|
|
1818
1797
|
));
|
|
1819
1798
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1820
|
-
var SelectItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1799
|
+
var SelectItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
1821
1800
|
SelectPrimitive.Item,
|
|
1822
1801
|
{
|
|
1823
1802
|
ref,
|
|
@@ -1862,7 +1841,7 @@ function Skeleton({
|
|
|
1862
1841
|
import { ArrowDown } from "lucide-react";
|
|
1863
1842
|
import { useEffect as useEffect7 } from "react";
|
|
1864
1843
|
import { useState as useState7 } from "react";
|
|
1865
|
-
import { jsx as jsx11, jsxs as
|
|
1844
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1866
1845
|
var InitialOrderScreen = ({
|
|
1867
1846
|
onCancel,
|
|
1868
1847
|
onContinue
|
|
@@ -1894,9 +1873,9 @@ var InitialOrderScreen = ({
|
|
|
1894
1873
|
setIsLoading(false);
|
|
1895
1874
|
}, 1500);
|
|
1896
1875
|
};
|
|
1897
|
-
return /* @__PURE__ */
|
|
1876
|
+
return /* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-flex-col rf-bg-white rf-rounded-xl rf-p-8 rf-max-w-md rf-w-full rf-mx-auto", children: [
|
|
1898
1877
|
/* @__PURE__ */ jsx11("h2", { className: "rf-text-3xl rf-font-bold rf-text-center rf-mb-8", children: "Order PCB" }),
|
|
1899
|
-
/* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsxs7("div", { className: "rf-mb-8", children: [
|
|
1900
1879
|
/* @__PURE__ */ jsx11(
|
|
1901
1880
|
"label",
|
|
1902
1881
|
{
|
|
@@ -1905,7 +1884,7 @@ var InitialOrderScreen = ({
|
|
|
1905
1884
|
children: "Select Product Category"
|
|
1906
1885
|
}
|
|
1907
1886
|
),
|
|
1908
|
-
/* @__PURE__ */
|
|
1887
|
+
/* @__PURE__ */ jsxs7(
|
|
1909
1888
|
Select,
|
|
1910
1889
|
{
|
|
1911
1890
|
onValueChange: handleSelectCategory,
|
|
@@ -1917,22 +1896,22 @@ var InitialOrderScreen = ({
|
|
|
1917
1896
|
}
|
|
1918
1897
|
)
|
|
1919
1898
|
] }),
|
|
1920
|
-
isLoading ? /* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
1899
|
+
isLoading ? /* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-flex-col rf-items-center rf-mb-8", children: [
|
|
1900
|
+
/* @__PURE__ */ jsxs7("div", { className: "rf-animate-pulse rf-flex rf-space-x-2 rf-items-center rf-mb-3", children: [
|
|
1922
1901
|
/* @__PURE__ */ jsx11(ArrowDown, { className: "rf-h-5 rf-w-5 rf-text-gray-400" }),
|
|
1923
1902
|
/* @__PURE__ */ jsx11("span", { className: "rf-text-gray-500", children: "Fetching estimate..." })
|
|
1924
1903
|
] }),
|
|
1925
1904
|
/* @__PURE__ */ jsx11(Skeleton, { className: "rf-h-6 rf-w-3/4 rf-mb-2" }),
|
|
1926
1905
|
/* @__PURE__ */ jsx11(Skeleton, { className: "rf-h-6 rf-w-1/2" })
|
|
1927
|
-
] }) : estimatedCost !== null ? /* @__PURE__ */
|
|
1906
|
+
] }) : estimatedCost !== null ? /* @__PURE__ */ jsxs7("div", { className: "rf-bg-gray-50 rf-p-4 rf-rounded-lg rf-mb-8", children: [
|
|
1928
1907
|
/* @__PURE__ */ jsx11("p", { className: "rf-text-sm rf-text-gray-600 rf-mb-2", children: "Estimated Cost:" }),
|
|
1929
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ jsxs7("p", { className: "rf-text-2xl rf-font-bold rf-text-gray-900", children: [
|
|
1930
1909
|
"$",
|
|
1931
1910
|
estimatedCost.toFixed(2)
|
|
1932
1911
|
] }),
|
|
1933
1912
|
/* @__PURE__ */ jsx11("p", { className: "rf-text-xs rf-text-gray-500 rf-mt-1", children: "Pricing may vary based on specifications" })
|
|
1934
1913
|
] }) : null,
|
|
1935
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ jsxs7("div", { className: "rf-flex rf-justify-between rf-mt-auto", children: [
|
|
1936
1915
|
/* @__PURE__ */ jsx11(
|
|
1937
1916
|
Button,
|
|
1938
1917
|
{
|
|
@@ -2050,7 +2029,7 @@ var orderSteps = [
|
|
|
2050
2029
|
}));
|
|
2051
2030
|
|
|
2052
2031
|
// lib/components/OrderDialog/StepwiseProgress.tsx
|
|
2053
|
-
import { jsx as jsx13, jsxs as
|
|
2032
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2054
2033
|
var StepwiseProgressPanel = ({
|
|
2055
2034
|
orderId,
|
|
2056
2035
|
title = "Order PCB",
|
|
@@ -2095,10 +2074,10 @@ var StepwiseProgressPanel = ({
|
|
|
2095
2074
|
const totalSteps = steps.length;
|
|
2096
2075
|
const progress = Math.round(completedSteps.length / totalSteps * 100);
|
|
2097
2076
|
const loading = isLoading || externalLoading;
|
|
2098
|
-
return /* @__PURE__ */
|
|
2099
|
-
/* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-flex-col rf-bg-white rf-rounded-xl rf-p-6 rf-max-w-xl rf-w-full rf-mx-auto", children: [
|
|
2078
|
+
/* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-items-center rf-justify-between rf-mb-6", children: [
|
|
2100
2079
|
/* @__PURE__ */ jsx13("h2", { className: "rf-text-2xl rf-font-bold", children: title }),
|
|
2101
|
-
/* @__PURE__ */
|
|
2080
|
+
/* @__PURE__ */ jsxs8("div", { className: "rf-text-sm rf-text-muted-foreground", children: [
|
|
2102
2081
|
completedSteps.length,
|
|
2103
2082
|
" of ",
|
|
2104
2083
|
totalSteps,
|
|
@@ -2106,12 +2085,12 @@ var StepwiseProgressPanel = ({
|
|
|
2106
2085
|
] })
|
|
2107
2086
|
] }),
|
|
2108
2087
|
/* @__PURE__ */ jsx13(Progress, { value: progress, className: "rf-h-2 rf-mb-8" }),
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
lastCompletedStep && /* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ jsxs8("div", { className: "rf-space-y-6 rf-mb-8", children: [
|
|
2089
|
+
lastCompletedStep && /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-items-start rf-gap-4", children: [
|
|
2111
2090
|
/* @__PURE__ */ jsx13("div", { className: "rf-flex-shrink-0 rf-mt-0.5", children: /* @__PURE__ */ jsx13("div", { className: "rf-w-8 rf-h-8 rf-rounded-full rf-bg-green-100 rf-flex rf-items-center rf-justify-center", children: /* @__PURE__ */ jsx13(Check3, { className: "rf-h-5 rf-w-5 rf-text-green-600" }) }) }),
|
|
2112
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ jsxs8("div", { className: "rf-flex-1", children: [
|
|
2113
2092
|
/* @__PURE__ */ jsx13("p", { className: "rf-text-sm rf-font-medium rf-text-muted-foreground", children: "Last Completed" }),
|
|
2114
|
-
/* @__PURE__ */
|
|
2093
|
+
/* @__PURE__ */ jsxs8("p", { className: "rf-font-medium rf-text-green-600", children: [
|
|
2115
2094
|
lastCompletedStep.order_step_id,
|
|
2116
2095
|
". ",
|
|
2117
2096
|
lastCompletedStep.title
|
|
@@ -2119,11 +2098,11 @@ var StepwiseProgressPanel = ({
|
|
|
2119
2098
|
] })
|
|
2120
2099
|
] }),
|
|
2121
2100
|
lastCompletedStep && activeStep && /* @__PURE__ */ jsx13("div", { className: "rf-pl-4", children: /* @__PURE__ */ jsx13(ArrowDown2, { className: "rf-h-5 rf-w-5 rf-text-muted-foreground" }) }),
|
|
2122
|
-
activeStep && /* @__PURE__ */
|
|
2101
|
+
activeStep && /* @__PURE__ */ jsxs8("div", { className: "rf-flex rf-items-start rf-gap-4", children: [
|
|
2123
2102
|
/* @__PURE__ */ jsx13("div", { className: "rf-flex-shrink-0 rf-mt-0.5", children: /* @__PURE__ */ jsx13("div", { className: "rf-w-8 rf-h-8 rf-rounded-full rf-bg-blue-100 rf-flex rf-items-center rf-justify-center", children: loading ? /* @__PURE__ */ jsx13(Loader23, { className: "rf-h-5 rf-w-5 rf-text-blue-600 rf-animate-spin" }) : /* @__PURE__ */ jsx13("div", { className: "rf-h-2.5 rf-w-2.5 rf-rounded-full rf-bg-blue-600" }) }) }),
|
|
2124
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ jsxs8("div", { className: "rf-flex-1", children: [
|
|
2125
2104
|
/* @__PURE__ */ jsx13("p", { className: "rf-text-sm rf-font-medium rf-text-muted-foreground", children: "Current Step" }),
|
|
2126
|
-
/* @__PURE__ */
|
|
2105
|
+
/* @__PURE__ */ jsxs8("p", { className: "rf-font-medium rf-text-blue-600", children: [
|
|
2127
2106
|
activeStep.order_step_id,
|
|
2128
2107
|
". ",
|
|
2129
2108
|
activeStep.title
|
|
@@ -2136,7 +2115,7 @@ var StepwiseProgressPanel = ({
|
|
|
2136
2115
|
};
|
|
2137
2116
|
|
|
2138
2117
|
// lib/components/OrderDialog/OrderDialog.tsx
|
|
2139
|
-
import { jsx as jsx14, jsxs as
|
|
2118
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2140
2119
|
var queryClient = new QueryClient();
|
|
2141
2120
|
var OrderDialog = ({
|
|
2142
2121
|
isOpen,
|
|
@@ -2163,7 +2142,7 @@ var OrderDialog = ({
|
|
|
2163
2142
|
setOrder(order2);
|
|
2164
2143
|
setStage("progress");
|
|
2165
2144
|
};
|
|
2166
|
-
return /* @__PURE__ */ jsx14(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx14(AlertDialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx14(AlertDialogContent, { className: "!rf-max-w-[660px] !rf-p-0", children: /* @__PURE__ */
|
|
2145
|
+
return /* @__PURE__ */ jsx14(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx14(AlertDialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx14(AlertDialogContent, { className: "!rf-max-w-[660px] !rf-p-0", children: /* @__PURE__ */ jsxs9("div", { className: "rf-relative rf-w-full", children: [
|
|
2167
2146
|
stage === "initial" && /* @__PURE__ */ jsx14(
|
|
2168
2147
|
InitialOrderScreen,
|
|
2169
2148
|
{
|
|
@@ -2251,7 +2230,7 @@ var useOrderDialog = () => {
|
|
|
2251
2230
|
};
|
|
2252
2231
|
|
|
2253
2232
|
// lib/components/RunFrameForCli/LeftHeader.tsx
|
|
2254
|
-
import { Fragment as Fragment2, jsx as jsx17, jsxs as
|
|
2233
|
+
import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2255
2234
|
var RunframeCliLeftHeader = (props) => {
|
|
2256
2235
|
const lastRunEvalVersion = useRunnerStore((s) => s.lastRunEvalVersion);
|
|
2257
2236
|
const [snippetName, setSnippetName] = useState10(null);
|
|
@@ -2342,10 +2321,10 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2342
2321
|
};
|
|
2343
2322
|
const circuitJson = useRunFrameStore((state) => state.circuitJson);
|
|
2344
2323
|
const [isImportDialogOpen, setIsImportDialogOpen] = useState10(false);
|
|
2345
|
-
return /* @__PURE__ */
|
|
2346
|
-
/* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
2325
|
+
/* @__PURE__ */ jsxs10(DropdownMenu, { children: [
|
|
2347
2326
|
/* @__PURE__ */ jsx17(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx17("div", { className: "rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative", children: "File" }) }),
|
|
2348
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsxs10(DropdownMenuContent, { children: [
|
|
2349
2328
|
/* @__PURE__ */ jsx17(
|
|
2350
2329
|
DropdownMenuItem,
|
|
2351
2330
|
{
|
|
@@ -2374,7 +2353,7 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2374
2353
|
children: "Import"
|
|
2375
2354
|
}
|
|
2376
2355
|
),
|
|
2377
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ jsxs10(DropdownMenuSub, { children: [
|
|
2378
2357
|
/* @__PURE__ */ jsx17(
|
|
2379
2358
|
DropdownMenuSubTrigger,
|
|
2380
2359
|
{
|
|
@@ -2403,10 +2382,10 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2403
2382
|
i
|
|
2404
2383
|
)) }) })
|
|
2405
2384
|
] }),
|
|
2406
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ jsxs10(DropdownMenuSub, { children: [
|
|
2407
2386
|
/* @__PURE__ */ jsx17(DropdownMenuSubTrigger, { className: "rf-text-xs", children: "Advanced" }),
|
|
2408
|
-
/* @__PURE__ */ jsx17(DropdownMenuPortal, { children: /* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */ jsx17(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsx17(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs10(DropdownMenuSubContent, { children: [
|
|
2388
|
+
/* @__PURE__ */ jsx17(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
|
|
2410
2389
|
/* @__PURE__ */ jsx17(
|
|
2411
2390
|
Checkbox,
|
|
2412
2391
|
{
|
|
@@ -2426,7 +2405,7 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2426
2405
|
}
|
|
2427
2406
|
)
|
|
2428
2407
|
] }) }),
|
|
2429
|
-
lastRunEvalVersion && /* @__PURE__ */ jsx17(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx17("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */
|
|
2408
|
+
lastRunEvalVersion && /* @__PURE__ */ jsx17(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx17("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("span", { className: "rf-text-xs", children: [
|
|
2430
2409
|
"@tscircuit/eval@",
|
|
2431
2410
|
lastRunEvalVersion
|
|
2432
2411
|
] }) }) }),
|
|
@@ -2443,8 +2422,8 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2443
2422
|
] }) })
|
|
2444
2423
|
] })
|
|
2445
2424
|
] }),
|
|
2446
|
-
/* @__PURE__ */ jsx17(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */
|
|
2447
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx17(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */ jsxs10(AlertDialogContent, { children: [
|
|
2426
|
+
/* @__PURE__ */ jsxs10(AlertDialogHeader, { children: [
|
|
2448
2427
|
/* @__PURE__ */ jsx17(AlertDialogTitle, { children: "Error Saving Snippet" }),
|
|
2449
2428
|
/* @__PURE__ */ jsx17(AlertDialogDescription, { children: errorMessage })
|
|
2450
2429
|
] }),
|
|
@@ -2512,7 +2491,7 @@ var RunframeCliLeftHeader = (props) => {
|
|
|
2512
2491
|
};
|
|
2513
2492
|
|
|
2514
2493
|
// lib/components/RunFrameForCli/RunFrameForCli.tsx
|
|
2515
|
-
import { jsx as jsx18, jsxs as
|
|
2494
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2516
2495
|
var RunFrameForCli = (props) => {
|
|
2517
2496
|
const [shouldLoadLatestEval, setLoadLatestEval] = useLocalStorageState(
|
|
2518
2497
|
"load-latest-eval",
|
|
@@ -2525,7 +2504,7 @@ var RunFrameForCli = (props) => {
|
|
|
2525
2504
|
forceLatestEvalVersion: shouldLoadLatestEval,
|
|
2526
2505
|
defaultToFullScreen: true,
|
|
2527
2506
|
showToggleFullScreen: false,
|
|
2528
|
-
leftHeaderContent: /* @__PURE__ */
|
|
2507
|
+
leftHeaderContent: /* @__PURE__ */ jsxs11("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
|
|
2529
2508
|
/* @__PURE__ */ jsx18(
|
|
2530
2509
|
RunframeCliLeftHeader,
|
|
2531
2510
|
{
|