@tscircuit/props 0.0.423 → 0.0.424
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.
- package/README.md +37 -3
- package/dist/index.d.ts +7664 -5416
- package/dist/index.js +539 -508
- package/dist/index.js.map +1 -1
- package/lib/components/fiducial.ts +20 -0
- package/lib/components/panel.ts +21 -5
- package/lib/components/subpanel.ts +10 -0
- package/lib/components/toolingrail.ts +13 -0
- package/lib/index.ts +3 -0
- package/package.json +1 -1
|
@@ -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)
|
package/lib/components/panel.ts
CHANGED
|
@@ -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
|
|
7
|
-
width
|
|
8
|
-
|
|
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,13 @@ export interface PanelProps extends BaseGroupProps {
|
|
|
15
16
|
panelizationMethod?: "tab-routing" | "none"
|
|
16
17
|
/** Gap between boards in a panel */
|
|
17
18
|
boardGap?: Distance
|
|
19
|
+
boardAreaWidth?: Distance
|
|
20
|
+
boardAreaHeight?: Distance
|
|
21
|
+
layoutMode?: "grid" | "pack" | "none"
|
|
22
|
+
row?: number
|
|
23
|
+
col?: number
|
|
24
|
+
cellWidth?: Distance
|
|
25
|
+
cellHeight?: Distance
|
|
18
26
|
tabWidth?: Distance
|
|
19
27
|
tabLength?: Distance
|
|
20
28
|
mouseBites?: boolean
|
|
@@ -24,15 +32,23 @@ export const panelProps = baseGroupProps
|
|
|
24
32
|
.omit({
|
|
25
33
|
width: true,
|
|
26
34
|
height: true,
|
|
35
|
+
layoutMode: true,
|
|
27
36
|
children: true,
|
|
28
37
|
})
|
|
29
38
|
.extend({
|
|
30
|
-
width: distance,
|
|
31
|
-
height: distance,
|
|
39
|
+
width: distance.optional(),
|
|
40
|
+
height: distance.optional(),
|
|
32
41
|
children: z.any().optional(),
|
|
33
42
|
noSolderMask: z.boolean().optional(),
|
|
34
43
|
panelizationMethod: z.enum(["tab-routing", "none"]).optional(),
|
|
35
44
|
boardGap: distance.optional(),
|
|
45
|
+
boardAreaWidth: distance.optional(),
|
|
46
|
+
boardAreaHeight: distance.optional(),
|
|
47
|
+
layoutMode: z.enum(["grid", "pack", "none"]).optional(),
|
|
48
|
+
row: z.number().optional(),
|
|
49
|
+
col: z.number().optional(),
|
|
50
|
+
cellWidth: distance.optional(),
|
|
51
|
+
cellHeight: distance.optional(),
|
|
36
52
|
tabWidth: distance.optional(),
|
|
37
53
|
tabLength: distance.optional(),
|
|
38
54
|
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"
|