@tscircuit/runframe 0.0.1559 → 0.0.1561
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-4B4DVET3.js → chunk-NVDXH6FA.js} +27 -18
- package/dist/preview.js +1 -1
- package/dist/runner.js +10 -1
- package/dist/standalone-preview.min.js +85 -85
- package/dist/standalone.min.js +86 -86
- package/package.json +2 -2
|
@@ -1730,7 +1730,7 @@ var useErrorTelemetry = ({
|
|
|
1730
1730
|
};
|
|
1731
1731
|
|
|
1732
1732
|
// package.json
|
|
1733
|
-
var version = "0.0.
|
|
1733
|
+
var version = "0.0.1560";
|
|
1734
1734
|
var package_default = {
|
|
1735
1735
|
name: "@tscircuit/runframe",
|
|
1736
1736
|
main: "dist/preview.js",
|
|
@@ -1802,7 +1802,7 @@ var package_default = {
|
|
|
1802
1802
|
"circuit-json-to-bom-csv": "^0.0.8",
|
|
1803
1803
|
"circuit-json-to-gerber": "^0.0.46",
|
|
1804
1804
|
"circuit-json-to-gltf": "^0.0.56",
|
|
1805
|
-
"circuit-json-to-kicad": "^0.0.
|
|
1805
|
+
"circuit-json-to-kicad": "^0.0.57",
|
|
1806
1806
|
"circuit-json-to-lbrn": "^0.0.4",
|
|
1807
1807
|
"circuit-json-to-pnp-csv": "^0.0.7",
|
|
1808
1808
|
"circuit-json-to-step": "^0.0.13",
|
|
@@ -2586,6 +2586,11 @@ var SearchBar = ({
|
|
|
2586
2586
|
// lib/components/ImportComponentDialog2/components/SearchResultsList.tsx
|
|
2587
2587
|
import { Lock } from "lucide-react";
|
|
2588
2588
|
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2589
|
+
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
2590
|
+
style: "currency",
|
|
2591
|
+
currency: "USD"
|
|
2592
|
+
});
|
|
2593
|
+
var formatPrice = (value) => currencyFormatter.format(value);
|
|
2589
2594
|
var getResultKey = (result) => {
|
|
2590
2595
|
switch (result.source) {
|
|
2591
2596
|
case "tscircuit.com": {
|
|
@@ -2645,6 +2650,7 @@ var SearchResultsList = ({
|
|
|
2645
2650
|
const secondary = getSecondaryText(result);
|
|
2646
2651
|
const partNumber = getPartNumberLabel(result);
|
|
2647
2652
|
const stock = result.source === "jlcpcb" ? result.component.stock : null;
|
|
2653
|
+
const price = result.source === "jlcpcb" ? result.component.price : null;
|
|
2648
2654
|
const isBasic = result.source === "jlcpcb" ? result.component.isBasic : null;
|
|
2649
2655
|
return /* @__PURE__ */ jsxs17(
|
|
2650
2656
|
"div",
|
|
@@ -2675,22 +2681,25 @@ var SearchResultsList = ({
|
|
|
2675
2681
|
secondary
|
|
2676
2682
|
] })
|
|
2677
2683
|
] }),
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
event
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
stock
|
|
2692
|
-
|
|
2693
|
-
|
|
2684
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
2685
|
+
result.source === "tscircuit.com" && onShowDetails ? /* @__PURE__ */ jsx23("div", { className: "rf-flex-shrink-0 rf-w-full sm:rf-w-auto", children: /* @__PURE__ */ jsx23(
|
|
2686
|
+
Button,
|
|
2687
|
+
{
|
|
2688
|
+
variant: "outline",
|
|
2689
|
+
size: "sm",
|
|
2690
|
+
className: "rf-text-xs rf-w-full sm:rf-w-auto",
|
|
2691
|
+
onClick: (event) => {
|
|
2692
|
+
event.stopPropagation();
|
|
2693
|
+
onShowDetails(result);
|
|
2694
|
+
},
|
|
2695
|
+
children: "See Details"
|
|
2696
|
+
}
|
|
2697
|
+
) }) : result.source === "jlcpcb" && stock != null ? /* @__PURE__ */ jsxs17("div", { className: "rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0", children: [
|
|
2698
|
+
stock.toLocaleString(),
|
|
2699
|
+
" in stock"
|
|
2700
|
+
] }) : null,
|
|
2701
|
+
price != null && /* @__PURE__ */ jsx23("div", { className: "rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0 rf-text-right", children: formatPrice(price) })
|
|
2702
|
+
] })
|
|
2694
2703
|
]
|
|
2695
2704
|
},
|
|
2696
2705
|
key
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
useRunFrameStore,
|
|
35
35
|
useRunnerStore,
|
|
36
36
|
useStyles
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NVDXH6FA.js";
|
|
38
38
|
|
|
39
39
|
// lib/components/RunFrame/RunFrame.tsx
|
|
40
40
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -2345,6 +2345,11 @@ var importComponentFromJlcpcb = async (jlcpcbPartNumber, opts) => {
|
|
|
2345
2345
|
import Debug4 from "debug";
|
|
2346
2346
|
import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2347
2347
|
var debug5 = Debug4("run-frame:ImportComponentDialog");
|
|
2348
|
+
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
2349
|
+
style: "currency",
|
|
2350
|
+
currency: "USD"
|
|
2351
|
+
});
|
|
2352
|
+
var formatPrice = (value) => value == null ? null : currencyFormatter.format(value);
|
|
2348
2353
|
var ImportComponentDialog = ({
|
|
2349
2354
|
isOpen,
|
|
2350
2355
|
onClose,
|
|
@@ -2540,6 +2545,10 @@ var ImportComponentDialog = ({
|
|
|
2540
2545
|
/* @__PURE__ */ jsxs9("div", { className: "rf-text-xs rf-text-zinc-500 rf-truncate", children: [
|
|
2541
2546
|
result.partNumber && /* @__PURE__ */ jsx11("span", { className: "rf-mr-2", children: result.partNumber }),
|
|
2542
2547
|
result.description
|
|
2548
|
+
] }),
|
|
2549
|
+
result.price != null && /* @__PURE__ */ jsxs9("div", { className: "rf-text-xs rf-text-zinc-500", children: [
|
|
2550
|
+
"Price: ",
|
|
2551
|
+
formatPrice(result.price)
|
|
2543
2552
|
] })
|
|
2544
2553
|
] }),
|
|
2545
2554
|
/* @__PURE__ */ jsx11("div", { className: "rf-flex rf-gap-2 rf-flex-shrink-0 rf-w-full sm:rf-w-auto", children: result.source === "tscircuit.com" && /* @__PURE__ */ jsx11(
|