@tscircuit/core 0.0.423 → 0.0.425

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
@@ -567,17 +567,17 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
567
567
  }, "strip", z.ZodTypeAny, {
568
568
  x: number;
569
569
  y: number;
570
- trace_width?: number | undefined;
571
570
  via?: boolean | undefined;
572
571
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
572
+ trace_width?: number | undefined;
573
573
  }, {
574
574
  x: string | number;
575
575
  y: string | number;
576
- trace_width?: string | number | undefined;
577
576
  via?: boolean | undefined;
578
577
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
579
578
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
580
579
  } | undefined;
580
+ trace_width?: string | number | undefined;
581
581
  }>, "many">>;
582
582
  schDisplayLabel: z.ZodOptional<z.ZodString>;
583
583
  maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -600,9 +600,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
600
600
  pcbRouteHints?: {
601
601
  x: number;
602
602
  y: number;
603
- trace_width?: number | undefined;
604
603
  via?: boolean | undefined;
605
604
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
605
+ trace_width?: number | undefined;
606
606
  }[] | undefined;
607
607
  schDisplayLabel?: string | undefined;
608
608
  maxLength?: number | undefined;
@@ -619,11 +619,11 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
619
619
  pcbRouteHints?: {
620
620
  x: string | number;
621
621
  y: string | number;
622
- trace_width?: string | number | undefined;
623
622
  via?: boolean | undefined;
624
623
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
625
624
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
626
625
  } | undefined;
626
+ trace_width?: string | number | undefined;
627
627
  }[] | undefined;
628
628
  schDisplayLabel?: string | undefined;
629
629
  maxLength?: string | number | undefined;
@@ -657,17 +657,17 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
657
657
  }, "strip", z.ZodTypeAny, {
658
658
  x: number;
659
659
  y: number;
660
- trace_width?: number | undefined;
661
660
  via?: boolean | undefined;
662
661
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
662
+ trace_width?: number | undefined;
663
663
  }, {
664
664
  x: string | number;
665
665
  y: string | number;
666
- trace_width?: string | number | undefined;
667
666
  via?: boolean | undefined;
668
667
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
669
668
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
670
669
  } | undefined;
670
+ trace_width?: string | number | undefined;
671
671
  }>, "many">>;
672
672
  schDisplayLabel: z.ZodOptional<z.ZodString>;
673
673
  maxLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -698,9 +698,9 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
698
698
  pcbRouteHints?: {
699
699
  x: number;
700
700
  y: number;
701
- trace_width?: number | undefined;
702
701
  via?: boolean | undefined;
703
702
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
703
+ trace_width?: number | undefined;
704
704
  }[] | undefined;
705
705
  schDisplayLabel?: string | undefined;
706
706
  maxLength?: number | undefined;
@@ -720,11 +720,11 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
720
720
  pcbRouteHints?: {
721
721
  x: string | number;
722
722
  y: string | number;
723
- trace_width?: string | number | undefined;
724
723
  via?: boolean | undefined;
725
724
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
726
725
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
727
726
  } | undefined;
727
+ trace_width?: string | number | undefined;
728
728
  }[] | undefined;
729
729
  schDisplayLabel?: string | undefined;
730
730
  maxLength?: string | number | undefined;
@@ -1002,6 +1002,8 @@ declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends
1002
1002
  _getSchematicBoxDimensions(): SchematicBoxDimensions | null;
1003
1003
  doInitialCadModelRender(): void;
1004
1004
  private _addCachebustToModelUrl;
1005
+ private _getPartsEngineCacheKey;
1006
+ private _getSupplierPartNumbers;
1005
1007
  doInitialPartsEngineRender(): void;
1006
1008
  updatePartsEngineRender(): void;
1007
1009
  doInitialCreateTracesFromProps(): void;
@@ -1257,37 +1259,37 @@ declare class Board extends Group<typeof boardProps> {
1257
1259
  }, "strip", zod.ZodTypeAny, {
1258
1260
  x: number;
1259
1261
  y: number;
1260
- trace_width?: number | undefined;
1261
1262
  via?: boolean | undefined;
1262
1263
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
1264
+ trace_width?: number | undefined;
1263
1265
  }, {
1264
1266
  x: string | number;
1265
1267
  y: string | number;
1266
- trace_width?: string | number | undefined;
1267
1268
  via?: boolean | undefined;
1268
1269
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1269
1270
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1270
1271
  } | undefined;
1272
+ trace_width?: string | number | undefined;
1271
1273
  }>, "many">;
