@tscircuit/props 0.0.308 → 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
@@ -45,12 +46,20 @@ export interface CommonLayoutProps {
45
46
  pcbMarginX?: string | number
46
47
  pcbMarginY?: string | number
47
48
 
49
+ schMarginTop?: string | number
50
+ schMarginRight?: string | number
51
+ schMarginBottom?: string | number
52
+ schMarginLeft?: string | number
53
+ schMarginX?: string | number
54
+ schMarginY?: string | number
55
+
48
56
  schX?: string | number
49
57
  schY?: string | number
50
58
  schRotation?: string | number
51
59
 
52
60
  layer?: LayerRefInput
53
61
  footprint?: FootprintProp
62
+ symbol?: SymbolProp
54
63
 
55
64
  /**
56
65
  * If true, X/Y coordinates will be interpreted relative to the parent group
@@ -97,11 +106,18 @@ export const commonLayoutProps = z.object({
97
106
  pcbMarginLeft: distance.optional(),
98
107
  pcbMarginX: distance.optional(),
99
108
  pcbMarginY: distance.optional(),
109
+ schMarginTop: distance.optional(),
110
+ schMarginRight: distance.optional(),
111
+ schMarginBottom: distance.optional(),
112
+ schMarginLeft: distance.optional(),
113
+ schMarginX: distance.optional(),
114
+ schMarginY: distance.optional(),
100
115
  schX: distance.optional(),
101
116
  schY: distance.optional(),
102
117
  schRotation: rotation.optional(),
103
118
  layer: layer_ref.optional(),
104
119
  footprint: footprintProp.optional(),
120
+ symbol: symbolProp.optional(),
105
121
  relative: z.boolean().optional(),
106
122
  schRelative: z.boolean().optional(),
107
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.308",
3
+ "version": "0.0.310",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",