@tscircuit/props 0.0.309 → 0.0.310

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.
@@ -9,6 +9,7 @@ import { expectTypesMatch } from "lib/typecheck"
9
9
  import { z } from "zod"
10
10
  import { type CadModelProp, cadModelProp } from "./cadModel"
11
11
  import { type FootprintProp, footprintProp } from "./footprintProp"
12
+ import { type SymbolProp, symbolProp } from "./symbolProp"
12
13
 
13
14
  export interface PcbLayoutProps {
14
15
  pcbX?: string | number
@@ -58,6 +59,7 @@ export interface CommonLayoutProps {
58
59
 
59
60
  layer?: LayerRefInput
60
61
  footprint?: FootprintProp
62
+ symbol?: SymbolProp
61
63
 
62
64
  /**
63
65
  * If true, X/Y coordinates will be interpreted relative to the parent group
@@ -115,6 +117,7 @@ export const commonLayoutProps = z.object({
115
117
  schRotation: rotation.optional(),
116
118
  layer: layer_ref.optional(),
117
119
  footprint: footprintProp.optional(),
120
+ symbol: symbolProp.optional(),
118
121
  relative: z.boolean().optional(),
119
122
  schRelative: z.boolean().optional(),
120
123
  pcbRelative: z.boolean().optional(),
@@ -0,0 +1,6 @@
1
+ import type { ReactElement } from "react"
2
+ import { z } from "zod"
3
+
4
+ export type SymbolProp = string | ReactElement
5
+
6
+ export const symbolProp = z.custom<SymbolProp>((v) => true)
package/lib/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./common/layout"
4
4
  export * from "./common/point3"
5
5
  export * from "./common/portHints"
6
6
  export * from "./common/footprintProp"
7
+ export * from "./common/symbolProp"
7
8
  export * from "./common/autocomplete"
8
9
  export * from "./generated/kicad-autocomplete"
9
10
  export * from "./common/schematicOrientation"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.309",
3
+ "version": "0.0.310",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",