@tscircuit/props 0.0.591 → 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,52 +17499,268 @@ 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
- var analogSimulationProps = z79.object({
17505
- name: z79.string().optional(),
17506
- simulationType: z79.literal("spice_transient_analysis").default("spice_transient_analysis"),
17512
+ var analogAnalysisSimulationBaseProps = {
17513
+ name: z80.string().optional(),
17514
+ spiceEngine: spiceEngine.optional(),
17515
+ spiceOptions: spiceOptions.optional(),
17516
+ graphIndependentAxes: z80.boolean().optional(),
17517
+ children: z80.custom().optional()
17518
+ };
17519
+ var analogSimulationProps = z80.object({
17520
+ name: z80.string().optional(),
17521
+ simulationType: z80.literal("spice_transient_analysis").default("spice_transient_analysis"),
17507
17522
  duration: ms.optional(),
17508
17523
  startTime: ms.optional(),
17509
17524
  timePerStep: ms.optional(),
17510
17525
  spiceEngine: spiceEngine.optional(),
17511
17526
  spiceOptions: spiceOptions.optional(),
17512
- graphIndependentAxes: z79.boolean().optional()
17527
+ graphIndependentAxes: z80.boolean().optional()
17513
17528
  });
17514
17529
  expectTypesMatch(
17515
17530
  true
17516
17531
  );
17517
17532
 
17533
+ // lib/components/analogtransientsimulation.ts
17534
+ import { ms as ms2 } from "circuit-json";
17535
+ import { z as z81 } from "zod";
17536
+ var positiveMilliseconds = ms2.refine(
17537
+ (milliseconds) => milliseconds > 0,
17538
+ "Time must be positive"
17539
+ );
17540
+ var analogTransientSimulationProps = z81.object({
17541
+ ...analogAnalysisSimulationBaseProps,
17542
+ duration: positiveMilliseconds.default("10ms"),
17543
+ startTime: ms2.default("0ms"),
17544
+ timePerStep: positiveMilliseconds.default("0.01ms")
17545
+ }).superRefine((simulation, context) => {
17546
+ if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
17547
+ context.addIssue({
17548
+ code: z81.ZodIssueCode.custom,
17549
+ path: ["startTime"],
17550
+ message: "startTime must be between zero and duration"
17551
+ });
17552
+ }
17553
+ });
17554
+ expectTypesMatch(true);
17555
+
17556
+ // lib/components/analogdcoperatingpointsimulation.ts
17557
+ import { z as z82 } from "zod";
17558
+ var analogDcOperatingPointSimulationProps = z82.object({
17559
+ ...analogAnalysisSimulationBaseProps
17560
+ });
17561
+ expectTypesMatch(true);
17562
+
17563
+ // lib/components/analogdcsweepsimulation.ts
17564
+ import { current, voltage as voltage3 } from "circuit-json";
17565
+ import { z as z83 } from "zod";
17566
+ var dcSweepQuantity = z83.union([voltage3, current]);
17567
+ var analogDcSweepSimulationProps = z83.object({
17568
+ ...analogAnalysisSimulationBaseProps,
17569
+ sweepSource: z83.string().min(1),
17570
+ sweepStart: dcSweepQuantity,
17571
+ sweepStop: dcSweepQuantity,
17572
+ sweepStep: dcSweepQuantity.refine(
17573
+ (sweepStep) => sweepStep !== 0,
17574
+ "sweepStep must be nonzero"
17575
+ )
17576
+ }).superRefine((simulation, context) => {
17577
+ if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
17578
+ context.addIssue({
17579
+ code: z83.ZodIssueCode.custom,
17580
+ path: ["sweepStep"],
17581
+ message: "sweepStep must move from sweepStart toward sweepStop"
17582
+ });
17583
+ }
17584
+ });
17585
+ expectTypesMatch(true);
17586
+
17587
+ // lib/components/analogacsweepsimulation.ts
17588
+ import { frequency as frequency3 } from "circuit-json";
17589
+ import { z as z84 } from "zod";
17590
+ var analogAcSweepSimulationProps = z84.object({
17591
+ ...analogAnalysisSimulationBaseProps,
17592
+ sweepType: z84.enum(["linear", "decade", "octave"]),
17593
+ startFrequency: frequency3.refine(
17594
+ (startFrequencyHz) => startFrequencyHz > 0,
17595
+ "startFrequency must be positive"
17596
+ ),
17597
+ stopFrequency: frequency3.refine(
17598
+ (stopFrequencyHz) => stopFrequencyHz > 0,
17599
+ "stopFrequency must be positive"
17600
+ ),
17601
+ samplesPerInterval: z84.number().int().positive().optional(),
17602
+ sampleCount: z84.number().int().positive().optional()
17603
+ }).superRefine((simulation, context) => {
17604
+ if (simulation.stopFrequency <= simulation.startFrequency) {
17605
+ context.addIssue({
17606
+ code: z84.ZodIssueCode.custom,
17607
+ path: ["stopFrequency"],
17608
+ message: "stopFrequency must be greater than startFrequency"
17609
+ });
17610
+ }
17611
+ if (simulation.sweepType === "linear") {
17612
+ if (simulation.sampleCount === void 0) {
17613
+ context.addIssue({
17614
+ code: z84.ZodIssueCode.custom,
17615
+ path: ["sampleCount"],
17616
+ message: "sampleCount is required for a linear AC sweep"
17617
+ });
17618
+ }
17619
+ if (simulation.samplesPerInterval !== void 0) {
17620
+ context.addIssue({
17621
+ code: z84.ZodIssueCode.custom,
17622
+ path: ["samplesPerInterval"],
17623
+ message: "samplesPerInterval is only valid for decade or octave sweeps"
17624
+ });
17625
+ }
17626
+ return;
17627
+ }
17628
+ if (simulation.samplesPerInterval === void 0) {
17629
+ context.addIssue({
17630
+ code: z84.ZodIssueCode.custom,
17631
+ path: ["samplesPerInterval"],
17632
+ message: "samplesPerInterval is required for decade or octave sweeps"
17633
+ });
17634
+ }
17635
+ if (simulation.sampleCount !== void 0) {
17636
+ context.addIssue({
17637
+ code: z84.ZodIssueCode.custom,
17638
+ path: ["sampleCount"],
17639
+ message: "sampleCount is only valid for a linear sweep"
17640
+ });
17641
+ }
17642
+ });
17643
+ expectTypesMatch(true);
17644
+
17645
+ // lib/components/analogsweepparameter.ts
17646
+ import {
17647
+ capacitance as capacitance4,
17648
+ current as current2,
17649
+ inductance,
17650
+ resistance as resistance3,
17651
+ voltage as voltage4
17652
+ } from "circuit-json";
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());
17659
+ var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
17660
+ name: z85.string().optional(),
17661
+ values: z85.array(sweepQuantity).min(1).optional(),
17662
+ start: sweepQuantity.optional(),
17663
+ stop: sweepQuantity.optional(),
17664
+ step: sweepQuantity.optional()
17665
+ });
17666
+ var analogResistanceSweepParameterProps = z85.object({
17667
+ ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
17668
+ parameterType: z85.literal("resistance"),
17669
+ resistorRef: z85.string().min(1)
17670
+ }).strict();
17671
+ var analogCapacitanceSweepParameterProps = z85.object({
17672
+ ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
17673
+ parameterType: z85.literal("capacitance"),
17674
+ capacitorRef: z85.string().min(1)
17675
+ }).strict();
17676
+ var analogInductanceSweepParameterProps = z85.object({
17677
+ ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
17678
+ parameterType: z85.literal("inductance"),
17679
+ inductorRef: z85.string().min(1)
17680
+ }).strict();
17681
+ var analogVoltageSweepParameterProps = z85.object({
17682
+ ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
17683
+ parameterType: z85.literal("voltage"),
17684
+ net: z85.string().min(1)
17685
+ }).strict();
17686
+ var analogCurrentSweepParameterProps = z85.object({
17687
+ ...createAnalogSweepCoordinateProps(currentSweepQuantity),
17688
+ parameterType: z85.literal("current"),
17689
+ currentSourceRef: z85.string().min(1)
17690
+ }).strict();
17691
+ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17692
+ const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
17693
+ const rangeCoordinateCount = [
17694
+ sweepCoordinates.start,
17695
+ sweepCoordinates.stop,
17696
+ sweepCoordinates.step
17697
+ ].filter((rangeCoordinate) => rangeCoordinate !== void 0).length;
17698
+ const hasRangeCoordinates = rangeCoordinateCount > 0;
17699
+ if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
17700
+ context.addIssue({
17701
+ code: z85.ZodIssueCode.custom,
17702
+ message: "Provide either values or start/stop/step"
17703
+ });
17704
+ return;
17705
+ }
17706
+ if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
17707
+ context.addIssue({
17708
+ code: z85.ZodIssueCode.custom,
17709
+ message: "start, stop, and step must be provided together"
17710
+ });
17711
+ return;
17712
+ }
17713
+ if (sweepCoordinates.step === 0) {
17714
+ context.addIssue({
17715
+ code: z85.ZodIssueCode.custom,
17716
+ path: ["step"],
17717
+ message: "step must be nonzero"
17718
+ });
17719
+ }
17720
+ if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
17721
+ context.addIssue({
17722
+ code: z85.ZodIssueCode.custom,
17723
+ path: ["step"],
17724
+ message: "step must move from start toward stop"
17725
+ });
17726
+ }
17727
+ };
17728
+ var analogSweepParameterProps = z85.discriminatedUnion("parameterType", [
17729
+ analogResistanceSweepParameterProps,
17730
+ analogCapacitanceSweepParameterProps,
17731
+ analogInductanceSweepParameterProps,
17732
+ analogVoltageSweepParameterProps,
17733
+ analogCurrentSweepParameterProps
17734
+ ]).superRefine(validateAnalogSweepCoordinates);
17735
+ expectTypesMatch(true);
17736
+ expectTypesMatch(true);
17737
+ expectTypesMatch(true);
17738
+ expectTypesMatch(true);
17739
+ expectTypesMatch(true);
17740
+ expectTypesMatch(true);
17741
+
17518
17742
  // lib/components/autoroutingphase.ts
