@tscircuit/props 0.0.96 → 0.0.98

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,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { LayerRef, LayerRefInput, AnySourceComponent } from 'circuit-json';
3
3
  import { ReactElement } from 'react';
4
+ import * as _tscircuit_layout from '@tscircuit/layout';
4
5
  import { LayoutBuilder, ManualEditFile } from '@tscircuit/layout';
5
6
 
6
7
  declare const direction: z.ZodEnum<["up", "down", "left", "right"]>;
@@ -1300,7 +1301,6 @@ type PartsEngine = {
1300
1301
  }) => Promise<SupplierPartNumbers> | SupplierPartNumbers;
1301
1302
  };
1302
1303
  interface SubcircuitGroupProps extends BaseGroupProps {
1303
- subcircuit: true;
1304
1304
  layout?: LayoutBuilder;
1305
1305
  manualEdits?: ManualEditFile;
1306
1306
  routingDisabled?: boolean;
@@ -1314,7 +1314,10 @@ interface SubcircuitGroupProps extends BaseGroupProps {
1314
1314
  schAutoLayoutEnabled?: boolean;
1315
1315
  partsEngine?: PartsEngine;
1316
1316
  }
1317
- type GroupProps = SubcircuitGroupProps | BaseGroupProps;
1317
+ interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {
1318
+ subcircuit: true;
1319
+ }
1320
+ type GroupProps = SubcircuitGroupPropsWithBool | BaseGroupProps;
1318
1321
  declare const baseGroupProps: z.ZodObject<z.objectUtil.extendShape<{
1319
1322
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1320
1323
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -1381,7 +1384,6 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
1381
1384
  name: z.ZodOptional<z.ZodString>;
1382
1385
  children: z.ZodOptional<z.ZodAny>;
1383
1386
  }>, {
1384
- subcircuit: z.ZodLiteral<true>;
1385
1387
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
1386
1388
  manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
1387
1389
  schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
@@ -1389,6 +1391,75 @@ declare const subcircuitGroupProps: z.ZodObject<z.objectUtil.extendShape<z.objec
1389
1391
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1390
1392
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1391
1393
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
1394
+ }>, "strip", z.ZodTypeAny, {
1395
+ pcbX?: number | undefined;
1396
+ pcbY?: number | undefined;
1397
+ pcbRotation?: number | undefined;
1398
+ schX?: number | undefined;
1399
+ schY?: number | undefined;
1400
+ schRotation?: number | undefined;
1401
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
1402
+ footprint?: Footprint | undefined;
1403
+ name?: string | undefined;
1404
+ children?: any;
1405
+ layout?: LayoutBuilder | undefined;
1406
+ manualEdits?: ManualEditFile | undefined;
1407
+ routingDisabled?: boolean | undefined;
1408
+ defaultTraceWidth?: number | undefined;
1409
+ minTraceWidth?: number | undefined;
1410
+ schAutoLayoutEnabled?: boolean | undefined;
1411
+ partsEngine?: PartsEngine | undefined;
1412
+ }, {
1413
+ pcbX?: string | number | undefined;
1414
+ pcbY?: string | number | undefined;
1415
+ pcbRotation?: string | number | undefined;
1416
+ schX?: string | number | undefined;
1417
+ schY?: string | number | undefined;
1418
+ schRotation?: string | number | undefined;
1419
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1420
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1421
+ } | undefined;
1422
+ footprint?: Footprint | undefined;
1423
+ name?: string | undefined;
1424
+ children?: any;
1425
+ layout?: LayoutBuilder | undefined;
1426
+ manualEdits?: ManualEditFile | undefined;
1427
+ routingDisabled?: boolean | undefined;
1428
+ defaultTraceWidth?: string | number | undefined;
1429
+ minTraceWidth?: string | number | undefined;
1430
+ schAutoLayoutEnabled?: boolean | undefined;
1431
+ partsEngine?: PartsEngine | undefined;
1432
+ }>;
1433
+ declare const subcircuitGroupPropsWithBool: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1434
+ pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1435
+ pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1436
+ pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1437
+ schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1438
+ schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1439
+ schRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1440
+ layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
1441
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
1442
+ }, "strip", z.ZodTypeAny, {
1443
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1444
+ }, {
1445
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1446
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
1447
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
1448
+ }>>;
1449
+ footprint: z.ZodOptional<z.ZodType<Footprint, z.ZodTypeDef, Footprint>>;
1450
+ }, {
1451
+ name: z.ZodOptional<z.ZodString>;
1452
+ children: z.ZodOptional<z.ZodAny>;
1453
+ }>, {
1454
+ layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
1455
+ manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
1456
+ schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
1457
+ routingDisabled: z.ZodOptional<z.ZodBoolean>;
1458
+ defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1459
+ minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1460
+ partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
1461
+ }>, {
1462
+ subcircuit: z.ZodLiteral<true>;
1392
1463
  }>, "strip", z.ZodTypeAny, {
1393
1464
  subcircuit: true;
1394
1465
  pcbX?: number | undefined;
@@ -1474,7 +1545,7 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
1474
1545
  footprint?: Footprint | undefined;
1475
1546
  name?: string | undefined;
1476
1547
  children?: any;
1477
- }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1548
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1478
1549
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1479
1550
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1480
1551
  pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -1495,7 +1566,6 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
