@tscircuit/props 0.0.241 → 0.0.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -389,6 +389,11 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
389
389
  key?: any
390
390
  children?: any
391
391
 
392
+ /**
393
+ * Title to display above this group in the schematic view
394
+ */
395
+ schTitle?: string
396
+
392
397
  pcbWidth?: Distance
393
398
  pcbHeight?: Distance
394
399
  schWidth?: Distance
package/dist/index.d.ts CHANGED
@@ -2852,6 +2852,10 @@ interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
2852
2852
  name?: string;
2853
2853
  key?: any;
2854
2854
  children?: any;
2855
+ /**
2856
+ * Title to display above this group in the schematic view
2857
+ */
2858
+ schTitle?: string;
2855
2859
  pcbWidth?: Distance;
2856
2860
  pcbHeight?: Distance;
2857
2861
  schWidth?: Distance;
@@ -3222,6 +3226,7 @@ declare const baseGroupProps: z.ZodObject<z.objectUtil.extendShape<{
3222
3226
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
3223
3227
  name: z.ZodOptional<z.ZodString>;
3224
3228
  children: z.ZodOptional<z.ZodAny>;
3229
+ schTitle: z.ZodOptional<z.ZodString>;
3225
3230
  key: z.ZodOptional<z.ZodAny>;
3226
3231
  }>, "strip", z.ZodTypeAny, {
3227
3232
  pcbX?: number | undefined;
@@ -3262,6 +3267,7 @@ declare const baseGroupProps: z.ZodObject<z.objectUtil.extendShape<{
3262
3267
  height?: number | undefined;
3263
3268
  matchAdapt?: boolean | undefined;
3264
3269
  matchAdaptTemplate?: any;
3270
+ schTitle?: string | undefined;
3265
3271
  pcbWidth?: number | undefined;
3266
3272
  pcbHeight?: number | undefined;
3267
3273
  schWidth?: number | undefined;
@@ -3380,6 +3386,7 @@ declare const baseGroupProps: z.ZodObject<z.objectUtil.extendShape<{
3380
3386
  height?: string | number | undefined;
3381
3387
  matchAdapt?: boolean | undefined;
3382
3388
  matchAdaptTemplate?: any;
3389
+ schTitle?: string | undefined;
3383
3390
  pcbWidth?: string | number | undefined;
3384
3391
  pcbHeight?: string | number | undefined;
3385
3392
  schWidth?: string | number | undefined;
@@ -3711,6 +3718,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
3711
3718
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
3712
3719
  name: z.ZodOptional<z.ZodString>;
3713
3720
  children: z.ZodOptional<z.ZodAny>;
3721
+ schTitle: z.ZodOptional<z.ZodString>;
3714
3722
  key: z.ZodOptional<z.ZodAny>;
3715
3723
  }>, {
3716
3724
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
@@ -3954,6 +3962,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
3954
3962
  height?: number | undefined;
3955
3963
  matchAdapt?: boolean | undefined;
3956
3964
  matchAdaptTemplate?: any;
3965
+ schTitle?: string | undefined;
3957
3966
  pcbWidth?: number | undefined;
3958
3967
  pcbHeight?: number | undefined;
3959
3968
  schWidth?: number | undefined;
@@ -4118,6 +4127,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
4118
4127
  height?: string | number | undefined;
4119
4128
  matchAdapt?: boolean | undefined;
4120
4129
  matchAdaptTemplate?: any;
4130
+ schTitle?: string | undefined;
4121
4131
  pcbWidth?: string | number | undefined;
4122
4132
  pcbHeight?: string | number | undefined;
4123
4133
  schWidth?: string | number | undefined;
@@ -4496,6 +4506,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<z.objectUtil.extendShape
4496
4506
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
4497
4507
  name: z.ZodOptional<z.ZodString>;
4498
4508
  children: z.ZodOptional<z.ZodAny>;
4509
+ schTitle: z.ZodOptional<z.ZodString>;
4499
4510
  key: z.ZodOptional<z.ZodAny>;
4500
4511
  }>, {
4501
4512
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
@@ -4742,6 +4753,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<z.objectUtil.extendShape
4742
4753
  height?: number | undefined;
4743
4754
  matchAdapt?: boolean | undefined;
4744
4755
  matchAdaptTemplate?: any;
4756
+ schTitle?: string | undefined;
4745
4757
  pcbWidth?: number | undefined;
4746
4758
  pcbHeight?: number | undefined;
4747
4759
  schWidth?: number | undefined;
@@ -4907,6 +4919,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<z.objectUtil.extendShape
4907
4919
  height?: string | number | undefined;
4908
4920
  matchAdapt?: boolean | undefined;
4909
4921
  matchAdaptTemplate?: any;
4922
+ schTitle?: string | undefined;
4910
4923
  pcbWidth?: string | number | undefined;
4911
4924
  pcbHeight?: string | number | undefined;
4912
4925
  schWidth?: string | number | undefined;
@@ -5285,6 +5298,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
5285
5298
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
5286
5299
  name: z.ZodOptional<z.ZodString>;
5287
5300
  children: z.ZodOptional<z.ZodAny>;
5301
+ schTitle: z.ZodOptional<z.ZodString>;
5288
5302
  key: z.ZodOptional<z.ZodAny>;
5289
5303
  }>, {
5290
5304
  subcircuit: z.ZodOptional<z.ZodLiteral<false>>;
@@ -5327,6 +5341,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
5327
5341
  height?: number | undefined;
5328
5342
  matchAdapt?: boolean | undefined;
5329
5343
  matchAdaptTemplate?: any;
5344
+ schTitle?: string | undefined;
5330
5345
  pcbWidth?: number | undefined;
5331
5346
  pcbHeight?: number | undefined;
5332
5347
  schWidth?: number | undefined;
@@ -5446,6 +5461,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
5446
5461
  height?: string | number | undefined;
5447
5462
  matchAdapt?: boolean | undefined;
5448
5463
  matchAdaptTemplate?: any;
5464
+ schTitle?: string | undefined;
5449
5465
  pcbWidth?: string | number | undefined;
5450
5466
  pcbHeight?: string | number | undefined;
5451
5467
  schWidth?: string | number | undefined;
@@ -5776,6 +5792,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
5776
5792
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
5777
5793
  name: z.ZodOptional<z.ZodString>;
5778
5794
  children: z.ZodOptional<z.ZodAny>;
5795
+ schTitle: z.ZodOptional<z.ZodString>;
5779
5796
  key: z.ZodOptional<z.ZodAny>;
5780
5797
  }>, {
5781
5798
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
@@ -6022,6 +6039,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
6022
6039
  height?: number | undefined;
6023
6040
  matchAdapt?: boolean | undefined;
6024
6041
  matchAdaptTemplate?: any;
6042
+ schTitle?: string | undefined;
6025
6043
  pcbWidth?: number | undefined;
6026
6044
  pcbHeight?: number | undefined;
6027
6045
  schWidth?: number | undefined;
@@ -6187,6 +6205,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<z.o
6187
6205
  height?: string | number | undefined;
6188
6206
  matchAdapt?: boolean | undefined;
6189
6207
  matchAdaptTemplate?: any;
6208
+ schTitle?: string | undefined;
6190
6209
  pcbWidth?: string | number | undefined;
6191
6210
  pcbHeight?: string | number | undefined;
6192
6211
  schWidth?: string | number | undefined;
@@ -6579,6 +6598,7 @@ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exte
6579
6598
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
6580
6599
  name: z.ZodOptional<z.ZodString>;
6581
6600
  children: z.ZodOptional<z.ZodAny>;
6601
+ schTitle: z.ZodOptional<z.ZodString>;
6582
6602
  key: z.ZodOptional<z.ZodAny>;
6583
6603
  }>, {
6584
6604
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
@@ -6839,6 +6859,7 @@ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exte
6839
6859
  height?: number | undefined;
6840
6860
  matchAdapt?: boolean | undefined;
6841
6861
  matchAdaptTemplate?: any;
6862
+ schTitle?: string | undefined;
6842
6863
  pcbWidth?: number | undefined;
6843
6864
  pcbHeight?: number | undefined;
6844
6865
  schWidth?: number | undefined;
@@ -7009,6 +7030,7 @@ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exte
7009
7030
  height?: string | number | undefined;
7010
7031
  matchAdapt?: boolean | undefined;
7011
7032
  matchAdaptTemplate?: any;
7033
+ schTitle?: string | undefined;
7012
7034
  pcbWidth?: string | number | undefined;
7013
7035
  pcbHeight?: string | number | undefined;
7014
7036
  schWidth?: string | number | undefined;
@@ -7402,6 +7424,7 @@ declare const breakoutProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
7402
7424
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
7403
7425
  name: z.ZodOptional<z.ZodString>;
7404
7426
  children: z.ZodOptional<z.ZodAny>;
7427
+ schTitle: z.ZodOptional<z.ZodString>;
7405
7428
  key: z.ZodOptional<z.ZodAny>;
7406
7429
  }>, {
7407
7430
  layout: z.ZodOptional<z.ZodType<_tscircuit_layout.LayoutBuilder, z.ZodTypeDef, _tscircuit_layout.LayoutBuilder>>;
@@ -7651,6 +7674,7 @@ declare const breakoutProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
7651
7674
  height?: number | undefined;
7652
7675
  matchAdapt?: boolean | undefined;
7653
7676
  matchAdaptTemplate?: any;
7677
+ schTitle?: string | undefined;
7654
7678
  pcbWidth?: number | undefined;
7655
7679
  pcbHeight?: number | undefined;
7656
7680
  schWidth?: number | undefined;
@@ -7815,6 +7839,7 @@ declare const breakoutProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
7815
7839
  height?: string | number | undefined;
7816
7840
  matchAdapt?: boolean | undefined;
7817
7841
  matchAdaptTemplate?: any;
7842
+ schTitle?: string | undefined;
7818
7843
  pcbWidth?: string | number | undefined;
7819
7844
  pcbHeight?: string | number | undefined;
7820
7845
  schWidth?: string | number | undefined;
@@ -14397,6 +14422,7 @@ declare const stampboardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
14397
14422
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
14398
14423
  name: z.ZodOptional<z.ZodString>;
14399
14424
  children: z.ZodOptional<z.ZodAny>;
14425
+ schTitle: z.ZodOptional<z.ZodString>;
14400
14426
  key: z.ZodOptional<z.ZodAny>;
14401
14427
  }>, {
14402
14428
  layout: z.ZodOptional<z.ZodType<_tscircuit_layout.LayoutBuilder, z.ZodTypeDef, _tscircuit_layout.LayoutBuilder>>;
@@ -14672,6 +14698,7 @@ declare const stampboardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
14672
14698
  height?: number | undefined;
14673
14699
  matchAdapt?: boolean | undefined;
14674
14700
  matchAdaptTemplate?: any;
14701
+ schTitle?: string | undefined;
14675
14702
  pcbWidth?: number | undefined;
14676
14703
  pcbHeight?: number | undefined;
14677
14704
  schWidth?: number | undefined;
@@ -14852,6 +14879,7 @@ declare const stampboardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
14852
14879
  height?: string | number | undefined;
14853
14880
  matchAdapt?: boolean | undefined;
14854
14881
  matchAdaptTemplate?: any;
14882
+ schTitle?: string | undefined;
14855
14883
  pcbWidth?: string | number | undefined;
14856
14884
  pcbHeight?: string | number | undefined;
14857
14885
  schWidth?: string | number | undefined;
@@ -19030,6 +19058,7 @@ declare const subcircuitProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
19030
19058
  matchAdaptTemplate: z.ZodOptional<z.ZodAny>;
19031
19059
  name: z.ZodOptional<z.ZodString>;
19032
19060
  children: z.ZodOptional<z.ZodAny>;
19061
+ schTitle: z.ZodOptional<z.ZodString>;
19033
19062
  key: z.ZodOptional<z.ZodAny>;
19034
19063
  }>, {
19035
19064
  layout: z.ZodOptional<z.ZodType<_tscircuit_layout.LayoutBuilder, z.ZodTypeDef, _tscircuit_layout.LayoutBuilder>>;
@@ -19273,6 +19302,7 @@ declare const subcircuitProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
19273
19302
  height?: number | undefined;
19274
19303
  matchAdapt?: boolean | undefined;
19275
19304
  matchAdaptTemplate?: any;
19305
+ schTitle?: string | undefined;
19276
19306
  pcbWidth?: number | undefined;
19277
19307
  pcbHeight?: number | undefined;
19278
19308
  schWidth?: number | undefined;
@@ -19437,6 +19467,7 @@ declare const subcircuitProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
19437
19467
  height?: string | number | undefined;
19438
19468
  matchAdapt?: boolean | undefined;
19439
19469
  matchAdaptTemplate?: any;
19470
+ schTitle?: string | undefined;
19440
19471
  pcbWidth?: string | number | undefined;
19441
19472
  pcbHeight?: string | number | undefined;
19442
19473
  schWidth?: string | number | undefined;
package/dist/index.js CHANGED
@@ -386,6 +386,7 @@ var autorouterProp = z22.union([
386
386
  var baseGroupProps = commonLayoutProps.extend({
387
387
  name: z22.string().optional(),
388
388
  children: z22.any().optional(),
389
+ schTitle: z22.string().optional(),
389
390
  key: z22.any().optional(),
390
391
  ...layoutConfig.shape,
391
392
  pcbWidth: length.optional(),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicOrientation.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/common/connectionsProp.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type FootprintProp, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: FootprintProp\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\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 })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type FootprintProp = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<FootprintProp>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const schematicOrientation = z\n .enum([\n \"vertical\",\n \"horizontal\",\n \"pos_top\",\n \"pos_bottom\",\n \"pos_left\",\n \"pos_right\",\n \"neg_top\",\n \"neg_bottom\",\n \"neg_left\",\n \"neg_right\",\n ])\n .describe(\n \"horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)\",\n )\n\nexport type SchematicOrientation =\n | \"vertical\"\n | \"horizontal\"\n | \"pos_top\"\n | \"pos_bottom\"\n | \"pos_left\"\n | \"pos_right\"\n | \"neg_top\"\n | \"neg_bottom\"\n | \"neg_left\"\n | \"neg_right\"\n\nexpectTypesMatch<SchematicOrientation, z.infer<typeof schematicOrientation>>(\n true,\n)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\n SchematicPortArrangementWithPinCounts\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\n/**\n * @deprecated Use schematicPinArrangement instead.\n */\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexport const schematicPinArrangement = schematicPortArrangement\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { layer_ref, length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n padding: length.optional(),\n paddingLeft: length.optional(),\n paddingRight: length.optional(),\n paddingTop: length.optional(),\n paddingBottom: length.optional(),\n paddingX: length.optional(),\n paddingY: length.optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n paddingX?: Distance\n paddingY?: Distance\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\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 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 local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps extends CommonComponentProps {\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<FusePinLabels>\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 extends CommonComponentProps {\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 extends CommonComponentProps {\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\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 extends CommonComponentProps {\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}\n\nexport const netProps = z.object({\n name: z.string(),\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 extends CommonComponentProps {\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\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n\n /**\n * Schematic pin style (margins, etc)\n */\n schPinStyle?: SchematicPinStyle\n\n /**\n * Schematic pin spacing\n */\n schPinSpacing?: number | string\n\n /**\n * Schematic width\n */\n schWidth?: number | string\n\n /**\n * Schematic height\n */\n schHeight?: number | string\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n connectsTo?: string | string[]\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps extends CommonComponentProps {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\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 extends CommonComponentProps {\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\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 extends CommonComponentProps {\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\n\ntype InferredInductorProps = z.input<typeof inductorProps>\n\nexpectTypesMatch<InductorProps, InferredInductorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\n\nexport interface DiodeProps extends CommonComponentProps {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n schOrientation?: SchematicOrientation\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\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})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n","import { distance, layer_ref, type LayerRefInput } from \"circuit-json\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ViaProps extends CommonLayoutProps {\n name?: string\n fromLayer: LayerRefInput\n toLayer: LayerRefInput\n holeDiameter: number | string\n outerDiameter: number | string\n connectsTo?: string | string[]\n}\n\nexport const viaProps = commonLayoutProps.extend({\n name: z.string().optional(),\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\nexport type InferredViaProps = z.input<typeof viaProps>\nexpectTypesMatch<ViaProps, InferredViaProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance.optional(),\n schY: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"top_left\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance.optional(),\n schY: distance.optional(),\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n 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 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,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,IAAE,MAAMA,IAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACtC;AACF,CAAC;;;ACFD,SAAS,KAAAC,WAAS;AA8BlB,IAAM,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,kBAAkBA,IAAE,IAAI,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,mBAAmBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EACxC,qBAAqBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAC1C,qBAAqBA,IAClB;AAAA,IACCA,IAAE,OAAO;AAAA,IACTA,IAAE;AAAA,MACAA,IAAE,OAAO;AAAA,MACTA,IAAE,MAAM,CAAC,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","connectionTarget","z","distance","connectionTarget","z","distance","z","distance","z","z","distance","z","distance","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","z","connectionTarget","connectionsProp","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","z","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
1
+ {"version":3,"sources":["../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicOrientation.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/common/connectionsProp.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type FootprintProp, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: FootprintProp\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\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 })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type FootprintProp = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<FootprintProp>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const schematicOrientation = z\n .enum([\n \"vertical\",\n \"horizontal\",\n \"pos_top\",\n \"pos_bottom\",\n \"pos_left\",\n \"pos_right\",\n \"neg_top\",\n \"neg_bottom\",\n \"neg_left\",\n \"neg_right\",\n ])\n .describe(\n \"horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)\",\n )\n\nexport type SchematicOrientation =\n | \"vertical\"\n | \"horizontal\"\n | \"pos_top\"\n | \"pos_bottom\"\n | \"pos_left\"\n | \"pos_right\"\n | \"neg_top\"\n | \"neg_bottom\"\n | \"neg_left\"\n | \"neg_right\"\n\nexpectTypesMatch<SchematicOrientation, z.infer<typeof schematicOrientation>>(\n true,\n)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\n SchematicPortArrangementWithPinCounts\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\n/**\n * @deprecated Use schematicPinArrangement instead.\n */\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexport const schematicPinArrangement = schematicPortArrangement\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { layer_ref, length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n padding: length.optional(),\n paddingLeft: length.optional(),\n paddingRight: length.optional(),\n paddingTop: length.optional(),\n paddingBottom: length.optional(),\n paddingX: length.optional(),\n paddingY: length.optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n paddingX?: Distance\n paddingY?: Distance\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n /**\n * Title to display above this group in the schematic view\n */\n schTitle?: string\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\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 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 local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n schTitle: z.string().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConnectorProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n /**\n * Groups of pins that are internally connected\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps extends CommonComponentProps {\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<FusePinLabels>\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 extends CommonComponentProps {\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 extends CommonComponentProps {\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\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 extends CommonComponentProps {\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}\n\nexport const netProps = z.object({\n name: z.string(),\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 extends CommonComponentProps {\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\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n\n /**\n * Schematic pin style (margins, etc)\n */\n schPinStyle?: SchematicPinStyle\n\n /**\n * Schematic pin spacing\n */\n schPinSpacing?: number | string\n\n /**\n * Schematic width\n */\n schWidth?: number | string\n\n /**\n * Schematic height\n */\n schHeight?: number | string\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n connectsTo?: string | string[]\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"top\" | \"right\" | \"bottom\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: z.string().optional(),\n connectsTo: z.string().or(z.array(z.string())).optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"top\", \"right\", \"bottom\"]).optional(),\n})\n\ntype InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps extends CommonComponentProps {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\" | \"igbt\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\", \"igbt\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\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 extends CommonComponentProps {\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\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 extends CommonComponentProps {\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\n\ntype InferredInductorProps = z.input<typeof inductorProps>\n\nexpectTypesMatch<InductorProps, InferredInductorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n schOrientation: schematicOrientation.optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\n\nexport interface DiodeProps extends CommonComponentProps {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n schOrientation?: SchematicOrientation\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport {\n schematicOrientation,\n type SchematicOrientation,\n} from \"lib/common/schematicOrientation\"\nimport { z } from \"zod\"\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})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n","import { distance, layer_ref, type LayerRefInput } from \"circuit-json\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ViaProps extends CommonLayoutProps {\n name?: string\n fromLayer: LayerRefInput\n toLayer: LayerRefInput\n holeDiameter: number | string\n outerDiameter: number | string\n connectsTo?: string | string[]\n}\n\nexport const viaProps = commonLayoutProps.extend({\n name: z.string().optional(),\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n connectsTo: z.string().or(z.array(z.string())).optional(),\n})\nexport type InferredViaProps = z.input<typeof viaProps>\nexpectTypesMatch<ViaProps, InferredViaProps>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance.optional(),\n schY: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"top_left\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance.optional(),\n schY: distance.optional(),\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n 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 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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,SAAS;AAAA,EAClC,YAAY,eAAe,SAAS;AAAA,EACpC,gBAAgBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACpC,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,kBAAkBA,IAAE,IAAI,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,mBAAmBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EACxC,qBAAqBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAC1C,qBAAqBA,IAClB;AAAA,IACCA,IAAE,OAAO;AAAA,IACTA,IAAE;AAAA,MACAA,IAAE,OAAO;AAAA,MACTA,IAAE,MAAM,CAAC,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","connectionTarget","z","distance","connectionTarget","z","distance","z","distance","z","z","distance","z","distance","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","z","connectionTarget","connectionsProp","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","z","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
@@ -104,6 +104,11 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
104
104
  key?: any
105
105
  children?: any
106
106
 
107
+ /**
108
+ * Title to display above this group in the schematic view
109
+ */
110
+ schTitle?: string
111
+
107
112
  pcbWidth?: Distance
108
113
  pcbHeight?: Distance
109
114
  schWidth?: Distance
@@ -213,6 +218,7 @@ export type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps
213
218
  export const baseGroupProps = commonLayoutProps.extend({
214
219
  name: z.string().optional(),
215
220
  children: z.any().optional(),
221
+ schTitle: z.string().optional(),
216
222
  key: z.any().optional(),
217
223
 
218
224
  ...layoutConfig.shape,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.241",
3
+ "version": "0.0.242",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",