1272
1274
  }, "strip", zod.ZodTypeAny, {
1273
1275
  pcb_port_selector: string;
1274
1276
  offsets: {
1275
1277
  x: number;
1276
1278
  y: number;
1277
- trace_width?: number | undefined;
1278
1279
  via?: boolean | undefined;
1279
1280
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
1281
+ trace_width?: number | undefined;
1280
1282
  }[];
1281
1283
  }, {
1282
1284
  pcb_port_selector: string;
1283
1285
  offsets: {
1284
1286
  x: string | number;
1285
1287
  y: string | number;
1286
- trace_width?: string | number | undefined;
1287
1288
  via?: boolean | undefined;
1288
1289
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1289
1290
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1290
1291
  } | undefined;
1292
+ trace_width?: string | number | undefined;
1291
1293
  }[];
1292
1294
  }>, "many">>;
1293
1295
  schematic_placements: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
@@ -1332,9 +1334,9 @@ declare class Board extends Group<typeof boardProps> {
1332
1334
  offsets: {
1333
1335
  x: number;
1334
1336
  y: number;
1335
- trace_width?: number | undefined;
1336
1337
  via?: boolean | undefined;
1337
1338
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
1339
+ trace_width?: number | undefined;
1338
1340
  }[];
1339
1341
  }[] | undefined;
1340
1342
  schematic_placements?: {
@@ -1359,11 +1361,11 @@ declare class Board extends Group<typeof boardProps> {
1359
1361
  offsets: {
1360
1362
  x: string | number;
1361
1363
  y: string | number;
1362
- trace_width?: string | number | undefined;
1363
1364
  via?: boolean | undefined;
1364
1365
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1365
1366
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1366
1367
  } | undefined;
1368
+ trace_width?: string | number | undefined;
1367
1369
  }[];
1368
1370
  }[] | undefined;
1369
1371
  schematic_placements?: {
@@ -1510,9 +1512,9 @@ declare class Board extends Group<typeof boardProps> {
1510
1512
  offsets: {
1511
1513
  x: number;
1512
1514
  y: number;
1513
- trace_width?: number | undefined;
1514
1515
  via?: boolean | undefined;
1515
1516
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
1517
+ trace_width?: number | undefined;
1516
1518
  }[];
1517
1519
  }[] | undefined;
1518
1520
  schematic_placements?: {
@@ -1634,11 +1636,11 @@ declare class Board extends Group<typeof boardProps> {
1634
1636
  offsets: {
1635
1637
  x: string | number;
1636
1638
  y: string | number;
1637
- trace_width?: string | number | undefined;
1638
1639
  via?: boolean | undefined;
1639
1640
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1640
1641
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1641
1642
  } | undefined;
1643
+ trace_width?: string | number | undefined;
1642
1644
  }[];
1643
1645
  }[] | undefined;
1644
1646
  schematic_placements?: {
@@ -1953,7 +1955,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
1953
1955
  children: zod.ZodOptional<zod.ZodAny>;
1954
1956
  symbolName: zod.ZodOptional<zod.ZodString>;
1955
1957
  } & {
1956
- capacitance: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
1958
+ capacitance: zod.ZodEffects<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, number, string | number>;
1957
1959
  maxVoltageRating: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
1958
1960
  schShowRatings: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
1959
1961
  polarized: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
@@ -1965,8 +1967,8 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
1965
1967
  connections: zod.ZodOptional<zod.ZodRecord<zod.ZodEnum<["pin1", "pin2", "pos", "neg", "anode", "cathode"]>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>, zod.ZodArray<zod.ZodString, "many">]>>>;
1966
1968
  }, "strip", zod.ZodTypeAny, {
1967
1969
  name: string;
1968
- capacitance: number;
1969
1970
  schShowRatings: boolean;
1971
+ capacitance: number;
1970
1972
  polarized: boolean;
1971
1973
  pcbX?: number | undefined;
1972
1974
  pcbY?: number | undefined;
@@ -2111,8 +2113,8 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
2111
2113
  children?: any;
2112
2114
  symbolName?: string | undefined;
2113
2115
  connections?: Partial<Record<"pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
2114
- maxVoltageRating?: string | number | undefined;
2115
2116
  schShowRatings?: boolean | undefined;
2117
+ maxVoltageRating?: string | number | undefined;
2116
2118
  polarized?: boolean | undefined;
2117
2119
  decouplingFor?: string | undefined;
2118
2120
  decouplingTo?: string | undefined;
@@ -4554,6 +4556,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
4554
4556
  symbolName: zod.ZodOptional<zod.ZodString>;
4555
4557
  } & {
4556
4558
  color: zod.ZodOptional<zod.ZodString>;
4559
+ wavelength: zod.ZodOptional<zod.ZodString>;
4557
4560
  }, "strip", zod.ZodTypeAny, {
4558
4561
  name: string;
4559
4562
  pcbX?: number | undefined;
@@ -4622,6 +4625,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
4622
4625
  children?: any;
4623
4626
  symbolName?: string | undefined;
4624
4627
  color?: string | undefined;
4628
+ wavelength?: string | undefined;
4625
4629
  }, {
4626
4630
  name: string;
4627
4631
  pcbX?: string | number | undefined;
@@ -4692,6 +4696,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
4692
4696
  children?: any;
4693
4697
  symbolName?: string | undefined;
4694
4698
  color?: string | undefined;
4699
+ wavelength?: string | undefined;
4695
4700
  }>;
