@tscircuit/props 0.0.77 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { LayerRef, LayerRefInput } from '@tscircuit/soup';
3
3
  import { ReactElement } from 'react';
4
- import { LayoutBuilder } from '@tscircuit/layout';
4
+ import { LayoutBuilder, ManualEditFile } from '@tscircuit/layout';
5
5
 
6
6
  declare const direction: z.ZodEnum<["up", "down", "left", "right"]>;
7
7
  type Direction = "up" | "down" | "left" | "right";
@@ -1286,20 +1286,21 @@ declare const schematicPinStyle: z.ZodRecord<z.ZodString, z.ZodObject<{
1286
1286
  bottomMargin?: string | number | undefined;
1287
1287
  }>>;
1288
1288
 
1289
+ type Distance = number | string;
1290
+
1289
1291
  type Point = {
1290
1292
  x: number | string;
1291
1293
  y: number | string;
1292
1294
  };
1293
1295
 
1294
- type Distance = number | string;
1295
-
1296
1296
  interface BoardProps {
1297
1297
  width?: number | string;
1298
1298
  height?: number | string;
1299
1299
  outline?: Point[];
1300
1300
  pcbX?: number | string;
1301
1301
  pcbY?: number | string;
1302
- layout?: any;
1302
+ layout?: LayoutBuilder;
1303
+ manualEdits?: ManualEditFile;
1303
1304
  routingDisabled?: boolean;
1304
1305
  children?: any;
1305
1306
  defaultTraceWidth?: Distance;
@@ -1325,7 +1326,8 @@ declare const boardProps: z.ZodObject<{
1325
1326
  }>, "many">>;
1326
1327
  pcbX: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>>;
1327
1328
  pcbY: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>>;
1328
- layout: z.ZodOptional<z.ZodAny>;
1329
+ layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
1330
+ manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
1329
1331
  routingDisabled: z.ZodOptional<z.ZodBoolean>;
1330
1332
  children: z.ZodAny;
1331
1333
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -1336,28 +1338,30 @@ declare const boardProps: z.ZodObject<{
1336
1338
  children?: any;
1337
1339
  width?: number | undefined;
1338
1340
  height?: number | undefined;
1339
- layout?: any;
1340
- routingDisabled?: boolean | undefined;
1341
- defaultTraceWidth?: number | undefined;
1342
- schAutoLayoutEnabled?: boolean | undefined;
1343
1341
  outline?: {
1344
1342
  x: number;
1345
1343
  y: number;
1346
1344
  }[] | undefined;
1345
+ layout?: LayoutBuilder | undefined;
1346
+ manualEdits?: ManualEditFile | undefined;
1347
+ routingDisabled?: boolean | undefined;
1348
+ defaultTraceWidth?: number | undefined;
1349
+ schAutoLayoutEnabled?: boolean | undefined;
1347
1350
  }, {
1348
1351
  pcbX?: string | number | undefined;
1349
1352
  pcbY?: string | number | undefined;
1350
1353
  children?: any;
1351
1354
  width?: string | number | undefined;
1352
1355
  height?: string | number | undefined;
1353
- layout?: any;
1354
- routingDisabled?: boolean | undefined;
1355
- defaultTraceWidth?: string | number | undefined;
1356
- schAutoLayoutEnabled?: boolean | undefined;
1357
1356
  outline?: {
1358
1357
  x: string | number;
1359
1358
  y: string | number;
1360
1359
  }[] | undefined;
1360
+ layout?: LayoutBuilder | undefined;
1361
+ manualEdits?: ManualEditFile | undefined;
1362
+ routingDisabled?: boolean | undefined;
1363
+ defaultTraceWidth?: string | number | undefined;
1364
+ schAutoLayoutEnabled?: boolean | undefined;
1361
1365
  }>;
1362
1366
 
1363
1367
  interface ChipProps extends CommonComponentProps {
@@ -4143,6 +4147,7 @@ interface BaseGroupProps extends CommonLayoutProps {
4143
4147
  interface SubcircuitGroupProps extends BaseGroupProps {
4144
4148
  subcircuit: true;
4145
4149
  layout?: LayoutBuilder;
4150
+ manualEdits?: ManualEditFile;
4146
4151
  routingDisabled?: boolean;
4147
4152
  defaultTraceWidth?: Distance;
4148
4153
  /**
@@ -4221,6 +4226,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
4221
4226
  }>, {
4222
4227
  subcircuit: z.ZodLiteral<true>;
4223
4228
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
4229
+ manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
4224
4230
  schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
4225
4231
  routingDisabled: z.ZodOptional<z.ZodBoolean>;
4226
4232
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -4237,6 +4243,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
4237
4243
  name?: string | undefined;
4238
4244
  children?: any;
4239
4245
  layout?: LayoutBuilder | undefined;
4246
+ manualEdits?: ManualEditFile | undefined;
4240
4247
  routingDisabled?: boolean | undefined;
4241
4248
  defaultTraceWidth?: number | undefined;
4242
4249
  schAutoLayoutEnabled?: boolean | undefined;
@@ -4255,6 +4262,7 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
4255
4262
  name?: string | undefined;
4256
4263
  children?: any;
4257
4264
  layout?: LayoutBuilder | undefined;
4265
+ manualEdits?: ManualEditFile | undefined;
4258
4266
  routingDisabled?: boolean | undefined;
4259
4267
  defaultTraceWidth?: string | number | undefined;
4260
4268
  schAutoLayoutEnabled?: boolean | undefined;
@@ -4326,6 +4334,7 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
4326
4334
  }>, {
4327
4335
  subcircuit: z.ZodLiteral<true>;
4328
4336
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
4337
+ manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
4329
4338
  schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
4330
4339
  routingDisabled: z.ZodOptional<z.ZodBoolean>;
4331
4340
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -4342,6 +4351,7 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
4342
4351
  name?: string | undefined;
4343
4352
  children?: any;
4344
4353
  layout?: LayoutBuilder | undefined;
4354
+ manualEdits?: ManualEditFile | undefined;
4345
4355
  routingDisabled?: boolean | undefined;
4346
4356
  defaultTraceWidth?: number | undefined;
4347
4357
  schAutoLayoutEnabled?: boolean | undefined;
@@ -4360,6 +4370,7 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
4360
4370
  name?: string | undefined;
4361
4371
  children?: any;
4362
4372
  layout?: LayoutBuilder | undefined;
4373
+ manualEdits?: ManualEditFile | undefined;
4363
4374
  routingDisabled?: boolean | undefined;
4364
4375
  defaultTraceWidth?: string | number | undefined;
4365
4376
  schAutoLayoutEnabled?: boolean | undefined;
@@ -5567,6 +5578,438 @@ declare const batteryProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ex
5567
5578
  }>;
5568
5579
  declare const batteryPins: readonly ["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"];
5569
5580
 
5581
+ interface HeaderProps extends CommonComponentProps {
5582
+ /**
5583
+ * Number of pins in the header
5584
+ */
5585
+ pinCount: number;
5586
+ /**
5587
+ * Distance between pins
5588
+ */
5589
+ pitch?: number | string;
5590
+ /**
5591
+ * Whether the header is male or female
5592
+ */
5593
+ gender?: "male" | "female";
5594
+ /**
5595
+ * Whether to show pin labels in silkscreen
5596
+ */
5597
+ showSilkscreenPinLabels?: boolean;
5598
+ /**
5599
+ * Whether the header has two rows of pins
5600
+ */
5601
+ doubleRow?: boolean;
5602
+ }
5603
+ declare const headerProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
5604
+ pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5605
+ pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5606
+ pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5607
+ schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5608
+ schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5609
+ schRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5610
+ layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
5611
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
5612
+ }, "strip", z.ZodTypeAny, {
5613
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5614
+ }, {
5615
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5616
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
5617
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5618
+ }>>;
5619
+ footprint: z.ZodOptional<z.ZodType<Footprint, z.ZodTypeDef, Footprint>>;
5620
+ }, {
5621
+ supplierPartNumbers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, z.ZodArray<z.ZodString, "many">>>;
5622
+ }>, {
5623
+ key: z.ZodOptional<z.ZodAny>;
5624
+ name: z.ZodString;
5625
+ cadModel: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<z.objectUtil.extendShape<{
5626
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
5627
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5628
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5629
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5630
+ }, "strip", z.ZodTypeAny, {
5631
+ x: string | number;
5632
+ y: string | number;
5633
+ z: string | number;
5634
+ }, {
5635
+ x: string | number;
5636
+ y: string | number;
5637
+ z: string | number;
5638
+ }>]>>;
5639
+ positionOffset: z.ZodOptional<z.ZodObject<{
5640
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5641
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5642
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5643
+ }, "strip", z.ZodTypeAny, {
5644
+ x: number;
5645
+ y: number;
5646
+ z: number;
5647
+ }, {
5648
+ x: string | number;
5649
+ y: string | number;
5650
+ z: string | number;
5651
+ }>>;
5652
+ size: z.ZodOptional<z.ZodObject<{
5653
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5654
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5655
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5656
+ }, "strip", z.ZodTypeAny, {
5657
+ x: number;
5658
+ y: number;
5659
+ z: number;
5660
+ }, {
5661
+ x: string | number;
5662
+ y: string | number;
5663
+ z: string | number;
5664
+ }>>;
5665
+ }, {
5666
+ stlUrl: z.ZodString;
5667
+ }>, "strip", z.ZodTypeAny, {
5668
+ stlUrl: string;
5669
+ rotationOffset?: number | {
5670
+ x: string | number;
5671
+ y: string | number;
5672
+ z: string | number;
5673
+ } | undefined;
5674
+ positionOffset?: {
5675
+ x: number;
5676
+ y: number;
5677
+ z: number;
5678
+ } | undefined;
5679
+ size?: {
5680
+ x: number;
5681
+ y: number;
5682
+ z: number;
5683
+ } | undefined;
5684
+ }, {
5685
+ stlUrl: string;
5686
+ rotationOffset?: number | {
5687
+ x: string | number;
5688
+ y: string | number;
5689
+ z: string | number;
5690
+ } | undefined;
5691
+ positionOffset?: {
5692
+ x: string | number;
5693
+ y: string | number;
5694
+ z: string | number;
5695
+ } | undefined;
5696
+ size?: {
5697
+ x: string | number;
5698
+ y: string | number;
5699
+ z: string | number;
5700
+ } | undefined;
5701
+ }>, z.ZodObject<z.objectUtil.extendShape<{
5702
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
5703
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5704
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5705
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5706
+ }, "strip", z.ZodTypeAny, {
5707
+ x: string | number;
5708
+ y: string | number;
5709
+ z: string | number;
5710
+ }, {
5711
+ x: string | number;
5712
+ y: string | number;
5713
+ z: string | number;
5714
+ }>]>>;
5715
+ positionOffset: z.ZodOptional<z.ZodObject<{
5716
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5717
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5718
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5719
+ }, "strip", z.ZodTypeAny, {
5720
+ x: number;
5721
+ y: number;
5722
+ z: number;
5723
+ }, {
5724
+ x: string | number;
5725
+ y: string | number;
5726
+ z: string | number;
5727
+ }>>;
5728
+ size: z.ZodOptional<z.ZodObject<{
5729
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5730
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5731
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5732
+ }, "strip", z.ZodTypeAny, {
5733
+ x: number;
5734
+ y: number;
5735
+ z: number;
5736
+ }, {
5737
+ x: string | number;
5738
+ y: string | number;
5739
+ z: string | number;
5740
+ }>>;
5741
+ }, {
5742
+ objUrl: z.ZodString;
5743
+ mtlUrl: z.ZodOptional<z.ZodString>;
5744
+ }>, "strip", z.ZodTypeAny, {
5745
+ objUrl: string;
5746
+ rotationOffset?: number | {
5747
+ x: string | number;
5748
+ y: string | number;
5749
+ z: string | number;
5750
+ } | undefined;
5751
+ positionOffset?: {
5752
+ x: number;
5753
+ y: number;
5754
+ z: number;
5755
+ } | undefined;
5756
+ size?: {
5757
+ x: number;
5758
+ y: number;
5759
+ z: number;
5760
+ } | undefined;
5761
+ mtlUrl?: string | undefined;
5762
+ }, {
5763
+ objUrl: string;
5764
+ rotationOffset?: number | {
5765
+ x: string | number;
5766
+ y: string | number;
5767
+ z: string | number;
5768
+ } | undefined;
5769
+ positionOffset?: {
5770
+ x: string | number;
5771
+ y: string | number;
5772
+ z: string | number;
5773
+ } | undefined;
5774
+ size?: {
5775
+ x: string | number;
5776
+ y: string | number;
5777
+ z: string | number;
5778
+ } | undefined;
5779
+ mtlUrl?: string | undefined;
5780
+ }>, z.ZodObject<z.objectUtil.extendShape<{
5781
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
5782
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5783
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5784
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5785
+ }, "strip", z.ZodTypeAny, {
5786
+ x: string | number;
5787
+ y: string | number;
5788
+ z: string | number;
5789
+ }, {
5790
+ x: string | number;
5791
+ y: string | number;
5792
+ z: string | number;
5793
+ }>]>>;
5794
+ positionOffset: z.ZodOptional<z.ZodObject<{
5795
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5796
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5797
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5798
+ }, "strip", z.ZodTypeAny, {
5799
+ x: number;
5800
+ y: number;
5801
+ z: number;
5802
+ }, {
5803
+ x: string | number;
5804
+ y: string | number;
5805
+ z: string | number;
5806
+ }>>;
5807
+ size: z.ZodOptional<z.ZodObject<{
5808
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5809
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5810
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
5811
+ }, "strip", z.ZodTypeAny, {
5812
+ x: number;
5813
+ y: number;
5814
+ z: number;
5815
+ }, {
5816
+ x: string | number;
5817
+ y: string | number;
5818
+ z: string | number;
5819
+ }>>;
5820
+ }, {
5821
+ jscad: z.ZodRecord<z.ZodString, z.ZodAny>;
5822
+ }>, "strip", z.ZodTypeAny, {
5823
+ jscad: Record<string, any>;
5824
+ rotationOffset?: number | {
5825
+ x: string | number;
5826
+ y: string | number;
5827
+ z: string | number;
5828
+ } | undefined;
5829
+ positionOffset?: {
5830
+ x: number;
5831
+ y: number;
5832
+ z: number;
5833
+ } | undefined;
5834
+ size?: {
5835
+ x: number;
5836
+ y: number;
5837
+ z: number;
5838
+ } | undefined;
5839
+ }, {
5840
+ jscad: Record<string, any>;
5841
+ rotationOffset?: number | {
5842
+ x: string | number;
5843
+ y: string | number;
5844
+ z: string | number;
5845
+ } | undefined;
5846
+ positionOffset?: {
5847
+ x: string | number;
5848
+ y: string | number;
5849
+ z: string | number;
5850
+ } | undefined;
5851
+ size?: {
5852
+ x: string | number;
5853
+ y: string | number;
5854
+ z: string | number;
5855
+ } | undefined;
5856
+ }>]>>;
5857
+ children: z.ZodOptional<z.ZodAny>;
5858
+ symbolName: z.ZodOptional<z.ZodString>;
5859
+ }>, {
5860
+ pinCount: z.ZodNumber;
5861
+ pitch: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5862
+ gender: z.ZodOptional<z.ZodEnum<["male", "female"]>>;
5863
+ showSilkscreenPinLabels: z.ZodOptional<z.ZodBoolean>;
5864
+ doubleRow: z.ZodOptional<z.ZodBoolean>;
5865
+ }>, "strip", z.ZodTypeAny, {
5866
+ name: string;
5867
+ pinCount: number;
5868
+ pcbX?: number | undefined;
5869
+ pcbY?: number | undefined;
5870
+ pcbRotation?: number | undefined;
5871
+ schX?: number | undefined;
5872
+ schY?: number | undefined;
5873
+ schRotation?: number | undefined;
5874
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
5875
+ footprint?: Footprint | undefined;
5876
+ supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5877
+ key?: any;
5878
+ cadModel?: string | {
5879
+ stlUrl: string;
5880
+ rotationOffset?: number | {
5881
+ x: string | number;
5882
+ y: string | number;
5883
+ z: string | number;
5884
+ } | undefined;
5885
+ positionOffset?: {
5886
+ x: number;
5887
+ y: number;
5888
+ z: number;
5889
+ } | undefined;
5890
+ size?: {
5891
+ x: number;
5892
+ y: number;
5893
+ z: number;
5894
+ } | undefined;
5895
+ } | {
5896
+ objUrl: string;
5897
+ rotationOffset?: number | {
5898
+ x: string | number;
5899
+ y: string | number;
5900
+ z: string | number;
5901
+ } | undefined;
5902
+ positionOffset?: {
5903
+ x: number;
5904
+ y: number;
5905
+ z: number;
5906
+ } | undefined;
5907
+ size?: {
5908
+ x: number;
5909
+ y: number;
5910
+ z: number;
5911
+ } | undefined;
5912
+ mtlUrl?: string | undefined;
5913
+ } | {
5914
+ jscad: Record<string, any>;
5915
+ rotationOffset?: number | {
5916
+ x: string | number;
5917
+ y: string | number;
5918
+ z: string | number;
5919
+ } | undefined;
5920
+ positionOffset?: {
5921
+ x: number;
5922
+ y: number;
5923
+ z: number;
5924
+ } | undefined;
5925
+ size?: {
5926
+ x: number;
5927
+ y: number;
5928
+ z: number;
5929
+ } | undefined;
5930
+ } | undefined;
5931
+ children?: any;
5932
+ symbolName?: string | undefined;
5933
+ pitch?: number | undefined;
5934
+ gender?: "male" | "female" | undefined;
5935
+ showSilkscreenPinLabels?: boolean | undefined;
5936
+ doubleRow?: boolean | undefined;
5937
+ }, {
5938
+ name: string;
5939
+ pinCount: number;
5940
+ pcbX?: string | number | undefined;
5941
+ pcbY?: string | number | undefined;
5942
+ pcbRotation?: string | number | undefined;
5943
+ schX?: string | number | undefined;
5944
+ schY?: string | number | undefined;
5945
+ schRotation?: string | number | undefined;
5946
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
5947
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5948
+ } | undefined;
5949
+ footprint?: Footprint | undefined;
5950
+ supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
5951
+ key?: any;
5952
+ cadModel?: string | {
5953
+ stlUrl: string;
5954
+ rotationOffset?: number | {
5955
+ x: string | number;
5956
+ y: string | number;
5957
+ z: string | number;
5958
+ } | undefined;
5959
+ positionOffset?: {
5960
+ x: string | number;
5961
+ y: string | number;
5962
+ z: string | number;
5963
+ } | undefined;
5964
+ size?: {
5965
+ x: string | number;
5966
+ y: string | number;
5967
+ z: string | number;
5968
+ } | undefined;
5969
+ } | {
5970
+ objUrl: string;
5971
+ rotationOffset?: number | {
5972
+ x: string | number;
5973
+ y: string | number;
5974
+ z: string | number;
5975
+ } | undefined;
5976
+ positionOffset?: {
5977
+ x: string | number;
5978
+ y: string | number;
5979
+ z: string | number;
5980
+ } | undefined;
5981
+ size?: {
5982
+ x: string | number;
5983
+ y: string | number;
5984
+ z: string | number;
5985
+ } | undefined;
5986
+ mtlUrl?: string | undefined;
5987
+ } | {
5988
+ jscad: Record<string, any>;
5989
+ rotationOffset?: number | {
5990
+ x: string | number;
5991
+ y: string | number;
5992
+ z: string | number;
5993
+ } | undefined;
5994
+ positionOffset?: {
5995
+ x: string | number;
5996
+ y: string | number;
5997
+ z: string | number;
5998
+ } | undefined;
5999
+ size?: {
6000
+ x: string | number;
6001
+ y: string | number;
6002
+ z: string | number;
6003
+ } | undefined;
6004
+ } | undefined;
6005
+ children?: any;
6006
+ symbolName?: string | undefined;
6007
+ pitch?: string | number | undefined;
6008
+ gender?: "male" | "female" | undefined;
6009
+ showSilkscreenPinLabels?: boolean | undefined;
6010
+ doubleRow?: boolean | undefined;
6011
+ }>;
6012
+
5570
6013
  declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
