circuit-json 0.0.123 → 0.0.125

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
@@ -220,6 +220,7 @@ Defines a simple capacitor component
220
220
  interface SourceSimpleCapacitor extends SourceComponentBase {
221
221
  ftype: "simple_capacitor"
222
222
  capacitance: number
223
+ display_capacitance?: string
223
224
  }
224
225
  ```
225
226
 
@@ -313,6 +314,7 @@ Defines a simple resistor component
313
314
  interface SourceSimpleResistor extends SourceComponentBase {
314
315
  ftype: "simple_resistor"
315
316
  resistance: number
317
+ display_resistance?: string
316
318
  }
317
319
  ```
318
320
 
@@ -352,6 +354,7 @@ interface SourceTrace {
352
354
  connected_source_port_ids: string[]
353
355
  connected_source_net_ids: string[]
354
356
  subcircuit_connectivity_map_key?: string
357
+ max_length?: number
355
358
  }
356
359
  ```
357
360
 
package/dist/index.d.mts CHANGED
@@ -141,6 +141,7 @@ declare const source_simple_capacitor: z.ZodObject<z.objectUtil.extendShape<{
141
141
  }, {
142
142
  ftype: z.ZodLiteral<"simple_capacitor">;
143
143
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
144
+ display_capacitance: z.ZodOptional<z.ZodString>;
144
145
  }>, "strip", z.ZodTypeAny, {
145
146
  type: "source_component";
146
147
  ftype: "simple_capacitor";
@@ -150,6 +151,7 @@ declare const source_simple_capacitor: z.ZodObject<z.objectUtil.extendShape<{
150
151
  manufacturer_part_number?: string | undefined;
151
152
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
152
153
  display_value?: string | undefined;
154
+ display_capacitance?: string | undefined;
153
155
  }, {
154
156
  type: "source_component";
155
157
  ftype: "simple_capacitor";
@@ -159,6 +161,7 @@ declare const source_simple_capacitor: z.ZodObject<z.objectUtil.extendShape<{
159
161
  manufacturer_part_number?: string | undefined;
160
162
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
161
163
  display_value?: string | undefined;
164
+ display_capacitance?: string | undefined;
162
165
  }>;
163
166
  type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>;
164
167
  /**
@@ -167,6 +170,7 @@ type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>;
167
170
  interface SourceSimpleCapacitor extends SourceComponentBase {
168
171
  ftype: "simple_capacitor";
169
172
  capacitance: number;
173
+ display_capacitance?: string;
170
174
  }
171
175
 
172
176
  declare const source_simple_resistor: z.ZodObject<z.objectUtil.extendShape<{
@@ -180,6 +184,7 @@ declare const source_simple_resistor: z.ZodObject<z.objectUtil.extendShape<{
180
184
  }, {
181
185
  ftype: z.ZodLiteral<"simple_resistor">;
182
186
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
187
+ display_resistance: z.ZodOptional<z.ZodString>;
183
188
  }>, "strip", z.ZodTypeAny, {
184
189
  type: "source_component";
185
190
  ftype: "simple_resistor";
@@ -189,6 +194,7 @@ declare const source_simple_resistor: z.ZodObject<z.objectUtil.extendShape<{
189
194
  manufacturer_part_number?: string | undefined;
190
195
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
191
196
  display_value?: string | undefined;
197
+ display_resistance?: string | undefined;
192
198
  }, {
193
199
  type: "source_component";
194
200
  ftype: "simple_resistor";
@@ -198,6 +204,7 @@ declare const source_simple_resistor: z.ZodObject<z.objectUtil.extendShape<{
198
204
  manufacturer_part_number?: string | undefined;
199
205
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
200
206
  display_value?: string | undefined;
207
+ display_resistance?: string | undefined;
201
208
  }>;
202
209
  type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>;
203
210
  /**
@@ -206,6 +213,7 @@ type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>;
206
213
  interface SourceSimpleResistor extends SourceComponentBase {
207
214
  ftype: "simple_resistor";
208
215
  resistance: number;
216
+ display_resistance?: string;
209
217
  }
210
218
 
211
219
  declare const source_simple_diode: z.ZodObject<z.objectUtil.extendShape<{
@@ -433,6 +441,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
433
441
  }, {
434
442
  ftype: z.ZodLiteral<"simple_resistor">;
435
443
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
444
+ display_resistance: z.ZodOptional<z.ZodString>;
436
445
  }>, "strip", z.ZodTypeAny, {
437
446
  type: "source_component";
438
447
  ftype: "simple_resistor";
@@ -442,6 +451,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
442
451
  manufacturer_part_number?: string | undefined;
443
452
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
444
453
  display_value?: string | undefined;
454
+ display_resistance?: string | undefined;
445
455
  }, {
446
456
  type: "source_component";
447
457
  ftype: "simple_resistor";
@@ -451,6 +461,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
451
461
  manufacturer_part_number?: string | undefined;
452
462
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
453
463
  display_value?: string | undefined;
464
+ display_resistance?: string | undefined;
454
465
  }>, z.ZodObject<z.objectUtil.extendShape<{
455
466
  type: z.ZodLiteral<"source_component">;
456
467
  ftype: z.ZodOptional<z.ZodString>;
@@ -462,6 +473,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
462
473
  }, {
463
474
  ftype: z.ZodLiteral<"simple_capacitor">;
464
475
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
476
+ display_capacitance: z.ZodOptional<z.ZodString>;
465
477
  }>, "strip", z.ZodTypeAny, {
466
478
  type: "source_component";
467
479
  ftype: "simple_capacitor";
@@ -471,6 +483,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
471
483
  manufacturer_part_number?: string | undefined;
472
484
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
473
485
  display_value?: string | undefined;
486
+ display_capacitance?: string | undefined;
474
487
  }, {
475
488
  type: "source_component";
476
489
  ftype: "simple_capacitor";
@@ -480,6 +493,7 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
480
493
  manufacturer_part_number?: string | undefined;
481
494
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
482
495
  display_value?: string | undefined;
496
+ display_capacitance?: string | undefined;
483
497
  }>, z.ZodObject<z.objectUtil.extendShape<{
484
498
  type: z.ZodLiteral<"source_component">;
485
499
  ftype: z.ZodOptional<z.ZodString>;
@@ -926,6 +940,7 @@ interface SourceTrace {
926
940
  connected_source_port_ids: string[];
927
941
  connected_source_net_ids: string[];
928
942
  subcircuit_connectivity_map_key?: string;
943
+ max_length?: number;
929
944
  }
930
945
  declare const source_trace: z.ZodObject<{
931
946
  type: z.ZodLiteral<"source_trace">;
@@ -933,18 +948,21 @@ declare const source_trace: z.ZodObject<{
933
948
  connected_source_port_ids: z.ZodArray<z.ZodString, "many">;
934
949
  connected_source_net_ids: z.ZodArray<z.ZodString, "many">;
935
950
  subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
951
+ max_length: z.ZodOptional<z.ZodNumber>;
936
952
  }, "strip", z.ZodTypeAny, {
937
953
  type: "source_trace";
938
954
  source_trace_id: string;
939
955
  connected_source_port_ids: string[];
940
956
  connected_source_net_ids: string[];
941
957
  subcircuit_connectivity_map_key?: string | undefined;
958
+ max_length?: number | undefined;
942
959
  }, {
943
960
  type: "source_trace";
944
961
  source_trace_id: string;
945
962
  connected_source_port_ids: string[];
946
963
  connected_source_net_ids: string[];
947
964
  subcircuit_connectivity_map_key?: string | undefined;
965
+ max_length?: number | undefined;
948
966
  }>;
949
967
 
950
968
  declare const source_group: z.ZodObject<{
@@ -3702,6 +3720,7 @@ declare const pcb_trace: z.ZodObject<{
3702
3720
  route_thickness_mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["constant", "interpolated"]>>>;
3703
3721
  route_order_index: z.ZodOptional<z.ZodNumber>;
3704
3722
  should_round_corners: z.ZodOptional<z.ZodBoolean>;
3723
+ trace_length: z.ZodOptional<z.ZodNumber>;
3705
3724
  route: z.ZodArray<z.ZodUnion<[z.ZodObject<{
3706
3725
  route_type: z.ZodLiteral<"wire">;
3707
3726
  x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
@@ -3778,6 +3797,7 @@ declare const pcb_trace: z.ZodObject<{
3778
3797
  route_thickness_mode?: "constant" | "interpolated" | undefined;
3779
3798
  route_order_index?: number | undefined;
3780
3799
  should_round_corners?: boolean | undefined;
3800
+ trace_length?: number | undefined;
3781
3801
  }, {
3782
3802
  type: "pcb_trace";
3783
3803
  route: ({
@@ -3803,6 +3823,7 @@ declare const pcb_trace: z.ZodObject<{
3803
3823
  route_thickness_mode?: "constant" | "interpolated" | undefined;
3804
3824
  route_order_index?: number | undefined;
3805
3825
  should_round_corners?: boolean | undefined;
3826
+ trace_length?: number | undefined;
3806
3827
  }>;
3807
3828
  type PcbTraceInput = z.input<typeof pcb_trace>;
3808
3829
  interface PcbTraceRoutePointWire {
@@ -3839,6 +3860,7 @@ interface PcbTrace {
3839
3860
  route_order_index?: number;
3840
3861
  route_thickness_mode?: "constant" | "interpolated";
3841
3862
  should_round_corners?: boolean;
3863
+ trace_length?: number;
3842
3864
  route: Array<PcbTraceRoutePoint>;
3843
3865
  }
3844
3866
  /**
@@ -5057,18 +5079,21 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5057
5079
  connected_source_port_ids: z.ZodArray<z.ZodString, "many">;
5058
5080
  connected_source_net_ids: z.ZodArray<z.ZodString, "many">;
5059
5081
  subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
5082
+ max_length: z.ZodOptional<z.ZodNumber>;
5060
5083
  }, "strip", z.ZodTypeAny, {
5061
5084
  type: "source_trace";
5062
5085
  source_trace_id: string;
5063
5086
  connected_source_port_ids: string[];
5064
5087
  connected_source_net_ids: string[];
5065
5088
  subcircuit_connectivity_map_key?: string | undefined;
5089
+ max_length?: number | undefined;
5066
5090
  }, {
5067
5091
  type: "source_trace";
5068
5092
  source_trace_id: string;
5069
5093
  connected_source_port_ids: string[];
5070
5094
  connected_source_net_ids: string[];
5071
5095
  subcircuit_connectivity_map_key?: string | undefined;
5096
+ max_length?: number | undefined;
5072
5097
  }>, z.ZodObject<{
5073
5098
  type: z.ZodLiteral<"source_port">;
5074
5099
  pin_number: z.ZodOptional<z.ZodNumber>;
@@ -5101,6 +5126,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5101
5126
  }, {
5102
5127
  ftype: z.ZodLiteral<"simple_resistor">;
5103
5128
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5129
+ display_resistance: z.ZodOptional<z.ZodString>;
5104
5130
  }>, "strip", z.ZodTypeAny, {
5105
5131
  type: "source_component";
5106
5132
  ftype: "simple_resistor";
@@ -5110,6 +5136,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5110
5136
  manufacturer_part_number?: string | undefined;
5111
5137
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5112
5138
  display_value?: string | undefined;
5139
+ display_resistance?: string | undefined;
5113
5140
  }, {
5114
5141
  type: "source_component";
5115
5142
  ftype: "simple_resistor";
@@ -5119,6 +5146,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5119
5146
  manufacturer_part_number?: string | undefined;
5120
5147
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5121
5148
  display_value?: string | undefined;
5149
+ display_resistance?: string | undefined;
5122
5150
  }>, z.ZodObject<z.objectUtil.extendShape<{
5123
5151
  type: z.ZodLiteral<"source_component">;
5124
5152
  ftype: z.ZodOptional<z.ZodString>;
@@ -5130,6 +5158,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5130
5158
  }, {
5131
5159
  ftype: z.ZodLiteral<"simple_capacitor">;
5132
5160
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5161
+ display_capacitance: z.ZodOptional<z.ZodString>;
5133
5162
  }>, "strip", z.ZodTypeAny, {
5134
5163
  type: "source_component";
5135
5164
  ftype: "simple_capacitor";
@@ -5139,6 +5168,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5139
5168
  manufacturer_part_number?: string | undefined;
5140
5169
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5141
5170
  display_value?: string | undefined;
5171
+ display_capacitance?: string | undefined;
5142
5172
  }, {
5143
5173
  type: "source_component";
5144
5174
  ftype: "simple_capacitor";
@@ -5148,6 +5178,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5148
5178
  manufacturer_part_number?: string | undefined;
5149
5179
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5150
5180
  display_value?: string | undefined;
5181
+ display_capacitance?: string | undefined;
5151
5182
  }>, z.ZodObject<z.objectUtil.extendShape<{
5152
5183
  type: z.ZodLiteral<"source_component">;
5153
5184
  ftype: z.ZodOptional<z.ZodString>;
@@ -5683,6 +5714,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5683
5714
  }, {
5684
5715
  ftype: z.ZodLiteral<"simple_capacitor">;
5685
5716
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5717
+ display_capacitance: z.ZodOptional<z.ZodString>;
5686
5718
  }>, "strip", z.ZodTypeAny, {
5687
5719
  type: "source_component";
5688
5720
  ftype: "simple_capacitor";
@@ -5692,6 +5724,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5692
5724
  manufacturer_part_number?: string | undefined;
5693
5725
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5694
5726
  display_value?: string | undefined;
5727
+ display_capacitance?: string | undefined;
5695
5728
  }, {
5696
5729
  type: "source_component";
5697
5730
  ftype: "simple_capacitor";
@@ -5701,6 +5734,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5701
5734
  manufacturer_part_number?: string | undefined;
5702
5735
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5703
5736
  display_value?: string | undefined;
5737
+ display_capacitance?: string | undefined;
5704
5738
  }>, z.ZodObject<z.objectUtil.extendShape<{
5705
5739
  type: z.ZodLiteral<"source_component">;
5706
5740
  ftype: z.ZodOptional<z.ZodString>;
@@ -5738,6 +5772,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5738
5772
  }, {
5739
5773
  ftype: z.ZodLiteral<"simple_resistor">;
5740
5774
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5775
+ display_resistance: z.ZodOptional<z.ZodString>;
5741
5776
  }>, "strip", z.ZodTypeAny, {
5742
5777
  type: "source_component";
5743
5778
  ftype: "simple_resistor";
@@ -5747,6 +5782,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5747
5782
  manufacturer_part_number?: string | undefined;
5748
5783
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5749
5784
  display_value?: string | undefined;
5785
+ display_resistance?: string | undefined;
5750
5786
  }, {
5751
5787
  type: "source_component";
5752
5788
  ftype: "simple_resistor";
@@ -5756,6 +5792,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
5756
5792
  manufacturer_part_number?: string | undefined;
5757
5793
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5758
5794
  display_value?: string | undefined;
5795
+ display_resistance?: string | undefined;
5759
5796
  }>, z.ZodObject<z.objectUtil.extendShape<{
5760
5797
  type: z.ZodLiteral<"source_component">;
5761
5798
  ftype: z.ZodOptional<z.ZodString>;
@@ -6458,6 +6495,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
6458
6495
  route_thickness_mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["constant", "interpolated"]>>>;
6459
6496
  route_order_index: z.ZodOptional<z.ZodNumber>;
6460
6497
  should_round_corners: z.ZodOptional<z.ZodBoolean>;
6498
+ trace_length: z.ZodOptional<z.ZodNumber>;
6461
6499
  route: z.ZodArray<z.ZodUnion<[z.ZodObject<{
6462
6500
  route_type: z.ZodLiteral<"wire">;
6463
6501
  x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
@@ -6534,6 +6572,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
6534
6572
  route_thickness_mode?: "constant" | "interpolated" | undefined;
6535
6573
  route_order_index?: number | undefined;
6536
6574
  should_round_corners?: boolean | undefined;
6575
+ trace_length?: number | undefined;
6537
6576
  }, {
6538
6577
  type: "pcb_trace";
6539
6578
  route: ({
@@ -6559,6 +6598,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
6559
6598
  route_thickness_mode?: "constant" | "interpolated" | undefined;
6560
6599
  route_order_index?: number | undefined;
6561
6600
  should_round_corners?: boolean | undefined;
6601
+ trace_length?: number | undefined;
6562
6602
  }>, z.ZodObject<{
6563
6603
  type: z.ZodLiteral<"pcb_via">;
6564
6604
  pcb_via_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -8279,18 +8319,21 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8279
8319
  connected_source_port_ids: z.ZodArray<z.ZodString, "many">;
8280
8320
  connected_source_net_ids: z.ZodArray<z.ZodString, "many">;
8281
8321
  subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
8322
+ max_length: z.ZodOptional<z.ZodNumber>;
8282
8323
  }, "strip", z.ZodTypeAny, {
8283
8324
  type: "source_trace";
8284
8325
  source_trace_id: string;
8285
8326
  connected_source_port_ids: string[];
8286
8327
  connected_source_net_ids: string[];
8287
8328
  subcircuit_connectivity_map_key?: string | undefined;
8329
+ max_length?: number | undefined;
8288
8330
  }, {
8289
8331
  type: "source_trace";
8290
8332
  source_trace_id: string;
8291
8333
  connected_source_port_ids: string[];
8292
8334
  connected_source_net_ids: string[];
8293
8335
  subcircuit_connectivity_map_key?: string | undefined;
8336
+ max_length?: number | undefined;
8294
8337
  }>, z.ZodObject<{
8295
8338
  type: z.ZodLiteral<"source_port">;
8296
8339
  pin_number: z.ZodOptional<z.ZodNumber>;
@@ -8323,6 +8366,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8323
8366
  }, {
8324
8367
  ftype: z.ZodLiteral<"simple_resistor">;
8325
8368
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
8369
+ display_resistance: z.ZodOptional<z.ZodString>;
8326
8370
  }>, "strip", z.ZodTypeAny, {
8327
8371
  type: "source_component";
8328
8372
  ftype: "simple_resistor";
@@ -8332,6 +8376,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8332
8376
  manufacturer_part_number?: string | undefined;
8333
8377
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8334
8378
  display_value?: string | undefined;
8379
+ display_resistance?: string | undefined;
8335
8380
  }, {
8336
8381
  type: "source_component";
8337
8382
  ftype: "simple_resistor";
@@ -8341,6 +8386,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8341
8386
  manufacturer_part_number?: string | undefined;
8342
8387
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8343
8388
  display_value?: string | undefined;
8389
+ display_resistance?: string | undefined;
8344
8390
  }>, z.ZodObject<z.objectUtil.extendShape<{
8345
8391
  type: z.ZodLiteral<"source_component">;
8346
8392
  ftype: z.ZodOptional<z.ZodString>;
@@ -8352,6 +8398,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8352
8398
  }, {
8353
8399
  ftype: z.ZodLiteral<"simple_capacitor">;
8354
8400
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
8401
+ display_capacitance: z.ZodOptional<z.ZodString>;
8355
8402
  }>, "strip", z.ZodTypeAny, {
8356
8403
  type: "source_component";
8357
8404
  ftype: "simple_capacitor";
@@ -8361,6 +8408,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8361
8408
  manufacturer_part_number?: string | undefined;
8362
8409
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8363
8410
  display_value?: string | undefined;
8411
+ display_capacitance?: string | undefined;
8364
8412
  }, {
8365
8413
  type: "source_component";
8366
8414
  ftype: "simple_capacitor";
@@ -8370,6 +8418,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8370
8418
  manufacturer_part_number?: string | undefined;
8371
8419
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8372
8420
  display_value?: string | undefined;
8421
+ display_capacitance?: string | undefined;
8373
8422
  }>, z.ZodObject<z.objectUtil.extendShape<{
8374
8423
  type: z.ZodLiteral<"source_component">;
8375
8424
  ftype: z.ZodOptional<z.ZodString>;
@@ -8905,6 +8954,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8905
8954
  }, {
8906
8955
  ftype: z.ZodLiteral<"simple_capacitor">;
8907
8956
  capacitance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
8957
+ display_capacitance: z.ZodOptional<z.ZodString>;
8908
8958
  }>, "strip", z.ZodTypeAny, {
8909
8959
  type: "source_component";
8910
8960
  ftype: "simple_capacitor";
@@ -8914,6 +8964,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8914
8964
  manufacturer_part_number?: string | undefined;
8915
8965
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8916
8966
  display_value?: string | undefined;
8967
+ display_capacitance?: string | undefined;
8917
8968
  }, {
8918
8969
  type: "source_component";
8919
8970
  ftype: "simple_capacitor";
@@ -8923,6 +8974,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8923
8974
  manufacturer_part_number?: string | undefined;
8924
8975
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8925
8976
  display_value?: string | undefined;
8977
+ display_capacitance?: string | undefined;
8926
8978
  }>, z.ZodObject<z.objectUtil.extendShape<{
8927
8979
  type: z.ZodLiteral<"source_component">;
8928
8980
  ftype: z.ZodOptional<z.ZodString>;
@@ -8960,6 +9012,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8960
9012
  }, {
8961
9013
  ftype: z.ZodLiteral<"simple_resistor">;
8962
9014
  resistance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
9015
+ display_resistance: z.ZodOptional<z.ZodString>;
8963
9016
  }>, "strip", z.ZodTypeAny, {
8964
9017
  type: "source_component";
8965
9018
  ftype: "simple_resistor";
@@ -8969,6 +9022,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8969
9022
  manufacturer_part_number?: string | undefined;
8970
9023
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8971
9024
  display_value?: string | undefined;
9025
+ display_resistance?: string | undefined;
8972
9026
  }, {
8973
9027
  type: "source_component";
8974
9028
  ftype: "simple_resistor";
@@ -8978,6 +9032,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
8978
9032
  manufacturer_part_number?: string | undefined;
8979
9033
  supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
8980
9034
  display_value?: string | undefined;
9035
+ display_resistance?: string | undefined;
8981
9036
  }>, z.ZodObject<z.objectUtil.extendShape<{
8982
9037
  type: z.ZodLiteral<"source_component">;
8983
9038
  ftype: z.ZodOptional<z.ZodString>;
@@ -9680,6 +9735,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
9680
9735
  route_thickness_mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["constant", "interpolated"]>>>;
9681
9736
  route_order_index: z.ZodOptional<z.ZodNumber>;
9682
9737
  should_round_corners: z.ZodOptional<z.ZodBoolean>;
9738
+ trace_length: z.ZodOptional<z.ZodNumber>;
9683
9739
  route: z.ZodArray<z.ZodUnion<[z.ZodObject<{
9684
9740
  route_type: z.ZodLiteral<"wire">;
9685
9741
  x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
@@ -9756,6 +9812,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
9756
9812
  route_thickness_mode?: "constant" | "interpolated" | undefined;
9757
9813
  route_order_index?: number | undefined;
9758
9814
  should_round_corners?: boolean | undefined;
9815
+ trace_length?: number | undefined;
9759
9816
  }, {
9760
9817
  type: "pcb_trace";
9761
9818
  route: ({
@@ -9781,6 +9838,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
9781
9838
  route_thickness_mode?: "constant" | "interpolated" | undefined;
9782
9839
  route_order_index?: number | undefined;
9783
9840
  should_round_corners?: boolean | undefined;
9841
+ trace_length?: number | undefined;
9784
9842
  }>, z.ZodObject<{
9785
9843
  type: z.ZodLiteral<"pcb_via">;
9786
9844
  pcb_via_id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
package/dist/index.mjs CHANGED
@@ -294,7 +294,8 @@ expectTypesMatch(true);
294
294
  // src/source/source_simple_capacitor.ts
295
295
  var source_simple_capacitor = source_component_base.extend({
296
296
  ftype: z8.literal("simple_capacitor"),
297
- capacitance
297
+ capacitance,
298
+ display_capacitance: z8.string().optional()
298
299
  });
299
300
  expectTypesMatch(true);
300
301
 
@@ -302,7 +303,8 @@ expectTypesMatch(true);
302
303
  import { z as z9 } from "zod";
303
304
  var source_simple_resistor = source_component_base.extend({
304
305
  ftype: z9.literal("simple_resistor"),
305
- resistance
306
+ resistance,
307
+ display_resistance: z9.string().optional()
306
308
  });
307
309
  expectTypesMatch(true);
308
310
 
@@ -455,7 +457,8 @@ var source_trace = z26.object({
455
457
  source_trace_id: z26.string(),
456
458
  connected_source_port_ids: z26.array(z26.string()),
457
459
  connected_source_net_ids: z26.array(z26.string()),
458
- subcircuit_connectivity_map_key: z26.string().optional()
460
+ subcircuit_connectivity_map_key: z26.string().optional(),
461
+ max_length: z26.number().optional()
459
462
  });
460
463
  expectTypesMatch(true);
461
464
 
@@ -981,6 +984,7 @@ var pcb_trace = z50.object({
981
984
  route_thickness_mode: z50.enum(["constant", "interpolated"]).default("constant").optional(),
982
985
  route_order_index: z50.number().optional(),
983
986
  should_round_corners: z50.boolean().optional(),
987
+ trace_length: z50.number().optional(),
984
988
  route: z50.array(
985
989
  z50.union([
986
990
  z50.object({
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/utils/expect-types-match.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_led.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_battery.ts","../src/source/source_simple_inductor.ts","../src/source/source_simple_push_button.ts","../src/source/source_simple_potentiometer.ts","../src/source/source_simple_crystal.ts","../src/source/source_simple_pin_header.ts","../src/source/source_simple_resonator.ts","../src/source/source_simple_transistor.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_debug_object.ts","../src/schematic/schematic_voltage_probe.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/pcb/pcb_missing_footprint_error.ts","../src/pcb/pcb_manual_edit_conflict_error.ts","../src/pcb/pcb_group.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n KΩ: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n KV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n uF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nconst unitMappingAndVariantSuffixes = new Set()\nfor (const [baseUnit, info] of Object.entries(unitMappings)) {\n unitMappingAndVariantSuffixes.add(baseUnit)\n for (const variant of Object.keys(info.variants)) {\n unitMappingAndVariantSuffixes.add(variant)\n }\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const reversed_input_string = v.toString().split(\"\").reverse().join(\"\")\n const unit_reversed = reversed_input_string.match(/[^\\d\\s]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n\n const numberPart = v.slice(0, -unit.length)\n if (\n unit in si_prefix_multiplier &&\n !unitMappingAndVariantSuffixes.has(unit)\n ) {\n const siMultiplier =\n si_prefix_multiplier[unit as keyof typeof si_prefix_multiplier]\n return {\n parsedUnit: null,\n unitOfValue: null,\n value: (Number.parseFloat(numberPart) * siMultiplier) as any,\n }\n }\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(numberPart)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const frequency = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_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 type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n})\n\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\ntype InferredSourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\n\n/**\n * Defines a simple capacitor component\n */\nexport interface SourceSimpleCapacitor extends SourceComponentBase {\n ftype: \"simple_capacitor\"\n capacitance: number\n}\n\nexpectTypesMatch<SourceSimpleCapacitor, InferredSourceSimpleCapacitor>(true)\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","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 : `mismatched prop types: ${T5 extends string ? T5 : \"\"}`\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>(\"mismatched prop types: a\")\n","import {\n supplier_name,\n type SupplierName,\n} from \"src/pcb/properties/supplier_name\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceComponentBase {\n type: \"source_component\"\n ftype?: string\n source_component_id: string\n name: string\n manufacturer_part_number?: string\n supplier_part_numbers?: Partial<Record<SupplierName, string[]>>\n display_value?: string\n}\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n})\n\ntype InferredSourceComponentBase = z.infer<typeof source_component_base>\n\nexpectTypesMatch<SourceComponentBase, InferredSourceComponentBase>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n})\n\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\ntype InferredSourceSimpleResistor = z.infer<typeof source_simple_resistor>\n\n/**\n * Defines a simple resistor component\n */\nexport interface SourceSimpleResistor extends SourceComponentBase {\n ftype: \"simple_resistor\"\n resistance: number\n}\n\nexpectTypesMatch<SourceSimpleResistor, InferredSourceSimpleResistor>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\ntype InferredSourceSimpleDiode = z.infer<typeof source_simple_diode>\n\n/**\n * Defines a simple diode component\n */\nexport interface SourceSimpleDiode extends SourceComponentBase {\n ftype: \"simple_diode\"\n}\n\nexpectTypesMatch<SourceSimpleDiode, InferredSourceSimpleDiode>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\ntype InferredSourceSimpleGround = z.infer<typeof source_simple_ground>\n\n/**\n * Defines a simple ground component\n */\nexport interface SourceSimpleGround extends SourceComponentBase {\n ftype: \"simple_ground\"\n}\n\nexpectTypesMatch<SourceSimpleGround, InferredSourceSimpleGround>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\ntype InferredSourceSimpleChip = z.infer<typeof source_simple_chip>\n\n/**\n * Defines a simple integrated circuit component\n */\nexport interface SourceSimpleChip extends SourceComponentBase {\n ftype: \"simple_chip\"\n}\n\nexpectTypesMatch<SourceSimpleChip, InferredSourceSimpleChip>(true)\n","import { z } from \"zod\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport type { SourceComponentBase } from \"./base/source_component_base\"\n\nexport const source_led = source_simple_diode.extend({\n ftype: z.literal(\"led\"),\n})\n\nexport type SourceLedInput = z.input<typeof source_led>\ntype InferredSourceLed = z.infer<typeof source_led>\n\n/**\n * Defines an LED component that extends the simple diode\n */\nexport interface SourceLed extends SourceComponentBase {\n ftype: \"led\"\n}\n\nexpectTypesMatch<SourceLed, InferredSourceLed>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { voltage } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\ntype InferredSourceSimplePowerSource = z.infer<\n typeof source_simple_power_source\n>\n\n/**\n * Defines a simple power source component\n */\nexport interface SourceSimplePowerSource extends SourceComponentBase {\n ftype: \"simple_power_source\"\n voltage: number\n}\n\nexpectTypesMatch<SourceSimplePowerSource, InferredSourceSimplePowerSource>(true)\n","import { z } from \"zod\"\nimport { source_simple_resistor } from \"./source_simple_resistor\"\nimport { source_simple_capacitor } from \"./source_simple_capacitor\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { source_simple_ground } from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip } from \"./source_simple_chip\"\nimport { source_led } from \"./source_led\"\nimport { source_simple_power_source } from \"./source_simple_power_source\"\nimport { source_simple_battery } from \"./source_simple_battery\"\nimport { source_simple_inductor } from \"./source_simple_inductor\"\nimport { source_simple_push_button } from \"./source_simple_push_button\"\nimport { source_simple_potentiometer } from \"./source_simple_potentiometer\"\nimport { source_simple_crystal } from \"./source_simple_crystal\"\nimport { source_simple_pin_header } from \"./source_simple_pin_header\"\nimport { source_simple_resonator } from \"./source_simple_resonator\"\nimport { source_simple_transistor } from \"./source_simple_transistor\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_led,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n source_simple_push_button,\n source_simple_potentiometer,\n source_simple_crystal,\n source_simple_pin_header,\n source_simple_resonator,\n source_simple_transistor,\n])\n\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\ntype InferredSourceSimpleBattery = z.infer<typeof source_simple_battery>\n\n/**\n * Defines a simple battery component\n */\nexport interface SourceSimpleBattery extends SourceComponentBase {\n ftype: \"simple_battery\"\n capacity: number\n}\n\nexpectTypesMatch<SourceSimpleBattery, InferredSourceSimpleBattery>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { inductance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\ntype InferredSourceSimpleInductor = z.infer<typeof source_simple_inductor>\n\n/**\n * Defines a simple inductor component\n */\nexport interface SourceSimpleInductor extends SourceComponentBase {\n ftype: \"simple_inductor\"\n inductance: number\n}\n\nexpectTypesMatch<SourceSimpleInductor, InferredSourceSimpleInductor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_push_button = source_component_base.extend({\n ftype: z.literal(\"simple_push_button\"),\n})\n\nexport type SourceSimplePushButtonInput = z.input<\n typeof source_simple_push_button\n>\ntype InferredSourceSimplePushButton = z.infer<typeof source_simple_push_button>\n\n/**\n * Defines a simple push button component\n */\nexport interface SourceSimplePushButton extends SourceComponentBase {\n ftype: \"simple_push_button\"\n}\n\nexpectTypesMatch<SourceSimplePushButton, InferredSourceSimplePushButton>(true)\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_potentiometer = source_component_base.extend({\n ftype: z.literal(\"simple_potentiometer\"),\n max_resistance: resistance,\n})\n\nexport type SourceSimplePotentiometer = z.infer<\n typeof source_simple_potentiometer\n>\nexport type SourceSimplePotentiometerInput = z.input<\n typeof source_simple_potentiometer\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_crystal = source_component_base.extend({\n ftype: z.literal(\"simple_crystal\"),\n frequency: z.number().describe(\"Frequency in Hz\"),\n load_capacitance: z.number().optional().describe(\"Load capacitance in pF\"),\n})\n\nexport type SourceSimpleCrystalInput = z.input<typeof source_simple_crystal>\ntype InferredSourceSimpleCrystal = z.infer<typeof source_simple_crystal>\n\n/**\n * Defines a simple crystal oscillator component\n */\nexport interface SourceSimpleCrystal extends SourceComponentBase {\n ftype: \"simple_crystal\"\n frequency: number\n load_capacitance?: number\n}\n\nexpectTypesMatch<SourceSimpleCrystal, InferredSourceSimpleCrystal>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_pin_header = source_component_base.extend({\n ftype: z.literal(\"simple_pin_header\"),\n pin_count: z.number(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n})\n\nexport type SourceSimplePinHeader = z.infer<typeof source_simple_pin_header>\nexport type SourceSimplePinHeaderInput = z.input<\n typeof source_simple_pin_header\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, resistance, frequency } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resonator = source_component_base.extend({\n ftype: z.literal(\"simple_resonator\"),\n load_capacitance: capacitance,\n equivalent_series_resistance: resistance.optional(),\n frequency: frequency,\n})\n\nexport type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator>\ntype InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator>\n\n/**\n * Defines a simple resonator component\n */\nexport interface SourceSimpleResonator extends SourceComponentBase {\n ftype: \"simple_resonator\"\n load_capacitance: number\n equivalent_series_resistance?: number\n frequency: number\n}\n\nexpectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_transistor = source_component_base.extend({\n ftype: z.literal(\"simple_transistor\"),\n transistor_type: z.enum([\"npn\", \"pnp\"]),\n})\n\nexport type SourceSimpleTransistorInput = z.input<\n typeof source_simple_transistor\n>\ntype InferredSourceSimpleTransistor = z.infer<typeof source_simple_transistor>\n\n/**\n * Defines a simple transistor component\n * This is a three-pin semiconductor device (emitter, base, collector)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleTransistor extends SourceComponentBase {\n ftype: \"simple_transistor\"\n transistor_type: \"npn\" | \"pnp\"\n}\n\nexpectTypesMatch<SourceSimpleTransistor, InferredSourceSimpleTransistor>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n})\n\nexport type SourcePortInput = z.input<typeof source_port>\ntype InferredSourcePort = z.infer<typeof source_port>\n\n/**\n * Defines a source port that can be connected to other components\n */\nexport interface SourcePort {\n type: \"source_port\"\n pin_number?: number\n port_hints?: string[]\n name: string\n source_port_id: string\n source_component_id: string\n}\n\nexpectTypesMatch<SourcePort, InferredSourcePort>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceTrace {\n type: \"source_trace\"\n source_trace_id: string\n connected_source_port_ids: string[]\n connected_source_net_ids: string[]\n subcircuit_connectivity_map_key?: string\n}\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n subcircuit_connectivity_map_key: z.string().optional(),\n})\n\ntype InferredSourceTrace = z.infer<typeof source_trace>\n\nexpectTypesMatch<SourceTrace, InferredSourceTrace>(true)\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicBox {\n type: \"schematic_box\"\n schematic_component_id: string\n width: number\n height: number\n x: number\n y: number\n}\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\ntype InferredSchematicBox = z.infer<typeof schematic_box>\n\nexpectTypesMatch<SchematicBox, InferredSchematicBox>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPath {\n type: \"schematic_path\"\n schematic_component_id: string\n fill_color?: \"red\" | \"blue\"\n is_filled?: boolean\n points: Point[]\n}\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\ntype InferredSchematicPath = z.infer<typeof schematic_path>\n\nexpectTypesMatch<SchematicPath, InferredSchematicPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { length, rotation } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport interface SchematicPortArrangementBySize {\n left_size: number\n right_size: number\n top_size?: number\n bottom_size?: number\n}\n\nexport interface SchematicPortArrangementBySides {\n left_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n right_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n top_side?: { pins: number[]; direction?: \"left-to-right\" | \"right-to-left\" }\n bottom_side?: {\n pins: number[]\n direction?: \"left-to-right\" | \"right-to-left\"\n }\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementBySize\n | SchematicPortArrangementBySides\n\nexport interface SchematicComponent {\n type: \"schematic_component\"\n rotation: number\n size: Size\n center: Point\n source_component_id: string\n schematic_component_id: string\n pin_spacing?: number\n pin_styles?: Record<\n string,\n {\n left_margin?: number\n right_margin?: number\n top_margin?: number\n bottom_margin?: number\n }\n >\n box_width?: number\n symbol_name?: string\n port_arrangement?: SchematicPortArrangement\n port_labels?: Record<string, string>\n symbol_display_value?: string\n}\n\nexport const schematic_component_port_arrangement_by_size = z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySize,\n z.infer<typeof schematic_component_port_arrangement_by_size>\n>(true)\n\nexport const schematic_component_port_arrangement_by_sides = z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySides,\n z.infer<typeof schematic_component_port_arrangement_by_sides>\n>(true)\n\nexport const port_arrangement = z.union([\n schematic_component_port_arrangement_by_size,\n schematic_component_port_arrangement_by_sides,\n])\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n rotation: rotation.default(0),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: port_arrangement.optional(),\n port_labels: z.record(z.string()).optional(),\n symbol_display_value: z.string().optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\ntype InferredSchematicComponent = z.infer<typeof schematic_component>\n\nexpectTypesMatch<SchematicComponent, InferredSchematicComponent>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * Defines a line on the schematic, this can be used for adding arbitrary lines\n * to a schematic, but don't use it for drawing traces, schematic boxes or where\n * other schematic elements are more appropriate.\n */\nexport interface SchematicLine {\n type: \"schematic_line\"\n schematic_component_id: string\n x1: number\n x2: number\n y1: number\n y2: number\n}\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\ntype InferredSchematicLine = z.infer<typeof schematic_line>\n\nexpectTypesMatch<SchematicLine, InferredSchematicLine>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicTraceEdge {\n from: {\n x: number\n y: number\n }\n to: {\n x: number\n y: number\n }\n is_crossing?: boolean\n from_schematic_port_id?: string\n to_schematic_port_id?: string\n}\n\nexport interface SchematicTrace {\n type: \"schematic_trace\"\n schematic_trace_id: string\n source_trace_id: string\n junctions: {\n x: number\n y: number\n }[]\n edges: SchematicTraceEdge[]\n}\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n junctions: z.array(\n z.object({\n x: z.number(),\n y: z.number(),\n }),\n ),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n is_crossing: z.boolean().optional(),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\ntype InferredSchematicTrace = z.infer<typeof schematic_trace>\n\nexpectTypesMatch<SchematicTraceInput, InferredSchematicTrace>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicText {\n type: \"schematic_text\"\n schematic_component_id: string\n schematic_text_id: string\n text: string\n position: {\n x: number\n y: number\n }\n rotation: number\n anchor: \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\"\n color: string\n}\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string(),\n schematic_text_id: z.string(),\n text: z.string(),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .enum([\"center\", \"left\", \"right\", \"top\", \"bottom\"])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\ntype InferredSchematicText = z.infer<typeof schematic_text>\n\nexpectTypesMatch<SchematicText, InferredSchematicText>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n distance_from_component_edge: z.number().optional(),\n side_of_component: z.enum([\"top\", \"bottom\", \"left\", \"right\"]).optional(),\n true_ccw_index: z.number().optional(),\n pin_number: z.number().optional(),\n display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n source_net_id: z.string(),\n center: point,\n anchor_position: point.optional(),\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n symbol_name: z.string().optional(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type SchematicNetLabel = z.infer<typeof schematic_net_label>\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicError {\n type: \"schematic_error\"\n schematic_error_id: string\n error_type: \"schematic_port_not_found\"\n message: string\n}\n\nexport const schematic_error = z\n .object({\n type: z.literal(\"schematic_error\"),\n schematic_error_id: z.string(),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\ntype InferredSchematicError = z.infer<typeof schematic_error>\n\nexpectTypesMatch<SchematicError, InferredSchematicError>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_point = schematic_debug_object_base.extend({\n shape: z.literal(\"point\"),\n center: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n schematic_debug_point,\n])\ntype InferredSchematicDebugObject = z.infer<typeof schematic_debug_object>\n\nexport interface SchematicDebugRect {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"rect\"\n center: Point\n size: Size\n}\n\nexport interface SchematicDebugLine {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"line\"\n start: Point\n end: Point\n}\n\nexport interface SchematicDebugPoint {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"point\"\n center: Point\n}\n\nexport type SchematicDebugObject =\n | SchematicDebugRect\n | SchematicDebugLine\n | SchematicDebugPoint\n\nexpectTypesMatch<SchematicDebugObject, InferredSchematicDebugObject>(true)\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { voltage } from \"src/units\"\n\nexport interface SchematicVoltageProbe {\n type: \"schematic_voltage_probe\"\n schematic_voltage_probe_id: string\n position: Point\n schematic_trace_id: string\n voltage?: number\n}\n\nexport const schematic_voltage_probe = z\n .object({\n type: z.literal(\"schematic_voltage_probe\"),\n schematic_voltage_probe_id: z.string(),\n position: point,\n schematic_trace_id: z.string(),\n voltage: voltage.optional(),\n })\n .describe(\"Defines a voltage probe measurement point on a schematic trace\")\n\nexport type SchematicVoltageProbeInput = z.input<typeof schematic_voltage_probe>\ntype InferredSchematicVoltageProbe = z.infer<typeof schematic_voltage_probe>\n\nexpectTypesMatch<SchematicVoltageProbe, InferredSchematicVoltageProbe>(true)\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_circular_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n hole_shape: z.literal(\"circle\"),\n pad_shape: z.literal(\"rect\"),\n hole_diameter: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\nexport interface PcbHoleCircularWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"circular_hole_with_rect_pad\"\n hole_shape: \"circle\"\n pad_shape: \"rect\"\n hole_diameter: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n pcb_circular_hole_with_rect_pad,\n])\nexport type PcbPlatedHole =\n | PcbPlatedHoleCircle\n | PcbPlatedHoleOval\n | PcbHoleCircularWithRectPad\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\nexpectTypesMatch<\n PcbHoleCircularWithRectPad,\n z.infer<typeof pcb_circular_hole_with_rect_pad>\n>(true)\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance, rotation, type Rotation } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rotated_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: rotation,\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([pcb_smtpad_circle, pcb_smtpad_rect, pcb_smtpad_rotated_rect])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\ntype PCBSMTPadRotatedRect = z.infer<typeof pcb_smtpad_rotated_rect>\n\n/**\n * Defines a circular SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rotated rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRotatedRect {\n type: \"pcb_smtpad\"\n shape: \"rotated_rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Rotation\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad = PcbSmtPadCircle | PcbSmtPadRect | PcbSmtPadRotatedRect\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\nexpectTypesMatch<PcbSmtPadRotatedRect, PCBSMTPadRotatedRect>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([pcb_solder_paste_circle, pcb_solder_paste_rect])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste = PcbSolderPasteCircle | PcbSolderPasteRect\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n // @ts-ignore\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n // @ts-ignore\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n route: z.array(\n z.union([\n z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n }),\n z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n }),\n ]),\n ),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n ccw_rotation: z.number().optional(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n ccw_rotation?: number\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n center: point,\n radius: length,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n center: Point\n radius: Length\n layer: VisibleLayer\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_missing_footprint_error = z\n .object({\n type: z.literal(\"pcb_missing_footprint_error\"),\n pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(\n \"pcb_missing_footprint_error\",\n ),\n error_type: z.literal(\"pcb_missing_footprint_error\"),\n source_component_id: z.string(),\n message: z.string(),\n })\n .describe(\"Defines a missing footprint error on the PCB\")\n\nexport type PcbMissingFootprintErrorInput = z.input<\n typeof pcb_missing_footprint_error\n>\ntype InferredPcbMissingFootprintError = z.infer<\n typeof pcb_missing_footprint_error\n>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbMissingFootprintError {\n type: \"pcb_missing_footprint_error\"\n pcb_missing_footprint_error_id: string\n error_type: \"pcb_missing_footprint_error\"\n source_component_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbMissingFootprintError\n */\nexport type PCBMissingFootprintError = PcbMissingFootprintError\n\nexpectTypesMatch<PcbMissingFootprintError, InferredPcbMissingFootprintError>(\n true,\n)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const pcb_manual_edit_conflict_error = z\n .object({\n type: z.literal(\"pcb_manual_edit_conflict_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_manual_edit_conflict_error\"),\n message: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n })\n .describe(\n \"Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\",\n )\n\nexport type PcbManualEditConflictErrorInput = z.input<\n typeof pcb_manual_edit_conflict_error\n>\ntype InferredPcbManualEditConflictError = z.infer<\n typeof pcb_manual_edit_conflict_error\n>\n\n/**\n * Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates\n */\nexport interface PcbManualEditConflictError {\n type: \"pcb_manual_edit_conflict_error\"\n pcb_error_id: string\n message: string\n pcb_component_id: string\n source_component_id: string\n}\n\n/**\n * @deprecated use PcbManualEditConflictError instead\n */\nexport type PCBManualEditConflictError = PcbManualEditConflictError\n\nexpectTypesMatch<\n PcbManualEditConflictError,\n InferredPcbManualEditConflictError\n>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_group = z\n .object({\n type: z.literal(\"pcb_group\"),\n pcb_group_id: getZodPrefixedIdWithDefault(\"pcb_group\"),\n width: length,\n height: length,\n center: point,\n pcb_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the PCB\")\n\nexport type PcbGroupInput = z.input<typeof pcb_group>\ntype InferredPcbGroup = z.infer<typeof pcb_group>\n\n/**\n * Defines a group of components on the PCB\n */\nexport interface PcbGroup {\n type: \"pcb_group\"\n pcb_group_id: string\n width: Length\n height: Length\n center: Point\n pcb_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<PcbGroup, InferredPcbGroup>(true)\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\n\nexport const any_circuit_element = z.union([\n // TODO source_config\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_led,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n src.source_simple_inductor,\n src.source_simple_pin_header,\n src.source_simple_resonator,\n src.source_simple_transistor,\n src.source_simple_potentiometer,\n src.source_simple_push_button,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_missing_footprint_error,\n pcb.pcb_manual_edit_conflict_error,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_group,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n sch.schematic_voltage_probe,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n\n/**\n * Type representing a complete Circuit JSON document, which is an array of circuit elements.\n * This is the primary type used when working with circuit-json files or API responses.\n */\nexport type CircuitJson = AnyCircuitElement[]\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,QAAG;AAAA,IACD,UAAU;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ACtB,OAAO,UAAU,SAAS;AAAA;AAAA,EAG1B,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,IAAI,EAAE,SAAS;AAChC,CAAC,EACA,SAAS,gCAAgC;;;ACvB5C,SAAS,KAAAC,WAAS;AAMX,IAAM,sBAAsBC,IAAE,MAAM;AAAA,EAKrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
1
+ {"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/utils/expect-types-match.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_led.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_battery.ts","../src/source/source_simple_inductor.ts","../src/source/source_simple_push_button.ts","../src/source/source_simple_potentiometer.ts","../src/source/source_simple_crystal.ts","../src/source/source_simple_pin_header.ts","../src/source/source_simple_resonator.ts","../src/source/source_simple_transistor.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_debug_object.ts","../src/schematic/schematic_voltage_probe.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/pcb/pcb_missing_footprint_error.ts","../src/pcb/pcb_manual_edit_conflict_error.ts","../src/pcb/pcb_group.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n KΩ: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n KV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n uF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nconst unitMappingAndVariantSuffixes = new Set()\nfor (const [baseUnit, info] of Object.entries(unitMappings)) {\n unitMappingAndVariantSuffixes.add(baseUnit)\n for (const variant of Object.keys(info.variants)) {\n unitMappingAndVariantSuffixes.add(variant)\n }\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const reversed_input_string = v.toString().split(\"\").reverse().join(\"\")\n const unit_reversed = reversed_input_string.match(/[^\\d\\s]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n\n const numberPart = v.slice(0, -unit.length)\n if (\n unit in si_prefix_multiplier &&\n !unitMappingAndVariantSuffixes.has(unit)\n ) {\n const siMultiplier =\n si_prefix_multiplier[unit as keyof typeof si_prefix_multiplier]\n return {\n parsedUnit: null,\n unitOfValue: null,\n value: (Number.parseFloat(numberPart) * siMultiplier) as any,\n }\n }\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(numberPart)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const frequency = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_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 type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n display_capacitance: z.string().optional(),\n})\n\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\ntype InferredSourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\n\n/**\n * Defines a simple capacitor component\n */\nexport interface SourceSimpleCapacitor extends SourceComponentBase {\n ftype: \"simple_capacitor\"\n capacitance: number\n display_capacitance?: string\n}\n\nexpectTypesMatch<SourceSimpleCapacitor, InferredSourceSimpleCapacitor>(true)\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","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 : `mismatched prop types: ${T5 extends string ? T5 : \"\"}`\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>(\"mismatched prop types: a\")\n","import {\n supplier_name,\n type SupplierName,\n} from \"src/pcb/properties/supplier_name\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceComponentBase {\n type: \"source_component\"\n ftype?: string\n source_component_id: string\n name: string\n manufacturer_part_number?: string\n supplier_part_numbers?: Partial<Record<SupplierName, string[]>>\n display_value?: string\n}\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n})\n\ntype InferredSourceComponentBase = z.infer<typeof source_component_base>\n\nexpectTypesMatch<SourceComponentBase, InferredSourceComponentBase>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n display_resistance: z.string().optional(),\n})\n\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\ntype InferredSourceSimpleResistor = z.infer<typeof source_simple_resistor>\n\n/**\n * Defines a simple resistor component\n */\nexport interface SourceSimpleResistor extends SourceComponentBase {\n ftype: \"simple_resistor\"\n resistance: number\n display_resistance?: string\n}\n\nexpectTypesMatch<SourceSimpleResistor, InferredSourceSimpleResistor>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\ntype InferredSourceSimpleDiode = z.infer<typeof source_simple_diode>\n\n/**\n * Defines a simple diode component\n */\nexport interface SourceSimpleDiode extends SourceComponentBase {\n ftype: \"simple_diode\"\n}\n\nexpectTypesMatch<SourceSimpleDiode, InferredSourceSimpleDiode>(true)\n","import {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\ntype InferredSourceSimpleGround = z.infer<typeof source_simple_ground>\n\n/**\n * Defines a simple ground component\n */\nexport interface SourceSimpleGround extends SourceComponentBase {\n ftype: \"simple_ground\"\n}\n\nexpectTypesMatch<SourceSimpleGround, InferredSourceSimpleGround>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\ntype InferredSourceSimpleChip = z.infer<typeof source_simple_chip>\n\n/**\n * Defines a simple integrated circuit component\n */\nexport interface SourceSimpleChip extends SourceComponentBase {\n ftype: \"simple_chip\"\n}\n\nexpectTypesMatch<SourceSimpleChip, InferredSourceSimpleChip>(true)\n","import { z } from \"zod\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport type { SourceComponentBase } from \"./base/source_component_base\"\n\nexport const source_led = source_simple_diode.extend({\n ftype: z.literal(\"led\"),\n})\n\nexport type SourceLedInput = z.input<typeof source_led>\ntype InferredSourceLed = z.infer<typeof source_led>\n\n/**\n * Defines an LED component that extends the simple diode\n */\nexport interface SourceLed extends SourceComponentBase {\n ftype: \"led\"\n}\n\nexpectTypesMatch<SourceLed, InferredSourceLed>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { voltage } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\ntype InferredSourceSimplePowerSource = z.infer<\n typeof source_simple_power_source\n>\n\n/**\n * Defines a simple power source component\n */\nexport interface SourceSimplePowerSource extends SourceComponentBase {\n ftype: \"simple_power_source\"\n voltage: number\n}\n\nexpectTypesMatch<SourceSimplePowerSource, InferredSourceSimplePowerSource>(true)\n","import { z } from \"zod\"\nimport { source_simple_resistor } from \"./source_simple_resistor\"\nimport { source_simple_capacitor } from \"./source_simple_capacitor\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { source_simple_ground } from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip } from \"./source_simple_chip\"\nimport { source_led } from \"./source_led\"\nimport { source_simple_power_source } from \"./source_simple_power_source\"\nimport { source_simple_battery } from \"./source_simple_battery\"\nimport { source_simple_inductor } from \"./source_simple_inductor\"\nimport { source_simple_push_button } from \"./source_simple_push_button\"\nimport { source_simple_potentiometer } from \"./source_simple_potentiometer\"\nimport { source_simple_crystal } from \"./source_simple_crystal\"\nimport { source_simple_pin_header } from \"./source_simple_pin_header\"\nimport { source_simple_resonator } from \"./source_simple_resonator\"\nimport { source_simple_transistor } from \"./source_simple_transistor\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_led,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n source_simple_push_button,\n source_simple_potentiometer,\n source_simple_crystal,\n source_simple_pin_header,\n source_simple_resonator,\n source_simple_transistor,\n])\n\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\ntype InferredSourceSimpleBattery = z.infer<typeof source_simple_battery>\n\n/**\n * Defines a simple battery component\n */\nexport interface SourceSimpleBattery extends SourceComponentBase {\n ftype: \"simple_battery\"\n capacity: number\n}\n\nexpectTypesMatch<SourceSimpleBattery, InferredSourceSimpleBattery>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { inductance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\ntype InferredSourceSimpleInductor = z.infer<typeof source_simple_inductor>\n\n/**\n * Defines a simple inductor component\n */\nexport interface SourceSimpleInductor extends SourceComponentBase {\n ftype: \"simple_inductor\"\n inductance: number\n}\n\nexpectTypesMatch<SourceSimpleInductor, InferredSourceSimpleInductor>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_push_button = source_component_base.extend({\n ftype: z.literal(\"simple_push_button\"),\n})\n\nexport type SourceSimplePushButtonInput = z.input<\n typeof source_simple_push_button\n>\ntype InferredSourceSimplePushButton = z.infer<typeof source_simple_push_button>\n\n/**\n * Defines a simple push button component\n */\nexport interface SourceSimplePushButton extends SourceComponentBase {\n ftype: \"simple_push_button\"\n}\n\nexpectTypesMatch<SourceSimplePushButton, InferredSourceSimplePushButton>(true)\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_potentiometer = source_component_base.extend({\n ftype: z.literal(\"simple_potentiometer\"),\n max_resistance: resistance,\n})\n\nexport type SourceSimplePotentiometer = z.infer<\n typeof source_simple_potentiometer\n>\nexport type SourceSimplePotentiometerInput = z.input<\n typeof source_simple_potentiometer\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_crystal = source_component_base.extend({\n ftype: z.literal(\"simple_crystal\"),\n frequency: z.number().describe(\"Frequency in Hz\"),\n load_capacitance: z.number().optional().describe(\"Load capacitance in pF\"),\n})\n\nexport type SourceSimpleCrystalInput = z.input<typeof source_simple_crystal>\ntype InferredSourceSimpleCrystal = z.infer<typeof source_simple_crystal>\n\n/**\n * Defines a simple crystal oscillator component\n */\nexport interface SourceSimpleCrystal extends SourceComponentBase {\n ftype: \"simple_crystal\"\n frequency: number\n load_capacitance?: number\n}\n\nexpectTypesMatch<SourceSimpleCrystal, InferredSourceSimpleCrystal>(true)\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_pin_header = source_component_base.extend({\n ftype: z.literal(\"simple_pin_header\"),\n pin_count: z.number(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\n})\n\nexport type SourceSimplePinHeader = z.infer<typeof source_simple_pin_header>\nexport type SourceSimplePinHeaderInput = z.input<\n typeof source_simple_pin_header\n>\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { capacitance, resistance, frequency } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_resonator = source_component_base.extend({\n ftype: z.literal(\"simple_resonator\"),\n load_capacitance: capacitance,\n equivalent_series_resistance: resistance.optional(),\n frequency: frequency,\n})\n\nexport type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator>\ntype InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator>\n\n/**\n * Defines a simple resonator component\n */\nexport interface SourceSimpleResonator extends SourceComponentBase {\n ftype: \"simple_resonator\"\n load_capacitance: number\n equivalent_series_resistance?: number\n frequency: number\n}\n\nexpectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true)\n","import { z } from \"zod\"\nimport {\n source_component_base,\n type SourceComponentBase,\n} from \"src/source/base/source_component_base\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_simple_transistor = source_component_base.extend({\n ftype: z.literal(\"simple_transistor\"),\n transistor_type: z.enum([\"npn\", \"pnp\"]),\n})\n\nexport type SourceSimpleTransistorInput = z.input<\n typeof source_simple_transistor\n>\ntype InferredSourceSimpleTransistor = z.infer<typeof source_simple_transistor>\n\n/**\n * Defines a simple transistor component\n * This is a three-pin semiconductor device (emitter, base, collector)\n * Pin configuration is handled by the schematic port system\n */\n\nexport interface SourceSimpleTransistor extends SourceComponentBase {\n ftype: \"simple_transistor\"\n transistor_type: \"npn\" | \"pnp\"\n}\n\nexpectTypesMatch<SourceSimpleTransistor, InferredSourceSimpleTransistor>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n})\n\nexport type SourcePortInput = z.input<typeof source_port>\ntype InferredSourcePort = z.infer<typeof source_port>\n\n/**\n * Defines a source port that can be connected to other components\n */\nexport interface SourcePort {\n type: \"source_port\"\n pin_number?: number\n port_hints?: string[]\n name: string\n source_port_id: string\n source_component_id: string\n}\n\nexpectTypesMatch<SourcePort, InferredSourcePort>(true)\n","import { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { z } from \"zod\"\n\nexport interface SourceTrace {\n type: \"source_trace\"\n source_trace_id: string\n connected_source_port_ids: string[]\n connected_source_net_ids: string[]\n subcircuit_connectivity_map_key?: string\n max_length?: number\n}\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n subcircuit_connectivity_map_key: z.string().optional(),\n max_length: z.number().optional(),\n})\n\ntype InferredSourceTrace = z.infer<typeof source_trace>\n\nexpectTypesMatch<SourceTrace, InferredSourceTrace>(true)\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicBox {\n type: \"schematic_box\"\n schematic_component_id: string\n width: number\n height: number\n x: number\n y: number\n}\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\ntype InferredSchematicBox = z.infer<typeof schematic_box>\n\nexpectTypesMatch<SchematicBox, InferredSchematicBox>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPath {\n type: \"schematic_path\"\n schematic_component_id: string\n fill_color?: \"red\" | \"blue\"\n is_filled?: boolean\n points: Point[]\n}\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\ntype InferredSchematicPath = z.infer<typeof schematic_path>\n\nexpectTypesMatch<SchematicPath, InferredSchematicPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { length, rotation } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport interface SchematicPortArrangementBySize {\n left_size: number\n right_size: number\n top_size?: number\n bottom_size?: number\n}\n\nexport interface SchematicPortArrangementBySides {\n left_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n right_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n top_side?: { pins: number[]; direction?: \"left-to-right\" | \"right-to-left\" }\n bottom_side?: {\n pins: number[]\n direction?: \"left-to-right\" | \"right-to-left\"\n }\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementBySize\n | SchematicPortArrangementBySides\n\nexport interface SchematicComponent {\n type: \"schematic_component\"\n rotation: number\n size: Size\n center: Point\n source_component_id: string\n schematic_component_id: string\n pin_spacing?: number\n pin_styles?: Record<\n string,\n {\n left_margin?: number\n right_margin?: number\n top_margin?: number\n bottom_margin?: number\n }\n >\n box_width?: number\n symbol_name?: string\n port_arrangement?: SchematicPortArrangement\n port_labels?: Record<string, string>\n symbol_display_value?: string\n}\n\nexport const schematic_component_port_arrangement_by_size = z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySize,\n z.infer<typeof schematic_component_port_arrangement_by_size>\n>(true)\n\nexport const schematic_component_port_arrangement_by_sides = z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n // @ts-ignore\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangementBySides,\n z.infer<typeof schematic_component_port_arrangement_by_sides>\n>(true)\n\nexport const port_arrangement = z.union([\n schematic_component_port_arrangement_by_size,\n schematic_component_port_arrangement_by_sides,\n])\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n rotation: rotation.default(0),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: port_arrangement.optional(),\n port_labels: z.record(z.string()).optional(),\n symbol_display_value: z.string().optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\ntype InferredSchematicComponent = z.infer<typeof schematic_component>\n\nexpectTypesMatch<SchematicComponent, InferredSchematicComponent>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * Defines a line on the schematic, this can be used for adding arbitrary lines\n * to a schematic, but don't use it for drawing traces, schematic boxes or where\n * other schematic elements are more appropriate.\n */\nexport interface SchematicLine {\n type: \"schematic_line\"\n schematic_component_id: string\n x1: number\n x2: number\n y1: number\n y2: number\n}\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\ntype InferredSchematicLine = z.infer<typeof schematic_line>\n\nexpectTypesMatch<SchematicLine, InferredSchematicLine>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicTraceEdge {\n from: {\n x: number\n y: number\n }\n to: {\n x: number\n y: number\n }\n is_crossing?: boolean\n from_schematic_port_id?: string\n to_schematic_port_id?: string\n}\n\nexport interface SchematicTrace {\n type: \"schematic_trace\"\n schematic_trace_id: string\n source_trace_id: string\n junctions: {\n x: number\n y: number\n }[]\n edges: SchematicTraceEdge[]\n}\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n junctions: z.array(\n z.object({\n x: z.number(),\n y: z.number(),\n }),\n ),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n is_crossing: z.boolean().optional(),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\ntype InferredSchematicTrace = z.infer<typeof schematic_trace>\n\nexpectTypesMatch<SchematicTraceInput, InferredSchematicTrace>(true)\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicText {\n type: \"schematic_text\"\n schematic_component_id: string\n schematic_text_id: string\n text: string\n position: {\n x: number\n y: number\n }\n rotation: number\n anchor: \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\"\n color: string\n}\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string(),\n schematic_text_id: z.string(),\n text: z.string(),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .enum([\"center\", \"left\", \"right\", \"top\", \"bottom\"])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\ntype InferredSchematicText = z.infer<typeof schematic_text>\n\nexpectTypesMatch<SchematicText, InferredSchematicText>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n distance_from_component_edge: z.number().optional(),\n side_of_component: z.enum([\"top\", \"bottom\", \"left\", \"right\"]).optional(),\n true_ccw_index: z.number().optional(),\n pin_number: z.number().optional(),\n display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n source_net_id: z.string(),\n center: point,\n anchor_position: point.optional(),\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n symbol_name: z.string().optional(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type SchematicNetLabel = z.infer<typeof schematic_net_label>\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicError {\n type: \"schematic_error\"\n schematic_error_id: string\n error_type: \"schematic_port_not_found\"\n message: string\n}\n\nexport const schematic_error = z\n .object({\n type: z.literal(\"schematic_error\"),\n schematic_error_id: z.string(),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\ntype InferredSchematicError = z.infer<typeof schematic_error>\n\nexpectTypesMatch<SchematicError, InferredSchematicError>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_point = schematic_debug_object_base.extend({\n shape: z.literal(\"point\"),\n center: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n schematic_debug_point,\n])\ntype InferredSchematicDebugObject = z.infer<typeof schematic_debug_object>\n\nexport interface SchematicDebugRect {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"rect\"\n center: Point\n size: Size\n}\n\nexport interface SchematicDebugLine {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"line\"\n start: Point\n end: Point\n}\n\nexport interface SchematicDebugPoint {\n type: \"schematic_debug_object\"\n label?: string\n shape: \"point\"\n center: Point\n}\n\nexport type SchematicDebugObject =\n | SchematicDebugRect\n | SchematicDebugLine\n | SchematicDebugPoint\n\nexpectTypesMatch<SchematicDebugObject, InferredSchematicDebugObject>(true)\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\nimport { point, type Point } from \"../common/point\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\nimport { voltage } from \"src/units\"\n\nexport interface SchematicVoltageProbe {\n type: \"schematic_voltage_probe\"\n schematic_voltage_probe_id: string\n position: Point\n schematic_trace_id: string\n voltage?: number\n}\n\nexport const schematic_voltage_probe = z\n .object({\n type: z.literal(\"schematic_voltage_probe\"),\n schematic_voltage_probe_id: z.string(),\n position: point,\n schematic_trace_id: z.string(),\n voltage: voltage.optional(),\n })\n .describe(\"Defines a voltage probe measurement point on a schematic trace\")\n\nexport type SchematicVoltageProbeInput = z.input<typeof schematic_voltage_probe>\ntype InferredSchematicVoltageProbe = z.infer<typeof schematic_voltage_probe>\n\nexpectTypesMatch<SchematicVoltageProbe, InferredSchematicVoltageProbe>(true)\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_circular_hole_with_rect_pad = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n hole_shape: z.literal(\"circle\"),\n pad_shape: z.literal(\"rect\"),\n hole_diameter: z.number(),\n rect_pad_width: z.number(),\n rect_pad_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\nexport interface PcbHoleCircularWithRectPad {\n type: \"pcb_plated_hole\"\n shape: \"circular_hole_with_rect_pad\"\n hole_shape: \"circle\"\n pad_shape: \"rect\"\n hole_diameter: number\n rect_pad_width: number\n rect_pad_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n pcb_circular_hole_with_rect_pad,\n])\nexport type PcbPlatedHole =\n | PcbPlatedHoleCircle\n | PcbPlatedHoleOval\n | PcbHoleCircularWithRectPad\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\nexpectTypesMatch<\n PcbHoleCircularWithRectPad,\n z.infer<typeof pcb_circular_hole_with_rect_pad>\n>(true)\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance, rotation, type Rotation } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rotated_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rotated_rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n ccw_rotation: rotation,\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([pcb_smtpad_circle, pcb_smtpad_rect, pcb_smtpad_rotated_rect])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\ntype PCBSMTPadRotatedRect = z.infer<typeof pcb_smtpad_rotated_rect>\n\n/**\n * Defines a circular SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines a rotated rectangular SMT pad on the PCB\n */\nexport interface PcbSmtPadRotatedRect {\n type: \"pcb_smtpad\"\n shape: \"rotated_rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n ccw_rotation: Rotation\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad = PcbSmtPadCircle | PcbSmtPadRect | PcbSmtPadRotatedRect\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\nexpectTypesMatch<PcbSmtPadRotatedRect, PCBSMTPadRotatedRect>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([pcb_solder_paste_circle, pcb_solder_paste_rect])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste = PcbSolderPasteCircle | PcbSolderPasteRect\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n // @ts-ignore\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n // @ts-ignore\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n trace_length: z.number().optional(),\n route: z.array(\n z.union([\n z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n }),\n z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n }),\n ]),\n ),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n trace_length?: number\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n ccw_rotation: z.number().optional(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n ccw_rotation?: number\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n center: point,\n radius: length,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n center: Point\n radius: Length\n layer: VisibleLayer\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_missing_footprint_error = z\n .object({\n type: z.literal(\"pcb_missing_footprint_error\"),\n pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(\n \"pcb_missing_footprint_error\",\n ),\n error_type: z.literal(\"pcb_missing_footprint_error\"),\n source_component_id: z.string(),\n message: z.string(),\n })\n .describe(\"Defines a missing footprint error on the PCB\")\n\nexport type PcbMissingFootprintErrorInput = z.input<\n typeof pcb_missing_footprint_error\n>\ntype InferredPcbMissingFootprintError = z.infer<\n typeof pcb_missing_footprint_error\n>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbMissingFootprintError {\n type: \"pcb_missing_footprint_error\"\n pcb_missing_footprint_error_id: string\n error_type: \"pcb_missing_footprint_error\"\n source_component_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbMissingFootprintError\n */\nexport type PCBMissingFootprintError = PcbMissingFootprintError\n\nexpectTypesMatch<PcbMissingFootprintError, InferredPcbMissingFootprintError>(\n true,\n)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"../common\"\nimport { expectTypesMatch } from \"../utils/expect-types-match\"\n\nexport const pcb_manual_edit_conflict_error = z\n .object({\n type: z.literal(\"pcb_manual_edit_conflict_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_manual_edit_conflict_error\"),\n message: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n })\n .describe(\n \"Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\",\n )\n\nexport type PcbManualEditConflictErrorInput = z.input<\n typeof pcb_manual_edit_conflict_error\n>\ntype InferredPcbManualEditConflictError = z.infer<\n typeof pcb_manual_edit_conflict_error\n>\n\n/**\n * Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates\n */\nexport interface PcbManualEditConflictError {\n type: \"pcb_manual_edit_conflict_error\"\n pcb_error_id: string\n message: string\n pcb_component_id: string\n source_component_id: string\n}\n\n/**\n * @deprecated use PcbManualEditConflictError instead\n */\nexport type PCBManualEditConflictError = PcbManualEditConflictError\n\nexpectTypesMatch<\n PcbManualEditConflictError,\n InferredPcbManualEditConflictError\n>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_group = z\n .object({\n type: z.literal(\"pcb_group\"),\n pcb_group_id: getZodPrefixedIdWithDefault(\"pcb_group\"),\n width: length,\n height: length,\n center: point,\n pcb_component_ids: z.array(z.string()),\n name: z.string().optional(),\n description: z.string().optional(),\n })\n .describe(\"Defines a group of components on the PCB\")\n\nexport type PcbGroupInput = z.input<typeof pcb_group>\ntype InferredPcbGroup = z.infer<typeof pcb_group>\n\n/**\n * Defines a group of components on the PCB\n */\nexport interface PcbGroup {\n type: \"pcb_group\"\n pcb_group_id: string\n width: Length\n height: Length\n center: Point\n pcb_component_ids: string[]\n name?: string\n description?: string\n}\n\nexpectTypesMatch<PcbGroup, InferredPcbGroup>(true)\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\n\nexport const any_circuit_element = z.union([\n // TODO source_config\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_led,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n src.source_simple_inductor,\n src.source_simple_pin_header,\n src.source_simple_resonator,\n src.source_simple_transistor,\n src.source_simple_potentiometer,\n src.source_simple_push_button,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_missing_footprint_error,\n pcb.pcb_manual_edit_conflict_error,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_group,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n sch.schematic_voltage_probe,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n\n/**\n * Type representing a complete Circuit JSON document, which is an array of circuit elements.\n * This is the primary type used when working with circuit-json files or API responses.\n */\nexport type CircuitJson = AnyCircuitElement[]\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,QAAG;AAAA,IACD,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,EAC/B,kBAAkBA,IAAE,OAAO;AAAA,EAC3B,kBAAkBA,IAAE,OAAO;AAAA,EAC3B,qBAAqBA,IAAE,OAAO;AAAA,EAC9B,UAAU;AAAA,EACV,UAAU,OAAO,SAAS;AAAA,EAC1B,MAAM,OAAO,SAAS;AAAA,EACtB,OAAO,UAAU,SAAS;AAAA;AAAA,EAG1B,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,IAAI,EAAE,SAAS;AAChC,CAAC,EACA,SAAS,gCAAgC;;;ACvB5C,SAAS,KAAAC,WAAS;AAMX,IAAM,sBAAsBC,IAAE,MAAM;AAAA,EAKrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuit-json",
3
- "version": "0.0.123",
3
+ "version": "0.0.125",
4
4
  "description": "Definitions for the tscircuit intermediary JSON format",
5
5
  "main": "dist/index.mjs",
6
6
  "files": [