4696
4701
  sourceFtype: Ftype;
4697
4702
  };
@@ -5658,17 +5663,17 @@ declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationN
5658
5663
  }, "strip", zod.ZodTypeAny, {
5659
5664
  x: number;
5660
5665
  y: number;
5661
- trace_width?: number | undefined;
5662
5666
  via?: boolean | undefined;
5663
5667
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
5668
+ trace_width?: number | undefined;
5664
5669
  }, {
5665
5670
  x: string | number;
5666
5671
  y: string | number;
5667
- trace_width?: string | number | undefined;
5668
5672
  via?: boolean | undefined;
5669
5673
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
5670
5674
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5671
5675
  } | undefined;
5676
+ trace_width?: string | number | undefined;
5672
5677
  }>, "many">;
5673
5678
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
5674
5679
  color: zod.ZodOptional<zod.ZodString>;
@@ -5676,9 +5681,9 @@ declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationN
5676
5681
  route: {
5677
5682
  x: number;
5678
5683
  y: number;
5679
- trace_width?: number | undefined;
5680
5684
  via?: boolean | undefined;
5681
5685
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
5686
+ trace_width?: number | undefined;
5682
5687
  }[];
5683
5688
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
5684
5689
  color?: string | undefined;
@@ -5687,11 +5692,11 @@ declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationN
5687
5692
  route: {
5688
5693
  x: string | number;
5689
5694
  y: string | number;
5690
- trace_width?: string | number | undefined;
5691
5695
  via?: boolean | undefined;
5692
5696
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
5693
5697
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
5694
5698
  } | undefined;
5699
+ trace_width?: string | number | undefined;
5695
5700
  }[];
5696
5701
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
5697
5702
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
@@ -6168,6 +6173,53 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
6168
6173
  portHints?: (string | number)[] | undefined;
6169
6174
  holeShape?: "circle" | undefined;
6170
6175
  padShape?: "rect" | undefined;
6176
+ }>, zod.ZodObject<Omit<{
6177
+ pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
6178
+ pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
6179
+ pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
6180
+ layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
6181
+ name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
6182
+ }, "strip", zod.ZodTypeAny, {
6183
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6184
+ }, {
6185
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6186
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6187
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6188
+ }>>;
6189
+ }, "pcbRotation" | "layer"> & {
6190
+ name: zod.ZodOptional<zod.ZodString>;
6191
+ shape: zod.ZodLiteral<"pill_hole_with_rect_pad">;
6192
+ holeShape: zod.ZodLiteral<"pill">;
6193
+ padShape: zod.ZodLiteral<"rect">;
6194
+ holeWidth: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
6195
+ holeHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
6196
+ rectPadWidth: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
6197
+ rectPadHeight: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
6198
+ portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
6199
+ }, "strip", zod.ZodTypeAny, {
6200
+ shape: "pill_hole_with_rect_pad";
6201
+ holeWidth: number;
6202
+ holeHeight: number;
6203
+ rectPadWidth: number;
6204
+ rectPadHeight: number;
6205
+ holeShape: "pill";
6206
+ padShape: "rect";
6207
+ pcbX?: number | undefined;
6208
+ pcbY?: number | undefined;
6209
+ name?: string | undefined;
6210
+ portHints?: (string | number)[] | undefined;
6211
+ }, {
6212
+ shape: "pill_hole_with_rect_pad";
6213
+ holeWidth: string | number;
6214
+ holeHeight: string | number;
6215
+ rectPadWidth: string | number;
6216
+ rectPadHeight: string | number;
6217
+ holeShape: "pill";
6218
+ padShape: "rect";
6219
+ pcbX?: string | number | undefined;
6220
+ pcbY?: string | number | undefined;
6221
+ name?: string | undefined;
6222
+ portHints?: (string | number)[] | undefined;
6171
6223
  }>]>, {
6172
6224
  shape: "circle";
6173
6225
  holeDiameter: number;
@@ -6211,6 +6263,18 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
6211
6263
  portHints?: (string | number)[] | undefined;
6212
6264
  holeShape?: "circle" | undefined;
6213
6265
  padShape?: "rect" | undefined;
6266
+ } | {
6267
+ shape: "pill_hole_with_rect_pad";
6268
+ holeWidth: number;
6269
+ holeHeight: number;
6270
+ rectPadWidth: number;
6271
+ rectPadHeight: number;
6272
+ holeShape: "pill";
6273
+ padShape: "rect";
6274
+ pcbX?: number | undefined;
6275
+ pcbY?: number | undefined;
6276
+ name?: string | undefined;
6277
+ portHints?: (string | number)[] | undefined;
6214
6278
  }, {
6215
6279
  shape: "circle";
6216
6280
  holeDiameter: string | number;
@@ -6254,6 +6318,18 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
6254
6318
  portHints?: (string | number)[] | undefined;
6255
6319
  holeShape?: "circle" | undefined;
6256
6320
  padShape?: "rect" | undefined;
6321
+ } | {
6322
+ shape: "pill_hole_with_rect_pad";
6323
+ holeWidth: string | number;
6324
+ holeHeight: string | number;
6325
+ rectPadWidth: string | number;
6326
+ rectPadHeight: string | number;
6327
+ holeShape: "pill";
6328
+ padShape: "rect";
6329
+ pcbX?: string | number | undefined;
6330
+ pcbY?: string | number | undefined;
6331
+ name?: string | undefined;
6332
+ portHints?: (string | number)[] | undefined;
6257
6333
  }>;
