@tscircuit/props 0.0.273 → 0.0.274

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -13647,8 +13647,9 @@ interface OvalPlatedHoleProps extends Omit<PcbLayoutProps, "pcbRotation" | "laye
13647
13647
  /** @deprecated use holeHeight */
13648
13648
  innerHeight?: number | string;
13649
13649
  }
13650
- interface PillPlatedHoleProps extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
13650
+ interface PillPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
13651
13651
  name?: string;
13652
+ rectPad?: boolean;
13652
13653
  connectsTo?: string | string[];
13653
13654
  shape: "pill";
13654
13655
  outerWidth: number | string;
@@ -13800,10 +13801,11 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13800
13801
  }>>;
13801
13802
  pcbRelative: z.ZodOptional<z.ZodBoolean>;
13802
13803
  relative: z.ZodOptional<z.ZodBoolean>;
13803
- }, "pcbRotation" | "layer"> & {
13804
+ }, "layer"> & {
13804
13805
  name: z.ZodOptional<z.ZodString>;
13805
13806
  connectsTo: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
13806
13807
  shape: z.ZodLiteral<"pill">;
13808
+ rectPad: z.ZodOptional<z.ZodBoolean>;
13807
13809
  outerWidth: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
13808
13810
  outerHeight: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
13809
13811
  holeWidth: z.ZodEffects<z.ZodType<string | number, z.ZodTypeDef, string | number>, number | undefined, string | number>;
@@ -13817,6 +13819,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13817
13819
  outerHeight: number;
13818
13820
  pcbX?: number | undefined;
13819
13821
  pcbY?: number | undefined;
13822
+ pcbRotation?: number | undefined;
13820
13823
  pcbRelative?: boolean | undefined;
13821
13824
  relative?: boolean | undefined;
13822
13825
  name?: string | undefined;
@@ -13826,6 +13829,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13826
13829
  holeHeight?: number | undefined;
13827
13830
  innerWidth?: number | undefined;
13828
13831
  innerHeight?: number | undefined;
13832
+ rectPad?: boolean | undefined;
13829
13833
  }, {
13830
13834
  shape: "pill";
13831
13835
  outerWidth: string | number;
@@ -13834,6 +13838,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13834
13838
  holeHeight: string | number;
13835
13839
  pcbX?: string | number | undefined;
13836
13840
  pcbY?: string | number | undefined;
13841
+ pcbRotation?: string | number | undefined;
13837
13842
  pcbRelative?: boolean | undefined;
13838
13843
  relative?: boolean | undefined;
13839
13844
  name?: string | undefined;
@@ -13841,6 +13846,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13841
13846
  portHints?: (string | number)[] | undefined;
13842
13847
  innerWidth?: string | number | undefined;
13843
13848
  innerHeight?: string | number | undefined;
13849
+ rectPad?: boolean | undefined;
13844
13850
  }>, z.ZodObject<Omit<{
13845
13851
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
13846
13852
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -13982,6 +13988,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13982
13988
  outerHeight: number;
13983
13989
  pcbX?: number | undefined;
13984
13990
  pcbY?: number | undefined;
13991
+ pcbRotation?: number | undefined;
13985
13992
  pcbRelative?: boolean | undefined;
13986
13993
  relative?: boolean | undefined;
13987
13994
  name?: string | undefined;
@@ -13991,6 +13998,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
13991
13998
  holeHeight?: number | undefined;
13992
13999
  innerWidth?: number | undefined;
13993
14000
  innerHeight?: number | undefined;
14001
+ rectPad?: boolean | undefined;
13994
14002
  } | {
13995
14003
  shape: "circular_hole_with_rect_pad";
13996
14004
  holeDiameter: number;
@@ -14054,6 +14062,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
14054
14062
  holeHeight: string | number;
14055
14063
  pcbX?: string | number | undefined;
14056
14064
  pcbY?: string | number | undefined;
14065
+ pcbRotation?: string | number | undefined;
14057
14066
  pcbRelative?: boolean | undefined;
14058
14067
  relative?: boolean | undefined;
14059
14068
  name?: string | undefined;
@@ -14061,6 +14070,7 @@ declare const platedHoleProps: z.ZodEffects<z.ZodDiscriminatedUnion<"shape", [z.
14061
14070
  portHints?: (string | number)[] | undefined;
14062
14071
  innerWidth?: string | number | undefined;
14063
14072
  innerHeight?: string | number | undefined;
14073
+ rectPad?: boolean | undefined;
14064
14074
  } | {
14065
14075
  shape: "circular_hole_with_rect_pad";
14066
14076
  holeDiameter: string | number;
package/dist/index.js CHANGED
@@ -661,10 +661,11 @@ var platedHoleProps = z32.discriminatedUnion("shape", [
661
661
  innerHeight: distance10.optional().describe("DEPRECATED use holeHeight"),
662
662
  portHints: portHints.optional()
663
663
  }),
664
- pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
664
+ pcbLayoutProps.omit({ layer: true }).extend({
665
665
  name: z32.string().optional(),
666
666
  connectsTo: z32.string().or(z32.array(z32.string())).optional(),
667
667
  shape: z32.literal("pill"),
668
+ rectPad: z32.boolean().optional(),
668
669
  outerWidth: distance10,
669
670
  outerHeight: distance10,
670
671
  holeWidth: distanceHiddenUndefined,
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/common/schematicPinLabel.ts","../lib/components/board.ts","../lib/components/group.ts","../lib/common/point.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 * If true, pcbX/pcbY will be interpreted relative to the parent group\n */\n pcbRelative?: boolean\n /**\n * If true, both pcb and schematic coordinates will be interpreted relative to the parent group\n */\n relative?: boolean\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 /**\n * If true, X/Y coordinates will be interpreted relative to the parent group\n */\n relative?: boolean\n\n /**\n * If true, schX/schY will be interpreted relative to the parent group\n */\n schRelative?: boolean\n\n /**\n * If true, pcbX/pcbY will be interpreted relative to the parent group\n */\n pcbRelative?: boolean\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 pcbRelative: z.boolean().optional(),\n relative: z.boolean().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 relative: z.boolean().optional(),\n schRelative: z.boolean().optional(),\n pcbRelative: z.boolean().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 PinAttributeMap {\n providesPower?: boolean\n requiresPower?: boolean\n providesGround?: boolean\n requiresGround?: boolean\n providesVoltage?: string | number\n requiresVoltage?: string | number\n}\n\nexport const pinAttributeMap = z.object({\n providesPower: z.boolean().optional(),\n requiresPower: z.boolean().optional(),\n providesGround: z.boolean().optional(),\n requiresGround: z.boolean().optional(),\n providesVoltage: z.union([z.string(), z.number()]).optional(),\n requiresVoltage: z.union([z.string(), z.number()]).optional(),\n})\n\nexpectTypesMatch<PinAttributeMap, z.input<typeof pinAttributeMap>>(true)\n\nexport interface CommonComponentProps<PinLabel extends string = string>\n extends CommonLayoutProps {\n key?: any\n name: string\n pinAttributes?: Record<PinLabel, PinAttributeMap>\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.record(z.string(), pinAttributeMap).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 { z } from \"zod\"\n\n/**\n * Valid pin label string. Must consist only of letters,\n * numbers, or underscores.\n */\nexport const schematicPinLabel = z.string().regex(/^[A-Za-z0-9_]+$/)\nexport type SchematicPinLabel = z.infer<typeof schematicPinLabel>\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n material?: \"fr4\" | \"fr1\"\n /** Number of layers for the PCB */\n layers?: 2 | 4\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n layers: z.union([z.literal(2), z.literal(4)]).default(2),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { layer_ref, length, distance } 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 { type Point, point } from \"lib/common/point\"\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\n .enum([\"grid\", \"flex\", \"match-adapt\", \"relative\", \"none\"])\n .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 gridRowGap: z.number().or(z.string()).optional(),\n gridColumnGap: 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\n .enum([\n \"start\",\n \"center\",\n \"end\",\n \"stretch\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ])\n .optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n pack: z\n .boolean()\n .optional()\n .describe(\"Pack the contents of this group using a packing strategy\"),\n packOrderStrategy: z\n .enum([\n \"largest_to_smallest\",\n \"first_to_last\",\n \"highest_to_lowest_pin_count\",\n ])\n .optional(),\n packPlacementStrategy: z\n .enum([\"shortest_connection_along_outline\"])\n .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\" | \"relative\" | \"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 gridRowGap?: number | string\n gridColumnGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?:\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n pack?: boolean\n packOrderStrategy?:\n | \"largest_to_smallest\"\n | \"first_to_last\"\n | \"highest_to_lowest_pin_count\"\n packPlacementStrategy?: \"shortest_connection_along_outline\"\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 /** @deprecated Use `pcbGrid` */\n grid?: boolean\n /** @deprecated Use `pcbFlex` */\n flex?: boolean | string\n\n pcbGrid?: boolean\n pcbGridCols?: number | string\n pcbGridRows?: number | string\n pcbGridTemplateRows?: string\n pcbGridTemplateColumns?: string\n pcbGridTemplate?: string\n pcbGridGap?: number | string\n pcbGridRowGap?: number | string\n pcbGridColumnGap?: number | string\n\n pcbFlex?: boolean | string\n pcbFlexDirection?: \"row\" | \"column\"\n pcbAlignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n pcbJustifyContent?:\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\"\n pcbFlexRow?: boolean\n pcbFlexColumn?: boolean\n pcbGap?: number | string\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 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 /** When autosizing, the board will be made square */\n square?: boolean\n /** Desired empty area of the board e.g. \"22mm^2\" or \"20%\" */\n emptyArea?: string\n /** Desired filled area of the board e.g. \"22mm^2\" or \"20%\" */\n filledArea?: string\n\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\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 grid: layoutConfig.shape.grid.describe(\"@deprecated use pcbGrid\"),\n flex: layoutConfig.shape.flex.describe(\"@deprecated use pcbFlex\"),\n pcbGrid: z.boolean().optional(),\n pcbGridCols: z.number().or(z.string()).optional(),\n pcbGridRows: z.number().or(z.string()).optional(),\n pcbGridTemplateRows: z.string().optional(),\n pcbGridTemplateColumns: z.string().optional(),\n pcbGridTemplate: z.string().optional(),\n pcbGridGap: z.number().or(z.string()).optional(),\n pcbGridRowGap: z.number().or(z.string()).optional(),\n pcbGridColumnGap: z.number().or(z.string()).optional(),\n pcbFlex: z.boolean().or(z.string()).optional(),\n pcbFlexDirection: z.enum([\"row\", \"column\"]).optional(),\n pcbAlignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n pcbJustifyContent: z\n .enum([\n \"start\",\n \"center\",\n \"end\",\n \"stretch\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ])\n .optional(),\n pcbFlexRow: z.boolean().optional(),\n pcbFlexColumn: z.boolean().optional(),\n pcbGap: z.number().or(z.string()).optional(),\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 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 square: z.boolean().optional(),\n emptyArea: z.string().optional(),\n filledArea: z.string().optional(),\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.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 { 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 { 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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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<\n PinLabel extends SchematicPinLabel = SchematicPinLabel,\n> extends CommonComponentProps<PinLabel> {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\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> | keyof 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 schematicPinLabel,\n schematicPinLabel\n .or(z.array(schematicPinLabel).readonly())\n .or(z.array(schematicPinLabel)),\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 pcbPinLabels: z.record(z.string(), z.string()).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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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<\n number | SchematicPinLabel,\n SchematicPinLabel | SchematicPinLabel[]\n >\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\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(\n z.number().or(schematicPinLabel),\n schematicPinLabel.or(z.array(schematicPinLabel)),\n )\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 pcbPinLabels: z.record(z.string(), z.string()).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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<\n number | SchematicPinLabel,\n SchematicPinLabel | SchematicPinLabel[]\n >\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(\n z.number().or(schematicPinLabel),\n schematicPinLabel.or(z.array(schematicPinLabel)),\n )\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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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, female, or unpopulated\n */\n gender?: \"male\" | \"female\" | \"unpopulated\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * If true, the header is a right-angle style connector\n */\n rightAngle?: 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?: SchematicPinLabel[]\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\", \"unpopulated\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n pcbPinLabels: z.record(z.string(), z.string()).optional(),\n doubleRow: z.boolean().optional(),\n rightAngle: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(schematicPinLabel).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\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\n\nexport const transistorPinsLabels = [\n \"pin1\",\n \"pin2\",\n \"pin3\",\n \"emitter\",\n \"collector\",\n \"base\",\n \"gate\",\n \"source\",\n \"drain\",\n] as const\nexport type transistorPinsLabels = (typeof transistorPinsLabels)[number]\n\nexport interface TransistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n connections?: Connections<transistorPinsLabels>\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n connections: createConnectionsProp(transistorPinsLabels).optional(),\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([\n \"standard\",\n \"schottky\",\n \"zener\",\n \"avalanche\",\n \"photo\",\n \"tvs\",\n])\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 avalanche: 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.avalanche,\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 avalanche: 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 \"avalanche\":\n result.avalanche = 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\" | \"avalanche\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n avalanche?: 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 { schematicOrientation } from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\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 laser: z.boolean().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().optional(),\n horizontalAlign: z.enum([\"left\", \"center\", \"right\"]).optional(),\n verticalAlign: z.enum([\"top\", \"middle\", \"bottom\"]).optional(),\n fontSize: distance.optional(),\n rowSpan: z.number().optional(),\n colSpan: z.number().optional(),\n width: distance.optional(),\n text: z.string().optional(),\n})\n\nexport interface SchematicCellProps {\n children?: string\n horizontalAlign?: \"left\" | \"center\" | \"right\"\n verticalAlign?: \"top\" | \"middle\" | \"bottom\"\n fontSize?: number | string\n rowSpan?: number\n colSpan?: number\n width?: number | string\n text?: 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;AAC3D,iBAAyE,IAAI;;;ACnB7E,SAAS,KAAAA,UAAS;AAGX,IAAM,YAAYC,GAAE,MAAMA,GAAE,OAAO,EAAE,GAAGA,GAAE,OAAO,CAAC,CAAC;AAG1D,iBAAuD,IAAI;;;ACN3D;AAAA,EAEE,YAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,KAAAC,UAAS;;;ACRlB,SAAS,KAAAC,UAAS;;;ACAlB,SAAS,gBAAgB;AACzB,SAAS,KAAAC,UAAS;AAEX,IAAM,SAASA,GAAE,OAAO;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,CAAC;;;ADHM,IAAM,iBAAiBC,GAAE,OAAO;AAAA,EACrC,GAAGA,GAAE,MAAM,CAACA,GAAE,OAAO,GAAGA,GAAE,OAAO,CAAC,CAAC;AAAA,EACnC,GAAGA,GAAE,MAAM,CAACA,GAAE,OAAO,GAAGA,GAAE,OAAO,CAAC,CAAC;AAAA,EACnC,GAAGA,GAAE,MAAM,CAACA,GAAE,OAAO,GAAGA,GAAE,OAAO,CAAC,CAAC;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yBAAyBA,IAAE,MAAMA,IAAE,IAAI,CAAC,EAAE,SAAS,cAAc;AACvE,IAAM,sBAAsBA,IACzB,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","z","z","distance","distance","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","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"]}
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/common/schematicPinLabel.ts","../lib/components/board.ts","../lib/components/group.ts","../lib/common/point.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 * If true, pcbX/pcbY will be interpreted relative to the parent group\n */\n pcbRelative?: boolean\n /**\n * If true, both pcb and schematic coordinates will be interpreted relative to the parent group\n */\n relative?: boolean\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 /**\n * If true, X/Y coordinates will be interpreted relative to the parent group\n */\n relative?: boolean\n\n /**\n * If true, schX/schY will be interpreted relative to the parent group\n */\n schRelative?: boolean\n\n /**\n * If true, pcbX/pcbY will be interpreted relative to the parent group\n */\n pcbRelative?: boolean\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 pcbRelative: z.boolean().optional(),\n relative: z.boolean().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 relative: z.boolean().optional(),\n schRelative: z.boolean().optional(),\n pcbRelative: z.boolean().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 PinAttributeMap {\n providesPower?: boolean\n requiresPower?: boolean\n providesGround?: boolean\n requiresGround?: boolean\n providesVoltage?: string | number\n requiresVoltage?: string | number\n}\n\nexport const pinAttributeMap = z.object({\n providesPower: z.boolean().optional(),\n requiresPower: z.boolean().optional(),\n providesGround: z.boolean().optional(),\n requiresGround: z.boolean().optional(),\n providesVoltage: z.union([z.string(), z.number()]).optional(),\n requiresVoltage: z.union([z.string(), z.number()]).optional(),\n})\n\nexpectTypesMatch<PinAttributeMap, z.input<typeof pinAttributeMap>>(true)\n\nexport interface CommonComponentProps<PinLabel extends string = string>\n extends CommonLayoutProps {\n key?: any\n name: string\n pinAttributes?: Record<PinLabel, PinAttributeMap>\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.record(z.string(), pinAttributeMap).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 { z } from \"zod\"\n\n/**\n * Valid pin label string. Must consist only of letters,\n * numbers, or underscores.\n */\nexport const schematicPinLabel = z.string().regex(/^[A-Za-z0-9_]+$/)\nexport type SchematicPinLabel = z.infer<typeof schematicPinLabel>\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n material?: \"fr4\" | \"fr1\"\n /** Number of layers for the PCB */\n layers?: 2 | 4\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n layers: z.union([z.literal(2), z.literal(4)]).default(2),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { layer_ref, length, distance } 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 { type Point, point } from \"lib/common/point\"\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\n .enum([\"grid\", \"flex\", \"match-adapt\", \"relative\", \"none\"])\n .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 gridRowGap: z.number().or(z.string()).optional(),\n gridColumnGap: 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\n .enum([\n \"start\",\n \"center\",\n \"end\",\n \"stretch\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ])\n .optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n pack: z\n .boolean()\n .optional()\n .describe(\"Pack the contents of this group using a packing strategy\"),\n packOrderStrategy: z\n .enum([\n \"largest_to_smallest\",\n \"first_to_last\",\n \"highest_to_lowest_pin_count\",\n ])\n .optional(),\n packPlacementStrategy: z\n .enum([\"shortest_connection_along_outline\"])\n .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\" | \"relative\" | \"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 gridRowGap?: number | string\n gridColumnGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?:\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n pack?: boolean\n packOrderStrategy?:\n | \"largest_to_smallest\"\n | \"first_to_last\"\n | \"highest_to_lowest_pin_count\"\n packPlacementStrategy?: \"shortest_connection_along_outline\"\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 /** @deprecated Use `pcbGrid` */\n grid?: boolean\n /** @deprecated Use `pcbFlex` */\n flex?: boolean | string\n\n pcbGrid?: boolean\n pcbGridCols?: number | string\n pcbGridRows?: number | string\n pcbGridTemplateRows?: string\n pcbGridTemplateColumns?: string\n pcbGridTemplate?: string\n pcbGridGap?: number | string\n pcbGridRowGap?: number | string\n pcbGridColumnGap?: number | string\n\n pcbFlex?: boolean | string\n pcbFlexDirection?: \"row\" | \"column\"\n pcbAlignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n pcbJustifyContent?:\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\"\n pcbFlexRow?: boolean\n pcbFlexColumn?: boolean\n pcbGap?: number | string\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 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 /** When autosizing, the board will be made square */\n square?: boolean\n /** Desired empty area of the board e.g. \"22mm^2\" or \"20%\" */\n emptyArea?: string\n /** Desired filled area of the board e.g. \"22mm^2\" or \"20%\" */\n filledArea?: string\n\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\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 grid: layoutConfig.shape.grid.describe(\"@deprecated use pcbGrid\"),\n flex: layoutConfig.shape.flex.describe(\"@deprecated use pcbFlex\"),\n pcbGrid: z.boolean().optional(),\n pcbGridCols: z.number().or(z.string()).optional(),\n pcbGridRows: z.number().or(z.string()).optional(),\n pcbGridTemplateRows: z.string().optional(),\n pcbGridTemplateColumns: z.string().optional(),\n pcbGridTemplate: z.string().optional(),\n pcbGridGap: z.number().or(z.string()).optional(),\n pcbGridRowGap: z.number().or(z.string()).optional(),\n pcbGridColumnGap: z.number().or(z.string()).optional(),\n pcbFlex: z.boolean().or(z.string()).optional(),\n pcbFlexDirection: z.enum([\"row\", \"column\"]).optional(),\n pcbAlignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n pcbJustifyContent: z\n .enum([\n \"start\",\n \"center\",\n \"end\",\n \"stretch\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ])\n .optional(),\n pcbFlexRow: z.boolean().optional(),\n pcbFlexColumn: z.boolean().optional(),\n pcbGap: z.number().or(z.string()).optional(),\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 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 square: z.boolean().optional(),\n emptyArea: z.string().optional(),\n filledArea: z.string().optional(),\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.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 { 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 { 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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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<\n PinLabel extends SchematicPinLabel = SchematicPinLabel,\n> extends CommonComponentProps<PinLabel> {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\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> | keyof 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 schematicPinLabel,\n schematicPinLabel\n .or(z.array(schematicPinLabel).readonly())\n .or(z.array(schematicPinLabel)),\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 pcbPinLabels: z.record(z.string(), z.string()).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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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<\n number | SchematicPinLabel,\n SchematicPinLabel | SchematicPinLabel[]\n >\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\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(\n z.number().or(schematicPinLabel),\n schematicPinLabel.or(z.array(schematicPinLabel)),\n )\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 pcbPinLabels: z.record(z.string(), z.string()).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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<\n number | SchematicPinLabel,\n SchematicPinLabel | SchematicPinLabel[]\n >\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(\n z.number().or(schematicPinLabel),\n schematicPinLabel.or(z.array(schematicPinLabel)),\n )\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 extends Omit<PcbLayoutProps, \"layer\"> {\n name?: string\n rectPad?: boolean\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({ layer: true }).extend({\n name: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n shape: z.literal(\"pill\"),\n rectPad: z.boolean().optional(),\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 {\n schematicPinLabel,\n type SchematicPinLabel,\n} from \"lib/common/schematicPinLabel\"\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, female, or unpopulated\n */\n gender?: \"male\" | \"female\" | \"unpopulated\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Labels for PCB pins\n */\n pcbPinLabels?: Record<string, string>\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * If true, the header is a right-angle style connector\n */\n rightAngle?: 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?: SchematicPinLabel[]\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\", \"unpopulated\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n pcbPinLabels: z.record(z.string(), z.string()).optional(),\n doubleRow: z.boolean().optional(),\n rightAngle: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(schematicPinLabel).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\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\n\nexport const transistorPinsLabels = [\n \"pin1\",\n \"pin2\",\n \"pin3\",\n \"emitter\",\n \"collector\",\n \"base\",\n \"gate\",\n \"source\",\n \"drain\",\n] as const\nexport type transistorPinsLabels = (typeof transistorPinsLabels)[number]\n\nexport interface TransistorProps<PinLabel extends string = string>\n extends CommonComponentProps<PinLabel> {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n connections?: Connections<transistorPinsLabels>\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n connections: createConnectionsProp(transistorPinsLabels).optional(),\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([\n \"standard\",\n \"schottky\",\n \"zener\",\n \"avalanche\",\n \"photo\",\n \"tvs\",\n])\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 avalanche: 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.avalanche,\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 avalanche: 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 \"avalanche\":\n result.avalanche = 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\" | \"avalanche\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n avalanche?: 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 { schematicOrientation } from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\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 laser: z.boolean().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().optional(),\n horizontalAlign: z.enum([\"left\", \"center\", \"right\"]).optional(),\n verticalAlign: z.enum([\"top\", \"middle\", \"bottom\"]).optional(),\n fontSize: distance.optional(),\n rowSpan: z.number().optional(),\n colSpan: z.number().optional(),\n width: distance.optional(),\n text: z.string().optional(),\n})\n\nexport interface SchematicCellProps {\n children?: string\n horizontalAlign?: \"left\" | \"center\" | \"right\"\n verticalAlign?: \"top\" | \"middle\" | \"bottom\"\n fontSize?: number | string\n rowSpan?: number\n colSpan?: number\n width?: number | string\n text?: 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;AAC3D,iBAAyE,IAAI;;;ACnB7E,SAAS,KAAAA,U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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","z","z","distance","distance","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","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"]}
@@ -32,9 +32,9 @@ export interface OvalPlatedHoleProps
32
32
  innerHeight?: number | string
33
33
  }
34
34
 
35
- export interface PillPlatedHoleProps
36
- extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
35
+ export interface PillPlatedHoleProps extends Omit<PcbLayoutProps, "layer"> {
37
36
  name?: string
37
+ rectPad?: boolean
38
38
  connectsTo?: string | string[]
39
39
  shape: "pill"
40
40
  outerWidth: number | string
@@ -113,10 +113,11 @@ export const platedHoleProps = z
113
113
  innerHeight: distance.optional().describe("DEPRECATED use holeHeight"),
114
114
  portHints: portHints.optional(),
115
115
  }),
116
- pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
116
+ pcbLayoutProps.omit({ layer: true }).extend({
117
117
  name: z.string().optional(),
118
118
  connectsTo: z.string().or(z.array(z.string())).optional(),
119
119
  shape: z.literal("pill"),
120
+ rectPad: z.boolean().optional(),
120
121
  outerWidth: distance,
121
122
  outerHeight: distance,
122
123
  holeWidth: distanceHiddenUndefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.273",
3
+ "version": "0.0.274",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",