circuit-json 0.0.528 → 0.0.529

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
@@ -14,7 +14,20 @@ var length = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v)
14
14
  var frequency = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "Hz").value);
15
15
  var distance = length;
16
16
  var current = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "A").value);
17
- var duration_ms = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
17
+ var duration_ms = z.string().or(z.number()).transform((v, context) => {
18
+ try {
19
+ const { value, unitOfValue } = parseAndConvertSiUnit(v);
20
+ if ((unitOfValue === null || unitOfValue === "ms") && Number.isFinite(value)) {
21
+ return value;
22
+ }
23
+ } catch {
24
+ }
25
+ context.addIssue({
26
+ code: z.ZodIssueCode.custom,
27
+ message: "Expected a finite number of milliseconds or a time unit"
28
+ });
29
+ return z.NEVER;
30
+ });
18
31
  var time = duration_ms;
19
32
  var ms = duration_ms;
20
33
  var timestamp = z.string().datetime();
@@ -4761,6 +4774,8 @@ var simulation_experiment = z206.object({
4761
4774
  ),
4762
4775
  name: z206.string(),
4763
4776
  experiment_type,
4777
+ subcircuit_id: z206.string().optional(),
4778
+ spice_engine: z206.string().optional(),
4764
4779
  time_per_step: duration_ms.optional(),
4765
4780
  start_time_ms: ms.optional(),
4766
4781
  end_time_ms: ms.optional(),
@@ -4863,6 +4878,7 @@ var simulation_transient_voltage_graph = z208.object({
4863
4878
  "simulation_transient_voltage_graph"
4864
4879
  ),
4865
4880
  simulation_experiment_id: z208.string(),
4881
+ simulation_voltage_probe_id: z208.string().optional(),
4866
4882
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4867
4883
  timestamps_ms: z208.array(z208.number()).optional(),
4868
4884
  voltage_levels: z208.array(z208.number()),
@@ -5288,52 +5304,195 @@ var simulation_oscilloscope_trace = z224.object({
5288
5304
  });
5289
5305
  expectTypesMatch(true);
5290
5306
 
5291
- // src/simulation/simulation_return_current_contact.ts
5307
+ // src/simulation/simulation_ibis_model.ts
5292
5308
  import { z as z225 } from "zod";
5293
- var contact_position = z225.object({
5294
- x: z225.number().finite(),
5295
- y: z225.number().finite(),
5309
+ var ibisAssetPath = z225.string().min(1).regex(/^(?!\s|[a-z][a-z\d+.-]*:|[/\\])[^\\\u0000-\u001f\u007f]+$/i);
5310
+ var simulation_ibis_model = z225.object({
5311
+ type: z225.literal("simulation_ibis_model"),
5312
+ simulation_ibis_model_id: getZodPrefixedIdWithDefault(
5313
+ "simulation_ibis_model"
5314
+ ),
5315
+ source_component_id: z225.string().min(1),
5316
+ // Consumers must still apply their own fetch policy to prevent SSRF.
5317
+ ibis_model_asset: asset.extend({
5318
+ project_relative_path: ibisAssetPath,
5319
+ url: z225.string().url().regex(/^https?:\/\//i).or(ibisAssetPath)
5320
+ }).describe(
5321
+ "Reference to the .ibs file containing the vendor's IBIS models"
5322
+ ),
5323
+ ibis_component_name: z225.string().min(1).describe("Name of the [Component] section in the IBIS file"),
5324
+ ibis_pin_name_to_source_port_id: z225.record(z225.string().min(1), z225.string().min(1)).refine(
5325
+ (pins) => Object.keys(pins).length > 0,
5326
+ "At least one physical IBIS pin is required"
5327
+ ).describe(
5328
+ "Maps pin names from the IBIS [Pin] table, such as A1 or 12, to physical source_port_id values"
5329
+ ),
5330
+ ibis_pin_name_to_model_name: z225.record(z225.string().min(1), z225.string().min(1)).optional().describe(
5331
+ "Maps an IBIS pin name to the selected [Model] name when its [Model Selector] has multiple buffers"
5332
+ ),
5333
+ ibis_pin_name_to_reference_source_port_ids: z225.record(
5334
+ z225.string().min(1),
5335
+ z225.object({
5336
+ pullup_reference_source_port_id: z225.string().min(1).optional(),
5337
+ pulldown_reference_source_port_id: z225.string().min(1).optional(),
5338
+ power_clamp_reference_source_port_id: z225.string().min(1).optional(),
5339
+ ground_clamp_reference_source_port_id: z225.string().min(1).optional(),
5340
+ external_reference_source_port_id: z225.string().min(1).optional()
5341
+ }).strict()
5342
+ ).optional().describe(
5343
+ "Maps each IBIS signal pin name to the physical source ports used as its buffer supply/clamp references"
5344
+ ),
5345
+ model_value_corner: z225.union([z225.literal("typical"), z225.literal("minimum"), z225.literal("maximum")]).describe(
5346
+ "Selects the typ, min, or max column of numerical data in the IBIS model"
5347
+ ),
5348
+ include_package_parasitics: z225.boolean().describe(
5349
+ "Whether the runner includes the IBIS vendor's package resistance, inductance, and capacitance"
5350
+ )
5351
+ }).superRefine((model, context) => {
5352
+ const boundPins = new Set(
5353
+ Object.keys(model.ibis_pin_name_to_source_port_id)
5354
+ );
5355
+ for (const field of [
5356
+ "ibis_pin_name_to_model_name",
5357
+ "ibis_pin_name_to_reference_source_port_ids"
5358
+ ]) {
5359
+ for (const pin of Object.keys(model[field] ?? {})) {
5360
+ if (!boundPins.has(pin)) {
5361
+ context.addIssue({
5362
+ code: z225.ZodIssueCode.custom,
5363
+ path: [field, pin],
5364
+ message: `IBIS pin "${pin}" must be bound in ibis_pin_name_to_source_port_id`
5365
+ });
5366
+ }
5367
+ }
5368
+ }
5369
+ }).describe(
5370
+ "Attaches an IBIS component and its physical pin bindings to a source component"
5371
+ );
5372
+
5373
+ // src/simulation/simulation_ibis_pin_state.ts
5374
+ import { z as z226 } from "zod";
5375
+ var simulation_ibis_pin_state = z226.object({
5376
+ type: z226.literal("simulation_ibis_pin_state"),
5377
+ simulation_ibis_pin_state_id: getZodPrefixedIdWithDefault(
5378
+ "simulation_ibis_pin_state"
5379
+ ),
5380
+ simulation_experiment_id: z226.string().min(1),
5381
+ source_port_id: z226.string().min(1),
5382
+ is_output: z226.boolean().describe(
5383
+ "True selects output mode; false selects input mode for this experiment"
5384
+ ),
5385
+ is_output_enabled: z226.boolean().optional()
5386
+ }).superRefine((pin, context) => {
5387
+ if (pin.is_output && pin.is_output_enabled === void 0 || !pin.is_output && pin.is_output_enabled !== void 0) {
5388
+ context.addIssue({
5389
+ code: z226.ZodIssueCode.custom,
5390
+ path: ["is_output_enabled"],
5391
+ message: "Only output pins require an explicit is_output_enabled boolean"
5392
+ });
5393
+ }
5394
+ }).describe(
5395
+ "Declares an IBIS pin's direction and output-enable state for one experiment"
5396
+ );
5397
+
5398
+ // src/simulation/simulation_digital_stimulus.ts
5399
+ import { z as z227 } from "zod";
5400
+ var MAX_PATTERN_BITS = 65536;
5401
+ var simulation_digital_stimulus = z227.object({
5402
+ type: z227.literal("simulation_digital_stimulus"),
5403
+ simulation_digital_stimulus_id: getZodPrefixedIdWithDefault(
5404
+ "simulation_digital_stimulus"
5405
+ ),
5406
+ name: z227.string().min(1),
5407
+ simulation_experiment_id: z227.string().min(1),
5408
+ source_port_id: z227.string().min(1),
5409
+ bit_duration_ms: ms.refine((milliseconds) => milliseconds > 0),
5410
+ start_time_ms: ms.refine((milliseconds) => milliseconds >= 0),
5411
+ initial_state: z227.union([z227.literal(0), z227.literal(1)]),
5412
+ inverted: z227.boolean(),
5413
+ transmission_pattern: z227.object({
5414
+ transmission_type: z227.literal("bits"),
5415
+ bits: z227.string().max(MAX_PATTERN_BITS).regex(/^[01]+$/).or(
5416
+ z227.array(z227.union([z227.literal(0), z227.literal(1)])).min(1).max(MAX_PATTERN_BITS)
5417
+ ),
5418
+ repeat: z227.boolean()
5419
+ }).strict()
5420
+ }).describe(
5421
+ "Declares a digital transmission pattern and bit duration in milliseconds for a physical source port"
5422
+ );
5423
+
5424
+ // src/simulation/simulation_eye_diagram.ts
5425
+ import { z as z228 } from "zod";
5426
+ var simulation_eye_diagram = z228.object({
5427
+ type: z228.literal("simulation_eye_diagram"),
5428
+ simulation_eye_diagram_id: getZodPrefixedIdWithDefault(
5429
+ "simulation_eye_diagram"
5430
+ ),
5431
+ name: z228.string().min(1),
5432
+ simulation_experiment_id: z228.string().min(1),
5433
+ simulation_voltage_probe_id: z228.string().min(1),
5434
+ unit_interval_ms: ms.refine((milliseconds) => milliseconds > 0),
5435
+ time_origin_ms: ms,
5436
+ start_time_ms: ms.refine((milliseconds) => milliseconds >= 0).optional(),
5437
+ end_time_ms: ms.refine((milliseconds) => milliseconds > 0).optional()
5438
+ }).superRefine((eye, context) => {
5439
+ if (eye.start_time_ms !== void 0 && eye.end_time_ms !== void 0 && eye.start_time_ms >= eye.end_time_ms) {
5440
+ context.addIssue({
5441
+ code: z228.ZodIssueCode.custom,
5442
+ path: ["end_time_ms"],
5443
+ message: "Eye gate end must follow its start"
5444
+ });
5445
+ }
5446
+ }).describe(
5447
+ "Declares probe-bound eye folding, fixed origin and optional measurement gate in milliseconds"
5448
+ );
5449
+
5450
+ // src/simulation/simulation_return_current_contact.ts
5451
+ import { z as z229 } from "zod";
5452
+ var contact_position = z229.object({
5453
+ x: z229.number().finite(),
5454
+ y: z229.number().finite(),
5296
5455
  layer: layer_ref
5297
5456
  });
5298
- var simulation_return_current_contact = z225.discriminatedUnion("contact_type", [
5457
+ var simulation_return_current_contact = z229.discriminatedUnion("contact_type", [
5299
5458
  contact_position.extend({
5300
- contact_type: z225.literal("pcb_port"),
5301
- pcb_port_id: z225.string().min(1)
5459
+ contact_type: z229.literal("pcb_port"),
5460
+ pcb_port_id: z229.string().min(1)
5302
5461
  }),
5303
5462
  contact_position.extend({
5304
- contact_type: z225.literal("pcb_via"),
5305
- pcb_via_id: z225.string().min(1)
5463
+ contact_type: z229.literal("pcb_via"),
5464
+ pcb_via_id: z229.string().min(1)
5306
5465
  }),
5307
5466
  contact_position.extend({
5308
- contact_type: z225.literal("pcb_copper_pour"),
5309
- pcb_copper_pour_id: z225.string().min(1)
5467
+ contact_type: z229.literal("pcb_copper_pour"),
5468
+ pcb_copper_pour_id: z229.string().min(1)
5310
5469
  })
5311
5470
  ]).describe("Identifies the reference conductor at a return-current contact");
5312
5471
  expectTypesMatch(true);
5313
5472
 
5314
5473
  // src/simulation/simulation_terminal_port.ts
5315
- import { z as z226 } from "zod";
5316
- var simulation_terminal_port = z226.object({
5317
- signal_pcb_port_id: z226.string().min(1),
5318
- reference_pcb_port_id: z226.string().min(1).optional(),
5474
+ import { z as z230 } from "zod";
5475
+ var simulation_terminal_port = z230.object({
5476
+ signal_pcb_port_id: z230.string().min(1),
5477
+ reference_pcb_port_id: z230.string().min(1).optional(),
5319
5478
  reference_layer: layer_ref,
5320
- resistance: z226.number().finite().positive()
5479
+ resistance: z230.number().finite().positive()
5321
5480
  }).describe(
5322
5481
  "A two-terminal return-current excitation port with resistance in ohms"
5323
5482
  );
5324
5483
  expectTypesMatch(true);
5325
5484
 
5326
5485
  // src/simulation/simulation_return_current_excitation.ts
5327
- import { z as z227 } from "zod";
5328
- var simulation_return_current_excitation = z227.object({
5329
- type: z227.literal("simulation_return_current_excitation"),
5486
+ import { z as z231 } from "zod";
5487
+ var simulation_return_current_excitation = z231.object({
5488
+ type: z231.literal("simulation_return_current_excitation"),
5330
5489
  simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
5331
5490
  "simulation_return_current_excitation"
5332
5491
  ),
5333
- simulation_experiment_id: z227.string().min(1),
5334
- pcb_trace_id: z227.string().min(1),
5335
- ground_source_net_id: z227.string().min(1),
5336
- current: z227.number().finite(),
5492
+ simulation_experiment_id: z231.string().min(1),
5493
+ pcb_trace_id: z231.string().min(1),
5494
+ ground_source_net_id: z231.string().min(1),
5495
+ current: z231.number().finite(),
5337
5496
  return_source: simulation_return_current_contact,
5338
5497
  return_sink: simulation_return_current_contact,
5339
5498
  source_port: simulation_terminal_port.optional(),
@@ -5344,34 +5503,34 @@ var simulation_return_current_excitation = z227.object({
5344
5503
  expectTypesMatch(true);
5345
5504
 
5346
5505
  // src/simulation/simulation_pcb_return_current_result.ts
5347
- import { z as z228 } from "zod";
5348
- var simulation_pcb_return_current_result = z228.object({
5349
- type: z228.literal("simulation_pcb_return_current_result"),
5506
+ import { z as z232 } from "zod";
5507
+ var simulation_pcb_return_current_result = z232.object({
5508
+ type: z232.literal("simulation_pcb_return_current_result"),
5350
5509
  simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
5351
5510
  "simulation_pcb_return_current_result"
5352
5511
  ),
5353
- simulation_experiment_id: z228.string().min(1),
5354
- pcb_board_id: z228.string().min(1),
5355
- simulation_return_current_excitation_ids: z228.array(z228.string().min(1)).min(1).refine(
5512
+ simulation_experiment_id: z232.string().min(1),
5513
+ pcb_board_id: z232.string().min(1),
5514
+ simulation_return_current_excitation_ids: z232.array(z232.string().min(1)).min(1).refine(
5356
5515
  (ids) => new Set(ids).size === ids.length,
5357
5516
  "Excitation IDs must be unique"
5358
5517
  ),
5359
- frequency_hz: z228.number().finite().positive().optional()
5518
+ frequency_hz: z232.number().finite().positive().optional()
5360
5519
  }).describe(
5361
5520
  "A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
5362
5521
  );
5363
5522
  expectTypesMatch(true);
5364
5523
 
5365
5524
  // src/simulation/simulation_return_current_asset.ts
5366
- import { z as z229 } from "zod";
5525
+ import { z as z233 } from "zod";
5367
5526
  function createSimulationReturnCurrentAssetSchema(mimetypes) {
5368
5527
  return asset.extend({
5369
- project_relative_path: z229.string().min(1),
5370
- url: z229.string().url()
5528
+ project_relative_path: z233.string().min(1),
5529
+ url: z233.string().url()
5371
5530
  }).superRefine((value, context) => {
5372
5531
  if (!mimetypes.includes(value.mimetype)) {
5373
5532
  context.addIssue({
5374
- code: z229.ZodIssueCode.custom,
5533
+ code: z233.ZodIssueCode.custom,
5375
5534
  path: ["mimetype"],
5376
5535
  message: `Expected one of: ${mimetypes.join(", ")}`
5377
5536
  });
@@ -5380,7 +5539,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
5380
5539
  const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
5381
5540
  if (mediaType?.toLowerCase() !== value.mimetype) {
5382
5541
  context.addIssue({
5383
- code: z229.ZodIssueCode.custom,
5542
+ code: z233.ZodIssueCode.custom,
5384
5543
  path: ["url"],
5385
5544
  message: "Data URL media type must match asset.mimetype"
5386
5545
  });
@@ -5395,29 +5554,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
5395
5554
  var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
5396
5555
 
5397
5556
  // src/simulation/simulation_pcb_return_current_field.ts
5398
- import { z as z230 } from "zod";
5399
- var simulation_pcb_return_current_field = z230.object({
5400
- type: z230.literal("simulation_pcb_return_current_field"),
5557
+ import { z as z234 } from "zod";
5558
+ var simulation_pcb_return_current_field = z234.object({
5559
+ type: z234.literal("simulation_pcb_return_current_field"),
5401
5560
  simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
5402
5561
  "simulation_pcb_return_current_field"
5403
5562
  ),
5404
- simulation_pcb_return_current_result_id: z230.string().min(1),
5563
+ simulation_pcb_return_current_result_id: z234.string().min(1),
5405
5564
  layer: layer_ref,
5406
- source_net_id: z230.string().min(1),
5407
- field_type: z230.enum(["real", "complex_phasor"]),
5408
- min_x: z230.number().finite(),
5409
- min_y: z230.number().finite(),
5410
- columns: z230.number().int().positive().safe(),
5411
- rows: z230.number().int().positive().safe(),
5412
- cell_width: z230.number().finite().positive(),
5413
- cell_height: z230.number().finite().positive(),
5414
- copper_thickness: z230.number().finite().positive(),
5415
- data_format: z230.literal("simulation_return_current_grid_json_v1"),
5565
+ source_net_id: z234.string().min(1),
5566
+ field_type: z234.enum(["real", "complex_phasor"]),
5567
+ min_x: z234.number().finite(),
5568
+ min_y: z234.number().finite(),
5569
+ columns: z234.number().int().positive().safe(),
5570
+ rows: z234.number().int().positive().safe(),
5571
+ cell_width: z234.number().finite().positive(),
5572
+ cell_height: z234.number().finite().positive(),
5573
+ copper_thickness: z234.number().finite().positive(),
5574
+ data_format: z234.literal("simulation_return_current_grid_json_v1"),
5416
5575
  field_asset: simulation_return_current_field_asset
5417
5576
  }).superRefine((field, context) => {
5418
5577
  if (!Number.isSafeInteger(field.columns * field.rows)) {
5419
5578
  context.addIssue({
5420
- code: z230.ZodIssueCode.custom,
5579
+ code: z234.ZodIssueCode.custom,
5421
5580
  path: ["columns"],
5422
5581
  message: "The grid cell count must be a safe integer"
5423
5582
  });
@@ -5428,16 +5587,16 @@ var simulation_pcb_return_current_field = z230.object({
5428
5587
  expectTypesMatch(true);
5429
5588
 
5430
5589
  // src/simulation/simulation_return_current_grid_json.ts
5431
- import { z as z231 } from "zod";
5432
- var channel = z231.array(z231.number().finite().nullable()).min(1);
5433
- var simulation_return_current_grid_json = z231.discriminatedUnion("field_type", [
5434
- z231.object({
5435
- field_type: z231.literal("real"),
5590
+ import { z as z235 } from "zod";
5591
+ var channel = z235.array(z235.number().finite().nullable()).min(1);
5592
+ var simulation_return_current_grid_json = z235.discriminatedUnion("field_type", [
5593
+ z235.object({
5594
+ field_type: z235.literal("real"),
5436
5595
  sheet_current_x: channel,
5437
5596
  sheet_current_y: channel
5438
5597
  }),
5439
- z231.object({
5440
- field_type: z231.literal("complex_phasor"),
5598
+ z235.object({
5599
+ field_type: z235.literal("complex_phasor"),
5441
5600
  sheet_current_x_real: channel,
5442
5601
  sheet_current_x_imag: channel,
5443
5602
  sheet_current_y_real: channel,
@@ -5453,7 +5612,7 @@ var simulation_return_current_grid_json = z231.discriminatedUnion("field_type",
5453
5612
  const first = channels[0];
5454
5613
  if (channels.some((values) => values.length !== first.length)) {
5455
5614
  context.addIssue({
5456
- code: z231.ZodIssueCode.custom,
5615
+ code: z235.ZodIssueCode.custom,
5457
5616
  message: "Current channels must have equal lengths"
5458
5617
  });
5459
5618
  return;
@@ -5462,7 +5621,7 @@ var simulation_return_current_grid_json = z231.discriminatedUnion("field_type",
5462
5621
  const masked = first[index] === null;
5463
5622
  if (channels.some((values) => values[index] === null !== masked)) {
5464
5623
  context.addIssue({
5465
- code: z231.ZodIssueCode.custom,
5624
+ code: z235.ZodIssueCode.custom,
5466
5625
  message: `Cell ${index} must be null in every channel or finite in every channel`
5467
5626
  });
5468
5627
  return;
@@ -5479,7 +5638,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5479
5638
  return simulation_return_current_grid_json.superRefine((grid, context) => {
5480
5639
  if (grid.field_type !== field.field_type) {
5481
5640
  context.addIssue({
5482
- code: z231.ZodIssueCode.custom,
5641
+ code: z235.ZodIssueCode.custom,
5483
5642
  path: ["field_type"],
5484
5643
  message: "Decoded field_type must match the parent field"
5485
5644
  });
@@ -5487,7 +5646,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5487
5646
  const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
5488
5647
  if (first.length !== count) {
5489
5648
  context.addIssue({
5490
- code: z231.ZodIssueCode.custom,
5649
+ code: z235.ZodIssueCode.custom,
5491
5650
  message: `Each current channel must have ${count} entries (columns * rows)`
5492
5651
  });
5493
5652
  }
@@ -5495,25 +5654,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5495
5654
  }
5496
5655
 
5497
5656
  // src/simulation/simulation_pcb_return_current_heatmap.ts
5498
- import { z as z232 } from "zod";
5499
- var simulation_pcb_return_current_heatmap = z232.object({
5500
- type: z232.literal("simulation_pcb_return_current_heatmap"),
5657
+ import { z as z236 } from "zod";
5658
+ var simulation_pcb_return_current_heatmap = z236.object({
5659
+ type: z236.literal("simulation_pcb_return_current_heatmap"),
5501
5660
  simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
5502
5661
  "simulation_pcb_return_current_heatmap"
5503
5662
  ),
5504
- simulation_pcb_return_current_result_id: z232.string().min(1),
5663
+ simulation_pcb_return_current_result_id: z236.string().min(1),
5505
5664
  layer: layer_ref,
5506
- source_net_id: z232.string().min(1),
5507
- min_x: z232.number().finite(),
5508
- min_y: z232.number().finite(),
5509
- max_x: z232.number().finite(),
5510
- max_y: z232.number().finite(),
5665
+ source_net_id: z236.string().min(1),
5666
+ min_x: z236.number().finite(),
5667
+ min_y: z236.number().finite(),
5668
+ max_x: z236.number().finite(),
5669
+ max_y: z236.number().finite(),
5511
5670
  image_asset: simulation_return_current_image_asset
5512
5671
  }).superRefine((heatmap, context) => {
5513
5672
  for (const axis of ["x", "y"]) {
5514
5673
  if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
5515
5674
  context.addIssue({
5516
- code: z232.ZodIssueCode.custom,
5675
+ code: z236.ZodIssueCode.custom,
5517
5676
  path: [`max_${axis}`],
5518
5677
  message: "Heatmap bounds must have positive width and height"
5519
5678
  });
@@ -5525,14 +5684,14 @@ var simulation_pcb_return_current_heatmap = z232.object({
5525
5684
  expectTypesMatch(true);
5526
5685
 
5527
5686
  // src/simulation/simulation_pcb_return_current_marker.ts
5528
- import { z as z233 } from "zod";
5529
- var marker_base = z233.object({
5530
- type: z233.literal("simulation_pcb_return_current_marker"),
5687
+ import { z as z237 } from "zod";
5688
+ var marker_base = z237.object({
5689
+ type: z237.literal("simulation_pcb_return_current_marker"),
5531
5690
  simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
5532
5691
  "simulation_pcb_return_current_marker"
5533
5692
  ),
5534
- simulation_pcb_return_current_result_id: z233.string().min(1),
5535
- role: z233.enum([
5693
+ simulation_pcb_return_current_result_id: z237.string().min(1),
5694
+ role: z237.enum([
5536
5695
  "signal_source",
5537
5696
  "signal_load",
5538
5697
  "return_source",
@@ -5540,33 +5699,33 @@ var marker_base = z233.object({
5540
5699
  "signal_transition",
5541
5700
  "return_transition"
5542
5701
  ]),
5543
- label: z233.string().optional(),
5544
- label_x: z233.number().finite().optional(),
5545
- label_y: z233.number().finite().optional()
5702
+ label: z237.string().optional(),
5703
+ label_x: z237.number().finite().optional(),
5704
+ label_y: z237.number().finite().optional()
5546
5705
  });
5547
- var simulation_pcb_return_current_marker = z233.discriminatedUnion("target_type", [
5706
+ var simulation_pcb_return_current_marker = z237.discriminatedUnion("target_type", [
5548
5707
  marker_base.extend({
5549
- target_type: z233.literal("pcb_port"),
5550
- pcb_port_id: z233.string().min(1),
5708
+ target_type: z237.literal("pcb_port"),
5709
+ pcb_port_id: z237.string().min(1),
5551
5710
  layer: layer_ref
5552
5711
  }),
5553
5712
  marker_base.extend({
5554
- target_type: z233.literal("pcb_via"),
5555
- pcb_via_id: z233.string().min(1),
5713
+ target_type: z237.literal("pcb_via"),
5714
+ pcb_via_id: z237.string().min(1),
5556
5715
  from_layer: layer_ref,
5557
5716
  to_layer: layer_ref
5558
5717
  })
5559
5718
  ]).superRefine((marker, context) => {
5560
5719
  if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
5561
5720
  context.addIssue({
5562
- code: z233.ZodIssueCode.custom,
5721
+ code: z237.ZodIssueCode.custom,
5563
5722
  path: ["label_x"],
5564
5723
  message: "label_x and label_y must be provided together"
5565
5724
  });
5566
5725
  }
5567
5726
  if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
5568
5727
  context.addIssue({
5569
- code: z233.ZodIssueCode.custom,
5728
+ code: z237.ZodIssueCode.custom,
5570
5729
  path: ["to_layer"],
5571
5730
  message: "A via transition must connect distinct layers"
5572
5731
  });
@@ -5577,8 +5736,8 @@ var simulation_pcb_return_current_marker = z233.discriminatedUnion("target_type"
5577
5736
  expectTypesMatch(true);
5578
5737
 
5579
5738
  // src/any_circuit_element.ts
5580
- import { z as z234 } from "zod";
5581
- var any_circuit_element = z234.union([
5739
+ import { z as z238 } from "zod";
5740
+ var any_circuit_element = z238.union([
5582
5741
  source_runtime_error,
5583
5742
  source_datasheet,
5584
5743
  source_trace,
@@ -5744,6 +5903,10 @@ var any_circuit_element = z234.union([
5744
5903
  simulation_voltage_source,
5745
5904
  simulation_current_source,
5746
5905
  simulation_experiment,
5906
+ simulation_ibis_model,
5907
+ simulation_ibis_pin_state,
5908
+ simulation_digital_stimulus,
5909
+ simulation_eye_diagram,
5747
5910
  simulation_return_current_excitation,
5748
5911
  simulation_pcb_return_current_result,
5749
5912
  simulation_pcb_return_current_field,
@@ -5996,7 +6159,11 @@ export {
5996
6159
  simulation_dc_sweep_unit,
5997
6160
  simulation_dc_sweep_voltage_graph,
5998
6161
  simulation_dc_voltage_source,
6162
+ simulation_digital_stimulus,
5999
6163
  simulation_experiment,
6164
+ simulation_eye_diagram,
6165
+ simulation_ibis_model,
6166
+ simulation_ibis_pin_state,
6000
6167
  simulation_op_amp,
6001
6168
  simulation_oscilloscope_trace,
6002
6169
  simulation_parameter_sweep,