@tscircuit/runframe 0.0.416 → 0.0.417
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.
|
|
1095
|
+
var version = "0.0.416";
|
|
1096
1096
|
|
|
1097
1097
|
// lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
|
|
1098
1098
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -1894,7 +1894,7 @@ var useOrderQuotePolling = (orderQuoteId) => {
|
|
|
1894
1894
|
};
|
|
1895
1895
|
|
|
1896
1896
|
// lib/components/OrderDialog/InitialOrder.tsx
|
|
1897
|
-
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1897
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1898
1898
|
var InitialOrderScreen = ({
|
|
1899
1899
|
onCancel,
|
|
1900
1900
|
packageReleaseId
|
|
@@ -1914,7 +1914,7 @@ var InitialOrderScreen = ({
|
|
|
1914
1914
|
window.location.href = `${stripeCheckoutBaseUrl}?client_reference_id=${orderQuoteId2}&shipping_option=${selectedShippingCarrier}`;
|
|
1915
1915
|
};
|
|
1916
1916
|
useEffect3(() => {
|
|
1917
|
-
if (selectedShippingCarrier === null && orderQuote
|
|
1917
|
+
if (selectedShippingCarrier === null && orderQuote && Array.isArray(orderQuote.shipping_options) && orderQuote.shipping_options.length > 0) {
|
|
1918
1918
|
const lowest = orderQuote.shipping_options.reduce(
|
|
1919
1919
|
(min, curr) => curr.cost < min.cost ? curr : min,
|
|
1920
1920
|
orderQuote.shipping_options[0]
|
|
@@ -1922,16 +1922,15 @@ var InitialOrderScreen = ({
|
|
|
1922
1922
|
setSelectedShippingCarrier(lowest?.carrier || null);
|
|
1923
1923
|
}
|
|
1924
1924
|
}, [orderQuote]);
|
|
1925
|
-
const lowestShippingCarrierCost = orderQuote
|
|
1925
|
+
const lowestShippingCarrierCost = orderQuote && Array.isArray(orderQuote.shipping_options) && orderQuote.shipping_options.length > 0 ? orderQuote.shipping_options.reduce(
|
|
1926
1926
|
(min, curr) => curr.cost < min.cost ? curr : min,
|
|
1927
|
-
orderQuote
|
|
1928
|
-
).cost
|
|
1927
|
+
orderQuote.shipping_options[0]
|
|
1928
|
+
).cost : 0;
|
|
1929
1929
|
useEffect3(() => {
|
|
1930
1930
|
createOrderQuote2();
|
|
1931
1931
|
}, [packageReleaseId, createOrderQuote2]);
|
|
1932
1932
|
return /* @__PURE__ */ jsxs15("div", { className: "rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3", children: [
|
|
1933
1933
|
/* @__PURE__ */ jsx19("h2", { className: "rf-text-3xl rf-font-bold rf-text-center", children: "Order PCB" }),
|
|
1934
|
-
/* @__PURE__ */ jsx19("div", { className: "rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm", children: "This board is eligible for the tscircuit Flat Fee" }),
|
|
1935
1934
|
(!orderQuoteId || !orderQuote || !orderQuote?.is_completed) && !isError && /* @__PURE__ */ jsx19(LoadingMessage, { message: "Fetching quotes..." }),
|
|
1936
1935
|
(createOrderQuoteError || orderQuote?.error || isError) && /* @__PURE__ */ jsx19(
|
|
1937
1936
|
ErrorMessage,
|
|
@@ -1939,16 +1938,19 @@ var InitialOrderScreen = ({
|
|
|
1939
1938
|
message: createOrderQuoteError?.message || orderQuote?.error?.message || "Failed to fetch quotes"
|
|
1940
1939
|
}
|
|
1941
1940
|
),
|
|
1942
|
-
orderQuote?.is_completed && !createOrderQuoteError && !orderQuote?.error && /* @__PURE__ */
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1941
|
+
orderQuote?.is_completed && !createOrderQuoteError && !orderQuote?.error && Array.isArray(orderQuote?.shipping_options) && orderQuote.shipping_options.length > 0 && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
1942
|
+
/* @__PURE__ */ jsx19("div", { className: "rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm", children: "This board is eligible for the tscircuit Flat Fee" }),
|
|
1943
|
+
/* @__PURE__ */ jsx19(
|
|
1944
|
+
VendorQuoteCard,
|
|
1945
|
+
{
|
|
1946
|
+
orderQuote,
|
|
1947
|
+
selectedShippingCarrier,
|
|
1948
|
+
onSelectShippingCarrier: setSelectedShippingCarrier,
|
|
1949
|
+
lowestShippingCarrierCost: lowestShippingCarrierCost + (orderQuote.total_cost_without_shipping || 0)
|
|
1950
|
+
},
|
|
1951
|
+
orderQuote?.order_quote_id
|
|
1952
|
+
)
|
|
1953
|
+
] }),
|
|
1952
1954
|
/* @__PURE__ */ jsxs15("div", { className: "rf-flex rf-justify-between rf-mt-5 rf-gap-4", children: [
|
|
1953
1955
|
/* @__PURE__ */ jsx19(
|
|
1954
1956
|
Button,
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED