@tscircuit/core 0.0.222 → 0.0.223
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 +1 -0
- package/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3494,7 +3494,7 @@ var Group = class extends NormalComponent {
|
|
|
3494
3494
|
{
|
|
3495
3495
|
method: "POST",
|
|
3496
3496
|
body: JSON.stringify({
|
|
3497
|
-
input_circuit_json: this.root.
|
|
3497
|
+
input_circuit_json: this.root.getCircuitJson()
|
|
3498
3498
|
}),
|
|
3499
3499
|
headers: { "Content-Type": "application/json" }
|
|
3500
3500
|
}
|
|
@@ -3508,7 +3508,7 @@ var Group = class extends NormalComponent {
|
|
|
3508
3508
|
{
|
|
3509
3509
|
method: "POST",
|
|
3510
3510
|
body: JSON.stringify({
|
|
3511
|
-
input_circuit_json: this.root.
|
|
3511
|
+
input_circuit_json: this.root.getCircuitJson(),
|
|
3512
3512
|
provider: "freerouting",
|
|
3513
3513
|
autostart: true
|
|
3514
3514
|
}),
|
|
@@ -5632,6 +5632,7 @@ var Circuit = class {
|
|
|
5632
5632
|
isRoot = true;
|
|
5633
5633
|
schematicDisabled = false;
|
|
5634
5634
|
_hasRenderedAtleastOnce = false;
|
|
5635
|
+
_isRendering = false;
|
|
5635
5636
|
constructor() {
|
|
5636
5637
|
this.children = [];
|
|
5637
5638
|
this.db = su([]);
|
|
@@ -5702,7 +5703,17 @@ var Circuit = class {
|
|
|
5702
5703
|
});
|
|
5703
5704
|
}
|
|
5704
5705
|
getSoup() {
|
|
5705
|
-
if (
|
|
5706
|
+
if (this._isRendering) {
|
|
5707
|
+
return this.db.toArray();
|
|
5708
|
+
}
|
|
5709
|
+
if (!this._hasRenderedAtleastOnce) {
|
|
5710
|
+
this._isRendering = true;
|
|
5711
|
+
try {
|
|
5712
|
+
this.render();
|
|
5713
|
+
} finally {
|
|
5714
|
+
this._isRendering = false;
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5706
5717
|
return this.db.toArray();
|
|
5707
5718
|
}
|
|
5708
5719
|
getCircuitJson() {
|