@tscircuit/props 0.0.697 → 0.0.698

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
@@ -18669,6 +18669,81 @@ var analogAcSweepSimulationProps = z103.object({
18669
18669
  });
18670
18670
  expectTypesMatch(true);
18671
18671
 
18672
+ // lib/components/pcb-return-current-excitation.ts
18673
+ import { layer_ref as layer_ref9 } from "circuit-json";
18674
+ import { z as z104 } from "zod";
18675
+ var selector = z104.string().trim().min(1, "Provide a nonempty selector");
18676
+ var quantity2 = "[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?";
18677
+ var prefixScale = {
18678
+ "": 1,
18679
+ y: 1e-24,
18680
+ z: 1e-21,
18681
+ a: 1e-18,
18682
+ f: 1e-15,
18683
+ p: 1e-12,
18684
+ n: 1e-9,
18685
+ u: 1e-6,
18686
+ \u00B5: 1e-6,
18687
+ \u03BC: 1e-6,
18688
+ m: 1e-3,
18689
+ k: 1e3,
18690
+ M: 1e6,
18691
+ G: 1e9,
18692
+ T: 1e12,
18693
+ P: 1e15,
18694
+ E: 1e18,
18695
+ Z: 1e21,
18696
+ Y: 1e24
18697
+ };
18698
+ function positiveQuantity(unit, label, example) {
18699
+ const pattern = new RegExp(
18700
+ `^(${quantity2})\\s*(?:([yzafpnumkMGTPEZY\xB5\u03BC]?)(?:${unit}))?$`
18701
+ );
18702
+ return z104.union([
18703
+ z104.number(),
18704
+ z104.string().trim().regex(pattern, `Use ${label} or a unit string, e.g. ${example}`)
18705
+ ]).transform((value) => {
18706
+ if (typeof value === "number") return value;
18707
+ const match = pattern.exec(value);
18708
+ return Number(match[1]) * prefixScale[match[2] ?? ""];
18709
+ }).pipe(z104.number().finite().positive(`${label} must be greater than zero`));
18710
+ }
18711
+ var positiveCurrent = positiveQuantity("A", "peak amperes", "5mA");
18712
+ var positiveResistance = positiveQuantity(
18713
+ "ohms?|Ohms?|\u03A9",
18714
+ "real ohms",
18715
+ "100ohm"
18716
+ );
18717
+ var pcbReturnCurrentExcitationProps = z104.object({
18718
+ name: z104.string().trim().min(1).optional(),
18719
+ source: selector,
18720
+ load: selector,
18721
+ ground: selector,
18722
+ current: positiveCurrent,
18723
+ returnSource: selector,
18724
+ returnSink: selector,
18725
+ sourceImpedance: positiveResistance,
18726
+ loadImpedance: positiveResistance,
18727
+ trace: selector.optional(),
18728
+ returnSourceLayer: layer_ref9.optional(),
18729
+ returnSinkLayer: layer_ref9.optional()
18730
+ }).strict();
18731
+ expectTypesMatch(true);
18732
+
18733
+ // lib/components/pcb-return-current-simulation.ts
18734
+ import { z as z105 } from "zod";
18735
+ var pcbReturnCurrentSimulationProps = z105.object({
18736
+ name: z105.string().trim().min(1).optional(),
18737
+ children: z105.custom().optional()
18738
+ }).strict();
18739
+ expectTypesMatch(true);
18740
+
18741
+ // lib/simulation/index.ts
18742
+ var simulationProps = {
18743
+ pcbreturncurrentsimulation: pcbReturnCurrentSimulationProps,
18744
+ pcbreturncurrentexcitation: pcbReturnCurrentExcitationProps
18745
+ };
18746
+
18672
18747
  // lib/components/analogsweepparameter.ts
18673
18748
  import {
18674
18749
  capacitance as capacitance4,
@@ -18677,43 +18752,43 @@ import {
18677
18752
  resistance as resistance4,
18678
18753
  voltage as voltage4
18679
18754
  } from "circuit-json";
18680
- import { z as z104 } from "zod";
18681
- var resistanceSweepQuantity = resistance4.pipe(z104.number());
18682
- var capacitanceSweepQuantity = capacitance4.pipe(z104.number());
18683
- var inductanceSweepQuantity = inductance.pipe(z104.number());
18684
- var voltageSweepQuantity = voltage4.pipe(z104.number());
18685
- var currentSweepQuantity = current2.pipe(z104.number());
18755
+ import { z as z106 } from "zod";
18756
+ var resistanceSweepQuantity = resistance4.pipe(z106.number());
18757
+ var capacitanceSweepQuantity = capacitance4.pipe(z106.number());
18758
+ var inductanceSweepQuantity = inductance.pipe(z106.number());
18759
+ var voltageSweepQuantity = voltage4.pipe(z106.number());
18760
+ var currentSweepQuantity = current2.pipe(z106.number());
18686
18761
  var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
18687
- name: z104.string().optional(),
18688
- values: z104.array(sweepQuantity).min(1).optional(),
18762
+ name: z106.string().optional(),
18763
+ values: z106.array(sweepQuantity).min(1).optional(),
18689
18764
  start: sweepQuantity.optional(),
18690
18765
  stop: sweepQuantity.optional(),
18691
18766
  step: sweepQuantity.optional()
18692
18767
  });
