@tscircuit/props 0.0.646 → 0.0.648

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
@@ -16753,18 +16753,66 @@ import "zod";
16753
16753
  var subpanelProps = panelProps;
16754
16754
  expectTypesMatch(true);
16755
16755
 
16756
- // lib/common/fanoutProps.ts
16756
+ // lib/common/fanoutTracePath.ts
16757
16757
  import { layer_ref as layer_ref5 } from "circuit-json";
16758
- import { z as z48 } from "zod";
16758
+ import { z as z47 } from "zod";
16759
+ var coordinate = distance.refine(Number.isFinite, "Coordinate must be finite");
16760
+ var positiveDistance2 = distance.refine(
16761
+ (value) => Number.isFinite(value) && value > 0,
16762
+ "Distance must be positive and finite"
16763
+ );
16764
+ var routePoint = z47.discriminatedUnion("route_type", [
16765
+ z47.object({
16766
+ route_type: z47.literal("wire"),
16767
+ x: coordinate,
16768
+ y: coordinate,
16769
+ width: positiveDistance2,
16770
+ layer: layer_ref5
16771
+ }),
16772
+ z47.object({
16773
+ route_type: z47.literal("via"),
16774
+ x: coordinate,
16775
+ y: coordinate,
16776
+ from_layer: layer_ref5,
16777
+ to_layer: layer_ref5,
16778
+ via_diameter: positiveDistance2.optional(),
16779
+ via_hole_diameter: positiveDistance2.optional()
16780
+ })
16781
+ ]);
16782
+ var fanoutTracePath = z47.object({
16783
+ connection: z47.string().min(1),
16784
+ route: z47.array(routePoint).min(2).superRefine((route, ctx) => {
16785
+ if (route[0]?.route_type !== "wire" || route.at(-1)?.route_type !== "wire") {
16786
+ ctx.addIssue({
16787
+ code: "custom",
16788
+ message: "A fanout trace path must start and end with wire points"
16789
+ });
16790
+ }
16791
+ let layer = route[0]?.route_type === "wire" ? route[0].layer : void 0;
16792
+ for (const point8 of route) {
16793
+ if ((point8.route_type === "wire" ? point8.layer : point8.from_layer) !== layer) {
16794
+ ctx.addIssue({
16795
+ code: "custom",
16796
+ message: "A fanout trace path must use vias for layer changes"
16797
+ });
16798
+ }
16799
+ if (point8.route_type === "via") layer = point8.to_layer;
16800
+ }
16801
+ })
16802
+ });
16803
+
16804
+ // lib/common/fanoutProps.ts
16805
+ import { layer_ref as layer_ref6 } from "circuit-json";
16806
+ import { z as z49 } from "zod";
16759
16807
 
16760
16808
  // lib/common/fanoutBoundaryPadding.ts
16761
- import { z as z47 } from "zod";
16809
+ import { z as z48 } from "zod";
16762
16810
  var nonnegativeDistance = distance.refine((value) => value >= 0, {
16763
16811
  message: "Fanout boundary padding cannot be negative"
16764
16812
  });
