@tscircuit/props 0.0.600 → 0.0.602

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
@@ -16606,6 +16606,10 @@ import "zod";
16606
16606
  var subpanelProps = panelProps;
16607
16607
  expectTypesMatch(true);
16608
16608
 
16609
+ // lib/common/fanoutProps.ts
16610
+ import { layer_ref as layer_ref4 } from "circuit-json";
16611
+ import { z as z46 } from "zod";
16612
+
16609
16613
  // lib/common/fanoutBoundaryPadding.ts
16610
16614
  import { z as z45 } from "zod";
16611
16615
  var nonnegativeDistance = distance.refine((value) => value >= 0, {
@@ -16624,6 +16628,19 @@ expectTypesMatch(
16624
16628
  true
16625
16629
  );
16626
16630
 
16631
+ // lib/common/fanoutProps.ts
16632
+ var busFanoutDirection = z46.union([
16633
+ ninePointAnchor,
16634
+ z46.object({ direction: ninePointAnchor })
16635
+ ]);
16636
+ var fanoutProps = z46.object({
16637
+ busFanoutDirections: z46.record(busFanoutDirection).optional(),
16638
+ fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
16639
+ fanoutRoutingLayers: z46.array(layer_ref4).min(1).optional(),
16640
+ fanoutPourNetMap: z46.record(layer_ref4, z46.union([z46.string(), z46.array(z46.string()).min(1)])).optional()
16641
+ });
16642
+ expectTypesMatch(true);
16643
+
16627
16644
  // lib/components/breakout.ts
16628
16645
  import "zod";
16629
16646
  var breakoutProps = subcircuitGroupProps.extend({
@@ -16633,48 +16650,48 @@ var breakoutProps = subcircuitGroupProps.extend({
16633
16650
  paddingRight: distance.optional(),
16634
16651
  paddingTop: distance.optional(),
16635
16652
  paddingBottom: distance.optional(),
16636
- fanoutBoundaryPadding: fanoutBoundaryPadding.optional()
16653
+ ...fanoutProps.shape
16637
16654
  });
16638
16655
  expectTypesMatch(true);
16639
16656
 
16640
16657
  // lib/components/chip.ts
16641
16658
  import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
16642
16659
  import { isValidElement } from "react";
16643
- import { z as z47 } from "zod";
16644
- var connectionTarget2 = z47.string().or(z47.array(z47.string()).readonly()).or(z47.array(z47.string()));
16645
- var noConnectProp = z47.array(schematicPinLabel).readonly().or(z47.array(schematicPinLabel));
16646
- var connectionsProp = z47.custom().pipe(z47.record(z47.string(), connectionTarget2));
16647
- var spicemodelElement = z47.custom(
16660
+ import { z as z48 } from "zod";
16661
+ var connectionTarget2 = z48.string().or(z48.array(z48.string()).readonly()).or(z48.array(z48.string()));
16662
+ var noConnectProp = z48.array(schematicPinLabel).readonly().or(z48.array(schematicPinLabel));
16663
+ var connectionsProp = z48.custom().pipe(z48.record(z48.string(), connectionTarget2));
16664
+ var spicemodelElement = z48.custom(
16648
16665
  (v) => !!v && typeof v === "object" && "type" in v && "props" in v
16649
16666
  );
16650
- var internalCircuitElement = z47.custom(
16667
+ var internalCircuitElement = z48.custom(
16651
16668
  (value) => isValidElement(value) && value.type === "internalcircuit"
16652
16669
  );
16653
- var pinLabelsProp = z47.record(
16670
+ var pinLabelsProp = z48.record(
16654
16671
  schematicPinLabel,
16655
- schematicPinLabel.or(z47.array(schematicPinLabel).readonly()).or(z47.array(schematicPinLabel))
16672
+ schematicPinLabel.or(z48.array(schematicPinLabel).readonly()).or(z48.array(schematicPinLabel))
16656
16673
  );
16657
16674
  expectTypesMatch(true);
16658
- var pinCompatibleVariant = z47.object({
16659
- manufacturerPartNumber: z47.string().optional(),
16660
- supplierPartNumber: z47.record(supplier_name2, z47.array(z47.string())).optional()
16675
+ var pinCompatibleVariant = z48.object({
16676
+ manufacturerPartNumber: z48.string().optional(),
16677
+ supplierPartNumber: z48.record(supplier_name2, z48.array(z48.string())).optional()
16661
16678
  });
16662
16679
  var chipProps = commonComponentProps.extend({
16663
- manufacturerPartNumber: z47.string().optional(),
16680
+ manufacturerPartNumber: z48.string().optional(),
16664
16681
  pinLabels: pinLabelsProp.optional(),
16665
- showPinAliases: z47.boolean().optional(),
16666
- pcbPinLabels: z47.record(z47.string(), z47.string()).optional(),
16667
- internallyConnectedPins: z47.array(z47.array(z47.union([z47.string(), z47.number()]))).optional(),
16668
- externallyConnectedPins: z47.array(z47.array(z47.string())).optional(),
16682
+ showPinAliases: z48.boolean().optional(),
16683
+ pcbPinLabels: z48.record(z48.string(), z48.string()).optional(),
16684
+ internallyConnectedPins: z48.array(z48.array(z48.union([z48.string(), z48.number()]))).optional(),
16685
+ externallyConnectedPins: z48.array(z48.array(z48.string())).optional(),
16669
16686
  schPinArrangement: schematicPortArrangement.optional(),
16670
16687
  schPortArrangement: schematicPortArrangement.optional(),
16671
- pinCompatibleVariants: z47.array(pinCompatibleVariant).optional(),
16688
+ pinCompatibleVariants: z48.array(pinCompatibleVariant).optional(),
16672
16689
  schPinStyle: schematicPinStyle.optional(),
16673
16690
  schPinSpacing: distance12.optional(),
16674
16691
  schWidth: distance12.optional(),
16675
16692
  schHeight: distance12.optional(),
16676
- noSchematicRepresentation: z47.boolean().optional(),
16677
- schShowInternalCircuit: z47.boolean().optional().default(false),
16693
+ noSchematicRepresentation: z48.boolean().optional(),
16694
+ schShowInternalCircuit: z48.boolean().optional().default(false),
16678
16695
  noConnect: noConnectProp.optional(),
16679
16696
  connections: connectionsProp.optional(),
16680
16697
  spiceModel: spicemodelElement.optional(),
@@ -16689,75 +16706,75 @@ expectTypesMatch(true);
16689
16706
 
16690
16707
  // lib/components/jumper.ts
16691
16708
  import { distance as distance13 } from "circuit-json";
16692
- import { z as z48 } from "zod";
16709
+ import { z as z49 } from "zod";
16693
16710
  var jumperProps = commonComponentProps.extend({
16694
- manufacturerPartNumber: z48.string().optional(),
16695
- pinLabels: z48.record(
16696
- z48.number().or(schematicPinLabel),
16697
- schematicPinLabel.or(z48.array(schematicPinLabel))
16711
+ manufacturerPartNumber: z49.string().optional(),
16712
+ pinLabels: z49.record(
16713
+ z49.number().or(schematicPinLabel),
16714
+ schematicPinLabel.or(z49.array(schematicPinLabel))
16698
16715
  ).optional(),
16699
16716
  schPinStyle: schematicPinStyle.optional(),
16700
16717
  schPinSpacing: distance13.optional(),
16701
16718
  schWidth: distance13.optional(),
16702
16719
  schHeight: distance13.optional(),
16703
- schDirection: z48.enum(["left", "right"]).optional(),
16720
+ schDirection: z49.enum(["left", "right"]).optional(),
16704
16721
  schPinArrangement: schematicPinArrangement.optional(),
16705
16722
  schPortArrangement: schematicPortArrangement.optional(),
16706
- pcbPinLabels: z48.record(z48.string(), z48.string()).optional(),
16707
- pinCount: z48.union([z48.literal(2), z48.literal(3)]).optional(),
16708
- internallyConnectedPins: z48.array(z48.array(z48.union([z48.string(), z48.number()]))).optional(),
16709
- connections: z48.custom().pipe(z48.record(z48.string(), connectionTarget)).optional()
16723
+ pcbPinLabels: z49.record(z49.string(), z49.string()).optional(),
16724
+ pinCount: z49.union([z49.literal(2), z49.literal(3)]).optional(),
16725
+ internallyConnectedPins: z49.array(z49.array(z49.union([z49.string(), z49.number()]))).optional(),
16726
+ connections: z49.custom().pipe(z49.record(z49.string(), connectionTarget)).optional()
16710
16727
  });
16711
16728
  expectTypesMatch(true);
16712
16729
 
16713
16730
  // lib/components/solderjumper.ts
16714
- import { z as z49 } from "zod";
16731
+ import { z as z50 } from "zod";
16715
16732
  var solderjumperProps = jumperProps.extend({
16716
- bridgedPins: z49.array(z49.array(z49.string())).optional(),
16717
- bridged: z49.boolean().optional()
16733
+ bridgedPins: z50.array(z50.array(z50.string())).optional(),
16734
+ bridged: z50.boolean().optional()
16718
16735
  });
16719
16736
  expectTypesMatch(true);
16720
16737
 
16721
16738
  // lib/components/connector.ts
16722
- import { z as z50 } from "zod";
16739
+ import { z as z51 } from "zod";
16723
16740
  var connectorProps = chipProps.extend({
16724
- standard: z50.enum(["usb_c", "m2"]).optional()
16741
+ standard: z51.enum(["usb_c", "m2"]).optional()
16725
16742
  });
16726
16743
  expectTypesMatch(true);
16727
16744
 
16728
16745
  // lib/components/interconnect.ts
16729
- import { z as z51 } from "zod";
16746
+ import { z as z52 } from "zod";
16730
16747
  var interconnectProps = commonComponentProps.extend({
16731
- standard: z51.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16732
- pinLabels: z51.record(
16733
- z51.number().or(schematicPinLabel),
16734
- schematicPinLabel.or(z51.array(schematicPinLabel))
16748
+ standard: z52.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16749
+ pinLabels: z52.record(
16750
+ z52.number().or(schematicPinLabel),
16751
+ schematicPinLabel.or(z52.array(schematicPinLabel))
16735
16752
  ).optional(),
16736
- internallyConnectedPins: z51.array(z51.array(z51.union([z51.string(), z51.number()]))).optional()
16753
+ internallyConnectedPins: z52.array(z52.array(z52.union([z52.string(), z52.number()]))).optional()
16737
16754
  });
16738
16755
  expectTypesMatch(true);
16739
16756
 
16740
16757
  // lib/components/fuse.ts
16741
- import { z as z52 } from "zod";
16758
+ import { z as z53 } from "zod";
16742
16759
  var fusePinLabels = ["pin1", "pin2"];
16743
16760
  var fuseProps = commonComponentProps.extend({
16744
- currentRating: z52.union([z52.number(), z52.string()]),
16745
- voltageRating: z52.union([z52.number(), z52.string()]).optional(),
16746
- schShowRatings: z52.boolean().optional(),
16761
+ currentRating: z53.union([z53.number(), z53.string()]),
16762
+ voltageRating: z53.union([z53.number(), z53.string()]).optional(),
16763
+ schShowRatings: z53.boolean().optional(),
16747
16764
  schOrientation: schematicOrientation.optional(),
16748
- connections: z52.record(
16749
- z52.string(),
16750
- z52.union([
16751
- z52.string(),
16752
- z52.array(z52.string()).readonly(),
16753
- z52.array(z52.string())
16765
+ connections: z53.record(
16766
+ z53.string(),
16767
+ z53.union([
16768
+ z53.string(),
16769
+ z53.array(z53.string()).readonly(),
16770
+ z53.array(z53.string())
16754
16771
  ])
16755
16772
  ).optional()
16756
16773
  });
16757
16774
 
16758
16775
  // lib/components/platedhole.ts
16759
16776
  import { distance as distance14 } from "circuit-json";
16760
- import { z as z53 } from "zod";
16777
+ import { z as z54 } from "zod";
16761
16778
  var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
16762
16779
  var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
16763
16780
  var inferPlatedHoleShapeAndDefaults = (rawProps) => {
@@ -16789,26 +16806,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
16789
16806
  props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
16790
16807
  return props;
16791
16808
  };
16792
- var distanceHiddenUndefined = z53.custom().transform((a) => {
16809
+ var distanceHiddenUndefined = z54.custom().transform((a) => {
16793
16810
  if (a === void 0) return void 0;
16794
16811
  return distance14.parse(a);
16795
16812
  });
16796
- var platedHolePropsByShape = z53.discriminatedUnion("shape", [
16813
+ var platedHolePropsByShape = z54.discriminatedUnion("shape", [
16797
16814
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
16798
- name: z53.string().optional(),
16799
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16800
- shape: z53.literal("circle"),
16815
+ name: z54.string().optional(),
16816
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16817
+ shape: z54.literal("circle"),
16801
16818
  holeDiameter: distance14,
16802
16819
  outerDiameter: distance14,
16803
16820
  padDiameter: distance14.optional().describe("Diameter of the copper pad"),
16804
16821
  portHints: portHints.optional(),
16805
16822
  solderMaskMargin: distance14.optional(),
16806
- coveredWithSolderMask: z53.boolean().optional()
16823
+ coveredWithSolderMask: z54.boolean().optional()
16807
16824
  }),
16808
16825
  pcbLayoutProps.omit({ layer: true }).extend({
16809
- name: z53.string().optional(),
16810
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16811
- shape: z53.literal("oval"),
16826
+ name: z54.string().optional(),
16827
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16828
+ shape: z54.literal("oval"),
16812
16829
  outerWidth: distance14,
16813
16830
  outerHeight: distance14,
16814
16831
  holeWidth: distanceHiddenUndefined,
@@ -16817,13 +16834,13 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
16817
16834
  innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
16818
16835
  portHints: portHints.optional(),
16819
16836
  solderMaskMargin: distance14.optional(),
16820
- coveredWithSolderMask: z53.boolean().optional()
16837
+ coveredWithSolderMask: z54.boolean().optional()
16821
16838
  }),
16822
16839
  pcbLayoutProps.omit({ layer: true }).extend({
16823
- name: z53.string().optional(),
16824
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16825
- shape: z53.literal("pill"),
16826
- rectPad: z53.boolean().optional(),
16840
+ name: z54.string().optional(),
16841
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16842
+ shape: z54.literal("pill"),
16843
+ rectPad: z54.boolean().optional(),
16827
16844
  outerWidth: distance14,
16828
16845
  outerHeight: distance14,
16829
16846
  holeWidth: distanceHiddenUndefined,
@@ -16834,30 +16851,30 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
16834
16851
  holeOffsetX: distance14.optional(),
16835
16852
  holeOffsetY: distance14.optional(),
16836
16853
  solderMaskMargin: distance14.optional(),
16837
- coveredWithSolderMask: z53.boolean().optional()
16854
+ coveredWithSolderMask: z54.boolean().optional()
16838
16855
  }),
16839
16856
  pcbLayoutProps.omit({ layer: true }).extend({
16840
- name: z53.string().optional(),
16841
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16842
- shape: z53.literal("circular_hole_with_rect_pad"),
16857
+ name: z54.string().optional(),
16858
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16859
+ shape: z54.literal("circular_hole_with_rect_pad"),
16843
16860
  holeDiameter: distance14,
16844
16861
  rectPadWidth: distance14,
16845
16862
  rectPadHeight: distance14,
16846
16863
  rectBorderRadius: distance14.optional(),
16847
- holeShape: z53.literal("circle").optional(),
16848
- padShape: z53.literal("rect").optional(),
16864
+ holeShape: z54.literal("circle").optional(),
16865
+ padShape: z54.literal("rect").optional(),
16849
16866
  portHints: portHints.optional(),
16850
16867
  holeOffsetX: distance14.optional(),
16851
16868
  holeOffsetY: distance14.optional(),
16852
16869
  solderMaskMargin: distance14.optional(),
16853
- coveredWithSolderMask: z53.boolean().optional()
16870
+ coveredWithSolderMask: z54.boolean().optional()
16854
16871
  }),
16855
16872
  pcbLayoutProps.omit({ layer: true }).extend({
16856
- name: z53.string().optional(),
16857
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16858
- shape: z53.literal("pill_hole_with_rect_pad"),
16859
- holeShape: z53.literal("pill").optional(),
16860
- padShape: z53.literal("rect").optional(),
16873
+ name: z54.string().optional(),
16874
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16875
+ shape: z54.literal("pill_hole_with_rect_pad"),
16876
+ holeShape: z54.literal("pill").optional(),
16877
+ padShape: z54.literal("rect").optional(),
16861
16878
  holeWidth: distance14,
16862
16879
  holeHeight: distance14,
16863
16880
  rectPadWidth: distance14,
@@ -16867,22 +16884,22 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
16867
16884
  holeOffsetX: distance14.optional(),
16868
16885
  holeOffsetY: distance14.optional(),
16869
16886
  solderMaskMargin: distance14.optional(),
16870
- coveredWithSolderMask: z53.boolean().optional()
16887
+ coveredWithSolderMask: z54.boolean().optional()
16871
16888
  }),
16872
16889
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
16873
- name: z53.string().optional(),
16874
- connectsTo: z53.string().or(z53.array(z53.string())).optional(),
16875
- shape: z53.literal("hole_with_polygon_pad"),
16876
- holeShape: z53.enum(["circle", "oval", "pill", "rotated_pill"]),
16890
+ name: z54.string().optional(),
16891
+ connectsTo: z54.string().or(z54.array(z54.string())).optional(),
16892
+ shape: z54.literal("hole_with_polygon_pad"),
16893
+ holeShape: z54.enum(["circle", "oval", "pill", "rotated_pill"]),
16877
16894
  holeDiameter: distance14.optional(),
16878
16895
  holeWidth: distance14.optional(),
16879
16896
  holeHeight: distance14.optional(),
16880
- padOutline: z53.array(point),
16897
+ padOutline: z54.array(point),
16881
16898
  holeOffsetX: distance14,
16882
16899
  holeOffsetY: distance14,
16883
16900
  portHints: portHints.optional(),
16884
16901
  solderMaskMargin: distance14.optional(),
16885
- coveredWithSolderMask: z53.boolean().optional()
16902
+ coveredWithSolderMask: z54.boolean().optional()
16886
16903
  })
16887
16904
  ]).transform((a) => {
16888
16905
  if ("innerWidth" in a && a.innerWidth !== void 0) {
@@ -16893,7 +16910,7 @@ var platedHolePropsByShape = z53.discriminatedUnion("shape", [
16893
16910
  }
16894
16911
  return a;
16895
16912
  });
16896
- var platedHoleProps = z53.preprocess(
16913
+ var platedHoleProps = z54.preprocess(
16897
16914
  inferPlatedHoleShapeAndDefaults,
16898
16915
  platedHolePropsByShape
16899
16916
  );
@@ -16901,7 +16918,7 @@ expectTypesMatch(true);
16901
16918
 
16902
16919
  // lib/components/resistor.ts
16903
16920
  import { resistance } from "circuit-json";
16904
- import { z as z54 } from "zod";
16921
+ import { z as z55 } from "zod";
16905
16922
  var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
16906
16923
  var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
16907
16924
  "01005",
@@ -16925,7 +16942,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
16925
16942
  var resistorProps = commonComponentProps.extend({
16926
16943
  footprint: resistorFootprintProp,
16927
16944
  resistance,
16928
- tolerance: z54.union([z54.string(), z54.number()]).transform((val) => {
16945
+ tolerance: z55.union([z55.string(), z55.number()]).transform((val) => {
16929
16946
  if (typeof val === "string") {
16930
16947
  if (val.endsWith("%")) {
16931
16948
  return parseFloat(val.slice(0, -1)) / 100;
@@ -16934,12 +16951,12 @@ var resistorProps = commonComponentProps.extend({
16934
16951
  }
16935
16952
  return val;
16936
16953
  }).pipe(
16937
- z54.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
16954
+ z55.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
16938
16955
  ).optional(),
16939
- pullupFor: z54.string().optional(),
16940
- pullupTo: z54.string().optional(),
16941
- pulldownFor: z54.string().optional(),
16942
- pulldownTo: z54.string().optional(),
16956
+ pullupFor: z55.string().optional(),
16957
+ pullupTo: z55.string().optional(),
16958
+ pulldownFor: z55.string().optional(),
16959
+ pulldownTo: z55.string().optional(),
16943
16960
  schOrientation: schematicOrientation.optional(),
16944
16961
  schSize: schematicSymbolSize.optional(),
16945
16962
  connections: createConnectionsProp(resistorPinLabels).optional()
@@ -16949,18 +16966,18 @@ expectTypesMatch(true);
16949
16966
 
16950
16967
  // lib/components/potentiometer.ts
16951
16968
  import { resistance as resistance2 } from "circuit-json";
16952
- import { z as z55 } from "zod";
16969
+ import { z as z56 } from "zod";
16953
16970
  var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
16954
16971
  var potentiometerProps = commonComponentProps.extend({
16955
16972
  maxResistance: resistance2,
16956
- pinVariant: z55.enum(["two_pin", "three_pin"]).optional(),
16973
+ pinVariant: z56.enum(["two_pin", "three_pin"]).optional(),
16957
16974
  connections: createConnectionsProp(potentiometerPinLabels).optional()
16958
16975
  });
16959
16976
  expectTypesMatch(true);
16960
16977
 
16961
16978
  // lib/components/crystal.ts
16962
16979
  import { capacitance, distance as distance15, frequency } from "circuit-json";
16963
- import { z as z56 } from "zod";
16980
+ import { z as z57 } from "zod";
16964
16981
  var crystalPins = [
16965
16982
  "pin1",
16966
16983
  "left",
@@ -16973,9 +16990,9 @@ var crystalProps = commonComponentProps.extend({
16973
16990
  frequency,
16974
16991
  loadCapacitance: capacitance,
16975
16992
  maxTraceLength: distance15.optional(),
16976
- manufacturerPartNumber: z56.string().optional(),
16977
- mpn: z56.string().optional(),
16978
- pinVariant: z56.enum(["two_pin", "four_pin"]).optional(),
16993
+ manufacturerPartNumber: z57.string().optional(),
16994
+ mpn: z57.string().optional(),
16995
+ pinVariant: z57.enum(["two_pin", "four_pin"]).optional(),
16979
16996
  schOrientation: schematicOrientation.optional(),
16980
16997
  connections: createConnectionsProp(crystalPins).optional()
16981
16998
  });
@@ -16983,34 +17000,34 @@ expectTypesMatch(true);
16983
17000
 
16984
17001
  // lib/components/resonator.ts
16985
17002
  import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
16986
- import { z as z57 } from "zod";
17003
+ import { z as z58 } from "zod";
16987
17004
  var resonatorProps = commonComponentProps.extend({
16988
17005
  frequency: frequency2,
16989
17006
  loadCapacitance: capacitance2,
16990
- pinVariant: z57.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
17007
+ pinVariant: z58.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
16991
17008
  });
16992
17009
  expectTypesMatch(true);
16993
17010
 
16994
17011
  // lib/components/stampboard.ts
16995
17012
  import { distance as distance16 } from "circuit-json";
16996
- import { z as z58 } from "zod";
17013
+ import { z as z59 } from "zod";
16997
17014
  var stampboardProps = boardProps.extend({
16998
- leftPinCount: z58.number().optional(),
16999
- rightPinCount: z58.number().optional(),
17000
- topPinCount: z58.number().optional(),
17001
- bottomPinCount: z58.number().optional(),
17002
- leftPins: z58.array(z58.string()).optional(),
17003
- rightPins: z58.array(z58.string()).optional(),
17004
- topPins: z58.array(z58.string()).optional(),
17005
- bottomPins: z58.array(z58.string()).optional(),
17015
+ leftPinCount: z59.number().optional(),
17016
+ rightPinCount: z59.number().optional(),
17017
+ topPinCount: z59.number().optional(),
17018
+ bottomPinCount: z59.number().optional(),
17019
+ leftPins: z59.array(z59.string()).optional(),
17020
+ rightPins: z59.array(z59.string()).optional(),
17021
+ topPins: z59.array(z59.string()).optional(),
17022
+ bottomPins: z59.array(z59.string()).optional(),
17006
17023
  pinPitch: distance16.optional(),
17007
- innerHoles: z58.boolean().optional()
17024
+ innerHoles: z59.boolean().optional()
17008
17025
  });
17009
17026
  expectTypesMatch(true);
17010
17027
 
17011
17028
  // lib/components/capacitor.ts
17012
17029
  import { capacitance as capacitance3, voltage } from "circuit-json";
17013
- import { z as z59 } from "zod";
17030
+ import { z as z60 } from "zod";
17014
17031
  var capacitorPinLabels = [
17015
17032
  "pin1",
17016
17033
  "pin2",
@@ -17022,13 +17039,13 @@ var capacitorPinLabels = [
17022
17039
  var capacitorProps = commonComponentProps.extend({
17023
17040
  capacitance: capacitance3,
17024
17041
  maxVoltageRating: voltage.optional(),
17025
- schShowRatings: z59.boolean().optional().default(false),
17026
- polarized: z59.boolean().optional().default(false),
17027
- decouplingFor: z59.string().optional(),
17028
- decouplingTo: z59.string().optional(),
17029
- bypassFor: z59.string().optional(),
17030
- bypassTo: z59.string().optional(),
17031
- maxDecouplingTraceLength: z59.number().optional(),
17042
+ schShowRatings: z60.boolean().optional().default(false),
17043
+ polarized: z60.boolean().optional().default(false),
17044
+ decouplingFor: z60.string().optional(),
17045
+ decouplingTo: z60.string().optional(),
17046
+ bypassFor: z60.string().optional(),
17047
+ bypassTo: z60.string().optional(),
17048
+ maxDecouplingTraceLength: z60.number().optional(),
17032
17049
  schOrientation: schematicOrientation.optional(),
17033
17050
  schSize: schematicSymbolSize.optional(),
17034
17051
  connections: createConnectionsProp(capacitorPinLabels).optional()
@@ -17038,14 +17055,14 @@ expectTypesMatch(true);
17038
17055
 
17039
17056
  // lib/components/net.ts
17040
17057
  import { distance as distance17 } from "circuit-json";
17041
- import { z as z60 } from "zod";
17042
- var netProps = z60.object({
17043
- name: z60.string(),
17044
- connectsTo: z60.string().or(z60.array(z60.string())).optional(),
17045
- routingPhaseIndex: z60.number().nullable().optional(),
17046
- highlightColor: z60.string().optional(),
17047
- isPowerNet: z60.boolean().optional(),
17048
- isGroundNet: z60.boolean().optional(),
17058
+ import { z as z61 } from "zod";
17059
+ var netProps = z61.object({
17060
+ name: z61.string(),
17061
+ connectsTo: z61.string().or(z61.array(z61.string())).optional(),
17062
+ routingPhaseIndex: z61.number().nullable().optional(),
17063
+ highlightColor: z61.string().optional(),
17064
+ isPowerNet: z61.boolean().optional(),
17065
+ isGroundNet: z61.boolean().optional(),
17049
17066
  nominalTraceWidth: distance17.optional()
17050
17067
  });
17051
17068
  expectTypesMatch(true);
@@ -17059,55 +17076,55 @@ var fiducialProps = commonComponentProps.extend({
17059
17076
  expectTypesMatch(true);
17060
17077
 
17061
17078
  // lib/components/constrainedlayout.ts
17062
- import { z as z62 } from "zod";
17063
- var constrainedLayoutProps = z62.object({
17064
- name: z62.string().optional(),
17065
- pcbOnly: z62.boolean().optional(),
17066
- schOnly: z62.boolean().optional()
17079
+ import { z as z63 } from "zod";
17080
+ var constrainedLayoutProps = z63.object({
17081
+ name: z63.string().optional(),
17082
+ pcbOnly: z63.boolean().optional(),
17083
+ schOnly: z63.boolean().optional()
17067
17084
  });
17068
17085
  expectTypesMatch(true);
17069
17086
 
17070
17087
  // lib/components/constraint.ts
17071
- import { z as z63 } from "zod";
17072
- var pcbXDistConstraintProps = z63.object({
17073
- pcb: z63.literal(true).optional(),
17088
+ import { z as z64 } from "zod";
17089
+ var pcbXDistConstraintProps = z64.object({
17090
+ pcb: z64.literal(true).optional(),
17074
17091
  xDist: distance,
17075
- left: z63.string(),
17076
- right: z63.string(),
17077
- edgeToEdge: z63.literal(true).optional(),
17078
- centerToCenter: z63.literal(true).optional()
17092
+ left: z64.string(),
17093
+ right: z64.string(),
17094
+ edgeToEdge: z64.literal(true).optional(),
17095
+ centerToCenter: z64.literal(true).optional()
17079
17096
  });
17080
17097
  expectTypesMatch(
17081
17098
  true
17082
17099
  );
17083
- var pcbYDistConstraintProps = z63.object({
17084
- pcb: z63.literal(true).optional(),
17100
+ var pcbYDistConstraintProps = z64.object({
17101
+ pcb: z64.literal(true).optional(),
17085
17102
  yDist: distance,
17086
- top: z63.string(),
17087
- bottom: z63.string(),
17088
- edgeToEdge: z63.literal(true).optional(),
17089
- centerToCenter: z63.literal(true).optional()
17103
+ top: z64.string(),
17104
+ bottom: z64.string(),
17105
+ edgeToEdge: z64.literal(true).optional(),
17106
+ centerToCenter: z64.literal(true).optional()
17090
17107
  });
17091
17108
  expectTypesMatch(
17092
17109
  true
17093
17110
  );
17094
- var pcbSameYConstraintProps = z63.object({
17095
- pcb: z63.literal(true).optional(),
17096
- sameY: z63.literal(true).optional(),
17097
- for: z63.array(z63.string())
17111
+ var pcbSameYConstraintProps = z64.object({
17112
+ pcb: z64.literal(true).optional(),
17113
+ sameY: z64.literal(true).optional(),
17114
+ for: z64.array(z64.string())
17098
17115
  });
17099
17116
  expectTypesMatch(
17100
17117
  true
17101
17118
  );
17102
- var pcbSameXConstraintProps = z63.object({
17103
- pcb: z63.literal(true).optional(),
17104
- sameX: z63.literal(true).optional(),
17105
- for: z63.array(z63.string())
17119
+ var pcbSameXConstraintProps = z64.object({
17120
+ pcb: z64.literal(true).optional(),
17121
+ sameX: z64.literal(true).optional(),
17122
+ for: z64.array(z64.string())
17106
17123
  });
17107
17124
  expectTypesMatch(
17108
17125
  true
17109
17126
  );
17110
- var constraintProps = z63.union([
17127
+ var constraintProps = z64.union([
17111
17128
  pcbXDistConstraintProps,
17112
17129
  pcbYDistConstraintProps,
17113
17130
  pcbSameYConstraintProps,
@@ -17116,13 +17133,13 @@ var constraintProps = z63.union([
17116
17133
  expectTypesMatch(true);
17117
17134
 
17118
17135
  // lib/components/cutout.ts
17119
- import { z as z64 } from "zod";
17136
+ import { z as z65 } from "zod";
17120
17137
  var rectCutoutProps = pcbLayoutProps.omit({
17121
17138
  layer: true,
17122
17139
  pcbRotation: true
17123
17140
  }).extend({
17124
- name: z64.string().optional(),
17125
- shape: z64.literal("rect"),
17141
+ name: z65.string().optional(),
17142
+ shape: z65.literal("rect"),
17126
17143
  width: distance,
17127
17144
  height: distance
17128
17145
  });
@@ -17131,8 +17148,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
17131
17148
  layer: true,
17132
17149
  pcbRotation: true
17133
17150
  }).extend({
17134
- name: z64.string().optional(),
17135
- shape: z64.literal("circle"),
17151
+ name: z65.string().optional(),
17152
+ shape: z65.literal("circle"),
17136
17153
  radius: distance
17137
17154
  });
17138
17155
  expectTypesMatch(true);
@@ -17140,36 +17157,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
17140
17157
  layer: true,
17141
17158
  pcbRotation: true
17142
17159
  }).extend({
17143
- name: z64.string().optional(),
17144
- shape: z64.literal("polygon"),
17145
- points: z64.array(point)
17160
+ name: z65.string().optional(),
17161
+ shape: z65.literal("polygon"),
17162
+ points: z65.array(point)
17146
17163
  });
17147
17164
  expectTypesMatch(true);
17148
- var cutoutProps = z64.discriminatedUnion("shape", [
17165
+ var cutoutProps = z65.discriminatedUnion("shape", [
17149
17166
  rectCutoutProps,
17150
17167
  circleCutoutProps,
17151
17168
  polygonCutoutProps
17152
17169
  ]);
17153
17170
 
17154
17171
  // lib/components/drc-check.ts
17155
- import { z as z65 } from "zod";
17156
- var drcCheckProps = z65.object({
17157
- name: z65.string().optional(),
17172
+ import { z as z66 } from "zod";
17173
+ var drcCheckProps = z66.object({
17174
+ name: z66.string().optional(),
17158
17175
  checkFn: customDrcCheckFn
17159
17176
  });
17160
17177
  expectTypesMatch(true);
17161
17178
 
17162
17179
  // lib/components/smtpad.ts
17163
- import { z as z66 } from "zod";
17180
+ import { z as z67 } from "zod";
17164
17181
  var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17165
- name: z66.string().optional(),
17166
- shape: z66.literal("rect"),
17182
+ name: z67.string().optional(),
17183
+ shape: z67.literal("rect"),
17167
17184
  width: distance,
17168
17185
  height: distance,
17169
17186
  rectBorderRadius: distance.optional(),
17170
17187
  cornerRadius: distance.optional(),
17171
17188
  portHints: portHints.optional(),
17172
- coveredWithSolderMask: z66.boolean().optional(),
17189
+ coveredWithSolderMask: z67.boolean().optional(),
17173
17190
  solderMaskMargin: distance.optional(),
17174
17191
  solderMaskMarginLeft: distance.optional(),
17175
17192
  solderMaskMarginRight: distance.optional(),
@@ -17179,14 +17196,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17179
17196
  });
17180
17197
  expectTypesMatch(true);
17181
17198
  var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17182
- name: z66.string().optional(),
17183
- shape: z66.literal("rotated_rect"),
17199
+ name: z67.string().optional(),
17200
+ shape: z67.literal("rotated_rect"),
17184
17201
  width: distance,
17185
17202
  height: distance,
17186
- ccwRotation: z66.number(),
17203
+ ccwRotation: z67.number(),
17187
17204
  cornerRadius: distance.optional(),
17188
17205
  portHints: portHints.optional(),
17189
- coveredWithSolderMask: z66.boolean().optional(),
17206
+ coveredWithSolderMask: z67.boolean().optional(),
17190
17207
  solderMaskMargin: distance.optional(),
17191
17208
  solderMaskMarginLeft: distance.optional(),
17192
17209
  solderMaskMarginRight: distance.optional(),
@@ -17196,38 +17213,38 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17196
17213
  });
17197
17214
  expectTypesMatch(true);
17198
17215
  var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17199
- name: z66.string().optional(),
17200
- shape: z66.literal("circle"),
17216
+ name: z67.string().optional(),
17217
+ shape: z67.literal("circle"),
17201
17218
  radius: distance,
17202
17219
  portHints: portHints.optional(),
17203
- coveredWithSolderMask: z66.boolean().optional(),
17220
+ coveredWithSolderMask: z67.boolean().optional(),
17204
17221
  solderMaskMargin: distance.optional(),
17205
17222
  solderPasteMargin: distance.optional()
17206
17223
  });
17207
17224
  expectTypesMatch(true);
17208
17225
  var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17209
- name: z66.string().optional(),
17210
- shape: z66.literal("pill"),
17226
+ name: z67.string().optional(),
17227
+ shape: z67.literal("pill"),
17211
17228
  width: distance,
17212
17229
  height: distance,
17213
17230
  radius: distance,
17214
17231
  portHints: portHints.optional(),
17215
- coveredWithSolderMask: z66.boolean().optional(),
17232
+ coveredWithSolderMask: z67.boolean().optional(),
17216
17233
  solderMaskMargin: distance.optional(),
17217
17234
  solderPasteMargin: distance.optional()
17218
17235
  });
17219
17236
  expectTypesMatch(true);
17220
17237
  var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17221
- name: z66.string().optional(),
17222
- shape: z66.literal("polygon"),
17223
- points: z66.array(point),
17238
+ name: z67.string().optional(),
17239
+ shape: z67.literal("polygon"),
17240
+ points: z67.array(point),
17224
17241
  portHints: portHints.optional(),
17225
- coveredWithSolderMask: z66.boolean().optional(),
17242
+ coveredWithSolderMask: z67.boolean().optional(),
17226
17243
  solderMaskMargin: distance.optional(),
17227
17244
  solderPasteMargin: distance.optional()
17228
17245
  });
17229
17246
  expectTypesMatch(true);
17230
- var smtPadProps = z66.discriminatedUnion("shape", [
17247
+ var smtPadProps = z67.discriminatedUnion("shape", [
17231
17248
  circleSmtPadProps,
17232
17249
  rectSmtPadProps,
17233
17250
  rotatedRectSmtPadProps,
@@ -17237,63 +17254,63 @@ var smtPadProps = z66.discriminatedUnion("shape", [
17237
17254
  expectTypesMatch(true);
17238
17255
 
17239
17256
  // lib/components/solderpaste.ts
17240
- import { z as z67 } from "zod";
17257
+ import { z as z68 } from "zod";
17241
17258
  var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17242
- shape: z67.literal("rect"),
17259
+ shape: z68.literal("rect"),
17243
17260
  width: distance,
17244
17261
  height: distance
17245
17262
  });
17246
17263
  expectTypesMatch(true);
17247
17264
  var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17248
- shape: z67.literal("circle"),
17265
+ shape: z68.literal("circle"),
17249
17266
  radius: distance
17250
17267
  });
17251
17268
  expectTypesMatch(true);
17252
- var solderPasteProps = z67.union([
17269
+ var solderPasteProps = z68.union([
17253
17270
  circleSolderPasteProps,
17254
17271
  rectSolderPasteProps
17255
17272
  ]);
17256
17273
  expectTypesMatch(true);
17257
17274
 
17258
17275
  // lib/components/hole.ts
17259
- import { z as z68 } from "zod";
17276
+ import { z as z69 } from "zod";
17260
17277
  var circleHoleProps = pcbLayoutProps.extend({
17261
- name: z68.string().optional(),
17262
- shape: z68.literal("circle").optional(),
17278
+ name: z69.string().optional(),
17279
+ shape: z69.literal("circle").optional(),
17263
17280
  diameter: distance.optional(),
17264
17281
  radius: distance.optional(),
17265
17282
  solderMaskMargin: distance.optional(),
17266
- coveredWithSolderMask: z68.boolean().optional()
17283
+ coveredWithSolderMask: z69.boolean().optional()
17267
17284
  }).transform((d) => ({
17268
17285
  ...d,
17269
17286
  diameter: d.diameter ?? 2 * d.radius,
17270
17287
  radius: d.radius ?? d.diameter / 2
17271
17288
  }));
17272
17289
  var pillHoleProps = pcbLayoutProps.extend({
17273
- name: z68.string().optional(),
17274
- shape: z68.literal("pill"),
17290
+ name: z69.string().optional(),
17291
+ shape: z69.literal("pill"),
17275
17292
  width: distance,
17276
17293
  height: distance,
17277
17294
  solderMaskMargin: distance.optional(),
17278
- coveredWithSolderMask: z68.boolean().optional()
17295
+ coveredWithSolderMask: z69.boolean().optional()
17279
17296
  });
17280
17297
  var ovalHoleProps = pcbLayoutProps.extend({
17281
- name: z68.string().optional(),
17282
- shape: z68.literal("oval"),
17298
+ name: z69.string().optional(),
17299
+ shape: z69.literal("oval"),
17283
17300
  width: distance,
17284
17301
  height: distance,
17285
17302
  solderMaskMargin: distance.optional(),
17286
- coveredWithSolderMask: z68.boolean().optional()
17303
+ coveredWithSolderMask: z69.boolean().optional()
17287
17304
  });
17288
17305
  var rectHoleProps = pcbLayoutProps.extend({
17289
- name: z68.string().optional(),
17290
- shape: z68.literal("rect"),
17306
+ name: z69.string().optional(),
17307
+ shape: z69.literal("rect"),
17291
17308
  width: distance,
17292
17309
  height: distance,
17293
17310
  solderMaskMargin: distance.optional(),
17294
- coveredWithSolderMask: z68.boolean().optional()
17311
+ coveredWithSolderMask: z69.boolean().optional()
17295
17312
  });
17296
- var holeProps = z68.union([
17313
+ var holeProps = z69.union([
17297
17314
  circleHoleProps,
17298
17315
  pillHoleProps,
17299
17316
  ovalHoleProps,
@@ -17302,58 +17319,58 @@ var holeProps = z68.union([
17302
17319
  expectTypesMatch(true);
17303
17320
 
17304
17321
  // lib/components/trace.ts
17305
- import { distance as distance18, layer_ref as layer_ref4, route_hint_point as route_hint_point2 } from "circuit-json";
17306
- import { z as z69 } from "zod";
17307
- var portRef = z69.union([
17308
- z69.string(),
17309
- z69.custom(
17322
+ import { distance as distance18, layer_ref as layer_ref5, route_hint_point as route_hint_point2 } from "circuit-json";
17323
+ import { z as z70 } from "zod";
17324
+ var portRef = z70.union([
17325
+ z70.string(),
17326
+ z70.custom(
17310
17327
  (v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
17311
17328
  )
17312
17329
  ]);
17313
17330
  var pcbPathPoint = point.extend({
17314
- via: z69.boolean().optional(),
17315
- fromLayer: layer_ref4.optional(),
17316
- toLayer: layer_ref4.optional()
17331
+ via: z70.boolean().optional(),
17332
+ fromLayer: layer_ref5.optional(),
17333
+ toLayer: layer_ref5.optional()
17317
17334
  }).superRefine((value, ctx) => {
17318
17335
  if (value.via) {
17319
17336
  if (!value.toLayer) {
17320
17337
  ctx.addIssue({
17321
- code: z69.ZodIssueCode.custom,
17338
+ code: z70.ZodIssueCode.custom,
17322
17339
  message: "toLayer is required when via is true",
17323
17340
  path: ["toLayer"]
17324
17341
  });
17325
17342
  }
17326
17343
  } else if (value.fromLayer || value.toLayer) {
17327
17344
  ctx.addIssue({
17328
- code: z69.ZodIssueCode.custom,
17345
+ code: z70.ZodIssueCode.custom,
17329
17346
  message: "fromLayer/toLayer are only allowed when via is true",
17330
17347
  path: ["via"]
17331
17348
  });
17332
17349
  }
17333
17350
  });
17334
- var pcbPath = z69.array(z69.union([pcbPathPoint, z69.string()]));
17335
- var baseTraceProps = z69.object({
17336
- key: z69.string().optional(),
17337
- name: z69.string().optional(),
17338
- displayName: z69.string().optional(),
17351
+ var pcbPath = z70.array(z70.union([pcbPathPoint, z70.string()]));
17352
+ var baseTraceProps = z70.object({
17353
+ key: z70.string().optional(),
17354
+ name: z70.string().optional(),
17355
+ displayName: z70.string().optional(),
17339
17356
  thickness: distance18.optional(),
17340
17357
  width: distance18.optional().describe("Alias for trace thickness"),
17341
- schematicRouteHints: z69.array(point).optional(),
17342
- pcbRouteHints: z69.array(route_hint_point2).optional(),
17343
- pcbPathRelativeTo: z69.string().optional(),
17358
+ schematicRouteHints: z70.array(point).optional(),
17359
+ pcbRouteHints: z70.array(route_hint_point2).optional(),
17360
+ pcbPathRelativeTo: z70.string().optional(),
17344
17361
  pcbPath: pcbPath.optional(),
17345
- pcbPaths: z69.array(pcbPath).optional(),
17346
- routingPhaseIndex: z69.number().nullable().optional(),
17347
- pcbStraightLine: z69.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17348
- schDisplayLabel: z69.string().optional(),
17349
- schStroke: z69.string().optional(),
17350
- highlightColor: z69.string().optional(),
17362
+ pcbPaths: z70.array(pcbPath).optional(),
17363
+ routingPhaseIndex: z70.number().nullable().optional(),
17364
+ pcbStraightLine: z70.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17365
+ schDisplayLabel: z70.string().optional(),
17366
+ schStroke: z70.string().optional(),
17367
+ highlightColor: z70.string().optional(),
17351
17368
  maxLength: distance18.optional(),
17352
- connectsTo: z69.string().or(z69.array(z69.string())).optional()
17369
+ connectsTo: z70.string().or(z70.array(z70.string())).optional()
17353
17370
  });
17354
- var traceProps = z69.union([
17371
+ var traceProps = z70.union([
17355
17372
  baseTraceProps.extend({
17356
- path: z69.array(portRef)
17373
+ path: z70.array(portRef)
17357
17374
  }),
17358
17375
  baseTraceProps.extend({
17359
17376
  from: portRef,
@@ -17366,27 +17383,28 @@ var traceProps = z69.union([
17366
17383
  ]);
17367
17384
 
17368
17385
  // lib/components/bus.ts
17369
- import { z as z70 } from "zod";
17370
- var busProps = z70.object({
17371
- name: z70.string().optional(),
17372
- connections: z70.array(z70.string()).min(2)
17386
+ import { z as z71 } from "zod";
17387
+ var busProps = z71.object({
17388
+ name: z71.string().optional(),
17389
+ connections: z71.array(z71.string()).min(2),
17390
+ routingPhaseIndex: z71.number().nullable().optional()
17373
17391
  });
17374
17392
  expectTypesMatch(true);
17375
17393
 
17376
17394
  // lib/components/differentialpair.ts
17377
- import { z as z71 } from "zod";
17378
- var differentialPairProps = z71.object({
17379
- name: z71.string().optional(),
17380
- positiveConnection: z71.string(),
17381
- negativeConnection: z71.string(),
17382
- maxLengthSkew: z71.number().min(0).finite().optional()
17395
+ import { z as z72 } from "zod";
17396
+ var differentialPairProps = z72.object({
17397
+ name: z72.string().optional(),
17398
+ positiveConnection: z72.string(),
17399
+ negativeConnection: z72.string(),
17400
+ maxLengthSkew: z72.number().min(0).finite().optional()
17383
17401
  });
17384
17402
  expectTypesMatch(true);
17385
17403
 
17386
17404
  // lib/components/footprint.ts
17387
- import { layer_ref as layer_ref5 } from "circuit-json";
17388
- import { z as z72 } from "zod";
17389
- var footprintInsertionDirection = z72.enum([
17405
+ import { layer_ref as layer_ref6 } from "circuit-json";
17406
+ import { z as z73 } from "zod";
17407
+ var footprintInsertionDirection = z73.enum([
17390
17408
  "from_above",
17391
17409
  "from_left",
17392
17410
  "from_right",
@@ -17394,11 +17412,11 @@ var footprintInsertionDirection = z72.enum([
17394
17412
  "from_back"
17395
17413
  ]);
17396
17414
  expectTypesMatch(true);
17397
- var footprintProps = z72.object({
17398
- children: z72.any().optional(),
17399
- name: z72.string().optional(),
17400
- originalLayer: layer_ref5.default("top").optional(),
17401
- circuitJson: z72.array(z72.any()).optional(),
17415
+ var footprintProps = z73.object({
17416
+ children: z73.any().optional(),
17417
+ name: z73.string().optional(),
17418
+ originalLayer: layer_ref6.default("top").optional(),
17419
+ circuitJson: z73.array(z73.any()).optional(),
17402
17420
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
17403
17421
  insertionDirection: footprintInsertionDirection.optional().describe(
17404
17422
  "Direction a cable or mating part is inserted into this footprint in its unrotated orientation."
@@ -17407,19 +17425,19 @@ var footprintProps = z72.object({
17407
17425
  expectTypesMatch(true);
17408
17426
 
17409
17427
  // lib/components/symbol.ts
17410
- import { z as z73 } from "zod";
17411
- var symbolProps = z73.object({
17412
- originalFacingDirection: z73.enum(["up", "down", "left", "right"]).default("right").optional(),
17428
+ import { z as z74 } from "zod";
17429
+ var symbolProps = z74.object({
17430
+ originalFacingDirection: z74.enum(["up", "down", "left", "right"]).default("right").optional(),
17413
17431
  width: distance.optional(),
17414
17432
  height: distance.optional(),
17415
- name: z73.string().optional()
17433
+ name: z74.string().optional()
17416
17434
  });
17417
17435
  expectTypesMatch(true);
17418
17436
 
17419
17437
  // lib/components/battery.ts
17420
17438
  import { voltage as voltage2 } from "circuit-json";
17421
- import { z as z74 } from "zod";
17422
- var capacity = z74.number().or(z74.string().endsWith("mAh")).transform((v) => {
17439
+ import { z as z75 } from "zod";
17440
+ var capacity = z75.number().or(z75.string().endsWith("mAh")).transform((v) => {
17423
17441
  if (typeof v === "string") {
17424
17442
  const valString = v.replace("mAh", "");
17425
17443
  const num = Number.parseFloat(valString);
@@ -17434,14 +17452,14 @@ var batteryPins = lrPolarPins;
17434
17452
  var batteryProps = commonComponentProps.extend({
17435
17453
  capacity: capacity.optional(),
17436
17454
  voltage: voltage2.optional(),
17437
- standard: z74.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17455
+ standard: z75.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17438
17456
  schOrientation: schematicOrientation.optional(),
17439
17457
  connections: createConnectionsProp(batteryPins).optional()
17440
17458
  });
17441
17459
  expectTypesMatch(true);
17442
17460
 
17443
17461
  // lib/components/mountedboard.ts
17444
- import { z as z75 } from "zod";
17462
+ import { z as z76 } from "zod";
17445
17463
  var mountedboardProps = subcircuitGroupProps.extend({
17446
17464
  manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
17447
17465
  pinLabels: chipProps.shape.pinLabels,
@@ -17453,7 +17471,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
17453
17471
  internallyConnectedPins: chipProps.shape.internallyConnectedPins,
17454
17472
  externallyConnectedPins: chipProps.shape.externallyConnectedPins,
17455
17473
  boardToBoardDistance: distance.optional(),
17456
- mountOrientation: z75.enum(["faceDown", "faceUp"]).optional()
17474
+ mountOrientation: z76.enum(["faceDown", "faceUp"]).optional()
17457
17475
  });
17458
17476
  expectTypesMatch(true);
17459
17477
 
@@ -17461,29 +17479,29 @@ expectTypesMatch(true);
17461
17479
  import { distance as distance19 } from "circuit-json";
17462
17480
 
17463
17481
  // lib/common/pcbOrientation.ts
17464
- import { z as z76 } from "zod";
17465
- var pcbOrientation = z76.enum(["vertical", "horizontal"]).describe(
17482
+ import { z as z77 } from "zod";
17483
+ var pcbOrientation = z77.enum(["vertical", "horizontal"]).describe(
17466
17484
  "vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
17467
17485
  );
17468
17486
  expectTypesMatch(true);
17469
17487
 
17470
17488
  // lib/components/pin-header.ts
17471
- import { z as z77 } from "zod";
17489
+ import { z as z78 } from "zod";
17472
17490
  var pinHeaderProps = commonComponentProps.extend({
17473
- pinCount: z77.number(),
17491
+ pinCount: z78.number(),
17474
17492
  pitch: distance19.optional(),
17475
- schFacingDirection: z77.enum(["up", "down", "left", "right"]).optional(),
17476
- gender: z77.enum(["male", "female", "unpopulated"]).optional().default("male"),
17477
- showSilkscreenPinLabels: z77.boolean().optional(),
17478
- pcbPinLabels: z77.record(z77.string(), z77.string()).optional(),
17479
- doubleRow: z77.boolean().optional(),
17480
- rightAngle: z77.boolean().optional(),
17493
+ schFacingDirection: z78.enum(["up", "down", "left", "right"]).optional(),
17494
+ gender: z78.enum(["male", "female", "unpopulated"]).optional().default("male"),
17495
+ showSilkscreenPinLabels: z78.boolean().optional(),
17496
+ pcbPinLabels: z78.record(z78.string(), z78.string()).optional(),
17497
+ doubleRow: z78.boolean().optional(),
17498
+ rightAngle: z78.boolean().optional(),
17481
17499
  pcbOrientation: pcbOrientation.optional(),
17482
17500
  holeDiameter: distance19.optional(),
17483
17501
  platedDiameter: distance19.optional(),
17484
- pinLabels: z77.record(z77.string(), schematicPinLabel).or(z77.array(schematicPinLabel)).optional(),
17485
- connections: z77.custom().pipe(z77.record(z77.string(), connectionTarget)).optional(),
17486
- facingDirection: z77.enum(["left", "right"]).optional(),
17502
+ pinLabels: z78.record(z78.string(), schematicPinLabel).or(z78.array(schematicPinLabel)).optional(),
17503
+ connections: z78.custom().pipe(z78.record(z78.string(), connectionTarget)).optional(),
17504
+ facingDirection: z78.enum(["left", "right"]).optional(),
17487
17505
  schPinArrangement: schematicPinArrangement.optional(),
17488
17506
  schPinStyle: schematicPinStyle.optional(),
17489
17507
  schPinSpacing: distance19.optional(),
@@ -17493,29 +17511,29 @@ var pinHeaderProps = commonComponentProps.extend({
17493
17511
  expectTypesMatch(true);
17494
17512
 
17495
17513
  // lib/components/netalias.ts
17496
- import { z as z78 } from "zod";
17514
+ import { z as z79 } from "zod";
17497
17515
  import { rotation as rotation3 } from "circuit-json";
17498
- var netAliasProps = z78.object({
17499
- net: z78.string().optional(),
17500
- connection: z78.string().optional(),
17516
+ var netAliasProps = z79.object({
17517
+ net: z79.string().optional(),
17518
+ connection: z79.string().optional(),
17501
17519
  schX: distance.optional(),
17502
17520
  schY: distance.optional(),
17503
17521
  schRotation: rotation3.optional(),
17504
- anchorSide: z78.enum(["left", "top", "right", "bottom"]).optional()
17522
+ anchorSide: z79.enum(["left", "top", "right", "bottom"]).optional()
17505
17523
  });
17506
17524
  expectTypesMatch(true);
17507
17525
 
17508
17526
  // lib/components/netlabel.ts
17509
- import { z as z79 } from "zod";
17527
+ import { z as z80 } from "zod";
17510
17528
  import { rotation as rotation4 } from "circuit-json";
17511
- var netLabelProps = z79.object({
17512
- net: z79.string().optional(),
17513
- connection: z79.string().optional(),
17514
- connectsTo: z79.string().or(z79.array(z79.string())).optional(),
17529
+ var netLabelProps = z80.object({
17530
+ net: z80.string().optional(),
17531
+ connection: z80.string().optional(),
17532
+ connectsTo: z80.string().or(z80.array(z80.string())).optional(),
17515
17533
  schX: distance.optional(),
17516
17534
  schY: distance.optional(),
17517
17535
  schRotation: rotation4.optional(),
17518
- anchorSide: z79.enum(["left", "top", "right", "bottom"]).optional()
17536
+ anchorSide: z80.enum(["left", "top", "right", "bottom"]).optional()
17519
17537
  });
17520
17538
  expectTypesMatch(true);
17521
17539
 
@@ -17530,32 +17548,32 @@ expectTypesMatch(true);
17530
17548
 
17531
17549
  // lib/components/analogsimulation.ts
17532
17550
  import { ms } from "circuit-json";
17533
- import { z as z81 } from "zod";
17534
- var spiceEngine = z81.custom(
17551
+ import { z as z82 } from "zod";
17552
+ var spiceEngine = z82.custom(
17535
17553
  (value) => typeof value === "string"
17536
17554
  );
17537
- var spiceOptions = z81.object({
17538
- method: z81.enum(["trap", "gear"]).optional(),
17539
- reltol: z81.union([z81.number(), z81.string()]).optional(),
17540
- abstol: z81.union([z81.number(), z81.string()]).optional(),
17541
- vntol: z81.union([z81.number(), z81.string()]).optional()
17555
+ var spiceOptions = z82.object({
17556
+ method: z82.enum(["trap", "gear"]).optional(),
17557
+ reltol: z82.union([z82.number(), z82.string()]).optional(),
17558
+ abstol: z82.union([z82.number(), z82.string()]).optional(),
17559
+ vntol: z82.union([z82.number(), z82.string()]).optional()
17542
17560
  });
17543
17561
  var analogAnalysisSimulationBaseProps = {
17544
- name: z81.string().optional(),
17562
+ name: z82.string().optional(),
17545
17563
  spiceEngine: spiceEngine.optional(),
17546
17564
  spiceOptions: spiceOptions.optional(),
17547
- graphIndependentAxes: z81.boolean().optional(),
17548
- children: z81.custom().optional()
17565
+ graphIndependentAxes: z82.boolean().optional(),
17566
+ children: z82.custom().optional()
17549
17567
  };
17550
- var analogSimulationProps = z81.object({
17551
- name: z81.string().optional(),
17552
- simulationType: z81.literal("spice_transient_analysis").default("spice_transient_analysis"),
17568
+ var analogSimulationProps = z82.object({
17569
+ name: z82.string().optional(),
17570
+ simulationType: z82.literal("spice_transient_analysis").default("spice_transient_analysis"),
17553
17571
  duration: ms.optional(),
17554
17572
  startTime: ms.optional(),
17555
17573
  timePerStep: ms.optional(),
17556
17574
  spiceEngine: spiceEngine.optional(),
17557
17575
  spiceOptions: spiceOptions.optional(),
17558
- graphIndependentAxes: z81.boolean().optional()
17576
+ graphIndependentAxes: z82.boolean().optional()
17559
17577
  });
17560
17578
  expectTypesMatch(
17561
17579
  true
@@ -17563,12 +17581,12 @@ expectTypesMatch(
17563
17581
 
17564
17582
  // lib/components/analogtransientsimulation.ts
17565
17583
  import { ms as ms2 } from "circuit-json";
17566
- import { z as z82 } from "zod";
17584
+ import { z as z83 } from "zod";
17567
17585
  var positiveMilliseconds = ms2.refine(
17568
17586
  (milliseconds) => milliseconds > 0,
17569
17587
  "Time must be positive"
17570
17588
  );
17571
- var analogTransientSimulationProps = z82.object({
17589
+ var analogTransientSimulationProps = z83.object({
17572
17590
  ...analogAnalysisSimulationBaseProps,
17573
17591
  duration: positiveMilliseconds.default("10ms"),
17574
17592
  startTime: ms2.default("0ms"),
@@ -17576,7 +17594,7 @@ var analogTransientSimulationProps = z82.object({
17576
17594
  }).superRefine((simulation, context) => {
17577
17595
  if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
17578
17596
  context.addIssue({
17579
- code: z82.ZodIssueCode.custom,
17597
+ code: z83.ZodIssueCode.custom,
17580
17598
  path: ["startTime"],
17581
17599
  message: "startTime must be between zero and duration"
17582
17600
  });
@@ -17585,19 +17603,19 @@ var analogTransientSimulationProps = z82.object({
17585
17603
  expectTypesMatch(true);
17586
17604
 
17587
17605
  // lib/components/analogdcoperatingpointsimulation.ts
17588
- import { z as z83 } from "zod";
17589
- var analogDcOperatingPointSimulationProps = z83.object({
17606
+ import { z as z84 } from "zod";
17607
+ var analogDcOperatingPointSimulationProps = z84.object({
17590
17608
  ...analogAnalysisSimulationBaseProps
17591
17609
  });
17592
17610
  expectTypesMatch(true);
17593
17611
 
17594
17612
  // lib/components/analogdcsweepsimulation.ts
17595
17613
  import { current, voltage as voltage3 } from "circuit-json";
17596
- import { z as z84 } from "zod";
17597
- var dcSweepQuantity = z84.union([voltage3, current]);
17598
- var analogDcSweepSimulationProps = z84.object({
17614
+ import { z as z85 } from "zod";
17615
+ var dcSweepQuantity = z85.union([voltage3, current]);
17616
+ var analogDcSweepSimulationProps = z85.object({
17599
17617
  ...analogAnalysisSimulationBaseProps,
17600
- sweepSource: z84.string().min(1),
17618
+ sweepSource: z85.string().min(1),
17601
17619
  sweepStart: dcSweepQuantity,
17602
17620
  sweepStop: dcSweepQuantity,
17603
17621
  sweepStep: dcSweepQuantity.refine(
@@ -17607,7 +17625,7 @@ var analogDcSweepSimulationProps = z84.object({
17607
17625
  }).superRefine((simulation, context) => {
17608
17626
  if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
17609
17627
  context.addIssue({
17610
- code: z84.ZodIssueCode.custom,
17628
+ code: z85.ZodIssueCode.custom,
17611
17629
  path: ["sweepStep"],
17612
17630
  message: "sweepStep must move from sweepStart toward sweepStop"
17613
17631
  });
@@ -17617,10 +17635,10 @@ expectTypesMatch(true);
17617
17635
 
17618
17636
  // lib/components/analogacsweepsimulation.ts
17619
17637
  import { frequency as frequency3 } from "circuit-json";
17620
- import { z as z85 } from "zod";
17621
- var analogAcSweepSimulationProps = z85.object({
17638
+ import { z as z86 } from "zod";
17639
+ var analogAcSweepSimulationProps = z86.object({
17622
17640
  ...analogAnalysisSimulationBaseProps,
17623
- sweepType: z85.enum(["linear", "decade", "octave"]),
17641
+ sweepType: z86.enum(["linear", "decade", "octave"]),
17624
17642
  startFrequency: frequency3.refine(
17625
17643
  (startFrequencyHz) => startFrequencyHz > 0,
17626
17644
  "startFrequency must be positive"
@@ -17629,12 +17647,12 @@ var analogAcSweepSimulationProps = z85.object({
17629
17647
  (stopFrequencyHz) => stopFrequencyHz > 0,
17630
17648
  "stopFrequency must be positive"
17631
17649
  ),
17632
- samplesPerInterval: z85.number().int().positive().optional(),
17633
- sampleCount: z85.number().int().positive().optional()
17650
+ samplesPerInterval: z86.number().int().positive().optional(),
17651
+ sampleCount: z86.number().int().positive().optional()
17634
17652
  }).superRefine((simulation, context) => {
17635
17653
  if (simulation.stopFrequency <= simulation.startFrequency) {
17636
17654
  context.addIssue({
17637
- code: z85.ZodIssueCode.custom,
17655
+ code: z86.ZodIssueCode.custom,
17638
17656
  path: ["stopFrequency"],
17639
17657
  message: "stopFrequency must be greater than startFrequency"
17640
17658
  });
@@ -17642,14 +17660,14 @@ var analogAcSweepSimulationProps = z85.object({
17642
17660
  if (simulation.sweepType === "linear") {
17643
17661
  if (simulation.sampleCount === void 0) {
17644
17662
  context.addIssue({
17645
- code: z85.ZodIssueCode.custom,
17663
+ code: z86.ZodIssueCode.custom,
17646
17664
  path: ["sampleCount"],
17647
17665
  message: "sampleCount is required for a linear AC sweep"
17648
17666
  });
17649
17667
  }
17650
17668
  if (simulation.samplesPerInterval !== void 0) {
17651
17669
  context.addIssue({
17652
- code: z85.ZodIssueCode.custom,
17670
+ code: z86.ZodIssueCode.custom,
17653
17671
  path: ["samplesPerInterval"],
17654
17672
  message: "samplesPerInterval is only valid for decade or octave sweeps"
17655
17673
  });
@@ -17658,14 +17676,14 @@ var analogAcSweepSimulationProps = z85.object({
17658
17676
  }
17659
17677
  if (simulation.samplesPerInterval === void 0) {
17660
17678
  context.addIssue({
17661
- code: z85.ZodIssueCode.custom,
17679
+ code: z86.ZodIssueCode.custom,
17662
17680
  path: ["samplesPerInterval"],
17663
17681
  message: "samplesPerInterval is required for decade or octave sweeps"
17664
17682
  });
17665
17683
  }
17666
17684
  if (simulation.sampleCount !== void 0) {
17667
17685
  context.addIssue({
17668
- code: z85.ZodIssueCode.custom,
17686
+ code: z86.ZodIssueCode.custom,
17669
17687
  path: ["sampleCount"],
17670
17688
  message: "sampleCount is only valid for a linear sweep"
17671
17689
  });
@@ -17681,43 +17699,43 @@ import {
17681
17699
  resistance as resistance3,
17682
17700
  voltage as voltage4
17683
17701
  } from "circuit-json";
17684
- import { z as z86 } from "zod";
17685
- var resistanceSweepQuantity = resistance3.pipe(z86.number());
17686
- var capacitanceSweepQuantity = capacitance4.pipe(z86.number());
17687
- var inductanceSweepQuantity = inductance.pipe(z86.number());
17688
- var voltageSweepQuantity = voltage4.pipe(z86.number());
17689
- var currentSweepQuantity = current2.pipe(z86.number());
17702
+ import { z as z87 } from "zod";
17703
+ var resistanceSweepQuantity = resistance3.pipe(z87.number());
17704
+ var capacitanceSweepQuantity = capacitance4.pipe(z87.number());
17705
+ var inductanceSweepQuantity = inductance.pipe(z87.number());
17706
+ var voltageSweepQuantity = voltage4.pipe(z87.number());
17707
+ var currentSweepQuantity = current2.pipe(z87.number());
17690
17708
  var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
17691
- name: z86.string().optional(),
17692
- values: z86.array(sweepQuantity).min(1).optional(),
17709
+ name: z87.string().optional(),
17710
+ values: z87.array(sweepQuantity).min(1).optional(),
17693
17711
  start: sweepQuantity.optional(),
17694
17712
  stop: sweepQuantity.optional(),
17695
17713
  step: sweepQuantity.optional()
17696
17714
  });
17697
- var analogResistanceSweepParameterProps = z86.object({
17715
+ var analogResistanceSweepParameterProps = z87.object({
17698
17716
  ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
17699
- parameterType: z86.literal("resistance"),
17700
- resistorRef: z86.string().min(1)
17717
+ parameterType: z87.literal("resistance"),
17718
+ resistorRef: z87.string().min(1)
17701
17719
  }).strict();
17702
- var analogCapacitanceSweepParameterProps = z86.object({
17720
+ var analogCapacitanceSweepParameterProps = z87.object({
17703
17721
  ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
17704
- parameterType: z86.literal("capacitance"),
17705
- capacitorRef: z86.string().min(1)
17722
+ parameterType: z87.literal("capacitance"),
17723
+ capacitorRef: z87.string().min(1)
17706
17724
  }).strict();
17707
- var analogInductanceSweepParameterProps = z86.object({
17725
+ var analogInductanceSweepParameterProps = z87.object({
17708
17726
  ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
17709
- parameterType: z86.literal("inductance"),
17710
- inductorRef: z86.string().min(1)
17727
+ parameterType: z87.literal("inductance"),
17728
+ inductorRef: z87.string().min(1)
17711
17729
  }).strict();
17712
- var analogVoltageSweepParameterProps = z86.object({
17730
+ var analogVoltageSweepParameterProps = z87.object({
17713
17731
  ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
17714
- parameterType: z86.literal("voltage"),
17715
- net: z86.string().min(1)
17732
+ parameterType: z87.literal("voltage"),
17733
+ net: z87.string().min(1)
17716
17734
  }).strict();
17717
- var analogCurrentSweepParameterProps = z86.object({
17735
+ var analogCurrentSweepParameterProps = z87.object({
17718
17736
  ...createAnalogSweepCoordinateProps(currentSweepQuantity),
17719
- parameterType: z86.literal("current"),
17720
- currentSourceRef: z86.string().min(1)
17737
+ parameterType: z87.literal("current"),
17738
+ currentSourceRef: z87.string().min(1)
17721
17739
  }).strict();
17722
17740
  var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17723
17741
  const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
@@ -17729,34 +17747,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17729
17747
  const hasRangeCoordinates = rangeCoordinateCount > 0;
17730
17748
  if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
17731
17749
  context.addIssue({
17732
- code: z86.ZodIssueCode.custom,
17750
+ code: z87.ZodIssueCode.custom,
17733
17751
  message: "Provide either values or start/stop/step"
17734
17752
  });
17735
17753
  return;
17736
17754
  }
17737
17755
  if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
17738
17756
  context.addIssue({
17739
- code: z86.ZodIssueCode.custom,
17757
+ code: z87.ZodIssueCode.custom,
17740
17758
  message: "start, stop, and step must be provided together"
17741
17759
  });
17742
17760
  return;
17743
17761
  }
17744
17762
  if (sweepCoordinates.step === 0) {
17745
17763
  context.addIssue({
17746
- code: z86.ZodIssueCode.custom,
17764
+ code: z87.ZodIssueCode.custom,
17747
17765
  path: ["step"],
17748
17766
  message: "step must be nonzero"
17749
17767
  });
17750
17768
  }
17751
17769
  if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
17752
17770
  context.addIssue({
17753
- code: z86.ZodIssueCode.custom,
17771
+ code: z87.ZodIssueCode.custom,
17754
17772
  path: ["step"],
17755
17773
  message: "step must move from start toward stop"
17756
17774
  });
17757
17775
  }
17758
17776
  };
17759
- var analogSweepParameterProps = z86.discriminatedUnion("parameterType", [
17777
+ var analogSweepParameterProps = z87.discriminatedUnion("parameterType", [
17760
17778
  analogResistanceSweepParameterProps,
17761
17779
  analogCapacitanceSweepParameterProps,
17762
17780
  analogInductanceSweepParameterProps,
@@ -17771,36 +17789,28 @@ expectTypesMatch(true);
17771
17789
  expectTypesMatch(true);
17772
17790
 
17773
17791
  // lib/components/autoroutingphase.ts
17774
- import { z as z87 } from "zod";
17775
- import { layer_ref as layer_ref6 } from "circuit-json";
17776
- var busFanoutDirection = z87.union([
17777
- ninePointAnchor,
17778
- z87.object({ direction: ninePointAnchor })
17779
- ]);
17780
- var autoroutingPhaseProps = z87.object({
17781
- key: z87.any().optional(),
17782
- name: z87.string().optional(),
17792
+ import { z as z88 } from "zod";
17793
+ var autoroutingPhaseProps = z88.object({
17794
+ key: z88.any().optional(),
17795
+ name: z88.string().optional(),
17783
17796
  autorouter: autorouterProp.optional(),
17784
- phaseIndex: z87.number().optional(),
17797
+ phaseIndex: z88.number().optional(),
17785
17798
  ...routingTolerances.shape,
17786
- region: z87.object({
17787
- shape: z87.literal("rect").optional(),
17788
- minX: z87.number(),
17789
- maxX: z87.number(),
17790
- minY: z87.number(),
17791
- maxY: z87.number()
17799
+ region: z88.object({
17800
+ shape: z88.literal("rect").optional(),
17801
+ minX: z88.number(),
17802
+ maxX: z88.number(),
17803
+ minY: z88.number(),
17804
+ maxY: z88.number()
17792
17805
  }).optional(),
17793
- connection: z87.string().optional(),
17794
- connections: z87.array(z87.string()).optional(),
17795
- reroute: z87.boolean().optional(),
17796
- busFanoutDirections: z87.record(busFanoutDirection).optional(),
17797
- fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
17798
- fanoutRoutingLayers: z87.array(layer_ref6).min(1).optional(),
17799
- fanoutPourNetMap: z87.record(layer_ref6, z87.union([z87.string(), z87.array(z87.string()).min(1)])).optional()
17806
+ connection: z88.string().optional(),
17807
+ connections: z88.array(z88.string()).optional(),
17808
+ reroute: z88.boolean().optional(),
17809
+ ...fanoutProps.shape
17800
17810
  }).superRefine((value, ctx) => {
17801
17811
  if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
17802
17812
  ctx.addIssue({
17803
- code: z87.ZodIssueCode.custom,
17813
+ code: z88.ZodIssueCode.custom,
17804
17814
  message: "region, connection, or connections is required when reroute is provided",
17805
17815
  path: ["region"]
17806
17816
  });
@@ -17809,15 +17819,15 @@ var autoroutingPhaseProps = z87.object({
17809
17819
  expectTypesMatch(true);
17810
17820
 
17811
17821
  // lib/components/spicemodel.ts
17812
- import { z as z88 } from "zod";
17813
- var spicemodelProps = z88.object({
17814
- source: z88.string(),
17815
- spicePinMapping: z88.record(z88.string(), z88.string()).optional()
17822
+ import { z as z89 } from "zod";
17823
+ var spicemodelProps = z89.object({
17824
+ source: z89.string(),
17825
+ spicePinMapping: z89.record(z89.string(), z89.string()).optional()
17816
17826
  });
17817
17827
  expectTypesMatch(true);
17818
17828
 
17819
17829
  // lib/components/transistor.ts
17820
- import { z as z89 } from "zod";
17830
+ import { z as z90 } from "zod";
17821
17831
  var transistorPinsLabels = [
17822
17832
  "pin1",
17823
17833
  "pin2",
@@ -17830,7 +17840,7 @@ var transistorPinsLabels = [
17830
17840
  "drain"
17831
17841
  ];
17832
17842
  var transistorProps = commonComponentProps.extend({
17833
- type: z89.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17843
+ type: z90.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
17834
17844
  connections: createConnectionsProp(transistorPinsLabels).optional()
17835
17845
  });
17836
17846
  var transistorPins = [
@@ -17844,7 +17854,7 @@ var transistorPins = [
17844
17854
  expectTypesMatch(true);
17845
17855
 
17846
17856
  // lib/components/mosfet.ts
17847
- import { z as z90 } from "zod";
17857
+ import { z as z91 } from "zod";
17848
17858
  var mosfetPins = [
17849
17859
  "pin1",
17850
17860
  "drain",
@@ -17854,11 +17864,11 @@ var mosfetPins = [
17854
17864
  "gate"
17855
17865
  ];
17856
17866
  var mosfetProps = commonComponentProps.extend({
17857
- channelType: z90.enum(["n", "p"]),
17858
- mosfetMode: z90.enum(["enhancement", "depletion"]),
17859
- symbolDrainSide: z90.enum(["left", "right", "top", "bottom"]).optional(),
17860
- symbolSourceSide: z90.enum(["left", "right", "top", "bottom"]).optional(),
17861
- symbolGateSide: z90.enum(["left", "right", "top", "bottom"]).optional(),
17867
+ channelType: z91.enum(["n", "p"]),
17868
+ mosfetMode: z91.enum(["enhancement", "depletion"]),
17869
+ symbolDrainSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
17870
+ symbolSourceSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
17871
+ symbolGateSide: z91.enum(["left", "right", "top", "bottom"]).optional(),
17862
17872
  connections: createConnectionsProp(mosfetPins).optional()
17863
17873
  });
17864
17874
  expectTypesMatch(true);
@@ -17880,29 +17890,29 @@ expectTypesMatch(true);
17880
17890
 
17881
17891
  // lib/components/inductor.ts
17882
17892
  import { inductance as inductance2 } from "circuit-json";
17883
- import { z as z92 } from "zod";
17893
+ import { z as z93 } from "zod";
17884
17894
  var inductorPins = lrPins;
17885
17895
  var inductorProps = commonComponentProps.extend({
17886
17896
  inductance: inductance2,
17887
- maxCurrentRating: z92.union([z92.string(), z92.number()]).optional(),
17897
+ maxCurrentRating: z93.union([z93.string(), z93.number()]).optional(),
17888
17898
  schOrientation: schematicOrientation.optional(),
17889
17899
  connections: createConnectionsProp(inductorPins).optional()
17890
17900
  });
17891
17901
  expectTypesMatch(true);
17892
17902
 
17893
17903
  // lib/components/internal-circuit.ts
17894
- import { z as z93 } from "zod";
17895
- var internalCircuitProps = z93.object({
17896
- children: z93.custom().optional()
17904
+ import { z as z94 } from "zod";
17905
+ var internalCircuitProps = z94.object({
17906
+ children: z94.custom().optional()
17897
17907
  });
17898
17908
  expectTypesMatch(
17899
17909
  true
17900
17910
  );
17901
17911
 
17902
17912
  // lib/components/diode.ts
17903
- import { z as z94 } from "zod";
17913
+ import { z as z95 } from "zod";
17904
17914
  var diodePins = lrPolarPins;
17905
- var diodeConnectionKeys = z94.enum([
17915
+ var diodeConnectionKeys = z95.enum([
17906
17916
  "anode",
17907
17917
  "cathode",
17908
17918
  "pin1",
@@ -17910,13 +17920,13 @@ var diodeConnectionKeys = z94.enum([
17910
17920
  "pos",
17911
17921
  "neg"
17912
17922
  ]);
17913
- var connectionTarget3 = z94.string().or(z94.array(z94.string()).readonly()).or(z94.array(z94.string()));
17914
- var connectionsProp2 = z94.record(diodeConnectionKeys, connectionTarget3);
17915
- var diodePinLabelsProp = z94.record(
17916
- z94.enum(diodePins),
17917
- schematicPinLabel.or(z94.array(schematicPinLabel).readonly()).or(z94.array(schematicPinLabel))
17923
+ var connectionTarget3 = z95.string().or(z95.array(z95.string()).readonly()).or(z95.array(z95.string()));
17924
+ var connectionsProp2 = z95.record(diodeConnectionKeys, connectionTarget3);
17925
+ var diodePinLabelsProp = z95.record(
17926
+ z95.enum(diodePins),
17927
+ schematicPinLabel.or(z95.array(schematicPinLabel).readonly()).or(z95.array(schematicPinLabel))
17918
17928
  );
17919
- var diodeVariant = z94.enum([
17929
+ var diodeVariant = z95.enum([
17920
17930
  "standard",
17921
17931
  "schottky",
17922
17932
  "zener",
@@ -17927,12 +17937,12 @@ var diodeVariant = z94.enum([
17927
17937
  var diodeProps = commonComponentProps.extend({
17928
17938
  connections: connectionsProp2.optional(),
17929
17939
  variant: diodeVariant.optional().default("standard"),
17930
- standard: z94.boolean().optional(),
17931
- schottky: z94.boolean().optional(),
17932
- zener: z94.boolean().optional(),
17933
- avalanche: z94.boolean().optional(),
17934
- photo: z94.boolean().optional(),
17935
- tvs: z94.boolean().optional(),
17940
+ standard: z95.boolean().optional(),
17941
+ schottky: z95.boolean().optional(),
17942
+ zener: z95.boolean().optional(),
17943
+ avalanche: z95.boolean().optional(),
17944
+ photo: z95.boolean().optional(),
17945
+ tvs: z95.boolean().optional(),
17936
17946
  schOrientation: schematicOrientation.optional(),
17937
17947
  pinLabels: diodePinLabelsProp.optional()
17938
17948
  }).superRefine((data, ctx) => {
@@ -17946,11 +17956,11 @@ var diodeProps = commonComponentProps.extend({
17946
17956
  ].filter(Boolean).length;
17947
17957
  if (enabledFlags > 1) {
17948
17958
  ctx.addIssue({
17949
- code: z94.ZodIssueCode.custom,
17959
+ code: z95.ZodIssueCode.custom,
17950
17960
  message: "Exactly one diode variant must be enabled",
17951
17961
  path: []
17952
17962
  });
17953
- return z94.INVALID;
17963
+ return z95.INVALID;
17954
17964
  }
17955
17965
  }).transform((data) => {
17956
17966
  const result = {
@@ -17996,34 +18006,34 @@ var diodeProps = commonComponentProps.extend({
17996
18006
  expectTypesMatch(true);
17997
18007
 
17998
18008
  // lib/components/led.ts
17999
- import { z as z95 } from "zod";
18009
+ import { z as z96 } from "zod";
18000
18010
  var ledProps = commonComponentProps.extend({
18001
- color: z95.string().optional(),
18002
- wavelength: z95.string().optional(),
18003
- schDisplayValue: z95.string().optional(),
18011
+ color: z96.string().optional(),
18012
+ wavelength: z96.string().optional(),
18013
+ schDisplayValue: z96.string().optional(),
18004
18014
  schOrientation: schematicOrientation.optional(),
18005
18015
  connections: createConnectionsProp(lrPolarPins).optional(),
18006
- laser: z95.boolean().optional()
18016
+ laser: z96.boolean().optional()
18007
18017
  });
18008
18018
  var ledPins = lrPolarPins;
18009
18019
 
18010
18020
  // lib/components/switch.ts
18011
18021
  import { ms as ms3, frequency as frequency4 } from "circuit-json";
18012
- import { z as z96 } from "zod";
18022
+ import { z as z97 } from "zod";
18013
18023
  var switchProps = commonComponentProps.extend({
18014
- type: z96.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
18015
- isNormallyClosed: z96.boolean().optional().default(false),
18016
- spst: z96.boolean().optional(),
18017
- spdt: z96.boolean().optional(),
18018
- dpst: z96.boolean().optional(),
18019
- dpdt: z96.boolean().optional(),
18024
+ type: z97.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
18025
+ isNormallyClosed: z97.boolean().optional().default(false),
18026
+ spst: z97.boolean().optional(),
18027
+ spdt: z97.boolean().optional(),
18028
+ dpst: z97.boolean().optional(),
18029
+ dpdt: z97.boolean().optional(),
18020
18030
  pinLabels: pinLabelsProp.optional(),
18021
18031
  simSwitchFrequency: frequency4.optional(),
18022
18032
  simCloseAt: ms3.optional(),
18023
18033
  simOpenAt: ms3.optional(),
18024
- simStartClosed: z96.boolean().optional(),
18025
- simStartOpen: z96.boolean().optional(),
18026
- connections: z96.custom().pipe(z96.record(z96.string(), connectionTarget)).optional()
18034
+ simStartClosed: z97.boolean().optional(),
18035
+ simStartOpen: z97.boolean().optional(),
18036
+ connections: z97.custom().pipe(z97.record(z97.string(), connectionTarget)).optional()
18027
18037
  }).transform((props) => {
18028
18038
  const updatedProps = { ...props };
18029
18039
  if (updatedProps.dpdt) {
@@ -18055,33 +18065,33 @@ expectTypesMatch(true);
18055
18065
 
18056
18066
  // lib/components/fabrication-note-text.ts
18057
18067
  import { length as length4 } from "circuit-json";
18058
- import { z as z97 } from "zod";
18068
+ import { z as z98 } from "zod";
18059
18069
  var fabricationNoteTextProps = pcbLayoutProps.extend({
18060
- text: z97.string(),
18061
- anchorAlignment: z97.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18062
- font: z97.enum(["tscircuit2024"]).optional(),
18070
+ text: z98.string(),
18071
+ anchorAlignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18072
+ font: z98.enum(["tscircuit2024"]).optional(),
18063
18073
  fontSize: length4.optional(),
18064
- color: z97.string().optional()
18074
+ color: z98.string().optional()
18065
18075
  });
18066
18076
  expectTypesMatch(true);
18067
18077
 
18068
18078
  // lib/components/fabrication-note-rect.ts
18069
18079
  import { distance as distance20 } from "circuit-json";
18070
- import { z as z98 } from "zod";
18080
+ import { z as z99 } from "zod";
18071
18081
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18072
18082
  width: distance20,
18073
18083
  height: distance20,
18074
18084
  strokeWidth: distance20.optional(),
18075
- isFilled: z98.boolean().optional(),
18076
- hasStroke: z98.boolean().optional(),
18077
- isStrokeDashed: z98.boolean().optional(),
18078
- color: z98.string().optional(),
18085
+ isFilled: z99.boolean().optional(),
18086
+ hasStroke: z99.boolean().optional(),
18087
+ isStrokeDashed: z99.boolean().optional(),
18088
+ color: z99.string().optional(),
18079
18089
  cornerRadius: distance20.optional()
18080
18090
  });
18081
18091
 
18082
18092
  // lib/components/fabrication-note-path.ts
18083
18093
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
18084
- import { z as z99 } from "zod";
18094
+ import { z as z100 } from "zod";
18085
18095
  var fabricationNotePathProps = pcbLayoutProps.omit({
18086
18096
  pcbLeftEdgeX: true,
18087
18097
  pcbRightEdgeX: true,
@@ -18093,15 +18103,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
18093
18103
  pcbOffsetY: true,
18094
18104
  pcbRotation: true
18095
18105
  }).extend({
18096
- route: z99.array(route_hint_point3),
18106
+ route: z100.array(route_hint_point3),
18097
18107
  strokeWidth: length5.optional(),
18098
- color: z99.string().optional()
18108
+ color: z100.string().optional()
18099
18109
  });
18100
18110
 
18101
18111
  // lib/components/fabrication-note-dimension.ts
18102
18112
  import { distance as distance21, length as length6 } from "circuit-json";
18103
- import { z as z100 } from "zod";
18104
- var dimensionTarget = z100.union([z100.string(), point]);
18113
+ import { z as z101 } from "zod";
18114
+ var dimensionTarget = z101.union([z101.string(), point]);
18105
18115
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18106
18116
  pcbLeftEdgeX: true,
18107
18117
  pcbRightEdgeX: true,
@@ -18115,54 +18125,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18115
18125
  }).extend({
18116
18126
  from: dimensionTarget,
18117
18127
  to: dimensionTarget,
18118
- text: z100.string().optional(),
18128
+ text: z101.string().optional(),
18119
18129
  offset: distance21.optional(),
18120
- font: z100.enum(["tscircuit2024"]).optional(),
18130
+ font: z101.enum(["tscircuit2024"]).optional(),
18121
18131
  fontSize: length6.optional(),
18122
- color: z100.string().optional(),
18132
+ color: z101.string().optional(),
18123
18133
  arrowSize: distance21.optional(),
18124
- units: z100.enum(["in", "mm"]).optional(),
18125
- outerEdgeToEdge: z100.literal(true).optional(),
18126
- centerToCenter: z100.literal(true).optional(),
18127
- innerEdgeToEdge: z100.literal(true).optional()
18134
+ units: z101.enum(["in", "mm"]).optional(),
18135
+ outerEdgeToEdge: z101.literal(true).optional(),
18136
+ centerToCenter: z101.literal(true).optional(),
18137
+ innerEdgeToEdge: z101.literal(true).optional()
18128
18138
  });
18129
18139
  expectTypesMatch(true);
18130
18140
 
18131
18141
  // lib/components/pcb-trace.ts
18132
18142
  import { distance as distance22, route_hint_point as route_hint_point4 } from "circuit-json";
18133
- import { z as z101 } from "zod";
18134
- var pcbTraceProps = z101.object({
18135
- layer: z101.string().optional(),
18143
+ import { z as z102 } from "zod";
18144
+ var pcbTraceProps = z102.object({
18145
+ layer: z102.string().optional(),
18136
18146
  thickness: distance22.optional(),
18137
- route: z101.array(route_hint_point4)
18147
+ route: z102.array(route_hint_point4)
18138
18148
  });
18139
18149
 
18140
18150
  // lib/components/via.ts
18141
18151
  import { distance as distance23, layer_ref as layer_ref7 } from "circuit-json";
18142
- import { z as z102 } from "zod";
18152
+ import { z as z103 } from "zod";
18143
18153
  var viaProps = commonLayoutProps.extend({
18144
- name: z102.string().optional(),
18154
+ name: z103.string().optional(),
18145
18155
  fromLayer: layer_ref7.optional(),
18146
18156
  toLayer: layer_ref7.optional(),
18147
18157
  holeDiameter: distance23.optional(),
18148
18158
  outerDiameter: distance23.optional(),
18149
- layers: z102.array(layer_ref7).optional(),
18150
- connectsTo: z102.string().or(z102.array(z102.string())).optional(),
18151
- netIsAssignable: z102.boolean().optional()
18159
+ layers: z103.array(layer_ref7).optional(),
18160
+ connectsTo: z103.string().or(z103.array(z103.string())).optional(),
18161
+ netIsAssignable: z103.boolean().optional()
18152
18162
  });
18153
18163
  expectTypesMatch(true);
18154
18164
 
18155
18165
  // lib/components/testpoint.ts
18156
18166
  import { distance as distance24 } from "circuit-json";
18157
- import { z as z103 } from "zod";
18167
+ import { z as z104 } from "zod";
18158
18168
  var testpointPins = ["pin1"];
18159
- var testpointConnectionsProp = z103.object({
18169
+ var testpointConnectionsProp = z104.object({
18160
18170
  pin1: connectionTarget
18161
18171
  }).strict();
18162
18172
  var testpointProps = commonComponentProps.extend({
18163
18173
  connections: testpointConnectionsProp.optional(),
18164
- footprintVariant: z103.enum(["pad", "through_hole"]).optional(),
18165
- padShape: z103.enum(["rect", "circle"]).optional().default("circle"),
18174
+ footprintVariant: z104.enum(["pad", "through_hole"]).optional(),
18175
+ padShape: z104.enum(["rect", "circle"]).optional().default("circle"),
18166
18176
  padDiameter: distance24.optional(),
18167
18177
  holeDiameter: distance24.optional(),
18168
18178
  width: distance24.optional(),
@@ -18174,45 +18184,45 @@ var testpointProps = commonComponentProps.extend({
18174
18184
  expectTypesMatch(true);
18175
18185
 
18176
18186
  // lib/components/breakoutpoint.ts
18177
- import { z as z104 } from "zod";
18187
+ import { z as z105 } from "zod";
18178
18188
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
18179
- connection: z104.string()
18189
+ connection: z105.string()
18180
18190
  });
18181
18191
  expectTypesMatch(true);
18182
18192
 
18183
18193
  // lib/components/pcb-keepout.ts
18184
18194
  import { distance as distance25, layer_ref as layer_ref8 } from "circuit-json";
18185
- import { z as z105 } from "zod";
18186
- var pcbKeepoutProps = z105.union([
18195
+ import { z as z106 } from "zod";
18196
+ var pcbKeepoutProps = z106.union([
18187
18197
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
18188
- shape: z105.literal("circle"),
18198
+ shape: z106.literal("circle"),
18189
18199
  radius: distance25,
18190
- layers: z105.array(layer_ref8).optional()
18200
+ layers: z106.array(layer_ref8).optional()
18191
18201
  }),
18192
18202
  pcbLayoutProps.extend({
18193
- shape: z105.literal("rect"),
18203
+ shape: z106.literal("rect"),
18194
18204
  width: distance25,
18195
18205
  height: distance25,
18196
- layers: z105.array(layer_ref8).optional()
18206
+ layers: z106.array(layer_ref8).optional()
18197
18207
  })
18198
18208
  ]);
18199
18209
 
18200
18210
  // lib/components/courtyard-rect.ts
18201
18211
  import { distance as distance26 } from "circuit-json";
18202
- import { z as z106 } from "zod";
18212
+ import { z as z107 } from "zod";
18203
18213
  var courtyardRectProps = pcbLayoutProps.extend({
18204
18214
  width: distance26,
18205
18215
  height: distance26,
18206
18216
  strokeWidth: distance26.optional(),
18207
- isFilled: z106.boolean().optional(),
18208
- hasStroke: z106.boolean().optional(),
18209
- isStrokeDashed: z106.boolean().optional(),
18210
- color: z106.string().optional()
18217
+ isFilled: z107.boolean().optional(),
18218
+ hasStroke: z107.boolean().optional(),
18219
+ isStrokeDashed: z107.boolean().optional(),
18220
+ color: z107.string().optional()
18211
18221
  });
18212
18222
 
18213
18223
  // lib/components/courtyard-outline.ts
18214
18224
  import { length as length7 } from "circuit-json";
18215
- import { z as z107 } from "zod";
18225
+ import { z as z108 } from "zod";
18216
18226
  var courtyardOutlineProps = pcbLayoutProps.omit({
18217
18227
  pcbLeftEdgeX: true,
18218
18228
  pcbRightEdgeX: true,
@@ -18224,11 +18234,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
18224
18234
  pcbOffsetY: true,
18225
18235
  pcbRotation: true
18226
18236
  }).extend({
18227
- outline: z107.array(point),
18237
+ outline: z108.array(point),
18228
18238
  strokeWidth: length7.optional(),
18229
- isClosed: z107.boolean().optional(),
18230
- isStrokeDashed: z107.boolean().optional(),
18231
- color: z107.string().optional()
18239
+ isClosed: z108.boolean().optional(),
18240
+ isStrokeDashed: z108.boolean().optional(),
18241
+ color: z108.string().optional()
18232
18242
  });
18233
18243
 
18234
18244
  // lib/components/courtyard-circle.ts
@@ -18248,35 +18258,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18248
18258
  });
18249
18259
 
18250
18260
  // lib/components/copper-pour.ts
18251
- import { z as z110 } from "zod";
18261
+ import { z as z111 } from "zod";
18252
18262
  import { layer_ref as layer_ref9 } from "circuit-json";
18253
- var copperPourProps = z110.object({
18254
- name: z110.string().optional(),
18263
+ var copperPourProps = z111.object({
18264
+ name: z111.string().optional(),
18255
18265
  layer: layer_ref9,
18256
- connectsTo: z110.string(),
18257
- unbroken: z110.boolean().optional(),
18266
+ connectsTo: z111.string(),
18267
+ unbroken: z111.boolean().optional(),
18258
18268
  padMargin: distance.optional(),
18259
18269
  traceMargin: distance.optional(),
18260
18270
  clearance: distance.optional(),
18261
18271
  boardEdgeMargin: distance.optional(),
18262
18272
  cutoutMargin: distance.optional(),
18263
- outline: z110.array(point).optional(),
18264
- coveredWithSolderMask: z110.boolean().optional().default(true)
18273
+ outline: z111.array(point).optional(),
18274
+ coveredWithSolderMask: z111.boolean().optional().default(true)
18265
18275
  });
18266
18276
  expectTypesMatch(true);
18267
18277
 
18268
18278
  // lib/components/cadassembly.ts
18269
18279
  import { layer_ref as layer_ref10 } from "circuit-json";
18270
- import { z as z111 } from "zod";
18271
- var cadassemblyProps = z111.object({
18280
+ import { z as z112 } from "zod";
18281
+ var cadassemblyProps = z112.object({
18272
18282
  originalLayer: layer_ref10.default("top").optional(),
18273
- children: z111.any().optional()
18283
+ children: z112.any().optional()
18274
18284
  });
18275
18285
  expectTypesMatch(true);
18276
18286
 
18277
18287
  // lib/components/cadmodel.ts
18278
- import { z as z112 } from "zod";
18279
- var pcbPosition = z112.object({
18288
+ import { z as z113 } from "zod";
18289
+ var pcbPosition = z113.object({
18280
18290
  pcbX: pcbCoordinate.optional(),
18281
18291
  pcbY: pcbCoordinate.optional(),
18282
18292
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18293,7 +18303,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18293
18303
  });
18294
18304
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18295
18305
  expectTypesMatch(true);
18296
- var cadmodelProps = z112.union([z112.null(), url, cadModelObject]);
18306
+ var cadmodelProps = z113.union([z113.null(), url, cadModelObject]);
18297
18307
 
18298
18308
  // lib/components/power-source.ts
18299
18309
  import { voltage as voltage5 } from "circuit-json";
@@ -18303,9 +18313,9 @@ var powerSourceProps = commonComponentProps.extend({
18303
18313
 
18304
18314
  // lib/components/voltagesource.ts
18305
18315
  import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
18306
- import { z as z113 } from "zod";
18316
+ import { z as z114 } from "zod";
18307
18317
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18308
- var percentage = z113.union([z113.string(), z113.number()]).transform((val) => {
18318
+ var percentage = z114.union([z114.string(), z114.number()]).transform((val) => {
18309
18319
  if (typeof val === "string") {
18310
18320
  if (val.endsWith("%")) {
18311
18321
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18314,13 +18324,13 @@ var percentage = z113.union([z113.string(), z113.number()]).transform((val) => {
18314
18324
  }
18315
18325
  return val;
18316
18326
  }).pipe(
18317
- z113.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18327
+ z114.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18318
18328
  );
18319
18329
  var voltageSourceProps = commonComponentProps.extend({
18320
18330
  voltage: voltage6.optional(),
18321
18331
  frequency: frequency5.optional(),
18322
18332
  peakToPeakVoltage: voltage6.optional(),
18323
- waveShape: z113.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18333
+ waveShape: z114.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18324
18334
  phase: rotation5.optional(),
18325
18335
  dutyCycle: percentage.optional(),
18326
18336
  pulseDelay: ms4.optional(),
@@ -18337,9 +18347,9 @@ expectTypesMatch(true);
18337
18347
 
18338
18348
  // lib/components/currentsource.ts
18339
18349
  import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
18340
- import { z as z114 } from "zod";
18350
+ import { z as z115 } from "zod";
18341
18351
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18342
- var percentage2 = z114.union([z114.string(), z114.number()]).transform((val) => {
18352
+ var percentage2 = z115.union([z115.string(), z115.number()]).transform((val) => {
18343
18353
  if (typeof val === "string") {
18344
18354
  if (val.endsWith("%")) {
18345
18355
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18348,13 +18358,13 @@ var percentage2 = z114.union([z114.string(), z114.number()]).transform((val) =>
18348
18358
  }
18349
18359
  return val;
18350
18360
  }).pipe(
18351
- z114.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18361
+ z115.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18352
18362
  );
18353
18363
  var currentSourceProps = commonComponentProps.extend({
18354
18364
  current: current3.optional(),
18355
18365
  frequency: frequency6.optional(),
18356
18366
  peakToPeakCurrent: current3.optional(),
18357
- waveShape: z114.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18367
+ waveShape: z115.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18358
18368
  phase: rotation6.optional(),
18359
18369
  dutyCycle: percentage2.optional(),
18360
18370
  acMagnitude: current3.optional(),
@@ -18365,21 +18375,21 @@ var currentSourcePins = lrPolarPins;
18365
18375
  expectTypesMatch(true);
18366
18376
 
18367
18377
  // lib/components/voltageprobe.ts
18368
- import { z as z115 } from "zod";
18378
+ import { z as z116 } from "zod";
18369
18379
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18370
- name: z115.string().optional(),
18371
- connectsTo: z115.string(),
18372
- referenceTo: z115.string().optional(),
18373
- color: z115.string().optional(),
18374
- graphDisplayName: z115.string().optional(),
18375
- graphCenter: z115.number().optional(),
18376
- graphVerticalOffset: z115.number().or(z115.string()).optional(),
18377
- graphVoltagePerDiv: z115.number().or(z115.string()).optional()
18380
+ name: z116.string().optional(),
18381
+ connectsTo: z116.string(),
18382
+ referenceTo: z116.string().optional(),
18383
+ color: z116.string().optional(),
18384
+ graphDisplayName: z116.string().optional(),
18385
+ graphCenter: z116.number().optional(),
18386
+ graphVerticalOffset: z116.number().or(z116.string()).optional(),
18387
+ graphVoltagePerDiv: z116.number().or(z116.string()).optional()
18378
18388
  });
18379
18389
  expectTypesMatch(true);
18380
18390
 
18381
18391
  // lib/components/ammeter.ts
18382
- import { z as z116 } from "zod";
18392
+ import { z as z117 } from "zod";
18383
18393
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18384
18394
  var hasAmmeterConnectionPair = (connections) => {
18385
18395
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18389,63 +18399,63 @@ var ammeterProps = commonComponentProps.extend({
18389
18399
  hasAmmeterConnectionPair,
18390
18400
  "Ammeter connections must include either pos/neg or pin1/pin2"
18391
18401
  ),
18392
- color: z116.string().optional(),
18393
- graphDisplayName: z116.string().optional(),
18394
- graphCenter: z116.number().optional(),
18395
- graphVerticalOffset: z116.number().or(z116.string()).optional(),
18396
- graphCurrentPerDiv: z116.number().or(z116.string()).optional()
18402
+ color: z117.string().optional(),
18403
+ graphDisplayName: z117.string().optional(),
18404
+ graphCenter: z117.number().optional(),
18405
+ graphVerticalOffset: z117.number().or(z117.string()).optional(),
18406
+ graphCurrentPerDiv: z117.number().or(z117.string()).optional()
18397
18407
  });
18398
18408
  var ammeterPins = ammeterPinLabels;
18399
18409
  expectTypesMatch(true);
18400
18410
 
18401
18411
  // lib/components/schematic-arc.ts
18402
18412
  import { distance as distance29, point as point5, rotation as rotation7 } from "circuit-json";
18403
- import { z as z117 } from "zod";
18404
- var schematicArcProps = z117.object({
18413
+ import { z as z118 } from "zod";
18414
+ var schematicArcProps = z118.object({
18405
18415
  center: point5,
18406
18416
  radius: distance29,
18407
18417
  startAngleDegrees: rotation7,
18408
18418
  endAngleDegrees: rotation7,
18409
- direction: z117.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18419
+ direction: z118.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18410
18420
  strokeWidth: distance29.optional(),
18411
- color: z117.string().optional(),
18412
- isDashed: z117.boolean().optional().default(false)
18421
+ color: z118.string().optional(),
18422
+ isDashed: z118.boolean().optional().default(false)
18413
18423
  });
18414
18424
  expectTypesMatch(true);
18415
18425
 
18416
18426
  // lib/components/toolingrail.ts
18417
- import { z as z118 } from "zod";
18418
- var toolingrailProps = z118.object({
18419
- children: z118.any().optional()
18427
+ import { z as z119 } from "zod";
18428
+ var toolingrailProps = z119.object({
18429
+ children: z119.any().optional()
18420
18430
  });
18421
18431
  expectTypesMatch(true);
18422
18432
 
18423
18433
  // lib/components/schematic-box.ts
18424
18434
  import { distance as distance30 } from "circuit-json";
18425
- import { z as z119 } from "zod";
18426
- var schematicBoxProps = z119.object({
18427
- name: z119.string().optional(),
18428
- chipRef: z119.string().optional(),
18435
+ import { z as z120 } from "zod";
18436
+ var schematicBoxProps = z120.object({
18437
+ name: z120.string().optional(),
18438
+ chipRef: z120.string().optional(),
18429
18439
  pinLabels: pinLabelsProp.optional(),
18430
18440
  schPinArrangement: schematicPinArrangement.optional(),
18431
18441
  schX: distance30.optional(),
18432
18442
  schY: distance30.optional(),
18433
- schSectionName: z119.string().optional(),
18434
- schSheetName: z119.string().optional(),
18443
+ schSectionName: z120.string().optional(),
18444
+ schSheetName: z120.string().optional(),
18435
18445
  width: distance30.optional(),
18436
18446
  height: distance30.optional(),
18437
- overlay: z119.array(z119.string()).optional(),
18447
+ overlay: z120.array(z120.string()).optional(),
18438
18448
  padding: distance30.optional(),
18439
18449
  paddingLeft: distance30.optional(),
18440
18450
  paddingRight: distance30.optional(),
18441
18451
  paddingTop: distance30.optional(),
18442
18452
  paddingBottom: distance30.optional(),
18443
- title: z119.string().optional(),
18453
+ title: z120.string().optional(),
18444
18454
  titleAlignment: ninePointAnchor.default("top_left"),
18445
- titleColor: z119.string().optional(),
18455
+ titleColor: z120.string().optional(),
18446
18456
  titleFontSize: distance30.optional(),
18447
- titleInside: z119.boolean().default(false),
18448
- strokeStyle: z119.enum(["solid", "dashed"]).default("solid")
18457
+ titleInside: z120.boolean().default(false),
18458
+ strokeStyle: z120.enum(["solid", "dashed"]).default("solid")
18449
18459
  }).refine(
18450
18460
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18451
18461
  {
@@ -18461,21 +18471,21 @@ expectTypesMatch(true);
18461
18471
 
18462
18472
  // lib/components/schematic-symbol.ts
18463
18473
  import { rotation as rotation8 } from "circuit-json";
18464
- import { z as z120 } from "zod";
18465
- var schematicSymbolConnections = z120.custom().pipe(z120.record(z120.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18474
+ import { z as z121 } from "zod";
18475
+ var schematicSymbolConnections = z121.custom().pipe(z121.record(z121.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18466
18476
  message: "connections must map at least one schematic symbol port"
18467
18477
  });
18468
- var schematicSymbolProps = z120.object({
18469
- name: z120.string().min(1),
18470
- displayName: z120.string().optional(),
18471
- chipRef: z120.string().min(1).optional(),
18472
- symbolName: z120.string().min(1),
18478
+ var schematicSymbolProps = z121.object({
18479
+ name: z121.string().min(1),
18480
+ displayName: z121.string().optional(),
18481
+ chipRef: z121.string().min(1).optional(),
18482
+ symbolName: z121.string().min(1),
18473
18483
  connections: schematicSymbolConnections.optional(),
18474
18484
  schX: distance.optional(),
18475
18485
  schY: distance.optional(),
18476
18486
  schRotation: rotation8.optional(),
18477
- schSectionName: z120.string().optional(),
18478
- schSheetName: z120.string().optional()
18487
+ schSectionName: z121.string().optional(),
18488
+ schSheetName: z121.string().optional()
18479
18489
  });
18480
18490
  expectTypesMatch(
18481
18491
  true
@@ -18483,15 +18493,15 @@ expectTypesMatch(
18483
18493
 
18484
18494
  // lib/components/schematic-circle.ts
18485
18495
  import { distance as distance31, point as point6 } from "circuit-json";
18486
- import { z as z121 } from "zod";
18487
- var schematicCircleProps = z121.object({
18496
+ import { z as z122 } from "zod";
18497
+ var schematicCircleProps = z122.object({
18488
18498
  center: point6,
18489
18499
  radius: distance31,
18490
18500
  strokeWidth: distance31.optional(),
18491
- color: z121.string().optional(),
18492
- isFilled: z121.boolean().optional().default(false),
18493
- fillColor: z121.string().optional(),
18494
- isDashed: z121.boolean().optional().default(false)
18501
+ color: z122.string().optional(),
18502
+ isFilled: z122.boolean().optional().default(false),
18503
+ fillColor: z122.string().optional(),
18504
+ isDashed: z122.boolean().optional().default(false)
18495
18505
  });
18496
18506
  expectTypesMatch(
18497
18507
  true
@@ -18499,32 +18509,32 @@ expectTypesMatch(
18499
18509
 
18500
18510
  // lib/components/schematic-rect.ts
18501
18511
  import { distance as distance32, rotation as rotation9 } from "circuit-json";
18502
- import { z as z122 } from "zod";
18503
- var schematicRectProps = z122.object({
18512
+ import { z as z123 } from "zod";
18513
+ var schematicRectProps = z123.object({
18504
18514
  schX: distance32.optional(),
18505
18515
  schY: distance32.optional(),
18506
18516
  width: distance32,
18507
18517
  height: distance32,
18508
18518
  rotation: rotation9.default(0),
18509
18519
  strokeWidth: distance32.optional(),
18510
- color: z122.string().optional(),
18511
- isFilled: z122.boolean().optional().default(false),
18512
- fillColor: z122.string().optional(),
18513
- isDashed: z122.boolean().optional().default(false)
18520
+ color: z123.string().optional(),
18521
+ isFilled: z123.boolean().optional().default(false),
18522
+ fillColor: z123.string().optional(),
18523
+ isDashed: z123.boolean().optional().default(false)
18514
18524
  });
18515
18525
  expectTypesMatch(true);
18516
18526
 
18517
18527
  // lib/components/schematic-line.ts
18518
18528
  import { distance as distance33 } from "circuit-json";
18519
- import { z as z123 } from "zod";
18520
- var schematicLineProps = z123.object({
18529
+ import { z as z124 } from "zod";
18530
+ var schematicLineProps = z124.object({
18521
18531
  x1: distance33,
18522
18532
  y1: distance33,
18523
18533
  x2: distance33,
18524
18534
  y2: distance33,
18525
18535
  strokeWidth: distance33.optional(),
18526
- color: z123.string().optional(),
18527
- isDashed: z123.boolean().optional().default(false),
18536
+ color: z124.string().optional(),
18537
+ isDashed: z124.boolean().optional().default(false),
18528
18538
  dashLength: distance33.optional(),
18529
18539
  dashGap: distance33.optional()
18530
18540
  });
@@ -18532,11 +18542,11 @@ expectTypesMatch(true);
18532
18542
 
18533
18543
  // lib/components/schematic-text.ts
18534
18544
  import { distance as distance34, rotation as rotation10 } from "circuit-json";
18535
- import { z as z125 } from "zod";
18545
+ import { z as z126 } from "zod";
18536
18546
 
18537
18547
  // lib/common/fivePointAnchor.ts
18538
- import { z as z124 } from "zod";
18539
- var fivePointAnchor = z124.enum([
18548
+ import { z as z125 } from "zod";
18549
+ var fivePointAnchor = z125.enum([
18540
18550
  "center",
18541
18551
  "left",
18542
18552
  "right",
@@ -18545,39 +18555,39 @@ var fivePointAnchor = z124.enum([
18545
18555
  ]);
18546
18556
 
18547
18557
  // lib/components/schematic-text.ts
18548
- var schematicTextProps = z125.object({
18558
+ var schematicTextProps = z126.object({
18549
18559
  schX: distance34.optional(),
18550
18560
  schY: distance34.optional(),
18551
- text: z125.string(),
18552
- fontSize: z125.number().default(1),
18553
- anchor: z125.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18554
- color: z125.string().default("#000000"),
18561
+ text: z126.string(),
18562
+ fontSize: z126.number().default(1),
18563
+ anchor: z126.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18564
+ color: z126.string().default("#000000"),
18555
18565
  schRotation: rotation10.default(0)
18556
18566
  });
18557
18567
  expectTypesMatch(true);
18558
18568
 
18559
18569
  // lib/components/schematic-path.ts
18560
18570
  import { distance as distance35, point as point7 } from "circuit-json";
18561
- import { z as z126 } from "zod";
18562
- var schematicPathProps = z126.object({
18563
- points: z126.array(point7).optional(),
18564
- svgPath: z126.string().optional(),
18571
+ import { z as z127 } from "zod";
18572
+ var schematicPathProps = z127.object({
18573
+ points: z127.array(point7).optional(),
18574
+ svgPath: z127.string().optional(),
18565
18575
  strokeWidth: distance35.optional(),
18566
- strokeColor: z126.string().optional(),
18576
+ strokeColor: z127.string().optional(),
18567
18577
  dashLength: distance35.optional(),
18568
18578
  dashGap: distance35.optional(),
18569
- isFilled: z126.boolean().optional().default(false),
18570
- fillColor: z126.string().optional()
18579
+ isFilled: z127.boolean().optional().default(false),
18580
+ fillColor: z127.string().optional()
18571
18581
  });
18572
18582
  expectTypesMatch(true);
18573
18583
 
18574
18584
  // lib/components/schematic-table.ts
18575
18585
  import { distance as distance36 } from "circuit-json";
18576
- import { z as z127 } from "zod";
18577
- var schematicTableProps = z127.object({
18586
+ import { z as z128 } from "zod";
18587
+ var schematicTableProps = z128.object({
18578
18588
  schX: distance36.optional(),
18579
18589
  schY: distance36.optional(),
18580
- children: z127.any().optional(),
18590
+ children: z128.any().optional(),
18581
18591
  cellPadding: distance36.optional(),
18582
18592
  borderWidth: distance36.optional(),
18583
18593
  anchor: ninePointAnchor.optional(),
@@ -18587,34 +18597,34 @@ expectTypesMatch(true);
18587
18597
 
18588
18598
  // lib/components/schematic-row.ts
18589
18599
  import { distance as distance37 } from "circuit-json";
18590
- import { z as z128 } from "zod";
18591
- var schematicRowProps = z128.object({
18592
- children: z128.any().optional(),
18600
+ import { z as z129 } from "zod";
18601
+ var schematicRowProps = z129.object({
18602
+ children: z129.any().optional(),
18593
18603
  height: distance37.optional()
18594
18604
  });
18595
18605
  expectTypesMatch(true);
18596
18606
 
18597
18607
  // lib/components/schematic-cell.ts
18598
18608
  import { distance as distance38 } from "circuit-json";
18599
- import { z as z129 } from "zod";
18600
- var schematicCellProps = z129.object({
18601
- children: z129.string().optional(),
18602
- horizontalAlign: z129.enum(["left", "center", "right"]).optional(),
18603
- verticalAlign: z129.enum(["top", "middle", "bottom"]).optional(),
18609
+ import { z as z130 } from "zod";
18610
+ var schematicCellProps = z130.object({
18611
+ children: z130.string().optional(),
18612
+ horizontalAlign: z130.enum(["left", "center", "right"]).optional(),
18613
+ verticalAlign: z130.enum(["top", "middle", "bottom"]).optional(),
18604
18614
  fontSize: distance38.optional(),
18605
- rowSpan: z129.number().optional(),
18606
- colSpan: z129.number().optional(),
18615
+ rowSpan: z130.number().optional(),
18616
+ colSpan: z130.number().optional(),
18607
18617
  width: distance38.optional(),
18608
- text: z129.string().optional()
18618
+ text: z130.string().optional()
18609
18619
  });
18610
18620
  expectTypesMatch(true);
18611
18621
 
18612
18622
  // lib/components/schematic-section.ts
18613
18623
  import { distance as distance39 } from "circuit-json";
18614
- import { z as z130 } from "zod";
18615
- var schematicSectionProps = z130.object({
18616
- displayName: z130.string().optional(),
18617
- name: z130.string(),
18624
+ import { z as z131 } from "zod";
18625
+ var schematicSectionProps = z131.object({
18626
+ displayName: z131.string().optional(),
18627
+ name: z131.string(),
18618
18628
  sectionTitleFontSize: distance39.optional()
18619
18629
  });
18620
18630
  expectTypesMatch(
@@ -18622,51 +18632,51 @@ expectTypesMatch(
18622
18632
  );
18623
18633
 
18624
18634
  // lib/components/schematic-sheet.ts
18625
- import { z as z131 } from "zod";
18626
- var schematicSheetProps = z131.object({
18627
- name: z131.string(),
18628
- displayName: z131.string(),
18629
- sheetIndex: z131.number().optional(),
18630
- children: z131.any().optional()
18635
+ import { z as z132 } from "zod";
18636
+ var schematicSheetProps = z132.object({
18637
+ name: z132.string(),
18638
+ displayName: z132.string(),
18639
+ sheetIndex: z132.number().optional(),
18640
+ children: z132.any().optional()
18631
18641
  });
18632
18642
  expectTypesMatch(true);
18633
18643
 
18634
18644
  // lib/components/copper-text.ts
18635
18645
  import { layer_ref as layer_ref11, length as length8 } from "circuit-json";
18636
- import { z as z132 } from "zod";
18646
+ import { z as z133 } from "zod";
18637
18647
  var copperTextProps = pcbLayoutProps.extend({
18638
- text: z132.string(),
18648
+ text: z133.string(),
18639
18649
  anchorAlignment: ninePointAnchor.default("center"),
18640
- font: z132.enum(["tscircuit2024"]).optional(),
18650
+ font: z133.enum(["tscircuit2024"]).optional(),
18641
18651
  fontSize: length8.optional(),
18642
- layers: z132.array(layer_ref11).optional(),
18643
- knockout: z132.boolean().optional(),
18644
- mirrored: z132.boolean().optional()
18652
+ layers: z133.array(layer_ref11).optional(),
18653
+ knockout: z133.boolean().optional(),
18654
+ mirrored: z133.boolean().optional()
18645
18655
  });
18646
18656
 
18647
18657
  // lib/components/silkscreen-text.ts
18648
18658
  import { layer_ref as layer_ref12, length as length9 } from "circuit-json";
18649
- import { z as z133 } from "zod";
18659
+ import { z as z134 } from "zod";
18650
18660
  var silkscreenTextProps = pcbLayoutProps.extend({
18651
- text: z133.string(),
18661
+ text: z134.string(),
18652
18662
  anchorAlignment: ninePointAnchor.default("center"),
18653
- font: z133.enum(["tscircuit2024"]).optional(),
18663
+ font: z134.enum(["tscircuit2024"]).optional(),
18654
18664
  fontSize: length9.optional(),
18655
18665
  /**
18656
18666
  * If true, text will knock out underlying silkscreen
18657
18667
  */
18658
- isKnockout: z133.boolean().optional(),
18668
+ isKnockout: z134.boolean().optional(),
18659
18669
  knockoutPadding: length9.optional(),
18660
18670
  knockoutPaddingLeft: length9.optional(),
18661
18671
  knockoutPaddingRight: length9.optional(),
18662
18672
  knockoutPaddingTop: length9.optional(),
18663
18673
  knockoutPaddingBottom: length9.optional(),
18664
- layers: z133.array(layer_ref12).optional()
18674
+ layers: z134.array(layer_ref12).optional()
18665
18675
  });
18666
18676
 
18667
18677
  // lib/components/silkscreen-path.ts
18668
18678
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18669
- import { z as z134 } from "zod";
18679
+ import { z as z135 } from "zod";
18670
18680
  var silkscreenPathProps = pcbLayoutProps.omit({
18671
18681
  pcbLeftEdgeX: true,
18672
18682
  pcbRightEdgeX: true,
@@ -18678,7 +18688,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18678
18688
  pcbOffsetY: true,
18679
18689
  pcbRotation: true
18680
18690
  }).extend({
18681
- route: z134.array(route_hint_point5),
18691
+ route: z135.array(route_hint_point5),
18682
18692
  strokeWidth: length10.optional()
18683
18693
  });
18684
18694
 
@@ -18700,10 +18710,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18700
18710
 
18701
18711
  // lib/components/silkscreen-rect.ts
18702
18712
  import { distance as distance41 } from "circuit-json";
18703
- import { z as z135 } from "zod";
18713
+ import { z as z136 } from "zod";
18704
18714
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18705
- filled: z135.boolean().default(true).optional(),
18706
- stroke: z135.enum(["dashed", "solid", "none"]).optional(),
18715
+ filled: z136.boolean().default(true).optional(),
18716
+ stroke: z136.enum(["dashed", "solid", "none"]).optional(),
18707
18717
  strokeWidth: distance41.optional(),
18708
18718
  width: distance41,
18709
18719
  height: distance41,
@@ -18712,10 +18722,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18712
18722
 
18713
18723
  // lib/components/silkscreen-circle.ts
18714
18724
  import { distance as distance42 } from "circuit-json";
18715
- import { z as z136 } from "zod";
18725
+ import { z as z137 } from "zod";
18716
18726
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18717
- isFilled: z136.boolean().optional(),
18718
- isOutline: z136.boolean().optional(),
18727
+ isFilled: z137.boolean().optional(),
18728
+ isOutline: z137.boolean().optional(),
18719
18729
  strokeWidth: distance42.optional(),
18720
18730
  radius: distance42
18721
18731
  });
@@ -18733,63 +18743,63 @@ expectTypesMatch(true);
18733
18743
 
18734
18744
  // lib/components/trace-hint.ts
18735
18745
  import { distance as distance43, layer_ref as layer_ref13, route_hint_point as route_hint_point6 } from "circuit-json";
18736
- import { z as z138 } from "zod";
18737
- var routeHintPointProps = z138.object({
18746
+ import { z as z139 } from "zod";
18747
+ var routeHintPointProps = z139.object({
18738
18748
  x: distance43,
18739
18749
  y: distance43,
18740
- via: z138.boolean().optional(),
18750
+ via: z139.boolean().optional(),
18741
18751
  toLayer: layer_ref13.optional()
18742
18752
  });
18743
- var traceHintProps = z138.object({
18744
- for: z138.string().optional().describe(
18753
+ var traceHintProps = z139.object({
18754
+ for: z139.string().optional().describe(
18745
18755
  "Selector for the port you're targeting, not required if you're inside a trace"
18746
18756
  ),
18747
- order: z138.number().optional(),
18757
+ order: z139.number().optional(),
18748
18758
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18749
- offsets: z138.array(route_hint_point6).or(z138.array(routeHintPointProps)).optional(),
18750
- traceWidth: z138.number().optional()
18759
+ offsets: z139.array(route_hint_point6).or(z139.array(routeHintPointProps)).optional(),
18760
+ traceWidth: z139.number().optional()
18751
18761
  });
18752
18762
 
18753
18763
  // lib/components/port.ts
18754
- import { z as z139 } from "zod";
18764
+ import { z as z140 } from "zod";
18755
18765
  var portProps = commonLayoutProps.extend({
18756
- name: z139.string().optional(),
18757
- pinNumber: z139.number().optional(),
18758
- schStemLength: z139.number().optional(),
18759
- aliases: z139.array(z139.string()).optional(),
18760
- layer: z139.string().optional(),
18761
- layers: z139.array(z139.string()).optional(),
18762
- schX: z139.number().optional(),
18763
- schY: z139.number().optional(),
18766
+ name: z140.string().optional(),
18767
+ pinNumber: z140.number().optional(),
18768
+ schStemLength: z140.number().optional(),
18769
+ aliases: z140.array(z140.string()).optional(),
18770
+ layer: z140.string().optional(),
18771
+ layers: z140.array(z140.string()).optional(),
18772
+ schX: z140.number().optional(),
18773
+ schY: z140.number().optional(),
18764
18774
  direction: direction.optional(),
18765
- connectsTo: z139.string().or(z139.array(z139.string())).optional(),
18775
+ connectsTo: z140.string().or(z140.array(z140.string())).optional(),
18766
18776
  kicadPinMetadata: kicadPinMetadata.optional(),
18767
- hasInversionCircle: z139.boolean().optional()
18777
+ hasInversionCircle: z140.boolean().optional()
18768
18778
  });
18769
18779
 
18770
18780
  // lib/components/pcb-note-text.ts
18771
18781
  import { length as length11 } from "circuit-json";
18772
- import { z as z140 } from "zod";
18782
+ import { z as z141 } from "zod";
18773
18783
  var pcbNoteTextProps = pcbLayoutProps.extend({
18774
- text: z140.string(),
18775
- anchorAlignment: z140.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18776
- font: z140.enum(["tscircuit2024"]).optional(),
18784
+ text: z141.string(),
18785
+ anchorAlignment: z141.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18786
+ font: z141.enum(["tscircuit2024"]).optional(),
18777
18787
  fontSize: length11.optional(),
18778
- color: z140.string().optional()
18788
+ color: z141.string().optional()
18779
18789
  });
18780
18790
  expectTypesMatch(true);
18781
18791
 
18782
18792
  // lib/components/pcb-note-rect.ts
18783
18793
  import { distance as distance44 } from "circuit-json";
18784
- import { z as z141 } from "zod";
18794
+ import { z as z142 } from "zod";
18785
18795
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18786
18796
  width: distance44,
18787
18797
  height: distance44,
18788
18798
  strokeWidth: distance44.optional(),
18789
- isFilled: z141.boolean().optional(),
18790
- hasStroke: z141.boolean().optional(),
18791
- isStrokeDashed: z141.boolean().optional(),
18792
- color: z141.string().optional(),
18799
+ isFilled: z142.boolean().optional(),
18800
+ hasStroke: z142.boolean().optional(),
18801
+ isStrokeDashed: z142.boolean().optional(),
18802
+ color: z142.string().optional(),
18793
18803
  cornerRadius: distance44.optional()
18794
18804
  });
18795
18805
  expectTypesMatch(true);
@@ -18799,7 +18809,7 @@ import {
18799
18809
  length as length12,
18800
18810
  route_hint_point as route_hint_point7
18801
18811
  } from "circuit-json";
18802
- import { z as z142 } from "zod";
18812
+ import { z as z143 } from "zod";
18803
18813
  var pcbNotePathProps = pcbLayoutProps.omit({
18804
18814
  pcbLeftEdgeX: true,
18805
18815
  pcbRightEdgeX: true,
@@ -18811,15 +18821,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18811
18821
  pcbOffsetY: true,
18812
18822
  pcbRotation: true
18813
18823
  }).extend({
18814
- route: z142.array(route_hint_point7),
18824
+ route: z143.array(route_hint_point7),
18815
18825
  strokeWidth: length12.optional(),
18816
- color: z142.string().optional()
18826
+ color: z143.string().optional()
18817
18827
  });
18818
18828
  expectTypesMatch(true);
18819
18829
 
18820
18830
  // lib/components/pcb-note-line.ts
18821
18831
  import { distance as distance45 } from "circuit-json";
18822
- import { z as z143 } from "zod";
18832
+ import { z as z144 } from "zod";
18823
18833
  var pcbNoteLineProps = pcbLayoutProps.omit({
18824
18834
  pcbLeftEdgeX: true,
18825
18835
  pcbRightEdgeX: true,
@@ -18836,15 +18846,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18836
18846
  x2: distance45,
18837
18847
  y2: distance45,
18838
18848
  strokeWidth: distance45.optional(),
18839
- color: z143.string().optional(),
18840
- isDashed: z143.boolean().optional()
18849
+ color: z144.string().optional(),
18850
+ isDashed: z144.boolean().optional()
18841
18851
  });
18842
18852
  expectTypesMatch(true);
18843
18853
 
18844
18854
  // lib/components/pcb-note-dimension.ts
18845
18855
  import { distance as distance46, length as length13 } from "circuit-json";
18846
- import { z as z144 } from "zod";
18847
- var dimensionTarget2 = z144.union([z144.string(), point]);
18856
+ import { z as z145 } from "zod";
18857
+ var dimensionTarget2 = z145.union([z145.string(), point]);
18848
18858
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18849
18859
  pcbLeftEdgeX: true,
18850
18860
  pcbRightEdgeX: true,
@@ -18858,101 +18868,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18858
18868
  }).extend({
18859
18869
  from: dimensionTarget2,
18860
18870
  to: dimensionTarget2,
18861
- text: z144.string().optional(),
18871
+ text: z145.string().optional(),
18862
18872
  offset: distance46.optional(),
18863
- font: z144.enum(["tscircuit2024"]).optional(),
18873
+ font: z145.enum(["tscircuit2024"]).optional(),
18864
18874
  fontSize: length13.optional(),
18865
- color: z144.string().optional(),
18875
+ color: z145.string().optional(),
18866
18876
  arrowSize: distance46.optional(),
18867
- units: z144.enum(["in", "mm"]).optional(),
18868
- outerEdgeToEdge: z144.literal(true).optional(),
18869
- centerToCenter: z144.literal(true).optional(),
18870
- innerEdgeToEdge: z144.literal(true).optional()
18877
+ units: z145.enum(["in", "mm"]).optional(),
18878
+ outerEdgeToEdge: z145.literal(true).optional(),
18879
+ centerToCenter: z145.literal(true).optional(),
18880
+ innerEdgeToEdge: z145.literal(true).optional()
18871
18881
  });
18872
18882
  expectTypesMatch(
18873
18883
  true
18874
18884
  );
18875
18885
 
18876
18886
  // lib/platformConfig.ts
18877
- import { z as z145 } from "zod";
18878
- var unvalidatedCircuitJson = z145.array(z145.any()).describe("Circuit JSON");
18879
- var footprintLibraryResult = z145.object({
18880
- footprintCircuitJson: z145.array(z145.any()),
18887
+ import { z as z146 } from "zod";
18888
+ var unvalidatedCircuitJson = z146.array(z146.any()).describe("Circuit JSON");
18889
+ var footprintLibraryResult = z146.object({
18890
+ footprintCircuitJson: z146.array(z146.any()),
18881
18891
  cadModel: cadModelProp.optional()
18882
18892
  });
18883
- var pathToCircuitJsonFn = z145.function().args(z145.string()).returns(z145.promise(footprintLibraryResult)).or(
18884
- z145.function().args(
18885
- z145.string(),
18886
- z145.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18887
- ).returns(z145.promise(footprintLibraryResult))
18893
+ var pathToCircuitJsonFn = z146.function().args(z146.string()).returns(z146.promise(footprintLibraryResult)).or(
18894
+ z146.function().args(
18895
+ z146.string(),
18896
+ z146.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18897
+ ).returns(z146.promise(footprintLibraryResult))
18888
18898
  ).describe("A function that takes a path and returns Circuit JSON");
18889
- var footprintFileParserEntry = z145.object({
18890
- loadFromUrl: z145.function().args(z145.string()).returns(z145.promise(footprintLibraryResult)).describe(
18899
+ var footprintFileParserEntry = z146.object({
18900
+ loadFromUrl: z146.function().args(z146.string()).returns(z146.promise(footprintLibraryResult)).describe(
18891
18901
  "A function that takes a footprint file URL and returns Circuit JSON"
18892
18902
  )
18893
18903
  });
18894
- var spiceEngineSimulationResult = z145.object({
18895
- engineVersionString: z145.string().optional(),
18904
+ var spiceEngineSimulationResult = z146.object({
18905
+ engineVersionString: z146.string().optional(),
18896
18906
  simulationResultCircuitJson: unvalidatedCircuitJson
18897
18907
  });
18898
- var spiceEngineZod = z145.object({
18899
- simulate: z145.function().args(z145.string()).returns(z145.promise(spiceEngineSimulationResult)).describe(
18908
+ var spiceEngineZod = z146.object({
18909
+ simulate: z146.function().args(z146.string()).returns(z146.promise(spiceEngineSimulationResult)).describe(
18900
18910
  "A function that takes a SPICE string and returns a simulation result"
18901
18911
  )
18902
18912
  });
18903
- var defaultSpiceEngine = z145.custom(
18913
+ var defaultSpiceEngine = z146.custom(
18904
18914
  (value) => typeof value === "string"
18905
18915
  );
18906
- var autorouterInstance = z145.object({
18907
- run: z145.function().args().returns(z145.promise(z145.unknown())).describe("Run the autorouter"),
18908
- getOutputSimpleRouteJson: z145.function().args().returns(z145.promise(z145.any())).describe("Get the resulting SimpleRouteJson")
18916
+ var autorouterInstance = z146.object({
18917
+ run: z146.function().args().returns(z146.promise(z146.unknown())).describe("Run the autorouter"),
18918
+ getOutputSimpleRouteJson: z146.function().args().returns(z146.promise(z146.any())).describe("Get the resulting SimpleRouteJson")
18909
18919
  });
18910
- var autorouterDefinition = z145.object({
18911
- createAutorouter: z145.function().args(z145.any(), z145.any().optional()).returns(z145.union([autorouterInstance, z145.promise(autorouterInstance)])).describe("Create an autorouter instance")
18920
+ var autorouterDefinition = z146.object({
18921
+ createAutorouter: z146.function().args(z146.any(), z146.any().optional()).returns(z146.union([autorouterInstance, z146.promise(autorouterInstance)])).describe("Create an autorouter instance")
18912
18922
  });
18913
- var platformFetch = z145.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18914
- var platformConfig = z145.object({
18923
+ var platformFetch = z146.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18924
+ var platformConfig = z146.object({
18915
18925
  partsEngine: partsEngine.optional(),
18916
18926
  autorouter: autorouterProp.optional(),
18917
- autorouterMap: z145.record(z145.string(), autorouterDefinition).optional(),
18927
+ autorouterMap: z146.record(z146.string(), autorouterDefinition).optional(),
18918
18928
  registryApiUrl: url.optional(),
18919
18929
  cloudAutorouterUrl: url.optional(),
18920
- projectName: z145.string().optional(),
18930
+ projectName: z146.string().optional(),
18921
18931
  projectBaseUrl: url.optional(),
18922
- version: z145.string().optional(),
18932
+ version: z146.string().optional(),
18923
18933
  url: url.optional(),
18924
- printBoardInformationToSilkscreen: z145.boolean().optional(),
18925
- includeBoardFiles: z145.array(z145.string()).describe(
18934
+ printBoardInformationToSilkscreen: z146.boolean().optional(),
18935
+ includeBoardFiles: z146.array(z146.string()).describe(
18926
18936
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18927
18937
  ).optional(),
18928
- snapshotsDir: z145.string().describe(
18938
+ snapshotsDir: z146.string().describe(
18929
18939
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18930
18940
  ).optional(),
18931
18941
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18932
- unitPreference: z145.enum(["mm", "in", "mil"]).optional(),
18933
- localCacheEngine: z145.any().optional(),
18934
- pcbDisabled: z145.boolean().optional(),
18935
- routingDisabled: z145.boolean().optional(),
18936
- schematicDisabled: z145.boolean().optional(),
18937
- partsEngineDisabled: z145.boolean().optional(),
18938
- drcChecksDisabled: z145.boolean().optional(),
18939
- netlistDrcChecksDisabled: z145.boolean().optional(),
18940
- routingDrcChecksDisabled: z145.boolean().optional(),
18941
- placementDrcChecksDisabled: z145.boolean().optional(),
18942
- pinSpecificationDrcChecksDisabled: z145.boolean().optional(),
18943
- spiceEngineMap: z145.record(z145.string(), spiceEngineZod).optional(),
18944
- footprintLibraryMap: z145.record(
18945
- z145.string(),
18946
- z145.union([
18942
+ unitPreference: z146.enum(["mm", "in", "mil"]).optional(),
18943
+ localCacheEngine: z146.any().optional(),
18944
+ pcbDisabled: z146.boolean().optional(),
18945
+ routingDisabled: z146.boolean().optional(),
18946
+ schematicDisabled: z146.boolean().optional(),
18947
+ partsEngineDisabled: z146.boolean().optional(),
18948
+ drcChecksDisabled: z146.boolean().optional(),
18949
+ netlistDrcChecksDisabled: z146.boolean().optional(),
18950
+ routingDrcChecksDisabled: z146.boolean().optional(),
18951
+ placementDrcChecksDisabled: z146.boolean().optional(),
18952
+ pinSpecificationDrcChecksDisabled: z146.boolean().optional(),
18953
+ spiceEngineMap: z146.record(z146.string(), spiceEngineZod).optional(),
18954
+ footprintLibraryMap: z146.record(
18955
+ z146.string(),
18956
+ z146.union([
18947
18957
  pathToCircuitJsonFn,
18948
- z145.record(
18949
- z145.string(),
18950
- z145.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18958
+ z146.record(
18959
+ z146.string(),
18960
+ z146.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18951
18961
  )
18952
18962
  ])
18953
18963
  ).optional(),
18954
- footprintFileParserMap: z145.record(z145.string(), footprintFileParserEntry).optional(),
18955
- resolveProjectStaticFileImportUrl: z145.function().args(z145.string()).returns(z145.promise(z145.string())).describe(
18964
+ footprintFileParserMap: z146.record(z146.string(), footprintFileParserEntry).optional(),
18965
+ resolveProjectStaticFileImportUrl: z146.function().args(z146.string()).returns(z146.promise(z146.string())).describe(
18956
18966
  "A function that returns a string URL for static files for the project"
18957
18967
  ).optional(),
18958
18968
  platformFetch: platformFetch.optional()
@@ -19007,6 +19017,7 @@ export {
19007
19017
  breakoutPointProps,
19008
19018
  breakoutProps,
19009
19019
  bugProps,
19020
+ busFanoutDirection,
19010
19021
  busProps,
19011
19022
  cadModelAxisDirection,
19012
19023
  cadModelAxisDirections,
@@ -19072,6 +19083,7 @@ export {
19072
19083
  fabricationNoteRectProps,
19073
19084
  fabricationNoteTextProps,
19074
19085
  fanoutBoundaryPadding,
19086
+ fanoutProps,
19075
19087
  fiducialProps,
19076
19088
  footprintInsertionDirection,
19077
19089
  footprintProp,