@tscircuit/props 0.0.210 → 0.0.211
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 +30 -0
- package/dist/index.d.ts +692 -7
- package/dist/index.js +408 -387
- package/dist/index.js.map +1 -1
- package/lib/components/breakout.ts +25 -0
- package/lib/components/breakoutpoint.ts +17 -0
- package/lib/index.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { distance } from "circuit-json"
|
|
2
|
+
import type { Distance } from "lib/common/distance"
|
|
3
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
4
|
+
import { z } from "zod"
|
|
5
|
+
import { subcircuitGroupProps, type SubcircuitGroupProps } from "./group"
|
|
6
|
+
|
|
7
|
+
export interface BreakoutProps
|
|
8
|
+
extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
9
|
+
padding?: Distance
|
|
10
|
+
paddingLeft?: Distance
|
|
11
|
+
paddingRight?: Distance
|
|
12
|
+
paddingTop?: Distance
|
|
13
|
+
paddingBottom?: Distance
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const breakoutProps = subcircuitGroupProps.extend({
|
|
17
|
+
padding: distance.optional(),
|
|
18
|
+
paddingLeft: distance.optional(),
|
|
19
|
+
paddingRight: distance.optional(),
|
|
20
|
+
paddingTop: distance.optional(),
|
|
21
|
+
paddingBottom: distance.optional(),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
type InferredBreakoutProps = z.input<typeof breakoutProps>
|
|
25
|
+
expectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { pcbLayoutProps, type PcbLayoutProps } from "lib/common/layout"
|
|
2
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
3
|
+
import { z } from "zod"
|
|
4
|
+
|
|
5
|
+
export interface BreakoutPointProps
|
|
6
|
+
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
7
|
+
connection: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const breakoutPointProps = pcbLayoutProps
|
|
11
|
+
.omit({ pcbRotation: true, layer: true })
|
|
12
|
+
.extend({
|
|
13
|
+
connection: z.string(),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
type InferredBreakoutPointProps = z.input<typeof breakoutPointProps>
|
|
17
|
+
expectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)
|
package/lib/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./common/schematicPinStyle"
|
|
|
9
9
|
export * from "./common/cadModel"
|
|
10
10
|
|
|
11
11
|
export * from "./components/board"
|
|
12
|
+
export * from "./components/breakout"
|
|
12
13
|
export * from "./components/chip"
|
|
13
14
|
export * from "./components/jumper"
|
|
14
15
|
export * from "./components/connector"
|
|
@@ -48,6 +49,7 @@ export * from "./components/fabrication-note-path"
|
|
|
48
49
|
export * from "./components/pcb-trace"
|
|
49
50
|
export * from "./components/via"
|
|
50
51
|
export * from "./components/testpoint"
|
|
52
|
+
export * from "./components/breakoutpoint"
|
|
51
53
|
export * from "./components/pcb-keepout"
|
|
52
54
|
export * from "./components/power-source"
|
|
53
55
|
export * from "./components/schematic-box"
|