1495
1566
  name: z.ZodOptional<z.ZodString>;
1496
1567
  children: z.ZodOptional<z.ZodAny>;
1497
1568
  }>, {
1498
- subcircuit: z.ZodLiteral<true>;
1499
1569
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
1500
1570
  manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
1501
1571
  schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
@@ -1503,6 +1573,8 @@ declare const groupProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
1503
1573
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1504
1574
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1505
1575
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
1576
+ }>, {
1577
+ subcircuit: z.ZodLiteral<true>;
1506
1578
  }>, "strip", z.ZodTypeAny, {
1507
1579
  subcircuit: true;
1508
1580
  pcbX?: number | undefined;
@@ -1555,7 +1627,7 @@ interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
1555
1627
  height?: number | string;
1556
1628
  outline?: Point[];
1557
1629
  }
1558
- declare const boardProps: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1630
+ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1559
1631
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1560
1632
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1561
1633
  pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -1576,7 +1648,6 @@ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil
1576
1648
  name: z.ZodOptional<z.ZodString>;
1577
1649
  children: z.ZodOptional<z.ZodAny>;
1578
1650
  }>, {
1579
- subcircuit: z.ZodLiteral<true>;
1580
1651
  layout: z.ZodOptional<z.ZodType<LayoutBuilder, z.ZodTypeDef, LayoutBuilder>>;
1581
1652
  manualEdits: z.ZodOptional<z.ZodType<ManualEditFile, z.ZodTypeDef, ManualEditFile>>;
1582
1653
  schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
@@ -1584,7 +1655,7 @@ declare const boardProps: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil
1584
1655
  defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1585
1656
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1586
1657
  partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
1587
- }>, "subcircuit">, {
1658
+ }>, {
1588
1659
  width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1589
1660
  height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
1590
1661
  outline: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -6917,6 +6988,75 @@ declare const pushButtonProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
6917
6988
  }>;
6918
6989
  type PushButtonProps = z.input<typeof pushButtonProps>;
6919
6990
 
