circuit-json 0.0.258 → 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,100 +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
 
2052
+ // src/pcb/circuit_json_footprint_load_error.ts
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"),
2056
+ circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
2057
+ "circuit_json_footprint_load_error"
2058
+ ),
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()
2066
+ }).describe("Defines an error when a circuit JSON footprint fails to load");
2067
+ expectTypesMatch(true);
2068
+
2041
2069
  // src/pcb/pcb_group.ts
2042
- import { z as z95 } from "zod";
2043
- var pcb_group = z95.object({
2044
- type: z95.literal("pcb_group"),
2070
+ import { z as z97 } from "zod";
2071
+ var pcb_group = z97.object({
2072
+ type: z97.literal("pcb_group"),
2045
2073
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
2046
- source_group_id: z95.string(),
2047
- is_subcircuit: z95.boolean().optional(),
2048
- subcircuit_id: z95.string().optional(),
2074
+ source_group_id: z97.string(),
2075
+ is_subcircuit: z97.boolean().optional(),
2076
+ subcircuit_id: z97.string().optional(),
2049
2077
  width: length,
2050
2078
  height: length,
2051
2079
  center: point,
2052
- pcb_component_ids: z95.array(z95.string()),
2053
- name: z95.string().optional(),
2054
- description: z95.string().optional(),
2055
- layout_mode: z95.string().optional(),
2056
- autorouter_configuration: z95.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({
2057
2085
  trace_clearance: length
2058
2086
  }).optional(),
2059
- autorouter_used_string: z95.string().optional()
2087
+ autorouter_used_string: z97.string().optional()
2060
2088
  }).describe("Defines a group of components on the PCB");
2061
2089
  expectTypesMatch(true);
2062
2090
 
2063
2091
  // src/pcb/pcb_autorouting_error.ts
2064
- import { z as z96 } from "zod";
2065
- var pcb_autorouting_error = z96.object({
2066
- type: z96.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"),
2067
2095
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
2068
- error_type: z96.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
2069
- message: z96.string(),
2070
- subcircuit_id: z96.string().optional()
2096
+ error_type: z98.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
2097
+ message: z98.string(),
2098
+ subcircuit_id: z98.string().optional()
2071
2099
  }).describe("The autorouting has failed to route a portion of the board");
2072
2100
  expectTypesMatch(true);
2073
2101
 
2074
2102
  // src/pcb/pcb_manual_edit_conflict_warning.ts
2075
- import { z as z97 } from "zod";
2076
- var pcb_manual_edit_conflict_warning = z97.object({
2077
- type: z97.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"),
2078
2106
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
2079
2107
  "pcb_manual_edit_conflict_warning"
2080
2108
  ),
2081
- warning_type: z97.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
2082
- message: z97.string(),
2083
- pcb_component_id: z97.string(),
2084
- pcb_group_id: z97.string().optional(),
2085
- subcircuit_id: z97.string().optional(),
2086
- source_component_id: z97.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()
2087
2115
  }).describe(
2088
2116
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
2089
2117
  );
2090
2118
  expectTypesMatch(true);
2091
2119
 
2092
2120
  // src/pcb/pcb_breakout_point.ts
2093
- import { z as z98 } from "zod";
2094
- var pcb_breakout_point = z98.object({
2095
- type: z98.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"),
2096
2124
  pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
2097
- pcb_group_id: z98.string(),
2098
- subcircuit_id: z98.string().optional(),
2099
- source_trace_id: z98.string().optional(),
2100
- source_port_id: z98.string().optional(),
2101
- source_net_id: z98.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(),
2102
2130
  x: distance,
2103
2131
  y: distance
2104
2132
  }).describe(
@@ -2107,60 +2135,60 @@ var pcb_breakout_point = z98.object({
2107
2135
  expectTypesMatch(true);
2108
2136
 
2109
2137
  // src/pcb/pcb_ground_plane.ts
2110
- import { z as z99 } from "zod";
2111
- var pcb_ground_plane = z99.object({
2112
- type: z99.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"),
2113
2141
  pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
2114
- source_pcb_ground_plane_id: z99.string(),
2115
- source_net_id: z99.string(),
2116
- pcb_group_id: z99.string().optional(),
2117
- subcircuit_id: z99.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()
2118
2146
  }).describe("Defines a ground plane on the PCB");
2119
2147
  expectTypesMatch(true);
2120
2148
 
2121
2149
  // src/pcb/pcb_ground_plane_region.ts
2122
- import { z as z100 } from "zod";
2123
- var pcb_ground_plane_region = z100.object({
2124
- type: z100.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"),
2125
2153
  pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
2126
2154
  "pcb_ground_plane_region"
2127
2155
  ),
2128
- pcb_ground_plane_id: z100.string(),
2129
- pcb_group_id: z100.string().optional(),
2130
- subcircuit_id: z100.string().optional(),
2156
+ pcb_ground_plane_id: z102.string(),
2157
+ pcb_group_id: z102.string().optional(),
2158
+ subcircuit_id: z102.string().optional(),
2131
2159
  layer: layer_ref,
2132
- points: z100.array(point)
2160
+ points: z102.array(point)
2133
2161
  }).describe("Defines a polygon region of a ground plane");
2134
2162
  expectTypesMatch(true);
2135
2163
 
2136
2164
  // src/pcb/pcb_thermal_spoke.ts
2137
- import { z as z101 } from "zod";
2138
- var pcb_thermal_spoke = z101.object({
2139
- type: z101.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"),
2140
2168
  pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
2141
- pcb_ground_plane_id: z101.string(),
2142
- shape: z101.string(),
2143
- spoke_count: z101.number(),
2169
+ pcb_ground_plane_id: z103.string(),
2170
+ shape: z103.string(),
2171
+ spoke_count: z103.number(),
2144
2172
  spoke_thickness: distance,
2145
2173
  spoke_inner_diameter: distance,
2146
2174
  spoke_outer_diameter: distance,
2147
- pcb_plated_hole_id: z101.string().optional(),
2148
- subcircuit_id: z101.string().optional()
2175
+ pcb_plated_hole_id: z103.string().optional(),
2176
+ subcircuit_id: z103.string().optional()
2149
2177
  }).describe("Pattern for connecting a ground plane to a plated hole");
2150
2178
  expectTypesMatch(true);
2151
2179
 
2152
2180
  // src/pcb/pcb_copper_pour.ts
2153
- import { z as z102 } from "zod";
2154
- var pcb_copper_pour_base = z102.object({
2155
- type: z102.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"),
2156
2184
  pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
2157
- pcb_group_id: z102.string().optional(),
2158
- subcircuit_id: z102.string().optional(),
2185
+ pcb_group_id: z104.string().optional(),
2186
+ subcircuit_id: z104.string().optional(),
2159
2187
  layer: layer_ref,
2160
- source_net_id: z102.string().optional()
2188
+ source_net_id: z104.string().optional()
2161
2189
  });
2162
2190
  var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
2163
- shape: z102.literal("rect"),
2191
+ shape: z104.literal("rect"),
2164
2192
  center: point,
2165
2193
  width: length,
2166
2194
  height: length,
@@ -2168,16 +2196,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
2168
2196
  });
2169
2197
  expectTypesMatch(true);
2170
2198
  var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
2171
- shape: z102.literal("brep"),
2199
+ shape: z104.literal("brep"),
2172
2200
  brep_shape
2173
2201
  });
