circuit-json 0.0.540 → 0.0.541

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