@tscircuit/props 0.0.665 → 0.0.666

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