17519
- import { z as z80 } from "zod";
17520
- var autoroutingPhaseProps = z80.object({
17521
- key: z80.any().optional(),
17522
- name: z80.string().optional(),
17743
+ import { z as z86 } from "zod";
17744
+ var autoroutingPhaseProps = z86.object({
17745
+ key: z86.any().optional(),
17746
+ name: z86.string().optional(),
17523
17747
  autorouter: autorouterProp.optional(),
17524
- phaseIndex: z80.number().optional(),
17748
+ phaseIndex: z86.number().optional(),
17525
17749
  ...routingTolerances.shape,
17526
- region: z80.object({
17527
- shape: z80.literal("rect").optional(),
17528
- minX: z80.number(),
17529
- maxX: z80.number(),
17530
- minY: z80.number(),
17531
- maxY: z80.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()
17532
17756
  }).optional(),
17533
- connection: z80.string().optional(),
17534
- connections: z80.array(z80.string()).optional(),
17535
- reroute: z80.boolean().optional()
17757
+ connection: z86.string().optional(),
17758
+ connections: z86.array(z86.string()).optional(),
17759
+ reroute: z86.boolean().optional()
17536
17760
  }).superRefine((value, ctx) => {
17537
17761
  if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
17538
17762
  ctx.addIssue({
17539
- code: z80.ZodIssueCode.custom,
17763
+ code: z86.ZodIssueCode.custom,
17540
17764
  message: "region, connection, or connections is required when reroute is provided",
17541
17765
  path: ["region"]
17542
17766
  });
@@ -17545,15 +17769,15 @@ var autoroutingPhaseProps = z80.object({
17545
17769
  expectTypesMatch(true);
17546
17770
 
17547
17771
  // lib/components/spicemodel.ts
17548
- import { z as z81 } from "zod";
17549
- var spicemodelProps = z81.object({
17550
- source: z81.string(),
17551
- spicePinMapping: z81.record(z81.string(), z81.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()
17552
17776
  });
17553
17777
  expectTypesMatch(true);
17554
17778
 
17555
17779
  // lib/components/transistor.ts
17556
- import { z as z82 } from "zod";
17780
+ import { z as z88 } from "zod";
17557
17781
  var transistorPinsLabels = [
17558
17782
  "pin1",
17559
17783
  "pin2",
@@ -17566,7 +17790,7 @@ var transistorPinsLabels = [
17566
17790
  "drain"
17567
17791
  ];
17568
17792
  var transistorProps = commonComponentProps.extend({
17569
- type: z82.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17793
+ type: z88.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17570
17794
  connections: createConnectionsProp(transistorPinsLabels).optional()
17571
17795
  });
17572
17796
  var transistorPins = [
@@ -17580,7 +17804,7 @@ var transistorPins = [
17580
17804
  expectTypesMatch(true);
17581
17805
 
17582
17806
  // lib/components/mosfet.ts
17583
- import { z as z83 } from "zod";
17807
+ import { z as z89 } from "zod";
17584
17808
  var mosfetPins = [
17585
17809
  "pin1",
17586
17810
  "drain",
@@ -17590,11 +17814,11 @@ var mosfetPins = [
17590
17814
  "gate"
17591
17815
  ];
17592
17816
  var mosfetProps = commonComponentProps.extend({
17593
- channelType: z83.enum(["n", "p"]),
17594
- mosfetMode: z83.enum(["enhancement", "depletion"]),
17595
- symbolDrainSide: z83.enum(["left", "right", "top", "bottom"]).optional(),
17596
- symbolSourceSide: z83.enum(["left", "right", "top", "bottom"]).optional(),
17597
- symbolGateSide: z83.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(),
17598
17822
  connections: createConnectionsProp(mosfetPins).optional()
17599
17823
  });
17600
17824
  expectTypesMatch(true);
@@ -17615,30 +17839,30 @@ var opampPins = opampPinLabels;
17615
17839
  expectTypesMatch(true);
17616
17840
 
17617
17841
  // lib/components/inductor.ts
17618
- import { inductance } from "circuit-json";
17619
- import { z as z85 } from "zod";
17842
+ import { inductance as inductance2 } from "circuit-json";
17843
+ import { z as z91 } from "zod";
17620
17844
  var inductorPins = lrPins;
17621
17845
  var inductorProps = commonComponentProps.extend({
17622
- inductance,
17623
- maxCurrentRating: z85.union([z85.string(), z85.number()]).optional(),
17846
+ inductance: inductance2,
17847
+ maxCurrentRating: z91.union([z91.string(), z91.number()]).optional(),
17624
17848
  schOrientation: schematicOrientation.optional(),
17625
17849
  connections: createConnectionsProp(inductorPins).optional()
17626
17850
  });
17627
17851
  expectTypesMatch(true);
17628
17852
 
17629
17853
  // lib/components/internal-circuit.ts
17630
- import { z as z86 } from "zod";
17631
- var internalCircuitProps = z86.object({
17632
- children: z86.custom().optional()
17854
+ import { z as z92 } from "zod";
17855
+ var internalCircuitProps = z92.object({
17856
+ children: z92.custom().optional()
17633
17857
  });
17634
17858
  expectTypesMatch(
17635
17859
  true
17636
17860
  );
17637
17861
 
17638
17862
  // lib/components/diode.ts
17639
- import { z as z87 } from "zod";
17863
+ import { z as z93 } from "zod";
17640
17864
  var diodePins = lrPolarPins;
17641
- var diodeConnectionKeys = z87.enum([
17865
+ var diodeConnectionKeys = z93.enum([
17642
17866
  "anode",
17643
17867
  "cathode",
17644
17868
  "pin1",
@@ -17646,13 +17870,13 @@ var diodeConnectionKeys = z87.enum([
17646
17870
  "pos",
17647
17871
  "neg"
17648
17872
  ]);
17649
- var connectionTarget3 = z87.string().or(z87.array(z87.string()).readonly()).or(z87.array(z87.string()));
17650
- var connectionsProp2 = z87.record(diodeConnectionKeys, connectionTarget3);
17651
- var diodePinLabelsProp = z87.record(
17652
- z87.enum(diodePins),
17653
- schematicPinLabel.or(z87.array(schematicPinLabel).readonly()).or(z87.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))
17654
17878
  );
17655
- var diodeVariant = z87.enum([
17879
+ var diodeVariant = z93.enum([
17656
17880
  "standard",
17657
17881
  "schottky",
17658
17882
  "zener",
@@ -17663,12 +17887,12 @@ var diodeVariant = z87.enum([
17663
17887
  var diodeProps = commonComponentProps.extend({
17664
17888
  connections: connectionsProp2.optional(),
17665
17889
  variant: diodeVariant.optional().default("standard"),
17666
- standard: z87.boolean().optional(),
17667
- schottky: z87.boolean().optional(),
17668
- zener: z87.boolean().optional(),
17669
- avalanche: z87.boolean().optional(),
17670
- photo: z87.boolean().optional(),
17671
- tvs: z87.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(),
17672
17896
  schOrientation: schematicOrientation.optional(),
17673
17897
  pinLabels: diodePinLabelsProp.optional()
17674
17898
  }).superRefine((data, ctx) => {
@@ -17682,11 +17906,11 @@ var diodeProps = commonComponentProps.extend({
17682
17906
  ].filter(Boolean).length;
17683
17907
  if (enabledFlags > 1) {
17684
17908
  ctx.addIssue({
17685
- code: z87.ZodIssueCode.custom,
17909
+ code: z93.ZodIssueCode.custom,
17686
17910
  message: "Exactly one diode variant must be enabled",
17687
17911
  path: []
17688
17912
  });
17689
- return z87.INVALID;
17913
+ return z93.INVALID;
17690
17914
  }
17691
17915
  }).transform((data) => {
17692
17916
  const result = {
@@ -17732,34 +17956,34 @@ var diodeProps = commonComponentProps.extend({
17732
17956
  expectTypesMatch(true);
17733
17957
 
17734
17958
  // lib/components/led.ts
17735
- import { z as z88 } from "zod";
17959
+ import { z as z94 } from "zod";
17736
17960
  var ledProps = commonComponentProps.extend({
17737
- color: z88.string().optional(),
17738
- wavelength: z88.string().optional(),
17739
- schDisplayValue: z88.string().optional(),
17961
+ color: z94.string().optional(),
17962
+ wavelength: z94.string().optional(),
17963
+ schDisplayValue: z94.string().optional(),
17740
17964
  schOrientation: schematicOrientation.optional(),
17741
17965
  connections: createConnectionsProp(lrPolarPins).optional(),
17742
- laser: z88.boolean().optional()
17966
+ laser: z94.boolean().optional()
17743
17967
  });
17744
17968
  var ledPins = lrPolarPins;
17745
17969
 
17746
17970
  // lib/components/switch.ts
17747
- import { ms as ms2, frequency as frequency3 } from "circuit-json";
17748
- import { z as z89 } from "zod";
17971
+ import { ms as ms3, frequency as frequency4 } from "circuit-json";
17972
+ import { z as z95 } from "zod";
17749
17973
  var switchProps = commonComponentProps.extend({
17750
- type: z89.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17751
- isNormallyClosed: z89.boolean().optional().default(false),
17752
- spst: z89.boolean().optional(),
17753
- spdt: z89.boolean().optional(),
17754
- dpst: z89.boolean().optional(),
17755
- dpdt: z89.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(),
17756
17980
  pinLabels: pinLabelsProp.optional(),
17757
- simSwitchFrequency: frequency3.optional(),
17758
- simCloseAt: ms2.optional(),
17759
- simOpenAt: ms2.optional(),
17760
- simStartClosed: z89.boolean().optional(),
17761
- simStartOpen: z89.boolean().optional(),
17762
- connections: z89.custom().pipe(z89.record(z89.string(), connectionTarget)).optional()
17981
+ simSwitchFrequency: frequency4.optional(),
17982
+ simCloseAt: ms3.optional(),
17983
+ simOpenAt: ms3.optional(),
17984
+ simStartClosed: z95.boolean().optional(),
17985
+ simStartOpen: z95.boolean().optional(),
17986
+ connections: z95.custom().pipe(z95.record(z95.string(), connectionTarget)).optional()
17763
17987
  }).transform((props) => {
17764
17988
  const updatedProps = { ...props };
17765
17989
  if (updatedProps.dpdt) {
@@ -17791,33 +18015,33 @@ expectTypesMatch(true);
17791
18015
 
17792
18016
  // lib/components/fabrication-note-text.ts
17793
18017
  import { length as length4 } from "circuit-json";
17794
- import { z as z90 } from "zod";
18018
+ import { z as z96 } from "zod";
17795
18019
  var fabricationNoteTextProps = pcbLayoutProps.extend({
17796
- text: z90.string(),
17797
- anchorAlignment: z90.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
17798
- font: z90.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(),
17799
18023
  fontSize: length4.optional(),
17800
- color: z90.string().optional()
18024
+ color: z96.string().optional()
17801
18025
  });
17802
18026
  expectTypesMatch(true);
17803
18027
 
17804
18028
  // lib/components/fabrication-note-rect.ts
17805
18029
  import { distance as distance21 } from "circuit-json";
17806
- import { z as z91 } from "zod";
18030
+ import { z as z97 } from "zod";
17807
18031
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17808
18032
  width: distance21,
17809
18033
  height: distance21,
17810
18034
  strokeWidth: distance21.optional(),
17811
- isFilled: z91.boolean().optional(),
17812
- hasStroke: z91.boolean().optional(),
17813
- isStrokeDashed: z91.boolean().optional(),
17814
- color: z91.string().optional(),
18035
+ isFilled: z97.boolean().optional(),
18036
+ hasStroke: z97.boolean().optional(),
18037
+ isStrokeDashed: z97.boolean().optional(),
18038
+ color: z97.string().optional(),
17815
18039
  cornerRadius: distance21.optional()
17816
18040
  });
17817
18041
 
17818
18042
  // lib/components/fabrication-note-path.ts
17819
18043
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
17820
- import { z as z92 } from "zod";
18044
+ import { z as z98 } from "zod";
17821
18045
  var fabricationNotePathProps = pcbLayoutProps.omit({
17822
18046
  pcbLeftEdgeX: true,
17823
18047
  pcbRightEdgeX: true,
@@ -17829,15 +18053,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
17829
18053
  pcbOffsetY: true,
17830
18054
  pcbRotation: true
17831
18055
  }).extend({
17832
- route: z92.array(route_hint_point3),
18056
+ route: z98.array(route_hint_point3),
17833
18057
  strokeWidth: length5.optional(),
17834
- color: z92.string().optional()
18058
+ color: z98.string().optional()
17835
18059
  });
17836
18060
 
17837
18061
  // lib/components/fabrication-note-dimension.ts
17838
18062
  import { distance as distance22, length as length6 } from "circuit-json";
17839
- import { z as z93 } from "zod";
17840
- var dimensionTarget = z93.union([z93.string(), point]);
18063
+ import { z as z99 } from "zod";
18064
+ var dimensionTarget = z99.union([z99.string(), point]);
17841
18065
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17842
18066
  pcbLeftEdgeX: true,
17843
18067
  pcbRightEdgeX: true,
@@ -17851,54 +18075,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17851
18075
  }).extend({
17852
18076
  from: dimensionTarget,
17853
18077
  to: dimensionTarget,
17854
- text: z93.string().optional(),
18078
+ text: z99.string().optional(),
17855
18079
  offset: distance22.optional(),
17856
- font: z93.enum(["tscircuit2024"]).optional(),
18080
+ font: z99.enum(["tscircuit2024"]).optional(),
17857
18081
  fontSize: length6.optional(),
17858
- color: z93.string().optional(),
18082
+ color: z99.string().optional(),
17859
18083
  arrowSize: distance22.optional(),
17860
- units: z93.enum(["in", "mm"]).optional(),
17861
- outerEdgeToEdge: z93.literal(true).optional(),
17862
- centerToCenter: z93.literal(true).optional(),
17863
- innerEdgeToEdge: z93.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()
17864
18088
  });
17865
18089
  expectTypesMatch(true);
17866
18090
 
17867
18091
  // lib/components/pcb-trace.ts
17868
18092
  import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
17869
- import { z as z94 } from "zod";
17870
- var pcbTraceProps = z94.object({
17871
- layer: z94.string().optional(),
18093
+ import { z as z100 } from "zod";
18094
+ var pcbTraceProps = z100.object({
18095
+ layer: z100.string().optional(),
17872
18096
  thickness: distance23.optional(),
17873
- route: z94.array(route_hint_point4)
18097
+ route: z100.array(route_hint_point4)
17874
18098
  });
17875
18099
 
17876
18100
  // lib/components/via.ts
17877
18101
  import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
17878
- import { z as z95 } from "zod";
18102
+ import { z as z101 } from "zod";
17879
18103
  var viaProps = commonLayoutProps.extend({
17880
- name: z95.string().optional(),
18104
+ name: z101.string().optional(),
17881
18105
  fromLayer: layer_ref6.optional(),
17882
18106
  toLayer: layer_ref6.optional(),
17883
18107
  holeDiameter: distance24.optional(),
17884
18108
  outerDiameter: distance24.optional(),
17885
- layers: z95.array(layer_ref6).optional(),
17886
- connectsTo: z95.string().or(z95.array(z95.string())).optional(),
17887
- netIsAssignable: z95.boolean().optional()
18109
+ layers: z101.array(layer_ref6).optional(),
18110
+ connectsTo: z101.string().or(z101.array(z101.string())).optional(),
18111
+ netIsAssignable: z101.boolean().optional()
17888
18112
  });
17889
18113
  expectTypesMatch(true);
17890
18114
 
17891
18115
  // lib/components/testpoint.ts
17892
18116
  import { distance as distance25 } from "circuit-json";
17893
- import { z as z96 } from "zod";
18117
+ import { z as z102 } from "zod";
17894
18118
  var testpointPins = ["pin1"];
17895
- var testpointConnectionsProp = z96.object({
18119
+ var testpointConnectionsProp = z102.object({
17896
18120
  pin1: connectionTarget
17897
18121
  }).strict();
17898
18122
  var testpointProps = commonComponentProps.extend({
17899
18123
  connections: testpointConnectionsProp.optional(),
17900
- footprintVariant: z96.enum(["pad", "through_hole"]).optional(),
17901
- padShape: z96.enum(["rect", "circle"]).optional().default("circle"),
18124
+ footprintVariant: z102.enum(["pad", "through_hole"]).optional(),
18125
+ padShape: z102.enum(["rect", "circle"]).optional().default("circle"),
17902
18126
  padDiameter: distance25.optional(),
17903
18127
  holeDiameter: distance25.optional(),
17904
18128
  width: distance25.optional(),
@@ -17910,45 +18134,45 @@ var testpointProps = commonComponentProps.extend({
17910
18134
  expectTypesMatch(true);
17911
18135
 
17912
18136
  // lib/components/breakoutpoint.ts
17913
- import { z as z97 } from "zod";
18137
+ import { z as z103 } from "zod";
17914
18138
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
17915
- connection: z97.string()
18139
+ connection: z103.string()
17916
18140
  });
17917
18141
  expectTypesMatch(true);
17918
18142
 
17919
18143
  // lib/components/pcb-keepout.ts
17920
18144
  import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
17921
- import { z as z98 } from "zod";
17922
- var pcbKeepoutProps = z98.union([
18145
+ import { z as z104 } from "zod";
18146
+ var pcbKeepoutProps = z104.union([
17923
18147
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
17924
- shape: z98.literal("circle"),
18148
+ shape: z104.literal("circle"),
17925
18149
  radius: distance26,
17926
- layers: z98.array(layer_ref7).optional()
18150
+ layers: z104.array(layer_ref7).optional()
17927
18151
  }),
17928
18152
  pcbLayoutProps.extend({
17929
- shape: z98.literal("rect"),
18153
+ shape: z104.literal("rect"),
17930
18154
  width: distance26,
17931
18155
  height: distance26,
17932
- layers: z98.array(layer_ref7).optional()
18156
+ layers: z104.array(layer_ref7).optional()
17933
18157
  })
17934
18158
  ]);
17935
18159
 
17936
18160
  // lib/components/courtyard-rect.ts
17937
18161
  import { distance as distance27 } from "circuit-json";
17938
- import { z as z99 } from "zod";
18162
+ import { z as z105 } from "zod";
17939
18163
  var courtyardRectProps = pcbLayoutProps.extend({
17940
18164
  width: distance27,
17941
18165
  height: distance27,
17942
18166
  strokeWidth: distance27.optional(),
17943
- isFilled: z99.boolean().optional(),
17944
- hasStroke: z99.boolean().optional(),
17945
- isStrokeDashed: z99.boolean().optional(),
17946
- color: z99.string().optional()
18167
+ isFilled: z105.boolean().optional(),
18168
+ hasStroke: z105.boolean().optional(),
18169
+ isStrokeDashed: z105.boolean().optional(),
18170
+ color: z105.string().optional()
17947
18171
  });
17948
18172
 
17949
18173
  // lib/components/courtyard-outline.ts
17950
18174
  import { length as length7 } from "circuit-json";
17951
- import { z as z100 } from "zod";
18175
+ import { z as z106 } from "zod";
17952
18176
  var courtyardOutlineProps = pcbLayoutProps.omit({
17953
18177
  pcbLeftEdgeX: true,
17954
18178
  pcbRightEdgeX: true,
@@ -17960,11 +18184,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
17960
18184
  pcbOffsetY: true,
17961
18185
  pcbRotation: true
17962
18186
  }).extend({
17963
- outline: z100.array(point),
18187
+ outline: z106.array(point),
17964
18188
  strokeWidth: length7.optional(),
17965
- isClosed: z100.boolean().optional(),
17966
- isStrokeDashed: z100.boolean().optional(),
17967
- color: z100.string().optional()
18189
+ isClosed: z106.boolean().optional(),
18190
+ isStrokeDashed: z106.boolean().optional(),
18191
+ color: z106.string().optional()
17968
18192
  });
17969
18193
 
17970
18194
  // lib/components/courtyard-circle.ts
@@ -17984,35 +18208,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17984
18208
  });
17985
18209
 
17986
18210
  // lib/components/copper-pour.ts
17987
- import { z as z103 } from "zod";
18211
+ import { z as z109 } from "zod";
17988
18212
  import { layer_ref as layer_ref8 } from "circuit-json";
17989
- var copperPourProps = z103.object({
17990
- name: z103.string().optional(),
18213
+ var copperPourProps = z109.object({
18214
+ name: z109.string().optional(),
17991
18215
  layer: layer_ref8,
17992
- connectsTo: z103.string(),
17993
- unbroken: z103.boolean().optional(),
18216
+ connectsTo: z109.string(),
18217
+ unbroken: z109.boolean().optional(),
17994
18218
  padMargin: distance.optional(),
17995
18219
  traceMargin: distance.optional(),
17996
18220
  clearance: distance.optional(),
17997
18221
  boardEdgeMargin: distance.optional(),
17998
18222
  cutoutMargin: distance.optional(),
17999
- outline: z103.array(point).optional(),
18000
- coveredWithSolderMask: z103.boolean().optional().default(true)
18223
+ outline: z109.array(point).optional(),
18224
+ coveredWithSolderMask: z109.boolean().optional().default(true)
18001
18225
  });
18002
18226
  expectTypesMatch(true);
18003
18227
 
18004
18228
  // lib/components/cadassembly.ts
18005
18229
  import { layer_ref as layer_ref9 } from "circuit-json";
18006
- import { z as z104 } from "zod";
18007
- var cadassemblyProps = z104.object({
18230
+ import { z as z110 } from "zod";
18231
+ var cadassemblyProps = z110.object({
18008
18232
  originalLayer: layer_ref9.default("top").optional(),
18009
- children: z104.any().optional()
18233
+ children: z110.any().optional()
18010
18234
  });
18011
18235
  expectTypesMatch(true);
18012
18236
 
18013
18237
  // lib/components/cadmodel.ts
18014
- import { z as z105 } from "zod";
18015
- var pcbPosition = z105.object({
18238
+ import { z as z111 } from "zod";
18239
+ var pcbPosition = z111.object({
18016
18240
  pcbX: pcbCoordinate.optional(),
18017
18241
  pcbY: pcbCoordinate.optional(),
18018
18242
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18029,19 +18253,19 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18029
18253
  });
18030
18254
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18031
18255
  expectTypesMatch(true);
18032
- var cadmodelProps = z105.union([z105.null(), url, cadModelObject]);
18256
+ var cadmodelProps = z111.union([z111.null(), url, cadModelObject]);
18033
18257
 
18034
18258
  // lib/components/power-source.ts
18035
- import { voltage as voltage3 } from "circuit-json";
18259
+ import { voltage as voltage5 } from "circuit-json";
18036
18260
  var powerSourceProps = commonComponentProps.extend({
18037
- voltage: voltage3
18261
+ voltage: voltage5
18038
18262
  });
18039
18263
 
18040
18264
  // lib/components/voltagesource.ts
18041
- import { frequency as frequency4, ms as ms3, rotation as rotation5, voltage as voltage4 } from "circuit-json";
18042
- import { z as z106 } from "zod";
18265
+ import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
18266
+ import { z as z112 } from "zod";
18043
18267
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18044
- var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
18268
+ var percentage = z112.union([z112.string(), z112.number()]).transform((val) => {
18045
18269
  if (typeof val === "string") {
18046
18270
  if (val.endsWith("%")) {
18047
18271
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18050,30 +18274,32 @@ var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
18050
18274
  }
18051
18275
  return val;
18052
18276
  }).pipe(
18053
- z106.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%")
18054
18278
  );
18055
18279
  var voltageSourceProps = commonComponentProps.extend({
18056
- voltage: voltage4.optional(),
18057
- frequency: frequency4.optional(),
18058
- peakToPeakVoltage: voltage4.optional(),
18059
- waveShape: z106.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18280
+ voltage: voltage6.optional(),
18281
+ frequency: frequency5.optional(),
18282
+ peakToPeakVoltage: voltage6.optional(),
18283
+ waveShape: z112.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18060
18284
  phase: rotation5.optional(),
18061
18285
  dutyCycle: percentage.optional(),
18062
- pulseDelay: ms3.optional(),
18063
- riseTime: ms3.optional(),
18064
- fallTime: ms3.optional(),
18065
- pulseWidth: ms3.optional(),
18066
- period: ms3.optional(),
18286
+ pulseDelay: ms4.optional(),
18287
+ riseTime: ms4.optional(),
18288
+ fallTime: ms4.optional(),
18289
+ pulseWidth: ms4.optional(),
18290
+ period: ms4.optional(),
18291
+ acMagnitude: voltage6.optional(),
18292
+ acPhase: rotation5.optional(),
18067
18293
  connections: createConnectionsProp(voltageSourcePinLabels).optional()
18068
18294
  });
18069
18295
  var voltageSourcePins = lrPolarPins;
18070
18296
  expectTypesMatch(true);
18071
18297
 
18072
18298
  // lib/components/currentsource.ts
18073
- import { frequency as frequency5, rotation as rotation6, current } from "circuit-json";
18074
- import { z as z107 } from "zod";
18299
+ import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
18300
+ import { z as z113 } from "zod";
18075
18301
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18076
- var percentage2 = z107.union([z107.string(), z107.number()]).transform((val) => {
18302
+ var percentage2 = z113.union([z113.string(), z113.number()]).transform((val) => {
18077
18303
  if (typeof val === "string") {
18078
18304
  if (val.endsWith("%")) {
18079
18305
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18082,36 +18308,38 @@ var percentage2 = z107.union([z107.string(), z107.number()]).transform((val) =>
18082
18308
  }
18083
18309
  return val;
18084
18310
  }).pipe(
18085
- z107.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%")
18086
18312
  );
18087
18313
  var currentSourceProps = commonComponentProps.extend({
18088
- current: current.optional(),
18089
- frequency: frequency5.optional(),
18090
- peakToPeakCurrent: current.optional(),
18091
- waveShape: z107.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18314
+ current: current3.optional(),
18315
+ frequency: frequency6.optional(),
18316
+ peakToPeakCurrent: current3.optional(),
18317
+ waveShape: z113.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18092
18318
  phase: rotation6.optional(),
18093
18319
  dutyCycle: percentage2.optional(),
18320
+ acMagnitude: current3.optional(),
18321
+ acPhase: rotation6.optional(),
18094
18322
  connections: createConnectionsProp(currentSourcePinLabels).optional()
18095
18323
  });
18096
18324
  var currentSourcePins = lrPolarPins;
18097
18325
  expectTypesMatch(true);
18098
18326
 
18099
18327
  // lib/components/voltageprobe.ts
18100
- import { z as z108 } from "zod";
18328
+ import { z as z114 } from "zod";
18101
18329
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18102
- name: z108.string().optional(),
18103
- connectsTo: z108.string(),
18104
- referenceTo: z108.string().optional(),
18105
- color: z108.string().optional(),
18106
- graphDisplayName: z108.string().optional(),
18107
- graphCenter: z108.number().optional(),
18108
- graphVerticalOffset: z108.number().or(z108.string()).optional(),
18109
- graphVoltagePerDiv: z108.number().or(z108.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()
18110
18338
  });
18111
18339
  expectTypesMatch(true);
18112
18340
 
18113
18341
  // lib/components/ammeter.ts
18114
- import { z as z109 } from "zod";
18342
+ import { z as z115 } from "zod";
18115
18343
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18116
18344
  var hasAmmeterConnectionPair = (connections) => {
18117
18345
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18121,63 +18349,63 @@ var ammeterProps = commonComponentProps.extend({
18121
18349
  hasAmmeterConnectionPair,
18122
18350
  "Ammeter connections must include either pos/neg or pin1/pin2"
18123
18351
  ),
18124
- color: z109.string().optional(),
18125
- graphDisplayName: z109.string().optional(),
18126
- graphCenter: z109.number().optional(),
18127
- graphVerticalOffset: z109.number().or(z109.string()).optional(),
18128
- graphCurrentPerDiv: z109.number().or(z109.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()
18129
18357
  });
18130
18358
  var ammeterPins = ammeterPinLabels;
18131
18359
  expectTypesMatch(true);
18132
18360
 
18133
18361
  // lib/components/schematic-arc.ts
18134
18362
  import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
18135
- import { z as z110 } from "zod";
18136
- var schematicArcProps = z110.object({
18363
+ import { z as z116 } from "zod";
18364
+ var schematicArcProps = z116.object({
18137
18365
  center: point5,
18138
18366
  radius: distance30,
18139
18367
  startAngleDegrees: rotation7,
18140
18368
  endAngleDegrees: rotation7,
18141
- direction: z110.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18369
+ direction: z116.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18142
18370
  strokeWidth: distance30.optional(),
18143
- color: z110.string().optional(),
18144
- isDashed: z110.boolean().optional().default(false)
18371
+ color: z116.string().optional(),
18372
+ isDashed: z116.boolean().optional().default(false)
18145
18373
  });
18146
18374
  expectTypesMatch(true);
18147
18375
 
18148
18376
  // lib/components/toolingrail.ts
18149
- import { z as z111 } from "zod";
18150
- var toolingrailProps = z111.object({
18151
- children: z111.any().optional()
18377
+ import { z as z117 } from "zod";
18378
+ var toolingrailProps = z117.object({
18379
+ children: z117.any().optional()
18152
18380
  });
18153
18381
  expectTypesMatch(true);
18154
18382
 
18155
18383
  // lib/components/schematic-box.ts
18156
18384
  import { distance as distance31 } from "circuit-json";
18157
- import { z as z112 } from "zod";
18158
- var schematicBoxProps = z112.object({
18159
- name: z112.string().optional(),
18160
- chipRef: z112.string().optional(),
18385
+ import { z as z118 } from "zod";
18386
+ var schematicBoxProps = z118.object({
18387
+ name: z118.string().optional(),
18388
+ chipRef: z118.string().optional(),
18161
18389
  pinLabels: pinLabelsProp.optional(),
18162
18390
  schPinArrangement: schematicPinArrangement.optional(),
18163
18391
  schX: distance31.optional(),
18164
18392
  schY: distance31.optional(),
18165
- schSectionName: z112.string().optional(),
18166
- schSheetName: z112.string().optional(),
18393
+ schSectionName: z118.string().optional(),
18394
+ schSheetName: z118.string().optional(),
18167
18395
  width: distance31.optional(),
18168
18396
  height: distance31.optional(),
18169
- overlay: z112.array(z112.string()).optional(),
18397
+ overlay: z118.array(z118.string()).optional(),
18170
18398
  padding: distance31.optional(),
18171
18399
  paddingLeft: distance31.optional(),
18172
18400
  paddingRight: distance31.optional(),
18173
18401
  paddingTop: distance31.optional(),
18174
18402
  paddingBottom: distance31.optional(),
18175
- title: z112.string().optional(),
18403
+ title: z118.string().optional(),
18176
18404
  titleAlignment: ninePointAnchor.default("top_left"),
18177
- titleColor: z112.string().optional(),
18405
+ titleColor: z118.string().optional(),
18178
18406
  titleFontSize: distance31.optional(),
18179
- titleInside: z112.boolean().default(false),
18180
- strokeStyle: z112.enum(["solid", "dashed"]).default("solid")
18407
+ titleInside: z118.boolean().default(false),
18408
+ strokeStyle: z118.enum(["solid", "dashed"]).default("solid")
18181
18409
  }).refine(
18182
18410
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18183
18411
  {
@@ -18193,21 +18421,21 @@ expectTypesMatch(true);
18193
18421
 
18194
18422
  // lib/components/schematic-symbol.ts
18195
18423
  import { rotation as rotation8 } from "circuit-json";
18196
- import { z as z113 } from "zod";
18197
- var schematicSymbolConnections = z113.custom().pipe(z113.record(z113.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, {
18198
18426
  message: "connections must map at least one schematic symbol port"
18199
18427
  });
18200
- var schematicSymbolProps = z113.object({
18201
- name: z113.string().min(1),
18202
- displayName: z113.string().optional(),
18203
- chipRef: z113.string().min(1).optional(),
18204
- symbolName: z113.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),
18205
18433
  connections: schematicSymbolConnections.optional(),
18206
18434
  schX: distance.optional(),
18207
18435
  schY: distance.optional(),
18208
18436
  schRotation: rotation8.optional(),
18209
- schSectionName: z113.string().optional(),
18210
- schSheetName: z113.string().optional()
18437
+ schSectionName: z119.string().optional(),
18438
+ schSheetName: z119.string().optional()
18211
18439
  });
18212
18440
  expectTypesMatch(
18213
18441
  true
@@ -18215,15 +18443,15 @@ expectTypesMatch(
18215
18443
 
18216
18444
  // lib/components/schematic-circle.ts
18217
18445
  import { distance as distance32, point as point6 } from "circuit-json";
18218
- import { z as z114 } from "zod";
18219
- var schematicCircleProps = z114.object({
18446
+ import { z as z120 } from "zod";
18447
+ var schematicCircleProps = z120.object({
18220
18448
  center: point6,
18221
18449
  radius: distance32,
18222
18450
  strokeWidth: distance32.optional(),
18223
- color: z114.string().optional(),
18224
- isFilled: z114.boolean().optional().default(false),
18225
- fillColor: z114.string().optional(),
18226
- isDashed: z114.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)
18227
18455
  });
18228
18456
  expectTypesMatch(
18229
18457
  true
@@ -18231,32 +18459,32 @@ expectTypesMatch(
18231
18459
 
18232
18460
  // lib/components/schematic-rect.ts
18233
18461
  import { distance as distance33, rotation as rotation9 } from "circuit-json";
18234
- import { z as z115 } from "zod";
18235
- var schematicRectProps = z115.object({
18462
+ import { z as z121 } from "zod";
18463
+ var schematicRectProps = z121.object({
18236
18464
  schX: distance33.optional(),
18237
18465
  schY: distance33.optional(),
18238
18466
  width: distance33,
18239
18467
  height: distance33,
18240
18468
  rotation: rotation9.default(0),
18241
18469
  strokeWidth: distance33.optional(),
18242
- color: z115.string().optional(),
18243
- isFilled: z115.boolean().optional().default(false),
18244
- fillColor: z115.string().optional(),
18245
- isDashed: z115.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)
18246
18474
  });
18247
18475
  expectTypesMatch(true);
18248
18476
 
18249
18477
  // lib/components/schematic-line.ts
18250
18478
  import { distance as distance34 } from "circuit-json";
18251
- import { z as z116 } from "zod";
18252
- var schematicLineProps = z116.object({
18479
+ import { z as z122 } from "zod";
18480
+ var schematicLineProps = z122.object({
18253
18481
  x1: distance34,
18254
18482
  y1: distance34,
18255
18483
  x2: distance34,
18256
18484
  y2: distance34,
18257
18485
  strokeWidth: distance34.optional(),
18258
- color: z116.string().optional(),
18259
- isDashed: z116.boolean().optional().default(false),
18486
+ color: z122.string().optional(),
18487
+ isDashed: z122.boolean().optional().default(false),
18260
18488
  dashLength: distance34.optional(),
18261
18489
  dashGap: distance34.optional()
18262
18490
  });
@@ -18264,11 +18492,11 @@ expectTypesMatch(true);
18264
18492
 
18265
18493
  // lib/components/schematic-text.ts
18266
18494
  import { distance as distance35, rotation as rotation10 } from "circuit-json";
18267
- import { z as z118 } from "zod";
18495
+ import { z as z124 } from "zod";
18268
18496
 
18269
18497
  // lib/common/fivePointAnchor.ts
18270
- import { z as z117 } from "zod";
18271
- var fivePointAnchor = z117.enum([
18498
+ import { z as z123 } from "zod";
18499
+ var fivePointAnchor = z123.enum([
18272
18500
  "center",
18273
18501
  "left",
18274
18502
  "right",
@@ -18277,39 +18505,39 @@ var fivePointAnchor = z117.enum([
18277
18505
  ]);
18278
18506
 
18279
18507
  // lib/components/schematic-text.ts
18280
- var schematicTextProps = z118.object({
18508
+ var schematicTextProps = z124.object({
18281
18509
  schX: distance35.optional(),
18282
18510
  schY: distance35.optional(),
18283
- text: z118.string(),
18284
- fontSize: z118.number().default(1),
18285
- anchor: z118.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18286
- color: z118.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"),
18287
18515
  schRotation: rotation10.default(0)
18288
18516
  });
18289
18517
  expectTypesMatch(true);
18290
18518
 
18291
18519
  // lib/components/schematic-path.ts
18292
18520
  import { distance as distance36, point as point7 } from "circuit-json";
18293
- import { z as z119 } from "zod";
18294
- var schematicPathProps = z119.object({
18295
- points: z119.array(point7).optional(),
18296
- svgPath: z119.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(),
18297
18525
  strokeWidth: distance36.optional(),
18298
- strokeColor: z119.string().optional(),
18526
+ strokeColor: z125.string().optional(),
18299
18527
  dashLength: distance36.optional(),
18300
18528
  dashGap: distance36.optional(),
18301
- isFilled: z119.boolean().optional().default(false),
18302
- fillColor: z119.string().optional()
18529
+ isFilled: z125.boolean().optional().default(false),
18530
+ fillColor: z125.string().optional()
18303
18531
  });
18304
18532
  expectTypesMatch(true);
18305
18533
 
18306
18534
  // lib/components/schematic-table.ts
18307
18535
  import { distance as distance37 } from "circuit-json";
18308
- import { z as z120 } from "zod";
18309
- var schematicTableProps = z120.object({
18536
+ import { z as z126 } from "zod";
18537
+ var schematicTableProps = z126.object({
18310
18538
  schX: distance37.optional(),
18311
18539
  schY: distance37.optional(),
18312
- children: z120.any().optional(),
18540
+ children: z126.any().optional(),
18313
18541
  cellPadding: distance37.optional(),
18314
18542
  borderWidth: distance37.optional(),
18315
18543
  anchor: ninePointAnchor.optional(),
@@ -18319,34 +18547,34 @@ expectTypesMatch(true);
18319
18547
 
18320
18548
  // lib/components/schematic-row.ts
18321
18549
  import { distance as distance38 } from "circuit-json";
18322
- import { z as z121 } from "zod";
18323
- var schematicRowProps = z121.object({
18324
- children: z121.any().optional(),
18550
+ import { z as z127 } from "zod";
18551
+ var schematicRowProps = z127.object({
18552
+ children: z127.any().optional(),
18325
18553
  height: distance38.optional()
18326
18554
  });
18327
18555
  expectTypesMatch(true);
18328
18556
 
18329
18557
  // lib/components/schematic-cell.ts
18330
18558
  import { distance as distance39 } from "circuit-json";
18331
- import { z as z122 } from "zod";
18332
- var schematicCellProps = z122.object({
18333
- children: z122.string().optional(),
18334
- horizontalAlign: z122.enum(["left", "center", "right"]).optional(),
18335
- verticalAlign: z122.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(),
18336
18564
  fontSize: distance39.optional(),
18337
- rowSpan: z122.number().optional(),
18338
- colSpan: z122.number().optional(),
18565
+ rowSpan: z128.number().optional(),
18566
+ colSpan: z128.number().optional(),
18339
18567
  width: distance39.optional(),
18340
- text: z122.string().optional()
18568
+ text: z128.string().optional()
18341
18569
  });
18342
18570
  expectTypesMatch(true);
18343
18571
 
18344
18572
  // lib/components/schematic-section.ts
18345
18573
  import { distance as distance40 } from "circuit-json";
18346
- import { z as z123 } from "zod";
18347
- var schematicSectionProps = z123.object({
18348
- displayName: z123.string().optional(),
18349
- name: z123.string(),
18574
+ import { z as z129 } from "zod";
18575
+ var schematicSectionProps = z129.object({
18576
+ displayName: z129.string().optional(),
18577
+ name: z129.string(),
18350
18578
  sectionTitleFontSize: distance40.optional()
18351
18579
  });
18352
18580
  expectTypesMatch(
@@ -18354,51 +18582,51 @@ expectTypesMatch(
18354
18582
  );
18355
18583
 
18356
18584
  // lib/components/schematic-sheet.ts
18357
- import { z as z124 } from "zod";
18358
- var schematicSheetProps = z124.object({
18359
- name: z124.string(),
18360
- displayName: z124.string(),
18361
- sheetIndex: z124.number().optional(),
18362
- children: z124.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()
18363
18591
  });
18364
18592
  expectTypesMatch(true);
18365
18593
 
18366
18594
  // lib/components/copper-text.ts
18367
18595
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18368
- import { z as z125 } from "zod";
18596
+ import { z as z131 } from "zod";
18369
18597
  var copperTextProps = pcbLayoutProps.extend({
18370
- text: z125.string(),
18598
+ text: z131.string(),
18371
18599
  anchorAlignment: ninePointAnchor.default("center"),
18372
- font: z125.enum(["tscircuit2024"]).optional(),
18600
+ font: z131.enum(["tscircuit2024"]).optional(),
18373
18601
  fontSize: length8.optional(),
18374
- layers: z125.array(layer_ref10).optional(),
18375
- knockout: z125.boolean().optional(),
18376
- mirrored: z125.boolean().optional()
18602
+ layers: z131.array(layer_ref10).optional(),
18603
+ knockout: z131.boolean().optional(),
18604
+ mirrored: z131.boolean().optional()
18377
18605
  });
18378
18606
 
18379
18607
  // lib/components/silkscreen-text.ts
18380
18608
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18381
- import { z as z126 } from "zod";
18609
+ import { z as z132 } from "zod";
18382
18610
  var silkscreenTextProps = pcbLayoutProps.extend({
18383
- text: z126.string(),
18611
+ text: z132.string(),
18384
18612
  anchorAlignment: ninePointAnchor.default("center"),
18385
- font: z126.enum(["tscircuit2024"]).optional(),
18613
+ font: z132.enum(["tscircuit2024"]).optional(),
18386
18614
  fontSize: length9.optional(),
18387
18615
  /**
18388
18616
  * If true, text will knock out underlying silkscreen
18389
18617
  */
18390
- isKnockout: z126.boolean().optional(),
18618
+ isKnockout: z132.boolean().optional(),
18391
18619
  knockoutPadding: length9.optional(),
18392
18620
  knockoutPaddingLeft: length9.optional(),
18393
18621
  knockoutPaddingRight: length9.optional(),
18394
18622
  knockoutPaddingTop: length9.optional(),
18395
18623
  knockoutPaddingBottom: length9.optional(),
18396
- layers: z126.array(layer_ref11).optional()
18624
+ layers: z132.array(layer_ref11).optional()
18397
18625
  });
18398
18626
 
18399
18627
  // lib/components/silkscreen-path.ts
18400
18628
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18401
- import { z as z127 } from "zod";
18629
+ import { z as z133 } from "zod";
18402
18630
  var silkscreenPathProps = pcbLayoutProps.omit({
18403
18631
  pcbLeftEdgeX: true,
18404
18632
  pcbRightEdgeX: true,
@@ -18410,7 +18638,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18410
18638
  pcbOffsetY: true,
18411
18639
  pcbRotation: true
18412
18640
  }).extend({
18413
- route: z127.array(route_hint_point5),
18641
+ route: z133.array(route_hint_point5),
18414
18642
  strokeWidth: length10.optional()
18415
18643
  });
18416
18644
 
@@ -18432,10 +18660,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18432
18660
 
18433
18661
  // lib/components/silkscreen-rect.ts
18434
18662
  import { distance as distance42 } from "circuit-json";
18435
- import { z as z128 } from "zod";
18663
+ import { z as z134 } from "zod";
18436
18664
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18437
- filled: z128.boolean().default(true).optional(),
18438
- stroke: z128.enum(["dashed", "solid", "none"]).optional(),
18665
+ filled: z134.boolean().default(true).optional(),
18666
+ stroke: z134.enum(["dashed", "solid", "none"]).optional(),
18439
18667
  strokeWidth: distance42.optional(),
18440
18668
  width: distance42,
18441
18669
  height: distance42,
@@ -18444,10 +18672,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18444
18672
 
18445
18673
  // lib/components/silkscreen-circle.ts
18446
18674
  import { distance as distance43 } from "circuit-json";
18447
- import { z as z129 } from "zod";
18675
+ import { z as z135 } from "zod";
18448
18676
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18449
- isFilled: z129.boolean().optional(),
18450
- isOutline: z129.boolean().optional(),
18677
+ isFilled: z135.boolean().optional(),
18678
+ isOutline: z135.boolean().optional(),
18451
18679
  strokeWidth: distance43.optional(),
18452
18680
  radius: distance43
18453
18681
  });
@@ -18465,63 +18693,63 @@ expectTypesMatch(true);
18465
18693
 
18466
18694
  // lib/components/trace-hint.ts
18467
18695
  import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18468
- import { z as z131 } from "zod";
18469
- var routeHintPointProps = z131.object({
18696
+ import { z as z137 } from "zod";
18697
+ var routeHintPointProps = z137.object({
18470
18698
  x: distance44,
18471
18699
  y: distance44,
18472
- via: z131.boolean().optional(),
18700
+ via: z137.boolean().optional(),
18473
18701
  toLayer: layer_ref12.optional()
18474
18702
  });
18475
- var traceHintProps = z131.object({
18476
- for: z131.string().optional().describe(
18703
+ var traceHintProps = z137.object({
18704
+ for: z137.string().optional().describe(
18477
18705
  "Selector for the port you're targeting, not required if you're inside a trace"
18478
18706
  ),
18479
- order: z131.number().optional(),
18707
+ order: z137.number().optional(),
18480
18708
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18481
- offsets: z131.array(route_hint_point6).or(z131.array(routeHintPointProps)).optional(),
18482
- traceWidth: z131.number().optional()
18709
+ offsets: z137.array(route_hint_point6).or(z137.array(routeHintPointProps)).optional(),
18710
+ traceWidth: z137.number().optional()
18483
18711
  });
18484
18712
 
18485
18713
  // lib/components/port.ts
18486
- import { z as z132 } from "zod";
18714
+ import { z as z138 } from "zod";
18487
18715
  var portProps = commonLayoutProps.extend({
18488
- name: z132.string().optional(),
18489
- pinNumber: z132.number().optional(),
18490
- schStemLength: z132.number().optional(),
18491
- aliases: z132.array(z132.string()).optional(),
18492
- layer: z132.string().optional(),
18493
- layers: z132.array(z132.string()).optional(),
18494
- schX: z132.number().optional(),
18495
- schY: z132.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(),
18496
18724
  direction: direction.optional(),
18497
- connectsTo: z132.string().or(z132.array(z132.string())).optional(),
18725
+ connectsTo: z138.string().or(z138.array(z138.string())).optional(),
18498
18726
  kicadPinMetadata: kicadPinMetadata.optional(),
18499
- hasInversionCircle: z132.boolean().optional()
18727
+ hasInversionCircle: z138.boolean().optional()
18500
18728
  });
18501
18729
 
18502
18730
  // lib/components/pcb-note-text.ts
18503
18731
  import { length as length11 } from "circuit-json";
18504
- import { z as z133 } from "zod";
18732
+ import { z as z139 } from "zod";
18505
18733
  var pcbNoteTextProps = pcbLayoutProps.extend({
18506
- text: z133.string(),
18507
- anchorAlignment: z133.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18508
- font: z133.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(),
18509
18737
  fontSize: length11.optional(),
18510
- color: z133.string().optional()
18738
+ color: z139.string().optional()
18511
18739
  });
18512
18740
  expectTypesMatch(true);
18513
18741
 
18514
18742
  // lib/components/pcb-note-rect.ts
18515
18743
  import { distance as distance45 } from "circuit-json";
18516
- import { z as z134 } from "zod";
18744
+ import { z as z140 } from "zod";
18517
18745
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18518
18746
  width: distance45,
18519
18747
  height: distance45,
18520
18748
  strokeWidth: distance45.optional(),
18521
- isFilled: z134.boolean().optional(),
18522
- hasStroke: z134.boolean().optional(),
18523
- isStrokeDashed: z134.boolean().optional(),
18524
- color: z134.string().optional(),
18749
+ isFilled: z140.boolean().optional(),
18750
+ hasStroke: z140.boolean().optional(),
18751
+ isStrokeDashed: z140.boolean().optional(),
18752
+ color: z140.string().optional(),
18525
18753
  cornerRadius: distance45.optional()
18526
18754
  });
18527
18755
  expectTypesMatch(true);
@@ -18531,7 +18759,7 @@ import {
18531
18759
  length as length12,
18532
18760
  route_hint_point as route_hint_point7
18533
18761
  } from "circuit-json";
18534
- import { z as z135 } from "zod";
18762
+ import { z as z141 } from "zod";
18535
18763
  var pcbNotePathProps = pcbLayoutProps.omit({
18536
18764
  pcbLeftEdgeX: true,
18537
18765
  pcbRightEdgeX: true,
@@ -18543,15 +18771,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18543
18771
  pcbOffsetY: true,
18544
18772
  pcbRotation: true
18545
18773
  }).extend({
18546
- route: z135.array(route_hint_point7),
18774
+ route: z141.array(route_hint_point7),
18547
18775
  strokeWidth: length12.optional(),
18548
- color: z135.string().optional()
18776
+ color: z141.string().optional()
18549
18777
  });
18550
18778
  expectTypesMatch(true);
18551
18779
 
18552
18780
  // lib/components/pcb-note-line.ts
18553
18781
  import { distance as distance46 } from "circuit-json";
18554
- import { z as z136 } from "zod";
18782
+ import { z as z142 } from "zod";
18555
18783
  var pcbNoteLineProps = pcbLayoutProps.omit({
18556
18784
  pcbLeftEdgeX: true,
18557
18785
  pcbRightEdgeX: true,
@@ -18568,15 +18796,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18568
18796
  x2: distance46,
18569
18797
  y2: distance46,
18570
18798
  strokeWidth: distance46.optional(),
18571
- color: z136.string().optional(),
18572
- isDashed: z136.boolean().optional()
18799
+ color: z142.string().optional(),
18800
+ isDashed: z142.boolean().optional()
18573
18801
  });
18574
18802
  expectTypesMatch(true);
18575
18803
 
18576
18804
  // lib/components/pcb-note-dimension.ts
18577
18805
  import { distance as distance47, length as length13 } from "circuit-json";
18578
- import { z as z137 } from "zod";
18579
- var dimensionTarget2 = z137.union([z137.string(), point]);
18806
+ import { z as z143 } from "zod";
18807
+ var dimensionTarget2 = z143.union([z143.string(), point]);
18580
18808
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18581
18809
  pcbLeftEdgeX: true,
18582
18810
  pcbRightEdgeX: true,
@@ -18590,101 +18818,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18590
18818
  }).extend({
18591
18819
  from: dimensionTarget2,
18592
18820
  to: dimensionTarget2,
18593
- text: z137.string().optional(),
18821
+ text: z143.string().optional(),
18594
18822
  offset: distance47.optional(),
18595
- font: z137.enum(["tscircuit2024"]).optional(),
18823
+ font: z143.enum(["tscircuit2024"]).optional(),
18596
18824
  fontSize: length13.optional(),
18597
- color: z137.string().optional(),
18825
+ color: z143.string().optional(),
18598
18826
  arrowSize: distance47.optional(),
18599
- units: z137.enum(["in", "mm"]).optional(),
18600
- outerEdgeToEdge: z137.literal(true).optional(),
18601
- centerToCenter: z137.literal(true).optional(),
18602
- innerEdgeToEdge: z137.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()
18603
18831
  });
18604
18832
  expectTypesMatch(
18605
18833
  true
18606
18834
  );
18607
18835
 
18608
18836
  // lib/platformConfig.ts
18609
- import { z as z138 } from "zod";
18610
- var unvalidatedCircuitJson = z138.array(z138.any()).describe("Circuit JSON");
18611
- var footprintLibraryResult = z138.object({
18612
- footprintCircuitJson: z138.array(z138.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()),
18613
18841
  cadModel: cadModelProp.optional()
18614
18842
  });
18615
- var pathToCircuitJsonFn = z138.function().args(z138.string()).returns(z138.promise(footprintLibraryResult)).or(
18616
- z138.function().args(
18617
- z138.string(),
18618
- z138.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18619
- ).returns(z138.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))
18620
18848
  ).describe("A function that takes a path and returns Circuit JSON");
18621
- var footprintFileParserEntry = z138.object({
18622
- loadFromUrl: z138.function().args(z138.string()).returns(z138.promise(footprintLibraryResult)).describe(
18849
+ var footprintFileParserEntry = z144.object({
18850
+ loadFromUrl: z144.function().args(z144.string()).returns(z144.promise(footprintLibraryResult)).describe(
18623
18851
  "A function that takes a footprint file URL and returns Circuit JSON"
18624
18852
  )
18625
18853
  });
18626
- var spiceEngineSimulationResult = z138.object({
18627
- engineVersionString: z138.string().optional(),
18854
+ var spiceEngineSimulationResult = z144.object({
18855
+ engineVersionString: z144.string().optional(),
18628
18856
  simulationResultCircuitJson: unvalidatedCircuitJson
18629
18857
  });
18630
- var spiceEngineZod = z138.object({
18631
- simulate: z138.function().args(z138.string()).returns(z138.promise(spiceEngineSimulationResult)).describe(
18858
+ var spiceEngineZod = z144.object({
18859
+ simulate: z144.function().args(z144.string()).returns(z144.promise(spiceEngineSimulationResult)).describe(
18632
18860
  "A function that takes a SPICE string and returns a simulation result"
18633
18861
  )
18634
18862
  });
18635
- var defaultSpiceEngine = z138.custom(
18863
+ var defaultSpiceEngine = z144.custom(
18636
18864
  (value) => typeof value === "string"
18637
18865
  );
18638
- var autorouterInstance = z138.object({
18639
- run: z138.function().args().returns(z138.promise(z138.unknown())).describe("Run the autorouter"),
18640
- getOutputSimpleRouteJson: z138.function().args().returns(z138.promise(z138.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")
18641
18869
  });
18642
- var autorouterDefinition = z138.object({
18643
- createAutorouter: z138.function().args(z138.any(), z138.any().optional()).returns(z138.union([autorouterInstance, z138.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")
18644
18872
  });
18645
- var platformFetch = z138.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18646
- var platformConfig = z138.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({
18647
18875
  partsEngine: partsEngine.optional(),
18648
18876
  autorouter: autorouterProp.optional(),
18649
- autorouterMap: z138.record(z138.string(), autorouterDefinition).optional(),
18877
+ autorouterMap: z144.record(z144.string(), autorouterDefinition).optional(),
18650
18878
  registryApiUrl: url.optional(),
18651
18879
  cloudAutorouterUrl: url.optional(),
18652
- projectName: z138.string().optional(),
18880
+ projectName: z144.string().optional(),
18653
18881
  projectBaseUrl: url.optional(),
18654
- version: z138.string().optional(),
18882
+ version: z144.string().optional(),
18655
18883
  url: url.optional(),
18656
- printBoardInformationToSilkscreen: z138.boolean().optional(),
18657
- includeBoardFiles: z138.array(z138.string()).describe(
18884
+ printBoardInformationToSilkscreen: z144.boolean().optional(),
18885
+ includeBoardFiles: z144.array(z144.string()).describe(
18658
18886
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18659
18887
  ).optional(),
18660
- snapshotsDir: z138.string().describe(
18888
+ snapshotsDir: z144.string().describe(
18661
18889
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18662
18890
  ).optional(),
18663
18891
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18664
- unitPreference: z138.enum(["mm", "in", "mil"]).optional(),
18665
- localCacheEngine: z138.any().optional(),
18666
- pcbDisabled: z138.boolean().optional(),
18667
- routingDisabled: z138.boolean().optional(),
18668
- schematicDisabled: z138.boolean().optional(),
18669
- partsEngineDisabled: z138.boolean().optional(),
18670
- drcChecksDisabled: z138.boolean().optional(),
18671
- netlistDrcChecksDisabled: z138.boolean().optional(),
18672
- routingDrcChecksDisabled: z138.boolean().optional(),
18673
- placementDrcChecksDisabled: z138.boolean().optional(),
18674
- pinSpecificationDrcChecksDisabled: z138.boolean().optional(),
18675
- spiceEngineMap: z138.record(z138.string(), spiceEngineZod).optional(),
18676
- footprintLibraryMap: z138.record(
18677
- z138.string(),
18678
- z138.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([
18679
18907
  pathToCircuitJsonFn,
18680
- z138.record(
18681
- z138.string(),
18682
- z138.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18908
+ z144.record(
18909
+ z144.string(),
18910
+ z144.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18683
18911
  )
18684
18912
  ])
18685
18913
  ).optional(),
18686
- footprintFileParserMap: z138.record(z138.string(), footprintFileParserEntry).optional(),
18687
- resolveProjectStaticFileImportUrl: z138.function().args(z138.string()).returns(z138.promise(z138.string())).describe(
18914
+ footprintFileParserMap: z144.record(z144.string(), footprintFileParserEntry).optional(),
18915
+ resolveProjectStaticFileImportUrl: z144.function().args(z144.string()).returns(z144.promise(z144.string())).describe(
18688
18916
  "A function that returns a string URL for static files for the project"
18689
18917
  ).optional(),
18690
18918
  platformFetch: platformFetch.optional()
@@ -18711,7 +18939,18 @@ export {
18711
18939
  ammeterPinLabels,
18712
18940
  ammeterPins,
18713
18941
  ammeterProps,
18942
+ analogAcSweepSimulationProps,
18943
+ analogAnalysisSimulationBaseProps,
18944
+ analogCapacitanceSweepParameterProps,
18945
+ analogCurrentSweepParameterProps,
18946
+ analogDcOperatingPointSimulationProps,
18947
+ analogDcSweepSimulationProps,
18948
+ analogInductanceSweepParameterProps,
18949
+ analogResistanceSweepParameterProps,
18714
18950
  analogSimulationProps,
18951
+ analogSweepParameterProps,
18952
+ analogTransientSimulationProps,
18953
+ analogVoltageSweepParameterProps,
18715
18954
  assemblyDeviceProps,
18716
18955
  assemblyProps,
18717
18956
  autorouterConfig,
@@ -18728,6 +18967,7 @@ export {
18728
18967
  breakoutPointProps,
18729
18968
  breakoutProps,
18730
18969
  bugProps,
18970
+ busProps,
18731
18971
  cadModelAxisDirection,
18732
18972
  cadModelAxisDirections,
18733
18973
  cadModelBase,