circuit-json 0.0.259 → 0.0.260

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