2174
2202
  expectTypesMatch(true);
2175
2203
  var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
2176
- shape: z102.literal("polygon"),
2177
- points: z102.array(point)
2204
+ shape: z104.literal("polygon"),
2205
+ points: z104.array(point)
2178
2206
  });
2179
2207
  expectTypesMatch(true);
2180
- var pcb_copper_pour = z102.discriminatedUnion("shape", [
2208
+ var pcb_copper_pour = z104.discriminatedUnion("shape", [
2181
2209
  pcb_copper_pour_rect,
2182
2210
  pcb_copper_pour_brep,
2183
2211
  pcb_copper_pour_polygon
@@ -2185,60 +2213,60 @@ var pcb_copper_pour = z102.discriminatedUnion("shape", [
2185
2213
  expectTypesMatch(true);
2186
2214
 
2187
2215
  // src/pcb/pcb_component_outside_board_error.ts
2188
- import { z as z103 } from "zod";
2189
- var pcb_component_outside_board_error = z103.object({
2190
- type: z103.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"),
2191
2219
  pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
2192
2220
  "pcb_component_outside_board_error"
2193
2221
  ),
2194
- error_type: z103.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
2195
- message: z103.string(),
2196
- pcb_component_id: z103.string(),
2197
- pcb_board_id: z103.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(),
2198
2226
  component_center: point,
2199
- component_bounds: z103.object({
2200
- min_x: z103.number(),
2201
- max_x: z103.number(),
2202
- min_y: z103.number(),
2203
- max_y: z103.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()
2204
2232
  }),
2205
- subcircuit_id: z103.string().optional(),
2206
- source_component_id: z103.string().optional()
2233
+ subcircuit_id: z105.string().optional(),
2234
+ source_component_id: z105.string().optional()
2207
2235
  }).describe(
2208
2236
  "Error emitted when a PCB component is placed outside the board boundaries"
2209
2237
  );
2210
2238
  expectTypesMatch(true);
2211
2239
 
2212
2240
  // src/cad/cad_component.ts
2213
- import { z as z104 } from "zod";
2214
- var cad_component = z104.object({
2215
- type: z104.literal("cad_component"),
2216
- cad_component_id: z104.string(),
2217
- pcb_component_id: z104.string(),
2218
- source_component_id: z104.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(),
2219
2247
  position: point3,
2220
2248
  rotation: point3.optional(),
2221
2249
  size: point3.optional(),
2222
2250
  layer: layer_ref.optional(),
2223
- subcircuit_id: z104.string().optional(),
2251
+ subcircuit_id: z106.string().optional(),
2224
2252
  // These are all ways to generate/load the 3d model
2225
- footprinter_string: z104.string().optional(),
2226
- model_obj_url: z104.string().optional(),
2227
- model_stl_url: z104.string().optional(),
2228
- model_3mf_url: z104.string().optional(),
2229
- model_gltf_url: z104.string().optional(),
2230
- model_glb_url: z104.string().optional(),
2231
- model_step_url: z104.string().optional(),
2232
- model_wrl_url: z104.string().optional(),
2233
- model_unit_to_mm_scale_factor: z104.number().optional(),
2234
- model_jscad: z104.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()
2235
2263
  }).describe("Defines a component on the PCB");
2236
2264
  expectTypesMatch(true);
2237
2265
 
2238
2266
  // src/simulation/simulation_voltage_source.ts
2239
- import { z as z105 } from "zod";
2240
- var wave_shape = z105.enum(["sinewave", "square", "triangle", "sawtooth"]);
2241
- var percentage = z105.union([z105.string(), z105.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) => {
2242
2270
  if (typeof val === "string") {
2243
2271
  if (val.endsWith("%")) {
2244
2272
  return parseFloat(val.slice(0, -1)) / 100;
@@ -2247,30 +2275,30 @@ var percentage = z105.union([z105.string(), z105.number()]).transform((val) => {
2247
2275
  }
2248
2276
  return val;
2249
2277
  }).pipe(
2250
- z105.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%")
2251
2279
  );
2252
- var simulation_dc_voltage_source = z105.object({
2253
- type: z105.literal("simulation_voltage_source"),
2280
+ var simulation_dc_voltage_source = z107.object({
2281
+ type: z107.literal("simulation_voltage_source"),
2254
2282
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2255
2283
  "simulation_voltage_source"
2256
2284
  ),
2257
- is_dc_source: z105.literal(true).optional().default(true),
2258
- positive_source_port_id: z105.string().optional(),
2259
- negative_source_port_id: z105.string().optional(),
2260
- positive_source_net_id: z105.string().optional(),
2261
- negative_source_net_id: z105.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(),
2262
2290
  voltage
2263
2291
  }).describe("Defines a DC voltage source for simulation");
2264
- var simulation_ac_voltage_source = z105.object({
2265
- type: z105.literal("simulation_voltage_source"),
2292
+ var simulation_ac_voltage_source = z107.object({
2293
+ type: z107.literal("simulation_voltage_source"),
2266
2294
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
2267
2295
  "simulation_voltage_source"
2268
2296
  ),
2269
- is_dc_source: z105.literal(false),
2270
- terminal1_source_port_id: z105.string().optional(),
2271
- terminal2_source_port_id: z105.string().optional(),
2272
- terminal1_source_net_id: z105.string().optional(),
2273
- terminal2_source_net_id: z105.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(),
2274
2302
  voltage: voltage.optional(),
2275
2303
  frequency: frequency.optional(),
2276
2304
  peak_to_peak_voltage: voltage.optional(),
@@ -2278,14 +2306,14 @@ var simulation_ac_voltage_source = z105.object({
2278
2306
  phase: rotation.optional(),
2279
2307
  duty_cycle: percentage.optional()
2280
2308
  }).describe("Defines an AC voltage source for simulation");
2281
- var simulation_voltage_source = z105.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");
2282
2310
  expectTypesMatch(true);
2283
2311
  expectTypesMatch(true);
2284
2312
  expectTypesMatch(true);
2285
2313
 
2286
2314
  // src/any_circuit_element.ts
2287
- import { z as z106 } from "zod";
2288
- var any_circuit_element = z106.union([
2315
+ import { z as z108 } from "zod";
2316
+ var any_circuit_element = z108.union([
2289
2317
  source_trace,
2290
2318
  source_port,
2291
2319
  any_source_component,
@@ -2317,10 +2345,12 @@ var any_circuit_element = z106.union([
2317
2345
  pcb_hole,
2318
2346
  pcb_missing_footprint_error,
2319
2347
  external_footprint_load_error,
2348
+ circuit_json_footprint_load_error,
2320
2349
  pcb_manual_edit_conflict_warning,
2321
2350
  pcb_plated_hole,
2322
2351
  pcb_keepout,
2323
2352
  pcb_port,
2353
+ pcb_net,
2324
2354
  pcb_text,
2325
2355
  pcb_trace,
2326
2356
  pcb_via,
@@ -2385,6 +2415,7 @@ export {
2385
2415
  brep_shape,
2386
2416
  cad_component,
2387
2417
  capacitance,
2418
+ circuit_json_footprint_load_error,
2388
2419
  current,
2389
2420
  distance,
2390
2421
  external_footprint_load_error,
@@ -2420,6 +2451,7 @@ export {
2420
2451
  pcb_keepout,
2421
2452
  pcb_manual_edit_conflict_warning,
2422
2453
  pcb_missing_footprint_error,
2454
+ pcb_net,
2423
2455
  pcb_placement_error,
2424
2456
  pcb_plated_hole,
2425
2457
  pcb_port,