@tscircuit/props 0.0.470 → 0.0.472
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 +2 -1
- package/dist/index.d.ts +220 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/lib/components/mountedboard.ts +27 -1
- package/lib/components/port.ts +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
import { distance, type Distance } from "lib/common/distance"
|
|
2
2
|
import { expectTypesMatch } from "lib/typecheck"
|
|
3
3
|
import { z } from "zod"
|
|
4
|
+
import type { ChipPropsSU } from "./chip"
|
|
5
|
+
import { chipProps } from "./chip"
|
|
4
6
|
import { subcircuitGroupProps, type SubcircuitGroupProps } from "./group"
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
type MountedBoardChipProps = Pick<
|
|
9
|
+
ChipPropsSU,
|
|
10
|
+
| "manufacturerPartNumber"
|
|
11
|
+
| "pinLabels"
|
|
12
|
+
| "showPinAliases"
|
|
13
|
+
| "pcbPinLabels"
|
|
14
|
+
| "schPortArrangement"
|
|
15
|
+
| "pinCompatibleVariants"
|
|
16
|
+
| "noSchematicRepresentation"
|
|
17
|
+
| "internallyConnectedPins"
|
|
18
|
+
| "externallyConnectedPins"
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
export interface MountedBoardProps
|
|
22
|
+
extends SubcircuitGroupProps,
|
|
23
|
+
MountedBoardChipProps {
|
|
7
24
|
boardToBoardDistance?: Distance
|
|
8
25
|
mountOrientation?: "faceDown" | "faceUp"
|
|
9
26
|
}
|
|
10
27
|
|
|
11
28
|
export const mountedboardProps = subcircuitGroupProps.extend({
|
|
29
|
+
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
30
|
+
pinLabels: chipProps.shape.pinLabels,
|
|
31
|
+
showPinAliases: chipProps.shape.showPinAliases,
|
|
32
|
+
pcbPinLabels: chipProps.shape.pcbPinLabels,
|
|
33
|
+
schPortArrangement: chipProps.shape.schPortArrangement,
|
|
34
|
+
pinCompatibleVariants: chipProps.shape.pinCompatibleVariants,
|
|
35
|
+
noSchematicRepresentation: chipProps.shape.noSchematicRepresentation,
|
|
36
|
+
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
37
|
+
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
12
38
|
boardToBoardDistance: distance.optional(),
|
|
13
39
|
mountOrientation: z.enum(["faceDown", "faceUp"]).optional(),
|
|
14
40
|
})
|
package/lib/components/port.ts
CHANGED
|
@@ -10,5 +10,6 @@ export const portProps = commonLayoutProps.extend({
|
|
|
10
10
|
direction: direction,
|
|
11
11
|
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
12
12
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
13
|
+
hasInversionCircle: z.boolean().optional(),
|
|
13
14
|
})
|
|
14
15
|
export type PortProps = z.input<typeof portProps>
|