@tscircuit/props 0.0.581 → 0.0.582

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
@@ -16612,6 +16612,7 @@ expectTypesMatch(true);
16612
16612
 
16613
16613
  // lib/components/chip.ts
16614
16614
  import { distance as distance13, supplier_name as supplier_name2 } from "circuit-json";
16615
+ import { isValidElement } from "react";
16615
16616
  import { z as z46 } from "zod";
16616
16617
  var connectionTarget2 = z46.string().or(z46.array(z46.string()).readonly()).or(z46.array(z46.string()));
16617
16618
  var noConnectProp = z46.array(schematicPinLabel).readonly().or(z46.array(schematicPinLabel));
@@ -16619,6 +16620,9 @@ var connectionsProp = z46.custom().pipe(z46.record(z46.string(), connectionTarge
16619
16620
  var spicemodelElement = z46.custom(
16620
16621
  (v) => !!v && typeof v === "object" && "type" in v && "props" in v
16621
16622
  );
16623
+ var internalCircuitElement = z46.custom(
16624
+ (value) => isValidElement(value) && value.type === "internalcircuit"
16625
+ );
16622
16626
  var pinLabelsProp = z46.record(
16623
16627
  schematicPinLabel,
16624
16628
  schematicPinLabel.or(z46.array(schematicPinLabel).readonly()).or(z46.array(schematicPinLabel))
@@ -16645,7 +16649,8 @@ var chipProps = commonComponentProps.extend({
16645
16649
  noSchematicRepresentation: z46.boolean().optional(),
16646
16650
  noConnect: noConnectProp.optional(),
16647
16651
  connections: connectionsProp.optional(),
16648
- spiceModel: spicemodelElement.optional()
16652
+ spiceModel: spicemodelElement.optional(),
16653
+ internalCircuit: internalCircuitElement.optional()
16649
16654
  });
16650
16655
  var bugProps = chipProps;
16651
16656
  expectTypesMatch(true);
@@ -17618,10 +17623,19 @@ var inductorProps = commonComponentProps.extend({
17618
17623
  });
17619
17624
  expectTypesMatch(true);
17620
17625
 
17621
- // lib/components/diode.ts
17626
+ // lib/components/internal-circuit.ts
17622
17627
  import { z as z86 } from "zod";
17628
+ var internalCircuitProps = z86.object({
17629
+ children: z86.custom().optional()
17630
+ });
17631
+ expectTypesMatch(
17632
+ true
17633
+ );
17634
+
17635
+ // lib/components/diode.ts
17636
+ import { z as z87 } from "zod";
17623
17637
  var diodePins = lrPolarPins;
17624
- var diodeConnectionKeys = z86.enum([
17638
+ var diodeConnectionKeys = z87.enum([
17625
17639
  "anode",
17626
17640
  "cathode",
17627
17641
  "pin1",
@@ -17629,13 +17643,13 @@ var diodeConnectionKeys = z86.enum([
17629
17643
  "pos",
17630
17644
  "neg"
17631
17645
  ]);
17632
- var connectionTarget3 = z86.string().or(z86.array(z86.string()).readonly()).or(z86.array(z86.string()));
17633
- var connectionsProp2 = z86.record(diodeConnectionKeys, connectionTarget3);
17634
- var diodePinLabelsProp = z86.record(
17635
- z86.enum(diodePins),
17636
- schematicPinLabel.or(z86.array(schematicPinLabel).readonly()).or(z86.array(schematicPinLabel))
17646
+ var connectionTarget3 = z87.string().or(z87.array(z87.string()).readonly()).or(z87.array(z87.string()));
17647
+ var connectionsProp2 = z87.record(diodeConnectionKeys, connectionTarget3);
17648
+ var diodePinLabelsProp = z87.record(
17649
+ z87.enum(diodePins),
17650
+ schematicPinLabel.or(z87.array(schematicPinLabel).readonly()).or(z87.array(schematicPinLabel))
17637
17651
  );
17638
- var diodeVariant = z86.enum([
17652
+ var diodeVariant = z87.enum([
17639
17653
  "standard",
17640
17654
  "schottky",
17641
17655
  "zener",
@@ -17646,12 +17660,12 @@ var diodeVariant = z86.enum([
17646
17660
  var diodeProps = commonComponentProps.extend({
17647
17661
  connections: connectionsProp2.optional(),
17648
17662
  variant: diodeVariant.optional().default("standard"),
17649
- standard: z86.boolean().optional(),
17650
- schottky: z86.boolean().optional(),
17651
- zener: z86.boolean().optional(),
17652
- avalanche: z86.boolean().optional(),
17653
- photo: z86.boolean().optional(),
17654
- tvs: z86.boolean().optional(),
17663
+ standard: z87.boolean().optional(),
17664
+ schottky: z87.boolean().optional(),
17665
+ zener: z87.boolean().optional(),
17666
+ avalanche: z87.boolean().optional(),
17667
+ photo: z87.boolean().optional(),
17668
+ tvs: z87.boolean().optional(),
17655
17669
  schOrientation: schematicOrientation.optional(),
17656
17670
  pinLabels: diodePinLabelsProp.optional()
17657
17671
  }).superRefine((data, ctx) => {
@@ -17665,11 +17679,11 @@ var diodeProps = commonComponentProps.extend({
17665
17679
  ].filter(Boolean).length;
17666
17680
  if (enabledFlags > 1) {
17667
17681
  ctx.addIssue({
17668
- code: z86.ZodIssueCode.custom,
17682
+ code: z87.ZodIssueCode.custom,
17669
17683
  message: "Exactly one diode variant must be enabled",
17670
17684
  path: []
17671
17685
  });
17672
- return z86.INVALID;
17686
+ return z87.INVALID;
17673
17687
  }
17674
17688
  }).transform((data) => {
17675
17689
  const result = {
@@ -17715,34 +17729,34 @@ var diodeProps = commonComponentProps.extend({
17715
17729
  expectTypesMatch(true);
17716
17730
 
17717
17731
  // lib/components/led.ts
17718
- import { z as z87 } from "zod";
17732
+ import { z as z88 } from "zod";
17719
17733
  var ledProps = commonComponentProps.extend({
17720
- color: z87.string().optional(),
17721
- wavelength: z87.string().optional(),
17722
- schDisplayValue: z87.string().optional(),
17734
+ color: z88.string().optional(),
17735
+ wavelength: z88.string().optional(),
17736
+ schDisplayValue: z88.string().optional(),
17723
17737
  schOrientation: schematicOrientation.optional(),
17724
17738
  connections: createConnectionsProp(lrPolarPins).optional(),
17725
- laser: z87.boolean().optional()
17739
+ laser: z88.boolean().optional()
17726
17740
  });
17727
17741
  var ledPins = lrPolarPins;
17728
17742
 
17729
17743
  // lib/components/switch.ts
17730
17744
  import { ms as ms2, frequency as frequency3 } from "circuit-json";
17731
- import { z as z88 } from "zod";
17745
+ import { z as z89 } from "zod";
17732
17746
  var switchProps = commonComponentProps.extend({
17733
- type: z88.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17734
- isNormallyClosed: z88.boolean().optional().default(false),
17735
- spst: z88.boolean().optional(),
17736
- spdt: z88.boolean().optional(),
17737
- dpst: z88.boolean().optional(),
17738
- dpdt: z88.boolean().optional(),
17747
+ type: z89.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
17748
+ isNormallyClosed: z89.boolean().optional().default(false),
17749
+ spst: z89.boolean().optional(),
17750
+ spdt: z89.boolean().optional(),
17751
+ dpst: z89.boolean().optional(),
17752
+ dpdt: z89.boolean().optional(),
17739
17753
  pinLabels: pinLabelsProp.optional(),
17740
17754
  simSwitchFrequency: frequency3.optional(),
17741
17755
  simCloseAt: ms2.optional(),
17742
17756
  simOpenAt: ms2.optional(),
17743
- simStartClosed: z88.boolean().optional(),
17744
- simStartOpen: z88.boolean().optional(),
17745
- connections: z88.custom().pipe(z88.record(z88.string(), connectionTarget)).optional()
17757
+ simStartClosed: z89.boolean().optional(),
17758
+ simStartOpen: z89.boolean().optional(),
17759
+ connections: z89.custom().pipe(z89.record(z89.string(), connectionTarget)).optional()
17746
17760
  }).transform((props) => {
17747
17761
  const updatedProps = { ...props };
17748
17762
  if (updatedProps.dpdt) {
@@ -17774,33 +17788,33 @@ expectTypesMatch(true);
17774
17788
 
17775
17789
  // lib/components/fabrication-note-text.ts
17776
17790
  import { length as length4 } from "circuit-json";
17777
- import { z as z89 } from "zod";
17791
+ import { z as z90 } from "zod";
17778
17792
  var fabricationNoteTextProps = pcbLayoutProps.extend({
17779
- text: z89.string(),
17780
- anchorAlignment: z89.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
17781
- font: z89.enum(["tscircuit2024"]).optional(),
17793
+ text: z90.string(),
17794
+ anchorAlignment: z90.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
17795
+ font: z90.enum(["tscircuit2024"]).optional(),
17782
17796
  fontSize: length4.optional(),
17783
- color: z89.string().optional()
17797
+ color: z90.string().optional()
17784
17798
  });
17785
17799
  expectTypesMatch(true);
17786
17800
 
17787
17801
  // lib/components/fabrication-note-rect.ts
17788
17802
  import { distance as distance21 } from "circuit-json";
17789
- import { z as z90 } from "zod";
17803
+ import { z as z91 } from "zod";
17790
17804
  var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17791
17805
  width: distance21,
17792
17806
  height: distance21,
17793
17807
  strokeWidth: distance21.optional(),
17794
- isFilled: z90.boolean().optional(),
17795
- hasStroke: z90.boolean().optional(),
17796
- isStrokeDashed: z90.boolean().optional(),
17797
- color: z90.string().optional(),
17808
+ isFilled: z91.boolean().optional(),
17809
+ hasStroke: z91.boolean().optional(),
17810
+ isStrokeDashed: z91.boolean().optional(),
17811
+ color: z91.string().optional(),
17798
17812
  cornerRadius: distance21.optional()
17799
17813
  });
17800
17814
 
17801
17815
  // lib/components/fabrication-note-path.ts
17802
17816
  import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
17803
- import { z as z91 } from "zod";
17817
+ import { z as z92 } from "zod";
17804
17818
  var fabricationNotePathProps = pcbLayoutProps.omit({
17805
17819
  pcbLeftEdgeX: true,
17806
17820
  pcbRightEdgeX: true,
@@ -17812,15 +17826,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
17812
17826
  pcbOffsetY: true,
17813
17827
  pcbRotation: true
17814
17828
  }).extend({
17815
- route: z91.array(route_hint_point3),
17829
+ route: z92.array(route_hint_point3),
17816
17830
  strokeWidth: length5.optional(),
17817
- color: z91.string().optional()
17831
+ color: z92.string().optional()
17818
17832
  });
17819
17833
 
17820
17834
  // lib/components/fabrication-note-dimension.ts
17821
17835
  import { distance as distance22, length as length6 } from "circuit-json";
17822
- import { z as z92 } from "zod";
17823
- var dimensionTarget = z92.union([z92.string(), point]);
17836
+ import { z as z93 } from "zod";
17837
+ var dimensionTarget = z93.union([z93.string(), point]);
17824
17838
  var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17825
17839
  pcbLeftEdgeX: true,
17826
17840
  pcbRightEdgeX: true,
@@ -17834,54 +17848,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
17834
17848
  }).extend({
17835
17849
  from: dimensionTarget,
17836
17850
  to: dimensionTarget,
17837
- text: z92.string().optional(),
17851
+ text: z93.string().optional(),
17838
17852
  offset: distance22.optional(),
17839
- font: z92.enum(["tscircuit2024"]).optional(),
17853
+ font: z93.enum(["tscircuit2024"]).optional(),
17840
17854
  fontSize: length6.optional(),
17841
- color: z92.string().optional(),
17855
+ color: z93.string().optional(),
17842
17856
  arrowSize: distance22.optional(),
17843
- units: z92.enum(["in", "mm"]).optional(),
17844
- outerEdgeToEdge: z92.literal(true).optional(),
17845
- centerToCenter: z92.literal(true).optional(),
17846
- innerEdgeToEdge: z92.literal(true).optional()
17857
+ units: z93.enum(["in", "mm"]).optional(),
17858
+ outerEdgeToEdge: z93.literal(true).optional(),
17859
+ centerToCenter: z93.literal(true).optional(),
17860
+ innerEdgeToEdge: z93.literal(true).optional()
17847
17861
  });
17848
17862
  expectTypesMatch(true);
17849
17863
 
17850
17864
  // lib/components/pcb-trace.ts
17851
17865
  import { distance as distance23, route_hint_point as route_hint_point4 } from "circuit-json";
17852
- import { z as z93 } from "zod";
17853
- var pcbTraceProps = z93.object({
17854
- layer: z93.string().optional(),
17866
+ import { z as z94 } from "zod";
17867
+ var pcbTraceProps = z94.object({
17868
+ layer: z94.string().optional(),
17855
17869
  thickness: distance23.optional(),
17856
- route: z93.array(route_hint_point4)
17870
+ route: z94.array(route_hint_point4)
17857
17871
  });
17858
17872
 
17859
17873
  // lib/components/via.ts
17860
17874
  import { distance as distance24, layer_ref as layer_ref6 } from "circuit-json";
17861
- import { z as z94 } from "zod";
17875
+ import { z as z95 } from "zod";
17862
17876
  var viaProps = commonLayoutProps.extend({
17863
- name: z94.string().optional(),
17877
+ name: z95.string().optional(),
17864
17878
  fromLayer: layer_ref6.optional(),
17865
17879
  toLayer: layer_ref6.optional(),
17866
17880
  holeDiameter: distance24.optional(),
17867
17881
  outerDiameter: distance24.optional(),
17868
- layers: z94.array(layer_ref6).optional(),
17869
- connectsTo: z94.string().or(z94.array(z94.string())).optional(),
17870
- netIsAssignable: z94.boolean().optional()
17882
+ layers: z95.array(layer_ref6).optional(),
17883
+ connectsTo: z95.string().or(z95.array(z95.string())).optional(),
17884
+ netIsAssignable: z95.boolean().optional()
17871
17885
  });
17872
17886
  expectTypesMatch(true);
17873
17887
 
17874
17888
  // lib/components/testpoint.ts
17875
17889
  import { distance as distance25 } from "circuit-json";
17876
- import { z as z95 } from "zod";
17890
+ import { z as z96 } from "zod";
17877
17891
  var testpointPins = ["pin1"];
17878
- var testpointConnectionsProp = z95.object({
17892
+ var testpointConnectionsProp = z96.object({
17879
17893
  pin1: connectionTarget
17880
17894
  }).strict();
17881
17895
  var testpointProps = commonComponentProps.extend({
17882
17896
  connections: testpointConnectionsProp.optional(),
17883
- footprintVariant: z95.enum(["pad", "through_hole"]).optional(),
17884
- padShape: z95.enum(["rect", "circle"]).optional().default("circle"),
17897
+ footprintVariant: z96.enum(["pad", "through_hole"]).optional(),
17898
+ padShape: z96.enum(["rect", "circle"]).optional().default("circle"),
17885
17899
  padDiameter: distance25.optional(),
17886
17900
  holeDiameter: distance25.optional(),
17887
17901
  width: distance25.optional(),
@@ -17893,45 +17907,45 @@ var testpointProps = commonComponentProps.extend({
17893
17907
  expectTypesMatch(true);
17894
17908
 
17895
17909
  // lib/components/breakoutpoint.ts
17896
- import { z as z96 } from "zod";
17910
+ import { z as z97 } from "zod";
17897
17911
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
17898
- connection: z96.string()
17912
+ connection: z97.string()
17899
17913
  });
17900
17914
  expectTypesMatch(true);
17901
17915
 
17902
17916
  // lib/components/pcb-keepout.ts
17903
17917
  import { distance as distance26, layer_ref as layer_ref7 } from "circuit-json";
17904
- import { z as z97 } from "zod";
17905
- var pcbKeepoutProps = z97.union([
17918
+ import { z as z98 } from "zod";
17919
+ var pcbKeepoutProps = z98.union([
17906
17920
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
17907
- shape: z97.literal("circle"),
17921
+ shape: z98.literal("circle"),
17908
17922
  radius: distance26,
17909
- layers: z97.array(layer_ref7).optional()
17923
+ layers: z98.array(layer_ref7).optional()
17910
17924
  }),
17911
17925
  pcbLayoutProps.extend({
17912
- shape: z97.literal("rect"),
17926
+ shape: z98.literal("rect"),
17913
17927
  width: distance26,
17914
17928
  height: distance26,
17915
- layers: z97.array(layer_ref7).optional()
17929
+ layers: z98.array(layer_ref7).optional()
17916
17930
  })
17917
17931
  ]);
17918
17932
 
17919
17933
  // lib/components/courtyard-rect.ts
17920
17934
  import { distance as distance27 } from "circuit-json";
17921
- import { z as z98 } from "zod";
17935
+ import { z as z99 } from "zod";
17922
17936
  var courtyardRectProps = pcbLayoutProps.extend({
17923
17937
  width: distance27,
17924
17938
  height: distance27,
17925
17939
  strokeWidth: distance27.optional(),
17926
- isFilled: z98.boolean().optional(),
17927
- hasStroke: z98.boolean().optional(),
17928
- isStrokeDashed: z98.boolean().optional(),
17929
- color: z98.string().optional()
17940
+ isFilled: z99.boolean().optional(),
17941
+ hasStroke: z99.boolean().optional(),
17942
+ isStrokeDashed: z99.boolean().optional(),
17943
+ color: z99.string().optional()
17930
17944
  });
17931
17945
 
17932
17946
  // lib/components/courtyard-outline.ts
17933
17947
  import { length as length7 } from "circuit-json";
17934
- import { z as z99 } from "zod";
17948
+ import { z as z100 } from "zod";
17935
17949
  var courtyardOutlineProps = pcbLayoutProps.omit({
17936
17950
  pcbLeftEdgeX: true,
17937
17951
  pcbRightEdgeX: true,
@@ -17943,11 +17957,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
17943
17957
  pcbOffsetY: true,
17944
17958
  pcbRotation: true
17945
17959
  }).extend({
17946
- outline: z99.array(point),
17960
+ outline: z100.array(point),
17947
17961
  strokeWidth: length7.optional(),
17948
- isClosed: z99.boolean().optional(),
17949
- isStrokeDashed: z99.boolean().optional(),
17950
- color: z99.string().optional()
17962
+ isClosed: z100.boolean().optional(),
17963
+ isStrokeDashed: z100.boolean().optional(),
17964
+ color: z100.string().optional()
17951
17965
  });
17952
17966
 
17953
17967
  // lib/components/courtyard-circle.ts
@@ -17967,35 +17981,35 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
17967
17981
  });
17968
17982
 
17969
17983
  // lib/components/copper-pour.ts
17970
- import { z as z102 } from "zod";
17984
+ import { z as z103 } from "zod";
17971
17985
  import { layer_ref as layer_ref8 } from "circuit-json";
17972
- var copperPourProps = z102.object({
17973
- name: z102.string().optional(),
17986
+ var copperPourProps = z103.object({
17987
+ name: z103.string().optional(),
17974
17988
  layer: layer_ref8,
17975
- connectsTo: z102.string(),
17976
- unbroken: z102.boolean().optional(),
17989
+ connectsTo: z103.string(),
17990
+ unbroken: z103.boolean().optional(),
17977
17991
  padMargin: distance.optional(),
17978
17992
  traceMargin: distance.optional(),
17979
17993
  clearance: distance.optional(),
17980
17994
  boardEdgeMargin: distance.optional(),
17981
17995
  cutoutMargin: distance.optional(),
17982
- outline: z102.array(point).optional(),
17983
- coveredWithSolderMask: z102.boolean().optional().default(true)
17996
+ outline: z103.array(point).optional(),
17997
+ coveredWithSolderMask: z103.boolean().optional().default(true)
17984
17998
  });
17985
17999
  expectTypesMatch(true);
17986
18000
 
17987
18001
  // lib/components/cadassembly.ts
17988
18002
  import { layer_ref as layer_ref9 } from "circuit-json";
17989
- import { z as z103 } from "zod";
17990
- var cadassemblyProps = z103.object({
18003
+ import { z as z104 } from "zod";
18004
+ var cadassemblyProps = z104.object({
17991
18005
  originalLayer: layer_ref9.default("top").optional(),
17992
- children: z103.any().optional()
18006
+ children: z104.any().optional()
17993
18007
  });
17994
18008
  expectTypesMatch(true);
17995
18009
 
17996
18010
  // lib/components/cadmodel.ts
17997
- import { z as z104 } from "zod";
17998
- var pcbPosition = z104.object({
18011
+ import { z as z105 } from "zod";
18012
+ var pcbPosition = z105.object({
17999
18013
  pcbX: pcbCoordinate.optional(),
18000
18014
  pcbY: pcbCoordinate.optional(),
18001
18015
  pcbLeftEdgeX: pcbCoordinate.optional(),
@@ -18012,7 +18026,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
18012
18026
  });
18013
18027
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
18014
18028
  expectTypesMatch(true);
18015
- var cadmodelProps = z104.union([z104.null(), url, cadModelObject]);
18029
+ var cadmodelProps = z105.union([z105.null(), url, cadModelObject]);
18016
18030
 
18017
18031
  // lib/components/power-source.ts
18018
18032
  import { voltage as voltage3 } from "circuit-json";
@@ -18022,9 +18036,9 @@ var powerSourceProps = commonComponentProps.extend({
18022
18036
 
18023
18037
  // lib/components/voltagesource.ts
18024
18038
  import { frequency as frequency4, ms as ms3, rotation as rotation5, voltage as voltage4 } from "circuit-json";
18025
- import { z as z105 } from "zod";
18039
+ import { z as z106 } from "zod";
18026
18040
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18027
- var percentage = z105.union([z105.string(), z105.number()]).transform((val) => {
18041
+ var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
18028
18042
  if (typeof val === "string") {
18029
18043
  if (val.endsWith("%")) {
18030
18044
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18033,13 +18047,13 @@ var percentage = z105.union([z105.string(), z105.number()]).transform((val) => {
18033
18047
  }
18034
18048
  return val;
18035
18049
  }).pipe(
18036
- z105.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18050
+ z106.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18037
18051
  );
18038
18052
  var voltageSourceProps = commonComponentProps.extend({
18039
18053
  voltage: voltage4.optional(),
18040
18054
  frequency: frequency4.optional(),
18041
18055
  peakToPeakVoltage: voltage4.optional(),
18042
- waveShape: z105.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18056
+ waveShape: z106.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18043
18057
  phase: rotation5.optional(),
18044
18058
  dutyCycle: percentage.optional(),
18045
18059
  pulseDelay: ms3.optional(),
@@ -18054,9 +18068,9 @@ expectTypesMatch(true);
18054
18068
 
18055
18069
  // lib/components/currentsource.ts
18056
18070
  import { frequency as frequency5, rotation as rotation6, current } from "circuit-json";
18057
- import { z as z106 } from "zod";
18071
+ import { z as z107 } from "zod";
18058
18072
  var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
18059
- var percentage2 = z106.union([z106.string(), z106.number()]).transform((val) => {
18073
+ var percentage2 = z107.union([z107.string(), z107.number()]).transform((val) => {
18060
18074
  if (typeof val === "string") {
18061
18075
  if (val.endsWith("%")) {
18062
18076
  return parseFloat(val.slice(0, -1)) / 100;
@@ -18065,13 +18079,13 @@ var percentage2 = z106.union([z106.string(), z106.number()]).transform((val) =>
18065
18079
  }
18066
18080
  return val;
18067
18081
  }).pipe(
18068
- z106.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18082
+ z107.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
18069
18083
  );
18070
18084
  var currentSourceProps = commonComponentProps.extend({
18071
18085
  current: current.optional(),
18072
18086
  frequency: frequency5.optional(),
18073
18087
  peakToPeakCurrent: current.optional(),
18074
- waveShape: z106.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18088
+ waveShape: z107.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
18075
18089
  phase: rotation6.optional(),
18076
18090
  dutyCycle: percentage2.optional(),
18077
18091
  connections: createConnectionsProp(currentSourcePinLabels).optional()
@@ -18080,21 +18094,21 @@ var currentSourcePins = lrPolarPins;
18080
18094
  expectTypesMatch(true);
18081
18095
 
18082
18096
  // lib/components/voltageprobe.ts
18083
- import { z as z107 } from "zod";
18097
+ import { z as z108 } from "zod";
18084
18098
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
18085
- name: z107.string().optional(),
18086
- connectsTo: z107.string(),
18087
- referenceTo: z107.string().optional(),
18088
- color: z107.string().optional(),
18089
- graphDisplayName: z107.string().optional(),
18090
- graphCenter: z107.number().optional(),
18091
- graphVerticalOffset: z107.number().or(z107.string()).optional(),
18092
- graphVoltagePerDiv: z107.number().or(z107.string()).optional()
18099
+ name: z108.string().optional(),
18100
+ connectsTo: z108.string(),
18101
+ referenceTo: z108.string().optional(),
18102
+ color: z108.string().optional(),
18103
+ graphDisplayName: z108.string().optional(),
18104
+ graphCenter: z108.number().optional(),
18105
+ graphVerticalOffset: z108.number().or(z108.string()).optional(),
18106
+ graphVoltagePerDiv: z108.number().or(z108.string()).optional()
18093
18107
  });
18094
18108
  expectTypesMatch(true);
18095
18109
 
18096
18110
  // lib/components/ammeter.ts
18097
- import { z as z108 } from "zod";
18111
+ import { z as z109 } from "zod";
18098
18112
  var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
18099
18113
  var hasAmmeterConnectionPair = (connections) => {
18100
18114
  return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
@@ -18104,57 +18118,57 @@ var ammeterProps = commonComponentProps.extend({
18104
18118
  hasAmmeterConnectionPair,
18105
18119
  "Ammeter connections must include either pos/neg or pin1/pin2"
18106
18120
  ),
18107
- color: z108.string().optional(),
18108
- graphDisplayName: z108.string().optional(),
18109
- graphCenter: z108.number().optional(),
18110
- graphVerticalOffset: z108.number().or(z108.string()).optional(),
18111
- graphCurrentPerDiv: z108.number().or(z108.string()).optional()
18121
+ color: z109.string().optional(),
18122
+ graphDisplayName: z109.string().optional(),
18123
+ graphCenter: z109.number().optional(),
18124
+ graphVerticalOffset: z109.number().or(z109.string()).optional(),
18125
+ graphCurrentPerDiv: z109.number().or(z109.string()).optional()
18112
18126
  });
18113
18127
  var ammeterPins = ammeterPinLabels;
18114
18128
  expectTypesMatch(true);
18115
18129
 
18116
18130
  // lib/components/schematic-arc.ts
18117
18131
  import { distance as distance30, point as point5, rotation as rotation7 } from "circuit-json";
18118
- import { z as z109 } from "zod";
18119
- var schematicArcProps = z109.object({
18132
+ import { z as z110 } from "zod";
18133
+ var schematicArcProps = z110.object({
18120
18134
  center: point5,
18121
18135
  radius: distance30,
18122
18136
  startAngleDegrees: rotation7,
18123
18137
  endAngleDegrees: rotation7,
18124
- direction: z109.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18138
+ direction: z110.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
18125
18139
  strokeWidth: distance30.optional(),
18126
- color: z109.string().optional(),
18127
- isDashed: z109.boolean().optional().default(false)
18140
+ color: z110.string().optional(),
18141
+ isDashed: z110.boolean().optional().default(false)
18128
18142
  });
18129
18143
  expectTypesMatch(true);
18130
18144
 
18131
18145
  // lib/components/toolingrail.ts
18132
- import { z as z110 } from "zod";
18133
- var toolingrailProps = z110.object({
18134
- children: z110.any().optional()
18146
+ import { z as z111 } from "zod";
18147
+ var toolingrailProps = z111.object({
18148
+ children: z111.any().optional()
18135
18149
  });
18136
18150
  expectTypesMatch(true);
18137
18151
 
18138
18152
  // lib/components/schematic-box.ts
18139
18153
  import { distance as distance31 } from "circuit-json";
18140
- import { z as z111 } from "zod";
18141
- var schematicBoxProps = z111.object({
18154
+ import { z as z112 } from "zod";
18155
+ var schematicBoxProps = z112.object({
18142
18156
  schX: distance31.optional(),
18143
18157
  schY: distance31.optional(),
18144
18158
  width: distance31.optional(),
18145
18159
  height: distance31.optional(),
18146
- overlay: z111.array(z111.string()).optional(),
18160
+ overlay: z112.array(z112.string()).optional(),
18147
18161
  padding: distance31.optional(),
18148
18162
  paddingLeft: distance31.optional(),
18149
18163
  paddingRight: distance31.optional(),
18150
18164
  paddingTop: distance31.optional(),
18151
18165
  paddingBottom: distance31.optional(),
18152
- title: z111.string().optional(),
18166
+ title: z112.string().optional(),
18153
18167
  titleAlignment: ninePointAnchor.default("top_left"),
18154
- titleColor: z111.string().optional(),
18168
+ titleColor: z112.string().optional(),
18155
18169
  titleFontSize: distance31.optional(),
18156
- titleInside: z111.boolean().default(false),
18157
- strokeStyle: z111.enum(["solid", "dashed"]).default("solid")
18170
+ titleInside: z112.boolean().default(false),
18171
+ strokeStyle: z112.enum(["solid", "dashed"]).default("solid")
18158
18172
  }).refine(
18159
18173
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
18160
18174
  {
@@ -18170,15 +18184,15 @@ expectTypesMatch(true);
18170
18184
 
18171
18185
  // lib/components/schematic-circle.ts
18172
18186
  import { distance as distance32, point as point6 } from "circuit-json";
18173
- import { z as z112 } from "zod";
18174
- var schematicCircleProps = z112.object({
18187
+ import { z as z113 } from "zod";
18188
+ var schematicCircleProps = z113.object({
18175
18189
  center: point6,
18176
18190
  radius: distance32,
18177
18191
  strokeWidth: distance32.optional(),
18178
- color: z112.string().optional(),
18179
- isFilled: z112.boolean().optional().default(false),
18180
- fillColor: z112.string().optional(),
18181
- isDashed: z112.boolean().optional().default(false)
18192
+ color: z113.string().optional(),
18193
+ isFilled: z113.boolean().optional().default(false),
18194
+ fillColor: z113.string().optional(),
18195
+ isDashed: z113.boolean().optional().default(false)
18182
18196
  });
18183
18197
  expectTypesMatch(
18184
18198
  true
@@ -18186,32 +18200,32 @@ expectTypesMatch(
18186
18200
 
18187
18201
  // lib/components/schematic-rect.ts
18188
18202
  import { distance as distance33, rotation as rotation8 } from "circuit-json";
18189
- import { z as z113 } from "zod";
18190
- var schematicRectProps = z113.object({
18203
+ import { z as z114 } from "zod";
18204
+ var schematicRectProps = z114.object({
18191
18205
  schX: distance33.optional(),
18192
18206
  schY: distance33.optional(),
18193
18207
  width: distance33,
18194
18208
  height: distance33,
18195
18209
  rotation: rotation8.default(0),
18196
18210
  strokeWidth: distance33.optional(),
18197
- color: z113.string().optional(),
18198
- isFilled: z113.boolean().optional().default(false),
18199
- fillColor: z113.string().optional(),
18200
- isDashed: z113.boolean().optional().default(false)
18211
+ color: z114.string().optional(),
18212
+ isFilled: z114.boolean().optional().default(false),
18213
+ fillColor: z114.string().optional(),
18214
+ isDashed: z114.boolean().optional().default(false)
18201
18215
  });
18202
18216
  expectTypesMatch(true);
18203
18217
 
18204
18218
  // lib/components/schematic-line.ts
18205
18219
  import { distance as distance34 } from "circuit-json";
18206
- import { z as z114 } from "zod";
18207
- var schematicLineProps = z114.object({
18220
+ import { z as z115 } from "zod";
18221
+ var schematicLineProps = z115.object({
18208
18222
  x1: distance34,
18209
18223
  y1: distance34,
18210
18224
  x2: distance34,
18211
18225
  y2: distance34,
18212
18226
  strokeWidth: distance34.optional(),
18213
- color: z114.string().optional(),
18214
- isDashed: z114.boolean().optional().default(false),
18227
+ color: z115.string().optional(),
18228
+ isDashed: z115.boolean().optional().default(false),
18215
18229
  dashLength: distance34.optional(),
18216
18230
  dashGap: distance34.optional()
18217
18231
  });
@@ -18219,11 +18233,11 @@ expectTypesMatch(true);
18219
18233
 
18220
18234
  // lib/components/schematic-text.ts
18221
18235
  import { distance as distance35, rotation as rotation9 } from "circuit-json";
18222
- import { z as z116 } from "zod";
18236
+ import { z as z117 } from "zod";
18223
18237
 
18224
18238
  // lib/common/fivePointAnchor.ts
18225
- import { z as z115 } from "zod";
18226
- var fivePointAnchor = z115.enum([
18239
+ import { z as z116 } from "zod";
18240
+ var fivePointAnchor = z116.enum([
18227
18241
  "center",
18228
18242
  "left",
18229
18243
  "right",
@@ -18232,39 +18246,39 @@ var fivePointAnchor = z115.enum([
18232
18246
  ]);
18233
18247
 
18234
18248
  // lib/components/schematic-text.ts
18235
- var schematicTextProps = z116.object({
18249
+ var schematicTextProps = z117.object({
18236
18250
  schX: distance35.optional(),
18237
18251
  schY: distance35.optional(),
18238
- text: z116.string(),
18239
- fontSize: z116.number().default(1),
18240
- anchor: z116.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18241
- color: z116.string().default("#000000"),
18252
+ text: z117.string(),
18253
+ fontSize: z117.number().default(1),
18254
+ anchor: z117.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
18255
+ color: z117.string().default("#000000"),
18242
18256
  schRotation: rotation9.default(0)
18243
18257
  });
18244
18258
  expectTypesMatch(true);
18245
18259
 
18246
18260
  // lib/components/schematic-path.ts
18247
18261
  import { distance as distance36, point as point7 } from "circuit-json";
18248
- import { z as z117 } from "zod";
18249
- var schematicPathProps = z117.object({
18250
- points: z117.array(point7).optional(),
18251
- svgPath: z117.string().optional(),
18262
+ import { z as z118 } from "zod";
18263
+ var schematicPathProps = z118.object({
18264
+ points: z118.array(point7).optional(),
18265
+ svgPath: z118.string().optional(),
18252
18266
  strokeWidth: distance36.optional(),
18253
- strokeColor: z117.string().optional(),
18267
+ strokeColor: z118.string().optional(),
18254
18268
  dashLength: distance36.optional(),
18255
18269
  dashGap: distance36.optional(),
18256
- isFilled: z117.boolean().optional().default(false),
18257
- fillColor: z117.string().optional()
18270
+ isFilled: z118.boolean().optional().default(false),
18271
+ fillColor: z118.string().optional()
18258
18272
  });
18259
18273
  expectTypesMatch(true);
18260
18274
 
18261
18275
  // lib/components/schematic-table.ts
18262
18276
  import { distance as distance37 } from "circuit-json";
18263
- import { z as z118 } from "zod";
18264
- var schematicTableProps = z118.object({
18277
+ import { z as z119 } from "zod";
18278
+ var schematicTableProps = z119.object({
18265
18279
  schX: distance37.optional(),
18266
18280
  schY: distance37.optional(),
18267
- children: z118.any().optional(),
18281
+ children: z119.any().optional(),
18268
18282
  cellPadding: distance37.optional(),
18269
18283
  borderWidth: distance37.optional(),
18270
18284
  anchor: ninePointAnchor.optional(),
@@ -18274,34 +18288,34 @@ expectTypesMatch(true);
18274
18288
 
18275
18289
  // lib/components/schematic-row.ts
18276
18290
  import { distance as distance38 } from "circuit-json";
18277
- import { z as z119 } from "zod";
18278
- var schematicRowProps = z119.object({
18279
- children: z119.any().optional(),
18291
+ import { z as z120 } from "zod";
18292
+ var schematicRowProps = z120.object({
18293
+ children: z120.any().optional(),
18280
18294
  height: distance38.optional()
18281
18295
  });
18282
18296
  expectTypesMatch(true);
18283
18297
 
18284
18298
  // lib/components/schematic-cell.ts
18285
18299
  import { distance as distance39 } from "circuit-json";
18286
- import { z as z120 } from "zod";
18287
- var schematicCellProps = z120.object({
18288
- children: z120.string().optional(),
18289
- horizontalAlign: z120.enum(["left", "center", "right"]).optional(),
18290
- verticalAlign: z120.enum(["top", "middle", "bottom"]).optional(),
18300
+ import { z as z121 } from "zod";
18301
+ var schematicCellProps = z121.object({
18302
+ children: z121.string().optional(),
18303
+ horizontalAlign: z121.enum(["left", "center", "right"]).optional(),
18304
+ verticalAlign: z121.enum(["top", "middle", "bottom"]).optional(),
18291
18305
  fontSize: distance39.optional(),
18292
- rowSpan: z120.number().optional(),
18293
- colSpan: z120.number().optional(),
18306
+ rowSpan: z121.number().optional(),
18307
+ colSpan: z121.number().optional(),
18294
18308
  width: distance39.optional(),
18295
- text: z120.string().optional()
18309
+ text: z121.string().optional()
18296
18310
  });
18297
18311
  expectTypesMatch(true);
18298
18312
 
18299
18313
  // lib/components/schematic-section.ts
18300
18314
  import { distance as distance40 } from "circuit-json";
18301
- import { z as z121 } from "zod";
18302
- var schematicSectionProps = z121.object({
18303
- displayName: z121.string().optional(),
18304
- name: z121.string(),
18315
+ import { z as z122 } from "zod";
18316
+ var schematicSectionProps = z122.object({
18317
+ displayName: z122.string().optional(),
18318
+ name: z122.string(),
18305
18319
  sectionTitleFontSize: distance40.optional()
18306
18320
  });
18307
18321
  expectTypesMatch(
@@ -18309,51 +18323,51 @@ expectTypesMatch(
18309
18323
  );
18310
18324
 
18311
18325
  // lib/components/schematic-sheet.ts
18312
- import { z as z122 } from "zod";
18313
- var schematicSheetProps = z122.object({
18314
- name: z122.string(),
18315
- displayName: z122.string(),
18316
- sheetIndex: z122.number().optional(),
18317
- children: z122.any().optional()
18326
+ import { z as z123 } from "zod";
18327
+ var schematicSheetProps = z123.object({
18328
+ name: z123.string(),
18329
+ displayName: z123.string(),
18330
+ sheetIndex: z123.number().optional(),
18331
+ children: z123.any().optional()
18318
18332
  });
18319
18333
  expectTypesMatch(true);
18320
18334
 
18321
18335
  // lib/components/copper-text.ts
18322
18336
  import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
18323
- import { z as z123 } from "zod";
18337
+ import { z as z124 } from "zod";
18324
18338
  var copperTextProps = pcbLayoutProps.extend({
18325
- text: z123.string(),
18339
+ text: z124.string(),
18326
18340
  anchorAlignment: ninePointAnchor.default("center"),
18327
- font: z123.enum(["tscircuit2024"]).optional(),
18341
+ font: z124.enum(["tscircuit2024"]).optional(),
18328
18342
  fontSize: length8.optional(),
18329
- layers: z123.array(layer_ref10).optional(),
18330
- knockout: z123.boolean().optional(),
18331
- mirrored: z123.boolean().optional()
18343
+ layers: z124.array(layer_ref10).optional(),
18344
+ knockout: z124.boolean().optional(),
18345
+ mirrored: z124.boolean().optional()
18332
18346
  });
18333
18347
 
18334
18348
  // lib/components/silkscreen-text.ts
18335
18349
  import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
18336
- import { z as z124 } from "zod";
18350
+ import { z as z125 } from "zod";
18337
18351
  var silkscreenTextProps = pcbLayoutProps.extend({
18338
- text: z124.string(),
18352
+ text: z125.string(),
18339
18353
  anchorAlignment: ninePointAnchor.default("center"),
18340
- font: z124.enum(["tscircuit2024"]).optional(),
18354
+ font: z125.enum(["tscircuit2024"]).optional(),
18341
18355
  fontSize: length9.optional(),
18342
18356
  /**
18343
18357
  * If true, text will knock out underlying silkscreen
18344
18358
  */
18345
- isKnockout: z124.boolean().optional(),
18359
+ isKnockout: z125.boolean().optional(),
18346
18360
  knockoutPadding: length9.optional(),
18347
18361
  knockoutPaddingLeft: length9.optional(),
18348
18362
  knockoutPaddingRight: length9.optional(),
18349
18363
  knockoutPaddingTop: length9.optional(),
18350
18364
  knockoutPaddingBottom: length9.optional(),
18351
- layers: z124.array(layer_ref11).optional()
18365
+ layers: z125.array(layer_ref11).optional()
18352
18366
  });
18353
18367
 
18354
18368
  // lib/components/silkscreen-path.ts
18355
18369
  import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
18356
- import { z as z125 } from "zod";
18370
+ import { z as z126 } from "zod";
18357
18371
  var silkscreenPathProps = pcbLayoutProps.omit({
18358
18372
  pcbLeftEdgeX: true,
18359
18373
  pcbRightEdgeX: true,
@@ -18365,7 +18379,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18365
18379
  pcbOffsetY: true,
18366
18380
  pcbRotation: true
18367
18381
  }).extend({
18368
- route: z125.array(route_hint_point5),
18382
+ route: z126.array(route_hint_point5),
18369
18383
  strokeWidth: length10.optional()
18370
18384
  });
18371
18385
 
@@ -18387,10 +18401,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18387
18401
 
18388
18402
  // lib/components/silkscreen-rect.ts
18389
18403
  import { distance as distance42 } from "circuit-json";
18390
- import { z as z126 } from "zod";
18404
+ import { z as z127 } from "zod";
18391
18405
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18392
- filled: z126.boolean().default(true).optional(),
18393
- stroke: z126.enum(["dashed", "solid", "none"]).optional(),
18406
+ filled: z127.boolean().default(true).optional(),
18407
+ stroke: z127.enum(["dashed", "solid", "none"]).optional(),
18394
18408
  strokeWidth: distance42.optional(),
18395
18409
  width: distance42,
18396
18410
  height: distance42,
@@ -18399,10 +18413,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18399
18413
 
18400
18414
  // lib/components/silkscreen-circle.ts
18401
18415
  import { distance as distance43 } from "circuit-json";
18402
- import { z as z127 } from "zod";
18416
+ import { z as z128 } from "zod";
18403
18417
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18404
- isFilled: z127.boolean().optional(),
18405
- isOutline: z127.boolean().optional(),
18418
+ isFilled: z128.boolean().optional(),
18419
+ isOutline: z128.boolean().optional(),
18406
18420
  strokeWidth: distance43.optional(),
18407
18421
  radius: distance43
18408
18422
  });
@@ -18420,63 +18434,63 @@ expectTypesMatch(true);
18420
18434
 
18421
18435
  // lib/components/trace-hint.ts
18422
18436
  import { distance as distance44, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
18423
- import { z as z129 } from "zod";
18424
- var routeHintPointProps = z129.object({
18437
+ import { z as z130 } from "zod";
18438
+ var routeHintPointProps = z130.object({
18425
18439
  x: distance44,
18426
18440
  y: distance44,
18427
- via: z129.boolean().optional(),
18441
+ via: z130.boolean().optional(),
18428
18442
  toLayer: layer_ref12.optional()
18429
18443
  });
18430
- var traceHintProps = z129.object({
18431
- for: z129.string().optional().describe(
18444
+ var traceHintProps = z130.object({
18445
+ for: z130.string().optional().describe(
18432
18446
  "Selector for the port you're targeting, not required if you're inside a trace"
18433
18447
  ),
18434
- order: z129.number().optional(),
18448
+ order: z130.number().optional(),
18435
18449
  offset: route_hint_point6.or(routeHintPointProps).optional(),
18436
- offsets: z129.array(route_hint_point6).or(z129.array(routeHintPointProps)).optional(),
18437
- traceWidth: z129.number().optional()
18450
+ offsets: z130.array(route_hint_point6).or(z130.array(routeHintPointProps)).optional(),
18451
+ traceWidth: z130.number().optional()
18438
18452
  });
18439
18453
 
18440
18454
  // lib/components/port.ts
18441
- import { z as z130 } from "zod";
18455
+ import { z as z131 } from "zod";
18442
18456
  var portProps = commonLayoutProps.extend({
18443
- name: z130.string().optional(),
18444
- pinNumber: z130.number().optional(),
18445
- schStemLength: z130.number().optional(),
18446
- aliases: z130.array(z130.string()).optional(),
18447
- layer: z130.string().optional(),
18448
- layers: z130.array(z130.string()).optional(),
18449
- schX: z130.number().optional(),
18450
- schY: z130.number().optional(),
18457
+ name: z131.string().optional(),
18458
+ pinNumber: z131.number().optional(),
18459
+ schStemLength: z131.number().optional(),
18460
+ aliases: z131.array(z131.string()).optional(),
18461
+ layer: z131.string().optional(),
18462
+ layers: z131.array(z131.string()).optional(),
18463
+ schX: z131.number().optional(),
18464
+ schY: z131.number().optional(),
18451
18465
  direction: direction.optional(),
18452
- connectsTo: z130.string().or(z130.array(z130.string())).optional(),
18466
+ connectsTo: z131.string().or(z131.array(z131.string())).optional(),
18453
18467
  kicadPinMetadata: kicadPinMetadata.optional(),
18454
- hasInversionCircle: z130.boolean().optional()
18468
+ hasInversionCircle: z131.boolean().optional()
18455
18469
  });
18456
18470
 
18457
18471
  // lib/components/pcb-note-text.ts
18458
18472
  import { length as length11 } from "circuit-json";
18459
- import { z as z131 } from "zod";
18473
+ import { z as z132 } from "zod";
18460
18474
  var pcbNoteTextProps = pcbLayoutProps.extend({
18461
- text: z131.string(),
18462
- anchorAlignment: z131.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18463
- font: z131.enum(["tscircuit2024"]).optional(),
18475
+ text: z132.string(),
18476
+ anchorAlignment: z132.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
18477
+ font: z132.enum(["tscircuit2024"]).optional(),
18464
18478
  fontSize: length11.optional(),
18465
- color: z131.string().optional()
18479
+ color: z132.string().optional()
18466
18480
  });
18467
18481
  expectTypesMatch(true);
18468
18482
 
18469
18483
  // lib/components/pcb-note-rect.ts
18470
18484
  import { distance as distance45 } from "circuit-json";
18471
- import { z as z132 } from "zod";
18485
+ import { z as z133 } from "zod";
18472
18486
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18473
18487
  width: distance45,
18474
18488
  height: distance45,
18475
18489
  strokeWidth: distance45.optional(),
18476
- isFilled: z132.boolean().optional(),
18477
- hasStroke: z132.boolean().optional(),
18478
- isStrokeDashed: z132.boolean().optional(),
18479
- color: z132.string().optional(),
18490
+ isFilled: z133.boolean().optional(),
18491
+ hasStroke: z133.boolean().optional(),
18492
+ isStrokeDashed: z133.boolean().optional(),
18493
+ color: z133.string().optional(),
18480
18494
  cornerRadius: distance45.optional()
18481
18495
  });
18482
18496
  expectTypesMatch(true);
@@ -18486,7 +18500,7 @@ import {
18486
18500
  length as length12,
18487
18501
  route_hint_point as route_hint_point7
18488
18502
  } from "circuit-json";
18489
- import { z as z133 } from "zod";
18503
+ import { z as z134 } from "zod";
18490
18504
  var pcbNotePathProps = pcbLayoutProps.omit({
18491
18505
  pcbLeftEdgeX: true,
18492
18506
  pcbRightEdgeX: true,
@@ -18498,15 +18512,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
18498
18512
  pcbOffsetY: true,
18499
18513
  pcbRotation: true
18500
18514
  }).extend({
18501
- route: z133.array(route_hint_point7),
18515
+ route: z134.array(route_hint_point7),
18502
18516
  strokeWidth: length12.optional(),
18503
- color: z133.string().optional()
18517
+ color: z134.string().optional()
18504
18518
  });
18505
18519
  expectTypesMatch(true);
18506
18520
 
18507
18521
  // lib/components/pcb-note-line.ts
18508
18522
  import { distance as distance46 } from "circuit-json";
18509
- import { z as z134 } from "zod";
18523
+ import { z as z135 } from "zod";
18510
18524
  var pcbNoteLineProps = pcbLayoutProps.omit({
18511
18525
  pcbLeftEdgeX: true,
18512
18526
  pcbRightEdgeX: true,
@@ -18523,15 +18537,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
18523
18537
  x2: distance46,
18524
18538
  y2: distance46,
18525
18539
  strokeWidth: distance46.optional(),
18526
- color: z134.string().optional(),
18527
- isDashed: z134.boolean().optional()
18540
+ color: z135.string().optional(),
18541
+ isDashed: z135.boolean().optional()
18528
18542
  });
18529
18543
  expectTypesMatch(true);
18530
18544
 
18531
18545
  // lib/components/pcb-note-dimension.ts
18532
18546
  import { distance as distance47, length as length13 } from "circuit-json";
18533
- import { z as z135 } from "zod";
18534
- var dimensionTarget2 = z135.union([z135.string(), point]);
18547
+ import { z as z136 } from "zod";
18548
+ var dimensionTarget2 = z136.union([z136.string(), point]);
18535
18549
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
18536
18550
  pcbLeftEdgeX: true,
18537
18551
  pcbRightEdgeX: true,
@@ -18545,101 +18559,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
18545
18559
  }).extend({
18546
18560
  from: dimensionTarget2,
18547
18561
  to: dimensionTarget2,
18548
- text: z135.string().optional(),
18562
+ text: z136.string().optional(),
18549
18563
  offset: distance47.optional(),
18550
- font: z135.enum(["tscircuit2024"]).optional(),
18564
+ font: z136.enum(["tscircuit2024"]).optional(),
18551
18565
  fontSize: length13.optional(),
18552
- color: z135.string().optional(),
18566
+ color: z136.string().optional(),
18553
18567
  arrowSize: distance47.optional(),
18554
- units: z135.enum(["in", "mm"]).optional(),
18555
- outerEdgeToEdge: z135.literal(true).optional(),
18556
- centerToCenter: z135.literal(true).optional(),
18557
- innerEdgeToEdge: z135.literal(true).optional()
18568
+ units: z136.enum(["in", "mm"]).optional(),
18569
+ outerEdgeToEdge: z136.literal(true).optional(),
18570
+ centerToCenter: z136.literal(true).optional(),
18571
+ innerEdgeToEdge: z136.literal(true).optional()
18558
18572
  });
18559
18573
  expectTypesMatch(
18560
18574
  true
18561
18575
  );
18562
18576
 
18563
18577
  // lib/platformConfig.ts
18564
- import { z as z136 } from "zod";
18565
- var unvalidatedCircuitJson = z136.array(z136.any()).describe("Circuit JSON");
18566
- var footprintLibraryResult = z136.object({
18567
- footprintCircuitJson: z136.array(z136.any()),
18578
+ import { z as z137 } from "zod";
18579
+ var unvalidatedCircuitJson = z137.array(z137.any()).describe("Circuit JSON");
18580
+ var footprintLibraryResult = z137.object({
18581
+ footprintCircuitJson: z137.array(z137.any()),
18568
18582
  cadModel: cadModelProp.optional()
18569
18583
  });
18570
- var pathToCircuitJsonFn = z136.function().args(z136.string()).returns(z136.promise(footprintLibraryResult)).or(
18571
- z136.function().args(
18572
- z136.string(),
18573
- z136.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18574
- ).returns(z136.promise(footprintLibraryResult))
18584
+ var pathToCircuitJsonFn = z137.function().args(z137.string()).returns(z137.promise(footprintLibraryResult)).or(
18585
+ z137.function().args(
18586
+ z137.string(),
18587
+ z137.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
18588
+ ).returns(z137.promise(footprintLibraryResult))
18575
18589
  ).describe("A function that takes a path and returns Circuit JSON");
18576
- var footprintFileParserEntry = z136.object({
18577
- loadFromUrl: z136.function().args(z136.string()).returns(z136.promise(footprintLibraryResult)).describe(
18590
+ var footprintFileParserEntry = z137.object({
18591
+ loadFromUrl: z137.function().args(z137.string()).returns(z137.promise(footprintLibraryResult)).describe(
18578
18592
  "A function that takes a footprint file URL and returns Circuit JSON"
18579
18593
  )
18580
18594
  });
18581
- var spiceEngineSimulationResult = z136.object({
18582
- engineVersionString: z136.string().optional(),
18595
+ var spiceEngineSimulationResult = z137.object({
18596
+ engineVersionString: z137.string().optional(),
18583
18597
  simulationResultCircuitJson: unvalidatedCircuitJson
18584
18598
  });
18585
- var spiceEngineZod = z136.object({
18586
- simulate: z136.function().args(z136.string()).returns(z136.promise(spiceEngineSimulationResult)).describe(
18599
+ var spiceEngineZod = z137.object({
18600
+ simulate: z137.function().args(z137.string()).returns(z137.promise(spiceEngineSimulationResult)).describe(
18587
18601
  "A function that takes a SPICE string and returns a simulation result"
18588
18602
  )
18589
18603
  });
18590
- var defaultSpiceEngine = z136.custom(
18604
+ var defaultSpiceEngine = z137.custom(
18591
18605
  (value) => typeof value === "string"
18592
18606
  );
18593
- var autorouterInstance = z136.object({
18594
- run: z136.function().args().returns(z136.promise(z136.unknown())).describe("Run the autorouter"),
18595
- getOutputSimpleRouteJson: z136.function().args().returns(z136.promise(z136.any())).describe("Get the resulting SimpleRouteJson")
18607
+ var autorouterInstance = z137.object({
18608
+ run: z137.function().args().returns(z137.promise(z137.unknown())).describe("Run the autorouter"),
18609
+ getOutputSimpleRouteJson: z137.function().args().returns(z137.promise(z137.any())).describe("Get the resulting SimpleRouteJson")
18596
18610
  });
18597
- var autorouterDefinition = z136.object({
18598
- createAutorouter: z136.function().args(z136.any(), z136.any().optional()).returns(z136.union([autorouterInstance, z136.promise(autorouterInstance)])).describe("Create an autorouter instance")
18611
+ var autorouterDefinition = z137.object({
18612
+ createAutorouter: z137.function().args(z137.any(), z137.any().optional()).returns(z137.union([autorouterInstance, z137.promise(autorouterInstance)])).describe("Create an autorouter instance")
18599
18613
  });
18600
- var platformFetch = z136.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18601
- var platformConfig = z136.object({
18614
+ var platformFetch = z137.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
18615
+ var platformConfig = z137.object({
18602
18616
  partsEngine: partsEngine.optional(),
18603
18617
  autorouter: autorouterProp.optional(),
18604
- autorouterMap: z136.record(z136.string(), autorouterDefinition).optional(),
18618
+ autorouterMap: z137.record(z137.string(), autorouterDefinition).optional(),
18605
18619
  registryApiUrl: url.optional(),
18606
18620
  cloudAutorouterUrl: url.optional(),
18607
- projectName: z136.string().optional(),
18621
+ projectName: z137.string().optional(),
18608
18622
  projectBaseUrl: url.optional(),
18609
- version: z136.string().optional(),
18623
+ version: z137.string().optional(),
18610
18624
  url: url.optional(),
18611
- printBoardInformationToSilkscreen: z136.boolean().optional(),
18612
- includeBoardFiles: z136.array(z136.string()).describe(
18625
+ printBoardInformationToSilkscreen: z137.boolean().optional(),
18626
+ includeBoardFiles: z137.array(z137.string()).describe(
18613
18627
  'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
18614
18628
  ).optional(),
18615
- snapshotsDir: z136.string().describe(
18629
+ snapshotsDir: z137.string().describe(
18616
18630
  'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
18617
18631
  ).optional(),
18618
18632
  defaultSpiceEngine: defaultSpiceEngine.optional(),
18619
- unitPreference: z136.enum(["mm", "in", "mil"]).optional(),
18620
- localCacheEngine: z136.any().optional(),
18621
- pcbDisabled: z136.boolean().optional(),
18622
- routingDisabled: z136.boolean().optional(),
18623
- schematicDisabled: z136.boolean().optional(),
18624
- partsEngineDisabled: z136.boolean().optional(),
18625
- drcChecksDisabled: z136.boolean().optional(),
18626
- netlistDrcChecksDisabled: z136.boolean().optional(),
18627
- routingDrcChecksDisabled: z136.boolean().optional(),
18628
- placementDrcChecksDisabled: z136.boolean().optional(),
18629
- pinSpecificationDrcChecksDisabled: z136.boolean().optional(),
18630
- spiceEngineMap: z136.record(z136.string(), spiceEngineZod).optional(),
18631
- footprintLibraryMap: z136.record(
18632
- z136.string(),
18633
- z136.union([
18633
+ unitPreference: z137.enum(["mm", "in", "mil"]).optional(),
18634
+ localCacheEngine: z137.any().optional(),
18635
+ pcbDisabled: z137.boolean().optional(),
18636
+ routingDisabled: z137.boolean().optional(),
18637
+ schematicDisabled: z137.boolean().optional(),
18638
+ partsEngineDisabled: z137.boolean().optional(),
18639
+ drcChecksDisabled: z137.boolean().optional(),
18640
+ netlistDrcChecksDisabled: z137.boolean().optional(),
18641
+ routingDrcChecksDisabled: z137.boolean().optional(),
18642
+ placementDrcChecksDisabled: z137.boolean().optional(),
18643
+ pinSpecificationDrcChecksDisabled: z137.boolean().optional(),
18644
+ spiceEngineMap: z137.record(z137.string(), spiceEngineZod).optional(),
18645
+ footprintLibraryMap: z137.record(
18646
+ z137.string(),
18647
+ z137.union([
18634
18648
  pathToCircuitJsonFn,
18635
- z136.record(
18636
- z136.string(),
18637
- z136.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18649
+ z137.record(
18650
+ z137.string(),
18651
+ z137.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
18638
18652
  )
18639
18653
  ])
18640
18654
  ).optional(),
18641
- footprintFileParserMap: z136.record(z136.string(), footprintFileParserEntry).optional(),
18642
- resolveProjectStaticFileImportUrl: z136.function().args(z136.string()).returns(z136.promise(z136.string())).describe(
18655
+ footprintFileParserMap: z137.record(z137.string(), footprintFileParserEntry).optional(),
18656
+ resolveProjectStaticFileImportUrl: z137.function().args(z137.string()).returns(z137.promise(z137.string())).describe(
18643
18657
  "A function that returns a string URL for static files for the project"
18644
18658
  ).optional(),
18645
18659
  platformFetch: platformFetch.optional()
@@ -18756,6 +18770,7 @@ export {
18756
18770
  inductorPins,
18757
18771
  inductorProps,
18758
18772
  interconnectProps,
18773
+ internalCircuitProps,
18759
18774
  jumperProps,
18760
18775
  kicadAt,
18761
18776
  kicadEffects,