18693
- var analogResistanceSweepParameterProps = z104.object({
18768
+ var analogResistanceSweepParameterProps = z106.object({
18694
18769
  ...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
18695
- parameterType: z104.literal("resistance"),
18696
- resistorRef: z104.string().min(1)
18770
+ parameterType: z106.literal("resistance"),
18771
+ resistorRef: z106.string().min(1)
18697
18772
  }).strict();
18698
- var analogCapacitanceSweepParameterProps = z104.object({
18773
+ var analogCapacitanceSweepParameterProps = z106.object({
18699
18774
  ...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
18700
- parameterType: z104.literal("capacitance"),
18701
- capacitorRef: z104.string().min(1)
18775
+ parameterType: z106.literal("capacitance"),
18776
+ capacitorRef: z106.string().min(1)
18702
18777
  }).strict();
18703
- var analogInductanceSweepParameterProps = z104.object({
18778
+ var analogInductanceSweepParameterProps = z106.object({
18704
18779
  ...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
18705
- parameterType: z104.literal("inductance"),
18706
- inductorRef: z104.string().min(1)
18780
+ parameterType: z106.literal("inductance"),
18781
+ inductorRef: z106.string().min(1)
18707
18782
  }).strict();
18708
- var analogVoltageSweepParameterProps = z104.object({
18783
+ var analogVoltageSweepParameterProps = z106.object({
18709
18784
  ...createAnalogSweepCoordinateProps(voltageSweepQuantity),
18710
- parameterType: z104.literal("voltage"),
18711
- net: z104.string().min(1)
18785
+ parameterType: z106.literal("voltage"),
18786
+ net: z106.string().min(1)
18712
18787
  }).strict();
18713
- var analogCurrentSweepParameterProps = z104.object({
18788
+ var analogCurrentSweepParameterProps = z106.object({
18714
18789
  ...createAnalogSweepCoordinateProps(currentSweepQuantity),
18715
- parameterType: z104.literal("current"),
18716
- currentSourceRef: z104.string().min(1)
18790
+ parameterType: z106.literal("current"),
18791
+ currentSourceRef: z106.string().min(1)
18717
18792
  }).strict();
18718
18793
  var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
18719
18794
  const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
@@ -18725,34 +18800,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
18725
18800
  const hasRangeCoordinates = rangeCoordinateCount > 0;
18726
18801
  if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
18727
18802
  context.addIssue({
18728
- code: z104.ZodIssueCode.custom,
18803
+ code: z106.ZodIssueCode.custom,
18729
18804
  message: "Provide either values or start/stop/step"
18730
18805
  });
18731
18806
  return;
18732
18807
  }
18733
18808
  if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
18734
18809
  context.addIssue({
18735
- code: z104.ZodIssueCode.custom,
18810
+ code: z106.ZodIssueCode.custom,
18736
18811
  message: "start, stop, and step must be provided together"
18737
18812
  });
18738
18813
  return;
18739
18814
  }
18740
18815
  if (sweepCoordinates.step === 0) {
18741
18816
  context.addIssue({
18742
- code: z104.ZodIssueCode.custom,
18817
+ code: z106.ZodIssueCode.custom,
18743
18818
  path: ["step"],
18744
18819
  message: "step must be nonzero"
18745
18820
  });
18746
18821
  }
18747
18822
  if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
18748
18823
  context.addIssue({
18749
- code: z104.ZodIssueCode.custom,
18824
+ code: z106.ZodIssueCode.custom,
18750
18825
  path: ["step"],
18751
18826
  message: "step must move from start toward stop"
18752
18827
  });
18753
18828
  }
18754
18829
  };
18755
- var analogSweepParameterProps = z104.discriminatedUnion("parameterType", [
18830
+ var analogSweepParameterProps = z106.discriminatedUnion("parameterType", [
18756
18831
  analogResistanceSweepParameterProps,
18757
18832
  analogCapacitanceSweepParameterProps,
18758
18833
  analogInductanceSweepParameterProps,
@@ -18767,26 +18842,26 @@ expectTypesMatch(true);
18767
18842
  expectTypesMatch(true);
18768
18843
 
18769
18844
  // lib/components/autoroutingphase.ts
18770
- import { z as z105 } from "zod";
18771
- var autoroutingPhaseProps = z105.object({
18772
- key: z105.any().optional(),
18773
- name: z105.string().optional(),
18845
+ import { z as z107 } from "zod";
18846
+ var autoroutingPhaseProps = z107.object({
18847
+ key: z107.any().optional(),
18848
+ name: z107.string().optional(),
18774
18849
  autorouter: autorouterProp.optional(),
18775
18850
  algorithmFn: autorouterConfig.shape.algorithmFn,
18776
18851
  preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
18777
- phaseIndex: z105.number().optional(),
18778
- pcbTracePaths: z105.array(fanoutTracePath).optional(),
18852
+ phaseIndex: z107.number().optional(),
18853
+ pcbTracePaths: z107.array(fanoutTracePath).optional(),
18779
18854
  ...routingTolerances.shape,
18780
- region: z105.object({
18781
- shape: z105.literal("rect").optional(),
18782
- minX: z105.number(),
18783
- maxX: z105.number(),
18784
- minY: z105.number(),
18785
- maxY: z105.number()
18855
+ region: z107.object({
18856
+ shape: z107.literal("rect").optional(),
18857
+ minX: z107.number(),
18858
+ maxX: z107.number(),
18859
+ minY: z107.number(),
18860
+ maxY: z107.number()
18786
18861
  }).optional(),
18787
- connection: z105.string().optional(),
18788
- connections: z105.array(z105.string()).optional(),
18789
- reroute: z105.boolean().optional(),
18862
+ connection: z107.string().optional(),
18863
+ connections: z107.array(z107.string()).optional(),
18864
+ reroute: z107.boolean().optional(),
18790
18865
  ...fanoutProps.shape
18791
18866
  }).superRefine((value, ctx) => {
18792
18867
  const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
@@ -18797,7 +18872,7 @@ var autoroutingPhaseProps = z105.object({
18797
18872
  }
18798
18873
  if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
18799
18874
  ctx.addIssue({
18800
- code: z105.ZodIssueCode.custom,
18875
+ code: z107.ZodIssueCode.custom,
18801
18876
  message: "region, connection, or connections is required when reroute is provided",
18802
18877
  path: ["region"]
18803
18878
  });
@@ -18806,15 +18881,15 @@ var autoroutingPhaseProps = z105.object({
18806
18881
  expectTypesMatch(true);
18807
18882
 
18808
18883
  // lib/components/spicemodel.ts
18809
- import { z as z106 } from "zod";
18810
- var spicemodelProps = z106.object({
18811
- source: z106.string(),
18812
- spicePinMapping: z106.record(z106.string(), z106.string()).optional()
18884
+ import { z as z108 } from "zod";
18885
+ var spicemodelProps = z108.object({
18886
+ source: z108.string(),
18887
+ spicePinMapping: z108.record(z108.string(), z108.string()).optional()
18813
18888
  });
18814
18889
  expectTypesMatch(true);
18815
18890
 
18816
18891
  // lib/components/transistor.ts
18817
- import { z as z107 } from "zod";
18892
+ import { z as z109 } from "zod";
18818
18893
  var transistorPinsLabels = [
18819
18894
  "pin1",
18820
18895
  "pin2",
@@ -18827,7 +18902,7 @@ var transistorPinsLabels = [
18827
18902
  "drain"
18828
18903
  ];
18829
18904
  var transistorProps = commonComponentProps.extend({
18830
- type: z107.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18905
+ type: z109.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
18831
18906
  connections: createConnectionsProp(transistorPinsLabels).optional()
18832
18907
  });
18833
18908
  var transistorPins = [
@@ -18841,7 +18916,7 @@ var transistorPins = [
18841
18916
  expectTypesMatch(true);
18842
18917
 
18843
18918
  // lib/components/mosfet.ts
18844
- import { z as z108 } from "zod";
18919
+ import { z as z110 } from "zod";
18845
18920
  var mosfetPins = [
18846
18921
  "pin1",
18847
18922
  "drain",
@@ -18851,11 +18926,11 @@ var mosfetPins = [
18851
18926
  "gate"
18852
18927
  ];
18853
18928
  var mosfetProps = commonComponentProps.extend({
18854
- channelType: z108.enum(["n", "p"]),
18855
- mosfetMode: z108.enum(["enhancement", "depletion"]),
18856
- symbolDrainSide: z108.enum(["left", "right", "top", "bottom"]).optional(),
18857
- symbolSourceSide: z108.enum(["left", "right", "top", "bottom"]).optional(),
18858
- symbolGateSide: z108.enum(["left", "right", "top", "bottom"]).optional(),
18929
+ channelType: z110.enum(["n", "p"]),
18930
+ mosfetMode: z110.enum(["enhancement", "depletion"]),
18931
+ symbolDrainSide: z110.enum(["left", "right", "top", "bottom"]).optional(),
18932
+ symbolSourceSide: z110.enum(["left", "right", "top", "bottom"]).optional(),
18933
+ symbolGateSide: z110.enum(["left", "right", "top", "bottom"]).optional(),
18859
18934
  connections: createConnectionsProp(mosfetPins).optional()
18860
18935
  });
18861
18936
  expectTypesMatch(true);
@@ -18877,29 +18952,29 @@ expectTypesMatch(true);
18877
18952
 
18878
18953
  // lib/components/inductor.ts
18879
18954
  import { inductance as inductance2 } from "circuit-json";
18880
- import { z as z110 } from "zod";
18955
+ import { z as z112 } from "zod";
18881
18956
  var inductorPins = lrPins;
18882
18957
  var inductorProps = commonComponentProps.extend({
18883
18958
  inductance: inductance2,
18884
- maxCurrentRating: z110.union([z110.string(), z110.number()]).optional(),
18959
+ maxCurrentRating: z112.union([z112.string(), z112.number()]).optional(),
18885
18960
  schOrientation: schematicOrientation.optional(),
18886
18961
  connections: createConnectionsProp(inductorPins).optional()
18887
18962
  });
18888
18963
  expectTypesMatch(true);
18889
18964
 
18890
18965
  // lib/components/internal-circuit.ts
18891
- import { z as z111 } from "zod";
18892
- var internalCircuitProps = z111.object({
18893
- children: z111.custom().optional()
18966
+ import { z as z113 } from "zod";
18967
+ var internalCircuitProps = z113.object({
18968
+ children: z113.custom().optional()
18894
18969
  });
18895
18970
  expectTypesMatch(
18896
18971
  true
18897
18972
  );
18898
18973
 
18899
18974
  // lib/components/diode.ts
18900
- import { z as z112 } from "zod";
18975
+ import { z as z114 } from "zod";
18901
18976
  var diodePins = lrPolarPins;
18902
- var diodeConnectionKeys = z112.enum([
18977
+ var diodeConnectionKeys = z114.enum([
18903
18978
  "anode",
18904
18979
  "cathode",
18905
18980
  "pin1",
@@ -18907,13 +18982,13 @@ var diodeConnectionKeys = z112.enum([
18907
18982
  "pos",
18908
18983
  "neg"
18909
18984
  ]);
18910
- var connectionTarget3 = z112.string().or(z112.array(z112.string()).readonly()).or(z112.array(z112.string()));
18911
- var connectionsProp2 = z112.record(diodeConnectionKeys, connectionTarget3);
18912
- var diodePinLabelsProp = z112.record(
18913
- z112.enum(diodePins),
18914
- schematicPinLabel.or(z112.array(schematicPinLabel).readonly()).or(z112.array(schematicPinLabel))
18985
+ var connectionTarget3 = z114.string().or(z114.array(z114.string()).readonly()).or(z114.array(z114.string()));
18986
+ var connectionsProp2 = z114.record(diodeConnectionKeys, connectionTarget3);
18987
+ var diodePinLabelsProp = z114.record(
18988
+ z114.enum(diodePins),
18989
+ schematicPinLabel.or(z114.array(schematicPinLabel).readonly()).or(z114.array(schematicPinLabel))
18915
18990
  );
18916
- var diodeVariant = z112.enum([
18991
+ var diodeVariant = z114.enum([
18917
18992
  "standard",
18918
18993
  "schottky",
18919
18994
  "zener",
@@ -18924,12 +18999,12 @@ var diodeVariant = z112.enum([
18924
18999
  var diodeProps = commonComponentProps.extend({
18925
19000
  connections: connectionsProp2.optional(),
18926
19001
  variant: diodeVariant.optional().default("standard"),
18927
- standard: z112.boolean().optional(),
18928
- schottky: z112.boolean().optional(),
18929
- zener: z112.boolean().optional(),
18930
- avalanche: z112.boolean().optional(),
18931
- photo: z112.boolean().optional(),
18932
- tvs: z112.boolean().optional(),
19002
+ standard: z114.boolean().optional(),
19003
+ schottky: z114.boolean().optional(),
19004
+ zener: z114.boolean().optional(),
19005
+ avalanche: z114.boolean().optional(),
19006
+ photo: z114.boolean().optional(),
19007
+ tvs: z114.boolean().optional(),
18933
19008
  schOrientation: schematicOrientation.optional(),
18934
19009
  schSize: schematicSymbolSize.optional(),
18935
19010
  pinLabels: diodePinLabelsProp.optional()
@@ -18944,11 +19019,11 @@ var diodeProps = commonComponentProps.extend({
18944
19019
  ].filter(Boolean).length;
18945
19020
  if (enabledFlags > 1) {
18946
19021
  ctx.addIssue({
18947
- code: z112.ZodIssueCode.custom,
19022
+ code: z114.ZodIssueCode.custom,
18948
19023
  message: "Exactly one diode variant must be enabled",
18949
19024
  path: []
18950
19025
  });
18951
- return z112.INVALID;
19026
+ return z114.INVALID;
18952
19027
  }
18953
19028
  }).transform((data) => {
18954
19029
  const result = {
@@ -18994,18 +19069,18 @@ var diodeProps = commonComponentProps.extend({
18994
19069
  expectTypesMatch(true);
18995
19070
 
18996
19071
  // lib/components/led.ts
18997
- import { z as z113 } from "zod";
18998
- var legacyNumericLedPinLabelsProp = z113.record(
18999
- z113.enum(["1", "2"]),
19000
- schematicPinLabel.or(z113.array(schematicPinLabel).readonly()).or(z113.array(schematicPinLabel))
19072
+ import { z as z115 } from "zod";
19073
+ var legacyNumericLedPinLabelsProp = z115.record(
19074
+ z115.enum(["1", "2"]),
19075
+ schematicPinLabel.or(z115.array(schematicPinLabel).readonly()).or(z115.array(schematicPinLabel))
19001
19076
  ).transform((pinLabels) => ({
19002
19077
  ...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
19003
19078
  ...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
19004
19079
  }));
19005
19080
  var ledProps = commonComponentProps.extend({
19006
- color: z113.string().optional(),
19007
- wavelength: z113.string().optional(),
19008
- schDisplayValue: z113.string().optional(),
19081
+ color: z115.string().optional(),
19082
+ wavelength: z115.string().optional(),
19083
+ schDisplayValue: z115.string().optional(),
19009
19084
  schOrientation: schematicOrientation.optional(),
19010
19085
  /** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
19011
19086
  schSize: schematicSymbolSize.optional(),
@@ -19013,28 +19088,28 @@ var ledProps = commonComponentProps.extend({
19013
19088
  // wrappers, then normalized to the canonical pin1/pin2 representation.
19014
19089
  pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
19015
19090
  connections: createConnectionsProp(lrPolarPins).optional(),
19016
- laser: z113.boolean().optional()
19091
+ laser: z115.boolean().optional()
19017
19092
  });
19018
19093
  var ledPins = lrPolarPins;
19019
19094
 
19020
19095
  // lib/components/switch.ts
19021
19096
  import { ms as ms3, frequency as frequency4 } from "circuit-json";
19022
- import { z as z114 } from "zod";
19097
+ import { z as z116 } from "zod";
19023
19098
  var switchProps = commonComponentProps.extend({
19024
- type: z114.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
19025
- isNormallyClosed: z114.boolean().optional().default(false),
19026
- spst: z114.boolean().optional(),
19027
- spdt: z114.boolean().optional(),
19028
- dpst: z114.boolean().optional(),
19029
- dpdt: z114.boolean().optional(),
19099
+ type: z116.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
19100
+ isNormallyClosed: z116.boolean().optional().default(false),
19101
+ spst: z116.boolean().optional(),
19102
+ spdt: z116.boolean().optional(),
19103
+ dpst: z116.boolean().optional(),
19104
+ dpdt: z116.boolean().optional(),
19030
19105
  pinLabels: pinLabelsProp.optional(),
19031
19106
  noConnect: noConnectProp.optional(),
19032
19107
  simSwitchFrequency: frequency4.optional(),
19033
19108
  simCloseAt: ms3.optional(),
19034
19109
  simOpenAt: ms3.optional(),
19035
- simStartClosed: z114.boolean().optional(),
19036
- simStartOpen: z114.boolean().optional(),
19037
- connections: z114.custom().pipe(z114.record(z114.string(), connectionTarget)).optional()
19110
+ simStartClosed: z116.boolean().optional(),
19111
+ simStartOpen: z116.boolean().optional(),
19112
+ connections: z116.custom().pipe(z116.record(z116.string(), connectionTarget)).optional()
19038
19113
  }).transform((props) => {
19039
19114
  const updatedProps = { ...props };
19040
19115
  if (updatedProps.dpdt) {
@@ -19066,33 +19141,33 @@ expectTypesMatch(true);
19066
19141
 
19067
19142
  // lib/components/fabrication-note-text.ts
19068
19143
  import { length as length4 } from "circuit-json";
19069
- import { z as z115 } from "zod";
19144
+ import { z as z117 } from "zod";
19070
19145
  var fabricationNoteTextProps = pcbLayoutProps.extend({
19071
- text: z115.string(),
19072
- anchorAlignment: z115.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19073
- font: z115.enum(["tscircuit2024"]).optional(),
19146
+ text: z117.string(),
19147
+ anchorAlignment: z117.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19148
+ font: z117.enum(["tscircuit2024"]).optional(),
19074
19149
  fontSize: length4.optional(),
19075
- color: z115.string().optional()
19150
+ color: z117.string().optional()
19076
19151
  });
19077
19152
  expectTypesMatch(true);
19078
19153
 
19079
19154
  // lib/components/fabrication-note-rect.ts
19080
19155
  import { distance as distance25 } from "circuit-json";
19081
- import { z as z116 } from "zod";
19156
+ import { z as z118 } from "zod";
19082
19157
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19083
19158
  width: distance25,
19084
19159
  height: distance25,
19085
19160
  strokeWidth: distance25.optional(),
19086
- isFilled: z116.boolean().optional(),
19087
- hasStroke: z116.boolean().optional(),
19088
- isStrokeDashed: z116.boolean().optional(),
19089
- color: z116.string().optional(),
19161
+ isFilled: z118.boolean().optional(),
19162
+ hasStroke: z118.boolean().optional(),
19163
+ isStrokeDashed: z118.boolean().optional(),
19164
+ color: z118.string().optional(),
19090
19165
  cornerRadius: distance25.optional()
19091
19166
  });
19092
19167
 
19093
19168
  // lib/components/fabrication-note-path.ts
19094
19169
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
19095
- import { z as z117 } from "zod";
19170
+ import { z as z119 } from "zod";
19096
19171
  var fabricationNotePathProps = pcbLayoutProps.omit({
19097
19172
  pcbLeftEdgeX: true,
19098
19173
  pcbRightEdgeX: true,
@@ -19104,19 +19179,19 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
19104
19179
  pcbOffsetY: true,
19105
19180
  pcbRotation: true
19106
19181
  }).extend({
19107
- route: z117.array(route_hint_point3),
19182
+ route: z119.array(route_hint_point3),
19108
19183
  strokeWidth: length5.optional(),
19109
- color: z117.string().optional(),
19184
+ color: z119.string().optional(),
19110
19185
  /** Fill the route, closing its boundary implicitly. Omitted means false. */
19111
- isFilled: z117.boolean().optional(),
19186
+ isFilled: z119.boolean().optional(),
19112
19187
  /** Draw the route's outline. Omitted means true; false disables it. */
19113
- hasStroke: z117.boolean().optional()
19188
+ hasStroke: z119.boolean().optional()
19114
19189
  });
19115
19190
 
19116
19191
  // lib/components/fabrication-note-dimension.ts
19117
19192
  import { distance as distance26, length as length6 } from "circuit-json";
19118
- import { z as z118 } from "zod";
19119
- var dimensionTarget = z118.union([z118.string(), point]);
19193
+ import { z as z120 } from "zod";
19194
+ var dimensionTarget = z120.union([z120.string(), point]);
19120
19195
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
19121
19196
  pcbLeftEdgeX: true,
19122
19197
  pcbRightEdgeX: true,
@@ -19130,44 +19205,44 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
19130
19205
  }).extend({
19131
19206
  from: dimensionTarget,
19132
19207
  to: dimensionTarget,
19133
- text: z118.string().optional(),
19208
+ text: z120.string().optional(),
19134
19209
  offset: distance26.optional(),
19135
- offsetDirection: z118.object({ x: z118.number().finite(), y: z118.number().finite() }).optional(),
19136
- font: z118.enum(["tscircuit2024"]).optional(),
19210
+ offsetDirection: z120.object({ x: z120.number().finite(), y: z120.number().finite() }).optional(),
19211
+ font: z120.enum(["tscircuit2024"]).optional(),
19137
19212
  fontSize: length6.optional(),
19138
- color: z118.string().optional(),
19213
+ color: z120.string().optional(),
19139
19214
  arrowSize: distance26.optional(),
19140
- units: z118.enum(["in", "mm"]).optional(),
19141
- outerEdgeToEdge: z118.literal(true).optional(),
19142
- centerToCenter: z118.literal(true).optional(),
19143
- innerEdgeToEdge: z118.literal(true).optional()
19215
+ units: z120.enum(["in", "mm"]).optional(),
19216
+ outerEdgeToEdge: z120.literal(true).optional(),
19217
+ centerToCenter: z120.literal(true).optional(),
19218
+ innerEdgeToEdge: z120.literal(true).optional()
19144
19219
  });
19145
19220
  expectTypesMatch(true);
19146
19221
 
19147
19222
  // lib/components/pcb-trace.ts
19148
19223
  import { distance as distance27, route_hint_point as route_hint_point4 } from "circuit-json";
19149
- import { z as z119 } from "zod";
19150
- var pcbTraceProps = z119.object({
19151
- layer: z119.string().optional(),
19224
+ import { z as z121 } from "zod";
19225
+ var pcbTraceProps = z121.object({
19226
+ layer: z121.string().optional(),
19152
19227
  thickness: distance27.optional(),
19153
- route: z119.array(route_hint_point4)
19228
+ route: z121.array(route_hint_point4)
19154
19229
  });
19155
19230
 
19156
19231
  // lib/components/via.ts
19157
- import { distance as distance28, layer_ref as layer_ref9 } from "circuit-json";
19158
- import { z as z120 } from "zod";
19232
+ import { distance as distance28, layer_ref as layer_ref10 } from "circuit-json";
19233
+ import { z as z122 } from "zod";
19159
19234
  var viaProps = commonLayoutProps.extend({
19160
- name: z120.string().optional(),
19161
- fromLayer: layer_ref9.optional(),
19162
- toLayer: layer_ref9.optional(),
19235
+ name: z122.string().optional(),
19236
+ fromLayer: layer_ref10.optional(),
19237
+ toLayer: layer_ref10.optional(),
19163
19238
  holeDiameter: distance28.optional(),
19164
19239
  outerDiameter: distance28.optional(),
19165
- layers: z120.array(layer_ref9).optional(),
19166
- connectsTo: z120.string().or(z120.array(z120.string())).optional(),
19167
- netIsAssignable: z120.boolean().optional(),
19168
- tented: z120.union([
19169
- z120.boolean(),
19170
- z120.enum([
19240
+ layers: z122.array(layer_ref10).optional(),
19241
+ connectsTo: z122.string().or(z122.array(z122.string())).optional(),
19242
+ netIsAssignable: z122.boolean().optional(),
19243
+ tented: z122.union([
19244
+ z122.boolean(),
19245
+ z122.enum([
19171
19246
  "both_sides",
19172
19247
  "top_and_bottom_tented",
19173
19248
  "top_tented",
@@ -19186,15 +19261,15 @@ expectTypesMatch(true);
19186
19261
 
19187
19262
  // lib/components/testpoint.ts
19188
19263
  import { distance as distance29 } from "circuit-json";
19189
- import { z as z121 } from "zod";
19264
+ import { z as z123 } from "zod";
19190
19265
  var testpointPins = ["pin1"];
19191
- var testpointConnectionsProp = z121.object({
19266
+ var testpointConnectionsProp = z123.object({
19192
19267
  pin1: connectionTarget
19193
19268
  }).strict();
19194
19269
  var testpointProps = commonComponentProps.extend({
19195
19270
  connections: testpointConnectionsProp.optional(),
19196
- footprintVariant: z121.enum(["pad", "through_hole"]).optional(),
19197
- padShape: z121.enum(["rect", "circle"]).optional().default("circle"),
19271
+ footprintVariant: z123.enum(["pad", "through_hole"]).optional(),
19272
+ padShape: z123.enum(["rect", "circle"]).optional().default("circle"),
19198
19273
  padDiameter: distance29.optional(),
19199
19274
  holeDiameter: distance29.optional(),
19200
19275
  width: distance29.optional(),
@@ -19206,42 +19281,42 @@ var testpointProps = commonComponentProps.extend({
19206
19281
  expectTypesMatch(true);
19207
19282
 
19208
19283
  // lib/components/breakoutpoint.ts
19209
- import { z as z122 } from "zod";
19284
+ import { z as z124 } from "zod";
19210
19285
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
19211
- connection: z122.string()
19286
+ connection: z124.string()
19212
19287
  });
19213
19288
  expectTypesMatch(true);
19214
19289
 
19215
19290
  // lib/components/pcb-keepout.ts
19216
- import { distance as distance30, layer_ref as layer_ref10 } from "circuit-json";
19217
- import { z as z123 } from "zod";
19218
- var pcbKeepoutProps = z123.union([
19291
+ import { distance as distance30, layer_ref as layer_ref11 } from "circuit-json";
19292
+ import { z as z125 } from "zod";
19293
+ var pcbKeepoutProps = z125.union([
19219
19294
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
19220
- shape: z123.literal("circle"),
19295
+ shape: z125.literal("circle"),
19221
19296
  radius: distance30,
19222
- layers: z123.array(layer_ref10).optional(),
19297
+ layers: z125.array(layer_ref11).optional(),
19223
19298
  /** Report keepout violations as warnings when true. Omit for normal enforcement. */
19224
- warningOnly: z123.boolean().optional(),
19299
+ warningOnly: z125.boolean().optional(),
19225
19300
  /** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
19226
- allowTraces: z123.boolean().optional(),
19301
+ allowTraces: z125.boolean().optional(),
19227
19302
  /** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
19228
- allowPlacements: z123.boolean().optional(),
19229
- excludeRefs: z123.array(z123.string()).optional().describe(
19303
+ allowPlacements: z125.boolean().optional(),
19304
+ excludeRefs: z125.array(z125.string()).optional().describe(
19230
19305
  'Component selectors excluded from the keepout, such as ".ANT1"'
19231
19306
  )
19232
19307
  }),
19233
19308
  pcbLayoutProps.extend({
19234
- shape: z123.literal("rect"),
19309
+ shape: z125.literal("rect"),
19235
19310
  width: distance30,
19236
19311
  height: distance30,
19237
- layers: z123.array(layer_ref10).optional(),
19312
+ layers: z125.array(layer_ref11).optional(),
19238
19313
  /** Report keepout violations as warnings when true. Omit for normal enforcement. */
19239
- warningOnly: z123.boolean().optional(),
19314
+ warningOnly: z125.boolean().optional(),
19240
19315
  /** Allow trace crossings without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
19241
- allowTraces: z123.boolean().optional(),
19316
+ allowTraces: z125.boolean().optional(),
19242
19317
  /** Allow components and their pads/plated holes without keepout diagnostics. False or omitted retains enforcement; copper pours remain excluded. */
19243
- allowPlacements: z123.boolean().optional(),
19244
- excludeRefs: z123.array(z123.string()).optional().describe(
19318
+ allowPlacements: z125.boolean().optional(),
19319
+ excludeRefs: z125.array(z125.string()).optional().describe(
19245
19320
  'Component selectors excluded from the keepout, such as ".ANT1"'
19246
19321
  )
19247
19322
  })
@@ -19249,20 +19324,20 @@ var pcbKeepoutProps = z123.union([
19249
19324
 
19250
19325
  // lib/components/courtyard-rect.ts
19251
19326
  import { distance as distance31 } from "circuit-json";
19252
- import { z as z124 } from "zod";
19327
+ import { z as z126 } from "zod";
19253
19328
  var courtyardRectProps = pcbLayoutProps.extend({
19254
19329
  width: distance31,
19255
19330
  height: distance31,
19256
19331
  strokeWidth: distance31.optional(),
19257
- isFilled: z124.boolean().optional(),
19258
- hasStroke: z124.boolean().optional(),
19259
- isStrokeDashed: z124.boolean().optional(),
19260
- color: z124.string().optional()
19332
+ isFilled: z126.boolean().optional(),
19333
+ hasStroke: z126.boolean().optional(),
19334
+ isStrokeDashed: z126.boolean().optional(),
19335
+ color: z126.string().optional()
19261
19336
  });
19262
19337
 
19263
19338
  // lib/components/courtyard-outline.ts
19264
19339
  import { length as length7 } from "circuit-json";
19265
- import { z as z125 } from "zod";
19340
+ import { z as z127 } from "zod";
19266
19341
  var courtyardOutlineProps = pcbLayoutProps.omit({
19267
19342
  pcbLeftEdgeX: true,
19268
19343
  pcbRightEdgeX: true,
@@ -19274,11 +19349,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
19274
19349
  pcbOffsetY: true,
19275
19350
  pcbRotation: true
19276
19351
  }).extend({
19277
- outline: z125.array(point),
19352
+ outline: z127.array(point),
19278
19353
  strokeWidth: length7.optional(),
19279
- isClosed: z125.boolean().optional(),
19280
- isStrokeDashed: z125.boolean().optional(),
19281
- color: z125.string().optional()
19354
+ isClosed: z127.boolean().optional(),
19355
+ isStrokeDashed: z127.boolean().optional(),
19356
+ color: z127.string().optional()
19282
19357
  });
19283
19358
 
19284
19359
  // lib/components/courtyard-circle.ts
@@ -19298,16 +19373,16 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19298
19373
  });
19299
19374
 
19300
19375
  // lib/components/copper-pour.ts
19301
- import { z as z128 } from "zod";
19302
- import { layer_ref as layer_ref11 } from "circuit-json";
19303
- var copperPourProps = z128.object({
19304
- name: z128.string().optional(),
19305
- layer: layer_ref11,
19306
- connectsTo: z128.string(),
19307
- crosshatch: z128.boolean().optional(),
19308
- crosshatchPitch: distance.pipe(z128.number().finite().positive()).optional(),
19309
- crosshatchWidth: distance.pipe(z128.number().finite().positive()).optional(),
19310
- unbroken: z128.boolean().optional().describe(
19376
+ import { z as z130 } from "zod";
19377
+ import { layer_ref as layer_ref12 } from "circuit-json";
19378
+ var copperPourProps = z130.object({
19379
+ name: z130.string().optional(),
19380
+ layer: layer_ref12,
19381
+ connectsTo: z130.string(),
19382
+ crosshatch: z130.boolean().optional(),
19383
+ crosshatchPitch: distance.pipe(z130.number().finite().positive()).optional(),
19384
+ crosshatchWidth: distance.pipe(z130.number().finite().positive()).optional(),
19385
+ unbroken: z130.boolean().optional().describe(
19311
19386
  "Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
19312
19387
  ),
19313
19388
  padMargin: distance.optional(),
@@ -19315,13 +19390,13 @@ var copperPourProps = z128.object({
19315
19390
  clearance: distance.optional(),
19316
19391
  boardEdgeMargin: distance.optional(),
19317
19392
  cutoutMargin: distance.optional(),
19318
- useThermalReliefs: z128.boolean().optional(),
19319
- outline: z128.array(point).optional(),
19320
- coveredWithSolderMask: z128.boolean().optional().default(true)
19393
+ useThermalReliefs: z130.boolean().optional(),
19394
+ outline: z130.array(point).optional(),
19395
+ coveredWithSolderMask: z130.boolean().optional().default(true)
19321
19396
  }).superRefine((props, ctx) => {
19322
19397
  if (props.crosshatch && (props.crosshatchWidth ?? 0.25) >= (props.crosshatchPitch ?? 1)) {
19323
19398
  ctx.addIssue({
19324
- code: z128.ZodIssueCode.custom,
19399
+ code: z130.ZodIssueCode.custom,
19325
19400
  path: ["crosshatchWidth"],
19326
19401
  message: "crosshatchWidth must be less than crosshatchPitch"
19327
19402
  });
@@ -19330,17 +19405,17 @@ var copperPourProps = z128.object({
19330
19405
  expectTypesMatch(true);
19331
19406
 
19332
19407
  // lib/components/cadassembly.ts
19333
- import { layer_ref as layer_ref12 } from "circuit-json";
19334
- import { z as z129 } from "zod";
19335
- var cadassemblyProps = z129.object({
19336
- originalLayer: layer_ref12.default("top").optional(),
19337
- children: z129.any().optional()
19408
+ import { layer_ref as layer_ref13 } from "circuit-json";
19409
+ import { z as z131 } from "zod";
19410
+ var cadassemblyProps = z131.object({
19411
+ originalLayer: layer_ref13.default("top").optional(),
19412
+ children: z131.any().optional()
19338
19413
  });
19339
19414
  expectTypesMatch(true);
19340
19415
 
19341
19416
  // lib/components/cadmodel.ts
19342
- import { z as z130 } from "zod";
19343
- var pcbPosition = z130.object({
19417
+ import { z as z132 } from "zod";
19418
+ var pcbPosition = z132.object({
19344
19419
  pcbX: pcbCoordinate.optional(),
19345
19420
  pcbY: pcbCoordinate.optional(),
19346
19421
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -19359,7 +19434,7 @@ var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
19359
19434
  expectTypesMatch(true);
19360
19435
  var cadModelInputObject = cadModelBase.extend({
19361
19436
  /** Modelprinter specification or HTTP(S) URL; mutually exclusive with modelUrl. */
19362
- model: z130.string().trim().min(1).optional(),
19437
+ model: z132.string().trim().min(1).optional(),
19363
19438
  modelUrl: url.optional()
19364
19439
  }).merge(pcbPosition).refine(
19365
19440
  (props) => props.model === void 0 !== (props.modelUrl === void 0),
@@ -19372,7 +19447,7 @@ var cadModelInputObject = cadModelBase.extend({
19372
19447
  modelUrl: model === void 0 ? props.modelUrl : /^https?:\/\//i.test(model) ? model : `https://modelcdn.tscircuit.com/jscad_models/${encodeURIComponent(model)}.glb`
19373
19448
  })).pipe(cadModelObject);
19374
19449
  expectTypesMatch(true);
19375
- var cadmodelProps = z130.union([z130.null(), url, cadModelInputObject]);
19450
+ var cadmodelProps = z132.union([z132.null(), url, cadModelInputObject]);
19376
19451
 
19377
19452
  // lib/components/power-source.ts
19378
19453
  import { voltage as voltage5 } from "circuit-json";
@@ -19382,9 +19457,9 @@ var powerSourceProps = commonComponentProps.extend({
19382
19457
 
19383
19458
  // lib/components/voltagesource.ts
19384
19459
  import { frequency as frequency5, ms as ms4, rotation as rotation6, voltage as voltage6 } from "circuit-json";
19385
- import { z as z131 } from "zod";
19460
+ import { z as z133 } from "zod";
19386
19461
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
19387
- var percentage = z131.union([z131.string(), z131.number()]).transform((val) => {
19462
+ var percentage = z133.union([z133.string(), z133.number()]).transform((val) => {
19388
19463
  if (typeof val === "string") {
19389
19464
  if (val.endsWith("%")) {
19390
19465
  return parseFloat(val.slice(0, -1)) / 100;
@@ -19393,13 +19468,13 @@ var percentage = z131.union([z131.string(), z131.number()]).transform((val) => {
19393
19468
  }
19394
19469
  return val;
19395
19470
  }).pipe(
19396
- z131.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
19471
+ z133.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
19397
19472
  );
19398
19473
  var voltageSourceProps = commonComponentProps.extend({
19399
19474
  voltage: voltage6.optional(),
19400
19475
  frequency: frequency5.optional(),
19401
19476
  peakToPeakVoltage: voltage6.optional(),
19402
- waveShape: z131.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
19477
+ waveShape: z133.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
19403
19478
  phase: rotation6.optional(),
19404
19479
  dutyCycle: percentage.optional(),
19405
19480
  pulseDelay: ms4.optional(),
@@ -19416,9 +19491,9 @@ expectTypesMatch(true);
19416
19491
 
19417
19492
  // lib/components/currentsource.ts
19418
19493
  import { frequency as frequency6, rotation as rotation7, current as current3 } from "circuit-json";
19419
- import { z as z132 } from "zod";
19494
+ import { z as z134 } from "zod";
19420
19495
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
19421
- var percentage2 = z132.union([z132.string(), z132.number()]).transform((val) => {
19496
+ var percentage2 = z134.union([z134.string(), z134.number()]).transform((val) => {
19422
19497
  if (typeof val === "string") {
19423
19498
  if (val.endsWith("%")) {
19424
19499
  return parseFloat(val.slice(0, -1)) / 100;
@@ -19427,13 +19502,13 @@ var percentage2 = z132.union([z132.string(), z132.number()]).transform((val) =>
19427
19502
  }
19428
19503
  return val;
19429
19504
  }).pipe(
19430
- z132.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
19505
+ z134.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
19431
19506
  );
19432
19507
  var currentSourceProps = commonComponentProps.extend({
19433
19508
  current: current3.optional(),
19434
19509
  frequency: frequency6.optional(),
19435
19510
  peakToPeakCurrent: current3.optional(),
19436
- waveShape: z132.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
19511
+ waveShape: z134.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
19437
19512
  phase: rotation7.optional(),
19438
19513
  dutyCycle: percentage2.optional(),
19439
19514
  acMagnitude: current3.optional(),
@@ -19444,21 +19519,21 @@ var currentSourcePins = lrPolarPins;
19444
19519
  expectTypesMatch(true);
19445
19520
 
19446
19521
  // lib/components/voltageprobe.ts
19447
- import { z as z133 } from "zod";
19522
+ import { z as z135 } from "zod";
19448
19523
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
19449
- name: z133.string().optional(),
19450
- connectsTo: z133.string(),
19451
- referenceTo: z133.string().optional(),
19452
- color: z133.string().optional(),
19453
- graphDisplayName: z133.string().optional(),
19454
- graphCenter: z133.number().optional(),
19455
- graphVerticalOffset: z133.number().or(z133.string()).optional(),
19456
- graphVoltagePerDiv: z133.number().or(z133.string()).optional()
19524
+ name: z135.string().optional(),
19525
+ connectsTo: z135.string(),
19526
+ referenceTo: z135.string().optional(),
19527
+ color: z135.string().optional(),
19528
+ graphDisplayName: z135.string().optional(),
19529
+ graphCenter: z135.number().optional(),
19530
+ graphVerticalOffset: z135.number().or(z135.string()).optional(),
19531
+ graphVoltagePerDiv: z135.number().or(z135.string()).optional()
19457
19532
  });
19458
19533
  expectTypesMatch(true);
19459
19534
 
19460
19535
  // lib/components/ammeter.ts
19461
- import { z as z134 } from "zod";
19536
+ import { z as z136 } from "zod";
19462
19537
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
19463
19538
  var hasAmmeterConnectionPair = (connections) => {
19464
19539
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -19468,64 +19543,64 @@ var ammeterProps = commonComponentProps.extend({
19468
19543
  hasAmmeterConnectionPair,
19469
19544
  "Ammeter connections must include either pos/neg or pin1/pin2"
19470
19545
  ),
19471
- color: z134.string().optional(),
19472
- graphDisplayName: z134.string().optional(),
19473
- graphCenter: z134.number().optional(),
19474
- graphVerticalOffset: z134.number().or(z134.string()).optional(),
19475
- graphCurrentPerDiv: z134.number().or(z134.string()).optional()
19546
+ color: z136.string().optional(),
19547
+ graphDisplayName: z136.string().optional(),
19548
+ graphCenter: z136.number().optional(),
19549
+ graphVerticalOffset: z136.number().or(z136.string()).optional(),
19550
+ graphCurrentPerDiv: z136.number().or(z136.string()).optional()
19476
19551
  });
19477
19552
  var ammeterPins = ammeterPinLabels;
19478
19553
  expectTypesMatch(true);
19479
19554
 
19480
19555
  // lib/components/schematic-arc.ts
19481
19556
  import { distance as distance34, point as point5, rotation as rotation8 } from "circuit-json";
19482
- import { z as z135 } from "zod";
19483
- var schematicArcProps = z135.object({
19557
+ import { z as z137 } from "zod";
19558
+ var schematicArcProps = z137.object({
19484
19559
  center: point5,
19485
19560
  radius: distance34,
19486
19561
  startAngleDegrees: rotation8,
19487
19562
  endAngleDegrees: rotation8,
19488
- direction: z135.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
19563
+ direction: z137.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
19489
19564
  strokeWidth: distance34.optional(),
19490
- color: z135.string().optional(),
19491
- isDashed: z135.boolean().optional().default(false)
19565
+ color: z137.string().optional(),
19566
+ isDashed: z137.boolean().optional().default(false)
19492
19567
  });
19493
19568
  expectTypesMatch(true);
19494
19569
 
19495
19570
  // lib/components/toolingrail.ts
19496
- import { z as z136 } from "zod";
19497
- var toolingrailProps = z136.object({
19498
- children: z136.any().optional()
19571
+ import { z as z138 } from "zod";
19572
+ var toolingrailProps = z138.object({
19573
+ children: z138.any().optional()
19499
19574
  });
19500
19575
  expectTypesMatch(true);
19501
19576
 
19502
19577
  // lib/components/schematic-box.ts
19503
19578
  import { distance as distance35 } from "circuit-json";
19504
- import { z as z137 } from "zod";
19505
- var schematicBoxProps = z137.object({
19506
- name: z137.string().optional(),
19507
- chipRef: z137.string().optional(),
19579
+ import { z as z139 } from "zod";
19580
+ var schematicBoxProps = z139.object({
19581
+ name: z139.string().optional(),
19582
+ chipRef: z139.string().optional(),
19508
19583
  pinLabels: pinLabelsProp.optional(),
19509
19584
  schPinArrangement: schematicPinArrangement.optional(),
19510
19585
  schPinStyle: schematicPinStyle.optional(),
19511
19586
  schX: distance35.optional(),
19512
19587
  schY: distance35.optional(),
19513
- schSectionName: z137.string().optional(),
19514
- schSheetName: z137.string().optional(),
19588
+ schSectionName: z139.string().optional(),
19589
+ schSheetName: z139.string().optional(),
19515
19590
  width: distance35.optional(),
19516
19591
  height: distance35.optional(),
19517
- overlay: z137.array(z137.string()).optional(),
19592
+ overlay: z139.array(z139.string()).optional(),
19518
19593
  padding: distance35.optional(),
19519
19594
  paddingLeft: distance35.optional(),
19520
19595
  paddingRight: distance35.optional(),
19521
19596
  paddingTop: distance35.optional(),
19522
19597
  paddingBottom: distance35.optional(),
19523
- title: z137.string().optional(),
19598
+ title: z139.string().optional(),
19524
19599
  titleAlignment: ninePointAnchor.default("top_left"),
19525
- titleColor: z137.string().optional(),
19600
+ titleColor: z139.string().optional(),
19526
19601
  titleFontSize: distance35.optional(),
19527
- titleInside: z137.boolean().default(false),
19528
- strokeStyle: z137.enum(["solid", "dashed"]).default("solid")
19602
+ titleInside: z139.boolean().default(false),
19603
+ strokeStyle: z139.enum(["solid", "dashed"]).default("solid")
19529
19604
  }).refine(
19530
19605
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
19531
19606
  {
@@ -19541,21 +19616,21 @@ expectTypesMatch(true);
19541
19616
 
19542
19617
  // lib/components/schematic-symbol.ts
19543
19618
  import { rotation as rotation9 } from "circuit-json";
19544
- import { z as z138 } from "zod";
19545
- var schematicSymbolConnections = z138.custom().pipe(z138.record(z138.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
19619
+ import { z as z140 } from "zod";
19620
+ var schematicSymbolConnections = z140.custom().pipe(z140.record(z140.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
19546
19621
  message: "connections must map at least one schematic symbol port"
19547
19622
  });
19548
- var schematicSymbolProps = z138.object({
19549
- name: z138.string().min(1),
19550
- displayName: z138.string().optional(),
19551
- chipRef: z138.string().min(1).optional(),
19552
- symbolName: z138.string().min(1),
19623
+ var schematicSymbolProps = z140.object({
19624
+ name: z140.string().min(1),
19625
+ displayName: z140.string().optional(),
19626
+ chipRef: z140.string().min(1).optional(),
19627
+ symbolName: z140.string().min(1),
19553
19628
  connections: schematicSymbolConnections.optional(),
19554
19629
  schX: distance.optional(),
19555
19630
  schY: distance.optional(),
19556
19631
  schRotation: rotation9.optional(),
19557
- schSectionName: z138.string().optional(),
19558
- schSheetName: z138.string().optional()
19632
+ schSectionName: z140.string().optional(),
19633
+ schSheetName: z140.string().optional()
19559
19634
  });
19560
19635
  expectTypesMatch(
19561
19636
  true
@@ -19563,15 +19638,15 @@ expectTypesMatch(
19563
19638
 
19564
19639
  // lib/components/schematic-circle.ts
19565
19640
  import { distance as distance36, point as point6 } from "circuit-json";
19566
- import { z as z139 } from "zod";
19567
- var schematicCircleProps = z139.object({
19641
+ import { z as z141 } from "zod";
19642
+ var schematicCircleProps = z141.object({
19568
19643
  center: point6,
19569
19644
  radius: distance36,
19570
19645
  strokeWidth: distance36.optional(),
19571
- color: z139.string().optional(),
19572
- isFilled: z139.boolean().optional().default(false),
19573
- fillColor: z139.string().optional(),
19574
- isDashed: z139.boolean().optional().default(false)
19646
+ color: z141.string().optional(),
19647
+ isFilled: z141.boolean().optional().default(false),
19648
+ fillColor: z141.string().optional(),
19649
+ isDashed: z141.boolean().optional().default(false)
19575
19650
  });
19576
19651
  expectTypesMatch(
19577
19652
  true
@@ -19579,32 +19654,32 @@ expectTypesMatch(
19579
19654
 
19580
19655
  // lib/components/schematic-rect.ts
19581
19656
  import { distance as distance37, rotation as rotation10 } from "circuit-json";
19582
- import { z as z140 } from "zod";
19583
- var schematicRectProps = z140.object({
19657
+ import { z as z142 } from "zod";
19658
+ var schematicRectProps = z142.object({
19584
19659
  schX: distance37.optional(),
19585
19660
  schY: distance37.optional(),
19586
19661
  width: distance37,
19587
19662
  height: distance37,
19588
19663
  rotation: rotation10.default(0),
19589
19664
  strokeWidth: distance37.optional(),
19590
- color: z140.string().optional(),
19591
- isFilled: z140.boolean().optional().default(false),
19592
- fillColor: z140.string().optional(),
19593
- isDashed: z140.boolean().optional().default(false)
19665
+ color: z142.string().optional(),
19666
+ isFilled: z142.boolean().optional().default(false),
19667
+ fillColor: z142.string().optional(),
19668
+ isDashed: z142.boolean().optional().default(false)
19594
19669
  });
19595
19670
  expectTypesMatch(true);
19596
19671
 
19597
19672
  // lib/components/schematic-line.ts
19598
19673
  import { distance as distance38 } from "circuit-json";
19599
- import { z as z141 } from "zod";
19600
- var schematicLineProps = z141.object({
19674
+ import { z as z143 } from "zod";
19675
+ var schematicLineProps = z143.object({
19601
19676
  x1: distance38,
19602
19677
  y1: distance38,
19603
19678
  x2: distance38,
19604
19679
  y2: distance38,
19605
19680
  strokeWidth: distance38.optional(),
19606
- color: z141.string().optional(),
19607
- isDashed: z141.boolean().optional().default(false),
19681
+ color: z143.string().optional(),
19682
+ isDashed: z143.boolean().optional().default(false),
19608
19683
  dashLength: distance38.optional(),
19609
19684
  dashGap: distance38.optional()
19610
19685
  });
@@ -19612,11 +19687,11 @@ expectTypesMatch(true);
19612
19687
 
19613
19688
  // lib/components/schematic-text.ts
19614
19689
  import { distance as distance39, rotation as rotation11 } from "circuit-json";
19615
- import { z as z143 } from "zod";
19690
+ import { z as z145 } from "zod";
19616
19691
 
19617
19692
  // lib/common/fivePointAnchor.ts
19618
- import { z as z142 } from "zod";
19619
- var fivePointAnchor = z142.enum([
19693
+ import { z as z144 } from "zod";
19694
+ var fivePointAnchor = z144.enum([
19620
19695
  "center",
19621
19696
  "left",
19622
19697
  "right",
@@ -19625,39 +19700,39 @@ var fivePointAnchor = z142.enum([
19625
19700
  ]);
19626
19701
 
19627
19702
  // lib/components/schematic-text.ts
19628
- var schematicTextProps = z143.object({
19703
+ var schematicTextProps = z145.object({
19629
19704
  schX: distance39.optional(),
19630
19705
  schY: distance39.optional(),
19631
- text: z143.string(),
19632
- fontSize: z143.number().default(1),
19633
- anchor: z143.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
19634
- color: z143.string().default("#000000"),
19706
+ text: z145.string(),
19707
+ fontSize: z145.number().default(1),
19708
+ anchor: z145.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
19709
+ color: z145.string().default("#000000"),
19635
19710
  schRotation: rotation11.default(0)
19636
19711
  });
19637
19712
  expectTypesMatch(true);
19638
19713
 
19639
19714
  // lib/components/schematic-path.ts
19640
19715
  import { distance as distance40, point as point7 } from "circuit-json";
19641
- import { z as z144 } from "zod";
19642
- var schematicPathProps = z144.object({
19643
- points: z144.array(point7).optional(),
19644
- svgPath: z144.string().optional(),
19716
+ import { z as z146 } from "zod";
19717
+ var schematicPathProps = z146.object({
19718
+ points: z146.array(point7).optional(),
19719
+ svgPath: z146.string().optional(),
19645
19720
  strokeWidth: distance40.optional(),
19646
- strokeColor: z144.string().optional(),
19721
+ strokeColor: z146.string().optional(),
19647
19722
  dashLength: distance40.optional(),
19648
19723
  dashGap: distance40.optional(),
19649
- isFilled: z144.boolean().optional().default(false),
19650
- fillColor: z144.string().optional()
19724
+ isFilled: z146.boolean().optional().default(false),
19725
+ fillColor: z146.string().optional()
19651
19726
  });
19652
19727
  expectTypesMatch(true);
19653
19728
 
19654
19729
  // lib/components/schematic-table.ts
19655
19730
  import { distance as distance41 } from "circuit-json";
19656
- import { z as z145 } from "zod";
19657
- var schematicTableProps = z145.object({
19731
+ import { z as z147 } from "zod";
19732
+ var schematicTableProps = z147.object({
19658
19733
  schX: distance41.optional(),
19659
19734
  schY: distance41.optional(),
19660
- children: z145.any().optional(),
19735
+ children: z147.any().optional(),
19661
19736
  cellPadding: distance41.optional(),
19662
19737
  borderWidth: distance41.optional(),
19663
19738
  anchor: ninePointAnchor.optional(),
@@ -19667,34 +19742,34 @@ expectTypesMatch(true);
19667
19742
 
19668
19743
  // lib/components/schematic-row.ts
19669
19744
  import { distance as distance42 } from "circuit-json";
19670
- import { z as z146 } from "zod";
19671
- var schematicRowProps = z146.object({
19672
- children: z146.any().optional(),
19745
+ import { z as z148 } from "zod";
19746
+ var schematicRowProps = z148.object({
19747
+ children: z148.any().optional(),
19673
19748
  height: distance42.optional()
19674
19749
  });
19675
19750
  expectTypesMatch(true);
19676
19751
 
19677
19752
  // lib/components/schematic-cell.ts
19678
19753
  import { distance as distance43 } from "circuit-json";
19679
- import { z as z147 } from "zod";
19680
- var schematicCellProps = z147.object({
19681
- children: z147.string().optional(),
19682
- horizontalAlign: z147.enum(["left", "center", "right"]).optional(),
19683
- verticalAlign: z147.enum(["top", "middle", "bottom"]).optional(),
19754
+ import { z as z149 } from "zod";
19755
+ var schematicCellProps = z149.object({
19756
+ children: z149.string().optional(),
19757
+ horizontalAlign: z149.enum(["left", "center", "right"]).optional(),
19758
+ verticalAlign: z149.enum(["top", "middle", "bottom"]).optional(),
19684
19759
  fontSize: distance43.optional(),
19685
- rowSpan: z147.number().optional(),
19686
- colSpan: z147.number().optional(),
19760
+ rowSpan: z149.number().optional(),
19761
+ colSpan: z149.number().optional(),
19687
19762
  width: distance43.optional(),
19688
- text: z147.string().optional()
19763
+ text: z149.string().optional()
19689
19764
  });
19690
19765
  expectTypesMatch(true);
19691
19766
 
19692
19767
  // lib/components/schematic-section.ts
19693
19768
  import { distance as distance44 } from "circuit-json";
19694
- import { z as z148 } from "zod";
19695
- var schematicSectionProps = z148.object({
19696
- displayName: z148.string().optional(),
19697
- name: z148.string(),
19769
+ import { z as z150 } from "zod";
19770
+ var schematicSectionProps = z150.object({
19771
+ displayName: z150.string().optional(),
19772
+ name: z150.string(),
19698
19773
  sectionTitleFontSize: distance44.optional()
19699
19774
  });
19700
19775
  expectTypesMatch(
@@ -19702,30 +19777,30 @@ expectTypesMatch(
19702
19777
  );
19703
19778
 
19704
19779
  // lib/components/schematic-sheet.ts
19705
- import { z as z149 } from "zod";
19780
+ import { z as z151 } from "zod";
19706
19781
  import { distance as distance45 } from "circuit-json";
19707
- var schematicSheetProps = z149.object({
19708
- name: z149.string().optional(),
19709
- displayName: z149.string().optional(),
19710
- sheetIndex: z149.number().optional(),
19711
- sheetSize: z149.enum(["A4", "ANSI_B"]).default("A4"),
19712
- sheetWidth: distance45.pipe(z149.number().positive()).optional(),
19713
- sheetHeight: distance45.pipe(z149.number().positive()).optional(),
19714
- children: z149.any().optional()
19782
+ var schematicSheetProps = z151.object({
19783
+ name: z151.string().optional(),
19784
+ displayName: z151.string().optional(),
19785
+ sheetIndex: z151.number().optional(),
19786
+ sheetSize: z151.enum(["A4", "ANSI_B"]).default("A4"),
19787
+ sheetWidth: distance45.pipe(z151.number().positive()).optional(),
19788
+ sheetHeight: distance45.pipe(z151.number().positive()).optional(),
19789
+ children: z151.any().optional()
19715
19790
  });
19716
19791
  expectTypesMatch(true);
19717
19792
 
19718
19793
  // lib/components/schematic-graphic.ts
19719
- import { z as z150 } from "zod";
19794
+ import { z as z152 } from "zod";
19720
19795
  var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
19721
19796
  message: "imageUrl cannot be empty"
19722
19797
  });
19723
19798
  var positiveDistance5 = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
19724
19799
  message: `${fieldName} must be a positive finite distance`
19725
19800
  });
19726
- var schematicGraphicProps = z150.object({
19801
+ var schematicGraphicProps = z152.object({
19727
19802
  imageUrl: nonemptyUrl.optional(),
19728
- svgContent: z150.string().refine((value) => value.trim().length > 0, {
19803
+ svgContent: z152.string().refine((value) => value.trim().length > 0, {
19729
19804
  message: "svgContent cannot be empty"
19730
19805
  }).optional(),
19731
19806
  width: positiveDistance5("width").optional(),
@@ -19733,7 +19808,7 @@ var schematicGraphicProps = z150.object({
19733
19808
  }).superRefine(({ imageUrl, svgContent }, ctx) => {
19734
19809
  if (imageUrl === void 0 && svgContent === void 0) {
19735
19810
  ctx.addIssue({
19736
- code: z150.ZodIssueCode.custom,
19811
+ code: z152.ZodIssueCode.custom,
19737
19812
  message: "At least one of imageUrl or svgContent is required"
19738
19813
  });
19739
19814
  }
@@ -19743,41 +19818,41 @@ expectTypesMatch(
19743
19818
  );
19744
19819
 
19745
19820
  // lib/components/copper-text.ts
19746
- import { layer_ref as layer_ref13, length as length8 } from "circuit-json";
19747
- import { z as z151 } from "zod";
19821
+ import { layer_ref as layer_ref14, length as length8 } from "circuit-json";
19822
+ import { z as z153 } from "zod";
19748
19823
  var copperTextProps = pcbLayoutProps.extend({
19749
- text: z151.string(),
19824
+ text: z153.string(),
19750
19825
  anchorAlignment: ninePointAnchor.default("center"),
19751
- font: z151.enum(["tscircuit2024"]).optional(),
19826
+ font: z153.enum(["tscircuit2024"]).optional(),
19752
19827
  fontSize: length8.optional(),
19753
- layers: z151.array(layer_ref13).optional(),
19754
- knockout: z151.boolean().optional(),
19755
- mirrored: z151.boolean().optional()
19828
+ layers: z153.array(layer_ref14).optional(),
19829
+ knockout: z153.boolean().optional(),
19830
+ mirrored: z153.boolean().optional()
19756
19831
  });
19757
19832
 
19758
19833
  // lib/components/silkscreen-text.ts
19759
- import { layer_ref as layer_ref14, length as length9 } from "circuit-json";
19760
- import { z as z152 } from "zod";
19834
+ import { layer_ref as layer_ref15, length as length9 } from "circuit-json";
19835
+ import { z as z154 } from "zod";
19761
19836
  var silkscreenTextProps = pcbLayoutProps.extend({
19762
- text: z152.string(),
19837
+ text: z154.string(),
19763
19838
  anchorAlignment: ninePointAnchor.default("center"),
19764
- font: z152.enum(["tscircuit2024"]).optional(),
19839
+ font: z154.enum(["tscircuit2024"]).optional(),
19765
19840
  fontSize: length9.optional(),
19766
19841
  /**
19767
19842
  * If true, text will knock out underlying silkscreen
19768
19843
  */
19769
- isKnockout: z152.boolean().optional(),
19844
+ isKnockout: z154.boolean().optional(),
19770
19845
  knockoutPadding: length9.optional(),
19771
19846
  knockoutPaddingLeft: length9.optional(),
19772
19847
  knockoutPaddingRight: length9.optional(),
19773
19848
  knockoutPaddingTop: length9.optional(),
19774
19849
  knockoutPaddingBottom: length9.optional(),
19775
- layers: z152.array(layer_ref14).optional()
19850
+ layers: z154.array(layer_ref15).optional()
19776
19851
  });
19777
19852
 
19778
19853
  // lib/components/silkscreen-path.ts
19779
19854
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
19780
- import { z as z153 } from "zod";
19855
+ import { z as z155 } from "zod";
19781
19856
  var silkscreenPathProps = pcbLayoutProps.omit({
19782
19857
  pcbLeftEdgeX: true,
19783
19858
  pcbRightEdgeX: true,
@@ -19789,7 +19864,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
19789
19864
  pcbOffsetY: true,
19790
19865
  pcbRotation: true
19791
19866
  }).extend({
19792
- route: z153.array(route_hint_point5),
19867
+ route: z155.array(route_hint_point5),
19793
19868
  strokeWidth: length10.optional()
19794
19869
  });
19795
19870
 
@@ -19811,10 +19886,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
19811
19886
 
19812
19887
  // lib/components/silkscreen-rect.ts
19813
19888
  import { distance as distance47 } from "circuit-json";
19814
- import { z as z154 } from "zod";
19889
+ import { z as z156 } from "zod";
19815
19890
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19816
- filled: z154.boolean().default(true).optional(),
19817
- stroke: z154.enum(["dashed", "solid", "none"]).optional(),
19891
+ filled: z156.boolean().default(true).optional(),
19892
+ stroke: z156.enum(["dashed", "solid", "none"]).optional(),
19818
19893
  strokeWidth: distance47.optional(),
19819
19894
  width: distance47,
19820
19895
  height: distance47,
@@ -19823,10 +19898,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19823
19898
 
19824
19899
  // lib/components/silkscreen-circle.ts
19825
19900
  import { distance as distance48 } from "circuit-json";
19826
- import { z as z155 } from "zod";
19901
+ import { z as z157 } from "zod";
19827
19902
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19828
- isFilled: z155.boolean().optional(),
19829
- isOutline: z155.boolean().optional(),
19903
+ isFilled: z157.boolean().optional(),
19904
+ isOutline: z157.boolean().optional(),
19830
19905
  strokeWidth: distance48.optional(),
19831
19906
  radius: distance48
19832
19907
  });
@@ -19843,70 +19918,70 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
19843
19918
  expectTypesMatch(true);
19844
19919
 
19845
19920
  // lib/components/trace-hint.ts
19846
- import { distance as distance49, layer_ref as layer_ref15, route_hint_point as route_hint_point6 } from "circuit-json";
19847
- import { z as z157 } from "zod";
19848
- var routeHintPointProps = z157.object({
19921
+ import { distance as distance49, layer_ref as layer_ref16, route_hint_point as route_hint_point6 } from "circuit-json";
19922
+ import { z as z159 } from "zod";
19923
+ var routeHintPointProps = z159.object({
19849
19924
  x: distance49,
19850
19925
  y: distance49,
19851
- via: z157.boolean().optional(),
19852
- toLayer: layer_ref15.optional()
19926
+ via: z159.boolean().optional(),
19927
+ toLayer: layer_ref16.optional()
19853
19928
  });
19854
- var traceHintProps = z157.object({
19855
- for: z157.string().optional().describe(
19929
+ var traceHintProps = z159.object({
19930
+ for: z159.string().optional().describe(
19856
19931
  "Selector for the port you're targeting, not required if you're inside a trace"
19857
19932
  ),
19858
- order: z157.number().optional(),
19933
+ order: z159.number().optional(),
19859
19934
  offset: route_hint_point6.or(routeHintPointProps).optional(),
19860
- offsets: z157.array(route_hint_point6).or(z157.array(routeHintPointProps)).optional(),
19861
- traceWidth: z157.number().optional()
19935
+ offsets: z159.array(route_hint_point6).or(z159.array(routeHintPointProps)).optional(),
19936
+ traceWidth: z159.number().optional()
19862
19937
  });
19863
19938
 
19864
19939
  // lib/components/port.ts
19865
19940
  import { distance as distance50 } from "circuit-json";
19866
- import { z as z158 } from "zod";
19941
+ import { z as z160 } from "zod";
19867
19942
  var portProps = commonLayoutProps.extend({
19868
- name: z158.string().optional(),
19869
- pinNumber: z158.number().optional(),
19870
- schStemLength: z158.number().optional(),
19871
- schPinLabelFontSize: z158.enum(["default", "sm"]).or(
19943
+ name: z160.string().optional(),
19944
+ pinNumber: z160.number().optional(),
19945
+ schStemLength: z160.number().optional(),
19946
+ schPinLabelFontSize: z160.enum(["default", "sm"]).or(
19872
19947
  distance50.refine((value) => Number.isFinite(value) && value > 0, {
19873
19948
  message: "Schematic pin-label font size must be positive and finite"
19874
19949
  })
19875
19950
  ).optional(),
19876
- aliases: z158.array(z158.string()).optional(),
19877
- layer: z158.string().optional(),
19878
- layers: z158.array(z158.string()).optional(),
19879
- schX: z158.number().optional(),
19880
- schY: z158.number().optional(),
19951
+ aliases: z160.array(z160.string()).optional(),
19952
+ layer: z160.string().optional(),
19953
+ layers: z160.array(z160.string()).optional(),
19954
+ schX: z160.number().optional(),
19955
+ schY: z160.number().optional(),
19881
19956
  direction: direction.optional(),
19882
- connectsTo: z158.string().or(z158.array(z158.string())).optional(),
19957
+ connectsTo: z160.string().or(z160.array(z160.string())).optional(),
19883
19958
  kicadPinMetadata: kicadPinMetadata.optional(),
19884
- hasInversionCircle: z158.boolean().optional()
19959
+ hasInversionCircle: z160.boolean().optional()
19885
19960
  });
19886
19961
 
19887
19962
  // lib/components/pcb-note-text.ts
19888
19963
  import { length as length11 } from "circuit-json";
19889
- import { z as z159 } from "zod";
19964
+ import { z as z161 } from "zod";
19890
19965
  var pcbNoteTextProps = pcbLayoutProps.extend({
19891
- text: z159.string(),
19892
- anchorAlignment: z159.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19893
- font: z159.enum(["tscircuit2024"]).optional(),
19966
+ text: z161.string(),
19967
+ anchorAlignment: z161.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
19968
+ font: z161.enum(["tscircuit2024"]).optional(),
19894
19969
  fontSize: length11.optional(),
19895
- color: z159.string().optional()
19970
+ color: z161.string().optional()
19896
19971
  });
19897
19972
  expectTypesMatch(true);
19898
19973
 
19899
19974
  // lib/components/pcb-note-rect.ts
19900
19975
  import { distance as distance51 } from "circuit-json";
19901
- import { z as z160 } from "zod";
19976
+ import { z as z162 } from "zod";
19902
19977
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
19903
19978
  width: distance51,
19904
19979
  height: distance51,
19905
19980
  strokeWidth: distance51.optional(),
19906
- isFilled: z160.boolean().optional(),
19907
- hasStroke: z160.boolean().optional(),
19908
- isStrokeDashed: z160.boolean().optional(),
19909
- color: z160.string().optional(),
19981
+ isFilled: z162.boolean().optional(),
19982
+ hasStroke: z162.boolean().optional(),
19983
+ isStrokeDashed: z162.boolean().optional(),
19984
+ color: z162.string().optional(),
19910
19985
  cornerRadius: distance51.optional()
19911
19986
  });
19912
19987
  expectTypesMatch(true);
@@ -19916,7 +19991,7 @@ import {
19916
19991
  length as length12,
19917
19992
  route_hint_point as route_hint_point7
19918
19993
  } from "circuit-json";
19919
- import { z as z161 } from "zod";
19994
+ import { z as z163 } from "zod";
19920
19995
  var pcbNotePathProps = pcbLayoutProps.omit({
19921
19996
  pcbLeftEdgeX: true,
19922
19997
  pcbRightEdgeX: true,
@@ -19928,15 +20003,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
19928
20003
  pcbOffsetY: true,
19929
20004
  pcbRotation: true
19930
20005
  }).extend({
19931
- route: z161.array(route_hint_point7),
20006
+ route: z163.array(route_hint_point7),
19932
20007
  strokeWidth: length12.optional(),
19933
- color: z161.string().optional()
20008
+ color: z163.string().optional()
19934
20009
  });
19935
20010
  expectTypesMatch(true);
19936
20011
 
19937
20012
  // lib/components/pcb-note-line.ts
19938
20013
  import { distance as distance52 } from "circuit-json";
19939
- import { z as z162 } from "zod";
20014
+ import { z as z164 } from "zod";
19940
20015
  var pcbNoteLineProps = pcbLayoutProps.omit({
19941
20016
  pcbLeftEdgeX: true,
19942
20017
  pcbRightEdgeX: true,
@@ -19953,15 +20028,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
19953
20028
  x2: distance52,
19954
20029
  y2: distance52,
19955
20030
  strokeWidth: distance52.optional(),
19956
- color: z162.string().optional(),
19957
- isDashed: z162.boolean().optional()
20031
+ color: z164.string().optional(),
20032
+ isDashed: z164.boolean().optional()
19958
20033
  });
19959
20034
  expectTypesMatch(true);
19960
20035
 
19961
20036
  // lib/components/pcb-note-dimension.ts
19962
20037
  import { distance as distance53, length as length13 } from "circuit-json";
19963
- import { z as z163 } from "zod";
19964
- var dimensionTarget2 = z163.union([z163.string(), point]);
20038
+ import { z as z165 } from "zod";
20039
+ var dimensionTarget2 = z165.union([z165.string(), point]);
19965
20040
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
19966
20041
  pcbLeftEdgeX: true,
19967
20042
  pcbRightEdgeX: true,
@@ -19975,117 +20050,117 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
19975
20050
  }).extend({
19976
20051
  from: dimensionTarget2,
19977
20052
  to: dimensionTarget2,
19978
- text: z163.string().optional(),
20053
+ text: z165.string().optional(),
19979
20054
  offset: distance53.optional(),
19980
- offsetDirection: z163.object({ x: z163.number().finite(), y: z163.number().finite() }).optional(),
19981
- font: z163.enum(["tscircuit2024"]).optional(),
20055
+ offsetDirection: z165.object({ x: z165.number().finite(), y: z165.number().finite() }).optional(),
20056
+ font: z165.enum(["tscircuit2024"]).optional(),
19982
20057
  fontSize: length13.optional(),
19983
- color: z163.string().optional(),
20058
+ color: z165.string().optional(),
19984
20059
  arrowSize: distance53.optional(),
19985
- units: z163.enum(["in", "mm"]).optional(),
19986
- outerEdgeToEdge: z163.literal(true).optional(),
19987
- centerToCenter: z163.literal(true).optional(),
19988
- innerEdgeToEdge: z163.literal(true).optional()
20060
+ units: z165.enum(["in", "mm"]).optional(),
20061
+ outerEdgeToEdge: z165.literal(true).optional(),
20062
+ centerToCenter: z165.literal(true).optional(),
20063
+ innerEdgeToEdge: z165.literal(true).optional()
19989
20064
  });
19990
20065
  expectTypesMatch(
19991
20066
  true
19992
20067
  );
19993
20068
 
19994
20069
  // lib/platformConfig.ts
19995
- import { z as z164 } from "zod";
19996
- var unvalidatedCircuitJson = z164.array(z164.any()).describe("Circuit JSON");
19997
- var footprintLibraryResult = z164.object({
19998
- footprintCircuitJson: z164.array(z164.any()),
20070
+ import { z as z166 } from "zod";
20071
+ var unvalidatedCircuitJson = z166.array(z166.any()).describe("Circuit JSON");
20072
+ var footprintLibraryResult = z166.object({
20073
+ footprintCircuitJson: z166.array(z166.any()),
19999
20074
  cadModel: cadModelProp.optional()
20000
20075
  });
20001
- var pathToCircuitJsonFn = z164.function().args(z164.string()).returns(z164.promise(footprintLibraryResult)).or(
20002
- z164.function().args(
20003
- z164.string(),
20004
- z164.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
20005
- ).returns(z164.promise(footprintLibraryResult))
20076
+ var pathToCircuitJsonFn = z166.function().args(z166.string()).returns(z166.promise(footprintLibraryResult)).or(
20077
+ z166.function().args(
20078
+ z166.string(),
20079
+ z166.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
20080
+ ).returns(z166.promise(footprintLibraryResult))
20006
20081
  ).describe("A function that takes a path and returns Circuit JSON");
20007
- var footprintFileParserEntry = z164.object({
20008
- loadFromUrl: z164.function().args(z164.string()).returns(z164.promise(footprintLibraryResult)).describe(
20082
+ var footprintFileParserEntry = z166.object({
20083
+ loadFromUrl: z166.function().args(z166.string()).returns(z166.promise(footprintLibraryResult)).describe(
20009
20084
  "A function that takes a footprint file URL and returns Circuit JSON"
20010
20085
  )
20011
20086
  });
20012
- var spiceEngineSimulationResult = z164.object({
20013
- engineVersionString: z164.string().optional(),
20087
+ var spiceEngineSimulationResult = z166.object({
20088
+ engineVersionString: z166.string().optional(),
20014
20089
  simulationResultCircuitJson: unvalidatedCircuitJson
20015
20090
  });
20016
- var spiceEngineZod = z164.object({
20017
- simulate: z164.function().args(z164.string()).returns(z164.promise(spiceEngineSimulationResult)).describe(
20091
+ var spiceEngineZod = z166.object({
20092
+ simulate: z166.function().args(z166.string()).returns(z166.promise(spiceEngineSimulationResult)).describe(
20018
20093
  "A function that takes a SPICE string and returns a simulation result"
20019
20094
  )
20020
20095
  });
20021
- var defaultSpiceEngine = z164.custom(
20096
+ var defaultSpiceEngine = z166.custom(
20022
20097
  (value) => typeof value === "string"
20023
20098
  );
20024
- var autorouterInstance = z164.object({
20025
- run: z164.function().args().returns(z164.promise(z164.unknown())).describe("Run the autorouter"),
20026
- getOutputSimpleRouteJson: z164.function().args().returns(z164.promise(z164.any())).describe("Get the resulting SimpleRouteJson")
20099
+ var autorouterInstance = z166.object({
20100
+ run: z166.function().args().returns(z166.promise(z166.unknown())).describe("Run the autorouter"),
20101
+ getOutputSimpleRouteJson: z166.function().args().returns(z166.promise(z166.any())).describe("Get the resulting SimpleRouteJson")
20027
20102
  });
20028
- var autorouterDefinition = z164.object({
20029
- createAutorouter: z164.function().args(z164.any(), z164.any().optional()).returns(z164.union([autorouterInstance, z164.promise(autorouterInstance)])).describe("Create an autorouter instance")
20103
+ var autorouterDefinition = z166.object({
20104
+ createAutorouter: z166.function().args(z166.any(), z166.any().optional()).returns(z166.union([autorouterInstance, z166.promise(autorouterInstance)])).describe("Create an autorouter instance")
20030
20105
  });
20031
- var platformFetch = z164.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
20032
- var localCacheEngine = z164.custom(
20106
+ var platformFetch = z166.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
20107
+ var localCacheEngine = z166.custom(
20033
20108
  (value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
20034
20109
  );
20035
- var fabricatorEngine = z164.custom(
20110
+ var fabricatorEngine = z166.custom(
20036
20111
  (value) => typeof value === "object" && value !== null && "runDrcChecks" in value && typeof value.runDrcChecks === "function"
20037
20112
  );
20038
- var platformConfig = z164.object({
20113
+ var platformConfig = z166.object({
20039
20114
  partsEngine: partsEngine.optional(),
20040
- checkAvailability: z164.boolean().describe(
20115
+ checkAvailability: z166.boolean().describe(
20041
20116
  "Opt in to networked JLCPCB availability checks during rendering. Disabled by default; enabling adds non-deterministic diagnostics."
20042
20117
  ).optional(),
20043
20118
  fabricatorEngine: fabricatorEngine.optional(),
20044
20119
  autorouter: autorouterProp.optional(),
20045
- autorouterMap: z164.record(z164.string(), autorouterDefinition).optional(),
20046
- allowLegacyAutorouters: z164.boolean().optional(),
20120
+ autorouterMap: z166.record(z166.string(), autorouterDefinition).optional(),
20121
+ allowLegacyAutorouters: z166.boolean().optional(),
20047
20122
  registryApiUrl: url.optional(),
20048
20123
  cloudAutorouterUrl: url.optional(),
20049
- projectName: z164.string().optional(),
20124
+ projectName: z166.string().optional(),
20050
20125
  projectBaseUrl: url.optional(),
20051
- version: z164.string().optional(),
20126
+ version: z166.string().optional(),
20052
20127
  url: url.optional(),
20053
- printBoardInformationToSilkscreen: z164.boolean().optional(),
20054
- includeBoardFiles: z164.array(z164.string()).describe(
20128
+ printBoardInformationToSilkscreen: z166.boolean().optional(),
20129
+ includeBoardFiles: z166.array(z166.string()).describe(
20055
20130
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
20056
20131
  ).optional(),
20057
- snapshotsDir: z164.string().describe(
20132
+ snapshotsDir: z166.string().describe(
20058
20133
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
20059
20134
  ).optional(),
20060
20135
  defaultSpiceEngine: defaultSpiceEngine.optional(),
20061
- unitPreference: z164.enum(["mm", "in", "mil"]).optional(),
20136
+ unitPreference: z166.enum(["mm", "in", "mil"]).optional(),
20062
20137
  localCacheEngine: localCacheEngine.optional(),
20063
- useCloudAutorouter: z164.boolean().optional(),
20064
- enablePartOrientationAnalysis: z164.boolean().optional(),
20065
- pcbPackSolverTimeoutMs: z164.number().finite().positive().optional(),
20066
- pcbDisabled: z164.boolean().optional(),
20067
- routingDisabled: z164.boolean().optional(),
20068
- schematicDisabled: z164.boolean().optional(),
20069
- partsEngineDisabled: z164.boolean().optional(),
20070
- analogSimulationDisabled: z164.boolean().optional(),
20071
- drcChecksDisabled: z164.boolean().optional(),
20072
- netlistDrcChecksDisabled: z164.boolean().optional(),
20073
- routingDrcChecksDisabled: z164.boolean().optional(),
20074
- placementDrcChecksDisabled: z164.boolean().optional(),
20075
- pinSpecificationDrcChecksDisabled: z164.boolean().optional(),
20076
- spiceEngineMap: z164.record(z164.string(), spiceEngineZod).optional(),
20077
- footprintLibraryMap: z164.record(
20078
- z164.string(),
20079
- z164.union([
20138
+ useCloudAutorouter: z166.boolean().optional(),
20139
+ enablePartOrientationAnalysis: z166.boolean().optional(),
20140
+ pcbPackSolverTimeoutMs: z166.number().finite().positive().optional(),
20141
+ pcbDisabled: z166.boolean().optional(),
20142
+ routingDisabled: z166.boolean().optional(),
20143
+ schematicDisabled: z166.boolean().optional(),
20144
+ partsEngineDisabled: z166.boolean().optional(),
20145
+ analogSimulationDisabled: z166.boolean().optional(),
20146
+ drcChecksDisabled: z166.boolean().optional(),
20147
+ netlistDrcChecksDisabled: z166.boolean().optional(),
20148
+ routingDrcChecksDisabled: z166.boolean().optional(),
20149
+ placementDrcChecksDisabled: z166.boolean().optional(),
20150
+ pinSpecificationDrcChecksDisabled: z166.boolean().optional(),
20151
+ spiceEngineMap: z166.record(z166.string(), spiceEngineZod).optional(),
20152
+ footprintLibraryMap: z166.record(
20153
+ z166.string(),
20154
+ z166.union([
20080
20155
  pathToCircuitJsonFn,
20081
- z164.record(
20082
- z164.string(),
20083
- z164.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
20156
+ z166.record(
20157
+ z166.string(),
20158
+ z166.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
20084
20159
  )
20085
20160
  ])
20086
20161
  ).optional(),
20087
- footprintFileParserMap: z164.record(z164.string(), footprintFileParserEntry).optional(),
20088
- resolveProjectStaticFileImportUrl: z164.function().args(z164.string()).returns(z164.promise(z164.string())).describe(
20162
+ footprintFileParserMap: z166.record(z166.string(), footprintFileParserEntry).optional(),
20163
+ resolveProjectStaticFileImportUrl: z166.function().args(z166.string()).returns(z166.promise(z166.string())).describe(
20089
20164
  "A function that returns a string URL for static files for the project"
20090
20165
  ).optional(),
20091
20166
  platformFetch: platformFetch.optional()
@@ -20300,6 +20375,8 @@ export {
20300
20375
  pcbNoteTextProps,
20301
20376
  pcbPath,
20302
20377
  pcbPathPoint,
20378
+ pcbReturnCurrentExcitationProps,
20379
+ pcbReturnCurrentSimulationProps,
20303
20380
  pcbSameXConstraintProps,
20304
20381
  pcbSameYConstraintProps,
20305
20382
  pcbSoldermaskOpeningProps,
@@ -20374,6 +20451,7 @@ export {
20374
20451
  silkscreenPathProps,
20375
20452
  silkscreenRectProps,
20376
20453
  silkscreenTextProps,
20454
+ simulationProps,
20377
20455
  smtPadProps,
20378
20456
  solderPasteProps,
20379
20457
  solderjumperProps,