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