@tscircuit/props 0.0.260 → 0.0.262

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/dist/index.js CHANGED
@@ -102,6 +102,15 @@ var supplierProps = z6.object({
102
102
  supplierPartNumbers: z6.record(supplier_name, z6.array(z6.string())).optional()
103
103
  });
104
104
  expectTypesMatch(true);
105
+ var pinAttributeMap = z6.object({
106
+ providesPower: z6.boolean().optional(),
107
+ requiresPower: z6.boolean().optional(),
108
+ providesGround: z6.boolean().optional(),
109
+ requiresGround: z6.boolean().optional(),
110
+ providesVoltage: z6.union([z6.string(), z6.number()]).optional(),
111
+ requiresVoltage: z6.union([z6.string(), z6.number()]).optional()
112
+ });
113
+ expectTypesMatch(true);
105
114
  var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
106
115
  key: z6.any().optional(),
107
116
  name: z6.string(),
@@ -109,7 +118,7 @@ var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
109
118
  children: z6.any().optional(),
110
119
  symbolName: z6.string().optional(),
111
120
  doNotPlace: z6.boolean().optional(),
112
- pinAttributes: z6.record(z6.string(), z6.record(z6.string(), z6.any())).optional()
121
+ pinAttributes: z6.record(z6.string(), pinAttributeMap).optional()
113
122
  });
114
123
  expectTypesMatch(true);
115
124
  var componentProps = commonComponentProps;
@@ -1043,8 +1052,20 @@ expectTypesMatch(true);
1043
1052
 
1044
1053
  // lib/components/transistor.ts
1045
1054
  import { z as z54 } from "zod";
1055
+ var transistorPinsLabels = [
1056
+ "pin1",
1057
+ "pin2",
1058
+ "pin3",
1059
+ "emitter",
1060
+ "collector",
1061
+ "base",
1062
+ "gate",
1063
+ "source",
1064
+ "drain"
1065
+ ];
1046
1066
  var transistorProps = commonComponentProps.extend({
1047
- type: z54.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"])
1067
+ type: z54.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
1068
+ connections: createConnectionsProp(transistorPinsLabels).optional()
1048
1069
  });
1049
1070
  var transistorPins = [
1050
1071
  "pin1",
@@ -1624,6 +1645,7 @@ export {
1624
1645
  pcbXDistConstraintProps,
1625
1646
  pcbYDistConstraintProps,
1626
1647
  pillSmtPadProps,
1648
+ pinAttributeMap,
1627
1649
  pinCompatibleVariant,
1628
1650
  pinHeaderProps,
1629
1651
  pinLabelsProp,
@@ -1678,6 +1700,7 @@ export {
1678
1700
  traceHintProps,
1679
1701
  traceProps,
1680
1702
  transistorPins,
1703
+ transistorPinsLabels,
1681
1704
  transistorProps,
1682
1705
  viaProps
1683
1706
  };