@tscircuit/props 0.0.423 → 0.0.425

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.
@@ -0,0 +1,20 @@
1
+ import { distance, type Distance } from "lib/common/distance"
2
+ import {
3
+ type CommonComponentProps,
4
+ commonComponentProps,
5
+ } from "lib/common/layout"
6
+ import { expectTypesMatch } from "lib/typecheck"
7
+ import { z } from "zod"
8
+
9
+ export interface FiducialProps extends CommonComponentProps {
10
+ soldermaskPullback?: Distance
11
+ padDiameter?: Distance
12
+ }
13
+
14
+ export const fiducialProps = commonComponentProps.extend({
15
+ soldermaskPullback: distance.optional(),
16
+ padDiameter: distance.optional(),
17
+ })
18
+
19
+ type InferredFiducialProps = z.input<typeof fiducialProps>
20
+ expectTypesMatch<FiducialProps, InferredFiducialProps>(true)
@@ -3,9 +3,10 @@ import { expectTypesMatch } from "lib/typecheck"
3
3
  import { z } from "zod"
4
4
  import { baseGroupProps, type BaseGroupProps } from "./group"
5
5
 
6
- export interface PanelProps extends BaseGroupProps {
7
- width: Distance
8
- height: Distance
6
+ export interface PanelProps
7
+ extends Omit<BaseGroupProps, "height" | "layoutMode" | "width"> {
8
+ width?: Distance
9
+ height?: Distance
9
10
  children?: BaseGroupProps["children"]
10
11
  /**
11
12
  * If true, prevent a solder mask from being applied to this panel.
@@ -15,6 +16,11 @@ export interface PanelProps extends BaseGroupProps {
15
16
  panelizationMethod?: "tab-routing" | "none"
16
17
  /** Gap between boards in a panel */
17
18
  boardGap?: Distance
19
+ layoutMode?: "grid" | "pack" | "none"
20
+ row?: number
21
+ col?: number
22
+ cellWidth?: Distance
23
+ cellHeight?: Distance
18
24
  tabWidth?: Distance
19
25
  tabLength?: Distance
20
26
  mouseBites?: boolean
@@ -24,15 +30,21 @@ export const panelProps = baseGroupProps
24
30
  .omit({
25
31
  width: true,
26
32
  height: true,
33
+ layoutMode: true,
27
34
  children: true,
28
35
  })
29
36
  .extend({
30
- width: distance,
31
- height: distance,
37
+ width: distance.optional(),
38
+ height: distance.optional(),
32
39
  children: z.any().optional(),
33
40
  noSolderMask: z.boolean().optional(),
34
41
  panelizationMethod: z.enum(["tab-routing", "none"]).optional(),
35
42
  boardGap: distance.optional(),
43
+ layoutMode: z.enum(["grid", "pack", "none"]).optional(),
44
+ row: z.number().optional(),
45
+ col: z.number().optional(),
46
+ cellWidth: distance.optional(),
47
+ cellHeight: distance.optional(),
36
48
  tabWidth: distance.optional(),
37
49
  tabLength: distance.optional(),
38
50
  mouseBites: z.boolean().optional(),
@@ -0,0 +1,10 @@
1
+ import { expectTypesMatch } from "lib/typecheck"
2
+ import { z } from "zod"
3
+ import { panelProps, type PanelProps } from "./panel"
4
+
5
+ export interface SubpanelProps extends PanelProps {}
6
+
7
+ export const subpanelProps = panelProps
8
+
9
+ type InferredSubpanelProps = z.input<typeof subpanelProps>
10
+ expectTypesMatch<SubpanelProps, InferredSubpanelProps>(true)
@@ -0,0 +1,13 @@
1
+ import { expectTypesMatch } from "lib/typecheck"
2
+ import { z } from "zod"
3
+
4
+ export interface ToolingrailProps {
5
+ children?: any
6
+ }
7
+
8
+ export const toolingrailProps = z.object({
9
+ children: z.any().optional(),
10
+ })
11
+
12
+ type InferredToolingrailProps = z.input<typeof toolingrailProps>
13
+ expectTypesMatch<ToolingrailProps, InferredToolingrailProps>(true)
package/lib/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from "./common/schematicSize"
17
17
 
18
18
  export * from "./components/board"
19
19
  export * from "./components/panel"
20
+ export * from "./components/subpanel"
20
21
  export * from "./components/breakout"
21
22
  export * from "./components/chip"
22
23
  export * from "./components/pinout"
@@ -37,6 +38,7 @@ export * from "./components/stampboard"
37
38
  export * from "./components/capacitor"
38
39
  export * from "./components/group"
39
40
  export * from "./components/net"
41
+ export * from "./components/fiducial"
40
42
  export * from "./components/constrainedlayout"
41
43
  export * from "./components/constraint"
42
44
  export * from "./components/cutout"
@@ -78,6 +80,7 @@ export * from "./components/power-source"
78
80
  export * from "./components/voltagesource"
79
81
  export * from "./components/voltageprobe"
80
82
  export * from "./components/schematic-arc"
83
+ export * from "./components/toolingrail"
81
84
  export * from "./components/schematic-box"
82
85
  export * from "./components/schematic-circle"
83
86
  export * from "./components/schematic-rect"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.423",
3
+ "version": "0.0.425",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",