@tscircuit/props 0.0.249 → 0.0.250

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 CHANGED
@@ -45,6 +45,9 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput)
45
45
  | `<potentiometer />` | [`PotentiometerProps`](#potentiometerprops-potentiometer) |
46
46
  | `<resistor />` | [`ResistorProps`](#resistorprops-resistor) |
47
47
  | `<resonator />` | [`ResonatorProps`](#resonatorprops-resonator) |
48
+ | `<schematiccell />` | [`SchematicCellProps`](#schematiccellprops-schematiccell) |
49
+ | `<schematicrow />` | [`SchematicRowProps`](#schematicrowprops-schematicrow) |
50
+ | `<schematictable />` | [`SchematicTableProps`](#schematictableprops-schematictable) |
48
51
  | `<smtpad />` | [`RectSmtPadProps`](#rectsmtpadprops-smtpad) |
49
52
  | `<solderjumper />` | [`SolderJumperProps`](#solderjumperprops-solderjumper) |
50
53
  | `<solderpaste />` | [`RectSolderPasteProps`](#rectsolderpasteprops-solderpaste) |
@@ -684,6 +687,51 @@ export interface ResonatorProps extends CommonComponentProps {
684
687
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/resonator.ts)
685
688
 
686
689
 
690
+ ### SchematicCellProps `<schematiccell />`
691
+
692
+ ```ts
693
+ export interface SchematicCellProps {
694
+ children: string
695
+ horizontalAlign?: "left" | "center" | "right"
696
+ verticalAlign?: "top" | "middle" | "bottom"
697
+ fontSize?: number | string
698
+ }
699
+ ```
700
+
701
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-cell.ts)
702
+
703
+
704
+ ### SchematicRowProps `<schematicrow />`
705
+
706
+ ```ts
707
+ export interface SchematicRowProps {
708
+ children?: any
709
+ height?: number | string
710
+ }
711
+ ```
712
+
713
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-row.ts)
714
+
715
+
716
+ ### SchematicTableProps `<schematictable />`
717
+
718
+ ```ts
719
+ export interface SchematicTableProps {
720
+ schX?: number | string
721
+ schY?: number | string
722
+ children?: any
723
+ columnWidths?: (number | string)[]
724
+ rowHeights?: (number | string)[]
725
+ cellPadding?: number | string
726
+ borderWidth?: number | string
727
+ anchor?: z.infer<typeof ninePointAnchor>
728
+ fontSize?: number | string
729
+ }
730
+ ```
731
+
732
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-table.ts)
733
+
734
+
687
735
  ### RectSmtPadProps `<smtpad />`
688
736
 
689
737
  ```ts
package/dist/index.d.ts CHANGED
@@ -24219,6 +24219,81 @@ declare const schematicPathProps: z.ZodObject<{
24219
24219
  }>;
24220
24220
  type SchematicPathProps = z.input<typeof schematicPathProps>;
24221
24221
 
24222
+ declare const ninePointAnchor: z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>;
24223
+
24224
+ declare const schematicTableProps: z.ZodObject<{
24225
+ schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24226
+ schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24227
+ children: z.ZodOptional<z.ZodAny>;
24228
+ cellPadding: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24229
+ borderWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24230
+ anchor: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
24231
+ fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24232
+ }, "strip", z.ZodTypeAny, {
24233
+ anchor?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center" | undefined;
24234
+ schX?: number | undefined;
24235
+ schY?: number | undefined;
24236
+ children?: any;
24237
+ fontSize?: number | undefined;
24238
+ cellPadding?: number | undefined;
24239
+ borderWidth?: number | undefined;
24240
+ }, {
24241
+ anchor?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center" | undefined;
24242
+ schX?: string | number | undefined;
24243
+ schY?: string | number | undefined;
24244
+ children?: any;
24245
+ fontSize?: string | number | undefined;
24246
+ cellPadding?: string | number | undefined;
24247
+ borderWidth?: string | number | undefined;
24248
+ }>;
24249
+ interface SchematicTableProps {
24250
+ schX?: number | string;
24251
+ schY?: number | string;
24252
+ children?: any;
24253
+ cellPadding?: number | string;
24254
+ borderWidth?: number | string;
24255
+ anchor?: z.infer<typeof ninePointAnchor>;
24256
+ fontSize?: number | string;
24257
+ }
24258
+
24259
+ declare const schematicRowProps: z.ZodObject<{
24260
+ children: z.ZodOptional<z.ZodAny>;
24261
+ height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24262
+ }, "strip", z.ZodTypeAny, {
24263
+ children?: any;
24264
+ height?: number | undefined;
24265
+ }, {
24266
+ children?: any;
24267
+ height?: string | number | undefined;
24268
+ }>;
24269
+ interface SchematicRowProps {
24270
+ children?: any;
24271
+ height?: number | string;
24272
+ }
24273
+
24274
+ declare const schematicCellProps: z.ZodObject<{
24275
+ children: z.ZodString;
24276
+ horizontalAlign: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
24277
+ verticalAlign: z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>;
24278
+ fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24279
+ }, "strip", z.ZodTypeAny, {
24280
+ children: string;
24281
+ fontSize?: number | undefined;
24282
+ horizontalAlign?: "left" | "right" | "center" | undefined;
24283
+ verticalAlign?: "top" | "bottom" | "middle" | undefined;
24284
+ }, {
24285
+ children: string;
24286
+ fontSize?: string | number | undefined;
24287
+ horizontalAlign?: "left" | "right" | "center" | undefined;
24288
+ verticalAlign?: "top" | "bottom" | "middle" | undefined;
24289
+ }>;
24290
+ interface SchematicCellProps {
24291
+ children: string;
24292
+ horizontalAlign?: "left" | "center" | "right";
24293
+ verticalAlign?: "top" | "middle" | "bottom";
24294
+ fontSize?: number | string;
24295
+ }
24296
+
24222
24297
  declare const silkscreenTextProps: z.ZodObject<z.objectUtil.extendShape<{
24223
24298
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
24224
24299
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -24727,6 +24802,4 @@ interface PlatformConfig {
24727
24802
  }
24728
24803
  declare const platformConfig: z.ZodType<PlatformConfig>;
24729
24804
 
24730
- declare const ninePointAnchor: z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>;
24731
-
24732
- 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 SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, 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, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorProps, viaProps };
24805
+ 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 };
package/dist/index.js CHANGED
@@ -1382,105 +1382,139 @@ var schematicPathProps = z71.object({
1382
1382
  fillColor: z71.enum(["red", "blue"]).optional()
1383
1383
  });
1384
1384
 
1385
+ // lib/components/schematic-table.ts
1386
+ import { distance as distance22 } from "circuit-json";
1387
+ import { z as z72 } from "zod";
1388
+ var schematicTableProps = z72.object({
1389
+ schX: distance22.optional(),
1390
+ schY: distance22.optional(),
1391
+ children: z72.any().optional(),
1392
+ cellPadding: distance22.optional(),
1393
+ borderWidth: distance22.optional(),
1394
+ anchor: ninePointAnchor.optional(),
1395
+ fontSize: distance22.optional()
1396
+ });
1397
+ expectTypesMatch(true);
1398
+
1399
+ // lib/components/schematic-row.ts
1400
+ import { distance as distance23 } from "circuit-json";
1401
+ import { z as z73 } from "zod";
1402
+ var schematicRowProps = z73.object({
1403
+ children: z73.any().optional(),
1404
+ height: distance23.optional()
1405
+ });
1406
+ expectTypesMatch(true);
1407
+
1408
+ // lib/components/schematic-cell.ts
1409
+ import { distance as distance24 } from "circuit-json";
1410
+ import { z as z74 } from "zod";
1411
+ var schematicCellProps = z74.object({
1412
+ children: z74.string(),
1413
+ horizontalAlign: z74.enum(["left", "center", "right"]).optional(),
1414
+ verticalAlign: z74.enum(["top", "middle", "bottom"]).optional(),
1415
+ fontSize: distance24.optional()
1416
+ });
1417
+ expectTypesMatch(true);
1418
+
1385
1419
  // lib/components/silkscreen-text.ts
1386
1420
  import { length as length5 } from "circuit-json";
1387
- import { z as z72 } from "zod";
1421
+ import { z as z75 } from "zod";
1388
1422
  var silkscreenTextProps = pcbLayoutProps.extend({
1389
- text: z72.string(),
1423
+ text: z75.string(),
1390
1424
  anchorAlignment: ninePointAnchor.default("center"),
1391
- font: z72.enum(["tscircuit2024"]).optional(),
1425
+ font: z75.enum(["tscircuit2024"]).optional(),
1392
1426
  fontSize: length5.optional()
1393
1427
  });
1394
1428
 
1395
1429
  // lib/components/silkscreen-path.ts
1396
1430
  import { length as length6, route_hint_point as route_hint_point5 } from "circuit-json";
1397
- import { z as z73 } from "zod";
1431
+ import { z as z76 } from "zod";
1398
1432
  var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1399
- route: z73.array(route_hint_point5),
1433
+ route: z76.array(route_hint_point5),
1400
1434
  strokeWidth: length6.optional()
1401
1435
  });
1402
1436
 
1403
1437
  // lib/components/silkscreen-line.ts
1404
- import { distance as distance22 } from "circuit-json";
1438
+ import { distance as distance25 } from "circuit-json";
1405
1439
  var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1406
- strokeWidth: distance22,
1407
- x1: distance22,
1408
- y1: distance22,
1409
- x2: distance22,
1410
- y2: distance22
1440
+ strokeWidth: distance25,
1441
+ x1: distance25,
1442
+ y1: distance25,
1443
+ x2: distance25,
1444
+ y2: distance25
1411
1445
  });
1412
1446
 
1413
1447
  // lib/components/silkscreen-rect.ts
1414
- import { distance as distance23 } from "circuit-json";
1415
- import { z as z74 } from "zod";
1448
+ import { distance as distance26 } from "circuit-json";
1449
+ import { z as z77 } from "zod";
1416
1450
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1417
- filled: z74.boolean().default(true).optional(),
1418
- stroke: z74.enum(["dashed", "solid", "none"]).optional(),
1419
- strokeWidth: distance23.optional(),
1420
- width: distance23,
1421
- height: distance23
1451
+ filled: z77.boolean().default(true).optional(),
1452
+ stroke: z77.enum(["dashed", "solid", "none"]).optional(),
1453
+ strokeWidth: distance26.optional(),
1454
+ width: distance26,
1455
+ height: distance26
1422
1456
  });
1423
1457
 
1424
1458
  // lib/components/silkscreen-circle.ts
1425
- import { distance as distance24 } from "circuit-json";
1426
- import { z as z75 } from "zod";
1459
+ import { distance as distance27 } from "circuit-json";
1460
+ import { z as z78 } from "zod";
1427
1461
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1428
- isFilled: z75.boolean().optional(),
1429
- isOutline: z75.boolean().optional(),
1430
- strokeWidth: distance24.optional(),
1431
- radius: distance24
1462
+ isFilled: z78.boolean().optional(),
1463
+ isOutline: z78.boolean().optional(),
1464
+ strokeWidth: distance27.optional(),
1465
+ radius: distance27
1432
1466
  });
1433
1467
 
1434
1468
  // lib/components/trace-hint.ts
1435
- import { distance as distance25, layer_ref as layer_ref6, route_hint_point as route_hint_point6 } from "circuit-json";
1436
- import { z as z76 } from "zod";
1437
- var routeHintPointProps = z76.object({
1438
- x: distance25,
1439
- y: distance25,
1440
- via: z76.boolean().optional(),
1469
+ import { distance as distance28, layer_ref as layer_ref6, route_hint_point as route_hint_point6 } from "circuit-json";
1470
+ import { z as z79 } from "zod";
1471
+ var routeHintPointProps = z79.object({
1472
+ x: distance28,
1473
+ y: distance28,
1474
+ via: z79.boolean().optional(),
1441
1475
  toLayer: layer_ref6.optional()
1442
1476
  });
1443
- var traceHintProps = z76.object({
1444
- for: z76.string().optional().describe(
1477
+ var traceHintProps = z79.object({
1478
+ for: z79.string().optional().describe(
1445
1479
  "Selector for the port you're targeting, not required if you're inside a trace"
1446
1480
  ),
1447
- order: z76.number().optional(),
1481
+ order: z79.number().optional(),
1448
1482
  offset: route_hint_point6.or(routeHintPointProps).optional(),
1449
- offsets: z76.array(route_hint_point6).or(z76.array(routeHintPointProps)).optional(),
1450
- traceWidth: z76.number().optional()
1483
+ offsets: z79.array(route_hint_point6).or(z79.array(routeHintPointProps)).optional(),
1484
+ traceWidth: z79.number().optional()
1451
1485
  });
1452
1486
 
1453
1487
  // lib/components/port.ts
1454
- import { z as z77 } from "zod";
1488
+ import { z as z80 } from "zod";
1455
1489
  var portProps = commonLayoutProps.extend({
1456
- name: z77.string(),
1457
- pinNumber: z77.number().optional(),
1458
- aliases: z77.array(z77.string()).optional(),
1490
+ name: z80.string(),
1491
+ pinNumber: z80.number().optional(),
1492
+ aliases: z80.array(z80.string()).optional(),
1459
1493
  direction
1460
1494
  });
1461
1495
 
1462
1496
  // lib/platformConfig.ts
1463
- import { z as z78 } from "zod";
1464
- var unvalidatedCircuitJson = z78.array(z78.any()).describe("Circuit JSON");
1465
- var pathToCircuitJsonFn = z78.function().args(z78.string()).returns(z78.promise(z78.object({ footprintCircuitJson: z78.array(z78.any()) }))).describe("A function that takes a path and returns Circuit JSON");
1466
- var platformConfig = z78.object({
1497
+ import { z as z81 } from "zod";
1498
+ var unvalidatedCircuitJson = z81.array(z81.any()).describe("Circuit JSON");
1499
+ var pathToCircuitJsonFn = z81.function().args(z81.string()).returns(z81.promise(z81.object({ footprintCircuitJson: z81.array(z81.any()) }))).describe("A function that takes a path and returns Circuit JSON");
1500
+ var platformConfig = z81.object({
1467
1501
  partsEngine: partsEngine.optional(),
1468
1502
  autorouter: autorouterProp.optional(),
1469
- registryApiUrl: z78.string().optional(),
1470
- cloudAutorouterUrl: z78.string().optional(),
1471
- projectName: z78.string().optional(),
1472
- version: z78.string().optional(),
1473
- url: z78.string().optional(),
1474
- printBoardInformationToSilkscreen: z78.boolean().optional(),
1475
- localCacheEngine: z78.any().optional(),
1476
- pcbDisabled: z78.boolean().optional(),
1477
- schematicDisabled: z78.boolean().optional(),
1478
- partsEngineDisabled: z78.boolean().optional(),
1479
- footprintLibraryMap: z78.record(
1480
- z78.string(),
1481
- z78.record(
1482
- z78.string(),
1483
- z78.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
1503
+ registryApiUrl: z81.string().optional(),
1504
+ cloudAutorouterUrl: z81.string().optional(),
1505
+ projectName: z81.string().optional(),
1506
+ version: z81.string().optional(),
1507
+ url: z81.string().optional(),
1508
+ printBoardInformationToSilkscreen: z81.boolean().optional(),
1509
+ localCacheEngine: z81.any().optional(),
1510
+ pcbDisabled: z81.boolean().optional(),
1511
+ schematicDisabled: z81.boolean().optional(),
1512
+ partsEngineDisabled: z81.boolean().optional(),
1513
+ footprintLibraryMap: z81.record(
1514
+ z81.string(),
1515
+ z81.record(
1516
+ z81.string(),
1517
+ z81.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
1484
1518
  )
1485
1519
  ).optional()
1486
1520
  });
@@ -1591,12 +1625,15 @@ export {
1591
1625
  rotationPoint3,
1592
1626
  routeHintPointProps,
1593
1627
  schematicBoxProps,
1628
+ schematicCellProps,
1594
1629
  schematicLineProps,
1595
1630
  schematicOrientation,
1596
1631
  schematicPathProps,
1597
1632
  schematicPinArrangement,
1598
1633
  schematicPinStyle,
1599
1634
  schematicPortArrangement,
1635
+ schematicRowProps,
1636
+ schematicTableProps,
1600
1637
  schematicTextProps,
1601
1638
  silkscreenCircleProps,
1602
1639
  silkscreenLineProps,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicOrientation.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/common/connectionsProp.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type FootprintProp, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: FootprintProp\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps<PinLabel extends string = string>\n extends CommonLayoutProps {\n key?: any\n name: string\n pinAttributes?: Record<PinLabel, Record<string, any>>\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n doNotPlace?: boolean\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n doNotPlace: z.boolean().optional(),\n pinAttributes: z\n .record(z.string(), z.record(z.string(), z.any()))\n .optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type FootprintProp = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<FootprintProp>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const schematicOrientation = z\n .enum([\n \"vertical\",\n \"horizontal\",\n \"pos_top\",\n \"pos_bottom\",\n \"pos_left\",\n \"pos_right\",\n \"neg_top\",\n \"neg_bottom\",\n \"neg_left\",\n \"neg_right\",\n ])\n .describe(\n \"horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)\",\n )\n\nexport type SchematicOrientation =\n | \"vertical\"\n | \"horizontal\"\n | \"pos_top\"\n | \"pos_bottom\"\n | \"pos_left\"\n | \"pos_right\"\n | \"neg_top\"\n | \"neg_bottom\"\n | \"neg_left\"\n | \"neg_right\"\n\nexpectTypesMatch<SchematicOrientation, z.infer<typeof schematicOrientation>>(\n true,\n)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\n SchematicPortArrangementWithPinCounts\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\n/**\n * @deprecated Use schematicPinArrangement instead.\n */\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexport const schematicPinArrangement = schematicPortArrangement\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { layer_ref, length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n padding: length.optional(),\n paddingLeft: length.optional(),\n paddingRight: length.optional(),\n paddingTop: length.optional(),\n paddingBottom: length.optional(),\n paddingX: length.optional(),\n paddingY: length.optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n paddingX?: Distance\n paddingY?: Distance\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n /**\n * Title to display above this group in the schematic view\n */\n schTitle?: string\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n traceClearance?: Distance\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\n preset?:\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n}\n\nexport type AutorouterProp =\n | AutorouterConfig\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n\nexport const autorouterConfig = z.object({\n serverUrl: z.string().optional(),\n inputFormat: z.enum([\"simplified\", \"circuit-json\"]).optional(),\n serverMode: z.enum([\"job\", \"solve-endpoint\"]).optional(),\n serverCacheEnabled: z.boolean().optional(),\n cache: z.custom<PcbRouteCache>((v) => true).optional(),\n traceClearance: length.optional(),\n groupMode: z.enum([\"sequential-trace\", \"subcircuit\"]).optional(),\n algorithmFn: z\n .custom<(simpleRouteJson: any) => Promise<any>>(\n (v) => typeof v === \"function\" || v === undefined,\n )\n .optional(),\n preset: z\n .enum([\n \"sequential-trace\",\n \"subcircuit\",\n \"auto\",\n \"auto-local\",\n \"auto-cloud\",\n ])\n .optional(),\n local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n schTitle: z.string().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n /**\n * If true, all pins are connected with cuttable traces\n */\n bridged?: boolean\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n bridged: z.boolean().optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n /**\n * Current rating of the fuse in amperes\n */\n currentRating: number | string\n\n /**\n * Voltage rating of the fuse\n */\n voltageRating?: number | string\n\n /**\n * Whether to show ratings on schematic\n */\n schShowRatings?: boolean\n\n schOrientation?: SchematicOrientation\n\n /**\n * Connections to other components\n */\n connections?: Connections<PinLabel>\n}\n\n/**\n * Schema for validating fuse props\n */\nexport const fuseProps = commonComponentProps.extend({\n currentRating: z.union([z.number(), z.string()]),\n voltageRating: z.union([z.number(), z.string()]).optional(),\n schShowRatings: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()).readonly(),\n z.array(z.string()),\n ]),\n )\n .optional(),\n})\n\nexport type InferredFuseProps = z.input<typeof fuseProps>\n","import { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n holeWidth: number | string\n holeHeight: number | string\n portHints?: PortHints\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n holeWidth: number | string\n holeHeight: number | string\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n\n portHints?: PortHints\n}\n\nexport interface CircularHoleWithRectPlatedProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"circular_hole_with_rect_pad\"\n holeDiameter: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n holeShape?: \"circle\"\n padShape?: \"rect\"\n portHints?: PortHints\n}\n\nexport interface PillWithRectPadPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"pill_hole_with_rect_pad\"\n holeShape: \"pill\"\n padShape: \"rect\"\n holeWidth: number | string\n holeHeight: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n | CircularHoleWithRectPlatedProps\n | PillWithRectPadPlatedHoleProps\n\nconst distanceHiddenUndefined = z\n .custom<z.input<typeof distance>>()\n .transform((a) => {\n if (a === undefined) return undefined\n return distance.parse(a)\n })\n\nexport const platedHoleProps = z\n .discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n holeDiameter: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n holeShape: z.literal(\"circle\").optional(),\n padShape: z.literal(\"rect\").optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n holeShape: z.literal(\"pill\"),\n padShape: z.literal(\"rect\"),\n holeWidth: distance,\n holeHeight: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n portHints: portHints.optional(),\n }),\n ])\n .refine((a) => {\n if (\"innerWidth\" in a && a.innerWidth !== undefined) {\n a.holeWidth ??= a.innerWidth\n }\n if (\"innerHeight\" in a && a.innerHeight !== undefined) {\n a.holeHeight ??= a.innerHeight\n }\n return a\n })\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\n\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const resistorPinLabels = [\"pin1\", \"pin2\", \"pos\", \"neg\"] as const\nexport type ResistorPinLabels = (typeof resistorPinLabels)[number]\n\nexport interface ResistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n schOrientation?: SchematicOrientation\n connections?: Connections<ResistorPinLabels>\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n\n schOrientation: schematicOrientation.optional(),\n\n connections: createConnectionsProp(resistorPinLabels).optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type PotentiometerPinVariant = \"two_pin\" | \"three_pin\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n pinVariant?: PotentiometerPinVariant\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n pinVariant: z.enum([\"two_pin\", \"three_pin\"]).optional(),\n})\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { frequency, capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type PinVariant = \"two_pin\" | \"four_pin\"\n\nexport interface CrystalProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: PinVariant\n schOrientation?: SchematicOrientation\n}\n\nexport const crystalProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"two_pin\", \"four_pin\"]).optional(),\n schOrientation: schematicOrientation.optional(),\n})\nexport const crystalPins = lrPins\nexport type CrystalPinLabels = (typeof crystalPins)[number]\n\ntype InferredCrystalProps = z.input<typeof crystalProps>\nexpectTypesMatch<CrystalProps, InferredCrystalProps>(true)\n","import { frequency, capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type ResonatorPinVariant = \"no_ground\" | \"ground_pin\" | \"two_ground_pins\"\n\nexport interface ResonatorProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: ResonatorPinVariant\n}\n\nexport const resonatorProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"no_ground\", \"ground_pin\", \"two_ground_pins\"]).optional(),\n})\n\ntype InferredResonatorProps = z.input<typeof resonatorProps>\nexpectTypesMatch<ResonatorProps, InferredResonatorProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { boardProps, type BoardProps } from \"lib/components/board\"\n\nexport interface StampboardProps extends BoardProps {\n leftPinCount?: number\n rightPinCount?: number\n topPinCount?: number\n bottomPinCount?: number\n leftPins?: string[]\n rightPins?: string[]\n topPins?: string[]\n bottomPins?: string[]\n pinPitch?: number | string\n innerHoles?: boolean\n}\n\nexport const stampboardProps = boardProps.extend({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftPins: z.array(z.string()).optional(),\n rightPins: z.array(z.string()).optional(),\n topPins: z.array(z.string()).optional(),\n bottomPins: z.array(z.string()).optional(),\n pinPitch: distance.optional(),\n innerHoles: z.boolean().optional(),\n})\n\ntype InferredStampboardProps = z.input<typeof stampboardProps>\nexpectTypesMatch<StampboardProps, InferredStampboardProps>(true)\n","import { capacitance, voltage } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const capacitorPinLabels = [\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n \"anode\",\n \"cathode\",\n] as const\nexport type CapacitorPinLabels = (typeof capacitorPinLabels)[number]\n\nexport interface CapacitorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n capacitance: number | string\n maxVoltageRating?: number | string\n schShowRatings?: boolean\n polarized?: boolean\n decouplingFor?: string\n decouplingTo?: string\n bypassFor?: string\n bypassTo?: string\n maxDecouplingTraceLength?: number\n schOrientation?: SchematicOrientation\n connections?: Connections<CapacitorPinLabels>\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n maxVoltageRating: voltage.optional(),\n schShowRatings: z.boolean().optional().default(false),\n polarized: z.boolean().optional().default(false),\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n maxDecouplingTraceLength: z.number().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: createConnectionsProp(capacitorPinLabels).optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n connectsTo?: string | string[]\n}\n\nexport const netProps = z.object({\n name: z.string(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"circuit-json\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { point, type Point } from \"lib/common/point\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport const rectCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\nexpectTypesMatch<RectCutoutProps, z.input<typeof rectCutoutProps>>(true)\n\nexport interface CircleCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n}\n\nexport const circleCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n })\nexpectTypesMatch<CircleCutoutProps, z.input<typeof circleCutoutProps>>(true)\n\nexport interface PolygonCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n}\n\nexport const polygonCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n })\nexpectTypesMatch<PolygonCutoutProps, z.input<typeof polygonCutoutProps>>(true)\n\nexport type CutoutProps =\n | RectCutoutProps\n | CircleCutoutProps\n | PolygonCutoutProps\n\nexport const cutoutProps = z.discriminatedUnion(\"shape\", [\n rectCutoutProps,\n circleCutoutProps,\n polygonCutoutProps,\n])\n\nexport type CutoutPropsInput = z.input<typeof cutoutProps>\n","import {\n pcbLayoutProps,\n type CommonLayoutProps,\n type PcbLayoutProps,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { point, type Point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n portHints?: PortHints\n}\n\nexport interface RotatedRectSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"rotated_rect\"\n width: Distance\n height: Distance\n ccwRotation: number\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PillSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"pill\"\n width: Distance\n height: Distance\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PolygonSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n portHints?: PortHints\n}\n\nexport type SmtPadProps =\n | RectSmtPadProps\n | CircleSmtPadProps\n | RotatedRectSmtPadProps\n | PillSmtPadProps\n | PolygonSmtPadProps\n\n// ----------------------------------------------------------------------------\n// Zod\n// ----------------------------------------------------------------------------\n\nexport const rectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n portHints: portHints.optional(),\n })\ntype InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>\nexpectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)\n\nexport const rotatedRectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rotated_rect\"),\n width: distance,\n height: distance,\n ccwRotation: z.number(),\n portHints: portHints.optional(),\n })\ntype InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>\nexpectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(true)\n\nexport const circleSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>\nexpectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)\n\nexport const pillSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n width: distance,\n height: distance,\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>\nexpectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)\n\nexport const polygonSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n portHints: portHints.optional(),\n })\ntype InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>\nexpectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)\n\nexport const smtPadProps = z.discriminatedUnion(\"shape\", [\n circleSmtPadProps,\n rectSmtPadProps,\n rotatedRectSmtPadProps,\n pillSmtPadProps,\n polygonSmtPadProps,\n])\n\nexport type InferredSmtPadProps = z.input<typeof smtPadProps>\nexpectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n schDisplayLabel: z.string().optional(),\n maxLength: distance.optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n capacity?: number | string\n schOrientation?: SchematicOrientation\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n schOrientation: schematicOrientation.optional(),\n})\nexport const batteryPins = lrPolarPins\nexport type BatteryPinLabels = (typeof batteryPins)[number]\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n\n /**\n * Schematic pin style (margins, etc)\n */\n schPinStyle?: SchematicPinStyle\n\n /**\n * Schematic pin spacing\n */\n schPinSpacing?: number | string\n\n /**\n * Schematic width\n */\n schWidth?: number | string\n\n /**\n * Schematic height\n */\n schHeight?: number | string\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n connectsTo?: string | string[]\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\nexport type TransistorPinLabels = (typeof transistorPins)[number]\n\ntype InferredTransistorProps = z.input<typeof transistorProps>\nexpectTypesMatch<TransistorProps, InferredTransistorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"../common/layout\"\nimport { expectTypesMatch } from \"../typecheck\"\nimport { z } from \"zod\"\n\nexport interface MosfetProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n channelType: \"n\" | \"p\"\n mosfetMode: \"enhancement\" | \"depletion\"\n}\n\nexport const mosfetProps = commonComponentProps.extend({\n channelType: z.enum([\"n\", \"p\"]),\n mosfetMode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport const mosfetPins = [\n \"pin1\",\n \"drain\",\n \"pin2\",\n \"source\",\n \"pin3\",\n \"gate\",\n] as const\nexport type MosfetPinLabels = (typeof mosfetPins)[number]\n\ntype InferredMosfetProps = z.input<typeof mosfetProps>\nexpectTypesMatch<MosfetProps, InferredMosfetProps>(true)\n","import { inductance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface InductorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n inductance: number | string\n maxCurrentRating?: number | string\n schOrientation?: SchematicOrientation\n}\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n maxCurrentRating: z.union([z.string(), z.number()]).optional(),\n schOrientation: schematicOrientation.optional(),\n})\n\nexport const inductorPins = lrPins\nexport type InductorPinLabels = (typeof inductorPins)[number]\n\ntype InferredInductorProps = z.input<typeof inductorProps>\n\nexpectTypesMatch<InductorProps, InferredInductorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\nexport type DiodePinLabels = (typeof diodePins)[number]\n\nexport interface DiodeProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n schOrientation?: SchematicOrientation\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\nexport type LedPinLabels = (typeof lrPolarPins)[number]\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n wavelength: z.string().optional(),\n schDisplayValue: z.string().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: createConnectionsProp(lrPolarPins).optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n","import { distance, layer_ref, type LayerRefInput } from \"circuit-json\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ViaProps extends CommonLayoutProps {\n name?: string\n fromLayer: LayerRefInput\n toLayer: LayerRefInput\n holeDiameter: number | string\n outerDiameter: number | string\n connectsTo?: string | string[]\n}\n\nexport const viaProps = commonLayoutProps.extend({\n name: z.string().optional(),\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\nexport type InferredViaProps = z.input<typeof viaProps>\nexpectTypesMatch<ViaProps, InferredViaProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance.optional(),\n schY: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"top_left\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance.optional(),\n schY: distance.optional(),\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n projectName?: string\n version?: string\n url?: string\n printBoardInformationToSilkscreen?: boolean\n\n pcbDisabled?: boolean\n schematicDisabled?: boolean\n partsEngineDisabled?: boolean\n\n footprintLibraryMap?: Record<\n string,\n Record<\n string,\n | any[]\n | ((path: string) => Promise<{\n footprintCircuitJson: any[]\n }>)\n >\n >\n}\n\nconst unvalidatedCircuitJson = z.array(z.any()).describe(\"Circuit JSON\")\nconst pathToCircuitJsonFn = z\n .function()\n .args(z.string())\n .returns(z.promise(z.object({ footprintCircuitJson: z.array(z.any()) })))\n .describe(\"A function that takes a path and returns Circuit JSON\")\n\nexport const platformConfig = z.object({\n partsEngine: partsEngine.optional(),\n autorouter: autorouterProp.optional(),\n registryApiUrl: z.string().optional(),\n cloudAutorouterUrl: z.string().optional(),\n projectName: z.string().optional(),\n version: z.string().optional(),\n url: z.string().optional(),\n printBoardInformationToSilkscreen: z.boolean().optional(),\n localCacheEngine: z.any().optional(),\n pcbDisabled: z.boolean().optional(),\n schematicDisabled: z.boolean().optional(),\n partsEngineDisabled: z.boolean().optional(),\n footprintLibraryMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.union([unvalidatedCircuitJson, pathToCircuitJsonFn]),\n ),\n )\n .optional(),\n}) as z.ZodType<PlatformConfig>\n\nexpectTypesMatch<PlatformConfig, z.infer<typeof platformConfig>>(true)\n"],"mappings":";AAYO,IAAM,mBAAmB,CAO9B,aAOS;AAAC;AAIZ,iBAQE,eAAe;AAEjB,iBAQE,iBAAiB;AAEnB,iBAOE,IAAI;AAEN,iBAOE,iCAAiC;;;ACjEnC,SAAS,SAAS;AACX,IAAM,YAAY,EAAE,KAAK,CAAC,MAAM,QAAQ,QAAQ,OAAO,CAAC;AASxD,IAAM,qBAAqB,EAAE,KAAK;AAAA,EACvC;A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,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","connectionTarget","z","distance","connectionTarget","z","distance","z","distance","z","z","distance","z","distance","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","z","connectionTarget","connectionsProp","z","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","z","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
1
+ {"version":3,"sources":["../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicOrientation.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/common/connectionsProp.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/schematic-table.ts","../lib/components/schematic-row.ts","../lib/components/schematic-cell.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type FootprintProp, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: FootprintProp\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps<PinLabel extends string = string>\n extends CommonLayoutProps {\n key?: any\n name: string\n pinAttributes?: Record<PinLabel, Record<string, any>>\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n doNotPlace?: boolean\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n doNotPlace: z.boolean().optional(),\n pinAttributes: z\n .record(z.string(), z.record(z.string(), z.any()))\n .optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type FootprintProp = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<FootprintProp>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const schematicOrientation = z\n .enum([\n \"vertical\",\n \"horizontal\",\n \"pos_top\",\n \"pos_bottom\",\n \"pos_left\",\n \"pos_right\",\n \"neg_top\",\n \"neg_bottom\",\n \"neg_left\",\n \"neg_right\",\n ])\n .describe(\n \"horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)\",\n )\n\nexport type SchematicOrientation =\n | \"vertical\"\n | \"horizontal\"\n | \"pos_top\"\n | \"pos_bottom\"\n | \"pos_left\"\n | \"pos_right\"\n | \"neg_top\"\n | \"neg_bottom\"\n | \"neg_left\"\n | \"neg_right\"\n\nexpectTypesMatch<SchematicOrientation, z.infer<typeof schematicOrientation>>(\n true,\n)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\n SchematicPortArrangementWithPinCounts\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\n/**\n * @deprecated Use schematicPinArrangement instead.\n */\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexport const schematicPinArrangement = schematicPortArrangement\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { layer_ref, length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n padding: length.optional(),\n paddingLeft: length.optional(),\n paddingRight: length.optional(),\n paddingTop: length.optional(),\n paddingBottom: length.optional(),\n paddingX: length.optional(),\n paddingY: length.optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n paddingX?: Distance\n paddingY?: Distance\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n /**\n * Title to display above this group in the schematic view\n */\n schTitle?: string\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n traceClearance?: Distance\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\n preset?:\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n}\n\nexport type AutorouterProp =\n | AutorouterConfig\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n\nexport const autorouterConfig = z.object({\n serverUrl: z.string().optional(),\n inputFormat: z.enum([\"simplified\", \"circuit-json\"]).optional(),\n serverMode: z.enum([\"job\", \"solve-endpoint\"]).optional(),\n serverCacheEnabled: z.boolean().optional(),\n cache: z.custom<PcbRouteCache>((v) => true).optional(),\n traceClearance: length.optional(),\n groupMode: z.enum([\"sequential-trace\", \"subcircuit\"]).optional(),\n algorithmFn: z\n .custom<(simpleRouteJson: any) => Promise<any>>(\n (v) => typeof v === \"function\" || v === undefined,\n )\n .optional(),\n preset: z\n .enum([\n \"sequential-trace\",\n \"subcircuit\",\n \"auto\",\n \"auto-local\",\n \"auto-cloud\",\n ])\n .optional(),\n local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n schTitle: z.string().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n /**\n * If true, all pins are connected with cuttable traces\n */\n bridged?: boolean\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n bridged: z.boolean().optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n /**\n * Current rating of the fuse in amperes\n */\n currentRating: number | string\n\n /**\n * Voltage rating of the fuse\n */\n voltageRating?: number | string\n\n /**\n * Whether to show ratings on schematic\n */\n schShowRatings?: boolean\n\n schOrientation?: SchematicOrientation\n\n /**\n * Connections to other components\n */\n connections?: Connections<PinLabel>\n}\n\n/**\n * Schema for validating fuse props\n */\nexport const fuseProps = commonComponentProps.extend({\n currentRating: z.union([z.number(), z.string()]),\n voltageRating: z.union([z.number(), z.string()]).optional(),\n schShowRatings: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()).readonly(),\n z.array(z.string()),\n ]),\n )\n .optional(),\n})\n\nexport type InferredFuseProps = z.input<typeof fuseProps>\n","import { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n holeWidth: number | string\n holeHeight: number | string\n portHints?: PortHints\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n holeWidth: number | string\n holeHeight: number | string\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n\n portHints?: PortHints\n}\n\nexport interface CircularHoleWithRectPlatedProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"circular_hole_with_rect_pad\"\n holeDiameter: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n holeShape?: \"circle\"\n padShape?: \"rect\"\n portHints?: PortHints\n}\n\nexport interface PillWithRectPadPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n connectsTo?: string | string[]\n shape: \"pill_hole_with_rect_pad\"\n holeShape: \"pill\"\n padShape: \"rect\"\n holeWidth: number | string\n holeHeight: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n | CircularHoleWithRectPlatedProps\n | PillWithRectPadPlatedHoleProps\n\nconst distanceHiddenUndefined = z\n .custom<z.input<typeof distance>>()\n .transform((a) => {\n if (a === undefined) return undefined\n return distance.parse(a)\n })\n\nexport const platedHoleProps = z\n .discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n holeDiameter: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n holeShape: z.literal(\"circle\").optional(),\n padShape: z.literal(\"rect\").optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n holeShape: z.literal(\"pill\"),\n padShape: z.literal(\"rect\"),\n holeWidth: distance,\n holeHeight: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n portHints: portHints.optional(),\n }),\n ])\n .refine((a) => {\n if (\"innerWidth\" in a && a.innerWidth !== undefined) {\n a.holeWidth ??= a.innerWidth\n }\n if (\"innerHeight\" in a && a.innerHeight !== undefined) {\n a.holeHeight ??= a.innerHeight\n }\n return a\n })\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\n\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const resistorPinLabels = [\"pin1\", \"pin2\", \"pos\", \"neg\"] as const\nexport type ResistorPinLabels = (typeof resistorPinLabels)[number]\n\nexport interface ResistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n schOrientation?: SchematicOrientation\n connections?: Connections<ResistorPinLabels>\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n\n schOrientation: schematicOrientation.optional(),\n\n connections: createConnectionsProp(resistorPinLabels).optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type PotentiometerPinVariant = \"two_pin\" | \"three_pin\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n pinVariant?: PotentiometerPinVariant\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n pinVariant: z.enum([\"two_pin\", \"three_pin\"]).optional(),\n})\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { frequency, capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type PinVariant = \"two_pin\" | \"four_pin\"\n\nexport interface CrystalProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: PinVariant\n schOrientation?: SchematicOrientation\n}\n\nexport const crystalProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"two_pin\", \"four_pin\"]).optional(),\n schOrientation: schematicOrientation.optional(),\n})\nexport const crystalPins = lrPins\nexport type CrystalPinLabels = (typeof crystalPins)[number]\n\ntype InferredCrystalProps = z.input<typeof crystalProps>\nexpectTypesMatch<CrystalProps, InferredCrystalProps>(true)\n","import { frequency, capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type ResonatorPinVariant = \"no_ground\" | \"ground_pin\" | \"two_ground_pins\"\n\nexport interface ResonatorProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: ResonatorPinVariant\n}\n\nexport const resonatorProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"no_ground\", \"ground_pin\", \"two_ground_pins\"]).optional(),\n})\n\ntype InferredResonatorProps = z.input<typeof resonatorProps>\nexpectTypesMatch<ResonatorProps, InferredResonatorProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { boardProps, type BoardProps } from \"lib/components/board\"\n\nexport interface StampboardProps extends BoardProps {\n leftPinCount?: number\n rightPinCount?: number\n topPinCount?: number\n bottomPinCount?: number\n leftPins?: string[]\n rightPins?: string[]\n topPins?: string[]\n bottomPins?: string[]\n pinPitch?: number | string\n innerHoles?: boolean\n}\n\nexport const stampboardProps = boardProps.extend({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftPins: z.array(z.string()).optional(),\n rightPins: z.array(z.string()).optional(),\n topPins: z.array(z.string()).optional(),\n bottomPins: z.array(z.string()).optional(),\n pinPitch: distance.optional(),\n innerHoles: z.boolean().optional(),\n})\n\ntype InferredStampboardProps = z.input<typeof stampboardProps>\nexpectTypesMatch<StampboardProps, InferredStampboardProps>(true)\n","import { capacitance, voltage } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const capacitorPinLabels = [\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n \"anode\",\n \"cathode\",\n] as const\nexport type CapacitorPinLabels = (typeof capacitorPinLabels)[number]\n\nexport interface CapacitorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n capacitance: number | string\n maxVoltageRating?: number | string\n schShowRatings?: boolean\n polarized?: boolean\n decouplingFor?: string\n decouplingTo?: string\n bypassFor?: string\n bypassTo?: string\n maxDecouplingTraceLength?: number\n schOrientation?: SchematicOrientation\n connections?: Connections<CapacitorPinLabels>\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n maxVoltageRating: voltage.optional(),\n schShowRatings: z.boolean().optional().default(false),\n polarized: z.boolean().optional().default(false),\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n maxDecouplingTraceLength: z.number().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: createConnectionsProp(capacitorPinLabels).optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n connectsTo?: string | string[]\n}\n\nexport const netProps = z.object({\n name: z.string(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"circuit-json\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { point, type Point } from \"lib/common/point\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport const rectCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\nexpectTypesMatch<RectCutoutProps, z.input<typeof rectCutoutProps>>(true)\n\nexport interface CircleCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n}\n\nexport const circleCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n })\nexpectTypesMatch<CircleCutoutProps, z.input<typeof circleCutoutProps>>(true)\n\nexport interface PolygonCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n}\n\nexport const polygonCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n })\nexpectTypesMatch<PolygonCutoutProps, z.input<typeof polygonCutoutProps>>(true)\n\nexport type CutoutProps =\n | RectCutoutProps\n | CircleCutoutProps\n | PolygonCutoutProps\n\nexport const cutoutProps = z.discriminatedUnion(\"shape\", [\n rectCutoutProps,\n circleCutoutProps,\n polygonCutoutProps,\n])\n\nexport type CutoutPropsInput = z.input<typeof cutoutProps>\n","import {\n pcbLayoutProps,\n type CommonLayoutProps,\n type PcbLayoutProps,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { point, type Point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n portHints?: PortHints\n}\n\nexport interface RotatedRectSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"rotated_rect\"\n width: Distance\n height: Distance\n ccwRotation: number\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PillSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"pill\"\n width: Distance\n height: Distance\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PolygonSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n portHints?: PortHints\n}\n\nexport type SmtPadProps =\n | RectSmtPadProps\n | CircleSmtPadProps\n | RotatedRectSmtPadProps\n | PillSmtPadProps\n | PolygonSmtPadProps\n\n// ----------------------------------------------------------------------------\n// Zod\n// ----------------------------------------------------------------------------\n\nexport const rectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n portHints: portHints.optional(),\n })\ntype InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>\nexpectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)\n\nexport const rotatedRectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rotated_rect\"),\n width: distance,\n height: distance,\n ccwRotation: z.number(),\n portHints: portHints.optional(),\n })\ntype InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>\nexpectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(true)\n\nexport const circleSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>\nexpectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)\n\nexport const pillSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n width: distance,\n height: distance,\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>\nexpectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)\n\nexport const polygonSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n portHints: portHints.optional(),\n })\ntype InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>\nexpectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)\n\nexport const smtPadProps = z.discriminatedUnion(\"shape\", [\n circleSmtPadProps,\n rectSmtPadProps,\n rotatedRectSmtPadProps,\n pillSmtPadProps,\n polygonSmtPadProps,\n])\n\nexport type InferredSmtPadProps = z.input<typeof smtPadProps>\nexpectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n schDisplayLabel: z.string().optional(),\n maxLength: distance.optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n capacity?: number | string\n schOrientation?: SchematicOrientation\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n schOrientation: schematicOrientation.optional(),\n})\nexport const batteryPins = lrPolarPins\nexport type BatteryPinLabels = (typeof batteryPins)[number]\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n\n /**\n * Schematic pin style (margins, etc)\n */\n schPinStyle?: SchematicPinStyle\n\n /**\n * Schematic pin spacing\n */\n schPinSpacing?: number | string\n\n /**\n * Schematic width\n */\n schWidth?: number | string\n\n /**\n * Schematic height\n */\n schHeight?: number | string\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n connectsTo?: string | string[]\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\nexport type TransistorPinLabels = (typeof transistorPins)[number]\n\ntype InferredTransistorProps = z.input<typeof transistorProps>\nexpectTypesMatch<TransistorProps, InferredTransistorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"../common/layout\"\nimport { expectTypesMatch } from \"../typecheck\"\nimport { z } from \"zod\"\n\nexport interface MosfetProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n channelType: \"n\" | \"p\"\n mosfetMode: \"enhancement\" | \"depletion\"\n}\n\nexport const mosfetProps = commonComponentProps.extend({\n channelType: z.enum([\"n\", \"p\"]),\n mosfetMode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport const mosfetPins = [\n \"pin1\",\n \"drain\",\n \"pin2\",\n \"source\",\n \"pin3\",\n \"gate\",\n] as const\nexport type MosfetPinLabels = (typeof mosfetPins)[number]\n\ntype InferredMosfetProps = z.input<typeof mosfetProps>\nexpectTypesMatch<MosfetProps, InferredMosfetProps>(true)\n","import { inductance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface InductorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n inductance: number | string\n maxCurrentRating?: number | string\n schOrientation?: SchematicOrientation\n}\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n maxCurrentRating: z.union([z.string(), z.number()]).optional(),\n schOrientation: schematicOrientation.optional(),\n})\n\nexport const inductorPins = lrPins\nexport type InductorPinLabels = (typeof inductorPins)[number]\n\ntype InferredInductorProps = z.input<typeof inductorProps>\n\nexpectTypesMatch<InductorProps, InferredInductorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\nexport type DiodePinLabels = (typeof diodePins)[number]\n\nexport interface DiodeProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n schOrientation?: SchematicOrientation\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\nexport type LedPinLabels = (typeof lrPolarPins)[number]\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n wavelength: z.string().optional(),\n schDisplayValue: z.string().optional(),\n schOrientation: schematicOrientation.optional(),\n connections: createConnectionsProp(lrPolarPins).optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n","import { distance, layer_ref, type LayerRefInput } from \"circuit-json\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ViaProps extends CommonLayoutProps {\n name?: string\n fromLayer: LayerRefInput\n toLayer: LayerRefInput\n holeDiameter: number | string\n outerDiameter: number | string\n connectsTo?: string | string[]\n}\n\nexport const viaProps = commonLayoutProps.extend({\n name: z.string().optional(),\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\nexport type InferredViaProps = z.input<typeof viaProps>\nexpectTypesMatch<ViaProps, InferredViaProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance.optional(),\n schY: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"top_left\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance.optional(),\n schY: distance.optional(),\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const schematicTableProps = z.object({\n schX: distance.optional(),\n schY: distance.optional(),\n children: z.any().optional(),\n cellPadding: distance.optional(),\n borderWidth: distance.optional(),\n anchor: ninePointAnchor.optional(),\n fontSize: distance.optional(),\n})\n\nexport interface SchematicTableProps {\n schX?: number | string\n schY?: number | string\n children?: any\n cellPadding?: number | string\n borderWidth?: number | string\n anchor?: z.infer<typeof ninePointAnchor>\n fontSize?: number | string\n}\n\nexpectTypesMatch<SchematicTableProps, z.input<typeof schematicTableProps>>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const schematicRowProps = z.object({\n children: z.any().optional(),\n height: distance.optional(),\n})\n\nexport interface SchematicRowProps {\n children?: any\n height?: number | string\n}\n\nexpectTypesMatch<SchematicRowProps, z.input<typeof schematicRowProps>>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const schematicCellProps = z.object({\n children: z.string(),\n horizontalAlign: z.enum([\"left\", \"center\", \"right\"]).optional(),\n verticalAlign: z.enum([\"top\", \"middle\", \"bottom\"]).optional(),\n fontSize: distance.optional(),\n})\n\nexport interface SchematicCellProps {\n children: string\n horizontalAlign?: \"left\" | \"center\" | \"right\"\n verticalAlign?: \"top\" | \"middle\" | \"bottom\"\n fontSize?: number | string\n}\n\nexpectTypesMatch<SchematicCellProps, z.input<typeof schematicCellProps>>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n projectName?: string\n version?: string\n url?: string\n printBoardInformationToSilkscreen?: boolean\n\n pcbDisabled?: boolean\n schematicDisabled?: boolean\n partsEngineDisabled?: boolean\n\n footprintLibraryMap?: Record<\n string,\n Record<\n string,\n | any[]\n | ((path: string) => Promise<{\n footprintCircuitJson: any[]\n }>)\n >\n >\n}\n\nconst unvalidatedCircuitJson = z.array(z.any()).describe(\"Circuit JSON\")\nconst pathToCircuitJsonFn = z\n .function()\n .args(z.string())\n .returns(z.promise(z.object({ footprintCircuitJson: z.array(z.any()) })))\n .describe(\"A function that takes a path and returns Circuit JSON\")\n\nexport const platformConfig = z.object({\n partsEngine: partsEngine.optional(),\n autorouter: autorouterProp.optional(),\n registryApiUrl: z.string().optional(),\n cloudAutorouterUrl: z.string().optional(),\n projectName: z.string().optional(),\n version: z.string().optional(),\n url: z.string().optional(),\n printBoardInformationToSilkscreen: z.boolean().optional(),\n localCacheEngine: z.any().optional(),\n pcbDisabled: z.boolean().optional(),\n schematicDisabled: z.boolean().optional(),\n partsEngineDisabled: z.boolean().optional(),\n footprintLibraryMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.union([unvalidatedCircuitJson, pathToCircuitJsonFn]),\n ),\n )\n .optional(),\n}) as z.ZodType<PlatformConfig>\n\nexpectTypesMatch<PlatformConfig, z.infer<typeof platformConfig>>(true)\n"],"mappings":";AAYO,IAAM,mBAAmB,CAO9B,aAOS;AAAC;AAIZ,iBAQE,eAAe;AAEjB,iBAQE,iBAAiB;AAEnB,iBAOE,IAAI;AAEN,iBAOE,iCAAiC;;;ACjEnC,SAAS,SAAS;AACX,IAAM,YAAY,EAAE,KAAK,CAAC,MAAM,QAAQ,QAAQ,OAAO,CAAC;AASxD,IAAM,qBAAqB,EAAE,KAAK;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,iBAAuD,IAAI;AAC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,SAAS,EACT,KAAKA,IAAE,OAAO,CAAC,EACf,QAAQA,IAAE,QAAQA,IAAE,OAAO,EAAE,sBAAsBA,IAAE,MAAMA,IAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EACvE,SAAS,uDAAuD;AAE5D,IAAM,iBAAiBA,IAAE,OAAO;AAAA,EACrC,aAAa,YAAY,SAAS;AAAA,EAClC,YAAY,eAAe,SAAS;AAAA,EACpC,gBAAgBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACpC,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,aAAaA,IAAE,OAAO,EAAE,SAAS;AAAA,EACjC,SAASA,IAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,KAAKA,IAAE,OAAO,EAAE,SAAS;AAAA,EACzB,mCAAmCA,IAAE,QAAQ,EAAE,SAAS;AAAA,EACxD,kBAAkBA,IAAE,IAAI,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,mBAAmBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EACxC,qBAAqBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAC1C,qBAAqBA,IAClB;AAAA,IACCA,IAAE,OAAO;AAAA,IACTA,IAAE;AAAA,MACAA,IAAE,OAAO;AAAA,MACTA,IAAE,MAAM,CAAC,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","connectionTarget","z","distance","connectionTarget","z","distance","z","distance","z","z","distance","z","distance","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","z","connectionTarget","connectionsProp","z","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","z","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","distance","z","z","distance","distance","z","z","distance","distance","z","z","distance","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
@@ -0,0 +1,19 @@
1
+ import { distance } from "circuit-json"
2
+ import { z } from "zod"
3
+ import { expectTypesMatch } from "lib/typecheck"
4
+
5
+ export const schematicCellProps = z.object({
6
+ children: z.string(),
7
+ horizontalAlign: z.enum(["left", "center", "right"]).optional(),
8
+ verticalAlign: z.enum(["top", "middle", "bottom"]).optional(),
9
+ fontSize: distance.optional(),
10
+ })
11
+
12
+ export interface SchematicCellProps {
13
+ children: string
14
+ horizontalAlign?: "left" | "center" | "right"
15
+ verticalAlign?: "top" | "middle" | "bottom"
16
+ fontSize?: number | string
17
+ }
18
+
19
+ expectTypesMatch<SchematicCellProps, z.input<typeof schematicCellProps>>(true)
@@ -0,0 +1,15 @@
1
+ import { distance } from "circuit-json"
2
+ import { z } from "zod"
3
+ import { expectTypesMatch } from "lib/typecheck"
4
+
5
+ export const schematicRowProps = z.object({
6
+ children: z.any().optional(),
7
+ height: distance.optional(),
8
+ })
9
+
10
+ export interface SchematicRowProps {
11
+ children?: any
12
+ height?: number | string
13
+ }
14
+
15
+ expectTypesMatch<SchematicRowProps, z.input<typeof schematicRowProps>>(true)
@@ -0,0 +1,26 @@
1
+ import { distance } from "circuit-json"
2
+ import { z } from "zod"
3
+ import { ninePointAnchor } from "lib/common/ninePointAnchor"
4
+ import { expectTypesMatch } from "lib/typecheck"
5
+
6
+ export const schematicTableProps = z.object({
7
+ schX: distance.optional(),
8
+ schY: distance.optional(),
9
+ children: z.any().optional(),
10
+ cellPadding: distance.optional(),
11
+ borderWidth: distance.optional(),
12
+ anchor: ninePointAnchor.optional(),
13
+ fontSize: distance.optional(),
14
+ })
15
+
16
+ export interface SchematicTableProps {
17
+ schX?: number | string
18
+ schY?: number | string
19
+ children?: any
20
+ cellPadding?: number | string
21
+ borderWidth?: number | string
22
+ anchor?: z.infer<typeof ninePointAnchor>
23
+ fontSize?: number | string
24
+ }
25
+
26
+ expectTypesMatch<SchematicTableProps, z.input<typeof schematicTableProps>>(true)
package/lib/index.ts CHANGED
@@ -59,6 +59,9 @@ export * from "./components/schematic-box"
59
59
  export * from "./components/schematic-line"
60
60
  export * from "./components/schematic-text"
61
61
  export * from "./components/schematic-path"
62
+ export * from "./components/schematic-table"
63
+ export * from "./components/schematic-row"
64
+ export * from "./components/schematic-cell"
62
65
  export * from "./components/silkscreen-text"
63
66
  export * from "./components/silkscreen-path"
64
67
  export * from "./components/silkscreen-line"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.249",
3
+ "version": "0.0.250",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",