@tscircuit/runframe 0.0.307 → 0.0.308

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
@@ -1936,14 +1936,11 @@ var OrderDialog = ({
1936
1936
  isOpen,
1937
1937
  onClose,
1938
1938
  stage,
1939
- setStage
1939
+ setStage,
1940
+ circuitJson
1940
1941
  }) => {
1941
1942
  const [order, setOrder] = useState7(null);
1942
1943
  const [loading, setLoading] = useState7(false);
1943
- const circuitJson = useRunFrameStore((state) => state.circuitJson);
1944
- const simulateScenarioOrder = useRunFrameStore(
1945
- (state) => state.simulateScenarioOrder
1946
- );
1947
1944
  const createOrder = async () => {
1948
1945
  const { order: order2 } = await ky3.post("registry/orders/create", {
1949
1946
  json: {
@@ -1988,16 +1985,37 @@ var OrderDialog = ({
1988
1985
  ] }) }) }) });
1989
1986
  };
1990
1987
 
1991
- // lib/components/OrderDialog/useOrderDialog.tsx
1988
+ // lib/components/OrderDialog/CliOrderDialog.tsx
1992
1989
  import { jsx as jsx13 } from "react/jsx-runtime";
1993
- var OrderDialogComponent = ({
1990
+ var CliOrderDialog = ({
1994
1991
  isOpen,
1995
1992
  onClose,
1996
1993
  stage,
1997
1994
  setStage
1998
1995
  }) => {
1996
+ const circuitJson = useRunFrameStore((state) => state.circuitJson);
1999
1997
  return /* @__PURE__ */ jsx13(
2000
1998
  OrderDialog,
1999
+ {
2000
+ isOpen,
2001
+ onClose,
2002
+ stage,
2003
+ setStage,
2004
+ circuitJson
2005
+ }
2006
+ );
2007
+ };
2008
+
2009
+ // lib/components/OrderDialog/useOrderDialog.tsx
2010
+ import { jsx as jsx14 } from "react/jsx-runtime";
2011
+ var OrderDialogComponent = ({
2012
+ isOpen,
2013
+ onClose,
2014
+ stage,
2015
+ setStage
2016
+ }) => {
2017
+ return /* @__PURE__ */ jsx14(
2018
+ CliOrderDialog,
2001
2019
  {
2002
2020
  isOpen,
2003
2021
  onClose,
@@ -2027,7 +2045,7 @@ var useOrderDialog = () => {
2027
2045
  };
2028
2046
 
2029
2047
  // lib/components/RunFrameForCli/LeftHeader.tsx
2030
- import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2048
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
2031
2049
  var RunframeCliLeftHeader = (props) => {
2032
2050
  const lastRunEvalVersion = useRunnerStore((s) => s.lastRunEvalVersion);
2033
2051
  const [snippetName, setSnippetName] = useState9(null);
@@ -2120,9 +2138,9 @@ var RunframeCliLeftHeader = (props) => {
2120
2138
  const [isImportDialogOpen, setIsImportDialogOpen] = useState9(false);
2121
2139
  return /* @__PURE__ */ jsxs10(Fragment2, { children: [
2122
2140
  /* @__PURE__ */ jsxs10(DropdownMenu, { children: [
2123
- /* @__PURE__ */ jsx14(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx14("div", { className: "rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative", children: "File" }) }),
2141
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx15("div", { className: "rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative", children: "File" }) }),
2124
2142
  /* @__PURE__ */ jsxs10(DropdownMenuContent, { children: [
2125
- /* @__PURE__ */ jsx14(
2143
+ /* @__PURE__ */ jsx15(
2126
2144
  DropdownMenuItem,
2127
2145
  {
2128
2146
  className: "rf-text-xs",
@@ -2131,7 +2149,7 @@ var RunframeCliLeftHeader = (props) => {
2131
2149
  children: isSaving ? "Saving..." : "Push"
2132
2150
  }
2133
2151
  ),
2134
- parseInt(window.location.port) > 5e3 && /* @__PURE__ */ jsx14(
2152
+ parseInt(window.location.port) > 5e3 && /* @__PURE__ */ jsx15(
2135
2153
  DropdownMenuItem,
2136
2154
  {
2137
2155
  className: "rf-text-xs",
@@ -2141,7 +2159,7 @@ var RunframeCliLeftHeader = (props) => {
2141
2159
  children: "Order"
2142
2160
  }
2143
2161
  ),
2144
- /* @__PURE__ */ jsx14(
2162
+ /* @__PURE__ */ jsx15(
2145
2163
  DropdownMenuItem,
2146
2164
  {
2147
2165
  className: "rf-text-xs",
@@ -2151,7 +2169,7 @@ var RunframeCliLeftHeader = (props) => {
2151
2169
  }
2152
2170
  ),
2153
2171
  /* @__PURE__ */ jsxs10(DropdownMenuSub, { children: [
2154
- /* @__PURE__ */ jsx14(
2172
+ /* @__PURE__ */ jsx15(
2155
2173
  DropdownMenuSubTrigger,
2156
2174
  {
2157
2175
  className: "rf-text-xs",
@@ -2159,7 +2177,7 @@ var RunframeCliLeftHeader = (props) => {
2159
2177
  children: isExporting ? "Exporting..." : "Export"
2160
2178
  }
2161
2179
  ),
2162
- /* @__PURE__ */ jsx14(DropdownMenuPortal, { children: /* @__PURE__ */ jsx14(DropdownMenuSubContent, { children: availableExports.map((exp, i) => /* @__PURE__ */ jsx14(
2180
+ /* @__PURE__ */ jsx15(DropdownMenuPortal, { children: /* @__PURE__ */ jsx15(DropdownMenuSubContent, { children: availableExports.map((exp, i) => /* @__PURE__ */ jsx15(
2163
2181
  DropdownMenuItem,
2164
2182
  {
2165
2183
  onSelect: () => {
@@ -2174,16 +2192,16 @@ var RunframeCliLeftHeader = (props) => {
2174
2192
  });
2175
2193
  },
2176
2194
  disabled: isExporting,
2177
- children: /* @__PURE__ */ jsx14("span", { className: "rf-text-xs", children: exp.name })
2195
+ children: /* @__PURE__ */ jsx15("span", { className: "rf-text-xs", children: exp.name })
2178
2196
  },
2179
2197
  i
2180
2198
  )) }) })
2181
2199
  ] }),
2182
2200
  /* @__PURE__ */ jsxs10(DropdownMenuSub, { children: [
2183
- /* @__PURE__ */ jsx14(DropdownMenuSubTrigger, { className: "rf-text-xs", children: "Advanced" }),
2184
- /* @__PURE__ */ jsx14(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs10(DropdownMenuSubContent, { children: [
2185
- /* @__PURE__ */ jsx14(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
2186
- /* @__PURE__ */ jsx14(
2201
+ /* @__PURE__ */ jsx15(DropdownMenuSubTrigger, { className: "rf-text-xs", children: "Advanced" }),
2202
+ /* @__PURE__ */ jsx15(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs10(DropdownMenuSubContent, { children: [
2203
+ /* @__PURE__ */ jsx15(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
2204
+ /* @__PURE__ */ jsx15(
2187
2205
  Checkbox,
2188
2206
  {
2189
2207
  id: "load-latest-eval",
@@ -2193,7 +2211,7 @@ var RunframeCliLeftHeader = (props) => {
2193
2211
  }
2194
2212
  }
2195
2213
  ),
2196
- /* @__PURE__ */ jsx14(
2214
+ /* @__PURE__ */ jsx15(
2197
2215
  "label",
2198
2216
  {
2199
2217
  htmlFor: "load-latest-eval",
@@ -2202,31 +2220,31 @@ var RunframeCliLeftHeader = (props) => {
2202
2220
  }
2203
2221
  )
2204
2222
  ] }) }),
2205
- lastRunEvalVersion && /* @__PURE__ */ jsx14(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx14("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("span", { className: "rf-text-xs", children: [
2223
+ lastRunEvalVersion && /* @__PURE__ */ jsx15(DropdownMenuItem, { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx15("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsxs10("span", { className: "rf-text-xs", children: [
2206
2224
  "@tscircuit/eval@",
2207
2225
  lastRunEvalVersion
2208
2226
  ] }) }) }),
2209
- /* @__PURE__ */ jsx14(
2227
+ /* @__PURE__ */ jsx15(
2210
2228
  DropdownMenuItem,
2211
2229
  {
2212
2230
  className: "rf-flex rf-items-center rf-gap-2",
2213
2231
  onClick: () => {
2214
2232
  window.open("/api/admin", "_blank");
2215
2233
  },
2216
- children: /* @__PURE__ */ jsx14("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx14("span", { className: "rf-text-xs", children: "CLI Admin Panel" }) })
2234
+ children: /* @__PURE__ */ jsx15("div", { className: "rf-flex rf-items-center rf-gap-2", children: /* @__PURE__ */ jsx15("span", { className: "rf-text-xs", children: "CLI Admin Panel" }) })
2217
2235
  }
2218
2236
  )
2219
2237
  ] }) })
2220
2238
  ] })
2221
2239
  ] }),
2222
- /* @__PURE__ */ jsx14(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */ jsxs10(AlertDialogContent, { children: [
2240
+ /* @__PURE__ */ jsx15(AlertDialog, { open: isError, onOpenChange: setIsError, children: /* @__PURE__ */ jsxs10(AlertDialogContent, { children: [
2223
2241
  /* @__PURE__ */ jsxs10(AlertDialogHeader, { children: [
2224
- /* @__PURE__ */ jsx14(AlertDialogTitle, { children: "Error Saving Snippet" }),
2225
- /* @__PURE__ */ jsx14(AlertDialogDescription, { children: errorMessage })
2242
+ /* @__PURE__ */ jsx15(AlertDialogTitle, { children: "Error Saving Snippet" }),
2243
+ /* @__PURE__ */ jsx15(AlertDialogDescription, { children: errorMessage })
2226
2244
  ] }),
2227
- /* @__PURE__ */ jsx14(AlertDialogFooter, { children: /* @__PURE__ */ jsx14(AlertDialogCancel, { onClick: () => setIsError(false), children: "Dismiss" }) })
2245
+ /* @__PURE__ */ jsx15(AlertDialogFooter, { children: /* @__PURE__ */ jsx15(AlertDialogCancel, { onClick: () => setIsError(false), children: "Dismiss" }) })
2228
2246
  ] }) }),
2229
- /* @__PURE__ */ jsx14(
2247
+ /* @__PURE__ */ jsx15(
2230
2248
  SelectSnippetDialog,
2231
2249
  {
2232
2250
  snippetNames: availableSnippets ?? [],
@@ -2245,7 +2263,7 @@ var RunframeCliLeftHeader = (props) => {
2245
2263
  }
2246
2264
  )
2247
2265
  ] }),
2248
- /* @__PURE__ */ jsx14(
2266
+ /* @__PURE__ */ jsx15(
2249
2267
  ImportComponentDialog,
2250
2268
  {
2251
2269
  isOpen: isImportDialogOpen,
@@ -2274,8 +2292,8 @@ var RunframeCliLeftHeader = (props) => {
2274
2292
  }
2275
2293
  }
2276
2294
  ),
2277
- /* @__PURE__ */ jsx14(Toaster, { position: "top-center", reverseOrder: false }),
2278
- /* @__PURE__ */ jsx14(
2295
+ /* @__PURE__ */ jsx15(Toaster, { position: "top-center", reverseOrder: false }),
2296
+ /* @__PURE__ */ jsx15(
2279
2297
  orderDialog.OrderDialog,
2280
2298
  {
2281
2299
  isOpen: orderDialog.isOpen,
@@ -2288,13 +2306,13 @@ var RunframeCliLeftHeader = (props) => {
2288
2306
  };
2289
2307
 
2290
2308
  // lib/components/RunFrameForCli/RunFrameForCli.tsx
2291
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
2309
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
2292
2310
  var RunFrameForCli = (props) => {
2293
2311
  const [shouldLoadLatestEval, setLoadLatestEval] = useLocalStorageState(
2294
2312
  "load-latest-eval",
2295
2313
  true
2296
2314
  );
2297
- return /* @__PURE__ */ jsx15(
2315
+ return /* @__PURE__ */ jsx16(
2298
2316
  RunFrameWithApi,
2299
2317
  {
2300
2318
  debug: props.debug,
@@ -2302,7 +2320,7 @@ var RunFrameForCli = (props) => {
2302
2320
  defaultToFullScreen: true,
2303
2321
  showToggleFullScreen: false,
2304
2322
  leftHeaderContent: /* @__PURE__ */ jsxs11("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
2305
- /* @__PURE__ */ jsx15(
2323
+ /* @__PURE__ */ jsx16(
2306
2324
  RunframeCliLeftHeader,
2307
2325
  {
2308
2326
  shouldLoadLatestEval,