circuit-json 0.0.259 → 0.0.261

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.mjs CHANGED
@@ -840,7 +840,8 @@ var schematic_component = z45.object({
840
840
  subcircuit_id: z45.string().optional(),
841
841
  schematic_group_id: z45.string().optional(),
842
842
  is_schematic_group: z45.boolean().optional(),
843
- source_group_id: z45.string().optional()
843
+ source_group_id: z45.string().optional(),
844
+ is_box_with_pins: z45.boolean().optional().default(true)
844
845
  });
845
846
  expectTypesMatch(true);
846
847
 
@@ -1640,6 +1641,7 @@ var pcb_trace = z73.object({
1640
1641
  route_order_index: z73.number().optional(),
1641
1642
  should_round_corners: z73.boolean().optional(),
1642
1643
  trace_length: z73.number().optional(),
1644
+ rats_nest_color: z73.string().optional(),
1643
1645
  route: z73.array(pcb_trace_route_point)
1644
1646
  }).describe("Defines a trace on the PCB");
1645
1647
  expectTypesMatch(true);
@@ -1709,13 +1711,23 @@ expectTypesMatch(
1709
1711
  true
1710
1712
  );
1711
1713
 
1712
- // src/pcb/pcb_via.ts
1714
+ // src/pcb/pcb_net.ts
1713
1715
  import { z as z78 } from "zod";