6991
+ type SubcircuitProps = SubcircuitGroupProps;
6992
+ declare const subcircuitProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
6993
+ pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6994
+ pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6995
+ pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6996
+ schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6997
+ schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6998
+ schRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6999
+ layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
7000
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
7001
+ }, "strip", z.ZodTypeAny, {
7002
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7003
+ }, {
7004
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7005
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7006
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7007
+ }>>;
7008
+ footprint: z.ZodOptional<z.ZodType<Footprint, z.ZodTypeDef, Footprint>>;
7009
+ }, {
7010
+ name: z.ZodOptional<z.ZodString>;
7011
+ children: z.ZodOptional<z.ZodAny>;
7012
+ }>, {
7013
+ layout: z.ZodOptional<z.ZodType<_tscircuit_layout.LayoutBuilder, z.ZodTypeDef, _tscircuit_layout.LayoutBuilder>>;
7014
+ manualEdits: z.ZodOptional<z.ZodType<_tscircuit_layout.ManualEditFile, z.ZodTypeDef, _tscircuit_layout.ManualEditFile>>;
7015
+ schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
7016
+ routingDisabled: z.ZodOptional<z.ZodBoolean>;
7017
+ defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
7018
+ minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
7019
+ partsEngine: z.ZodOptional<z.ZodType<PartsEngine, z.ZodTypeDef, PartsEngine>>;
7020
+ }>, "strip", z.ZodTypeAny, {
7021
+ pcbX?: number | undefined;
7022
+ pcbY?: number | undefined;
7023
+ pcbRotation?: number | undefined;
7024
+ schX?: number | undefined;
7025
+ schY?: number | undefined;
7026
+ schRotation?: number | undefined;
7027
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
7028
+ footprint?: Footprint | undefined;
7029
+ name?: string | undefined;
7030
+ children?: any;
7031
+ layout?: _tscircuit_layout.LayoutBuilder | undefined;
7032
+ manualEdits?: _tscircuit_layout.ManualEditFile | undefined;
7033
+ routingDisabled?: boolean | undefined;
7034
+ defaultTraceWidth?: number | undefined;
7035
+ minTraceWidth?: number | undefined;
7036
+ schAutoLayoutEnabled?: boolean | undefined;
7037
+ partsEngine?: PartsEngine | undefined;
7038
+ }, {
7039
+ pcbX?: string | number | undefined;
7040
+ pcbY?: string | number | undefined;
7041
+ pcbRotation?: string | number | undefined;
7042
+ schX?: string | number | undefined;
7043
+ schY?: string | number | undefined;
7044
+ schRotation?: string | number | undefined;
7045
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
7046
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
7047
+ } | undefined;
7048
+ footprint?: Footprint | undefined;
7049
+ name?: string | undefined;
7050
+ children?: any;
7051
+ layout?: _tscircuit_layout.LayoutBuilder | undefined;
7052
+ manualEdits?: _tscircuit_layout.ManualEditFile | undefined;
7053
+ routingDisabled?: boolean | undefined;
7054
+ defaultTraceWidth?: string | number | undefined;
7055
+ minTraceWidth?: string | number | undefined;
7056
+ schAutoLayoutEnabled?: boolean | undefined;
7057
+ partsEngine?: PartsEngine | undefined;
7058
+ }>;
7059
+
6920
7060
  declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
6921
7061
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
6922
7062
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -10178,4 +10318,4 @@ declare const fabricationNotePathProps: z.ZodObject<z.objectUtil.extendShape<Omi
10178
10318
  }>;
10179
10319
  type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;
10180
10320
 
