Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions generated/COMPONENT_TYPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface CadModelBase {
pcbRotationOffset?: number
zOffsetFromSurface?: Distance
showAsTranslucentModel?: boolean
stepUrl?: string
}
export const cadModelBase = z.object({
rotationOffset: z.number().or(rotationPoint3).optional(),
Expand All @@ -49,6 +50,7 @@ export const cadModelBase = z.object({
pcbRotationOffset: z.number().optional(),
zOffsetFromSurface: distance.optional(),
showAsTranslucentModel: z.boolean().optional(),
stepUrl: url.optional(),
})
export interface CadModelStl extends CadModelBase {
stlUrl: string
Expand Down Expand Up @@ -1082,6 +1084,7 @@ export interface ChipPropsSU<
PinLabel extends SchematicPinLabel = SchematicPinLabel,
> extends CommonComponentProps<PinLabel> {
manufacturerPartNumber?: string
standard?: string
pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>
showPinAliases?: boolean
pcbPinLabels?: Record<string, string>
Expand Down Expand Up @@ -1120,6 +1123,7 @@ export const pinCompatibleVariant = z.object({
})
export const chipProps = commonComponentProps.extend({
manufacturerPartNumber: z.string().optional(),
standard: z.string().optional(),
pinLabels: pinLabelsProp.optional(),
showPinAliases: z.boolean().optional(),
pcbPinLabels: z.record(z.string(), z.string()).optional(),
Expand All @@ -1142,41 +1146,13 @@ export const chipProps = commonComponentProps.extend({
### connector

```typescript
export interface ConnectorProps extends CommonComponentProps {
manufacturerPartNumber?: string
pinLabels?: Record<
number | SchematicPinLabel,
SchematicPinLabel | SchematicPinLabel[]
>
schPinStyle?: SchematicPinStyle
schPinSpacing?: number | string
schWidth?: number | string
schHeight?: number | string
schDirection?: "left" | "right"
schPortArrangement?: SchematicPortArrangement
internallyConnectedPins?: (string | number)[][]
export interface ConnectorProps extends ChipPropsSU {
standard?: "usb_c" | "m2"
}
/**
* Connector standard, e.g. usb_c, m2
*/
export const connectorProps = commonComponentProps.extend({
manufacturerPartNumber: z.string().optional(),
pinLabels: z
.record(
z.number().or(schematicPinLabel),
schematicPinLabel.or(z.array(schematicPinLabel)),
)
.optional(),
schPinStyle: schematicPinStyle.optional(),
schPinSpacing: distance.optional(),
schWidth: distance.optional(),
schHeight: distance.optional(),
schDirection: z.enum(["left", "right"]).optional(),
schPortArrangement: schematicPortArrangement.optional(),
internallyConnectedPins: z
.array(z.array(z.union([z.string(), z.number()])))
.optional(),
export const connectorProps = chipProps.extend({
standard: z.enum(["usb_c", "m2"]).optional(),
})
```
Expand Down Expand Up @@ -1943,6 +1919,13 @@ export type PartsEngine = {
sourceComponent: AnySourceComponent
footprinterString?: string
}) => Promise<SupplierPartNumbers> | SupplierPartNumbers
fetchPartCircuitJson?: (params: {
supplierPartNumber?: string
manufacturerPartNumber?: string
}) =>
| Promise<AnyCircuitElement[] | undefined>
| AnyCircuitElement[]
| undefined
}
export interface PcbRouteCache {
pcbTraces: PcbTrace[]
Expand Down
20 changes: 3 additions & 17 deletions generated/PROPS_OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ export interface CadModelBase {
pcbRotationOffset?: number
zOffsetFromSurface?: Distance
showAsTranslucentModel?: boolean
stepUrl?: string
}


Expand Down Expand Up @@ -379,6 +380,7 @@ export interface ChipPropsSU<
PinLabel extends SchematicPinLabel = SchematicPinLabel,
> extends CommonComponentProps<PinLabel> {
manufacturerPartNumber?: string
standard?: string
pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>
/**
* Whether to show pin aliases in the schematic
Expand Down Expand Up @@ -564,23 +566,7 @@ export interface CommonLayoutProps {
}


export interface ConnectorProps extends CommonComponentProps {
manufacturerPartNumber?: string
pinLabels?: Record<
number | SchematicPinLabel,
SchematicPinLabel | SchematicPinLabel[]
>
schPinStyle?: SchematicPinStyle
schPinSpacing?: number | string
schWidth?: number | string
schHeight?: number | string
schDirection?: "left" | "right"
schPortArrangement?: SchematicPortArrangement
/**
* Groups of pins that are internally connected
* e.g., [["1","2"], ["2","3"]]
*/
internallyConnectedPins?: (string | number)[][]
export interface ConnectorProps extends ChipPropsSU {
/**
* Connector standard, e.g. usb_c, m2
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/components/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface ChipPropsSU<
PinLabel extends SchematicPinLabel = SchematicPinLabel,
> extends CommonComponentProps<PinLabel> {
manufacturerPartNumber?: string
standard?: string
pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>
/**
* Whether to show pin aliases in the schematic
Expand Down Expand Up @@ -135,6 +136,7 @@ export const pinCompatibleVariant = z.object({

export const chipProps = commonComponentProps.extend({
manufacturerPartNumber: z.string().optional(),
standard: z.string().optional(),
pinLabels: pinLabelsProp.optional(),
showPinAliases: z.boolean().optional(),
pcbPinLabels: z.record(z.string(), z.string()).optional(),
Expand Down