@tscircuit/props 0.0.258 → 0.0.260
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 +13 -6
- package/dist/index.d.ts +16 -6
- package/dist/index.js +450 -438
- package/dist/index.js.map +1 -1
- package/lib/common/schematicPinLabel.ts +8 -0
- package/lib/components/chip.ts +12 -5
- package/lib/components/connector.ts +12 -2
- package/lib/components/jumper.ts +12 -2
- package/lib/components/led.ts +2 -5
- package/lib/components/pin-header.ts +6 -2
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -211,10 +211,11 @@ export interface CapacitorProps<PinLabel extends string = string>
|
|
|
211
211
|
### ChipProps `<chip />`
|
|
212
212
|
|
|
213
213
|
```ts
|
|
214
|
-
export interface ChipPropsSU<
|
|
215
|
-
extends
|
|
214
|
+
export interface ChipPropsSU<
|
|
215
|
+
PinLabel extends SchematicPinLabel = SchematicPinLabel,
|
|
216
|
+
> extends CommonComponentProps<PinLabel> {
|
|
216
217
|
manufacturerPartNumber?: string;
|
|
217
|
-
pinLabels?: PinLabelsProp<
|
|
218
|
+
pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>;
|
|
218
219
|
/**
|
|
219
220
|
* Whether to show pin aliases in the schematic
|
|
220
221
|
*/
|
|
@@ -245,7 +246,10 @@ export interface ChipPropsSU<PinLabel extends string = string>
|
|
|
245
246
|
```ts
|
|
246
247
|
export interface ConnectorProps extends CommonComponentProps {
|
|
247
248
|
manufacturerPartNumber?: string;
|
|
248
|
-
pinLabels?: Record<
|
|
249
|
+
pinLabels?: Record<
|
|
250
|
+
number | SchematicPinLabel,
|
|
251
|
+
SchematicPinLabel | SchematicPinLabel[]
|
|
252
|
+
>;
|
|
249
253
|
schPinStyle?: SchematicPinStyle;
|
|
250
254
|
schPinSpacing?: number | string;
|
|
251
255
|
schWidth?: number | string;
|
|
@@ -445,7 +449,10 @@ export interface InductorProps<PinLabel extends string = string>
|
|
|
445
449
|
```ts
|
|
446
450
|
export interface JumperProps extends CommonComponentProps {
|
|
447
451
|
manufacturerPartNumber?: string;
|
|
448
|
-
pinLabels?: Record<
|
|
452
|
+
pinLabels?: Record<
|
|
453
|
+
number | SchematicPinLabel,
|
|
454
|
+
SchematicPinLabel | SchematicPinLabel[]
|
|
455
|
+
>;
|
|
449
456
|
schPinStyle?: SchematicPinStyle;
|
|
450
457
|
schPinSpacing?: number | string;
|
|
451
458
|
schWidth?: number | string;
|
|
@@ -580,7 +587,7 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
580
587
|
/**
|
|
581
588
|
* Labels for each pin
|
|
582
589
|
*/
|
|
583
|
-
pinLabels?:
|
|
590
|
+
pinLabels?: SchematicPinLabel[];
|
|
584
591
|
|
|
585
592
|
/**
|
|
586
593
|
* Connections to other components
|
package/dist/index.d.ts
CHANGED
|
@@ -1825,6 +1825,13 @@ declare const schematicPinStyle: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
1825
1825
|
bottomMargin?: string | number | undefined;
|
|
1826
1826
|
}>>;
|
|
1827
1827
|
|
|
1828
|
+
/**
|
|
1829
|
+
* Valid pin label string. Must consist only of letters,
|
|
1830
|
+
* numbers, or underscores.
|
|
1831
|
+
*/
|
|
1832
|
+
declare const schematicPinLabel: z.ZodString;
|
|
1833
|
+
type SchematicPinLabel = z.infer<typeof schematicPinLabel>;
|
|
1834
|
+
|
|
1828
1835
|
type Distance = number | string;
|
|
1829
1836
|
|
|
1830
1837
|
declare const base_manual_edit_event: z.ZodObject<{
|
|
@@ -8087,9 +8094,9 @@ interface PinCompatibleVariant {
|
|
|
8087
8094
|
manufacturerPartNumber?: string;
|
|
8088
8095
|
supplierPartNumber?: SupplierPartNumbers;
|
|
8089
8096
|
}
|
|
8090
|
-
interface ChipPropsSU<PinLabel extends
|
|
8097
|
+
interface ChipPropsSU<PinLabel extends SchematicPinLabel = SchematicPinLabel> extends CommonComponentProps<PinLabel> {
|
|
8091
8098
|
manufacturerPartNumber?: string;
|
|
8092
|
-
pinLabels?: PinLabelsProp<
|
|
8099
|
+
pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>;
|
|
8093
8100
|
/**
|
|
8094
8101
|
* Whether to show pin aliases in the schematic
|
|
8095
8102
|
*/
|
|
@@ -9765,7 +9772,7 @@ type InferredChipProps = z.input<typeof chipProps>;
|
|
|
9765
9772
|
|
|
9766
9773
|
interface JumperProps extends CommonComponentProps {
|
|
9767
9774
|
manufacturerPartNumber?: string;
|
|
9768
|
-
pinLabels?: Record<number |
|
|
9775
|
+
pinLabels?: Record<number | SchematicPinLabel, SchematicPinLabel | SchematicPinLabel[]>;
|
|
9769
9776
|
schPinStyle?: SchematicPinStyle;
|
|
9770
9777
|
schPinSpacing?: number | string;
|
|
9771
9778
|
schWidth?: number | string;
|
|
@@ -11071,7 +11078,7 @@ declare const solderjumperProps: z.ZodObject<{
|
|
|
11071
11078
|
|
|
11072
11079
|
interface ConnectorProps extends CommonComponentProps {
|
|
11073
11080
|
manufacturerPartNumber?: string;
|
|
11074
|
-
pinLabels?: Record<number |
|
|
11081
|
+
pinLabels?: Record<number | SchematicPinLabel, SchematicPinLabel | SchematicPinLabel[]>;
|
|
11075
11082
|
schPinStyle?: SchematicPinStyle;
|
|
11076
11083
|
schPinSpacing?: number | string;
|
|
11077
11084
|
schWidth?: number | string;
|
|
@@ -17384,7 +17391,7 @@ interface PinHeaderProps extends CommonComponentProps {
|
|
|
17384
17391
|
/**
|
|
17385
17392
|
* Labels for each pin
|
|
17386
17393
|
*/
|
|
17387
|
-
pinLabels?:
|
|
17394
|
+
pinLabels?: SchematicPinLabel[];
|
|
17388
17395
|
/**
|
|
17389
17396
|
* Connections to other components
|
|
17390
17397
|
*/
|
|
@@ -22001,6 +22008,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
22001
22008
|
schDisplayValue: z.ZodOptional<z.ZodString>;
|
|
22002
22009
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
22003
22010
|
connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
22011
|
+
laser: z.ZodOptional<z.ZodBoolean>;
|
|
22004
22012
|
}, "strip", z.ZodTypeAny, {
|
|
22005
22013
|
name: string;
|
|
22006
22014
|
pcbX?: number | undefined;
|
|
@@ -22075,6 +22083,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
22075
22083
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
22076
22084
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
22077
22085
|
schDisplayValue?: string | undefined;
|
|
22086
|
+
laser?: boolean | undefined;
|
|
22078
22087
|
}, {
|
|
22079
22088
|
name: string;
|
|
22080
22089
|
pcbX?: string | number | undefined;
|
|
@@ -22151,6 +22160,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
22151
22160
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
22152
22161
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
22153
22162
|
schDisplayValue?: string | undefined;
|
|
22163
|
+
laser?: boolean | undefined;
|
|
22154
22164
|
}>;
|
|
22155
22165
|
declare const ledPins: readonly ["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"];
|
|
22156
22166
|
type LedProps = z.input<typeof ledProps>;
|
|
@@ -24817,4 +24827,4 @@ interface PlatformConfig {
|
|
|
24817
24827
|
}
|
|
24818
24828
|
declare const platformConfig: z.ZodType<PlatformConfig>;
|
|
24819
24829
|
|
|
24820
|
-
export { type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorProps, viaProps };
|
|
24830
|
+
export { type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinLabel, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorProps, viaProps };
|