@tscircuit/runframe 0.0.412 → 0.0.413

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.
@@ -1092,7 +1092,7 @@ var RenderLogViewer = ({
1092
1092
  };
1093
1093
 
1094
1094
  // package.json
1095
- var version = "0.0.411";
1095
+ var version = "0.0.412";
1096
1096
 
1097
1097
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
1098
1098
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -1931,15 +1931,16 @@ var InitialOrderScreen = ({
1931
1931
  createOrderQuote2();
1932
1932
  }, [packageReleaseId, createOrderQuote2]);
1933
1933
  return /* @__PURE__ */ jsxs15("div", { className: "rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-p-8 rf-flex rf-flex-col rf-gap-3", children: [
1934
- /* @__PURE__ */ jsx19("h2", { className: "rf-text-3xl rf-font-bold rf-text-center rf-mb-8", children: "Order PCB \u2013 Choose a Vendor" }),
1934
+ /* @__PURE__ */ jsx19("h2", { className: "rf-text-3xl rf-font-bold rf-text-center rf-mb-8", children: "Order PCB" }),
1935
1935
  /* @__PURE__ */ jsx19("div", { className: "rf-mb-4 rf-text-gray-700 rf-text-center", children: "Select a quote from below, then pick a shipping method." }),
1936
- !orderQuoteId && !isError ? /* @__PURE__ */ jsxs15("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12", children: [
1937
- /* @__PURE__ */ jsx19(Loader22, { className: "rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400" }),
1938
- /* @__PURE__ */ jsx19("p", { className: "rf-text-gray-600", children: "Fetching quotes..." })
1939
- ] }) : createOrderQuoteError && isError ? /* @__PURE__ */ jsx19("div", { className: "rf-text-red-600 rf-text-center rf-py-12", children: JSON.stringify(createOrderQuoteError.message) }) : orderQuote?.error ? /* @__PURE__ */ jsx19("div", { className: "rf-text-red-600 rf-text-center rf-py-12", children: orderQuote?.error?.message || "Failed to fetch quotes" }) : !orderQuote ? /* @__PURE__ */ jsx19("div", { className: "rf-text-red-600 rf-text-center rf-py-12", children: "No quotes available." }) : !orderQuote.is_completed ? /* @__PURE__ */ jsxs15("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12", children: [
1940
- /* @__PURE__ */ jsx19(Loader22, { className: "rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400" }),
1941
- /* @__PURE__ */ jsx19("p", { className: "rf-text-gray-600", children: "Calculating quote..." })
1942
- ] }) : /* @__PURE__ */ jsx19(
1936
+ !orderQuoteId && !isError && /* @__PURE__ */ jsx19(LoadingMessage, { message: "Fetching quotes..." }),
1937
+ (createOrderQuoteError || orderQuote?.error) && /* @__PURE__ */ jsx19(
1938
+ ErrorMessage,
1939
+ {
1940
+ message: createOrderQuoteError?.message || orderQuote?.error?.message || "Failed to fetch quotes"
1941
+ }
1942
+ ),
1943
+ orderQuote?.is_completed && !createOrderQuoteError && !orderQuote?.error && /* @__PURE__ */ jsx19(
1943
1944
  VendorQuoteCard,
1944
1945
  {
1945
1946
  vendor: orderQuote,
@@ -1948,7 +1949,7 @@ var InitialOrderScreen = ({
1948
1949
  selectedShippingIdx: selectedVendorIdx === 0 ? selectedShippingIdx : null,
1949
1950
  onSelectShipping: setSelectedShippingIdx
1950
1951
  },
1951
- orderQuote.order_quote_id
1952
+ orderQuote?.order_quote_id
1952
1953
  ),
1953
1954
  /* @__PURE__ */ jsxs15("div", { className: "rf-flex rf-justify-between rf-mt-5 rf-gap-4", children: [
1954
1955
  /* @__PURE__ */ jsx19(
@@ -1983,6 +1984,11 @@ var InitialOrderScreen = ({
1983
1984
  /* @__PURE__ */ jsx19("div", { className: "rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4", children: "Pricing may vary based on specifications." })
1984
1985
  ] });
1985
1986
  };
1987
+ var LoadingMessage = ({ message }) => /* @__PURE__ */ jsxs15("div", { className: "rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12", children: [
1988
+ /* @__PURE__ */ jsx19(Loader22, { className: "rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400" }),
1989
+ /* @__PURE__ */ jsx19("p", { className: "rf-text-gray-600", children: message })
1990
+ ] });
1991
+ var ErrorMessage = ({ message }) => /* @__PURE__ */ jsx19("div", { className: "rf-text-red-600 rf-text-center rf-py-12", children: message });
1986
1992
 
1987
1993
  // lib/components/OrderDialog/OrderDialog.tsx
1988
1994
  import { jsx as jsx20 } from "react/jsx-runtime";
package/dist/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-FAKO6NRC.js";
11
+ } from "./chunk-EY4WZIT6.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  useOrderDialog,
27
27
  useOrderDialogCli,
28
28
  useRunFrameStore
29
- } from "./chunk-FAKO6NRC.js";
29
+ } from "./chunk-EY4WZIT6.js";
30
30
 
31
31
  // lib/components/RunFrame/RunFrame.tsx
32
32
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";