10181
- 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 PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinHeaderProps, type PinLabels, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, 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 SupplierPartNumbers, 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, pinHeaderProps, pinLabelsProp, platedHoleProps, point3, portHints, portProps, portRef, potentiometerPins, potentiometerProps, powerSourceProps, pushButtonProps, 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 };
10321
+ 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 PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinHeaderProps, type PinLabels, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, 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 SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, 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, pinHeaderProps, pinLabelsProp, platedHoleProps, point3, portHints, portProps, portRef, potentiometerPins, potentiometerProps, powerSourceProps, pushButtonProps, rectSmtPadProps, rectSolderPasteProps, resistorPins, resistorProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
package/dist/index.js CHANGED
@@ -99,6 +99,8 @@ __export(lib_exports, {
99
99
  smtPadProps: () => smtPadProps,
100
100
  solderPasteProps: () => solderPasteProps,
101
101
  subcircuitGroupProps: () => subcircuitGroupProps,
102
+ subcircuitGroupPropsWithBool: () => subcircuitGroupPropsWithBool,
103
+ subcircuitProps: () => subcircuitProps,
102
104
  supplierProps: () => supplierProps,
103
105
  switchProps: () => switchProps,
104
106
  traceHintProps: () => traceHintProps,
@@ -290,7 +292,6 @@ var baseGroupProps = commonLayoutProps.extend({
290
292
  children: import_zod10.z.any().optional()
291
293
  });
292
294
  var subcircuitGroupProps = baseGroupProps.extend({
293
- subcircuit: import_zod10.z.literal(true),
294
295
  layout: import_zod10.z.custom((v) => true).optional(),
295
296
  manualEdits: import_zod10.z.custom((v) => true).optional(),
296
297
  schAutoLayoutEnabled: import_zod10.z.boolean().optional(),
@@ -299,13 +300,19 @@ var subcircuitGroupProps = baseGroupProps.extend({
299
300
  minTraceWidth: import_circuit_json5.length.optional(),
300
301
  partsEngine: import_zod10.z.custom((v) => "findPart" in v).optional()
301
302
  });
302
- var groupProps = import_zod10.z.union([baseGroupProps, subcircuitGroupProps]);
303
+ var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
304
+ subcircuit: import_zod10.z.literal(true)
305
+ });
306
+ var groupProps = import_zod10.z.union([
307
+ baseGroupProps,
308
+ subcircuitGroupPropsWithBool
309
+ ]);
303
310
  expectTypesMatch(true);
304
311
  expectTypesMatch(true);
305
312
  expectTypesMatch(true);
306
313
 
307
314
  // lib/components/board.ts
308
- var boardProps = subcircuitGroupProps.omit({ subcircuit: true }).extend({
315
+ var boardProps = subcircuitGroupProps.extend({
309
316
  width: import_circuit_json6.distance.optional(),
310
317
  height: import_circuit_json6.distance.optional(),
311
318
  outline: import_zod11.z.array(point).optional()
@@ -619,6 +626,10 @@ expectTypesMatch(true);
619
626
  var import_zod29 = require("zod");
620
627
  var pushButtonProps = commonComponentProps.extend({});
621
628
 
629
+ // lib/components/subcircuit.ts
630
+ var subcircuitProps = subcircuitGroupProps;
631
+ expectTypesMatch(true);
632
+
622
633
  // lib/index.ts
623
634
  var inductorProps = commonComponentProps.extend({
624
635
  inductance: import_circuit_json18.inductance
@@ -828,6 +839,8 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
828
839
  smtPadProps,
829
840
  solderPasteProps,
830
841
  subcircuitGroupProps,
842
+ subcircuitGroupPropsWithBool,
843
+ subcircuitProps,
831
844
  supplierProps,
832
845
  switchProps,
833
846
  traceHintProps,
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/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/capacitor.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/pin-header.ts","../lib/components/netalias.ts","../lib/components/push-button.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 \"circuit-json\"\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/potentiometer\"\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/pin-header\"\nexport * from \"./components/netalias\"\nexport * from \"./components/push-button\"\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 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\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type Footprint, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: 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 type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\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 { 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 { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type 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: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\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 { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n}\n\nexport const boardProps = subcircuitGroupProps\n .omit({ subcircuit: true })\n .extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n })\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent } from \"circuit-json\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: 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 partsEngine?: PartsEngine\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 minTraceWidth: length.optional(),\n partsEngine: z.custom<PartsEngine>((v) => \"findPart\" in v).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 { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | readonly string[]>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport type PinLabels = Record<\n number | string,\n string | readonly string[] | string[]\n>\n\nexport const pinLabelsProp = z.record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabels, z.input<typeof pinLabelsProp>>(true)\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()),\n )\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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n 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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport 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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { z } from \"zod\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n})\nexport const potentiometerPins = lrPins\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n polarized?: boolean\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 polarized: z.boolean().optional().default(false),\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 { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"circuit-json\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import {\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 { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { 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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n}\n\nexport const pinHeaderProps = 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 holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetAliasProps {\n net?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"up\", \"right\", \"down\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { commonComponentProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pushButtonProps = commonComponentProps.extend({})\nexport type PushButtonProps = z.input<typeof pushButtonProps>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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,eAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,WAAW,+BAAS,SAAS;AAAA,EAC7B,OAAO,eAAE,MAAM,sCAAgB;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,6BAAO,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,sCAAgB;AAAA,EAC/B,aAAa,6BAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","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/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/capacitor.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/pin-header.ts","../lib/components/netalias.ts","../lib/components/push-button.ts","../lib/components/subcircuit.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 \"circuit-json\"\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/potentiometer\"\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/pin-header\"\nexport * from \"./components/netalias\"\nexport * from \"./components/push-button\"\nexport * from \"./components/subcircuit\"\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 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\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type Footprint, footprintProp } from \"./footprintProp\"\n\nexport interface PcbLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: 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 type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n key?: any\n name: string\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\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 { 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 { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type 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: Array<number | string>\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\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 { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n})\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent } from \"circuit-json\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: 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 partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | 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 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 minTraceWidth: length.optional(),\n partsEngine: z.custom<PartsEngine>((v) => \"findPart\" in v).optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.union([\n baseGroupProps,\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | readonly string[]>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport type PinLabels = Record<\n number | string,\n string | readonly string[] | string[]\n>\n\nexport const pinLabelsProp = z.record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabels, z.input<typeof pinLabelsProp>>(true)\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()),\n )\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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | string[]>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n 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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport 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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { z } from \"zod\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n})\nexport const potentiometerPins = lrPins\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n polarized?: boolean\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 polarized: z.boolean().optional().default(false),\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 { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance, length } from \"circuit-json\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n xDist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n yDist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import {\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 { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { 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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n}\n\nexport const pinHeaderProps = 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 holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetAliasProps {\n net?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"up\", \"right\", \"down\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { commonComponentProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pushButtonProps = commonComponentProps.extend({})\nexport type PushButtonProps = z.input<typeof pushButtonProps>\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,IAAAC,wBAeO;AAEP,IAAAC,eAAkB;;;ACdX,IAAM,mBAAmB,CAO9B,aAOS;AAAC;AAIZ,iBAQE,eAAe;AAEjB,iBAQE,iBAAiB;AAEnB,iBAOE,IAAI;AAEN,iBAOE,iCAAiC;;;ACjEnC,iBAAkB;AACX,IAAM,YAAY,aAAE,KAAK,CAAC,MAAM,QAAQ,QAAQ,OAAO,CAAC;AASxD,IAAM,qBAAqB,aAAE,KAAK;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,iBAAuD,IAAI;AAC3D,iBAAyE,IAAI;;;ACnB7E,IAAAC,cAAkB;AAGX,IAAM,YAAY,cAAE,MAAM,cAAE,OAAO,EAAE,GAAG,cAAE,OAAO,CAAC,CAAC;AAG1D,iBAAuD,IAAI;;;ACN3D,IAAAC,uBAMO;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,mBAAmB,EAAE,SAAS;AAAA,EAC1D,SAAS,eACN,MAAM,sCAAgB,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,+BAAS,SAAS;AAAA,EAC7B,OAAO,eAAE,MAAM,sCAAgB;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,6BAAO,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,sCAAgB;AAAA,EAC/B,aAAa,6BAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","distanceOrMultiplier"]}
@@ -12,13 +12,11 @@ export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
12
12
  outline?: Point[]
13
13
  }
14
14
 
15
- export const boardProps = subcircuitGroupProps
16
- .omit({ subcircuit: true })
17
- .extend({
18
- width: distance.optional(),
19
- height: distance.optional(),
20
- outline: z.array(point).optional(),
21
- })
15
+ export const boardProps = subcircuitGroupProps.extend({
16
+ width: distance.optional(),
17
+ height: distance.optional(),
18
+ outline: z.array(point).optional(),
19
+ })
22
20
 
23
21
  type InferredBoardProps = z.input<typeof boardProps>
24
22
  expectTypesMatch<BoardProps, InferredBoardProps>(true)
@@ -23,7 +23,6 @@ export type PartsEngine = {
23
23
  }
24
24
 
25
25
  export interface SubcircuitGroupProps extends BaseGroupProps {
26
- subcircuit: true
27
26
  layout?: LayoutBuilder
28
27
  manualEdits?: ManualEditFile
29
28
  routingDisabled?: boolean
@@ -40,7 +39,11 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
40
39
  partsEngine?: PartsEngine
41
40
  }
42
41
 
43
- export type GroupProps = SubcircuitGroupProps | BaseGroupProps
42
+ export interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {
43
+ subcircuit: true
44
+ }
45
+
46
+ export type GroupProps = SubcircuitGroupPropsWithBool | BaseGroupProps
44
47
 
45
48
  export const baseGroupProps = commonLayoutProps.extend({
46
49
  name: z.string().optional(),
@@ -48,7 +51,6 @@ export const baseGroupProps = commonLayoutProps.extend({
48
51
  })
49
52
 
50
53
  export const subcircuitGroupProps = baseGroupProps.extend({
51
- subcircuit: z.literal(true),
52
54
  layout: z.custom<LayoutBuilder>((v) => true).optional(),
53
55
  manualEdits: z.custom<ManualEditFile>((v) => true).optional(),
54
56
  schAutoLayoutEnabled: z.boolean().optional(),
@@ -58,13 +60,25 @@ export const subcircuitGroupProps = baseGroupProps.extend({
58
60
  partsEngine: z.custom<PartsEngine>((v) => "findPart" in v).optional(),
59
61
  })
60
62
 
61
- export const groupProps = z.union([baseGroupProps, subcircuitGroupProps])
63
+ export const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
64
+ subcircuit: z.literal(true),
65
+ })
66
+
67
+ export const groupProps = z.union([
68
+ baseGroupProps,
69
+ subcircuitGroupPropsWithBool,
70
+ ])
62
71
 
63
72
  type InferredBaseGroupProps = z.input<typeof baseGroupProps>
64
- type InferredSubcircuitGroupProps = z.input<typeof subcircuitGroupProps>
73
+ type InferredSubcircuitGroupPropsWithBool = z.input<
74
+ typeof subcircuitGroupPropsWithBool
75
+ >
65
76
 
66
77
  expectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)
67
- expectTypesMatch<SubcircuitGroupProps, InferredSubcircuitGroupProps>(true)
78
+ expectTypesMatch<
79
+ SubcircuitGroupPropsWithBool,
80
+ InferredSubcircuitGroupPropsWithBool
81
+ >(true)
68
82
 
69
83
  type InferredGroupProps = z.input<typeof groupProps>
70
84
  expectTypesMatch<GroupProps, InferredGroupProps>(true)
@@ -0,0 +1,11 @@
1
+ import type { SubcircuitGroupProps } from "./group"
2
+ import { subcircuitGroupProps } from "./group"
3
+ import type { z } from "zod"
4
+ import { expectTypesMatch } from "lib/typecheck"
5
+
6
+ export type SubcircuitProps = SubcircuitGroupProps
7
+
8
+ export const subcircuitProps = subcircuitGroupProps
9
+
10
+ type InferredSubcircuitProps = z.input<typeof subcircuitProps>
11
+ expectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)
package/lib/index.ts CHANGED
@@ -67,6 +67,7 @@ export * from "./components/battery"
67
67
  export * from "./components/pin-header"
68
68
  export * from "./components/netalias"
69
69
  export * from "./components/push-button"
70
+ export * from "./components/subcircuit"
70
71
 
71
72
  export const inductorProps = commonComponentProps.extend({
72
73
  inductance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {