circuit-json 0.0.523 → 0.0.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2839,149 +2839,179 @@ var pcb_trace_warning = z125.object({
2839
2839
  }).describe("Defines a trace warning on the PCB");
2840
2840
  expectTypesMatch(true);
2841
2841
 
2842
- // src/pcb/pcb_trace_too_long_error.ts
2842
+ // src/pcb/pcb_trace_style_warning.ts
2843
2843
  import { z as z126 } from "zod";
2844
- var pcb_trace_too_long_error = z126.object({
2845
- type: z126.literal("pcb_trace_too_long_error"),
2846
- pcb_trace_too_long_error_id: getZodPrefixedIdWithDefault(
2847
- "pcb_trace_too_long_error"
2844
+ var pcb_trace_style_warning = z126.object({
2845
+ type: z126.literal("pcb_trace_style_warning"),
2846
+ pcb_trace_style_warning_id: getZodPrefixedIdWithDefault(
2847
+ "pcb_trace_style_warning"
2848
2848
  ),
2849
- error_type: z126.literal("pcb_trace_too_long_error").default("pcb_trace_too_long_error"),
2849
+ warning_type: z126.literal("pcb_trace_style_warning").default("pcb_trace_style_warning"),
2850
2850
  message: z126.string(),
2851
+ styling_issue_type: z126.literal("long_segment_at_odd_angle"),
2851
2852
  pcb_trace_id: z126.string(),
2852
- source_net_id: z126.string().optional(),
2853
2853
  source_trace_id: z126.string().optional(),
2854
+ subcircuit_id: z126.string().optional(),
2855
+ layer: layer_ref,
2856
+ start_route_index: z126.number().int().nonnegative(),
2857
+ end_route_index: z126.number().int().nonnegative(),
2858
+ segment_start: point,
2859
+ segment_end: point,
2860
+ center: point,
2861
+ segment_length: distance,
2862
+ minimum_segment_length: distance,
2863
+ angle_degrees: z126.number().min(0).lt(360),
2864
+ nearest_allowed_angle_degrees: z126.number().min(0).lt(360).multipleOf(45),
2865
+ angle_deviation_degrees: z126.number().min(0).max(22.5),
2866
+ angle_tolerance_degrees: z126.number().min(0).lt(22.5)
2867
+ }).describe(
2868
+ "Warning for a long PCB trace segment whose direction deviates from a multiple of 45 degrees"
2869
+ );
2870
+ expectTypesMatch(true);
2871
+
2872
+ // src/pcb/pcb_trace_too_long_error.ts
2873
+ import { z as z127 } from "zod";
2874
+ var pcb_trace_too_long_error = z127.object({
2875
+ type: z127.literal("pcb_trace_too_long_error"),
2876
+ pcb_trace_too_long_error_id: getZodPrefixedIdWithDefault(
2877
+ "pcb_trace_too_long_error"
2878
+ ),
2879
+ error_type: z127.literal("pcb_trace_too_long_error").default("pcb_trace_too_long_error"),
2880
+ message: z127.string(),
2881
+ pcb_trace_id: z127.string(),
2882
+ source_net_id: z127.string().optional(),
2883
+ source_trace_id: z127.string().optional(),
2854
2884
  actual_trace_length: distance,
2855
2885
  maximum_trace_length: distance,
2856
- subcircuit_id: z126.string().optional()
2886
+ subcircuit_id: z127.string().optional()
2857
2887
  }).describe(
2858
2888
  "Error emitted when a PCB trace is longer than its maximum allowed length"
2859
2889
  );
2860
2890
  expectTypesMatch(true);
2861
2891
 
2862
2892
  // src/pcb/pcb_bus_length_skew_error.ts
2863
- import { z as z127 } from "zod";
2893
+ import { z as z128 } from "zod";
2864
2894
  var pcb_bus_length_skew_error = base_circuit_json_error.extend({
2865
- type: z127.literal("pcb_bus_length_skew_error"),
2895
+ type: z128.literal("pcb_bus_length_skew_error"),
2866
2896
  pcb_bus_length_skew_error_id: getZodPrefixedIdWithDefault(
2867
2897
  "pcb_bus_length_skew_error"
2868
2898
  ),
2869
- error_type: z127.literal("pcb_bus_length_skew_error").default("pcb_bus_length_skew_error"),
2870
- source_bus_id: z127.string(),
2871
- source_trace_ids: z127.array(z127.string()),
2872
- pcb_trace_ids: z127.array(z127.string()),
2873
- actual_length_skew: z127.number().nonnegative().finite(),
2874
- maximum_length_skew: z127.number().nonnegative().finite(),
2875
- subcircuit_id: z127.string().optional()
2899
+ error_type: z128.literal("pcb_bus_length_skew_error").default("pcb_bus_length_skew_error"),
2900
+ source_bus_id: z128.string(),
2901
+ source_trace_ids: z128.array(z128.string()),
2902
+ pcb_trace_ids: z128.array(z128.string()),
2903
+ actual_length_skew: z128.number().nonnegative().finite(),
2904
+ maximum_length_skew: z128.number().nonnegative().finite(),
2905
+ subcircuit_id: z128.string().optional()
2876
2906
  });
2877
2907
  expectTypesMatch(true);
2878
2908
 
2879
2909
  // src/pcb/pcb_trace_too_long_warning.ts
2880
- import { z as z128 } from "zod";
2881
- var pcb_trace_too_long_warning = z128.object({
2882
- type: z128.literal("pcb_trace_too_long_warning"),
2910
+ import { z as z129 } from "zod";
2911
+ var pcb_trace_too_long_warning = z129.object({
2912
+ type: z129.literal("pcb_trace_too_long_warning"),
2883
2913
  pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
2884
2914
  "pcb_trace_too_long_warning"
2885
2915
  ),
2886
- warning_type: z128.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
2887
- message: z128.string(),
2888
- pcb_trace_id: z128.string(),
2889
- source_net_id: z128.string().optional(),
2890
- source_trace_id: z128.string().optional(),
2916
+ warning_type: z129.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
2917
+ message: z129.string(),
2918
+ pcb_trace_id: z129.string(),
2919
+ source_net_id: z129.string().optional(),
2920
+ source_trace_id: z129.string().optional(),
2891
2921
  actual_trace_length: distance,
2892
2922
  maximum_trace_length: distance,
2893
- subcircuit_id: z128.string().optional()
2923
+ subcircuit_id: z129.string().optional()
2894
2924
  }).describe(
2895
2925
  "Warning emitted when a PCB trace is longer than its maximum allowed length"
2896
2926
  );
2897
2927
  expectTypesMatch(true);
2898
2928
 
2899
2929
  // src/pcb/pcb_trace_too_many_vias_warning.ts
2900
- import { z as z129 } from "zod";
2901
- var pcb_trace_too_many_vias_warning = z129.object({
2902
- type: z129.literal("pcb_trace_too_many_vias_warning"),
2930
+ import { z as z130 } from "zod";
2931
+ var pcb_trace_too_many_vias_warning = z130.object({
2932
+ type: z130.literal("pcb_trace_too_many_vias_warning"),
2903
2933
  pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
2904
2934
  "pcb_trace_too_many_vias_warning"
2905
2935
  ),
2906
- warning_type: z129.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
2907
- message: z129.string(),
2908
- pcb_trace_id: z129.string(),
2909
- source_net_id: z129.string().optional(),
2910
- source_trace_id: z129.string().optional(),
2911
- actual_via_count: z129.number().int().nonnegative(),
2912
- maximum_via_count: z129.number().int().nonnegative(),
2913
- subcircuit_id: z129.string().optional()
2936
+ warning_type: z130.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
2937
+ message: z130.string(),
2938
+ pcb_trace_id: z130.string(),
2939
+ source_net_id: z130.string().optional(),
2940
+ source_trace_id: z130.string().optional(),
2941
+ actual_via_count: z130.number().int().nonnegative(),
2942
+ maximum_via_count: z130.number().int().nonnegative(),
2943
+ subcircuit_id: z130.string().optional()
2914
2944
  }).describe(
2915
2945
  "Warning emitted when a PCB trace has more vias than its maximum allowed count"
2916
2946
  );
2917
2947
  expectTypesMatch(true);
2918
2948
 
2919
2949
  // src/pcb/pcb_bus_routing_constraint_error.ts
2920
- import { z as z130 } from "zod";
2950
+ import { z as z131 } from "zod";
2921
2951
  var error_base = base_circuit_json_error.extend({
2922
- type: z130.literal("pcb_bus_routing_constraint_error"),
2952
+ type: z131.literal("pcb_bus_routing_constraint_error"),
2923
2953
  pcb_bus_routing_constraint_error_id: getZodPrefixedIdWithDefault(
2924
2954
  "pcb_bus_routing_constraint_error"
2925
2955
  ),
2926
- error_type: z130.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
2927
- source_bus_id: z130.string(),
2928
- source_trace_ids: z130.array(z130.string()).min(1),
2929
- pcb_trace_ids: z130.array(z130.string()),
2930
- subcircuit_id: z130.string().optional()
2956
+ error_type: z131.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
2957
+ source_bus_id: z131.string(),
2958
+ source_trace_ids: z131.array(z131.string()).min(1),
2959
+ pcb_trace_ids: z131.array(z131.string()),
2960
+ subcircuit_id: z131.string().optional()
2931
2961
  });
2932
- var pcb_bus_routing_constraint_error = z130.discriminatedUnion("routing_rule", [
2962
+ var pcb_bus_routing_constraint_error = z131.discriminatedUnion("routing_rule", [
2933
2963
  error_base.extend({
2934
- routing_rule: z130.literal("length_skew"),
2935
- actual_length_skew: z130.number().nonnegative().finite(),
2936
- maximum_length_skew: z130.number().nonnegative().finite()
2964
+ routing_rule: z131.literal("length_skew"),
2965
+ actual_length_skew: z131.number().nonnegative().finite(),
2966
+ maximum_length_skew: z131.number().nonnegative().finite()
2937
2967
  }),
2938
2968
  error_base.extend({
2939
- routing_rule: z130.literal("min_length"),
2940
- actual_trace_length: z130.number().nonnegative().finite(),
2941
- minimum_trace_length: z130.number().finite()
2969
+ routing_rule: z131.literal("min_length"),
2970
+ actual_trace_length: z131.number().nonnegative().finite(),
2971
+ minimum_trace_length: z131.number().finite()
2942
2972
  }),
2943
2973
  error_base.extend({
2944
- routing_rule: z130.literal("max_length"),
2945
- actual_trace_length: z130.number().nonnegative().finite(),
2946
- maximum_trace_length: z130.number().finite()
2974
+ routing_rule: z131.literal("max_length"),
2975
+ actual_trace_length: z131.number().nonnegative().finite(),
2976
+ maximum_trace_length: z131.number().finite()
2947
2977
  }),
2948
2978
  error_base.extend({
2949
- routing_rule: z130.literal("target_length"),
2950
- actual_trace_length: z130.number().nonnegative().finite(),
2951
- target_trace_length: z130.number().finite(),
2952
- length_tolerance: z130.number().nonnegative().finite()
2979
+ routing_rule: z131.literal("target_length"),
2980
+ actual_trace_length: z131.number().nonnegative().finite(),
2981
+ target_trace_length: z131.number().finite(),
2982
+ length_tolerance: z131.number().nonnegative().finite()
2953
2983
  }),
2954
2984
  error_base.extend({
2955
- routing_rule: z130.literal("pcb_trace_spacing"),
2956
- other_pcb_trace_id: z130.string(),
2957
- other_source_trace_id: z130.string().optional(),
2958
- actual_centerline_spacing: z130.number().nonnegative().finite(),
2959
- minimum_centerline_spacing: z130.number().positive().finite()
2985
+ routing_rule: z131.literal("pcb_trace_spacing"),
2986
+ other_pcb_trace_id: z131.string(),
2987
+ other_source_trace_id: z131.string().optional(),
2988
+ actual_centerline_spacing: z131.number().nonnegative().finite(),
2989
+ minimum_centerline_spacing: z131.number().positive().finite()
2960
2990
  }),
2961
2991
  error_base.extend({
2962
- routing_rule: z130.literal("pcb_spacing_to_other_signals"),
2963
- other_pcb_trace_id: z130.string(),
2964
- other_source_trace_id: z130.string().optional(),
2965
- actual_centerline_spacing: z130.number().nonnegative().finite(),
2966
- minimum_centerline_spacing: z130.number().positive().finite()
2992
+ routing_rule: z131.literal("pcb_spacing_to_other_signals"),
2993
+ other_pcb_trace_id: z131.string(),
2994
+ other_source_trace_id: z131.string().optional(),
2995
+ actual_centerline_spacing: z131.number().nonnegative().finite(),
2996
+ minimum_centerline_spacing: z131.number().positive().finite()
2967
2997
  }),
2968
2998
  error_base.extend({
2969
- routing_rule: z130.literal("impedance_target"),
2970
- target_impedance: z130.number().positive().finite(),
2971
- minimum_impedance: z130.number().positive().finite().optional(),
2972
- maximum_impedance: z130.number().positive().finite().optional()
2999
+ routing_rule: z131.literal("impedance_target"),
3000
+ target_impedance: z131.number().positive().finite(),
3001
+ minimum_impedance: z131.number().positive().finite().optional(),
3002
+ maximum_impedance: z131.number().positive().finite().optional()
2973
3003
  })
2974
3004
  ]).superRefine((error, ctx) => {
2975
3005
  if (error.routing_rule !== "impedance_target") return;
2976
3006
  if (error.minimum_impedance === void 0 && error.maximum_impedance === void 0)
2977
3007
  ctx.addIssue({
2978
- code: z130.ZodIssueCode.custom,
3008
+ code: z131.ZodIssueCode.custom,
2979
3009
  path: ["minimum_impedance"],
2980
3010
  message: "Provide an impedance bound"
2981
3011
  });
2982
3012
  if (error.minimum_impedance !== void 0 && error.maximum_impedance !== void 0 && error.minimum_impedance > error.maximum_impedance)
2983
3013
  ctx.addIssue({
2984
- code: z130.ZodIssueCode.custom,
3014
+ code: z131.ZodIssueCode.custom,
2985
3015
  path: ["maximum_impedance"],
2986
3016
  message: "Impedance bounds must be ordered"
2987
3017
  });
@@ -2991,134 +3021,134 @@ var pcb_bus_routing_constraint_error = z130.discriminatedUnion("routing_rule", [
2991
3021
  expectTypesMatch(true);
2992
3022
 
2993
3023
  // src/pcb/pcb_bus_routing_constraint_warning.ts
2994
- import { z as z131 } from "zod";
2995
- var warning_base = z131.object({
2996
- type: z131.literal("pcb_bus_routing_constraint_warning"),
3024
+ import { z as z132 } from "zod";
3025
+ var warning_base = z132.object({
3026
+ type: z132.literal("pcb_bus_routing_constraint_warning"),
2997
3027
  pcb_bus_routing_constraint_warning_id: getZodPrefixedIdWithDefault(
2998
3028
  "pcb_bus_routing_constraint_warning"
2999
3029
  ),
3000
- warning_type: z131.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
3001
- source_bus_id: z131.string(),
3002
- source_trace_ids: z131.array(z131.string()).min(1),
3003
- pcb_trace_ids: z131.array(z131.string()),
3004
- message: z131.string(),
3005
- subcircuit_id: z131.string().optional()
3030
+ warning_type: z132.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
3031
+ source_bus_id: z132.string(),
3032
+ source_trace_ids: z132.array(z132.string()).min(1),
3033
+ pcb_trace_ids: z132.array(z132.string()),
3034
+ message: z132.string(),
3035
+ subcircuit_id: z132.string().optional()
3006
3036
  }).describe(
3007
3037
  "A declared bus or pair constraint could not be verified; this is not a pass."
3008
3038
  );
3009
- var pcb_bus_routing_constraint_warning = z131.discriminatedUnion(
3039
+ var pcb_bus_routing_constraint_warning = z132.discriminatedUnion(
3010
3040
  "routing_rule",
3011
3041
  [
3012
- warning_base.extend({ routing_rule: z131.literal("route_geometry") }),
3013
- warning_base.extend({ routing_rule: z131.literal("reference_geometry") }),
3014
- warning_base.extend({ routing_rule: z131.literal("spacing_geometry") }),
3015
- warning_base.extend({ routing_rule: z131.literal("target_length") }),
3016
- warning_base.extend({ routing_rule: z131.literal("physical_impedance") })
3042
+ warning_base.extend({ routing_rule: z132.literal("route_geometry") }),
3043
+ warning_base.extend({ routing_rule: z132.literal("reference_geometry") }),
3044
+ warning_base.extend({ routing_rule: z132.literal("spacing_geometry") }),
3045
+ warning_base.extend({ routing_rule: z132.literal("target_length") }),
3046
+ warning_base.extend({ routing_rule: z132.literal("physical_impedance") })
3017
3047
  ]
3018
3048
  );
3019
3049
  expectTypesMatch(true);
3020
3050
 
3021
3051
  // src/pcb/pcb_trace_error.ts
3022
- import { z as z132 } from "zod";
3052
+ import { z as z133 } from "zod";
3023
3053
  var pcb_trace_error = base_circuit_json_error.extend({
3024
- type: z132.literal("pcb_trace_error"),
3054
+ type: z133.literal("pcb_trace_error"),
3025
3055
  pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
3026
- error_type: z132.literal("pcb_trace_error").default("pcb_trace_error"),
3056
+ error_type: z133.literal("pcb_trace_error").default("pcb_trace_error"),
3027
3057
  center: point.optional(),
3028
- pcb_trace_id: z132.string(),
3029
- source_trace_id: z132.string(),
3030
- pcb_component_ids: z132.array(z132.string()),
3031
- pcb_port_ids: z132.array(z132.string()),
3032
- subcircuit_id: z132.string().optional()
3058
+ pcb_trace_id: z133.string(),
3059
+ source_trace_id: z133.string(),
3060
+ pcb_component_ids: z133.array(z133.string()),
3061
+ pcb_port_ids: z133.array(z133.string()),
3062
+ subcircuit_id: z133.string().optional()
3033
3063
  }).describe("Defines a trace error on the PCB");
3034
3064
  expectTypesMatch(true);
3035
3065
 
3036
3066
  // src/pcb/pcb_trace_missing_error.ts
3037
- import { z as z133 } from "zod";
3067
+ import { z as z134 } from "zod";
3038
3068
  var pcb_trace_missing_error = base_circuit_json_error.extend({
3039
- type: z133.literal("pcb_trace_missing_error"),
3069
+ type: z134.literal("pcb_trace_missing_error"),
3040
3070
  pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
3041
3071
  "pcb_trace_missing_error"
3042
3072
  ),
3043
- error_type: z133.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
3073
+ error_type: z134.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
3044
3074
  center: point.optional(),
3045
- source_trace_id: z133.string(),
3046
- pcb_component_ids: z133.array(z133.string()),
3047
- pcb_port_ids: z133.array(z133.string()),
3048
- subcircuit_id: z133.string().optional()
3075
+ source_trace_id: z134.string(),
3076
+ pcb_component_ids: z134.array(z134.string()),
3077
+ pcb_port_ids: z134.array(z134.string()),
3078
+ subcircuit_id: z134.string().optional()
3049
3079
  }).describe(
3050
3080
  "Defines an error when a source trace has no corresponding PCB trace"
3051
3081
  );
3052
3082
  expectTypesMatch(true);
3053
3083
 
3054
3084
  // src/pcb/pcb_port_not_matched_error.ts
3055
- import { z as z134 } from "zod";
3085
+ import { z as z135 } from "zod";
3056
3086
  var pcb_port_not_matched_error = base_circuit_json_error.extend({
3057
- type: z134.literal("pcb_port_not_matched_error"),
3087
+ type: z135.literal("pcb_port_not_matched_error"),
3058
3088
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3059
- error_type: z134.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
3060
- pcb_component_ids: z134.array(z134.string()),
3061
- subcircuit_id: z134.string().optional()
3089
+ error_type: z135.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
3090
+ pcb_component_ids: z135.array(z135.string()),
3091
+ subcircuit_id: z135.string().optional()
3062
3092
  }).describe("Defines a trace error on the PCB where a port is not matched");
3063
3093
  expectTypesMatch(true);
3064
3094
 
3065
3095
  // src/pcb/pcb_port_not_connected_error.ts
3066
- import { z as z135 } from "zod";
3096
+ import { z as z136 } from "zod";
3067
3097
  var pcb_port_not_connected_error = base_circuit_json_error.extend({
3068
- type: z135.literal("pcb_port_not_connected_error"),
3098
+ type: z136.literal("pcb_port_not_connected_error"),
3069
3099
  pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
3070
3100
  "pcb_port_not_connected_error"
3071
3101
  ),
3072
- error_type: z135.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
3073
- pcb_port_ids: z135.array(z135.string()),
3074
- pcb_component_ids: z135.array(z135.string()),
3075
- subcircuit_id: z135.string().optional()
3102
+ error_type: z136.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
3103
+ pcb_port_ids: z136.array(z136.string()),
3104
+ pcb_component_ids: z136.array(z136.string()),
3105
+ subcircuit_id: z136.string().optional()
3076
3106
  }).describe("Defines an error when a pcb port is not connected to any trace");
3077
3107
  expectTypesMatch(
3078
3108
  true
3079
3109
  );
3080
3110
 
3081
3111
  // src/pcb/pcb_net.ts
3082
- import { z as z136 } from "zod";
3083
- var pcb_net = z136.object({
3084
- type: z136.literal("pcb_net"),
3112
+ import { z as z137 } from "zod";
3113
+ var pcb_net = z137.object({
3114
+ type: z137.literal("pcb_net"),
3085
3115
  pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
3086
- source_net_id: z136.string().optional(),
3087
- highlight_color: z136.string().optional()
3116
+ source_net_id: z137.string().optional(),
3117
+ highlight_color: z137.string().optional()
3088
3118
  }).describe("Defines a net on the PCB");
3089
3119
  expectTypesMatch(true);
3090
3120
 
3091
3121
  // src/pcb/pcb_via.ts
3092
- import { z as z137 } from "zod";
3093
- var pcb_via = z137.object({
3094
- type: z137.literal("pcb_via"),
3122
+ import { z as z138 } from "zod";
3123
+ var pcb_via = z138.object({
3124
+ type: z138.literal("pcb_via"),
3095
3125
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
3096
- pcb_group_id: z137.string().optional(),
3097
- subcircuit_id: z137.string().optional(),
3098
- subcircuit_connectivity_map_key: z137.string().optional(),
3126
+ pcb_group_id: z138.string().optional(),
3127
+ subcircuit_id: z138.string().optional(),
3128
+ subcircuit_connectivity_map_key: z138.string().optional(),
3099
3129
  x: distance,
3100
3130
  y: distance,
3101
3131
  outer_diameter: distance.default("0.6mm"),
3102
3132
  hole_diameter: distance.default("0.25mm"),
3103
3133
  topmost_drill_layer: layer_ref.optional(),
3104
3134
  bottommost_drill_layer: layer_ref.optional(),
3105
- through_hole: z137.boolean().optional(),
3135
+ through_hole: z138.boolean().optional(),
3106
3136
  /** @deprecated */
3107
3137
  from_layer: layer_ref.optional(),
3108
3138
  /** @deprecated */
3109
3139
  to_layer: layer_ref.optional(),
3110
- layers: z137.array(layer_ref),
3140
+ layers: z138.array(layer_ref),
3111
3141
  /** PCB ports belonging to this via, including layer ports and aliases. */
3112
- pcb_port_ids: z137.array(z137.string()).optional(),
3113
- pcb_trace_id: z137.string().optional(),
3114
- source_trace_id: z137.string().optional(),
3115
- source_net_id: z137.string().min(1).optional(),
3116
- net_is_assignable: z137.boolean().optional(),
3117
- net_assigned: z137.boolean().optional(),
3142
+ pcb_port_ids: z138.array(z138.string()).optional(),
3143
+ pcb_trace_id: z138.string().optional(),
3144
+ source_trace_id: z138.string().optional(),
3145
+ source_net_id: z138.string().min(1).optional(),
3146
+ net_is_assignable: z138.boolean().optional(),
3147
+ net_assigned: z138.boolean().optional(),
3118
3148
  /** @deprecated Use tented_on_top and tented_on_bottom instead. */
3119
- is_tented: z137.boolean().optional(),
3120
- tented_on_top: z137.boolean().optional(),
3121
- tented_on_bottom: z137.boolean().optional()
3149
+ is_tented: z138.boolean().optional(),
3150
+ tented_on_top: z138.boolean().optional(),
3151
+ tented_on_bottom: z138.boolean().optional()
3122
3152
  }).transform(({ is_tented, ...via }) => {
3123
3153
  if (is_tented !== void 0) {
3124
3154
  via.tented_on_top ??= is_tented;
@@ -3129,62 +3159,62 @@ var pcb_via = z137.object({
3129
3159
  expectTypesMatch(true);
3130
3160
 
3131
3161
  // src/pcb/pcb_board.ts
3132
- import { z as z138 } from "zod";
3133
- var pcb_board = z138.object({
3134
- type: z138.literal("pcb_board"),
3162
+ import { z as z139 } from "zod";
3163
+ var pcb_board = z139.object({
3164
+ type: z139.literal("pcb_board"),
3135
3165
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
3136
- pcb_panel_id: z138.string().optional(),
3137
- carrier_pcb_board_id: z138.string().optional(),
3138
- is_subcircuit: z138.boolean().optional(),
3139
- subcircuit_id: z138.string().optional(),
3140
- is_mounted_to_carrier_board: z138.boolean().optional(),
3141
- is_via_in_pad_allowed: z138.boolean().optional(),
3142
- default_via_tented_on_top: z138.boolean().optional(),
3143
- default_via_tented_on_bottom: z138.boolean().optional(),
3144
- default_via_plugged: z138.boolean().optional(),
3166
+ pcb_panel_id: z139.string().optional(),
3167
+ carrier_pcb_board_id: z139.string().optional(),
3168
+ is_subcircuit: z139.boolean().optional(),
3169
+ subcircuit_id: z139.string().optional(),
3170
+ is_mounted_to_carrier_board: z139.boolean().optional(),
3171
+ is_via_in_pad_allowed: z139.boolean().optional(),
3172
+ default_via_tented_on_top: z139.boolean().optional(),
3173
+ default_via_tented_on_bottom: z139.boolean().optional(),
3174
+ default_via_plugged: z139.boolean().optional(),
3145
3175
  width: length.optional(),
3146
3176
  height: length.optional(),
3147
3177
  center: point,
3148
- display_offset_x: z138.string().optional().describe(
3178
+ display_offset_x: z139.string().optional().describe(
3149
3179
  "How to display the x offset for this board, usually corresponding with how the user specified it"
3150
3180
  ),
3151
- display_offset_y: z138.string().optional().describe(
3181
+ display_offset_y: z139.string().optional().describe(
3152
3182
  "How to display the y offset for this board, usually corresponding with how the user specified it"
3153
3183
  ),
3154
3184
  thickness: length.optional().default(1.4),
3155
- num_layers: z138.number().optional().default(4),
3156
- allow_blind_and_buried_vias: z138.boolean().optional().describe(
3185
+ num_layers: z139.number().optional().default(4),
3186
+ allow_blind_and_buried_vias: z139.boolean().optional().describe(
3157
3187
  "Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
3158
3188
  ),
3159
- outline: z138.array(point).optional(),
3160
- shape: z138.enum(["rect", "polygon"]).optional(),
3161
- material: z138.enum(["fr4", "fr1", "flex"]).default("fr4"),
3162
- solder_mask_color: z138.string().optional(),
3163
- silkscreen_color: z138.string().optional(),
3189
+ outline: z139.array(point).optional(),
3190
+ shape: z139.enum(["rect", "polygon"]).optional(),
3191
+ material: z139.enum(["fr4", "fr1", "flex"]).default("fr4"),
3192
+ solder_mask_color: z139.string().optional(),
3193
+ silkscreen_color: z139.string().optional(),
3164
3194
  anchor_position: point.optional(),
3165
3195
  anchor_alignment: ninePointAnchor.optional(),
3166
- position_mode: z138.enum(["relative_to_panel_anchor", "none"]).optional()
3196
+ position_mode: z139.enum(["relative_to_panel_anchor", "none"]).optional()
3167
3197
  }).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
3168
3198
  expectTypesMatch(true);
3169
3199
 
3170
3200
  // src/pcb/pcb_bend.ts
3171
- import { z as z139 } from "zod";
3201
+ import { z as z140 } from "zod";
3172
3202
  var finite_point = point.extend({
3173
- x: length.pipe(z139.number().finite()),
3174
- y: length.pipe(z139.number().finite())
3203
+ x: length.pipe(z140.number().finite()),
3204
+ y: length.pipe(z140.number().finite())
3175
3205
  });
3176
- var pcb_bend = z139.object({
3177
- type: z139.literal("pcb_bend"),
3206
+ var pcb_bend = z140.object({
3207
+ type: z140.literal("pcb_bend"),
3178
3208
  pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
3179
- pcb_board_id: z139.string(),
3180
- pcb_group_id: z139.string().optional(),
3181
- subcircuit_id: z139.string().optional(),
3182
- name: z139.string().optional(),
3209
+ pcb_board_id: z140.string(),
3210
+ pcb_group_id: z140.string().optional(),
3211
+ subcircuit_id: z140.string().optional(),
3212
+ name: z140.string().optional(),
3183
3213
  start: finite_point,
3184
3214
  end: finite_point,
3185
- bend_angle: rotation.pipe(z139.number().finite()),
3186
- bend_radius: length.pipe(z139.number().finite().positive()),
3187
- bend_side: z139.enum(["left", "right"])
3215
+ bend_angle: rotation.pipe(z140.number().finite()),
3216
+ bend_radius: length.pipe(z140.number().finite().positive()),
3217
+ bend_side: z140.enum(["left", "right"])
3188
3218
  }).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
3189
3219
  message: "Bend centerline endpoints must be distinct",
3190
3220
  path: ["end"]
@@ -3194,123 +3224,123 @@ var pcb_bend = z139.object({
3194
3224
  expectTypesMatch(true);
3195
3225
 
3196
3226
  // src/pcb/pcb_stiffener.ts
3197
- import { z as z140 } from "zod";
3198
- var positive_length = length.pipe(z140.number().finite().positive());
3227
+ import { z as z141 } from "zod";
3228
+ var positive_length = length.pipe(z141.number().finite().positive());
3199
3229
  var finite_point2 = point.extend({
3200
- x: length.pipe(z140.number().finite()),
3201
- y: length.pipe(z140.number().finite())
3230
+ x: length.pipe(z141.number().finite()),
3231
+ y: length.pipe(z141.number().finite())
3202
3232
  });
3203
- var pcb_stiffener_base = z140.object({
3204
- type: z140.literal("pcb_stiffener"),
3233
+ var pcb_stiffener_base = z141.object({
3234
+ type: z141.literal("pcb_stiffener"),
3205
3235
  pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
3206
- pcb_board_id: z140.string(),
3207
- pcb_group_id: z140.string().optional(),
3208
- subcircuit_id: z140.string().optional(),
3209
- name: z140.string().optional(),
3210
- layer: z140.enum(["top", "bottom"]),
3211
- material: z140.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
3236
+ pcb_board_id: z141.string(),
3237
+ pcb_group_id: z141.string().optional(),
3238
+ subcircuit_id: z141.string().optional(),
3239
+ name: z141.string().optional(),
3240
+ layer: z141.enum(["top", "bottom"]),
3241
+ material: z141.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
3212
3242
  thickness: positive_length,
3213
- adhesive_thickness: length.pipe(z140.number().finite().nonnegative()).optional()
3243
+ adhesive_thickness: length.pipe(z141.number().finite().nonnegative()).optional()
3214
3244
  });
3215
3245
  var pcb_stiffener_rect = pcb_stiffener_base.extend({
3216
- shape: z140.literal("rect"),
3246
+ shape: z141.literal("rect"),
3217
3247
  center: finite_point2,
3218
- rotation: rotation.pipe(z140.number().finite()).optional(),
3248
+ rotation: rotation.pipe(z141.number().finite()).optional(),
3219
3249
  width: positive_length,
3220
3250
  height: positive_length,
3221
- outline: z140.never().optional()
3251
+ outline: z141.never().optional()
3222
3252
  });
3223
3253
  expectTypesMatch(true);
3224
3254
  var pcb_stiffener_polygon = pcb_stiffener_base.extend({
3225
- shape: z140.literal("polygon"),
3226
- outline: z140.array(finite_point2).min(3).refine((points) => {
3255
+ shape: z141.literal("polygon"),
3256
+ outline: z141.array(finite_point2).min(3).refine((points) => {
3227
3257
  const twice_area = points.reduce((sum, p, i) => {
3228
3258
  const next = points[(i + 1) % points.length];
3229
3259
  return sum + p.x * next.y - next.x * p.y;
3230
3260
  }, 0);
3231
3261
  return Number.isFinite(twice_area) && twice_area !== 0;
3232
3262
  }, "Stiffener outline must enclose a nonzero area"),
3233
- center: z140.never().optional(),
3234
- rotation: z140.never().optional(),
3235
- width: z140.never().optional(),
3236
- height: z140.never().optional()
3263
+ center: z141.never().optional(),
3264
+ rotation: z141.never().optional(),
3265
+ width: z141.never().optional(),
3266
+ height: z141.never().optional()
3237
3267
  });
3238
3268
  expectTypesMatch(
3239
3269
  true
3240
3270
  );
3241
- var pcb_stiffener = z140.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
3271
+ var pcb_stiffener = z141.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
3242
3272
  "Defines bonded mechanical PCB reinforcement without adding copper layers"
3243
3273
  );
3244
3274
  expectTypesMatch(true);
3245
3275
 
3246
3276
  // src/pcb/pcb_panel.ts
3247
- import { z as z141 } from "zod";
3248
- var pcb_panel = z141.object({
3249
- type: z141.literal("pcb_panel"),
3277
+ import { z as z142 } from "zod";
3278
+ var pcb_panel = z142.object({
3279
+ type: z142.literal("pcb_panel"),
3250
3280
  pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
3251
3281
  width: length,
3252
3282
  height: length,
3253
3283
  center: point,
3254
3284
  thickness: length.optional().default(1.4),
3255
- covered_with_solder_mask: z141.boolean().optional().default(true)
3285
+ covered_with_solder_mask: z142.boolean().optional().default(true)
3256
3286
  }).describe("Defines a PCB panel that can contain multiple boards");
3257
3287
  expectTypesMatch(true);
3258
3288
 
3259
3289
  // src/pcb/pcb_placement_error.ts
3260
- import { z as z142 } from "zod";
3290
+ import { z as z143 } from "zod";
3261
3291
  var pcb_placement_error = base_circuit_json_error.extend({
3262
- type: z142.literal("pcb_placement_error"),
3292
+ type: z143.literal("pcb_placement_error"),
3263
3293
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
3264
- error_type: z142.literal("pcb_placement_error").default("pcb_placement_error"),
3265
- subcircuit_id: z142.string().optional()
3294
+ error_type: z143.literal("pcb_placement_error").default("pcb_placement_error"),
3295
+ subcircuit_id: z143.string().optional()
3266
3296
  }).describe("Defines a placement error on the PCB");
3267
3297
  expectTypesMatch(true);
3268
3298
 
3269
3299
  // src/pcb/pcb_packing_error.ts
3270
- import { z as z143 } from "zod";
3300
+ import { z as z144 } from "zod";
3271
3301
  var pcb_packing_error = base_circuit_json_error.extend({
3272
- type: z143.literal("pcb_packing_error"),
3302
+ type: z144.literal("pcb_packing_error"),
3273
3303
  pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
3274
- error_type: z143.literal("pcb_packing_error").default("pcb_packing_error"),
3275
- pcb_group_id: z143.string().optional(),
3276
- subcircuit_id: z143.string().optional()
3304
+ error_type: z144.literal("pcb_packing_error").default("pcb_packing_error"),
3305
+ pcb_group_id: z144.string().optional(),
3306
+ subcircuit_id: z144.string().optional()
3277
3307
  }).describe("Defines a failure to pack PCB components within layout bounds");
3278
3308
  expectTypesMatch(true);
3279
3309
 
3280
3310
  // src/pcb/pcb_panelization_placement_error.ts
3281
- import { z as z144 } from "zod";
3311
+ import { z as z145 } from "zod";
3282
3312
  var pcb_panelization_placement_error = base_circuit_json_error.extend({
3283
- type: z144.literal("pcb_panelization_placement_error"),
3313
+ type: z145.literal("pcb_panelization_placement_error"),
3284
3314
  pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
3285
3315
  "pcb_panelization_placement_error"
3286
3316
  ),
3287
- error_type: z144.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
3288
- pcb_panel_id: z144.string().optional(),
3289
- pcb_board_id: z144.string().optional(),
3290
- subcircuit_id: z144.string().optional()
3317
+ error_type: z145.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
3318
+ pcb_panel_id: z145.string().optional(),
3319
+ pcb_board_id: z145.string().optional(),
3320
+ subcircuit_id: z145.string().optional()
3291
3321
  }).describe("Defines a panelization placement error on the PCB");
3292
3322
  expectTypesMatch(true);
3293
3323
 
3294
3324
  // src/pcb/pcb_trace_hint.ts
3295
- import { z as z145 } from "zod";
3296
- var pcb_trace_hint = z145.object({
3297
- type: z145.literal("pcb_trace_hint"),
3325
+ import { z as z146 } from "zod";
3326
+ var pcb_trace_hint = z146.object({
3327
+ type: z146.literal("pcb_trace_hint"),
3298
3328
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
3299
- pcb_port_id: z145.string(),
3300
- pcb_component_id: z145.string(),
3301
- route: z145.array(route_hint_point),
3302
- subcircuit_id: z145.string().optional()
3329
+ pcb_port_id: z146.string(),
3330
+ pcb_component_id: z146.string(),
3331
+ route: z146.array(route_hint_point),
3332
+ subcircuit_id: z146.string().optional()
3303
3333
  }).describe("A hint that can be used during generation of a PCB trace");
3304
3334
  expectTypesMatch(true);
3305
3335
 
3306
3336
  // src/pcb/pcb_silkscreen_line.ts
3307
- import { z as z146 } from "zod";
3308
- var pcb_silkscreen_line = z146.object({
3309
- type: z146.literal("pcb_silkscreen_line"),
3337
+ import { z as z147 } from "zod";
3338
+ var pcb_silkscreen_line = z147.object({
3339
+ type: z147.literal("pcb_silkscreen_line"),
3310
3340
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
3311
- pcb_component_id: z146.string(),
3312
- pcb_group_id: z146.string().optional(),
3313
- subcircuit_id: z146.string().optional(),
3341
+ pcb_component_id: z147.string(),
3342
+ pcb_group_id: z147.string().optional(),
3343
+ subcircuit_id: z147.string().optional(),
3314
3344
  stroke_width: distance.default("0.1mm"),
3315
3345
  x1: distance,
3316
3346
  y1: distance,
@@ -3321,32 +3351,32 @@ var pcb_silkscreen_line = z146.object({
3321
3351
  expectTypesMatch(true);
3322
3352
 
3323
3353
  // src/pcb/pcb_silkscreen_path.ts
3324
- import { z as z147 } from "zod";
3325
- var pcb_silkscreen_path = z147.object({
3326
- type: z147.literal("pcb_silkscreen_path"),
3354
+ import { z as z148 } from "zod";
3355
+ var pcb_silkscreen_path = z148.object({
3356
+ type: z148.literal("pcb_silkscreen_path"),
3327
3357
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
3328
- pcb_component_id: z147.string(),
3329
- pcb_group_id: z147.string().optional(),
3330
- subcircuit_id: z147.string().optional(),
3358
+ pcb_component_id: z148.string(),
3359
+ pcb_group_id: z148.string().optional(),
3360
+ subcircuit_id: z148.string().optional(),
3331
3361
  layer: visible_layer,
3332
- route: z147.array(point),
3362
+ route: z148.array(point),
3333
3363
  stroke_width: length
3334
3364
  }).describe("Defines a silkscreen path on the PCB");
3335
3365
  expectTypesMatch(true);
3336
3366
 
3337
3367
  // src/pcb/pcb_silkscreen_text.ts
3338
- import { z as z148 } from "zod";
3339
- var pcb_silkscreen_text = z148.object({
3340
- type: z148.literal("pcb_silkscreen_text"),
3368
+ import { z as z149 } from "zod";
3369
+ var pcb_silkscreen_text = z149.object({
3370
+ type: z149.literal("pcb_silkscreen_text"),
3341
3371
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
3342
- pcb_group_id: z148.string().optional(),
3343
- subcircuit_id: z148.string().optional(),
3344
- font: z148.literal("tscircuit2024").default("tscircuit2024"),
3372
+ pcb_group_id: z149.string().optional(),
3373
+ subcircuit_id: z149.string().optional(),
3374
+ font: z149.literal("tscircuit2024").default("tscircuit2024"),
3345
3375
  font_size: distance.default("0.2mm"),
3346
- pcb_component_id: z148.string(),
3347
- text: z148.string(),
3348
- is_knockout: z148.boolean().default(false).optional(),
3349
- knockout_padding: z148.object({
3376
+ pcb_component_id: z149.string(),
3377
+ text: z149.string(),
3378
+ is_knockout: z149.boolean().default(false).optional(),
3379
+ knockout_padding: z149.object({
3350
3380
  left: length,
3351
3381
  top: length,
3352
3382
  bottom: length,
@@ -3357,27 +3387,27 @@ var pcb_silkscreen_text = z148.object({
3357
3387
  bottom: "0.2mm",
3358
3388
  right: "0.2mm"
3359
3389
  }).optional(),
3360
- ccw_rotation: z148.number().optional(),
3390
+ ccw_rotation: z149.number().optional(),
3361
3391
  layer: layer_ref,
3362
- is_mirrored: z148.boolean().default(false).optional(),
3392
+ is_mirrored: z149.boolean().default(false).optional(),
3363
3393
  anchor_position: point.default({ x: 0, y: 0 }),
3364
3394
  anchor_alignment: ninePointAnchor.default("center")
3365
3395
  }).describe("Defines silkscreen text on the PCB");
3366
3396
  expectTypesMatch(true);
3367
3397
 
3368
3398
  // src/pcb/pcb_copper_text.ts
3369
- import { z as z149 } from "zod";
3370
- var pcb_copper_text = z149.object({
3371
- type: z149.literal("pcb_copper_text"),
3399
+ import { z as z150 } from "zod";
3400
+ var pcb_copper_text = z150.object({
3401
+ type: z150.literal("pcb_copper_text"),
3372
3402
  pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
3373
- pcb_group_id: z149.string().optional(),
3374
- subcircuit_id: z149.string().optional(),
3375
- font: z149.literal("tscircuit2024").default("tscircuit2024"),
3403
+ pcb_group_id: z150.string().optional(),
3404
+ subcircuit_id: z150.string().optional(),
3405
+ font: z150.literal("tscircuit2024").default("tscircuit2024"),
3376
3406
  font_size: distance.default("0.2mm"),
3377
- pcb_component_id: z149.string(),
3378
- text: z149.string(),
3379
- is_knockout: z149.boolean().default(false).optional(),
3380
- knockout_padding: z149.object({
3407
+ pcb_component_id: z150.string(),
3408
+ text: z150.string(),
3409
+ is_knockout: z150.boolean().default(false).optional(),
3410
+ knockout_padding: z150.object({
3381
3411
  left: length,
3382
3412
  top: length,
3383
3413
  bottom: length,
@@ -3388,61 +3418,61 @@ var pcb_copper_text = z149.object({
3388
3418
  bottom: "0.2mm",
3389
3419
  right: "0.2mm"
3390
3420
  }).optional(),
3391
- ccw_rotation: z149.number().optional(),
3421
+ ccw_rotation: z150.number().optional(),
3392
3422
  layer: layer_ref,
3393
- is_mirrored: z149.boolean().default(false).optional(),
3423
+ is_mirrored: z150.boolean().default(false).optional(),
3394
3424
  anchor_position: point.default({ x: 0, y: 0 }),
3395
3425
  anchor_alignment: ninePointAnchor.default("center")
3396
3426
  }).describe("Defines copper text on the PCB");
3397
3427
  expectTypesMatch(true);
3398
3428
 
3399
3429
  // src/pcb/pcb_silkscreen_rect.ts
3400
- import { z as z150 } from "zod";
3401
- var pcb_silkscreen_rect = z150.object({
3402
- type: z150.literal("pcb_silkscreen_rect"),
3430
+ import { z as z151 } from "zod";
3431
+ var pcb_silkscreen_rect = z151.object({
3432
+ type: z151.literal("pcb_silkscreen_rect"),
3403
3433
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
3404
- pcb_component_id: z150.string(),
3405
- pcb_group_id: z150.string().optional(),
3406
- subcircuit_id: z150.string().optional(),
3434
+ pcb_component_id: z151.string(),
3435
+ pcb_group_id: z151.string().optional(),
3436
+ subcircuit_id: z151.string().optional(),
3407
3437
  center: point,
3408
3438
  width: length,
3409
3439
  height: length,
3410
3440
  layer: layer_ref,
3411
3441
  stroke_width: length.default("1mm"),
3412
3442
  corner_radius: length.optional(),
3413
- is_filled: z150.boolean().default(true).optional(),
3414
- has_stroke: z150.boolean().optional(),
3415
- is_stroke_dashed: z150.boolean().optional(),
3416
- ccw_rotation: z150.number().optional()
3443
+ is_filled: z151.boolean().default(true).optional(),
3444
+ has_stroke: z151.boolean().optional(),
3445
+ is_stroke_dashed: z151.boolean().optional(),
3446
+ ccw_rotation: z151.number().optional()
3417
3447
  }).describe("Defines a silkscreen rect on the PCB");
3418
3448
  expectTypesMatch(true);
3419
3449
 
3420
3450
  // src/pcb/pcb_silkscreen_circle.ts
3421
- import { z as z151 } from "zod";
3422
- var pcb_silkscreen_circle = z151.object({
3423
- type: z151.literal("pcb_silkscreen_circle"),
3451
+ import { z as z152 } from "zod";
3452
+ var pcb_silkscreen_circle = z152.object({
3453
+ type: z152.literal("pcb_silkscreen_circle"),
3424
3454
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
3425
3455
  "pcb_silkscreen_circle"
3426
3456
  ),
3427
- pcb_component_id: z151.string(),
3428
- pcb_group_id: z151.string().optional(),
3429
- subcircuit_id: z151.string().optional(),
3457
+ pcb_component_id: z152.string(),
3458
+ pcb_group_id: z152.string().optional(),
3459
+ subcircuit_id: z152.string().optional(),
3430
3460
  center: point,
3431
3461
  radius: length,
3432
3462
  layer: visible_layer,
3433
3463
  stroke_width: length.default("1mm"),
3434
- is_filled: z151.boolean().optional()
3464
+ is_filled: z152.boolean().optional()
3435
3465
  }).describe("Defines a silkscreen circle on the PCB");
3436
3466
  expectTypesMatch(true);
3437
3467
 
3438
3468
  // src/pcb/pcb_silkscreen_oval.ts
3439
- import { z as z152 } from "zod";
3440
- var pcb_silkscreen_oval = z152.object({
3441
- type: z152.literal("pcb_silkscreen_oval"),
3469
+ import { z as z153 } from "zod";
3470
+ var pcb_silkscreen_oval = z153.object({
3471
+ type: z153.literal("pcb_silkscreen_oval"),
3442
3472
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
3443
- pcb_component_id: z152.string(),
3444
- pcb_group_id: z152.string().optional(),
3445
- subcircuit_id: z152.string().optional(),
3473
+ pcb_component_id: z153.string(),
3474
+ pcb_group_id: z153.string().optional(),
3475
+ subcircuit_id: z153.string().optional(),
3446
3476
  center: point,
3447
3477
  radius_x: distance,
3448
3478
  radius_y: distance,
@@ -3452,267 +3482,267 @@ var pcb_silkscreen_oval = z152.object({
3452
3482
  expectTypesMatch(true);
3453
3483
 
3454
3484
  // src/pcb/pcb_silkscreen_graphic.ts
3455
- import { z as z153 } from "zod";
3456
- var pcb_silkscreen_graphic_base = z153.object({
3457
- type: z153.literal("pcb_silkscreen_graphic"),
3485
+ import { z as z154 } from "zod";
3486
+ var pcb_silkscreen_graphic_base = z154.object({
3487
+ type: z154.literal("pcb_silkscreen_graphic"),
3458
3488
  pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
3459
3489
  "pcb_silkscreen_graphic"
3460
3490
  ),
3461
- pcb_component_id: z153.string(),
3462
- pcb_group_id: z153.string().optional(),
3463
- subcircuit_id: z153.string().optional(),
3491
+ pcb_component_id: z154.string(),
3492
+ pcb_group_id: z154.string().optional(),
3493
+ subcircuit_id: z154.string().optional(),
3464
3494
  layer: visible_layer,
3465
3495
  image_asset: asset.optional()
3466
3496
  });
3467
3497
  var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
3468
- shape: z153.literal("brep"),
3498
+ shape: z154.literal("brep"),
3469
3499
  brep_shape
3470
3500
  }).describe("Defines a BRep silkscreen graphic on the PCB");
3471
3501
  expectTypesMatch(
3472
3502
  true
3473
3503
  );
3474
- var pcb_silkscreen_graphic = z153.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
3504
+ var pcb_silkscreen_graphic = z154.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
3475
3505
  expectTypesMatch(true);
3476
3506
 
3477
3507
  // src/pcb/pcb_silkscreen_pill.ts
3478
- import { z as z154 } from "zod";
3479
- var pcb_silkscreen_pill = z154.object({
3480
- type: z154.literal("pcb_silkscreen_pill"),
3508
+ import { z as z155 } from "zod";
3509
+ var pcb_silkscreen_pill = z155.object({
3510
+ type: z155.literal("pcb_silkscreen_pill"),
3481
3511
  pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
3482
- pcb_component_id: z154.string(),
3483
- pcb_group_id: z154.string().optional(),
3484
- subcircuit_id: z154.string().optional(),
3512
+ pcb_component_id: z155.string(),
3513
+ pcb_group_id: z155.string().optional(),
3514
+ subcircuit_id: z155.string().optional(),
3485
3515
  center: point,
3486
3516
  width: length,
3487
3517
  height: length,
3488
3518
  layer: layer_ref,
3489
- ccw_rotation: z154.number().optional()
3519
+ ccw_rotation: z155.number().optional()
3490
3520
  }).describe("Defines a silkscreen pill on the PCB");
3491
3521
  expectTypesMatch(true);
3492
3522
 
3493
3523
  // src/pcb/pcb_fabrication_note_text.ts
3494
- import { z as z155 } from "zod";
3495
- var pcb_fabrication_note_text = z155.object({
3496
- type: z155.literal("pcb_fabrication_note_text"),
3524
+ import { z as z156 } from "zod";
3525
+ var pcb_fabrication_note_text = z156.object({
3526
+ type: z156.literal("pcb_fabrication_note_text"),
3497
3527
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
3498
3528
  "pcb_fabrication_note_text"
3499
3529
  ),
3500
- subcircuit_id: z155.string().optional(),
3501
- pcb_group_id: z155.string().optional(),
3502
- font: z155.literal("tscircuit2024").default("tscircuit2024"),
3530
+ subcircuit_id: z156.string().optional(),
3531
+ pcb_group_id: z156.string().optional(),
3532
+ font: z156.literal("tscircuit2024").default("tscircuit2024"),
3503
3533
  font_size: distance.default("1mm"),
3504
- pcb_component_id: z155.string(),
3505
- text: z155.string(),
3506
- ccw_rotation: z155.number().optional(),
3534
+ pcb_component_id: z156.string(),
3535
+ text: z156.string(),
3536
+ ccw_rotation: z156.number().optional(),
3507
3537
  layer: visible_layer,
3508
3538
  anchor_position: point.default({ x: 0, y: 0 }),
3509
- anchor_alignment: z155.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3510
- color: z155.string().optional()
3539
+ anchor_alignment: z156.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3540
+ color: z156.string().optional()
3511
3541
  }).describe(
3512
3542
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
3513
3543
  );
3514
3544
  expectTypesMatch(true);
3515
3545
 
3516
3546
  // src/pcb/pcb_fabrication_note_path.ts
3517
- import { z as z156 } from "zod";
3518
- var pcb_fabrication_note_path = z156.object({
3519
- type: z156.literal("pcb_fabrication_note_path"),
3547
+ import { z as z157 } from "zod";
3548
+ var pcb_fabrication_note_path = z157.object({
3549
+ type: z157.literal("pcb_fabrication_note_path"),
3520
3550
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
3521
3551
  "pcb_fabrication_note_path"
3522
3552
  ),
3523
- pcb_component_id: z156.string(),
3524
- subcircuit_id: z156.string().optional(),
3553
+ pcb_component_id: z157.string(),
3554
+ subcircuit_id: z157.string().optional(),
3525
3555
  layer: layer_ref,
3526
- route: z156.array(point),
3556
+ route: z157.array(point),
3527
3557
  stroke_width: length,
3528
- color: z156.string().optional(),
3529
- is_filled: z156.boolean().optional(),
3530
- has_stroke: z156.boolean().optional()
3558
+ color: z157.string().optional(),
3559
+ is_filled: z157.boolean().optional(),
3560
+ has_stroke: z157.boolean().optional()
3531
3561
  }).describe(
3532
3562
  "Defines a fabrication path on the PCB for fabricators or assemblers"
3533
3563
  );
3534
3564
  expectTypesMatch(true);
3535
3565
 
3536
3566
  // src/pcb/pcb_fabrication_note_rect.ts
3537
- import { z as z157 } from "zod";
3538
- var pcb_fabrication_note_rect = z157.object({
3539
- type: z157.literal("pcb_fabrication_note_rect"),
3567
+ import { z as z158 } from "zod";
3568
+ var pcb_fabrication_note_rect = z158.object({
3569
+ type: z158.literal("pcb_fabrication_note_rect"),
3540
3570
  pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
3541
3571
  "pcb_fabrication_note_rect"
3542
3572
  ),
3543
- pcb_component_id: z157.string(),
3544
- pcb_group_id: z157.string().optional(),
3545
- subcircuit_id: z157.string().optional(),
3573
+ pcb_component_id: z158.string(),
3574
+ pcb_group_id: z158.string().optional(),
3575
+ subcircuit_id: z158.string().optional(),
3546
3576
  center: point,
3547
3577
  width: length,
3548
3578
  height: length,
3549
3579
  layer: visible_layer,
3550
3580
  stroke_width: length.default("0.1mm"),
3551
3581
  corner_radius: length.optional(),
3552
- is_filled: z157.boolean().optional(),
3553
- has_stroke: z157.boolean().optional(),
3554
- is_stroke_dashed: z157.boolean().optional(),
3555
- color: z157.string().optional()
3582
+ is_filled: z158.boolean().optional(),
3583
+ has_stroke: z158.boolean().optional(),
3584
+ is_stroke_dashed: z158.boolean().optional(),
3585
+ color: z158.string().optional()
3556
3586
  }).describe("Defines a fabrication note rectangle on the PCB");
3557
3587
  expectTypesMatch(true);
3558
3588
 
3559
3589
  // src/pcb/pcb_fabrication_note_dimension.ts
3560
- import { z as z158 } from "zod";
3561
- var pcb_fabrication_note_dimension = z158.object({
3562
- type: z158.literal("pcb_fabrication_note_dimension"),
3590
+ import { z as z159 } from "zod";
3591
+ var pcb_fabrication_note_dimension = z159.object({
3592
+ type: z159.literal("pcb_fabrication_note_dimension"),
3563
3593
  pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
3564
3594
  "pcb_fabrication_note_dimension"
3565
3595
  ),
3566
- pcb_component_id: z158.string(),
3567
- pcb_group_id: z158.string().optional(),
3568
- subcircuit_id: z158.string().optional(),
3596
+ pcb_component_id: z159.string(),
3597
+ pcb_group_id: z159.string().optional(),
3598
+ subcircuit_id: z159.string().optional(),
3569
3599
  layer: visible_layer,
3570
3600
  from: point,
3571
3601
  to: point,
3572
- text: z158.string().optional(),
3573
- text_ccw_rotation: z158.number().optional(),
3602
+ text: z159.string().optional(),
3603
+ text_ccw_rotation: z159.number().optional(),
3574
3604
  offset: length.optional(),
3575
3605
  offset_distance: length.optional(),
3576
- offset_direction: z158.object({
3577
- x: z158.number(),
3578
- y: z158.number()
3606
+ offset_direction: z159.object({
3607
+ x: z159.number(),
3608
+ y: z159.number()
3579
3609
  }).optional(),
3580
- font: z158.literal("tscircuit2024").default("tscircuit2024"),
3610
+ font: z159.literal("tscircuit2024").default("tscircuit2024"),
3581
3611
  font_size: length.default("1mm"),
3582
- color: z158.string().optional(),
3612
+ color: z159.string().optional(),
3583
3613
  arrow_size: length.default("1mm")
3584
3614
  }).describe("Defines a measurement annotation within PCB fabrication notes");
3585
3615
  expectTypesMatch(true);
3586
3616
 
3587
3617
  // src/pcb/pcb_note_text.ts
3588
- import { z as z159 } from "zod";
3589
- var pcb_note_text = z159.object({
3590
- type: z159.literal("pcb_note_text"),
3591
- pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
3592
- pcb_component_id: z159.string().optional(),
3593
- pcb_group_id: z159.string().optional(),
3594
- subcircuit_id: z159.string().optional(),
3595
- name: z159.string().optional(),
3596
- font: z159.literal("tscircuit2024").default("tscircuit2024"),
3597
- font_size: distance.default("1mm"),
3598
- text: z159.string().optional(),
3599
- anchor_position: point.default({ x: 0, y: 0 }),
3600
- anchor_alignment: z159.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3601
- layer: visible_layer.default("top"),
3602
- is_mirrored_from_top_view: z159.boolean().optional(),
3603
- color: z159.string().optional()
3604
- }).describe("Defines a documentation note in text on the PCB");
3605
- expectTypesMatch(true);
3606
-
3607
- // src/pcb/pcb_note_rect.ts
3608
3618
  import { z as z160 } from "zod";
3609
- var pcb_note_rect = z160.object({
3610
- type: z160.literal("pcb_note_rect"),
3611
- pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
3619
+ var pcb_note_text = z160.object({
3620
+ type: z160.literal("pcb_note_text"),
3621
+ pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
3612
3622
  pcb_component_id: z160.string().optional(),
3613
3623
  pcb_group_id: z160.string().optional(),
3614
3624
  subcircuit_id: z160.string().optional(),
3615
3625
  name: z160.string().optional(),
3626
+ font: z160.literal("tscircuit2024").default("tscircuit2024"),
3627
+ font_size: distance.default("1mm"),
3616
3628
  text: z160.string().optional(),
3617
- center: point,
3618
- width: length,
3619
- height: length,
3629
+ anchor_position: point.default({ x: 0, y: 0 }),
3630
+ anchor_alignment: z160.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
3620
3631
  layer: visible_layer.default("top"),
3621
- stroke_width: length.default("0.1mm"),
3622
- corner_radius: length.optional(),
3623
- is_filled: z160.boolean().optional(),
3624
- has_stroke: z160.boolean().optional(),
3625
- is_stroke_dashed: z160.boolean().optional(),
3632
+ is_mirrored_from_top_view: z160.boolean().optional(),
3626
3633
  color: z160.string().optional()
3627
- }).describe("Defines a rectangular documentation note on the PCB");
3634
+ }).describe("Defines a documentation note in text on the PCB");
3628
3635
  expectTypesMatch(true);
3629
3636
 
3630
- // src/pcb/pcb_note_path.ts
3637
+ // src/pcb/pcb_note_rect.ts
3631
3638
  import { z as z161 } from "zod";
3632
- var pcb_note_path = z161.object({
3633
- type: z161.literal("pcb_note_path"),
3634
- pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
3639
+ var pcb_note_rect = z161.object({
3640
+ type: z161.literal("pcb_note_rect"),
3641
+ pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
3635
3642
  pcb_component_id: z161.string().optional(),
3636
3643
  pcb_group_id: z161.string().optional(),
3637
3644
  subcircuit_id: z161.string().optional(),
3638
3645
  name: z161.string().optional(),
3639
3646
  text: z161.string().optional(),
3640
- route: z161.array(point),
3647
+ center: point,
3648
+ width: length,
3649
+ height: length,
3641
3650
  layer: visible_layer.default("top"),
3642
3651
  stroke_width: length.default("0.1mm"),
3652
+ corner_radius: length.optional(),
3653
+ is_filled: z161.boolean().optional(),
3654
+ has_stroke: z161.boolean().optional(),
3655
+ is_stroke_dashed: z161.boolean().optional(),
3643
3656
  color: z161.string().optional()
3644
- }).describe("Defines a polyline documentation note on the PCB");
3657
+ }).describe("Defines a rectangular documentation note on the PCB");
3645
3658
  expectTypesMatch(true);
3646
3659
 
3647
- // src/pcb/pcb_note_line.ts
3660
+ // src/pcb/pcb_note_path.ts
3648
3661
  import { z as z162 } from "zod";
3649
- var pcb_note_line = z162.object({
3650
- type: z162.literal("pcb_note_line"),
3651
- pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
3662
+ var pcb_note_path = z162.object({
3663
+ type: z162.literal("pcb_note_path"),
3664
+ pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
3652
3665
  pcb_component_id: z162.string().optional(),
3653
3666
  pcb_group_id: z162.string().optional(),
3654
3667
  subcircuit_id: z162.string().optional(),
3655
3668
  name: z162.string().optional(),
3656
3669
  text: z162.string().optional(),
3670
+ route: z162.array(point),
3671
+ layer: visible_layer.default("top"),
3672
+ stroke_width: length.default("0.1mm"),
3673
+ color: z162.string().optional()
3674
+ }).describe("Defines a polyline documentation note on the PCB");
3675
+ expectTypesMatch(true);
3676
+
3677
+ // src/pcb/pcb_note_line.ts
3678
+ import { z as z163 } from "zod";
3679
+ var pcb_note_line = z163.object({
3680
+ type: z163.literal("pcb_note_line"),
3681
+ pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
3682
+ pcb_component_id: z163.string().optional(),
3683
+ pcb_group_id: z163.string().optional(),
3684
+ subcircuit_id: z163.string().optional(),
3685
+ name: z163.string().optional(),
3686
+ text: z163.string().optional(),
3657
3687
  x1: distance,
3658
3688
  y1: distance,
3659
3689
  x2: distance,
3660
3690
  y2: distance,
3661
3691
  layer: visible_layer.default("top"),
3662
3692
  stroke_width: distance.default("0.1mm"),
3663
- color: z162.string().optional(),
3664
- is_dashed: z162.boolean().optional()
3693
+ color: z163.string().optional(),
3694
+ is_dashed: z163.boolean().optional()
3665
3695
  }).describe("Defines a straight documentation note line on the PCB");
3666
3696
  expectTypesMatch(true);
3667
3697
 
3668
3698
  // src/pcb/pcb_note_dimension.ts
3669
- import { z as z163 } from "zod";
3670
- var pcb_note_dimension = z163.object({
3671
- type: z163.literal("pcb_note_dimension"),
3699
+ import { z as z164 } from "zod";
3700
+ var pcb_note_dimension = z164.object({
3701
+ type: z164.literal("pcb_note_dimension"),
3672
3702
  pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
3673
- pcb_component_id: z163.string().optional(),
3674
- pcb_group_id: z163.string().optional(),
3675
- subcircuit_id: z163.string().optional(),
3676
- name: z163.string().optional(),
3703
+ pcb_component_id: z164.string().optional(),
3704
+ pcb_group_id: z164.string().optional(),
3705
+ subcircuit_id: z164.string().optional(),
3706
+ name: z164.string().optional(),
3677
3707
  from: point,
3678
3708
  to: point,
3679
- text: z163.string().optional(),
3680
- text_ccw_rotation: z163.number().optional(),
3709
+ text: z164.string().optional(),
3710
+ text_ccw_rotation: z164.number().optional(),
3681
3711
  offset_distance: length.optional(),
3682
- offset_direction: z163.object({
3683
- x: z163.number(),
3684
- y: z163.number()
3712
+ offset_direction: z164.object({
3713
+ x: z164.number(),
3714
+ y: z164.number()
3685
3715
  }).optional(),
3686
- font: z163.literal("tscircuit2024").default("tscircuit2024"),
3716
+ font: z164.literal("tscircuit2024").default("tscircuit2024"),
3687
3717
  font_size: length.default("1mm"),
3688
3718
  layer: visible_layer.default("top"),
3689
- color: z163.string().optional(),
3719
+ color: z164.string().optional(),
3690
3720
  arrow_size: length.default("1mm")
3691
3721
  }).describe("Defines a measurement annotation within PCB documentation notes");
3692
3722
  expectTypesMatch(true);
3693
3723
 
3694
3724
  // src/pcb/pcb_footprint_overlap_error.ts
3695
- import { z as z164 } from "zod";
3725
+ import { z as z165 } from "zod";
3696
3726
  var pcb_footprint_overlap_error = base_circuit_json_error.extend({
3697
- type: z164.literal("pcb_footprint_overlap_error"),
3727
+ type: z165.literal("pcb_footprint_overlap_error"),
3698
3728
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3699
- error_type: z164.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
3700
- pcb_smtpad_ids: z164.array(z164.string()).optional(),
3701
- pcb_plated_hole_ids: z164.array(z164.string()).optional(),
3702
- pcb_hole_ids: z164.array(z164.string()).optional(),
3703
- pcb_keepout_ids: z164.array(z164.string()).optional()
3729
+ error_type: z165.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
3730
+ pcb_smtpad_ids: z165.array(z165.string()).optional(),
3731
+ pcb_plated_hole_ids: z165.array(z165.string()).optional(),
3732
+ pcb_hole_ids: z165.array(z165.string()).optional(),
3733
+ pcb_keepout_ids: z165.array(z165.string()).optional()
3704
3734
  }).describe("Error emitted when a pcb footprint overlaps with another element");
3705
3735
  expectTypesMatch(
3706
3736
  true
3707
3737
  );
3708
3738
 
3709
3739
  // src/pcb/pcb_courtyard_overlap_error.ts
3710
- import { z as z165 } from "zod";
3740
+ import { z as z166 } from "zod";
3711
3741
  var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
3712
- type: z165.literal("pcb_courtyard_overlap_error"),
3742
+ type: z166.literal("pcb_courtyard_overlap_error"),
3713
3743
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
3714
- error_type: z165.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
3715
- pcb_component_ids: z165.tuple([z165.string(), z165.string()])
3744
+ error_type: z166.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
3745
+ pcb_component_ids: z166.tuple([z166.string(), z166.string()])
3716
3746
  }).describe(
3717
3747
  "Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
3718
3748
  );
@@ -3721,78 +3751,78 @@ expectTypesMatch(
3721
3751
  );
3722
3752
 
3723
3753
  // src/pcb/pcb_keepout.ts
3724
- import { z as z166 } from "zod";
3725
- var pcb_keepout_outline = z166.object({
3726
- type: z166.literal("pcb_keepout"),
3727
- shape: z166.literal("outline"),
3728
- pcb_group_id: z166.string().optional(),
3729
- subcircuit_id: z166.string().optional(),
3730
- outline: z166.array(point).min(2),
3754
+ import { z as z167 } from "zod";
3755
+ var pcb_keepout_outline = z167.object({
3756
+ type: z167.literal("pcb_keepout"),
3757
+ shape: z167.literal("outline"),
3758
+ pcb_group_id: z167.string().optional(),
3759
+ subcircuit_id: z167.string().optional(),
3760
+ outline: z167.array(point).min(2),
3731
3761
  stroke_width: length,
3732
- pcb_keepout_id: z166.string(),
3733
- layers: z166.array(z166.string()),
3734
- description: z166.string().optional(),
3735
- excluded_pcb_component_ids: z166.array(z166.string()).optional(),
3736
- warning_only: z166.boolean().optional(),
3737
- allow_traces: z166.boolean().optional(),
3738
- allow_placements: z166.boolean().optional()
3739
- });
3740
- var pcb_keepout = z166.object({
3741
- type: z166.literal("pcb_keepout"),
3742
- shape: z166.literal("rect"),
3743
- pcb_group_id: z166.string().optional(),
3744
- subcircuit_id: z166.string().optional(),
3762
+ pcb_keepout_id: z167.string(),
3763
+ layers: z167.array(z167.string()),
3764
+ description: z167.string().optional(),
3765
+ excluded_pcb_component_ids: z167.array(z167.string()).optional(),
3766
+ warning_only: z167.boolean().optional(),
3767
+ allow_traces: z167.boolean().optional(),
3768
+ allow_placements: z167.boolean().optional()
3769
+ });
3770
+ var pcb_keepout = z167.object({
3771
+ type: z167.literal("pcb_keepout"),
3772
+ shape: z167.literal("rect"),
3773
+ pcb_group_id: z167.string().optional(),
3774
+ subcircuit_id: z167.string().optional(),
3745
3775
  center: point,
3746
3776
  width: distance,
3747
3777
  height: distance,
3748
- pcb_keepout_id: z166.string(),
3749
- layers: z166.array(z166.string()),
3778
+ pcb_keepout_id: z167.string(),
3779
+ layers: z167.array(z167.string()),
3750
3780
  // Specify layers where the keepout applies
3751
- description: z166.string().optional(),
3781
+ description: z167.string().optional(),
3752
3782
  // Optional description of the keepout
3753
- excluded_pcb_component_ids: z166.array(z166.string()).optional(),
3754
- warning_only: z166.boolean().optional(),
3755
- allow_traces: z166.boolean().optional(),
3756
- allow_placements: z166.boolean().optional()
3783
+ excluded_pcb_component_ids: z167.array(z167.string()).optional(),
3784
+ warning_only: z167.boolean().optional(),
3785
+ allow_traces: z167.boolean().optional(),
3786
+ allow_placements: z167.boolean().optional()
3757
3787
  }).or(
3758
- z166.object({
3759
- type: z166.literal("pcb_keepout"),
3760
- shape: z166.literal("circle"),
3761
- pcb_group_id: z166.string().optional(),
3762
- subcircuit_id: z166.string().optional(),
3788
+ z167.object({
3789
+ type: z167.literal("pcb_keepout"),
3790
+ shape: z167.literal("circle"),
3791
+ pcb_group_id: z167.string().optional(),
3792
+ subcircuit_id: z167.string().optional(),
3763
3793
  center: point,
3764
3794
  radius: distance,
3765
- pcb_keepout_id: z166.string(),
3766
- layers: z166.array(z166.string()),
3795
+ pcb_keepout_id: z167.string(),
3796
+ layers: z167.array(z167.string()),
3767
3797
  // Specify layers where the keepout applies
3768
- description: z166.string().optional(),
3798
+ description: z167.string().optional(),
3769
3799
  // Optional description of the keepout
3770
- excluded_pcb_component_ids: z166.array(z166.string()).optional(),
3771
- warning_only: z166.boolean().optional(),
3772
- allow_traces: z166.boolean().optional(),
3773
- allow_placements: z166.boolean().optional()
3800
+ excluded_pcb_component_ids: z167.array(z167.string()).optional(),
3801
+ warning_only: z167.boolean().optional(),
3802
+ allow_traces: z167.boolean().optional(),
3803
+ allow_placements: z167.boolean().optional()
3774
3804
  })
3775
3805
  ).or(pcb_keepout_outline);
3776
3806
  expectTypesMatch(true);
3777
3807
  expectTypesMatch(true);
3778
3808
 
3779
3809
  // src/pcb/pcb_keepout_overlap_warning.ts
3780
- import { z as z167 } from "zod";
3781
- var pcb_keepout_overlap_warning = z167.object({
3782
- type: z167.literal("pcb_keepout_overlap_warning"),
3810
+ import { z as z168 } from "zod";
3811
+ var pcb_keepout_overlap_warning = z168.object({
3812
+ type: z168.literal("pcb_keepout_overlap_warning"),
3783
3813
  pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
3784
3814
  "pcb_keepout_overlap_warning"
3785
3815
  ),
3786
- warning_type: z167.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
3787
- message: z167.string(),
3788
- pcb_keepout_id: z167.string(),
3789
- pcb_component_ids: z167.array(z167.string()).optional(),
3790
- pcb_trace_ids: z167.array(z167.string()).optional(),
3791
- pcb_smtpad_ids: z167.array(z167.string()).optional(),
3792
- pcb_plated_hole_ids: z167.array(z167.string()).optional(),
3793
- pcb_via_ids: z167.array(z167.string()).optional(),
3816
+ warning_type: z168.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
3817
+ message: z168.string(),
3818
+ pcb_keepout_id: z168.string(),
3819
+ pcb_component_ids: z168.array(z168.string()).optional(),
3820
+ pcb_trace_ids: z168.array(z168.string()).optional(),
3821
+ pcb_smtpad_ids: z168.array(z168.string()).optional(),
3822
+ pcb_plated_hole_ids: z168.array(z168.string()).optional(),
3823
+ pcb_via_ids: z168.array(z168.string()).optional(),
3794
3824
  center: point.optional(),
3795
- subcircuit_id: z167.string().optional()
3825
+ subcircuit_id: z168.string().optional()
3796
3826
  }).describe(
3797
3827
  "Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
3798
3828
  );
@@ -3801,18 +3831,18 @@ expectTypesMatch(
3801
3831
  );
3802
3832
 
3803
3833
  // src/pcb/pcb_cutout.ts
3804
- import { z as z168 } from "zod";
3805
- var pcb_cutout_base = z168.object({
3806
- type: z168.literal("pcb_cutout"),
3834
+ import { z as z169 } from "zod";
3835
+ var pcb_cutout_base = z169.object({
3836
+ type: z169.literal("pcb_cutout"),
3807
3837
  pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
3808
- pcb_component_id: z168.string().optional(),
3809
- pcb_group_id: z168.string().optional(),
3810
- subcircuit_id: z168.string().optional(),
3811
- pcb_board_id: z168.string().optional(),
3812
- pcb_panel_id: z168.string().optional()
3838
+ pcb_component_id: z169.string().optional(),
3839
+ pcb_group_id: z169.string().optional(),
3840
+ subcircuit_id: z169.string().optional(),
3841
+ pcb_board_id: z169.string().optional(),
3842
+ pcb_panel_id: z169.string().optional()
3813
3843
  });
3814
3844
  var pcb_cutout_rect = pcb_cutout_base.extend({
3815
- shape: z168.literal("rect"),
3845
+ shape: z169.literal("rect"),
3816
3846
  center: point,
3817
3847
  width: length,
3818
3848
  height: length,
@@ -3821,26 +3851,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
3821
3851
  });
3822
3852
  expectTypesMatch(true);
3823
3853
  var pcb_cutout_circle = pcb_cutout_base.extend({
3824
- shape: z168.literal("circle"),
3854
+ shape: z169.literal("circle"),
3825
3855
  center: point,
3826
3856
  radius: length
3827
3857
  });
3828
3858
  expectTypesMatch(true);
3829
3859
  var pcb_cutout_polygon = pcb_cutout_base.extend({
3830
- shape: z168.literal("polygon"),
3831
- points: z168.array(point)
3860
+ shape: z169.literal("polygon"),
3861
+ points: z169.array(point)
3832
3862
  });
3833
3863
  expectTypesMatch(true);
3834
3864
  var pcb_cutout_path = pcb_cutout_base.extend({
3835
- shape: z168.literal("path"),
3836
- route: z168.array(point),
3865
+ shape: z169.literal("path"),
3866
+ route: z169.array(point),
3837
3867
  slot_width: length,
3838
3868
  slot_length: length.optional(),
3839
3869
  space_between_slots: length.optional(),
3840
3870
  slot_corner_radius: length.optional()
3841
3871
  });
3842
3872
  expectTypesMatch(true);
3843
- var pcb_cutout = z168.discriminatedUnion("shape", [
3873
+ var pcb_cutout = z169.discriminatedUnion("shape", [
3844
3874
  pcb_cutout_rect,
3845
3875
  pcb_cutout_circle,
3846
3876
  pcb_cutout_polygon,
@@ -3849,223 +3879,223 @@ var pcb_cutout = z168.discriminatedUnion("shape", [
3849
3879
  expectTypesMatch(true);
3850
3880
 
3851
3881
  // src/pcb/pcb_missing_footprint_error.ts
3852
- import { z as z169 } from "zod";
3882
+ import { z as z170 } from "zod";
3853
3883
  var pcb_missing_footprint_error = base_circuit_json_error.extend({
3854
- type: z169.literal("pcb_missing_footprint_error"),
3884
+ type: z170.literal("pcb_missing_footprint_error"),
3855
3885
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
3856
3886
  "pcb_missing_footprint_error"
3857
3887
  ),
3858
- pcb_group_id: z169.string().optional(),
3859
- subcircuit_id: z169.string().optional(),
3860
- error_type: z169.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
3861
- source_component_id: z169.string()
3888
+ pcb_group_id: z170.string().optional(),
3889
+ subcircuit_id: z170.string().optional(),
3890
+ error_type: z170.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
3891
+ source_component_id: z170.string()
3862
3892
  }).describe("Defines a missing footprint error on the PCB");
3863
3893
  expectTypesMatch(
3864
3894
  true
3865
3895
  );
3866
3896
 
3867
3897
  // src/pcb/external_footprint_load_error.ts
3868
- import { z as z170 } from "zod";
3898
+ import { z as z171 } from "zod";
3869
3899
  var external_footprint_load_error = base_circuit_json_error.extend({
3870
- type: z170.literal("external_footprint_load_error"),
3900
+ type: z171.literal("external_footprint_load_error"),
3871
3901
  external_footprint_load_error_id: getZodPrefixedIdWithDefault(
3872
3902
  "external_footprint_load_error"
3873
3903
  ),
3874
- pcb_component_id: z170.string(),
3875
- source_component_id: z170.string(),
3876
- pcb_group_id: z170.string().optional(),
3877
- subcircuit_id: z170.string().optional(),
3878
- footprinter_string: z170.string().optional(),
3879
- error_type: z170.literal("external_footprint_load_error").default("external_footprint_load_error")
3904
+ pcb_component_id: z171.string(),
3905
+ source_component_id: z171.string(),
3906
+ pcb_group_id: z171.string().optional(),
3907
+ subcircuit_id: z171.string().optional(),
3908
+ footprinter_string: z171.string().optional(),
3909
+ error_type: z171.literal("external_footprint_load_error").default("external_footprint_load_error")
3880
3910
  }).describe("Defines an error when an external footprint fails to load");
3881
3911
  expectTypesMatch(true);
3882
3912
 
3883
3913
  // src/pcb/circuit_json_footprint_load_error.ts
3884
- import { z as z171 } from "zod";
3914
+ import { z as z172 } from "zod";
3885
3915
  var circuit_json_footprint_load_error = base_circuit_json_error.extend({
3886
- type: z171.literal("circuit_json_footprint_load_error"),
3916
+ type: z172.literal("circuit_json_footprint_load_error"),
3887
3917
  circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
3888
3918
  "circuit_json_footprint_load_error"
3889
3919
  ),
3890
- pcb_component_id: z171.string(),
3891
- source_component_id: z171.string(),
3892
- pcb_group_id: z171.string().optional(),
3893
- subcircuit_id: z171.string().optional(),
3894
- error_type: z171.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
3895
- circuit_json: z171.array(z171.any()).optional()
3920
+ pcb_component_id: z172.string(),
3921
+ source_component_id: z172.string(),
3922
+ pcb_group_id: z172.string().optional(),
3923
+ subcircuit_id: z172.string().optional(),
3924
+ error_type: z172.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
3925
+ circuit_json: z172.array(z172.any()).optional()
3896
3926
  }).describe("Defines an error when a circuit JSON footprint fails to load");
3897
3927
  expectTypesMatch(true);
3898
3928
 
3899
3929
  // src/pcb/pcb_group.ts
3900
- import { z as z172 } from "zod";
3901
- var pcb_group = z172.object({
3902
- type: z172.literal("pcb_group"),
3930
+ import { z as z173 } from "zod";
3931
+ var pcb_group = z173.object({
3932
+ type: z173.literal("pcb_group"),
3903
3933
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
3904
- source_group_id: z172.string(),
3905
- is_subcircuit: z172.boolean().optional(),
3906
- subcircuit_id: z172.string().optional(),
3934
+ source_group_id: z173.string(),
3935
+ is_subcircuit: z173.boolean().optional(),
3936
+ subcircuit_id: z173.string().optional(),
3907
3937
  width: length.optional(),
3908
3938
  height: length.optional(),
3909
3939
  center: point,
3910
- display_offset_x: z172.string().optional().describe(
3940
+ display_offset_x: z173.string().optional().describe(
3911
3941
  "How to display the x offset for this group, usually corresponding with how the user specified it"
3912
3942
  ),
3913
- display_offset_y: z172.string().optional().describe(
3943
+ display_offset_y: z173.string().optional().describe(
3914
3944
  "How to display the y offset for this group, usually corresponding with how the user specified it"
3915
3945
  ),
3916
- outline: z172.array(point).optional(),
3946
+ outline: z173.array(point).optional(),
3917
3947
  anchor_position: point.optional(),
3918
3948
  anchor_alignment: ninePointAnchor.default("center"),
3919
- position_mode: z172.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
3920
- positioned_relative_to_pcb_group_id: z172.string().optional(),
3921
- positioned_relative_to_pcb_board_id: z172.string().optional(),
3922
- pcb_component_ids: z172.array(z172.string()),
3923
- child_layout_mode: z172.enum(["packed", "none"]).optional(),
3924
- name: z172.string().optional(),
3925
- description: z172.string().optional(),
3926
- layout_mode: z172.string().optional(),
3927
- autorouter_configuration: z172.object({
3949
+ position_mode: z173.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
3950
+ positioned_relative_to_pcb_group_id: z173.string().optional(),
3951
+ positioned_relative_to_pcb_board_id: z173.string().optional(),
3952
+ pcb_component_ids: z173.array(z173.string()),
3953
+ child_layout_mode: z173.enum(["packed", "none"]).optional(),
3954
+ name: z173.string().optional(),
3955
+ description: z173.string().optional(),
3956
+ layout_mode: z173.string().optional(),
3957
+ autorouter_configuration: z173.object({
3928
3958
  trace_clearance: length
3929
3959
  }).optional(),
3930
- autorouter_used_string: z172.string().optional()
3960
+ autorouter_used_string: z173.string().optional()
3931
3961
  }).describe("Defines a group of components on the PCB");
3932
3962
  expectTypesMatch(true);
3933
3963
 
3934
3964
  // src/pcb/pcb_autorouting_error.ts
3935
- import { z as z173 } from "zod";
3965
+ import { z as z174 } from "zod";
3936
3966
  var pcb_autorouting_error = base_circuit_json_error.extend({
3937
- type: z173.literal("pcb_autorouting_error"),
3967
+ type: z174.literal("pcb_autorouting_error"),
3938
3968
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
3939
- error_type: z173.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
3940
- subcircuit_id: z173.string().optional()
3969
+ error_type: z174.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
3970
+ subcircuit_id: z174.string().optional()
3941
3971
  }).describe("The autorouting has failed to route a portion of the board");
3942
3972
  expectTypesMatch(true);
3943
3973
 
3944
3974
  // src/pcb/pcb_preflight_routing_error.ts
3945
- import { z as z174 } from "zod";
3975
+ import { z as z175 } from "zod";
3946
3976
  var pcb_preflight_routing_error = base_circuit_json_error.extend({
3947
- type: z174.literal("pcb_preflight_routing_error"),
3977
+ type: z175.literal("pcb_preflight_routing_error"),
3948
3978
  pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
3949
3979
  "pcb_preflight_routing_error"
3950
3980
  ),
3951
- error_type: z174.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
3952
- error_code: z174.string(),
3953
- subcircuit_id: z174.string().optional(),
3954
- pcb_group_id: z174.string().optional(),
3955
- routing_phase_index: z174.number().int().optional(),
3956
- phase_name: z174.string().optional(),
3957
- source_trace_ids: z174.array(z174.string()).optional(),
3958
- pcb_component_ids: z174.array(z174.string()).optional(),
3959
- pcb_port_ids: z174.array(z174.string()).optional(),
3960
- related_error_ids: z174.array(z174.string()).optional(),
3961
- measurements: z174.record(z174.number().finite()).optional()
3981
+ error_type: z175.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
3982
+ error_code: z175.string(),
3983
+ subcircuit_id: z175.string().optional(),
3984
+ pcb_group_id: z175.string().optional(),
3985
+ routing_phase_index: z175.number().int().optional(),
3986
+ phase_name: z175.string().optional(),
3987
+ source_trace_ids: z175.array(z175.string()).optional(),
3988
+ pcb_component_ids: z175.array(z175.string()).optional(),
3989
+ pcb_port_ids: z175.array(z175.string()).optional(),
3990
+ related_error_ids: z175.array(z175.string()).optional(),
3991
+ measurements: z175.record(z175.number().finite()).optional()
3962
3992
  });
3963
3993
  expectTypesMatch(true);
3964
3994
 
3965
3995
  // src/pcb/pcb_manual_edit_conflict_warning.ts
3966
- import { z as z175 } from "zod";
3967
- var pcb_manual_edit_conflict_warning = z175.object({
3968
- type: z175.literal("pcb_manual_edit_conflict_warning"),
3996
+ import { z as z176 } from "zod";
3997
+ var pcb_manual_edit_conflict_warning = z176.object({
3998
+ type: z176.literal("pcb_manual_edit_conflict_warning"),
3969
3999
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
3970
4000
  "pcb_manual_edit_conflict_warning"
3971
4001
  ),
3972
- warning_type: z175.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
3973
- message: z175.string(),
3974
- pcb_component_id: z175.string(),
3975
- pcb_group_id: z175.string().optional(),
3976
- subcircuit_id: z175.string().optional(),
3977
- source_component_id: z175.string()
4002
+ warning_type: z176.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
4003
+ message: z176.string(),
4004
+ pcb_component_id: z176.string(),
4005
+ pcb_group_id: z176.string().optional(),
4006
+ subcircuit_id: z176.string().optional(),
4007
+ source_component_id: z176.string()
3978
4008
  }).describe(
3979
4009
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
3980
4010
  );
3981
4011
  expectTypesMatch(true);
3982
4012
 
3983
4013
  // src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
3984
- import { z as z176 } from "zod";
3985
- var connectorOrientationDirection = z176.enum(["x-", "x+", "y+", "y-"]);
3986
- var pcb_connector_not_in_accessible_orientation_warning = z176.object({
3987
- type: z176.literal("pcb_connector_not_in_accessible_orientation_warning"),
4014
+ import { z as z177 } from "zod";
4015
+ var connectorOrientationDirection = z177.enum(["x-", "x+", "y+", "y-"]);
4016
+ var pcb_connector_not_in_accessible_orientation_warning = z177.object({
4017
+ type: z177.literal("pcb_connector_not_in_accessible_orientation_warning"),
3988
4018
  pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
3989
4019
  "pcb_connector_not_in_accessible_orientation_warning"
3990
4020
  ),
3991
- warning_type: z176.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
3992
- message: z176.string(),
3993
- pcb_component_id: z176.string(),
3994
- source_component_id: z176.string().optional(),
3995
- pcb_board_id: z176.string().optional(),
4021
+ warning_type: z177.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
4022
+ message: z177.string(),
4023
+ pcb_component_id: z177.string(),
4024
+ source_component_id: z177.string().optional(),
4025
+ pcb_board_id: z177.string().optional(),
3996
4026
  facing_direction: connectorOrientationDirection,
3997
4027
  recommended_facing_direction: connectorOrientationDirection,
3998
- subcircuit_id: z176.string().optional()
4028
+ subcircuit_id: z177.string().optional()
3999
4029
  }).describe(
4000
4030
  "Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
4001
4031
  );
4002
4032
  expectTypesMatch(true);
4003
4033
 
4004
4034
  // src/pcb/pcb_component_missing_courtyard_warning.ts
4005
- import { z as z177 } from "zod";
4006
- var pcb_component_missing_courtyard_warning = z177.object({
4007
- type: z177.literal("pcb_component_missing_courtyard_warning"),
4035
+ import { z as z178 } from "zod";
4036
+ var pcb_component_missing_courtyard_warning = z178.object({
4037
+ type: z178.literal("pcb_component_missing_courtyard_warning"),
4008
4038
  pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
4009
4039
  "pcb_component_missing_courtyard_warning"
4010
4040
  ),
4011
- warning_type: z177.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
4012
- message: z177.string(),
4013
- pcb_component_id: z177.string(),
4014
- source_component_id: z177.string().optional(),
4015
- subcircuit_id: z177.string().optional()
4041
+ warning_type: z178.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
4042
+ message: z178.string(),
4043
+ pcb_component_id: z178.string(),
4044
+ source_component_id: z178.string().optional(),
4045
+ subcircuit_id: z178.string().optional()
4016
4046
  }).describe("Warning emitted when a PCB component has no courtyard geometry");
4017
4047
  expectTypesMatch(true);
4018
4048
 
4019
4049
  // src/pcb/supplier_footprint_mismatch_warning.ts
4020
- import { z as z178 } from "zod";
4021
- var supplier_footprint_mismatch_warning = z178.object({
4022
- type: z178.literal("supplier_footprint_mismatch_warning"),
4050
+ import { z as z179 } from "zod";
4051
+ var supplier_footprint_mismatch_warning = z179.object({
4052
+ type: z179.literal("supplier_footprint_mismatch_warning"),
4023
4053
  supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
4024
4054
  "supplier_footprint_mismatch_warning"
4025
4055
  ),
4026
- warning_type: z178.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
4027
- message: z178.string(),
4028
- source_component_id: z178.string(),
4029
- pcb_component_id: z178.string().optional(),
4030
- pcb_group_id: z178.string().optional(),
4031
- subcircuit_id: z178.string().optional(),
4056
+ warning_type: z179.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
4057
+ message: z179.string(),
4058
+ source_component_id: z179.string(),
4059
+ pcb_component_id: z179.string().optional(),
4060
+ pcb_group_id: z179.string().optional(),
4061
+ subcircuit_id: z179.string().optional(),
4032
4062
  supplier_name: supplier_name.optional(),
4033
- supplier_part_number: z178.string().optional(),
4034
- supplier_footprint_url: z178.string().optional(),
4035
- footprint_copper_intersection_over_union: z178.number()
4063
+ supplier_part_number: z179.string().optional(),
4064
+ supplier_footprint_url: z179.string().optional(),
4065
+ footprint_copper_intersection_over_union: z179.number()
4036
4066
  }).describe(
4037
4067
  "Warning emitted when a supplier part footprint does not match the expected footprint"
4038
4068
  );
4039
4069
  expectTypesMatch(true);
4040
4070
 
4041
4071
  // src/pcb/pcb_fabricator_extra_charge_warning.ts
4042
- import { z as z179 } from "zod";
4043
- var pcb_fabricator_extra_charge_warning = z179.object({
4044
- type: z179.literal("pcb_fabricator_extra_charge_warning"),
4072
+ import { z as z180 } from "zod";
4073
+ var pcb_fabricator_extra_charge_warning = z180.object({
4074
+ type: z180.literal("pcb_fabricator_extra_charge_warning"),
4045
4075
  pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
4046
4076
  "pcb_fabricator_extra_charge_warning"
4047
4077
  ),
4048
- warning_type: z179.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
4049
- message: z179.string(),
4050
- fabricator_preset: z179.string(),
4051
- pcb_board_id: z179.string().optional(),
4052
- pcb_via_ids: z179.array(z179.string()).optional(),
4053
- subcircuit_id: z179.string().optional()
4078
+ warning_type: z180.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
4079
+ message: z180.string(),
4080
+ fabricator_preset: z180.string(),
4081
+ pcb_board_id: z180.string().optional(),
4082
+ pcb_via_ids: z180.array(z180.string()).optional(),
4083
+ subcircuit_id: z180.string().optional()
4054
4084
  }).describe(
4055
4085
  "Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
4056
4086
  );
4057
4087
  expectTypesMatch(true);
4058
4088
 
4059
4089
  // src/pcb/pcb_breakout_point.ts
4060
- import { z as z180 } from "zod";
4061
- var pcb_breakout_point = z180.object({
4062
- type: z180.literal("pcb_breakout_point"),
4090
+ import { z as z181 } from "zod";
4091
+ var pcb_breakout_point = z181.object({
4092
+ type: z181.literal("pcb_breakout_point"),
4063
4093
  pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
4064
- pcb_group_id: z180.string(),
4065
- subcircuit_id: z180.string().optional(),
4066
- source_trace_id: z180.string().optional(),
4067
- source_port_id: z180.string().optional(),
4068
- source_net_id: z180.string().optional(),
4094
+ pcb_group_id: z181.string(),
4095
+ subcircuit_id: z181.string().optional(),
4096
+ source_trace_id: z181.string().optional(),
4097
+ source_port_id: z181.string().optional(),
4098
+ source_net_id: z181.string().optional(),
4069
4099
  layer: layer_ref.optional(),
4070
4100
  x: distance,
4071
4101
  y: distance
@@ -4075,61 +4105,61 @@ var pcb_breakout_point = z180.object({
4075
4105
  expectTypesMatch(true);
4076
4106
 
4077
4107
  // src/pcb/pcb_ground_plane.ts
4078
- import { z as z181 } from "zod";
4079
- var pcb_ground_plane = z181.object({
4080
- type: z181.literal("pcb_ground_plane"),
4108
+ import { z as z182 } from "zod";
4109
+ var pcb_ground_plane = z182.object({
4110
+ type: z182.literal("pcb_ground_plane"),
4081
4111
  pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
4082
- source_pcb_ground_plane_id: z181.string(),
4083
- source_net_id: z181.string(),
4084
- pcb_group_id: z181.string().optional(),
4085
- subcircuit_id: z181.string().optional()
4112
+ source_pcb_ground_plane_id: z182.string(),
4113
+ source_net_id: z182.string(),
4114
+ pcb_group_id: z182.string().optional(),
4115
+ subcircuit_id: z182.string().optional()
4086
4116
  }).describe("Defines a ground plane on the PCB");
4087
4117
  expectTypesMatch(true);
4088
4118
 
4089
4119
  // src/pcb/pcb_ground_plane_region.ts
4090
- import { z as z182 } from "zod";
4091
- var pcb_ground_plane_region = z182.object({
4092
- type: z182.literal("pcb_ground_plane_region"),
4120
+ import { z as z183 } from "zod";
4121
+ var pcb_ground_plane_region = z183.object({
4122
+ type: z183.literal("pcb_ground_plane_region"),
4093
4123
  pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
4094
4124
  "pcb_ground_plane_region"
4095
4125
  ),
4096
- pcb_ground_plane_id: z182.string(),
4097
- pcb_group_id: z182.string().optional(),
4098
- subcircuit_id: z182.string().optional(),
4126
+ pcb_ground_plane_id: z183.string(),
4127
+ pcb_group_id: z183.string().optional(),
4128
+ subcircuit_id: z183.string().optional(),
4099
4129
  layer: layer_ref,
4100
- points: z182.array(point)
4130
+ points: z183.array(point)
4101
4131
  }).describe("Defines a polygon region of a ground plane");
4102
4132
  expectTypesMatch(true);
4103
4133
 
4104
4134
  // src/pcb/pcb_thermal_spoke.ts
4105
- import { z as z183 } from "zod";
4106
- var pcb_thermal_spoke = z183.object({
4107
- type: z183.literal("pcb_thermal_spoke"),
4135
+ import { z as z184 } from "zod";
4136
+ var pcb_thermal_spoke = z184.object({
4137
+ type: z184.literal("pcb_thermal_spoke"),
4108
4138
  pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
4109
- pcb_ground_plane_id: z183.string(),
4110
- shape: z183.string(),
4111
- spoke_count: z183.number(),
4139
+ pcb_ground_plane_id: z184.string(),
4140
+ shape: z184.string(),
4141
+ spoke_count: z184.number(),
4112
4142
  spoke_thickness: distance,
4113
4143
  spoke_inner_diameter: distance,
4114
4144
  spoke_outer_diameter: distance,
4115
- pcb_plated_hole_id: z183.string().optional(),
4116
- subcircuit_id: z183.string().optional()
4145
+ pcb_plated_hole_id: z184.string().optional(),
4146
+ subcircuit_id: z184.string().optional()
4117
4147
  }).describe("Pattern for connecting a ground plane to a plated hole");
4118
4148
  expectTypesMatch(true);
4119
4149
 
4120
4150
  // src/pcb/pcb_copper_pour.ts
4121
- import { z as z184 } from "zod";
4122
- var pcb_copper_pour_base = z184.object({
4123
- type: z184.literal("pcb_copper_pour"),
4151
+ import { z as z185 } from "zod";
4152
+ var pcb_copper_pour_base = z185.object({
4153
+ type: z185.literal("pcb_copper_pour"),
4124
4154
  pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
4125
- pcb_group_id: z184.string().optional(),
4126
- subcircuit_id: z184.string().optional(),
4155
+ pcb_group_id: z185.string().optional(),
4156
+ subcircuit_id: z185.string().optional(),
4127
4157
  layer: layer_ref,
4128
- source_net_id: z184.string().optional(),
4129
- covered_with_solder_mask: z184.boolean().optional().default(true)
4158
+ source_net_id: z185.string().optional(),
4159
+ covered_with_solder_mask: z185.boolean().optional().default(true)
4130
4160
  });
4131
4161
  var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
4132
- shape: z184.literal("rect"),
4162
+ shape: z185.literal("rect"),
4133
4163
  center: point,
4134
4164
  width: length,
4135
4165
  height: length,
@@ -4137,16 +4167,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
4137
4167
  });
4138
4168
  expectTypesMatch(true);
4139
4169
  var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
4140
- shape: z184.literal("brep"),
4170
+ shape: z185.literal("brep"),
4141
4171
  brep_shape
4142
4172
  });
4143
4173
  expectTypesMatch(true);
4144
4174
  var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
4145
- shape: z184.literal("polygon"),
4146
- points: z184.array(point)
4175
+ shape: z185.literal("polygon"),
4176
+ points: z185.array(point)
4147
4177
  });
4148
4178
  expectTypesMatch(true);
4149
- var pcb_copper_pour = z184.discriminatedUnion("shape", [
4179
+ var pcb_copper_pour = z185.discriminatedUnion("shape", [
4150
4180
  pcb_copper_pour_rect,
4151
4181
  pcb_copper_pour_brep,
4152
4182
  pcb_copper_pour_polygon
@@ -4154,99 +4184,99 @@ var pcb_copper_pour = z184.discriminatedUnion("shape", [
4154
4184
  expectTypesMatch(true);
4155
4185
 
4156
4186
  // src/pcb/pcb_component_outside_board_error.ts
4157
- import { z as z185 } from "zod";
4187
+ import { z as z186 } from "zod";
4158
4188
  var pcb_component_outside_board_error = base_circuit_json_error.extend({
4159
- type: z185.literal("pcb_component_outside_board_error"),
4189
+ type: z186.literal("pcb_component_outside_board_error"),
4160
4190
  pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
4161
4191
  "pcb_component_outside_board_error"
4162
4192
  ),
4163
- error_type: z185.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
4164
- pcb_component_id: z185.string(),
4165
- pcb_board_id: z185.string(),
4193
+ error_type: z186.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
4194
+ pcb_component_id: z186.string(),
4195
+ pcb_board_id: z186.string(),
4166
4196
  component_center: point,
4167
- component_bounds: z185.object({
4168
- min_x: z185.number(),
4169
- max_x: z185.number(),
4170
- min_y: z185.number(),
4171
- max_y: z185.number()
4197
+ component_bounds: z186.object({
4198
+ min_x: z186.number(),
4199
+ max_x: z186.number(),
4200
+ min_y: z186.number(),
4201
+ max_y: z186.number()
4172
4202
  }),
4173
- subcircuit_id: z185.string().optional(),
4174
- source_component_id: z185.string().optional()
4203
+ subcircuit_id: z186.string().optional(),
4204
+ source_component_id: z186.string().optional()
4175
4205
  }).describe(
4176
4206
  "Error emitted when a PCB component is placed outside the board boundaries"
4177
4207
  );
4178
4208
  expectTypesMatch(true);
4179
4209
 
4180
4210
  // src/pcb/pcb_component_not_on_board_edge_error.ts
4181
- import { z as z186 } from "zod";
4211
+ import { z as z187 } from "zod";
4182
4212
  var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
4183
- type: z186.literal("pcb_component_not_on_board_edge_error"),
4213
+ type: z187.literal("pcb_component_not_on_board_edge_error"),
4184
4214
  pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
4185
4215
  "pcb_component_not_on_board_edge_error"
4186
4216
  ),
4187
- error_type: z186.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
4188
- pcb_component_id: z186.string(),
4189
- pcb_board_id: z186.string(),
4217
+ error_type: z187.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
4218
+ pcb_component_id: z187.string(),
4219
+ pcb_board_id: z187.string(),
4190
4220
  component_center: point,
4191
- pad_to_nearest_board_edge_distance: z186.number(),
4192
- source_component_id: z186.string().optional(),
4193
- subcircuit_id: z186.string().optional()
4221
+ pad_to_nearest_board_edge_distance: z187.number(),
4222
+ source_component_id: z187.string().optional(),
4223
+ subcircuit_id: z187.string().optional()
4194
4224
  }).describe(
4195
4225
  "Error emitted when a component that must be placed on the board edge is centered away from the edge"
4196
4226
  );
4197
4227
  expectTypesMatch(true);
4198
4228
 
4199
4229
  // src/pcb/pcb_component_invalid_layer_error.ts
4200
- import { z as z187 } from "zod";
4230
+ import { z as z188 } from "zod";
4201
4231
  var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
4202
- type: z187.literal("pcb_component_invalid_layer_error"),
4232
+ type: z188.literal("pcb_component_invalid_layer_error"),
4203
4233
  pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
4204
4234
  "pcb_component_invalid_layer_error"
4205
4235
  ),
4206
- error_type: z187.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
4207
- pcb_component_id: z187.string().optional(),
4208
- source_component_id: z187.string(),
4236
+ error_type: z188.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
4237
+ pcb_component_id: z188.string().optional(),
4238
+ source_component_id: z188.string(),
4209
4239
  layer: layer_ref,
4210
- subcircuit_id: z187.string().optional()
4240
+ subcircuit_id: z188.string().optional()
4211
4241
  }).describe(
4212
4242
  "Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
4213
4243
  );
4214
4244
  expectTypesMatch(true);
4215
4245
 
4216
4246
  // src/pcb/pcb_via_clearance_error.ts
4217
- import { z as z188 } from "zod";
4247
+ import { z as z189 } from "zod";
4218
4248
  var pcb_via_clearance_error = base_circuit_json_error.extend({
4219
- type: z188.literal("pcb_via_clearance_error"),
4249
+ type: z189.literal("pcb_via_clearance_error"),
4220
4250
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
4221
- error_type: z188.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
4222
- pcb_via_ids: z188.array(z188.string()).min(2),
4251
+ error_type: z189.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
4252
+ pcb_via_ids: z189.array(z189.string()).min(2),
4223
4253
  minimum_clearance: distance.optional(),
4224
4254
  actual_clearance: distance.optional(),
4225
- pcb_center: z188.object({
4226
- x: z188.number().optional(),
4227
- y: z188.number().optional()
4255
+ pcb_center: z189.object({
4256
+ x: z189.number().optional(),
4257
+ y: z189.number().optional()
4228
4258
  }).optional(),
4229
- subcircuit_id: z188.string().optional()
4259
+ subcircuit_id: z189.string().optional()
4230
4260
  }).describe("Error emitted when vias are closer than the allowed clearance");
4231
4261
  expectTypesMatch(true);
4232
4262
 
4233
4263
  // src/pcb/pcb_via_trace_clearance_error.ts
4234
- import { z as z189 } from "zod";
4264
+ import { z as z190 } from "zod";
4235
4265
  var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
4236
- type: z189.literal("pcb_via_trace_clearance_error"),
4266
+ type: z190.literal("pcb_via_trace_clearance_error"),
4237
4267
  pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
4238
4268
  "pcb_via_trace_clearance_error"
4239
4269
  ),
4240
- error_type: z189.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
4241
- pcb_via_id: z189.string(),
4242
- pcb_trace_id: z189.string(),
4270
+ error_type: z190.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
4271
+ pcb_via_id: z190.string(),
4272
+ pcb_trace_id: z190.string(),
4243
4273
  minimum_clearance: distance.optional(),
4244
4274
  actual_clearance: distance.optional(),
4245
- center: z189.object({
4246
- x: z189.number().optional(),
4247
- y: z189.number().optional()
4275
+ center: z190.object({
4276
+ x: z190.number().optional(),
4277
+ y: z190.number().optional()
4248
4278
  }).optional(),
4249
- subcircuit_id: z189.string().optional()
4279
+ subcircuit_id: z190.string().optional()
4250
4280
  }).describe(
4251
4281
  "Error emitted when a via and trace are closer than the allowed clearance"
4252
4282
  );
@@ -4255,41 +4285,41 @@ expectTypesMatch(
4255
4285
  );
4256
4286
 
4257
4287
  // src/pcb/pcb_pad_pad_clearance_error.ts
4258
- import { z as z190 } from "zod";
4288
+ import { z as z191 } from "zod";
4259
4289
  var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
4260
- type: z190.literal("pcb_pad_pad_clearance_error"),
4290
+ type: z191.literal("pcb_pad_pad_clearance_error"),
4261
4291
  pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
4262
4292
  "pcb_pad_pad_clearance_error"
4263
4293
  ),
4264
- error_type: z190.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
4265
- pcb_pad_ids: z190.array(z190.string()).min(2),
4294
+ error_type: z191.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
4295
+ pcb_pad_ids: z191.array(z191.string()).min(2),
4266
4296
  minimum_clearance: distance.optional(),
4267
4297
  actual_clearance: distance.optional(),
4268
- center: z190.object({
4269
- x: z190.number().optional(),
4270
- y: z190.number().optional()
4298
+ center: z191.object({
4299
+ x: z191.number().optional(),
4300
+ y: z191.number().optional()
4271
4301
  }).optional(),
4272
- subcircuit_id: z190.string().optional()
4302
+ subcircuit_id: z191.string().optional()
4273
4303
  }).describe("Error emitted when pads are closer than the allowed clearance");
4274
4304
  expectTypesMatch(true);
4275
4305
 
4276
4306
  // src/pcb/pcb_pad_trace_clearance_error.ts
4277
- import { z as z191 } from "zod";
4307
+ import { z as z192 } from "zod";
4278
4308
  var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
4279
- type: z191.literal("pcb_pad_trace_clearance_error"),
4309
+ type: z192.literal("pcb_pad_trace_clearance_error"),
4280
4310
  pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
4281
4311
  "pcb_pad_trace_clearance_error"
4282
4312
  ),
4283
- error_type: z191.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
4284
- pcb_pad_id: z191.string(),
4285
- pcb_trace_id: z191.string(),
4313
+ error_type: z192.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
4314
+ pcb_pad_id: z192.string(),
4315
+ pcb_trace_id: z192.string(),
4286
4316
  minimum_clearance: distance.optional(),
4287
4317
  actual_clearance: distance.optional(),
4288
- center: z191.object({
4289
- x: z191.number().optional(),
4290
- y: z191.number().optional()
4318
+ center: z192.object({
4319
+ x: z192.number().optional(),
4320
+ y: z192.number().optional()
4291
4321
  }).optional(),
4292
- subcircuit_id: z191.string().optional()
4322
+ subcircuit_id: z192.string().optional()
4293
4323
  }).describe(
4294
4324
  "Error emitted when a pad and trace are closer than allowed clearance"
4295
4325
  );
@@ -4298,89 +4328,89 @@ expectTypesMatch(
4298
4328
  );
4299
4329
 
4300
4330
  // src/pcb/pcb_courtyard_rect.ts
4301
- import { z as z192 } from "zod";
4302
- var pcb_courtyard_rect = z192.object({
4303
- type: z192.literal("pcb_courtyard_rect"),
4331
+ import { z as z193 } from "zod";
4332
+ var pcb_courtyard_rect = z193.object({
4333
+ type: z193.literal("pcb_courtyard_rect"),
4304
4334
  pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
4305
- pcb_component_id: z192.string(),
4306
- pcb_group_id: z192.string().optional(),
4307
- subcircuit_id: z192.string().optional(),
4335
+ pcb_component_id: z193.string(),
4336
+ pcb_group_id: z193.string().optional(),
4337
+ subcircuit_id: z193.string().optional(),
4308
4338
  center: point,
4309
4339
  width: length,
4310
4340
  height: length,
4311
4341
  layer: visible_layer,
4312
4342
  ccw_rotation: rotation.optional(),
4313
- color: z192.string().optional()
4343
+ color: z193.string().optional()
4314
4344
  }).describe("Defines a courtyard rectangle on the PCB");
4315
4345
  expectTypesMatch(true);
4316
4346
 
4317
4347
  // src/pcb/pcb_courtyard_outline.ts
4318
- import { z as z193 } from "zod";
4319
- var pcb_courtyard_outline = z193.object({
4320
- type: z193.literal("pcb_courtyard_outline"),
4348
+ import { z as z194 } from "zod";
4349
+ var pcb_courtyard_outline = z194.object({
4350
+ type: z194.literal("pcb_courtyard_outline"),
4321
4351
  pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
4322
4352
  "pcb_courtyard_outline"
4323
4353
  ),
4324
- pcb_component_id: z193.string(),
4325
- pcb_group_id: z193.string().optional(),
4326
- subcircuit_id: z193.string().optional(),
4354
+ pcb_component_id: z194.string(),
4355
+ pcb_group_id: z194.string().optional(),
4356
+ subcircuit_id: z194.string().optional(),
4327
4357
  layer: visible_layer,
4328
- outline: z193.array(point).min(2)
4358
+ outline: z194.array(point).min(2)
4329
4359
  }).describe("Defines a courtyard outline on the PCB");
4330
4360
  expectTypesMatch(true);
4331
4361
 
4332
4362
  // src/pcb/pcb_courtyard_polygon.ts
4333
- import { z as z194 } from "zod";
4334
- var pcb_courtyard_polygon = z194.object({
4335
- type: z194.literal("pcb_courtyard_polygon"),
4363
+ import { z as z195 } from "zod";
4364
+ var pcb_courtyard_polygon = z195.object({
4365
+ type: z195.literal("pcb_courtyard_polygon"),
4336
4366
  pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
4337
4367
  "pcb_courtyard_polygon"
4338
4368
  ),
4339
- pcb_component_id: z194.string(),
4340
- pcb_group_id: z194.string().optional(),
4341
- subcircuit_id: z194.string().optional(),
4369
+ pcb_component_id: z195.string(),
4370
+ pcb_group_id: z195.string().optional(),
4371
+ subcircuit_id: z195.string().optional(),
4342
4372
  layer: visible_layer,
4343
- points: z194.array(point).min(3),
4344
- color: z194.string().optional()
4373
+ points: z195.array(point).min(3),
4374
+ color: z195.string().optional()
4345
4375
  }).describe("Defines a courtyard polygon on the PCB");
4346
4376
  expectTypesMatch(true);
4347
4377
 
4348
4378
  // src/pcb/pcb_courtyard_circle.ts
4349
- import { z as z195 } from "zod";
4350
- var pcb_courtyard_circle = z195.object({
4351
- type: z195.literal("pcb_courtyard_circle"),
4379
+ import { z as z196 } from "zod";
4380
+ var pcb_courtyard_circle = z196.object({
4381
+ type: z196.literal("pcb_courtyard_circle"),
4352
4382
  pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
4353
4383
  "pcb_courtyard_circle"
4354
4384
  ),
4355
- pcb_component_id: z195.string(),
4356
- pcb_group_id: z195.string().optional(),
4357
- subcircuit_id: z195.string().optional(),
4385
+ pcb_component_id: z196.string(),
4386
+ pcb_group_id: z196.string().optional(),
4387
+ subcircuit_id: z196.string().optional(),
4358
4388
  center: point,
4359
4389
  radius: length,
4360
4390
  layer: visible_layer,
4361
- color: z195.string().optional()
4391
+ color: z196.string().optional()
4362
4392
  }).describe("Defines a courtyard circle on the PCB");
4363
4393
  expectTypesMatch(true);
4364
4394
 
4365
4395
  // src/pcb/pcb_courtyard_pill.ts
4366
- import { z as z196 } from "zod";
4367
- var pcb_courtyard_pill = z196.object({
4368
- type: z196.literal("pcb_courtyard_pill"),
4396
+ import { z as z197 } from "zod";
4397
+ var pcb_courtyard_pill = z197.object({
4398
+ type: z197.literal("pcb_courtyard_pill"),
4369
4399
  pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
4370
- pcb_component_id: z196.string(),
4371
- pcb_group_id: z196.string().optional(),
4372
- subcircuit_id: z196.string().optional(),
4400
+ pcb_component_id: z197.string(),
4401
+ pcb_group_id: z197.string().optional(),
4402
+ subcircuit_id: z197.string().optional(),
4373
4403
  center: point,
4374
4404
  width: length,
4375
4405
  height: length,
4376
4406
  radius: length,
4377
4407
  layer: visible_layer,
4378
- color: z196.string().optional()
4408
+ color: z197.string().optional()
4379
4409
  }).describe("Defines a courtyard pill on the PCB");
4380
4410
  expectTypesMatch(true);
4381
4411
 
4382
4412
  // src/cad/cad_component.ts
4383
- import { z as z197 } from "zod";
4413
+ import { z as z198 } from "zod";
4384
4414
 
4385
4415
  // src/cad/cad_model_conventions.ts
4386
4416
  var cad_model_formats = [
@@ -4411,87 +4441,87 @@ var cadModelDefaultDirectionMap = {
4411
4441
  };
4412
4442
 
4413
4443
  // src/cad/cad_component.ts
4414
- var cad_component = z197.object({
4415
- type: z197.literal("cad_component"),
4416
- cad_component_id: z197.string(),
4417
- pcb_component_id: z197.string().optional().describe(
4444
+ var cad_component = z198.object({
4445
+ type: z198.literal("cad_component"),
4446
+ cad_component_id: z198.string(),
4447
+ pcb_component_id: z198.string().optional().describe(
4418
4448
  "Optional PCB component reference; omit for CAD geometry without a PCB component"
4419
4449
  ),
4420
- source_component_id: z197.string(),
4450
+ source_component_id: z198.string(),
4421
4451
  position: point3,
4422
4452
  rotation: point3.optional(),
4423
- is_on_folded_board: z197.boolean().optional().describe(
4453
+ is_on_folded_board: z198.boolean().optional().describe(
4424
4454
  "True when position and rotation describe the assembled folded board pose. False or omitted means the flat board pose. PCB records remain flat; pcb_component_id identifies the flat mount and owning board for reversible transforms."
4425
4455
  ),
4426
4456
  size: point3.optional(),
4427
4457
  layer: layer_ref.optional(),
4428
- subcircuit_id: z197.string().optional(),
4458
+ subcircuit_id: z198.string().optional(),
4429
4459
  // These are all ways to generate/load the 3d model
4430
- footprinter_string: z197.string().optional(),
4431
- model_obj_url: z197.string().optional(),
4432
- model_stl_url: z197.string().optional(),
4433
- model_3mf_url: z197.string().optional(),
4434
- model_gltf_url: z197.string().optional(),
4435
- model_glb_url: z197.string().optional(),
4436
- model_step_url: z197.string().optional(),
4437
- model_wrl_url: z197.string().optional(),
4460
+ footprinter_string: z198.string().optional(),
4461
+ model_obj_url: z198.string().optional(),
4462
+ model_stl_url: z198.string().optional(),
4463
+ model_3mf_url: z198.string().optional(),
4464
+ model_gltf_url: z198.string().optional(),
4465
+ model_glb_url: z198.string().optional(),
4466
+ model_step_url: z198.string().optional(),
4467
+ model_wrl_url: z198.string().optional(),
4438
4468
  model_asset: asset.optional(),
4439
- model_unit_to_mm_scale_factor: z197.number().optional(),
4440
- model_board_normal_direction: z197.enum(cad_model_axis_directions).optional().describe(
4469
+ model_unit_to_mm_scale_factor: z198.number().optional(),
4470
+ model_board_normal_direction: z198.enum(cad_model_axis_directions).optional().describe(
4441
4471
  `The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
4442
4472
  ),
4443
4473
  model_origin_position: point3.optional(),
4444
- model_origin_alignment: z197.enum([
4474
+ model_origin_alignment: z198.enum([
4445
4475
  "unknown",
4446
4476
  "center",
4447
4477
  "center_of_component_on_board_surface",
4448
4478
  "bottom_center_of_component"
4449
4479
  ]).optional(),
4450
- model_object_fit: z197.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
4451
- model_jscad: z197.any().optional(),
4452
- show_as_translucent_model: z197.boolean().optional(),
4453
- show_as_bounding_box: z197.boolean().optional(),
4454
- show_hidden_edges: z197.boolean().optional(),
4455
- anchor_alignment: z197.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
4480
+ model_object_fit: z198.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
4481
+ model_jscad: z198.any().optional(),
4482
+ show_as_translucent_model: z198.boolean().optional(),
4483
+ show_as_bounding_box: z198.boolean().optional(),
4484
+ show_hidden_edges: z198.boolean().optional(),
4485
+ anchor_alignment: z198.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
4456
4486
  }).describe("Defines CAD geometry, optionally associated with a PCB component");
4457
4487
  expectTypesMatch(true);
4458
4488
 
4459
4489
  // src/cad/cad_collision_error.ts
4460
- import { z as z198 } from "zod";
4490
+ import { z as z199 } from "zod";
4461
4491
  var cad_collision_error = base_circuit_json_error.extend({
4462
- type: z198.literal("cad_collision_error"),
4492
+ type: z199.literal("cad_collision_error"),
4463
4493
  cad_collision_error_id: getZodPrefixedIdWithDefault("cad_collision_error"),
4464
- error_type: z198.literal("cad_collision_error").default("cad_collision_error"),
4465
- cad_component_ids: z198.array(z198.string()).min(1),
4466
- pcb_component_ids: z198.array(z198.string()).optional(),
4467
- source_component_ids: z198.array(z198.string()).min(1),
4468
- intersection_area_mm2: z198.number().finite().nonnegative(),
4469
- threshold_area_mm2: z198.number().finite().nonnegative()
4494
+ error_type: z199.literal("cad_collision_error").default("cad_collision_error"),
4495
+ cad_component_ids: z199.array(z199.string()).min(1),
4496
+ pcb_component_ids: z199.array(z199.string()).optional(),
4497
+ source_component_ids: z199.array(z199.string()).min(1),
4498
+ intersection_area_mm2: z199.number().finite().nonnegative(),
4499
+ threshold_area_mm2: z199.number().finite().nonnegative()
4470
4500
  }).describe(
4471
4501
  "An aperture-bearing part intersects the finished enclosure. The intersection_area_mm2 is the union silhouette area of the solid intersection projected along the aperture face normal, in the right-handed Circuit JSON world frame (+X right, +Y top, +Z above). It is an area in square millimetres, not intersection volume or surface area. This indicates possible aperture misplacement, insufficient size/depth, or body clearance problems; it does not prove which cause applies."
4472
4502
  );
4473
4503
  expectTypesMatch(true);
4474
4504
 
4475
4505
  // src/cad/cad_cable.ts
4476
- import { z as z199 } from "zod";
4506
+ import { z as z200 } from "zod";
4477
4507
  var connectorPin1Position = point3.refine(
4478
4508
  (point2) => [point2.x, point2.y, point2.z].every(Number.isFinite),
4479
4509
  "Connector pin 1 positions must be finite"
4480
4510
  ).describe(
4481
4511
  "Resolved pin 1 position at the connector mating face, in right-handed circuit world, millimeters: +X right, +Y top, +Z above. An absolute point, not a direction. Computed by the circuit producer from endpoint geometry. Together with the endpoint path tangent, fixes connector roll and identifies its pin 1 side; renderers must not infer it from footprints."
4482
4512
  );
4483
- var cad_cable = z199.object({
4484
- type: z199.literal("cad_cable"),
4485
- cad_cable_id: z199.string(),
4486
- name: z199.string().min(1),
4487
- from_source_component_id: z199.string(),
4488
- to_source_component_id: z199.string(),
4513
+ var cad_cable = z200.object({
4514
+ type: z200.literal("cad_cable"),
4515
+ cad_cable_id: z200.string(),
4516
+ name: z200.string().min(1),
4517
+ from_source_component_id: z200.string(),
4518
+ to_source_component_id: z200.string(),
4489
4519
  from_connector_pin1_position: connectorPin1Position.optional(),
4490
4520
  to_connector_pin1_position: connectorPin1Position.optional(),
4491
- cableprinter_string: z199.string().min(1).describe(
4521
+ cableprinter_string: z200.string().min(1).describe(
4492
4522
  'Physical cable definition, e.g. "usb_c" or "jst_ph_pins6". Independent of the route.'
4493
4523
  ),
4494
- path: z199.array(point3).min(2).refine(
4524
+ path: z200.array(point3).min(2).refine(
4495
4525
  (path) => path.every(
4496
4526
  (point2, i) => [point2.x, point2.y, point2.z].every(Number.isFinite) && (i === 0 || Math.hypot(
4497
4527
  point2.x - path[i - 1].x,
@@ -4509,27 +4539,27 @@ var cad_cable = z199.object({
4509
4539
  expectTypesMatch(true);
4510
4540
 
4511
4541
  // src/cad/cad_reference_surface.ts
4512
- import { z as z200 } from "zod";
4542
+ import { z as z201 } from "zod";
4513
4543
  var FRAME_TOLERANCE = 1e-6;
4514
- var unitDirection = z200.object({
4515
- x: z200.number().finite(),
4516
- y: z200.number().finite(),
4517
- z: z200.number().finite()
4544
+ var unitDirection = z201.object({
4545
+ x: z201.number().finite(),
4546
+ y: z201.number().finite(),
4547
+ z: z201.number().finite()
4518
4548
  }).refine(
4519
4549
  (v) => Math.abs(Math.hypot(v.x, v.y, v.z) - 1) <= FRAME_TOLERANCE,
4520
4550
  "Reference surface directions must be unit vectors"
4521
4551
  );
4522
- var extent = distance.pipe(z200.number().finite().positive());
4523
- var cad_reference_surface = z200.object({
4524
- type: z200.literal("cad_reference_surface"),
4525
- cad_reference_surface_id: z200.string().min(1),
4526
- source_component_id: z200.string().min(1).describe(
4552
+ var extent = distance.pipe(z201.number().finite().positive());
4553
+ var cad_reference_surface = z201.object({
4554
+ type: z201.literal("cad_reference_surface"),
4555
+ cad_reference_surface_id: z201.string().min(1),
4556
+ source_component_id: z201.string().min(1).describe(
4527
4557
  "Owning assembly part's source component ID. The part may have no CAD geometry."
4528
4558
  ),
4529
- name: z200.string().trim().min(1).describe(
4559
+ name: z201.string().trim().min(1).describe(
4530
4560
  "Reference name, unique within the owning part, e.g. shade in STEM.shade."
4531
4561
  ),
4532
- shape: z200.literal("rect"),
4562
+ shape: z201.literal("rect"),
4533
4563
  center: point3.refine(
4534
4564
  (p) => [p.x, p.y, p.z].every(Number.isFinite),
4535
4565
  "Reference surface centers must be finite"
@@ -4548,18 +4578,18 @@ var cad_reference_surface = z200.object({
4548
4578
  height: extent.optional().describe(
4549
4579
  "Rectangular extent along normal cross x_axis in millimeters. Supply together with width."
4550
4580
  ),
4551
- subcircuit_id: z200.string().optional()
4581
+ subcircuit_id: z201.string().optional()
4552
4582
  }).superRefine((surface, ctx) => {
4553
4583
  if (surface.width === void 0 !== (surface.height === void 0))
4554
4584
  ctx.addIssue({
4555
- code: z200.ZodIssueCode.custom,
4585
+ code: z201.ZodIssueCode.custom,
4556
4586
  path: ["width"],
4557
4587
  message: "Provide width and height together"
4558
4588
  });
4559
4589
  const { normal: n, x_axis: x } = surface;
4560
4590
  if (Math.abs(n.x * x.x + n.y * x.y + n.z * x.z) > FRAME_TOLERANCE)
4561
4591
  ctx.addIssue({
4562
- code: z200.ZodIssueCode.custom,
4592
+ code: z201.ZodIssueCode.custom,
4563
4593
  path: ["x_axis"],
4564
4594
  message: "x_axis must be perpendicular to normal"
4565
4595
  });
@@ -4571,9 +4601,9 @@ expectTypesMatch(
4571
4601
  );
4572
4602
 
4573
4603
  // src/simulation/simulation_voltage_source.ts
4574
- import { z as z201 } from "zod";
4575
- var wave_shape = z201.enum(["sinewave", "square", "triangle", "sawtooth"]);
4576
- var percentage = z201.union([z201.string(), z201.number()]).transform((val) => {
4604
+ import { z as z202 } from "zod";
4605
+ var wave_shape = z202.enum(["sinewave", "square", "triangle", "sawtooth"]);
4606
+ var percentage = z202.union([z202.string(), z202.number()]).transform((val) => {
4577
4607
  if (typeof val === "string") {
4578
4608
  if (val.endsWith("%")) {
4579
4609
  return parseFloat(val.slice(0, -1)) / 100;
@@ -4582,32 +4612,32 @@ var percentage = z201.union([z201.string(), z201.number()]).transform((val) => {
4582
4612
  }
4583
4613
  return val;
4584
4614
  }).pipe(
4585
- z201.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4615
+ z202.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4586
4616
  );
4587
- var simulation_dc_voltage_source = z201.object({
4588
- type: z201.literal("simulation_voltage_source"),
4617
+ var simulation_dc_voltage_source = z202.object({
4618
+ type: z202.literal("simulation_voltage_source"),
4589
4619
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
4590
4620
  "simulation_voltage_source"
4591
4621
  ),
4592
- is_dc_source: z201.literal(true).optional().default(true),
4593
- positive_source_port_id: z201.string().optional(),
4594
- negative_source_port_id: z201.string().optional(),
4595
- positive_source_net_id: z201.string().optional(),
4596
- negative_source_net_id: z201.string().optional(),
4622
+ is_dc_source: z202.literal(true).optional().default(true),
4623
+ positive_source_port_id: z202.string().optional(),
4624
+ negative_source_port_id: z202.string().optional(),
4625
+ positive_source_net_id: z202.string().optional(),
4626
+ negative_source_net_id: z202.string().optional(),
4597
4627
  voltage,
4598
4628
  ac_magnitude: voltage.optional(),
4599
4629
  ac_phase: rotation.optional()
4600
4630
  }).describe("Defines a DC voltage source for simulation");
4601
- var simulation_ac_voltage_source = z201.object({
4602
- type: z201.literal("simulation_voltage_source"),
4631
+ var simulation_ac_voltage_source = z202.object({
4632
+ type: z202.literal("simulation_voltage_source"),
4603
4633
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
4604
4634
  "simulation_voltage_source"
4605
4635
  ),
4606
- is_dc_source: z201.literal(false),
4607
- terminal1_source_port_id: z201.string().optional(),
4608
- terminal2_source_port_id: z201.string().optional(),
4609
- terminal1_source_net_id: z201.string().optional(),
4610
- terminal2_source_net_id: z201.string().optional(),
4636
+ is_dc_source: z202.literal(false),
4637
+ terminal1_source_port_id: z202.string().optional(),
4638
+ terminal2_source_port_id: z202.string().optional(),
4639
+ terminal1_source_net_id: z202.string().optional(),
4640
+ terminal2_source_net_id: z202.string().optional(),
4611
4641
  voltage: voltage.optional(),
4612
4642
  frequency: frequency.optional(),
4613
4643
  peak_to_peak_voltage: voltage.optional(),
@@ -4622,14 +4652,14 @@ var simulation_ac_voltage_source = z201.object({
4622
4652
  ac_magnitude: voltage.optional(),
4623
4653
  ac_phase: rotation.optional()
4624
4654
  }).describe("Defines an AC voltage source for simulation");
4625
- var simulation_voltage_source = z201.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
4655
+ var simulation_voltage_source = z202.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
4626
4656
  expectTypesMatch(true);
4627
4657
  expectTypesMatch(true);
4628
4658
  expectTypesMatch(true);
4629
4659
 
4630
4660
  // src/simulation/simulation_current_source.ts
4631
- import { z as z202 } from "zod";
4632
- var percentage2 = z202.union([z202.string(), z202.number()]).transform((val) => {
4661
+ import { z as z203 } from "zod";
4662
+ var percentage2 = z203.union([z203.string(), z203.number()]).transform((val) => {
4633
4663
  if (typeof val === "string") {
4634
4664
  if (val.endsWith("%")) {
4635
4665
  return parseFloat(val.slice(0, -1)) / 100;
@@ -4638,32 +4668,32 @@ var percentage2 = z202.union([z202.string(), z202.number()]).transform((val) =>
4638
4668
  }
4639
4669
  return val;
4640
4670
  }).pipe(
4641
- z202.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4671
+ z203.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4642
4672
  );
4643
- var simulation_dc_current_source = z202.object({
4644
- type: z202.literal("simulation_current_source"),
4673
+ var simulation_dc_current_source = z203.object({
4674
+ type: z203.literal("simulation_current_source"),
4645
4675
  simulation_current_source_id: getZodPrefixedIdWithDefault(
4646
4676
  "simulation_current_source"
4647
4677
  ),
4648
- is_dc_source: z202.literal(true).optional().default(true),
4649
- positive_source_port_id: z202.string().optional(),
4650
- negative_source_port_id: z202.string().optional(),
4651
- positive_source_net_id: z202.string().optional(),
4652
- negative_source_net_id: z202.string().optional(),
4678
+ is_dc_source: z203.literal(true).optional().default(true),
4679
+ positive_source_port_id: z203.string().optional(),
4680
+ negative_source_port_id: z203.string().optional(),
4681
+ positive_source_net_id: z203.string().optional(),
4682
+ negative_source_net_id: z203.string().optional(),
4653
4683
  current,
4654
4684
  ac_magnitude: current.optional(),
4655
4685
  ac_phase: rotation.optional()
4656
4686
  }).describe("Defines a DC current source for simulation");
4657
- var simulation_ac_current_source = z202.object({
4658
- type: z202.literal("simulation_current_source"),
4687
+ var simulation_ac_current_source = z203.object({
4688
+ type: z203.literal("simulation_current_source"),
4659
4689
  simulation_current_source_id: getZodPrefixedIdWithDefault(
4660
4690
  "simulation_current_source"
4661
4691
  ),
4662
- is_dc_source: z202.literal(false),
4663
- terminal1_source_port_id: z202.string().optional(),
4664
- terminal2_source_port_id: z202.string().optional(),
4665
- terminal1_source_net_id: z202.string().optional(),
4666
- terminal2_source_net_id: z202.string().optional(),
4692
+ is_dc_source: z203.literal(false),
4693
+ terminal1_source_port_id: z203.string().optional(),
4694
+ terminal2_source_port_id: z203.string().optional(),
4695
+ terminal1_source_net_id: z203.string().optional(),
4696
+ terminal2_source_net_id: z203.string().optional(),
4667
4697
  current: current.optional(),
4668
4698
  frequency: frequency.optional(),
4669
4699
  peak_to_peak_current: current.optional(),
@@ -4673,59 +4703,59 @@ var simulation_ac_current_source = z202.object({
4673
4703
  ac_magnitude: current.optional(),
4674
4704
  ac_phase: rotation.optional()
4675
4705
  }).describe("Defines an AC current source for simulation");
4676
- var simulation_current_source = z202.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
4706
+ var simulation_current_source = z203.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
4677
4707
  expectTypesMatch(true);
4678
4708
  expectTypesMatch(true);
4679
4709
  expectTypesMatch(true);
4680
4710
 
4681
4711
  // src/simulation/simulation_experiment.ts
4682
- import { z as z204 } from "zod";
4712
+ import { z as z205 } from "zod";
4683
4713
 
4684
4714
  // src/simulation/simulation_units.ts
4685
- import { z as z203 } from "zod";
4686
- var simulation_dc_sweep_unit = z203.custom(
4715
+ import { z as z204 } from "zod";
4716
+ var simulation_dc_sweep_unit = z204.custom(
4687
4717
  (dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
4688
4718
  );
4689
- var simulation_parameter_unit = z203.custom(
4719
+ var simulation_parameter_unit = z204.custom(
4690
4720
  (parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
4691
4721
  );
4692
4722
 
4693
4723
  // src/simulation/simulation_experiment.ts
4694
- var experiment_type = z204.union([
4695
- z204.literal("spice_dc_sweep"),
4696
- z204.literal("spice_dc_operating_point"),
4697
- z204.literal("spice_transient_analysis"),
4698
- z204.literal("spice_ac_analysis"),
4699
- z204.literal("pcb_return_current")
4724
+ var experiment_type = z205.union([
4725
+ z205.literal("spice_dc_sweep"),
4726
+ z205.literal("spice_dc_operating_point"),
4727
+ z205.literal("spice_transient_analysis"),
4728
+ z205.literal("spice_ac_analysis"),
4729
+ z205.literal("pcb_return_current")
4700
4730
  ]);
4701
- var spice_simulation_options = z204.object({
4702
- method: z204.enum(["trap", "gear"]).optional(),
4703
- reltol: z204.union([z204.number(), z204.string()]).optional(),
4704
- abstol: z204.union([z204.number(), z204.string()]).optional(),
4705
- vntol: z204.union([z204.number(), z204.string()]).optional()
4731
+ var spice_simulation_options = z205.object({
4732
+ method: z205.enum(["trap", "gear"]).optional(),
4733
+ reltol: z205.union([z205.number(), z205.string()]).optional(),
4734
+ abstol: z205.union([z205.number(), z205.string()]).optional(),
4735
+ vntol: z205.union([z205.number(), z205.string()]).optional()
4706
4736
  }).describe("SPICE solver options for a simulation experiment");
4707
- var simulation_experiment = z204.object({
4708
- type: z204.literal("simulation_experiment"),
4737
+ var simulation_experiment = z205.object({
4738
+ type: z205.literal("simulation_experiment"),
4709
4739
  simulation_experiment_id: getZodPrefixedIdWithDefault(
4710
4740
  "simulation_experiment"
4711
4741
  ),
4712
- name: z204.string(),
4742
+ name: z205.string(),
4713
4743
  experiment_type,
4714
4744
  time_per_step: duration_ms.optional(),
4715
4745
  start_time_ms: ms.optional(),
4716
4746
  end_time_ms: ms.optional(),
4717
4747
  spice_options: spice_simulation_options.optional(),
4718
- dc_sweep_voltage_source_id: z204.string().optional(),
4719
- dc_sweep_current_source_id: z204.string().optional(),
4720
- dc_sweep_start: z204.number().optional(),
4721
- dc_sweep_stop: z204.number().optional(),
4722
- dc_sweep_step: z204.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
4748
+ dc_sweep_voltage_source_id: z205.string().optional(),
4749
+ dc_sweep_current_source_id: z205.string().optional(),
4750
+ dc_sweep_start: z205.number().optional(),
4751
+ dc_sweep_stop: z205.number().optional(),
4752
+ dc_sweep_step: z205.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
4723
4753
  dc_sweep_unit: simulation_dc_sweep_unit.optional(),
4724
- ac_sweep_type: z204.enum(["linear", "decade", "octave"]).optional(),
4725
- ac_samples_per_interval: z204.number().int().positive().optional(),
4726
- ac_sample_count: z204.number().int().positive().optional(),
4727
- ac_start_frequency_hz: z204.number().positive().optional(),
4728
- ac_stop_frequency_hz: z204.number().positive().optional()
4754
+ ac_sweep_type: z205.enum(["linear", "decade", "octave"]).optional(),
4755
+ ac_samples_per_interval: z205.number().int().positive().optional(),
4756
+ ac_sample_count: z205.number().int().positive().optional(),
4757
+ ac_start_frequency_hz: z205.number().positive().optional(),
4758
+ ac_stop_frequency_hz: z205.number().positive().optional()
4729
4759
  }).superRefine((experiment, context) => {
4730
4760
  if (experiment.experiment_type === "spice_dc_sweep") {
4731
4761
  const requiredFields = [
@@ -4737,7 +4767,7 @@ var simulation_experiment = z204.object({
4737
4767
  for (const field of requiredFields) {
4738
4768
  if (experiment[field] === void 0) {
4739
4769
  context.addIssue({
4740
- code: z204.ZodIssueCode.custom,
4770
+ code: z205.ZodIssueCode.custom,
4741
4771
  path: [field],
4742
4772
  message: `${field} is required for a DC sweep`
4743
4773
  });
@@ -4747,7 +4777,7 @@ var simulation_experiment = z204.object({
4747
4777
  const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
4748
4778
  if (hasVoltageSource === hasCurrentSource) {
4749
4779
  context.addIssue({
4750
- code: z204.ZodIssueCode.custom,
4780
+ code: z205.ZodIssueCode.custom,
4751
4781
  path: ["dc_sweep_voltage_source_id"],
4752
4782
  message: "Exactly one DC sweep voltage or current source ID is required"
4753
4783
  });
@@ -4756,35 +4786,35 @@ var simulation_experiment = z204.object({
4756
4786
  if (experiment.experiment_type === "spice_ac_analysis") {
4757
4787
  if (experiment.ac_sweep_type === void 0) {
4758
4788
  context.addIssue({
4759
- code: z204.ZodIssueCode.custom,
4789
+ code: z205.ZodIssueCode.custom,
4760
4790
  path: ["ac_sweep_type"],
4761
4791
  message: "ac_sweep_type is required for an AC analysis"
4762
4792
  });
4763
4793
  }
4764
4794
  if (experiment.ac_start_frequency_hz === void 0) {
4765
4795
  context.addIssue({
4766
- code: z204.ZodIssueCode.custom,
4796
+ code: z205.ZodIssueCode.custom,
4767
4797
  path: ["ac_start_frequency_hz"],
4768
4798
  message: "ac_start_frequency_hz is required for an AC analysis"
4769
4799
  });
4770
4800
  }
4771
4801
  if (experiment.ac_stop_frequency_hz === void 0) {
4772
4802
  context.addIssue({
4773
- code: z204.ZodIssueCode.custom,
4803
+ code: z205.ZodIssueCode.custom,
4774
4804
  path: ["ac_stop_frequency_hz"],
4775
4805
  message: "ac_stop_frequency_hz is required for an AC analysis"
4776
4806
  });
4777
4807
  }
4778
4808
  if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
4779
4809
  context.addIssue({
4780
- code: z204.ZodIssueCode.custom,
4810
+ code: z205.ZodIssueCode.custom,
4781
4811
  path: ["ac_sample_count"],
4782
4812
  message: "ac_sample_count is required for a linear AC analysis"
4783
4813
  });
4784
4814
  }
4785
4815
  if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
4786
4816
  context.addIssue({
4787
- code: z204.ZodIssueCode.custom,
4817
+ code: z205.ZodIssueCode.custom,
4788
4818
  path: ["ac_samples_per_interval"],
4789
4819
  message: "ac_samples_per_interval is required for decade and octave AC analyses"
4790
4820
  });
@@ -4794,87 +4824,87 @@ var simulation_experiment = z204.object({
4794
4824
  expectTypesMatch(true);
4795
4825
 
4796
4826
  // src/simulation/simulation_transient_voltage_graph.ts
4797
- import { z as z206 } from "zod";
4827
+ import { z as z207 } from "zod";
4798
4828
 
4799
4829
  // src/simulation/simulation_parameter_sweep_coordinate.ts
4800
- import { z as z205 } from "zod";
4801
- var simulation_parameter_sweep_coordinate = z205.object({
4802
- simulation_parameter_sweep_id: z205.string(),
4803
- sweep_index: z205.number().int().nonnegative(),
4804
- parameter_value: z205.number(),
4830
+ import { z as z206 } from "zod";
4831
+ var simulation_parameter_sweep_coordinate = z206.object({
4832
+ simulation_parameter_sweep_id: z206.string(),
4833
+ sweep_index: z206.number().int().nonnegative(),
4834
+ parameter_value: z206.number(),
4805
4835
  parameter_unit: simulation_parameter_unit
4806
4836
  });
4807
4837
  expectTypesMatch(true);
4808
4838
 
4809
4839
  // src/simulation/simulation_transient_voltage_graph.ts
4810
- var simulation_transient_voltage_graph = z206.object({
4811
- type: z206.literal("simulation_transient_voltage_graph"),
4840
+ var simulation_transient_voltage_graph = z207.object({
4841
+ type: z207.literal("simulation_transient_voltage_graph"),
4812
4842
  simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
4813
4843
  "simulation_transient_voltage_graph"
4814
4844
  ),
4815
- simulation_experiment_id: z206.string(),
4845
+ simulation_experiment_id: z207.string(),
4816
4846
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4817
- timestamps_ms: z206.array(z206.number()).optional(),
4818
- voltage_levels: z206.array(z206.number()),
4819
- source_component_id: z206.string().optional(),
4820
- subcircuit_connectivity_map_key: z206.string().optional(),
4847
+ timestamps_ms: z207.array(z207.number()).optional(),
4848
+ voltage_levels: z207.array(z207.number()),
4849
+ source_component_id: z207.string().optional(),
4850
+ subcircuit_connectivity_map_key: z207.string().optional(),
4821
4851
  time_per_step: duration_ms,
4822
4852
  start_time_ms: ms,
4823
4853
  end_time_ms: ms,
4824
- name: z206.string().optional(),
4825
- color: z206.string().optional()
4854
+ name: z207.string().optional(),
4855
+ color: z207.string().optional()
4826
4856
  }).describe("Stores voltage measurements over time for a simulation");
4827
4857
  expectTypesMatch(true);
4828
4858
 
4829
4859
  // src/simulation/simulation_transient_current_graph.ts
4830
- import { z as z207 } from "zod";
4831
- var simulation_transient_current_graph = z207.object({
4832
- type: z207.literal("simulation_transient_current_graph"),
4860
+ import { z as z208 } from "zod";
4861
+ var simulation_transient_current_graph = z208.object({
4862
+ type: z208.literal("simulation_transient_current_graph"),
4833
4863
  simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
4834
4864
  "simulation_transient_current_graph"
4835
4865
  ),
4836
- simulation_experiment_id: z207.string(),
4866
+ simulation_experiment_id: z208.string(),
4837
4867
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4838
- timestamps_ms: z207.array(z207.number()).optional(),
4839
- current_levels: z207.array(z207.number()),
4840
- source_component_id: z207.string().optional(),
4841
- subcircuit_connectivity_map_key: z207.string().optional(),
4868
+ timestamps_ms: z208.array(z208.number()).optional(),
4869
+ current_levels: z208.array(z208.number()),
4870
+ source_component_id: z208.string().optional(),
4871
+ subcircuit_connectivity_map_key: z208.string().optional(),
4842
4872
  time_per_step: duration_ms,
4843
4873
  start_time_ms: ms,
4844
4874
  end_time_ms: ms,
4845
- name: z207.string().optional(),
4846
- color: z207.string().optional()
4875
+ name: z208.string().optional(),
4876
+ color: z208.string().optional()
4847
4877
  }).describe("Stores current measurements over time for a simulation");
4848
4878
  expectTypesMatch(true);
4849
4879
 
4850
4880
  // src/simulation/simulation_switch.ts
4851
- import { z as z208 } from "zod";
4852
- var simulation_switch = z208.object({
4853
- type: z208.literal("simulation_switch"),
4881
+ import { z as z209 } from "zod";
4882
+ var simulation_switch = z209.object({
4883
+ type: z209.literal("simulation_switch"),
4854
4884
  simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
4855
- source_component_id: z208.string().optional(),
4885
+ source_component_id: z209.string().optional(),
4856
4886
  closes_at: ms.optional(),
4857
4887
  opens_at: ms.optional(),
4858
- starts_closed: z208.boolean().optional(),
4888
+ starts_closed: z209.boolean().optional(),
4859
4889
  switching_frequency: frequency.optional()
4860
4890
  }).describe("Defines a switch for simulation timing control");
4861
4891
  expectTypesMatch(true);
4862
4892
 
4863
4893
  // src/simulation/simulation_voltage_probe.ts
4864
- import { z as z209 } from "zod";
4865
- var simulation_voltage_probe = z209.object({
4866
- type: z209.literal("simulation_voltage_probe"),
4894
+ import { z as z210 } from "zod";
4895
+ var simulation_voltage_probe = z210.object({
4896
+ type: z210.literal("simulation_voltage_probe"),
4867
4897
  simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
4868
4898
  "simulation_voltage_probe"
4869
4899
  ),
4870
- source_component_id: z209.string().optional(),
4871
- name: z209.string().optional(),
4872
- signal_input_source_port_id: z209.string().optional(),
4873
- signal_input_source_net_id: z209.string().optional(),
4874
- reference_input_source_port_id: z209.string().optional(),
4875
- reference_input_source_net_id: z209.string().optional(),
4876
- subcircuit_id: z209.string().optional(),
4877
- color: z209.string().optional()
4900
+ source_component_id: z210.string().optional(),
4901
+ name: z210.string().optional(),
4902
+ signal_input_source_port_id: z210.string().optional(),
4903
+ signal_input_source_net_id: z210.string().optional(),
4904
+ reference_input_source_port_id: z210.string().optional(),
4905
+ reference_input_source_net_id: z210.string().optional(),
4906
+ subcircuit_id: z210.string().optional(),
4907
+ color: z210.string().optional()
4878
4908
  }).describe(
4879
4909
  "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."
4880
4910
  ).superRefine((data, ctx) => {
@@ -4884,20 +4914,20 @@ var simulation_voltage_probe = z209.object({
4884
4914
  const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
4885
4915
  if (has_ports && has_nets) {
4886
4916
  ctx.addIssue({
4887
- code: z209.ZodIssueCode.custom,
4917
+ code: z210.ZodIssueCode.custom,
4888
4918
  message: "Cannot mix port and net connections in a differential probe."
4889
4919
  });
4890
4920
  } else if (has_ports) {
4891
4921
  if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
4892
4922
  ctx.addIssue({
4893
- code: z209.ZodIssueCode.custom,
4923
+ code: z210.ZodIssueCode.custom,
4894
4924
  message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
4895
4925
  });
4896
4926
  }
4897
4927
  } else if (has_nets) {
4898
4928
  if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
4899
4929
  ctx.addIssue({
4900
- code: z209.ZodIssueCode.custom,
4930
+ code: z210.ZodIssueCode.custom,
4901
4931
  message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
4902
4932
  });
4903
4933
  }
@@ -4905,7 +4935,7 @@ var simulation_voltage_probe = z209.object({
4905
4935
  } else {
4906
4936
  if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
4907
4937
  ctx.addIssue({
4908
- code: z209.ZodIssueCode.custom,
4938
+ code: z210.ZodIssueCode.custom,
4909
4939
  message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
4910
4940
  });
4911
4941
  }
@@ -4914,20 +4944,20 @@ var simulation_voltage_probe = z209.object({
4914
4944
  expectTypesMatch(true);
4915
4945
 
4916
4946
  // src/simulation/simulation_current_probe.ts
4917
- import { z as z210 } from "zod";
4918
- var simulation_current_probe = z210.object({
4919
- type: z210.literal("simulation_current_probe"),
4947
+ import { z as z211 } from "zod";
4948
+ var simulation_current_probe = z211.object({
4949
+ type: z211.literal("simulation_current_probe"),
4920
4950
  simulation_current_probe_id: getZodPrefixedIdWithDefault(
4921
4951
  "simulation_current_probe"
4922
4952
  ),
4923
- source_component_id: z210.string().optional(),
4924
- name: z210.string().optional(),
4925
- positive_source_port_id: z210.string().optional(),
4926
- negative_source_port_id: z210.string().optional(),
4927
- positive_source_net_id: z210.string().optional(),
4928
- negative_source_net_id: z210.string().optional(),
4929
- subcircuit_id: z210.string().optional(),
4930
- color: z210.string().optional()
4953
+ source_component_id: z211.string().optional(),
4954
+ name: z211.string().optional(),
4955
+ positive_source_port_id: z211.string().optional(),
4956
+ negative_source_port_id: z211.string().optional(),
4957
+ positive_source_net_id: z211.string().optional(),
4958
+ negative_source_net_id: z211.string().optional(),
4959
+ subcircuit_id: z211.string().optional(),
4960
+ color: z211.string().optional()
4931
4961
  }).describe(
4932
4962
  "Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
4933
4963
  ).superRefine((data, ctx) => {
@@ -4939,7 +4969,7 @@ var simulation_current_probe = z210.object({
4939
4969
  const hasNets = hasPositiveNet || hasNegativeNet;
4940
4970
  if (hasPorts && hasNets) {
4941
4971
  ctx.addIssue({
4942
- code: z210.ZodIssueCode.custom,
4972
+ code: z211.ZodIssueCode.custom,
4943
4973
  message: "Cannot mix port and net connections in a current probe."
4944
4974
  });
4945
4975
  return;
@@ -4947,7 +4977,7 @@ var simulation_current_probe = z210.object({
4947
4977
  if (hasPorts) {
4948
4978
  if (!hasPositivePort || !hasNegativePort) {
4949
4979
  ctx.addIssue({
4950
- code: z210.ZodIssueCode.custom,
4980
+ code: z211.ZodIssueCode.custom,
4951
4981
  message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
4952
4982
  });
4953
4983
  }
@@ -4956,71 +4986,71 @@ var simulation_current_probe = z210.object({
4956
4986
  if (hasNets) {
4957
4987
  if (!hasPositiveNet || !hasNegativeNet) {
4958
4988
  ctx.addIssue({
4959
- code: z210.ZodIssueCode.custom,
4989
+ code: z211.ZodIssueCode.custom,
4960
4990
  message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
4961
4991
  });
4962
4992
  }
4963
4993
  return;
4964
4994
  }
4965
4995
  ctx.addIssue({
4966
- code: z210.ZodIssueCode.custom,
4996
+ code: z211.ZodIssueCode.custom,
4967
4997
  message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
4968
4998
  });
4969
4999
  });
4970
5000
  expectTypesMatch(true);
4971
5001
 
4972
5002
  // src/simulation/simulation_unknown_experiment_error.ts
4973
- import { z as z211 } from "zod";
5003
+ import { z as z212 } from "zod";
4974
5004
  var simulation_unknown_experiment_error = base_circuit_json_error.extend({
4975
- type: z211.literal("simulation_unknown_experiment_error"),
5005
+ type: z212.literal("simulation_unknown_experiment_error"),
4976
5006
  simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
4977
5007
  "simulation_unknown_experiment_error"
4978
5008
  ),
4979
- error_type: z211.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
4980
- simulation_experiment_id: z211.string().optional(),
4981
- subcircuit_id: z211.string().optional()
5009
+ error_type: z212.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
5010
+ simulation_experiment_id: z212.string().optional(),
5011
+ subcircuit_id: z212.string().optional()
4982
5012
  }).describe("An unknown error occurred during the simulation experiment.");
4983
5013
  expectTypesMatch(true);
4984
5014
 
4985
5015
  // src/simulation/simulation_parameter_sweep.ts
4986
- import { z as z212 } from "zod";
4987
- var simulation_parameter_type = z212.enum([
5016
+ import { z as z213 } from "zod";
5017
+ var simulation_parameter_type = z213.enum([
4988
5018
  "resistance",
4989
5019
  "capacitance",
4990
5020
  "inductance",
4991
5021
  "voltage",
4992
5022
  "current"
4993
5023
  ]);
4994
- var simulation_parameter_sweep_base = z212.object({
4995
- type: z212.literal("simulation_parameter_sweep"),
5024
+ var simulation_parameter_sweep_base = z213.object({
5025
+ type: z213.literal("simulation_parameter_sweep"),
4996
5026
  simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
4997
5027
  "simulation_parameter_sweep"
4998
5028
  ),
4999
- simulation_experiment_id: z212.string(),
5000
- name: z212.string().optional(),
5001
- parameter_values: z212.array(z212.number()).min(1),
5029
+ simulation_experiment_id: z213.string(),
5030
+ name: z213.string().optional(),
5031
+ parameter_values: z213.array(z213.number()).min(1),
5002
5032
  parameter_unit: simulation_parameter_unit
5003
5033
  });
5004
- var simulation_parameter_sweep = z212.discriminatedUnion("parameter_type", [
5034
+ var simulation_parameter_sweep = z213.discriminatedUnion("parameter_type", [
5005
5035
  simulation_parameter_sweep_base.extend({
5006
- parameter_type: z212.literal("resistance"),
5007
- resistor_source_component_id: z212.string()
5036
+ parameter_type: z213.literal("resistance"),
5037
+ resistor_source_component_id: z213.string()
5008
5038
  }),
5009
5039
  simulation_parameter_sweep_base.extend({
5010
- parameter_type: z212.literal("capacitance"),
5011
- capacitor_source_component_id: z212.string()
5040
+ parameter_type: z213.literal("capacitance"),
5041
+ capacitor_source_component_id: z213.string()
5012
5042
  }),
5013
5043
  simulation_parameter_sweep_base.extend({
5014
- parameter_type: z212.literal("inductance"),
5015
- inductor_source_component_id: z212.string()
5044
+ parameter_type: z213.literal("inductance"),
5045
+ inductor_source_component_id: z213.string()
5016
5046
  }),
5017
5047
  simulation_parameter_sweep_base.extend({
5018
- parameter_type: z212.literal("voltage"),
5019
- source_net_id: z212.string()
5048
+ parameter_type: z213.literal("voltage"),
5049
+ source_net_id: z213.string()
5020
5050
  }),
5021
5051
  simulation_parameter_sweep_base.extend({
5022
- parameter_type: z212.literal("current"),
5023
- current_source_component_id: z212.string()
5052
+ parameter_type: z213.literal("current"),
5053
+ current_source_component_id: z213.string()
5024
5054
  })
5025
5055
  ]).describe("Repeats a simulation experiment over component parameter values");
5026
5056
  expectTypesMatch(
@@ -5028,52 +5058,52 @@ expectTypesMatch(
5028
5058
  );
5029
5059
 
5030
5060
  // src/simulation/simulation_dc_operating_point_voltage.ts
5031
- import { z as z213 } from "zod";
5032
- var simulation_dc_operating_point_voltage = z213.object({
5033
- type: z213.literal("simulation_dc_operating_point_voltage"),
5061
+ import { z as z214 } from "zod";
5062
+ var simulation_dc_operating_point_voltage = z214.object({
5063
+ type: z214.literal("simulation_dc_operating_point_voltage"),
5034
5064
  simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
5035
5065
  "simulation_dc_operating_point_voltage"
5036
5066
  ),
5037
- simulation_experiment_id: z213.string(),
5067
+ simulation_experiment_id: z214.string(),
5038
5068
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5039
- simulation_voltage_probe_id: z213.string(),
5040
- voltage: z213.number(),
5041
- name: z213.string().optional(),
5042
- color: z213.string().optional()
5069
+ simulation_voltage_probe_id: z214.string(),
5070
+ voltage: z214.number(),
5071
+ name: z214.string().optional(),
5072
+ color: z214.string().optional()
5043
5073
  });
5044
5074
  expectTypesMatch(true);
5045
5075
 
5046
5076
  // src/simulation/simulation_dc_operating_point_current.ts
5047
- import { z as z214 } from "zod";
5048
- var simulation_dc_operating_point_current = z214.object({
5049
- type: z214.literal("simulation_dc_operating_point_current"),
5077
+ import { z as z215 } from "zod";
5078
+ var simulation_dc_operating_point_current = z215.object({
5079
+ type: z215.literal("simulation_dc_operating_point_current"),
5050
5080
  simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
5051
5081
  "simulation_dc_operating_point_current"
5052
5082
  ),
5053
- simulation_experiment_id: z214.string(),
5083
+ simulation_experiment_id: z215.string(),
5054
5084
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5055
- simulation_current_probe_id: z214.string(),
5056
- current: z214.number(),
5057
- name: z214.string().optional(),
5058
- color: z214.string().optional()
5085
+ simulation_current_probe_id: z215.string(),
5086
+ current: z215.number(),
5087
+ name: z215.string().optional(),
5088
+ color: z215.string().optional()
5059
5089
  });
5060
5090
  expectTypesMatch(true);
5061
5091
 
5062
5092
  // src/simulation/simulation_dc_sweep_voltage_graph.ts
5063
- import { z as z215 } from "zod";
5064
- var simulation_dc_sweep_voltage_graph = z215.object({
5065
- type: z215.literal("simulation_dc_sweep_voltage_graph"),
5093
+ import { z as z216 } from "zod";
5094
+ var simulation_dc_sweep_voltage_graph = z216.object({
5095
+ type: z216.literal("simulation_dc_sweep_voltage_graph"),
5066
5096
  simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
5067
5097
  "simulation_dc_sweep_voltage_graph"
5068
5098
  ),
5069
- simulation_experiment_id: z215.string(),
5099
+ simulation_experiment_id: z216.string(),
5070
5100
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5071
- simulation_voltage_probe_id: z215.string(),
5072
- sweep_values: z215.array(z215.number()),
5101
+ simulation_voltage_probe_id: z216.string(),
5102
+ sweep_values: z216.array(z216.number()),
5073
5103
  sweep_unit: simulation_dc_sweep_unit,
5074
- voltage_levels: z215.array(z215.number()),
5075
- name: z215.string().optional(),
5076
- color: z215.string().optional()
5104
+ voltage_levels: z216.array(z216.number()),
5105
+ name: z216.string().optional(),
5106
+ color: z216.string().optional()
5077
5107
  }).refine(
5078
5108
  (graph) => graph.sweep_values.length === graph.voltage_levels.length,
5079
5109
  {
@@ -5083,20 +5113,20 @@ var simulation_dc_sweep_voltage_graph = z215.object({
5083
5113
  expectTypesMatch(true);
5084
5114
 
5085
5115
  // src/simulation/simulation_dc_sweep_current_graph.ts
5086
- import { z as z216 } from "zod";
5087
- var simulation_dc_sweep_current_graph = z216.object({
5088
- type: z216.literal("simulation_dc_sweep_current_graph"),
5116
+ import { z as z217 } from "zod";
5117
+ var simulation_dc_sweep_current_graph = z217.object({
5118
+ type: z217.literal("simulation_dc_sweep_current_graph"),
5089
5119
  simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
5090
5120
  "simulation_dc_sweep_current_graph"
5091
5121
  ),
5092
- simulation_experiment_id: z216.string(),
5122
+ simulation_experiment_id: z217.string(),
5093
5123
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5094
- simulation_current_probe_id: z216.string(),
5095
- sweep_values: z216.array(z216.number()),
5124
+ simulation_current_probe_id: z217.string(),
5125
+ sweep_values: z217.array(z217.number()),
5096
5126
  sweep_unit: simulation_dc_sweep_unit,
5097
- current_levels: z216.array(z216.number()),
5098
- name: z216.string().optional(),
5099
- color: z216.string().optional()
5127
+ current_levels: z217.array(z217.number()),
5128
+ name: z217.string().optional(),
5129
+ color: z217.string().optional()
5100
5130
  }).refine(
5101
5131
  (graph) => graph.sweep_values.length === graph.current_levels.length,
5102
5132
  {
@@ -5106,29 +5136,29 @@ var simulation_dc_sweep_current_graph = z216.object({
5106
5136
  expectTypesMatch(true);
5107
5137
 
5108
5138
  // src/simulation/simulation_ac_sweep_voltage_graph.ts
5109
- import { z as z218 } from "zod";
5139
+ import { z as z219 } from "zod";
5110
5140
 
5111
5141
  // src/simulation/simulation_complex_sample.ts
5112
- import { z as z217 } from "zod";
5113
- var simulation_complex_sample = z217.object({
5114
- re: z217.number(),
5115
- im: z217.number()
5142
+ import { z as z218 } from "zod";
5143
+ var simulation_complex_sample = z218.object({
5144
+ re: z218.number(),
5145
+ im: z218.number()
5116
5146
  });
5117
5147
  expectTypesMatch(true);
5118
5148
 
5119
5149
  // src/simulation/simulation_ac_sweep_voltage_graph.ts
5120
- var simulation_ac_sweep_voltage_graph = z218.object({
5121
- type: z218.literal("simulation_ac_sweep_voltage_graph"),
5150
+ var simulation_ac_sweep_voltage_graph = z219.object({
5151
+ type: z219.literal("simulation_ac_sweep_voltage_graph"),
5122
5152
  simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
5123
5153
  "simulation_ac_sweep_voltage_graph"
5124
5154
  ),
5125
- simulation_experiment_id: z218.string(),
5155
+ simulation_experiment_id: z219.string(),
5126
5156
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5127
- simulation_voltage_probe_id: z218.string(),
5128
- frequencies_hz: z218.array(z218.number()),
5129
- complex_voltages: z218.array(simulation_complex_sample),
5130
- name: z218.string().optional(),
5131
- color: z218.string().optional()
5157
+ simulation_voltage_probe_id: z219.string(),
5158
+ frequencies_hz: z219.array(z219.number()),
5159
+ complex_voltages: z219.array(simulation_complex_sample),
5160
+ name: z219.string().optional(),
5161
+ color: z219.string().optional()
5132
5162
  }).refine(
5133
5163
  (graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
5134
5164
  {
@@ -5138,19 +5168,19 @@ var simulation_ac_sweep_voltage_graph = z218.object({
5138
5168
  expectTypesMatch(true);
5139
5169
 
5140
5170
  // src/simulation/simulation_ac_sweep_current_graph.ts
5141
- import { z as z219 } from "zod";
5142
- var simulation_ac_sweep_current_graph = z219.object({
5143
- type: z219.literal("simulation_ac_sweep_current_graph"),
5171
+ import { z as z220 } from "zod";
5172
+ var simulation_ac_sweep_current_graph = z220.object({
5173
+ type: z220.literal("simulation_ac_sweep_current_graph"),
5144
5174
  simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
5145
5175
  "simulation_ac_sweep_current_graph"
5146
5176
  ),
5147
- simulation_experiment_id: z219.string(),
5177
+ simulation_experiment_id: z220.string(),
5148
5178
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5149
- simulation_current_probe_id: z219.string(),
5150
- frequencies_hz: z219.array(z219.number()),
5151
- complex_currents: z219.array(simulation_complex_sample),
5152
- name: z219.string().optional(),
5153
- color: z219.string().optional()
5179
+ simulation_current_probe_id: z220.string(),
5180
+ frequencies_hz: z220.array(z220.number()),
5181
+ complex_currents: z220.array(simulation_complex_sample),
5182
+ name: z220.string().optional(),
5183
+ color: z220.string().optional()
5154
5184
  }).refine(
5155
5185
  (graph) => graph.frequencies_hz.length === graph.complex_currents.length,
5156
5186
  {
@@ -5160,52 +5190,52 @@ var simulation_ac_sweep_current_graph = z219.object({
5160
5190
  expectTypesMatch(true);
5161
5191
 
5162
5192
  // src/simulation/simulation_op_amp.ts
5163
- import { z as z220 } from "zod";
5164
- var simulation_op_amp = z220.object({
5165
- type: z220.literal("simulation_op_amp"),
5193
+ import { z as z221 } from "zod";
5194
+ var simulation_op_amp = z221.object({
5195
+ type: z221.literal("simulation_op_amp"),
5166
5196
  simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
5167
- source_component_id: z220.string().optional(),
5168
- inverting_input_source_port_id: z220.string(),
5169
- non_inverting_input_source_port_id: z220.string(),
5170
- output_source_port_id: z220.string(),
5171
- positive_supply_source_port_id: z220.string(),
5172
- negative_supply_source_port_id: z220.string()
5197
+ source_component_id: z221.string().optional(),
5198
+ inverting_input_source_port_id: z221.string(),
5199
+ non_inverting_input_source_port_id: z221.string(),
5200
+ output_source_port_id: z221.string(),
5201
+ positive_supply_source_port_id: z221.string(),
5202
+ negative_supply_source_port_id: z221.string()
5173
5203
  }).describe("Defines a simple ideal operational amplifier for simulation");
5174
5204
  expectTypesMatch(true);
5175
5205
 
5176
5206
  // src/simulation/simulation_spice_subcircuit.ts
5177
- import { z as z221 } from "zod";
5178
- var simulation_spice_subcircuit = z221.object({
5179
- type: z221.literal("simulation_spice_subcircuit"),
5207
+ import { z as z222 } from "zod";
5208
+ var simulation_spice_subcircuit = z222.object({
5209
+ type: z222.literal("simulation_spice_subcircuit"),
5180
5210
  simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
5181
5211
  "simulation_spice_subcircuit"
5182
5212
  ),
5183
- source_component_id: z221.string(),
5184
- spice_pin_to_source_port_map: z221.record(z221.string(), z221.string()),
5185
- subcircuit_source: z221.string()
5213
+ source_component_id: z222.string(),
5214
+ spice_pin_to_source_port_map: z222.record(z222.string(), z222.string()),
5215
+ subcircuit_source: z222.string()
5186
5216
  }).describe("Defines a custom SPICE subcircuit model for simulation");
5187
5217
  expectTypesMatch(
5188
5218
  true
5189
5219
  );
5190
5220
 
5191
5221
  // src/simulation/simulation_oscilloscope_trace.ts
5192
- import { z as z222 } from "zod";
5222
+ import { z as z223 } from "zod";
5193
5223
  var hasValue = (value) => value !== void 0;
5194
- var simulation_oscilloscope_trace = z222.object({
5195
- type: z222.literal("simulation_oscilloscope_trace"),
5224
+ var simulation_oscilloscope_trace = z223.object({
5225
+ type: z223.literal("simulation_oscilloscope_trace"),
5196
5226
  simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
5197
5227
  "simulation_oscilloscope_trace"
5198
5228
  ),
5199
- simulation_transient_voltage_graph_id: z222.string().optional(),
5200
- simulation_transient_current_graph_id: z222.string().optional(),
5201
- simulation_voltage_probe_id: z222.string().optional(),
5202
- simulation_current_probe_id: z222.string().optional(),
5203
- display_name: z222.string().optional(),
5204
- color: z222.string().optional(),
5205
- display_center_value: z222.number().optional(),
5206
- display_center_offset_divs: z222.number().optional(),
5207
- volts_per_div: z222.number().positive().optional(),
5208
- amps_per_div: z222.number().positive().optional()
5229
+ simulation_transient_voltage_graph_id: z223.string().optional(),
5230
+ simulation_transient_current_graph_id: z223.string().optional(),
5231
+ simulation_voltage_probe_id: z223.string().optional(),
5232
+ simulation_current_probe_id: z223.string().optional(),
5233
+ display_name: z223.string().optional(),
5234
+ color: z223.string().optional(),
5235
+ display_center_value: z223.number().optional(),
5236
+ display_center_offset_divs: z223.number().optional(),
5237
+ volts_per_div: z223.number().positive().optional(),
5238
+ amps_per_div: z223.number().positive().optional()
5209
5239
  }).describe(
5210
5240
  "Defines how a simulation measurement is rendered as an oscilloscope-style trace."
5211
5241
  ).superRefine((data, ctx) => {
@@ -5219,19 +5249,19 @@ var simulation_oscilloscope_trace = z222.object({
5219
5249
  ].filter(hasValue).length;
5220
5250
  if (voltageReferences + currentReferences !== 1) {
5221
5251
  ctx.addIssue({
5222
- code: z222.ZodIssueCode.custom,
5252
+ code: z223.ZodIssueCode.custom,
5223
5253
  message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
5224
5254
  });
5225
5255
  }
5226
5256
  if (voltageReferences > 0 && data.amps_per_div !== void 0) {
5227
5257
  ctx.addIssue({
5228
- code: z222.ZodIssueCode.custom,
5258
+ code: z223.ZodIssueCode.custom,
5229
5259
  message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
5230
5260
  });
5231
5261
  }
5232
5262
  if (currentReferences > 0 && data.volts_per_div !== void 0) {
5233
5263
  ctx.addIssue({
5234
- code: z222.ZodIssueCode.custom,
5264
+ code: z223.ZodIssueCode.custom,
5235
5265
  message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
5236
5266
  });
5237
5267
  }
@@ -5239,51 +5269,51 @@ var simulation_oscilloscope_trace = z222.object({
5239
5269
  expectTypesMatch(true);
5240
5270
 
5241
5271
  // src/simulation/simulation_return_current_contact.ts
5242
- import { z as z223 } from "zod";
5243
- var contact_position = z223.object({
5244
- x: z223.number().finite(),
5245
- y: z223.number().finite(),
5272
+ import { z as z224 } from "zod";
5273
+ var contact_position = z224.object({
5274
+ x: z224.number().finite(),
5275
+ y: z224.number().finite(),
5246
5276
  layer: layer_ref
5247
5277
  });
5248
- var simulation_return_current_contact = z223.discriminatedUnion("contact_type", [
5278
+ var simulation_return_current_contact = z224.discriminatedUnion("contact_type", [
5249
5279
  contact_position.extend({
5250
- contact_type: z223.literal("pcb_port"),
5251
- pcb_port_id: z223.string().min(1)
5280
+ contact_type: z224.literal("pcb_port"),
5281
+ pcb_port_id: z224.string().min(1)
5252
5282
  }),
5253
5283
  contact_position.extend({
5254
- contact_type: z223.literal("pcb_via"),
5255
- pcb_via_id: z223.string().min(1)
5284
+ contact_type: z224.literal("pcb_via"),
5285
+ pcb_via_id: z224.string().min(1)
5256
5286
  }),
5257
5287
  contact_position.extend({
5258
- contact_type: z223.literal("pcb_copper_pour"),
5259
- pcb_copper_pour_id: z223.string().min(1)
5288
+ contact_type: z224.literal("pcb_copper_pour"),
5289
+ pcb_copper_pour_id: z224.string().min(1)
5260
5290
  })
5261
5291
  ]).describe("Identifies the reference conductor at a return-current contact");
5262
5292
  expectTypesMatch(true);
5263
5293
 
5264
5294
  // src/simulation/simulation_terminal_port.ts
5265
- import { z as z224 } from "zod";
5266
- var simulation_terminal_port = z224.object({
5267
- signal_pcb_port_id: z224.string().min(1),
5268
- reference_pcb_port_id: z224.string().min(1).optional(),
5295
+ import { z as z225 } from "zod";
5296
+ var simulation_terminal_port = z225.object({
5297
+ signal_pcb_port_id: z225.string().min(1),
5298
+ reference_pcb_port_id: z225.string().min(1).optional(),
5269
5299
  reference_layer: layer_ref,
5270
- resistance: z224.number().finite().positive()
5300
+ resistance: z225.number().finite().positive()
5271
5301
  }).describe(
5272
5302
  "A two-terminal return-current excitation port with resistance in ohms"
5273
5303
  );
5274
5304
  expectTypesMatch(true);
5275
5305
 
5276
5306
  // src/simulation/simulation_return_current_excitation.ts
5277
- import { z as z225 } from "zod";
5278
- var simulation_return_current_excitation = z225.object({
5279
- type: z225.literal("simulation_return_current_excitation"),
5307
+ import { z as z226 } from "zod";
5308
+ var simulation_return_current_excitation = z226.object({
5309
+ type: z226.literal("simulation_return_current_excitation"),
5280
5310
  simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
5281
5311
  "simulation_return_current_excitation"
5282
5312
  ),
5283
- simulation_experiment_id: z225.string().min(1),
5284
- pcb_trace_id: z225.string().min(1),
5285
- ground_source_net_id: z225.string().min(1),
5286
- current: z225.number().finite(),
5313
+ simulation_experiment_id: z226.string().min(1),
5314
+ pcb_trace_id: z226.string().min(1),
5315
+ ground_source_net_id: z226.string().min(1),
5316
+ current: z226.number().finite(),
5287
5317
  return_source: simulation_return_current_contact,
5288
5318
  return_sink: simulation_return_current_contact,
5289
5319
  source_port: simulation_terminal_port.optional(),
@@ -5294,34 +5324,34 @@ var simulation_return_current_excitation = z225.object({
5294
5324
  expectTypesMatch(true);
5295
5325
 
5296
5326
  // src/simulation/simulation_pcb_return_current_result.ts
5297
- import { z as z226 } from "zod";
5298
- var simulation_pcb_return_current_result = z226.object({
5299
- type: z226.literal("simulation_pcb_return_current_result"),
5327
+ import { z as z227 } from "zod";
5328
+ var simulation_pcb_return_current_result = z227.object({
5329
+ type: z227.literal("simulation_pcb_return_current_result"),
5300
5330
  simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
5301
5331
  "simulation_pcb_return_current_result"
5302
5332
  ),
5303
- simulation_experiment_id: z226.string().min(1),
5304
- pcb_board_id: z226.string().min(1),
5305
- simulation_return_current_excitation_ids: z226.array(z226.string().min(1)).min(1).refine(
5333
+ simulation_experiment_id: z227.string().min(1),
5334
+ pcb_board_id: z227.string().min(1),
5335
+ simulation_return_current_excitation_ids: z227.array(z227.string().min(1)).min(1).refine(
5306
5336
  (ids) => new Set(ids).size === ids.length,
5307
5337
  "Excitation IDs must be unique"
5308
5338
  ),
5309
- frequency_hz: z226.number().finite().positive().optional()
5339
+ frequency_hz: z227.number().finite().positive().optional()
5310
5340
  }).describe(
5311
5341
  "A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
5312
5342
  );
5313
5343
  expectTypesMatch(true);
5314
5344
 
5315
5345
  // src/simulation/simulation_return_current_asset.ts
5316
- import { z as z227 } from "zod";
5346
+ import { z as z228 } from "zod";
5317
5347
  function createSimulationReturnCurrentAssetSchema(mimetypes) {
5318
5348
  return asset.extend({
5319
- project_relative_path: z227.string().min(1),
5320
- url: z227.string().url()
5349
+ project_relative_path: z228.string().min(1),
5350
+ url: z228.string().url()
5321
5351
  }).superRefine((value, context) => {
5322
5352
  if (!mimetypes.includes(value.mimetype)) {
5323
5353
  context.addIssue({
5324
- code: z227.ZodIssueCode.custom,
5354
+ code: z228.ZodIssueCode.custom,
5325
5355
  path: ["mimetype"],
5326
5356
  message: `Expected one of: ${mimetypes.join(", ")}`
5327
5357
  });
@@ -5330,7 +5360,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
5330
5360
  const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
5331
5361
  if (mediaType?.toLowerCase() !== value.mimetype) {
5332
5362
  context.addIssue({
5333
- code: z227.ZodIssueCode.custom,
5363
+ code: z228.ZodIssueCode.custom,
5334
5364
  path: ["url"],
5335
5365
  message: "Data URL media type must match asset.mimetype"
5336
5366
  });
@@ -5345,29 +5375,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
5345
5375
  var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
5346
5376
 
5347
5377
  // src/simulation/simulation_pcb_return_current_field.ts
5348
- import { z as z228 } from "zod";
5349
- var simulation_pcb_return_current_field = z228.object({
5350
- type: z228.literal("simulation_pcb_return_current_field"),
5378
+ import { z as z229 } from "zod";
5379
+ var simulation_pcb_return_current_field = z229.object({
5380
+ type: z229.literal("simulation_pcb_return_current_field"),
5351
5381
  simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
5352
5382
  "simulation_pcb_return_current_field"
5353
5383
  ),
5354
- simulation_pcb_return_current_result_id: z228.string().min(1),
5384
+ simulation_pcb_return_current_result_id: z229.string().min(1),
5355
5385
  layer: layer_ref,
5356
- source_net_id: z228.string().min(1),
5357
- field_type: z228.enum(["real", "complex_phasor"]),
5358
- min_x: z228.number().finite(),
5359
- min_y: z228.number().finite(),
5360
- columns: z228.number().int().positive().safe(),
5361
- rows: z228.number().int().positive().safe(),
5362
- cell_width: z228.number().finite().positive(),
5363
- cell_height: z228.number().finite().positive(),
5364
- copper_thickness: z228.number().finite().positive(),
5365
- data_format: z228.literal("simulation_return_current_grid_json_v1"),
5386
+ source_net_id: z229.string().min(1),
5387
+ field_type: z229.enum(["real", "complex_phasor"]),
5388
+ min_x: z229.number().finite(),
5389
+ min_y: z229.number().finite(),
5390
+ columns: z229.number().int().positive().safe(),
5391
+ rows: z229.number().int().positive().safe(),
5392
+ cell_width: z229.number().finite().positive(),
5393
+ cell_height: z229.number().finite().positive(),
5394
+ copper_thickness: z229.number().finite().positive(),
5395
+ data_format: z229.literal("simulation_return_current_grid_json_v1"),
5366
5396
  field_asset: simulation_return_current_field_asset
5367
5397
  }).superRefine((field, context) => {
5368
5398
  if (!Number.isSafeInteger(field.columns * field.rows)) {
5369
5399
  context.addIssue({
5370
- code: z228.ZodIssueCode.custom,
5400
+ code: z229.ZodIssueCode.custom,
5371
5401
  path: ["columns"],
5372
5402
  message: "The grid cell count must be a safe integer"
5373
5403
  });
@@ -5378,16 +5408,16 @@ var simulation_pcb_return_current_field = z228.object({
5378
5408
  expectTypesMatch(true);
5379
5409
 
5380
5410
  // src/simulation/simulation_return_current_grid_json.ts
5381
- import { z as z229 } from "zod";
5382
- var channel = z229.array(z229.number().finite().nullable()).min(1);
5383
- var simulation_return_current_grid_json = z229.discriminatedUnion("field_type", [
5384
- z229.object({
5385
- field_type: z229.literal("real"),
5411
+ import { z as z230 } from "zod";
5412
+ var channel = z230.array(z230.number().finite().nullable()).min(1);
5413
+ var simulation_return_current_grid_json = z230.discriminatedUnion("field_type", [
5414
+ z230.object({
5415
+ field_type: z230.literal("real"),
5386
5416
  sheet_current_x: channel,
5387
5417
  sheet_current_y: channel
5388
5418
  }),
5389
- z229.object({
5390
- field_type: z229.literal("complex_phasor"),
5419
+ z230.object({
5420
+ field_type: z230.literal("complex_phasor"),
5391
5421
  sheet_current_x_real: channel,
5392
5422
  sheet_current_x_imag: channel,
5393
5423
  sheet_current_y_real: channel,
@@ -5403,7 +5433,7 @@ var simulation_return_current_grid_json = z229.discriminatedUnion("field_type",
5403
5433
  const first = channels[0];
5404
5434
  if (channels.some((values) => values.length !== first.length)) {
5405
5435
  context.addIssue({
5406
- code: z229.ZodIssueCode.custom,
5436
+ code: z230.ZodIssueCode.custom,
5407
5437
  message: "Current channels must have equal lengths"
5408
5438
  });
5409
5439
  return;
@@ -5412,7 +5442,7 @@ var simulation_return_current_grid_json = z229.discriminatedUnion("field_type",
5412
5442
  const masked = first[index] === null;
5413
5443
  if (channels.some((values) => values[index] === null !== masked)) {
5414
5444
  context.addIssue({
5415
- code: z229.ZodIssueCode.custom,
5445
+ code: z230.ZodIssueCode.custom,
5416
5446
  message: `Cell ${index} must be null in every channel or finite in every channel`
5417
5447
  });
5418
5448
  return;
@@ -5429,7 +5459,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5429
5459
  return simulation_return_current_grid_json.superRefine((grid, context) => {
5430
5460
  if (grid.field_type !== field.field_type) {
5431
5461
  context.addIssue({
5432
- code: z229.ZodIssueCode.custom,
5462
+ code: z230.ZodIssueCode.custom,
5433
5463
  path: ["field_type"],
5434
5464
  message: "Decoded field_type must match the parent field"
5435
5465
  });
@@ -5437,7 +5467,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5437
5467
  const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
5438
5468
  if (first.length !== count) {
5439
5469
  context.addIssue({
5440
- code: z229.ZodIssueCode.custom,
5470
+ code: z230.ZodIssueCode.custom,
5441
5471
  message: `Each current channel must have ${count} entries (columns * rows)`
5442
5472
  });
5443
5473
  }
@@ -5445,25 +5475,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5445
5475
  }
5446
5476
 
5447
5477
  // src/simulation/simulation_pcb_return_current_heatmap.ts
5448
- import { z as z230 } from "zod";
5449
- var simulation_pcb_return_current_heatmap = z230.object({
5450
- type: z230.literal("simulation_pcb_return_current_heatmap"),
5478
+ import { z as z231 } from "zod";
5479
+ var simulation_pcb_return_current_heatmap = z231.object({
5480
+ type: z231.literal("simulation_pcb_return_current_heatmap"),
5451
5481
  simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
5452
5482
  "simulation_pcb_return_current_heatmap"
5453
5483
  ),
5454
- simulation_pcb_return_current_result_id: z230.string().min(1),
5484
+ simulation_pcb_return_current_result_id: z231.string().min(1),
5455
5485
  layer: layer_ref,
5456
- source_net_id: z230.string().min(1),
5457
- min_x: z230.number().finite(),
5458
- min_y: z230.number().finite(),
5459
- max_x: z230.number().finite(),
5460
- max_y: z230.number().finite(),
5486
+ source_net_id: z231.string().min(1),
5487
+ min_x: z231.number().finite(),
5488
+ min_y: z231.number().finite(),
5489
+ max_x: z231.number().finite(),
5490
+ max_y: z231.number().finite(),
5461
5491
  image_asset: simulation_return_current_image_asset
5462
5492
  }).superRefine((heatmap, context) => {
5463
5493
  for (const axis of ["x", "y"]) {
5464
5494
  if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
5465
5495
  context.addIssue({
5466
- code: z230.ZodIssueCode.custom,
5496
+ code: z231.ZodIssueCode.custom,
5467
5497
  path: [`max_${axis}`],
5468
5498
  message: "Heatmap bounds must have positive width and height"
5469
5499
  });
@@ -5475,14 +5505,14 @@ var simulation_pcb_return_current_heatmap = z230.object({
5475
5505
  expectTypesMatch(true);
5476
5506
 
5477
5507
  // src/simulation/simulation_pcb_return_current_marker.ts
5478
- import { z as z231 } from "zod";
5479
- var marker_base = z231.object({
5480
- type: z231.literal("simulation_pcb_return_current_marker"),
5508
+ import { z as z232 } from "zod";
5509
+ var marker_base = z232.object({
5510
+ type: z232.literal("simulation_pcb_return_current_marker"),
5481
5511
  simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
5482
5512
  "simulation_pcb_return_current_marker"
5483
5513
  ),
5484
- simulation_pcb_return_current_result_id: z231.string().min(1),
5485
- role: z231.enum([
5514
+ simulation_pcb_return_current_result_id: z232.string().min(1),
5515
+ role: z232.enum([
5486
5516
  "signal_source",
5487
5517
  "signal_load",
5488
5518
  "return_source",
@@ -5490,33 +5520,33 @@ var marker_base = z231.object({
5490
5520
  "signal_transition",
5491
5521
  "return_transition"
5492
5522
  ]),
5493
- label: z231.string().optional(),
5494
- label_x: z231.number().finite().optional(),
5495
- label_y: z231.number().finite().optional()
5523
+ label: z232.string().optional(),
5524
+ label_x: z232.number().finite().optional(),
5525
+ label_y: z232.number().finite().optional()
5496
5526
  });
5497
- var simulation_pcb_return_current_marker = z231.discriminatedUnion("target_type", [
5527
+ var simulation_pcb_return_current_marker = z232.discriminatedUnion("target_type", [
5498
5528
  marker_base.extend({
5499
- target_type: z231.literal("pcb_port"),
5500
- pcb_port_id: z231.string().min(1),
5529
+ target_type: z232.literal("pcb_port"),
5530
+ pcb_port_id: z232.string().min(1),
5501
5531
  layer: layer_ref
5502
5532
  }),
5503
5533
  marker_base.extend({
5504
- target_type: z231.literal("pcb_via"),
5505
- pcb_via_id: z231.string().min(1),
5534
+ target_type: z232.literal("pcb_via"),
5535
+ pcb_via_id: z232.string().min(1),
5506
5536
  from_layer: layer_ref,
5507
5537
  to_layer: layer_ref
5508
5538
  })
5509
5539
  ]).superRefine((marker, context) => {
5510
5540
  if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
5511
5541
  context.addIssue({
5512
- code: z231.ZodIssueCode.custom,
5542
+ code: z232.ZodIssueCode.custom,
5513
5543
  path: ["label_x"],
5514
5544
  message: "label_x and label_y must be provided together"
5515
5545
  });
5516
5546
  }
5517
5547
  if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
5518
5548
  context.addIssue({
5519
- code: z231.ZodIssueCode.custom,
5549
+ code: z232.ZodIssueCode.custom,
5520
5550
  path: ["to_layer"],
5521
5551
  message: "A via transition must connect distinct layers"
5522
5552
  });
@@ -5527,8 +5557,8 @@ var simulation_pcb_return_current_marker = z231.discriminatedUnion("target_type"
5527
5557
  expectTypesMatch(true);
5528
5558
 
5529
5559
  // src/any_circuit_element.ts
5530
- import { z as z232 } from "zod";
5531
- var any_circuit_element = z232.union([
5560
+ import { z as z233 } from "zod";
5561
+ var any_circuit_element = z233.union([
5532
5562
  source_runtime_error,
5533
5563
  source_trace,
5534
5564
  source_bus,
@@ -5595,6 +5625,7 @@ var any_circuit_element = z232.union([
5595
5625
  pcb_text,
5596
5626
  pcb_trace,
5597
5627
  pcb_trace_warning,
5628
+ pcb_trace_style_warning,
5598
5629
  pcb_trace_too_long_warning,
5599
5630
  pcb_trace_too_long_error,
5600
5631
  pcb_bus_length_skew_error,
@@ -5873,6 +5904,7 @@ export {
5873
5904
  pcb_trace_route_point_through_pad,
5874
5905
  pcb_trace_route_point_via,
5875
5906
  pcb_trace_route_point_wire,
5907
+ pcb_trace_style_warning,
5876
5908
  pcb_trace_too_long_error,
5877
5909
  pcb_trace_too_long_warning,
5878
5910
  pcb_trace_too_many_vias_warning,