@tscircuit/props 0.0.592 → 0.0.593

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.js CHANGED
@@ -17334,20 +17334,28 @@ var traceProps = z68.union([
17334
17334
  })
17335
17335
  ]);
17336
17336
 
17337
- // lib/components/differentialpair.ts
17337
+ // lib/components/bus.ts
17338
17338
  import { z as z69 } from "zod";
17339
- var differentialPairProps = z69.object({
17339
+ var busProps = z69.object({
17340
17340
  name: z69.string().optional(),
17341
- positiveConnection: z69.string(),
17342
- negativeConnection: z69.string(),
17343
- maxLengthSkew: z69.number().min(0).finite().optional()
17341
+ connections: z69.array(z69.string()).min(2)
17342
+ });
17343
+ expectTypesMatch(true);
17344
+
17345
+ // lib/components/differentialpair.ts
17346
+ import { z as z70 } from "zod";
17347
+ var differentialPairProps = z70.object({
17348
+ name: z70.string().optional(),
17349
+ positiveConnection: z70.string(),
17350
+ negativeConnection: z70.string(),
17351
+ maxLengthSkew: z70.number().min(0).finite().optional()
17344
17352
  });
17345
17353
  expectTypesMatch(true);
17346
17354
 
17347
17355
  // lib/components/footprint.ts
17348
17356
  import { layer_ref as layer_ref5 } from "circuit-json";
17349
- import { z as z70 } from "zod";
17350
- var footprintInsertionDirection = z70.enum([
17357
+ import { z as z71 } from "zod";
17358
+ var footprintInsertionDirection = z71.enum([
17351
17359
  "from_above",
17352
17360
  "from_left",
17353
17361
  "from_right",
@@ -17355,11 +17363,11 @@ var footprintInsertionDirection = z70.enum([
17355
17363
  "from_back"
17356
17364
  ]);
17357
17365
  expectTypesMatch(true);
17358
- var footprintProps = z70.object({
17359
- children: z70.any().optional(),
17360
- name: z70.string().optional(),
17366
+ var footprintProps = z71.object({
17367
+ children: z71.any().optional(),
17368
+ name: z71.string().optional(),
17361
17369
  originalLayer: layer_ref5.default("top").optional(),
17362
- circuitJson: z70.array(z70.any()).optional(),
17370
+ circuitJson: z71.array(z71.any()).optional(),
17363
17371
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
17364
17372
  insertionDirection: footprintInsertionDirection.optional().describe(
17365
17373
  "Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
@@ -17368,19 +17376,19 @@ var footprintProps = z70.object({
17368
17376
  expectTypesMatch(true);
17369
17377
 
17370
17378
  // lib/components/symbol.ts
17371
- import { z as z71 } from "zod";
17372
- var symbolProps = z71.object({
17373
- originalFacingDirection: z71.enum(["up", "down", "left", "right"]).default("right").optional(),
17379
+ import { z as z72 } from "zod";
17380
+ var symbolProps = z72.object({
17381
+ originalFacingDirection: z72.enum(["up", "down", "left", "right"]).default("right").optional(),
17374
17382
  width: distance.optional(),
17375
17383
  height: distance.optional(),
17376
- name: z71.string().optional()
17384
+ name: z72.string().optional()
17377
17385
  });
17378
17386
  expectTypesMatch(true);
17379
17387
 
17380
17388
  // lib/components/battery.ts
17381
17389
  import { voltage as voltage2 } from "circuit-json";
17382
- import { z as z72 } from "zod";
17383
- var capacity = z72.number().or(z72.string().endsWith("mAh")).transform((v) => {
17390
+ import { z as z73 } from "zod";
17391
+ var capacity = z73.number().or(z73.string().endsWith("mAh")).transform((v) => {
17384
17392
  if (typeof v === "string") {
17385
17393
  const valString = v.replace("mAh", "");
17386
17394
  const num = Number.parseFloat(valString);
@@ -17395,14 +17403,14 @@ var batteryPins = lrPolarPins;
17395
17403
  var batteryProps = commonComponentProps.extend({
17396
17404
  capacity: capacity.optional(),
17397
17405
  voltage: voltage2.optional(),
17398
- standard: z72.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17406
+ standard: z73.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17399
17407
  schOrientation: schematicOrientation.optional(),
17400
17408
  connections: createConnectionsProp(batteryPins).optional()
17401
17409
  });
17402
17410
  expectTypesMatch(true);
17403
17411
 
17404
17412
  // lib/components/mountedboard.ts
17405
- import { z as z73 } from "zod";
17413
+ import { z as z74 } from "zod";
17406
17414
  var mountedboardProps = subcircuitGroupProps.extend({
17407
17415
  manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
17408
17416
  pinLabels: chipProps.shape.pinLabels,
@@ -17414,7 +17422,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
17414
17422
  internallyConnectedPins: chipProps.shape.internallyConnectedPins,
17415
17423
  externallyConnectedPins: chipProps.shape.externallyConnectedPins,
17416
17424
  boardToBoardDistance: distance.optional(),
17417
- mountOrientation: z73.enum(["faceDown", "faceUp"]).optional()
17425
+ mountOrientation: z74.enum(["faceDown", "faceUp"]).optional()
17418
17426
  });
17419
17427
  expectTypesMatch(true);
17420
17428
 
@@ -17422,29 +17430,29 @@ expectTypesMatch(true);
17422
17430
  import { distance as distance20 } from "circuit-json";
17423
17431
 
17424
17432
  // lib/common/pcbOrientation.ts
17425
- import { z as z74 } from "zod";
17426
- var pcbOrientation = z74.enum(["vertical", "horizontal"]).describe(
17433
+ import { z as z75 } from "zod";
17434
+ var pcbOrientation = z75.enum(["vertical", "horizontal"]).describe(
17427
17435
  "vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
17428
17436
  );
17429
17437
  expectTypesMatch(true);
17430
17438
 
17431
17439
  // lib/components/pin-header.ts
17432
- import { z as z75 } from "zod";
17440
+ import { z as z76 } from "zod";
17433
17441
  var pinHeaderProps = commonComponentProps.extend({
17434
- pinCount: z75.number(),
17442
+ pinCount: z76.number(),
17435
17443
  pitch: distance20.optional(),
17436
- schFacingDirection: z75.enum(["up", "down", "left", "right"]).optional(),
17437
- gender: z75.enum(["male", "female", "unpopulated"]).optional().default("male"),
17438
- showSilkscreenPinLabels: z75.boolean().optional(),
17439
- pcbPinLabels: z75.record(z75.string(), z75.string()).optional(),
17440
- doubleRow: z75.boolean().optional(),
17441
- rightAngle: z75.boolean().optional(),
17444
+ schFacingDirection: z76.enum(["up", "down", "left", "right"]).optional(),
17445
+ gender: z76.enum(["male", "female", "unpopulated"]).optional().default("male"),
17446
+ showSilkscreenPinLabels: z76.boolean().optional(),
17447
+ pcbPinLabels: z76.record(z76.string(), z76.string()).optional(),
17448
+ doubleRow: z76.boolean().optional(),
17449
+ rightAngle: z76.boolean().optional(),
17442
17450
  pcbOrientation: pcbOrientation.optional(),
17443
17451
  holeDiameter: distance20.optional(),
17444
17452
  platedDiameter: distance20.optional(),
17445
- pinLabels: z75.record(z75.string(), schematicPinLabel).or(z75.array(schematicPinLabel)).optional(),
17446
- connections: z75.custom().pipe(z75.record(z75.string(), connectionTarget)).optional(),
17447
- facingDirection: z75.enum(["left", "right"]).optional(),
17453
+ pinLabels: z76.record(z76.string(), schematicPinLabel).or(z76.array(schematicPinLabel)).optional(),
17454
+ connections: z76.custom().pipe(z76.record(z76.string(), connectionTarget)).optional(),
17455
+ facingDirection: z76.enum(["left", "right"]).optional(),
17448
17456
  schPinArrangement: schematicPinArrangement.optional(),
17449
17457
  schPinStyle: schematicPinStyle.optional(),
17450
17458
  schPinSpacing: distance20.optional(),
@@ -17454,29 +17462,29 @@ var pinHeaderProps = commonComponentProps.extend({
17454
17462
  expectTypesMatch(true);
17455
17463
 
17456
17464
  // lib/components/netalias.ts
17457
- import { z as z76 } from "zod";
17465
+ import { z as z77 } from "zod";
17458
17466
  import { rotation as rotation3 } from "circuit-json";
17459
- var netAliasProps = z76.object({
17460
- net: z76.string().optional(),
17461
- connection: z76.string().optional(),
17467
+ var netAliasProps = z77.object({
17468
+ net: z77.string().optional(),
17469
+ connection: z77.string().optional(),
17462
17470
  schX: distance.optional(),
17463
17471
  schY: distance.optional(),
17464
17472
  schRotation: rotation3.optional(),
17465
- anchorSide: z76.enum(["left", "top", "right", "bottom"]).optional()
17473
+ anchorSide: z77.enum(["left", "top", "right", "bottom"]).optional()
17466
17474
  });
17467
17475
  expectTypesMatch(true);
17468
17476
 
17469
17477
  // lib/components/netlabel.ts
17470
- import { z as z77 } from "zod";
17478
+ import { z as z78 } from "zod";
17471
17479
  import { rotation as rotation4 } from "circuit-json";
17472
- var netLabelProps = z77.object({
17473
- net: z77.string().optional(),
17474
- connection: z77.string().optional(),
17475
- connectsTo: z77.string().or(z77.array(z77.string())).optional(),
17480
+ var netLabelProps = z78.object({
17481
+ net: z78.string().optional(),
17482
+ connection: z78.string().optional(),
17483
+ connectsTo: z78.string().or(z78.array(z78.string())).optional(),
17476
17484
  schX: distance.optional(),
17477
17485
  schY: distance.optional(),
17478
17486
  schRotation: rotation4.optional(),
17479
- anchorSide: z77.enum(["left", "top", "right", "bottom"]).optional()
17487
+ anchorSide: z78.enum(["left", "top", "right", "bottom"]).optional()
17480
17488
  });
17481
17489
  expectTypesMatch(true);
17482
17490
 
@@ -17491,32 +17499,32 @@ expectTypesMatch(true);
17491
17499
 
17492
17500
  // lib/components/analogsimulation.ts
17493
17501
  import { ms } from "circuit-json";
17494
- import { z as z79 } from "zod";
17495
- var spiceEngine = z79.custom(
17502
+ import { z as z80 } from "zod";
17503
+ var spiceEngine = z80.custom(
17496
17504
  (value) => typeof value === "string"
17497
17505
  );
17498
- var spiceOptions = z79.object({
17499
- method: z79.enum(["trap", "gear"]).optional(),
17500
- reltol: z79.union([z79.number(), z79.string()]).optional(),
17501
- abstol: z79.union([z79.number(), z79.string()]).optional(),
17502
- vntol: z79.union([z79.number(), z79.string()]).optional()
17506
+ var spiceOptions = z80.object({
17507
+ method: z80.enum(["trap", "gear"]).optional(),
17508
+ reltol: z80.union([z80.number(), z80.string()]).optional(),
17509
+ abstol: z80.union([z80.number(), z80.string()]).optional(),
17510
+ vntol: z80.union([z80.number(), z80.string()]).optional()
17503
17511
  });
17504
17512
  var analogAnalysisSimulationBaseProps = {
17505
- name: z79.string().optional(),
17513
+ name: z80.string().optional(),
17506
17514
  spiceEngine: spiceEngine.optional(),
17507
17515
  spiceOptions: spiceOptions.optional(),
17508
- graphIndependentAxes: z79.boolean().optional(),
17509
- children: z79.custom().optional()
17516
+ graphIndependentAxes: z80.boolean().optional(),
17517
+ children: z80.custom().optional()
17510
17518
  };
17511
- var analogSimulationProps = z79.object({
17512
- name: z79.string().optional(),
17513
- simulationType: z79.literal("spice_transient_analysis").default("spice_transient_analysis"),
17519
+ var analogSimulationProps = z80.object({
17520
+ name: z80.string().optional(),
17521
+ simulationType: z80.literal("spice_transient_analysis").default("spice_transient_analysis"),
17514
17522
  duration: ms.optional(),
17515
17523
  startTime: ms.optional(),
17516
17524
  timePerStep: ms.optional(),
17517
17525
  spiceEngine: spiceEngine.optional(),
17518
17526
  spiceOptions: spiceOptions.optional(),
17519
- graphIndependentAxes: z79.boolean().optional()
17527
+ graphIndependentAxes: z80.boolean().optional()
17520
17528
  });
17521
17529
  expectTypesMatch(
17522
17530
  true
@@ -17524,12 +17532,12 @@ expectTypesMatch(
17524
17532
 
17525
17533
  // lib/components/analogtransientsimulation.ts
17526
17534
  import { ms as ms2 } from "circuit-json";
17527
- import { z as z80 } from "zod";
17535
+ import { z as z81 } from "zod";
17528
17536
  var positiveMilliseconds = ms2.refine(
17529
17537
  (milliseconds) => milliseconds > 0,
17530
17538
  "Time must be positive"
17531
17539
  );
17532
- var analogTransientSimulationProps = z80.object({
17540
+ var analogTransientSimulationProps = z81.object({
17533
17541
  ...analogAnalysisSimulationBaseProps,
17534
17542
  duration: positiveMilliseconds.default("10ms"),
17535
17543
  startTime: ms2.default("0ms"),
@@ -17537,7 +17545,7 @@ var analogTransientSimulationProps = z80.object({
17537
17545
  }).superRefine((simulation, context) => {
17538
17546
  if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
17539
17547
  context.addIssue({
17540
- code: z80.ZodIssueCode.custom,
17548
+ code: z81.ZodIssueCode.custom,
17541
17549
  path: ["startTime"],
17542
17550
  message: "startTime must be between zero and duration"
17543
17551
  });
@@ -17546,19 +17554,19 @@ var analogTransientSimulationProps = z80.object({
17546
17554
  expectTypesMatch(true);
17547
17555
 
17548
17556
  // lib/components/analogdcoperatingpointsimulation.ts
17549
- import { z as z81 } from "zod";
17550
- var analogDcOperatingPointSimulationProps = z81.object({
17557
+ import { z as z82 } from "zod";
17558
+ var analogDcOperatingPointSimulationProps = z82.object({
17551
17559
  ...analogAnalysisSimulationBaseProps
17552
17560
  });
17553
17561
  expectTypesMatch(true);
17554
17562
 
17555
17563
  // lib/components/analogdcsweepsimulation.ts
17556
17564
  import { current, voltage as voltage3 } from "circuit-json";
17557
- import { z as z82 } from "zod";
17558
- var dcSweepQuantity = z82.union([voltage3, current]);
17559
- var analogDcSweepSimulationProps = z82.object({
17565
+ import { z as z83 } from "zod";
17566
+ var dcSweepQuantity = z83.union([voltage3, current]);
17567
+ var analogDcSweepSimulationProps = z83.object({
17560
17568
  ...analogAnalysisSimulationBaseProps,
17561
- sweepSource: z82.string().min(1),
17569
+ sweepSource: z83.string().min(1),
17562
17570
  sweepStart: dcSweepQuantity,
17563
17571
  sweepStop: dcSweepQuantity,
17564
17572
  sweepStep: dcSweepQuantity.refine(
@@ -17568,7 +17576,7 @@ var analogDcSweepSimulationProps = z82.object({
17568
17576
  }).superRefine((simulation, context) => {
17569
17577
  if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
17570
17578
  context.addIssue({
17571
- code: z82.ZodIssueCode.custom,
17579
+ code: z83.ZodIssueCode.custom,
17572
17580
  path: ["sweepStep"],
17573
17581
  message: "sweepStep must move from sweepStart toward sweepStop"
17574
17582
  });
@@ -17578,10 +17586,10 @@ expectTypesMatch(true);
17578
17586
 
17579
17587
  // lib/components/analogacsweepsimulation.ts
17580
17588
  import { frequency as frequency3 } from "circuit-json";
17581
- import { z as z83 } from "zod";
17582
- var analogAcSweepSimulationProps = z83.object({
17589
+ import { z as z84 } from "zod";
17590
+ var analogAcSweepSimulationProps = z84.object({
17583
17591
  ...analogAnalysisSimulationBaseProps,
17584
- sweepType: z83.enum(["linear", "decade", "octave"]),
17592
+ sweepType: z84.enum(["linear", "decade", "octave"]),
17585
17593
  startFrequency: frequency3.refine(
17586
17594
  (startFrequencyHz) => startFrequencyHz > 0,
17587
17595
  "startFrequency must be positive"
@@ -17590,12 +17598,12 @@ var analogAcSweepSimulationProps = z83.object({
17590
17598
  (stopFrequencyHz) => stopFrequencyHz > 0,
17591
17599
  "stopFrequency must be positive"
17592
17600
  ),
17593
- samplesPerInterval: z83.number().int().positive().optional(),
17594
- sampleCount: z83.number().int().positive().optional()
17601
+ samplesPerInterval: z84.number().int().positive().optional(),
17602
+ sampleCount: z84.number().int().positive().optional()
17595
17603
  }).superRefine((simulation, context) => {
17596
17604
  if (simulation.stopFrequency <= simulation.startFrequency) {
17597
17605
  context.addIssue({
17598
- code: z83.ZodIssueCode.custom,
17606
+ code: z84.ZodIssueCode.custom,
17599
17607
  path: ["stopFrequency"],
17600
17608
  message: "stopFrequency must be greater than startFrequency"
17601
17609
  });
@@ -17603,14 +17611,14 @@ var analogAcSweepSimulationProps = z83.object({
17603
17611
  if (simulation.sweepType === "linear") {
17604
17612
  if (simulation.sampleCount === void 0) {
17605
17613
  context.addIssue({
17606
- code: z83.ZodIssueCode.custom,
17614
+ code: z84.ZodIssueCode.custom,
17607
17615
  path: ["sampleCount"],
17608
17616
  message: "sampleCount is required for a linear AC sweep"
17609
17617
  });
17610
17618
  }
17611
17619
  if (simulation.samplesPerInterval !== void 0) {
17612
17620
  context.addIssue({
17613
- code: z83.ZodIssueCode.custom,
17621
+ code: z84.ZodIssueCode.custom,
17614
17622
  path: ["samplesPerInterval"],
17615
17623
  message: "samplesPerInterval is only valid for decade or octave sweeps"
17616
17624
  });
@@ -17619,14 +17627,14 @@ var analogAcSweepSimulationProps = z83.object({
17619
17627
  }
17620
17628
  if (simulation.samplesPerInterval === void 0) {
17621
17629
  context.addIssue({
17622
- code: z83.ZodIssueCode.custom,
17630
+ code: z84.ZodIssueCode.custom,
17623
17631
  path: ["samplesPerInterval"],
17624
17632
  message: "samplesPerInterval is required for decade or octave sweeps"
17625
17633
  });
17626
17634
  }
17627
17635
  if (simulation.sampleCount !== void 0) {
17628
17636
  context.addIssue({
17629
- code: z83.ZodIssueCode.custom,
17637
+ code: z84.ZodIssueCode.custom,
17630
17638
  path: ["sampleCount"],
17631
17639
  message: "sampleCount is only valid for a linear sweep"
17632
17640
  });
@@ -17642,43 +17650,43 @@ import {
17642
17650
  resistance as resistance3,
17643
17651
  voltage as voltage4
17644
17652
  } from "circuit-json";
17645
- import { z as z84 } from "zod";
17646
- var resistanceSweepQuantity = resistance3.pipe(z84.number());
17647
- var capacitanceSweepQuantity = capacitance4.pipe(z84.number());
17648
- var inductanceSweepQuantity = inductance.pipe(z84.number());
17649
- var voltageSweepQuantity = voltage4.pipe(z84.number());
17650
- var currentSweepQuantity = current2.pipe(z84.number());
17653
+ import { z as z85 } from "zod";
17654
+ var resistanceSweepQuantity = resistance3.pipe(z85.number());
17655
+ var capacitanceSweepQuantity = capacitance4.pipe(z85.number());
17656
+ var inductanceSweepQuantity = inductance.pipe(z85.number());
17657
+ var voltageSweepQuantity = voltage4.pipe(z85.number());
17658
+ var currentSweepQuantity = current2.pipe(z85.number());
17651
17659
  var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
17652
- name: z84.string().optional(),
17653
- values: z84.array(sweepQuantity).min(1).optional(),
17660
+ name: z85.string().optional(),
17661
+ values: z85.array(sweepQuantity).min(1).optional(),
17654
17662
  start: sweepQuantity.optional(),
17655
17663
  stop: sweepQuantity.optional(),
17656
17664
  step: sweepQuantity.optional()
17657
17665
  });
17658
- var analogResistanceSweepParameterProps = z84.object({
17666
+ var analogResistanceSweepParameterProps = z85.object({
17659
17667
  ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
17660
- parameterType: z84.literal("resistance"),
17661
- resistorRef: z84.string().min(1)
17668
+ parameterType: z85.literal("resistance"),
17669
+ resistorRef: z85.string().min(1)
17662
17670
  }).strict();
17663
- var analogCapacitanceSweepParameterProps = z84.object({
17671
+ var analogCapacitanceSweepParameterProps = z85.object({
17664
17672
  ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
17665
- parameterType: z84.literal("capacitance"),
17666
- capacitorRef: z84.string().min(1)
17673
+ parameterType: z85.literal("capacitance"),
17674
+ capacitorRef: z85.string().min(1)
17667
17675
  }).strict();
17668
- var analogInductanceSweepParameterProps = z84.object({
17676
+ var analogInductanceSweepParameterProps = z85.object({
17669
17677
  ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
17670
- parameterType: z84.literal("inductance"),
17671
- inductorRef: z84.string().min(1)
17678
+ parameterType: z85.literal("inductance"),
17679
+ inductorRef: z85.string().min(1)
17672
17680
  }).strict();
17673
- var analogVoltageSweepParameterProps = z84.object({
17681
+ var analogVoltageSweepParameterProps = z85.object({
17674
17682
  ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
17675
- parameterType: z84.literal("voltage"),
17676
- net: z84.string().min(1)
17683
+ parameterType: z85.literal("voltage"),
17684
+ net: z85.string().min(1)
17677
17685
  }).strict();
17678
- var analogCurrentSweepParameterProps = z84.object({
17686
+ var analogCurrentSweepParameterProps = z85.object({
17679
17687
  ...createAnalogSweepCoordinateProps(currentSweepQuantity),
17680
- parameterType: z84.literal("current"),
17681
- currentSourceRef: z84.string().min(1)
17688
+ parameterType: z85.literal("current"),
17689
+ currentSourceRef: z85.string().min(1)
17682
17690
  }).strict();
17683
17691
  var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17684
17692
  const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
@@ -17690,34 +17698,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17690
17698
  const hasRangeCoordinates = rangeCoordinateCount > 0;
17691
17699
  if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
17692
17700
  context.addIssue({
17693
- code: z84.ZodIssueCode.custom,
17701
+ code: z85.ZodIssueCode.custom,
17694
17702
  message: "Provide either values or start/stop/step"
17695
17703
  });
17696
17704
  return;
17697
17705
  }
17698
17706
  if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
17699
17707
  context.addIssue({
17700
- code: z84.ZodIssueCode.custom,
17708
+ code: z85.ZodIssueCode.custom,
17701
17709
  message: "start, stop, and step must be provided together"
17702
17710
  });
17703
17711
  return;
17704
17712
  }
17705
17713
  if (sweepCoordinates.step === 0) {
17706
17714
  context.addIssue({
17707
- code: z84.ZodIssueCode.custom,
17715
+ code: z85.ZodIssueCode.custom,
17708
17716
  path: ["step"],
17709
17717
  message: "step must be nonzero"
17710
17718
  });
17711
17719
  }
17712
17720
  if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
17713
17721
  context.addIssue({
17714
- code: z84.ZodIssueCode.custom,
17722
+ code: z85.ZodIssueCode.custom,
17715
17723
  path: ["step"],
17716
17724
  message: "step must move from start toward stop"
17717
17725
  });
17718
17726
  }
17719
17727
  };
17720
- var analogSweepParameterProps = z84.discriminatedUnion("parameterType", [
17728
+ var analogSweepParameterProps = z85.discriminatedUnion("parameterType", [
17721
17729
  analogResistanceSweepParameterProps,
17722
17730
  analogCapacitanceSweepParameterProps,
17723
17731
  analogInductanceSweepParameterProps,
@@ -17732,27 +17740,27 @@ expectTypesMatch(true);
17732
17740
  expectTypesMatch(true);
17733
17741
 
17734
17742
  // lib/components/autoroutingphase.ts
17735
- import { z as z85 } from "zod";
17736
- var autoroutingPhaseProps = z85.object({
17737
- key: z85.any().optional(),
17738
- name: z85.string().optional(),
17743
+ import { z as z86 } from "zod";
17744
+ var autoroutingPhaseProps = z86.object({
17745
+ key: z86.any().optional(),
17746
+ name: z86.string().optional(),
17739
17747
  autorouter: autorouterProp.optional(),
17740
- phaseIndex: z85.number().optional(),
17748
+ phaseIndex: z86.number().optional(),
17741
17749
  ...routingTolerances.shape,
17742
- region: z85.object({
17743
- shape: z85.literal("rect").optional(),
17744
- minX: z85.number(),
17745
- maxX: z85.number(),
17746
- minY: z85.number(),
17747
- maxY: z85.number()
17750
+ region: z86.object({
17751
+ shape: z86.literal("rect").optional(),
17752
+ minX: z86.number(),
17753
+ maxX: z86.number(),
17754
+ minY: z86.number(),
17755
+ maxY: z86.number()
17748
17756
  }).optional(),
17749
- connection: z85.string().optional(),
17750
- connections: z85.array(z85.string()).optional(),
17751
- reroute: z85.boolean().optional()
17757
+ connection: z86.string().optional(),
17758
+ connections: z86.array(z86.string()).optional(),
17759
+ reroute: z86.boolean().optional()
17752
17760
  }).superRefine((value, ctx) => {
17753
17761
  if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
17754
17762
  ctx.addIssue({
17755
- code: z85.ZodIssueCode.custom,
17763
+ code: z86.ZodIssueCode.custom,
17756
17764
  message: "region, connection, or connections is required when reroute is provided",
17757
17765
  path: ["region"]
17758
17766
  });
@@ -17761,15 +17769,15 @@ var autoroutingPhaseProps = z85.object({
17761
17769
  expectTypesMatch(true);
17762
17770
 
17763
17771
  // lib/components/spicemodel.ts
17764
- import { z as z86 } from "zod";
17765
- var spicemodelProps = z86.object({
17766
- source: z86.string(),
17767
- spicePinMapping: z86.record(z86.string(), z86.string()).optional()
17772
+ import { z as z87 } from "zod";
17773
+ var spicemodelProps = z87.object({
17774
+ source: z87.string(),
17775
+ spicePinMapping: z87.record(z87.string(), z87.string()).optional()
17768
17776
  });
17769
17777
  expectTypesMatch(true);
17770
17778
 
17771
17779
  // lib/components/transistor.ts
17772
- import { z as z87 } from "zod";
17780
+ import { z as z88 } from "zod";
17773
17781
  var transistorPinsLabels = [
17774
17782
  "pin1",
17775
17783
  "pin2",
@@ -17782,7 +17790,7 @@ var transistorPinsLabels = [
17782
17790
  "drain"
17783
17791
  ];
17784
17792
  var transistorProps = commonComponentProps.extend({
17785
- type: z87.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17793
+ type: z88.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17786
17794
  connections: createConnectionsProp(transistorPinsLabels).optional()
17787
17795
  });
17788
17796
  var transistorPins = [
@@ -17796,7 +17804,7 @@ var transistorPins = [
17796
17804
  expectTypesMatch(true);
17797
17805
 
17798
17806
  // lib/components/mosfet.ts
17799
- import { z as z88 } from "zod";
17807
+ import { z as z89 } from "zod";
17800
17808
  var mosfetPins = [
17801
17809
  "pin1",
17802
17810
  "drain",
@@ -17806,11 +17814,11 @@ var mosfetPins = [
17806
17814
  "gate"
17807
17815
  ];
17808
17816
  var mosfetProps = commonComponentProps.extend({
17809
- channelType: z88.enum(["n", "p"]),
17810
- mosfetMode: z88.enum(["enhancement", "depletion"]),
17811
- symbolDrainSide: z88.enum(["left", "right", "top", "bottom"]).optional(),
17812
- symbolSourceSide: z88.enum(["left", "right", "top", "bottom"]).optional(),
17813
- symbolGateSide: z88.enum(["left", "right", "top", "bottom"]).optional(),
17817
+ channelType: z89.enum(["n", "p"]),
17818
+ mosfetMode: z89.enum(["enhancement", "depletion"]),
17819
+ symbolDrainSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
17820
+ symbolSourceSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
17821
+ symbolGateSide: z89.enum(["left", "right", "top", "bottom"]).optional(),
17814
17822
  connections: createConnectionsProp(mosfetPins).optional()
17815
17823
  });
17816
17824
  expectTypesMatch(true);
@@ -17832,29 +17840,29 @@ expectTypesMatch(true);
17832
17840
 
17833
17841
  // lib/components/inductor.ts
17834
17842
  import { inductance as inductance2 } from "circuit-json";
17835
- import { z as z90 } from "zod";
17843
+ import { z as z91 } from "zod";
17836
17844
  var inductorPins = lrPins;
17837
17845
  var inductorProps = commonComponentProps.extend({
17838
17846
  inductance: inductance2,
17839
- maxCurrentRating: z90.union([z90.string(), z90.number()]).optional(),
17847
+ maxCurrentRating: z91.union([z91.string(), z91.number()]).optional(),
17840
17848
  schOrientation: schematicOrientation.optional(),
17841
17849
  connections: createConnectionsProp(inductorPins).optional()
17842
17850
  });
17843
17851
  expectTypesMatch(true);
17844
17852
 
17845
17853
  // lib/components/internal-circuit.ts
17846
- import { z as z91 } from "zod";
17847
- var internalCircuitProps = z91.object({
17848
- children: z91.custom().optional()
17854
+ import { z as z92 } from "zod";
17855
+ var internalCircuitProps = z92.object({
17856
+ children: z92.custom().optional()
17849
17857
  });
17850
17858
  expectTypesMatch(
17851
17859
  true
17852
17860
  );
17853
17861
 
17854
17862
  // lib/components/diode.ts
17855
- import { z as z92 } from "zod";
17863
+ import { z as z93 } from "zod";
17856
17864
  var diodePins = lrPolarPins;
17857
- var diodeConnectionKeys = z92.enum([
17865
+ var diodeConnectionKeys = z93.enum([
17858
17866
  "anode",
17859
17867
  "cathode",
17860
17868
  "pin1",
@@ -17862,13 +17870,13 @@ var diodeConnectionKeys = z92.enum([
17862
17870
  "pos",
17863
17871
  "neg"
17864
17872
  ]);
17865
- var connectionTarget3 = z92.string().or(z92.array(z92.string()).readonly()).or(z92.array(z92.string()));
17866
- var connectionsProp2 = z92.record(diodeConnectionKeys, connectionTarget3);
17867
- var diodePinLabelsProp = z92.record(
17868
- z92.enum(diodePins),
17869
- schematicPinLabel.or(z92.array(schematicPinLabel).readonly()).or(z92.array(schematicPinLabel))
17873
+ var connectionTarget3 = z93.string().or(z93.array(z93.string()).readonly()).or(z93.array(z93.string()));
17874
+ var connectionsProp2 = z93.record(diodeConnectionKeys, connectionTarget3);
17875
+ var diodePinLabelsProp = z93.record(
17876
+ z93.enum(diodePins),
17877
+ schematicPinLabel.or(z93.array(schematicPinLabel).readonly()).or(z93.array(schematicPinLabel))
17870
17878
  );
17871
- var diodeVariant = z92.enum([
17879
+ var diodeVariant = z93.enum([
17872
17880
  "standard",
17873
17881
  "schottky",
17874
17882
  "zener",
@@ -17879,12 +17887,12 @@ var diodeVariant = z92.enum([
17879
17887
  var diodeProps = commonComponentProps.extend({
17880
17888
  connections: connectionsProp2.optional(),
17881
17889
  variant: diodeVariant.optional().default("standard"),
17882
- standard: z92.boolean().optional(),
17883
- schottky: z92.boolean().optional(),
17884
- zener: z92.boolean().optional(),
17885
- avalanche: z92.boolean().optional(),
17886
- photo: z92.boolean().optional(),
17887
- tvs: z92.boolean().optional(),
17890
+ standard: z93.boolean().optional(),
17891
+ schottky: z93.boolean().optional(),
17892
+ zener: z93.boolean().optional(),
17893
+ avalanche: z93.boolean().optional(),
17894
+ photo: z93.boolean().optional(),
17895
+ tvs: z93.boolean().optional(),
17888
17896
  schOrientation: schematicOrientation.optional(),
17889
17897
  pinLabels: diodePinLabelsProp.optional()
17890
17898
  }).superRefine((data, ctx) => {
@@ -17898,11 +17906,11 @@ var diodeProps = commonComponentProps.extend({
17898
17906
  ].filter(Boolean).length;
17899
17907
  if (enabledFlags > 1) {
17900
17908
  ctx.addIssue({
17901
- code: z92.ZodIssueCode.custom,
17909
+ code: z93.ZodIssueCode.custom,
17902
17910
  message: "Exactly one diode variant must be enabled",
17903
17911
  path: []
17904
17912
  });
17905
- return z92.INVALID;
17913
+ return z93.INVALID;
17906
17914
  }
17907
17915
  }).transform((data) => {
17908
17916
  const result = {
@@ -17948,34 +17956,34 @@ var diodeProps = commonComponentProps.extend({
17948
17956
  expectTypesMatch(true);
17949
17957
 
17950
17958
  // lib/components/led.ts
17951
- import { z as z93 } from "zod";
17959
+ import { z as z94 } from "zod";
17952
17960
  var ledProps = commonComponentProps.extend({
17953
- color: z93.string().optional(),
17954
- wavelength: z93.string().optional(),
17955
- schDisplayValue: z93.string().optional(),
17961
+ color: z94.string().optional(),
17962
+ wavelength: z94.string().optional(),
17963
+ schDisplayValue: z94.string().optional(),
17956
17964
  schOrientation: schematicOrientation.optional(),
17957
17965
  connections: createConnectionsProp(lrPolarPins).optional(),
17958
- laser: z93.boolean().optional()
17966
+ laser: z94.boolean().optional()
17959
17967
  });
17960
17968
  var ledPins = lrPolarPins;
17961
17969
 
17962
17970
  // lib/components/switch.ts
17963
17971
  import { ms as ms3, frequency as frequency4 } from "circuit-json";
17964
- import { z as z94 } from "zod";
17972
+ import { z as z95 } from "zod";
17965
17973
  var switchProps = commonComponentProps.extend({
17966
- type: z94.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17967
- isNormallyClosed: z94.boolean().optional().default(false),
17968
- spst: z94.boolean().optional(),
17969
- spdt: z94.boolean().optional(),
17970
- dpst: z94.boolean().optional(),
17971
- dpdt: z94.boolean().optional(),
17974
+ type: z95.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17975
+ isNormallyClosed: z95.boolean().optional().default(false),
17976
+ spst: z95.boolean().optional(),
17977
+ spdt: z95.boolean().optional(),
17978
+ dpst: z95.boolean().optional(),
17979
+ dpdt: z95.boolean().optional(),
17972
17980
  pinLabels: pinLabelsProp.optional(),
17973
17981
  simSwitchFrequency: frequency4.optional(),
17974
17982
  simCloseAt: ms3.optional(),
17975
17983
  simOpenAt: ms3.optional(),
17976
- simStartClosed: z94.boolean().optional(),
17977
- simStartOpen: z94.boolean().optional(),
17978
- connections: z94.custom().pipe(z94.record(z94.string(), connectionTarget)).optional()
17984
+ simStartClosed: z95.boolean().optional(),
17985
+ simStartOpen: z95.boolean().optional(),
17986
+ connections: z95.custom().pipe(z95.record(z95.string(), connectionTarget)).optional()
17979
17987
  }).transform((props) => {
17980
17988
  const updatedProps = { ...props };
17981
17989
  if (updatedProps.dpdt) {
@@ -18007,33 +18015,33 @@ expectTypesMatch(true);
18007
18015
 
18008
18016
  // lib/components/fabrication-note-text.ts
18009
18017
  import { length as length4 } from "circuit-json";
18010
- import { z as z95 } from "zod";
18018
+ import { z as z96 } from "zod";
18011
18019
  var fabricationNoteTextProps = pcbLayoutProps.extend({
18012
- text: z95.string(),
18013
- anchorAlignment: z95.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18014
- font: z95.enum(["tscircuit2024"]).optional(),
18020
+ text: z96.string(),
18021
+ anchorAlignment: z96.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18022
+ font: z96.enum(["tscircuit2024"]).optional(),
18015
18023
  fontSize: length4.optional(),
18016
- color: z95.string().optional()
18024
+ color: z96.string().optional()
18017
18025
  });
18018
18026
  expectTypesMatch(true);
18019
18027
 
18020
18028
  // lib/components/fabrication-note-rect.ts
18021
18029
  import { distance as distance21 } from "circuit-json";
18022
- import { z as z96 } from "zod";
18030
+ import { z as z97 } from "zod";
18023
18031
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18024
18032
  width: distance21,
18025
18033
  height: distance21,
18026
18034
  strokeWidth: distance21.optional(),
18027
- isFilled: z96.boolean().optional(),
18028
- hasStroke: z96.boolean().optional(),
18029
- isStrokeDashed: z96.boolean().optional(),
18030
- color: z96.string().optional(),
18035
+ isFilled: z97.boolean().optional(),
18036
+ hasStroke: z97.boolean().optional(),
18037
+ isStrokeDashed: z97.boolean().optional(),
18038
+ color: z97.string().optional(),
18031
18039
  cornerRadius: distance21.optional()
18032
18040
  });
18033
18041
 
18034
18042
  // lib/components/fabrication-note-path.ts
18035
18043
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
18036
- import { z as z97 } from "zod";
18044
+ import { z as z98 } from "zod";
18037
18045
  var fabricationNotePathProps = pcbLayoutProps.omit({
18038
18046
  pcbLeftEdgeX: true,
18039
18047
  pcbRightEdgeX: true,
@@ -18045,15 +18053,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
18045
18053
  pcbOffsetY: true,
18046
18054
  pcbRotation: true
18047
18055
  }).extend({
18048
- route: z97.array(route_hint_point3),
18056
+ route: z98.array(route_hint_point3),
18049
18057
  strokeWidth: length5.optional(),
18050
- color: z97.string().optional()
18058
+ color: z98.string().optional()
18051
18059
  });
18052
18060
 
18053
18061
  // lib/components/fabrication-note-dimension.ts
18054
18062
  import { distance as distance22, length as length6 } from "circuit-json";
18055
- import { z as z98 } from "zod";
18056
- var dimensionTarget = z98.union([z98.string(), point]);
18063
+ import { z as z99 } from "zod";
18064
+ var dimensionTarget = z99.union([z99.string(), point]);
18057
18065
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18058
18066
  pcbLeftEdgeX: true,
18059
18067
  pcbRightEdgeX: true,
@@ -18067,54 +18075,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18067
18075
  }).extend({
18068
18076
  from: dimensionTarget,
18069
18077
  to: dimensionTarget,
18070
- text: z98.string().optional(),
18078
+ text: z99.string().optional(),
18071
18079
  offset: distance22.optional(),
18072
- font: z98.enum(["tscircuit2024"]).optional(),
18080
+ font: z99.enum(["tscircuit2024"]).optional(),
18073
18081
  fontSize: length6.optional(),
18074
- color: z98.string().optional(),
18082
+ color: z99.string().optional(),
18075
18083
  arrowSize: distance22.optional(),
18076
- units: z98.enum(["in", "mm"]).optional(),
18077
- outerEdgeToEdge: z98.literal(true).optional(),
18078
- centerToCenter: z98.literal(true).optional(),
18079
- innerEdgeToEdge: z98.literal(true).optional()
18084
+ units: z99.enum(["in", "mm"]).optional(),
18085
+ outerEdgeToEdge: z99.literal(true).optional(),
18086
+ centerToCenter: z99.literal(true).optional(),
18087
+ innerEdgeToEdge: z99.literal(true).optional()
18080
18088
  });
18081
18089
  expectTypesMatch(true);
18082
18090
 
18083
18091
  // lib/components/pcb-trace.ts
18084
18092
  import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
18085
- import { z as z99 } from "zod";
18086
- var pcbTraceProps = z99.object({
18087
- layer: z99.string().optional(),
18093
+ import { z as z100 } from "zod";
18094
+ var pcbTraceProps = z100.object({
18095
+ layer: z100.string().optional(),
18088
18096
  thickness: distance23.optional(),
18089
- route: z99.array(route_hint_point4)
18097
+ route: z100.array(route_hint_point4)
18090
18098
  });
18091
18099
 
18092
18100
  // lib/components/via.ts
18093
18101
  import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
18094
- import { z as z100 } from "zod";
18102
+ import { z as z101 } from "zod";
18095
18103
  var viaProps = commonLayoutProps.extend({
18096
- name: z100.string().optional(),
18104
+ name: z101.string().optional(),
18097
18105
  fromLayer: layer_ref6.optional(),
18098
18106
  toLayer: layer_ref6.optional(),
18099
18107
  holeDiameter: distance24.optional(),
18100
18108
  outerDiameter: distance24.optional(),
18101
- layers: z100.array(layer_ref6).optional(),
18102
- connectsTo: z100.string().or(z100.array(z100.string())).optional(),
18103
- netIsAssignable: z100.boolean().optional()
18109
+ layers: z101.array(layer_ref6).optional(),
18110
+ connectsTo: z101.string().or(z101.array(z101.string())).optional(),
18111
+ netIsAssignable: z101.boolean().optional()
18104
18112
  });
18105
18113
  expectTypesMatch(true);
18106
18114
 
18107
18115
  // lib/components/testpoint.ts
18108
18116
  import { distance as distance25 } from "circuit-json";
18109
- import { z as z101 } from "zod";
18117
+ import { z as z102 } from "zod";
18110
18118
  var testpointPins = ["pin1"];
18111
- var testpointConnectionsProp = z101.object({
18119
+ var testpointConnectionsProp = z102.object({
18112
18120
  pin1: connectionTarget
18113
18121
  }).strict();
18114
18122
  var testpointProps = commonComponentProps.extend({
18115
18123
  connections: testpointConnectionsProp.optional(),
18116
- footprintVariant: z101.enum(["pad", "through_hole"]).optional(),
18117
- padShape: z101.enum(["rect", "circle"]).optional().default("circle"),
18124
+ footprintVariant: z102.enum(["pad", "through_hole"]).optional(),
18125
+ padShape: z102.enum(["rect", "circle"]).optional().default("circle"),
18118
18126
  padDiameter: distance25.optional(),
18119
18127
  holeDiameter: distance25.optional(),
18120
18128
  width: distance25.optional(),
@@ -18126,45 +18134,45 @@ var testpointProps = commonComponentProps.extend({
18126
18134
  expectTypesMatch(true);
18127
18135
 
18128
18136
  // lib/components/breakoutpoint.ts
18129
- import { z as z102 } from "zod";
18137
+ import { z as z103 } from "zod";
18130
18138
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
18131
- connection: z102.string()
18139
+ connection: z103.string()
18132
18140
  });
18133
18141
  expectTypesMatch(true);
18134
18142
 
18135
18143
  // lib/components/pcb-keepout.ts
18136
18144
  import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
18137
- import { z as z103 } from "zod";
18138
- var pcbKeepoutProps = z103.union([
18145
+ import { z as z104 } from "zod";
18146
+ var pcbKeepoutProps = z104.union([
18139
18147
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
18140
- shape: z103.literal("circle"),
18148
+ shape: z104.literal("circle"),
18141
18149
  radius: distance26,
18142
- layers: z103.array(layer_ref7).optional()
18150
+ layers: z104.array(layer_ref7).optional()
18143
18151
  }),
18144
18152
  pcbLayoutProps.extend({
18145
- shape: z103.literal("rect"),
18153
+ shape: z104.literal("rect"),
18146
18154
  width: distance26,
18147
18155
  height: distance26,
18148
- layers: z103.array(layer_ref7).optional()
18156
+ layers: z104.array(layer_ref7).optional()
18149
18157
  })
18150
18158
  ]);
18151
18159
 
18152
18160
  // lib/components/courtyard-rect.ts
18153
18161
  import { distance as distance27 } from "circuit-json";
18154
- import { z as z104 } from "zod";
18162
+ import { z as z105 } from "zod";
18155
18163
  var courtyardRectProps = pcbLayoutProps.extend({
18156
18164
  width: distance27,
18157
18165
  height: distance27,
18158
18166
  strokeWidth: distance27.optional(),
18159
- isFilled: z104.boolean().optional(),
18160
- hasStroke: z104.boolean().optional(),
18161
- isStrokeDashed: z104.boolean().optional(),
18162
- color: z104.string().optional()
18167
+ isFilled: z105.boolean().optional(),
18168
+ hasStroke: z105.boolean().optional(),
18169
+ isStrokeDashed: z105.boolean().optional(),
18170
+ color: z105.string().optional()
18163
18171
  });
18164
18172
 
18165
18173
  // lib/components/courtyard-outline.ts
18166
18174
  import { length as length7 } from "circuit-json";
18167
- import { z as z105 } from "zod";
18175
+ import { z as z106 } from "zod";
18168
18176
  var courtyardOutlineProps = pcbLayoutProps.omit({
18169
18177
  pcbLeftEdgeX: true,
18170
18178
  pcbRightEdgeX: true,
@@ -18176,11 +18184,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
18176
18184
  pcbOffsetY: true,
18177
18185
  pcbRotation: true
18178
18186
  }).extend({
18179
- outline: z105.array(point),
18187
+ outline: z106.array(point),
18180
18188
  strokeWidth: length7.optional(),
18181
- isClosed: z105.boolean().optional(),
18182
- isStrokeDashed: z105.boolean().optional(),
18183
- color: z105.string().optional()
18189
+ isClosed: z106.boolean().optional(),
18190
+ isStrokeDashed: z106.boolean().optional(),
18191
+ color: z106.string().optional()
18184
18192
  });
18185
18193
 
18186
18194
  // lib/components/courtyard-circle.ts
@@ -18200,35 +18208,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18200
18208
  });
18201
18209
 
18202
18210
  // lib/components/copper-pour.ts
18203
- import { z as z108 } from "zod";
18211
+ import { z as z109 } from "zod";
18204
18212
  import { layer_ref as layer_ref8 } from "circuit-json";
18205
- var copperPourProps = z108.object({
18206
- name: z108.string().optional(),
18213
+ var copperPourProps = z109.object({
18214
+ name: z109.string().optional(),
18207
18215
  layer: layer_ref8,
18208
- connectsTo: z108.string(),
18209
- unbroken: z108.boolean().optional(),
18216
+ connectsTo: z109.string(),
18217
+ unbroken: z109.boolean().optional(),
18210
18218
  padMargin: distance.optional(),
18211
18219
  traceMargin: distance.optional(),
18212
18220
  clearance: distance.optional(),
18213
18221
  boardEdgeMargin: distance.optional(),
18214
18222
  cutoutMargin: distance.optional(),
18215
- outline: z108.array(point).optional(),
18216
- coveredWithSolderMask: z108.boolean().optional().default(true)
18223
+ outline: z109.array(point).optional(),
18224
+ coveredWithSolderMask: z109.boolean().optional().default(true)
18217
18225
  });
18218
18226
  expectTypesMatch(true);
18219
18227
 
18220
18228
  // lib/components/cadassembly.ts
18221
18229
  import { layer_ref as layer_ref9 } from "circuit-json";
18222
- import { z as z109 } from "zod";
18223
- var cadassemblyProps = z109.object({
18230
+ import { z as z110 } from "zod";
18231
+ var cadassemblyProps = z110.object({
18224
18232
  originalLayer: layer_ref9.default("top").optional(),
18225
- children: z109.any().optional()
18233
+ children: z110.any().optional()
18226
18234
  });
18227
18235
  expectTypesMatch(true);
18228
18236
 
18229
18237
  // lib/components/cadmodel.ts
18230
- import { z as z110 } from "zod";
18231
- var pcbPosition = z110.object({
18238
+ import { z as z111 } from "zod";
18239
+ var pcbPosition = z111.object({
18232
18240
  pcbX: pcbCoordinate.optional(),
18233
18241
  pcbY: pcbCoordinate.optional(),
18234
18242
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18245,7 +18253,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18245
18253
  });
18246
18254
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18247
18255
  expectTypesMatch(true);
18248
- var cadmodelProps = z110.union([z110.null(), url, cadModelObject]);
18256
+ var cadmodelProps = z111.union([z111.null(), url, cadModelObject]);
18249
18257
 
18250
18258
  // lib/components/power-source.ts
18251
18259
  import { voltage as voltage5 } from "circuit-json";
@@ -18255,9 +18263,9 @@ var powerSourceProps = commonComponentProps.extend({
18255
18263
 
18256
18264
  // lib/components/voltagesource.ts
18257
18265
  import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
18258
- import { z as z111 } from "zod";
18266
+ import { z as z112 } from "zod";
18259
18267
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18260
- var percentage = z111.union([z111.string(), z111.number()]).transform((val) => {
18268
+ var percentage = z112.union([z112.string(), z112.number()]).transform((val) => {
18261
18269
  if (typeof val === "string") {
18262
18270
  if (val.endsWith("%")) {
18263
18271
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18266,13 +18274,13 @@ var percentage = z111.union([z111.string(), z111.number()]).transform((val) => {
18266
18274
  }
18267
18275
  return val;
18268
18276
  }).pipe(
18269
- z111.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18277
+ z112.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18270
18278
  );
18271
18279
  var voltageSourceProps = commonComponentProps.extend({
18272
18280
  voltage: voltage6.optional(),
18273
18281
  frequency: frequency5.optional(),
18274
18282
  peakToPeakVoltage: voltage6.optional(),
18275
- waveShape: z111.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18283
+ waveShape: z112.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18276
18284
  phase: rotation5.optional(),
18277
18285
  dutyCycle: percentage.optional(),
18278
18286
  pulseDelay: ms4.optional(),
@@ -18289,9 +18297,9 @@ expectTypesMatch(true);
18289
18297
 
18290
18298
  // lib/components/currentsource.ts
18291
18299
  import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
18292
- import { z as z112 } from "zod";
18300
+ import { z as z113 } from "zod";
18293
18301
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18294
- var percentage2 = z112.union([z112.string(), z112.number()]).transform((val) => {
18302
+ var percentage2 = z113.union([z113.string(), z113.number()]).transform((val) => {
18295
18303
  if (typeof val === "string") {
18296
18304
  if (val.endsWith("%")) {
18297
18305
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18300,13 +18308,13 @@ var percentage2 = z112.union([z112.string(), z112.number()]).transform((val) =>
18300
18308
  }
18301
18309
  return val;
18302
18310
  }).pipe(
18303
- z112.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18311
+ z113.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18304
18312
  );
18305
18313
  var currentSourceProps = commonComponentProps.extend({
18306
18314
  current: current3.optional(),
18307
18315
  frequency: frequency6.optional(),
18308
18316
  peakToPeakCurrent: current3.optional(),
18309
- waveShape: z112.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18317
+ waveShape: z113.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18310
18318
  phase: rotation6.optional(),
18311
18319
  dutyCycle: percentage2.optional(),
18312
18320
  acMagnitude: current3.optional(),
@@ -18317,21 +18325,21 @@ var currentSourcePins = lrPolarPins;
18317
18325
  expectTypesMatch(true);
18318
18326
 
18319
18327
  // lib/components/voltageprobe.ts
18320
- import { z as z113 } from "zod";
18328
+ import { z as z114 } from "zod";
18321
18329
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18322
- name: z113.string().optional(),
18323
- connectsTo: z113.string(),
18324
- referenceTo: z113.string().optional(),
18325
- color: z113.string().optional(),
18326
- graphDisplayName: z113.string().optional(),
18327
- graphCenter: z113.number().optional(),
18328
- graphVerticalOffset: z113.number().or(z113.string()).optional(),
18329
- graphVoltagePerDiv: z113.number().or(z113.string()).optional()
18330
+ name: z114.string().optional(),
18331
+ connectsTo: z114.string(),
18332
+ referenceTo: z114.string().optional(),
18333
+ color: z114.string().optional(),
18334
+ graphDisplayName: z114.string().optional(),
18335
+ graphCenter: z114.number().optional(),
18336
+ graphVerticalOffset: z114.number().or(z114.string()).optional(),
18337
+ graphVoltagePerDiv: z114.number().or(z114.string()).optional()
18330
18338
  });
18331
18339
  expectTypesMatch(true);
18332
18340
 
18333
18341
  // lib/components/ammeter.ts
18334
- import { z as z114 } from "zod";
18342
+ import { z as z115 } from "zod";
18335
18343
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18336
18344
  var hasAmmeterConnectionPair = (connections) => {
18337
18345
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18341,63 +18349,63 @@ var ammeterProps = commonComponentProps.extend({
18341
18349
  hasAmmeterConnectionPair,
18342
18350
  "Ammeter connections must include either pos/neg or pin1/pin2"
18343
18351
  ),
18344
- color: z114.string().optional(),
18345
- graphDisplayName: z114.string().optional(),
18346
- graphCenter: z114.number().optional(),
18347
- graphVerticalOffset: z114.number().or(z114.string()).optional(),
18348
- graphCurrentPerDiv: z114.number().or(z114.string()).optional()
18352
+ color: z115.string().optional(),
18353
+ graphDisplayName: z115.string().optional(),
18354
+ graphCenter: z115.number().optional(),
18355
+ graphVerticalOffset: z115.number().or(z115.string()).optional(),
18356
+ graphCurrentPerDiv: z115.number().or(z115.string()).optional()
18349
18357
  });
18350
18358
  var ammeterPins = ammeterPinLabels;
18351
18359
  expectTypesMatch(true);
18352
18360
 
18353
18361
  // lib/components/schematic-arc.ts
18354
18362
  import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
18355
- import { z as z115 } from "zod";
18356
- var schematicArcProps = z115.object({
18363
+ import { z as z116 } from "zod";
18364
+ var schematicArcProps = z116.object({
18357
18365
  center: point5,
18358
18366
  radius: distance30,
18359
18367
  startAngleDegrees: rotation7,
18360
18368
  endAngleDegrees: rotation7,
18361
- direction: z115.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18369
+ direction: z116.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18362
18370
  strokeWidth: distance30.optional(),
18363
- color: z115.string().optional(),
18364
- isDashed: z115.boolean().optional().default(false)
18371
+ color: z116.string().optional(),
18372
+ isDashed: z116.boolean().optional().default(false)
18365
18373
  });
18366
18374
  expectTypesMatch(true);
18367
18375
 
18368
18376
  // lib/components/toolingrail.ts
18369
- import { z as z116 } from "zod";
18370
- var toolingrailProps = z116.object({
18371
- children: z116.any().optional()
18377
+ import { z as z117 } from "zod";
18378
+ var toolingrailProps = z117.object({
18379
+ children: z117.any().optional()
18372
18380
  });
18373
18381
  expectTypesMatch(true);
18374
18382
 
18375
18383
  // lib/components/schematic-box.ts
18376
18384
  import { distance as distance31 } from "circuit-json";
18377
- import { z as z117 } from "zod";
18378
- var schematicBoxProps = z117.object({
18379
- name: z117.string().optional(),
18380
- chipRef: z117.string().optional(),
18385
+ import { z as z118 } from "zod";
18386
+ var schematicBoxProps = z118.object({
18387
+ name: z118.string().optional(),
18388
+ chipRef: z118.string().optional(),
18381
18389
  pinLabels: pinLabelsProp.optional(),
18382
18390
  schPinArrangement: schematicPinArrangement.optional(),
18383
18391
  schX: distance31.optional(),
18384
18392
  schY: distance31.optional(),
18385
- schSectionName: z117.string().optional(),
18386
- schSheetName: z117.string().optional(),
18393
+ schSectionName: z118.string().optional(),
18394
+ schSheetName: z118.string().optional(),
18387
18395
  width: distance31.optional(),
18388
18396
  height: distance31.optional(),
18389
- overlay: z117.array(z117.string()).optional(),
18397
+ overlay: z118.array(z118.string()).optional(),
18390
18398
  padding: distance31.optional(),
18391
18399
  paddingLeft: distance31.optional(),
18392
18400
  paddingRight: distance31.optional(),
18393
18401
  paddingTop: distance31.optional(),
18394
18402
  paddingBottom: distance31.optional(),
18395
- title: z117.string().optional(),
18403
+ title: z118.string().optional(),
18396
18404
  titleAlignment: ninePointAnchor.default("top_left"),
18397
- titleColor: z117.string().optional(),
18405
+ titleColor: z118.string().optional(),
18398
18406
  titleFontSize: distance31.optional(),
18399
- titleInside: z117.boolean().default(false),
18400
- strokeStyle: z117.enum(["solid", "dashed"]).default("solid")
18407
+ titleInside: z118.boolean().default(false),
18408
+ strokeStyle: z118.enum(["solid", "dashed"]).default("solid")
18401
18409
  }).refine(
18402
18410
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18403
18411
  {
@@ -18413,21 +18421,21 @@ expectTypesMatch(true);
18413
18421
 
18414
18422
  // lib/components/schematic-symbol.ts
18415
18423
  import { rotation as rotation8 } from "circuit-json";
18416
- import { z as z118 } from "zod";
18417
- var schematicSymbolConnections = z118.custom().pipe(z118.record(z118.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18424
+ import { z as z119 } from "zod";
18425
+ var schematicSymbolConnections = z119.custom().pipe(z119.record(z119.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18418
18426
  message: "connections must map at least one schematic symbol port"
18419
18427
  });
18420
- var schematicSymbolProps = z118.object({
18421
- name: z118.string().min(1),
18422
- displayName: z118.string().optional(),
18423
- chipRef: z118.string().min(1).optional(),
18424
- symbolName: z118.string().min(1),
18428
+ var schematicSymbolProps = z119.object({
18429
+ name: z119.string().min(1),
18430
+ displayName: z119.string().optional(),
18431
+ chipRef: z119.string().min(1).optional(),
18432
+ symbolName: z119.string().min(1),
18425
18433
  connections: schematicSymbolConnections.optional(),
18426
18434
  schX: distance.optional(),
18427
18435
  schY: distance.optional(),
18428
18436
  schRotation: rotation8.optional(),
18429
- schSectionName: z118.string().optional(),
18430
- schSheetName: z118.string().optional()
18437
+ schSectionName: z119.string().optional(),
18438
+ schSheetName: z119.string().optional()
18431
18439
  });
18432
18440
  expectTypesMatch(
18433
18441
  true
@@ -18435,15 +18443,15 @@ expectTypesMatch(
18435
18443
 
18436
18444
  // lib/components/schematic-circle.ts
18437
18445
  import { distance as distance32, point as point6 } from "circuit-json";
18438
- import { z as z119 } from "zod";
18439
- var schematicCircleProps = z119.object({
18446
+ import { z as z120 } from "zod";
18447
+ var schematicCircleProps = z120.object({
18440
18448
  center: point6,
18441
18449
  radius: distance32,
18442
18450
  strokeWidth: distance32.optional(),
18443
- color: z119.string().optional(),
18444
- isFilled: z119.boolean().optional().default(false),
18445
- fillColor: z119.string().optional(),
18446
- isDashed: z119.boolean().optional().default(false)
18451
+ color: z120.string().optional(),
18452
+ isFilled: z120.boolean().optional().default(false),
18453
+ fillColor: z120.string().optional(),
18454
+ isDashed: z120.boolean().optional().default(false)
18447
18455
  });
18448
18456
  expectTypesMatch(
18449
18457
  true
@@ -18451,32 +18459,32 @@ expectTypesMatch(
18451
18459
 
18452
18460
  // lib/components/schematic-rect.ts
18453
18461
  import { distance as distance33, rotation as rotation9 } from "circuit-json";
18454
- import { z as z120 } from "zod";
18455
- var schematicRectProps = z120.object({
18462
+ import { z as z121 } from "zod";
18463
+ var schematicRectProps = z121.object({
18456
18464
  schX: distance33.optional(),
18457
18465
  schY: distance33.optional(),
18458
18466
  width: distance33,
18459
18467
  height: distance33,
18460
18468
  rotation: rotation9.default(0),
18461
18469
  strokeWidth: distance33.optional(),
18462
- color: z120.string().optional(),
18463
- isFilled: z120.boolean().optional().default(false),
18464
- fillColor: z120.string().optional(),
18465
- isDashed: z120.boolean().optional().default(false)
18470
+ color: z121.string().optional(),
18471
+ isFilled: z121.boolean().optional().default(false),
18472
+ fillColor: z121.string().optional(),
18473
+ isDashed: z121.boolean().optional().default(false)
18466
18474
  });
18467
18475
  expectTypesMatch(true);
18468
18476
 
18469
18477
  // lib/components/schematic-line.ts
18470
18478
  import { distance as distance34 } from "circuit-json";
18471
- import { z as z121 } from "zod";
18472
- var schematicLineProps = z121.object({
18479
+ import { z as z122 } from "zod";
18480
+ var schematicLineProps = z122.object({
18473
18481
  x1: distance34,
18474
18482
  y1: distance34,
18475
18483
  x2: distance34,
18476
18484
  y2: distance34,
18477
18485
  strokeWidth: distance34.optional(),
18478
- color: z121.string().optional(),
18479
- isDashed: z121.boolean().optional().default(false),
18486
+ color: z122.string().optional(),
18487
+ isDashed: z122.boolean().optional().default(false),
18480
18488
  dashLength: distance34.optional(),
18481
18489
  dashGap: distance34.optional()
18482
18490
  });
@@ -18484,11 +18492,11 @@ expectTypesMatch(true);
18484
18492
 
18485
18493
  // lib/components/schematic-text.ts
18486
18494
  import { distance as distance35, rotation as rotation10 } from "circuit-json";
18487
- import { z as z123 } from "zod";
18495
+ import { z as z124 } from "zod";
18488
18496
 
18489
18497
  // lib/common/fivePointAnchor.ts
18490
- import { z as z122 } from "zod";
18491
- var fivePointAnchor = z122.enum([
18498
+ import { z as z123 } from "zod";
18499
+ var fivePointAnchor = z123.enum([
18492
18500
  "center",
18493
18501
  "left",
18494
18502
  "right",
@@ -18497,39 +18505,39 @@ var fivePointAnchor = z122.enum([
18497
18505
  ]);
18498
18506
 
18499
18507
  // lib/components/schematic-text.ts
18500
- var schematicTextProps = z123.object({
18508
+ var schematicTextProps = z124.object({
18501
18509
  schX: distance35.optional(),
18502
18510
  schY: distance35.optional(),
18503
- text: z123.string(),
18504
- fontSize: z123.number().default(1),
18505
- anchor: z123.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18506
- color: z123.string().default("#000000"),
18511
+ text: z124.string(),
18512
+ fontSize: z124.number().default(1),
18513
+ anchor: z124.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18514
+ color: z124.string().default("#000000"),
18507
18515
  schRotation: rotation10.default(0)
18508
18516
  });
18509
18517
  expectTypesMatch(true);
18510
18518
 
18511
18519
  // lib/components/schematic-path.ts
18512
18520
  import { distance as distance36, point as point7 } from "circuit-json";
18513
- import { z as z124 } from "zod";
18514
- var schematicPathProps = z124.object({
18515
- points: z124.array(point7).optional(),
18516
- svgPath: z124.string().optional(),
18521
+ import { z as z125 } from "zod";
18522
+ var schematicPathProps = z125.object({
18523
+ points: z125.array(point7).optional(),
18524
+ svgPath: z125.string().optional(),
18517
18525
  strokeWidth: distance36.optional(),
18518
- strokeColor: z124.string().optional(),
18526
+ strokeColor: z125.string().optional(),
18519
18527
  dashLength: distance36.optional(),
18520
18528
  dashGap: distance36.optional(),
18521
- isFilled: z124.boolean().optional().default(false),
18522
- fillColor: z124.string().optional()
18529
+ isFilled: z125.boolean().optional().default(false),
18530
+ fillColor: z125.string().optional()
18523
18531
  });
18524
18532
  expectTypesMatch(true);
18525
18533
 
18526
18534
  // lib/components/schematic-table.ts
18527
18535
  import { distance as distance37 } from "circuit-json";
18528
- import { z as z125 } from "zod";
18529
- var schematicTableProps = z125.object({
18536
+ import { z as z126 } from "zod";
18537
+ var schematicTableProps = z126.object({
18530
18538
  schX: distance37.optional(),
18531
18539
  schY: distance37.optional(),
18532
- children: z125.any().optional(),
18540
+ children: z126.any().optional(),
18533
18541
  cellPadding: distance37.optional(),
18534
18542
  borderWidth: distance37.optional(),
18535
18543
  anchor: ninePointAnchor.optional(),
@@ -18539,34 +18547,34 @@ expectTypesMatch(true);
18539
18547
 
18540
18548
  // lib/components/schematic-row.ts
18541
18549
  import { distance as distance38 } from "circuit-json";
18542
- import { z as z126 } from "zod";
18543
- var schematicRowProps = z126.object({
18544
- children: z126.any().optional(),
18550
+ import { z as z127 } from "zod";
18551
+ var schematicRowProps = z127.object({
18552
+ children: z127.any().optional(),
18545
18553
  height: distance38.optional()
18546
18554
  });
18547
18555
  expectTypesMatch(true);
18548
18556
 
18549
18557
  // lib/components/schematic-cell.ts
18550
18558
  import { distance as distance39 } from "circuit-json";
18551
- import { z as z127 } from "zod";
18552
- var schematicCellProps = z127.object({
18553
- children: z127.string().optional(),
18554
- horizontalAlign: z127.enum(["left", "center", "right"]).optional(),
18555
- verticalAlign: z127.enum(["top", "middle", "bottom"]).optional(),
18559
+ import { z as z128 } from "zod";
18560
+ var schematicCellProps = z128.object({
18561
+ children: z128.string().optional(),
18562
+ horizontalAlign: z128.enum(["left", "center", "right"]).optional(),
18563
+ verticalAlign: z128.enum(["top", "middle", "bottom"]).optional(),
18556
18564
  fontSize: distance39.optional(),
18557
- rowSpan: z127.number().optional(),
18558
- colSpan: z127.number().optional(),
18565
+ rowSpan: z128.number().optional(),
18566
+ colSpan: z128.number().optional(),
18559
18567
  width: distance39.optional(),
18560
- text: z127.string().optional()
18568
+ text: z128.string().optional()
18561
18569
  });
18562
18570
  expectTypesMatch(true);
18563
18571
 
18564
18572
  // lib/components/schematic-section.ts
18565
18573
  import { distance as distance40 } from "circuit-json";
18566
- import { z as z128 } from "zod";
18567
- var schematicSectionProps = z128.object({
18568
- displayName: z128.string().optional(),
18569
- name: z128.string(),
18574
+ import { z as z129 } from "zod";
18575
+ var schematicSectionProps = z129.object({
18576
+ displayName: z129.string().optional(),
18577
+ name: z129.string(),
18570
18578
  sectionTitleFontSize: distance40.optional()
18571
18579
  });
18572
18580
  expectTypesMatch(
@@ -18574,51 +18582,51 @@ expectTypesMatch(
18574
18582
  );
18575
18583
 
18576
18584
  // lib/components/schematic-sheet.ts
18577
- import { z as z129 } from "zod";
18578
- var schematicSheetProps = z129.object({
18579
- name: z129.string(),
18580
- displayName: z129.string(),
18581
- sheetIndex: z129.number().optional(),
18582
- children: z129.any().optional()
18585
+ import { z as z130 } from "zod";
18586
+ var schematicSheetProps = z130.object({
18587
+ name: z130.string(),
18588
+ displayName: z130.string(),
18589
+ sheetIndex: z130.number().optional(),
18590
+ children: z130.any().optional()
18583
18591
  });
18584
18592
  expectTypesMatch(true);
18585
18593
 
18586
18594
  // lib/components/copper-text.ts
18587
18595
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18588
- import { z as z130 } from "zod";
18596
+ import { z as z131 } from "zod";
18589
18597
  var copperTextProps = pcbLayoutProps.extend({
18590
- text: z130.string(),
18598
+ text: z131.string(),
18591
18599
  anchorAlignment: ninePointAnchor.default("center"),
18592
- font: z130.enum(["tscircuit2024"]).optional(),
18600
+ font: z131.enum(["tscircuit2024"]).optional(),
18593
18601
  fontSize: length8.optional(),
18594
- layers: z130.array(layer_ref10).optional(),
18595
- knockout: z130.boolean().optional(),
18596
- mirrored: z130.boolean().optional()
18602
+ layers: z131.array(layer_ref10).optional(),
18603
+ knockout: z131.boolean().optional(),
18604
+ mirrored: z131.boolean().optional()
18597
18605
  });
18598
18606
 
18599
18607
  // lib/components/silkscreen-text.ts
18600
18608
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18601
- import { z as z131 } from "zod";
18609
+ import { z as z132 } from "zod";
18602
18610
  var silkscreenTextProps = pcbLayoutProps.extend({
18603
- text: z131.string(),
18611
+ text: z132.string(),
18604
18612
  anchorAlignment: ninePointAnchor.default("center"),
18605
- font: z131.enum(["tscircuit2024"]).optional(),
18613
+ font: z132.enum(["tscircuit2024"]).optional(),
18606
18614
  fontSize: length9.optional(),
18607
18615
  /**
18608
18616
  * If true, text will knock out underlying silkscreen
18609
18617
  */
18610
- isKnockout: z131.boolean().optional(),
18618
+ isKnockout: z132.boolean().optional(),
18611
18619
  knockoutPadding: length9.optional(),
18612
18620
  knockoutPaddingLeft: length9.optional(),
18613
18621
  knockoutPaddingRight: length9.optional(),
18614
18622
  knockoutPaddingTop: length9.optional(),
18615
18623
  knockoutPaddingBottom: length9.optional(),
18616
- layers: z131.array(layer_ref11).optional()
18624
+ layers: z132.array(layer_ref11).optional()
18617
18625
  });
18618
18626
 
18619
18627
  // lib/components/silkscreen-path.ts
18620
18628
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18621
- import { z as z132 } from "zod";
18629
+ import { z as z133 } from "zod";
18622
18630
  var silkscreenPathProps = pcbLayoutProps.omit({
18623
18631
  pcbLeftEdgeX: true,
18624
18632
  pcbRightEdgeX: true,
@@ -18630,7 +18638,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18630
18638
  pcbOffsetY: true,
18631
18639
  pcbRotation: true
18632
18640
  }).extend({
18633
- route: z132.array(route_hint_point5),
18641
+ route: z133.array(route_hint_point5),
18634
18642
  strokeWidth: length10.optional()
18635
18643
  });
18636
18644
 
@@ -18652,10 +18660,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18652
18660
 
18653
18661
  // lib/components/silkscreen-rect.ts
18654
18662
  import { distance as distance42 } from "circuit-json";
18655
- import { z as z133 } from "zod";
18663
+ import { z as z134 } from "zod";
18656
18664
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18657
- filled: z133.boolean().default(true).optional(),
18658
- stroke: z133.enum(["dashed", "solid", "none"]).optional(),
18665
+ filled: z134.boolean().default(true).optional(),
18666
+ stroke: z134.enum(["dashed", "solid", "none"]).optional(),
18659
18667
  strokeWidth: distance42.optional(),
18660
18668
  width: distance42,
18661
18669
  height: distance42,
@@ -18664,10 +18672,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18664
18672
 
18665
18673
  // lib/components/silkscreen-circle.ts
18666
18674
  import { distance as distance43 } from "circuit-json";
18667
- import { z as z134 } from "zod";
18675
+ import { z as z135 } from "zod";
18668
18676
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18669
- isFilled: z134.boolean().optional(),
18670
- isOutline: z134.boolean().optional(),
18677
+ isFilled: z135.boolean().optional(),
18678
+ isOutline: z135.boolean().optional(),
18671
18679
  strokeWidth: distance43.optional(),
18672
18680
  radius: distance43
18673
18681
  });
@@ -18685,63 +18693,63 @@ expectTypesMatch(true);
18685
18693
 
18686
18694
  // lib/components/trace-hint.ts
18687
18695
  import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18688
- import { z as z136 } from "zod";
18689
- var routeHintPointProps = z136.object({
18696
+ import { z as z137 } from "zod";
18697
+ var routeHintPointProps = z137.object({
18690
18698
  x: distance44,
18691
18699
  y: distance44,
18692
- via: z136.boolean().optional(),
18700
+ via: z137.boolean().optional(),
18693
18701
  toLayer: layer_ref12.optional()
18694
18702
  });
18695
- var traceHintProps = z136.object({
18696
- for: z136.string().optional().describe(
18703
+ var traceHintProps = z137.object({
18704
+ for: z137.string().optional().describe(
18697
18705
  "Selector for the port you're targeting, not required if you're inside a trace"
18698
18706
  ),
18699
- order: z136.number().optional(),
18707
+ order: z137.number().optional(),
18700
18708
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18701
- offsets: z136.array(route_hint_point6).or(z136.array(routeHintPointProps)).optional(),
18702
- traceWidth: z136.number().optional()
18709
+ offsets: z137.array(route_hint_point6).or(z137.array(routeHintPointProps)).optional(),
18710
+ traceWidth: z137.number().optional()
18703
18711
  });
18704
18712
 
18705
18713
  // lib/components/port.ts
18706
- import { z as z137 } from "zod";
18714
+ import { z as z138 } from "zod";
18707
18715
  var portProps = commonLayoutProps.extend({
18708
- name: z137.string().optional(),
18709
- pinNumber: z137.number().optional(),
18710
- schStemLength: z137.number().optional(),
18711
- aliases: z137.array(z137.string()).optional(),
18712
- layer: z137.string().optional(),
18713
- layers: z137.array(z137.string()).optional(),
18714
- schX: z137.number().optional(),
18715
- schY: z137.number().optional(),
18716
+ name: z138.string().optional(),
18717
+ pinNumber: z138.number().optional(),
18718
+ schStemLength: z138.number().optional(),
18719
+ aliases: z138.array(z138.string()).optional(),
18720
+ layer: z138.string().optional(),
18721
+ layers: z138.array(z138.string()).optional(),
18722
+ schX: z138.number().optional(),
18723
+ schY: z138.number().optional(),
18716
18724
  direction: direction.optional(),
18717
- connectsTo: z137.string().or(z137.array(z137.string())).optional(),
18725
+ connectsTo: z138.string().or(z138.array(z138.string())).optional(),
18718
18726
  kicadPinMetadata: kicadPinMetadata.optional(),
18719
- hasInversionCircle: z137.boolean().optional()
18727
+ hasInversionCircle: z138.boolean().optional()
18720
18728
  });
18721
18729
 
18722
18730
  // lib/components/pcb-note-text.ts
18723
18731
  import { length as length11 } from "circuit-json";
18724
- import { z as z138 } from "zod";
18732
+ import { z as z139 } from "zod";
18725
18733
  var pcbNoteTextProps = pcbLayoutProps.extend({
18726
- text: z138.string(),
18727
- anchorAlignment: z138.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18728
- font: z138.enum(["tscircuit2024"]).optional(),
18734
+ text: z139.string(),
18735
+ anchorAlignment: z139.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18736
+ font: z139.enum(["tscircuit2024"]).optional(),
18729
18737
  fontSize: length11.optional(),
18730
- color: z138.string().optional()
18738
+ color: z139.string().optional()
18731
18739
  });
18732
18740
  expectTypesMatch(true);
18733
18741
 
18734
18742
  // lib/components/pcb-note-rect.ts
18735
18743
  import { distance as distance45 } from "circuit-json";
18736
- import { z as z139 } from "zod";
18744
+ import { z as z140 } from "zod";
18737
18745
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18738
18746
  width: distance45,
18739
18747
  height: distance45,
18740
18748
  strokeWidth: distance45.optional(),
18741
- isFilled: z139.boolean().optional(),
18742
- hasStroke: z139.boolean().optional(),
18743
- isStrokeDashed: z139.boolean().optional(),
18744
- color: z139.string().optional(),
18749
+ isFilled: z140.boolean().optional(),
18750
+ hasStroke: z140.boolean().optional(),
18751
+ isStrokeDashed: z140.boolean().optional(),
18752
+ color: z140.string().optional(),
18745
18753
  cornerRadius: distance45.optional()
18746
18754
  });
18747
18755
  expectTypesMatch(true);
@@ -18751,7 +18759,7 @@ import {
18751
18759
  length as length12,
18752
18760
  route_hint_point as route_hint_point7
18753
18761
  } from "circuit-json";
18754
- import { z as z140 } from "zod";
18762
+ import { z as z141 } from "zod";
18755
18763
  var pcbNotePathProps = pcbLayoutProps.omit({
18756
18764
  pcbLeftEdgeX: true,
18757
18765
  pcbRightEdgeX: true,
@@ -18763,15 +18771,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18763
18771
  pcbOffsetY: true,
18764
18772
  pcbRotation: true
18765
18773
  }).extend({
18766
- route: z140.array(route_hint_point7),
18774
+ route: z141.array(route_hint_point7),
18767
18775
  strokeWidth: length12.optional(),
18768
- color: z140.string().optional()
18776
+ color: z141.string().optional()
18769
18777
  });
18770
18778
  expectTypesMatch(true);
18771
18779
 
18772
18780
  // lib/components/pcb-note-line.ts
18773
18781
  import { distance as distance46 } from "circuit-json";
18774
- import { z as z141 } from "zod";
18782
+ import { z as z142 } from "zod";
18775
18783
  var pcbNoteLineProps = pcbLayoutProps.omit({
18776
18784
  pcbLeftEdgeX: true,
18777
18785
  pcbRightEdgeX: true,
@@ -18788,15 +18796,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18788
18796
  x2: distance46,
18789
18797
  y2: distance46,
18790
18798
  strokeWidth: distance46.optional(),
18791
- color: z141.string().optional(),
18792
- isDashed: z141.boolean().optional()
18799
+ color: z142.string().optional(),
18800
+ isDashed: z142.boolean().optional()
18793
18801
  });
18794
18802
  expectTypesMatch(true);
18795
18803
 
18796
18804
  // lib/components/pcb-note-dimension.ts
18797
18805
  import { distance as distance47, length as length13 } from "circuit-json";
18798
- import { z as z142 } from "zod";
18799
- var dimensionTarget2 = z142.union([z142.string(), point]);
18806
+ import { z as z143 } from "zod";
18807
+ var dimensionTarget2 = z143.union([z143.string(), point]);
18800
18808
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18801
18809
  pcbLeftEdgeX: true,
18802
18810
  pcbRightEdgeX: true,
@@ -18810,101 +18818,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18810
18818
  }).extend({
18811
18819
  from: dimensionTarget2,
18812
18820
  to: dimensionTarget2,
18813
- text: z142.string().optional(),
18821
+ text: z143.string().optional(),
18814
18822
  offset: distance47.optional(),
18815
- font: z142.enum(["tscircuit2024"]).optional(),
18823
+ font: z143.enum(["tscircuit2024"]).optional(),
18816
18824
  fontSize: length13.optional(),
18817
- color: z142.string().optional(),
18825
+ color: z143.string().optional(),
18818
18826
  arrowSize: distance47.optional(),
18819
- units: z142.enum(["in", "mm"]).optional(),
18820
- outerEdgeToEdge: z142.literal(true).optional(),
18821
- centerToCenter: z142.literal(true).optional(),
18822
- innerEdgeToEdge: z142.literal(true).optional()
18827
+ units: z143.enum(["in", "mm"]).optional(),
18828
+ outerEdgeToEdge: z143.literal(true).optional(),
18829
+ centerToCenter: z143.literal(true).optional(),
18830
+ innerEdgeToEdge: z143.literal(true).optional()
18823
18831
  });
18824
18832
  expectTypesMatch(
18825
18833
  true
18826
18834
  );
18827
18835
 
18828
18836
  // lib/platformConfig.ts
18829
- import { z as z143 } from "zod";
18830
- var unvalidatedCircuitJson = z143.array(z143.any()).describe("Circuit JSON");
18831
- var footprintLibraryResult = z143.object({
18832
- footprintCircuitJson: z143.array(z143.any()),
18837
+ import { z as z144 } from "zod";
18838
+ var unvalidatedCircuitJson = z144.array(z144.any()).describe("Circuit JSON");
18839
+ var footprintLibraryResult = z144.object({
18840
+ footprintCircuitJson: z144.array(z144.any()),
18833
18841
  cadModel: cadModelProp.optional()
18834
18842
  });
18835
- var pathToCircuitJsonFn = z143.function().args(z143.string()).returns(z143.promise(footprintLibraryResult)).or(
18836
- z143.function().args(
18837
- z143.string(),
18838
- z143.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18839
- ).returns(z143.promise(footprintLibraryResult))
18843
+ var pathToCircuitJsonFn = z144.function().args(z144.string()).returns(z144.promise(footprintLibraryResult)).or(
18844
+ z144.function().args(
18845
+ z144.string(),
18846
+ z144.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18847
+ ).returns(z144.promise(footprintLibraryResult))
18840
18848
  ).describe("A function that takes a path and returns Circuit JSON");
18841
- var footprintFileParserEntry = z143.object({
18842
- loadFromUrl: z143.function().args(z143.string()).returns(z143.promise(footprintLibraryResult)).describe(
18849
+ var footprintFileParserEntry = z144.object({
18850
+ loadFromUrl: z144.function().args(z144.string()).returns(z144.promise(footprintLibraryResult)).describe(
18843
18851
  "A function that takes a footprint file URL and returns Circuit JSON"
18844
18852
  )
18845
18853
  });
18846
- var spiceEngineSimulationResult = z143.object({
18847
- engineVersionString: z143.string().optional(),
18854
+ var spiceEngineSimulationResult = z144.object({
18855
+ engineVersionString: z144.string().optional(),
18848
18856
  simulationResultCircuitJson: unvalidatedCircuitJson
18849
18857
  });
18850
- var spiceEngineZod = z143.object({
18851
- simulate: z143.function().args(z143.string()).returns(z143.promise(spiceEngineSimulationResult)).describe(
18858
+ var spiceEngineZod = z144.object({
18859
+ simulate: z144.function().args(z144.string()).returns(z144.promise(spiceEngineSimulationResult)).describe(
18852
18860
  "A function that takes a SPICE string and returns a simulation result"
18853
18861
  )
18854
18862
  });
18855
- var defaultSpiceEngine = z143.custom(
18863
+ var defaultSpiceEngine = z144.custom(
18856
18864
  (value) => typeof value === "string"
18857
18865
  );
18858
- var autorouterInstance = z143.object({
18859
- run: z143.function().args().returns(z143.promise(z143.unknown())).describe("Run the autorouter"),
18860
- getOutputSimpleRouteJson: z143.function().args().returns(z143.promise(z143.any())).describe("Get the resulting SimpleRouteJson")
18866
+ var autorouterInstance = z144.object({
18867
+ run: z144.function().args().returns(z144.promise(z144.unknown())).describe("Run the autorouter"),
18868
+ getOutputSimpleRouteJson: z144.function().args().returns(z144.promise(z144.any())).describe("Get the resulting SimpleRouteJson")
18861
18869
  });
18862
- var autorouterDefinition = z143.object({
18863
- createAutorouter: z143.function().args(z143.any(), z143.any().optional()).returns(z143.union([autorouterInstance, z143.promise(autorouterInstance)])).describe("Create an autorouter instance")
18870
+ var autorouterDefinition = z144.object({
18871
+ createAutorouter: z144.function().args(z144.any(), z144.any().optional()).returns(z144.union([autorouterInstance, z144.promise(autorouterInstance)])).describe("Create an autorouter instance")
18864
18872
  });
18865
- var platformFetch = z143.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18866
- var platformConfig = z143.object({
18873
+ var platformFetch = z144.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18874
+ var platformConfig = z144.object({
18867
18875
  partsEngine: partsEngine.optional(),
18868
18876
  autorouter: autorouterProp.optional(),
18869
- autorouterMap: z143.record(z143.string(), autorouterDefinition).optional(),
18877
+ autorouterMap: z144.record(z144.string(), autorouterDefinition).optional(),
18870
18878
  registryApiUrl: url.optional(),
18871
18879
  cloudAutorouterUrl: url.optional(),
18872
- projectName: z143.string().optional(),
18880
+ projectName: z144.string().optional(),
18873
18881
  projectBaseUrl: url.optional(),
18874
- version: z143.string().optional(),
18882
+ version: z144.string().optional(),
18875
18883
  url: url.optional(),
18876
- printBoardInformationToSilkscreen: z143.boolean().optional(),
18877
- includeBoardFiles: z143.array(z143.string()).describe(
18884
+ printBoardInformationToSilkscreen: z144.boolean().optional(),
18885
+ includeBoardFiles: z144.array(z144.string()).describe(
18878
18886
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18879
18887
  ).optional(),
18880
- snapshotsDir: z143.string().describe(
18888
+ snapshotsDir: z144.string().describe(
18881
18889
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18882
18890
  ).optional(),
18883
18891
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18884
- unitPreference: z143.enum(["mm", "in", "mil"]).optional(),
18885
- localCacheEngine: z143.any().optional(),
18886
- pcbDisabled: z143.boolean().optional(),
18887
- routingDisabled: z143.boolean().optional(),
18888
- schematicDisabled: z143.boolean().optional(),
18889
- partsEngineDisabled: z143.boolean().optional(),
18890
- drcChecksDisabled: z143.boolean().optional(),
18891
- netlistDrcChecksDisabled: z143.boolean().optional(),
18892
- routingDrcChecksDisabled: z143.boolean().optional(),
18893
- placementDrcChecksDisabled: z143.boolean().optional(),
18894
- pinSpecificationDrcChecksDisabled: z143.boolean().optional(),
18895
- spiceEngineMap: z143.record(z143.string(), spiceEngineZod).optional(),
18896
- footprintLibraryMap: z143.record(
18897
- z143.string(),
18898
- z143.union([
18892
+ unitPreference: z144.enum(["mm", "in", "mil"]).optional(),
18893
+ localCacheEngine: z144.any().optional(),
18894
+ pcbDisabled: z144.boolean().optional(),
18895
+ routingDisabled: z144.boolean().optional(),
18896
+ schematicDisabled: z144.boolean().optional(),
18897
+ partsEngineDisabled: z144.boolean().optional(),
18898
+ drcChecksDisabled: z144.boolean().optional(),
18899
+ netlistDrcChecksDisabled: z144.boolean().optional(),
18900
+ routingDrcChecksDisabled: z144.boolean().optional(),
18901
+ placementDrcChecksDisabled: z144.boolean().optional(),
18902
+ pinSpecificationDrcChecksDisabled: z144.boolean().optional(),
18903
+ spiceEngineMap: z144.record(z144.string(), spiceEngineZod).optional(),
18904
+ footprintLibraryMap: z144.record(
18905
+ z144.string(),
18906
+ z144.union([
18899
18907
  pathToCircuitJsonFn,
18900
- z143.record(
18901
- z143.string(),
18902
- z143.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18908
+ z144.record(
18909
+ z144.string(),
18910
+ z144.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18903
18911
  )
18904
18912
  ])
18905
18913
  ).optional(),
18906
- footprintFileParserMap: z143.record(z143.string(), footprintFileParserEntry).optional(),
18907
- resolveProjectStaticFileImportUrl: z143.function().args(z143.string()).returns(z143.promise(z143.string())).describe(
18914
+ footprintFileParserMap: z144.record(z144.string(), footprintFileParserEntry).optional(),
18915
+ resolveProjectStaticFileImportUrl: z144.function().args(z144.string()).returns(z144.promise(z144.string())).describe(
18908
18916
  "A function that returns a string URL for static files for the project"
18909
18917
  ).optional(),
18910
18918
  platformFetch: platformFetch.optional()
@@ -18959,6 +18967,7 @@ export {
18959
18967
  breakoutPointProps,
18960
18968
  breakoutProps,
18961
18969
  bugProps,
18970
+ busProps,
18962
18971
  cadModelAxisDirection,
18963
18972
  cadModelAxisDirections,
18964
18973
  cadModelBase,