6258
6334
  };
6259
6335
  getAvailablePcbLayers(): string[];
@@ -6370,26 +6446,26 @@ declare class SilkscreenPath extends PrimitiveComponent<typeof silkscreenPathPro
6370
6446
  }, "strip", zod.ZodTypeAny, {
6371
6447
  x: number;
6372
6448
  y: number;
6373
- trace_width?: number | undefined;
6374
6449
  via?: boolean | undefined;
6375
6450
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
6451
+ trace_width?: number | undefined;
6376
6452
  }, {
6377
6453
  x: string | number;
6378
6454
  y: string | number;
6379
- trace_width?: string | number | undefined;
6380
6455
  via?: boolean | undefined;
6381
6456
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6382
6457
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6383
6458
  } | undefined;
6459
+ trace_width?: string | number | undefined;
6384
6460
  }>, "many">;
6385
6461
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
6386
6462
  }, "strip", zod.ZodTypeAny, {
6387
6463
  route: {
6388
6464
  x: number;
6389
6465
  y: number;
6390
- trace_width?: number | undefined;
6391
6466
  via?: boolean | undefined;
6392
6467
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
6468
+ trace_width?: number | undefined;
6393
6469
  }[];
6394
6470
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
6395
6471
  strokeWidth?: number | undefined;
@@ -6397,11 +6473,11 @@ declare class SilkscreenPath extends PrimitiveComponent<typeof silkscreenPathPro
6397
6473
  route: {
6398
6474
  x: string | number;
6399
6475
  y: string | number;
6400
- trace_width?: string | number | undefined;
6401
6476
  via?: boolean | undefined;
6402
6477
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6403
6478
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6404
6479
  } | undefined;
6480
+ trace_width?: string | number | undefined;
6405
6481
  }[];
6406
6482
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6407
6483
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
@@ -6488,12 +6564,12 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
6488
6564
  }>>;
6489
6565
  } & {
6490
6566
  text: zod.ZodString;
6491
- anchorAlignment: zod.ZodDefault<zod.ZodEnum<["center", "top_left", "top_right", "bottom_left", "bottom_right"]>>;
6567
+ anchorAlignment: zod.ZodDefault<zod.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
6492
6568
  font: zod.ZodOptional<zod.ZodEnum<["tscircuit2024"]>>;
6493
6569
  fontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
6494
6570
  }, "strip", zod.ZodTypeAny, {
6495
6571
  text: string;
6496
- anchorAlignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
6572
+ anchorAlignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center";
6497
6573
  pcbX?: number | undefined;
6498
6574
  pcbY?: number | undefined;
6499
6575
  pcbRotation?: number | undefined;
@@ -6508,7 +6584,7 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
6508
6584
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
6509
6585
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
6510
6586
  } | undefined;
6511
- anchorAlignment?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | undefined;
6587
+ anchorAlignment?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center" | undefined;
6512
6588
  font?: "tscircuit2024" | undefined;
6513
6589
  fontSize?: string | number | undefined;
6514
6590
  }>;
@@ -6992,17 +7068,17 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
6992
7068
  }, "strip", zod.ZodTypeAny, {
6993
7069
  x: number;
6994
7070
  y: number;
6995
- trace_width?: number | undefined;
6996
7071
  via?: boolean | undefined;
6997
7072
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
7073
+ trace_width?: number | undefined;
6998
7074
  }, {
6999
7075
  x: string | number;
7000
7076
  y: string | number;
7001
- trace_width?: string | number | undefined;
7002
7077
  via?: boolean | undefined;
7003
7078
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7004
7079
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7005
7080
  } | undefined;
