@tscircuit/core 0.0.304 → 0.0.306
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 +10 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -929,6 +929,11 @@ var PrimitiveComponent = class extends Renderable {
|
|
|
929
929
|
this.parent?.onChildChanged?.(child);
|
|
930
930
|
}
|
|
931
931
|
add(component) {
|
|
932
|
+
if (!component.onAddToParent) {
|
|
933
|
+
throw new Error(
|
|
934
|
+
`Invalid JSX Element: Expected a React component but received "${JSON.stringify(component)}"`
|
|
935
|
+
);
|
|
936
|
+
}
|
|
932
937
|
component.onAddToParent(this);
|
|
933
938
|
component.parent = this;
|
|
934
939
|
this.children.push(component);
|
|
@@ -2202,7 +2207,8 @@ var Port = class extends PrimitiveComponent {
|
|
|
2202
2207
|
name: props.name,
|
|
2203
2208
|
pin_number: props.pinNumber,
|
|
2204
2209
|
port_hints,
|
|
2205
|
-
source_component_id: this.parent?.source_component_id
|
|
2210
|
+
source_component_id: this.parent?.source_component_id,
|
|
2211
|
+
subcircuit_id: this.getSubcircuit()?.subcircuit_id
|
|
2206
2212
|
});
|
|
2207
2213
|
this.source_port_id = source_port.source_port_id;
|
|
2208
2214
|
}
|
|
@@ -3817,7 +3823,7 @@ var Group = class extends NormalComponent {
|
|
|
3817
3823
|
const autoroutingOptions = {
|
|
3818
3824
|
serverUrl: "https://registry-api.tscircuit.com",
|
|
3819
3825
|
serverMode: "job",
|
|
3820
|
-
serverCacheEnabled: props.autorouter?.
|
|
3826
|
+
serverCacheEnabled: props.autorouter?.serverCacheEnabled ?? false,
|
|
3821
3827
|
...typeof props.autorouter === "object" ? props.autorouter : {}
|
|
3822
3828
|
};
|
|
3823
3829
|
const serverUrl = autoroutingOptions.serverUrl;
|
|
@@ -4937,6 +4943,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
4937
4943
|
const trace = db.source_trace.insert({
|
|
4938
4944
|
connected_source_port_ids: ports.map((p) => p.port.source_port_id),
|
|
4939
4945
|
connected_source_net_ids: nets.map((n) => n.source_net_id),
|
|
4946
|
+
subcircuit_id: this.getSubcircuit()?.subcircuit_id,
|
|
4940
4947
|
max_length: getMaxLengthFromConnectedCapacitors(
|
|
4941
4948
|
ports.map((p) => p.port),
|
|
4942
4949
|
{ db }
|
|
@@ -5197,6 +5204,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
5197
5204
|
const pcb_trace = db.pcb_trace.insert({
|
|
5198
5205
|
route: mergedRoute,
|
|
5199
5206
|
source_trace_id: this.source_trace_id,
|
|
5207
|
+
subcircuit_id: this.getSubcircuit()?.subcircuit_id,
|
|
5200
5208
|
trace_length: traceLength
|
|
5201
5209
|
});
|
|
5202
5210
|
this._portsRoutedOnPcb = ports;
|
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.306",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@tscircuit/props": "^0.0.142",
|
|
58
58
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
59
59
|
"@tscircuit/soup-util": "^0.0.41",
|
|
60
|
-
"circuit-json": "^0.0.
|
|
60
|
+
"circuit-json": "^0.0.136",
|
|
61
61
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
62
62
|
"format-si-unit": "^0.0.3",
|
|
63
63
|
"nanoid": "^5.0.7",
|