@tscircuit/core 0.0.471 → 0.0.472
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 +7 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -546,8 +546,7 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
546
546
|
* components share the same names) unless you explicitly break out some ports
|
|
547
547
|
*/
|
|
548
548
|
get isSubcircuit() {
|
|
549
|
-
return Boolean(this.props.subcircuit) ||
|
|
550
|
-
this.lowercaseComponentName === "group" && this?.parent?.isRoot;
|
|
549
|
+
return Boolean(this.props.subcircuit) || this.lowercaseComponentName === "group" && this?.parent?.isRoot;
|
|
551
550
|
}
|
|
552
551
|
get isGroup() {
|
|
553
552
|
return this.lowercaseComponentName === "group";
|
|
@@ -9838,7 +9837,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9838
9837
|
var package_default = {
|
|
9839
9838
|
name: "@tscircuit/core",
|
|
9840
9839
|
type: "module",
|
|
9841
|
-
version: "0.0.
|
|
9840
|
+
version: "0.0.471",
|
|
9842
9841
|
types: "dist/index.d.ts",
|
|
9843
9842
|
main: "dist/index.js",
|
|
9844
9843
|
module: "dist/index.js",
|
|
@@ -9979,23 +9978,17 @@ var RootCircuit = class {
|
|
|
9979
9978
|
}
|
|
9980
9979
|
_guessRootComponent() {
|
|
9981
9980
|
if (this.firstChild) return;
|
|
9982
|
-
if (this.children.length === 1) {
|
|
9983
|
-
this.firstChild = this.children[0];
|
|
9984
|
-
return;
|
|
9985
|
-
}
|
|
9986
9981
|
if (this.children.length === 0) {
|
|
9987
9982
|
throw new Error(
|
|
9988
9983
|
"Not able to guess root component: RootCircuit has no children (use circuit.add(...))"
|
|
9989
9984
|
);
|
|
9990
9985
|
}
|
|
9991
|
-
if (this.children.length
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
this.firstChild = board;
|
|
9995
|
-
return;
|
|
9996
|
-
}
|
|
9986
|
+
if (this.children.length === 1 && this.children[0].isGroup) {
|
|
9987
|
+
this.firstChild = this.children[0];
|
|
9988
|
+
return;
|
|
9997
9989
|
}
|
|
9998
|
-
const group = new Group({ subcircuit:
|
|
9990
|
+
const group = new Group({ subcircuit: true });
|
|
9991
|
+
group.parent = this;
|
|
9999
9992
|
group.addAll(this.children);
|
|
10000
9993
|
this.children = [group];
|
|
10001
9994
|
this.firstChild = group;
|