easyeda 0.0.320 → 0.0.322

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -100,6 +100,7 @@ __export(dist_exports, {
100
100
  pcb_note_path: () => pcb_note_path,
101
101
  pcb_note_rect: () => pcb_note_rect,
102
102
  pcb_note_text: () => pcb_note_text,
103
+ pcb_packing_error: () => pcb_packing_error,
103
104
  pcb_pad_pad_clearance_error: () => pcb_pad_pad_clearance_error,
104
105
  pcb_pad_trace_clearance_error: () => pcb_pad_trace_clearance_error,
105
106
  pcb_panel: () => pcb_panel,
@@ -133,6 +134,7 @@ __export(dist_exports, {
133
134
  pcb_trace_route_point_through_pad: () => pcb_trace_route_point_through_pad,
134
135
  pcb_trace_route_point_via: () => pcb_trace_route_point_via,
135
136
  pcb_trace_route_point_wire: () => pcb_trace_route_point_wire,
137
+ pcb_trace_too_long_warning: () => pcb_trace_too_long_warning,
136
138
  pcb_trace_warning: () => pcb_trace_warning,
137
139
  pcb_via: () => pcb_via,
138
140
  pcb_via_clearance_error: () => pcb_via_clearance_error,
@@ -151,6 +153,7 @@ __export(dist_exports, {
151
153
  schematic_box: () => schematic_box,
152
154
  schematic_circle: () => schematic_circle,
153
155
  schematic_component: () => schematic_component,
156
+ schematic_component_overlap_warning: () => schematic_component_overlap_warning,
154
157
  schematic_component_port_arrangement_by_sides: () => schematic_component_port_arrangement_by_sides,
155
158
  schematic_component_port_arrangement_by_size: () => schematic_component_port_arrangement_by_size,
156
159
  schematic_debug_line: () => schematic_debug_line,
@@ -158,6 +161,7 @@ __export(dist_exports, {
158
161
  schematic_debug_object_base: () => schematic_debug_object_base,
159
162
  schematic_debug_point: () => schematic_debug_point,
160
163
  schematic_debug_rect: () => schematic_debug_rect,
164
+ schematic_element_outside_sheet_warning: () => schematic_element_outside_sheet_warning,
161
165
  schematic_error: () => schematic_error,
162
166
  schematic_group: () => schematic_group,
163
167
  schematic_layout_error: () => schematic_layout_error,
@@ -176,14 +180,26 @@ __export(dist_exports, {
176
180
  schematic_trace: () => schematic_trace,
177
181
  schematic_voltage_probe: () => schematic_voltage_probe,
178
182
  simulation_ac_current_source: () => simulation_ac_current_source,
183
+ simulation_ac_sweep_current_graph: () => simulation_ac_sweep_current_graph,
184
+ simulation_ac_sweep_voltage_graph: () => simulation_ac_sweep_voltage_graph,
179
185
  simulation_ac_voltage_source: () => simulation_ac_voltage_source,
186
+ simulation_complex_sample: () => simulation_complex_sample,
180
187
  simulation_current_probe: () => simulation_current_probe,
181
188
  simulation_current_source: () => simulation_current_source,
182
189
  simulation_dc_current_source: () => simulation_dc_current_source,
190
+ simulation_dc_operating_point_current: () => simulation_dc_operating_point_current,
191
+ simulation_dc_operating_point_voltage: () => simulation_dc_operating_point_voltage,
192
+ simulation_dc_sweep_current_graph: () => simulation_dc_sweep_current_graph,
193
+ simulation_dc_sweep_unit: () => simulation_dc_sweep_unit,
194
+ simulation_dc_sweep_voltage_graph: () => simulation_dc_sweep_voltage_graph,
183
195
  simulation_dc_voltage_source: () => simulation_dc_voltage_source,
184
196
  simulation_experiment: () => simulation_experiment,
185
197
  simulation_op_amp: () => simulation_op_amp,
186
198
  simulation_oscilloscope_trace: () => simulation_oscilloscope_trace,
199
+ simulation_parameter_sweep: () => simulation_parameter_sweep,
200
+ simulation_parameter_sweep_coordinate: () => simulation_parameter_sweep_coordinate,
201
+ simulation_parameter_type: () => simulation_parameter_type,
202
+ simulation_parameter_unit: () => simulation_parameter_unit,
187
203
  simulation_spice_subcircuit: () => simulation_spice_subcircuit,
188
204
  simulation_switch: () => simulation_switch,
189
205
  simulation_transient_current_graph: () => simulation_transient_current_graph,
@@ -698,13 +714,27 @@ import { z as z168 } from "zod";
698
714
  import { z as z169 } from "zod";
699
715
  import { z as z170 } from "zod";
700
716
  import { z as z171 } from "zod";
701
- import { z as z172 } from "zod";
702
717
  import { z as z173 } from "zod";
703
- import { z as z174 } from "zod";
718
+ import { z as z172 } from "zod";
704
719
  import { z as z175 } from "zod";
720
+ import { z as z174 } from "zod";
705
721
  import { z as z176 } from "zod";
706
722
  import { z as z177 } from "zod";
707
723
  import { z as z178 } from "zod";
724
+ import { z as z179 } from "zod";
725
+ import { z as z180 } from "zod";
726
+ import { z as z181 } from "zod";
727
+ import { z as z182 } from "zod";
728
+ import { z as z183 } from "zod";
729
+ import { z as z184 } from "zod";
730
+ import { z as z185 } from "zod";
731
+ import { z as z187 } from "zod";
732
+ import { z as z186 } from "zod";
733
+ import { z as z188 } from "zod";
734
+ import { z as z189 } from "zod";
735
+ import { z as z190 } from "zod";
736
+ import { z as z191 } from "zod";
737
+ import { z as z192 } from "zod";
708
738
  var resistance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "\u03A9").value);
709
739
  var capacitance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "F").value).transform((value) => {
710
740
  return Number.parseFloat(value.toPrecision(12));
@@ -818,6 +848,8 @@ var pcbRenderLayer = z7.enum([
818
848
  "inner4_copper",
819
849
  "inner5_copper",
820
850
  "inner6_copper",
851
+ "inner7_copper",
852
+ "inner8_copper",
821
853
  "edge_cuts",
822
854
  "drill"
823
855
  ]);
@@ -1164,6 +1196,7 @@ var source_project_metadata = z40.object({
1164
1196
  name: z40.string().optional(),
1165
1197
  software_used_string: z40.string().optional(),
1166
1198
  project_url: z40.string().optional(),
1199
+ source_filesystem_md5_hash: z40.string().optional(),
1167
1200
  created_at: timestamp.optional()
1168
1201
  });
1169
1202
  expectTypesMatch(true);
@@ -1468,7 +1501,9 @@ var all_layers = [
1468
1501
  "inner3",
1469
1502
  "inner4",
1470
1503
  "inner5",
1471
- "inner6"
1504
+ "inner6",
1505
+ "inner7",
1506
+ "inner8"
1472
1507
  ];
1473
1508
  var layer_string = z63.enum(all_layers);
1474
1509
  var layer_ref = layer_string.or(
@@ -1836,6 +1871,8 @@ var schematic_port = z83.object({
1836
1871
  display_pin_label: z83.string().optional(),
1837
1872
  subcircuit_id: z83.string().optional(),
1838
1873
  is_connected: z83.boolean().optional(),
1874
+ is_internal_circuit_port: z83.boolean().optional(),
1875
+ is_overlapping_internal_circuit_port: z83.boolean().optional(),
1839
1876
  has_input_arrow: z83.boolean().optional(),
1840
1877
  has_output_arrow: z83.boolean().optional(),
1841
1878
  is_drawn_with_inversion_circle: z83.boolean().optional()
@@ -1930,101 +1967,132 @@ var schematic_manual_edit_conflict_warning = z89.object({
1930
1967
  "Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
1931
1968
  );
1932
1969
  expectTypesMatch(true);
1933
- var schematic_group = z90.object({
1934
- type: z90.literal("schematic_group"),
1970
+ var schematic_component_overlap_warning = z90.object({
1971
+ type: z90.literal("schematic_component_overlap_warning"),
1972
+ schematic_component_overlap_warning_id: getZodPrefixedIdWithDefault(
1973
+ "schematic_component_overlap_warning"
1974
+ ),
1975
+ warning_type: z90.literal("schematic_component_overlap_warning").default("schematic_component_overlap_warning"),
1976
+ message: z90.string(),
1977
+ schematic_component_ids: z90.tuple([z90.string(), z90.string()]),
1978
+ schematic_sheet_id: z90.string().optional()
1979
+ }).describe(
1980
+ "Warning emitted when the rendered bounds of two schematic components overlap"
1981
+ );
1982
+ expectTypesMatch(true);
1983
+ var schematic_element_outside_sheet_warning = z91.object({
1984
+ type: z91.literal("schematic_element_outside_sheet_warning"),
1985
+ schematic_element_outside_sheet_warning_id: getZodPrefixedIdWithDefault(
1986
+ "schematic_element_outside_sheet_warning"
1987
+ ),
1988
+ warning_type: z91.literal("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),
1989
+ message: z91.string(),
1990
+ schematic_sheet_id: z91.string(),
1991
+ schematic_element_type: z91.enum([
1992
+ "schematic_component",
1993
+ "schematic_net_label",
1994
+ "schematic_trace"
1995
+ ]),
1996
+ schematic_element_id: z91.string()
1997
+ }).describe(
1998
+ "Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"
1999
+ );
2000
+ expectTypesMatch(true);
2001
+ var schematic_group = z92.object({
2002
+ type: z92.literal("schematic_group"),
1935
2003
  schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
1936
- schematic_sheet_id: z90.string().optional(),
1937
- source_group_id: z90.string(),
1938
- is_subcircuit: z90.boolean().optional(),
1939
- subcircuit_id: z90.string().optional(),
2004
+ schematic_sheet_id: z92.string().optional(),
2005
+ source_group_id: z92.string(),
2006
+ is_subcircuit: z92.boolean().optional(),
2007
+ subcircuit_id: z92.string().optional(),
1940
2008
  width: length,
1941
2009
  height: length,
1942
2010
  center: point,
1943
- schematic_component_ids: z90.array(z90.string()),
1944
- show_as_schematic_box: z90.boolean().optional(),
1945
- name: z90.string().optional(),
1946
- description: z90.string().optional()
2011
+ schematic_component_ids: z92.array(z92.string()),
2012
+ show_as_schematic_box: z92.boolean().optional(),
2013
+ name: z92.string().optional(),
2014
+ description: z92.string().optional()
1947
2015
  }).describe("Defines a group of components on the schematic");
1948
2016
  expectTypesMatch(true);
1949
- var schematic_table = z91.object({
1950
- type: z91.literal("schematic_table"),
2017
+ var schematic_table = z93.object({
2018
+ type: z93.literal("schematic_table"),
1951
2019
  schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
1952
- schematic_sheet_id: z91.string().optional(),
2020
+ schematic_sheet_id: z93.string().optional(),
1953
2021
  anchor_position: point,
1954
- column_widths: z91.array(distance),
1955
- row_heights: z91.array(distance),
2022
+ column_widths: z93.array(distance),
2023
+ row_heights: z93.array(distance),
1956
2024
  cell_padding: distance.optional(),
1957
2025
  border_width: distance.optional(),
1958
- subcircuit_id: z91.string().optional(),
1959
- schematic_component_id: z91.string().optional(),
2026
+ subcircuit_id: z93.string().optional(),
2027
+ schematic_component_id: z93.string().optional(),
1960
2028
  anchor: ninePointAnchor.optional()
1961
2029
  }).describe("Defines a table on the schematic");
1962
2030
  expectTypesMatch(true);
1963
- var schematic_table_cell = z92.object({
1964
- type: z92.literal("schematic_table_cell"),
2031
+ var schematic_table_cell = z94.object({
2032
+ type: z94.literal("schematic_table_cell"),
1965
2033
  schematic_table_cell_id: getZodPrefixedIdWithDefault(
1966
2034
  "schematic_table_cell"
1967
2035
  ),
1968
- schematic_sheet_id: z92.string().optional(),
1969
- schematic_table_id: z92.string(),
1970
- start_row_index: z92.number(),
1971
- end_row_index: z92.number(),
1972
- start_column_index: z92.number(),
1973
- end_column_index: z92.number(),
1974
- text: z92.string().optional(),
2036
+ schematic_sheet_id: z94.string().optional(),
2037
+ schematic_table_id: z94.string(),
2038
+ start_row_index: z94.number(),
2039
+ end_row_index: z94.number(),
2040
+ start_column_index: z94.number(),
2041
+ end_column_index: z94.number(),
2042
+ text: z94.string().optional(),
1975
2043
  center: point,
1976
2044
  width: distance,
1977
2045
  height: distance,
1978
- horizontal_align: z92.enum(["left", "center", "right"]).optional(),
1979
- vertical_align: z92.enum(["top", "middle", "bottom"]).optional(),
2046
+ horizontal_align: z94.enum(["left", "center", "right"]).optional(),
2047
+ vertical_align: z94.enum(["top", "middle", "bottom"]).optional(),
1980
2048
  font_size: distance.optional(),
1981
- subcircuit_id: z92.string().optional()
2049
+ subcircuit_id: z94.string().optional()
1982
2050
  }).describe("Defines a cell within a schematic_table");
1983
2051
  expectTypesMatch(true);
1984
- var schematic_sheet = z93.object({
1985
- type: z93.literal("schematic_sheet"),
2052
+ var schematic_sheet = z95.object({
2053
+ type: z95.literal("schematic_sheet"),
1986
2054
  schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
1987
- name: z93.string().optional(),
1988
- sheet_index: z93.number().optional(),
1989
- subcircuit_id: z93.string().optional(),
1990
- outline_color: z93.string().optional()
2055
+ name: z95.string().optional(),
2056
+ sheet_index: z95.number().optional(),
2057
+ subcircuit_id: z95.string().optional(),
2058
+ outline_color: z95.string().optional()
1991
2059
  }).describe(
1992
2060
  "Defines a schematic sheet or page that components can be placed on"
1993
2061
  );
1994
2062
  expectTypesMatch(true);
1995
- var point_with_bulge = z94.object({
2063
+ var point_with_bulge = z96.object({
1996
2064
  x: distance,
1997
2065
  y: distance,
1998
- bulge: z94.number().optional()
2066
+ bulge: z96.number().optional()
1999
2067
  });
2000
2068
  expectTypesMatch(true);
2001
- var ring = z94.object({
2002
- vertices: z94.array(point_with_bulge)
2069
+ var ring = z96.object({
2070
+ vertices: z96.array(point_with_bulge)
2003
2071
  });
2004
2072
  expectTypesMatch(true);
2005
- var brep_shape = z94.object({
2073
+ var brep_shape = z96.object({
2006
2074
  outer_ring: ring,
2007
- inner_rings: z94.array(ring).default([])
2075
+ inner_rings: z96.array(ring).default([])
2008
2076
  });
2009
2077
  expectTypesMatch(true);
2010
- var pcb_route_hint = z95.object({
2078
+ var pcb_route_hint = z97.object({
2011
2079
  x: distance,
2012
2080
  y: distance,
2013
- via: z95.boolean().optional(),
2081
+ via: z97.boolean().optional(),
2014
2082
  via_to_layer: layer_ref.optional()
2015
2083
  });
2016
- var pcb_route_hints = z95.array(pcb_route_hint);
2084
+ var pcb_route_hints = z97.array(pcb_route_hint);
2017
2085
  expectTypesMatch(true);
2018
2086
  expectTypesMatch(true);
2019
- var route_hint_point = z96.object({
2087
+ var route_hint_point = z98.object({
2020
2088
  x: distance,
2021
2089
  y: distance,
2022
- via: z96.boolean().optional(),
2090
+ via: z98.boolean().optional(),
2023
2091
  to_layer: layer_ref.optional(),
2024
2092
  trace_width: distance.optional()
2025
2093
  });
2026
2094
  expectTypesMatch(true);
2027
- var manufacturing_drc_properties = z97.object({
2095
+ var manufacturing_drc_properties = z99.object({
2028
2096
  min_trace_width: length.optional(),
2029
2097
  min_board_edge_clearance: length.optional(),
2030
2098
  min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
@@ -2037,26 +2105,26 @@ var manufacturing_drc_properties = z97.object({
2037
2105
  min_via_hole_diameter: length.optional(),
2038
2106
  min_via_pad_diameter: length.optional()
2039
2107
  });
2040
- var pcb_component = z98.object({
2041
- type: z98.literal("pcb_component"),
2108
+ var pcb_component = z100.object({
2109
+ type: z100.literal("pcb_component"),
2042
2110
  pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
2043
- source_component_id: z98.string(),
2111
+ source_component_id: z100.string(),
2044
2112
  center: point,
2045
2113
  layer: layer_ref,
2046
2114
  rotation,
2047
- display_offset_x: z98.string().optional().describe(
2115
+ display_offset_x: z100.string().optional().describe(
2048
2116
  "How to display the x offset for this part, usually corresponding with how the user specified it"
2049
2117
  ),
2050
- display_offset_y: z98.string().optional().describe(
2118
+ display_offset_y: z100.string().optional().describe(
2051
2119
  "How to display the y offset for this part, usually corresponding with how the user specified it"
2052
2120
  ),
2053
2121
  width: length,
2054
2122
  height: length,
2055
- do_not_place: z98.boolean().optional(),
2056
- is_allowed_to_be_off_board: z98.boolean().optional(),
2057
- subcircuit_id: z98.string().optional(),
2058
- pcb_group_id: z98.string().optional(),
2059
- position_mode: z98.enum([
2123
+ do_not_place: z100.boolean().optional(),
2124
+ is_allowed_to_be_off_board: z100.boolean().optional(),
2125
+ subcircuit_id: z100.string().optional(),
2126
+ pcb_group_id: z100.string().optional(),
2127
+ position_mode: z100.enum([
2060
2128
  "packed",
2061
2129
  "relative_to_group_anchor",
2062
2130
  "relative_to_another_component",
@@ -2064,272 +2132,272 @@ var pcb_component = z98.object({
2064
2132
  ]).optional(),
2065
2133
  anchor_position: point.optional(),
2066
2134
  anchor_alignment: ninePointAnchor.optional(),
2067
- positioned_relative_to_pcb_group_id: z98.string().optional(),
2068
- positioned_relative_to_pcb_board_id: z98.string().optional(),
2135
+ positioned_relative_to_pcb_group_id: z100.string().optional(),
2136
+ positioned_relative_to_pcb_board_id: z100.string().optional(),
2069
2137
  cable_insertion_center: point.optional(),
2070
- insertion_direction: z98.enum([
2138
+ insertion_direction: z100.enum([
2071
2139
  "from_above",
2072
2140
  "from_left",
2073
2141
  "from_right",
2074
2142
  "from_front",
2075
2143
  "from_back"
2076
2144
  ]).optional(),
2077
- metadata: z98.object({
2145
+ metadata: z100.object({
2078
2146
  kicad_footprint: kicadFootprintMetadata.optional()
2079
2147
  }).optional(),
2080
- obstructs_within_bounds: z98.boolean().default(true).describe(
2148
+ obstructs_within_bounds: z100.boolean().default(true).describe(
2081
2149
  "Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
2082
2150
  )
2083
2151
  }).describe("Defines a component on the PCB");
2084
2152
  expectTypesMatch(true);
2085
- var pcb_hole_circle = z99.object({
2086
- type: z99.literal("pcb_hole"),
2153
+ var pcb_hole_circle = z101.object({
2154
+ type: z101.literal("pcb_hole"),
2087
2155
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2088
- pcb_group_id: z99.string().optional(),
2089
- subcircuit_id: z99.string().optional(),
2090
- pcb_component_id: z99.string().optional(),
2091
- hole_shape: z99.literal("circle"),
2092
- hole_diameter: z99.number(),
2156
+ pcb_group_id: z101.string().optional(),
2157
+ subcircuit_id: z101.string().optional(),
2158
+ pcb_component_id: z101.string().optional(),
2159
+ hole_shape: z101.literal("circle"),
2160
+ hole_diameter: z101.number(),
2093
2161
  x: distance,
2094
2162
  y: distance,
2095
- is_covered_with_solder_mask: z99.boolean().optional(),
2096
- soldermask_margin: z99.number().optional()
2163
+ is_covered_with_solder_mask: z101.boolean().optional(),
2164
+ soldermask_margin: z101.number().optional()
2097
2165
  });
2098
2166
  var pcb_hole_circle_shape = pcb_hole_circle.describe(
2099
2167
  "Defines a circular hole on the PCB"
2100
2168
  );
2101
2169
  expectTypesMatch(true);
2102
- var pcb_hole_rect = z99.object({
2103
- type: z99.literal("pcb_hole"),
2170
+ var pcb_hole_rect = z101.object({
2171
+ type: z101.literal("pcb_hole"),
2104
2172
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2105
- pcb_group_id: z99.string().optional(),
2106
- subcircuit_id: z99.string().optional(),
2107
- pcb_component_id: z99.string().optional(),
2108
- hole_shape: z99.literal("rect"),
2109
- hole_width: z99.number(),
2110
- hole_height: z99.number(),
2173
+ pcb_group_id: z101.string().optional(),
2174
+ subcircuit_id: z101.string().optional(),
2175
+ pcb_component_id: z101.string().optional(),
2176
+ hole_shape: z101.literal("rect"),
2177
+ hole_width: z101.number(),
2178
+ hole_height: z101.number(),
2111
2179
  x: distance,
2112
2180
  y: distance,
2113
- is_covered_with_solder_mask: z99.boolean().optional(),
2114
- soldermask_margin: z99.number().optional()
2181
+ is_covered_with_solder_mask: z101.boolean().optional(),
2182
+ soldermask_margin: z101.number().optional()
2115
2183
  });
2116
2184
  var pcb_hole_rect_shape = pcb_hole_rect.describe(
2117
2185
  "Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
2118
2186
  );
2119
2187
  expectTypesMatch(true);
2120
- var pcb_hole_circle_or_square = z99.object({
2121
- type: z99.literal("pcb_hole"),
2188
+ var pcb_hole_circle_or_square = z101.object({
2189
+ type: z101.literal("pcb_hole"),
2122
2190
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2123
- pcb_group_id: z99.string().optional(),
2124
- subcircuit_id: z99.string().optional(),
2125
- pcb_component_id: z99.string().optional(),
2126
- hole_shape: z99.enum(["circle", "square"]),
2127
- hole_diameter: z99.number(),
2191
+ pcb_group_id: z101.string().optional(),
2192
+ subcircuit_id: z101.string().optional(),
2193
+ pcb_component_id: z101.string().optional(),
2194
+ hole_shape: z101.enum(["circle", "square"]),
2195
+ hole_diameter: z101.number(),
2128
2196
  x: distance,
2129
2197
  y: distance,
2130
- is_covered_with_solder_mask: z99.boolean().optional(),
2131
- soldermask_margin: z99.number().optional()
2198
+ is_covered_with_solder_mask: z101.boolean().optional(),
2199
+ soldermask_margin: z101.number().optional()
2132
2200
  });
2133
2201
  var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
2134
2202
  "Defines a circular or square hole on the PCB"
2135
2203
  );
2136
2204
  expectTypesMatch(true);
2137
- var pcb_hole_oval = z99.object({
2138
- type: z99.literal("pcb_hole"),
2205
+ var pcb_hole_oval = z101.object({
2206
+ type: z101.literal("pcb_hole"),
2139
2207
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2140
- pcb_group_id: z99.string().optional(),
2141
- subcircuit_id: z99.string().optional(),
2142
- pcb_component_id: z99.string().optional(),
2143
- hole_shape: z99.literal("oval"),
2144
- hole_width: z99.number(),
2145
- hole_height: z99.number(),
2208
+ pcb_group_id: z101.string().optional(),
2209
+ subcircuit_id: z101.string().optional(),
2210
+ pcb_component_id: z101.string().optional(),
2211
+ hole_shape: z101.literal("oval"),
2212
+ hole_width: z101.number(),
2213
+ hole_height: z101.number(),
2146
2214
  x: distance,
2147
2215
  y: distance,
2148
- is_covered_with_solder_mask: z99.boolean().optional(),
2149
- soldermask_margin: z99.number().optional()
2216
+ is_covered_with_solder_mask: z101.boolean().optional(),
2217
+ soldermask_margin: z101.number().optional()
2150
2218
  });
2151
2219
  var pcb_hole_oval_shape = pcb_hole_oval.describe(
2152
2220
  "Defines an oval hole on the PCB"
2153
2221
  );
2154
2222
  expectTypesMatch(true);
2155
- var pcb_hole_pill = z99.object({
2156
- type: z99.literal("pcb_hole"),
2223
+ var pcb_hole_pill = z101.object({
2224
+ type: z101.literal("pcb_hole"),
2157
2225
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2158
- pcb_group_id: z99.string().optional(),
2159
- subcircuit_id: z99.string().optional(),
2160
- pcb_component_id: z99.string().optional(),
2161
- hole_shape: z99.literal("pill"),
2162
- hole_width: z99.number(),
2163
- hole_height: z99.number(),
2226
+ pcb_group_id: z101.string().optional(),
2227
+ subcircuit_id: z101.string().optional(),
2228
+ pcb_component_id: z101.string().optional(),
2229
+ hole_shape: z101.literal("pill"),
2230
+ hole_width: z101.number(),
2231
+ hole_height: z101.number(),
2164
2232
  x: distance,
2165
2233
  y: distance,
2166
- is_covered_with_solder_mask: z99.boolean().optional(),
2167
- soldermask_margin: z99.number().optional()
2234
+ is_covered_with_solder_mask: z101.boolean().optional(),
2235
+ soldermask_margin: z101.number().optional()
2168
2236
  });
2169
2237
  var pcb_hole_pill_shape = pcb_hole_pill.describe(
2170
2238
  "Defines a pill-shaped hole on the PCB"
2171
2239
  );
2172
2240
  expectTypesMatch(true);
2173
- var pcb_hole_rotated_pill = z99.object({
2174
- type: z99.literal("pcb_hole"),
2241
+ var pcb_hole_rotated_pill = z101.object({
2242
+ type: z101.literal("pcb_hole"),
2175
2243
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
2176
- pcb_group_id: z99.string().optional(),
2177
- subcircuit_id: z99.string().optional(),
2178
- pcb_component_id: z99.string().optional(),
2179
- hole_shape: z99.literal("rotated_pill"),
2180
- hole_width: z99.number(),
2181
- hole_height: z99.number(),
2244
+ pcb_group_id: z101.string().optional(),
2245
+ subcircuit_id: z101.string().optional(),
2246
+ pcb_component_id: z101.string().optional(),
2247
+ hole_shape: z101.literal("rotated_pill"),
2248
+ hole_width: z101.number(),
2249
+ hole_height: z101.number(),
2182
2250
  x: distance,
2183
2251
  y: distance,
2184
2252
  ccw_rotation: rotation,
2185
- is_covered_with_solder_mask: z99.boolean().optional(),
2186
- soldermask_margin: z99.number().optional()
2253
+ is_covered_with_solder_mask: z101.boolean().optional(),
2254
+ soldermask_margin: z101.number().optional()
2187
2255
  });
2188
2256
  var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
2189
2257
  "Defines a rotated pill-shaped hole on the PCB"
2190
2258
  );
2191
2259
  expectTypesMatch(true);
2192
2260
  var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
2193
- var pcb_plated_hole_circle = z100.object({
2194
- type: z100.literal("pcb_plated_hole"),
2195
- shape: z100.literal("circle"),
2196
- pcb_group_id: z100.string().optional(),
2197
- subcircuit_id: z100.string().optional(),
2198
- outer_diameter: z100.number(),
2199
- hole_diameter: z100.number(),
2200
- is_covered_with_solder_mask: z100.boolean().optional(),
2261
+ var pcb_plated_hole_circle = z102.object({
2262
+ type: z102.literal("pcb_plated_hole"),
2263
+ shape: z102.literal("circle"),
2264
+ pcb_group_id: z102.string().optional(),
2265
+ subcircuit_id: z102.string().optional(),
2266
+ outer_diameter: z102.number(),
2267
+ hole_diameter: z102.number(),
2268
+ is_covered_with_solder_mask: z102.boolean().optional(),
2201
2269
  x: distance,
2202
2270
  y: distance,
2203
- layers: z100.array(layer_ref),
2204
- port_hints: z100.array(z100.string()).optional(),
2205
- pcb_component_id: z100.string().optional(),
2206
- pcb_port_id: z100.string().optional(),
2271
+ layers: z102.array(layer_ref),
2272
+ port_hints: z102.array(z102.string()).optional(),
2273
+ pcb_component_id: z102.string().optional(),
2274
+ pcb_port_id: z102.string().optional(),
2207
2275
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2208
- soldermask_margin: z100.number().optional()
2276
+ soldermask_margin: z102.number().optional()
2209
2277
  });
2210
- var pcb_plated_hole_oval = z100.object({
2211
- type: z100.literal("pcb_plated_hole"),
2212
- shape: z100.enum(["oval", "pill"]),
2213
- pcb_group_id: z100.string().optional(),
2214
- subcircuit_id: z100.string().optional(),
2215
- outer_width: z100.number(),
2216
- outer_height: z100.number(),
2217
- hole_width: z100.number(),
2218
- hole_height: z100.number(),
2219
- is_covered_with_solder_mask: z100.boolean().optional(),
2278
+ var pcb_plated_hole_oval = z102.object({
2279
+ type: z102.literal("pcb_plated_hole"),
2280
+ shape: z102.enum(["oval", "pill"]),
2281
+ pcb_group_id: z102.string().optional(),
2282
+ subcircuit_id: z102.string().optional(),
2283
+ outer_width: z102.number(),
2284
+ outer_height: z102.number(),
2285
+ hole_width: z102.number(),
2286
+ hole_height: z102.number(),
2287
+ is_covered_with_solder_mask: z102.boolean().optional(),
2220
2288
  x: distance,
2221
2289
  y: distance,
2222
2290
  ccw_rotation: rotation,
2223
- layers: z100.array(layer_ref),
2224
- port_hints: z100.array(z100.string()).optional(),
2225
- pcb_component_id: z100.string().optional(),
2226
- pcb_port_id: z100.string().optional(),
2291
+ layers: z102.array(layer_ref),
2292
+ port_hints: z102.array(z102.string()).optional(),
2293
+ pcb_component_id: z102.string().optional(),
2294
+ pcb_port_id: z102.string().optional(),
2227
2295
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2228
- soldermask_margin: z100.number().optional()
2296
+ soldermask_margin: z102.number().optional()
2229
2297
  });
2230
- var pcb_circular_hole_with_rect_pad = z100.object({
2231
- type: z100.literal("pcb_plated_hole"),
2232
- shape: z100.literal("circular_hole_with_rect_pad"),
2233
- pcb_group_id: z100.string().optional(),
2234
- subcircuit_id: z100.string().optional(),
2235
- hole_shape: z100.literal("circle"),
2236
- pad_shape: z100.literal("rect"),
2237
- hole_diameter: z100.number(),
2238
- rect_pad_width: z100.number(),
2239
- rect_pad_height: z100.number(),
2240
- rect_border_radius: z100.number().optional(),
2298
+ var pcb_circular_hole_with_rect_pad = z102.object({
2299
+ type: z102.literal("pcb_plated_hole"),
2300
+ shape: z102.literal("circular_hole_with_rect_pad"),
2301
+ pcb_group_id: z102.string().optional(),
2302
+ subcircuit_id: z102.string().optional(),
2303
+ hole_shape: z102.literal("circle"),
2304
+ pad_shape: z102.literal("rect"),
2305
+ hole_diameter: z102.number(),
2306
+ rect_pad_width: z102.number(),
2307
+ rect_pad_height: z102.number(),
2308
+ rect_border_radius: z102.number().optional(),
2241
2309
  hole_offset_x: distance.default(0),
2242
2310
  hole_offset_y: distance.default(0),
2243
- is_covered_with_solder_mask: z100.boolean().optional(),
2311
+ is_covered_with_solder_mask: z102.boolean().optional(),
2244
2312
  x: distance,
2245
2313
  y: distance,
2246
- layers: z100.array(layer_ref),
2247
- port_hints: z100.array(z100.string()).optional(),
2248
- pcb_component_id: z100.string().optional(),
2249
- pcb_port_id: z100.string().optional(),
2314
+ layers: z102.array(layer_ref),
2315
+ port_hints: z102.array(z102.string()).optional(),
2316
+ pcb_component_id: z102.string().optional(),
2317
+ pcb_port_id: z102.string().optional(),
2250
2318
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2251
- soldermask_margin: z100.number().optional(),
2319
+ soldermask_margin: z102.number().optional(),
2252
2320
  rect_ccw_rotation: rotation.optional()
2253
2321
  });
2254
- var pcb_pill_hole_with_rect_pad = z100.object({
2255
- type: z100.literal("pcb_plated_hole"),
2256
- shape: z100.literal("pill_hole_with_rect_pad"),
2257
- pcb_group_id: z100.string().optional(),
2258
- subcircuit_id: z100.string().optional(),
2259
- hole_shape: z100.literal("pill"),
2260
- pad_shape: z100.literal("rect"),
2261
- hole_width: z100.number(),
2262
- hole_height: z100.number(),
2263
- rect_pad_width: z100.number(),
2264
- rect_pad_height: z100.number(),
2265
- rect_border_radius: z100.number().optional(),
2322
+ var pcb_pill_hole_with_rect_pad = z102.object({
2323
+ type: z102.literal("pcb_plated_hole"),
2324
+ shape: z102.literal("pill_hole_with_rect_pad"),
2325
+ pcb_group_id: z102.string().optional(),
2326
+ subcircuit_id: z102.string().optional(),
2327
+ hole_shape: z102.literal("pill"),
2328
+ pad_shape: z102.literal("rect"),
2329
+ hole_width: z102.number(),
2330
+ hole_height: z102.number(),
2331
+ rect_pad_width: z102.number(),
2332
+ rect_pad_height: z102.number(),
2333
+ rect_border_radius: z102.number().optional(),
2266
2334
  hole_offset_x: distance.default(0),
2267
2335
  hole_offset_y: distance.default(0),
2268
- is_covered_with_solder_mask: z100.boolean().optional(),
2336
+ is_covered_with_solder_mask: z102.boolean().optional(),
2269
2337
  x: distance,
2270
2338
  y: distance,
2271
- layers: z100.array(layer_ref),
2272
- port_hints: z100.array(z100.string()).optional(),
2273
- pcb_component_id: z100.string().optional(),
2274
- pcb_port_id: z100.string().optional(),
2339
+ layers: z102.array(layer_ref),
2340
+ port_hints: z102.array(z102.string()).optional(),
2341
+ pcb_component_id: z102.string().optional(),
2342
+ pcb_port_id: z102.string().optional(),
2275
2343
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2276
- soldermask_margin: z100.number().optional()
2344
+ soldermask_margin: z102.number().optional()
2277
2345
  });
2278
- var pcb_rotated_pill_hole_with_rect_pad = z100.object({
2279
- type: z100.literal("pcb_plated_hole"),
2280
- shape: z100.literal("rotated_pill_hole_with_rect_pad"),
2281
- pcb_group_id: z100.string().optional(),
2282
- subcircuit_id: z100.string().optional(),
2283
- hole_shape: z100.literal("rotated_pill"),
2284
- pad_shape: z100.literal("rect"),
2285
- hole_width: z100.number(),
2286
- hole_height: z100.number(),
2346
+ var pcb_rotated_pill_hole_with_rect_pad = z102.object({
2347
+ type: z102.literal("pcb_plated_hole"),
2348
+ shape: z102.literal("rotated_pill_hole_with_rect_pad"),
2349
+ pcb_group_id: z102.string().optional(),
2350
+ subcircuit_id: z102.string().optional(),
2351
+ hole_shape: z102.literal("rotated_pill"),
2352
+ pad_shape: z102.literal("rect"),
2353
+ hole_width: z102.number(),
2354
+ hole_height: z102.number(),
2287
2355
  hole_ccw_rotation: rotation,
2288
- rect_pad_width: z100.number(),
2289
- rect_pad_height: z100.number(),
2290
- rect_border_radius: z100.number().optional(),
2356
+ rect_pad_width: z102.number(),
2357
+ rect_pad_height: z102.number(),
2358
+ rect_border_radius: z102.number().optional(),
2291
2359
  rect_ccw_rotation: rotation,
2292
2360
  hole_offset_x: distance.default(0),
2293
2361
  hole_offset_y: distance.default(0),
2294
- is_covered_with_solder_mask: z100.boolean().optional(),
2362
+ is_covered_with_solder_mask: z102.boolean().optional(),
2295
2363
  x: distance,
2296
2364
  y: distance,
2297
- layers: z100.array(layer_ref),
2298
- port_hints: z100.array(z100.string()).optional(),
2299
- pcb_component_id: z100.string().optional(),
2300
- pcb_port_id: z100.string().optional(),
2365
+ layers: z102.array(layer_ref),
2366
+ port_hints: z102.array(z102.string()).optional(),
2367
+ pcb_component_id: z102.string().optional(),
2368
+ pcb_port_id: z102.string().optional(),
2301
2369
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2302
- soldermask_margin: z100.number().optional()
2370
+ soldermask_margin: z102.number().optional()
2303
2371
  });
2304
- var pcb_hole_with_polygon_pad = z100.object({
2305
- type: z100.literal("pcb_plated_hole"),
2306
- shape: z100.literal("hole_with_polygon_pad"),
2307
- pcb_group_id: z100.string().optional(),
2308
- subcircuit_id: z100.string().optional(),
2309
- hole_shape: z100.enum(["circle", "oval", "pill", "rotated_pill"]),
2310
- hole_diameter: z100.number().optional(),
2311
- hole_width: z100.number().optional(),
2312
- hole_height: z100.number().optional(),
2313
- pad_outline: z100.array(
2314
- z100.object({
2372
+ var pcb_hole_with_polygon_pad = z102.object({
2373
+ type: z102.literal("pcb_plated_hole"),
2374
+ shape: z102.literal("hole_with_polygon_pad"),
2375
+ pcb_group_id: z102.string().optional(),
2376
+ subcircuit_id: z102.string().optional(),
2377
+ hole_shape: z102.enum(["circle", "oval", "pill", "rotated_pill"]),
2378
+ hole_diameter: z102.number().optional(),
2379
+ hole_width: z102.number().optional(),
2380
+ hole_height: z102.number().optional(),
2381
+ pad_outline: z102.array(
2382
+ z102.object({
2315
2383
  x: distance,
2316
2384
  y: distance
2317
2385
  })
2318
2386
  ).min(3),
2319
2387
  hole_offset_x: distance.default(0),
2320
2388
  hole_offset_y: distance.default(0),
2321
- is_covered_with_solder_mask: z100.boolean().optional(),
2389
+ is_covered_with_solder_mask: z102.boolean().optional(),
2322
2390
  x: distance,
2323
2391
  y: distance,
2324
- layers: z100.array(layer_ref),
2325
- port_hints: z100.array(z100.string()).optional(),
2326
- pcb_component_id: z100.string().optional(),
2327
- pcb_port_id: z100.string().optional(),
2392
+ layers: z102.array(layer_ref),
2393
+ port_hints: z102.array(z102.string()).optional(),
2394
+ pcb_component_id: z102.string().optional(),
2395
+ pcb_port_id: z102.string().optional(),
2328
2396
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
2329
- soldermask_margin: z100.number().optional(),
2397
+ soldermask_margin: z102.number().optional(),
2330
2398
  ccw_rotation: rotation.optional()
2331
2399
  });
2332
- var pcb_plated_hole = z100.union([
2400
+ var pcb_plated_hole = z102.union([
2333
2401
  pcb_plated_hole_circle,
2334
2402
  pcb_plated_hole_oval,
2335
2403
  pcb_circular_hole_with_rect_pad,
@@ -2345,134 +2413,134 @@ expectTypesMatch(true);
2345
2413
  expectTypesMatch(true);
2346
2414
  expectTypesMatch(true);
2347
2415
  expectTypesMatch(true);
2348
- var pcb_port = z101.object({
2349
- type: z101.literal("pcb_port"),
2416
+ var pcb_port = z103.object({
2417
+ type: z103.literal("pcb_port"),
2350
2418
  pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
2351
- pcb_group_id: z101.string().optional(),
2352
- subcircuit_id: z101.string().optional(),
2353
- source_port_id: z101.string(),
2354
- pcb_component_id: z101.string().optional(),
2419
+ pcb_group_id: z103.string().optional(),
2420
+ subcircuit_id: z103.string().optional(),
2421
+ source_port_id: z103.string(),
2422
+ pcb_component_id: z103.string().optional(),
2355
2423
  x: distance,
2356
2424
  y: distance,
2357
- layers: z101.array(layer_ref),
2358
- is_board_pinout: z101.boolean().optional()
2425
+ layers: z103.array(layer_ref),
2426
+ is_board_pinout: z103.boolean().optional()
2359
2427
  }).describe("Defines a port on the PCB");
2360
2428
  expectTypesMatch(true);
2361
- var pcb_smtpad_circle = z102.object({
2362
- type: z102.literal("pcb_smtpad"),
2363
- shape: z102.literal("circle"),
2429
+ var pcb_smtpad_circle = z104.object({
2430
+ type: z104.literal("pcb_smtpad"),
2431
+ shape: z104.literal("circle"),
2364
2432
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2365
- pcb_group_id: z102.string().optional(),
2366
- subcircuit_id: z102.string().optional(),
2433
+ pcb_group_id: z104.string().optional(),
2434
+ subcircuit_id: z104.string().optional(),
2367
2435
  x: distance,
2368
2436
  y: distance,
2369
- radius: z102.number(),
2437
+ radius: z104.number(),
2370
2438
  layer: layer_ref,
2371
- port_hints: z102.array(z102.string()).optional(),
2372
- pcb_component_id: z102.string().optional(),
2373
- pcb_port_id: z102.string().optional(),
2374
- is_covered_with_solder_mask: z102.boolean().optional(),
2375
- soldermask_margin: z102.number().optional()
2376
- });
2377
- var pcb_smtpad_rect = z102.object({
2378
- type: z102.literal("pcb_smtpad"),
2379
- shape: z102.literal("rect"),
2439
+ port_hints: z104.array(z104.string()).optional(),
2440
+ pcb_component_id: z104.string().optional(),
2441
+ pcb_port_id: z104.string().optional(),
2442
+ is_covered_with_solder_mask: z104.boolean().optional(),
2443
+ soldermask_margin: z104.number().optional()
2444
+ });
2445
+ var pcb_smtpad_rect = z104.object({
2446
+ type: z104.literal("pcb_smtpad"),
2447
+ shape: z104.literal("rect"),
2380
2448
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2381
- pcb_group_id: z102.string().optional(),
2382
- subcircuit_id: z102.string().optional(),
2449
+ pcb_group_id: z104.string().optional(),
2450
+ subcircuit_id: z104.string().optional(),
2383
2451
  x: distance,
2384
2452
  y: distance,
2385
- width: z102.number(),
2386
- height: z102.number(),
2387
- rect_border_radius: z102.number().optional(),
2388
- corner_radius: z102.number().optional(),
2453
+ width: z104.number(),
2454
+ height: z104.number(),
2455
+ rect_border_radius: z104.number().optional(),
2456
+ corner_radius: z104.number().optional(),
2389
2457
  layer: layer_ref,
2390
- port_hints: z102.array(z102.string()).optional(),
2391
- pcb_component_id: z102.string().optional(),
2392
- pcb_port_id: z102.string().optional(),
2393
- is_covered_with_solder_mask: z102.boolean().optional(),
2394
- soldermask_margin: z102.number().optional(),
2395
- soldermask_margin_left: z102.number().optional(),
2396
- soldermask_margin_top: z102.number().optional(),
2397
- soldermask_margin_right: z102.number().optional(),
2398
- soldermask_margin_bottom: z102.number().optional()
2399
- });
2400
- var pcb_smtpad_rotated_rect = z102.object({
2401
- type: z102.literal("pcb_smtpad"),
2402
- shape: z102.literal("rotated_rect"),
2458
+ port_hints: z104.array(z104.string()).optional(),
2459
+ pcb_component_id: z104.string().optional(),
2460
+ pcb_port_id: z104.string().optional(),
2461
+ is_covered_with_solder_mask: z104.boolean().optional(),
2462
+ soldermask_margin: z104.number().optional(),
2463
+ soldermask_margin_left: z104.number().optional(),
2464
+ soldermask_margin_top: z104.number().optional(),
2465
+ soldermask_margin_right: z104.number().optional(),
2466
+ soldermask_margin_bottom: z104.number().optional()
2467
+ });
2468
+ var pcb_smtpad_rotated_rect = z104.object({
2469
+ type: z104.literal("pcb_smtpad"),
2470
+ shape: z104.literal("rotated_rect"),
2403
2471
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2404
- pcb_group_id: z102.string().optional(),
2405
- subcircuit_id: z102.string().optional(),
2472
+ pcb_group_id: z104.string().optional(),
2473
+ subcircuit_id: z104.string().optional(),
2406
2474
  x: distance,
2407
2475
  y: distance,
2408
- width: z102.number(),
2409
- height: z102.number(),
2410
- rect_border_radius: z102.number().optional(),
2411
- corner_radius: z102.number().optional(),
2476
+ width: z104.number(),
2477
+ height: z104.number(),
2478
+ rect_border_radius: z104.number().optional(),
2479
+ corner_radius: z104.number().optional(),
2412
2480
  ccw_rotation: rotation,
2413
2481
  layer: layer_ref,
2414
- port_hints: z102.array(z102.string()).optional(),
2415
- pcb_component_id: z102.string().optional(),
2416
- pcb_port_id: z102.string().optional(),
2417
- is_covered_with_solder_mask: z102.boolean().optional(),
2418
- soldermask_margin: z102.number().optional(),
2419
- soldermask_margin_left: z102.number().optional(),
2420
- soldermask_margin_top: z102.number().optional(),
2421
- soldermask_margin_right: z102.number().optional(),
2422
- soldermask_margin_bottom: z102.number().optional()
2423
- });
2424
- var pcb_smtpad_pill = z102.object({
2425
- type: z102.literal("pcb_smtpad"),
2426
- shape: z102.literal("pill"),
2482
+ port_hints: z104.array(z104.string()).optional(),
2483
+ pcb_component_id: z104.string().optional(),
2484
+ pcb_port_id: z104.string().optional(),
2485
+ is_covered_with_solder_mask: z104.boolean().optional(),
2486
+ soldermask_margin: z104.number().optional(),
2487
+ soldermask_margin_left: z104.number().optional(),
2488
+ soldermask_margin_top: z104.number().optional(),
2489
+ soldermask_margin_right: z104.number().optional(),
2490
+ soldermask_margin_bottom: z104.number().optional()
2491
+ });
2492
+ var pcb_smtpad_pill = z104.object({
2493
+ type: z104.literal("pcb_smtpad"),
2494
+ shape: z104.literal("pill"),
2427
2495
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2428
- pcb_group_id: z102.string().optional(),
2429
- subcircuit_id: z102.string().optional(),
2496
+ pcb_group_id: z104.string().optional(),
2497
+ subcircuit_id: z104.string().optional(),
2430
2498
  x: distance,
2431
2499
  y: distance,
2432
- width: z102.number(),
2433
- height: z102.number(),
2434
- radius: z102.number(),
2500
+ width: z104.number(),
2501
+ height: z104.number(),
2502
+ radius: z104.number(),
2435
2503
  layer: layer_ref,
2436
- port_hints: z102.array(z102.string()).optional(),
2437
- pcb_component_id: z102.string().optional(),
2438
- pcb_port_id: z102.string().optional(),
2439
- is_covered_with_solder_mask: z102.boolean().optional(),
2440
- soldermask_margin: z102.number().optional()
2441
- });
2442
- var pcb_smtpad_rotated_pill = z102.object({
2443
- type: z102.literal("pcb_smtpad"),
2444
- shape: z102.literal("rotated_pill"),
2504
+ port_hints: z104.array(z104.string()).optional(),
2505
+ pcb_component_id: z104.string().optional(),
2506
+ pcb_port_id: z104.string().optional(),
2507
+ is_covered_with_solder_mask: z104.boolean().optional(),
2508
+ soldermask_margin: z104.number().optional()
2509
+ });
2510
+ var pcb_smtpad_rotated_pill = z104.object({
2511
+ type: z104.literal("pcb_smtpad"),
2512
+ shape: z104.literal("rotated_pill"),
2445
2513
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2446
- pcb_group_id: z102.string().optional(),
2447
- subcircuit_id: z102.string().optional(),
2514
+ pcb_group_id: z104.string().optional(),
2515
+ subcircuit_id: z104.string().optional(),
2448
2516
  x: distance,
2449
2517
  y: distance,
2450
- width: z102.number(),
2451
- height: z102.number(),
2452
- radius: z102.number(),
2518
+ width: z104.number(),
2519
+ height: z104.number(),
2520
+ radius: z104.number(),
2453
2521
  ccw_rotation: rotation,
2454
2522
  layer: layer_ref,
2455
- port_hints: z102.array(z102.string()).optional(),
2456
- pcb_component_id: z102.string().optional(),
2457
- pcb_port_id: z102.string().optional(),
2458
- is_covered_with_solder_mask: z102.boolean().optional(),
2459
- soldermask_margin: z102.number().optional()
2460
- });
2461
- var pcb_smtpad_polygon = z102.object({
2462
- type: z102.literal("pcb_smtpad"),
2463
- shape: z102.literal("polygon"),
2523
+ port_hints: z104.array(z104.string()).optional(),
2524
+ pcb_component_id: z104.string().optional(),
2525
+ pcb_port_id: z104.string().optional(),
2526
+ is_covered_with_solder_mask: z104.boolean().optional(),
2527
+ soldermask_margin: z104.number().optional()
2528
+ });
2529
+ var pcb_smtpad_polygon = z104.object({
2530
+ type: z104.literal("pcb_smtpad"),
2531
+ shape: z104.literal("polygon"),
2464
2532
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
2465
- pcb_group_id: z102.string().optional(),
2466
- subcircuit_id: z102.string().optional(),
2467
- points: z102.array(point),
2533
+ pcb_group_id: z104.string().optional(),
2534
+ subcircuit_id: z104.string().optional(),
2535
+ points: z104.array(point),
2468
2536
  layer: layer_ref,
2469
- port_hints: z102.array(z102.string()).optional(),
2470
- pcb_component_id: z102.string().optional(),
2471
- pcb_port_id: z102.string().optional(),
2472
- is_covered_with_solder_mask: z102.boolean().optional(),
2473
- soldermask_margin: z102.number().optional()
2537
+ port_hints: z104.array(z104.string()).optional(),
2538
+ pcb_component_id: z104.string().optional(),
2539
+ pcb_port_id: z104.string().optional(),
2540
+ is_covered_with_solder_mask: z104.boolean().optional(),
2541
+ soldermask_margin: z104.number().optional()
2474
2542
  });
2475
- var pcb_smtpad = z102.discriminatedUnion("shape", [
2543
+ var pcb_smtpad = z104.discriminatedUnion("shape", [
2476
2544
  pcb_smtpad_circle,
2477
2545
  pcb_smtpad_rect,
2478
2546
  pcb_smtpad_rotated_rect,
@@ -2486,78 +2554,78 @@ expectTypesMatch(true);
2486
2554
  expectTypesMatch(true);
2487
2555
  expectTypesMatch(true);
2488
2556
  expectTypesMatch(true);
2489
- var pcb_solder_paste_circle = z103.object({
2490
- type: z103.literal("pcb_solder_paste"),
2491
- shape: z103.literal("circle"),
2557
+ var pcb_solder_paste_circle = z105.object({
2558
+ type: z105.literal("pcb_solder_paste"),
2559
+ shape: z105.literal("circle"),
2492
2560
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
2493
- pcb_group_id: z103.string().optional(),
2494
- subcircuit_id: z103.string().optional(),
2561
+ pcb_group_id: z105.string().optional(),
2562
+ subcircuit_id: z105.string().optional(),
2495
2563
  x: distance,
2496
2564
  y: distance,
2497
- radius: z103.number(),
2565
+ radius: z105.number(),
2498
2566
  layer: layer_ref,
2499
- pcb_component_id: z103.string().optional(),
2500
- pcb_smtpad_id: z103.string().optional()
2567
+ pcb_component_id: z105.string().optional(),
2568
+ pcb_smtpad_id: z105.string().optional()
2501
2569
  });
2502
- var pcb_solder_paste_rect = z103.object({
2503
- type: z103.literal("pcb_solder_paste"),
2504
- shape: z103.literal("rect"),
2570
+ var pcb_solder_paste_rect = z105.object({
2571
+ type: z105.literal("pcb_solder_paste"),
2572
+ shape: z105.literal("rect"),
2505
2573
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
2506
- pcb_group_id: z103.string().optional(),
2507
- subcircuit_id: z103.string().optional(),
2574
+ pcb_group_id: z105.string().optional(),
2575
+ subcircuit_id: z105.string().optional(),
2508
2576
  x: distance,
2509
2577
  y: distance,
2510
- width: z103.number(),
2511
- height: z103.number(),
2578
+ width: z105.number(),
2579
+ height: z105.number(),
2512
2580
  layer: layer_ref,
2513
- pcb_component_id: z103.string().optional(),
2514
- pcb_smtpad_id: z103.string().optional()
2581
+ pcb_component_id: z105.string().optional(),
2582
+ pcb_smtpad_id: z105.string().optional()
2515
2583
  });
2516
- var pcb_solder_paste_pill = z103.object({
2517
- type: z103.literal("pcb_solder_paste"),
2518
- shape: z103.literal("pill"),
2584
+ var pcb_solder_paste_pill = z105.object({
2585
+ type: z105.literal("pcb_solder_paste"),
2586
+ shape: z105.literal("pill"),
2519
2587
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
2520
- pcb_group_id: z103.string().optional(),
2521
- subcircuit_id: z103.string().optional(),
2588
+ pcb_group_id: z105.string().optional(),
2589
+ subcircuit_id: z105.string().optional(),
2522
2590
  x: distance,
2523
2591
  y: distance,
2524
- width: z103.number(),
2525
- height: z103.number(),
2526
- radius: z103.number(),
2592
+ width: z105.number(),
2593
+ height: z105.number(),
2594
+ radius: z105.number(),
2527
2595
  layer: layer_ref,
2528
- pcb_component_id: z103.string().optional(),
2529
- pcb_smtpad_id: z103.string().optional()
2596
+ pcb_component_id: z105.string().optional(),
2597
+ pcb_smtpad_id: z105.string().optional()
2530
2598
  });
2531
- var pcb_solder_paste_rotated_rect = z103.object({
2532
- type: z103.literal("pcb_solder_paste"),
2533
- shape: z103.literal("rotated_rect"),
2599
+ var pcb_solder_paste_rotated_rect = z105.object({
2600
+ type: z105.literal("pcb_solder_paste"),
2601
+ shape: z105.literal("rotated_rect"),
2534
2602
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
2535
- pcb_group_id: z103.string().optional(),
2536
- subcircuit_id: z103.string().optional(),
2603
+ pcb_group_id: z105.string().optional(),
2604
+ subcircuit_id: z105.string().optional(),
2537
2605
  x: distance,
2538
2606
  y: distance,
2539
- width: z103.number(),
2540
- height: z103.number(),
2607
+ width: z105.number(),
2608
+ height: z105.number(),
2541
2609
  ccw_rotation: distance,
2542
2610
  layer: layer_ref,
2543
- pcb_component_id: z103.string().optional(),
2544
- pcb_smtpad_id: z103.string().optional()
2611
+ pcb_component_id: z105.string().optional(),
2612
+ pcb_smtpad_id: z105.string().optional()
2545
2613
  });
2546
- var pcb_solder_paste_oval = z103.object({
2547
- type: z103.literal("pcb_solder_paste"),
2548
- shape: z103.literal("oval"),
2614
+ var pcb_solder_paste_oval = z105.object({
2615
+ type: z105.literal("pcb_solder_paste"),
2616
+ shape: z105.literal("oval"),
2549
2617
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
2550
- pcb_group_id: z103.string().optional(),
2551
- subcircuit_id: z103.string().optional(),
2618
+ pcb_group_id: z105.string().optional(),
2619
+ subcircuit_id: z105.string().optional(),
2552
2620
  x: distance,
2553
2621
  y: distance,
2554
- width: z103.number(),
2555
- height: z103.number(),
2622
+ width: z105.number(),
2623
+ height: z105.number(),
2556
2624
  layer: layer_ref,
2557
- pcb_component_id: z103.string().optional(),
2558
- pcb_smtpad_id: z103.string().optional()
2625
+ pcb_component_id: z105.string().optional(),
2626
+ pcb_smtpad_id: z105.string().optional()
2559
2627
  });
2560
- var pcb_solder_paste = z103.union([
2628
+ var pcb_solder_paste = z105.union([
2561
2629
  pcb_solder_paste_circle,
2562
2630
  pcb_solder_paste_rect,
2563
2631
  pcb_solder_paste_pill,
@@ -2571,148 +2639,165 @@ expectTypesMatch(
2571
2639
  true
2572
2640
  );
2573
2641
  expectTypesMatch(true);
2574
- var pcb_text = z104.object({
2575
- type: z104.literal("pcb_text"),
2642
+ var pcb_text = z106.object({
2643
+ type: z106.literal("pcb_text"),
2576
2644
  pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
2577
- pcb_group_id: z104.string().optional(),
2578
- subcircuit_id: z104.string().optional(),
2579
- text: z104.string(),
2645
+ pcb_group_id: z106.string().optional(),
2646
+ subcircuit_id: z106.string().optional(),
2647
+ text: z106.string(),
2580
2648
  center: point,
2581
2649
  layer: layer_ref,
2582
2650
  width: length,
2583
2651
  height: length,
2584
- lines: z104.number(),
2652
+ lines: z106.number(),
2585
2653
  // @ts-ignore
2586
- align: z104.enum(["bottom-left"])
2654
+ align: z106.enum(["bottom-left"])
2587
2655
  }).describe("Defines text on the PCB");
2588
2656
  expectTypesMatch(true);
2589
- var pcb_trace_route_point_wire = z105.object({
2590
- route_type: z105.literal("wire"),
2657
+ var pcb_trace_route_point_wire = z107.object({
2658
+ route_type: z107.literal("wire"),
2591
2659
  x: distance,
2592
2660
  y: distance,
2593
2661
  width: distance,
2594
- copper_pour_id: z105.string().optional(),
2595
- is_inside_copper_pour: z105.boolean().optional(),
2596
- start_pcb_port_id: z105.string().optional(),
2597
- end_pcb_port_id: z105.string().optional(),
2662
+ copper_pour_id: z107.string().optional(),
2663
+ is_inside_copper_pour: z107.boolean().optional(),
2664
+ start_pcb_port_id: z107.string().optional(),
2665
+ end_pcb_port_id: z107.string().optional(),
2598
2666
  layer: layer_ref
2599
2667
  });
2600
- var pcb_trace_route_point_via = z105.object({
2601
- route_type: z105.literal("via"),
2668
+ var pcb_trace_route_point_via = z107.object({
2669
+ route_type: z107.literal("via"),
2602
2670
  x: distance,
2603
2671
  y: distance,
2604
- copper_pour_id: z105.string().optional(),
2605
- is_inside_copper_pour: z105.boolean().optional(),
2672
+ copper_pour_id: z107.string().optional(),
2673
+ is_inside_copper_pour: z107.boolean().optional(),
2606
2674
  hole_diameter: distance.optional(),
2607
2675
  outer_diameter: distance.optional(),
2608
2676
  from_layer: layer_ref,
2609
2677
  to_layer: layer_ref
2610
2678
  });
2611
- var pcb_trace_route_point_through_pad = z105.object({
2612
- route_type: z105.literal("through_pad"),
2679
+ var pcb_trace_route_point_through_pad = z107.object({
2680
+ route_type: z107.literal("through_pad"),
2613
2681
  start: point,
2614
2682
  end: point,
2615
2683
  width: distance,
2616
2684
  start_layer: layer_ref,
2617
2685
  end_layer: layer_ref,
2618
- pcb_smtpad_id: z105.string().optional(),
2619
- pcb_plated_hole_id: z105.string().optional()
2686
+ pcb_smtpad_id: z107.string().optional(),
2687
+ pcb_plated_hole_id: z107.string().optional()
2620
2688
  });
2621
- var pcb_trace_route_point = z105.union([
2689
+ var pcb_trace_route_point = z107.union([
2622
2690
  pcb_trace_route_point_wire,
2623
2691
  pcb_trace_route_point_via,
2624
2692
  pcb_trace_route_point_through_pad
2625
2693
  ]);
2626
- var pcb_trace = z105.object({
2627
- type: z105.literal("pcb_trace"),
2628
- source_trace_id: z105.string().optional(),
2629
- pcb_component_id: z105.string().optional(),
2694
+ var pcb_trace = z107.object({
2695
+ type: z107.literal("pcb_trace"),
2696
+ source_trace_id: z107.string().optional(),
2697
+ pcb_component_id: z107.string().optional(),
2630
2698
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
2631
- pcb_group_id: z105.string().optional(),
2632
- subcircuit_id: z105.string().optional(),
2633
- route_thickness_mode: z105.enum(["constant", "interpolated"]).default("constant").optional(),
2634
- route_order_index: z105.number().optional(),
2635
- should_round_corners: z105.boolean().optional(),
2636
- trace_length: z105.number().optional(),
2637
- highlight_color: z105.string().optional(),
2638
- route: z105.array(pcb_trace_route_point)
2699
+ pcb_group_id: z107.string().optional(),
2700
+ subcircuit_id: z107.string().optional(),
2701
+ route_thickness_mode: z107.enum(["constant", "interpolated"]).default("constant").optional(),
2702
+ route_order_index: z107.number().optional(),
2703
+ should_round_corners: z107.boolean().optional(),
2704
+ trace_length: z107.number().optional(),
2705
+ highlight_color: z107.string().optional(),
2706
+ route: z107.array(pcb_trace_route_point)
2639
2707
  }).describe("Defines a trace on the PCB");
2640
2708
  expectTypesMatch(true);
2641
2709
  expectTypesMatch(true);
2642
- var pcb_trace_warning = z106.object({
2643
- type: z106.literal("pcb_trace_warning"),
2710
+ var pcb_trace_warning = z108.object({
2711
+ type: z108.literal("pcb_trace_warning"),
2644
2712
  pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
2645
- warning_type: z106.literal("pcb_trace_warning").default("pcb_trace_warning"),
2646
- message: z106.string(),
2713
+ warning_type: z108.literal("pcb_trace_warning").default("pcb_trace_warning"),
2714
+ message: z108.string(),
2647
2715
  center: point.optional(),
2648
- pcb_trace_id: z106.string(),
2649
- source_trace_id: z106.string(),
2650
- pcb_component_ids: z106.array(z106.string()),
2651
- pcb_port_ids: z106.array(z106.string()),
2652
- subcircuit_id: z106.string().optional()
2716
+ pcb_trace_id: z108.string(),
2717
+ source_trace_id: z108.string(),
2718
+ pcb_component_ids: z108.array(z108.string()),
2719
+ pcb_port_ids: z108.array(z108.string()),
2720
+ subcircuit_id: z108.string().optional()
2653
2721
  }).describe("Defines a trace warning on the PCB");
2654
2722
  expectTypesMatch(true);
2723
+ var pcb_trace_too_long_warning = z109.object({
2724
+ type: z109.literal("pcb_trace_too_long_warning"),
2725
+ pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
2726
+ "pcb_trace_too_long_warning"
2727
+ ),
2728
+ warning_type: z109.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
2729
+ message: z109.string(),
2730
+ pcb_trace_id: z109.string(),
2731
+ source_net_id: z109.string().optional(),
2732
+ source_trace_id: z109.string().optional(),
2733
+ actual_trace_length: distance,
2734
+ maximum_trace_length: distance,
2735
+ subcircuit_id: z109.string().optional()
2736
+ }).describe(
2737
+ "Warning emitted when a PCB trace is longer than its maximum allowed length"
2738
+ );
2739
+ expectTypesMatch(true);
2655
2740
  var pcb_trace_error = base_circuit_json_error.extend({
2656
- type: z107.literal("pcb_trace_error"),
2741
+ type: z110.literal("pcb_trace_error"),
2657
2742
  pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
2658
- error_type: z107.literal("pcb_trace_error").default("pcb_trace_error"),
2743
+ error_type: z110.literal("pcb_trace_error").default("pcb_trace_error"),
2659
2744
  center: point.optional(),
2660
- pcb_trace_id: z107.string(),
2661
- source_trace_id: z107.string(),
2662
- pcb_component_ids: z107.array(z107.string()),
2663
- pcb_port_ids: z107.array(z107.string()),
2664
- subcircuit_id: z107.string().optional()
2745
+ pcb_trace_id: z110.string(),
2746
+ source_trace_id: z110.string(),
2747
+ pcb_component_ids: z110.array(z110.string()),
2748
+ pcb_port_ids: z110.array(z110.string()),
2749
+ subcircuit_id: z110.string().optional()
2665
2750
  }).describe("Defines a trace error on the PCB");
2666
2751
  expectTypesMatch(true);
2667
2752
  var pcb_trace_missing_error = base_circuit_json_error.extend({
2668
- type: z108.literal("pcb_trace_missing_error"),
2753
+ type: z111.literal("pcb_trace_missing_error"),
2669
2754
  pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
2670
2755
  "pcb_trace_missing_error"
2671
2756
  ),
2672
- error_type: z108.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
2757
+ error_type: z111.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
2673
2758
  center: point.optional(),
2674
- source_trace_id: z108.string(),
2675
- pcb_component_ids: z108.array(z108.string()),
2676
- pcb_port_ids: z108.array(z108.string()),
2677
- subcircuit_id: z108.string().optional()
2759
+ source_trace_id: z111.string(),
2760
+ pcb_component_ids: z111.array(z111.string()),
2761
+ pcb_port_ids: z111.array(z111.string()),
2762
+ subcircuit_id: z111.string().optional()
2678
2763
  }).describe(
2679
2764
  "Defines an error when a source trace has no corresponding PCB trace"
2680
2765
  );
2681
2766
  expectTypesMatch(true);
2682
2767
  var pcb_port_not_matched_error = base_circuit_json_error.extend({
2683
- type: z109.literal("pcb_port_not_matched_error"),
2768
+ type: z112.literal("pcb_port_not_matched_error"),
2684
2769
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
2685
- error_type: z109.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
2686
- pcb_component_ids: z109.array(z109.string()),
2687
- subcircuit_id: z109.string().optional()
2770
+ error_type: z112.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
2771
+ pcb_component_ids: z112.array(z112.string()),
2772
+ subcircuit_id: z112.string().optional()
2688
2773
  }).describe("Defines a trace error on the PCB where a port is not matched");
2689
2774
  expectTypesMatch(true);
2690
2775
  var pcb_port_not_connected_error = base_circuit_json_error.extend({
2691
- type: z110.literal("pcb_port_not_connected_error"),
2776
+ type: z113.literal("pcb_port_not_connected_error"),
2692
2777
  pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
2693
2778
  "pcb_port_not_connected_error"
2694
2779
  ),
2695
- error_type: z110.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
2696
- pcb_port_ids: z110.array(z110.string()),
2697
- pcb_component_ids: z110.array(z110.string()),
2698
- subcircuit_id: z110.string().optional()
2780
+ error_type: z113.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
2781
+ pcb_port_ids: z113.array(z113.string()),
2782
+ pcb_component_ids: z113.array(z113.string()),
2783
+ subcircuit_id: z113.string().optional()
2699
2784
  }).describe("Defines an error when a pcb port is not connected to any trace");
2700
2785
  expectTypesMatch(
2701
2786
  true
2702
2787
  );
2703
- var pcb_net = z111.object({
2704
- type: z111.literal("pcb_net"),
2788
+ var pcb_net = z114.object({
2789
+ type: z114.literal("pcb_net"),
2705
2790
  pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
2706
- source_net_id: z111.string().optional(),
2707
- highlight_color: z111.string().optional()
2791
+ source_net_id: z114.string().optional(),
2792
+ highlight_color: z114.string().optional()
2708
2793
  }).describe("Defines a net on the PCB");
2709
2794
  expectTypesMatch(true);
2710
- var pcb_via = z112.object({
2711
- type: z112.literal("pcb_via"),
2795
+ var pcb_via = z115.object({
2796
+ type: z115.literal("pcb_via"),
2712
2797
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
2713
- pcb_group_id: z112.string().optional(),
2714
- subcircuit_id: z112.string().optional(),
2715
- subcircuit_connectivity_map_key: z112.string().optional(),
2798
+ pcb_group_id: z115.string().optional(),
2799
+ subcircuit_id: z115.string().optional(),
2800
+ subcircuit_connectivity_map_key: z115.string().optional(),
2716
2801
  x: distance,
2717
2802
  y: distance,
2718
2803
  outer_diameter: distance.default("0.6mm"),
@@ -2721,85 +2806,93 @@ var pcb_via = z112.object({
2721
2806
  from_layer: layer_ref.optional(),
2722
2807
  /** @deprecated */
2723
2808
  to_layer: layer_ref.optional(),
2724
- layers: z112.array(layer_ref),
2725
- pcb_trace_id: z112.string().optional(),
2726
- net_is_assignable: z112.boolean().optional(),
2727
- net_assigned: z112.boolean().optional(),
2728
- is_tented: z112.boolean().optional()
2809
+ layers: z115.array(layer_ref),
2810
+ pcb_trace_id: z115.string().optional(),
2811
+ net_is_assignable: z115.boolean().optional(),
2812
+ net_assigned: z115.boolean().optional(),
2813
+ is_tented: z115.boolean().optional()
2729
2814
  }).describe("Defines a via on the PCB");
2730
2815
  expectTypesMatch(true);
2731
- var pcb_board = z113.object({
2732
- type: z113.literal("pcb_board"),
2816
+ var pcb_board = z116.object({
2817
+ type: z116.literal("pcb_board"),
2733
2818
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
2734
- pcb_panel_id: z113.string().optional(),
2735
- carrier_pcb_board_id: z113.string().optional(),
2736
- is_subcircuit: z113.boolean().optional(),
2737
- subcircuit_id: z113.string().optional(),
2738
- is_mounted_to_carrier_board: z113.boolean().optional(),
2819
+ pcb_panel_id: z116.string().optional(),
2820
+ carrier_pcb_board_id: z116.string().optional(),
2821
+ is_subcircuit: z116.boolean().optional(),
2822
+ subcircuit_id: z116.string().optional(),
2823
+ is_mounted_to_carrier_board: z116.boolean().optional(),
2739
2824
  width: length.optional(),
2740
2825
  height: length.optional(),
2741
2826
  center: point,
2742
- display_offset_x: z113.string().optional().describe(
2827
+ display_offset_x: z116.string().optional().describe(
2743
2828
  "How to display the x offset for this board, usually corresponding with how the user specified it"
2744
2829
  ),
2745
- display_offset_y: z113.string().optional().describe(
2830
+ display_offset_y: z116.string().optional().describe(
2746
2831
  "How to display the y offset for this board, usually corresponding with how the user specified it"
2747
2832
  ),
2748
2833
  thickness: length.optional().default(1.4),
2749
- num_layers: z113.number().optional().default(4),
2750
- outline: z113.array(point).optional(),
2751
- shape: z113.enum(["rect", "polygon"]).optional(),
2752
- material: z113.enum(["fr4", "fr1"]).default("fr4"),
2753
- solder_mask_color: z113.string().optional(),
2754
- silkscreen_color: z113.string().optional(),
2834
+ num_layers: z116.number().optional().default(4),
2835
+ outline: z116.array(point).optional(),
2836
+ shape: z116.enum(["rect", "polygon"]).optional(),
2837
+ material: z116.enum(["fr4", "fr1"]).default("fr4"),
2838
+ solder_mask_color: z116.string().optional(),
2839
+ silkscreen_color: z116.string().optional(),
2755
2840
  anchor_position: point.optional(),
2756
2841
  anchor_alignment: ninePointAnchor.optional(),
2757
- position_mode: z113.enum(["relative_to_panel_anchor", "none"]).optional()
2842
+ position_mode: z116.enum(["relative_to_panel_anchor", "none"]).optional()
2758
2843
  }).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
2759
2844
  expectTypesMatch(true);
2760
- var pcb_panel = z114.object({
2761
- type: z114.literal("pcb_panel"),
2845
+ var pcb_panel = z117.object({
2846
+ type: z117.literal("pcb_panel"),
2762
2847
  pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
2763
2848
  width: length,
2764
2849
  height: length,
2765
2850
  center: point,
2766
2851
  thickness: length.optional().default(1.4),
2767
- covered_with_solder_mask: z114.boolean().optional().default(true)
2852
+ covered_with_solder_mask: z117.boolean().optional().default(true)
2768
2853
  }).describe("Defines a PCB panel that can contain multiple boards");
2769
2854
  expectTypesMatch(true);
2770
2855
  var pcb_placement_error = base_circuit_json_error.extend({
2771
- type: z115.literal("pcb_placement_error"),
2856
+ type: z118.literal("pcb_placement_error"),
2772
2857
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
2773
- error_type: z115.literal("pcb_placement_error").default("pcb_placement_error"),
2774
- subcircuit_id: z115.string().optional()
2858
+ error_type: z118.literal("pcb_placement_error").default("pcb_placement_error"),
2859
+ subcircuit_id: z118.string().optional()
2775
2860
  }).describe("Defines a placement error on the PCB");
2776
2861
  expectTypesMatch(true);
2862
+ var pcb_packing_error = base_circuit_json_error.extend({
2863
+ type: z119.literal("pcb_packing_error"),
2864
+ pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
2865
+ error_type: z119.literal("pcb_packing_error").default("pcb_packing_error"),
2866
+ pcb_group_id: z119.string().optional(),
2867
+ subcircuit_id: z119.string().optional()
2868
+ }).describe("Defines a failure to pack PCB components within layout bounds");
2869
+ expectTypesMatch(true);
2777
2870
  var pcb_panelization_placement_error = base_circuit_json_error.extend({
2778
- type: z116.literal("pcb_panelization_placement_error"),
2871
+ type: z120.literal("pcb_panelization_placement_error"),
2779
2872
  pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
2780
2873
  "pcb_panelization_placement_error"
2781
2874
  ),
2782
- error_type: z116.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
2783
- pcb_panel_id: z116.string().optional(),
2784
- pcb_board_id: z116.string().optional(),
2785
- subcircuit_id: z116.string().optional()
2875
+ error_type: z120.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
2876
+ pcb_panel_id: z120.string().optional(),
2877
+ pcb_board_id: z120.string().optional(),
2878
+ subcircuit_id: z120.string().optional()
2786
2879
  }).describe("Defines a panelization placement error on the PCB");
2787
2880
  expectTypesMatch(true);
2788
- var pcb_trace_hint = z117.object({
2789
- type: z117.literal("pcb_trace_hint"),
2881
+ var pcb_trace_hint = z121.object({
2882
+ type: z121.literal("pcb_trace_hint"),
2790
2883
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
2791
- pcb_port_id: z117.string(),
2792
- pcb_component_id: z117.string(),
2793
- route: z117.array(route_hint_point),
2794
- subcircuit_id: z117.string().optional()
2884
+ pcb_port_id: z121.string(),
2885
+ pcb_component_id: z121.string(),
2886
+ route: z121.array(route_hint_point),
2887
+ subcircuit_id: z121.string().optional()
2795
2888
  }).describe("A hint that can be used during generation of a PCB trace");
2796
2889
  expectTypesMatch(true);
2797
- var pcb_silkscreen_line = z118.object({
2798
- type: z118.literal("pcb_silkscreen_line"),
2890
+ var pcb_silkscreen_line = z122.object({
2891
+ type: z122.literal("pcb_silkscreen_line"),
2799
2892
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
2800
- pcb_component_id: z118.string(),
2801
- pcb_group_id: z118.string().optional(),
2802
- subcircuit_id: z118.string().optional(),
2893
+ pcb_component_id: z122.string(),
2894
+ pcb_group_id: z122.string().optional(),
2895
+ subcircuit_id: z122.string().optional(),
2803
2896
  stroke_width: distance.default("0.1mm"),
2804
2897
  x1: distance,
2805
2898
  y1: distance,
@@ -2808,28 +2901,28 @@ var pcb_silkscreen_line = z118.object({
2808
2901
  layer: visible_layer
2809
2902
  }).describe("Defines a silkscreen line on the PCB");
2810
2903
  expectTypesMatch(true);
2811
- var pcb_silkscreen_path = z119.object({
2812
- type: z119.literal("pcb_silkscreen_path"),
2904
+ var pcb_silkscreen_path = z123.object({
2905
+ type: z123.literal("pcb_silkscreen_path"),
2813
2906
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
2814
- pcb_component_id: z119.string(),
2815
- pcb_group_id: z119.string().optional(),
2816
- subcircuit_id: z119.string().optional(),
2907
+ pcb_component_id: z123.string(),
2908
+ pcb_group_id: z123.string().optional(),
2909
+ subcircuit_id: z123.string().optional(),
2817
2910
  layer: visible_layer,
2818
- route: z119.array(point),
2911
+ route: z123.array(point),
2819
2912
  stroke_width: length
2820
2913
  }).describe("Defines a silkscreen path on the PCB");
2821
2914
  expectTypesMatch(true);
2822
- var pcb_silkscreen_text = z120.object({
2823
- type: z120.literal("pcb_silkscreen_text"),
2915
+ var pcb_silkscreen_text = z124.object({
2916
+ type: z124.literal("pcb_silkscreen_text"),
2824
2917
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
2825
- pcb_group_id: z120.string().optional(),
2826
- subcircuit_id: z120.string().optional(),
2827
- font: z120.literal("tscircuit2024").default("tscircuit2024"),
2918
+ pcb_group_id: z124.string().optional(),
2919
+ subcircuit_id: z124.string().optional(),
2920
+ font: z124.literal("tscircuit2024").default("tscircuit2024"),
2828
2921
  font_size: distance.default("0.2mm"),
2829
- pcb_component_id: z120.string(),
2830
- text: z120.string(),
2831
- is_knockout: z120.boolean().default(false).optional(),
2832
- knockout_padding: z120.object({
2922
+ pcb_component_id: z124.string(),
2923
+ text: z124.string(),
2924
+ is_knockout: z124.boolean().default(false).optional(),
2925
+ knockout_padding: z124.object({
2833
2926
  left: length,
2834
2927
  top: length,
2835
2928
  bottom: length,
@@ -2840,24 +2933,24 @@ var pcb_silkscreen_text = z120.object({
2840
2933
  bottom: "0.2mm",
2841
2934
  right: "0.2mm"
2842
2935
  }).optional(),
2843
- ccw_rotation: z120.number().optional(),
2936
+ ccw_rotation: z124.number().optional(),
2844
2937
  layer: layer_ref,
2845
- is_mirrored: z120.boolean().default(false).optional(),
2938
+ is_mirrored: z124.boolean().default(false).optional(),
2846
2939
  anchor_position: point.default({ x: 0, y: 0 }),
2847
2940
  anchor_alignment: ninePointAnchor.default("center")
2848
2941
  }).describe("Defines silkscreen text on the PCB");
2849
2942
  expectTypesMatch(true);
2850
- var pcb_copper_text = z121.object({
2851
- type: z121.literal("pcb_copper_text"),
2943
+ var pcb_copper_text = z125.object({
2944
+ type: z125.literal("pcb_copper_text"),
2852
2945
  pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
2853
- pcb_group_id: z121.string().optional(),
2854
- subcircuit_id: z121.string().optional(),
2855
- font: z121.literal("tscircuit2024").default("tscircuit2024"),
2946
+ pcb_group_id: z125.string().optional(),
2947
+ subcircuit_id: z125.string().optional(),
2948
+ font: z125.literal("tscircuit2024").default("tscircuit2024"),
2856
2949
  font_size: distance.default("0.2mm"),
2857
- pcb_component_id: z121.string(),
2858
- text: z121.string(),
2859
- is_knockout: z121.boolean().default(false).optional(),
2860
- knockout_padding: z121.object({
2950
+ pcb_component_id: z125.string(),
2951
+ text: z125.string(),
2952
+ is_knockout: z125.boolean().default(false).optional(),
2953
+ knockout_padding: z125.object({
2861
2954
  left: length,
2862
2955
  top: length,
2863
2956
  bottom: length,
@@ -2868,52 +2961,52 @@ var pcb_copper_text = z121.object({
2868
2961
  bottom: "0.2mm",
2869
2962
  right: "0.2mm"
2870
2963
  }).optional(),
2871
- ccw_rotation: z121.number().optional(),
2964
+ ccw_rotation: z125.number().optional(),
2872
2965
  layer: layer_ref,
2873
- is_mirrored: z121.boolean().default(false).optional(),
2966
+ is_mirrored: z125.boolean().default(false).optional(),
2874
2967
  anchor_position: point.default({ x: 0, y: 0 }),
2875
2968
  anchor_alignment: ninePointAnchor.default("center")
2876
2969
  }).describe("Defines copper text on the PCB");
2877
2970
  expectTypesMatch(true);
2878
- var pcb_silkscreen_rect = z122.object({
2879
- type: z122.literal("pcb_silkscreen_rect"),
2971
+ var pcb_silkscreen_rect = z126.object({
2972
+ type: z126.literal("pcb_silkscreen_rect"),
2880
2973
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
2881
- pcb_component_id: z122.string(),
2882
- pcb_group_id: z122.string().optional(),
2883
- subcircuit_id: z122.string().optional(),
2974
+ pcb_component_id: z126.string(),
2975
+ pcb_group_id: z126.string().optional(),
2976
+ subcircuit_id: z126.string().optional(),
2884
2977
  center: point,
2885
2978
  width: length,
2886
2979
  height: length,
2887
2980
  layer: layer_ref,
2888
2981
  stroke_width: length.default("1mm"),
2889
2982
  corner_radius: length.optional(),
2890
- is_filled: z122.boolean().default(true).optional(),
2891
- has_stroke: z122.boolean().optional(),
2892
- is_stroke_dashed: z122.boolean().optional(),
2893
- ccw_rotation: z122.number().optional()
2983
+ is_filled: z126.boolean().default(true).optional(),
2984
+ has_stroke: z126.boolean().optional(),
2985
+ is_stroke_dashed: z126.boolean().optional(),
2986
+ ccw_rotation: z126.number().optional()
2894
2987
  }).describe("Defines a silkscreen rect on the PCB");
2895
2988
  expectTypesMatch(true);
2896
- var pcb_silkscreen_circle = z123.object({
2897
- type: z123.literal("pcb_silkscreen_circle"),
2989
+ var pcb_silkscreen_circle = z127.object({
2990
+ type: z127.literal("pcb_silkscreen_circle"),
2898
2991
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
2899
2992
  "pcb_silkscreen_circle"
2900
2993
  ),
2901
- pcb_component_id: z123.string(),
2902
- pcb_group_id: z123.string().optional(),
2903
- subcircuit_id: z123.string().optional(),
2994
+ pcb_component_id: z127.string(),
2995
+ pcb_group_id: z127.string().optional(),
2996
+ subcircuit_id: z127.string().optional(),
2904
2997
  center: point,
2905
2998
  radius: length,
2906
2999
  layer: visible_layer,
2907
3000
  stroke_width: length.default("1mm"),
2908
- is_filled: z123.boolean().optional()
3001
+ is_filled: z127.boolean().optional()
2909
3002
  }).describe("Defines a silkscreen circle on the PCB");
2910
3003
  expectTypesMatch(true);
2911
- var pcb_silkscreen_oval = z124.object({
2912
- type: z124.literal("pcb_silkscreen_oval"),
3004
+ var pcb_silkscreen_oval = z128.object({
3005
+ type: z128.literal("pcb_silkscreen_oval"),
2913
3006
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
2914
- pcb_component_id: z124.string(),
2915
- pcb_group_id: z124.string().optional(),
2916
- subcircuit_id: z124.string().optional(),
3007
+ pcb_component_id: z128.string(),
3008
+ pcb_group_id: z128.string().optional(),
3009
+ subcircuit_id: z128.string().optional(),
2917
3010
  center: point,
2918
3011
  radius_x: distance,
2919
3012
  radius_y: distance,
@@ -2921,273 +3014,273 @@ var pcb_silkscreen_oval = z124.object({
2921
3014
  ccw_rotation: rotation.optional()
2922
3015
  }).describe("Defines a silkscreen oval on the PCB");
2923
3016
  expectTypesMatch(true);
2924
- var pcb_silkscreen_graphic_base = z125.object({
2925
- type: z125.literal("pcb_silkscreen_graphic"),
3017
+ var pcb_silkscreen_graphic_base = z129.object({
3018
+ type: z129.literal("pcb_silkscreen_graphic"),
2926
3019
  pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
2927
3020
  "pcb_silkscreen_graphic"
2928
3021
  ),
2929
- pcb_component_id: z125.string(),
2930
- pcb_group_id: z125.string().optional(),
2931
- subcircuit_id: z125.string().optional(),
3022
+ pcb_component_id: z129.string(),
3023
+ pcb_group_id: z129.string().optional(),
3024
+ subcircuit_id: z129.string().optional(),
2932
3025
  layer: visible_layer,
2933
3026
  image_asset: asset.optional()
2934
3027
  });
2935
3028
  var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
2936
- shape: z125.literal("brep"),
3029
+ shape: z129.literal("brep"),
2937
3030
  brep_shape
2938
3031
  }).describe("Defines a BRep silkscreen graphic on the PCB");
2939
3032
  expectTypesMatch(
2940
3033
  true
2941
3034
  );
2942
- var pcb_silkscreen_graphic = z125.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
3035
+ var pcb_silkscreen_graphic = z129.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
2943
3036
  expectTypesMatch(true);
2944
- var pcb_silkscreen_pill = z126.object({
2945
- type: z126.literal("pcb_silkscreen_pill"),
3037
+ var pcb_silkscreen_pill = z130.object({
3038
+ type: z130.literal("pcb_silkscreen_pill"),
2946
3039
  pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
2947
- pcb_component_id: z126.string(),
2948
- pcb_group_id: z126.string().optional(),
2949
- subcircuit_id: z126.string().optional(),
3040
+ pcb_component_id: z130.string(),
3041
+ pcb_group_id: z130.string().optional(),
3042
+ subcircuit_id: z130.string().optional(),
2950
3043
  center: point,
2951
3044
  width: length,
2952
3045
  height: length,
2953
3046
  layer: layer_ref,
2954
- ccw_rotation: z126.number().optional()
3047
+ ccw_rotation: z130.number().optional()
2955
3048
  }).describe("Defines a silkscreen pill on the PCB");
2956
3049
  expectTypesMatch(true);
2957
- var pcb_fabrication_note_text = z127.object({
2958
- type: z127.literal("pcb_fabrication_note_text"),
3050
+ var pcb_fabrication_note_text = z131.object({
3051
+ type: z131.literal("pcb_fabrication_note_text"),
2959
3052
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
2960
3053
  "pcb_fabrication_note_text"
2961
3054
  ),
2962
- subcircuit_id: z127.string().optional(),
2963
- pcb_group_id: z127.string().optional(),
2964
- font: z127.literal("tscircuit2024").default("tscircuit2024"),
3055
+ subcircuit_id: z131.string().optional(),
3056
+ pcb_group_id: z131.string().optional(),
3057
+ font: z131.literal("tscircuit2024").default("tscircuit2024"),
2965
3058
  font_size: distance.default("1mm"),
2966
- pcb_component_id: z127.string(),
2967
- text: z127.string(),
2968
- ccw_rotation: z127.number().optional(),
3059
+ pcb_component_id: z131.string(),
3060
+ text: z131.string(),
3061
+ ccw_rotation: z131.number().optional(),
2969
3062
  layer: visible_layer,
2970
3063
  anchor_position: point.default({ x: 0, y: 0 }),
2971
- anchor_alignment: z127.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
2972
- color: z127.string().optional()
3064
+ anchor_alignment: z131.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3065
+ color: z131.string().optional()
2973
3066
  }).describe(
2974
3067
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
2975
3068
  );
2976
3069
  expectTypesMatch(true);
2977
- var pcb_fabrication_note_path = z128.object({
2978
- type: z128.literal("pcb_fabrication_note_path"),
3070
+ var pcb_fabrication_note_path = z132.object({
3071
+ type: z132.literal("pcb_fabrication_note_path"),
2979
3072
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
2980
3073
  "pcb_fabrication_note_path"
2981
3074
  ),
2982
- pcb_component_id: z128.string(),
2983
- subcircuit_id: z128.string().optional(),
3075
+ pcb_component_id: z132.string(),
3076
+ subcircuit_id: z132.string().optional(),
2984
3077
  layer: layer_ref,
2985
- route: z128.array(point),
3078
+ route: z132.array(point),
2986
3079
  stroke_width: length,
2987
- color: z128.string().optional()
3080
+ color: z132.string().optional()
2988
3081
  }).describe(
2989
3082
  "Defines a fabrication path on the PCB for fabricators or assemblers"
2990
3083
  );
2991
3084
  expectTypesMatch(true);
2992
- var pcb_fabrication_note_rect = z129.object({
2993
- type: z129.literal("pcb_fabrication_note_rect"),
3085
+ var pcb_fabrication_note_rect = z133.object({
3086
+ type: z133.literal("pcb_fabrication_note_rect"),
2994
3087
  pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
2995
3088
  "pcb_fabrication_note_rect"
2996
3089
  ),
2997
- pcb_component_id: z129.string(),
2998
- pcb_group_id: z129.string().optional(),
2999
- subcircuit_id: z129.string().optional(),
3090
+ pcb_component_id: z133.string(),
3091
+ pcb_group_id: z133.string().optional(),
3092
+ subcircuit_id: z133.string().optional(),
3000
3093
  center: point,
3001
3094
  width: length,
3002
3095
  height: length,
3003
3096
  layer: visible_layer,
3004
3097
  stroke_width: length.default("0.1mm"),
3005
3098
  corner_radius: length.optional(),
3006
- is_filled: z129.boolean().optional(),
3007
- has_stroke: z129.boolean().optional(),
3008
- is_stroke_dashed: z129.boolean().optional(),
3009
- color: z129.string().optional()
3099
+ is_filled: z133.boolean().optional(),
3100
+ has_stroke: z133.boolean().optional(),
3101
+ is_stroke_dashed: z133.boolean().optional(),
3102
+ color: z133.string().optional()
3010
3103
  }).describe("Defines a fabrication note rectangle on the PCB");
3011
3104
  expectTypesMatch(true);
3012
- var pcb_fabrication_note_dimension = z130.object({
3013
- type: z130.literal("pcb_fabrication_note_dimension"),
3105
+ var pcb_fabrication_note_dimension = z134.object({
3106
+ type: z134.literal("pcb_fabrication_note_dimension"),
3014
3107
  pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
3015
3108
  "pcb_fabrication_note_dimension"
3016
3109
  ),
3017
- pcb_component_id: z130.string(),
3018
- pcb_group_id: z130.string().optional(),
3019
- subcircuit_id: z130.string().optional(),
3110
+ pcb_component_id: z134.string(),
3111
+ pcb_group_id: z134.string().optional(),
3112
+ subcircuit_id: z134.string().optional(),
3020
3113
  layer: visible_layer,
3021
3114
  from: point,
3022
3115
  to: point,
3023
- text: z130.string().optional(),
3024
- text_ccw_rotation: z130.number().optional(),
3116
+ text: z134.string().optional(),
3117
+ text_ccw_rotation: z134.number().optional(),
3025
3118
  offset: length.optional(),
3026
3119
  offset_distance: length.optional(),
3027
- offset_direction: z130.object({
3028
- x: z130.number(),
3029
- y: z130.number()
3120
+ offset_direction: z134.object({
3121
+ x: z134.number(),
3122
+ y: z134.number()
3030
3123
  }).optional(),
3031
- font: z130.literal("tscircuit2024").default("tscircuit2024"),
3124
+ font: z134.literal("tscircuit2024").default("tscircuit2024"),
3032
3125
  font_size: length.default("1mm"),
3033
- color: z130.string().optional(),
3126
+ color: z134.string().optional(),
3034
3127
  arrow_size: length.default("1mm")
3035
3128
  }).describe("Defines a measurement annotation within PCB fabrication notes");
3036
3129
  expectTypesMatch(true);
3037
- var pcb_note_text = z131.object({
3038
- type: z131.literal("pcb_note_text"),
3130
+ var pcb_note_text = z135.object({
3131
+ type: z135.literal("pcb_note_text"),
3039
3132
  pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
3040
- pcb_component_id: z131.string().optional(),
3041
- pcb_group_id: z131.string().optional(),
3042
- subcircuit_id: z131.string().optional(),
3043
- name: z131.string().optional(),
3044
- font: z131.literal("tscircuit2024").default("tscircuit2024"),
3133
+ pcb_component_id: z135.string().optional(),
3134
+ pcb_group_id: z135.string().optional(),
3135
+ subcircuit_id: z135.string().optional(),
3136
+ name: z135.string().optional(),
3137
+ font: z135.literal("tscircuit2024").default("tscircuit2024"),
3045
3138
  font_size: distance.default("1mm"),
3046
- text: z131.string().optional(),
3139
+ text: z135.string().optional(),
3047
3140
  anchor_position: point.default({ x: 0, y: 0 }),
3048
- anchor_alignment: z131.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3141
+ anchor_alignment: z135.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3049
3142
  layer: visible_layer.default("top"),
3050
- is_mirrored_from_top_view: z131.boolean().optional(),
3051
- color: z131.string().optional()
3143
+ is_mirrored_from_top_view: z135.boolean().optional(),
3144
+ color: z135.string().optional()
3052
3145
  }).describe("Defines a documentation note in text on the PCB");
3053
3146
  expectTypesMatch(true);
3054
- var pcb_note_rect = z132.object({
3055
- type: z132.literal("pcb_note_rect"),
3147
+ var pcb_note_rect = z136.object({
3148
+ type: z136.literal("pcb_note_rect"),
3056
3149
  pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
3057
- pcb_component_id: z132.string().optional(),
3058
- pcb_group_id: z132.string().optional(),
3059
- subcircuit_id: z132.string().optional(),
3060
- name: z132.string().optional(),
3061
- text: z132.string().optional(),
3150
+ pcb_component_id: z136.string().optional(),
3151
+ pcb_group_id: z136.string().optional(),
3152
+ subcircuit_id: z136.string().optional(),
3153
+ name: z136.string().optional(),
3154
+ text: z136.string().optional(),
3062
3155
  center: point,
3063
3156
  width: length,
3064
3157
  height: length,
3065
3158
  layer: visible_layer.default("top"),
3066
3159
  stroke_width: length.default("0.1mm"),
3067
3160
  corner_radius: length.optional(),
3068
- is_filled: z132.boolean().optional(),
3069
- has_stroke: z132.boolean().optional(),
3070
- is_stroke_dashed: z132.boolean().optional(),
3071
- color: z132.string().optional()
3161
+ is_filled: z136.boolean().optional(),
3162
+ has_stroke: z136.boolean().optional(),
3163
+ is_stroke_dashed: z136.boolean().optional(),
3164
+ color: z136.string().optional()
3072
3165
  }).describe("Defines a rectangular documentation note on the PCB");
3073
3166
  expectTypesMatch(true);
3074
- var pcb_note_path = z133.object({
3075
- type: z133.literal("pcb_note_path"),
3167
+ var pcb_note_path = z137.object({
3168
+ type: z137.literal("pcb_note_path"),
3076
3169
  pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
3077
- pcb_component_id: z133.string().optional(),
3078
- pcb_group_id: z133.string().optional(),
3079
- subcircuit_id: z133.string().optional(),
3080
- name: z133.string().optional(),
3081
- text: z133.string().optional(),
3082
- route: z133.array(point),
3170
+ pcb_component_id: z137.string().optional(),
3171
+ pcb_group_id: z137.string().optional(),
3172
+ subcircuit_id: z137.string().optional(),
3173
+ name: z137.string().optional(),
3174
+ text: z137.string().optional(),
3175
+ route: z137.array(point),
3083
3176
  layer: visible_layer.default("top"),
3084
3177
  stroke_width: length.default("0.1mm"),
3085
- color: z133.string().optional()
3178
+ color: z137.string().optional()
3086
3179
  }).describe("Defines a polyline documentation note on the PCB");
3087
3180
  expectTypesMatch(true);
3088
- var pcb_note_line = z134.object({
3089
- type: z134.literal("pcb_note_line"),
3181
+ var pcb_note_line = z138.object({
3182
+ type: z138.literal("pcb_note_line"),
3090
3183
  pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
3091
- pcb_component_id: z134.string().optional(),
3092
- pcb_group_id: z134.string().optional(),
3093
- subcircuit_id: z134.string().optional(),
3094
- name: z134.string().optional(),
3095
- text: z134.string().optional(),
3184
+ pcb_component_id: z138.string().optional(),
3185
+ pcb_group_id: z138.string().optional(),
3186
+ subcircuit_id: z138.string().optional(),
3187
+ name: z138.string().optional(),
3188
+ text: z138.string().optional(),
3096
3189
  x1: distance,
3097
3190
  y1: distance,
3098
3191
  x2: distance,
3099
3192
  y2: distance,
3100
3193
  layer: visible_layer.default("top"),
3101
3194
  stroke_width: distance.default("0.1mm"),
3102
- color: z134.string().optional(),
3103
- is_dashed: z134.boolean().optional()
3195
+ color: z138.string().optional(),
3196
+ is_dashed: z138.boolean().optional()
3104
3197
  }).describe("Defines a straight documentation note line on the PCB");
3105
3198
  expectTypesMatch(true);
3106
- var pcb_note_dimension = z135.object({
3107
- type: z135.literal("pcb_note_dimension"),
3199
+ var pcb_note_dimension = z139.object({
3200
+ type: z139.literal("pcb_note_dimension"),
3108
3201
  pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
3109
- pcb_component_id: z135.string().optional(),
3110
- pcb_group_id: z135.string().optional(),
3111
- subcircuit_id: z135.string().optional(),
3112
- name: z135.string().optional(),
3202
+ pcb_component_id: z139.string().optional(),
3203
+ pcb_group_id: z139.string().optional(),
3204
+ subcircuit_id: z139.string().optional(),
3205
+ name: z139.string().optional(),
3113
3206
  from: point,
3114
3207
  to: point,
3115
- text: z135.string().optional(),
3116
- text_ccw_rotation: z135.number().optional(),
3208
+ text: z139.string().optional(),
3209
+ text_ccw_rotation: z139.number().optional(),
3117
3210
  offset_distance: length.optional(),
3118
- offset_direction: z135.object({
3119
- x: z135.number(),
3120
- y: z135.number()
3211
+ offset_direction: z139.object({
3212
+ x: z139.number(),
3213
+ y: z139.number()
3121
3214
  }).optional(),
3122
- font: z135.literal("tscircuit2024").default("tscircuit2024"),
3215
+ font: z139.literal("tscircuit2024").default("tscircuit2024"),
3123
3216
  font_size: length.default("1mm"),
3124
3217
  layer: visible_layer.default("top"),
3125
- color: z135.string().optional(),
3218
+ color: z139.string().optional(),
3126
3219
  arrow_size: length.default("1mm")
3127
3220
  }).describe("Defines a measurement annotation within PCB documentation notes");
3128
3221
  expectTypesMatch(true);
3129
3222
  var pcb_footprint_overlap_error = base_circuit_json_error.extend({
3130
- type: z136.literal("pcb_footprint_overlap_error"),
3223
+ type: z140.literal("pcb_footprint_overlap_error"),
3131
3224
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3132
- error_type: z136.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
3133
- pcb_smtpad_ids: z136.array(z136.string()).optional(),
3134
- pcb_plated_hole_ids: z136.array(z136.string()).optional(),
3135
- pcb_hole_ids: z136.array(z136.string()).optional(),
3136
- pcb_keepout_ids: z136.array(z136.string()).optional()
3225
+ error_type: z140.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
3226
+ pcb_smtpad_ids: z140.array(z140.string()).optional(),
3227
+ pcb_plated_hole_ids: z140.array(z140.string()).optional(),
3228
+ pcb_hole_ids: z140.array(z140.string()).optional(),
3229
+ pcb_keepout_ids: z140.array(z140.string()).optional()
3137
3230
  }).describe("Error emitted when a pcb footprint overlaps with another element");
3138
3231
  expectTypesMatch(
3139
3232
  true
3140
3233
  );
3141
3234
  var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
3142
- type: z137.literal("pcb_courtyard_overlap_error"),
3235
+ type: z141.literal("pcb_courtyard_overlap_error"),
3143
3236
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3144
- error_type: z137.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
3145
- pcb_component_ids: z137.tuple([z137.string(), z137.string()])
3237
+ error_type: z141.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
3238
+ pcb_component_ids: z141.tuple([z141.string(), z141.string()])
3146
3239
  }).describe(
3147
3240
  "Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
3148
3241
  );
3149
3242
  expectTypesMatch(
3150
3243
  true
3151
3244
  );
3152
- var pcb_keepout = z138.object({
3153
- type: z138.literal("pcb_keepout"),
3154
- shape: z138.literal("rect"),
3155
- pcb_group_id: z138.string().optional(),
3156
- subcircuit_id: z138.string().optional(),
3245
+ var pcb_keepout = z142.object({
3246
+ type: z142.literal("pcb_keepout"),
3247
+ shape: z142.literal("rect"),
3248
+ pcb_group_id: z142.string().optional(),
3249
+ subcircuit_id: z142.string().optional(),
3157
3250
  center: point,
3158
3251
  width: distance,
3159
3252
  height: distance,
3160
- pcb_keepout_id: z138.string(),
3161
- layers: z138.array(z138.string()),
3253
+ pcb_keepout_id: z142.string(),
3254
+ layers: z142.array(z142.string()),
3162
3255
  // Specify layers where the keepout applies
3163
- description: z138.string().optional()
3256
+ description: z142.string().optional()
3164
3257
  // Optional description of the keepout
3165
3258
  }).or(
3166
- z138.object({
3167
- type: z138.literal("pcb_keepout"),
3168
- shape: z138.literal("circle"),
3169
- pcb_group_id: z138.string().optional(),
3170
- subcircuit_id: z138.string().optional(),
3259
+ z142.object({
3260
+ type: z142.literal("pcb_keepout"),
3261
+ shape: z142.literal("circle"),
3262
+ pcb_group_id: z142.string().optional(),
3263
+ subcircuit_id: z142.string().optional(),
3171
3264
  center: point,
3172
3265
  radius: distance,
3173
- pcb_keepout_id: z138.string(),
3174
- layers: z138.array(z138.string()),
3266
+ pcb_keepout_id: z142.string(),
3267
+ layers: z142.array(z142.string()),
3175
3268
  // Specify layers where the keepout applies
3176
- description: z138.string().optional()
3269
+ description: z142.string().optional()
3177
3270
  // Optional description of the keepout
3178
3271
  })
3179
3272
  );
3180
3273
  expectTypesMatch(true);
3181
- var pcb_cutout_base = z139.object({
3182
- type: z139.literal("pcb_cutout"),
3274
+ var pcb_cutout_base = z143.object({
3275
+ type: z143.literal("pcb_cutout"),
3183
3276
  pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
3184
- pcb_group_id: z139.string().optional(),
3185
- subcircuit_id: z139.string().optional(),
3186
- pcb_board_id: z139.string().optional(),
3187
- pcb_panel_id: z139.string().optional()
3277
+ pcb_group_id: z143.string().optional(),
3278
+ subcircuit_id: z143.string().optional(),
3279
+ pcb_board_id: z143.string().optional(),
3280
+ pcb_panel_id: z143.string().optional()
3188
3281
  });
3189
3282
  var pcb_cutout_rect = pcb_cutout_base.extend({
3190
- shape: z139.literal("rect"),
3283
+ shape: z143.literal("rect"),
3191
3284
  center: point,
3192
3285
  width: length,
3193
3286
  height: length,
@@ -3196,26 +3289,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
3196
3289
  });
3197
3290
  expectTypesMatch(true);
3198
3291
  var pcb_cutout_circle = pcb_cutout_base.extend({
3199
- shape: z139.literal("circle"),
3292
+ shape: z143.literal("circle"),
3200
3293
  center: point,
3201
3294
  radius: length
3202
3295
  });
3203
3296
  expectTypesMatch(true);
3204
3297
  var pcb_cutout_polygon = pcb_cutout_base.extend({
3205
- shape: z139.literal("polygon"),
3206
- points: z139.array(point)
3298
+ shape: z143.literal("polygon"),
3299
+ points: z143.array(point)
3207
3300
  });
3208
3301
  expectTypesMatch(true);
3209
3302
  var pcb_cutout_path = pcb_cutout_base.extend({
3210
- shape: z139.literal("path"),
3211
- route: z139.array(point),
3303
+ shape: z143.literal("path"),
3304
+ route: z143.array(point),
3212
3305
  slot_width: length,
3213
3306
  slot_length: length.optional(),
3214
3307
  space_between_slots: length.optional(),
3215
3308
  slot_corner_radius: length.optional()
3216
3309
  });
3217
3310
  expectTypesMatch(true);
3218
- var pcb_cutout = z139.discriminatedUnion("shape", [
3311
+ var pcb_cutout = z143.discriminatedUnion("shape", [
3219
3312
  pcb_cutout_rect,
3220
3313
  pcb_cutout_circle,
3221
3314
  pcb_cutout_polygon,
@@ -3223,194 +3316,194 @@ var pcb_cutout = z139.discriminatedUnion("shape", [
3223
3316
  ]).describe("Defines a cutout on the PCB, removing board material.");
3224
3317
  expectTypesMatch(true);
3225
3318
  var pcb_missing_footprint_error = base_circuit_json_error.extend({
3226
- type: z140.literal("pcb_missing_footprint_error"),
3319
+ type: z144.literal("pcb_missing_footprint_error"),
3227
3320
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
3228
3321
  "pcb_missing_footprint_error"
3229
3322
  ),
3230
- pcb_group_id: z140.string().optional(),
3231
- subcircuit_id: z140.string().optional(),
3232
- error_type: z140.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
3233
- source_component_id: z140.string()
3323
+ pcb_group_id: z144.string().optional(),
3324
+ subcircuit_id: z144.string().optional(),
3325
+ error_type: z144.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
3326
+ source_component_id: z144.string()
3234
3327
  }).describe("Defines a missing footprint error on the PCB");
3235
3328
  expectTypesMatch(
3236
3329
  true
3237
3330
  );
3238
3331
  var external_footprint_load_error = base_circuit_json_error.extend({
3239
- type: z141.literal("external_footprint_load_error"),
3332
+ type: z145.literal("external_footprint_load_error"),
3240
3333
  external_footprint_load_error_id: getZodPrefixedIdWithDefault(
3241
3334
  "external_footprint_load_error"
3242
3335
  ),
3243
- pcb_component_id: z141.string(),
3244
- source_component_id: z141.string(),
3245
- pcb_group_id: z141.string().optional(),
3246
- subcircuit_id: z141.string().optional(),
3247
- footprinter_string: z141.string().optional(),
3248
- error_type: z141.literal("external_footprint_load_error").default("external_footprint_load_error")
3336
+ pcb_component_id: z145.string(),
3337
+ source_component_id: z145.string(),
3338
+ pcb_group_id: z145.string().optional(),
3339
+ subcircuit_id: z145.string().optional(),
3340
+ footprinter_string: z145.string().optional(),
3341
+ error_type: z145.literal("external_footprint_load_error").default("external_footprint_load_error")
3249
3342
  }).describe("Defines an error when an external footprint fails to load");
3250
3343
  expectTypesMatch(true);
3251
3344
  var circuit_json_footprint_load_error = base_circuit_json_error.extend({
3252
- type: z142.literal("circuit_json_footprint_load_error"),
3345
+ type: z146.literal("circuit_json_footprint_load_error"),
3253
3346
  circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
3254
3347
  "circuit_json_footprint_load_error"
3255
3348
  ),
3256
- pcb_component_id: z142.string(),
3257
- source_component_id: z142.string(),
3258
- pcb_group_id: z142.string().optional(),
3259
- subcircuit_id: z142.string().optional(),
3260
- error_type: z142.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
3261
- circuit_json: z142.array(z142.any()).optional()
3349
+ pcb_component_id: z146.string(),
3350
+ source_component_id: z146.string(),
3351
+ pcb_group_id: z146.string().optional(),
3352
+ subcircuit_id: z146.string().optional(),
3353
+ error_type: z146.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
3354
+ circuit_json: z146.array(z146.any()).optional()
3262
3355
  }).describe("Defines an error when a circuit JSON footprint fails to load");
3263
3356
  expectTypesMatch(true);
3264
- var pcb_group = z143.object({
3265
- type: z143.literal("pcb_group"),
3357
+ var pcb_group = z147.object({
3358
+ type: z147.literal("pcb_group"),
3266
3359
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
3267
- source_group_id: z143.string(),
3268
- is_subcircuit: z143.boolean().optional(),
3269
- subcircuit_id: z143.string().optional(),
3360
+ source_group_id: z147.string(),
3361
+ is_subcircuit: z147.boolean().optional(),
3362
+ subcircuit_id: z147.string().optional(),
3270
3363
  width: length.optional(),
3271
3364
  height: length.optional(),
3272
3365
  center: point,
3273
- display_offset_x: z143.string().optional().describe(
3366
+ display_offset_x: z147.string().optional().describe(
3274
3367
  "How to display the x offset for this group, usually corresponding with how the user specified it"
3275
3368
  ),
3276
- display_offset_y: z143.string().optional().describe(
3369
+ display_offset_y: z147.string().optional().describe(
3277
3370
  "How to display the y offset for this group, usually corresponding with how the user specified it"
3278
3371
  ),
3279
- outline: z143.array(point).optional(),
3372
+ outline: z147.array(point).optional(),
3280
3373
  anchor_position: point.optional(),
3281
3374
  anchor_alignment: ninePointAnchor.default("center"),
3282
- position_mode: z143.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
3283
- positioned_relative_to_pcb_group_id: z143.string().optional(),
3284
- positioned_relative_to_pcb_board_id: z143.string().optional(),
3285
- pcb_component_ids: z143.array(z143.string()),
3286
- child_layout_mode: z143.enum(["packed", "none"]).optional(),
3287
- name: z143.string().optional(),
3288
- description: z143.string().optional(),
3289
- layout_mode: z143.string().optional(),
3290
- autorouter_configuration: z143.object({
3375
+ position_mode: z147.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
3376
+ positioned_relative_to_pcb_group_id: z147.string().optional(),
3377
+ positioned_relative_to_pcb_board_id: z147.string().optional(),
3378
+ pcb_component_ids: z147.array(z147.string()),
3379
+ child_layout_mode: z147.enum(["packed", "none"]).optional(),
3380
+ name: z147.string().optional(),
3381
+ description: z147.string().optional(),
3382
+ layout_mode: z147.string().optional(),
3383
+ autorouter_configuration: z147.object({
3291
3384
  trace_clearance: length
3292
3385
  }).optional(),
3293
- autorouter_used_string: z143.string().optional()
3386
+ autorouter_used_string: z147.string().optional()
3294
3387
  }).describe("Defines a group of components on the PCB");
3295
3388
  expectTypesMatch(true);
3296
3389
  var pcb_autorouting_error = base_circuit_json_error.extend({
3297
- type: z144.literal("pcb_autorouting_error"),
3390
+ type: z148.literal("pcb_autorouting_error"),
3298
3391
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
3299
- error_type: z144.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
3300
- subcircuit_id: z144.string().optional()
3392
+ error_type: z148.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
3393
+ subcircuit_id: z148.string().optional()
3301
3394
  }).describe("The autorouting has failed to route a portion of the board");
3302
3395
  expectTypesMatch(true);
3303
- var pcb_manual_edit_conflict_warning = z145.object({
3304
- type: z145.literal("pcb_manual_edit_conflict_warning"),
3396
+ var pcb_manual_edit_conflict_warning = z149.object({
3397
+ type: z149.literal("pcb_manual_edit_conflict_warning"),
3305
3398
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
3306
3399
  "pcb_manual_edit_conflict_warning"
3307
3400
  ),
3308
- warning_type: z145.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
3309
- message: z145.string(),
3310
- pcb_component_id: z145.string(),
3311
- pcb_group_id: z145.string().optional(),
3312
- subcircuit_id: z145.string().optional(),
3313
- source_component_id: z145.string()
3401
+ warning_type: z149.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
3402
+ message: z149.string(),
3403
+ pcb_component_id: z149.string(),
3404
+ pcb_group_id: z149.string().optional(),
3405
+ subcircuit_id: z149.string().optional(),
3406
+ source_component_id: z149.string()
3314
3407
  }).describe(
3315
3408
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
3316
3409
  );
3317
3410
  expectTypesMatch(true);
3318
- var connectorOrientationDirection = z146.enum(["x-", "x+", "y+", "y-"]);
3319
- var pcb_connector_not_in_accessible_orientation_warning = z146.object({
3320
- type: z146.literal("pcb_connector_not_in_accessible_orientation_warning"),
3411
+ var connectorOrientationDirection = z150.enum(["x-", "x+", "y+", "y-"]);
3412
+ var pcb_connector_not_in_accessible_orientation_warning = z150.object({
3413
+ type: z150.literal("pcb_connector_not_in_accessible_orientation_warning"),
3321
3414
  pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
3322
3415
  "pcb_connector_not_in_accessible_orientation_warning"
3323
3416
  ),
3324
- warning_type: z146.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
3325
- message: z146.string(),
3326
- pcb_component_id: z146.string(),
3327
- source_component_id: z146.string().optional(),
3328
- pcb_board_id: z146.string().optional(),
3417
+ warning_type: z150.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
3418
+ message: z150.string(),
3419
+ pcb_component_id: z150.string(),
3420
+ source_component_id: z150.string().optional(),
3421
+ pcb_board_id: z150.string().optional(),
3329
3422
  facing_direction: connectorOrientationDirection,
3330
3423
  recommended_facing_direction: connectorOrientationDirection,
3331
- subcircuit_id: z146.string().optional()
3424
+ subcircuit_id: z150.string().optional()
3332
3425
  }).describe(
3333
3426
  "Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
3334
3427
  );
3335
3428
  expectTypesMatch(true);
3336
- var supplier_footprint_mismatch_warning = z147.object({
3337
- type: z147.literal("supplier_footprint_mismatch_warning"),
3429
+ var supplier_footprint_mismatch_warning = z151.object({
3430
+ type: z151.literal("supplier_footprint_mismatch_warning"),
3338
3431
  supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
3339
3432
  "supplier_footprint_mismatch_warning"
3340
3433
  ),
3341
- warning_type: z147.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
3342
- message: z147.string(),
3343
- source_component_id: z147.string(),
3344
- pcb_component_id: z147.string().optional(),
3345
- pcb_group_id: z147.string().optional(),
3346
- subcircuit_id: z147.string().optional(),
3434
+ warning_type: z151.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
3435
+ message: z151.string(),
3436
+ source_component_id: z151.string(),
3437
+ pcb_component_id: z151.string().optional(),
3438
+ pcb_group_id: z151.string().optional(),
3439
+ subcircuit_id: z151.string().optional(),
3347
3440
  supplier_name: supplier_name.optional(),
3348
- supplier_part_number: z147.string().optional(),
3349
- supplier_footprint_url: z147.string().optional(),
3350
- footprint_copper_intersection_over_union: z147.number()
3441
+ supplier_part_number: z151.string().optional(),
3442
+ supplier_footprint_url: z151.string().optional(),
3443
+ footprint_copper_intersection_over_union: z151.number()
3351
3444
  }).describe(
3352
3445
  "Warning emitted when a supplier part footprint does not match the expected footprint"
3353
3446
  );
3354
3447
  expectTypesMatch(true);
3355
- var pcb_breakout_point = z148.object({
3356
- type: z148.literal("pcb_breakout_point"),
3448
+ var pcb_breakout_point = z152.object({
3449
+ type: z152.literal("pcb_breakout_point"),
3357
3450
  pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
3358
- pcb_group_id: z148.string(),
3359
- subcircuit_id: z148.string().optional(),
3360
- source_trace_id: z148.string().optional(),
3361
- source_port_id: z148.string().optional(),
3362
- source_net_id: z148.string().optional(),
3451
+ pcb_group_id: z152.string(),
3452
+ subcircuit_id: z152.string().optional(),
3453
+ source_trace_id: z152.string().optional(),
3454
+ source_port_id: z152.string().optional(),
3455
+ source_net_id: z152.string().optional(),
3363
3456
  x: distance,
3364
3457
  y: distance
3365
3458
  }).describe(
3366
3459
  "Defines a routing target within a pcb_group for a source_trace or source_net"
3367
3460
  );
3368
3461
  expectTypesMatch(true);
3369
- var pcb_ground_plane = z149.object({
3370
- type: z149.literal("pcb_ground_plane"),
3462
+ var pcb_ground_plane = z153.object({
3463
+ type: z153.literal("pcb_ground_plane"),
3371
3464
  pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
3372
- source_pcb_ground_plane_id: z149.string(),
3373
- source_net_id: z149.string(),
3374
- pcb_group_id: z149.string().optional(),
3375
- subcircuit_id: z149.string().optional()
3465
+ source_pcb_ground_plane_id: z153.string(),
3466
+ source_net_id: z153.string(),
3467
+ pcb_group_id: z153.string().optional(),
3468
+ subcircuit_id: z153.string().optional()
3376
3469
  }).describe("Defines a ground plane on the PCB");
3377
3470
  expectTypesMatch(true);
3378
- var pcb_ground_plane_region = z150.object({
3379
- type: z150.literal("pcb_ground_plane_region"),
3471
+ var pcb_ground_plane_region = z154.object({
3472
+ type: z154.literal("pcb_ground_plane_region"),
3380
3473
  pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
3381
3474
  "pcb_ground_plane_region"
3382
3475
  ),
3383
- pcb_ground_plane_id: z150.string(),
3384
- pcb_group_id: z150.string().optional(),
3385
- subcircuit_id: z150.string().optional(),
3476
+ pcb_ground_plane_id: z154.string(),
3477
+ pcb_group_id: z154.string().optional(),
3478
+ subcircuit_id: z154.string().optional(),
3386
3479
  layer: layer_ref,
3387
- points: z150.array(point)
3480
+ points: z154.array(point)
3388
3481
  }).describe("Defines a polygon region of a ground plane");
3389
3482
  expectTypesMatch(true);
3390
- var pcb_thermal_spoke = z151.object({
3391
- type: z151.literal("pcb_thermal_spoke"),
3483
+ var pcb_thermal_spoke = z155.object({
3484
+ type: z155.literal("pcb_thermal_spoke"),
3392
3485
  pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
3393
- pcb_ground_plane_id: z151.string(),
3394
- shape: z151.string(),
3395
- spoke_count: z151.number(),
3486
+ pcb_ground_plane_id: z155.string(),
3487
+ shape: z155.string(),
3488
+ spoke_count: z155.number(),
3396
3489
  spoke_thickness: distance,
3397
3490
  spoke_inner_diameter: distance,
3398
3491
  spoke_outer_diameter: distance,
3399
- pcb_plated_hole_id: z151.string().optional(),
3400
- subcircuit_id: z151.string().optional()
3492
+ pcb_plated_hole_id: z155.string().optional(),
3493
+ subcircuit_id: z155.string().optional()
3401
3494
  }).describe("Pattern for connecting a ground plane to a plated hole");
3402
3495
  expectTypesMatch(true);
3403
- var pcb_copper_pour_base = z152.object({
3404
- type: z152.literal("pcb_copper_pour"),
3496
+ var pcb_copper_pour_base = z156.object({
3497
+ type: z156.literal("pcb_copper_pour"),
3405
3498
  pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
3406
- pcb_group_id: z152.string().optional(),
3407
- subcircuit_id: z152.string().optional(),
3499
+ pcb_group_id: z156.string().optional(),
3500
+ subcircuit_id: z156.string().optional(),
3408
3501
  layer: layer_ref,
3409
- source_net_id: z152.string().optional(),
3410
- covered_with_solder_mask: z152.boolean().optional().default(true)
3502
+ source_net_id: z156.string().optional(),
3503
+ covered_with_solder_mask: z156.boolean().optional().default(true)
3411
3504
  });
3412
3505
  var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
3413
- shape: z152.literal("rect"),
3506
+ shape: z156.literal("rect"),
3414
3507
  center: point,
3415
3508
  width: length,
3416
3509
  height: length,
@@ -3418,101 +3511,101 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
3418
3511
  });
3419
3512
  expectTypesMatch(true);
3420
3513
  var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
3421
- shape: z152.literal("brep"),
3514
+ shape: z156.literal("brep"),
3422
3515
  brep_shape
3423
3516
  });
3424
3517
  expectTypesMatch(true);
3425
3518
  var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
3426
- shape: z152.literal("polygon"),
3427
- points: z152.array(point)
3519
+ shape: z156.literal("polygon"),
3520
+ points: z156.array(point)
3428
3521
  });
3429
3522
  expectTypesMatch(true);
3430
- var pcb_copper_pour = z152.discriminatedUnion("shape", [
3523
+ var pcb_copper_pour = z156.discriminatedUnion("shape", [
3431
3524
  pcb_copper_pour_rect,
3432
3525
  pcb_copper_pour_brep,
3433
3526
  pcb_copper_pour_polygon
3434
3527
  ]).describe("Defines a copper pour on the PCB.");
3435
3528
  expectTypesMatch(true);
3436
3529
  var pcb_component_outside_board_error = base_circuit_json_error.extend({
3437
- type: z153.literal("pcb_component_outside_board_error"),
3530
+ type: z157.literal("pcb_component_outside_board_error"),
3438
3531
  pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
3439
3532
  "pcb_component_outside_board_error"
3440
3533
  ),
3441
- error_type: z153.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
3442
- pcb_component_id: z153.string(),
3443
- pcb_board_id: z153.string(),
3534
+ error_type: z157.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
3535
+ pcb_component_id: z157.string(),
3536
+ pcb_board_id: z157.string(),
3444
3537
  component_center: point,
3445
- component_bounds: z153.object({
3446
- min_x: z153.number(),
3447
- max_x: z153.number(),
3448
- min_y: z153.number(),
3449
- max_y: z153.number()
3538
+ component_bounds: z157.object({
3539
+ min_x: z157.number(),
3540
+ max_x: z157.number(),
3541
+ min_y: z157.number(),
3542
+ max_y: z157.number()
3450
3543
  }),
3451
- subcircuit_id: z153.string().optional(),
3452
- source_component_id: z153.string().optional()
3544
+ subcircuit_id: z157.string().optional(),
3545
+ source_component_id: z157.string().optional()
3453
3546
  }).describe(
3454
3547
  "Error emitted when a PCB component is placed outside the board boundaries"
3455
3548
  );
3456
3549
  expectTypesMatch(true);
3457
3550
  var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
3458
- type: z154.literal("pcb_component_not_on_board_edge_error"),
3551
+ type: z158.literal("pcb_component_not_on_board_edge_error"),
3459
3552
  pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
3460
3553
  "pcb_component_not_on_board_edge_error"
3461
3554
  ),
3462
- error_type: z154.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
3463
- pcb_component_id: z154.string(),
3464
- pcb_board_id: z154.string(),
3555
+ error_type: z158.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
3556
+ pcb_component_id: z158.string(),
3557
+ pcb_board_id: z158.string(),
3465
3558
  component_center: point,
3466
- pad_to_nearest_board_edge_distance: z154.number(),
3467
- source_component_id: z154.string().optional(),
3468
- subcircuit_id: z154.string().optional()
3559
+ pad_to_nearest_board_edge_distance: z158.number(),
3560
+ source_component_id: z158.string().optional(),
3561
+ subcircuit_id: z158.string().optional()
3469
3562
  }).describe(
3470
3563
  "Error emitted when a component that must be placed on the board edge is centered away from the edge"
3471
3564
  );
3472
3565
  expectTypesMatch(true);
3473
3566
  var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
3474
- type: z155.literal("pcb_component_invalid_layer_error"),
3567
+ type: z159.literal("pcb_component_invalid_layer_error"),
3475
3568
  pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
3476
3569
  "pcb_component_invalid_layer_error"
3477
3570
  ),
3478
- error_type: z155.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
3479
- pcb_component_id: z155.string().optional(),
3480
- source_component_id: z155.string(),
3571
+ error_type: z159.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
3572
+ pcb_component_id: z159.string().optional(),
3573
+ source_component_id: z159.string(),
3481
3574
  layer: layer_ref,
3482
- subcircuit_id: z155.string().optional()
3575
+ subcircuit_id: z159.string().optional()
3483
3576
  }).describe(
3484
3577
  "Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
3485
3578
  );
3486
3579
  expectTypesMatch(true);
3487
3580
  var pcb_via_clearance_error = base_circuit_json_error.extend({
3488
- type: z156.literal("pcb_via_clearance_error"),
3581
+ type: z160.literal("pcb_via_clearance_error"),
3489
3582
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3490
- error_type: z156.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
3491
- pcb_via_ids: z156.array(z156.string()).min(2),
3583
+ error_type: z160.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
3584
+ pcb_via_ids: z160.array(z160.string()).min(2),
3492
3585
  minimum_clearance: distance.optional(),
3493
3586
  actual_clearance: distance.optional(),
3494
- pcb_center: z156.object({
3495
- x: z156.number().optional(),
3496
- y: z156.number().optional()
3587
+ pcb_center: z160.object({
3588
+ x: z160.number().optional(),
3589
+ y: z160.number().optional()
3497
3590
  }).optional(),
3498
- subcircuit_id: z156.string().optional()
3591
+ subcircuit_id: z160.string().optional()
3499
3592
  }).describe("Error emitted when vias are closer than the allowed clearance");
3500
3593
  expectTypesMatch(true);
3501
3594
  var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
3502
- type: z157.literal("pcb_via_trace_clearance_error"),
3595
+ type: z161.literal("pcb_via_trace_clearance_error"),
3503
3596
  pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
3504
3597
  "pcb_via_trace_clearance_error"
3505
3598
  ),
3506
- error_type: z157.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
3507
- pcb_via_id: z157.string(),
3508
- pcb_trace_id: z157.string(),
3599
+ error_type: z161.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
3600
+ pcb_via_id: z161.string(),
3601
+ pcb_trace_id: z161.string(),
3509
3602
  minimum_clearance: distance.optional(),
3510
3603
  actual_clearance: distance.optional(),
3511
- center: z157.object({
3512
- x: z157.number().optional(),
3513
- y: z157.number().optional()
3604
+ center: z161.object({
3605
+ x: z161.number().optional(),
3606
+ y: z161.number().optional()
3514
3607
  }).optional(),
3515
- subcircuit_id: z157.string().optional()
3608
+ subcircuit_id: z161.string().optional()
3516
3609
  }).describe(
3517
3610
  "Error emitted when a via and trace are closer than the allowed clearance"
3518
3611
  );
@@ -3520,107 +3613,107 @@ expectTypesMatch(
3520
3613
  true
3521
3614
  );
3522
3615
  var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
3523
- type: z158.literal("pcb_pad_pad_clearance_error"),
3616
+ type: z162.literal("pcb_pad_pad_clearance_error"),
3524
3617
  pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
3525
3618
  "pcb_pad_pad_clearance_error"
3526
3619
  ),
3527
- error_type: z158.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
3528
- pcb_pad_ids: z158.array(z158.string()).min(2),
3620
+ error_type: z162.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
3621
+ pcb_pad_ids: z162.array(z162.string()).min(2),
3529
3622
  minimum_clearance: distance.optional(),
3530
3623
  actual_clearance: distance.optional(),
3531
- center: z158.object({
3532
- x: z158.number().optional(),
3533
- y: z158.number().optional()
3624
+ center: z162.object({
3625
+ x: z162.number().optional(),
3626
+ y: z162.number().optional()
3534
3627
  }).optional(),
3535
- subcircuit_id: z158.string().optional()
3628
+ subcircuit_id: z162.string().optional()
3536
3629
  }).describe("Error emitted when pads are closer than the allowed clearance");
3537
3630
  expectTypesMatch(true);
3538
3631
  var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
3539
- type: z159.literal("pcb_pad_trace_clearance_error"),
3632
+ type: z163.literal("pcb_pad_trace_clearance_error"),
3540
3633
  pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
3541
3634
  "pcb_pad_trace_clearance_error"
3542
3635
  ),
3543
- error_type: z159.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
3544
- pcb_pad_id: z159.string(),
3545
- pcb_trace_id: z159.string(),
3636
+ error_type: z163.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
3637
+ pcb_pad_id: z163.string(),
3638
+ pcb_trace_id: z163.string(),
3546
3639
  minimum_clearance: distance.optional(),
3547
3640
  actual_clearance: distance.optional(),
3548
- center: z159.object({
3549
- x: z159.number().optional(),
3550
- y: z159.number().optional()
3641
+ center: z163.object({
3642
+ x: z163.number().optional(),
3643
+ y: z163.number().optional()
3551
3644
  }).optional(),
3552
- subcircuit_id: z159.string().optional()
3645
+ subcircuit_id: z163.string().optional()
3553
3646
  }).describe(
3554
3647
  "Error emitted when a pad and trace are closer than allowed clearance"
3555
3648
  );
3556
3649
  expectTypesMatch(
3557
3650
  true
3558
3651
  );
3559
- var pcb_courtyard_rect = z160.object({
3560
- type: z160.literal("pcb_courtyard_rect"),
3652
+ var pcb_courtyard_rect = z164.object({
3653
+ type: z164.literal("pcb_courtyard_rect"),
3561
3654
  pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
3562
- pcb_component_id: z160.string(),
3563
- pcb_group_id: z160.string().optional(),
3564
- subcircuit_id: z160.string().optional(),
3655
+ pcb_component_id: z164.string(),
3656
+ pcb_group_id: z164.string().optional(),
3657
+ subcircuit_id: z164.string().optional(),
3565
3658
  center: point,
3566
3659
  width: length,
3567
3660
  height: length,
3568
3661
  layer: visible_layer,
3569
3662
  ccw_rotation: rotation.optional(),
3570
- color: z160.string().optional()
3663
+ color: z164.string().optional()
3571
3664
  }).describe("Defines a courtyard rectangle on the PCB");
3572
3665
  expectTypesMatch(true);
3573
- var pcb_courtyard_outline = z161.object({
3574
- type: z161.literal("pcb_courtyard_outline"),
3666
+ var pcb_courtyard_outline = z165.object({
3667
+ type: z165.literal("pcb_courtyard_outline"),
3575
3668
  pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
3576
3669
  "pcb_courtyard_outline"
3577
3670
  ),
3578
- pcb_component_id: z161.string(),
3579
- pcb_group_id: z161.string().optional(),
3580
- subcircuit_id: z161.string().optional(),
3671
+ pcb_component_id: z165.string(),
3672
+ pcb_group_id: z165.string().optional(),
3673
+ subcircuit_id: z165.string().optional(),
3581
3674
  layer: visible_layer,
3582
- outline: z161.array(point).min(2)
3675
+ outline: z165.array(point).min(2)
3583
3676
  }).describe("Defines a courtyard outline on the PCB");
3584
3677
  expectTypesMatch(true);
3585
- var pcb_courtyard_polygon = z162.object({
3586
- type: z162.literal("pcb_courtyard_polygon"),
3678
+ var pcb_courtyard_polygon = z166.object({
3679
+ type: z166.literal("pcb_courtyard_polygon"),
3587
3680
  pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
3588
3681
  "pcb_courtyard_polygon"
3589
3682
  ),
3590
- pcb_component_id: z162.string(),
3591
- pcb_group_id: z162.string().optional(),
3592
- subcircuit_id: z162.string().optional(),
3683
+ pcb_component_id: z166.string(),
3684
+ pcb_group_id: z166.string().optional(),
3685
+ subcircuit_id: z166.string().optional(),
3593
3686
  layer: visible_layer,
3594
- points: z162.array(point).min(3),
3595
- color: z162.string().optional()
3687
+ points: z166.array(point).min(3),
3688
+ color: z166.string().optional()
3596
3689
  }).describe("Defines a courtyard polygon on the PCB");
3597
3690
  expectTypesMatch(true);
3598
- var pcb_courtyard_circle = z163.object({
3599
- type: z163.literal("pcb_courtyard_circle"),
3691
+ var pcb_courtyard_circle = z167.object({
3692
+ type: z167.literal("pcb_courtyard_circle"),
3600
3693
  pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
3601
3694
  "pcb_courtyard_circle"
3602
3695
  ),
3603
- pcb_component_id: z163.string(),
3604
- pcb_group_id: z163.string().optional(),
3605
- subcircuit_id: z163.string().optional(),
3696
+ pcb_component_id: z167.string(),
3697
+ pcb_group_id: z167.string().optional(),
3698
+ subcircuit_id: z167.string().optional(),
3606
3699
  center: point,
3607
3700
  radius: length,
3608
3701
  layer: visible_layer,
3609
- color: z163.string().optional()
3702
+ color: z167.string().optional()
3610
3703
  }).describe("Defines a courtyard circle on the PCB");
3611
3704
  expectTypesMatch(true);
3612
- var pcb_courtyard_pill = z164.object({
3613
- type: z164.literal("pcb_courtyard_pill"),
3705
+ var pcb_courtyard_pill = z168.object({
3706
+ type: z168.literal("pcb_courtyard_pill"),
3614
3707
  pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
3615
- pcb_component_id: z164.string(),
3616
- pcb_group_id: z164.string().optional(),
3617
- subcircuit_id: z164.string().optional(),
3708
+ pcb_component_id: z168.string(),
3709
+ pcb_group_id: z168.string().optional(),
3710
+ subcircuit_id: z168.string().optional(),
3618
3711
  center: point,
3619
3712
  width: length,
3620
3713
  height: length,
3621
3714
  radius: length,
3622
3715
  layer: visible_layer,
3623
- color: z164.string().optional()
3716
+ color: z168.string().optional()
3624
3717
  }).describe("Defines a courtyard pill on the PCB");
3625
3718
  expectTypesMatch(true);
3626
3719
  var cad_model_formats = [
@@ -3649,46 +3742,46 @@ var cadModelDefaultDirectionMap = {
3649
3742
  step: "z+",
3650
3743
  wrl: "y+"
3651
3744
  };
3652
- var cad_component = z165.object({
3653
- type: z165.literal("cad_component"),
3654
- cad_component_id: z165.string(),
3655
- pcb_component_id: z165.string(),
3656
- source_component_id: z165.string(),
3745
+ var cad_component = z169.object({
3746
+ type: z169.literal("cad_component"),
3747
+ cad_component_id: z169.string(),
3748
+ pcb_component_id: z169.string(),
3749
+ source_component_id: z169.string(),
3657
3750
  position: point3,
3658
3751
  rotation: point3.optional(),
3659
3752
  size: point3.optional(),
3660
3753
  layer: layer_ref.optional(),
3661
- subcircuit_id: z165.string().optional(),
3754
+ subcircuit_id: z169.string().optional(),
3662
3755
  // These are all ways to generate/load the 3d model
3663
- footprinter_string: z165.string().optional(),
3664
- model_obj_url: z165.string().optional(),
3665
- model_stl_url: z165.string().optional(),
3666
- model_3mf_url: z165.string().optional(),
3667
- model_gltf_url: z165.string().optional(),
3668
- model_glb_url: z165.string().optional(),
3669
- model_step_url: z165.string().optional(),
3670
- model_wrl_url: z165.string().optional(),
3756
+ footprinter_string: z169.string().optional(),
3757
+ model_obj_url: z169.string().optional(),
3758
+ model_stl_url: z169.string().optional(),
3759
+ model_3mf_url: z169.string().optional(),
3760
+ model_gltf_url: z169.string().optional(),
3761
+ model_glb_url: z169.string().optional(),
3762
+ model_step_url: z169.string().optional(),
3763
+ model_wrl_url: z169.string().optional(),
3671
3764
  model_asset: asset.optional(),
3672
- model_unit_to_mm_scale_factor: z165.number().optional(),
3673
- model_board_normal_direction: z165.enum(cad_model_axis_directions).optional().describe(
3765
+ model_unit_to_mm_scale_factor: z169.number().optional(),
3766
+ model_board_normal_direction: z169.enum(cad_model_axis_directions).optional().describe(
3674
3767
  `The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
3675
3768
  ),
3676
3769
  model_origin_position: point3.optional(),
3677
- model_origin_alignment: z165.enum([
3770
+ model_origin_alignment: z169.enum([
3678
3771
  "unknown",
3679
3772
  "center",
3680
3773
  "center_of_component_on_board_surface",
3681
3774
  "bottom_center_of_component"
3682
3775
  ]).optional(),
3683
- model_object_fit: z165.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
3684
- model_jscad: z165.any().optional(),
3685
- show_as_translucent_model: z165.boolean().optional(),
3686
- show_as_bounding_box: z165.boolean().optional(),
3687
- anchor_alignment: z165.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
3776
+ model_object_fit: z169.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
3777
+ model_jscad: z169.any().optional(),
3778
+ show_as_translucent_model: z169.boolean().optional(),
3779
+ show_as_bounding_box: z169.boolean().optional(),
3780
+ anchor_alignment: z169.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
3688
3781
  }).describe("Defines a component on the PCB");
3689
3782
  expectTypesMatch(true);
3690
- var wave_shape = z166.enum(["sinewave", "square", "triangle", "sawtooth"]);
3691
- var percentage = z166.union([z166.string(), z166.number()]).transform((val) => {
3783
+ var wave_shape = z170.enum(["sinewave", "square", "triangle", "sawtooth"]);
3784
+ var percentage = z170.union([z170.string(), z170.number()]).transform((val) => {
3692
3785
  if (typeof val === "string") {
3693
3786
  if (val.endsWith("%")) {
3694
3787
  return parseFloat(val.slice(0, -1)) / 100;
@@ -3697,30 +3790,32 @@ var percentage = z166.union([z166.string(), z166.number()]).transform((val) => {
3697
3790
  }
3698
3791
  return val;
3699
3792
  }).pipe(
3700
- z166.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3793
+ z170.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3701
3794
  );
3702
- var simulation_dc_voltage_source = z166.object({
3703
- type: z166.literal("simulation_voltage_source"),
3795
+ var simulation_dc_voltage_source = z170.object({
3796
+ type: z170.literal("simulation_voltage_source"),
3704
3797
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
3705
3798
  "simulation_voltage_source"
3706
3799
  ),
3707
- is_dc_source: z166.literal(true).optional().default(true),
3708
- positive_source_port_id: z166.string().optional(),
3709
- negative_source_port_id: z166.string().optional(),
3710
- positive_source_net_id: z166.string().optional(),
3711
- negative_source_net_id: z166.string().optional(),
3712
- voltage
3800
+ is_dc_source: z170.literal(true).optional().default(true),
3801
+ positive_source_port_id: z170.string().optional(),
3802
+ negative_source_port_id: z170.string().optional(),
3803
+ positive_source_net_id: z170.string().optional(),
3804
+ negative_source_net_id: z170.string().optional(),
3805
+ voltage,
3806
+ ac_magnitude: voltage.optional(),
3807
+ ac_phase: rotation.optional()
3713
3808
  }).describe("Defines a DC voltage source for simulation");
3714
- var simulation_ac_voltage_source = z166.object({
3715
- type: z166.literal("simulation_voltage_source"),
3809
+ var simulation_ac_voltage_source = z170.object({
3810
+ type: z170.literal("simulation_voltage_source"),
3716
3811
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
3717
3812
  "simulation_voltage_source"
3718
3813
  ),
3719
- is_dc_source: z166.literal(false),
3720
- terminal1_source_port_id: z166.string().optional(),
3721
- terminal2_source_port_id: z166.string().optional(),
3722
- terminal1_source_net_id: z166.string().optional(),
3723
- terminal2_source_net_id: z166.string().optional(),
3814
+ is_dc_source: z170.literal(false),
3815
+ terminal1_source_port_id: z170.string().optional(),
3816
+ terminal2_source_port_id: z170.string().optional(),
3817
+ terminal1_source_net_id: z170.string().optional(),
3818
+ terminal2_source_net_id: z170.string().optional(),
3724
3819
  voltage: voltage.optional(),
3725
3820
  frequency: frequency.optional(),
3726
3821
  peak_to_peak_voltage: voltage.optional(),
@@ -3731,13 +3826,15 @@ var simulation_ac_voltage_source = z166.object({
3731
3826
  rise_time: ms.optional(),
3732
3827
  fall_time: ms.optional(),
3733
3828
  pulse_width: ms.optional(),
3734
- period: ms.optional()
3829
+ period: ms.optional(),
3830
+ ac_magnitude: voltage.optional(),
3831
+ ac_phase: rotation.optional()
3735
3832
  }).describe("Defines an AC voltage source for simulation");
3736
- var simulation_voltage_source = z166.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
3833
+ var simulation_voltage_source = z170.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
3737
3834
  expectTypesMatch(true);
3738
3835
  expectTypesMatch(true);
3739
3836
  expectTypesMatch(true);
3740
- var percentage2 = z167.union([z167.string(), z167.number()]).transform((val) => {
3837
+ var percentage2 = z171.union([z171.string(), z171.number()]).transform((val) => {
3741
3838
  if (typeof val === "string") {
3742
3839
  if (val.endsWith("%")) {
3743
3840
  return parseFloat(val.slice(0, -1)) / 100;
@@ -3746,123 +3843,217 @@ var percentage2 = z167.union([z167.string(), z167.number()]).transform((val) =>
3746
3843
  }
3747
3844
  return val;
3748
3845
  }).pipe(
3749
- z167.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3846
+ z171.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
3750
3847
  );
3751
- var simulation_dc_current_source = z167.object({
3752
- type: z167.literal("simulation_current_source"),
3848
+ var simulation_dc_current_source = z171.object({
3849
+ type: z171.literal("simulation_current_source"),
3753
3850
  simulation_current_source_id: getZodPrefixedIdWithDefault(
3754
3851
  "simulation_current_source"
3755
3852
  ),
3756
- is_dc_source: z167.literal(true).optional().default(true),
3757
- positive_source_port_id: z167.string().optional(),
3758
- negative_source_port_id: z167.string().optional(),
3759
- positive_source_net_id: z167.string().optional(),
3760
- negative_source_net_id: z167.string().optional(),
3761
- current
3853
+ is_dc_source: z171.literal(true).optional().default(true),
3854
+ positive_source_port_id: z171.string().optional(),
3855
+ negative_source_port_id: z171.string().optional(),
3856
+ positive_source_net_id: z171.string().optional(),
3857
+ negative_source_net_id: z171.string().optional(),
3858
+ current,
3859
+ ac_magnitude: current.optional(),
3860
+ ac_phase: rotation.optional()
3762
3861
  }).describe("Defines a DC current source for simulation");
3763
- var simulation_ac_current_source = z167.object({
3764
- type: z167.literal("simulation_current_source"),
3862
+ var simulation_ac_current_source = z171.object({
3863
+ type: z171.literal("simulation_current_source"),
3765
3864
  simulation_current_source_id: getZodPrefixedIdWithDefault(
3766
3865
  "simulation_current_source"
3767
3866
  ),
3768
- is_dc_source: z167.literal(false),
3769
- terminal1_source_port_id: z167.string().optional(),
3770
- terminal2_source_port_id: z167.string().optional(),
3771
- terminal1_source_net_id: z167.string().optional(),
3772
- terminal2_source_net_id: z167.string().optional(),
3867
+ is_dc_source: z171.literal(false),
3868
+ terminal1_source_port_id: z171.string().optional(),
3869
+ terminal2_source_port_id: z171.string().optional(),
3870
+ terminal1_source_net_id: z171.string().optional(),
3871
+ terminal2_source_net_id: z171.string().optional(),
3773
3872
  current: current.optional(),
3774
3873
  frequency: frequency.optional(),
3775
3874
  peak_to_peak_current: current.optional(),
3776
3875
  wave_shape: wave_shape.optional(),
3777
3876
  phase: rotation.optional(),
3778
- duty_cycle: percentage2.optional()
3877
+ duty_cycle: percentage2.optional(),
3878
+ ac_magnitude: current.optional(),
3879
+ ac_phase: rotation.optional()
3779
3880
  }).describe("Defines an AC current source for simulation");
3780
- var simulation_current_source = z167.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
3881
+ var simulation_current_source = z171.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
3781
3882
  expectTypesMatch(true);
3782
3883
  expectTypesMatch(true);
3783
3884
  expectTypesMatch(true);
3784
- var experiment_type = z168.union([
3785
- z168.literal("spice_dc_sweep"),
3786
- z168.literal("spice_dc_operating_point"),
3787
- z168.literal("spice_transient_analysis"),
3788
- z168.literal("spice_ac_analysis")
3885
+ var simulation_dc_sweep_unit = z172.custom(
3886
+ (dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
3887
+ );
3888
+ var simulation_parameter_unit = z172.custom(
3889
+ (parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
3890
+ );
3891
+ var experiment_type = z173.union([
3892
+ z173.literal("spice_dc_sweep"),
3893
+ z173.literal("spice_dc_operating_point"),
3894
+ z173.literal("spice_transient_analysis"),
3895
+ z173.literal("spice_ac_analysis")
3789
3896
  ]);
3790
- var spice_simulation_options = z168.object({
3791
- method: z168.enum(["trap", "gear"]).optional(),
3792
- reltol: z168.union([z168.number(), z168.string()]).optional(),
3793
- abstol: z168.union([z168.number(), z168.string()]).optional(),
3794
- vntol: z168.union([z168.number(), z168.string()]).optional()
3897
+ var spice_simulation_options = z173.object({
3898
+ method: z173.enum(["trap", "gear"]).optional(),
3899
+ reltol: z173.union([z173.number(), z173.string()]).optional(),
3900
+ abstol: z173.union([z173.number(), z173.string()]).optional(),
3901
+ vntol: z173.union([z173.number(), z173.string()]).optional()
3795
3902
  }).describe("SPICE solver options for a simulation experiment");
3796
- var simulation_experiment = z168.object({
3797
- type: z168.literal("simulation_experiment"),
3903
+ var simulation_experiment = z173.object({
3904
+ type: z173.literal("simulation_experiment"),
3798
3905
  simulation_experiment_id: getZodPrefixedIdWithDefault(
3799
3906
  "simulation_experiment"
3800
3907
  ),
3801
- name: z168.string(),
3908
+ name: z173.string(),
3802
3909
  experiment_type,
3803
3910
  time_per_step: duration_ms.optional(),
3804
3911
  start_time_ms: ms.optional(),
3805
3912
  end_time_ms: ms.optional(),
3806
- spice_options: spice_simulation_options.optional()
3913
+ spice_options: spice_simulation_options.optional(),
3914
+ dc_sweep_voltage_source_id: z173.string().optional(),
3915
+ dc_sweep_current_source_id: z173.string().optional(),
3916
+ dc_sweep_start: z173.number().optional(),
3917
+ dc_sweep_stop: z173.number().optional(),
3918
+ dc_sweep_step: z173.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
3919
+ dc_sweep_unit: simulation_dc_sweep_unit.optional(),
3920
+ ac_sweep_type: z173.enum(["linear", "decade", "octave"]).optional(),
3921
+ ac_samples_per_interval: z173.number().int().positive().optional(),
3922
+ ac_sample_count: z173.number().int().positive().optional(),
3923
+ ac_start_frequency_hz: z173.number().positive().optional(),
3924
+ ac_stop_frequency_hz: z173.number().positive().optional()
3925
+ }).superRefine((experiment, context) => {
3926
+ if (experiment.experiment_type === "spice_dc_sweep") {
3927
+ const requiredFields = [
3928
+ "dc_sweep_start",
3929
+ "dc_sweep_stop",
3930
+ "dc_sweep_step",
3931
+ "dc_sweep_unit"
3932
+ ];
3933
+ for (const field of requiredFields) {
3934
+ if (experiment[field] === void 0) {
3935
+ context.addIssue({
3936
+ code: z173.ZodIssueCode.custom,
3937
+ path: [field],
3938
+ message: `${field} is required for a DC sweep`
3939
+ });
3940
+ }
3941
+ }
3942
+ const hasVoltageSource = experiment.dc_sweep_voltage_source_id !== void 0;
3943
+ const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
3944
+ if (hasVoltageSource === hasCurrentSource) {
3945
+ context.addIssue({
3946
+ code: z173.ZodIssueCode.custom,
3947
+ path: ["dc_sweep_voltage_source_id"],
3948
+ message: "Exactly one DC sweep voltage or current source ID is required"
3949
+ });
3950
+ }
3951
+ }
3952
+ if (experiment.experiment_type === "spice_ac_analysis") {
3953
+ if (experiment.ac_sweep_type === void 0) {
3954
+ context.addIssue({
3955
+ code: z173.ZodIssueCode.custom,
3956
+ path: ["ac_sweep_type"],
3957
+ message: "ac_sweep_type is required for an AC analysis"
3958
+ });
3959
+ }
3960
+ if (experiment.ac_start_frequency_hz === void 0) {
3961
+ context.addIssue({
3962
+ code: z173.ZodIssueCode.custom,
3963
+ path: ["ac_start_frequency_hz"],
3964
+ message: "ac_start_frequency_hz is required for an AC analysis"
3965
+ });
3966
+ }
3967
+ if (experiment.ac_stop_frequency_hz === void 0) {
3968
+ context.addIssue({
3969
+ code: z173.ZodIssueCode.custom,
3970
+ path: ["ac_stop_frequency_hz"],
3971
+ message: "ac_stop_frequency_hz is required for an AC analysis"
3972
+ });
3973
+ }
3974
+ if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
3975
+ context.addIssue({
3976
+ code: z173.ZodIssueCode.custom,
3977
+ path: ["ac_sample_count"],
3978
+ message: "ac_sample_count is required for a linear AC analysis"
3979
+ });
3980
+ }
3981
+ if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
3982
+ context.addIssue({
3983
+ code: z173.ZodIssueCode.custom,
3984
+ path: ["ac_samples_per_interval"],
3985
+ message: "ac_samples_per_interval is required for decade and octave AC analyses"
3986
+ });
3987
+ }
3988
+ }
3807
3989
  }).describe("Defines a simulation experiment configuration");
3808
3990
  expectTypesMatch(true);
3809
- var simulation_transient_voltage_graph = z169.object({
3810
- type: z169.literal("simulation_transient_voltage_graph"),
3991
+ var simulation_parameter_sweep_coordinate = z174.object({
3992
+ simulation_parameter_sweep_id: z174.string(),
3993
+ sweep_index: z174.number().int().nonnegative(),
3994
+ parameter_value: z174.number(),
3995
+ parameter_unit: simulation_parameter_unit
3996
+ });
3997
+ expectTypesMatch(true);
3998
+ var simulation_transient_voltage_graph = z175.object({
3999
+ type: z175.literal("simulation_transient_voltage_graph"),
3811
4000
  simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
3812
4001
  "simulation_transient_voltage_graph"
3813
4002
  ),
3814
- simulation_experiment_id: z169.string(),
3815
- timestamps_ms: z169.array(z169.number()).optional(),
3816
- voltage_levels: z169.array(z169.number()),
3817
- source_component_id: z169.string().optional(),
3818
- subcircuit_connectivity_map_key: z169.string().optional(),
4003
+ simulation_experiment_id: z175.string(),
4004
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4005
+ timestamps_ms: z175.array(z175.number()).optional(),
4006
+ voltage_levels: z175.array(z175.number()),
4007
+ source_component_id: z175.string().optional(),
4008
+ subcircuit_connectivity_map_key: z175.string().optional(),
3819
4009
  time_per_step: duration_ms,
3820
4010
  start_time_ms: ms,
3821
4011
  end_time_ms: ms,
3822
- name: z169.string().optional(),
3823
- color: z169.string().optional()
4012
+ name: z175.string().optional(),
4013
+ color: z175.string().optional()
3824
4014
  }).describe("Stores voltage measurements over time for a simulation");
3825
4015
  expectTypesMatch(true);
3826
- var simulation_transient_current_graph = z170.object({
3827
- type: z170.literal("simulation_transient_current_graph"),
4016
+ var simulation_transient_current_graph = z176.object({
4017
+ type: z176.literal("simulation_transient_current_graph"),
3828
4018
  simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
3829
4019
  "simulation_transient_current_graph"
3830
4020
  ),
3831
- simulation_experiment_id: z170.string(),
3832
- timestamps_ms: z170.array(z170.number()).optional(),
3833
- current_levels: z170.array(z170.number()),
3834
- source_component_id: z170.string().optional(),
3835
- subcircuit_connectivity_map_key: z170.string().optional(),
4021
+ simulation_experiment_id: z176.string(),
4022
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4023
+ timestamps_ms: z176.array(z176.number()).optional(),
4024
+ current_levels: z176.array(z176.number()),
4025
+ source_component_id: z176.string().optional(),
4026
+ subcircuit_connectivity_map_key: z176.string().optional(),
3836
4027
  time_per_step: duration_ms,
3837
4028
  start_time_ms: ms,
3838
4029
  end_time_ms: ms,
3839
- name: z170.string().optional(),
3840
- color: z170.string().optional()
4030
+ name: z176.string().optional(),
4031
+ color: z176.string().optional()
3841
4032
  }).describe("Stores current measurements over time for a simulation");
3842
4033
  expectTypesMatch(true);
3843
- var simulation_switch = z171.object({
3844
- type: z171.literal("simulation_switch"),
4034
+ var simulation_switch = z177.object({
4035
+ type: z177.literal("simulation_switch"),
3845
4036
  simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
3846
- source_component_id: z171.string().optional(),
4037
+ source_component_id: z177.string().optional(),
3847
4038
  closes_at: ms.optional(),
3848
4039
  opens_at: ms.optional(),
3849
- starts_closed: z171.boolean().optional(),
4040
+ starts_closed: z177.boolean().optional(),
3850
4041
  switching_frequency: frequency.optional()
3851
4042
  }).describe("Defines a switch for simulation timing control");
3852
4043
  expectTypesMatch(true);
3853
- var simulation_voltage_probe = z172.object({
3854
- type: z172.literal("simulation_voltage_probe"),
4044
+ var simulation_voltage_probe = z178.object({
4045
+ type: z178.literal("simulation_voltage_probe"),
3855
4046
  simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
3856
4047
  "simulation_voltage_probe"
3857
4048
  ),
3858
- source_component_id: z172.string().optional(),
3859
- name: z172.string().optional(),
3860
- signal_input_source_port_id: z172.string().optional(),
3861
- signal_input_source_net_id: z172.string().optional(),
3862
- reference_input_source_port_id: z172.string().optional(),
3863
- reference_input_source_net_id: z172.string().optional(),
3864
- subcircuit_id: z172.string().optional(),
3865
- color: z172.string().optional()
4049
+ source_component_id: z178.string().optional(),
4050
+ name: z178.string().optional(),
4051
+ signal_input_source_port_id: z178.string().optional(),
4052
+ signal_input_source_net_id: z178.string().optional(),
4053
+ reference_input_source_port_id: z178.string().optional(),
4054
+ reference_input_source_net_id: z178.string().optional(),
4055
+ subcircuit_id: z178.string().optional(),
4056
+ color: z178.string().optional()
3866
4057
  }).describe(
3867
4058
  "Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
3868
4059
  ).superRefine((data, ctx) => {
@@ -3872,20 +4063,20 @@ var simulation_voltage_probe = z172.object({
3872
4063
  const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
3873
4064
  if (has_ports && has_nets) {
3874
4065
  ctx.addIssue({
3875
- code: z172.ZodIssueCode.custom,
4066
+ code: z178.ZodIssueCode.custom,
3876
4067
  message: "Cannot mix port and net connections in a differential probe."
3877
4068
  });
3878
4069
  } else if (has_ports) {
3879
4070
  if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
3880
4071
  ctx.addIssue({
3881
- code: z172.ZodIssueCode.custom,
4072
+ code: z178.ZodIssueCode.custom,
3882
4073
  message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
3883
4074
  });
3884
4075
  }
3885
4076
  } else if (has_nets) {
3886
4077
  if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
3887
4078
  ctx.addIssue({
3888
- code: z172.ZodIssueCode.custom,
4079
+ code: z178.ZodIssueCode.custom,
3889
4080
  message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
3890
4081
  });
3891
4082
  }
@@ -3893,26 +4084,26 @@ var simulation_voltage_probe = z172.object({
3893
4084
  } else {
3894
4085
  if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
3895
4086
  ctx.addIssue({
3896
- code: z172.ZodIssueCode.custom,
4087
+ code: z178.ZodIssueCode.custom,
3897
4088
  message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
3898
4089
  });
3899
4090
  }
3900
4091
  }
3901
4092
  });
3902
4093
  expectTypesMatch(true);
3903
- var simulation_current_probe = z173.object({
3904
- type: z173.literal("simulation_current_probe"),
4094
+ var simulation_current_probe = z179.object({
4095
+ type: z179.literal("simulation_current_probe"),
3905
4096
  simulation_current_probe_id: getZodPrefixedIdWithDefault(
3906
4097
  "simulation_current_probe"
3907
4098
  ),
3908
- source_component_id: z173.string().optional(),
3909
- name: z173.string().optional(),
3910
- positive_source_port_id: z173.string().optional(),
3911
- negative_source_port_id: z173.string().optional(),
3912
- positive_source_net_id: z173.string().optional(),
3913
- negative_source_net_id: z173.string().optional(),
3914
- subcircuit_id: z173.string().optional(),
3915
- color: z173.string().optional()
4099
+ source_component_id: z179.string().optional(),
4100
+ name: z179.string().optional(),
4101
+ positive_source_port_id: z179.string().optional(),
4102
+ negative_source_port_id: z179.string().optional(),
4103
+ positive_source_net_id: z179.string().optional(),
4104
+ negative_source_net_id: z179.string().optional(),
4105
+ subcircuit_id: z179.string().optional(),
4106
+ color: z179.string().optional()
3916
4107
  }).describe(
3917
4108
  "Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
3918
4109
  ).superRefine((data, ctx) => {
@@ -3924,7 +4115,7 @@ var simulation_current_probe = z173.object({
3924
4115
  const hasNets = hasPositiveNet || hasNegativeNet;
3925
4116
  if (hasPorts && hasNets) {
3926
4117
  ctx.addIssue({
3927
- code: z173.ZodIssueCode.custom,
4118
+ code: z179.ZodIssueCode.custom,
3928
4119
  message: "Cannot mix port and net connections in a current probe."
3929
4120
  });
3930
4121
  return;
@@ -3932,7 +4123,7 @@ var simulation_current_probe = z173.object({
3932
4123
  if (hasPorts) {
3933
4124
  if (!hasPositivePort || !hasNegativePort) {
3934
4125
  ctx.addIssue({
3935
- code: z173.ZodIssueCode.custom,
4126
+ code: z179.ZodIssueCode.custom,
3936
4127
  message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
3937
4128
  });
3938
4129
  }
@@ -3941,67 +4132,218 @@ var simulation_current_probe = z173.object({
3941
4132
  if (hasNets) {
3942
4133
  if (!hasPositiveNet || !hasNegativeNet) {
3943
4134
  ctx.addIssue({
3944
- code: z173.ZodIssueCode.custom,
4135
+ code: z179.ZodIssueCode.custom,
3945
4136
  message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
3946
4137
  });
3947
4138
  }
3948
4139
  return;
3949
4140
  }
3950
4141
  ctx.addIssue({
3951
- code: z173.ZodIssueCode.custom,
4142
+ code: z179.ZodIssueCode.custom,
3952
4143
  message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
3953
4144
  });
3954
4145
  });
3955
4146
  expectTypesMatch(true);
3956
4147
  var simulation_unknown_experiment_error = base_circuit_json_error.extend({
3957
- type: z174.literal("simulation_unknown_experiment_error"),
4148
+ type: z180.literal("simulation_unknown_experiment_error"),
3958
4149
  simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
3959
4150
  "simulation_unknown_experiment_error"
3960
4151
  ),
3961
- error_type: z174.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
3962
- simulation_experiment_id: z174.string().optional(),
3963
- subcircuit_id: z174.string().optional()
4152
+ error_type: z180.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
4153
+ simulation_experiment_id: z180.string().optional(),
4154
+ subcircuit_id: z180.string().optional()
3964
4155
  }).describe("An unknown error occurred during the simulation experiment.");
3965
4156
  expectTypesMatch(true);
3966
- var simulation_op_amp = z175.object({
3967
- type: z175.literal("simulation_op_amp"),
4157
+ var simulation_parameter_type = z181.enum([
4158
+ "resistance",
4159
+ "capacitance",
4160
+ "inductance",
4161
+ "voltage",
4162
+ "current"
4163
+ ]);
4164
+ var simulation_parameter_sweep_base = z181.object({
4165
+ type: z181.literal("simulation_parameter_sweep"),
4166
+ simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
4167
+ "simulation_parameter_sweep"
4168
+ ),
4169
+ simulation_experiment_id: z181.string(),
4170
+ name: z181.string().optional(),
4171
+ parameter_values: z181.array(z181.number()).min(1),
4172
+ parameter_unit: simulation_parameter_unit
4173
+ });
4174
+ var simulation_parameter_sweep = z181.discriminatedUnion("parameter_type", [
4175
+ simulation_parameter_sweep_base.extend({
4176
+ parameter_type: z181.literal("resistance"),
4177
+ resistor_source_component_id: z181.string()
4178
+ }),
4179
+ simulation_parameter_sweep_base.extend({
4180
+ parameter_type: z181.literal("capacitance"),
4181
+ capacitor_source_component_id: z181.string()
4182
+ }),
4183
+ simulation_parameter_sweep_base.extend({
4184
+ parameter_type: z181.literal("inductance"),
4185
+ inductor_source_component_id: z181.string()
4186
+ }),
4187
+ simulation_parameter_sweep_base.extend({
4188
+ parameter_type: z181.literal("voltage"),
4189
+ source_net_id: z181.string()
4190
+ }),
4191
+ simulation_parameter_sweep_base.extend({
4192
+ parameter_type: z181.literal("current"),
4193
+ current_source_component_id: z181.string()
4194
+ })
4195
+ ]).describe("Repeats a simulation experiment over component parameter values");
4196
+ expectTypesMatch(
4197
+ true
4198
+ );
4199
+ var simulation_dc_operating_point_voltage = z182.object({
4200
+ type: z182.literal("simulation_dc_operating_point_voltage"),
4201
+ simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
4202
+ "simulation_dc_operating_point_voltage"
4203
+ ),
4204
+ simulation_experiment_id: z182.string(),
4205
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4206
+ simulation_voltage_probe_id: z182.string(),
4207
+ voltage: z182.number(),
4208
+ name: z182.string().optional(),
4209
+ color: z182.string().optional()
4210
+ });
4211
+ expectTypesMatch(true);
4212
+ var simulation_dc_operating_point_current = z183.object({
4213
+ type: z183.literal("simulation_dc_operating_point_current"),
4214
+ simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
4215
+ "simulation_dc_operating_point_current"
4216
+ ),
4217
+ simulation_experiment_id: z183.string(),
4218
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4219
+ simulation_current_probe_id: z183.string(),
4220
+ current: z183.number(),
4221
+ name: z183.string().optional(),
4222
+ color: z183.string().optional()
4223
+ });
4224
+ expectTypesMatch(true);
4225
+ var simulation_dc_sweep_voltage_graph = z184.object({
4226
+ type: z184.literal("simulation_dc_sweep_voltage_graph"),
4227
+ simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
4228
+ "simulation_dc_sweep_voltage_graph"
4229
+ ),
4230
+ simulation_experiment_id: z184.string(),
4231
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4232
+ simulation_voltage_probe_id: z184.string(),
4233
+ sweep_values: z184.array(z184.number()),
4234
+ sweep_unit: simulation_dc_sweep_unit,
4235
+ voltage_levels: z184.array(z184.number()),
4236
+ name: z184.string().optional(),
4237
+ color: z184.string().optional()
4238
+ }).refine(
4239
+ (graph) => graph.sweep_values.length === graph.voltage_levels.length,
4240
+ {
4241
+ message: "sweep_values and voltage_levels must have the same length"
4242
+ }
4243
+ );
4244
+ expectTypesMatch(true);
4245
+ var simulation_dc_sweep_current_graph = z185.object({
4246
+ type: z185.literal("simulation_dc_sweep_current_graph"),
4247
+ simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
4248
+ "simulation_dc_sweep_current_graph"
4249
+ ),
4250
+ simulation_experiment_id: z185.string(),
4251
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4252
+ simulation_current_probe_id: z185.string(),
4253
+ sweep_values: z185.array(z185.number()),
4254
+ sweep_unit: simulation_dc_sweep_unit,
4255
+ current_levels: z185.array(z185.number()),
4256
+ name: z185.string().optional(),
4257
+ color: z185.string().optional()
4258
+ }).refine(
4259
+ (graph) => graph.sweep_values.length === graph.current_levels.length,
4260
+ {
4261
+ message: "sweep_values and current_levels must have the same length"
4262
+ }
4263
+ );
4264
+ expectTypesMatch(true);
4265
+ var simulation_complex_sample = z186.object({
4266
+ re: z186.number(),
4267
+ im: z186.number()
4268
+ });
4269
+ expectTypesMatch(true);
4270
+ var simulation_ac_sweep_voltage_graph = z187.object({
4271
+ type: z187.literal("simulation_ac_sweep_voltage_graph"),
4272
+ simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
4273
+ "simulation_ac_sweep_voltage_graph"
4274
+ ),
4275
+ simulation_experiment_id: z187.string(),
4276
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4277
+ simulation_voltage_probe_id: z187.string(),
4278
+ frequencies_hz: z187.array(z187.number()),
4279
+ complex_voltages: z187.array(simulation_complex_sample),
4280
+ name: z187.string().optional(),
4281
+ color: z187.string().optional()
4282
+ }).refine(
4283
+ (graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
4284
+ {
4285
+ message: "frequencies_hz and complex_voltages must have the same length"
4286
+ }
4287
+ );
4288
+ expectTypesMatch(true);
4289
+ var simulation_ac_sweep_current_graph = z188.object({
4290
+ type: z188.literal("simulation_ac_sweep_current_graph"),
4291
+ simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
4292
+ "simulation_ac_sweep_current_graph"
4293
+ ),
4294
+ simulation_experiment_id: z188.string(),
4295
+ simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4296
+ simulation_current_probe_id: z188.string(),
4297
+ frequencies_hz: z188.array(z188.number()),
4298
+ complex_currents: z188.array(simulation_complex_sample),
4299
+ name: z188.string().optional(),
4300
+ color: z188.string().optional()
4301
+ }).refine(
4302
+ (graph) => graph.frequencies_hz.length === graph.complex_currents.length,
4303
+ {
4304
+ message: "frequencies_hz and complex_currents must have the same length"
4305
+ }
4306
+ );
4307
+ expectTypesMatch(true);
4308
+ var simulation_op_amp = z189.object({
4309
+ type: z189.literal("simulation_op_amp"),
3968
4310
  simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
3969
- source_component_id: z175.string().optional(),
3970
- inverting_input_source_port_id: z175.string(),
3971
- non_inverting_input_source_port_id: z175.string(),
3972
- output_source_port_id: z175.string(),
3973
- positive_supply_source_port_id: z175.string(),
3974
- negative_supply_source_port_id: z175.string()
4311
+ source_component_id: z189.string().optional(),
4312
+ inverting_input_source_port_id: z189.string(),
4313
+ non_inverting_input_source_port_id: z189.string(),
4314
+ output_source_port_id: z189.string(),
4315
+ positive_supply_source_port_id: z189.string(),
4316
+ negative_supply_source_port_id: z189.string()
3975
4317
  }).describe("Defines a simple ideal operational amplifier for simulation");
3976
4318
  expectTypesMatch(true);
3977
- var simulation_spice_subcircuit = z176.object({
3978
- type: z176.literal("simulation_spice_subcircuit"),
4319
+ var simulation_spice_subcircuit = z190.object({
4320
+ type: z190.literal("simulation_spice_subcircuit"),
3979
4321
  simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
3980
4322
  "simulation_spice_subcircuit"
3981
4323
  ),
3982
- source_component_id: z176.string(),
3983
- spice_pin_to_source_port_map: z176.record(z176.string(), z176.string()),
3984
- subcircuit_source: z176.string()
4324
+ source_component_id: z190.string(),
4325
+ spice_pin_to_source_port_map: z190.record(z190.string(), z190.string()),
4326
+ subcircuit_source: z190.string()
3985
4327
  }).describe("Defines a custom SPICE subcircuit model for simulation");
3986
4328
  expectTypesMatch(
3987
4329
  true
3988
4330
  );
3989
4331
  var hasValue = (value) => value !== void 0;
3990
- var simulation_oscilloscope_trace = z177.object({
3991
- type: z177.literal("simulation_oscilloscope_trace"),
4332
+ var simulation_oscilloscope_trace = z191.object({
4333
+ type: z191.literal("simulation_oscilloscope_trace"),
3992
4334
  simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
3993
4335
  "simulation_oscilloscope_trace"
3994
4336
  ),
3995
- simulation_transient_voltage_graph_id: z177.string().optional(),
3996
- simulation_transient_current_graph_id: z177.string().optional(),
3997
- simulation_voltage_probe_id: z177.string().optional(),
3998
- simulation_current_probe_id: z177.string().optional(),
3999
- display_name: z177.string().optional(),
4000
- color: z177.string().optional(),
4001
- display_center_value: z177.number().optional(),
4002
- display_center_offset_divs: z177.number().optional(),
4003
- volts_per_div: z177.number().positive().optional(),
4004
- amps_per_div: z177.number().positive().optional()
4337
+ simulation_transient_voltage_graph_id: z191.string().optional(),
4338
+ simulation_transient_current_graph_id: z191.string().optional(),
4339
+ simulation_voltage_probe_id: z191.string().optional(),
4340
+ simulation_current_probe_id: z191.string().optional(),
4341
+ display_name: z191.string().optional(),
4342
+ color: z191.string().optional(),
4343
+ display_center_value: z191.number().optional(),
4344
+ display_center_offset_divs: z191.number().optional(),
4345
+ volts_per_div: z191.number().positive().optional(),
4346
+ amps_per_div: z191.number().positive().optional()
4005
4347
  }).describe(
4006
4348
  "Defines how a simulation measurement is rendered as an oscilloscope-style trace."
4007
4349
  ).superRefine((data, ctx) => {
@@ -4015,25 +4357,25 @@ var simulation_oscilloscope_trace = z177.object({
4015
4357
  ].filter(hasValue).length;
4016
4358
  if (voltageReferences + currentReferences !== 1) {
4017
4359
  ctx.addIssue({
4018
- code: z177.ZodIssueCode.custom,
4360
+ code: z191.ZodIssueCode.custom,
4019
4361
  message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
4020
4362
  });
4021
4363
  }
4022
4364
  if (voltageReferences > 0 && data.amps_per_div !== void 0) {
4023
4365
  ctx.addIssue({
4024
- code: z177.ZodIssueCode.custom,
4366
+ code: z191.ZodIssueCode.custom,
4025
4367
  message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
4026
4368
  });
4027
4369
  }
4028
4370
  if (currentReferences > 0 && data.volts_per_div !== void 0) {
4029
4371
  ctx.addIssue({
4030
- code: z177.ZodIssueCode.custom,
4372
+ code: z191.ZodIssueCode.custom,
4031
4373
  message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
4032
4374
  });
4033
4375
  }
4034
4376
  });
4035
4377
  expectTypesMatch(true);
4036
- var any_circuit_element = z178.union([
4378
+ var any_circuit_element = z192.union([
4037
4379
  source_trace,
4038
4380
  source_port,
4039
4381
  source_component_internal_connection,
@@ -4092,6 +4434,7 @@ var any_circuit_element = z178.union([
4092
4434
  pcb_text,
4093
4435
  pcb_trace,
4094
4436
  pcb_trace_warning,
4437
+ pcb_trace_too_long_warning,
4095
4438
  pcb_via,
4096
4439
  pcb_smtpad,
4097
4440
  pcb_solder_paste,
@@ -4111,6 +4454,7 @@ var any_circuit_element = z178.union([
4111
4454
  pcb_trace_error,
4112
4455
  pcb_trace_missing_error,
4113
4456
  pcb_placement_error,
4457
+ pcb_packing_error,
4114
4458
  pcb_panelization_placement_error,
4115
4459
  pcb_port_not_matched_error,
4116
4460
  pcb_port_not_connected_error,
@@ -4161,6 +4505,8 @@ var any_circuit_element = z178.union([
4161
4505
  schematic_debug_object,
4162
4506
  schematic_voltage_probe,
4163
4507
  schematic_manual_edit_conflict_warning,
4508
+ schematic_component_overlap_warning,
4509
+ schematic_element_outside_sheet_warning,
4164
4510
  schematic_group,
4165
4511
  schematic_sheet,
4166
4512
  schematic_table,
@@ -4171,6 +4517,13 @@ var any_circuit_element = z178.union([
4171
4517
  simulation_experiment,
4172
4518
  simulation_transient_voltage_graph,
4173
4519
  simulation_transient_current_graph,
4520
+ simulation_dc_operating_point_voltage,
4521
+ simulation_dc_operating_point_current,
4522
+ simulation_dc_sweep_voltage_graph,
4523
+ simulation_dc_sweep_current_graph,
4524
+ simulation_ac_sweep_voltage_graph,
4525
+ simulation_ac_sweep_current_graph,
4526
+ simulation_parameter_sweep,
4174
4527
  simulation_switch,
4175
4528
  simulation_voltage_probe,
4176
4529
  simulation_current_probe,
@@ -5386,7 +5739,7 @@ var transformPCBElements = (elms, matrix) => {
5386
5739
  let transformedElms = elms.map((elm) => transformPCBElement(elm, matrix));
5387
5740
  if (flipPadWidthHeight) {
5388
5741
  transformedElms = transformedElms.map((elm) => {
5389
- if (elm.type === "pcb_smtpad" && elm.shape === "rect") {
5742
+ if (elm.type === "pcb_smtpad" && (elm.shape === "rect" || elm.shape === "pill")) {
5390
5743
  ;
5391
5744
  [elm.width, elm.height] = [elm.height, elm.width];
5392
5745
  }
@@ -6750,17 +7103,17 @@ var parseObjBounds = (objText) => {
6750
7103
  const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
6751
7104
  const x = Number(xStr);
6752
7105
  const y = Number(yStr);
6753
- const z182 = Number(zStr);
6754
- if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z182)) {
7106
+ const z196 = Number(zStr);
7107
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z196)) {
6755
7108
  continue;
6756
7109
  }
6757
7110
  vertexCount += 1;
6758
7111
  minX = Math.min(minX, x);
6759
7112
  minY = Math.min(minY, y);
6760
- minZ = Math.min(minZ, z182);
7113
+ minZ = Math.min(minZ, z196);
6761
7114
  maxX = Math.max(maxX, x);
6762
7115
  maxY = Math.max(maxY, y);
6763
- maxZ = Math.max(maxZ, z182);
7116
+ maxZ = Math.max(maxZ, z196);
6764
7117
  }
6765
7118
  if (vertexCount === 0) return null;
6766
7119
  return {
@@ -6878,18 +7231,18 @@ async function fetchEasyEDAComponent(jlcpcbPartNumber, {
6878
7231
  }
6879
7232
 
6880
7233
  // lib/schemas/easy-eda-json-schema.ts
6881
- import { z as z181 } from "zod";
7234
+ import { z as z195 } from "zod";
6882
7235
 
6883
7236
  // lib/schemas/package-detail-shape-schema.ts
6884
- import { z as z179 } from "zod";
6885
- var safeNumber = (defaultValue = 0) => z179.union([z179.number(), z179.string()]).transform((val) => {
7237
+ import { z as z193 } from "zod";
7238
+ var safeNumber = (defaultValue = 0) => z193.union([z193.number(), z193.string()]).transform((val) => {
6886
7239
  const num = Number(val);
6887
7240
  return Number.isNaN(num) ? defaultValue : num;
6888
7241
  }).default(defaultValue);
6889
- var tenthmil = z179.union([z179.number(), z179.string()]).optional().transform(
7242
+ var tenthmil = z193.union([z193.number(), z193.string()]).optional().transform(
6890
7243
  (n) => typeof n === "string" && n.endsWith("mil") ? n : `${Number.parseFloat(n) * 10}mil`
6891
- ).pipe(z179.string());
6892
- var PointSchema = z179.any().transform((p) => {
7244
+ ).pipe(z193.string());
7245
+ var PointSchema = z193.any().transform((p) => {
6893
7246
  if (Array.isArray(p)) {
6894
7247
  const [x, y] = p;
6895
7248
  return { x, y };
@@ -6899,105 +7252,105 @@ var PointSchema = z179.any().transform((p) => {
6899
7252
  }
6900
7253
  throw new Error(`Invalid point: ${p}`);
6901
7254
  }).pipe(
6902
- z179.object({
6903
- x: z179.number(),
6904
- y: z179.number()
7255
+ z193.object({
7256
+ x: z193.number(),
7257
+ y: z193.number()
6905
7258
  })
6906
7259
  );
6907
- var BaseShapeSchema = z179.object({
6908
- type: z179.string(),
6909
- id: z179.string().optional(),
6910
- layer: z179.coerce.number().optional()
7260
+ var BaseShapeSchema = z193.object({
7261
+ type: z193.string(),
7262
+ id: z193.string().optional(),
7263
+ layer: z193.coerce.number().optional()
6911
7264
  });
6912
7265
  var TrackSchema = BaseShapeSchema.extend({
6913
- type: z179.literal("TRACK"),
6914
- width: z179.coerce.number(),
6915
- points: z179.array(PointSchema)
7266
+ type: z193.literal("TRACK"),
7267
+ width: z193.coerce.number(),
7268
+ points: z193.array(PointSchema)
6916
7269
  });
6917
7270
  var PadSchema = BaseShapeSchema.extend({
6918
- type: z179.literal("PAD"),
6919
- shape: z179.enum(["RECT", "ELLIPSE", "OVAL", "POLYGON"]),
6920
- center: z179.object({
7271
+ type: z193.literal("PAD"),
7272
+ shape: z193.enum(["RECT", "ELLIPSE", "OVAL", "POLYGON"]),
7273
+ center: z193.object({
6921
7274
  x: tenthmil,
6922
7275
  y: tenthmil
6923
7276
  }),
6924
7277
  width: tenthmil,
6925
7278
  height: tenthmil,
6926
- layermask: z179.number(),
6927
- net: z179.union([z179.string(), z179.number()]).optional(),
6928
- number: z179.union([z179.string(), z179.number()]),
7279
+ layermask: z193.number(),
7280
+ net: z193.union([z193.string(), z193.number()]).optional(),
7281
+ number: z193.union([z193.string(), z193.number()]),
6929
7282
  holeRadius: tenthmil,
6930
- points: z179.array(PointSchema).optional(),
7283
+ points: z193.array(PointSchema).optional(),
6931
7284
  rotation: safeNumber(0),
6932
7285
  // Will default to 0 if NaN or missing
6933
- plated: z179.boolean()
7286
+ plated: z193.boolean()
6934
7287
  });
6935
7288
  var ArcSchema = BaseShapeSchema.extend({
6936
- type: z179.literal("ARC"),
6937
- width: z179.number(),
7289
+ type: z193.literal("ARC"),
7290
+ width: z193.number(),
6938
7291
  start: PointSchema,
6939
7292
  end: PointSchema,
6940
- radiusX: z179.number(),
6941
- radiusY: z179.number(),
6942
- largeArc: z179.boolean(),
6943
- sweepDirection: z179.enum(["CW", "CCW"])
7293
+ radiusX: z193.number(),
7294
+ radiusY: z193.number(),
7295
+ largeArc: z193.boolean(),
7296
+ sweepDirection: z193.enum(["CW", "CCW"])
6944
7297
  });
6945
7298
  var CircleSchema = BaseShapeSchema.extend({
6946
- type: z179.literal("CIRCLE"),
7299
+ type: z193.literal("CIRCLE"),
6947
7300
  center: PointSchema,
6948
- radius: z179.number(),
6949
- width: z179.number()
7301
+ radius: z193.number(),
7302
+ width: z193.number()
6950
7303
  });
6951
7304
  var SolidRegionSchema = BaseShapeSchema.extend({
6952
- type: z179.literal("SOLIDREGION"),
6953
- layermask: z179.number(),
6954
- points: z179.array(PointSchema),
6955
- fillStyle: z179.string().default("none")
7305
+ type: z193.literal("SOLIDREGION"),
7306
+ layermask: z193.number(),
7307
+ points: z193.array(PointSchema),
7308
+ fillStyle: z193.string().default("none")
6956
7309
  });
6957
7310
  var SVGNodeSchema = BaseShapeSchema.extend({
6958
- type: z179.literal("SVGNODE"),
6959
- svgData: z179.object({
6960
- gId: z179.string(),
6961
- nodeName: z179.string(),
6962
- nodeType: z179.number(),
6963
- layerid: z179.string(),
6964
- attrs: z179.record(z179.string(), z179.string()),
6965
- childNodes: z179.array(z179.unknown())
7311
+ type: z193.literal("SVGNODE"),
7312
+ svgData: z193.object({
7313
+ gId: z193.string(),
7314
+ nodeName: z193.string(),
7315
+ nodeType: z193.number(),
7316
+ layerid: z193.string(),
7317
+ attrs: z193.record(z193.string(), z193.string()),
7318
+ childNodes: z193.array(z193.unknown())
6966
7319
  })
6967
7320
  });
6968
7321
  var HoleSchema = BaseShapeSchema.extend({
6969
- type: z179.literal("HOLE"),
7322
+ type: z193.literal("HOLE"),
6970
7323
  center: PointSchema,
6971
- radius: z179.number()
7324
+ radius: z193.number()
6972
7325
  });
6973
7326
  var ViaSchema = BaseShapeSchema.extend({
6974
- type: z179.literal("VIA"),
7327
+ type: z193.literal("VIA"),
6975
7328
  center: PointSchema,
6976
- outerDiameter: z179.number(),
6977
- holeRadius: z179.number()
7329
+ outerDiameter: z193.number(),
7330
+ holeRadius: z193.number()
6978
7331
  });
6979
7332
  var RectSchema = BaseShapeSchema.extend({
6980
- type: z179.literal("RECT"),
7333
+ type: z193.literal("RECT"),
6981
7334
  x: tenthmil,
6982
7335
  y: tenthmil,
6983
7336
  width: tenthmil,
6984
7337
  height: tenthmil,
6985
- lineWidth: z179.number(),
6986
- fillStyle: z179.string().default("none"),
6987
- rotation: z179.number().optional()
7338
+ lineWidth: z193.number(),
7339
+ fillStyle: z193.string().default("none"),
7340
+ rotation: z193.number().optional()
6988
7341
  });
6989
7342
  var TextSchema = BaseShapeSchema.extend({
6990
- type: z179.literal("TEXT"),
6991
- text: z179.string(),
7343
+ type: z193.literal("TEXT"),
7344
+ text: z193.string(),
6992
7345
  x: tenthmil,
6993
7346
  y: tenthmil,
6994
- size_mm: z179.number(),
6995
- rotation: z179.number().optional(),
6996
- layer: z179.number().optional(),
6997
- textAnchor: z179.enum(["L", "C", "R", ""]).optional().transform((val) => val === "" ? void 0 : val),
6998
- font: z179.string().optional()
7347
+ size_mm: z193.number(),
7348
+ rotation: z193.number().optional(),
7349
+ layer: z193.number().optional(),
7350
+ textAnchor: z193.enum(["L", "C", "R", ""]).optional().transform((val) => val === "" ? void 0 : val),
7351
+ font: z193.string().optional()
6999
7352
  });
7000
- var PackageDetailShapeSchema = z179.discriminatedUnion("type", [
7353
+ var PackageDetailShapeSchema = z193.discriminatedUnion("type", [
7001
7354
  TrackSchema,
7002
7355
  PadSchema,
7003
7356
  ArcSchema,
@@ -7019,9 +7372,9 @@ var pairs = (arr) => {
7019
7372
  var parsePoints = (pointsStr) => pairs(
7020
7373
  pointsStr.trim().split(" ").map((n) => Number(n))
7021
7374
  );
7022
- var ShapeItemSchema = z179.object({
7023
- type: z179.string(),
7024
- data: z179.string()
7375
+ var ShapeItemSchema = z193.object({
7376
+ type: z193.string(),
7377
+ data: z193.string()
7025
7378
  }).transform((shape) => {
7026
7379
  switch (shape.type) {
7027
7380
  case "TRACK": {
@@ -7201,23 +7554,23 @@ var ShapeItemSchema = z179.object({
7201
7554
  throw new Error(`Unknown shape type: ${shape.type}`);
7202
7555
  }
7203
7556
  }).pipe(PackageDetailShapeSchema);
7204
- var ShapesArraySchema = z179.array(ShapeItemSchema);
7557
+ var ShapesArraySchema = z193.array(ShapeItemSchema);
7205
7558
 
7206
7559
  // lib/schemas/single-letter-shape-schema.ts
7207
- import { z as z180 } from "zod";
7208
- var PointSchema2 = z180.object({
7209
- x: z180.number(),
7210
- y: z180.number()
7560
+ import { z as z194 } from "zod";
7561
+ var PointSchema2 = z194.object({
7562
+ x: z194.number(),
7563
+ y: z194.number()
7211
7564
  });
7212
- var RectangleShapeOutputSchema = z180.object({
7213
- type: z180.literal("RECTANGLE"),
7565
+ var RectangleShapeOutputSchema = z194.object({
7566
+ type: z194.literal("RECTANGLE"),
7214
7567
  position: PointSchema2,
7215
- width: z180.number(),
7216
- height: z180.number(),
7217
- color: z180.string(),
7218
- lineWidth: z180.number(),
7219
- fillColor: z180.string().optional(),
7220
- id: z180.string()
7568
+ width: z194.number(),
7569
+ height: z194.number(),
7570
+ color: z194.string(),
7571
+ lineWidth: z194.number(),
7572
+ fillColor: z194.string().optional(),
7573
+ id: z194.string()
7221
7574
  });
7222
7575
  var parseRectangle = (str) => {
7223
7576
  const [, x, y, , , width, height, color, lineWidth, , fillColor, id] = str.split("~");
@@ -7232,16 +7585,16 @@ var parseRectangle = (str) => {
7232
7585
  id
7233
7586
  };
7234
7587
  };
7235
- var RectangleShapeSchema = z180.string().startsWith("R~").transform(parseRectangle).pipe(RectangleShapeOutputSchema);
7236
- var EllipseShapeOutputSchema = z180.object({
7237
- type: z180.literal("ELLIPSE"),
7588
+ var RectangleShapeSchema = z194.string().startsWith("R~").transform(parseRectangle).pipe(RectangleShapeOutputSchema);
7589
+ var EllipseShapeOutputSchema = z194.object({
7590
+ type: z194.literal("ELLIPSE"),
7238
7591
  center: PointSchema2,
7239
- radiusX: z180.number(),
7240
- radiusY: z180.number(),
7241
- color: z180.string(),
7242
- lineWidth: z180.number(),
7243
- fillColor: z180.string().optional(),
7244
- id: z180.string()
7592
+ radiusX: z194.number(),
7593
+ radiusY: z194.number(),
7594
+ color: z194.string(),
7595
+ lineWidth: z194.number(),
7596
+ fillColor: z194.string().optional(),
7597
+ id: z194.string()
7245
7598
  });
7246
7599
  var parseEllipse = (str) => {
7247
7600
  const [, x, y, radiusX, radiusY, color, lineWidth, , fillColor, id] = str.split("~");
@@ -7256,17 +7609,17 @@ var parseEllipse = (str) => {
7256
7609
  id
7257
7610
  };
7258
7611
  };
7259
- var EllipseShapeSchema = z180.string().startsWith("E~").transform(parseEllipse).pipe(EllipseShapeOutputSchema);
7260
- var ArcShapeOutputSchema = z180.object({
7261
- type: z180.literal("ARC"),
7262
- pathData: z180.string(),
7612
+ var EllipseShapeSchema = z194.string().startsWith("E~").transform(parseEllipse).pipe(EllipseShapeOutputSchema);
7613
+ var ArcShapeOutputSchema = z194.object({
7614
+ type: z194.literal("ARC"),
7615
+ pathData: z194.string(),
7263
7616
  start: PointSchema2,
7264
7617
  end: PointSchema2,
7265
- radius: z180.number(),
7266
- sweepFlag: z180.boolean(),
7267
- color: z180.string(),
7268
- lineWidth: z180.number(),
7269
- id: z180.string()
7618
+ radius: z194.number(),
7619
+ sweepFlag: z194.boolean(),
7620
+ color: z194.string(),
7621
+ lineWidth: z194.number(),
7622
+ id: z194.string()
7270
7623
  });
7271
7624
  var parseArc = (str) => {
7272
7625
  const [, pathData, ...fields] = str.split("~");
@@ -7290,19 +7643,19 @@ var parseArc = (str) => {
7290
7643
  id
7291
7644
  };
7292
7645
  };
7293
- var ArcShapeSchema = z180.string().startsWith("A~").transform(parseArc).pipe(ArcShapeOutputSchema);
7294
- var PinShapeOutputSchema = z180.object({
7295
- type: z180.literal("PIN"),
7296
- visibility: z180.enum(["show", "hide", "none"]),
7297
- pinNumber: z180.union([z180.string(), z180.number()]),
7298
- x: z180.number(),
7299
- y: z180.number(),
7300
- rotation: z180.number(),
7301
- id: z180.string(),
7302
- label: z180.string(),
7303
- labelColor: z180.string(),
7304
- path: z180.string(),
7305
- arrow: z180.string()
7646
+ var ArcShapeSchema = z194.string().startsWith("A~").transform(parseArc).pipe(ArcShapeOutputSchema);
7647
+ var PinShapeOutputSchema = z194.object({
7648
+ type: z194.literal("PIN"),
7649
+ visibility: z194.enum(["show", "hide", "none"]),
7650
+ pinNumber: z194.union([z194.string(), z194.number()]),
7651
+ x: z194.number(),
7652
+ y: z194.number(),
7653
+ rotation: z194.number(),
7654
+ id: z194.string(),
7655
+ label: z194.string(),
7656
+ labelColor: z194.string(),
7657
+ path: z194.string(),
7658
+ arrow: z194.string()
7306
7659
  });
7307
7660
  var parsePin = (pinString) => {
7308
7661
  const parts = pinString.split("~");
@@ -7313,6 +7666,8 @@ var parsePin = (pinString) => {
7313
7666
  if (label.endsWith("-")) label = `${label.slice(0, -1)}_NEG`;
7314
7667
  label = normalizeActiveLowPinLabel(label);
7315
7668
  if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
7669
+ if (label.startsWith("+")) label = `${label.slice(1)}_POS`;
7670
+ if (label.startsWith("-")) label = `${label.slice(1)}_NEG`;
7316
7671
  const colorMatch = pinString.match(/#[0-9A-F]{6}/);
7317
7672
  const labelColor = colorMatch ? colorMatch[0] : "";
7318
7673
  const path = pinString.split("^^")[2]?.split("~")[0] ?? "";
@@ -7333,13 +7688,13 @@ var parsePin = (pinString) => {
7333
7688
  arrow
7334
7689
  };
7335
7690
  };
7336
- var PinShapeSchema = z180.string().startsWith("P~").transform(parsePin).pipe(PinShapeOutputSchema);
7337
- var PolylineShapeOutputSchema = z180.object({
7338
- type: z180.literal("POLYLINE"),
7339
- points: z180.array(PointSchema2),
7340
- color: z180.string(),
7341
- lineWidth: z180.number(),
7342
- id: z180.string()
7691
+ var PinShapeSchema = z194.string().startsWith("P~").transform(parsePin).pipe(PinShapeOutputSchema);
7692
+ var PolylineShapeOutputSchema = z194.object({
7693
+ type: z194.literal("POLYLINE"),
7694
+ points: z194.array(PointSchema2),
7695
+ color: z194.string(),
7696
+ lineWidth: z194.number(),
7697
+ id: z194.string()
7343
7698
  });
7344
7699
  var parsePoints2 = (pointsStr) => {
7345
7700
  return pointsStr.split(" ").reduce((acc, value, index) => {
@@ -7362,14 +7717,14 @@ var parsePolyline = (str) => {
7362
7717
  id
7363
7718
  };
7364
7719
  };
7365
- var PolylineShapeSchema = z180.string().startsWith("PL~").transform(parsePolyline).pipe(PolylineShapeOutputSchema);
7366
- var PolygonShapeOutputSchema = z180.object({
7367
- type: z180.literal("POLYGON"),
7368
- points: z180.array(PointSchema2),
7369
- fillColor: z180.string(),
7370
- lineWidth: z180.number(),
7371
- lineColor: z180.string(),
7372
- id: z180.string()
7720
+ var PolylineShapeSchema = z194.string().startsWith("PL~").transform(parsePolyline).pipe(PolylineShapeOutputSchema);
7721
+ var PolygonShapeOutputSchema = z194.object({
7722
+ type: z194.literal("POLYGON"),
7723
+ points: z194.array(PointSchema2),
7724
+ fillColor: z194.string(),
7725
+ lineWidth: z194.number(),
7726
+ lineColor: z194.string(),
7727
+ id: z194.string()
7373
7728
  });
7374
7729
  var parsePolygon = (str) => {
7375
7730
  const [, ...rest] = str.split("~");
@@ -7383,14 +7738,14 @@ var parsePolygon = (str) => {
7383
7738
  id
7384
7739
  };
7385
7740
  };
7386
- var PolygonShapeSchema = z180.string().startsWith("PG~").transform(parsePolygon).pipe(PolygonShapeOutputSchema);
7387
- var PathShapeOutputSchema = z180.object({
7388
- type: z180.literal("PATH"),
7389
- pathData: z180.string(),
7390
- fillColor: z180.string(),
7391
- strokeWidth: z180.number(),
7392
- strokeColor: z180.string(),
7393
- id: z180.string()
7741
+ var PolygonShapeSchema = z194.string().startsWith("PG~").transform(parsePolygon).pipe(PolygonShapeOutputSchema);
7742
+ var PathShapeOutputSchema = z194.object({
7743
+ type: z194.literal("PATH"),
7744
+ pathData: z194.string(),
7745
+ fillColor: z194.string(),
7746
+ strokeWidth: z194.number(),
7747
+ strokeColor: z194.string(),
7748
+ id: z194.string()
7394
7749
  });
7395
7750
  var parsePath = (str) => {
7396
7751
  const [, pathData, strokeColor, strokeWidth, , fillColor, id] = str.split("~");
@@ -7403,19 +7758,19 @@ var parsePath = (str) => {
7403
7758
  id
7404
7759
  };
7405
7760
  };
7406
- var PathShapeSchema = z180.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
7407
- var IgnoredShapeOutputSchema = z180.object({
7408
- type: z180.literal("IGNORED"),
7409
- sourceType: z180.enum(["AR", "I"])
7761
+ var PathShapeSchema = z194.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
7762
+ var IgnoredShapeOutputSchema = z194.object({
7763
+ type: z194.literal("IGNORED"),
7764
+ sourceType: z194.enum(["AR", "I"])
7410
7765
  });
7411
- var IgnoredShapeSchema = z180.string().transform((shape) => {
7766
+ var IgnoredShapeSchema = z194.string().transform((shape) => {
7412
7767
  const sourceType = shape.startsWith("AR~") ? "AR" : shape.startsWith("I~") ? "I" : void 0;
7413
7768
  if (!sourceType) {
7414
7769
  throw new Error(`Invalid ignored shape: ${shape}`);
7415
7770
  }
7416
7771
  return { type: "IGNORED", sourceType };
7417
7772
  }).pipe(IgnoredShapeOutputSchema);
7418
- var optionalEasyEdaTextField = (fieldSchema) => z180.preprocess((textField) => {
7773
+ var optionalEasyEdaTextField = (fieldSchema) => z194.preprocess((textField) => {
7419
7774
  if (textField == null) return void 0;
7420
7775
  if (typeof textField === "string") {
7421
7776
  const trimmedTextField = textField.trim();
@@ -7425,25 +7780,25 @@ var optionalEasyEdaTextField = (fieldSchema) => z180.preprocess((textField) => {
7425
7780
  }
7426
7781
  return textField;
7427
7782
  }, fieldSchema);
7428
- var TextShapeOutputSchema = z180.object({
7429
- type: z180.literal("TEXT"),
7430
- alignment: z180.enum(["L", "C", "R"]),
7431
- x: z180.number(),
7432
- y: z180.number(),
7433
- rotation: z180.number(),
7434
- fontColor: z180.string(),
7435
- backgroundColor: optionalEasyEdaTextField(z180.string().optional()),
7436
- fontSize: z180.string(),
7437
- fontWeight: optionalEasyEdaTextField(z180.string().optional().default("normal")),
7783
+ var TextShapeOutputSchema = z194.object({
7784
+ type: z194.literal("TEXT"),
7785
+ alignment: z194.enum(["L", "C", "R"]),
7786
+ x: z194.number(),
7787
+ y: z194.number(),
7788
+ rotation: z194.number(),
7789
+ fontColor: z194.string(),
7790
+ backgroundColor: optionalEasyEdaTextField(z194.string().optional()),
7791
+ fontSize: z194.string(),
7792
+ fontWeight: optionalEasyEdaTextField(z194.string().optional().default("normal")),
7438
7793
  fontStyle: optionalEasyEdaTextField(
7439
- z180.enum(["normal", "italic"]).optional().default("normal")
7794
+ z194.enum(["normal", "italic"]).optional().default("normal")
7440
7795
  ),
7441
- fontDecoration: optionalEasyEdaTextField(z180.string().optional().default("")),
7442
- content: z180.string(),
7443
- textType: z180.string(),
7444
- visibility: z180.enum(["0", "1"]),
7445
- mirror: z180.string(),
7446
- id: z180.string()
7796
+ fontDecoration: optionalEasyEdaTextField(z194.string().optional().default("")),
7797
+ content: z194.string(),
7798
+ textType: z194.string(),
7799
+ visibility: z194.enum(["0", "1"]),
7800
+ mirror: z194.string(),
7801
+ id: z194.string()
7447
7802
  });
7448
7803
  var parseText = (str) => {
7449
7804
  const [
@@ -7484,8 +7839,8 @@ var parseText = (str) => {
7484
7839
  id
7485
7840
  };
7486
7841
  };
7487
- var TextShapeSchema = z180.string().startsWith("T~").transform(parseText).pipe(TextShapeOutputSchema);
7488
- var SingleLetterShapeSchema = z180.string().transform((x) => {
7842
+ var TextShapeSchema = z194.string().startsWith("T~").transform(parseText).pipe(TextShapeOutputSchema);
7843
+ var SingleLetterShapeSchema = z194.string().transform((x) => {
7489
7844
  if (x.startsWith("R~")) return RectangleShapeSchema.parse(x);
7490
7845
  if (x.startsWith("E~")) return EllipseShapeSchema.parse(x);
7491
7846
  if (x.startsWith("P~")) return PinShapeSchema.parse(x);
@@ -7499,7 +7854,7 @@ var SingleLetterShapeSchema = z180.string().transform((x) => {
7499
7854
  if (x.startsWith("A~")) return ArcShapeSchema.parse(x);
7500
7855
  throw new Error(`Invalid shape type: ${x}`);
7501
7856
  }).pipe(
7502
- z180.union([
7857
+ z194.union([
7503
7858
  RectangleShapeOutputSchema,
7504
7859
  EllipseShapeOutputSchema,
7505
7860
  PinShapeOutputSchema,
@@ -7513,84 +7868,84 @@ var SingleLetterShapeSchema = z180.string().transform((x) => {
7513
7868
  );
7514
7869
 
7515
7870
  // lib/schemas/easy-eda-json-schema.ts
7516
- var maybeNumber = z181.any().transform((k) => k === "nan" || Number.isNaN(k) ? null : k).pipe(z181.number().nullable().optional());
7517
- var optionalNumberWithNumericString = z181.preprocess((value) => {
7871
+ var maybeNumber = z195.any().transform((k) => k === "nan" || Number.isNaN(k) ? null : k).pipe(z195.number().nullable().optional());
7872
+ var optionalNumberWithNumericString = z195.preprocess((value) => {
7518
7873
  if (typeof value !== "string") return value;
7519
7874
  if (value.trim() === "") return void 0;
7520
7875
  return Number(value);
7521
- }, z181.number().optional());
7522
- var SzlcscSchema = z181.object({
7523
- id: z181.preprocess((value) => {
7876
+ }, z195.number().optional());
7877
+ var SzlcscSchema = z195.object({
7878
+ id: z195.preprocess((value) => {
7524
7879
  if (typeof value === "string" && /^\d+$/.test(value)) {
7525
7880
  return Number(value);
7526
7881
  }
7527
7882
  return value;
7528
- }, z181.number()),
7529
- number: z181.string(),
7530
- step: z181.number().optional(),
7531
- min: z181.number().optional(),
7883
+ }, z195.number()),
7884
+ number: z195.string(),
7885
+ step: z195.number().optional(),
7886
+ min: z195.number().optional(),
7532
7887
  price: optionalNumberWithNumericString,
7533
- stock: z181.number().optional(),
7534
- url: z181.string().url().optional(),
7535
- image: z181.string().optional().optional()
7536
- });
7537
- var LcscSchema = z181.object({
7538
- id: z181.number(),
7539
- number: z181.string(),
7540
- step: z181.number().optional(),
7541
- min: z181.number().optional(),
7888
+ stock: z195.number().optional(),
7889
+ url: z195.string().url().optional(),
7890
+ image: z195.string().optional().optional()
7891
+ });
7892
+ var LcscSchema = z195.object({
7893
+ id: z195.number(),
7894
+ number: z195.string(),
7895
+ step: z195.number().optional(),
7896
+ min: z195.number().optional(),
7542
7897
  price: optionalNumberWithNumericString,
7543
- stock: z181.number().optional(),
7544
- url: z181.string().url().optional()
7545
- });
7546
- var OwnerSchema = z181.object({
7547
- uuid: z181.string(),
7548
- username: z181.string(),
7549
- nickname: z181.string(),
7550
- avatar: z181.string()
7551
- });
7552
- var HeadSchema = z181.object({
7553
- docType: z181.preprocess((val) => val == null ? val : String(val), z181.string()),
7554
- editorVersion: z181.string().default(""),
7555
- c_para: z181.record(z181.string(), z181.string().nullable()),
7556
- x: z181.number(),
7557
- y: z181.number(),
7558
- puuid: z181.string().optional(),
7559
- uuid: z181.string(),
7560
- utime: z181.preprocess((val) => {
7898
+ stock: z195.number().optional(),
7899
+ url: z195.string().url().optional()
7900
+ });
7901
+ var OwnerSchema = z195.object({
7902
+ uuid: z195.string(),
7903
+ username: z195.string(),
7904
+ nickname: z195.string(),
7905
+ avatar: z195.string()
7906
+ });
7907
+ var HeadSchema = z195.object({
7908
+ docType: z195.preprocess((val) => val == null ? val : String(val), z195.string()),
7909
+ editorVersion: z195.string().default(""),
7910
+ c_para: z195.record(z195.string(), z195.string().nullable()),
7911
+ x: z195.number(),
7912
+ y: z195.number(),
7913
+ puuid: z195.string().optional(),
7914
+ uuid: z195.string(),
7915
+ utime: z195.preprocess((val) => {
7561
7916
  if (val == null || val === "") return void 0;
7562
7917
  if (typeof val === "string") return Number(val);
7563
7918
  return val;
7564
- }, z181.number().optional()),
7565
- importFlag: z181.number().optional(),
7566
- c_spiceCmd: z181.any().optional(),
7567
- hasIdFlag: z181.boolean().default(false)
7568
- });
7569
- var BBoxSchema = z181.object({
7570
- x: z181.number(),
7571
- y: z181.number(),
7572
- width: z181.number(),
7573
- height: z181.number()
7574
- });
7575
- var LayerItemSchema = z181.object({
7576
- name: z181.string(),
7577
- color: z181.string(),
7578
- visible: z181.boolean(),
7579
- active: z181.boolean(),
7580
- config: z181.boolean(),
7581
- transparency: z181.boolean()
7582
- });
7583
- var ObjectItemSchema = z181.object({
7584
- name: z181.string(),
7585
- visible: z181.boolean(),
7586
- locked: z181.boolean()
7587
- });
7588
- var DataStrSchema = z181.object({
7919
+ }, z195.number().optional()),
7920
+ importFlag: z195.number().optional(),
7921
+ c_spiceCmd: z195.any().optional(),
7922
+ hasIdFlag: z195.boolean().default(false)
7923
+ });
7924
+ var BBoxSchema = z195.object({
7925
+ x: z195.number(),
7926
+ y: z195.number(),
7927
+ width: z195.number(),
7928
+ height: z195.number()
7929
+ });
7930
+ var LayerItemSchema = z195.object({
7931
+ name: z195.string(),
7932
+ color: z195.string(),
7933
+ visible: z195.boolean(),
7934
+ active: z195.boolean(),
7935
+ config: z195.boolean(),
7936
+ transparency: z195.boolean()
7937
+ });
7938
+ var ObjectItemSchema = z195.object({
7939
+ name: z195.string(),
7940
+ visible: z195.boolean(),
7941
+ locked: z195.boolean()
7942
+ });
7943
+ var DataStrSchema = z195.object({
7589
7944
  head: HeadSchema,
7590
- canvas: z181.string(),
7591
- shape: z181.array(SingleLetterShapeSchema),
7945
+ canvas: z195.string(),
7946
+ shape: z195.array(SingleLetterShapeSchema),
7592
7947
  BBox: BBoxSchema.optional(),
7593
- colors: z181.union([z181.array(z181.string()), z181.record(z181.string())]).default([])
7948
+ colors: z195.union([z195.array(z195.string()), z195.record(z195.string())]).default([])
7594
7949
  }).transform((data) => ({
7595
7950
  ...data,
7596
7951
  BBox: data.BBox ?? {
@@ -7600,16 +7955,16 @@ var DataStrSchema = z181.object({
7600
7955
  height: 0
7601
7956
  }
7602
7957
  }));
7603
- var PackageDetailDataStrSchema = z181.object({
7958
+ var PackageDetailDataStrSchema = z195.object({
7604
7959
  head: HeadSchema,
7605
- canvas: z181.string(),
7606
- shape: z181.array(z181.string()).transform(
7960
+ canvas: z195.string(),
7961
+ shape: z195.array(z195.string()).transform(
7607
7962
  (shapes) => shapes.map((shape) => {
7608
7963
  const [type, ...data] = shape.split("~");
7609
7964
  return ShapeItemSchema.parse({ type, data: data.join("~") });
7610
7965
  })
7611
- ).pipe(z181.array(PackageDetailShapeSchema)),
7612
- layers: z181.array(z181.string()).transform(
7966
+ ).pipe(z195.array(PackageDetailShapeSchema)),
7967
+ layers: z195.array(z195.string()).transform(
7613
7968
  (layers) => layers.map((layer) => {
7614
7969
  const [name, color, visible, active, config, transparency] = layer.split("~");
7615
7970
  return LayerItemSchema.parse({
@@ -7622,7 +7977,7 @@ var PackageDetailDataStrSchema = z181.object({
7622
7977
  });
7623
7978
  })
7624
7979
  ),
7625
- objects: z181.array(z181.string()).transform(
7980
+ objects: z195.array(z195.string()).transform(
7626
7981
  (objects) => objects.map((obj) => {
7627
7982
  const [name, visible, locked] = obj.split("~");
7628
7983
  return ObjectItemSchema.parse({
@@ -7633,52 +7988,52 @@ var PackageDetailDataStrSchema = z181.object({
7633
7988
  })
7634
7989
  ),
7635
7990
  BBox: BBoxSchema,
7636
- netColors: z181.array(z181.unknown()).optional()
7991
+ netColors: z195.array(z195.unknown()).optional()
7637
7992
  });
7638
- var PackageDetailSchema = z181.object({
7639
- uuid: z181.string(),
7640
- title: z181.string(),
7641
- docType: z181.number(),
7642
- updateTime: z181.number(),
7993
+ var PackageDetailSchema = z195.object({
7994
+ uuid: z195.string(),
7995
+ title: z195.string(),
7996
+ docType: z195.number(),
7997
+ updateTime: z195.number(),
7643
7998
  owner: OwnerSchema,
7644
- datastrid: z181.string(),
7645
- writable: z181.boolean(),
7999
+ datastrid: z195.string(),
8000
+ writable: z195.boolean(),
7646
8001
  dataStr: PackageDetailDataStrSchema
7647
8002
  });
7648
- var ModelBoundsSchema = z181.object({
7649
- min: z181.object({
7650
- x: z181.number(),
7651
- y: z181.number(),
7652
- z: z181.number()
8003
+ var ModelBoundsSchema = z195.object({
8004
+ min: z195.object({
8005
+ x: z195.number(),
8006
+ y: z195.number(),
8007
+ z: z195.number()
7653
8008
  }),
7654
- max: z181.object({
7655
- x: z181.number(),
7656
- y: z181.number(),
7657
- z: z181.number()
8009
+ max: z195.object({
8010
+ x: z195.number(),
8011
+ y: z195.number(),
8012
+ z: z195.number()
7658
8013
  })
7659
8014
  });
7660
- var EasyEdaJsonSchema = z181.object({
7661
- uuid: z181.string(),
7662
- title: z181.string(),
7663
- description: z181.string(),
7664
- docType: z181.number(),
7665
- type: z181.number(),
8015
+ var EasyEdaJsonSchema = z195.object({
8016
+ uuid: z195.string(),
8017
+ title: z195.string(),
8018
+ description: z195.string(),
8019
+ docType: z195.number(),
8020
+ type: z195.number(),
7666
8021
  szlcsc: SzlcscSchema,
7667
8022
  lcsc: LcscSchema,
7668
8023
  owner: OwnerSchema,
7669
- tags: z181.array(z181.string()),
7670
- category: z181.string().optional(),
7671
- updateTime: z181.number(),
7672
- updated_at: z181.string(),
8024
+ tags: z195.array(z195.string()),
8025
+ category: z195.string().optional(),
8026
+ updateTime: z195.number(),
8027
+ updated_at: z195.string(),
7673
8028
  dataStr: DataStrSchema,
7674
- verify: z181.boolean(),
7675
- SMT: z181.boolean().optional(),
7676
- datastrid: z181.string(),
7677
- jlcOnSale: z181.number().optional(),
7678
- writable: z181.boolean(),
7679
- isFavorite: z181.boolean(),
8029
+ verify: z195.boolean(),
8030
+ SMT: z195.boolean().optional(),
8031
+ datastrid: z195.string(),
8032
+ jlcOnSale: z195.number().optional(),
8033
+ writable: z195.boolean(),
8034
+ isFavorite: z195.boolean(),
7680
8035
  packageDetail: PackageDetailSchema,
7681
- _objMetadata: z181.object({
8036
+ _objMetadata: z195.object({
7682
8037
  bounds: ModelBoundsSchema
7683
8038
  }).optional()
7684
8039
  });
@@ -7708,17 +8063,17 @@ var parseObjBounds2 = (objText) => {
7708
8063
  const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
7709
8064
  const x = Number(xStr);
7710
8065
  const y = Number(yStr);
7711
- const z182 = Number(zStr);
7712
- if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z182)) {
8066
+ const z196 = Number(zStr);
8067
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z196)) {
7713
8068
  continue;
7714
8069
  }
7715
8070
  vertexCount += 1;
7716
8071
  minX = Math.min(minX, x);
7717
8072
  minY = Math.min(minY, y);
7718
- minZ = Math.min(minZ, z182);
8073
+ minZ = Math.min(minZ, z196);
7719
8074
  maxX = Math.max(maxX, x);
7720
8075
  maxY = Math.max(maxY, y);
7721
- maxZ = Math.max(maxZ, z182);
8076
+ maxZ = Math.max(maxZ, z196);
7722
8077
  }
7723
8078
  if (vertexCount === 0) return null;
7724
8079
  return {