@tscircuit/core 0.0.1961 → 0.0.1963
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/index.js +24 -6
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2715,6 +2715,24 @@ var Net = class extends PrimitiveComponent2 {
|
|
|
2715
2715
|
};
|
|
2716
2716
|
|
|
2717
2717
|
// lib/utils/components/createNetsFromProps.ts
|
|
2718
|
+
var netSelectorsByNets = /* @__PURE__ */ new WeakMap();
|
|
2719
|
+
var hasNet = (subcircuit, selector) => {
|
|
2720
|
+
if (!/^net\.[A-Za-z_][A-Za-z0-9_]*$/.test(selector)) {
|
|
2721
|
+
return Boolean(subcircuit.selectOne(selector));
|
|
2722
|
+
}
|
|
2723
|
+
const nets = subcircuit.selectAll("net");
|
|
2724
|
+
let netSelectors = netSelectorsByNets.get(nets);
|
|
2725
|
+
if (!netSelectors) {
|
|
2726
|
+
netSelectors = /* @__PURE__ */ new Set();
|
|
2727
|
+
for (const net of nets) {
|
|
2728
|
+
for (const alias of net.getNameAndAliases().join(" ").split(/\s+/)) {
|
|
2729
|
+
netSelectors.add(`net.${alias}`);
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
netSelectorsByNets.set(nets, netSelectors);
|
|
2733
|
+
}
|
|
2734
|
+
return netSelectors.has(selector);
|
|
2735
|
+
};
|
|
2718
2736
|
var createNetsFromProps = (component, props) => {
|
|
2719
2737
|
for (const prop of props) {
|
|
2720
2738
|
if (typeof prop === "string" && prop.startsWith("net.")) {
|
|
@@ -2735,7 +2753,7 @@ var createNetsFromProps = (component, props) => {
|
|
|
2735
2753
|
);
|
|
2736
2754
|
}
|
|
2737
2755
|
const subcircuit = component.getSubcircuit();
|
|
2738
|
-
if (!subcircuit
|
|
2756
|
+
if (!hasNet(subcircuit, prop)) {
|
|
2739
2757
|
const net = new Net({
|
|
2740
2758
|
name: prop.split("net.")[1]
|
|
2741
2759
|
});
|
|
@@ -63745,7 +63763,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
63745
63763
|
var package_default = {
|
|
63746
63764
|
name: "@tscircuit/core",
|
|
63747
63765
|
type: "module",
|
|
63748
|
-
version: "0.0.
|
|
63766
|
+
version: "0.0.1962",
|
|
63749
63767
|
types: "dist/index.d.ts",
|
|
63750
63768
|
main: "dist/index.js",
|
|
63751
63769
|
module: "dist/index.js",
|
|
@@ -63782,7 +63800,7 @@ var package_default = {
|
|
|
63782
63800
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
63783
63801
|
"@tscircuit/capacity-autorouter": "^0.0.919",
|
|
63784
63802
|
"@tscircuit/checks": "^0.0.208",
|
|
63785
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
63803
|
+
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
63786
63804
|
"@tscircuit/common": "^0.0.20",
|
|
63787
63805
|
"@tscircuit/copper-pour-solver": "^0.0.56",
|
|
63788
63806
|
"@tscircuit/create-fdm-enclosure": "0.0.4",
|
|
@@ -63818,9 +63836,9 @@ var package_default = {
|
|
|
63818
63836
|
"circuit-json": "^0.0.497",
|
|
63819
63837
|
"circuit-json-to-bpc": "^0.0.13",
|
|
63820
63838
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
63821
|
-
"circuit-json-to-gltf": "^0.0.
|
|
63839
|
+
"circuit-json-to-gltf": "^0.0.132",
|
|
63822
63840
|
"circuit-json-to-spice": "^0.0.45",
|
|
63823
|
-
"circuit-to-svg": "^0.0.
|
|
63841
|
+
"circuit-to-svg": "^0.0.430",
|
|
63824
63842
|
concurrently: "^9.1.2",
|
|
63825
63843
|
"connectivity-map": "^1.0.0",
|
|
63826
63844
|
debug: "^4.3.6",
|
|
@@ -63877,7 +63895,7 @@ var package_default = {
|
|
|
63877
63895
|
zod: "^3.25.67"
|
|
63878
63896
|
},
|
|
63879
63897
|
overrides: {
|
|
63880
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
63898
|
+
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
63881
63899
|
"@tscircuit/props": "^0.0.665",
|
|
63882
63900
|
"circuit-json": "^0.0.497"
|
|
63883
63901
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1963",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
|
|
39
39
|
"@tscircuit/capacity-autorouter": "^0.0.919",
|
|
40
40
|
"@tscircuit/checks": "^0.0.208",
|
|
41
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
41
|
+
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
42
42
|
"@tscircuit/common": "^0.0.20",
|
|
43
43
|
"@tscircuit/copper-pour-solver": "^0.0.56",
|
|
44
44
|
"@tscircuit/create-fdm-enclosure": "0.0.4",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"circuit-json": "^0.0.497",
|
|
75
75
|
"circuit-json-to-bpc": "^0.0.13",
|
|
76
76
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
77
|
-
"circuit-json-to-gltf": "^0.0.
|
|
77
|
+
"circuit-json-to-gltf": "^0.0.132",
|
|
78
78
|
"circuit-json-to-spice": "^0.0.45",
|
|
79
|
-
"circuit-to-svg": "^0.0.
|
|
79
|
+
"circuit-to-svg": "^0.0.430",
|
|
80
80
|
"concurrently": "^9.1.2",
|
|
81
81
|
"connectivity-map": "^1.0.0",
|
|
82
82
|
"debug": "^4.3.6",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"zod": "^3.25.67"
|
|
134
134
|
},
|
|
135
135
|
"overrides": {
|
|
136
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
136
|
+
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
137
137
|
"@tscircuit/props": "^0.0.665",
|
|
138
138
|
"circuit-json": "^0.0.497"
|
|
139
139
|
}
|