@tscircuit/core 0.0.303 → 0.0.305
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 +9 -4
- package/package.json +1 -1
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);
|
|
@@ -4012,10 +4017,10 @@ var Group = class extends NormalComponent {
|
|
|
4012
4017
|
* or if using a "fullview" or "rip and replace" autorouting mode
|
|
4013
4018
|
*/
|
|
4014
4019
|
_shouldUseTraceByTraceRouting() {
|
|
4015
|
-
const
|
|
4016
|
-
if (
|
|
4017
|
-
if (
|
|
4018
|
-
if (
|
|
4020
|
+
const autorouter = this._parsedProps.autorouter ?? this.getInheritedProperty("autorouter");
|
|
4021
|
+
if (autorouter === "auto-local") return true;
|
|
4022
|
+
if (autorouter === "sequential-trace") return true;
|
|
4023
|
+
if (autorouter) return false;
|
|
4019
4024
|
return true;
|
|
4020
4025
|
}
|
|
4021
4026
|
};
|