circuit-json 0.0.527 → 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();
@@ -3769,6 +3782,7 @@ import { z as z168 } from "zod";
3769
3782
  var pcb_keepout_outline = z168.object({
3770
3783
  type: z168.literal("pcb_keepout"),
3771
3784
  shape: z168.literal("outline"),
3785
+ pcb_component_id: z168.string().optional(),
3772
3786
  pcb_group_id: z168.string().optional(),
3773
3787
  subcircuit_id: z168.string().optional(),
3774
3788
  outline: z168.array(point).min(2),
@@ -3784,6 +3798,7 @@ var pcb_keepout_outline = z168.object({
3784
3798
  var pcb_keepout = z168.object({
3785
3799
  type: z168.literal("pcb_keepout"),
3786
3800
  shape: z168.literal("rect"),
3801
+ pcb_component_id: z168.string().optional(),
3787
3802
  pcb_group_id: z168.string().optional(),
3788
3803
  subcircuit_id: z168.string().optional(),
3789
3804
  center: point,
@@ -3802,6 +3817,7 @@ var pcb_keepout = z168.object({
3802
3817
  z168.object({
3803
3818
  type: z168.literal("pcb_keepout"),
3804
3819
  shape: z168.literal("circle"),
3820
+ pcb_component_id: z168.string().optional(),
3805
3821
  pcb_group_id: z168.string().optional(),
3806
3822
  subcircuit_id: z168.string().optional(),
3807
3823
  center: point,
@@ -4758,6 +4774,8 @@ var simulation_experiment = z206.object({
4758
4774
  ),
4759
4775
  name: z206.string(),
4760
4776
  experiment_type,
4777
+ subcircuit_id: z206.string().optional(),
4778
+ spice_engine: z206.string().optional(),
4761
4779
  time_per_step: duration_ms.optional(),
4762
4780
  start_time_ms: ms.optional(),
4763
4781
  end_time_ms: ms.optional(),
@@ -4860,6 +4878,7 @@ var simulation_transient_voltage_graph = z208.object({
4860
4878
  "simulation_transient_voltage_graph"
4861
4879
  ),
4862
4880
  simulation_experiment_id: z208.string(),
4881
+ simulation_voltage_probe_id: z208.string().optional(),
4863
4882
  simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
4864
4883
  timestamps_ms: z208.array(z208.number()).optional(),
4865
4884
  voltage_levels: z208.array(z208.number()),
@@ -5285,52 +5304,195 @@ var simulation_oscilloscope_trace = z224.object({
5285
5304
  });
5286
5305
  expectTypesMatch(true);
5287
5306
 
5288
- // src/simulation/simulation_return_current_contact.ts
5307
+ // src/simulation/simulation_ibis_model.ts
5289
5308
  import { z as z225 } from "zod";
5290
- var contact_position = z225.object({
5291
- x: z225.number().finite(),
5292
- 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(),
5293
5455
  layer: layer_ref
5294
5456
  });
5295
- var simulation_return_current_contact = z225.discriminatedUnion("contact_type", [
5457
+ var simulation_return_current_contact = z229.discriminatedUnion("contact_type", [
5296
5458
  contact_position.extend({
5297
- contact_type: z225.literal("pcb_port"),
5298
- pcb_port_id: z225.string().min(1)
5459
+ contact_type: z229.literal("pcb_port"),
5460
+ pcb_port_id: z229.string().min(1)
5299
5461
  }),
5300
5462
  contact_position.extend({
5301
- contact_type: z225.literal("pcb_via"),
5302
- pcb_via_id: z225.string().min(1)
5463
+ contact_type: z229.literal("pcb_via"),
5464
+ pcb_via_id: z229.string().min(1)
5303
5465
  }),
5304
5466
  contact_position.extend({
5305
- contact_type: z225.literal("pcb_copper_pour"),
5306
- 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)
5307
5469
  })
5308
5470
  ]).describe("Identifies the reference conductor at a return-current contact");
5309
5471
  expectTypesMatch(true);
5310
5472
 
5311
5473
  // src/simulation/simulation_terminal_port.ts
5312
- import { z as z226 } from "zod";
5313
- var simulation_terminal_port = z226.object({
5314
- signal_pcb_port_id: z226.string().min(1),
5315
- 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(),
5316
5478
  reference_layer: layer_ref,
5317
- resistance: z226.number().finite().positive()
5479
+ resistance: z230.number().finite().positive()
5318
5480
  }).describe(
5319
5481
  "A two-terminal return-current excitation port with resistance in ohms"
5320
5482
  );
5321
5483
  expectTypesMatch(true);
5322
5484
 
5323
5485
  // src/simulation/simulation_return_current_excitation.ts
5324
- import { z as z227 } from "zod";
5325
- var simulation_return_current_excitation = z227.object({
5326
- 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"),
5327
5489
  simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
5328
5490
  "simulation_return_current_excitation"
5329
5491
  ),
5330
- simulation_experiment_id: z227.string().min(1),
5331
- pcb_trace_id: z227.string().min(1),
5332
- ground_source_net_id: z227.string().min(1),
5333
- 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(),
5334
5496
  return_source: simulation_return_current_contact,
5335
5497
  return_sink: simulation_return_current_contact,
5336
5498
  source_port: simulation_terminal_port.optional(),
@@ -5341,34 +5503,34 @@ var simulation_return_current_excitation = z227.object({
5341
5503
  expectTypesMatch(true);
5342
5504
 
5343
5505
  // src/simulation/simulation_pcb_return_current_result.ts
5344
- import { z as z228 } from "zod";
5345
- var simulation_pcb_return_current_result = z228.object({
5346
- 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"),
5347
5509
  simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
5348
5510
  "simulation_pcb_return_current_result"
5349
5511
  ),
5350
- simulation_experiment_id: z228.string().min(1),
5351
- pcb_board_id: z228.string().min(1),
5352
- 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(
5353
5515
  (ids) => new Set(ids).size === ids.length,
5354
5516
  "Excitation IDs must be unique"
5355
5517
  ),
5356
- frequency_hz: z228.number().finite().positive().optional()
5518
+ frequency_hz: z232.number().finite().positive().optional()
5357
5519
  }).describe(
5358
5520
  "A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
5359
5521
  );
5360
5522
  expectTypesMatch(true);
5361
5523
 
5362
5524
  // src/simulation/simulation_return_current_asset.ts
5363
- import { z as z229 } from "zod";
5525
+ import { z as z233 } from "zod";
5364
5526
  function createSimulationReturnCurrentAssetSchema(mimetypes) {
5365
5527
  return asset.extend({
5366
- project_relative_path: z229.string().min(1),
5367
- url: z229.string().url()
5528
+ project_relative_path: z233.string().min(1),
5529
+ url: z233.string().url()
5368
5530
  }).superRefine((value, context) => {
5369
5531
  if (!mimetypes.includes(value.mimetype)) {
5370
5532
  context.addIssue({
5371
- code: z229.ZodIssueCode.custom,
5533
+ code: z233.ZodIssueCode.custom,
5372
5534
  path: ["mimetype"],
5373
5535
  message: `Expected one of: ${mimetypes.join(", ")}`
5374
5536
  });
@@ -5377,7 +5539,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
5377
5539
  const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
5378
5540
  if (mediaType?.toLowerCase() !== value.mimetype) {
5379
5541
  context.addIssue({
5380
- code: z229.ZodIssueCode.custom,
5542
+ code: z233.ZodIssueCode.custom,
5381
5543
  path: ["url"],
5382
5544
  message: "Data URL media type must match asset.mimetype"
5383
5545
  });
@@ -5392,29 +5554,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
5392
5554
  var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
5393
5555
 
5394
5556
  // src/simulation/simulation_pcb_return_current_field.ts
5395
- import { z as z230 } from "zod";
5396
- var simulation_pcb_return_current_field = z230.object({
5397
- 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"),
5398
5560
  simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
5399
5561
  "simulation_pcb_return_current_field"
5400
5562
  ),
5401
- simulation_pcb_return_current_result_id: z230.string().min(1),
5563
+ simulation_pcb_return_current_result_id: z234.string().min(1),
5402
5564
  layer: layer_ref,
5403
- source_net_id: z230.string().min(1),
5404
- field_type: z230.enum(["real", "complex_phasor"]),
5405
- min_x: z230.number().finite(),
5406
- min_y: z230.number().finite(),
5407
- columns: z230.number().int().positive().safe(),
5408
- rows: z230.number().int().positive().safe(),
5409
- cell_width: z230.number().finite().positive(),
5410
- cell_height: z230.number().finite().positive(),
5411
- copper_thickness: z230.number().finite().positive(),
5412
- 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"),
5413
5575
  field_asset: simulation_return_current_field_asset
5414
5576
  }).superRefine((field, context) => {
5415
5577
  if (!Number.isSafeInteger(field.columns * field.rows)) {
5416
5578
  context.addIssue({
5417
- code: z230.ZodIssueCode.custom,
5579
+ code: z234.ZodIssueCode.custom,
5418
5580
  path: ["columns"],
5419
5581
  message: "The grid cell count must be a safe integer"
5420
5582
  });
@@ -5425,16 +5587,16 @@ var simulation_pcb_return_current_field = z230.object({
5425
5587
  expectTypesMatch(true);
5426
5588
 
5427
5589
  // src/simulation/simulation_return_current_grid_json.ts
5428
- import { z as z231 } from "zod";
5429
- var channel = z231.array(z231.number().finite().nullable()).min(1);
5430
- var simulation_return_current_grid_json = z231.discriminatedUnion("field_type", [
5431
- z231.object({
5432
- 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"),
5433
5595
  sheet_current_x: channel,
5434
5596
  sheet_current_y: channel
5435
5597
  }),
5436
- z231.object({
5437
- field_type: z231.literal("complex_phasor"),
5598
+ z235.object({
5599
+ field_type: z235.literal("complex_phasor"),
5438
5600
  sheet_current_x_real: channel,
5439
5601
  sheet_current_x_imag: channel,
5440
5602
  sheet_current_y_real: channel,
@@ -5450,7 +5612,7 @@ var simulation_return_current_grid_json = z231.discriminatedUnion("field_type",
5450
5612
  const first = channels[0];
5451
5613
  if (channels.some((values) => values.length !== first.length)) {
5452
5614
  context.addIssue({
5453
- code: z231.ZodIssueCode.custom,
5615
+ code: z235.ZodIssueCode.custom,
5454
5616
  message: "Current channels must have equal lengths"
5455
5617
  });
5456
5618
  return;
@@ -5459,7 +5621,7 @@ var simulation_return_current_grid_json = z231.discriminatedUnion("field_type",
5459
5621
  const masked = first[index] === null;
5460
5622
  if (channels.some((values) => values[index] === null !== masked)) {
5461
5623
  context.addIssue({
5462
- code: z231.ZodIssueCode.custom,
5624
+ code: z235.ZodIssueCode.custom,
5463
5625
  message: `Cell ${index} must be null in every channel or finite in every channel`
5464
5626
  });
5465
5627
  return;
@@ -5476,7 +5638,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5476
5638
  return simulation_return_current_grid_json.superRefine((grid, context) => {
5477
5639
  if (grid.field_type !== field.field_type) {
5478
5640
  context.addIssue({
5479
- code: z231.ZodIssueCode.custom,
5641
+ code: z235.ZodIssueCode.custom,
5480
5642
  path: ["field_type"],
5481
5643
  message: "Decoded field_type must match the parent field"
5482
5644
  });
@@ -5484,7 +5646,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5484
5646
  const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
5485
5647
  if (first.length !== count) {
5486
5648
  context.addIssue({
5487
- code: z231.ZodIssueCode.custom,
5649
+ code: z235.ZodIssueCode.custom,
5488
5650
  message: `Each current channel must have ${count} entries (columns * rows)`
5489
5651
  });
5490
5652
  }
@@ -5492,25 +5654,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
5492
5654
  }
5493
5655
 
5494
5656
  // src/simulation/simulation_pcb_return_current_heatmap.ts
5495
- import { z as z232 } from "zod";
5496
- var simulation_pcb_return_current_heatmap = z232.object({
5497
- 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"),
5498
5660
  simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
5499
5661
  "simulation_pcb_return_current_heatmap"
5500
5662
  ),
5501
- simulation_pcb_return_current_result_id: z232.string().min(1),
5663
+ simulation_pcb_return_current_result_id: z236.string().min(1),
5502
5664
  layer: layer_ref,
5503
- source_net_id: z232.string().min(1),
5504
- min_x: z232.number().finite(),
5505
- min_y: z232.number().finite(),
5506
- max_x: z232.number().finite(),
5507
- 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(),
5508
5670
  image_asset: simulation_return_current_image_asset
5509
5671
  }).superRefine((heatmap, context) => {
5510
5672
  for (const axis of ["x", "y"]) {
5511
5673
  if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
5512
5674
  context.addIssue({
5513
- code: z232.ZodIssueCode.custom,
5675
+ code: z236.ZodIssueCode.custom,
5514
5676
  path: [`max_${axis}`],
5515
5677
  message: "Heatmap bounds must have positive width and height"
5516
5678
  });
@@ -5522,14 +5684,14 @@ var simulation_pcb_return_current_heatmap = z232.object({
5522
5684
  expectTypesMatch(true);
5523
5685
 
5524
5686
  // src/simulation/simulation_pcb_return_current_marker.ts
5525
- import { z as z233 } from "zod";
5526
- var marker_base = z233.object({
5527
- 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"),
5528
5690
  simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
5529
5691
  "simulation_pcb_return_current_marker"
5530
5692
  ),
5531
- simulation_pcb_return_current_result_id: z233.string().min(1),
5532
- role: z233.enum([
5693
+ simulation_pcb_return_current_result_id: z237.string().min(1),
5694
+ role: z237.enum([
5533
5695
  "signal_source",
5534
5696
  "signal_load",
5535
5697
  "return_source",
@@ -5537,33 +5699,33 @@ var marker_base = z233.object({
5537
5699
  "signal_transition",
5538
5700
  "return_transition"
5539
5701
  ]),
5540
- label: z233.string().optional(),
5541
- label_x: z233.number().finite().optional(),
5542
- 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()
5543
5705
  });
5544
- var simulation_pcb_return_current_marker = z233.discriminatedUnion("target_type", [
5706
+ var simulation_pcb_return_current_marker = z237.discriminatedUnion("target_type", [
5545
5707
  marker_base.extend({
5546
- target_type: z233.literal("pcb_port"),
5547
- pcb_port_id: z233.string().min(1),
5708
+ target_type: z237.literal("pcb_port"),
5709
+ pcb_port_id: z237.string().min(1),
5548
5710
  layer: layer_ref
5549
5711
  }),
5550
5712
  marker_base.extend({
5551
- target_type: z233.literal("pcb_via"),
5552
- pcb_via_id: z233.string().min(1),
5713
+ target_type: z237.literal("pcb_via"),
5714
+ pcb_via_id: z237.string().min(1),
5553
5715
  from_layer: layer_ref,
5554
5716
  to_layer: layer_ref
5555
5717
  })
5556
5718
  ]).superRefine((marker, context) => {
5557
5719
  if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
5558
5720
  context.addIssue({
5559
- code: z233.ZodIssueCode.custom,
5721
+ code: z237.ZodIssueCode.custom,
5560
5722
  path: ["label_x"],
5561
5723
  message: "label_x and label_y must be provided together"
5562
5724
  });
5563
5725
  }
5564
5726
  if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
5565
5727
  context.addIssue({
5566
- code: z233.ZodIssueCode.custom,
5728
+ code: z237.ZodIssueCode.custom,
5567
5729
  path: ["to_layer"],
5568
5730
  message: "A via transition must connect distinct layers"
5569
5731
  });
@@ -5574,8 +5736,8 @@ var simulation_pcb_return_current_marker = z233.discriminatedUnion("target_type"
5574
5736
  expectTypesMatch(true);
5575
5737
 
5576
5738
  // src/any_circuit_element.ts
5577
- import { z as z234 } from "zod";
5578
- var any_circuit_element = z234.union([
5739
+ import { z as z238 } from "zod";
5740
+ var any_circuit_element = z238.union([
5579
5741
  source_runtime_error,
5580
5742
  source_datasheet,
5581
5743
  source_trace,
@@ -5741,6 +5903,10 @@ var any_circuit_element = z234.union([
5741
5903
  simulation_voltage_source,
5742
5904
  simulation_current_source,
5743
5905
  simulation_experiment,
5906
+ simulation_ibis_model,
5907
+ simulation_ibis_pin_state,
5908
+ simulation_digital_stimulus,
5909
+ simulation_eye_diagram,
5744
5910
  simulation_return_current_excitation,
5745
5911
  simulation_pcb_return_current_result,
5746
5912
  simulation_pcb_return_current_field,
@@ -5993,7 +6159,11 @@ export {
5993
6159
  simulation_dc_sweep_unit,
5994
6160
  simulation_dc_sweep_voltage_graph,
5995
6161
  simulation_dc_voltage_source,
6162
+ simulation_digital_stimulus,
5996
6163
  simulation_experiment,
6164
+ simulation_eye_diagram,
6165
+ simulation_ibis_model,
6166
+ simulation_ibis_pin_state,
5997
6167
  simulation_op_amp,
5998
6168
  simulation_oscilloscope_trace,
5999
6169
  simulation_parameter_sweep,