@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.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. 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 props = this._parsedProps;
4016
- if (props.autorouter === "auto-local") return true;
4017
- if (props.autorouter === "sequential-trace") return true;
4018
- if (props.autorouter) return false;
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
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.303",
4
+ "version": "0.0.305",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",