@tscircuit/props 0.0.318 → 0.0.319

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.
@@ -2,6 +2,7 @@ import { z } from "zod"
2
2
  import { expectTypesMatch } from "lib/typecheck"
3
3
  import { distance, type Distance } from "./distance"
4
4
  import { point3 } from "./point3"
5
+ import type { ReactElement } from "react"
5
6
 
6
7
  export const rotationPoint3 = z.object({
7
8
  x: z.union([z.number(), z.string()]),
@@ -85,6 +86,7 @@ export const cadModelJscad = cadModelBase.extend({
85
86
  export type CadModelProp =
86
87
  | null
87
88
  | string
89
+ | ReactElement
88
90
  | CadModelStl
89
91
  | CadModelObj
90
92
  | CadModelGltf
@@ -96,6 +98,9 @@ export type CadModelProp =
96
98
  export const cadModelProp = z.union([
97
99
  z.null(),
98
100
  z.string(),
101
+ z.custom<ReactElement>((v) => {
102
+ return v && typeof v === "object" && "type" in v && "props" in v
103
+ }),
99
104
  cadModelStl,
100
105
  cadModelObj,
101
106
  cadModelGltf,
@@ -14,10 +14,13 @@ export interface CadAssemblyProps {
14
14
  * "top" and this is most intuitive.
15
15
  */
16
16
  originalLayer?: LayerRef
17
+
18
+ children?: any
17
19
  }
18
20
 
19
21
  export const cadassemblyProps = z.object({
20
22
  originalLayer: layer_ref.default("top").optional(),
23
+ children: z.any().optional(),
21
24
  })
22
25
 
23
26
  export type CadAssemblyPropsInput = z.input<typeof cadassemblyProps>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.318",
3
+ "version": "0.0.319",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",