7081
+ trace_width?: string | number | undefined;
7006
7082
  }>, zod.ZodObject<{
7007
7083
  x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
7008
7084
  y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
@@ -7046,17 +7122,17 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
7046
7122
  }, "strip", zod.ZodTypeAny, {
7047
7123
  x: number;
7048
7124
  y: number;
7049
- trace_width?: number | undefined;
7050
7125
  via?: boolean | undefined;
7051
7126
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
7127
+ trace_width?: number | undefined;
7052
7128
  }, {
7053
7129
  x: string | number;
7054
7130
  y: string | number;
7055
- trace_width?: string | number | undefined;
7056
7131
  via?: boolean | undefined;
7057
7132
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7058
7133
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7059
7134
  } | undefined;
7135
+ trace_width?: string | number | undefined;
7060
7136
  }>, "many">, zod.ZodArray<zod.ZodObject<{
7061
7137
  x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
7062
7138
  y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
@@ -7088,9 +7164,9 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
7088
7164
  offsets?: {
7089
7165
  x: number;
7090
7166
  y: number;
7091
- trace_width?: number | undefined;
7092
7167
  via?: boolean | undefined;
7093
7168
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
7169
+ trace_width?: number | undefined;
7094
7170
  }[] | {
7095
7171
  x: number;
7096
7172
  y: number;
@@ -7102,9 +7178,9 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
7102
7178
  offset?: {
7103
7179
  x: number;
7104
7180
  y: number;
7105
- trace_width?: number | undefined;
7106
7181
  via?: boolean | undefined;
7107
7182
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
7183
+ trace_width?: number | undefined;
7108
7184
  } | {
7109
7185
  x: number;
7110
7186
  y: number;
@@ -7116,11 +7192,11 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
7116
7192
  offsets?: {
7117
7193
  x: string | number;
7118
7194
  y: string | number;
7119
- trace_width?: string | number | undefined;
7120
7195
  via?: boolean | undefined;
7121
7196
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7122
7197
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7123
7198
  } | undefined;
7199
+ trace_width?: string | number | undefined;
7124
7200
  }[] | {
7125
7201
  x: string | number;
7126
7202
  y: string | number;
@@ -7134,11 +7210,11 @@ declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
7134
7210
  offset?: {
7135
7211
  x: string | number;
7136
7212
  y: string | number;
7137
- trace_width?: string | number | undefined;
7138
7213
  via?: boolean | undefined;
7139
7214
  to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7140
7215
  name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7141
7216
  } | undefined;
7217
+ trace_width?: string | number | undefined;
7142
7218
  } | {
7143
7219
  x: string | number;
7144
7220
  y: string | number;
@@ -8073,6 +8149,106 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
8073
8149
  platedDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
8074
8150
  pinLabels: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
8075
8151
  facingDirection: zod.ZodOptional<zod.ZodEnum<["left", "right"]>>;
8152
+ schPinArrangement: zod.ZodOptional<zod.ZodObject<{
8153
+ leftSize: zod.ZodOptional<zod.ZodNumber>;
8154
+ topSize: zod.ZodOptional<zod.ZodNumber>;
8155
+ rightSize: zod.ZodOptional<zod.ZodNumber>;
8156
+ bottomSize: zod.ZodOptional<zod.ZodNumber>;
8157
+ leftPinCount: zod.ZodOptional<zod.ZodNumber>;
8158
+ rightPinCount: zod.ZodOptional<zod.ZodNumber>;
8159
+ topPinCount: zod.ZodOptional<zod.ZodNumber>;
8160
+ bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
8161
+ leftSide: zod.ZodOptional<zod.ZodObject<{
8162
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8163
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8164
+ }, "strip", zod.ZodTypeAny, {
8165
+ pins: (string | number)[];
8166
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8167
+ }, {
8168
+ pins: (string | number)[];
8169
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8170
+ }>>;
8171
+ rightSide: zod.ZodOptional<zod.ZodObject<{
8172
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8173
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8174
+ }, "strip", zod.ZodTypeAny, {
8175
+ pins: (string | number)[];
8176
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8177
+ }, {
8178
+ pins: (string | number)[];
8179
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8180
+ }>>;
8181
+ topSide: zod.ZodOptional<zod.ZodObject<{
8182
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8183
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8184
+ }, "strip", zod.ZodTypeAny, {
8185
+ pins: (string | number)[];
8186
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8187
+ }, {
8188
+ pins: (string | number)[];
8189
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8190
+ }>>;
8191
+ bottomSide: zod.ZodOptional<zod.ZodObject<{
8192
+ pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
8193
+ direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
8194
+ }, "strip", zod.ZodTypeAny, {
8195
+ pins: (string | number)[];
8196
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8197
+ }, {
8198
+ pins: (string | number)[];
8199
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8200
+ }>>;
8201
+ }, "strip", zod.ZodTypeAny, {
8202
+ leftSize?: number | undefined;
8203
+ topSize?: number | undefined;
8204
+ rightSize?: number | undefined;
8205
+ bottomSize?: number | undefined;
8206
+ leftSide?: {
8207
+ pins: (string | number)[];
8208
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8209
+ } | undefined;
8210
+ topSide?: {
8211
+ pins: (string | number)[];
8212
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8213
+ } | undefined;
8214
+ rightSide?: {
8215
+ pins: (string | number)[];
8216
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8217
+ } | undefined;
8218
+ bottomSide?: {
8219
+ pins: (string | number)[];
8220
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8221
+ } | undefined;
8222
+ leftPinCount?: number | undefined;
8223
+ rightPinCount?: number | undefined;
8224
+ topPinCount?: number | undefined;
8225
+ bottomPinCount?: number | undefined;
8226
+ }, {
8227
+ leftSize?: number | undefined;
8228
+ topSize?: number | undefined;
8229
+ rightSize?: number | undefined;
8230
+ bottomSize?: number | undefined;
8231
+ leftSide?: {
8232
+ pins: (string | number)[];
8233
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8234
+ } | undefined;
8235
+ topSide?: {
8236
+ pins: (string | number)[];
8237
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8238
+ } | undefined;
8239
+ rightSide?: {
8240
+ pins: (string | number)[];
8241
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8242
+ } | undefined;
8243
+ bottomSide?: {
8244
+ pins: (string | number)[];
8245
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8246
+ } | undefined;
8247
+ leftPinCount?: number | undefined;
8248
+ rightPinCount?: number | undefined;
8249
+ topPinCount?: number | undefined;
8250
+ bottomPinCount?: number | undefined;
8251
+ }>>;
8076
8252
  }, "strip", zod.ZodTypeAny, {
8077
8253
  name: string;
8078
8254
  pinCount: number;
@@ -8143,6 +8319,32 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
8143
8319
  children?: any;
8144
8320
  symbolName?: string | undefined;
8145
8321
  pinLabels?: string[] | undefined;
8322
+ schPinArrangement?: {
8323
+ leftSize?: number | undefined;
8324
+ topSize?: number | undefined;
8325
+ rightSize?: number | undefined;
8326
+ bottomSize?: number | undefined;
8327
+ leftSide?: {
8328
+ pins: (string | number)[];
8329
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8330
+ } | undefined;
8331
+ topSide?: {
8332
+ pins: (string | number)[];
8333
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8334
+ } | undefined;
8335
+ rightSide?: {
8336
+ pins: (string | number)[];
8337
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8338
+ } | undefined;
8339
+ bottomSide?: {
8340
+ pins: (string | number)[];
8341
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8342
+ } | undefined;
8343
+ leftPinCount?: number | undefined;
8344
+ rightPinCount?: number | undefined;
8345
+ topPinCount?: number | undefined;
8346
+ bottomPinCount?: number | undefined;
8347
+ } | undefined;
8146
8348
  holeDiameter?: number | undefined;
8147
8349
  pitch?: number | undefined;
8148
8350
  schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
@@ -8221,6 +8423,32 @@ declare class PinHeader extends NormalComponent<typeof pinHeaderProps> {
8221
8423
  children?: any;
8222
8424
  symbolName?: string | undefined;
8223
8425
  pinLabels?: string[] | undefined;
8426
+ schPinArrangement?: {
8427
+ leftSize?: number | undefined;
8428
+ topSize?: number | undefined;
8429
+ rightSize?: number | undefined;
8430
+ bottomSize?: number | undefined;
8431
+ leftSide?: {
8432
+ pins: (string | number)[];
8433
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8434
+ } | undefined;
8435
+ topSide?: {
8436
+ pins: (string | number)[];
8437
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8438
+ } | undefined;
8439
+ rightSide?: {
8440
+ pins: (string | number)[];
8441
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8442
+ } | undefined;
8443
+ bottomSide?: {
8444
+ pins: (string | number)[];
8445
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
8446
+ } | undefined;
8447
+ leftPinCount?: number | undefined;
8448
+ rightPinCount?: number | undefined;
8449
+ topPinCount?: number | undefined;
8450
+ bottomPinCount?: number | undefined;
8451
+ } | undefined;
8224
8452
  holeDiameter?: string | number | undefined;
8225
8453
  pitch?: string | number | undefined;
8226
8454
  schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
@@ -8500,7 +8728,7 @@ declare class Resonator extends NormalComponent<typeof resonatorProps> {
8500
8728
  symbolName: zod.ZodOptional<zod.ZodString>;
8501
8729
  } & {
8502
8730
  frequency: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
8503
- loadCapacitance: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
8731
+ loadCapacitance: zod.ZodEffects<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, number, string | number>;
8504
8732
  pinVariant: zod.ZodOptional<zod.ZodEnum<["no_ground", "ground_pin", "two_ground_pins"]>>;
8505
8733
  }, "strip", zod.ZodTypeAny, {
8506
8734
  name: string;
@@ -10530,7 +10758,7 @@ declare class Crystal extends NormalComponent<typeof crystalProps, PolarizedPass
10530
10758
  symbolName: zod.ZodOptional<zod.ZodString>;
10531
10759
  } & {
10532
10760
  frequency: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
10533
- loadCapacitance: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
10761
+ loadCapacitance: zod.ZodEffects<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, number, string | number>;
10534
10762
  pinVariant: zod.ZodOptional<zod.ZodEnum<["two_pin", "four_pin"]>>;
10535
10763
  }, "strip", zod.ZodTypeAny, {
10536
10764
  name: string;
@@ -12125,6 +12353,7 @@ declare const useLed: <PropsFromHook extends Omit<{
12125
12353
  children?: any;
12126
12354
  symbolName?: string | undefined;
12127
12355
  color?: string | undefined;
12356
+ wavelength?: string | undefined;
12128
12357
  }, "name"> | undefined = undefined>(name: string, props?: PropsFromHook | undefined) => ComponentWithPins<{
12129
12358
  name: string;
12130
12359
  pcbX?: string | number | undefined;
@@ -12195,6 +12424,7 @@ declare const useLed: <PropsFromHook extends Omit<{
12195
12424
  children?: any;
12196
12425
  symbolName?: string | undefined;
12197
12426
  color?: string | undefined;
12427
+ wavelength?: string | undefined;
12198
12428
  }, "left" | "right" | "pin1" | "pin2" | "anode" | "cathode" | "pos" | "neg", PropsFromHook>;
12199
12429
 
12200
12430
  declare const useResistor: <PropsFromHook extends Omit<ResistorProps, "name"> | undefined = undefined>(name: string, props?: PropsFromHook | undefined) => ComponentWithPins<ResistorProps, "left" | "right" | "pin1" | "pin2", PropsFromHook>;
@@ -12290,6 +12520,12 @@ type ChipFnSel = <T extends ChipFn<any> | string>(chipFn?: T) => UnionToIntersec
12290
12520
  type Sel = ExplicitModuleSel & SelWithoutSubcircuit;
12291
12521
  declare const sel: Sel;
12292
12522
 
12523
+ interface LocalCacheEngine {
12524
+ getItem(key: string): string | Promise<string | null> | null;
12525
+ setItem(key: string, value: string): void | Promise<void>;
12526
+ removeItem?(key: string): void | Promise<void>;
12527
+ }
12528
+
12293
12529
  type AutorouterCompleteEvent = {
12294
12530
  type: "complete";
12295
12531
  traces: SimplifiedPcbTrace[];
@@ -12396,4 +12632,4 @@ declare module "react/jsx-runtime" {
12396
12632
  }
12397
12633
  }
12398
12634
 
12399
- export { type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Cutout, Diode, FabricationNotePath, FabricationNoteText, Footprint, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, Mosfet, Net, NetAlias, NormalComponent, type Obstacle, PcbTrace, PinHeader, type PinLabelSpec, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, Subcircuit, Switch, Trace, TraceHint, Transistor, Via, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
12635
+ export { type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Cutout, Diode, FabricationNotePath, FabricationNoteText, Footprint, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetAlias, NormalComponent, type Obstacle, PcbTrace, PinHeader, type PinLabelSpec, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, Subcircuit, Switch, Trace, TraceHint, Transistor, Via, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
package/dist/index.js CHANGED
@@ -5707,6 +5707,43 @@ var NormalComponent = class extends PrimitiveComponent2 {
5707
5707
  const origin = this.root?.getClientOrigin() ?? "";
5708
5708
  return `${url}${url.includes("?") ? "&" : "?"}cachebust_origin=${encodeURIComponent(origin)}`;
5709
5709
  }
5710
+ _getPartsEngineCacheKey(source_component, footprinterString) {
5711
+ return JSON.stringify({
5712
+ ftype: source_component.ftype,
5713
+ name: source_component.name,
5714
+ manufacturer_part_number: source_component.manufacturer_part_number,
5715
+ footprinterString
5716
+ });
5717
+ }
5718
+ async _getSupplierPartNumbers(partsEngine, source_component, footprinterString) {
5719
+ const cacheEngine = this.root?.platform?.localCacheEngine;
5720
+ const cacheKey = this._getPartsEngineCacheKey(
5721
+ source_component,
5722
+ footprinterString
5723
+ );
5724
+ if (cacheEngine) {
5725
+ const cached = await cacheEngine.getItem(cacheKey);
5726
+ if (cached) {
5727
+ try {
5728
+ return JSON.parse(cached);
5729
+ } catch {
5730
+ }
5731
+ }
5732
+ }
5733
+ const result = await Promise.resolve(
5734
+ partsEngine.findPart({
5735
+ sourceComponent: source_component,
5736
+ footprinterString
5737
+ })
5738
+ );
5739
+ if (cacheEngine) {
5740
+ try {
5741
+ await cacheEngine.setItem(cacheKey, JSON.stringify(result));
5742
+ } catch {
5743
+ }
5744
+ }
5745
+ return result;
5746
+ }
5710
5747
  doInitialPartsEngineRender() {
5711
5748
  const partsEngine = this.getInheritedProperty("partsEngine");
5712
5749
  if (!partsEngine) return;
@@ -5718,10 +5755,11 @@ var NormalComponent = class extends PrimitiveComponent2 {
5718
5755
  if (this.props.footprint && typeof this.props.footprint === "string") {
5719
5756
  footprinterString = this.props.footprint;
5720
5757
  }
5721
- const supplierPartNumbersMaybePromise = partsEngine.findPart({
5722
- sourceComponent: source_component,
5758
+ const supplierPartNumbersMaybePromise = this._getSupplierPartNumbers(
5759
+ partsEngine,
5760
+ source_component,
5723
5761
  footprinterString
5724
- });
5762
+ );
5725
5763
  if (!(supplierPartNumbersMaybePromise instanceof Promise)) {
5726
5764
  db.source_component.update(this.source_component_id, {
5727
5765
  supplier_part_numbers: supplierPartNumbersMaybePromise
@@ -8118,9 +8156,20 @@ var PinHeader = class extends NormalComponent {
8118
8156
  _getSchematicPortArrangement() {
8119
8157
  const pinCount = this._parsedProps.pinCount ?? 1;
8120
8158
  const facingDirection = this._parsedProps.facingDirection ?? "right";
8159
+ const schPinArrangement = this._parsedProps.schPinArrangement;
8160
+ if (facingDirection === "left") {
8161
+ return {
8162
+ leftSide: {
8163
+ direction: schPinArrangement?.leftSide?.direction ?? "top-to-bottom",
8164
+ pins: schPinArrangement?.leftSide?.pins ?? Array.from({ length: pinCount }, (_, i) => `pin${i + 1}`)
8165
+ }
8166
+ };
8167
+ }
8121
8168
  return {
8122
- leftSize: facingDirection === "left" ? pinCount : 0,
8123
- rightSize: facingDirection === "right" ? pinCount : 0
8169
+ rightSide: {
8170
+ direction: schPinArrangement?.rightSide?.direction ?? "top-to-bottom",
8171
+ pins: schPinArrangement?.rightSide?.pins ?? Array.from({ length: pinCount }, (_, i) => `pin${i + 1}`)
8172
+ }
8124
8173
  };
8125
8174
  }
8126
8175
  doInitialSourceRender() {
@@ -8481,7 +8530,7 @@ import { identity as identity4 } from "transformation-matrix";
8481
8530
  var package_default = {
8482
8531
  name: "@tscircuit/core",
8483
8532
  type: "module",
8484
- version: "0.0.422",
8533
+ version: "0.0.424",
8485
8534
  types: "dist/index.d.ts",
8486
8535
  main: "dist/index.js",
8487
8536
  module: "dist/index.js",
@@ -8513,7 +8562,7 @@ var package_default = {
8513
8562
  "@tscircuit/layout": "^0.0.28",
8514
8563
  "@tscircuit/log-soup": "^1.0.2",
8515
8564
  "@tscircuit/math-utils": "^0.0.18",
8516
- "@tscircuit/props": "^0.0.184",
8565
+ "@tscircuit/props": "^0.0.190",
8517
8566
  "@tscircuit/schematic-autolayout": "^0.0.6",
8518
8567
  "@types/bun": "latest",
8519
8568
  "@types/debug": "^4.1.12",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.423",
4
+ "version": "0.0.425",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "@tscircuit/layout": "^0.0.28",
34
34
  "@tscircuit/log-soup": "^1.0.2",
35
35
  "@tscircuit/math-utils": "^0.0.18",
36
- "@tscircuit/props": "^0.0.184",
36
+ "@tscircuit/props": "^0.0.190",
37
37
  "@tscircuit/schematic-autolayout": "^0.0.6",
38
38
  "@types/bun": "latest",
39
39
  "@types/debug": "^4.1.12",