@tscircuit/props 0.0.676 → 0.0.677

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