circuit-json 0.0.537 → 0.0.539

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
@@ -2904,6 +2904,7 @@ var pcb_trace = z126.object({
2904
2904
  pcb_component_id: z126.string().optional(),
2905
2905
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
2906
2906
  pcb_group_id: z126.string().optional(),
2907
+ pcb_panel_id: z126.string().optional(),
2907
2908
  subcircuit_id: z126.string().optional(),
2908
2909
  route_thickness_mode: z126.enum(["constant", "interpolated"]).default("constant").optional(),
2909
2910
  route_order_index: z126.number().optional(),
@@ -3252,6 +3253,7 @@ var pcb_via = z141.object({
3252
3253
  type: z141.literal("pcb_via"),
3253
3254
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
3254
3255
  pcb_group_id: z141.string().optional(),
3256
+ pcb_panel_id: z141.string().optional(),
3255
3257
  subcircuit_id: z141.string().optional(),
3256
3258
  subcircuit_connectivity_map_key: z141.string().optional(),
3257
3259
  x: distance,
@@ -4784,10 +4786,68 @@ expectTypesMatch(
4784
4786
  true
4785
4787
  );
4786
4788
 
4787
- // src/simulation/simulation_voltage_source.ts
4789
+ // src/cad/cad_explosion_stage.ts
4788
4790
  import { z as z206 } from "zod";
4789
- var wave_shape = z206.enum(["sinewave", "square", "triangle", "sawtooth"]);
4790
- var percentage = z206.union([z206.string(), z206.number()]).transform((val) => {
4791
+ var cad_explosion_stage = z206.object({
4792
+ type: z206.literal("cad_explosion_stage"),
4793
+ cad_explosion_stage_id: z206.string().min(1),
4794
+ name: z206.string().min(1).describe("Qualified authored stage name, for display."),
4795
+ order: z206.number().int().nonnegative().describe(
4796
+ "Unique zero-based playback order after resolving authored stage dependencies. Array order is irrelevant."
4797
+ ),
4798
+ cad_reference_surface_ids: z206.array(z206.string().min(1)).optional().describe(
4799
+ "Reference geometry belonging to this stage, including model-less assembly owners."
4800
+ ),
4801
+ cad_component_ids: z206.array(z206.string().min(1)).describe(
4802
+ "Explicit membership of this stage's moving assembly. May include an entire subassembly. A move targeting this stage translates every member once, preserving prior relative displacements; it does not execute the stage's moves."
4803
+ )
4804
+ }).describe(
4805
+ "One ordered step of an assembly explosion, with explicit movable membership. Geometry remains in its assembled pose; movement records describe a separate display view."
4806
+ );
4807
+ expectTypesMatch(true);
4808
+
4809
+ // src/cad/cad_explosion_move.ts
4810
+ import { z as z207 } from "zod";
4811
+ var cad_explosion_move = z207.object({
4812
+ type: z207.literal("cad_explosion_move"),
4813
+ cad_explosion_move_id: z207.string().min(1),
4814
+ cad_explosion_stage_id: z207.string().min(1).describe("Stage executing this move."),
4815
+ order: z207.number().int().nonnegative().describe(
4816
+ "Unique zero-based sequential move order within the executing stage."
4817
+ ),
4818
+ targets: z207.array(
4819
+ z207.discriminatedUnion("type", [
4820
+ z207.object({
4821
+ type: z207.literal("cad_reference_surface"),
4822
+ cad_reference_surface_id: z207.string().min(1)
4823
+ }),
4824
+ z207.object({
4825
+ type: z207.literal("cad_component"),
4826
+ cad_component_id: z207.string().min(1)
4827
+ }),
4828
+ z207.object({
4829
+ type: z207.literal("cad_explosion_stage"),
4830
+ cad_explosion_stage_id: z207.string().min(1)
4831
+ })
4832
+ ])
4833
+ ).min(1).describe(
4834
+ "Components or entire stages to translate simultaneously. Stage targets expand their explicit cad_component_ids. Deduplicate the union per move; separate moves accumulate."
4835
+ ),
4836
+ translation: point3.refine(
4837
+ (p) => [p.x, p.y, p.z].every(Number.isFinite),
4838
+ "Explosion translations must be finite"
4839
+ ).describe(
4840
+ "Resolved displacement in right-handed circuit-world XYZ, millimeters (+Z above). A vector, not an absolute destination. Producers rotate owner-local offsets into world space once. Partial progress scales this vector."
4841
+ )
4842
+ }).describe(
4843
+ "An ordered straight translation. Stage membership, target IDs and order must be validated against the whole document. Stage progress divides equally among sequential moves. No rotation, PCB movement or collision-clearance claim is implied."
4844
+ );
4845
+ expectTypesMatch(true);
4846
+
4847
+ // src/simulation/simulation_voltage_source.ts
4848
+ import { z as z208 } from "zod";
4849
+ var wave_shape = z208.enum(["sinewave", "square", "triangle", "sawtooth"]);
4850
+ var percentage = z208.union([z208.string(), z208.number()]).transform((val) => {
4791
4851
  if (typeof val === "string") {
4792
4852
  if (val.endsWith("%")) {
4793
4853
  return parseFloat(val.slice(0, -1)) / 100;
@@ -4796,32 +4856,32 @@ var percentage = z206.union([z206.string(), z206.number()]).transform((val) => {
4796
4856
  }
4797
4857
  return val;
4798
4858
  }).pipe(
4799
- z206.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4859
+ z208.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4800
4860
  );
4801
- var simulation_dc_voltage_source = z206.object({
4802
- type: z206.literal("simulation_voltage_source"),
4861
+ var simulation_dc_voltage_source = z208.object({
4862
+ type: z208.literal("simulation_voltage_source"),
4803
4863
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
4804
4864
  "simulation_voltage_source"
4805
4865
  ),
4806
- is_dc_source: z206.literal(true).optional().default(true),
4807
- positive_source_port_id: z206.string().optional(),
4808
- negative_source_port_id: z206.string().optional(),
4809
- positive_source_net_id: z206.string().optional(),
4810
- negative_source_net_id: z206.string().optional(),
4866
+ is_dc_source: z208.literal(true).optional().default(true),
4867
+ positive_source_port_id: z208.string().optional(),
4868
+ negative_source_port_id: z208.string().optional(),
4869
+ positive_source_net_id: z208.string().optional(),
4870
+ negative_source_net_id: z208.string().optional(),
4811
4871
  voltage,
4812
4872
  ac_magnitude: voltage.optional(),
4813
4873
  ac_phase: rotation.optional()
4814
4874
  }).describe("Defines a DC voltage source for simulation");
4815
- var simulation_ac_voltage_source = z206.object({
4816
- type: z206.literal("simulation_voltage_source"),
4875
+ var simulation_ac_voltage_source = z208.object({
4876
+ type: z208.literal("simulation_voltage_source"),
4817
4877
  simulation_voltage_source_id: getZodPrefixedIdWithDefault(
4818
4878
  "simulation_voltage_source"
4819
4879
  ),
4820
- is_dc_source: z206.literal(false),
4821
- terminal1_source_port_id: z206.string().optional(),
4822
- terminal2_source_port_id: z206.string().optional(),
4823
- terminal1_source_net_id: z206.string().optional(),
4824
- terminal2_source_net_id: z206.string().optional(),
4880
+ is_dc_source: z208.literal(false),
4881
+ terminal1_source_port_id: z208.string().optional(),
4882
+ terminal2_source_port_id: z208.string().optional(),
4883
+ terminal1_source_net_id: z208.string().optional(),
4884
+ terminal2_source_net_id: z208.string().optional(),
4825
4885
  voltage: voltage.optional(),
4826
4886
  frequency: frequency.optional(),
4827
4887
  peak_to_peak_voltage: voltage.optional(),
@@ -4836,14 +4896,14 @@ var simulation_ac_voltage_source = z206.object({
4836
4896
  ac_magnitude: voltage.optional(),
4837
4897
  ac_phase: rotation.optional()
4838
4898
  }).describe("Defines an AC voltage source for simulation");
4839
- var simulation_voltage_source = z206.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
4899
+ var simulation_voltage_source = z208.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
4840
4900
  expectTypesMatch(true);
4841
4901
  expectTypesMatch(true);
4842
4902
  expectTypesMatch(true);
4843
4903
 
4844
4904
  // src/simulation/simulation_current_source.ts
4845
- import { z as z207 } from "zod";
4846
- var percentage2 = z207.union([z207.string(), z207.number()]).transform((val) => {
4905
+ import { z as z209 } from "zod";
4906
+ var percentage2 = z209.union([z209.string(), z209.number()]).transform((val) => {
4847
4907
  if (typeof val === "string") {
4848
4908
  if (val.endsWith("%")) {
4849
4909
  return parseFloat(val.slice(0, -1)) / 100;
@@ -4852,32 +4912,32 @@ var percentage2 = z207.union([z207.string(), z207.number()]).transform((val) =>
4852
4912
  }
4853
4913
  return val;
4854
4914
  }).pipe(
4855
- z207.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4915
+ z209.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
4856
4916
  );
4857
- var simulation_dc_current_source = z207.object({
4858
- type: z207.literal("simulation_current_source"),
4917
+ var simulation_dc_current_source = z209.object({
4918
+ type: z209.literal("simulation_current_source"),
4859
4919
  simulation_current_source_id: getZodPrefixedIdWithDefault(
4860
4920
  "simulation_current_source"
4861
4921
  ),
4862
- is_dc_source: z207.literal(true).optional().default(true),
4863
- positive_source_port_id: z207.string().optional(),
4864
- negative_source_port_id: z207.string().optional(),
4865
- positive_source_net_id: z207.string().optional(),
4866
- negative_source_net_id: z207.string().optional(),
4922
+ is_dc_source: z209.literal(true).optional().default(true),
4923
+ positive_source_port_id: z209.string().optional(),
4924
+ negative_source_port_id: z209.string().optional(),
4925
+ positive_source_net_id: z209.string().optional(),
4926
+ negative_source_net_id: z209.string().optional(),
4867
4927
  current,
4868
4928
  ac_magnitude: current.optional(),
4869
4929
  ac_phase: rotation.optional()
4870
4930
  }).describe("Defines a DC current source for simulation");
4871
- var simulation_ac_current_source = z207.object({
4872
- type: z207.literal("simulation_current_source"),
4931
+ var simulation_ac_current_source = z209.object({
4932
+ type: z209.literal("simulation_current_source"),
4873
4933
  simulation_current_source_id: getZodPrefixedIdWithDefault(
4874
4934
  "simulation_current_source"
4875
4935
  ),
4876
- is_dc_source: z207.literal(false),
4877
- terminal1_source_port_id: z207.string().optional(),
4878
- terminal2_source_port_id: z207.string().optional(),
4879
- terminal1_source_net_id: z207.string().optional(),
4880
- terminal2_source_net_id: z207.string().optional(),
4936
+ is_dc_source: z209.literal(false),
4937
+ terminal1_source_port_id: z209.string().optional(),
4938
+ terminal2_source_port_id: z209.string().optional(),
4939
+ terminal1_source_net_id: z209.string().optional(),
4940
+ terminal2_source_net_id: z209.string().optional(),
4881
4941
  current: current.optional(),
4882
4942
  frequency: frequency.optional(),
4883
4943
  peak_to_peak_current: current.optional(),
@@ -4887,64 +4947,64 @@ var simulation_ac_current_source = z207.object({
4887
4947
  ac_magnitude: current.optional(),
4888
4948
  ac_phase: rotation.optional()
4889
4949
  }).describe("Defines an AC current source for simulation");
4890
- var simulation_current_source = z207.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
4950
+ var simulation_current_source = z209.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
4891
4951
  expectTypesMatch(true);
4892
4952
  expectTypesMatch(true);
4893
4953
  expectTypesMatch(true);
4894
4954
 
4895
4955
  // src/simulation/simulation_experiment.ts
4896
- import { z as z209 } from "zod";
4956
+ import { z as z211 } from "zod";
4897
4957
 
4898
4958
  // src/simulation/simulation_units.ts
4899
- import { z as z208 } from "zod";
4900
- var simulation_dc_sweep_unit = z208.custom(
4959
+ import { z as z210 } from "zod";
4960
+ var simulation_dc_sweep_unit = z210.custom(
4901
4961
  (dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
4902
4962
  );
4903
- var simulation_parameter_unit = z208.custom(
4963
+ var simulation_parameter_unit = z210.custom(
4904
4964
  (parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
4905
4965
  );
4906
4966
 
4907
4967
  // src/simulation/simulation_experiment.ts
4908
- var experiment_type = z209.union([
4909
- z209.literal("spice_dc_sweep"),
4910
- z209.literal("spice_dc_operating_point"),
4911
- z209.literal("spice_transient_analysis"),
4912
- z209.literal("spice_ac_analysis"),
4913
- z209.literal("pcb_return_current")
4968
+ var experiment_type = z211.union([
4969
+ z211.literal("spice_dc_sweep"),
4970
+ z211.literal("spice_dc_operating_point"),
4971
+ z211.literal("spice_transient_analysis"),
4972
+ z211.literal("spice_ac_analysis"),
4973
+ z211.literal("pcb_return_current")
4914
4974
  ]);
4915
- var spice_simulation_options = z209.object({
4916
- method: z209.enum(["trap", "gear"]).optional(),
4917
- reltol: z209.union([z209.number(), z209.string()]).optional(),
4918
- abstol: z209.union([z209.number(), z209.string()]).optional(),
4919
- vntol: z209.union([z209.number(), z209.string()]).optional()
4975
+ var spice_simulation_options = z211.object({
4976
+ method: z211.enum(["trap", "gear"]).optional(),
4977
+ reltol: z211.union([z211.number(), z211.string()]).optional(),
4978
+ abstol: z211.union([z211.number(), z211.string()]).optional(),
4979
+ vntol: z211.union([z211.number(), z211.string()]).optional()
4920
4980
  }).describe("SPICE solver options for a simulation experiment");
4921
- var pcb_spice_channel = z209.object({
4922
- reduction: z209.union([
4923
- z209.literal("routed-copper"),
4924
- z209.literal("straightened-stages")
4981
+ var pcb_spice_channel = z211.object({
4982
+ reduction: z211.union([
4983
+ z211.literal("routed-copper"),
4984
+ z211.literal("straightened-stages")
4925
4985
  ]),
4926
- sections: z209.number().int().min(1).max(128),
4927
- lanes: z209.array(
4928
- z209.object({
4929
- name: z209.string().min(1),
4930
- driver_source_port_id: z209.string().min(1),
4931
- receiver_source_port_id: z209.string().min(1)
4986
+ sections: z211.number().int().min(1).max(128),
4987
+ lanes: z211.array(
4988
+ z211.object({
4989
+ name: z211.string().min(1),
4990
+ driver_source_port_id: z211.string().min(1),
4991
+ receiver_source_port_id: z211.string().min(1)
4932
4992
  })
4933
4993
  ).min(1).max(3),
4934
- reference_source_port_id: z209.string().min(1),
4935
- passive_source_component_ids: z209.array(z209.string().min(1)).optional(),
4936
- extraction: z209.object({
4937
- minimum_frequency_hz: z209.number().finite().positive(),
4938
- maximum_frequency_hz: z209.number().finite().positive(),
4939
- model_frequency_hz: z209.number().finite().positive(),
4940
- filaments: z209.number().int().positive(),
4941
- refinement_filaments: z209.number().int().positive(),
4942
- convergence_tolerance: z209.number().finite().positive(),
4943
- capacitance_tolerance: z209.number().finite().positive(),
4944
- reciprocity_tolerance: z209.number().finite().positive(),
4945
- dc_resistance_tolerance: z209.number().finite().positive(),
4946
- max_panel_length_mm: z209.number().finite().positive(),
4947
- ground_mesh_size_mm: z209.number().finite().positive().optional()
4994
+ reference_source_port_id: z211.string().min(1),
4995
+ passive_source_component_ids: z211.array(z211.string().min(1)).optional(),
4996
+ extraction: z211.object({
4997
+ minimum_frequency_hz: z211.number().finite().positive(),
4998
+ maximum_frequency_hz: z211.number().finite().positive(),
4999
+ model_frequency_hz: z211.number().finite().positive(),
5000
+ filaments: z211.number().int().positive(),
5001
+ refinement_filaments: z211.number().int().positive(),
5002
+ convergence_tolerance: z211.number().finite().positive(),
5003
+ capacitance_tolerance: z211.number().finite().positive(),
5004
+ reciprocity_tolerance: z211.number().finite().positive(),
5005
+ dc_resistance_tolerance: z211.number().finite().positive(),
5006
+ max_panel_length_mm: z211.number().finite().positive(),
5007
+ ground_mesh_size_mm: z211.number().finite().positive().optional()
4948
5008
  }).refine(
4949
5009
  (extraction) => extraction.refinement_filaments > extraction.filaments,
4950
5010
  {
@@ -4952,50 +5012,50 @@ var pcb_spice_channel = z209.object({
4952
5012
  message: "refinement_filaments must be greater than filaments"
4953
5013
  }
4954
5014
  ),
4955
- relative_permittivity: z209.number().finite().positive().optional(),
4956
- via_plating_thickness_mm: z209.number().finite().positive().optional(),
4957
- via_equivalent_width_mm: z209.number().finite().positive().optional(),
4958
- omit_through_via_stubs: z209.boolean().optional(),
4959
- straightened_stage_profiles: z209.record(
4960
- z209.object({
4961
- spacing_mm: z209.number().finite().positive(),
4962
- relative_permittivity: z209.number().finite().positive(),
4963
- return: z209.object({
4964
- width_mm: z209.number().finite().positive(),
4965
- thickness_mm: z209.number().finite().positive(),
4966
- length_factor: z209.number().finite().positive(),
4967
- center_y_mm: z209.number().finite(),
4968
- center_z_mm: z209.number().finite()
5015
+ relative_permittivity: z211.number().finite().positive().optional(),
5016
+ via_plating_thickness_mm: z211.number().finite().positive().optional(),
5017
+ via_equivalent_width_mm: z211.number().finite().positive().optional(),
5018
+ omit_through_via_stubs: z211.boolean().optional(),
5019
+ straightened_stage_profiles: z211.record(
5020
+ z211.object({
5021
+ spacing_mm: z211.number().finite().positive(),
5022
+ relative_permittivity: z211.number().finite().positive(),
5023
+ return: z211.object({
5024
+ width_mm: z211.number().finite().positive(),
5025
+ thickness_mm: z211.number().finite().positive(),
5026
+ length_factor: z211.number().finite().positive(),
5027
+ center_y_mm: z211.number().finite(),
5028
+ center_z_mm: z211.number().finite()
4969
5029
  })
4970
5030
  })
4971
5031
  ).optional()
4972
5032
  });
4973
5033
  expectTypesMatch(true);
4974
- var simulation_experiment = z209.object({
4975
- type: z209.literal("simulation_experiment"),
5034
+ var simulation_experiment = z211.object({
5035
+ type: z211.literal("simulation_experiment"),
4976
5036
  simulation_experiment_id: getZodPrefixedIdWithDefault(
4977
5037
  "simulation_experiment"
4978
5038
  ),
4979
- name: z209.string(),
5039
+ name: z211.string(),
4980
5040
  experiment_type,
4981
- subcircuit_id: z209.string().optional(),
4982
- spice_engine: z209.string().optional(),
5041
+ subcircuit_id: z211.string().optional(),
5042
+ spice_engine: z211.string().optional(),
4983
5043
  time_per_step: duration_ms.optional(),
4984
5044
  start_time_ms: ms.optional(),
4985
5045
  end_time_ms: ms.optional(),
4986
5046
  spice_options: spice_simulation_options.optional(),
4987
5047
  pcb_spice_channel: pcb_spice_channel.optional(),
4988
- dc_sweep_voltage_source_id: z209.string().optional(),
4989
- dc_sweep_current_source_id: z209.string().optional(),
4990
- dc_sweep_start: z209.number().optional(),
4991
- dc_sweep_stop: z209.number().optional(),
4992
- dc_sweep_step: z209.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
5048
+ dc_sweep_voltage_source_id: z211.string().optional(),
5049
+ dc_sweep_current_source_id: z211.string().optional(),
5050
+ dc_sweep_start: z211.number().optional(),
5051
+ dc_sweep_stop: z211.number().optional(),
5052
+ dc_sweep_step: z211.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
4993
5053
  dc_sweep_unit: simulation_dc_sweep_unit.optional(),
4994
- ac_sweep_type: z209.enum(["linear", "decade", "octave"]).optional(),
4995
- ac_samples_per_interval: z209.number().int().positive().optional(),
4996
- ac_sample_count: z209.number().int().positive().optional(),
4997
- ac_start_frequency_hz: z209.number().positive().optional(),
4998
- ac_stop_frequency_hz: z209.number().positive().optional()
5054
+ ac_sweep_type: z211.enum(["linear", "decade", "octave"]).optional(),
5055
+ ac_samples_per_interval: z211.number().int().positive().optional(),
5056
+ ac_sample_count: z211.number().int().positive().optional(),
5057
+ ac_start_frequency_hz: z211.number().positive().optional(),
5058
+ ac_stop_frequency_hz: z211.number().positive().optional()
4999
5059
  }).superRefine((experiment, context) => {
5000
5060
  if (experiment.experiment_type === "spice_dc_sweep") {
5001
5061
  const requiredFields = [
@@ -5007,7 +5067,7 @@ var simulation_experiment = z209.object({
5007
5067
  for (const field of requiredFields) {
5008
5068
  if (experiment[field] === void 0) {
5009
5069
  context.addIssue({
5010
- code: z209.ZodIssueCode.custom,
5070
+ code: z211.ZodIssueCode.custom,
5011
5071
  path: [field],
5012
5072
  message: `${field} is required for a DC sweep`
5013
5073
  });
@@ -5017,7 +5077,7 @@ var simulation_experiment = z209.object({
5017
5077
  const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
5018
5078
  if (hasVoltageSource === hasCurrentSource) {
5019
5079
  context.addIssue({
5020
- code: z209.ZodIssueCode.custom,
5080
+ code: z211.ZodIssueCode.custom,
5021
5081
  path: ["dc_sweep_voltage_source_id"],
5022
5082
  message: "Exactly one DC sweep voltage or current source ID is required"
5023
5083
  });
@@ -5026,35 +5086,35 @@ var simulation_experiment = z209.object({
5026
5086
  if (experiment.experiment_type === "spice_ac_analysis") {
5027
5087
  if (experiment.ac_sweep_type === void 0) {
5028
5088
  context.addIssue({
5029
- code: z209.ZodIssueCode.custom,
5089
+ code: z211.ZodIssueCode.custom,
5030
5090
  path: ["ac_sweep_type"],
5031
5091
  message: "ac_sweep_type is required for an AC analysis"
5032
5092
  });
5033
5093
  }
5034
5094
  if (experiment.ac_start_frequency_hz === void 0) {
5035
5095
  context.addIssue({
5036
- code: z209.ZodIssueCode.custom,
5096
+ code: z211.ZodIssueCode.custom,
5037
5097
  path: ["ac_start_frequency_hz"],
5038
5098
  message: "ac_start_frequency_hz is required for an AC analysis"
5039
5099
  });
5040
5100
  }
5041
5101
  if (experiment.ac_stop_frequency_hz === void 0) {
5042
5102
  context.addIssue({
5043
- code: z209.ZodIssueCode.custom,
5103
+ code: z211.ZodIssueCode.custom,
5044
5104
  path: ["ac_stop_frequency_hz"],
5045
5105
  message: "ac_stop_frequency_hz is required for an AC analysis"
5046
5106
  });
5047
5107
  }
5048
5108
  if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
5049
5109
  context.addIssue({
5050
- code: z209.ZodIssueCode.custom,
5110
+ code: z211.ZodIssueCode.custom,
5051
5111
  path: ["ac_sample_count"],
5052
5112
  message: "ac_sample_count is required for a linear AC analysis"
5053
5113
  });
5054
5114
  }
5055
5115
  if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
5056
5116
  context.addIssue({
5057
- code: z209.ZodIssueCode.custom,
5117
+ code: z211.ZodIssueCode.custom,
5058
5118
  path: ["ac_samples_per_interval"],
5059
5119
  message: "ac_samples_per_interval is required for decade and octave AC analyses"
5060
5120
  });
@@ -5064,88 +5124,88 @@ var simulation_experiment = z209.object({
5064
5124
  expectTypesMatch(true);
5065
5125
 
5066
5126
  // src/simulation/simulation_transient_voltage_graph.ts
5067
- import { z as z211 } from "zod";
5127
+ import { z as z213 } from "zod";
5068
5128
 
5069
5129
  // src/simulation/simulation_parameter_sweep_coordinate.ts
5070
- import { z as z210 } from "zod";
5071
- var simulation_parameter_sweep_coordinate = z210.object({
5072
- simulation_parameter_sweep_id: z210.string(),
5073
- sweep_index: z210.number().int().nonnegative(),
5074
- parameter_value: z210.number(),
5130
+ import { z as z212 } from "zod";
5131
+ var simulation_parameter_sweep_coordinate = z212.object({
5132
+ simulation_parameter_sweep_id: z212.string(),
5133
+ sweep_index: z212.number().int().nonnegative(),
5134
+ parameter_value: z212.number(),
5075
5135
  parameter_unit: simulation_parameter_unit
5076
5136
  });
5077
5137
  expectTypesMatch(true);
5078
5138
 
5079
5139
  // src/simulation/simulation_transient_voltage_graph.ts
5080
- var simulation_transient_voltage_graph = z211.object({
5081
- type: z211.literal("simulation_transient_voltage_graph"),
5140
+ var simulation_transient_voltage_graph = z213.object({
5141
+ type: z213.literal("simulation_transient_voltage_graph"),
5082
5142
  simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
5083
5143
  "simulation_transient_voltage_graph"
5084
5144
  ),
5085
- simulation_experiment_id: z211.string(),
5086
- simulation_voltage_probe_id: z211.string().optional(),
5145
+ simulation_experiment_id: z213.string(),
5146
+ simulation_voltage_probe_id: z213.string().optional(),
5087
5147
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5088
- timestamps_ms: z211.array(z211.number()).optional(),
5089
- voltage_levels: z211.array(z211.number()),
5090
- source_component_id: z211.string().optional(),
5091
- subcircuit_connectivity_map_key: z211.string().optional(),
5148
+ timestamps_ms: z213.array(z213.number()).optional(),
5149
+ voltage_levels: z213.array(z213.number()),
5150
+ source_component_id: z213.string().optional(),
5151
+ subcircuit_connectivity_map_key: z213.string().optional(),
5092
5152
  time_per_step: duration_ms,
5093
5153
  start_time_ms: ms,
5094
5154
  end_time_ms: ms,
5095
- name: z211.string().optional(),
5096
- color: z211.string().optional()
5155
+ name: z213.string().optional(),
5156
+ color: z213.string().optional()
5097
5157
  }).describe("Stores voltage measurements over time for a simulation");
5098
5158
  expectTypesMatch(true);
5099
5159
 
5100
5160
  // src/simulation/simulation_transient_current_graph.ts
5101
- import { z as z212 } from "zod";
5102
- var simulation_transient_current_graph = z212.object({
5103
- type: z212.literal("simulation_transient_current_graph"),
5161
+ import { z as z214 } from "zod";
5162
+ var simulation_transient_current_graph = z214.object({
5163
+ type: z214.literal("simulation_transient_current_graph"),
5104
5164
  simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
5105
5165
  "simulation_transient_current_graph"
5106
5166
  ),
5107
- simulation_experiment_id: z212.string(),
5167
+ simulation_experiment_id: z214.string(),
5108
5168
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5109
- timestamps_ms: z212.array(z212.number()).optional(),
5110
- current_levels: z212.array(z212.number()),
5111
- source_component_id: z212.string().optional(),
5112
- subcircuit_connectivity_map_key: z212.string().optional(),
5169
+ timestamps_ms: z214.array(z214.number()).optional(),
5170
+ current_levels: z214.array(z214.number()),
5171
+ source_component_id: z214.string().optional(),
5172
+ subcircuit_connectivity_map_key: z214.string().optional(),
5113
5173
  time_per_step: duration_ms,
5114
5174
  start_time_ms: ms,
5115
5175
  end_time_ms: ms,
5116
- name: z212.string().optional(),
5117
- color: z212.string().optional()
5176
+ name: z214.string().optional(),
5177
+ color: z214.string().optional()
5118
5178
  }).describe("Stores current measurements over time for a simulation");
5119
5179
  expectTypesMatch(true);
5120
5180
 
5121
5181
  // src/simulation/simulation_switch.ts
5122
- import { z as z213 } from "zod";
5123
- var simulation_switch = z213.object({
5124
- type: z213.literal("simulation_switch"),
5182
+ import { z as z215 } from "zod";
5183
+ var simulation_switch = z215.object({
5184
+ type: z215.literal("simulation_switch"),
5125
5185
  simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
5126
- source_component_id: z213.string().optional(),
5186
+ source_component_id: z215.string().optional(),
5127
5187
  closes_at: ms.optional(),
5128
5188
  opens_at: ms.optional(),
5129
- starts_closed: z213.boolean().optional(),
5189
+ starts_closed: z215.boolean().optional(),
5130
5190
  switching_frequency: frequency.optional()
5131
5191
  }).describe("Defines a switch for simulation timing control");
5132
5192
  expectTypesMatch(true);
5133
5193
 
5134
5194
  // src/simulation/simulation_voltage_probe.ts
5135
- import { z as z214 } from "zod";
5136
- var simulation_voltage_probe = z214.object({
5137
- type: z214.literal("simulation_voltage_probe"),
5195
+ import { z as z216 } from "zod";
5196
+ var simulation_voltage_probe = z216.object({
5197
+ type: z216.literal("simulation_voltage_probe"),
5138
5198
  simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
5139
5199
  "simulation_voltage_probe"
5140
5200
  ),
5141
- source_component_id: z214.string().optional(),
5142
- name: z214.string().optional(),
5143
- signal_input_source_port_id: z214.string().optional(),
5144
- signal_input_source_net_id: z214.string().optional(),
5145
- reference_input_source_port_id: z214.string().optional(),
5146
- reference_input_source_net_id: z214.string().optional(),
5147
- subcircuit_id: z214.string().optional(),
5148
- color: z214.string().optional()
5201
+ source_component_id: z216.string().optional(),
5202
+ name: z216.string().optional(),
5203
+ signal_input_source_port_id: z216.string().optional(),
5204
+ signal_input_source_net_id: z216.string().optional(),
5205
+ reference_input_source_port_id: z216.string().optional(),
5206
+ reference_input_source_net_id: z216.string().optional(),
5207
+ subcircuit_id: z216.string().optional(),
5208
+ color: z216.string().optional()
5149
5209
  }).describe(
5150
5210
  "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."
5151
5211
  ).superRefine((data, ctx) => {
@@ -5155,20 +5215,20 @@ var simulation_voltage_probe = z214.object({
5155
5215
  const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
5156
5216
  if (has_ports && has_nets) {
5157
5217
  ctx.addIssue({
5158
- code: z214.ZodIssueCode.custom,
5218
+ code: z216.ZodIssueCode.custom,
5159
5219
  message: "Cannot mix port and net connections in a differential probe."
5160
5220
  });
5161
5221
  } else if (has_ports) {
5162
5222
  if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
5163
5223
  ctx.addIssue({
5164
- code: z214.ZodIssueCode.custom,
5224
+ code: z216.ZodIssueCode.custom,
5165
5225
  message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
5166
5226
  });
5167
5227
  }
5168
5228
  } else if (has_nets) {
5169
5229
  if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
5170
5230
  ctx.addIssue({
5171
- code: z214.ZodIssueCode.custom,
5231
+ code: z216.ZodIssueCode.custom,
5172
5232
  message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
5173
5233
  });
5174
5234
  }
@@ -5176,7 +5236,7 @@ var simulation_voltage_probe = z214.object({
5176
5236
  } else {
5177
5237
  if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
5178
5238
  ctx.addIssue({
5179
- code: z214.ZodIssueCode.custom,
5239
+ code: z216.ZodIssueCode.custom,
5180
5240
  message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
5181
5241
  });
5182
5242
  }
@@ -5185,20 +5245,20 @@ var simulation_voltage_probe = z214.object({
5185
5245
  expectTypesMatch(true);
5186
5246
 
5187
5247
  // src/simulation/simulation_current_probe.ts
5188
- import { z as z215 } from "zod";
5189
- var simulation_current_probe = z215.object({
5190
- type: z215.literal("simulation_current_probe"),
5248
+ import { z as z217 } from "zod";
5249
+ var simulation_current_probe = z217.object({
5250
+ type: z217.literal("simulation_current_probe"),
5191
5251
  simulation_current_probe_id: getZodPrefixedIdWithDefault(
5192
5252
  "simulation_current_probe"
5193
5253
  ),
5194
- source_component_id: z215.string().optional(),
5195
- name: z215.string().optional(),
5196
- positive_source_port_id: z215.string().optional(),
5197
- negative_source_port_id: z215.string().optional(),
5198
- positive_source_net_id: z215.string().optional(),
5199
- negative_source_net_id: z215.string().optional(),
5200
- subcircuit_id: z215.string().optional(),
5201
- color: z215.string().optional()
5254
+ source_component_id: z217.string().optional(),
5255
+ name: z217.string().optional(),
5256
+ positive_source_port_id: z217.string().optional(),
5257
+ negative_source_port_id: z217.string().optional(),
5258
+ positive_source_net_id: z217.string().optional(),
5259
+ negative_source_net_id: z217.string().optional(),
5260
+ subcircuit_id: z217.string().optional(),
5261
+ color: z217.string().optional()
5202
5262
  }).describe(
5203
5263
  "Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
5204
5264
  ).superRefine((data, ctx) => {
@@ -5210,7 +5270,7 @@ var simulation_current_probe = z215.object({
5210
5270
  const hasNets = hasPositiveNet || hasNegativeNet;
5211
5271
  if (hasPorts && hasNets) {
5212
5272
  ctx.addIssue({
5213
- code: z215.ZodIssueCode.custom,
5273
+ code: z217.ZodIssueCode.custom,
5214
5274
  message: "Cannot mix port and net connections in a current probe."
5215
5275
  });
5216
5276
  return;
@@ -5218,7 +5278,7 @@ var simulation_current_probe = z215.object({
5218
5278
  if (hasPorts) {
5219
5279
  if (!hasPositivePort || !hasNegativePort) {
5220
5280
  ctx.addIssue({
5221
- code: z215.ZodIssueCode.custom,
5281
+ code: z217.ZodIssueCode.custom,
5222
5282
  message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
5223
5283
  });
5224
5284
  }
@@ -5227,71 +5287,71 @@ var simulation_current_probe = z215.object({
5227
5287
  if (hasNets) {
5228
5288
  if (!hasPositiveNet || !hasNegativeNet) {
5229
5289
  ctx.addIssue({
5230
- code: z215.ZodIssueCode.custom,
5290
+ code: z217.ZodIssueCode.custom,
5231
5291
  message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
5232
5292
  });
5233
5293
  }
5234
5294
  return;
5235
5295
  }
5236
5296
  ctx.addIssue({
5237
- code: z215.ZodIssueCode.custom,
5297
+ code: z217.ZodIssueCode.custom,
5238
5298
  message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
5239
5299
  });
5240
5300
  });
5241
5301
  expectTypesMatch(true);
5242
5302
 
5243
5303
  // src/simulation/simulation_unknown_experiment_error.ts
5244
- import { z as z216 } from "zod";
5304
+ import { z as z218 } from "zod";
5245
5305
  var simulation_unknown_experiment_error = base_circuit_json_error.extend({
5246
- type: z216.literal("simulation_unknown_experiment_error"),
5306
+ type: z218.literal("simulation_unknown_experiment_error"),
5247
5307
  simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
5248
5308
  "simulation_unknown_experiment_error"
5249
5309
  ),
5250
- error_type: z216.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
5251
- simulation_experiment_id: z216.string().optional(),
5252
- subcircuit_id: z216.string().optional()
5310
+ error_type: z218.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
5311
+ simulation_experiment_id: z218.string().optional(),
5312
+ subcircuit_id: z218.string().optional()
5253
5313
  }).describe("An unknown error occurred during the simulation experiment.");
5254
5314
  expectTypesMatch(true);
5255
5315
 
5256
5316
  // src/simulation/simulation_parameter_sweep.ts
5257
- import { z as z217 } from "zod";
5258
- var simulation_parameter_type = z217.enum([
5317
+ import { z as z219 } from "zod";
5318
+ var simulation_parameter_type = z219.enum([
5259
5319
  "resistance",
5260
5320
  "capacitance",
5261
5321
  "inductance",
5262
5322
  "voltage",
5263
5323
  "current"
5264
5324
  ]);
5265
- var simulation_parameter_sweep_base = z217.object({
5266
- type: z217.literal("simulation_parameter_sweep"),
5325
+ var simulation_parameter_sweep_base = z219.object({
5326
+ type: z219.literal("simulation_parameter_sweep"),
5267
5327
  simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
5268
5328
  "simulation_parameter_sweep"
5269
5329
  ),
5270
- simulation_experiment_id: z217.string(),
5271
- name: z217.string().optional(),
5272
- parameter_values: z217.array(z217.number()).min(1),
5330
+ simulation_experiment_id: z219.string(),
5331
+ name: z219.string().optional(),
5332
+ parameter_values: z219.array(z219.number()).min(1),
5273
5333
  parameter_unit: simulation_parameter_unit
5274
5334
  });
5275
- var simulation_parameter_sweep = z217.discriminatedUnion("parameter_type", [
5335
+ var simulation_parameter_sweep = z219.discriminatedUnion("parameter_type", [
5276
5336
  simulation_parameter_sweep_base.extend({
5277
- parameter_type: z217.literal("resistance"),
5278
- resistor_source_component_id: z217.string()
5337
+ parameter_type: z219.literal("resistance"),
5338
+ resistor_source_component_id: z219.string()
5279
5339
  }),
5280
5340
  simulation_parameter_sweep_base.extend({
5281
- parameter_type: z217.literal("capacitance"),
5282
- capacitor_source_component_id: z217.string()
5341
+ parameter_type: z219.literal("capacitance"),
5342
+ capacitor_source_component_id: z219.string()
5283
5343
  }),
5284
5344
  simulation_parameter_sweep_base.extend({
5285
- parameter_type: z217.literal("inductance"),
5286
- inductor_source_component_id: z217.string()
5345
+ parameter_type: z219.literal("inductance"),
5346
+ inductor_source_component_id: z219.string()
5287
5347
  }),
5288
5348
  simulation_parameter_sweep_base.extend({
5289
- parameter_type: z217.literal("voltage"),
5290
- source_net_id: z217.string()
5349
+ parameter_type: z219.literal("voltage"),
5350
+ source_net_id: z219.string()
5291
5351
  }),
5292
5352
  simulation_parameter_sweep_base.extend({
5293
- parameter_type: z217.literal("current"),
5294
- current_source_component_id: z217.string()
5353
+ parameter_type: z219.literal("current"),
5354
+ current_source_component_id: z219.string()
5295
5355
  })
5296
5356
  ]).describe("Repeats a simulation experiment over component parameter values");
5297
5357
  expectTypesMatch(
@@ -5299,52 +5359,52 @@ expectTypesMatch(
5299
5359
  );
5300
5360
 
5301
5361
  // src/simulation/simulation_dc_operating_point_voltage.ts
5302
- import { z as z218 } from "zod";
5303
- var simulation_dc_operating_point_voltage = z218.object({
5304
- type: z218.literal("simulation_dc_operating_point_voltage"),
5362
+ import { z as z220 } from "zod";
5363
+ var simulation_dc_operating_point_voltage = z220.object({
5364
+ type: z220.literal("simulation_dc_operating_point_voltage"),
5305
5365
  simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
5306
5366
  "simulation_dc_operating_point_voltage"
5307
5367
  ),
5308
- simulation_experiment_id: z218.string(),
5368
+ simulation_experiment_id: z220.string(),
5309
5369
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5310
- simulation_voltage_probe_id: z218.string(),
5311
- voltage: z218.number(),
5312
- name: z218.string().optional(),
5313
- color: z218.string().optional()
5370
+ simulation_voltage_probe_id: z220.string(),
5371
+ voltage: z220.number(),
5372
+ name: z220.string().optional(),
5373
+ color: z220.string().optional()
5314
5374
  });
5315
5375
  expectTypesMatch(true);
5316
5376
 
5317
5377
  // src/simulation/simulation_dc_operating_point_current.ts
5318
- import { z as z219 } from "zod";
5319
- var simulation_dc_operating_point_current = z219.object({
5320
- type: z219.literal("simulation_dc_operating_point_current"),
5378
+ import { z as z221 } from "zod";
5379
+ var simulation_dc_operating_point_current = z221.object({
5380
+ type: z221.literal("simulation_dc_operating_point_current"),
5321
5381
  simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
5322
5382
  "simulation_dc_operating_point_current"
5323
5383
  ),
5324
- simulation_experiment_id: z219.string(),
5384
+ simulation_experiment_id: z221.string(),
5325
5385
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5326
- simulation_current_probe_id: z219.string(),
5327
- current: z219.number(),
5328
- name: z219.string().optional(),
5329
- color: z219.string().optional()
5386
+ simulation_current_probe_id: z221.string(),
5387
+ current: z221.number(),
5388
+ name: z221.string().optional(),
5389
+ color: z221.string().optional()
5330
5390
  });
5331
5391
  expectTypesMatch(true);
5332
5392
 
5333
5393
  // src/simulation/simulation_dc_sweep_voltage_graph.ts
5334
- import { z as z220 } from "zod";
5335
- var simulation_dc_sweep_voltage_graph = z220.object({
5336
- type: z220.literal("simulation_dc_sweep_voltage_graph"),
5394
+ import { z as z222 } from "zod";
5395
+ var simulation_dc_sweep_voltage_graph = z222.object({
5396
+ type: z222.literal("simulation_dc_sweep_voltage_graph"),
5337
5397
  simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
5338
5398
  "simulation_dc_sweep_voltage_graph"
5339
5399
  ),
5340
- simulation_experiment_id: z220.string(),
5400
+ simulation_experiment_id: z222.string(),
5341
5401
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5342
- simulation_voltage_probe_id: z220.string(),
5343
- sweep_values: z220.array(z220.number()),
5402
+ simulation_voltage_probe_id: z222.string(),
5403
+ sweep_values: z222.array(z222.number()),
5344
5404
  sweep_unit: simulation_dc_sweep_unit,
5345
- voltage_levels: z220.array(z220.number()),
5346
- name: z220.string().optional(),
5347
- color: z220.string().optional()
5405
+ voltage_levels: z222.array(z222.number()),
5406
+ name: z222.string().optional(),
5407
+ color: z222.string().optional()
5348
5408
  }).refine(
5349
5409
  (graph) => graph.sweep_values.length === graph.voltage_levels.length,
5350
5410
  {
@@ -5354,20 +5414,20 @@ var simulation_dc_sweep_voltage_graph = z220.object({
5354
5414
  expectTypesMatch(true);
5355
5415
 
5356
5416
  // src/simulation/simulation_dc_sweep_current_graph.ts
5357
- import { z as z221 } from "zod";
5358
- var simulation_dc_sweep_current_graph = z221.object({
5359
- type: z221.literal("simulation_dc_sweep_current_graph"),
5417
+ import { z as z223 } from "zod";
5418
+ var simulation_dc_sweep_current_graph = z223.object({
5419
+ type: z223.literal("simulation_dc_sweep_current_graph"),
5360
5420
  simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
5361
5421
  "simulation_dc_sweep_current_graph"
5362
5422
  ),
5363
- simulation_experiment_id: z221.string(),
5423
+ simulation_experiment_id: z223.string(),
5364
5424
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5365
- simulation_current_probe_id: z221.string(),
5366
- sweep_values: z221.array(z221.number()),
5425
+ simulation_current_probe_id: z223.string(),
5426
+ sweep_values: z223.array(z223.number()),
5367
5427
  sweep_unit: simulation_dc_sweep_unit,
5368
- current_levels: z221.array(z221.number()),
5369
- name: z221.string().optional(),
5370
- color: z221.string().optional()
5428
+ current_levels: z223.array(z223.number()),
5429
+ name: z223.string().optional(),
5430
+ color: z223.string().optional()
5371
5431
  }).refine(
5372
5432
  (graph) => graph.sweep_values.length === graph.current_levels.length,
5373
5433
  {
@@ -5377,29 +5437,29 @@ var simulation_dc_sweep_current_graph = z221.object({
5377
5437
  expectTypesMatch(true);
5378
5438
 
5379
5439
  // src/simulation/simulation_ac_sweep_voltage_graph.ts
5380
- import { z as z223 } from "zod";
5440
+ import { z as z225 } from "zod";
5381
5441
 
5382
5442
  // src/simulation/simulation_complex_sample.ts
5383
- import { z as z222 } from "zod";
5384
- var simulation_complex_sample = z222.object({
5385
- re: z222.number(),
5386
- im: z222.number()
5443
+ import { z as z224 } from "zod";
5444
+ var simulation_complex_sample = z224.object({
5445
+ re: z224.number(),
5446
+ im: z224.number()
5387
5447
  });
5388
5448
  expectTypesMatch(true);
5389
5449
 
5390
5450
  // src/simulation/simulation_ac_sweep_voltage_graph.ts
5391
- var simulation_ac_sweep_voltage_graph = z223.object({
5392
- type: z223.literal("simulation_ac_sweep_voltage_graph"),
5451
+ var simulation_ac_sweep_voltage_graph = z225.object({
5452
+ type: z225.literal("simulation_ac_sweep_voltage_graph"),
5393
5453
  simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
5394
5454
  "simulation_ac_sweep_voltage_graph"
5395
5455
  ),
5396
- simulation_experiment_id: z223.string(),
5456
+ simulation_experiment_id: z225.string(),
5397
5457
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5398
- simulation_voltage_probe_id: z223.string(),
5399
- frequencies_hz: z223.array(z223.number()),
5400
- complex_voltages: z223.array(simulation_complex_sample),
5401
- name: z223.string().optional(),
5402
- color: z223.string().optional()
5458
+ simulation_voltage_probe_id: z225.string(),
5459
+ frequencies_hz: z225.array(z225.number()),
5460
+ complex_voltages: z225.array(simulation_complex_sample),
5461
+ name: z225.string().optional(),
5462
+ color: z225.string().optional()
5403
5463
  }).refine(
5404
5464
  (graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
5405
5465
  {
@@ -5409,19 +5469,19 @@ var simulation_ac_sweep_voltage_graph = z223.object({
5409
5469
  expectTypesMatch(true);
5410
5470
 
5411
5471
  // src/simulation/simulation_ac_sweep_current_graph.ts
5412
- import { z as z224 } from "zod";
5413
- var simulation_ac_sweep_current_graph = z224.object({
5414
- type: z224.literal("simulation_ac_sweep_current_graph"),
5472
+ import { z as z226 } from "zod";
5473
+ var simulation_ac_sweep_current_graph = z226.object({
5474
+ type: z226.literal("simulation_ac_sweep_current_graph"),
5415
5475
  simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
5416
5476
  "simulation_ac_sweep_current_graph"
5417
5477
  ),
5418
- simulation_experiment_id: z224.string(),
5478
+ simulation_experiment_id: z226.string(),
5419
5479
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
5420
- simulation_current_probe_id: z224.string(),
5421
- frequencies_hz: z224.array(z224.number()),
5422
- complex_currents: z224.array(simulation_complex_sample),
5423
- name: z224.string().optional(),
5424
- color: z224.string().optional()
5480
+ simulation_current_probe_id: z226.string(),
5481
+ frequencies_hz: z226.array(z226.number()),
5482
+ complex_currents: z226.array(simulation_complex_sample),
5483
+ name: z226.string().optional(),
5484
+ color: z226.string().optional()
5425
5485
  }).refine(
5426
5486
  (graph) => graph.frequencies_hz.length === graph.complex_currents.length,
5427
5487
  {
@@ -5431,52 +5491,52 @@ var simulation_ac_sweep_current_graph = z224.object({
5431
5491
  expectTypesMatch(true);
5432
5492
 
5433
5493
  // src/simulation/simulation_op_amp.ts
5434
- import { z as z225 } from "zod";
5435
- var simulation_op_amp = z225.object({
5436
- type: z225.literal("simulation_op_amp"),
5494
+ import { z as z227 } from "zod";
5495
+ var simulation_op_amp = z227.object({
5496
+ type: z227.literal("simulation_op_amp"),
5437
5497
  simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
5438
- source_component_id: z225.string().optional(),
5439
- inverting_input_source_port_id: z225.string(),
5440
- non_inverting_input_source_port_id: z225.string(),
5441
- output_source_port_id: z225.string(),
5442
- positive_supply_source_port_id: z225.string(),
5443
- negative_supply_source_port_id: z225.string()
5498
+ source_component_id: z227.string().optional(),
5499
+ inverting_input_source_port_id: z227.string(),
5500
+ non_inverting_input_source_port_id: z227.string(),
5501
+ output_source_port_id: z227.string(),
5502
+ positive_supply_source_port_id: z227.string(),
5503
+ negative_supply_source_port_id: z227.string()
5444
5504
  }).describe("Defines a simple ideal operational amplifier for simulation");
5445
5505
  expectTypesMatch(true);
5446
5506
 
5447
5507
  // src/simulation/simulation_spice_subcircuit.ts
5448
- import { z as z226 } from "zod";
5449
- var simulation_spice_subcircuit = z226.object({
5450
- type: z226.literal("simulation_spice_subcircuit"),
5508
+ import { z as z228 } from "zod";
5509
+ var simulation_spice_subcircuit = z228.object({
5510
+ type: z228.literal("simulation_spice_subcircuit"),
5451
5511
  simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
5452
5512
  "simulation_spice_subcircuit"
5453
5513
  ),
5454
- source_component_id: z226.string(),
5455
- spice_pin_to_source_port_map: z226.record(z226.string(), z226.string()),
5456
- subcircuit_source: z226.string()
5514
+ source_component_id: z228.string(),
5515
+ spice_pin_to_source_port_map: z228.record(z228.string(), z228.string()),
5516
+ subcircuit_source: z228.string()
5457
5517
  }).describe("Defines a custom SPICE subcircuit model for simulation");
5458
5518
  expectTypesMatch(
5459
5519
  true
5460
5520
  );
5461
5521
 
5462
5522
  // src/simulation/simulation_oscilloscope_trace.ts
5463
- import { z as z227 } from "zod";
5523
+ import { z as z229 } from "zod";
5464
5524
  var hasValue = (value) => value !== void 0;
5465
- var simulation_oscilloscope_trace = z227.object({
5466
- type: z227.literal("simulation_oscilloscope_trace"),
5525
+ var simulation_oscilloscope_trace = z229.object({
5526
+ type: z229.literal("simulation_oscilloscope_trace"),
5467
5527
  simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
5468
5528
  "simulation_oscilloscope_trace"
5469
5529
  ),
5470
- simulation_transient_voltage_graph_id: z227.string().optional(),
5471
- simulation_transient_current_graph_id: z227.string().optional(),
5472
- simulation_voltage_probe_id: z227.string().optional(),
5473
- simulation_current_probe_id: z227.string().optional(),
5474
- display_name: z227.string().optional(),
5475
- color: z227.string().optional(),
5476
- display_center_value: z227.number().optional(),
5477
- display_center_offset_divs: z227.number().optional(),
5478
- volts_per_div: z227.number().positive().optional(),
5479
- amps_per_div: z227.number().positive().optional()
5530
+ simulation_transient_voltage_graph_id: z229.string().optional(),
5531
+ simulation_transient_current_graph_id: z229.string().optional(),
5532
+ simulation_voltage_probe_id: z229.string().optional(),
5533
+ simulation_current_probe_id: z229.string().optional(),
5534
+ display_name: z229.string().optional(),
5535
+ color: z229.string().optional(),
5536
+ display_center_value: z229.number().optional(),
5537
+ display_center_offset_divs: z229.number().optional(),
5538
+ volts_per_div: z229.number().positive().optional(),
5539
+ amps_per_div: z229.number().positive().optional()
5480
5540
  }).describe(
5481
5541
  "Defines how a simulation measurement is rendered as an oscilloscope-style trace."
5482
5542
  ).superRefine((data, ctx) => {
@@ -5490,19 +5550,19 @@ var simulation_oscilloscope_trace = z227.object({
5490
5550
  ].filter(hasValue).length;
5491
5551
  if (voltageReferences + currentReferences !== 1) {
5492
5552
  ctx.addIssue({
5493
- code: z227.ZodIssueCode.custom,
5553
+ code: z229.ZodIssueCode.custom,
5494
5554
  message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
5495
5555
  });
5496
5556
  }
5497
5557
  if (voltageReferences > 0 && data.amps_per_div !== void 0) {
5498
5558
  ctx.addIssue({
5499
- code: z227.ZodIssueCode.custom,
5559
+ code: z229.ZodIssueCode.custom,
5500
5560
  message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
5501
5561
  });
5502
5562
  }
5503
5563
  if (currentReferences > 0 && data.volts_per_div !== void 0) {
5504
5564
  ctx.addIssue({
5505
- code: z227.ZodIssueCode.custom,
5565
+ code: z229.ZodIssueCode.custom,
5506
5566
  message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
5507
5567
  });
5508
5568
  }
@@ -5510,47 +5570,47 @@ var simulation_oscilloscope_trace = z227.object({
5510
5570
  expectTypesMatch(true);
5511
5571
 
5512
5572
  // src/simulation/simulation_ibis_model.ts
5513
- import { z as z228 } from "zod";
5514
- var ibisAssetPath = z228.string().min(1).regex(/^(?!\s|[a-z][a-z\d+.-]*:|[/\\])[^\\\u0000-\u001f\u007f]+$/i);
5515
- var simulation_ibis_model = z228.object({
5516
- type: z228.literal("simulation_ibis_model"),
5573
+ import { z as z230 } from "zod";
5574
+ var ibisAssetPath = z230.string().min(1).regex(/^(?!\s|[a-z][a-z\d+.-]*:|[/\\])[^\\\u0000-\u001f\u007f]+$/i);
5575
+ var simulation_ibis_model = z230.object({
5576
+ type: z230.literal("simulation_ibis_model"),
5517
5577
  simulation_ibis_model_id: getZodPrefixedIdWithDefault(
5518
5578
  "simulation_ibis_model"
5519
5579
  ),
5520
- source_component_id: z228.string().min(1),
5580
+ source_component_id: z230.string().min(1),
5521
5581
  // Consumers must still apply their own fetch policy to prevent SSRF.
5522
5582
  ibis_model_asset: asset.extend({
5523
5583
  project_relative_path: ibisAssetPath,
5524
- url: z228.string().url().regex(/^https?:\/\//i).or(ibisAssetPath)
5584
+ url: z230.string().url().regex(/^https?:\/\//i).or(ibisAssetPath)
5525
5585
  }).describe(
5526
5586
  "Reference to the .ibs file containing the vendor's IBIS models"
5527
5587
  ),
5528
- ibis_component_name: z228.string().min(1).describe("Name of the [Component] section in the IBIS file"),
5529
- ibis_pin_name_to_source_port_id: z228.record(z228.string().min(1), z228.string().min(1)).refine(
5588
+ ibis_component_name: z230.string().min(1).describe("Name of the [Component] section in the IBIS file"),
5589
+ ibis_pin_name_to_source_port_id: z230.record(z230.string().min(1), z230.string().min(1)).refine(
5530
5590
  (pins) => Object.keys(pins).length > 0,
5531
5591
  "At least one physical IBIS pin is required"
5532
5592
  ).describe(
5533
5593
  "Maps pin names from the IBIS [Pin] table, such as A1 or 12, to physical source_port_id values"
5534
5594
  ),
5535
- ibis_pin_name_to_model_name: z228.record(z228.string().min(1), z228.string().min(1)).optional().describe(
5595
+ ibis_pin_name_to_model_name: z230.record(z230.string().min(1), z230.string().min(1)).optional().describe(
5536
5596
  "Maps an IBIS pin name to the selected [Model] name when its [Model Selector] has multiple buffers"
5537
5597
  ),
5538
- ibis_pin_name_to_reference_source_port_ids: z228.record(
5539
- z228.string().min(1),
5540
- z228.object({
5541
- pullup_reference_source_port_id: z228.string().min(1).optional(),
5542
- pulldown_reference_source_port_id: z228.string().min(1).optional(),
5543
- power_clamp_reference_source_port_id: z228.string().min(1).optional(),
5544
- ground_clamp_reference_source_port_id: z228.string().min(1).optional(),
5545
- external_reference_source_port_id: z228.string().min(1).optional()
5598
+ ibis_pin_name_to_reference_source_port_ids: z230.record(
5599
+ z230.string().min(1),
5600
+ z230.object({
5601
+ pullup_reference_source_port_id: z230.string().min(1).optional(),
5602
+ pulldown_reference_source_port_id: z230.string().min(1).optional(),
5603
+ power_clamp_reference_source_port_id: z230.string().min(1).optional(),
5604
+ ground_clamp_reference_source_port_id: z230.string().min(1).optional(),
5605
+ external_reference_source_port_id: z230.string().min(1).optional()
5546
5606
  }).strict()
5547
5607
  ).optional().describe(
5548
5608
  "Maps each IBIS signal pin name to the physical source ports used as its buffer supply/clamp references"
5549
5609
  ),
5550
- model_value_corner: z228.union([z228.literal("typical"), z228.literal("minimum"), z228.literal("maximum")]).describe(
5610
+ model_value_corner: z230.union([z230.literal("typical"), z230.literal("minimum"), z230.literal("maximum")]).describe(
5551
5611
  "Selects the typ, min, or max column of numerical data in the IBIS model"
5552
5612
  ),
5553
- include_package_parasitics: z228.boolean().describe(
5613
+ include_package_parasitics: z230.boolean().describe(
5554
5614
  "Whether the runner includes the IBIS vendor's package resistance, inductance, and capacitance"
5555
5615
  )
5556
5616
  }).superRefine((model, context) => {
@@ -5564,7 +5624,7 @@ var simulation_ibis_model = z228.object({
5564
5624
  for (const pin of Object.keys(model[field] ?? {})) {
5565
5625
  if (!boundPins.has(pin)) {
5566
5626
  context.addIssue({
5567
- code: z228.ZodIssueCode.custom,
5627
+ code: z230.ZodIssueCode.custom,
5568
5628
  path: [field, pin],
5569
5629
  message: `IBIS pin "${pin}" must be bound in ibis_pin_name_to_source_port_id`
5570
5630
  });
@@ -5576,22 +5636,22 @@ var simulation_ibis_model = z228.object({
5576
5636
  );
5577
5637
 
5578
5638
  // src/simulation/simulation_ibis_pin_state.ts
5579
- import { z as z229 } from "zod";
5580
- var simulation_ibis_pin_state = z229.object({
5581
- type: z229.literal("simulation_ibis_pin_state"),
5639
+ import { z as z231 } from "zod";
5640
+ var simulation_ibis_pin_state = z231.object({
5641
+ type: z231.literal("simulation_ibis_pin_state"),
5582
5642
  simulation_ibis_pin_state_id: getZodPrefixedIdWithDefault(
5583
5643
  "simulation_ibis_pin_state"
5584
5644
  ),
5585
- simulation_experiment_id: z229.string().min(1),
5586
- source_port_id: z229.string().min(1),
5587
- is_output: z229.boolean().describe(
5645
+ simulation_experiment_id: z231.string().min(1),
5646
+ source_port_id: z231.string().min(1),
5647
+ is_output: z231.boolean().describe(
5588
5648
  "True selects output mode; false selects input mode for this experiment"
5589
5649
  ),
5590
- is_output_enabled: z229.boolean().optional()
5650
+ is_output_enabled: z231.boolean().optional()
5591
5651
  }).superRefine((pin, context) => {
5592
5652
  if (pin.is_output && pin.is_output_enabled === void 0 || !pin.is_output && pin.is_output_enabled !== void 0) {
5593
5653
  context.addIssue({
5594
- code: z229.ZodIssueCode.custom,
5654
+ code: z231.ZodIssueCode.custom,
5595
5655
  path: ["is_output_enabled"],
5596
5656
  message: "Only output pins require an explicit is_output_enabled boolean"
5597
5657
  });
@@ -5601,41 +5661,41 @@ var simulation_ibis_pin_state = z229.object({
5601
5661
  );
5602
5662
 
5603
5663
  // src/simulation/simulation_digital_stimulus.ts
5604
- import { z as z230 } from "zod";
5664
+ import { z as z232 } from "zod";
5605
5665
  var MAX_PATTERN_BITS = 65536;
5606
- var simulation_digital_stimulus = z230.object({
5607
- type: z230.literal("simulation_digital_stimulus"),
5666
+ var simulation_digital_stimulus = z232.object({
5667
+ type: z232.literal("simulation_digital_stimulus"),
5608
5668
  simulation_digital_stimulus_id: getZodPrefixedIdWithDefault(
5609
5669
  "simulation_digital_stimulus"
5610
5670
  ),
5611
- name: z230.string().min(1),
5612
- simulation_experiment_id: z230.string().min(1),
5613
- source_port_id: z230.string().min(1),
5671
+ name: z232.string().min(1),
5672
+ simulation_experiment_id: z232.string().min(1),
5673
+ source_port_id: z232.string().min(1),
5614
5674
  bit_duration_ms: ms.refine((milliseconds) => milliseconds > 0),
5615
5675
  start_time_ms: ms.refine((milliseconds) => milliseconds >= 0),
5616
- initial_state: z230.union([z230.literal(0), z230.literal(1)]),
5617
- inverted: z230.boolean(),
5618
- transmission_pattern: z230.object({
5619
- transmission_type: z230.literal("bits"),
5620
- bits: z230.string().max(MAX_PATTERN_BITS).regex(/^[01]+$/).or(
5621
- z230.array(z230.union([z230.literal(0), z230.literal(1)])).min(1).max(MAX_PATTERN_BITS)
5676
+ initial_state: z232.union([z232.literal(0), z232.literal(1)]),
5677
+ inverted: z232.boolean(),
5678
+ transmission_pattern: z232.object({
5679
+ transmission_type: z232.literal("bits"),
5680
+ bits: z232.string().max(MAX_PATTERN_BITS).regex(/^[01]+$/).or(
5681
+ z232.array(z232.union([z232.literal(0), z232.literal(1)])).min(1).max(MAX_PATTERN_BITS)
5622
5682
  ),
5623
- repeat: z230.boolean()
5683
+ repeat: z232.boolean()
5624
5684
  }).strict()
5625
5685
  }).describe(
5626
5686
  "Declares a digital transmission pattern and bit duration in milliseconds for a physical source port"
5627
5687
  );
5628
5688
 
5629
5689
  // src/simulation/simulation_eye_diagram.ts
5630
- import { z as z231 } from "zod";
5631
- var simulation_eye_diagram = z231.object({
5632
- type: z231.literal("simulation_eye_diagram"),
5690
+ import { z as z233 } from "zod";
5691
+ var simulation_eye_diagram = z233.object({
5692
+ type: z233.literal("simulation_eye_diagram"),
5633
5693
  simulation_eye_diagram_id: getZodPrefixedIdWithDefault(
5634
5694
  "simulation_eye_diagram"
5635
5695
  ),
5636
- name: z231.string().min(1),
5637
- simulation_experiment_id: z231.string().min(1),
5638
- simulation_voltage_probe_id: z231.string().min(1),
5696
+ name: z233.string().min(1),
5697
+ simulation_experiment_id: z233.string().min(1),
5698
+ simulation_voltage_probe_id: z233.string().min(1),
5639
5699
  unit_interval_ms: ms.refine((milliseconds) => milliseconds > 0),
5640
5700
  time_origin_ms: ms,
5641
5701
  start_time_ms: ms.refine((milliseconds) => milliseconds >= 0).optional(),
@@ -5643,7 +5703,7 @@ var simulation_eye_diagram = z231.object({
5643
5703
  }).superRefine((eye, context) => {
5644
5704
  if (eye.start_time_ms !== void 0 && eye.end_time_ms !== void 0 && eye.start_time_ms >= eye.end_time_ms) {
5645
5705
  context.addIssue({
5646
- code: z231.ZodIssueCode.custom,
5706
+ code: z233.ZodIssueCode.custom,
5647
5707
  path: ["end_time_ms"],
5648
5708
  message: "Eye gate end must follow its start"
5649
5709
  });
@@ -5653,51 +5713,51 @@ var simulation_eye_diagram = z231.object({
5653
5713
  );
5654
5714
 
5655
5715
  // src/simulation/simulation_return_current_contact.ts
5656
- import { z as z232 } from "zod";
5657
- var contact_position = z232.object({
5658
- x: z232.number().finite(),
5659
- y: z232.number().finite(),
5716
+ import { z as z234 } from "zod";
5717
+ var contact_position = z234.object({
5718
+ x: z234.number().finite(),
5719
+ y: z234.number().finite(),
5660
5720
  layer: layer_ref
5661
5721
  });
5662
- var simulation_return_current_contact = z232.discriminatedUnion("contact_type", [
5722
+ var simulation_return_current_contact = z234.discriminatedUnion("contact_type", [
5663
5723
  contact_position.extend({
5664
- contact_type: z232.literal("pcb_port"),
5665
- pcb_port_id: z232.string().min(1)
5724
+ contact_type: z234.literal("pcb_port"),
5725
+ pcb_port_id: z234.string().min(1)
5666
5726
  }),
5667
5727
  contact_position.extend({
5668
- contact_type: z232.literal("pcb_via"),
5669
- pcb_via_id: z232.string().min(1)
5728
+ contact_type: z234.literal("pcb_via"),
5729
+ pcb_via_id: z234.string().min(1)
5670
5730
  }),
5671
5731
  contact_position.extend({
5672
- contact_type: z232.literal("pcb_copper_pour"),
5673
- pcb_copper_pour_id: z232.string().min(1)
5732
+ contact_type: z234.literal("pcb_copper_pour"),
5733
+ pcb_copper_pour_id: z234.string().min(1)
5674
5734
  })
5675
5735
  ]).describe("Identifies the reference conductor at a return-current contact");
5676
5736
  expectTypesMatch(true);
5677
5737
 
5678
5738
  // src/simulation/simulation_terminal_port.ts
5679
- import { z as z233 } from "zod";
5680
- var simulation_terminal_port = z233.object({
5681
- signal_pcb_port_id: z233.string().min(1),
5682
- reference_pcb_port_id: z233.string().min(1).optional(),
5739
+ import { z as z235 } from "zod";
5740
+ var simulation_terminal_port = z235.object({
5741
+ signal_pcb_port_id: z235.string().min(1),
5742
+ reference_pcb_port_id: z235.string().min(1).optional(),
5683
5743
  reference_layer: layer_ref,
5684
- resistance: z233.number().finite().positive()
5744
+ resistance: z235.number().finite().positive()
5685
5745
  }).describe(
5686
5746
  "A two-terminal return-current excitation port with resistance in ohms"
5687
5747
  );
5688
5748
  expectTypesMatch(true);
5689
5749
 
5690
5750
  // src/simulation/simulation_return_current_excitation.ts
5691
- import { z as z234 } from "zod";
5692
- var simulation_return_current_excitation = z234.object({
5693
- type: z234.literal("simulation_return_current_excitation"),
5751
+ import { z as z236 } from "zod";
5752
+ var simulation_return_current_excitation = z236.object({
5753
+ type: z236.literal("simulation_return_current_excitation"),
5694
5754
  simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
5695
5755
  "simulation_return_current_excitation"
5696
5756
  ),
5697
- simulation_experiment_id: z234.string().min(1),
5698
- pcb_trace_id: z234.string().min(1),
5699
- ground_source_net_id: z234.string().min(1),
5700
- current: z234.number().finite(),
5757
+ simulation_experiment_id: z236.string().min(1),
5758
+ pcb_trace_id: z236.string().min(1),
5759
+ ground_source_net_id: z236.string().min(1),
5760
+ current: z236.number().finite(),
5701
5761
  return_source: simulation_return_current_contact,
5702
5762
  return_sink: simulation_return_current_contact,
5703
5763
  source_port: simulation_terminal_port.optional(),
@@ -5708,34 +5768,34 @@ var simulation_return_current_excitation = z234.object({
5708
5768
  expectTypesMatch(true);
5709
5769
 
5710
5770
  // src/simulation/simulation_pcb_return_current_result.ts
5711
- import { z as z235 } from "zod";
5712
- var simulation_pcb_return_current_result = z235.object({
5713
- type: z235.literal("simulation_pcb_return_current_result"),
5771
+ import { z as z237 } from "zod";
5772
+ var simulation_pcb_return_current_result = z237.object({
5773
+ type: z237.literal("simulation_pcb_return_current_result"),
5714
5774
  simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
5715
5775
  "simulation_pcb_return_current_result"
5716
5776
  ),
5717
- simulation_experiment_id: z235.string().min(1),
5718
- pcb_board_id: z235.string().min(1),
5719
- simulation_return_current_excitation_ids: z235.array(z235.string().min(1)).min(1).refine(
5777
+ simulation_experiment_id: z237.string().min(1),
5778
+ pcb_board_id: z237.string().min(1),
5779
+ simulation_return_current_excitation_ids: z237.array(z237.string().min(1)).min(1).refine(
5720
5780
  (ids) => new Set(ids).size === ids.length,
5721
5781
  "Excitation IDs must be unique"
5722
5782
  ),
5723
- frequency_hz: z235.number().finite().positive().optional()
5783
+ frequency_hz: z237.number().finite().positive().optional()
5724
5784
  }).describe(
5725
5785
  "A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
5726
5786
  );
5727
5787
  expectTypesMatch(true);
5728
5788
 
5729
5789
  // src/simulation/simulation_return_current_asset.ts
5730
- import { z as z236 } from "zod";
5790
+ import { z as z238 } from "zod";
5731
5791
  function createSimulationReturnCurrentAssetSchema(mimetypes) {
5732
5792
  return asset.extend({
5733
- project_relative_path: z236.string().min(1),
5734
- url: z236.string().url()
5793
+ project_relative_path: z238.string().min(1),
5794
+ url: z238.string().url()
5735
5795
  }).superRefine((value, context) => {
5736
5796
  if (!mimetypes.includes(value.mimetype)) {
5737
5797
  context.addIssue({
5738
- code: z236.ZodIssueCode.custom,
5798
+ code: z238.ZodIssueCode.custom,
5739
5799
  path: ["mimetype"],
5740
5800
  message: `Expected one of: ${mimetypes.join(", ")}`
5741
5801
  });
@@ -5744,7 +5804,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
5744
5804
  const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
5745
5805
  if (mediaType?.toLowerCase() !== value.mimetype) {
5746
5806
  context.addIssue({
5747
- code: z236.ZodIssueCode.custom,
5807
+ code: z238.ZodIssueCode.custom,
5748
5808
  path: ["url"],
5749
5809
  message: "Data URL media type must match asset.mimetype"
5750
5810
  });
@@ -5759,29 +5819,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
5759
5819
  var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
5760
5820
 
5761
5821
  // src/simulation/simulation_pcb_return_current_field.ts
5762
- import { z as z237 } from "zod";
5763
- var simulation_pcb_return_current_field = z237.object({
5764
- type: z237.literal("simulation_pcb_return_current_field"),
5822
+ import { z as z239 } from "zod";
5823
+ var simulation_pcb_return_current_field = z239.object({
5824
+ type: z239.literal("simulation_pcb_return_current_field"),
5765
5825
  simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
5766
5826
  "simulation_pcb_return_current_field"
5767
5827
  ),
5768
- simulation_pcb_return_current_result_id: z237.string().min(1),
5828
+ simulation_pcb_return_current_result_id: z239.string().min(1),
5769
5829
  layer: layer_ref,
5770
- source_net_id: z237.string().min(1),
5771
- field_type: z237.enum(["real", "complex_phasor"]),
5772
- min_x: z237.number().finite(),
5773
- min_y: z237.number().finite(),
5774
- columns: z237.number().int().positive().safe(),
5775
- rows: z237.number().int().positive().safe(),
5776
- cell_width: z237.number().finite().positive(),
5777
- cell_height: z237.number().finite().positive(),
5778
- copper_thickness: z237.number().finite().positive(),
5779
- data_format: z237.literal("simulation_return_current_grid_json_v1"),
5830
+ source_net_id: z239.string().min(1),
5831
+ field_type: z239.enum(["real", "complex_phasor"]),
5832
+ min_x: z239.number().finite(),
5833
+ min_y: z239.number().finite(),
5834
+ columns: z239.number().int().positive().safe(),
5835
+ rows: z239.number().int().positive().safe(),
5836
+ cell_width: z239.number().finite().positive(),
5837
+ cell_height: z239.number().finite().positive(),
5838
+ copper_thickness: z239.number().finite().positive(),
5839
+ data_format: z239.literal("simulation_return_current_grid_json_v1"),
5780
5840
  field_asset: simulation_return_current_field_asset
5781
5841
  }).superRefine((field, context) => {
5782
5842
  if (!Number.isSafeInteger(field.columns * field.rows)) {
5783
5843
  context.addIssue({
5784
- code: z237.ZodIssueCode.custom,
5844
+ code: z239.ZodIssueCode.custom,
5785
5845
  path: ["columns"],
5786
5846
  message: "The grid cell count must be a safe integer"
5787
5847
  });
@@ -5792,16 +5852,16 @@ var simulation_pcb_return_current_field = z237.object({
5792
5852
  expectTypesMatch(true);
5793
5853
 
5794
5854
  // src/simulation/simulation_return_current_grid_json.ts
5795
- import { z as z238 } from "zod";
5796
- var channel = z238.array(z238.number().finite().nullable()).min(1);
5797
- var simulation_return_current_grid_json = z238.discriminatedUnion("field_type", [
5798
- z238.object({
5799
- field_type: z238.literal("real"),
5855
+ import { z as z240 } from "zod";
5856
+ var channel = z240.array(z240.number().finite().nullable()).min(1);
5857
+ var simulation_return_current_grid_json = z240.discriminatedUnion("field_type", [
5858
+ z240.object({
5859
+ field_type: z240.literal("real"),
5800
5860
  sheet_current_x: channel,
5801
5861
  sheet_current_y: channel
5802
5862
  }),
5803
- z238.object({
5804
- field_type: z238.literal("complex_phasor"),
5863
+ z240.object({
5864
+ field_type: z240.literal("complex_phasor"),
5805
5865
  sheet_current_x_real: channel,
5806
5866
  sheet_current_x_imag: channel,
5807
5867
  sheet_current_y_real: channel,
@@ -5817,7 +5877,7 @@ var simulation_return_current_grid_json = z238.discriminatedUnion("field_type",
5817
5877
  const first = channels[0];
5818
5878
  if (channels.some((values) => values.length !== first.length)) {
5819
5879
  context.addIssue({
5820
- code: z238.ZodIssueCode.custom,
5880
+ code: z240.ZodIssueCode.custom,
5821
5881
  message: "Current channels must have equal lengths"
5822
5882
  });
5823
5883
  return;
@@ -5826,7 +5886,7 @@ var simulation_return_current_grid_json = z238.discriminatedUnion("field_type",
5826
5886
  const masked = first[index] === null;
5827
5887
  if (channels.some((values) => values[index] === null !== masked)) {
5828
5888
  context.addIssue({
5829
- code: z238.ZodIssueCode.custom,
5889
+ code: z240.ZodIssueCode.custom,
5830
5890
  message: `Cell ${index} must be null in every channel or finite in every channel`
5831
5891
  });
5832
5892
  return;
@@ -5843,7 +5903,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5843
5903
  return simulation_return_current_grid_json.superRefine((grid, context) => {
5844
5904
  if (grid.field_type !== field.field_type) {
5845
5905
  context.addIssue({
5846
- code: z238.ZodIssueCode.custom,
5906
+ code: z240.ZodIssueCode.custom,
5847
5907
  path: ["field_type"],
5848
5908
  message: "Decoded field_type must match the parent field"
5849
5909
  });
@@ -5851,7 +5911,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5851
5911
  const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
5852
5912
  if (first.length !== count) {
5853
5913
  context.addIssue({
5854
- code: z238.ZodIssueCode.custom,
5914
+ code: z240.ZodIssueCode.custom,
5855
5915
  message: `Each current channel must have ${count} entries (columns * rows)`
5856
5916
  });
5857
5917
  }
@@ -5859,25 +5919,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5859
5919
  }
5860
5920
 
5861
5921
  // src/simulation/simulation_pcb_return_current_heatmap.ts
5862
- import { z as z239 } from "zod";
5863
- var simulation_pcb_return_current_heatmap = z239.object({
5864
- type: z239.literal("simulation_pcb_return_current_heatmap"),
5922
+ import { z as z241 } from "zod";
5923
+ var simulation_pcb_return_current_heatmap = z241.object({
5924
+ type: z241.literal("simulation_pcb_return_current_heatmap"),
5865
5925
  simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
5866
5926
  "simulation_pcb_return_current_heatmap"
5867
5927
  ),
5868
- simulation_pcb_return_current_result_id: z239.string().min(1),
5928
+ simulation_pcb_return_current_result_id: z241.string().min(1),
5869
5929
  layer: layer_ref,
5870
- source_net_id: z239.string().min(1),
5871
- min_x: z239.number().finite(),
5872
- min_y: z239.number().finite(),
5873
- max_x: z239.number().finite(),
5874
- max_y: z239.number().finite(),
5930
+ source_net_id: z241.string().min(1),
5931
+ min_x: z241.number().finite(),
5932
+ min_y: z241.number().finite(),
5933
+ max_x: z241.number().finite(),
5934
+ max_y: z241.number().finite(),
5875
5935
  image_asset: simulation_return_current_image_asset
5876
5936
  }).superRefine((heatmap, context) => {
5877
5937
  for (const axis of ["x", "y"]) {
5878
5938
  if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
5879
5939
  context.addIssue({
5880
- code: z239.ZodIssueCode.custom,
5940
+ code: z241.ZodIssueCode.custom,
5881
5941
  path: [`max_${axis}`],
5882
5942
  message: "Heatmap bounds must have positive width and height"
5883
5943
  });
@@ -5889,14 +5949,14 @@ var simulation_pcb_return_current_heatmap = z239.object({
5889
5949
  expectTypesMatch(true);
5890
5950
 
5891
5951
  // src/simulation/simulation_pcb_return_current_marker.ts
5892
- import { z as z240 } from "zod";
5893
- var marker_base = z240.object({
5894
- type: z240.literal("simulation_pcb_return_current_marker"),
5952
+ import { z as z242 } from "zod";
5953
+ var marker_base = z242.object({
5954
+ type: z242.literal("simulation_pcb_return_current_marker"),
5895
5955
  simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
5896
5956
  "simulation_pcb_return_current_marker"
5897
5957
  ),
5898
- simulation_pcb_return_current_result_id: z240.string().min(1),
5899
- role: z240.enum([
5958
+ simulation_pcb_return_current_result_id: z242.string().min(1),
5959
+ role: z242.enum([
5900
5960
  "signal_source",
5901
5961
  "signal_load",
5902
5962
  "return_source",
@@ -5904,33 +5964,33 @@ var marker_base = z240.object({
5904
5964
  "signal_transition",
5905
5965
  "return_transition"
5906
5966
  ]),
5907
- label: z240.string().optional(),
5908
- label_x: z240.number().finite().optional(),
5909
- label_y: z240.number().finite().optional()
5967
+ label: z242.string().optional(),
5968
+ label_x: z242.number().finite().optional(),
5969
+ label_y: z242.number().finite().optional()
5910
5970
  });
5911
- var simulation_pcb_return_current_marker = z240.discriminatedUnion("target_type", [
5971
+ var simulation_pcb_return_current_marker = z242.discriminatedUnion("target_type", [
5912
5972
  marker_base.extend({
5913
- target_type: z240.literal("pcb_port"),
5914
- pcb_port_id: z240.string().min(1),
5973
+ target_type: z242.literal("pcb_port"),
5974
+ pcb_port_id: z242.string().min(1),
5915
5975
  layer: layer_ref
5916
5976
  }),
5917
5977
  marker_base.extend({
5918
- target_type: z240.literal("pcb_via"),
5919
- pcb_via_id: z240.string().min(1),
5978
+ target_type: z242.literal("pcb_via"),
5979
+ pcb_via_id: z242.string().min(1),
5920
5980
  from_layer: layer_ref,
5921
5981
  to_layer: layer_ref
5922
5982
  })
5923
5983
  ]).superRefine((marker, context) => {
5924
5984
  if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
5925
5985
  context.addIssue({
5926
- code: z240.ZodIssueCode.custom,
5986
+ code: z242.ZodIssueCode.custom,
5927
5987
  path: ["label_x"],
5928
5988
  message: "label_x and label_y must be provided together"
5929
5989
  });
5930
5990
  }
5931
5991
  if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
5932
5992
  context.addIssue({
5933
- code: z240.ZodIssueCode.custom,
5993
+ code: z242.ZodIssueCode.custom,
5934
5994
  path: ["to_layer"],
5935
5995
  message: "A via transition must connect distinct layers"
5936
5996
  });
@@ -5941,13 +6001,13 @@ var simulation_pcb_return_current_marker = z240.discriminatedUnion("target_type"
5941
6001
  expectTypesMatch(true);
5942
6002
 
5943
6003
  // src/any_circuit_element.ts
5944
- import { z as z246 } from "zod";
6004
+ import { z as z248 } from "zod";
5945
6005
 
5946
6006
  // src/drawing/drawing_page.ts
5947
- import { z as z242 } from "zod";
6007
+ import { z as z244 } from "zod";
5948
6008
 
5949
6009
  // src/drawing/drawing_page_size.ts
5950
- import { z as z241 } from "zod";
6010
+ import { z as z243 } from "zod";
5951
6011
  var drawingPageSizes = {
5952
6012
  iso_a0: [1189, 841],
5953
6013
  iso_a1: [841, 594],
@@ -5960,7 +6020,7 @@ var drawingPageSizes = {
5960
6020
  ansi_d: [863.6, 558.8],
5961
6021
  ansi_e: [1117.6, 863.6]
5962
6022
  };
5963
- var drawing_page_size = z241.enum([
6023
+ var drawing_page_size = z243.enum([
5964
6024
  "iso_a0",
5965
6025
  "iso_a1",
5966
6026
  "iso_a2",
@@ -5978,15 +6038,15 @@ function getDrawingPageDimensions(size2, orientation = "landscape") {
5978
6038
  }
5979
6039
 
5980
6040
  // src/drawing/drawing_page.ts
5981
- var drawing_page = z242.object({
5982
- type: z242.literal("drawing_page"),
5983
- drawing_page_id: z242.string().min(1),
5984
- name: z242.string().optional(),
5985
- display_name: z242.string().optional(),
6041
+ var drawing_page = z244.object({
6042
+ type: z244.literal("drawing_page"),
6043
+ drawing_page_id: z244.string().min(1),
6044
+ name: z244.string().optional(),
6045
+ display_name: z244.string().optional(),
5986
6046
  page_size: drawing_page_size.optional(),
5987
- orientation: z242.enum(["landscape", "portrait"]).optional(),
5988
- width: z242.number().finite().positive(),
5989
- height: z242.number().finite().positive()
6047
+ orientation: z244.enum(["landscape", "portrait"]).optional(),
6048
+ width: z244.number().finite().positive(),
6049
+ height: z244.number().finite().positive()
5990
6050
  }).superRefine((page, ctx) => {
5991
6051
  if (!page.page_size) {
5992
6052
  if (page.orientation)
@@ -6010,8 +6070,8 @@ var drawing_page = z242.object({
6010
6070
  expectTypesMatch(true);
6011
6071
 
6012
6072
  // src/drawing/drawing_part_view.ts
6013
- import { z as z243 } from "zod";
6014
- var drawing_part_view_direction = z243.enum([
6073
+ import { z as z245 } from "zod";
6074
+ var drawing_part_view_direction = z245.enum([
6015
6075
  "x_positive",
6016
6076
  "x_negative",
6017
6077
  "y_positive",
@@ -6020,26 +6080,26 @@ var drawing_part_view_direction = z243.enum([
6020
6080
  "z_negative",
6021
6081
  "isometric"
6022
6082
  ]);
6023
- var drawing_section_plane = z243.object({
6024
- axis: z243.enum(["x", "y", "z"]),
6025
- offset: z243.number().finite(),
6026
- keep_side: z243.enum(["less", "greater"]),
6027
- hatch_spacing: z243.number().finite().positive().optional()
6028
- });
6029
- var drawing_part_view = z243.object({
6030
- type: z243.literal("drawing_part_view"),
6031
- drawing_part_view_id: z243.string().min(1),
6032
- drawing_page_id: z243.string().min(1),
6033
- source_group_id: z243.string().min(1).optional(),
6034
- source_component_ids: z243.array(z243.string().min(1)).optional(),
6035
- name: z243.string().optional(),
6036
- display_name: z243.string().optional(),
6083
+ var drawing_section_plane = z245.object({
6084
+ axis: z245.enum(["x", "y", "z"]),
6085
+ offset: z245.number().finite(),
6086
+ keep_side: z245.enum(["less", "greater"]),
6087
+ hatch_spacing: z245.number().finite().positive().optional()
6088
+ });
6089
+ var drawing_part_view = z245.object({
6090
+ type: z245.literal("drawing_part_view"),
6091
+ drawing_part_view_id: z245.string().min(1),
6092
+ drawing_page_id: z245.string().min(1),
6093
+ source_group_id: z245.string().min(1).optional(),
6094
+ source_component_ids: z245.array(z245.string().min(1)).optional(),
6095
+ name: z245.string().optional(),
6096
+ display_name: z245.string().optional(),
6037
6097
  direction: drawing_part_view_direction,
6038
- center: z243.object({ x: z243.number().finite(), y: z243.number().finite() }),
6039
- width: z243.number().finite().positive(),
6040
- height: z243.number().finite().positive(),
6041
- scale: z243.number().finite().positive().optional(),
6042
- show_hidden_edges: z243.boolean().optional(),
6098
+ center: z245.object({ x: z245.number().finite(), y: z245.number().finite() }),
6099
+ width: z245.number().finite().positive(),
6100
+ height: z245.number().finite().positive(),
6101
+ scale: z245.number().finite().positive().optional(),
6102
+ show_hidden_edges: z245.boolean().optional(),
6043
6103
  section: drawing_section_plane.optional()
6044
6104
  }).describe(
6045
6105
  "A configured orthographic view of selected assembly geometry. Paper coordinates are mm, origin at sheet center, +X right/+Y up. Directions and section planes use CAD world coordinates in mm with +Z up."
@@ -6050,20 +6110,20 @@ expectTypesMatch(
6050
6110
  expectTypesMatch(true);
6051
6111
 
6052
6112
  // src/drawing/drawing_page_title_block.ts
6053
- import { z as z244 } from "zod";
6054
- var drawing_page_title_block = z244.object({
6055
- type: z244.literal("drawing_page_title_block"),
6056
- drawing_page_title_block_id: z244.string().min(1),
6057
- drawing_page_id: z244.string().min(1),
6058
- title: z244.string().min(1),
6059
- legal_owner: z244.string().optional(),
6060
- identification_number: z244.string().optional(),
6061
- revision_index: z244.string().optional(),
6062
- date_of_issue: z244.string().optional(),
6063
- creator: z244.string().optional(),
6064
- approval_person: z244.string().optional(),
6065
- sheet_number: z244.number().int().positive().optional(),
6066
- number_of_sheets: z244.number().int().positive().optional()
6113
+ import { z as z246 } from "zod";
6114
+ var drawing_page_title_block = z246.object({
6115
+ type: z246.literal("drawing_page_title_block"),
6116
+ drawing_page_title_block_id: z246.string().min(1),
6117
+ drawing_page_id: z246.string().min(1),
6118
+ title: z246.string().min(1),
6119
+ legal_owner: z246.string().optional(),
6120
+ identification_number: z246.string().optional(),
6121
+ revision_index: z246.string().optional(),
6122
+ date_of_issue: z246.string().optional(),
6123
+ creator: z246.string().optional(),
6124
+ approval_person: z246.string().optional(),
6125
+ sheet_number: z246.number().int().positive().optional(),
6126
+ number_of_sheets: z246.number().int().positive().optional()
6067
6127
  }).refine(
6068
6128
  (block) => block.sheet_number == null || block.number_of_sheets == null || block.sheet_number <= block.number_of_sheets,
6069
6129
  {
@@ -6074,28 +6134,28 @@ var drawing_page_title_block = z244.object({
6074
6134
  expectTypesMatch(true);
6075
6135
 
6076
6136
  // src/drawing/drawing_dimension_line.ts
6077
- import { z as z245 } from "zod";
6078
- var paper_point = z245.object({
6079
- x: z245.number().finite(),
6080
- y: z245.number().finite()
6081
- });
6082
- var drawing_dimension_line = z245.object({
6083
- type: z245.literal("drawing_dimension_line"),
6084
- drawing_dimension_line_id: z245.string().trim().min(1),
6085
- drawing_part_view_id: z245.string().trim().min(1),
6137
+ import { z as z247 } from "zod";
6138
+ var paper_point = z247.object({
6139
+ x: z247.number().finite(),
6140
+ y: z247.number().finite()
6141
+ });
6142
+ var drawing_dimension_line = z247.object({
6143
+ type: z247.literal("drawing_dimension_line"),
6144
+ drawing_dimension_line_id: z247.string().trim().min(1),
6145
+ drawing_part_view_id: z247.string().trim().min(1),
6086
6146
  start: paper_point,
6087
6147
  end: paper_point,
6088
- text: z245.string().refine(
6148
+ text: z247.string().refine(
6089
6149
  (text) => text.trim().length > 0,
6090
6150
  "Dimension text must not be blank"
6091
6151
  ),
6092
6152
  edge_ref_start: paper_point.optional(),
6093
6153
  edge_ref_end: paper_point.optional(),
6094
- edge_ref_name: z245.string().refine(
6154
+ edge_ref_name: z247.string().refine(
6095
6155
  (name) => name.trim().length > 0,
6096
6156
  "Edge reference name must not be blank"
6097
6157
  ).optional(),
6098
- name: z245.string().trim().min(1).optional()
6158
+ name: z247.string().trim().min(1).optional()
6099
6159
  }).refine(
6100
6160
  (line) => line.start.x !== line.end.x || line.start.y !== line.end.y,
6101
6161
  { message: "Dimension line endpoints must be distinct", path: ["end"] }
@@ -6107,7 +6167,7 @@ expectTypesMatch(
6107
6167
  );
6108
6168
 
6109
6169
  // src/any_circuit_element.ts
6110
- var any_circuit_element = z246.union([
6170
+ var any_circuit_element = z248.union([
6111
6171
  pcb_quote_estimate,
6112
6172
  drawing_page,
6113
6173
  drawing_page_title_block,
@@ -6274,6 +6334,8 @@ var any_circuit_element = z246.union([
6274
6334
  schematic_table,
6275
6335
  schematic_table_cell,
6276
6336
  cad_component,
6337
+ cad_explosion_stage,
6338
+ cad_explosion_move,
6277
6339
  cad_cable,
6278
6340
  cad_reference_surface,
6279
6341
  cad_collision_error,
@@ -6322,6 +6384,8 @@ export {
6322
6384
  cad_cable,
6323
6385
  cad_collision_error,
6324
6386
  cad_component,
6387
+ cad_explosion_move,
6388
+ cad_explosion_stage,
6325
6389
  cad_model_axis_directions,
6326
6390
  cad_model_formats,
6327
6391
  cad_reference_surface,