1714
- var pcb_via = z78.object({
1715
- type: z78.literal("pcb_via"),
1716
+ var pcb_net = z78.object({
1717
+ type: z78.literal("pcb_net"),
1718
+ pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
1719
+ source_net_id: z78.string().optional(),
1720
+ rats_nest_color: z78.string().optional()
1721
+ }).describe("Defines a net on the PCB");
1722
+ expectTypesMatch(true);
1723
+
1724
+ // src/pcb/pcb_via.ts
1725
+ import { z as z79 } from "zod";
1726
+ var pcb_via = z79.object({
1727
+ type: z79.literal("pcb_via"),
1716
1728
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
1717
- pcb_group_id: z78.string().optional(),
1718
- subcircuit_id: z78.string().optional(),
1729
+ pcb_group_id: z79.string().optional(),
1730
+ subcircuit_id: z79.string().optional(),
1719
1731
  x: distance,
1720
1732
  y: distance,
1721
1733
  outer_diameter: distance.default("0.6mm"),
@@ -1724,59 +1736,59 @@ var pcb_via = z78.object({
1724
1736
  from_layer: layer_ref.optional(),
1725
1737
  /** @deprecated */
1726
1738
  to_layer: layer_ref.optional(),
1727
- layers: z78.array(layer_ref),
1728
- pcb_trace_id: z78.string().optional()
1739
+ layers: z79.array(layer_ref),
1740
+ pcb_trace_id: z79.string().optional()
1729
1741
  }).describe("Defines a via on the PCB");
1730
1742
  expectTypesMatch(true);
1731
1743
 
1732
1744
  // src/pcb/pcb_board.ts
1733
- import { z as z79 } from "zod";
1734
- var pcb_board = z79.object({
1735
- type: z79.literal("pcb_board"),
1745
+ import { z as z80 } from "zod";
1746
+ var pcb_board = z80.object({
1747
+ type: z80.literal("pcb_board"),
1736
1748
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
1737
- is_subcircuit: z79.boolean().optional(),
1738
- subcircuit_id: z79.string().optional(),
1749
+ is_subcircuit: z80.boolean().optional(),
1750
+ subcircuit_id: z80.string().optional(),
1739
1751
  width: length,
1740
1752
  height: length,
1741
1753
  center: point,
1742
1754
  thickness: length.optional().default(1.4),
1743
- num_layers: z79.number().optional().default(4),
1744
- outline: z79.array(point).optional(),
1745
- material: z79.enum(["fr4", "fr1"]).default("fr4")
1755
+ num_layers: z80.number().optional().default(4),
1756
+ outline: z80.array(point).optional(),
1757
+ material: z80.enum(["fr4", "fr1"]).default("fr4")
1746
1758
  }).describe("Defines the board outline of the PCB");
1747
1759
  expectTypesMatch(true);
1748
1760
 
1749
1761
  // src/pcb/pcb_placement_error.ts
1750
- import { z as z80 } from "zod";
1751
- var pcb_placement_error = z80.object({
1752
- type: z80.literal("pcb_placement_error"),
1762
+ import { z as z81 } from "zod";
1763
+ var pcb_placement_error = z81.object({
1764
+ type: z81.literal("pcb_placement_error"),
1753
1765
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
1754
- error_type: z80.literal("pcb_placement_error").default("pcb_placement_error"),
1755
- message: z80.string(),
1756
- subcircuit_id: z80.string().optional()
1766
+ error_type: z81.literal("pcb_placement_error").default("pcb_placement_error"),
1767
+ message: z81.string(),
1768
+ subcircuit_id: z81.string().optional()
1757
1769
  }).describe("Defines a placement error on the PCB");
1758
1770
  expectTypesMatch(true);
1759
1771
 
1760
1772
  // src/pcb/pcb_trace_hint.ts
1761
- import { z as z81 } from "zod";
1762
- var pcb_trace_hint = z81.object({
1763
- type: z81.literal("pcb_trace_hint"),
1773
+ import { z as z82 } from "zod";
1774
+ var pcb_trace_hint = z82.object({
1775
+ type: z82.literal("pcb_trace_hint"),
1764
1776
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
1765
- pcb_port_id: z81.string(),
1766
- pcb_component_id: z81.string(),
1767
- route: z81.array(route_hint_point),
1768
- subcircuit_id: z81.string().optional()
1777
+ pcb_port_id: z82.string(),
1778
+ pcb_component_id: z82.string(),
1779
+ route: z82.array(route_hint_point),
1780
+ subcircuit_id: z82.string().optional()
1769
1781
  }).describe("A hint that can be used during generation of a PCB trace");
1770
1782
  expectTypesMatch(true);
1771
1783
 
1772
1784
  // src/pcb/pcb_silkscreen_line.ts
1773
- import { z as z82 } from "zod";
1774
- var pcb_silkscreen_line = z82.object({
1775
- type: z82.literal("pcb_silkscreen_line"),
1785
+ import { z as z83 } from "zod";
1786
+ var pcb_silkscreen_line = z83.object({
1787
+ type: z83.literal("pcb_silkscreen_line"),
1776
1788
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
1777
- pcb_component_id: z82.string(),
1778
- pcb_group_id: z82.string().optional(),
1779
- subcircuit_id: z82.string().optional(),
1789
+ pcb_component_id: z83.string(),
1790
+ pcb_group_id: z83.string().optional(),
1791
+ subcircuit_id: z83.string().optional(),
1780
1792
  stroke_width: distance.default("0.1mm"),
1781
1793
  x1: distance,
1782
1794
  y1: distance,
@@ -1787,32 +1799,32 @@ var pcb_silkscreen_line = z82.object({
1787
1799
  expectTypesMatch(true);
1788
1800
 
1789
1801
  // src/pcb/pcb_silkscreen_path.ts
1790
- import { z as z83 } from "zod";
1791
- var pcb_silkscreen_path = z83.object({
1792
- type: z83.literal("pcb_silkscreen_path"),
1802
+ import { z as z84 } from "zod";
1803
+ var pcb_silkscreen_path = z84.object({
1804
+ type: z84.literal("pcb_silkscreen_path"),
1793
1805
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
1794
- pcb_component_id: z83.string(),
1795
- pcb_group_id: z83.string().optional(),
1796
- subcircuit_id: z83.string().optional(),
1806
+ pcb_component_id: z84.string(),
1807
+ pcb_group_id: z84.string().optional(),
1808
+ subcircuit_id: z84.string().optional(),
1797
1809
  layer: visible_layer,
1798
- route: z83.array(point),
1810
+ route: z84.array(point),
1799
1811
  stroke_width: length
1800
1812
  }).describe("Defines a silkscreen path on the PCB");
1801
1813
  expectTypesMatch(true);
1802
1814
 
1803
1815
  // src/pcb/pcb_silkscreen_text.ts
1804
- import { z as z84 } from "zod";
1805
- var pcb_silkscreen_text = z84.object({
1806
- type: z84.literal("pcb_silkscreen_text"),
1816
+ import { z as z85 } from "zod";
1817
+ var pcb_silkscreen_text = z85.object({
1818
+ type: z85.literal("pcb_silkscreen_text"),
1807
1819
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
1808
- pcb_group_id: z84.string().optional(),
1809
- subcircuit_id: z84.string().optional(),
1810
- font: z84.literal("tscircuit2024").default("tscircuit2024"),
1820
+ pcb_group_id: z85.string().optional(),
1821
+ subcircuit_id: z85.string().optional(),
1822
+ font: z85.literal("tscircuit2024").default("tscircuit2024"),
1811
1823
  font_size: distance.default("0.2mm"),
1812
- pcb_component_id: z84.string(),
1813
- text: z84.string(),
1814
- is_knockout: z84.boolean().default(false).optional(),
1815
- knockout_padding: z84.object({
1824
+ pcb_component_id: z85.string(),
1825
+ text: z85.string(),
1826
+ is_knockout: z85.boolean().default(false).optional(),
1827
+ knockout_padding: z85.object({
1816
1828
  left: length,
1817
1829
  top: length,
1818
1830
  bottom: length,
@@ -1823,43 +1835,43 @@ var pcb_silkscreen_text = z84.object({
1823
1835
  bottom: "0.2mm",
1824
1836
  right: "0.2mm"
1825
1837
  }).optional(),
1826
- ccw_rotation: z84.number().optional(),
1838
+ ccw_rotation: z85.number().optional(),
1827
1839
  layer: layer_ref,
1828
- is_mirrored: z84.boolean().default(false).optional(),
1840
+ is_mirrored: z85.boolean().default(false).optional(),
1829
1841
  anchor_position: point.default({ x: 0, y: 0 }),
1830
1842
  anchor_alignment: ninePointAnchor.default("center")
1831
1843
  }).describe("Defines silkscreen text on the PCB");
1832
1844
  expectTypesMatch(true);
1833
1845
 
1834
1846
  // src/pcb/pcb_silkscreen_rect.ts
1835
- import { z as z85 } from "zod";
1836
- var pcb_silkscreen_rect = z85.object({
1837
- type: z85.literal("pcb_silkscreen_rect"),
1847
+ import { z as z86 } from "zod";
1848
+ var pcb_silkscreen_rect = z86.object({
1849
+ type: z86.literal("pcb_silkscreen_rect"),
1838
1850
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
1839
- pcb_component_id: z85.string(),
1840
- pcb_group_id: z85.string().optional(),
1841
- subcircuit_id: z85.string().optional(),
1851
+ pcb_component_id: z86.string(),
1852
+ pcb_group_id: z86.string().optional(),
1853
+ subcircuit_id: z86.string().optional(),
1842
1854
  center: point,
1843
1855
  width: length,
1844
1856
  height: length,
1845
1857
  layer: layer_ref,
1846
1858
  stroke_width: length.default("1mm"),
1847
- is_filled: z85.boolean().default(true).optional(),
1848
- has_stroke: z85.boolean().optional(),
1849
- is_stroke_dashed: z85.boolean().optional()
1859
+ is_filled: z86.boolean().default(true).optional(),
1860
+ has_stroke: z86.boolean().optional(),
1861
+ is_stroke_dashed: z86.boolean().optional()
1850
1862
  }).describe("Defines a silkscreen rect on the PCB");
1851
1863
  expectTypesMatch(true);
1852
1864
 
1853
1865
  // src/pcb/pcb_silkscreen_circle.ts
1854
- import { z as z86 } from "zod";
1855
- var pcb_silkscreen_circle = z86.object({
1856
- type: z86.literal("pcb_silkscreen_circle"),
1866
+ import { z as z87 } from "zod";
1867
+ var pcb_silkscreen_circle = z87.object({
1868
+ type: z87.literal("pcb_silkscreen_circle"),
1857
1869
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
1858
1870
  "pcb_silkscreen_circle"
1859
1871
  ),
1860
- pcb_component_id: z86.string(),
1861
- pcb_group_id: z86.string().optional(),
1862
- subcircuit_id: z86.string().optional(),
1872
+ pcb_component_id: z87.string(),
1873
+ pcb_group_id: z87.string().optional(),
1874
+ subcircuit_id: z87.string().optional(),
1863
1875
  center: point,
1864
1876
  radius: length,
1865
1877
  layer: visible_layer,
@@ -1868,13 +1880,13 @@ var pcb_silkscreen_circle = z86.object({
1868
1880
  expectTypesMatch(true);
1869
1881
 
1870
1882
  // src/pcb/pcb_silkscreen_oval.ts
1871
- import { z as z87 } from "zod";
1872
- var pcb_silkscreen_oval = z87.object({
1873
- type: z87.literal("pcb_silkscreen_oval"),
1883
+ import { z as z88 } from "zod";
1884
+ var pcb_silkscreen_oval = z88.object({
1885
+ type: z88.literal("pcb_silkscreen_oval"),
1874
1886
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
1875
- pcb_component_id: z87.string(),
1876
- pcb_group_id: z87.string().optional(),
1877
- subcircuit_id: z87.string().optional(),
1887
+ pcb_component_id: z88.string(),
1888
+ pcb_group_id: z88.string().optional(),
1889
+ subcircuit_id: z88.string().optional(),
1878
1890
  center: point,
1879
1891
  radius_x: distance,
1880
1892
  radius_y: distance,
@@ -1883,103 +1895,103 @@ var pcb_silkscreen_oval = z87.object({
1883
1895
  expectTypesMatch(true);
1884
1896
 
1885
1897
  // src/pcb/pcb_fabrication_note_text.ts
1886
- import { z as z88 } from "zod";
1887
- var pcb_fabrication_note_text = z88.object({
1888
- type: z88.literal("pcb_fabrication_note_text"),
1898
+ import { z as z89 } from "zod";
1899
+ var pcb_fabrication_note_text = z89.object({
1900
+ type: z89.literal("pcb_fabrication_note_text"),
1889
1901
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
1890
1902
  "pcb_fabrication_note_text"
1891
1903
  ),
1892
- subcircuit_id: z88.string().optional(),
1893
- pcb_group_id: z88.string().optional(),
1894
- font: z88.literal("tscircuit2024").default("tscircuit2024"),
1904
+ subcircuit_id: z89.string().optional(),
1905
+ pcb_group_id: z89.string().optional(),
1906
+ font: z89.literal("tscircuit2024").default("tscircuit2024"),
1895
1907
  font_size: distance.default("1mm"),
1896
- pcb_component_id: z88.string(),
1897
- text: z88.string(),
1908
+ pcb_component_id: z89.string(),
1909
+ text: z89.string(),
1898
1910
  layer: visible_layer,
1899
1911
  anchor_position: point.default({ x: 0, y: 0 }),
1900
- anchor_alignment: z88.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
1901
- color: z88.string().optional()
1912
+ anchor_alignment: z89.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
1913
+ color: z89.string().optional()
1902
1914
  }).describe(
1903
1915
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
1904
1916
  );
1905
1917
  expectTypesMatch(true);
1906
1918
 
1907
1919
  // src/pcb/pcb_fabrication_note_path.ts
1908
- import { z as z89 } from "zod";
1909
- var pcb_fabrication_note_path = z89.object({
1910
- type: z89.literal("pcb_fabrication_note_path"),
1920
+ import { z as z90 } from "zod";
1921
+ var pcb_fabrication_note_path = z90.object({
1922
+ type: z90.literal("pcb_fabrication_note_path"),
1911
1923
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
1912
1924
  "pcb_fabrication_note_path"
1913
1925
  ),
1914
- pcb_component_id: z89.string(),
1915
- subcircuit_id: z89.string().optional(),
1926
+ pcb_component_id: z90.string(),
1927
+ subcircuit_id: z90.string().optional(),
1916
1928
  layer: layer_ref,
1917
- route: z89.array(point),
1929
+ route: z90.array(point),
1918
1930
  stroke_width: length,
1919
- color: z89.string().optional()
1931
+ color: z90.string().optional()
1920
1932
  }).describe(
1921
1933
  "Defines a fabrication path on the PCB for fabricators or assemblers"
1922
1934
  );
1923
1935
  expectTypesMatch(true);
1924
1936
 
1925
1937
  // src/pcb/pcb_footprint_overlap_error.ts
1926
- import { z as z90 } from "zod";
1927
- var pcb_footprint_overlap_error = z90.object({
1928
- type: z90.literal("pcb_footprint_overlap_error"),
1938
+ import { z as z91 } from "zod";
1939
+ var pcb_footprint_overlap_error = z91.object({
1940
+ type: z91.literal("pcb_footprint_overlap_error"),
1929
1941
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
1930
- error_type: z90.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
1931
- message: z90.string(),
1932
- pcb_smtpad_ids: z90.array(z90.string()).optional(),
1933
- pcb_plated_hole_ids: z90.array(z90.string()).optional(),
1934
- pcb_hole_ids: z90.array(z90.string()).optional(),
1935
- pcb_keepout_ids: z90.array(z90.string()).optional()
1942
+ error_type: z91.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
1943
+ message: z91.string(),
1944
+ pcb_smtpad_ids: z91.array(z91.string()).optional(),
1945
+ pcb_plated_hole_ids: z91.array(z91.string()).optional(),
1946
+ pcb_hole_ids: z91.array(z91.string()).optional(),
1947
+ pcb_keepout_ids: z91.array(z91.string()).optional()
1936
1948
  }).describe("Error emitted when a pcb footprint overlaps with another element");
1937
1949
  expectTypesMatch(
1938
1950
  true
1939
1951
  );
1940
1952
 
1941
1953
  // src/pcb/pcb_keepout.ts
1942
- import { z as z91 } from "zod";
1943
- var pcb_keepout = z91.object({
1944
- type: z91.literal("pcb_keepout"),
1945
- shape: z91.literal("rect"),
1946
- pcb_group_id: z91.string().optional(),
1947
- subcircuit_id: z91.string().optional(),
1954
+ import { z as z92 } from "zod";
1955
+ var pcb_keepout = z92.object({
1956
+ type: z92.literal("pcb_keepout"),
1957
+ shape: z92.literal("rect"),
1958
+ pcb_group_id: z92.string().optional(),
1959
+ subcircuit_id: z92.string().optional(),
1948
1960
  center: point,
1949
1961
  width: distance,
1950
1962
  height: distance,
1951
- pcb_keepout_id: z91.string(),
1952
- layers: z91.array(z91.string()),
1963
+ pcb_keepout_id: z92.string(),
1964
+ layers: z92.array(z92.string()),
1953
1965
  // Specify layers where the keepout applies
1954
- description: z91.string().optional()
1966
+ description: z92.string().optional()
1955
1967
  // Optional description of the keepout
1956
1968
  }).or(
1957
- z91.object({
1958
- type: z91.literal("pcb_keepout"),
1959
- shape: z91.literal("circle"),
1960
- pcb_group_id: z91.string().optional(),
1961
- subcircuit_id: z91.string().optional(),
1969
+ z92.object({
1970
+ type: z92.literal("pcb_keepout"),
1971
+ shape: z92.literal("circle"),
1972
+ pcb_group_id: z92.string().optional(),
1973
+ subcircuit_id: z92.string().optional(),
1962
1974
  center: point,
1963
1975
  radius: distance,
1964
- pcb_keepout_id: z91.string(),
1965
- layers: z91.array(z91.string()),
1976
+ pcb_keepout_id: z92.string(),
1977
+ layers: z92.array(z92.string()),
1966
1978
  // Specify layers where the keepout applies
1967
- description: z91.string().optional()
1979
+ description: z92.string().optional()
1968
1980
  // Optional description of the keepout
1969
1981
  })
1970
1982
  );
1971
1983
  expectTypesMatch(true);
1972
1984
 
1973
1985
  // src/pcb/pcb_cutout.ts
1974
- import { z as z92 } from "zod";
1975
- var pcb_cutout_base = z92.object({
1976
- type: z92.literal("pcb_cutout"),
1986
+ import { z as z93 } from "zod";
1987
+ var pcb_cutout_base = z93.object({
1988
+ type: z93.literal("pcb_cutout"),
1977
1989
  pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
1978
- pcb_group_id: z92.string().optional(),
1979
- subcircuit_id: z92.string().optional()
1990
+ pcb_group_id: z93.string().optional(),
1991
+ subcircuit_id: z93.string().optional()
1980
1992
  });
1981
1993
  var pcb_cutout_rect = pcb_cutout_base.extend({
1982
- shape: z92.literal("rect"),
1994
+ shape: z93.literal("rect"),
1983
1995
  center: point,
1984
1996
  width: length,
1985
1997
  height: length,
@@ -1987,17 +1999,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
1987
1999
  });
1988
2000
  expectTypesMatch(true);
1989
2001
  var pcb_cutout_circle = pcb_cutout_base.extend({
1990
- shape: z92.literal("circle"),
2002
+ shape: z93.literal("circle"),
1991
2003
  center: point,
1992
2004
  radius: length
1993
2005
  });
1994
2006
  expectTypesMatch(true);
1995
2007
  var pcb_cutout_polygon = pcb_cutout_base.extend({
1996
- shape: z92.literal("polygon"),
1997
- points: z92.array(point)
2008
+ shape: z93.literal("polygon"),
2009
+ points: z93.array(point)
1998
2010
  });
1999
2011
  expectTypesMatch(true);
2000
- var pcb_cutout = z92.discriminatedUnion("shape", [
2012
+ var pcb_cutout = z93.discriminatedUnion("shape", [
2001
2013
  pcb_cutout_rect,
2002
2014
  pcb_cutout_circle,
2003
2015
  pcb_cutout_polygon
@@ -2005,117 +2017,117 @@ var pcb_cutout = z92.discriminatedUnion("shape", [
2005
2017
  expectTypesMatch(true);
2006
2018
 
2007
2019
  // src/pcb/pcb_missing_footprint_error.ts
2008
- import { z as z93 } from "zod";
2009
- var pcb_missing_footprint_error = z93.object({
2010
- type: z93.literal("pcb_missing_footprint_error"),
2020
+ import { z as z94 } from "zod";
2021
+ var pcb_missing_footprint_error = z94.object({
2022
+ type: z94.literal("pcb_missing_footprint_error"),
2011
2023
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
2012
2024
  "pcb_missing_footprint_error"
2013
2025
  ),
2014
- pcb_group_id: z93.string().optional(),
2015
- subcircuit_id: z93.string().optional(),
2016
- error_type: z93.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
2017
- source_component_id: z93.string(),
2018
- message: z93.string()
2026
+ pcb_group_id: z94.string().optional(),
2027
+ subcircuit_id: z94.string().optional(),
2028
+ error_type: z94.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
2029
+ source_component_id: z94.string(),
2030
+ message: z94.string()
2019
2031
  }).describe("Defines a missing footprint error on the PCB");
2020
2032
  expectTypesMatch(
2021
2033
  true
2022
2034
  );
2023
2035
 
2024
2036
  // src/pcb/external_footprint_load_error.ts
2025
- import { z as z94 } from "zod";
2026
- var external_footprint_load_error = z94.object({
2027
- type: z94.literal("external_footprint_load_error"),
2037
+ import { z as z95 } from "zod";
2038
+ var external_footprint_load_error = z95.object({
2039
+ type: z95.literal("external_footprint_load_error"),
2028
2040
  external_footprint_load_error_id: getZodPrefixedIdWithDefault(
2029
2041
  "external_footprint_load_error"
2030
2042
  ),
2031
- pcb_component_id: z94.string(),
2032
- source_component_id: z94.string(),
2033
- pcb_group_id: z94.string().optional(),
2034
- subcircuit_id: z94.string().optional(),
2035
- footprinter_string: z94.string().optional(),
2036
- error_type: z94.literal("external_footprint_load_error").default("external_footprint_load_error"),
2037
- message: z94.string()
2043
+ pcb_component_id: z95.string(),
2044
+ source_component_id: z95.string(),
2045
+ pcb_group_id: z95.string().optional(),
2046
+ subcircuit_id: z95.string().optional(),
2047
+ footprinter_string: z95.string().optional(),
2048
+ error_type: z95.literal("external_footprint_load_error").default("external_footprint_load_error"),
2049
+ message: z95.string()
2038
2050
  }).describe("Defines an error when an external footprint fails to load");
2039
2051
  expectTypesMatch(true);
2040
2052
 
2041
2053
  // src/pcb/circuit_json_footprint_load_error.ts
2042
- import { z as z95 } from "zod";
2043
- var circuit_json_footprint_load_error = z95.object({
2044
- type: z95.literal("circuit_json_footprint_load_error"),
2054
+ import { z as z96 } from "zod";
2055
+ var circuit_json_footprint_load_error = z96.object({
2056
+ type: z96.literal("circuit_json_footprint_load_error"),
2045
2057
  circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
2046
2058
  "circuit_json_footprint_load_error"
2047
2059
  ),
2048
- pcb_component_id: z95.string(),
2049
- source_component_id: z95.string(),
2050
- pcb_group_id: z95.string().optional(),
2051
- subcircuit_id: z95.string().optional(),
2052
- error_type: z95.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
2053
- message: z95.string(),
2054
- circuit_json: z95.array(z95.any()).optional()
2060
+ pcb_component_id: z96.string(),
2061
+ source_component_id: z96.string(),
2062
+ pcb_group_id: z96.string().optional(),
2063
+ subcircuit_id: z96.string().optional(),
2064
+ error_type: z96.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
2065
+ message: z96.string(),
2066
+ circuit_json: z96.array(z96.any()).optional()
2055
2067
  }).describe("Defines an error when a circuit JSON footprint fails to load");
2056
2068
  expectTypesMatch(true);
2057
2069
 
2058
2070
  // src/pcb/pcb_group.ts
2059
- import { z as z96 } from "zod";
2060
- var pcb_group = z96.object({
2061
- type: z96.literal("pcb_group"),
2071
+ import { z as z97 } from "zod";
2072
+ var pcb_group = z97.object({
2073
+ type: z97.literal("pcb_group"),
2062
2074
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
2063
- source_group_id: z96.string(),
2064
- is_subcircuit: z96.boolean().optional(),
2065
- subcircuit_id: z96.string().optional(),
2075
+ source_group_id: z97.string(),
2076
+ is_subcircuit: z97.boolean().optional(),
2077
+ subcircuit_id: z97.string().optional(),
2066
2078
  width: length,
2067
2079
  height: length,
2068
2080
  center: point,
2069
- pcb_component_ids: z96.array(z96.string()),
2070
- name: z96.string().optional(),
2071
- description: z96.string().optional(),
2072
- layout_mode: z96.string().optional(),
2073
- autorouter_configuration: z96.object({
2081
+ pcb_component_ids: z97.array(z97.string()),
2082
+ name: z97.string().optional(),
2083
+ description: z97.string().optional(),
2084
+ layout_mode: z97.string().optional(),
2085
+ autorouter_configuration: z97.object({
2074
2086
  trace_clearance: length
2075
2087
  }).optional(),
2076
- autorouter_used_string: z96.string().optional()
2088
+ autorouter_used_string: z97.string().optional()
2077
2089
  }).describe("Defines a group of components on the PCB");
2078
2090
  expectTypesMatch(true);
2079
2091
 
2080
2092
  // src/pcb/pcb_autorouting_error.ts
2081
- import { z as z97 } from "zod";
2082
- var pcb_autorouting_error = z97.object({
2083
- type: z97.literal("pcb_autorouting_error"),
2093
+ import { z as z98 } from "zod";
2094
+ var pcb_autorouting_error = z98.object({
2095
+ type: z98.literal("pcb_autorouting_error"),
2084
2096
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
2085
- error_type: z97.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
2086
- message: z97.string(),
2087
- subcircuit_id: z97.string().optional()
2097
+ error_type: z98.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
2098
+ message: z98.string(),
2099
+ subcircuit_id: z98.string().optional()
2088
2100
  }).describe("The autorouting has failed to route a portion of the board");
2089
2101
  expectTypesMatch(true);
2090
2102
 
2091
2103
  // src/pcb/pcb_manual_edit_conflict_warning.ts
2092
- import { z as z98 } from "zod";
2093
- var pcb_manual_edit_conflict_warning = z98.object({
2094
- type: z98.literal("pcb_manual_edit_conflict_warning"),
2104
+ import { z as z99 } from "zod";
2105
+ var pcb_manual_edit_conflict_warning = z99.object({
2106
+ type: z99.literal("pcb_manual_edit_conflict_warning"),
2095
2107
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
2096
2108
  "pcb_manual_edit_conflict_warning"
2097
2109
  ),
2098
- warning_type: z98.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
2099
- message: z98.string(),
2100
- pcb_component_id: z98.string(),
2101
- pcb_group_id: z98.string().optional(),
2102
- subcircuit_id: z98.string().optional(),
2103
- source_component_id: z98.string()
2110
+ warning_type: z99.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
2111
+ message: z99.string(),
2112
+ pcb_component_id: z99.string(),
2113
+ pcb_group_id: z99.string().optional(),
2114
+ subcircuit_id: z99.string().optional(),
2115
+ source_component_id: z99.string()
2104
2116
  }).describe(
2105
2117
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
2106
2118
  );
2107
2119
  expectTypesMatch(true);
2108
2120
 
2109
2121
  // src/pcb/pcb_breakout_point.ts
2110
- import { z as z99 } from "zod";
2111
- var pcb_breakout_point = z99.object({
2112
- type: z99.literal("pcb_breakout_point"),
2122
+ import { z as z100 } from "zod";
2123
+ var pcb_breakout_point = z100.object({
2124
+ type: z100.literal("pcb_breakout_point"),
2113
2125
  pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
2114
- pcb_group_id: z99.string(),
2115
- subcircuit_id: z99.string().optional(),
2116
- source_trace_id: z99.string().optional(),
2117
- source_port_id: z99.string().optional(),
2118
- source_net_id: z99.string().optional(),
2126
+ pcb_group_id: z100.string(),
2127
+ subcircuit_id: z100.string().optional(),
2128
+ source_trace_id: z100.string().optional(),
2129
+ source_port_id: z100.string().optional(),
2130
+ source_net_id: z100.string().optional(),
2119
2131
  x: distance,
2120
2132
  y: distance
2121
2133
  }).describe(
@@ -2124,60 +2136,60 @@ var pcb_breakout_point = z99.object({
2124
2136
  expectTypesMatch(true);
2125
2137
 
2126
2138
  // src/pcb/pcb_ground_plane.ts
2127
- import { z as z100 } from "zod";
2128
- var pcb_ground_plane = z100.object({
2129
- type: z100.literal("pcb_ground_plane"),
2139
+ import { z as z101 } from "zod";
2140
+ var pcb_ground_plane = z101.object({
2141
+ type: z101.literal("pcb_ground_plane"),
2130
2142
  pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
2131
- source_pcb_ground_plane_id: z100.string(),
2132
- source_net_id: z100.string(),
2133
- pcb_group_id: z100.string().optional(),
2134
- subcircuit_id: z100.string().optional()
2143
+ source_pcb_ground_plane_id: z101.string(),
2144
+ source_net_id: z101.string(),
2145
+ pcb_group_id: z101.string().optional(),
2146
+ subcircuit_id: z101.string().optional()
2135
2147
  }).describe("Defines a ground plane on the PCB");
2136
2148
  expectTypesMatch(true);
2137
2149
 
2138
2150
  // src/pcb/pcb_ground_plane_region.ts
2139
- import { z as z101 } from "zod";
2140
- var pcb_ground_plane_region = z101.object({
2141
- type: z101.literal("pcb_ground_plane_region"),
2151
+ import { z as z102 } from "zod";
2152
+ var pcb_ground_plane_region = z102.object({
2153
+ type: z102.literal("pcb_ground_plane_region"),
2142
2154
  pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
2143
2155
  "pcb_ground_plane_region"
2144
2156
  ),
2145
- pcb_ground_plane_id: z101.string(),
2146
- pcb_group_id: z101.string().optional(),
2147
- subcircuit_id: z101.string().optional(),
2157
+ pcb_ground_plane_id: z102.string(),
2158
+ pcb_group_id: z102.string().optional(),
2159
+ subcircuit_id: z102.string().optional(),
2148
2160
  layer: layer_ref,
2149
- points: z101.array(point)
2161
+ points: z102.array(point)
2150
2162
  }).describe("Defines a polygon region of a ground plane");
2151
2163
  expectTypesMatch(true);
2152
2164
 
2153
2165
  // src/pcb/pcb_thermal_spoke.ts
2154
- import { z as z102 } from "zod";
2155
- var pcb_thermal_spoke = z102.object({
2156
- type: z102.literal("pcb_thermal_spoke"),
2166
+ import { z as z103 } from "zod";
2167
+ var pcb_thermal_spoke = z103.object({
2168
+ type: z103.literal("pcb_thermal_spoke"),
2157
2169
  pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
2158
- pcb_ground_plane_id: z102.string(),
2159
- shape: z102.string(),
2160
- spoke_count: z102.number(),
2170
+ pcb_ground_plane_id: z103.string(),
2171
+ shape: z103.string(),
2172
+ spoke_count: z103.number(),
2161
2173
  spoke_thickness: distance,
2162
2174
  spoke_inner_diameter: distance,
2163
2175
  spoke_outer_diameter: distance,
2164
- pcb_plated_hole_id: z102.string().optional(),
2165
- subcircuit_id: z102.string().optional()
2176
+ pcb_plated_hole_id: z103.string().optional(),
2177
+ subcircuit_id: z103.string().optional()
2166
2178
  }).describe("Pattern for connecting a ground plane to a plated hole");
2167
2179
  expectTypesMatch(true);
2168
2180
 
2169
2181
  // src/pcb/pcb_copper_pour.ts
2170
- import { z as z103 } from "zod";
2171
- var pcb_copper_pour_base = z103.object({
2172
- type: z103.literal("pcb_copper_pour"),
2182
+ import { z as z104 } from "zod";
2183
+ var pcb_copper_pour_base = z104.object({
2184
+ type: z104.literal("pcb_copper_pour"),
2173
2185
  pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
2174
- pcb_group_id: z103.string().optional(),
2175
- subcircuit_id: z103.string().optional(),
2186
+ pcb_group_id: z104.string().optional(),
2187
+ subcircuit_id: z104.string().optional(),
2176
2188
  layer: layer_ref,
2177
- source_net_id: z103.string().optional()
2189
+ source_net_id: z104.string().optional()
2178
2190
  });
2179
2191
  var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
2180
- shape: z103.literal("rect"),
2192
+ shape: z104.literal("rect"),
2181
2193
  center: point,
2182
2194
  width: length,
2183
2195
  height: length,
@@ -2185,16 +2197,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
2185
2197
  });
2186
2198
  expectTypesMatch(true);
2187
2199
  var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
2188
- shape: z103.literal("brep"),
2200
+ shape: z104.literal("brep"),
2189
2201
  brep_shape
2190
2202
  });
2191
2203
  expectTypesMatch(true);
2192
2204
  var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
2193
- shape: z103.literal("polygon"),
2194
- points: z103.array(point)
2205
+ shape: z104.literal("polygon"),
2206
+ points: z104.array(point)
2195
2207
  });
2196
2208
  expectTypesMatch(true);
2197
- var pcb_copper_pour = z103.discriminatedUnion("shape", [
2209
+ var pcb_copper_pour = z104.discriminatedUnion("shape", [
2198
2210
  pcb_copper_pour_rect,
2199
2211
  pcb_copper_pour_brep,
2200
2212
  pcb_copper_pour_polygon
@@ -2202,60 +2214,60 @@ var pcb_copper_pour = z103.discriminatedUnion("shape", [
2202
2214
  expectTypesMatch(true);
2203
2215
 
2204
2216
  // src/pcb/pcb_component_outside_board_error.ts
2205
- import { z as z104 } from "zod";
2206
- var pcb_component_outside_board_error = z104.object({
2207
- type: z104.literal("pcb_component_outside_board_error"),
2217
+ import { z as z105 } from "zod";
2218
+ var pcb_component_outside_board_error = z105.object({
2219
+ type: z105.literal("pcb_component_outside_board_error"),
2208
2220
  pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
2209
2221
  "pcb_component_outside_board_error"
2210
2222
  ),
2211
- error_type: z104.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
2212
- message: z104.string(),
2213
- pcb_component_id: z104.string(),
2214
- pcb_board_id: z104.string(),
2223
+ error_type: z105.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
2224
+ message: z105.string(),
2225
+ pcb_component_id: z105.string(),
2226
+ pcb_board_id: z105.string(),
2215
2227
  component_center: point,
2216
- component_bounds: z104.object({
2217
- min_x: z104.number(),
2218
- max_x: z104.number(),
2219
- min_y: z104.number(),
2220
- max_y: z104.number()
2228
+ component_bounds: z105.object({
2229
+ min_x: z105.number(),
2230
+ max_x: z105.number(),
2231
+ min_y: z105.number(),
2232
+ max_y: z105.number()
2221
2233
  }),
2222
- subcircuit_id: z104.string().optional(),
2223
- source_component_id: z104.string().optional()
2234
+ subcircuit_id: z105.string().optional(),
2235
+ source_component_id: z105.string().optional()
2224
2236
  }).describe(
2225
2237
  "Error emitted when a PCB component is placed outside the board boundaries"
2226
2238
  );
2227
2239
  expectTypesMatch(true);
2228
2240
 
2229
2241
  // src/cad/cad_component.ts
2230
- import { z as z105 } from "zod";
2231
- var cad_component = z105.object({
2232
- type: z105.literal("cad_component"),
2233
- cad_component_id: z105.string(),
2234
- pcb_component_id: z105.string(),
2235
- source_component_id: z105.string(),
2242
+ import { z as z106 } from "zod";
2243
+ var cad_component = z106.object({
2244
+ type: z106.literal("cad_component"),
2245
+ cad_component_id: z106.string(),
2246
+ pcb_component_id: z106.string(),
2247
+ source_component_id: z106.string(),
2236
2248
  position: point3,
2237
2249
  rotation: point3.optional(),
2238
2250
  size: point3.optional(),
2239
2251
  layer: layer_ref.optional(),
2240
- subcircuit_id: z105.string().optional(),
2252
+ subcircuit_id: z106.string().optional(),
2241
2253
  // These are all ways to generate/load the 3d model
2242
- footprinter_string: z105.string().optional(),
2243
- model_obj_url: z105.string().optional(),
2244
- model_stl_url: z105.string().optional(),
2245
- model_3mf_url: z105.string().optional(),
2246
- model_gltf_url: z105.string().optional(),
2247
- model_glb_url: z105.string().optional(),
2248
- model_step_url: z105.string().optional(),
2249
- model_wrl_url: z105.string().optional(),
2250
- model_unit_to_mm_scale_factor: z105.number().optional(),
2251
- model_jscad: z105.any().optional()
2254
+ footprinter_string: z106.string().optional(),
2255
+ model_obj_url: z106.string().optional(),
2256
+ model_stl_url: z106.string().optional(),
2257
+ model_3mf_url: z106.string().optional(),
2258
+ model_gltf_url: z106.string().optional(),
2259
+ model_glb_url: z106.string().optional(),
2260
+ model_step_url: z106.string().optional(),
2261
+ model_wrl_url: z106.string().optional(),
2262
+ model_unit_to_mm_scale_factor: z106.number().optional(),
2263
+ model_jscad: z106.any().optional()
2252
2264
  }).describe("Defines a component on the PCB");
2253
2265
  expectTypesMatch(true);
2254
2266
 
2255
2267
  // src/simulation/simulation_voltage_source.ts
2256
- import { z as z106 } from "zod";
2257
- var wave_shape = z106.enum(["sinewave", "square", "triangle", "sawtooth"]);
2258
- var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
2268
+ import { z as z107 } from "zod";
2269
+ var wave_shape = z107.enum(["sinewave", "square", "triangle", "sawtooth"]);
2270
+ var percentage = z107.union([z107.string(), z107.number()]).transform((val) => {
2259
2271
  if (typeof val === "string") {
2260
2272
  if (val.endsWith("%")) {
2261
2273
  return parseFloat(val.slice(0, -1)) / 100;
@@ -2264,30 +2276,30 @@ var percentage = z106.union([z106.string(), z106.number()]).transform((val) => {
2264
2276
  }
2265
2277
  return val;
2266
2278
  }).pipe(
2267
- z106.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
2279
+ z107.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
2268
2280
  );
2269
- var simulation_dc_voltage_source = z106.object({
2270
- type: z106.literal("simulation_voltage_source"),
2281
+ var simulation_dc_voltage_source = z107.object({
2282
+ type: z107.literal("simulation_voltage_source"),
2271
2283
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2272
2284
  "simulation_voltage_source"
2273
2285
  ),
2274
- is_dc_source: z106.literal(true).optional().default(true),
2275
- positive_source_port_id: z106.string().optional(),
2276
- negative_source_port_id: z106.string().optional(),
2277
- positive_source_net_id: z106.string().optional(),
2278
- negative_source_net_id: z106.string().optional(),
2286
+ is_dc_source: z107.literal(true).optional().default(true),
2287
+ positive_source_port_id: z107.string().optional(),
2288
+ negative_source_port_id: z107.string().optional(),
2289
+ positive_source_net_id: z107.string().optional(),
2290
+ negative_source_net_id: z107.string().optional(),
2279
2291
  voltage
2280
2292
  }).describe("Defines a DC voltage source for simulation");
2281
- var simulation_ac_voltage_source = z106.object({
2282
- type: z106.literal("simulation_voltage_source"),
2293
+ var simulation_ac_voltage_source = z107.object({
2294
+ type: z107.literal("simulation_voltage_source"),
2283
2295
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2284
2296
  "simulation_voltage_source"
2285
2297
  ),
2286
- is_dc_source: z106.literal(false),
2287
- terminal1_source_port_id: z106.string().optional(),
2288
- terminal2_source_port_id: z106.string().optional(),
2289
- terminal1_source_net_id: z106.string().optional(),
2290
- terminal2_source_net_id: z106.string().optional(),
2298
+ is_dc_source: z107.literal(false),
2299
+ terminal1_source_port_id: z107.string().optional(),
2300
+ terminal2_source_port_id: z107.string().optional(),
2301
+ terminal1_source_net_id: z107.string().optional(),
2302
+ terminal2_source_net_id: z107.string().optional(),
2291
2303
  voltage: voltage.optional(),
2292
2304
  frequency: frequency.optional(),
2293
2305
  peak_to_peak_voltage: voltage.optional(),
@@ -2295,14 +2307,14 @@ var simulation_ac_voltage_source = z106.object({
2295
2307
  phase: rotation.optional(),
2296
2308
  duty_cycle: percentage.optional()
2297
2309
  }).describe("Defines an AC voltage source for simulation");
2298
- var simulation_voltage_source = z106.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
2310
+ var simulation_voltage_source = z107.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
2299
2311
  expectTypesMatch(true);
2300
2312
  expectTypesMatch(true);
2301
2313
  expectTypesMatch(true);
2302
2314
 
2303
2315
  // src/any_circuit_element.ts
2304
- import { z as z107 } from "zod";
2305
- var any_circuit_element = z107.union([
2316
+ import { z as z108 } from "zod";
2317
+ var any_circuit_element = z108.union([
2306
2318
  source_trace,
2307
2319
  source_port,
2308
2320
  any_source_component,
@@ -2339,6 +2351,7 @@ var any_circuit_element = z107.union([
2339
2351
  pcb_plated_hole,
2340
2352
  pcb_keepout,
2341
2353
  pcb_port,
2354
+ pcb_net,
2342
2355
  pcb_text,
2343
2356
  pcb_trace,
2344
2357
  pcb_via,
@@ -2439,6 +2452,7 @@ export {
2439
2452
  pcb_keepout,
2440
2453
  pcb_manual_edit_conflict_warning,
2441
2454
  pcb_missing_footprint_error,
2455
+ pcb_net,
2442
2456
  pcb_placement_error,
2443
2457
  pcb_plated_hole,
2444
2458
  pcb_port,