@tscircuit/core 0.0.304 → 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 +5 -0
  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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.304",
4
+ "version": "0.0.305",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",