5571
6014
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
5572
6015
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -8871,4 +9314,4 @@ declare const fabricationNotePathProps: z.ZodObject<z.objectUtil.extendShape<Omi
8871
9314
  }>;
8872
9315
  type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;
8873
9316
 
8874
- export { type BaseGroupProps, type BatteryProps, type BoardProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorProps, type ChipProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type Direction, type DirectionAlongEdge, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type GroupProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type OvalPlatedHoleProps, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PowerSourceProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderPasteProps, type SubcircuitGroupProps, type SupplierName, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, batteryPins, batteryProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPins, capacitorProps, chipProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, netProps, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, platedHoleProps, point3, portHints, portProps, portRef, powerSourceProps, rectSmtPadProps, rectSolderPasteProps, resistorPins, resistorProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
9317
+ export { type BaseGroupProps, type BatteryProps, type BoardProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorProps, type ChipProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type Direction, type DirectionAlongEdge, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type GroupProps, type HeaderProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type OvalPlatedHoleProps, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PowerSourceProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderPasteProps, type SubcircuitGroupProps, type SupplierName, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, batteryPins, batteryProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPins, capacitorProps, chipProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, groupProps, headerProps, holeProps, inductorPins, inductorProps, jumperProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, netProps, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, platedHoleProps, point3, portHints, portProps, portRef, powerSourceProps, rectSmtPadProps, rectSolderPasteProps, resistorPins, resistorProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
package/dist/index.js CHANGED
@@ -51,6 +51,7 @@ __export(lib_exports, {
51
51
  footprintProp: () => footprintProp,
52
52
  footprintProps: () => footprintProps,
53
53
  groupProps: () => groupProps,
54
+ headerProps: () => headerProps,
54
55
  holeProps: () => holeProps,
55
56
  inductorPins: () => inductorPins,
56
57
  inductorProps: () => inductorProps,
@@ -101,8 +102,8 @@ __export(lib_exports, {
101
102
  viaProps: () => viaProps
102
103
  });
103
104
  module.exports = __toCommonJS(lib_exports);
104
- var import_soup15 = require("@tscircuit/soup");
105
- var import_zod27 = require("zod");
105
+ var import_soup16 = require("@tscircuit/soup");
106
+ var import_zod28 = require("zod");
106
107
 
107
108
  // lib/typecheck.ts
108
109
  var expectTypesMatch = (shouldBe) => {
@@ -258,7 +259,6 @@ var schematicPinStyle = import_zod8.z.record(
258
259
  expectTypesMatch(true);
259
260
 
260
261
  // lib/components/board.ts
261
- var import_zod10 = require("zod");
262
262
  var import_soup5 = require("@tscircuit/soup");
263
263
 
264
264
  // lib/common/point.ts
@@ -270,13 +270,15 @@ var point = import_zod9.z.object({
270
270
  });
271
271
 
272
272
  // lib/components/board.ts
273
+ var import_zod10 = require("zod");
273
274
  var boardProps = import_zod10.z.object({
274
275
  width: import_soup5.distance.optional(),
275
276
  height: import_soup5.distance.optional(),
276
277
  outline: import_zod10.z.array(point).optional(),
277
278
  pcbX: import_soup5.distance.optional().default(0),
278
279
  pcbY: import_soup5.distance.optional().default(0),
279
- layout: import_zod10.z.any().optional(),
280
+ layout: import_zod10.z.custom((v) => true).optional(),
281
+ manualEdits: import_zod10.z.custom((v) => true).optional(),
280
282
  routingDisabled: import_zod10.z.boolean().optional(),
281
283
  children: import_zod10.z.any(),
282
284
  defaultTraceWidth: import_soup5.distance.optional(),
@@ -373,8 +375,8 @@ var capacitorPins = lrPolarPins;
373
375
  expectTypesMatch(true);
374
376
 
375
377
  // lib/components/group.ts
376
- var import_zod16 = require("zod");
377
378
  var import_soup11 = require("@tscircuit/soup");
379
+ var import_zod16 = require("zod");
378
380
  var baseGroupProps = commonLayoutProps.extend({
379
381
  name: import_zod16.z.string().optional(),
380
382
  children: import_zod16.z.any().optional()
@@ -382,6 +384,7 @@ var baseGroupProps = commonLayoutProps.extend({
382
384
  var subcircuitGroupProps = baseGroupProps.extend({
383
385
  subcircuit: import_zod16.z.literal(true),
384
386
  layout: import_zod16.z.custom((v) => true).optional(),
387
+ manualEdits: import_zod16.z.custom((v) => true).optional(),
385
388
  schAutoLayoutEnabled: import_zod16.z.boolean().optional(),
386
389
  routingDisabled: import_zod16.z.boolean().optional(),
387
390
  defaultTraceWidth: import_soup11.length.optional()
@@ -561,136 +564,148 @@ var batteryProps = commonComponentProps.extend({
561
564
  var batteryPins = lrPolarPins;
562
565
  expectTypesMatch(true);
563
566
 
567
+ // lib/components/header.ts
568
+ var import_zod27 = require("zod");
569
+ var import_soup15 = require("@tscircuit/soup");
570
+ var headerProps = commonComponentProps.extend({
571
+ pinCount: import_zod27.z.number(),
572
+ pitch: import_soup15.distance.optional(),
573
+ gender: import_zod27.z.enum(["male", "female"]).optional(),
574
+ showSilkscreenPinLabels: import_zod27.z.boolean().optional(),
575
+ doubleRow: import_zod27.z.boolean().optional()
576
+ });
577
+ expectTypesMatch(true);
578
+
564
579
  // lib/index.ts
565
580
  var inductorProps = commonComponentProps.extend({
566
- inductance: import_soup15.inductance
581
+ inductance: import_soup16.inductance
567
582
  });
568
583
  var inductorPins = lrPins;
569
584
  var diodeProps = commonComponentProps.extend({});
570
585
  var diodePins = lrPolarPins;
571
586
  var ledProps = commonComponentProps.extend({
572
- color: import_zod27.z.string().optional()
587
+ color: import_zod28.z.string().optional()
573
588
  });
574
589
  var ledPins = lrPolarPins;
575
590
  var switchProps = commonComponentProps.extend({
576
- ftype: import_zod27.z.literal("switch"),
577
- switchType: import_zod27.z.enum(["spst"]).default("spst"),
578
- isNormallyClosed: import_zod27.z.boolean().default(false)
591
+ ftype: import_zod28.z.literal("switch"),
592
+ switchType: import_zod28.z.enum(["spst"]).default("spst"),
593
+ isNormallyClosed: import_zod28.z.boolean().default(false)
579
594
  });
580
- var distanceOrMultiplier2 = import_soup15.distance.or(import_zod27.z.enum(["2x", "3x", "4x"]));
595
+ var distanceOrMultiplier2 = import_soup16.distance.or(import_zod28.z.enum(["2x", "3x", "4x"]));
581
596
  var viaProps = commonLayoutProps.extend({
582
- fromLayer: import_soup15.layer_ref,
583
- toLayer: import_soup15.layer_ref,
584
- holeDiameter: import_soup15.distance,
585
- outerDiameter: import_soup15.distance
597
+ fromLayer: import_soup16.layer_ref,
598
+ toLayer: import_soup16.layer_ref,
599
+ holeDiameter: import_soup16.distance,
600
+ outerDiameter: import_soup16.distance
586
601
  });
587
602
  var netAliasProps = commonLayoutProps.extend({
588
- net: import_zod27.z.string().optional()
603
+ net: import_zod28.z.string().optional()
589
604
  });
590
- var pcbKeepoutProps = import_zod27.z.union([
605
+ var pcbKeepoutProps = import_zod28.z.union([
591
606
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
592
- shape: import_zod27.z.literal("circle"),
593
- radius: import_soup15.distance
607
+ shape: import_zod28.z.literal("circle"),
608
+ radius: import_soup16.distance
594
609
  }),
595
610
  pcbLayoutProps.extend({
596
- shape: import_zod27.z.literal("rect"),
597
- width: import_soup15.distance,
598
- height: import_soup15.distance
611
+ shape: import_zod28.z.literal("rect"),
612
+ width: import_soup16.distance,
613
+ height: import_soup16.distance
599
614
  })
600
615
  ]);
601
- var schematicBoxProps = import_zod27.z.object({
602
- schX: import_soup15.distance,
603
- schY: import_soup15.distance,
604
- width: import_soup15.distance,
605
- height: import_soup15.distance
606
- });
607
- var schematicTextProps = import_zod27.z.object({
608
- schX: import_soup15.distance,
609
- schY: import_soup15.distance,
610
- text: import_zod27.z.string()
611
- });
612
- var schematicLineProps = import_zod27.z.object({
613
- x1: import_soup15.distance,
614
- y1: import_soup15.distance,
615
- x2: import_soup15.distance,
616
- y2: import_soup15.distance
617
- });
618
- var schematicPathProps = import_zod27.z.object({
619
- points: import_zod27.z.array(import_soup15.point),
620
- isFilled: import_zod27.z.boolean().optional().default(false),
621
- fillColor: import_zod27.z.enum(["red", "blue"]).optional()
616
+ var schematicBoxProps = import_zod28.z.object({
617
+ schX: import_soup16.distance,
618
+ schY: import_soup16.distance,
619
+ width: import_soup16.distance,
620
+ height: import_soup16.distance
621
+ });
622
+ var schematicTextProps = import_zod28.z.object({
623
+ schX: import_soup16.distance,
624
+ schY: import_soup16.distance,
625
+ text: import_zod28.z.string()
626
+ });
627
+ var schematicLineProps = import_zod28.z.object({
628
+ x1: import_soup16.distance,
629
+ y1: import_soup16.distance,
630
+ x2: import_soup16.distance,
631
+ y2: import_soup16.distance
632
+ });
633
+ var schematicPathProps = import_zod28.z.object({
634
+ points: import_zod28.z.array(import_soup16.point),
635
+ isFilled: import_zod28.z.boolean().optional().default(false),
636
+ fillColor: import_zod28.z.enum(["red", "blue"]).optional()
622
637
  });
623
638
  var componentProps = commonComponentProps;
624
639
  var powerSourceProps = commonComponentProps.extend({
625
- voltage: import_soup15.voltage
640
+ voltage: import_soup16.voltage
626
641
  });
627
642
  var portProps = commonLayoutProps.extend({
628
- name: import_zod27.z.string(),
629
- pinNumber: import_zod27.z.number().optional(),
630
- aliases: import_zod27.z.array(import_zod27.z.string()).optional(),
643
+ name: import_zod28.z.string(),
644
+ pinNumber: import_zod28.z.number().optional(),
645
+ aliases: import_zod28.z.array(import_zod28.z.string()).optional(),
631
646
  direction
632
647
  });
633
648
  var silkscreenTextProps = pcbLayoutProps.extend({
634
- text: import_zod27.z.string(),
635
- anchorAlignment: import_zod27.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
636
- font: import_zod27.z.enum(["tscircuit2024"]).optional(),
637
- fontSize: import_soup15.length.optional()
649
+ text: import_zod28.z.string(),
650
+ anchorAlignment: import_zod28.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
651
+ font: import_zod28.z.enum(["tscircuit2024"]).optional(),
652
+ fontSize: import_soup16.length.optional()
638
653
  });
639
654
  var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
640
- route: import_zod27.z.array(import_soup15.route_hint_point),
641
- strokeWidth: import_soup15.length.optional()
655
+ route: import_zod28.z.array(import_soup16.route_hint_point),
656
+ strokeWidth: import_soup16.length.optional()
642
657
  });
643
658
  var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
644
- strokeWidth: import_soup15.distance,
645
- x1: import_soup15.distance,
646
- y1: import_soup15.distance,
647
- x2: import_soup15.distance,
648
- y2: import_soup15.distance
659
+ strokeWidth: import_soup16.distance,
660
+ x1: import_soup16.distance,
661
+ y1: import_soup16.distance,
662
+ x2: import_soup16.distance,
663
+ y2: import_soup16.distance
649
664
  });
650
665
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
651
- isFilled: import_zod27.z.boolean().optional(),
652
- isOutline: import_zod27.z.boolean().optional(),
653
- strokeWidth: import_soup15.distance.optional(),
654
- width: import_soup15.distance,
655
- height: import_soup15.distance
666
+ isFilled: import_zod28.z.boolean().optional(),
667
+ isOutline: import_zod28.z.boolean().optional(),
668
+ strokeWidth: import_soup16.distance.optional(),
669
+ width: import_soup16.distance,
670
+ height: import_soup16.distance
656
671
  });
657
672
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
658
- isFilled: import_zod27.z.boolean().optional(),
659
- isOutline: import_zod27.z.boolean().optional(),
660
- strokeWidth: import_soup15.distance.optional(),
661
- radius: import_soup15.distance
662
- });
663
- var routeHintPointProps = import_zod27.z.object({
664
- x: import_soup15.distance,
665
- y: import_soup15.distance,
666
- via: import_zod27.z.boolean().optional(),
667
- toLayer: import_soup15.layer_ref.optional()
668
- });
669
- var traceHintProps = import_zod27.z.object({
670
- for: import_zod27.z.string().optional().describe(
673
+ isFilled: import_zod28.z.boolean().optional(),
674
+ isOutline: import_zod28.z.boolean().optional(),
675
+ strokeWidth: import_soup16.distance.optional(),
676
+ radius: import_soup16.distance
677
+ });
678
+ var routeHintPointProps = import_zod28.z.object({
679
+ x: import_soup16.distance,
680
+ y: import_soup16.distance,
681
+ via: import_zod28.z.boolean().optional(),
682
+ toLayer: import_soup16.layer_ref.optional()
683
+ });
684
+ var traceHintProps = import_zod28.z.object({
685
+ for: import_zod28.z.string().optional().describe(
671
686
  "Selector for the port you're targeting, not required if you're inside a trace"
672
687
  ),
673
- order: import_zod27.z.number().optional(),
674
- offset: import_soup15.route_hint_point.or(routeHintPointProps).optional(),
675
- offsets: import_zod27.z.array(import_soup15.route_hint_point).or(import_zod27.z.array(routeHintPointProps)).optional(),
676
- traceWidth: import_zod27.z.number().optional()
688
+ order: import_zod28.z.number().optional(),
689
+ offset: import_soup16.route_hint_point.or(routeHintPointProps).optional(),
690
+ offsets: import_zod28.z.array(import_soup16.route_hint_point).or(import_zod28.z.array(routeHintPointProps)).optional(),
691
+ traceWidth: import_zod28.z.number().optional()
677
692
  });
678
- var pcbTraceProps = import_zod27.z.object({
679
- layer: import_zod27.z.string().optional(),
680
- thickness: import_soup15.distance.optional(),
681
- route: import_zod27.z.array(import_soup15.route_hint_point)
693
+ var pcbTraceProps = import_zod28.z.object({
694
+ layer: import_zod28.z.string().optional(),
695
+ thickness: import_soup16.distance.optional(),
696
+ route: import_zod28.z.array(import_soup16.route_hint_point)
682
697
  });
683
698
  var fabricationNoteTextProps = pcbLayoutProps.extend({
684
- text: import_zod27.z.string(),
685
- anchorAlignment: import_zod27.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
686
- font: import_zod27.z.enum(["tscircuit2024"]).optional(),
687
- fontSize: import_soup15.length.optional(),
688
- color: import_zod27.z.string().optional()
699
+ text: import_zod28.z.string(),
700
+ anchorAlignment: import_zod28.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
701
+ font: import_zod28.z.enum(["tscircuit2024"]).optional(),
702
+ fontSize: import_soup16.length.optional(),
703
+ color: import_zod28.z.string().optional()
689
704
  });
690
705
  var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
691
- route: import_zod27.z.array(import_soup15.route_hint_point),
692
- strokeWidth: import_soup15.length.optional(),
693
- color: import_zod27.z.string().optional()
706
+ route: import_zod28.z.array(import_soup16.route_hint_point),
707
+ strokeWidth: import_soup16.length.optional(),
708
+ color: import_zod28.z.string().optional()
694
709
  });
695
710
  // Annotate the CommonJS export names for ESM import in node:
696
711
  0 && (module.exports = {
@@ -725,6 +740,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
725
740
  footprintProp,
726
741
  footprintProps,
727
742
  groupProps,
743
+ headerProps,
728
744
  holeProps,
729
745
  inductorPins,
730
746
  inductorProps,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.ts","../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/point3.ts","../lib/common/cadModel.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/capacitor.ts","../lib/components/group.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts"],"sourcesContent":["/**\n * THINKING ABOUT ADDING SOMETHING TO THIS FILE?\n *\n * THINK AGAIN!\n *\n * This file is TOO BIG! Create files using the pattern in the surrounding\n * directories, then export from this file.\n */\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n type PCBPlatedHoleInput,\n type PCBSMTPadInput,\n point,\n resistance,\n rotation,\n route_hint_point,\n supplier_name,\n voltage,\n} from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\nimport { direction } from \"./common/direction\"\nimport { portHints } from \"./common/portHints\"\nimport {\n commonComponentProps,\n commonLayoutProps,\n lrPins,\n lrPolarPins,\n pcbLayoutProps,\n} from \"./common/layout\"\nimport { explicitPinSideDefinition } from \"./common/schematicPinDefinitions\"\n\nexport * from \"./common/direction\"\nexport * from \"./common/portHints\"\nexport * from \"./common/layout\"\nexport * from \"./common/point3\"\nexport * from \"./common/portHints\"\nexport * from \"./common/footprintProp\"\nexport * from \"./common/schematicPinDefinitions\"\nexport * from \"./common/schematicPinStyle\"\nexport * from \"./common/cadModel\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\nexport * from \"./components/platedhole\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\nexport * from \"./components/smtpad\"\nexport * from \"./components/solderpaste\"\nexport * from \"./components/hole\"\nexport * from \"./components/trace\"\nexport * from \"./components/footprint\"\nexport * from \"./components/battery\"\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n})\nexport const inductorPins = lrPins\nexport type InductorProps = z.input<typeof inductorProps>\n\nexport const diodeProps = commonComponentProps.extend({})\nexport const diodePins = lrPolarPins\nexport type DiodeProps = z.input<typeof diodeProps>\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n\nexport const switchProps = commonComponentProps.extend({\n ftype: z.literal(\"switch\"),\n switchType: z.enum([\"spst\"]).default(\"spst\"),\n isNormallyClosed: z.boolean().default(false),\n})\nexport type SwitchProps = z.input<typeof switchProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n\nexport const viaProps = commonLayoutProps.extend({\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n})\nexport type ViaProps = z.input<typeof viaProps>\n\nexport const netAliasProps = commonLayoutProps.extend({\n net: z.string().optional(),\n})\nexport type NetAliasProps = z.input<typeof netAliasProps>\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n\nexport const schematicBoxProps = z.object({\n schX: distance,\n schY: distance,\n width: distance,\n height: distance,\n})\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import { z } from \"zod\"\nimport {\n type AnySoupElementInput,\n distance,\n layer_ref,\n type LayerRef,\n type LayerRefInput,\n rotation,\n supplier_name,\n} from \"@tscircuit/soup\"\nimport { point3 } from \"./point3\"\nimport {\n cadModelJscad,\n cadModelObj,\n cadModelProp,\n cadModelStl,\n type CadModelJscad,\n type CadModelObj,\n type CadModelProp,\n type CadModelStl,\n} from \"./cadModel\"\nimport { footprintProp, type Footprint } from \"./footprintProp\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: Footprint\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport interface SupplierProps {\n supplierPartNumbers?: { [k in SupplierName]?: string[] }\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\n supplierPartNumbers?: SupplierProps[\"supplierPartNumbers\"]\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp = string | CadModelStl | CadModelObj | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import type { LayerRef } from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type Footprint = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<Footprint>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: number[]\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.number()),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n leftMargin?: number | string\n rightMargin?: number | string\n topMargin?: number | string\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { point, type Point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { SubcircuitGroupProps } from \"./group\"\nimport type { Distance } from \"lib/common/distance\"\n\nexport interface BoardProps {\n width?: number | string\n height?: number | string\n outline?: Point[]\n pcbX?: number | string\n pcbY?: number | string\n layout?: any\n routingDisabled?: boolean\n children?: any\n defaultTraceWidth?: Distance\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n}\n\nexport const boardProps = z.object({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n pcbX: distance.optional().default(0),\n pcbY: distance.optional().default(0),\n layout: z.any().optional(),\n routingDisabled: z.boolean().optional(),\n children: z.any(),\n defaultTraceWidth: distance.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n})\n\nexpectTypesMatch<BoardProps, z.input<typeof boardProps>>(true)\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\nexpectTypesMatch<InferredChipProps, ChipProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { distance } from \"@tscircuit/soup\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n\nexport const platedHoleProps = z.discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { z } from \"zod\"\nimport { resistance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\nimport { capacitance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n\n decouplingFor?: string\n decouplingTo?: string\n\n bypassFor?: string\n bypassTo?: string\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import { z } from \"zod\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport { length } from \"@tscircuit/soup\"\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n}\n\nexport type GroupProps = SubcircuitGroupProps | BaseGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n})\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n subcircuit: z.literal(true),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n})\n\nexport const groupProps = z.union([baseGroupProps, subcircuitGroupProps])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupProps = z.input<typeof subcircuitGroupProps>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<SubcircuitGroupProps, InferredSubcircuitGroupProps>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"@tscircuit/soup\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import {\n pcbLayoutProps,\n type CommonLayoutProps,\n type PcbLayoutProps,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport type SmtPadProps = RectSmtPadProps | CircleSmtPadProps\n\n// ----------------------------------------------------------------------------\n// Zod\n// ----------------------------------------------------------------------------\n\nexport const rectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n portHints: portHints.optional(),\n })\ntype InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>\nexpectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)\n\nexport const circleSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>\nexpectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)\n\nexport const smtPadProps = z.union([circleSmtPadProps, rectSmtPadProps])\n\nexport type InferredSmtPadProps = z.input<typeof smtPadProps>\nexpectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { z } from \"zod\"\nimport { distance, route_hint_point } from \"@tscircuit/soup\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { layer_ref, type LayerRef } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps extends CommonComponentProps {\n capacity?: number | string\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n})\nexport const batteryPins = lrPolarPins\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAAA,EACnB,MAAM,eAAE,KAAK,CAAC,eAAe,CAAC,EAAE,SAAS;AAAA,EACzC,UAAU,qBAAO,SAAS;AAAA,EAC1B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,eAAE,MAAM,8BAAgB;AAAA,EAC/B,aAAa,qBAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_zod","import_soup","import_soup","import_zod","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_soup","import_zod","import_zod","distanceOrMultiplier"]}
1
+ {"version":3,"sources":["../lib/index.ts","../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/point3.ts","../lib/common/cadModel.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/capacitor.ts","../lib/components/group.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/header.ts"],"sourcesContent":["/**\n * THINKING ABOUT ADDING SOMETHING TO THIS FILE?\n *\n * THINK AGAIN!\n *\n * This file is TOO BIG! Create files using the pattern in the surrounding\n * directories, then export from this file.\n */\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n type PCBPlatedHoleInput,\n type PCBSMTPadInput,\n point,\n resistance,\n rotation,\n route_hint_point,\n supplier_name,\n voltage,\n} from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\nimport { direction } from \"./common/direction\"\nimport { portHints } from \"./common/portHints\"\nimport {\n commonComponentProps,\n commonLayoutProps,\n lrPins,\n lrPolarPins,\n pcbLayoutProps,\n} from \"./common/layout\"\nimport { explicitPinSideDefinition } from \"./common/schematicPinDefinitions\"\n\nexport * from \"./common/direction\"\nexport * from \"./common/portHints\"\nexport * from \"./common/layout\"\nexport * from \"./common/point3\"\nexport * from \"./common/portHints\"\nexport * from \"./common/footprintProp\"\nexport * from \"./common/schematicPinDefinitions\"\nexport * from \"./common/schematicPinStyle\"\nexport * from \"./common/cadModel\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\nexport * from \"./components/platedhole\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\nexport * from \"./components/smtpad\"\nexport * from \"./components/solderpaste\"\nexport * from \"./components/hole\"\nexport * from \"./components/trace\"\nexport * from \"./components/footprint\"\nexport * from \"./components/battery\"\nexport * from \"./components/header\"\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n})\nexport const inductorPins = lrPins\nexport type InductorProps = z.input<typeof inductorProps>\n\nexport const diodeProps = commonComponentProps.extend({})\nexport const diodePins = lrPolarPins\nexport type DiodeProps = z.input<typeof diodeProps>\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n\nexport const switchProps = commonComponentProps.extend({\n ftype: z.literal(\"switch\"),\n switchType: z.enum([\"spst\"]).default(\"spst\"),\n isNormallyClosed: z.boolean().default(false),\n})\nexport type SwitchProps = z.input<typeof switchProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n\nexport const viaProps = commonLayoutProps.extend({\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n})\nexport type ViaProps = z.input<typeof viaProps>\n\nexport const netAliasProps = commonLayoutProps.extend({\n net: z.string().optional(),\n})\nexport type NetAliasProps = z.input<typeof netAliasProps>\n\nexport const pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\n\nexport const schematicBoxProps = z.object({\n schX: distance,\n schY: distance,\n width: distance,\n height: distance,\n})\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n\nexport const routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n color: z.string().optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import { z } from \"zod\"\nimport {\n type AnySoupElementInput,\n distance,\n layer_ref,\n type LayerRef,\n type LayerRefInput,\n rotation,\n supplier_name,\n} from \"@tscircuit/soup\"\nimport { point3 } from \"./point3\"\nimport {\n cadModelJscad,\n cadModelObj,\n cadModelProp,\n cadModelStl,\n type CadModelJscad,\n type CadModelObj,\n type CadModelProp,\n type CadModelStl,\n} from \"./cadModel\"\nimport { footprintProp, type Footprint } from \"./footprintProp\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: Footprint\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\n\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport interface SupplierProps {\n supplierPartNumbers?: { [k in SupplierName]?: string[] }\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\n supplierPartNumbers?: SupplierProps[\"supplierPartNumbers\"]\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp = string | CadModelStl | CadModelObj | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import type { LayerRef } from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type Footprint = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<Footprint>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: number[]\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.number()),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\nexport const schematicPortArrangement = z.object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n leftMargin?: number | string\n rightMargin?: number | string\n topMargin?: number | string\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"@tscircuit/soup\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BoardProps {\n width?: number | string\n height?: number | string\n outline?: Point[]\n pcbX?: number | string\n pcbY?: number | string\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n children?: any\n defaultTraceWidth?: Distance\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n}\n\nexport const boardProps = z.object({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n pcbX: distance.optional().default(0),\n pcbY: distance.optional().default(0),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: z.custom<ManualEditFile>((v) => true).optional(),\n routingDisabled: z.boolean().optional(),\n children: z.any(),\n defaultTraceWidth: distance.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n})\n\nexpectTypesMatch<BoardProps, z.input<typeof boardProps>>(true)\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\nexpectTypesMatch<InferredChipProps, ChipProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { distance } from \"@tscircuit/soup\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n\nexport const platedHoleProps = z.discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { z } from \"zod\"\nimport { resistance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\nimport { capacitance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n\n decouplingFor?: string\n decouplingTo?: string\n\n bypassFor?: string\n bypassTo?: string\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { length } from \"@tscircuit/soup\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type CommonLayoutProps, commonLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n}\n\nexport type GroupProps = SubcircuitGroupProps | BaseGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n})\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n subcircuit: z.literal(true),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: z.custom<ManualEditFile>((v) => true).optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n})\n\nexport const groupProps = z.union([baseGroupProps, subcircuitGroupProps])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupProps = z.input<typeof subcircuitGroupProps>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<SubcircuitGroupProps, InferredSubcircuitGroupProps>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"@tscircuit/soup\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import {\n pcbLayoutProps,\n type CommonLayoutProps,\n type PcbLayoutProps,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport type SmtPadProps = RectSmtPadProps | CircleSmtPadProps\n\n// ----------------------------------------------------------------------------\n// Zod\n// ----------------------------------------------------------------------------\n\nexport const rectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n portHints: portHints.optional(),\n })\ntype InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>\nexpectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)\n\nexport const circleSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>\nexpectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)\n\nexport const smtPadProps = z.union([circleSmtPadProps, rectSmtPadProps])\n\nexport type InferredSmtPadProps = z.input<typeof smtPadProps>\nexpectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { z } from \"zod\"\nimport { distance, route_hint_point } from \"@tscircuit/soup\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { layer_ref, type LayerRef } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps extends CommonComponentProps {\n capacity?: number | string\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n})\nexport const batteryPins = lrPolarPins\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n}\n\nexport const headerProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n gender: z.enum([\"male\", \"female\"]).optional(),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n})\n\ntype InferredHeaderProps = z.input<typeof headerProps>\nexpectTypesMatch<HeaderProps, InferredHeaderProps>(true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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E,SAAS;AAAA,EAC1D,SAAS,eACN,MAAM,8BAAgB,EACtB,GAAG,eAAE,MAAM,mBAAmB,CAAC,EAC/B,SAAS;AAAA,EACZ,YAAY,eAAE,OAAO,EAAE,SAAS;AAClC,CAAC;AAIM,IAAM,gBAAgB,eAAE,OAAO;AAAA,EACpC,OAAO,eAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,WAAW,uBAAS,SAAS;AAAA,EAC7B,OAAO,eAAE,MAAM,8BAAgB;AACjC,CAAC;AAGM,IAAM,2BAA2B,eAAe,OAAO;AAAA,EAC5D,MAAM,eAAE,OAAO;AAAA,EACf,iBAAiB,eACd,KAAK,CAAC,UAAU,YAAY,aAAa,eAAe,cAAc,CAAC,EACvE,QAAQ,QAAQ;AAAA,EACnB,MAAM,eAAE,KAAK,CAAC,eAAe,CAAC,EAAE,SAAS;AAAA,EACzC,UAAU,qBAAO,SAAS;AAAA,EAC1B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,eAAE,MAAM,8BAAgB;AAAA,EAC/B,aAAa,qBAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_soup","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_soup","import_zod","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_soup","import_zod","import_zod","import_zod","import_soup","distanceOrMultiplier"]}
@@ -1,9 +1,9 @@
1
- import { z } from "zod"
1
+ import type { LayoutBuilder, ManualEditFile } from "@tscircuit/layout"
2
2
  import { distance } from "@tscircuit/soup"
3
- import { point, type Point } from "lib/common/point"
4
- import { expectTypesMatch } from "lib/typecheck"
5
- import type { SubcircuitGroupProps } from "./group"
6
3
  import type { Distance } from "lib/common/distance"
4
+ import { type Point, point } from "lib/common/point"
5
+ import { expectTypesMatch } from "lib/typecheck"
6
+ import { z } from "zod"
7
7
 
8
8
  export interface BoardProps {
9
9
  width?: number | string
@@ -11,7 +11,8 @@ export interface BoardProps {
11
11
  outline?: Point[]
12
12
  pcbX?: number | string
13
13
  pcbY?: number | string
14
- layout?: any
14
+ layout?: LayoutBuilder
15
+ manualEdits?: ManualEditFile
15
16
  routingDisabled?: boolean
16
17
  children?: any
17
18
  defaultTraceWidth?: Distance
@@ -29,7 +30,8 @@ export const boardProps = z.object({
29
30
  outline: z.array(point).optional(),
30
31
  pcbX: distance.optional().default(0),
31
32
  pcbY: distance.optional().default(0),
32
- layout: z.any().optional(),
33
+ layout: z.custom<LayoutBuilder>((v) => true).optional(),
34
+ manualEdits: z.custom<ManualEditFile>((v) => true).optional(),
33
35
  routingDisabled: z.boolean().optional(),
34
36
  children: z.any(),
35
37
  defaultTraceWidth: distance.optional(),
@@ -1,9 +1,9 @@
1
- import { z } from "zod"
2
- import { commonLayoutProps, type CommonLayoutProps } from "lib/common/layout"
1
+ import type { LayoutBuilder, ManualEditFile } from "@tscircuit/layout"
3
2
  import { length } from "@tscircuit/soup"
4
- import type { LayoutBuilder } from "@tscircuit/layout"
5
- import { expectTypesMatch } from "lib/typecheck"
6
3
  import type { Distance } from "lib/common/distance"
4
+ import { type CommonLayoutProps, commonLayoutProps } from "lib/common/layout"
5
+ import { expectTypesMatch } from "lib/typecheck"
6
+ import { z } from "zod"
7
7
 
8
8
  export interface BaseGroupProps extends CommonLayoutProps {
9
9
  name?: string
@@ -13,6 +13,7 @@ export interface BaseGroupProps extends CommonLayoutProps {
13
13
  export interface SubcircuitGroupProps extends BaseGroupProps {
14
14
  subcircuit: true
15
15
  layout?: LayoutBuilder
16
+ manualEdits?: ManualEditFile
16
17
  routingDisabled?: boolean
17
18
  defaultTraceWidth?: Distance
18
19
 
@@ -34,6 +35,7 @@ export const baseGroupProps = commonLayoutProps.extend({
34
35
  export const subcircuitGroupProps = baseGroupProps.extend({
35
36
  subcircuit: z.literal(true),
36
37
  layout: z.custom<LayoutBuilder>((v) => true).optional(),
38
+ manualEdits: z.custom<ManualEditFile>((v) => true).optional(),
37
39
  schAutoLayoutEnabled: z.boolean().optional(),
38
40
  routingDisabled: z.boolean().optional(),
39
41
  defaultTraceWidth: length.optional(),
@@ -0,0 +1,45 @@
1
+ import { z } from "zod"
2
+ import { distance } from "@tscircuit/soup"
3
+ import {
4
+ commonComponentProps,
5
+ type CommonComponentProps,
6
+ } from "lib/common/layout"
7
+ import { expectTypesMatch } from "lib/typecheck"
8
+
9
+ export interface HeaderProps extends CommonComponentProps {
10
+ /**
11
+ * Number of pins in the header
12
+ */
13
+ pinCount: number
14
+
15
+ /**
16
+ * Distance between pins
17
+ */
18
+ pitch?: number | string
19
+
20
+ /**
21
+ * Whether the header is male or female
22
+ */
23
+ gender?: "male" | "female"
24
+
25
+ /**
26
+ * Whether to show pin labels in silkscreen
27
+ */
28
+ showSilkscreenPinLabels?: boolean
29
+
30
+ /**
31
+ * Whether the header has two rows of pins
32
+ */
33
+ doubleRow?: boolean
34
+ }
35
+
36
+ export const headerProps = commonComponentProps.extend({
37
+ pinCount: z.number(),
38
+ pitch: distance.optional(),
39
+ gender: z.enum(["male", "female"]).optional(),
40
+ showSilkscreenPinLabels: z.boolean().optional(),
41
+ doubleRow: z.boolean().optional(),
42
+ })
43
+
44
+ type InferredHeaderProps = z.input<typeof headerProps>
45
+ expectTypesMatch<HeaderProps, InferredHeaderProps>(true)
package/lib/index.ts CHANGED
@@ -63,6 +63,7 @@ export * from "./components/hole"
63
63
  export * from "./components/trace"
64
64
  export * from "./components/footprint"
65
65
  export * from "./components/battery"
66
+ export * from "./components/header"
66
67
 
67
68
  export const inductorProps = commonComponentProps.extend({
68
69
  inductance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {