@tscircuit/core 0.0.1010 → 0.0.1011
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.d.ts +2 -0
- package/dist/index.js +15 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -371,6 +371,7 @@ interface ISubcircuit extends PrimitiveComponent {
|
|
|
371
371
|
_getSubcircuitLayerCount(): number;
|
|
372
372
|
subcircuit_id: string | null;
|
|
373
373
|
getNormalComponentNameMap?: () => Map<string, NormalComponent[]>;
|
|
374
|
+
_isInflatedFromCircuitJson: boolean;
|
|
374
375
|
}
|
|
375
376
|
|
|
376
377
|
interface SchematicSymbolBounds {
|
|
@@ -1653,6 +1654,7 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
1653
1654
|
schematic_group_id: string | null;
|
|
1654
1655
|
subcircuit_id: string | null;
|
|
1655
1656
|
_hasStartedAsyncAutorouting: boolean;
|
|
1657
|
+
_isInflatedFromCircuitJson: boolean;
|
|
1656
1658
|
private _normalComponentNameMap;
|
|
1657
1659
|
/**
|
|
1658
1660
|
* Returns a cached map of component names to NormalComponent instances within this subcircuit.
|
package/dist/index.js
CHANGED
|
@@ -2088,6 +2088,7 @@ var Net = class extends PrimitiveComponent2 {
|
|
|
2088
2088
|
doInitialPcbRouteNetIslands() {
|
|
2089
2089
|
if (this.root?.pcbDisabled) return;
|
|
2090
2090
|
if (this.getSubcircuit()._parsedProps.routingDisabled) return;
|
|
2091
|
+
if (this.getSubcircuit()._isInflatedFromCircuitJson) return;
|
|
2091
2092
|
if (this.getSubcircuit()._getAutorouterConfig().groupMode !== "sequential-trace")
|
|
2092
2093
|
return;
|
|
2093
2094
|
const { db } = this.root;
|
|
@@ -7013,6 +7014,9 @@ function Trace_doInitialPcbTraceRender(trace) {
|
|
|
7013
7014
|
if (subcircuit._parsedProps.routingDisabled) {
|
|
7014
7015
|
return;
|
|
7015
7016
|
}
|
|
7017
|
+
if (subcircuit._isInflatedFromCircuitJson) {
|
|
7018
|
+
return;
|
|
7019
|
+
}
|
|
7016
7020
|
const cachedRoute = subcircuit._parsedProps.pcbRouteCache?.pcbTraces;
|
|
7017
7021
|
if (cachedRoute) {
|
|
7018
7022
|
const pcb_trace2 = db.pcb_trace.insert({
|
|
@@ -14471,6 +14475,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
14471
14475
|
schematic_group_id = null;
|
|
14472
14476
|
subcircuit_id = null;
|
|
14473
14477
|
_hasStartedAsyncAutorouting = false;
|
|
14478
|
+
_isInflatedFromCircuitJson = false;
|
|
14474
14479
|
_normalComponentNameMap = null;
|
|
14475
14480
|
/**
|
|
14476
14481
|
* Returns a cached map of component names to NormalComponent instances within this subcircuit.
|
|
@@ -14965,6 +14970,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
14965
14970
|
if (!this.isSubcircuit) return;
|
|
14966
14971
|
if (this.root?.pcbDisabled) return;
|
|
14967
14972
|
if (this.getInheritedProperty("routingDisabled")) return;
|
|
14973
|
+
if (this._isInflatedFromCircuitJson) return;
|
|
14968
14974
|
if (this._shouldUseTraceByTraceRouting()) return;
|
|
14969
14975
|
if (!this._areChildSubcircuitsRouted()) {
|
|
14970
14976
|
debug11(
|
|
@@ -14985,6 +14991,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
14985
14991
|
const debug11 = Debug13("tscircuit:core:updatePcbTraceRender");
|
|
14986
14992
|
debug11(`[${this.getString()}] updating...`);
|
|
14987
14993
|
if (!this.isSubcircuit) return;
|
|
14994
|
+
if (this._isInflatedFromCircuitJson) return;
|
|
14988
14995
|
if (this._shouldRouteAsync() && this._hasTracesToRoute() && !this._hasStartedAsyncAutorouting) {
|
|
14989
14996
|
if (this._areChildSubcircuitsRouted()) {
|
|
14990
14997
|
debug11(
|
|
@@ -15156,6 +15163,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
15156
15163
|
}
|
|
15157
15164
|
_getPcbLayoutMode() {
|
|
15158
15165
|
const props = this._parsedProps;
|
|
15166
|
+
if (this._isInflatedFromCircuitJson) return "none";
|
|
15159
15167
|
if (props.pcbRelative) return "none";
|
|
15160
15168
|
if (props.pcbLayout?.matchAdapt) return "match-adapt";
|
|
15161
15169
|
if (props.pcbLayout?.flex) return "flex";
|
|
@@ -16628,6 +16636,9 @@ var Board = class extends Group6 {
|
|
|
16628
16636
|
}
|
|
16629
16637
|
doInitialInflateSubcircuitCircuitJson() {
|
|
16630
16638
|
const { circuitJson, children } = this._parsedProps;
|
|
16639
|
+
if (circuitJson) {
|
|
16640
|
+
this._isInflatedFromCircuitJson = true;
|
|
16641
|
+
}
|
|
16631
16642
|
inflateCircuitJson(this, circuitJson, children);
|
|
16632
16643
|
}
|
|
16633
16644
|
doInitialPcbComponentRender() {
|
|
@@ -19012,6 +19023,9 @@ var Subcircuit = class extends Group6 {
|
|
|
19012
19023
|
*/
|
|
19013
19024
|
doInitialInflateSubcircuitCircuitJson() {
|
|
19014
19025
|
const { circuitJson, children } = this._parsedProps;
|
|
19026
|
+
if (circuitJson) {
|
|
19027
|
+
this._isInflatedFromCircuitJson = true;
|
|
19028
|
+
}
|
|
19015
19029
|
inflateCircuitJson(this, circuitJson, children);
|
|
19016
19030
|
}
|
|
19017
19031
|
};
|
|
@@ -21914,7 +21928,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21914
21928
|
var package_default = {
|
|
21915
21929
|
name: "@tscircuit/core",
|
|
21916
21930
|
type: "module",
|
|
21917
|
-
version: "0.0.
|
|
21931
|
+
version: "0.0.1010",
|
|
21918
21932
|
types: "dist/index.d.ts",
|
|
21919
21933
|
main: "dist/index.js",
|
|
21920
21934
|
module: "dist/index.js",
|