16765
- var fanoutBoundaryPadding = z47.union([
16813
+ var fanoutBoundaryPadding = z48.union([
16766
16814
  nonnegativeDistance,
16767
- z47.object({
16815
+ z48.object({
16768
16816
  top: nonnegativeDistance.optional(),
16769
16817
  right: nonnegativeDistance.optional(),
16770
16818
  bottom: nonnegativeDistance.optional(),
@@ -16791,31 +16839,32 @@ var canonicalBusFanoutDirectionValues = [
16791
16839
  "leftside_top",
16792
16840
  "center"
16793
16841
  ];
16794
- var canonicalBusFanoutDirection = z48.enum(
16842
+ var canonicalBusFanoutDirection = z49.enum(
16795
16843
  canonicalBusFanoutDirectionValues
16796
16844
  );
16797
- var busFanoutDirection = z48.union([
16845
+ var busFanoutDirection = z49.union([
16798
16846
  ninePointAnchor,
16799
16847
  canonicalBusFanoutDirection,
16800
- z48.object({
16801
- direction: z48.union([ninePointAnchor, canonicalBusFanoutDirection])
16848
+ z49.object({
16849
+ direction: z49.union([ninePointAnchor, canonicalBusFanoutDirection])
16802
16850
  })
16803
16851
  ]);
16804
- var fanoutProps = z48.object({
16805
- busFanoutDirections: z48.record(busFanoutDirection).optional(),
16852
+ var fanoutProps = z49.object({
16853
+ busFanoutDirections: z49.record(busFanoutDirection).optional(),
16806
16854
  fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
16807
- fanoutRoutingLayers: z48.array(layer_ref5).min(1).optional(),
16808
- fanoutPourNetMap: z48.record(layer_ref5, z48.union([z48.string(), z48.array(z48.string()).min(1)])).optional()
16855
+ fanoutRoutingLayers: z49.array(layer_ref6).min(1).optional(),
16856
+ fanoutPourNetMap: z49.record(layer_ref6, z49.union([z49.string(), z49.array(z49.string()).min(1)])).optional()
16809
16857
  });
16810
16858
  expectTypesMatch(true);
16811
16859
 
16812
16860
  // lib/components/breakout.ts
16813
- import "zod";
16861
+ import { z as z50 } from "zod";
16814
16862
  var nonnegativeFanoutMargin = distance.refine((value) => value >= 0, {
16815
16863
  message: "Fanout margin cannot be negative"
16816
16864
  });
16817
16865
  var breakoutProps = subcircuitGroupProps.extend({
16818
16866
  autorouter: autorouterProp.default("fanout"),
16867
+ pcbTracePaths: z50.array(fanoutTracePath).optional(),
16819
16868
  padding: distance.optional(),
16820
16869
  paddingLeft: distance.optional(),
16821
16870
  paddingRight: distance.optional(),
@@ -16829,41 +16878,41 @@ expectTypesMatch(true);
16829
16878
  // lib/components/chip.ts
16830
16879
  import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
16831
16880
  import { isValidElement } from "react";
16832
- import { z as z50 } from "zod";
16833
- var connectionTarget2 = z50.string().or(z50.array(z50.string()).readonly()).or(z50.array(z50.string()));
16834
- var noConnectProp = z50.array(schematicPinLabel).readonly().or(z50.array(schematicPinLabel));
16835
- var connectionsProp = z50.custom().pipe(z50.record(z50.string(), connectionTarget2));
16836
- var spicemodelElement = z50.custom(
16881
+ import { z as z51 } from "zod";
16882
+ var connectionTarget2 = z51.string().or(z51.array(z51.string()).readonly()).or(z51.array(z51.string()));
16883
+ var noConnectProp = z51.array(schematicPinLabel).readonly().or(z51.array(schematicPinLabel));
16884
+ var connectionsProp = z51.custom().pipe(z51.record(z51.string(), connectionTarget2));
16885
+ var spicemodelElement = z51.custom(
16837
16886
  (v) => !!v && typeof v === "object" && "type" in v && "props" in v
16838
16887
  );
16839
- var internalCircuitElement = z50.custom(
16888
+ var internalCircuitElement = z51.custom(
16840
16889
  (value) => isValidElement(value) && value.type === "internalcircuit"
16841
16890
  );
16842
- var pinLabelsProp = z50.record(
16891
+ var pinLabelsProp = z51.record(
16843
16892
  schematicPinLabel,
16844
- schematicPinLabel.or(z50.array(schematicPinLabel).readonly()).or(z50.array(schematicPinLabel))
16893
+ schematicPinLabel.or(z51.array(schematicPinLabel).readonly()).or(z51.array(schematicPinLabel))
16845
16894
  );
16846
16895
  expectTypesMatch(true);
16847
- var pinCompatibleVariant = z50.object({
16848
- manufacturerPartNumber: z50.string().optional(),
16849
- supplierPartNumber: z50.record(supplier_name2, z50.array(z50.string())).optional()
16896
+ var pinCompatibleVariant = z51.object({
16897
+ manufacturerPartNumber: z51.string().optional(),
16898
+ supplierPartNumber: z51.record(supplier_name2, z51.array(z51.string())).optional()
16850
16899
  });
16851
16900
  var chipProps = commonComponentProps.extend({
16852
- manufacturerPartNumber: z50.string().optional(),
16901
+ manufacturerPartNumber: z51.string().optional(),
16853
16902
  pinLabels: pinLabelsProp.optional(),
16854
- showPinAliases: z50.boolean().optional(),
16855
- pcbPinLabels: z50.record(z50.string(), z50.string()).optional(),
16856
- internallyConnectedPins: z50.array(z50.array(z50.union([z50.string(), z50.number()]))).optional(),
16857
- externallyConnectedPins: z50.array(z50.array(z50.string())).optional(),
16903
+ showPinAliases: z51.boolean().optional(),
16904
+ pcbPinLabels: z51.record(z51.string(), z51.string()).optional(),
16905
+ internallyConnectedPins: z51.array(z51.array(z51.union([z51.string(), z51.number()]))).optional(),
16906
+ externallyConnectedPins: z51.array(z51.array(z51.string())).optional(),
16858
16907
  schPinArrangement: schematicPortArrangement.optional(),
16859
16908
  schPortArrangement: schematicPortArrangement.optional(),
16860
- pinCompatibleVariants: z50.array(pinCompatibleVariant).optional(),
16909
+ pinCompatibleVariants: z51.array(pinCompatibleVariant).optional(),
16861
16910
  schPinStyle: schematicPinStyle.optional(),
16862
16911
  schPinSpacing: distance12.optional(),
16863
16912
  schWidth: distance12.optional(),
16864
16913
  schHeight: distance12.optional(),
16865
- noSchematicRepresentation: z50.boolean().optional(),
16866
- schShowInternalCircuit: z50.boolean().optional().default(false),
16914
+ noSchematicRepresentation: z51.boolean().optional(),
16915
+ schShowInternalCircuit: z51.boolean().optional().default(false),
16867
16916
  noConnect: noConnectProp.optional(),
16868
16917
  connections: connectionsProp.optional(),
16869
16918
  spiceModel: spicemodelElement.optional(),
@@ -16878,38 +16927,38 @@ expectTypesMatch(true);
16878
16927
 
16879
16928
  // lib/components/jumper.ts
16880
16929
  import { distance as distance13 } from "circuit-json";
16881
- import { z as z51 } from "zod";
16930
+ import { z as z52 } from "zod";
16882
16931
  var jumperProps = commonComponentProps.extend({
16883
- manufacturerPartNumber: z51.string().optional(),
16884
- pinLabels: z51.record(
16885
- z51.number().or(schematicPinLabel),
16886
- schematicPinLabel.or(z51.array(schematicPinLabel))
16932
+ manufacturerPartNumber: z52.string().optional(),
16933
+ pinLabels: z52.record(
16934
+ z52.number().or(schematicPinLabel),
16935
+ schematicPinLabel.or(z52.array(schematicPinLabel))
16887
16936
  ).optional(),
16888
16937
  schPinStyle: schematicPinStyle.optional(),
16889
16938
  schPinSpacing: distance13.optional(),
16890
16939
  schWidth: distance13.optional(),
16891
16940
  schHeight: distance13.optional(),
16892
- schDirection: z51.enum(["left", "right"]).optional(),
16941
+ schDirection: z52.enum(["left", "right"]).optional(),
16893
16942
  schPinArrangement: schematicPinArrangement.optional(),
16894
16943
  schPortArrangement: schematicPortArrangement.optional(),
16895
- pcbPinLabels: z51.record(z51.string(), z51.string()).optional(),
16896
- pinCount: z51.union([z51.literal(2), z51.literal(3)]).optional(),
16897
- internallyConnectedPins: z51.array(z51.array(z51.union([z51.string(), z51.number()]))).optional(),
16898
- connections: z51.custom().pipe(z51.record(z51.string(), connectionTarget)).optional()
16944
+ pcbPinLabels: z52.record(z52.string(), z52.string()).optional(),
16945
+ pinCount: z52.union([z52.literal(2), z52.literal(3)]).optional(),
16946
+ internallyConnectedPins: z52.array(z52.array(z52.union([z52.string(), z52.number()]))).optional(),
16947
+ connections: z52.custom().pipe(z52.record(z52.string(), connectionTarget)).optional()
16899
16948
  });
16900
16949
  expectTypesMatch(true);
16901
16950
 
16902
16951
  // lib/components/solderjumper.ts
16903
- import { z as z52 } from "zod";
16952
+ import { z as z53 } from "zod";
16904
16953
  var solderjumperProps = jumperProps.extend({
16905
- bridgedPins: z52.array(z52.array(z52.string())).optional(),
16906
- bridged: z52.boolean().optional()
16954
+ bridgedPins: z53.array(z53.array(z53.string())).optional(),
16955
+ bridged: z53.boolean().optional()
16907
16956
  });
16908
16957
  expectTypesMatch(true);
16909
16958
 
16910
16959
  // lib/components/connector.ts
16911
- import { z as z53 } from "zod";
16912
- var connectorStandard = z53.enum([
16960
+ import { z as z54 } from "zod";
16961
+ var connectorStandard = z54.enum([
16913
16962
  "usb_c",
16914
16963
  "m2",
16915
16964
  "jst_sh",
@@ -16921,43 +16970,43 @@ var connectorStandard = z53.enum([
16921
16970
  ]);
16922
16971
  var connectorProps = chipProps.extend({
16923
16972
  standard: connectorStandard.optional(),
16924
- pinCount: z53.number().int().positive().optional()
16973
+ pinCount: z54.number().int().positive().optional()
16925
16974
  });
16926
16975
  expectTypesMatch(true);
16927
16976
 
16928
16977
  // lib/components/interconnect.ts
16929
- import { z as z54 } from "zod";
16978
+ import { z as z55 } from "zod";
16930
16979
  var interconnectProps = commonComponentProps.extend({
16931
- standard: z54.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16932
- pinLabels: z54.record(
16933
- z54.number().or(schematicPinLabel),
16934
- schematicPinLabel.or(z54.array(schematicPinLabel))
16980
+ standard: z55.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
16981
+ pinLabels: z55.record(
16982
+ z55.number().or(schematicPinLabel),
16983
+ schematicPinLabel.or(z55.array(schematicPinLabel))
16935
16984
  ).optional(),
16936
- internallyConnectedPins: z54.array(z54.array(z54.union([z54.string(), z54.number()]))).optional()
16985
+ internallyConnectedPins: z55.array(z55.array(z55.union([z55.string(), z55.number()]))).optional()
16937
16986
  });
16938
16987
  expectTypesMatch(true);
16939
16988
 
16940
16989
  // lib/components/fuse.ts
16941
- import { z as z55 } from "zod";
16990
+ import { z as z56 } from "zod";
16942
16991
  var fusePinLabels = ["pin1", "pin2"];
16943
16992
  var fuseProps = commonComponentProps.extend({
16944
- currentRating: z55.union([z55.number(), z55.string()]),
16945
- voltageRating: z55.union([z55.number(), z55.string()]).optional(),
16946
- schShowRatings: z55.boolean().optional(),
16993
+ currentRating: z56.union([z56.number(), z56.string()]),
16994
+ voltageRating: z56.union([z56.number(), z56.string()]).optional(),
16995
+ schShowRatings: z56.boolean().optional(),
16947
16996
  schOrientation: schematicOrientation.optional(),
16948
- connections: z55.record(
16949
- z55.string(),
16950
- z55.union([
16951
- z55.string(),
16952
- z55.array(z55.string()).readonly(),
16953
- z55.array(z55.string())
16997
+ connections: z56.record(
16998
+ z56.string(),
16999
+ z56.union([
17000
+ z56.string(),
17001
+ z56.array(z56.string()).readonly(),
17002
+ z56.array(z56.string())
16954
17003
  ])
16955
17004
  ).optional()
16956
17005
  });
16957
17006
 
16958
17007
  // lib/components/platedhole.ts
16959
17008
  import { distance as distance14 } from "circuit-json";
16960
- import { z as z56 } from "zod";
17009
+ import { z as z57 } from "zod";
16961
17010
  var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
16962
17011
  var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
16963
17012
  var inferPlatedHoleShapeAndDefaults = (rawProps) => {
@@ -16989,26 +17038,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
16989
17038
  props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
16990
17039
  return props;
16991
17040
  };
16992
- var distanceHiddenUndefined = z56.custom().transform((a) => {
17041
+ var distanceHiddenUndefined = z57.custom().transform((a) => {
16993
17042
  if (a === void 0) return void 0;
16994
17043
  return distance14.parse(a);
16995
17044
  });
16996
- var platedHolePropsByShape = z56.discriminatedUnion("shape", [
17045
+ var platedHolePropsByShape = z57.discriminatedUnion("shape", [
16997
17046
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
16998
- name: z56.string().optional(),
16999
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17000
- shape: z56.literal("circle"),
17047
+ name: z57.string().optional(),
17048
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17049
+ shape: z57.literal("circle"),
17001
17050
  holeDiameter: distance14,
17002
17051
  outerDiameter: distance14,
17003
17052
  padDiameter: distance14.optional().describe("Diameter of the copper pad"),
17004
17053
  portHints: portHints.optional(),
17005
17054
  solderMaskMargin: distance14.optional(),
17006
- coveredWithSolderMask: z56.boolean().optional()
17055
+ coveredWithSolderMask: z57.boolean().optional()
17007
17056
  }),
17008
17057
  pcbLayoutProps.omit({ layer: true }).extend({
17009
- name: z56.string().optional(),
17010
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17011
- shape: z56.literal("oval"),
17058
+ name: z57.string().optional(),
17059
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17060
+ shape: z57.literal("oval"),
17012
17061
  outerWidth: distance14,
17013
17062
  outerHeight: distance14,
17014
17063
  holeWidth: distanceHiddenUndefined,
@@ -17017,13 +17066,13 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
17017
17066
  innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
17018
17067
  portHints: portHints.optional(),
17019
17068
  solderMaskMargin: distance14.optional(),
17020
- coveredWithSolderMask: z56.boolean().optional()
17069
+ coveredWithSolderMask: z57.boolean().optional()
17021
17070
  }),
17022
17071
  pcbLayoutProps.omit({ layer: true }).extend({
17023
- name: z56.string().optional(),
17024
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17025
- shape: z56.literal("pill"),
17026
- rectPad: z56.boolean().optional(),
17072
+ name: z57.string().optional(),
17073
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17074
+ shape: z57.literal("pill"),
17075
+ rectPad: z57.boolean().optional(),
17027
17076
  outerWidth: distance14,
17028
17077
  outerHeight: distance14,
17029
17078
  holeWidth: distanceHiddenUndefined,
@@ -17034,30 +17083,30 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
17034
17083
  holeOffsetX: distance14.optional(),
17035
17084
  holeOffsetY: distance14.optional(),
17036
17085
  solderMaskMargin: distance14.optional(),
17037
- coveredWithSolderMask: z56.boolean().optional()
17086
+ coveredWithSolderMask: z57.boolean().optional()
17038
17087
  }),
17039
17088
  pcbLayoutProps.omit({ layer: true }).extend({
17040
- name: z56.string().optional(),
17041
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17042
- shape: z56.literal("circular_hole_with_rect_pad"),
17089
+ name: z57.string().optional(),
17090
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17091
+ shape: z57.literal("circular_hole_with_rect_pad"),
17043
17092
  holeDiameter: distance14,
17044
17093
  rectPadWidth: distance14,
17045
17094
  rectPadHeight: distance14,
17046
17095
  rectBorderRadius: distance14.optional(),
17047
- holeShape: z56.literal("circle").optional(),
17048
- padShape: z56.literal("rect").optional(),
17096
+ holeShape: z57.literal("circle").optional(),
17097
+ padShape: z57.literal("rect").optional(),
17049
17098
  portHints: portHints.optional(),
17050
17099
  holeOffsetX: distance14.optional(),
17051
17100
  holeOffsetY: distance14.optional(),
17052
17101
  solderMaskMargin: distance14.optional(),
17053
- coveredWithSolderMask: z56.boolean().optional()
17102
+ coveredWithSolderMask: z57.boolean().optional()
17054
17103
  }),
17055
17104
  pcbLayoutProps.omit({ layer: true }).extend({
17056
- name: z56.string().optional(),
17057
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17058
- shape: z56.literal("pill_hole_with_rect_pad"),
17059
- holeShape: z56.literal("pill").optional(),
17060
- padShape: z56.literal("rect").optional(),
17105
+ name: z57.string().optional(),
17106
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17107
+ shape: z57.literal("pill_hole_with_rect_pad"),
17108
+ holeShape: z57.literal("pill").optional(),
17109
+ padShape: z57.literal("rect").optional(),
17061
17110
  holeWidth: distance14,
17062
17111
  holeHeight: distance14,
17063
17112
  rectPadWidth: distance14,
@@ -17067,22 +17116,22 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
17067
17116
  holeOffsetX: distance14.optional(),
17068
17117
  holeOffsetY: distance14.optional(),
17069
17118
  solderMaskMargin: distance14.optional(),
17070
- coveredWithSolderMask: z56.boolean().optional()
17119
+ coveredWithSolderMask: z57.boolean().optional()
17071
17120
  }),
17072
17121
  pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
17073
- name: z56.string().optional(),
17074
- connectsTo: z56.string().or(z56.array(z56.string())).optional(),
17075
- shape: z56.literal("hole_with_polygon_pad"),
17076
- holeShape: z56.enum(["circle", "oval", "pill", "rotated_pill"]),
17122
+ name: z57.string().optional(),
17123
+ connectsTo: z57.string().or(z57.array(z57.string())).optional(),
17124
+ shape: z57.literal("hole_with_polygon_pad"),
17125
+ holeShape: z57.enum(["circle", "oval", "pill", "rotated_pill"]),
17077
17126
  holeDiameter: distance14.optional(),
17078
17127
  holeWidth: distance14.optional(),
17079
17128
  holeHeight: distance14.optional(),
17080
- padOutline: z56.array(point),
17129
+ padOutline: z57.array(point),
17081
17130
  holeOffsetX: distance14,
17082
17131
  holeOffsetY: distance14,
17083
17132
  portHints: portHints.optional(),
17084
17133
  solderMaskMargin: distance14.optional(),
17085
- coveredWithSolderMask: z56.boolean().optional()
17134
+ coveredWithSolderMask: z57.boolean().optional()
17086
17135
  })
17087
17136
  ]).transform((a) => {
17088
17137
  if ("innerWidth" in a && a.innerWidth !== void 0) {
@@ -17093,7 +17142,7 @@ var platedHolePropsByShape = z56.discriminatedUnion("shape", [
17093
17142
  }
17094
17143
  return a;
17095
17144
  });
17096
- var platedHoleProps = z56.preprocess(
17145
+ var platedHoleProps = z57.preprocess(
17097
17146
  inferPlatedHoleShapeAndDefaults,
17098
17147
  platedHolePropsByShape
17099
17148
  );
@@ -17101,7 +17150,7 @@ expectTypesMatch(true);
17101
17150
 
17102
17151
  // lib/components/resistor.ts
17103
17152
  import { resistance } from "circuit-json";
17104
- import { z as z57 } from "zod";
17153
+ import { z as z58 } from "zod";
17105
17154
  var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
17106
17155
  var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
17107
17156
  "01005",
@@ -17125,7 +17174,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
17125
17174
  var resistorProps = commonComponentProps.extend({
17126
17175
  footprint: resistorFootprintProp,
17127
17176
  resistance,
17128
- tolerance: z57.union([z57.string(), z57.number()]).transform((val) => {
17177
+ tolerance: z58.union([z58.string(), z58.number()]).transform((val) => {
17129
17178
  if (typeof val === "string") {
17130
17179
  if (val.endsWith("%")) {
17131
17180
  return parseFloat(val.slice(0, -1)) / 100;
@@ -17134,12 +17183,12 @@ var resistorProps = commonComponentProps.extend({
17134
17183
  }
17135
17184
  return val;
17136
17185
  }).pipe(
17137
- z57.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
17186
+ z58.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
17138
17187
  ).optional(),
17139
- pullupFor: z57.string().optional(),
17140
- pullupTo: z57.string().optional(),
17141
- pulldownFor: z57.string().optional(),
17142
- pulldownTo: z57.string().optional(),
17188
+ pullupFor: z58.string().optional(),
17189
+ pullupTo: z58.string().optional(),
17190
+ pulldownFor: z58.string().optional(),
17191
+ pulldownTo: z58.string().optional(),
17143
17192
  schOrientation: schematicOrientation.optional(),
17144
17193
  schSize: schematicSymbolSize.optional(),
17145
17194
  connections: createConnectionsProp(resistorPinLabels).optional()
@@ -17149,18 +17198,18 @@ expectTypesMatch(true);
17149
17198
 
17150
17199
  // lib/components/potentiometer.ts
17151
17200
  import { resistance as resistance2 } from "circuit-json";
17152
- import { z as z58 } from "zod";
17201
+ import { z as z59 } from "zod";
17153
17202
  var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
17154
17203
  var potentiometerProps = commonComponentProps.extend({
17155
17204
  maxResistance: resistance2,
17156
- pinVariant: z58.enum(["two_pin", "three_pin"]).optional(),
17205
+ pinVariant: z59.enum(["two_pin", "three_pin"]).optional(),
17157
17206
  connections: createConnectionsProp(potentiometerPinLabels).optional()
17158
17207
  });
17159
17208
  expectTypesMatch(true);
17160
17209
 
17161
17210
  // lib/components/crystal.ts
17162
17211
  import { capacitance, distance as distance15, frequency } from "circuit-json";
17163
- import { z as z59 } from "zod";
17212
+ import { z as z60 } from "zod";
17164
17213
  var crystalPins = [
17165
17214
  "pin1",
17166
17215
  "left",
@@ -17173,9 +17222,9 @@ var crystalProps = commonComponentProps.extend({
17173
17222
  frequency,
17174
17223
  loadCapacitance: capacitance,
17175
17224
  maxTraceLength: distance15.optional(),
17176
- manufacturerPartNumber: z59.string().optional(),
17177
- mpn: z59.string().optional(),
17178
- pinVariant: z59.enum(["two_pin", "four_pin"]).optional(),
17225
+ manufacturerPartNumber: z60.string().optional(),
17226
+ mpn: z60.string().optional(),
17227
+ pinVariant: z60.enum(["two_pin", "four_pin"]).optional(),
17179
17228
  schOrientation: schematicOrientation.optional(),
17180
17229
  connections: createConnectionsProp(crystalPins).optional()
17181
17230
  });
@@ -17183,34 +17232,34 @@ expectTypesMatch(true);
17183
17232
 
17184
17233
  // lib/components/resonator.ts
17185
17234
  import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
17186
- import { z as z60 } from "zod";
17235
+ import { z as z61 } from "zod";
17187
17236
  var resonatorProps = commonComponentProps.extend({
17188
17237
  frequency: frequency2,
17189
17238
  loadCapacitance: capacitance2,
17190
- pinVariant: z60.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
17239
+ pinVariant: z61.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
17191
17240
  });
17192
17241
  expectTypesMatch(true);
17193
17242
 
17194
17243
  // lib/components/stampboard.ts
17195
17244
  import { distance as distance16 } from "circuit-json";
17196
- import { z as z61 } from "zod";
17245
+ import { z as z62 } from "zod";
17197
17246
  var stampboardProps = boardProps.extend({
17198
- leftPinCount: z61.number().optional(),
17199
- rightPinCount: z61.number().optional(),
17200
- topPinCount: z61.number().optional(),
17201
- bottomPinCount: z61.number().optional(),
17202
- leftPins: z61.array(z61.string()).optional(),
17203
- rightPins: z61.array(z61.string()).optional(),
17204
- topPins: z61.array(z61.string()).optional(),
17205
- bottomPins: z61.array(z61.string()).optional(),
17247
+ leftPinCount: z62.number().optional(),
17248
+ rightPinCount: z62.number().optional(),
17249
+ topPinCount: z62.number().optional(),
17250
+ bottomPinCount: z62.number().optional(),
17251
+ leftPins: z62.array(z62.string()).optional(),
17252
+ rightPins: z62.array(z62.string()).optional(),
17253
+ topPins: z62.array(z62.string()).optional(),
17254
+ bottomPins: z62.array(z62.string()).optional(),
17206
17255
  pinPitch: distance16.optional(),
17207
- innerHoles: z61.boolean().optional()
17256
+ innerHoles: z62.boolean().optional()
17208
17257
  });
17209
17258
  expectTypesMatch(true);
17210
17259
 
17211
17260
  // lib/components/capacitor.ts
17212
17261
  import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
17213
- import { z as z62 } from "zod";
17262
+ import { z as z63 } from "zod";
17214
17263
  var capacitorPinLabels = [
17215
17264
  "pin1",
17216
17265
  "pin2",
@@ -17222,12 +17271,12 @@ var capacitorPinLabels = [
17222
17271
  var capacitorProps = commonComponentProps.extend({
17223
17272
  capacitance: capacitance3,
17224
17273
  maxVoltageRating: voltage.optional(),
17225
- schShowRatings: z62.boolean().optional().default(false),
17226
- polarized: z62.boolean().optional().default(false),
17227
- decouplingFor: z62.string().optional(),
17228
- decouplingTo: z62.string().optional(),
17229
- bypassFor: z62.string().optional(),
17230
- bypassTo: z62.string().optional(),
17274
+ schShowRatings: z63.boolean().optional().default(false),
17275
+ polarized: z63.boolean().optional().default(false),
17276
+ decouplingFor: z63.string().optional(),
17277
+ decouplingTo: z63.string().optional(),
17278
+ bypassFor: z63.string().optional(),
17279
+ bypassTo: z63.string().optional(),
17231
17280
  maxDecouplingTraceLength: distance17.optional(),
17232
17281
  schOrientation: schematicOrientation.optional(),
17233
17282
  schSize: schematicSymbolSize.optional(),
@@ -17238,14 +17287,14 @@ expectTypesMatch(true);
17238
17287
 
17239
17288
  // lib/components/net.ts
17240
17289
  import { distance as distance18 } from "circuit-json";
17241
- import { z as z63 } from "zod";
17242
- var netProps = z63.object({
17243
- name: z63.string(),
17244
- connectsTo: z63.string().or(z63.array(z63.string())).optional(),
17245
- routingPhaseIndex: z63.number().nullable().optional(),
17246
- highlightColor: z63.string().optional(),
17247
- isPowerNet: z63.boolean().optional(),
17248
- isGroundNet: z63.boolean().optional(),
17290
+ import { z as z64 } from "zod";
17291
+ var netProps = z64.object({
17292
+ name: z64.string(),
17293
+ connectsTo: z64.string().or(z64.array(z64.string())).optional(),
17294
+ routingPhaseIndex: z64.number().nullable().optional(),
17295
+ highlightColor: z64.string().optional(),
17296
+ isPowerNet: z64.boolean().optional(),
17297
+ isGroundNet: z64.boolean().optional(),
17249
17298
  nominalTraceWidth: distance18.optional()
17250
17299
  });
17251
17300
  expectTypesMatch(true);
@@ -17259,55 +17308,55 @@ var fiducialProps = commonComponentProps.extend({
17259
17308
  expectTypesMatch(true);
17260
17309
 
17261
17310
  // lib/components/constrainedlayout.ts
17262
- import { z as z65 } from "zod";
17263
- var constrainedLayoutProps = z65.object({
17264
- name: z65.string().optional(),
17265
- pcbOnly: z65.boolean().optional(),
17266
- schOnly: z65.boolean().optional()
17311
+ import { z as z66 } from "zod";
17312
+ var constrainedLayoutProps = z66.object({
17313
+ name: z66.string().optional(),
17314
+ pcbOnly: z66.boolean().optional(),
17315
+ schOnly: z66.boolean().optional()
17267
17316
  });
17268
17317
  expectTypesMatch(true);
17269
17318
 
17270
17319
  // lib/components/constraint.ts
17271
- import { z as z66 } from "zod";
17272
- var pcbXDistConstraintProps = z66.object({
17273
- pcb: z66.literal(true).optional(),
17320
+ import { z as z67 } from "zod";
17321
+ var pcbXDistConstraintProps = z67.object({
17322
+ pcb: z67.literal(true).optional(),
17274
17323
  xDist: distance,
17275
- left: z66.string(),
17276
- right: z66.string(),
17277
- edgeToEdge: z66.literal(true).optional(),
17278
- centerToCenter: z66.literal(true).optional()
17324
+ left: z67.string(),
17325
+ right: z67.string(),
17326
+ edgeToEdge: z67.literal(true).optional(),
17327
+ centerToCenter: z67.literal(true).optional()
17279
17328
  });
17280
17329
  expectTypesMatch(
17281
17330
  true
17282
17331
  );
17283
- var pcbYDistConstraintProps = z66.object({
17284
- pcb: z66.literal(true).optional(),
17332
+ var pcbYDistConstraintProps = z67.object({
17333
+ pcb: z67.literal(true).optional(),
17285
17334
  yDist: distance,
17286
- top: z66.string(),
17287
- bottom: z66.string(),
17288
- edgeToEdge: z66.literal(true).optional(),
17289
- centerToCenter: z66.literal(true).optional()
17335
+ top: z67.string(),
17336
+ bottom: z67.string(),
17337
+ edgeToEdge: z67.literal(true).optional(),
17338
+ centerToCenter: z67.literal(true).optional()
17290
17339
  });
17291
17340
  expectTypesMatch(
17292
17341
  true
17293
17342
  );
17294
- var pcbSameYConstraintProps = z66.object({
17295
- pcb: z66.literal(true).optional(),
17296
- sameY: z66.literal(true).optional(),
17297
- for: z66.array(z66.string())
17343
+ var pcbSameYConstraintProps = z67.object({
17344
+ pcb: z67.literal(true).optional(),
17345
+ sameY: z67.literal(true).optional(),
17346
+ for: z67.array(z67.string())
17298
17347
  });
17299
17348
  expectTypesMatch(
17300
17349
  true
17301
17350
  );
17302
- var pcbSameXConstraintProps = z66.object({
17303
- pcb: z66.literal(true).optional(),
17304
- sameX: z66.literal(true).optional(),
17305
- for: z66.array(z66.string())
17351
+ var pcbSameXConstraintProps = z67.object({
17352
+ pcb: z67.literal(true).optional(),
17353
+ sameX: z67.literal(true).optional(),
17354
+ for: z67.array(z67.string())
17306
17355
  });
17307
17356
  expectTypesMatch(
17308
17357
  true
17309
17358
  );
17310
- var constraintProps = z66.union([
17359
+ var constraintProps = z67.union([
17311
17360
  pcbXDistConstraintProps,
17312
17361
  pcbYDistConstraintProps,
17313
17362
  pcbSameYConstraintProps,
@@ -17316,13 +17365,13 @@ var constraintProps = z66.union([
17316
17365
  expectTypesMatch(true);
17317
17366
 
17318
17367
  // lib/components/cutout.ts
17319
- import { z as z67 } from "zod";
17368
+ import { z as z68 } from "zod";
17320
17369
  var rectCutoutProps = pcbLayoutProps.omit({
17321
17370
  layer: true,
17322
17371
  pcbRotation: true
17323
17372
  }).extend({
17324
- name: z67.string().optional(),
17325
- shape: z67.literal("rect"),
17373
+ name: z68.string().optional(),
17374
+ shape: z68.literal("rect"),
17326
17375
  width: distance,
17327
17376
  height: distance
17328
17377
  });
@@ -17331,8 +17380,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
17331
17380
  layer: true,
17332
17381
  pcbRotation: true
17333
17382
  }).extend({
17334
- name: z67.string().optional(),
17335
- shape: z67.literal("circle"),
17383
+ name: z68.string().optional(),
17384
+ shape: z68.literal("circle"),
17336
17385
  radius: distance
17337
17386
  });
17338
17387
  expectTypesMatch(true);
@@ -17340,36 +17389,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
17340
17389
  layer: true,
17341
17390
  pcbRotation: true
17342
17391
  }).extend({
17343
- name: z67.string().optional(),
17344
- shape: z67.literal("polygon"),
17345
- points: z67.array(point)
17392
+ name: z68.string().optional(),
17393
+ shape: z68.literal("polygon"),
17394
+ points: z68.array(point)
17346
17395
  });
17347
17396
  expectTypesMatch(true);
17348
- var cutoutProps = z67.discriminatedUnion("shape", [
17397
+ var cutoutProps = z68.discriminatedUnion("shape", [
17349
17398
  rectCutoutProps,
17350
17399
  circleCutoutProps,
17351
17400
  polygonCutoutProps
17352
17401
  ]);
17353
17402
 
17354
17403
  // lib/components/drc-check.ts
17355
- import { z as z68 } from "zod";
17356
- var drcCheckProps = z68.object({
17357
- name: z68.string().optional(),
17404
+ import { z as z69 } from "zod";
17405
+ var drcCheckProps = z69.object({
17406
+ name: z69.string().optional(),
17358
17407
  checkFn: customDrcCheckFn
17359
17408
  });
17360
17409
  expectTypesMatch(true);
17361
17410
 
17362
17411
  // lib/components/smtpad.ts
17363
- import { z as z69 } from "zod";
17412
+ import { z as z70 } from "zod";
17364
17413
  var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17365
- name: z69.string().optional(),
17366
- shape: z69.literal("rect"),
17414
+ name: z70.string().optional(),
17415
+ shape: z70.literal("rect"),
17367
17416
  width: distance,
17368
17417
  height: distance,
17369
17418
  rectBorderRadius: distance.optional(),
17370
17419
  cornerRadius: distance.optional(),
17371
17420
  portHints: portHints.optional(),
17372
- coveredWithSolderMask: z69.boolean().optional(),
17421
+ coveredWithSolderMask: z70.boolean().optional(),
17373
17422
  solderMaskMargin: distance.optional(),
17374
17423
  solderMaskMarginLeft: distance.optional(),
17375
17424
  solderMaskMarginRight: distance.optional(),
@@ -17379,14 +17428,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17379
17428
  });
17380
17429
  expectTypesMatch(true);
17381
17430
  var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17382
- name: z69.string().optional(),
17383
- shape: z69.literal("rotated_rect"),
17431
+ name: z70.string().optional(),
17432
+ shape: z70.literal("rotated_rect"),
17384
17433
  width: distance,
17385
17434
  height: distance,
17386
- ccwRotation: z69.number(),
17435
+ ccwRotation: z70.number(),
17387
17436
  cornerRadius: distance.optional(),
17388
17437
  portHints: portHints.optional(),
17389
- coveredWithSolderMask: z69.boolean().optional(),
17438
+ coveredWithSolderMask: z70.boolean().optional(),
17390
17439
  solderMaskMargin: distance.optional(),
17391
17440
  solderMaskMarginLeft: distance.optional(),
17392
17441
  solderMaskMarginRight: distance.optional(),
@@ -17396,51 +17445,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17396
17445
  });
17397
17446
  expectTypesMatch(true);
17398
17447
  var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17399
- name: z69.string().optional(),
17400
- shape: z69.literal("circle"),
17448
+ name: z70.string().optional(),
17449
+ shape: z70.literal("circle"),
17401
17450
  radius: distance,
17402
17451
  portHints: portHints.optional(),
17403
- coveredWithSolderMask: z69.boolean().optional(),
17452
+ coveredWithSolderMask: z70.boolean().optional(),
17404
17453
  solderMaskMargin: distance.optional(),
17405
17454
  solderPasteMargin: distance.optional()
17406
17455
  });
17407
17456
  expectTypesMatch(true);
17408
17457
  var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17409
- name: z69.string().optional(),
17410
- shape: z69.literal("pill"),
17458
+ name: z70.string().optional(),
17459
+ shape: z70.literal("pill"),
17411
17460
  width: distance,
17412
17461
  height: distance,
17413
17462
  radius: distance,
17414
17463
  portHints: portHints.optional(),
17415
- coveredWithSolderMask: z69.boolean().optional(),
17464
+ coveredWithSolderMask: z70.boolean().optional(),
17416
17465
  solderMaskMargin: distance.optional(),
17417
17466
  solderPasteMargin: distance.optional()
17418
17467
  });
17419
17468
  expectTypesMatch(true);
17420
17469
  var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17421
- name: z69.string().optional(),
17422
- shape: z69.literal("rotated_pill"),
17470
+ name: z70.string().optional(),
17471
+ shape: z70.literal("rotated_pill"),
17423
17472
  width: distance,
17424
17473
  height: distance,
17425
17474
  radius: distance,
17426
- ccwRotation: z69.number(),
17475
+ ccwRotation: z70.number(),
17427
17476
  portHints: portHints.optional(),
17428
- coveredWithSolderMask: z69.boolean().optional(),
17477
+ coveredWithSolderMask: z70.boolean().optional(),
17429
17478
  solderMaskMargin: distance.optional(),
17430
17479
  solderPasteMargin: distance.optional()
17431
17480
  });
17432
17481
  expectTypesMatch(true);
17433
17482
  var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17434
- name: z69.string().optional(),
17435
- shape: z69.literal("polygon"),
17436
- points: z69.array(point),
17483
+ name: z70.string().optional(),
17484
+ shape: z70.literal("polygon"),
17485
+ points: z70.array(point),
17437
17486
  portHints: portHints.optional(),
17438
- coveredWithSolderMask: z69.boolean().optional(),
17487
+ coveredWithSolderMask: z70.boolean().optional(),
17439
17488
  solderMaskMargin: distance.optional(),
17440
17489
  solderPasteMargin: distance.optional()
17441
17490
  });
17442
17491
  expectTypesMatch(true);
17443
- var smtPadProps = z69.discriminatedUnion("shape", [
17492
+ var smtPadProps = z70.discriminatedUnion("shape", [
17444
17493
  circleSmtPadProps,
17445
17494
  rectSmtPadProps,
17446
17495
  rotatedRectSmtPadProps,
@@ -17451,63 +17500,63 @@ var smtPadProps = z69.discriminatedUnion("shape", [
17451
17500
  expectTypesMatch(true);
17452
17501
 
17453
17502
  // lib/components/solderpaste.ts
17454
- import { z as z70 } from "zod";
17503
+ import { z as z71 } from "zod";
17455
17504
  var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17456
- shape: z70.literal("rect"),
17505
+ shape: z71.literal("rect"),
17457
17506
  width: distance,
17458
17507
  height: distance
17459
17508
  });
17460
17509
  expectTypesMatch(true);
17461
17510
  var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17462
- shape: z70.literal("circle"),
17511
+ shape: z71.literal("circle"),
17463
17512
  radius: distance
17464
17513
  });
17465
17514
  expectTypesMatch(true);
17466
- var solderPasteProps = z70.union([
17515
+ var solderPasteProps = z71.union([
17467
17516
  circleSolderPasteProps,
17468
17517
  rectSolderPasteProps
17469
17518
  ]);
17470
17519
  expectTypesMatch(true);
17471
17520
 
17472
17521
  // lib/components/hole.ts
17473
- import { z as z71 } from "zod";
17522
+ import { z as z72 } from "zod";
17474
17523
  var circleHoleProps = pcbLayoutProps.extend({
17475
- name: z71.string().optional(),
17476
- shape: z71.literal("circle").optional(),
17524
+ name: z72.string().optional(),
17525
+ shape: z72.literal("circle").optional(),
17477
17526
  diameter: distance.optional(),
17478
17527
  radius: distance.optional(),
17479
17528
  solderMaskMargin: distance.optional(),
17480
- coveredWithSolderMask: z71.boolean().optional()
17529
+ coveredWithSolderMask: z72.boolean().optional()
17481
17530
  }).transform((d) => ({
17482
17531
  ...d,
17483
17532
  diameter: d.diameter ?? 2 * d.radius,
17484
17533
  radius: d.radius ?? d.diameter / 2
17485
17534
  }));
17486
17535
  var pillHoleProps = pcbLayoutProps.extend({
17487
- name: z71.string().optional(),
17488
- shape: z71.literal("pill"),
17536
+ name: z72.string().optional(),
17537
+ shape: z72.literal("pill"),
17489
17538
  width: distance,
17490
17539
  height: distance,
17491
17540
  solderMaskMargin: distance.optional(),
17492
- coveredWithSolderMask: z71.boolean().optional()
17541
+ coveredWithSolderMask: z72.boolean().optional()
17493
17542
  });
17494
17543
  var ovalHoleProps = pcbLayoutProps.extend({
17495
- name: z71.string().optional(),
17496
- shape: z71.literal("oval"),
17544
+ name: z72.string().optional(),
17545
+ shape: z72.literal("oval"),
17497
17546
  width: distance,
17498
17547
  height: distance,
17499
17548
  solderMaskMargin: distance.optional(),
17500
- coveredWithSolderMask: z71.boolean().optional()
17549
+ coveredWithSolderMask: z72.boolean().optional()
17501
17550
  });
17502
17551
  var rectHoleProps = pcbLayoutProps.extend({
17503
- name: z71.string().optional(),
17504
- shape: z71.literal("rect"),
17552
+ name: z72.string().optional(),
17553
+ shape: z72.literal("rect"),
17505
17554
  width: distance,
17506
17555
  height: distance,
17507
17556
  solderMaskMargin: distance.optional(),
17508
- coveredWithSolderMask: z71.boolean().optional()
17557
+ coveredWithSolderMask: z72.boolean().optional()
17509
17558
  });
17510
- var holeProps = z71.union([
17559
+ var holeProps = z72.union([
17511
17560
  circleHoleProps,
17512
17561
  pillHoleProps,
17513
17562
  ovalHoleProps,
@@ -17516,7 +17565,7 @@ var holeProps = z71.union([
17516
17565
  expectTypesMatch(true);
17517
17566
 
17518
17567
  // lib/components/antenna.ts
17519
- import { z as z72 } from "zod";
17568
+ import { z as z73 } from "zod";
17520
17569
  var antennaShapes = [
17521
17570
  "2.4ghz_quarter_wave_monopole",
17522
17571
  "2.4ghz_meandered_monopole",
@@ -17524,7 +17573,7 @@ var antennaShapes = [
17524
17573
  "2.4ghz_meandered_inverted_f",
17525
17574
  "2.4ghz_folded_dipole"
17526
17575
  ];
17527
- var antennaShape = z72.enum(antennaShapes);
17576
+ var antennaShape = z73.enum(antennaShapes);
17528
17577
  var antennaFrequencyBands = [
17529
17578
  "2.4ghz",
17530
17579
  "5ghz",
@@ -17532,7 +17581,7 @@ var antennaFrequencyBands = [
17532
17581
  "dual_band_2.4ghz_5ghz",
17533
17582
  "tri_band_2.4ghz_5ghz_6ghz"
17534
17583
  ];
17535
- var antennaFrequencyBand = z72.enum(antennaFrequencyBands);
17584
+ var antennaFrequencyBand = z73.enum(antennaFrequencyBands);
17536
17585
  var antennaProps = commonComponentProps.extend({
17537
17586
  antennaShape: antennaShape.optional(),
17538
17587
  frequencyBand: antennaFrequencyBand.optional(),
@@ -17542,36 +17591,36 @@ expectTypesMatch(true);
17542
17591
 
17543
17592
  // lib/components/trace.ts
17544
17593
  import { distance as distance19, route_hint_point as route_hint_point2 } from "circuit-json";
17545
- import { z as z73 } from "zod";
17546
- var portRef = z73.union([
17547
- z73.string(),
17548
- z73.custom(
17594
+ import { z as z74 } from "zod";
17595
+ var portRef = z74.union([
17596
+ z74.string(),
17597
+ z74.custom(
17549
17598
  (v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
17550
17599
  )
17551
17600
  ]);
17552
- var baseTraceProps = z73.object({
17553
- key: z73.string().optional(),
17554
- name: z73.string().optional(),
17555
- displayName: z73.string().optional(),
17601
+ var baseTraceProps = z74.object({
17602
+ key: z74.string().optional(),
17603
+ name: z74.string().optional(),
17604
+ displayName: z74.string().optional(),
17556
17605
  thickness: distance19.optional(),
17557
17606
  width: distance19.optional().describe("Alias for trace thickness"),
17558
- schematicRouteHints: z73.array(point).optional(),
17559
- pcbRouteHints: z73.array(route_hint_point2).optional(),
17560
- pcbPathRelativeTo: z73.string().optional(),
17607
+ schematicRouteHints: z74.array(point).optional(),
17608
+ pcbRouteHints: z74.array(route_hint_point2).optional(),
17609
+ pcbPathRelativeTo: z74.string().optional(),
17561
17610
  pcbPath: pcbPath.optional(),
17562
- pcbPaths: z73.array(pcbPath).optional(),
17563
- routingPhaseIndex: z73.number().nullable().optional(),
17564
- pcbStraightLine: z73.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17565
- schDisplayLabel: z73.string().optional(),
17566
- schStroke: z73.string().optional(),
17567
- highlightColor: z73.string().optional(),
17611
+ pcbPaths: z74.array(pcbPath).optional(),
17612
+ routingPhaseIndex: z74.number().nullable().optional(),
17613
+ pcbStraightLine: z74.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
17614
+ schDisplayLabel: z74.string().optional(),
17615
+ schStroke: z74.string().optional(),
17616
+ highlightColor: z74.string().optional(),
17568
17617
  maxLength: distance19.optional(),
17569
- maxViaCount: z73.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
17570
- connectsTo: z73.string().or(z73.array(z73.string())).optional()
17618
+ maxViaCount: z74.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
17619
+ connectsTo: z74.string().or(z74.array(z74.string())).optional()
17571
17620
  });
17572
- var traceProps = z73.union([
17621
+ var traceProps = z74.union([
17573
17622
  baseTraceProps.extend({
17574
- path: z73.array(portRef)
17623
+ path: z74.array(portRef)
17575
17624
  }),
17576
17625
  baseTraceProps.extend({
17577
17626
  from: portRef,
@@ -17586,43 +17635,43 @@ var traceProps = z73.union([
17586
17635
  // lib/components/bus.ts
17587
17636
  import {
17588
17637
  distance as distance20,
17589
- layer_ref as layer_ref6,
17638
+ layer_ref as layer_ref7,
17590
17639
  resistance as resistance3
17591
17640
  } from "circuit-json";
17592
- import { z as z74 } from "zod";
17593
- var busProps = z74.object({
17594
- name: z74.string().optional(),
17595
- connections: z74.array(z74.string()).min(1),
17596
- routingPhaseIndex: z74.number().nullable().optional(),
17597
- maxLengthSkew: distance20.pipe(z74.number().min(0).finite()).optional(),
17598
- targetImpedance: resistance3.pipe(z74.number().positive().finite()).optional(),
17599
- pcbTraceWidth: distance20.pipe(z74.number().positive().finite()).optional(),
17600
- pcbAllowedLayers: z74.array(layer_ref6).min(1).optional(),
17601
- preferredLayer: layer_ref6.optional(),
17602
- preferredLayers: z74.array(layer_ref6).min(1).optional()
17641
+ import { z as z75 } from "zod";
17642
+ var busProps = z75.object({
17643
+ name: z75.string().optional(),
17644
+ connections: z75.array(z75.string()).min(1),
17645
+ routingPhaseIndex: z75.number().nullable().optional(),
17646
+ maxLengthSkew: distance20.pipe(z75.number().min(0).finite()).optional(),
17647
+ targetImpedance: resistance3.pipe(z75.number().positive().finite()).optional(),
17648
+ pcbTraceWidth: distance20.pipe(z75.number().positive().finite()).optional(),
17649
+ pcbAllowedLayers: z75.array(layer_ref7).min(1).optional(),
17650
+ preferredLayer: layer_ref7.optional(),
17651
+ preferredLayers: z75.array(layer_ref7).min(1).optional()
17603
17652
  });
17604
17653
  expectTypesMatch(true);
17605
17654
 
17606
17655
  // lib/components/differentialpair.ts
17607
17656
  import { distance as distance21, resistance as resistance4 } from "circuit-json";
17608
- import { z as z75 } from "zod";
17609
- var differentialPairProps = z75.object({
17610
- name: z75.string().optional(),
17611
- positiveConnection: z75.string(),
17612
- negativeConnection: z75.string(),
17613
- maxLengthSkew: distance21.pipe(z75.number().min(0).finite()).optional(),
17614
- targetDifferentialImpedance: resistance4.pipe(z75.number().positive().finite()).optional(),
17615
- pcbTraceGap: distance21.pipe(z75.number().positive().finite()).optional(),
17616
- maxUncoupledLength: distance21.pipe(z75.number().min(0).finite()).optional()
17657
+ import { z as z76 } from "zod";
17658
+ var differentialPairProps = z76.object({
17659
+ name: z76.string().optional(),
17660
+ positiveConnection: z76.string(),
17661
+ negativeConnection: z76.string(),
17662
+ maxLengthSkew: distance21.pipe(z76.number().min(0).finite()).optional(),
17663
+ targetDifferentialImpedance: resistance4.pipe(z76.number().positive().finite()).optional(),
17664
+ pcbTraceGap: distance21.pipe(z76.number().positive().finite()).optional(),
17665
+ maxUncoupledLength: distance21.pipe(z76.number().min(0).finite()).optional()
17617
17666
  });
17618
17667
  expectTypesMatch(true);
17619
17668
 
17620
17669
  // lib/components/footprint.ts
17621
17670
  import {
17622
- layer_ref as layer_ref7
17671
+ layer_ref as layer_ref8
17623
17672
  } from "circuit-json";
17624
- import { z as z76 } from "zod";
17625
- var footprintInsertionDirection = z76.enum([
17673
+ import { z as z77 } from "zod";
17674
+ var footprintInsertionDirection = z77.enum([
17626
17675
  "from_left",
17627
17676
  "from_right",
17628
17677
  "from_top",
@@ -17640,11 +17689,11 @@ var footprintInsertionDirection = z76.enum([
17640
17689
  "from_back"
17641
17690
  ]);
17642
17691
  expectTypesMatch(true);
17643
- var footprintProps = z76.object({
17644
- children: z76.any().optional(),
17645
- name: z76.string().optional(),
17646
- originalLayer: layer_ref7.default("top").optional(),
17647
- circuitJson: z76.array(z76.any()).optional(),
17692
+ var footprintProps = z77.object({
17693
+ children: z77.any().optional(),
17694
+ name: z77.string().optional(),
17695
+ originalLayer: layer_ref8.default("top").optional(),
17696
+ circuitJson: z77.array(z77.any()).optional(),
17648
17697
  src: footprintProp.describe("Can be a footprint or kicad string").optional(),
17649
17698
  insertionDirection: footprintInsertionDirection.optional().describe(
17650
17699
  "Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
@@ -17656,19 +17705,19 @@ var footprintProps = z76.object({
17656
17705
  expectTypesMatch(true);
17657
17706
 
17658
17707
  // lib/components/symbol.ts
17659
- import { z as z77 } from "zod";
17660
- var symbolProps = z77.object({
17661
- originalFacingDirection: z77.enum(["up", "down", "left", "right"]).default("right").optional(),
17708
+ import { z as z78 } from "zod";
17709
+ var symbolProps = z78.object({
17710
+ originalFacingDirection: z78.enum(["up", "down", "left", "right"]).default("right").optional(),
17662
17711
  width: distance.optional(),
17663
17712
  height: distance.optional(),
17664
- name: z77.string().optional()
17713
+ name: z78.string().optional()
17665
17714
  });
17666
17715
  expectTypesMatch(true);
17667
17716
 
17668
17717
  // lib/components/battery.ts
17669
17718
  import { voltage as voltage2 } from "circuit-json";
17670
- import { z as z78 } from "zod";
17671
- var capacity = z78.number().or(z78.string().endsWith("mAh")).transform((v) => {
17719
+ import { z as z79 } from "zod";
17720
+ var capacity = z79.number().or(z79.string().endsWith("mAh")).transform((v) => {
17672
17721
  if (typeof v === "string") {
17673
17722
  const valString = v.replace("mAh", "");
17674
17723
  const num = Number.parseFloat(valString);
@@ -17683,14 +17732,14 @@ var batteryPins = lrPolarPins;
17683
17732
  var batteryProps = commonComponentProps.extend({
17684
17733
  capacity: capacity.optional(),
17685
17734
  voltage: voltage2.optional(),
17686
- standard: z78.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17735
+ standard: z79.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
17687
17736
  schOrientation: schematicOrientation.optional(),
17688
17737
  connections: createConnectionsProp(batteryPins).optional()
17689
17738
  });
17690
17739
  expectTypesMatch(true);
17691
17740
 
17692
17741
  // lib/components/mountedboard.ts
17693
- import { z as z79 } from "zod";
17742
+ import { z as z80 } from "zod";
17694
17743
  var mountedboardProps = subcircuitGroupProps.extend({
17695
17744
  manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
17696
17745
  pinLabels: chipProps.shape.pinLabels,
@@ -17702,7 +17751,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
17702
17751
  internallyConnectedPins: chipProps.shape.internallyConnectedPins,
17703
17752
  externallyConnectedPins: chipProps.shape.externallyConnectedPins,
17704
17753
  boardToBoardDistance: distance.optional(),
17705
- mountOrientation: z79.enum(["faceDown", "faceUp"]).optional()
17754
+ mountOrientation: z80.enum(["faceDown", "faceUp"]).optional()
17706
17755
  });
17707
17756
  expectTypesMatch(true);
17708
17757
 
@@ -17710,40 +17759,40 @@ expectTypesMatch(true);
17710
17759
  import { distance as distance22 } from "circuit-json";
17711
17760
 
17712
17761
  // lib/common/pcbOrientation.ts
17713
- import { z as z80 } from "zod";
17714
- var pcbOrientation = z80.enum(["vertical", "horizontal"]).describe(
17762
+ import { z as z81 } from "zod";
17763
+ var pcbOrientation = z81.enum(["vertical", "horizontal"]).describe(
17715
17764
  "vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
17716
17765
  );
17717
17766
  expectTypesMatch(true);
17718
17767
 
17719
17768
  // lib/components/pin-header.ts
17720
- import { z as z81 } from "zod";
17769
+ import { z as z82 } from "zod";
17721
17770
  var pinHeaderProps = commonComponentProps.extend({
17722
- pinCount: z81.number(),
17771
+ pinCount: z82.number(),
17723
17772
  pitch: distance22.optional(),
17724
- schFacingDirection: z81.enum(["up", "down", "left", "right"]).optional(),
17725
- gender: z81.enum(["male", "female", "unpopulated"]).optional().default("male"),
17726
- showSilkscreenPinLabels: z81.boolean().optional(),
17727
- pcbPinLabels: z81.record(z81.string(), z81.string()).optional(),
17728
- doubleRow: z81.boolean().optional(),
17729
- rightAngle: z81.boolean().optional(),
17773
+ schFacingDirection: z82.enum(["up", "down", "left", "right"]).optional(),
17774
+ gender: z82.enum(["male", "female", "unpopulated"]).optional().default("male"),
17775
+ showSilkscreenPinLabels: z82.boolean().optional(),
17776
+ pcbPinLabels: z82.record(z82.string(), z82.string()).optional(),
17777
+ doubleRow: z82.boolean().optional(),
17778
+ rightAngle: z82.boolean().optional(),
17730
17779
  pcbOrientation: pcbOrientation.optional(),
17731
17780
  holeDiameter: distance22.optional(),
17732
17781
  platedDiameter: distance22.optional(),
17733
- pinLabels: z81.record(z81.string(), schematicPinLabel).or(z81.array(schematicPinLabel)).optional(),
17734
- connections: z81.custom().pipe(z81.record(z81.string(), connectionTarget)).optional(),
17735
- facingDirection: z81.enum(["left", "right"]).optional(),
17782
+ pinLabels: z82.record(z82.string(), schematicPinLabel).or(z82.array(schematicPinLabel)).optional(),
17783
+ connections: z82.custom().pipe(z82.record(z82.string(), connectionTarget)).optional(),
17784
+ facingDirection: z82.enum(["left", "right"]).optional(),
17736
17785
  schPinArrangement: schematicPinArrangement.optional(),
17737
17786
  schPinStyle: schematicPinStyle.optional(),
17738
17787
  schPinSpacing: distance22.optional(),
17739
17788
  schWidth: distance22.optional(),
17740
17789
  schHeight: distance22.optional(),
17741
- connectsFromAbove: z81.boolean().optional(),
17742
- connectsFromBelow: z81.boolean().optional()
17790
+ connectsFromAbove: z82.boolean().optional(),
17791
+ connectsFromBelow: z82.boolean().optional()
17743
17792
  }).superRefine((props, ctx) => {
17744
17793
  if (props.connectsFromAbove && props.connectsFromBelow) {
17745
17794
  ctx.addIssue({
17746
- code: z81.ZodIssueCode.custom,
17795
+ code: z82.ZodIssueCode.custom,
17747
17796
  message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
17748
17797
  });
17749
17798
  }
@@ -17754,30 +17803,30 @@ var pinHeaderProps = commonComponentProps.extend({
17754
17803
  expectTypesMatch(true);
17755
17804
 
17756
17805
  // lib/components/netalias.ts
17757
- import { z as z82 } from "zod";
17806
+ import { z as z83 } from "zod";
17758
17807
  import { rotation as rotation3 } from "circuit-json";
17759
- var netAliasProps = z82.object({
17760
- net: z82.string().optional(),
17761
- connection: z82.string().optional(),
17808
+ var netAliasProps = z83.object({
17809
+ net: z83.string().optional(),
17810
+ connection: z83.string().optional(),
17762
17811
  schX: distance.optional(),
17763
17812
  schY: distance.optional(),
17764
17813
  schRotation: rotation3.optional(),
17765
- anchorSide: z82.enum(["left", "top", "right", "bottom"]).optional()
17814
+ anchorSide: z83.enum(["left", "top", "right", "bottom"]).optional()
17766
17815
  });
17767
17816
  expectTypesMatch(true);
17768
17817
 
17769
17818
  // lib/components/netlabel.ts
17770
- import { z as z83 } from "zod";
17819
+ import { z as z84 } from "zod";
17771
17820
  import { rotation as rotation4 } from "circuit-json";
17772
- var netLabelProps = z83.object({
17773
- net: z83.string().optional(),
17774
- connection: z83.string().optional(),
17775
- connectsTo: z83.string().or(z83.array(z83.string())).optional(),
17776
- inline: z83.boolean().optional(),
17821
+ var netLabelProps = z84.object({
17822
+ net: z84.string().optional(),
17823
+ connection: z84.string().optional(),
17824
+ connectsTo: z84.string().or(z84.array(z84.string())).optional(),
17825
+ inline: z84.boolean().optional(),
17777
17826
  schX: distance.optional(),
17778
17827
  schY: distance.optional(),
17779
17828
  schRotation: rotation4.optional(),
17780
- anchorSide: z83.enum(["left", "top", "right", "bottom"]).optional()
17829
+ anchorSide: z84.enum(["left", "top", "right", "bottom"]).optional()
17781
17830
  });
17782
17831
  expectTypesMatch(true);
17783
17832
 
@@ -17792,32 +17841,32 @@ expectTypesMatch(true);
17792
17841
 
17793
17842
  // lib/components/analogsimulation.ts
17794
17843
  import { ms } from "circuit-json";
17795
- import { z as z85 } from "zod";
17796
- var spiceEngine = z85.custom(
17844
+ import { z as z86 } from "zod";
17845
+ var spiceEngine = z86.custom(
17797
17846
  (value) => typeof value === "string"
17798
17847
  );
17799
- var spiceOptions = z85.object({
17800
- method: z85.enum(["trap", "gear"]).optional(),
17801
- reltol: z85.union([z85.number(), z85.string()]).optional(),
17802
- abstol: z85.union([z85.number(), z85.string()]).optional(),
17803
- vntol: z85.union([z85.number(), z85.string()]).optional()
17848
+ var spiceOptions = z86.object({
17849
+ method: z86.enum(["trap", "gear"]).optional(),
17850
+ reltol: z86.union([z86.number(), z86.string()]).optional(),
17851
+ abstol: z86.union([z86.number(), z86.string()]).optional(),
17852
+ vntol: z86.union([z86.number(), z86.string()]).optional()
17804
17853
  });
17805
17854
  var analogAnalysisSimulationBaseProps = {
17806
- name: z85.string().optional(),
17855
+ name: z86.string().optional(),
17807
17856
  spiceEngine: spiceEngine.optional(),
17808
17857
  spiceOptions: spiceOptions.optional(),
17809
- graphIndependentAxes: z85.boolean().optional(),
17810
- children: z85.custom().optional()
17858
+ graphIndependentAxes: z86.boolean().optional(),
17859
+ children: z86.custom().optional()
17811
17860
  };
17812
- var analogSimulationProps = z85.object({
17813
- name: z85.string().optional(),
17814
- simulationType: z85.literal("spice_transient_analysis").default("spice_transient_analysis"),
17861
+ var analogSimulationProps = z86.object({
17862
+ name: z86.string().optional(),
17863
+ simulationType: z86.literal("spice_transient_analysis").default("spice_transient_analysis"),
17815
17864
  duration: ms.optional(),
17816
17865
  startTime: ms.optional(),
17817
17866
  timePerStep: ms.optional(),
17818
17867
  spiceEngine: spiceEngine.optional(),
17819
17868
  spiceOptions: spiceOptions.optional(),
17820
- graphIndependentAxes: z85.boolean().optional()
17869
+ graphIndependentAxes: z86.boolean().optional()
17821
17870
  });
17822
17871
  expectTypesMatch(
17823
17872
  true
@@ -17825,12 +17874,12 @@ expectTypesMatch(
17825
17874
 
17826
17875
  // lib/components/analogtransientsimulation.ts
17827
17876
  import { ms as ms2 } from "circuit-json";
17828
- import { z as z86 } from "zod";
17877
+ import { z as z87 } from "zod";
17829
17878
  var positiveMilliseconds = ms2.refine(
17830
17879
  (milliseconds) => milliseconds > 0,
17831
17880
  "Time must be positive"
17832
17881
  );
17833
- var analogTransientSimulationProps = z86.object({
17882
+ var analogTransientSimulationProps = z87.object({
17834
17883
  ...analogAnalysisSimulationBaseProps,
17835
17884
  duration: positiveMilliseconds.default("10ms"),
17836
17885
  startTime: ms2.default("0ms"),
@@ -17838,7 +17887,7 @@ var analogTransientSimulationProps = z86.object({
17838
17887
  }).superRefine((simulation, context) => {
17839
17888
  if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
17840
17889
  context.addIssue({
17841
- code: z86.ZodIssueCode.custom,
17890
+ code: z87.ZodIssueCode.custom,
17842
17891
  path: ["startTime"],
17843
17892
  message: "startTime must be between zero and duration"
17844
17893
  });
@@ -17847,19 +17896,19 @@ var analogTransientSimulationProps = z86.object({
17847
17896
  expectTypesMatch(true);
17848
17897
 
17849
17898
  // lib/components/analogdcoperatingpointsimulation.ts
17850
- import { z as z87 } from "zod";
17851
- var analogDcOperatingPointSimulationProps = z87.object({
17899
+ import { z as z88 } from "zod";
17900
+ var analogDcOperatingPointSimulationProps = z88.object({
17852
17901
  ...analogAnalysisSimulationBaseProps
17853
17902
  });
17854
17903
  expectTypesMatch(true);
17855
17904
 
17856
17905
  // lib/components/analogdcsweepsimulation.ts
17857
17906
  import { current, voltage as voltage3 } from "circuit-json";
17858
- import { z as z88 } from "zod";
17859
- var dcSweepQuantity = z88.union([voltage3, current]);
17860
- var analogDcSweepSimulationProps = z88.object({
17907
+ import { z as z89 } from "zod";
17908
+ var dcSweepQuantity = z89.union([voltage3, current]);
17909
+ var analogDcSweepSimulationProps = z89.object({
17861
17910
  ...analogAnalysisSimulationBaseProps,
17862
- sweepSource: z88.string().min(1),
17911
+ sweepSource: z89.string().min(1),
17863
17912
  sweepStart: dcSweepQuantity,
17864
17913
  sweepStop: dcSweepQuantity,
17865
17914
  sweepStep: dcSweepQuantity.refine(
@@ -17869,7 +17918,7 @@ var analogDcSweepSimulationProps = z88.object({
17869
17918
  }).superRefine((simulation, context) => {
17870
17919
  if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
17871
17920
  context.addIssue({
17872
- code: z88.ZodIssueCode.custom,
17921
+ code: z89.ZodIssueCode.custom,
17873
17922
  path: ["sweepStep"],
17874
17923
  message: "sweepStep must move from sweepStart toward sweepStop"
17875
17924
  });
@@ -17879,10 +17928,10 @@ expectTypesMatch(true);
17879
17928
 
17880
17929
  // lib/components/analogacsweepsimulation.ts
17881
17930
  import { frequency as frequency3 } from "circuit-json";
17882
- import { z as z89 } from "zod";
17883
- var analogAcSweepSimulationProps = z89.object({
17931
+ import { z as z90 } from "zod";
17932
+ var analogAcSweepSimulationProps = z90.object({
17884
17933
  ...analogAnalysisSimulationBaseProps,
17885
- sweepType: z89.enum(["linear", "decade", "octave"]),
17934
+ sweepType: z90.enum(["linear", "decade", "octave"]),
17886
17935
  startFrequency: frequency3.refine(
17887
17936
  (startFrequencyHz) => startFrequencyHz > 0,
17888
17937
  "startFrequency must be positive"
@@ -17891,12 +17940,12 @@ var analogAcSweepSimulationProps = z89.object({
17891
17940
  (stopFrequencyHz) => stopFrequencyHz > 0,
17892
17941
  "stopFrequency must be positive"
17893
17942
  ),
17894
- samplesPerInterval: z89.number().int().positive().optional(),
17895
- sampleCount: z89.number().int().positive().optional()
17943
+ samplesPerInterval: z90.number().int().positive().optional(),
17944
+ sampleCount: z90.number().int().positive().optional()
17896
17945
  }).superRefine((simulation, context) => {
17897
17946
  if (simulation.stopFrequency <= simulation.startFrequency) {
17898
17947
  context.addIssue({
17899
- code: z89.ZodIssueCode.custom,
17948
+ code: z90.ZodIssueCode.custom,
17900
17949
  path: ["stopFrequency"],
17901
17950
  message: "stopFrequency must be greater than startFrequency"
17902
17951
  });
@@ -17904,14 +17953,14 @@ var analogAcSweepSimulationProps = z89.object({
17904
17953
  if (simulation.sweepType === "linear") {
17905
17954
  if (simulation.sampleCount === void 0) {
17906
17955
  context.addIssue({
17907
- code: z89.ZodIssueCode.custom,
17956
+ code: z90.ZodIssueCode.custom,
17908
17957
  path: ["sampleCount"],
17909
17958
  message: "sampleCount is required for a linear AC sweep"
17910
17959
  });
17911
17960
  }
17912
17961
  if (simulation.samplesPerInterval !== void 0) {
17913
17962
  context.addIssue({
17914
- code: z89.ZodIssueCode.custom,
17963
+ code: z90.ZodIssueCode.custom,
17915
17964
  path: ["samplesPerInterval"],
17916
17965
  message: "samplesPerInterval is only valid for decade or octave sweeps"
17917
17966
  });
@@ -17920,14 +17969,14 @@ var analogAcSweepSimulationProps = z89.object({
17920
17969
  }
17921
17970
  if (simulation.samplesPerInterval === void 0) {
17922
17971
  context.addIssue({
17923
- code: z89.ZodIssueCode.custom,
17972
+ code: z90.ZodIssueCode.custom,
17924
17973
  path: ["samplesPerInterval"],
17925
17974
  message: "samplesPerInterval is required for decade or octave sweeps"
17926
17975
  });
17927
17976
  }
17928
17977
  if (simulation.sampleCount !== void 0) {
17929
17978
  context.addIssue({
17930
- code: z89.ZodIssueCode.custom,
17979
+ code: z90.ZodIssueCode.custom,
17931
17980
  path: ["sampleCount"],
17932
17981
  message: "sampleCount is only valid for a linear sweep"
17933
17982
  });
@@ -17943,43 +17992,43 @@ import {
17943
17992
  resistance as resistance5,
17944
17993
  voltage as voltage4
17945
17994
  } from "circuit-json";
17946
- import { z as z90 } from "zod";
17947
- var resistanceSweepQuantity = resistance5.pipe(z90.number());
17948
- var capacitanceSweepQuantity = capacitance4.pipe(z90.number());
17949
- var inductanceSweepQuantity = inductance.pipe(z90.number());
17950
- var voltageSweepQuantity = voltage4.pipe(z90.number());
17951
- var currentSweepQuantity = current2.pipe(z90.number());
17995
+ import { z as z91 } from "zod";
17996
+ var resistanceSweepQuantity = resistance5.pipe(z91.number());
17997
+ var capacitanceSweepQuantity = capacitance4.pipe(z91.number());
17998
+ var inductanceSweepQuantity = inductance.pipe(z91.number());
17999
+ var voltageSweepQuantity = voltage4.pipe(z91.number());
18000
+ var currentSweepQuantity = current2.pipe(z91.number());
17952
18001
  var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
17953
- name: z90.string().optional(),
17954
- values: z90.array(sweepQuantity).min(1).optional(),
18002
+ name: z91.string().optional(),
18003
+ values: z91.array(sweepQuantity).min(1).optional(),
17955
18004
  start: sweepQuantity.optional(),
17956
18005
  stop: sweepQuantity.optional(),
17957
18006
  step: sweepQuantity.optional()
17958
18007
  });
17959
- var analogResistanceSweepParameterProps = z90.object({
18008
+ var analogResistanceSweepParameterProps = z91.object({
17960
18009
  ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
17961
- parameterType: z90.literal("resistance"),
17962
- resistorRef: z90.string().min(1)
18010
+ parameterType: z91.literal("resistance"),
18011
+ resistorRef: z91.string().min(1)
17963
18012
  }).strict();
17964
- var analogCapacitanceSweepParameterProps = z90.object({
18013
+ var analogCapacitanceSweepParameterProps = z91.object({
17965
18014
  ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
17966
- parameterType: z90.literal("capacitance"),
17967
- capacitorRef: z90.string().min(1)
18015
+ parameterType: z91.literal("capacitance"),
18016
+ capacitorRef: z91.string().min(1)
17968
18017
  }).strict();
17969
- var analogInductanceSweepParameterProps = z90.object({
18018
+ var analogInductanceSweepParameterProps = z91.object({
17970
18019
  ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
17971
- parameterType: z90.literal("inductance"),
17972
- inductorRef: z90.string().min(1)
18020
+ parameterType: z91.literal("inductance"),
18021
+ inductorRef: z91.string().min(1)
17973
18022
  }).strict();
17974
- var analogVoltageSweepParameterProps = z90.object({
18023
+ var analogVoltageSweepParameterProps = z91.object({
17975
18024
  ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
17976
- parameterType: z90.literal("voltage"),
17977
- net: z90.string().min(1)
18025
+ parameterType: z91.literal("voltage"),
18026
+ net: z91.string().min(1)
17978
18027
  }).strict();
17979
- var analogCurrentSweepParameterProps = z90.object({
18028
+ var analogCurrentSweepParameterProps = z91.object({
17980
18029
  ...createAnalogSweepCoordinateProps(currentSweepQuantity),
17981
- parameterType: z90.literal("current"),
17982
- currentSourceRef: z90.string().min(1)
18030
+ parameterType: z91.literal("current"),
18031
+ currentSourceRef: z91.string().min(1)
17983
18032
  }).strict();
17984
18033
  var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17985
18034
  const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
@@ -17991,34 +18040,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
17991
18040
  const hasRangeCoordinates = rangeCoordinateCount > 0;
17992
18041
  if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
17993
18042
  context.addIssue({
17994
- code: z90.ZodIssueCode.custom,
18043
+ code: z91.ZodIssueCode.custom,
17995
18044
  message: "Provide either values or start/stop/step"
17996
18045
  });
17997
18046
  return;
17998
18047
  }
17999
18048
  if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
18000
18049
  context.addIssue({
18001
- code: z90.ZodIssueCode.custom,
18050
+ code: z91.ZodIssueCode.custom,
18002
18051
  message: "start, stop, and step must be provided together"
18003
18052
  });
18004
18053
  return;
18005
18054
  }
18006
18055
  if (sweepCoordinates.step === 0) {
18007
18056
  context.addIssue({
18008
- code: z90.ZodIssueCode.custom,
18057
+ code: z91.ZodIssueCode.custom,
18009
18058
  path: ["step"],
18010
18059
  message: "step must be nonzero"
18011
18060
  });
18012
18061
  }
18013
18062
  if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
18014
18063
  context.addIssue({
18015
- code: z90.ZodIssueCode.custom,
18064
+ code: z91.ZodIssueCode.custom,
18016
18065
  path: ["step"],
18017
18066
  message: "step must move from start toward stop"
18018
18067
  });
18019
18068
  }
18020
18069
  };
18021
- var analogSweepParameterProps = z90.discriminatedUnion("parameterType", [
18070
+ var analogSweepParameterProps = z91.discriminatedUnion("parameterType", [
18022
18071
  analogResistanceSweepParameterProps,
18023
18072
  analogCapacitanceSweepParameterProps,
18024
18073
  analogInductanceSweepParameterProps,
@@ -18033,23 +18082,23 @@ expectTypesMatch(true);
18033
18082
  expectTypesMatch(true);
18034
18083
 
18035
18084
  // lib/components/autoroutingphase.ts
18036
- import { z as z91 } from "zod";
18037
- var autoroutingPhaseProps = z91.object({
18038
- key: z91.any().optional(),
18039
- name: z91.string().optional(),
18085
+ import { z as z92 } from "zod";
18086
+ var autoroutingPhaseProps = z92.object({
18087
+ key: z92.any().optional(),
18088
+ name: z92.string().optional(),
18040
18089
  autorouter: autorouterProp.optional(),
18041
- phaseIndex: z91.number().optional(),
18090
+ phaseIndex: z92.number().optional(),
18042
18091
  ...routingTolerances.shape,
18043
- region: z91.object({
18044
- shape: z91.literal("rect").optional(),
18045
- minX: z91.number(),
18046
- maxX: z91.number(),
18047
- minY: z91.number(),
18048
- maxY: z91.number()
18092
+ region: z92.object({
18093
+ shape: z92.literal("rect").optional(),
18094
+ minX: z92.number(),
18095
+ maxX: z92.number(),
18096
+ minY: z92.number(),
18097
+ maxY: z92.number()
18049
18098
  }).optional(),
18050
- connection: z91.string().optional(),
18051
- connections: z91.array(z91.string()).optional(),
18052
- reroute: z91.boolean().optional(),
18099
+ connection: z92.string().optional(),
18100
+ connections: z92.array(z92.string()).optional(),
18101
+ reroute: z92.boolean().optional(),
18053
18102
  ...fanoutProps.shape
18054
18103
  }).superRefine((value, ctx) => {
18055
18104
  const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
@@ -18060,7 +18109,7 @@ var autoroutingPhaseProps = z91.object({
18060
18109
  }
18061
18110
  if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
18062
18111
  ctx.addIssue({
18063
- code: z91.ZodIssueCode.custom,
18112
+ code: z92.ZodIssueCode.custom,
18064
18113
  message: "region, connection, or connections is required when reroute is provided",
18065
18114
  path: ["region"]
18066
18115
  });
@@ -18069,15 +18118,15 @@ var autoroutingPhaseProps = z91.object({
18069
18118
  expectTypesMatch(true);
18070
18119
 
18071
18120
  // lib/components/spicemodel.ts
18072
- import { z as z92 } from "zod";
18073
- var spicemodelProps = z92.object({
18074
- source: z92.string(),
18075
- spicePinMapping: z92.record(z92.string(), z92.string()).optional()
18121
+ import { z as z93 } from "zod";
18122
+ var spicemodelProps = z93.object({
18123
+ source: z93.string(),
18124
+ spicePinMapping: z93.record(z93.string(), z93.string()).optional()
18076
18125
  });
18077
18126
  expectTypesMatch(true);
18078
18127
 
18079
18128
  // lib/components/transistor.ts
18080
- import { z as z93 } from "zod";
18129
+ import { z as z94 } from "zod";
18081
18130
  var transistorPinsLabels = [
18082
18131
  "pin1",
18083
18132
  "pin2",
@@ -18090,7 +18139,7 @@ var transistorPinsLabels = [
18090
18139
  "drain"
18091
18140
  ];
18092
18141
  var transistorProps = commonComponentProps.extend({
18093
- type: z93.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18142
+ type: z94.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18094
18143
  connections: createConnectionsProp(transistorPinsLabels).optional()
18095
18144
  });
18096
18145
  var transistorPins = [
@@ -18104,7 +18153,7 @@ var transistorPins = [
18104
18153
  expectTypesMatch(true);
18105
18154
 
18106
18155
  // lib/components/mosfet.ts
18107
- import { z as z94 } from "zod";
18156
+ import { z as z95 } from "zod";
18108
18157
  var mosfetPins = [
18109
18158
  "pin1",
18110
18159
  "drain",
@@ -18114,11 +18163,11 @@ var mosfetPins = [
18114
18163
  "gate"
18115
18164
  ];
18116
18165
  var mosfetProps = commonComponentProps.extend({
18117
- channelType: z94.enum(["n", "p"]),
18118
- mosfetMode: z94.enum(["enhancement", "depletion"]),
18119
- symbolDrainSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18120
- symbolSourceSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18121
- symbolGateSide: z94.enum(["left", "right", "top", "bottom"]).optional(),
18166
+ channelType: z95.enum(["n", "p"]),
18167
+ mosfetMode: z95.enum(["enhancement", "depletion"]),
18168
+ symbolDrainSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
18169
+ symbolSourceSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
18170
+ symbolGateSide: z95.enum(["left", "right", "top", "bottom"]).optional(),
18122
18171
  connections: createConnectionsProp(mosfetPins).optional()
18123
18172
  });
18124
18173
  expectTypesMatch(true);
@@ -18140,29 +18189,29 @@ expectTypesMatch(true);
18140
18189
 
18141
18190
  // lib/components/inductor.ts
18142
18191
  import { inductance as inductance2 } from "circuit-json";
18143
- import { z as z96 } from "zod";
18192
+ import { z as z97 } from "zod";
18144
18193
  var inductorPins = lrPins;
18145
18194
  var inductorProps = commonComponentProps.extend({
18146
18195
  inductance: inductance2,
18147
- maxCurrentRating: z96.union([z96.string(), z96.number()]).optional(),
18196
+ maxCurrentRating: z97.union([z97.string(), z97.number()]).optional(),
18148
18197
  schOrientation: schematicOrientation.optional(),
18149
18198
  connections: createConnectionsProp(inductorPins).optional()
18150
18199
  });
18151
18200
  expectTypesMatch(true);
18152
18201
 
18153
18202
  // lib/components/internal-circuit.ts
18154
- import { z as z97 } from "zod";
18155
- var internalCircuitProps = z97.object({
18156
- children: z97.custom().optional()
18203
+ import { z as z98 } from "zod";
18204
+ var internalCircuitProps = z98.object({
18205
+ children: z98.custom().optional()
18157
18206
  });
18158
18207
  expectTypesMatch(
18159
18208
  true
18160
18209
  );
18161
18210
 
18162
18211
  // lib/components/diode.ts
18163
- import { z as z98 } from "zod";
18212
+ import { z as z99 } from "zod";
18164
18213
  var diodePins = lrPolarPins;
18165
- var diodeConnectionKeys = z98.enum([
18214
+ var diodeConnectionKeys = z99.enum([
18166
18215
  "anode",
18167
18216
  "cathode",
18168
18217
  "pin1",
@@ -18170,13 +18219,13 @@ var diodeConnectionKeys = z98.enum([
18170
18219
  "pos",
18171
18220
  "neg"
18172
18221
  ]);
18173
- var connectionTarget3 = z98.string().or(z98.array(z98.string()).readonly()).or(z98.array(z98.string()));
18174
- var connectionsProp2 = z98.record(diodeConnectionKeys, connectionTarget3);
18175
- var diodePinLabelsProp = z98.record(
18176
- z98.enum(diodePins),
18177
- schematicPinLabel.or(z98.array(schematicPinLabel).readonly()).or(z98.array(schematicPinLabel))
18222
+ var connectionTarget3 = z99.string().or(z99.array(z99.string()).readonly()).or(z99.array(z99.string()));
18223
+ var connectionsProp2 = z99.record(diodeConnectionKeys, connectionTarget3);
18224
+ var diodePinLabelsProp = z99.record(
18225
+ z99.enum(diodePins),
18226
+ schematicPinLabel.or(z99.array(schematicPinLabel).readonly()).or(z99.array(schematicPinLabel))
18178
18227
  );
18179
- var diodeVariant = z98.enum([
18228
+ var diodeVariant = z99.enum([
18180
18229
  "standard",
18181
18230
  "schottky",
18182
18231
  "zener",
@@ -18187,12 +18236,12 @@ var diodeVariant = z98.enum([
18187
18236
  var diodeProps = commonComponentProps.extend({
18188
18237
  connections: connectionsProp2.optional(),
18189
18238
  variant: diodeVariant.optional().default("standard"),
18190
- standard: z98.boolean().optional(),
18191
- schottky: z98.boolean().optional(),
18192
- zener: z98.boolean().optional(),
18193
- avalanche: z98.boolean().optional(),
18194
- photo: z98.boolean().optional(),
18195
- tvs: z98.boolean().optional(),
18239
+ standard: z99.boolean().optional(),
18240
+ schottky: z99.boolean().optional(),
18241
+ zener: z99.boolean().optional(),
18242
+ avalanche: z99.boolean().optional(),
18243
+ photo: z99.boolean().optional(),
18244
+ tvs: z99.boolean().optional(),
18196
18245
  schOrientation: schematicOrientation.optional(),
18197
18246
  pinLabels: diodePinLabelsProp.optional()
18198
18247
  }).superRefine((data, ctx) => {
@@ -18206,11 +18255,11 @@ var diodeProps = commonComponentProps.extend({
18206
18255
  ].filter(Boolean).length;
18207
18256
  if (enabledFlags > 1) {
18208
18257
  ctx.addIssue({
18209
- code: z98.ZodIssueCode.custom,
18258
+ code: z99.ZodIssueCode.custom,
18210
18259
  message: "Exactly one diode variant must be enabled",
18211
18260
  path: []
18212
18261
  });
18213
- return z98.INVALID;
18262
+ return z99.INVALID;
18214
18263
  }
18215
18264
  }).transform((data) => {
18216
18265
  const result = {
@@ -18256,44 +18305,44 @@ var diodeProps = commonComponentProps.extend({
18256
18305
  expectTypesMatch(true);
18257
18306
 
18258
18307
  // lib/components/led.ts
18259
- import { z as z99 } from "zod";
18260
- var legacyNumericLedPinLabelsProp = z99.record(
18261
- z99.enum(["1", "2"]),
18262
- schematicPinLabel.or(z99.array(schematicPinLabel).readonly()).or(z99.array(schematicPinLabel))
18308
+ import { z as z100 } from "zod";
18309
+ var legacyNumericLedPinLabelsProp = z100.record(
18310
+ z100.enum(["1", "2"]),
18311
+ schematicPinLabel.or(z100.array(schematicPinLabel).readonly()).or(z100.array(schematicPinLabel))
18263
18312
  ).transform((pinLabels) => ({
18264
18313
  ...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
18265
18314
  ...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
18266
18315
  }));
18267
18316
  var ledProps = commonComponentProps.extend({
18268
- color: z99.string().optional(),
18269
- wavelength: z99.string().optional(),
18270
- schDisplayValue: z99.string().optional(),
18317
+ color: z100.string().optional(),
18318
+ wavelength: z100.string().optional(),
18319
+ schDisplayValue: z100.string().optional(),
18271
18320
  schOrientation: schematicOrientation.optional(),
18272
18321
  // Numeric keys are accepted for compatibility with legacy generated LED
18273
18322
  // wrappers, then normalized to the canonical pin1/pin2 representation.
18274
18323
  pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
18275
18324
  connections: createConnectionsProp(lrPolarPins).optional(),
18276
- laser: z99.boolean().optional()
18325
+ laser: z100.boolean().optional()
18277
18326
  });
18278
18327
  var ledPins = lrPolarPins;
18279
18328
 
18280
18329
  // lib/components/switch.ts
18281
18330
  import { ms as ms3, frequency as frequency4 } from "circuit-json";
18282
- import { z as z100 } from "zod";
18331
+ import { z as z101 } from "zod";
18283
18332
  var switchProps = commonComponentProps.extend({
18284
- type: z100.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
18285
- isNormallyClosed: z100.boolean().optional().default(false),
18286
- spst: z100.boolean().optional(),
18287
- spdt: z100.boolean().optional(),
18288
- dpst: z100.boolean().optional(),
18289
- dpdt: z100.boolean().optional(),
18333
+ type: z101.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
18334
+ isNormallyClosed: z101.boolean().optional().default(false),
18335
+ spst: z101.boolean().optional(),
18336
+ spdt: z101.boolean().optional(),
18337
+ dpst: z101.boolean().optional(),
18338
+ dpdt: z101.boolean().optional(),
18290
18339
  pinLabels: pinLabelsProp.optional(),
18291
18340
  simSwitchFrequency: frequency4.optional(),
18292
18341
  simCloseAt: ms3.optional(),
18293
18342
  simOpenAt: ms3.optional(),
18294
- simStartClosed: z100.boolean().optional(),
18295
- simStartOpen: z100.boolean().optional(),
18296
- connections: z100.custom().pipe(z100.record(z100.string(), connectionTarget)).optional()
18343
+ simStartClosed: z101.boolean().optional(),
18344
+ simStartOpen: z101.boolean().optional(),
18345
+ connections: z101.custom().pipe(z101.record(z101.string(), connectionTarget)).optional()
18297
18346
  }).transform((props) => {
18298
18347
  const updatedProps = { ...props };
18299
18348
  if (updatedProps.dpdt) {
@@ -18325,33 +18374,33 @@ expectTypesMatch(true);
18325
18374
 
18326
18375
  // lib/components/fabrication-note-text.ts
18327
18376
  import { length as length4 } from "circuit-json";
18328
- import { z as z101 } from "zod";
18377
+ import { z as z102 } from "zod";
18329
18378
  var fabricationNoteTextProps = pcbLayoutProps.extend({
18330
- text: z101.string(),
18331
- anchorAlignment: z101.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18332
- font: z101.enum(["tscircuit2024"]).optional(),
18379
+ text: z102.string(),
18380
+ anchorAlignment: z102.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18381
+ font: z102.enum(["tscircuit2024"]).optional(),
18333
18382
  fontSize: length4.optional(),
18334
- color: z101.string().optional()
18383
+ color: z102.string().optional()
18335
18384
  });
18336
18385
  expectTypesMatch(true);
18337
18386
 
18338
18387
  // lib/components/fabrication-note-rect.ts
18339
18388
  import { distance as distance23 } from "circuit-json";
18340
- import { z as z102 } from "zod";
18389
+ import { z as z103 } from "zod";
18341
18390
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18342
18391
  width: distance23,
18343
18392
  height: distance23,
18344
18393
  strokeWidth: distance23.optional(),
18345
- isFilled: z102.boolean().optional(),
18346
- hasStroke: z102.boolean().optional(),
18347
- isStrokeDashed: z102.boolean().optional(),
18348
- color: z102.string().optional(),
18394
+ isFilled: z103.boolean().optional(),
18395
+ hasStroke: z103.boolean().optional(),
18396
+ isStrokeDashed: z103.boolean().optional(),
18397
+ color: z103.string().optional(),
18349
18398
  cornerRadius: distance23.optional()
18350
18399
  });
18351
18400
 
18352
18401
  // lib/components/fabrication-note-path.ts
18353
18402
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
18354
- import { z as z103 } from "zod";
18403
+ import { z as z104 } from "zod";
18355
18404
  var fabricationNotePathProps = pcbLayoutProps.omit({
18356
18405
  pcbLeftEdgeX: true,
18357
18406
  pcbRightEdgeX: true,
@@ -18363,15 +18412,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
18363
18412
  pcbOffsetY: true,
18364
18413
  pcbRotation: true
18365
18414
  }).extend({
18366
- route: z103.array(route_hint_point3),
18415
+ route: z104.array(route_hint_point3),
18367
18416
  strokeWidth: length5.optional(),
18368
- color: z103.string().optional()
18417
+ color: z104.string().optional()
18369
18418
  });
18370
18419
 
18371
18420
  // lib/components/fabrication-note-dimension.ts
18372
18421
  import { distance as distance24, length as length6 } from "circuit-json";
18373
- import { z as z104 } from "zod";
18374
- var dimensionTarget = z104.union([z104.string(), point]);
18422
+ import { z as z105 } from "zod";
18423
+ var dimensionTarget = z105.union([z105.string(), point]);
18375
18424
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18376
18425
  pcbLeftEdgeX: true,
18377
18426
  pcbRightEdgeX: true,
@@ -18385,54 +18434,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18385
18434
  }).extend({
18386
18435
  from: dimensionTarget,
18387
18436
  to: dimensionTarget,
18388
- text: z104.string().optional(),
18437
+ text: z105.string().optional(),
18389
18438
  offset: distance24.optional(),
18390
- font: z104.enum(["tscircuit2024"]).optional(),
18439
+ font: z105.enum(["tscircuit2024"]).optional(),
18391
18440
  fontSize: length6.optional(),
18392
- color: z104.string().optional(),
18441
+ color: z105.string().optional(),
18393
18442
  arrowSize: distance24.optional(),
18394
- units: z104.enum(["in", "mm"]).optional(),
18395
- outerEdgeToEdge: z104.literal(true).optional(),
18396
- centerToCenter: z104.literal(true).optional(),
18397
- innerEdgeToEdge: z104.literal(true).optional()
18443
+ units: z105.enum(["in", "mm"]).optional(),
18444
+ outerEdgeToEdge: z105.literal(true).optional(),
18445
+ centerToCenter: z105.literal(true).optional(),
18446
+ innerEdgeToEdge: z105.literal(true).optional()
18398
18447
  });
18399
18448
  expectTypesMatch(true);
18400
18449
 
18401
18450
  // lib/components/pcb-trace.ts
18402
18451
  import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
18403
- import { z as z105 } from "zod";
18404
- var pcbTraceProps = z105.object({
18405
- layer: z105.string().optional(),
18452
+ import { z as z106 } from "zod";
18453
+ var pcbTraceProps = z106.object({
18454
+ layer: z106.string().optional(),
18406
18455
  thickness: distance25.optional(),
18407
- route: z105.array(route_hint_point4)
18456
+ route: z106.array(route_hint_point4)
18408
18457
  });
18409
18458
 
18410
18459
  // lib/components/via.ts
18411
- import { distance as distance26, layer_ref as layer_ref8 } from "circuit-json";
18412
- import { z as z106 } from "zod";
18460
+ import { distance as distance26, layer_ref as layer_ref9 } from "circuit-json";
18461
+ import { z as z107 } from "zod";
18413
18462
  var viaProps = commonLayoutProps.extend({
18414
- name: z106.string().optional(),
18415
- fromLayer: layer_ref8.optional(),
18416
- toLayer: layer_ref8.optional(),
18463
+ name: z107.string().optional(),
18464
+ fromLayer: layer_ref9.optional(),
18465
+ toLayer: layer_ref9.optional(),
18417
18466
  holeDiameter: distance26.optional(),
18418
18467
  outerDiameter: distance26.optional(),
18419
- layers: z106.array(layer_ref8).optional(),
18420
- connectsTo: z106.string().or(z106.array(z106.string())).optional(),
18421
- netIsAssignable: z106.boolean().optional()
18468
+ layers: z107.array(layer_ref9).optional(),
18469
+ connectsTo: z107.string().or(z107.array(z107.string())).optional(),
18470
+ netIsAssignable: z107.boolean().optional()
18422
18471
  });
18423
18472
  expectTypesMatch(true);
18424
18473
 
18425
18474
  // lib/components/testpoint.ts
18426
18475
  import { distance as distance27 } from "circuit-json";
18427
- import { z as z107 } from "zod";
18476
+ import { z as z108 } from "zod";
18428
18477
  var testpointPins = ["pin1"];
18429
- var testpointConnectionsProp = z107.object({
18478
+ var testpointConnectionsProp = z108.object({
18430
18479
  pin1: connectionTarget
18431
18480
  }).strict();
18432
18481
  var testpointProps = commonComponentProps.extend({
18433
18482
  connections: testpointConnectionsProp.optional(),
18434
- footprintVariant: z107.enum(["pad", "through_hole"]).optional(),
18435
- padShape: z107.enum(["rect", "circle"]).optional().default("circle"),
18483
+ footprintVariant: z108.enum(["pad", "through_hole"]).optional(),
18484
+ padShape: z108.enum(["rect", "circle"]).optional().default("circle"),
18436
18485
  padDiameter: distance27.optional(),
18437
18486
  holeDiameter: distance27.optional(),
18438
18487
  width: distance27.optional(),
@@ -18444,30 +18493,30 @@ var testpointProps = commonComponentProps.extend({
18444
18493
  expectTypesMatch(true);
18445
18494
 
18446
18495
  // lib/components/breakoutpoint.ts
18447
- import { z as z108 } from "zod";
18496
+ import { z as z109 } from "zod";
18448
18497
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
18449
- connection: z108.string()
18498
+ connection: z109.string()
18450
18499
  });
18451
18500
  expectTypesMatch(true);
18452
18501
 
18453
18502
  // lib/components/pcb-keepout.ts
18454
- import { distance as distance28, layer_ref as layer_ref9 } from "circuit-json";
18455
- import { z as z109 } from "zod";
18456
- var pcbKeepoutProps = z109.union([
18503
+ import { distance as distance28, layer_ref as layer_ref10 } from "circuit-json";
18504
+ import { z as z110 } from "zod";
18505
+ var pcbKeepoutProps = z110.union([
18457
18506
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
18458
- shape: z109.literal("circle"),
18507
+ shape: z110.literal("circle"),
18459
18508
  radius: distance28,
18460
- layers: z109.array(layer_ref9).optional(),
18461
- excludeRefs: z109.array(z109.string()).optional().describe(
18509
+ layers: z110.array(layer_ref10).optional(),
18510
+ excludeRefs: z110.array(z110.string()).optional().describe(
18462
18511
  'Component selectors excluded from the keepout, such as ".ANT1"'
18463
18512
  )
18464
18513
  }),
18465
18514
  pcbLayoutProps.extend({
18466
- shape: z109.literal("rect"),
18515
+ shape: z110.literal("rect"),
18467
18516
  width: distance28,
18468
18517
  height: distance28,
18469
- layers: z109.array(layer_ref9).optional(),
18470
- excludeRefs: z109.array(z109.string()).optional().describe(
18518
+ layers: z110.array(layer_ref10).optional(),
18519
+ excludeRefs: z110.array(z110.string()).optional().describe(
18471
18520
  'Component selectors excluded from the keepout, such as ".ANT1"'
18472
18521
  )
18473
18522
  })
@@ -18475,20 +18524,20 @@ var pcbKeepoutProps = z109.union([
18475
18524
 
18476
18525
  // lib/components/courtyard-rect.ts
18477
18526
  import { distance as distance29 } from "circuit-json";
18478
- import { z as z110 } from "zod";
18527
+ import { z as z111 } from "zod";
18479
18528
  var courtyardRectProps = pcbLayoutProps.extend({
18480
18529
  width: distance29,
18481
18530
  height: distance29,
18482
18531
  strokeWidth: distance29.optional(),
18483
- isFilled: z110.boolean().optional(),
18484
- hasStroke: z110.boolean().optional(),
18485
- isStrokeDashed: z110.boolean().optional(),
18486
- color: z110.string().optional()
18532
+ isFilled: z111.boolean().optional(),
18533
+ hasStroke: z111.boolean().optional(),
18534
+ isStrokeDashed: z111.boolean().optional(),
18535
+ color: z111.string().optional()
18487
18536
  });
18488
18537
 
18489
18538
  // lib/components/courtyard-outline.ts
18490
18539
  import { length as length7 } from "circuit-json";
18491
- import { z as z111 } from "zod";
18540
+ import { z as z112 } from "zod";
18492
18541
  var courtyardOutlineProps = pcbLayoutProps.omit({
18493
18542
  pcbLeftEdgeX: true,
18494
18543
  pcbRightEdgeX: true,
@@ -18500,11 +18549,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
18500
18549
  pcbOffsetY: true,
18501
18550
  pcbRotation: true
18502
18551
  }).extend({
18503
- outline: z111.array(point),
18552
+ outline: z112.array(point),
18504
18553
  strokeWidth: length7.optional(),
18505
- isClosed: z111.boolean().optional(),
18506
- isStrokeDashed: z111.boolean().optional(),
18507
- color: z111.string().optional()
18554
+ isClosed: z112.boolean().optional(),
18555
+ isStrokeDashed: z112.boolean().optional(),
18556
+ color: z112.string().optional()
18508
18557
  });
18509
18558
 
18510
18559
  // lib/components/courtyard-circle.ts
@@ -18524,13 +18573,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18524
18573
  });
18525
18574
 
18526
18575
  // lib/components/copper-pour.ts
18527
- import { z as z114 } from "zod";
18528
- import { layer_ref as layer_ref10 } from "circuit-json";
18529
- var copperPourProps = z114.object({
18530
- name: z114.string().optional(),
18531
- layer: layer_ref10,
18532
- connectsTo: z114.string(),
18533
- unbroken: z114.boolean().optional().describe(
18576
+ import { z as z115 } from "zod";
18577
+ import { layer_ref as layer_ref11 } from "circuit-json";
18578
+ var copperPourProps = z115.object({
18579
+ name: z115.string().optional(),
18580
+ layer: layer_ref11,
18581
+ connectsTo: z115.string(),
18582
+ unbroken: z115.boolean().optional().describe(
18534
18583
  "Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
18535
18584
  ),
18536
18585
  padMargin: distance.optional(),
@@ -18538,24 +18587,24 @@ var copperPourProps = z114.object({
18538
18587
  clearance: distance.optional(),
18539
18588
  boardEdgeMargin: distance.optional(),
18540
18589
  cutoutMargin: distance.optional(),
18541
- useThermalReliefs: z114.boolean().optional(),
18542
- outline: z114.array(point).optional(),
18543
- coveredWithSolderMask: z114.boolean().optional().default(true)
18590
+ useThermalReliefs: z115.boolean().optional(),
18591
+ outline: z115.array(point).optional(),
18592
+ coveredWithSolderMask: z115.boolean().optional().default(true)
18544
18593
  });
18545
18594
  expectTypesMatch(true);
18546
18595
 
18547
18596
  // lib/components/cadassembly.ts
18548
- import { layer_ref as layer_ref11 } from "circuit-json";
18549
- import { z as z115 } from "zod";
18550
- var cadassemblyProps = z115.object({
18551
- originalLayer: layer_ref11.default("top").optional(),
18552
- children: z115.any().optional()
18597
+ import { layer_ref as layer_ref12 } from "circuit-json";
18598
+ import { z as z116 } from "zod";
18599
+ var cadassemblyProps = z116.object({
18600
+ originalLayer: layer_ref12.default("top").optional(),
18601
+ children: z116.any().optional()
18553
18602
  });
18554
18603
  expectTypesMatch(true);
18555
18604
 
18556
18605
  // lib/components/cadmodel.ts
18557
- import { z as z116 } from "zod";
18558
- var pcbPosition = z116.object({
18606
+ import { z as z117 } from "zod";
18607
+ var pcbPosition = z117.object({
18559
18608
  pcbX: pcbCoordinate.optional(),
18560
18609
  pcbY: pcbCoordinate.optional(),
18561
18610
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18572,7 +18621,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18572
18621
  });
18573
18622
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18574
18623
  expectTypesMatch(true);
18575
- var cadmodelProps = z116.union([z116.null(), url, cadModelObject]);
18624
+ var cadmodelProps = z117.union([z117.null(), url, cadModelObject]);
18576
18625
 
18577
18626
  // lib/components/power-source.ts
18578
18627
  import { voltage as voltage5 } from "circuit-json";
@@ -18582,9 +18631,9 @@ var powerSourceProps = commonComponentProps.extend({
18582
18631
 
18583
18632
  // lib/components/voltagesource.ts
18584
18633
  import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
18585
- import { z as z117 } from "zod";
18634
+ import { z as z118 } from "zod";
18586
18635
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18587
- var percentage = z117.union([z117.string(), z117.number()]).transform((val) => {
18636
+ var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
18588
18637
  if (typeof val === "string") {
18589
18638
  if (val.endsWith("%")) {
18590
18639
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18593,13 +18642,13 @@ var percentage = z117.union([z117.string(), z117.number()]).transform((val) => {
18593
18642
  }
18594
18643
  return val;
18595
18644
  }).pipe(
18596
- z117.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18645
+ z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18597
18646
  );
18598
18647
  var voltageSourceProps = commonComponentProps.extend({
18599
18648
  voltage: voltage6.optional(),
18600
18649
  frequency: frequency5.optional(),
18601
18650
  peakToPeakVoltage: voltage6.optional(),
18602
- waveShape: z117.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18651
+ waveShape: z118.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18603
18652
  phase: rotation5.optional(),
18604
18653
  dutyCycle: percentage.optional(),
18605
18654
  pulseDelay: ms4.optional(),
@@ -18616,9 +18665,9 @@ expectTypesMatch(true);
18616
18665
 
18617
18666
  // lib/components/currentsource.ts
18618
18667
  import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
18619
- import { z as z118 } from "zod";
18668
+ import { z as z119 } from "zod";
18620
18669
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18621
- var percentage2 = z118.union([z118.string(), z118.number()]).transform((val) => {
18670
+ var percentage2 = z119.union([z119.string(), z119.number()]).transform((val) => {
18622
18671
  if (typeof val === "string") {
18623
18672
  if (val.endsWith("%")) {
18624
18673
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18627,13 +18676,13 @@ var percentage2 = z118.union([z118.string(), z118.number()]).transform((val) =>
18627
18676
  }
18628
18677
  return val;
18629
18678
  }).pipe(
18630
- z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18679
+ z119.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18631
18680
  );
18632
18681
  var currentSourceProps = commonComponentProps.extend({
18633
18682
  current: current3.optional(),
18634
18683
  frequency: frequency6.optional(),
18635
18684
  peakToPeakCurrent: current3.optional(),
18636
- waveShape: z118.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18685
+ waveShape: z119.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18637
18686
  phase: rotation6.optional(),
18638
18687
  dutyCycle: percentage2.optional(),
18639
18688
  acMagnitude: current3.optional(),
@@ -18644,21 +18693,21 @@ var currentSourcePins = lrPolarPins;
18644
18693
  expectTypesMatch(true);
18645
18694
 
18646
18695
  // lib/components/voltageprobe.ts
18647
- import { z as z119 } from "zod";
18696
+ import { z as z120 } from "zod";
18648
18697
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18649
- name: z119.string().optional(),
18650
- connectsTo: z119.string(),
18651
- referenceTo: z119.string().optional(),
18652
- color: z119.string().optional(),
18653
- graphDisplayName: z119.string().optional(),
18654
- graphCenter: z119.number().optional(),
18655
- graphVerticalOffset: z119.number().or(z119.string()).optional(),
18656
- graphVoltagePerDiv: z119.number().or(z119.string()).optional()
18698
+ name: z120.string().optional(),
18699
+ connectsTo: z120.string(),
18700
+ referenceTo: z120.string().optional(),
18701
+ color: z120.string().optional(),
18702
+ graphDisplayName: z120.string().optional(),
18703
+ graphCenter: z120.number().optional(),
18704
+ graphVerticalOffset: z120.number().or(z120.string()).optional(),
18705
+ graphVoltagePerDiv: z120.number().or(z120.string()).optional()
18657
18706
  });
18658
18707
  expectTypesMatch(true);
18659
18708
 
18660
18709
  // lib/components/ammeter.ts
18661
- import { z as z120 } from "zod";
18710
+ import { z as z121 } from "zod";
18662
18711
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18663
18712
  var hasAmmeterConnectionPair = (connections) => {
18664
18713
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18668,64 +18717,64 @@ var ammeterProps = commonComponentProps.extend({
18668
18717
  hasAmmeterConnectionPair,
18669
18718
  "Ammeter connections must include either pos/neg or pin1/pin2"
18670
18719
  ),
18671
- color: z120.string().optional(),
18672
- graphDisplayName: z120.string().optional(),
18673
- graphCenter: z120.number().optional(),
18674
- graphVerticalOffset: z120.number().or(z120.string()).optional(),
18675
- graphCurrentPerDiv: z120.number().or(z120.string()).optional()
18720
+ color: z121.string().optional(),
18721
+ graphDisplayName: z121.string().optional(),
18722
+ graphCenter: z121.number().optional(),
18723
+ graphVerticalOffset: z121.number().or(z121.string()).optional(),
18724
+ graphCurrentPerDiv: z121.number().or(z121.string()).optional()
18676
18725
  });
18677
18726
  var ammeterPins = ammeterPinLabels;
18678
18727
  expectTypesMatch(true);
18679
18728
 
18680
18729
  // lib/components/schematic-arc.ts
18681
18730
  import { distance as distance32, point as point5, rotation as rotation7 } from "circuit-json";
18682
- import { z as z121 } from "zod";
18683
- var schematicArcProps = z121.object({
18731
+ import { z as z122 } from "zod";
18732
+ var schematicArcProps = z122.object({
18684
18733
  center: point5,
18685
18734
  radius: distance32,
18686
18735
  startAngleDegrees: rotation7,
18687
18736
  endAngleDegrees: rotation7,
18688
- direction: z121.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18737
+ direction: z122.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18689
18738
  strokeWidth: distance32.optional(),
18690
- color: z121.string().optional(),
18691
- isDashed: z121.boolean().optional().default(false)
18739
+ color: z122.string().optional(),
18740
+ isDashed: z122.boolean().optional().default(false)
18692
18741
  });
18693
18742
  expectTypesMatch(true);
18694
18743
 
18695
18744
  // lib/components/toolingrail.ts
18696
- import { z as z122 } from "zod";
18697
- var toolingrailProps = z122.object({
18698
- children: z122.any().optional()
18745
+ import { z as z123 } from "zod";
18746
+ var toolingrailProps = z123.object({
18747
+ children: z123.any().optional()
18699
18748
  });
18700
18749
  expectTypesMatch(true);
18701
18750
 
18702
18751
  // lib/components/schematic-box.ts
18703
18752
  import { distance as distance33 } from "circuit-json";
18704
- import { z as z123 } from "zod";
18705
- var schematicBoxProps = z123.object({
18706
- name: z123.string().optional(),
18707
- chipRef: z123.string().optional(),
18753
+ import { z as z124 } from "zod";
18754
+ var schematicBoxProps = z124.object({
18755
+ name: z124.string().optional(),
18756
+ chipRef: z124.string().optional(),
18708
18757
  pinLabels: pinLabelsProp.optional(),
18709
18758
  schPinArrangement: schematicPinArrangement.optional(),
18710
18759
  schPinStyle: schematicPinStyle.optional(),
18711
18760
  schX: distance33.optional(),
18712
18761
  schY: distance33.optional(),
18713
- schSectionName: z123.string().optional(),
18714
- schSheetName: z123.string().optional(),
18762
+ schSectionName: z124.string().optional(),
18763
+ schSheetName: z124.string().optional(),
18715
18764
  width: distance33.optional(),
18716
18765
  height: distance33.optional(),
18717
- overlay: z123.array(z123.string()).optional(),
18766
+ overlay: z124.array(z124.string()).optional(),
18718
18767
  padding: distance33.optional(),
18719
18768
  paddingLeft: distance33.optional(),
18720
18769
  paddingRight: distance33.optional(),
18721
18770
  paddingTop: distance33.optional(),
18722
18771
  paddingBottom: distance33.optional(),
18723
- title: z123.string().optional(),
18772
+ title: z124.string().optional(),
18724
18773
  titleAlignment: ninePointAnchor.default("top_left"),
18725
- titleColor: z123.string().optional(),
18774
+ titleColor: z124.string().optional(),
18726
18775
  titleFontSize: distance33.optional(),
18727
- titleInside: z123.boolean().default(false),
18728
- strokeStyle: z123.enum(["solid", "dashed"]).default("solid")
18776
+ titleInside: z124.boolean().default(false),
18777
+ strokeStyle: z124.enum(["solid", "dashed"]).default("solid")
18729
18778
  }).refine(
18730
18779
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18731
18780
  {
@@ -18741,21 +18790,21 @@ expectTypesMatch(true);
18741
18790
 
18742
18791
  // lib/components/schematic-symbol.ts
18743
18792
  import { rotation as rotation8 } from "circuit-json";
18744
- import { z as z124 } from "zod";
18745
- var schematicSymbolConnections = z124.custom().pipe(z124.record(z124.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18793
+ import { z as z125 } from "zod";
18794
+ var schematicSymbolConnections = z125.custom().pipe(z125.record(z125.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
18746
18795
  message: "connections must map at least one schematic symbol port"
18747
18796
  });
18748
- var schematicSymbolProps = z124.object({
18749
- name: z124.string().min(1),
18750
- displayName: z124.string().optional(),
18751
- chipRef: z124.string().min(1).optional(),
18752
- symbolName: z124.string().min(1),
18797
+ var schematicSymbolProps = z125.object({
18798
+ name: z125.string().min(1),
18799
+ displayName: z125.string().optional(),
18800
+ chipRef: z125.string().min(1).optional(),
18801
+ symbolName: z125.string().min(1),
18753
18802
  connections: schematicSymbolConnections.optional(),
18754
18803
  schX: distance.optional(),
18755
18804
  schY: distance.optional(),
18756
18805
  schRotation: rotation8.optional(),
18757
- schSectionName: z124.string().optional(),
18758
- schSheetName: z124.string().optional()
18806
+ schSectionName: z125.string().optional(),
18807
+ schSheetName: z125.string().optional()
18759
18808
  });
18760
18809
  expectTypesMatch(
18761
18810
  true
@@ -18763,15 +18812,15 @@ expectTypesMatch(
18763
18812
 
18764
18813
  // lib/components/schematic-circle.ts
18765
18814
  import { distance as distance34, point as point6 } from "circuit-json";
18766
- import { z as z125 } from "zod";
18767
- var schematicCircleProps = z125.object({
18815
+ import { z as z126 } from "zod";
18816
+ var schematicCircleProps = z126.object({
18768
18817
  center: point6,
18769
18818
  radius: distance34,
18770
18819
  strokeWidth: distance34.optional(),
18771
- color: z125.string().optional(),
18772
- isFilled: z125.boolean().optional().default(false),
18773
- fillColor: z125.string().optional(),
18774
- isDashed: z125.boolean().optional().default(false)
18820
+ color: z126.string().optional(),
18821
+ isFilled: z126.boolean().optional().default(false),
18822
+ fillColor: z126.string().optional(),
18823
+ isDashed: z126.boolean().optional().default(false)
18775
18824
  });
18776
18825
  expectTypesMatch(
18777
18826
  true
@@ -18779,32 +18828,32 @@ expectTypesMatch(
18779
18828
 
18780
18829
  // lib/components/schematic-rect.ts
18781
18830
  import { distance as distance35, rotation as rotation9 } from "circuit-json";
18782
- import { z as z126 } from "zod";
18783
- var schematicRectProps = z126.object({
18831
+ import { z as z127 } from "zod";
18832
+ var schematicRectProps = z127.object({
18784
18833
  schX: distance35.optional(),
18785
18834
  schY: distance35.optional(),
18786
18835
  width: distance35,
18787
18836
  height: distance35,
18788
18837
  rotation: rotation9.default(0),
18789
18838
  strokeWidth: distance35.optional(),
18790
- color: z126.string().optional(),
18791
- isFilled: z126.boolean().optional().default(false),
18792
- fillColor: z126.string().optional(),
18793
- isDashed: z126.boolean().optional().default(false)
18839
+ color: z127.string().optional(),
18840
+ isFilled: z127.boolean().optional().default(false),
18841
+ fillColor: z127.string().optional(),
18842
+ isDashed: z127.boolean().optional().default(false)
18794
18843
  });
18795
18844
  expectTypesMatch(true);
18796
18845
 
18797
18846
  // lib/components/schematic-line.ts
18798
18847
  import { distance as distance36 } from "circuit-json";
18799
- import { z as z127 } from "zod";
18800
- var schematicLineProps = z127.object({
18848
+ import { z as z128 } from "zod";
18849
+ var schematicLineProps = z128.object({
18801
18850
  x1: distance36,
18802
18851
  y1: distance36,
18803
18852
  x2: distance36,
18804
18853
  y2: distance36,
18805
18854
  strokeWidth: distance36.optional(),
18806
- color: z127.string().optional(),
18807
- isDashed: z127.boolean().optional().default(false),
18855
+ color: z128.string().optional(),
18856
+ isDashed: z128.boolean().optional().default(false),
18808
18857
  dashLength: distance36.optional(),
18809
18858
  dashGap: distance36.optional()
18810
18859
  });
@@ -18812,11 +18861,11 @@ expectTypesMatch(true);
18812
18861
 
18813
18862
  // lib/components/schematic-text.ts
18814
18863
  import { distance as distance37, rotation as rotation10 } from "circuit-json";
18815
- import { z as z129 } from "zod";
18864
+ import { z as z130 } from "zod";
18816
18865
 
18817
18866
  // lib/common/fivePointAnchor.ts
18818
- import { z as z128 } from "zod";
18819
- var fivePointAnchor = z128.enum([
18867
+ import { z as z129 } from "zod";
18868
+ var fivePointAnchor = z129.enum([
18820
18869
  "center",
18821
18870
  "left",
18822
18871
  "right",
@@ -18825,39 +18874,39 @@ var fivePointAnchor = z128.enum([
18825
18874
  ]);
18826
18875
 
18827
18876
  // lib/components/schematic-text.ts
18828
- var schematicTextProps = z129.object({
18877
+ var schematicTextProps = z130.object({
18829
18878
  schX: distance37.optional(),
18830
18879
  schY: distance37.optional(),
18831
- text: z129.string(),
18832
- fontSize: z129.number().default(1),
18833
- anchor: z129.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18834
- color: z129.string().default("#000000"),
18880
+ text: z130.string(),
18881
+ fontSize: z130.number().default(1),
18882
+ anchor: z130.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18883
+ color: z130.string().default("#000000"),
18835
18884
  schRotation: rotation10.default(0)
18836
18885
  });
18837
18886
  expectTypesMatch(true);
18838
18887
 
18839
18888
  // lib/components/schematic-path.ts
18840
18889
  import { distance as distance38, point as point7 } from "circuit-json";
18841
- import { z as z130 } from "zod";
18842
- var schematicPathProps = z130.object({
18843
- points: z130.array(point7).optional(),
18844
- svgPath: z130.string().optional(),
18890
+ import { z as z131 } from "zod";
18891
+ var schematicPathProps = z131.object({
18892
+ points: z131.array(point7).optional(),
18893
+ svgPath: z131.string().optional(),
18845
18894
  strokeWidth: distance38.optional(),
18846
- strokeColor: z130.string().optional(),
18895
+ strokeColor: z131.string().optional(),
18847
18896
  dashLength: distance38.optional(),
18848
18897
  dashGap: distance38.optional(),
18849
- isFilled: z130.boolean().optional().default(false),
18850
- fillColor: z130.string().optional()
18898
+ isFilled: z131.boolean().optional().default(false),
18899
+ fillColor: z131.string().optional()
18851
18900
  });
18852
18901
  expectTypesMatch(true);
18853
18902
 
18854
18903
  // lib/components/schematic-table.ts
18855
18904
  import { distance as distance39 } from "circuit-json";
18856
- import { z as z131 } from "zod";
18857
- var schematicTableProps = z131.object({
18905
+ import { z as z132 } from "zod";
18906
+ var schematicTableProps = z132.object({
18858
18907
  schX: distance39.optional(),
18859
18908
  schY: distance39.optional(),
18860
- children: z131.any().optional(),
18909
+ children: z132.any().optional(),
18861
18910
  cellPadding: distance39.optional(),
18862
18911
  borderWidth: distance39.optional(),
18863
18912
  anchor: ninePointAnchor.optional(),
@@ -18867,34 +18916,34 @@ expectTypesMatch(true);
18867
18916
 
18868
18917
  // lib/components/schematic-row.ts
18869
18918
  import { distance as distance40 } from "circuit-json";
18870
- import { z as z132 } from "zod";
18871
- var schematicRowProps = z132.object({
18872
- children: z132.any().optional(),
18919
+ import { z as z133 } from "zod";
18920
+ var schematicRowProps = z133.object({
18921
+ children: z133.any().optional(),
18873
18922
  height: distance40.optional()
18874
18923
  });
18875
18924
  expectTypesMatch(true);
18876
18925
 
18877
18926
  // lib/components/schematic-cell.ts
18878
18927
  import { distance as distance41 } from "circuit-json";
18879
- import { z as z133 } from "zod";
18880
- var schematicCellProps = z133.object({
18881
- children: z133.string().optional(),
18882
- horizontalAlign: z133.enum(["left", "center", "right"]).optional(),
18883
- verticalAlign: z133.enum(["top", "middle", "bottom"]).optional(),
18928
+ import { z as z134 } from "zod";
18929
+ var schematicCellProps = z134.object({
18930
+ children: z134.string().optional(),
18931
+ horizontalAlign: z134.enum(["left", "center", "right"]).optional(),
18932
+ verticalAlign: z134.enum(["top", "middle", "bottom"]).optional(),
18884
18933
  fontSize: distance41.optional(),
18885
- rowSpan: z133.number().optional(),
18886
- colSpan: z133.number().optional(),
18934
+ rowSpan: z134.number().optional(),
18935
+ colSpan: z134.number().optional(),
18887
18936
  width: distance41.optional(),
18888
- text: z133.string().optional()
18937
+ text: z134.string().optional()
18889
18938
  });
18890
18939
  expectTypesMatch(true);
18891
18940
 
18892
18941
  // lib/components/schematic-section.ts
18893
18942
  import { distance as distance42 } from "circuit-json";
18894
- import { z as z134 } from "zod";
18895
- var schematicSectionProps = z134.object({
18896
- displayName: z134.string().optional(),
18897
- name: z134.string(),
18943
+ import { z as z135 } from "zod";
18944
+ var schematicSectionProps = z135.object({
18945
+ displayName: z135.string().optional(),
18946
+ name: z135.string(),
18898
18947
  sectionTitleFontSize: distance42.optional()
18899
18948
  });
18900
18949
  expectTypesMatch(
@@ -18902,38 +18951,38 @@ expectTypesMatch(
18902
18951
  );
18903
18952
 
18904
18953
  // lib/components/schematic-sheet.ts
18905
- import { z as z135 } from "zod";
18954
+ import { z as z136 } from "zod";
18906
18955
  import { distance as distance43 } from "circuit-json";
18907
- var schematicSheetProps = z135.object({
18908
- name: z135.string().optional(),
18909
- displayName: z135.string().optional(),
18910
- sheetIndex: z135.number().optional(),
18911
- sheetSize: z135.enum(["A4", "ANSI_B"]).default("A4"),
18912
- sheetWidth: distance43.pipe(z135.number().positive()).optional(),
18913
- sheetHeight: distance43.pipe(z135.number().positive()).optional(),
18914
- children: z135.any().optional()
18956
+ var schematicSheetProps = z136.object({
18957
+ name: z136.string().optional(),
18958
+ displayName: z136.string().optional(),
18959
+ sheetIndex: z136.number().optional(),
18960
+ sheetSize: z136.enum(["A4", "ANSI_B"]).default("A4"),
18961
+ sheetWidth: distance43.pipe(z136.number().positive()).optional(),
18962
+ sheetHeight: distance43.pipe(z136.number().positive()).optional(),
18963
+ children: z136.any().optional()
18915
18964
  });
18916
18965
  expectTypesMatch(true);
18917
18966
 
18918
18967
  // lib/components/schematic-graphic.ts
18919
- import { z as z136 } from "zod";
18968
+ import { z as z137 } from "zod";
18920
18969
  var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
18921
18970
  message: "imageUrl cannot be empty"
18922
18971
  });
18923
- var positiveDistance2 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
18972
+ var positiveDistance3 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
18924
18973
  message: `${fieldName} must be a positive finite distance`
18925
18974
  });
18926
- var schematicGraphicProps = z136.object({
18975
+ var schematicGraphicProps = z137.object({
18927
18976
  imageUrl: nonemptyUrl.optional(),
18928
- svgContent: z136.string().refine((value) => value.trim().length > 0, {
18977
+ svgContent: z137.string().refine((value) => value.trim().length > 0, {
18929
18978
  message: "svgContent cannot be empty"
18930
18979
  }).optional(),
18931
- width: positiveDistance2("width").optional(),
18932
- height: positiveDistance2("height").optional()
18980
+ width: positiveDistance3("width").optional(),
18981
+ height: positiveDistance3("height").optional()
18933
18982
  }).superRefine(({ imageUrl, svgContent }, ctx) => {
18934
18983
  if (imageUrl === void 0 && svgContent === void 0) {
18935
18984
  ctx.addIssue({
18936
- code: z136.ZodIssueCode.custom,
18985
+ code: z137.ZodIssueCode.custom,
18937
18986
  message: "At least one of imageUrl or svgContent is required"
18938
18987
  });
18939
18988
  }
@@ -18943,41 +18992,41 @@ expectTypesMatch(
18943
18992
  );
18944
18993
 
18945
18994
  // lib/components/copper-text.ts
18946
- import { layer_ref as layer_ref12, length as length8 } from "circuit-json";
18947
- import { z as z137 } from "zod";
18995
+ import { layer_ref as layer_ref13, length as length8 } from "circuit-json";
18996
+ import { z as z138 } from "zod";
18948
18997
  var copperTextProps = pcbLayoutProps.extend({
18949
- text: z137.string(),
18998
+ text: z138.string(),
18950
18999
  anchorAlignment: ninePointAnchor.default("center"),
18951
- font: z137.enum(["tscircuit2024"]).optional(),
19000
+ font: z138.enum(["tscircuit2024"]).optional(),
18952
19001
  fontSize: length8.optional(),
18953
- layers: z137.array(layer_ref12).optional(),
18954
- knockout: z137.boolean().optional(),
18955
- mirrored: z137.boolean().optional()
19002
+ layers: z138.array(layer_ref13).optional(),
19003
+ knockout: z138.boolean().optional(),
19004
+ mirrored: z138.boolean().optional()
18956
19005
  });
18957
19006
 
18958
19007
  // lib/components/silkscreen-text.ts
18959
- import { layer_ref as layer_ref13, length as length9 } from "circuit-json";
18960
- import { z as z138 } from "zod";
19008
+ import { layer_ref as layer_ref14, length as length9 } from "circuit-json";
19009
+ import { z as z139 } from "zod";
18961
19010
  var silkscreenTextProps = pcbLayoutProps.extend({
18962
- text: z138.string(),
19011
+ text: z139.string(),
18963
19012
  anchorAlignment: ninePointAnchor.default("center"),
18964
- font: z138.enum(["tscircuit2024"]).optional(),
19013
+ font: z139.enum(["tscircuit2024"]).optional(),
18965
19014
  fontSize: length9.optional(),
18966
19015
  /**
18967
19016
  * If true, text will knock out underlying silkscreen
18968
19017
  */
18969
- isKnockout: z138.boolean().optional(),
19018
+ isKnockout: z139.boolean().optional(),
18970
19019
  knockoutPadding: length9.optional(),
18971
19020
  knockoutPaddingLeft: length9.optional(),
18972
19021
  knockoutPaddingRight: length9.optional(),
18973
19022
  knockoutPaddingTop: length9.optional(),
18974
19023
  knockoutPaddingBottom: length9.optional(),
18975
- layers: z138.array(layer_ref13).optional()
19024
+ layers: z139.array(layer_ref14).optional()
18976
19025
  });
18977
19026
 
18978
19027
  // lib/components/silkscreen-path.ts
18979
19028
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18980
- import { z as z139 } from "zod";
19029
+ import { z as z140 } from "zod";
18981
19030
  var silkscreenPathProps = pcbLayoutProps.omit({
18982
19031
  pcbLeftEdgeX: true,
18983
19032
  pcbRightEdgeX: true,
@@ -18989,7 +19038,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18989
19038
  pcbOffsetY: true,
18990
19039
  pcbRotation: true
18991
19040
  }).extend({
18992
- route: z139.array(route_hint_point5),
19041
+ route: z140.array(route_hint_point5),
18993
19042
  strokeWidth: length10.optional()
18994
19043
  });
18995
19044
 
@@ -19011,10 +19060,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
19011
19060
 
19012
19061
  // lib/components/silkscreen-rect.ts
19013
19062
  import { distance as distance45 } from "circuit-json";
19014
- import { z as z140 } from "zod";
19063
+ import { z as z141 } from "zod";
19015
19064
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19016
- filled: z140.boolean().default(true).optional(),
19017
- stroke: z140.enum(["dashed", "solid", "none"]).optional(),
19065
+ filled: z141.boolean().default(true).optional(),
19066
+ stroke: z141.enum(["dashed", "solid", "none"]).optional(),
19018
19067
  strokeWidth: distance45.optional(),
19019
19068
  width: distance45,
19020
19069
  height: distance45,
@@ -19023,10 +19072,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19023
19072
 
19024
19073
  // lib/components/silkscreen-circle.ts
19025
19074
  import { distance as distance46 } from "circuit-json";
19026
- import { z as z141 } from "zod";
19075
+ import { z as z142 } from "zod";
19027
19076
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19028
- isFilled: z141.boolean().optional(),
19029
- isOutline: z141.boolean().optional(),
19077
+ isFilled: z142.boolean().optional(),
19078
+ isOutline: z142.boolean().optional(),
19030
19079
  strokeWidth: distance46.optional(),
19031
19080
  radius: distance46
19032
19081
  });
@@ -19043,70 +19092,70 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
19043
19092
  expectTypesMatch(true);
19044
19093
 
19045
19094
  // lib/components/trace-hint.ts
19046
- import { distance as distance47, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
19047
- import { z as z143 } from "zod";
19048
- var routeHintPointProps = z143.object({
19095
+ import { distance as distance47, layer_ref as layer_ref15, route_hint_point as route_hint_point6 } from "circuit-json";
19096
+ import { z as z144 } from "zod";
19097
+ var routeHintPointProps = z144.object({
19049
19098
  x: distance47,
19050
19099
  y: distance47,
19051
- via: z143.boolean().optional(),
19052
- toLayer: layer_ref14.optional()
19100
+ via: z144.boolean().optional(),
19101
+ toLayer: layer_ref15.optional()
19053
19102
  });
19054
- var traceHintProps = z143.object({
19055
- for: z143.string().optional().describe(
19103
+ var traceHintProps = z144.object({
19104
+ for: z144.string().optional().describe(
19056
19105
  "Selector for the port you're targeting, not required if you're inside a trace"
19057
19106
  ),
19058
- order: z143.number().optional(),
19107
+ order: z144.number().optional(),
19059
19108
  offset: route_hint_point6.or(routeHintPointProps).optional(),
19060
- offsets: z143.array(route_hint_point6).or(z143.array(routeHintPointProps)).optional(),
19061
- traceWidth: z143.number().optional()
19109
+ offsets: z144.array(route_hint_point6).or(z144.array(routeHintPointProps)).optional(),
19110
+ traceWidth: z144.number().optional()
19062
19111
  });
19063
19112
 
19064
19113
  // lib/components/port.ts
19065
19114
  import { distance as distance48 } from "circuit-json";
19066
- import { z as z144 } from "zod";
19115
+ import { z as z145 } from "zod";
19067
19116
  var portProps = commonLayoutProps.extend({
19068
- name: z144.string().optional(),
19069
- pinNumber: z144.number().optional(),
19070
- schStemLength: z144.number().optional(),
19071
- schPinLabelFontSize: z144.enum(["default", "sm"]).or(
19117
+ name: z145.string().optional(),
19118
+ pinNumber: z145.number().optional(),
19119
+ schStemLength: z145.number().optional(),
19120
+ schPinLabelFontSize: z145.enum(["default", "sm"]).or(
19072
19121
  distance48.refine((value) => Number.isFinite(value) && value > 0, {
19073
19122
  message: "Schematic pin-label font size must be positive and finite"
19074
19123
  })
19075
19124
  ).optional(),
19076
- aliases: z144.array(z144.string()).optional(),
19077
- layer: z144.string().optional(),
19078
- layers: z144.array(z144.string()).optional(),
19079
- schX: z144.number().optional(),
19080
- schY: z144.number().optional(),
19125
+ aliases: z145.array(z145.string()).optional(),
19126
+ layer: z145.string().optional(),
19127
+ layers: z145.array(z145.string()).optional(),
19128
+ schX: z145.number().optional(),
19129
+ schY: z145.number().optional(),
19081
19130
  direction: direction.optional(),
19082
- connectsTo: z144.string().or(z144.array(z144.string())).optional(),
19131
+ connectsTo: z145.string().or(z145.array(z145.string())).optional(),
19083
19132
  kicadPinMetadata: kicadPinMetadata.optional(),
19084
- hasInversionCircle: z144.boolean().optional()
19133
+ hasInversionCircle: z145.boolean().optional()
19085
19134
  });
19086
19135
 
19087
19136
  // lib/components/pcb-note-text.ts
19088
19137
  import { length as length11 } from "circuit-json";
19089
- import { z as z145 } from "zod";
19138
+ import { z as z146 } from "zod";
19090
19139
  var pcbNoteTextProps = pcbLayoutProps.extend({
19091
- text: z145.string(),
19092
- anchorAlignment: z145.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19093
- font: z145.enum(["tscircuit2024"]).optional(),
19140
+ text: z146.string(),
19141
+ anchorAlignment: z146.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19142
+ font: z146.enum(["tscircuit2024"]).optional(),
19094
19143
  fontSize: length11.optional(),
19095
- color: z145.string().optional()
19144
+ color: z146.string().optional()
19096
19145
  });
19097
19146
  expectTypesMatch(true);
19098
19147
 
19099
19148
  // lib/components/pcb-note-rect.ts
19100
19149
  import { distance as distance49 } from "circuit-json";
19101
- import { z as z146 } from "zod";
19150
+ import { z as z147 } from "zod";
19102
19151
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19103
19152
  width: distance49,
19104
19153
  height: distance49,
19105
19154
  strokeWidth: distance49.optional(),
19106
- isFilled: z146.boolean().optional(),
19107
- hasStroke: z146.boolean().optional(),
19108
- isStrokeDashed: z146.boolean().optional(),
19109
- color: z146.string().optional(),
19155
+ isFilled: z147.boolean().optional(),
19156
+ hasStroke: z147.boolean().optional(),
19157
+ isStrokeDashed: z147.boolean().optional(),
19158
+ color: z147.string().optional(),
19110
19159
  cornerRadius: distance49.optional()
19111
19160
  });
19112
19161
  expectTypesMatch(true);
@@ -19116,7 +19165,7 @@ import {
19116
19165
  length as length12,
19117
19166
  route_hint_point as route_hint_point7
19118
19167
  } from "circuit-json";
19119
- import { z as z147 } from "zod";
19168
+ import { z as z148 } from "zod";
19120
19169
  var pcbNotePathProps = pcbLayoutProps.omit({
19121
19170
  pcbLeftEdgeX: true,
19122
19171
  pcbRightEdgeX: true,
@@ -19128,15 +19177,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
19128
19177
  pcbOffsetY: true,
19129
19178
  pcbRotation: true
19130
19179
  }).extend({
19131
- route: z147.array(route_hint_point7),
19180
+ route: z148.array(route_hint_point7),
19132
19181
  strokeWidth: length12.optional(),
19133
- color: z147.string().optional()
19182
+ color: z148.string().optional()
19134
19183
  });
19135
19184
  expectTypesMatch(true);
19136
19185
 
19137
19186
  // lib/components/pcb-note-line.ts
19138
19187
  import { distance as distance50 } from "circuit-json";
19139
- import { z as z148 } from "zod";
19188
+ import { z as z149 } from "zod";
19140
19189
  var pcbNoteLineProps = pcbLayoutProps.omit({
19141
19190
  pcbLeftEdgeX: true,
19142
19191
  pcbRightEdgeX: true,
@@ -19153,15 +19202,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
19153
19202
  x2: distance50,
19154
19203
  y2: distance50,
19155
19204
  strokeWidth: distance50.optional(),
19156
- color: z148.string().optional(),
19157
- isDashed: z148.boolean().optional()
19205
+ color: z149.string().optional(),
19206
+ isDashed: z149.boolean().optional()
19158
19207
  });
19159
19208
  expectTypesMatch(true);
19160
19209
 
19161
19210
  // lib/components/pcb-note-dimension.ts
19162
19211
  import { distance as distance51, length as length13 } from "circuit-json";
19163
- import { z as z149 } from "zod";
19164
- var dimensionTarget2 = z149.union([z149.string(), point]);
19212
+ import { z as z150 } from "zod";
19213
+ var dimensionTarget2 = z150.union([z150.string(), point]);
19165
19214
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
19166
19215
  pcbLeftEdgeX: true,
19167
19216
  pcbRightEdgeX: true,
@@ -19175,108 +19224,109 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
19175
19224
  }).extend({
19176
19225
  from: dimensionTarget2,
19177
19226
  to: dimensionTarget2,
19178
- text: z149.string().optional(),
19227
+ text: z150.string().optional(),
19179
19228
  offset: distance51.optional(),
19180
- font: z149.enum(["tscircuit2024"]).optional(),
19229
+ font: z150.enum(["tscircuit2024"]).optional(),
19181
19230
  fontSize: length13.optional(),
19182
- color: z149.string().optional(),
19231
+ color: z150.string().optional(),
19183
19232
  arrowSize: distance51.optional(),
19184
- units: z149.enum(["in", "mm"]).optional(),
19185
- outerEdgeToEdge: z149.literal(true).optional(),
19186
- centerToCenter: z149.literal(true).optional(),
19187
- innerEdgeToEdge: z149.literal(true).optional()
19233
+ units: z150.enum(["in", "mm"]).optional(),
19234
+ outerEdgeToEdge: z150.literal(true).optional(),
19235
+ centerToCenter: z150.literal(true).optional(),
19236
+ innerEdgeToEdge: z150.literal(true).optional()
19188
19237
  });
19189
19238
  expectTypesMatch(
19190
19239
  true
19191
19240
  );
19192
19241
 
19193
19242
  // lib/platformConfig.ts
19194
- import { z as z150 } from "zod";
19195
- var unvalidatedCircuitJson = z150.array(z150.any()).describe("Circuit JSON");
19196
- var footprintLibraryResult = z150.object({
19197
- footprintCircuitJson: z150.array(z150.any()),
19243
+ import { z as z151 } from "zod";
19244
+ var unvalidatedCircuitJson = z151.array(z151.any()).describe("Circuit JSON");
19245
+ var footprintLibraryResult = z151.object({
19246
+ footprintCircuitJson: z151.array(z151.any()),
19198
19247
  cadModel: cadModelProp.optional()
19199
19248
  });
19200
- var pathToCircuitJsonFn = z150.function().args(z150.string()).returns(z150.promise(footprintLibraryResult)).or(
19201
- z150.function().args(
19202
- z150.string(),
19203
- z150.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
19204
- ).returns(z150.promise(footprintLibraryResult))
19249
+ var pathToCircuitJsonFn = z151.function().args(z151.string()).returns(z151.promise(footprintLibraryResult)).or(
19250
+ z151.function().args(
19251
+ z151.string(),
19252
+ z151.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
19253
+ ).returns(z151.promise(footprintLibraryResult))
19205
19254
  ).describe("A function that takes a path and returns Circuit JSON");
19206
- var footprintFileParserEntry = z150.object({
19207
- loadFromUrl: z150.function().args(z150.string()).returns(z150.promise(footprintLibraryResult)).describe(
19255
+ var footprintFileParserEntry = z151.object({
19256
+ loadFromUrl: z151.function().args(z151.string()).returns(z151.promise(footprintLibraryResult)).describe(
19208
19257
  "A function that takes a footprint file URL and returns Circuit JSON"
19209
19258
  )
19210
19259
  });
19211
- var spiceEngineSimulationResult = z150.object({
19212
- engineVersionString: z150.string().optional(),
19260
+ var spiceEngineSimulationResult = z151.object({
19261
+ engineVersionString: z151.string().optional(),
19213
19262
  simulationResultCircuitJson: unvalidatedCircuitJson
19214
19263
  });
19215
- var spiceEngineZod = z150.object({
19216
- simulate: z150.function().args(z150.string()).returns(z150.promise(spiceEngineSimulationResult)).describe(
19264
+ var spiceEngineZod = z151.object({
19265
+ simulate: z151.function().args(z151.string()).returns(z151.promise(spiceEngineSimulationResult)).describe(
19217
19266
  "A function that takes a SPICE string and returns a simulation result"
19218
19267
  )
19219
19268
  });
19220
- var defaultSpiceEngine = z150.custom(
19269
+ var defaultSpiceEngine = z151.custom(
19221
19270
  (value) => typeof value === "string"
19222
19271
  );
19223
- var autorouterInstance = z150.object({
19224
- run: z150.function().args().returns(z150.promise(z150.unknown())).describe("Run the autorouter"),
19225
- getOutputSimpleRouteJson: z150.function().args().returns(z150.promise(z150.any())).describe("Get the resulting SimpleRouteJson")
19272
+ var autorouterInstance = z151.object({
19273
+ run: z151.function().args().returns(z151.promise(z151.unknown())).describe("Run the autorouter"),
19274
+ getOutputSimpleRouteJson: z151.function().args().returns(z151.promise(z151.any())).describe("Get the resulting SimpleRouteJson")
19226
19275
  });
19227
- var autorouterDefinition = z150.object({
19228
- createAutorouter: z150.function().args(z150.any(), z150.any().optional()).returns(z150.union([autorouterInstance, z150.promise(autorouterInstance)])).describe("Create an autorouter instance")
19276
+ var autorouterDefinition = z151.object({
19277
+ createAutorouter: z151.function().args(z151.any(), z151.any().optional()).returns(z151.union([autorouterInstance, z151.promise(autorouterInstance)])).describe("Create an autorouter instance")
19229
19278
  });
19230
- var platformFetch = z150.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
19231
- var localCacheEngine = z150.custom(
19279
+ var platformFetch = z151.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
19280
+ var localCacheEngine = z151.custom(
19232
19281
  (value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
19233
19282
  );
19234
- var platformConfig = z150.object({
19283
+ var platformConfig = z151.object({
19235
19284
  partsEngine: partsEngine.optional(),
19236
19285
  autorouter: autorouterProp.optional(),
19237
- autorouterMap: z150.record(z150.string(), autorouterDefinition).optional(),
19238
- allowLegacyAutorouters: z150.boolean().optional(),
19286
+ autorouterMap: z151.record(z151.string(), autorouterDefinition).optional(),
19287
+ allowLegacyAutorouters: z151.boolean().optional(),
19239
19288
  registryApiUrl: url.optional(),
19240
19289
  cloudAutorouterUrl: url.optional(),
19241
- projectName: z150.string().optional(),
19290
+ projectName: z151.string().optional(),
19242
19291
  projectBaseUrl: url.optional(),
19243
- version: z150.string().optional(),
19292
+ version: z151.string().optional(),
19244
19293
  url: url.optional(),
19245
- printBoardInformationToSilkscreen: z150.boolean().optional(),
19246
- includeBoardFiles: z150.array(z150.string()).describe(
19294
+ printBoardInformationToSilkscreen: z151.boolean().optional(),
19295
+ includeBoardFiles: z151.array(z151.string()).describe(
19247
19296
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
19248
19297
  ).optional(),
19249
- snapshotsDir: z150.string().describe(
19298
+ snapshotsDir: z151.string().describe(
19250
19299
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
19251
19300
  ).optional(),
19252
19301
  defaultSpiceEngine: defaultSpiceEngine.optional(),
19253
- unitPreference: z150.enum(["mm", "in", "mil"]).optional(),
19302
+ unitPreference: z151.enum(["mm", "in", "mil"]).optional(),
19254
19303
  localCacheEngine: localCacheEngine.optional(),
19255
- enablePartOrientationAnalysis: z150.boolean().optional(),
19256
- pcbPackSolverTimeoutMs: z150.number().finite().positive().optional(),
19257
- pcbDisabled: z150.boolean().optional(),
19258
- routingDisabled: z150.boolean().optional(),
19259
- schematicDisabled: z150.boolean().optional(),
19260
- partsEngineDisabled: z150.boolean().optional(),
19261
- analogSimulationDisabled: z150.boolean().optional(),
19262
- drcChecksDisabled: z150.boolean().optional(),
19263
- netlistDrcChecksDisabled: z150.boolean().optional(),
19264
- routingDrcChecksDisabled: z150.boolean().optional(),
19265
- placementDrcChecksDisabled: z150.boolean().optional(),
19266
- pinSpecificationDrcChecksDisabled: z150.boolean().optional(),
19267
- spiceEngineMap: z150.record(z150.string(), spiceEngineZod).optional(),
19268
- footprintLibraryMap: z150.record(
19269
- z150.string(),
19270
- z150.union([
19304
+ useCloudAutorouter: z151.boolean().optional(),
19305
+ enablePartOrientationAnalysis: z151.boolean().optional(),
19306
+ pcbPackSolverTimeoutMs: z151.number().finite().positive().optional(),
19307
+ pcbDisabled: z151.boolean().optional(),
19308
+ routingDisabled: z151.boolean().optional(),
19309
+ schematicDisabled: z151.boolean().optional(),
19310
+ partsEngineDisabled: z151.boolean().optional(),
19311
+ analogSimulationDisabled: z151.boolean().optional(),
19312
+ drcChecksDisabled: z151.boolean().optional(),
19313
+ netlistDrcChecksDisabled: z151.boolean().optional(),
19314
+ routingDrcChecksDisabled: z151.boolean().optional(),
19315
+ placementDrcChecksDisabled: z151.boolean().optional(),
19316
+ pinSpecificationDrcChecksDisabled: z151.boolean().optional(),
19317
+ spiceEngineMap: z151.record(z151.string(), spiceEngineZod).optional(),
19318
+ footprintLibraryMap: z151.record(
19319
+ z151.string(),
19320
+ z151.union([
19271
19321
  pathToCircuitJsonFn,
19272
- z150.record(
19273
- z150.string(),
19274
- z150.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
19322
+ z151.record(
19323
+ z151.string(),
19324
+ z151.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
19275
19325
  )
19276
19326
  ])
19277
19327
  ).optional(),
19278
- footprintFileParserMap: z150.record(z150.string(), footprintFileParserEntry).optional(),
19279
- resolveProjectStaticFileImportUrl: z150.function().args(z150.string()).returns(z150.promise(z150.string())).describe(
19328
+ footprintFileParserMap: z151.record(z151.string(), footprintFileParserEntry).optional(),
19329
+ resolveProjectStaticFileImportUrl: z151.function().args(z151.string()).returns(z151.promise(z151.string())).describe(
19280
19330
  "A function that returns a string URL for static files for the project"
19281
19331
  ).optional(),
19282
19332
  platformFetch: platformFetch.optional()
@@ -19411,6 +19461,7 @@ export {
19411
19461
  fabricationNoteTextProps,
19412
19462
  fanoutBoundaryPadding,
19413
19463
  fanoutProps,
19464
+ fanoutTracePath,
19414
19465
  fiducialProps,
19415
19466
  footprintInsertionDirection,
19416
19467
  footprintProp,