circuit-json 0.0.493 → 0.0.494
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/README.md +112 -0
- package/dist/index.d.mts +236 -5
- package/dist/index.mjs +558 -529
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3294,7 +3294,8 @@ var pcb_keepout_outline = z154.object({
|
|
|
3294
3294
|
pcb_keepout_id: z154.string(),
|
|
3295
3295
|
layers: z154.array(z154.string()),
|
|
3296
3296
|
description: z154.string().optional(),
|
|
3297
|
-
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3297
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional(),
|
|
3298
|
+
warning_only: z154.boolean().optional()
|
|
3298
3299
|
});
|
|
3299
3300
|
var pcb_keepout = z154.object({
|
|
3300
3301
|
type: z154.literal("pcb_keepout"),
|
|
@@ -3309,7 +3310,8 @@ var pcb_keepout = z154.object({
|
|
|
3309
3310
|
// Specify layers where the keepout applies
|
|
3310
3311
|
description: z154.string().optional(),
|
|
3311
3312
|
// Optional description of the keepout
|
|
3312
|
-
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3313
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional(),
|
|
3314
|
+
warning_only: z154.boolean().optional()
|
|
3313
3315
|
}).or(
|
|
3314
3316
|
z154.object({
|
|
3315
3317
|
type: z154.literal("pcb_keepout"),
|
|
@@ -3323,25 +3325,50 @@ var pcb_keepout = z154.object({
|
|
|
3323
3325
|
// Specify layers where the keepout applies
|
|
3324
3326
|
description: z154.string().optional(),
|
|
3325
3327
|
// Optional description of the keepout
|
|
3326
|
-
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3328
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional(),
|
|
3329
|
+
warning_only: z154.boolean().optional()
|
|
3327
3330
|
})
|
|
3328
3331
|
).or(pcb_keepout_outline);
|
|
3329
3332
|
expectTypesMatch(true);
|
|
3330
3333
|
expectTypesMatch(true);
|
|
3331
3334
|
|
|
3332
|
-
// src/pcb/
|
|
3335
|
+
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3333
3336
|
import { z as z155 } from "zod";
|
|
3334
|
-
var
|
|
3335
|
-
type: z155.literal("
|
|
3337
|
+
var pcb_keepout_overlap_warning = z155.object({
|
|
3338
|
+
type: z155.literal("pcb_keepout_overlap_warning"),
|
|
3339
|
+
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3340
|
+
"pcb_keepout_overlap_warning"
|
|
3341
|
+
),
|
|
3342
|
+
warning_type: z155.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
3343
|
+
message: z155.string(),
|
|
3344
|
+
pcb_keepout_id: z155.string(),
|
|
3345
|
+
pcb_component_ids: z155.array(z155.string()).optional(),
|
|
3346
|
+
pcb_trace_ids: z155.array(z155.string()).optional(),
|
|
3347
|
+
pcb_smtpad_ids: z155.array(z155.string()).optional(),
|
|
3348
|
+
pcb_plated_hole_ids: z155.array(z155.string()).optional(),
|
|
3349
|
+
pcb_via_ids: z155.array(z155.string()).optional(),
|
|
3350
|
+
center: point.optional(),
|
|
3351
|
+
subcircuit_id: z155.string().optional()
|
|
3352
|
+
}).describe(
|
|
3353
|
+
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3354
|
+
);
|
|
3355
|
+
expectTypesMatch(
|
|
3356
|
+
true
|
|
3357
|
+
);
|
|
3358
|
+
|
|
3359
|
+
// src/pcb/pcb_cutout.ts
|
|
3360
|
+
import { z as z156 } from "zod";
|
|
3361
|
+
var pcb_cutout_base = z156.object({
|
|
3362
|
+
type: z156.literal("pcb_cutout"),
|
|
3336
3363
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3337
|
-
pcb_component_id:
|
|
3338
|
-
pcb_group_id:
|
|
3339
|
-
subcircuit_id:
|
|
3340
|
-
pcb_board_id:
|
|
3341
|
-
pcb_panel_id:
|
|
3364
|
+
pcb_component_id: z156.string().optional(),
|
|
3365
|
+
pcb_group_id: z156.string().optional(),
|
|
3366
|
+
subcircuit_id: z156.string().optional(),
|
|
3367
|
+
pcb_board_id: z156.string().optional(),
|
|
3368
|
+
pcb_panel_id: z156.string().optional()
|
|
3342
3369
|
});
|
|
3343
3370
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3344
|
-
shape:
|
|
3371
|
+
shape: z156.literal("rect"),
|
|
3345
3372
|
center: point,
|
|
3346
3373
|
width: length,
|
|
3347
3374
|
height: length,
|
|
@@ -3350,26 +3377,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3350
3377
|
});
|
|
3351
3378
|
expectTypesMatch(true);
|
|
3352
3379
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3353
|
-
shape:
|
|
3380
|
+
shape: z156.literal("circle"),
|
|
3354
3381
|
center: point,
|
|
3355
3382
|
radius: length
|
|
3356
3383
|
});
|
|
3357
3384
|
expectTypesMatch(true);
|
|
3358
3385
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3359
|
-
shape:
|
|
3360
|
-
points:
|
|
3386
|
+
shape: z156.literal("polygon"),
|
|
3387
|
+
points: z156.array(point)
|
|
3361
3388
|
});
|
|
3362
3389
|
expectTypesMatch(true);
|
|
3363
3390
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3364
|
-
shape:
|
|
3365
|
-
route:
|
|
3391
|
+
shape: z156.literal("path"),
|
|
3392
|
+
route: z156.array(point),
|
|
3366
3393
|
slot_width: length,
|
|
3367
3394
|
slot_length: length.optional(),
|
|
3368
3395
|
space_between_slots: length.optional(),
|
|
3369
3396
|
slot_corner_radius: length.optional()
|
|
3370
3397
|
});
|
|
3371
3398
|
expectTypesMatch(true);
|
|
3372
|
-
var pcb_cutout =
|
|
3399
|
+
var pcb_cutout = z156.discriminatedUnion("shape", [
|
|
3373
3400
|
pcb_cutout_rect,
|
|
3374
3401
|
pcb_cutout_circle,
|
|
3375
3402
|
pcb_cutout_polygon,
|
|
@@ -3378,223 +3405,223 @@ var pcb_cutout = z155.discriminatedUnion("shape", [
|
|
|
3378
3405
|
expectTypesMatch(true);
|
|
3379
3406
|
|
|
3380
3407
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3381
|
-
import { z as
|
|
3408
|
+
import { z as z157 } from "zod";
|
|
3382
3409
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3383
|
-
type:
|
|
3410
|
+
type: z157.literal("pcb_missing_footprint_error"),
|
|
3384
3411
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3385
3412
|
"pcb_missing_footprint_error"
|
|
3386
3413
|
),
|
|
3387
|
-
pcb_group_id:
|
|
3388
|
-
subcircuit_id:
|
|
3389
|
-
error_type:
|
|
3390
|
-
source_component_id:
|
|
3414
|
+
pcb_group_id: z157.string().optional(),
|
|
3415
|
+
subcircuit_id: z157.string().optional(),
|
|
3416
|
+
error_type: z157.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3417
|
+
source_component_id: z157.string()
|
|
3391
3418
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3392
3419
|
expectTypesMatch(
|
|
3393
3420
|
true
|
|
3394
3421
|
);
|
|
3395
3422
|
|
|
3396
3423
|
// src/pcb/external_footprint_load_error.ts
|
|
3397
|
-
import { z as
|
|
3424
|
+
import { z as z158 } from "zod";
|
|
3398
3425
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3399
|
-
type:
|
|
3426
|
+
type: z158.literal("external_footprint_load_error"),
|
|
3400
3427
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3401
3428
|
"external_footprint_load_error"
|
|
3402
3429
|
),
|
|
3403
|
-
pcb_component_id:
|
|
3404
|
-
source_component_id:
|
|
3405
|
-
pcb_group_id:
|
|
3406
|
-
subcircuit_id:
|
|
3407
|
-
footprinter_string:
|
|
3408
|
-
error_type:
|
|
3430
|
+
pcb_component_id: z158.string(),
|
|
3431
|
+
source_component_id: z158.string(),
|
|
3432
|
+
pcb_group_id: z158.string().optional(),
|
|
3433
|
+
subcircuit_id: z158.string().optional(),
|
|
3434
|
+
footprinter_string: z158.string().optional(),
|
|
3435
|
+
error_type: z158.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3409
3436
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3410
3437
|
expectTypesMatch(true);
|
|
3411
3438
|
|
|
3412
3439
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3413
|
-
import { z as
|
|
3440
|
+
import { z as z159 } from "zod";
|
|
3414
3441
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3415
|
-
type:
|
|
3442
|
+
type: z159.literal("circuit_json_footprint_load_error"),
|
|
3416
3443
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3417
3444
|
"circuit_json_footprint_load_error"
|
|
3418
3445
|
),
|
|
3419
|
-
pcb_component_id:
|
|
3420
|
-
source_component_id:
|
|
3421
|
-
pcb_group_id:
|
|
3422
|
-
subcircuit_id:
|
|
3423
|
-
error_type:
|
|
3424
|
-
circuit_json:
|
|
3446
|
+
pcb_component_id: z159.string(),
|
|
3447
|
+
source_component_id: z159.string(),
|
|
3448
|
+
pcb_group_id: z159.string().optional(),
|
|
3449
|
+
subcircuit_id: z159.string().optional(),
|
|
3450
|
+
error_type: z159.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3451
|
+
circuit_json: z159.array(z159.any()).optional()
|
|
3425
3452
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3426
3453
|
expectTypesMatch(true);
|
|
3427
3454
|
|
|
3428
3455
|
// src/pcb/pcb_group.ts
|
|
3429
|
-
import { z as
|
|
3430
|
-
var pcb_group =
|
|
3431
|
-
type:
|
|
3456
|
+
import { z as z160 } from "zod";
|
|
3457
|
+
var pcb_group = z160.object({
|
|
3458
|
+
type: z160.literal("pcb_group"),
|
|
3432
3459
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3433
|
-
source_group_id:
|
|
3434
|
-
is_subcircuit:
|
|
3435
|
-
subcircuit_id:
|
|
3460
|
+
source_group_id: z160.string(),
|
|
3461
|
+
is_subcircuit: z160.boolean().optional(),
|
|
3462
|
+
subcircuit_id: z160.string().optional(),
|
|
3436
3463
|
width: length.optional(),
|
|
3437
3464
|
height: length.optional(),
|
|
3438
3465
|
center: point,
|
|
3439
|
-
display_offset_x:
|
|
3466
|
+
display_offset_x: z160.string().optional().describe(
|
|
3440
3467
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3441
3468
|
),
|
|
3442
|
-
display_offset_y:
|
|
3469
|
+
display_offset_y: z160.string().optional().describe(
|
|
3443
3470
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3444
3471
|
),
|
|
3445
|
-
outline:
|
|
3472
|
+
outline: z160.array(point).optional(),
|
|
3446
3473
|
anchor_position: point.optional(),
|
|
3447
3474
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3448
|
-
position_mode:
|
|
3449
|
-
positioned_relative_to_pcb_group_id:
|
|
3450
|
-
positioned_relative_to_pcb_board_id:
|
|
3451
|
-
pcb_component_ids:
|
|
3452
|
-
child_layout_mode:
|
|
3453
|
-
name:
|
|
3454
|
-
description:
|
|
3455
|
-
layout_mode:
|
|
3456
|
-
autorouter_configuration:
|
|
3475
|
+
position_mode: z160.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3476
|
+
positioned_relative_to_pcb_group_id: z160.string().optional(),
|
|
3477
|
+
positioned_relative_to_pcb_board_id: z160.string().optional(),
|
|
3478
|
+
pcb_component_ids: z160.array(z160.string()),
|
|
3479
|
+
child_layout_mode: z160.enum(["packed", "none"]).optional(),
|
|
3480
|
+
name: z160.string().optional(),
|
|
3481
|
+
description: z160.string().optional(),
|
|
3482
|
+
layout_mode: z160.string().optional(),
|
|
3483
|
+
autorouter_configuration: z160.object({
|
|
3457
3484
|
trace_clearance: length
|
|
3458
3485
|
}).optional(),
|
|
3459
|
-
autorouter_used_string:
|
|
3486
|
+
autorouter_used_string: z160.string().optional()
|
|
3460
3487
|
}).describe("Defines a group of components on the PCB");
|
|
3461
3488
|
expectTypesMatch(true);
|
|
3462
3489
|
|
|
3463
3490
|
// src/pcb/pcb_autorouting_error.ts
|
|
3464
|
-
import { z as
|
|
3491
|
+
import { z as z161 } from "zod";
|
|
3465
3492
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3466
|
-
type:
|
|
3493
|
+
type: z161.literal("pcb_autorouting_error"),
|
|
3467
3494
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3468
|
-
error_type:
|
|
3469
|
-
subcircuit_id:
|
|
3495
|
+
error_type: z161.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3496
|
+
subcircuit_id: z161.string().optional()
|
|
3470
3497
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3471
3498
|
expectTypesMatch(true);
|
|
3472
3499
|
|
|
3473
3500
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3474
|
-
import { z as
|
|
3501
|
+
import { z as z162 } from "zod";
|
|
3475
3502
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3476
|
-
type:
|
|
3503
|
+
type: z162.literal("pcb_preflight_routing_error"),
|
|
3477
3504
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3478
3505
|
"pcb_preflight_routing_error"
|
|
3479
3506
|
),
|
|
3480
|
-
error_type:
|
|
3481
|
-
error_code:
|
|
3482
|
-
subcircuit_id:
|
|
3483
|
-
pcb_group_id:
|
|
3484
|
-
routing_phase_index:
|
|
3485
|
-
phase_name:
|
|
3486
|
-
source_trace_ids:
|
|
3487
|
-
pcb_component_ids:
|
|
3488
|
-
pcb_port_ids:
|
|
3489
|
-
related_error_ids:
|
|
3490
|
-
measurements:
|
|
3507
|
+
error_type: z162.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3508
|
+
error_code: z162.string(),
|
|
3509
|
+
subcircuit_id: z162.string().optional(),
|
|
3510
|
+
pcb_group_id: z162.string().optional(),
|
|
3511
|
+
routing_phase_index: z162.number().int().optional(),
|
|
3512
|
+
phase_name: z162.string().optional(),
|
|
3513
|
+
source_trace_ids: z162.array(z162.string()).optional(),
|
|
3514
|
+
pcb_component_ids: z162.array(z162.string()).optional(),
|
|
3515
|
+
pcb_port_ids: z162.array(z162.string()).optional(),
|
|
3516
|
+
related_error_ids: z162.array(z162.string()).optional(),
|
|
3517
|
+
measurements: z162.record(z162.number().finite()).optional()
|
|
3491
3518
|
});
|
|
3492
3519
|
expectTypesMatch(true);
|
|
3493
3520
|
|
|
3494
3521
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3495
|
-
import { z as
|
|
3496
|
-
var pcb_manual_edit_conflict_warning =
|
|
3497
|
-
type:
|
|
3522
|
+
import { z as z163 } from "zod";
|
|
3523
|
+
var pcb_manual_edit_conflict_warning = z163.object({
|
|
3524
|
+
type: z163.literal("pcb_manual_edit_conflict_warning"),
|
|
3498
3525
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3499
3526
|
"pcb_manual_edit_conflict_warning"
|
|
3500
3527
|
),
|
|
3501
|
-
warning_type:
|
|
3502
|
-
message:
|
|
3503
|
-
pcb_component_id:
|
|
3504
|
-
pcb_group_id:
|
|
3505
|
-
subcircuit_id:
|
|
3506
|
-
source_component_id:
|
|
3528
|
+
warning_type: z163.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3529
|
+
message: z163.string(),
|
|
3530
|
+
pcb_component_id: z163.string(),
|
|
3531
|
+
pcb_group_id: z163.string().optional(),
|
|
3532
|
+
subcircuit_id: z163.string().optional(),
|
|
3533
|
+
source_component_id: z163.string()
|
|
3507
3534
|
}).describe(
|
|
3508
3535
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3509
3536
|
);
|
|
3510
3537
|
expectTypesMatch(true);
|
|
3511
3538
|
|
|
3512
3539
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3513
|
-
import { z as
|
|
3514
|
-
var connectorOrientationDirection =
|
|
3515
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3516
|
-
type:
|
|
3540
|
+
import { z as z164 } from "zod";
|
|
3541
|
+
var connectorOrientationDirection = z164.enum(["x-", "x+", "y+", "y-"]);
|
|
3542
|
+
var pcb_connector_not_in_accessible_orientation_warning = z164.object({
|
|
3543
|
+
type: z164.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3517
3544
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3518
3545
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3519
3546
|
),
|
|
3520
|
-
warning_type:
|
|
3521
|
-
message:
|
|
3522
|
-
pcb_component_id:
|
|
3523
|
-
source_component_id:
|
|
3524
|
-
pcb_board_id:
|
|
3547
|
+
warning_type: z164.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3548
|
+
message: z164.string(),
|
|
3549
|
+
pcb_component_id: z164.string(),
|
|
3550
|
+
source_component_id: z164.string().optional(),
|
|
3551
|
+
pcb_board_id: z164.string().optional(),
|
|
3525
3552
|
facing_direction: connectorOrientationDirection,
|
|
3526
3553
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3527
|
-
subcircuit_id:
|
|
3554
|
+
subcircuit_id: z164.string().optional()
|
|
3528
3555
|
}).describe(
|
|
3529
3556
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3530
3557
|
);
|
|
3531
3558
|
expectTypesMatch(true);
|
|
3532
3559
|
|
|
3533
3560
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3534
|
-
import { z as
|
|
3535
|
-
var pcb_component_missing_courtyard_warning =
|
|
3536
|
-
type:
|
|
3561
|
+
import { z as z165 } from "zod";
|
|
3562
|
+
var pcb_component_missing_courtyard_warning = z165.object({
|
|
3563
|
+
type: z165.literal("pcb_component_missing_courtyard_warning"),
|
|
3537
3564
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3538
3565
|
"pcb_component_missing_courtyard_warning"
|
|
3539
3566
|
),
|
|
3540
|
-
warning_type:
|
|
3541
|
-
message:
|
|
3542
|
-
pcb_component_id:
|
|
3543
|
-
source_component_id:
|
|
3544
|
-
subcircuit_id:
|
|
3567
|
+
warning_type: z165.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3568
|
+
message: z165.string(),
|
|
3569
|
+
pcb_component_id: z165.string(),
|
|
3570
|
+
source_component_id: z165.string().optional(),
|
|
3571
|
+
subcircuit_id: z165.string().optional()
|
|
3545
3572
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3546
3573
|
expectTypesMatch(true);
|
|
3547
3574
|
|
|
3548
3575
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3549
|
-
import { z as
|
|
3550
|
-
var supplier_footprint_mismatch_warning =
|
|
3551
|
-
type:
|
|
3576
|
+
import { z as z166 } from "zod";
|
|
3577
|
+
var supplier_footprint_mismatch_warning = z166.object({
|
|
3578
|
+
type: z166.literal("supplier_footprint_mismatch_warning"),
|
|
3552
3579
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3553
3580
|
"supplier_footprint_mismatch_warning"
|
|
3554
3581
|
),
|
|
3555
|
-
warning_type:
|
|
3556
|
-
message:
|
|
3557
|
-
source_component_id:
|
|
3558
|
-
pcb_component_id:
|
|
3559
|
-
pcb_group_id:
|
|
3560
|
-
subcircuit_id:
|
|
3582
|
+
warning_type: z166.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3583
|
+
message: z166.string(),
|
|
3584
|
+
source_component_id: z166.string(),
|
|
3585
|
+
pcb_component_id: z166.string().optional(),
|
|
3586
|
+
pcb_group_id: z166.string().optional(),
|
|
3587
|
+
subcircuit_id: z166.string().optional(),
|
|
3561
3588
|
supplier_name: supplier_name.optional(),
|
|
3562
|
-
supplier_part_number:
|
|
3563
|
-
supplier_footprint_url:
|
|
3564
|
-
footprint_copper_intersection_over_union:
|
|
3589
|
+
supplier_part_number: z166.string().optional(),
|
|
3590
|
+
supplier_footprint_url: z166.string().optional(),
|
|
3591
|
+
footprint_copper_intersection_over_union: z166.number()
|
|
3565
3592
|
}).describe(
|
|
3566
3593
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3567
3594
|
);
|
|
3568
3595
|
expectTypesMatch(true);
|
|
3569
3596
|
|
|
3570
3597
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
3571
|
-
import { z as
|
|
3572
|
-
var pcb_fabricator_extra_charge_warning =
|
|
3573
|
-
type:
|
|
3598
|
+
import { z as z167 } from "zod";
|
|
3599
|
+
var pcb_fabricator_extra_charge_warning = z167.object({
|
|
3600
|
+
type: z167.literal("pcb_fabricator_extra_charge_warning"),
|
|
3574
3601
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
3575
3602
|
"pcb_fabricator_extra_charge_warning"
|
|
3576
3603
|
),
|
|
3577
|
-
warning_type:
|
|
3578
|
-
message:
|
|
3579
|
-
fabricator_preset:
|
|
3580
|
-
pcb_board_id:
|
|
3581
|
-
pcb_via_ids:
|
|
3582
|
-
subcircuit_id:
|
|
3604
|
+
warning_type: z167.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
3605
|
+
message: z167.string(),
|
|
3606
|
+
fabricator_preset: z167.string(),
|
|
3607
|
+
pcb_board_id: z167.string().optional(),
|
|
3608
|
+
pcb_via_ids: z167.array(z167.string()).optional(),
|
|
3609
|
+
subcircuit_id: z167.string().optional()
|
|
3583
3610
|
}).describe(
|
|
3584
3611
|
"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
|
|
3585
3612
|
);
|
|
3586
3613
|
expectTypesMatch(true);
|
|
3587
3614
|
|
|
3588
3615
|
// src/pcb/pcb_breakout_point.ts
|
|
3589
|
-
import { z as
|
|
3590
|
-
var pcb_breakout_point =
|
|
3591
|
-
type:
|
|
3616
|
+
import { z as z168 } from "zod";
|
|
3617
|
+
var pcb_breakout_point = z168.object({
|
|
3618
|
+
type: z168.literal("pcb_breakout_point"),
|
|
3592
3619
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3593
|
-
pcb_group_id:
|
|
3594
|
-
subcircuit_id:
|
|
3595
|
-
source_trace_id:
|
|
3596
|
-
source_port_id:
|
|
3597
|
-
source_net_id:
|
|
3620
|
+
pcb_group_id: z168.string(),
|
|
3621
|
+
subcircuit_id: z168.string().optional(),
|
|
3622
|
+
source_trace_id: z168.string().optional(),
|
|
3623
|
+
source_port_id: z168.string().optional(),
|
|
3624
|
+
source_net_id: z168.string().optional(),
|
|
3598
3625
|
layer: layer_ref.optional(),
|
|
3599
3626
|
x: distance,
|
|
3600
3627
|
y: distance
|
|
@@ -3604,61 +3631,61 @@ var pcb_breakout_point = z167.object({
|
|
|
3604
3631
|
expectTypesMatch(true);
|
|
3605
3632
|
|
|
3606
3633
|
// src/pcb/pcb_ground_plane.ts
|
|
3607
|
-
import { z as
|
|
3608
|
-
var pcb_ground_plane =
|
|
3609
|
-
type:
|
|
3634
|
+
import { z as z169 } from "zod";
|
|
3635
|
+
var pcb_ground_plane = z169.object({
|
|
3636
|
+
type: z169.literal("pcb_ground_plane"),
|
|
3610
3637
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3611
|
-
source_pcb_ground_plane_id:
|
|
3612
|
-
source_net_id:
|
|
3613
|
-
pcb_group_id:
|
|
3614
|
-
subcircuit_id:
|
|
3638
|
+
source_pcb_ground_plane_id: z169.string(),
|
|
3639
|
+
source_net_id: z169.string(),
|
|
3640
|
+
pcb_group_id: z169.string().optional(),
|
|
3641
|
+
subcircuit_id: z169.string().optional()
|
|
3615
3642
|
}).describe("Defines a ground plane on the PCB");
|
|
3616
3643
|
expectTypesMatch(true);
|
|
3617
3644
|
|
|
3618
3645
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3619
|
-
import { z as
|
|
3620
|
-
var pcb_ground_plane_region =
|
|
3621
|
-
type:
|
|
3646
|
+
import { z as z170 } from "zod";
|
|
3647
|
+
var pcb_ground_plane_region = z170.object({
|
|
3648
|
+
type: z170.literal("pcb_ground_plane_region"),
|
|
3622
3649
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3623
3650
|
"pcb_ground_plane_region"
|
|
3624
3651
|
),
|
|
3625
|
-
pcb_ground_plane_id:
|
|
3626
|
-
pcb_group_id:
|
|
3627
|
-
subcircuit_id:
|
|
3652
|
+
pcb_ground_plane_id: z170.string(),
|
|
3653
|
+
pcb_group_id: z170.string().optional(),
|
|
3654
|
+
subcircuit_id: z170.string().optional(),
|
|
3628
3655
|
layer: layer_ref,
|
|
3629
|
-
points:
|
|
3656
|
+
points: z170.array(point)
|
|
3630
3657
|
}).describe("Defines a polygon region of a ground plane");
|
|
3631
3658
|
expectTypesMatch(true);
|
|
3632
3659
|
|
|
3633
3660
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3634
|
-
import { z as
|
|
3635
|
-
var pcb_thermal_spoke =
|
|
3636
|
-
type:
|
|
3661
|
+
import { z as z171 } from "zod";
|
|
3662
|
+
var pcb_thermal_spoke = z171.object({
|
|
3663
|
+
type: z171.literal("pcb_thermal_spoke"),
|
|
3637
3664
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3638
|
-
pcb_ground_plane_id:
|
|
3639
|
-
shape:
|
|
3640
|
-
spoke_count:
|
|
3665
|
+
pcb_ground_plane_id: z171.string(),
|
|
3666
|
+
shape: z171.string(),
|
|
3667
|
+
spoke_count: z171.number(),
|
|
3641
3668
|
spoke_thickness: distance,
|
|
3642
3669
|
spoke_inner_diameter: distance,
|
|
3643
3670
|
spoke_outer_diameter: distance,
|
|
3644
|
-
pcb_plated_hole_id:
|
|
3645
|
-
subcircuit_id:
|
|
3671
|
+
pcb_plated_hole_id: z171.string().optional(),
|
|
3672
|
+
subcircuit_id: z171.string().optional()
|
|
3646
3673
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3647
3674
|
expectTypesMatch(true);
|
|
3648
3675
|
|
|
3649
3676
|
// src/pcb/pcb_copper_pour.ts
|
|
3650
|
-
import { z as
|
|
3651
|
-
var pcb_copper_pour_base =
|
|
3652
|
-
type:
|
|
3677
|
+
import { z as z172 } from "zod";
|
|
3678
|
+
var pcb_copper_pour_base = z172.object({
|
|
3679
|
+
type: z172.literal("pcb_copper_pour"),
|
|
3653
3680
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3654
|
-
pcb_group_id:
|
|
3655
|
-
subcircuit_id:
|
|
3681
|
+
pcb_group_id: z172.string().optional(),
|
|
3682
|
+
subcircuit_id: z172.string().optional(),
|
|
3656
3683
|
layer: layer_ref,
|
|
3657
|
-
source_net_id:
|
|
3658
|
-
covered_with_solder_mask:
|
|
3684
|
+
source_net_id: z172.string().optional(),
|
|
3685
|
+
covered_with_solder_mask: z172.boolean().optional().default(true)
|
|
3659
3686
|
});
|
|
3660
3687
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3661
|
-
shape:
|
|
3688
|
+
shape: z172.literal("rect"),
|
|
3662
3689
|
center: point,
|
|
3663
3690
|
width: length,
|
|
3664
3691
|
height: length,
|
|
@@ -3666,16 +3693,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3666
3693
|
});
|
|
3667
3694
|
expectTypesMatch(true);
|
|
3668
3695
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3669
|
-
shape:
|
|
3696
|
+
shape: z172.literal("brep"),
|
|
3670
3697
|
brep_shape
|
|
3671
3698
|
});
|
|
3672
3699
|
expectTypesMatch(true);
|
|
3673
3700
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3674
|
-
shape:
|
|
3675
|
-
points:
|
|
3701
|
+
shape: z172.literal("polygon"),
|
|
3702
|
+
points: z172.array(point)
|
|
3676
3703
|
});
|
|
3677
3704
|
expectTypesMatch(true);
|
|
3678
|
-
var pcb_copper_pour =
|
|
3705
|
+
var pcb_copper_pour = z172.discriminatedUnion("shape", [
|
|
3679
3706
|
pcb_copper_pour_rect,
|
|
3680
3707
|
pcb_copper_pour_brep,
|
|
3681
3708
|
pcb_copper_pour_polygon
|
|
@@ -3683,99 +3710,99 @@ var pcb_copper_pour = z171.discriminatedUnion("shape", [
|
|
|
3683
3710
|
expectTypesMatch(true);
|
|
3684
3711
|
|
|
3685
3712
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3686
|
-
import { z as
|
|
3713
|
+
import { z as z173 } from "zod";
|
|
3687
3714
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3688
|
-
type:
|
|
3715
|
+
type: z173.literal("pcb_component_outside_board_error"),
|
|
3689
3716
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3690
3717
|
"pcb_component_outside_board_error"
|
|
3691
3718
|
),
|
|
3692
|
-
error_type:
|
|
3693
|
-
pcb_component_id:
|
|
3694
|
-
pcb_board_id:
|
|
3719
|
+
error_type: z173.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3720
|
+
pcb_component_id: z173.string(),
|
|
3721
|
+
pcb_board_id: z173.string(),
|
|
3695
3722
|
component_center: point,
|
|
3696
|
-
component_bounds:
|
|
3697
|
-
min_x:
|
|
3698
|
-
max_x:
|
|
3699
|
-
min_y:
|
|
3700
|
-
max_y:
|
|
3723
|
+
component_bounds: z173.object({
|
|
3724
|
+
min_x: z173.number(),
|
|
3725
|
+
max_x: z173.number(),
|
|
3726
|
+
min_y: z173.number(),
|
|
3727
|
+
max_y: z173.number()
|
|
3701
3728
|
}),
|
|
3702
|
-
subcircuit_id:
|
|
3703
|
-
source_component_id:
|
|
3729
|
+
subcircuit_id: z173.string().optional(),
|
|
3730
|
+
source_component_id: z173.string().optional()
|
|
3704
3731
|
}).describe(
|
|
3705
3732
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3706
3733
|
);
|
|
3707
3734
|
expectTypesMatch(true);
|
|
3708
3735
|
|
|
3709
3736
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3710
|
-
import { z as
|
|
3737
|
+
import { z as z174 } from "zod";
|
|
3711
3738
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3712
|
-
type:
|
|
3739
|
+
type: z174.literal("pcb_component_not_on_board_edge_error"),
|
|
3713
3740
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3714
3741
|
"pcb_component_not_on_board_edge_error"
|
|
3715
3742
|
),
|
|
3716
|
-
error_type:
|
|
3717
|
-
pcb_component_id:
|
|
3718
|
-
pcb_board_id:
|
|
3743
|
+
error_type: z174.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3744
|
+
pcb_component_id: z174.string(),
|
|
3745
|
+
pcb_board_id: z174.string(),
|
|
3719
3746
|
component_center: point,
|
|
3720
|
-
pad_to_nearest_board_edge_distance:
|
|
3721
|
-
source_component_id:
|
|
3722
|
-
subcircuit_id:
|
|
3747
|
+
pad_to_nearest_board_edge_distance: z174.number(),
|
|
3748
|
+
source_component_id: z174.string().optional(),
|
|
3749
|
+
subcircuit_id: z174.string().optional()
|
|
3723
3750
|
}).describe(
|
|
3724
3751
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3725
3752
|
);
|
|
3726
3753
|
expectTypesMatch(true);
|
|
3727
3754
|
|
|
3728
3755
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3729
|
-
import { z as
|
|
3756
|
+
import { z as z175 } from "zod";
|
|
3730
3757
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3731
|
-
type:
|
|
3758
|
+
type: z175.literal("pcb_component_invalid_layer_error"),
|
|
3732
3759
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3733
3760
|
"pcb_component_invalid_layer_error"
|
|
3734
3761
|
),
|
|
3735
|
-
error_type:
|
|
3736
|
-
pcb_component_id:
|
|
3737
|
-
source_component_id:
|
|
3762
|
+
error_type: z175.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3763
|
+
pcb_component_id: z175.string().optional(),
|
|
3764
|
+
source_component_id: z175.string(),
|
|
3738
3765
|
layer: layer_ref,
|
|
3739
|
-
subcircuit_id:
|
|
3766
|
+
subcircuit_id: z175.string().optional()
|
|
3740
3767
|
}).describe(
|
|
3741
3768
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3742
3769
|
);
|
|
3743
3770
|
expectTypesMatch(true);
|
|
3744
3771
|
|
|
3745
3772
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3746
|
-
import { z as
|
|
3773
|
+
import { z as z176 } from "zod";
|
|
3747
3774
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3748
|
-
type:
|
|
3775
|
+
type: z176.literal("pcb_via_clearance_error"),
|
|
3749
3776
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3750
|
-
error_type:
|
|
3751
|
-
pcb_via_ids:
|
|
3777
|
+
error_type: z176.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3778
|
+
pcb_via_ids: z176.array(z176.string()).min(2),
|
|
3752
3779
|
minimum_clearance: distance.optional(),
|
|
3753
3780
|
actual_clearance: distance.optional(),
|
|
3754
|
-
pcb_center:
|
|
3755
|
-
x:
|
|
3756
|
-
y:
|
|
3781
|
+
pcb_center: z176.object({
|
|
3782
|
+
x: z176.number().optional(),
|
|
3783
|
+
y: z176.number().optional()
|
|
3757
3784
|
}).optional(),
|
|
3758
|
-
subcircuit_id:
|
|
3785
|
+
subcircuit_id: z176.string().optional()
|
|
3759
3786
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3760
3787
|
expectTypesMatch(true);
|
|
3761
3788
|
|
|
3762
3789
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3763
|
-
import { z as
|
|
3790
|
+
import { z as z177 } from "zod";
|
|
3764
3791
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3765
|
-
type:
|
|
3792
|
+
type: z177.literal("pcb_via_trace_clearance_error"),
|
|
3766
3793
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3767
3794
|
"pcb_via_trace_clearance_error"
|
|
3768
3795
|
),
|
|
3769
|
-
error_type:
|
|
3770
|
-
pcb_via_id:
|
|
3771
|
-
pcb_trace_id:
|
|
3796
|
+
error_type: z177.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3797
|
+
pcb_via_id: z177.string(),
|
|
3798
|
+
pcb_trace_id: z177.string(),
|
|
3772
3799
|
minimum_clearance: distance.optional(),
|
|
3773
3800
|
actual_clearance: distance.optional(),
|
|
3774
|
-
center:
|
|
3775
|
-
x:
|
|
3776
|
-
y:
|
|
3801
|
+
center: z177.object({
|
|
3802
|
+
x: z177.number().optional(),
|
|
3803
|
+
y: z177.number().optional()
|
|
3777
3804
|
}).optional(),
|
|
3778
|
-
subcircuit_id:
|
|
3805
|
+
subcircuit_id: z177.string().optional()
|
|
3779
3806
|
}).describe(
|
|
3780
3807
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3781
3808
|
);
|
|
@@ -3784,41 +3811,41 @@ expectTypesMatch(
|
|
|
3784
3811
|
);
|
|
3785
3812
|
|
|
3786
3813
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3787
|
-
import { z as
|
|
3814
|
+
import { z as z178 } from "zod";
|
|
3788
3815
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3789
|
-
type:
|
|
3816
|
+
type: z178.literal("pcb_pad_pad_clearance_error"),
|
|
3790
3817
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3791
3818
|
"pcb_pad_pad_clearance_error"
|
|
3792
3819
|
),
|
|
3793
|
-
error_type:
|
|
3794
|
-
pcb_pad_ids:
|
|
3820
|
+
error_type: z178.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3821
|
+
pcb_pad_ids: z178.array(z178.string()).min(2),
|
|
3795
3822
|
minimum_clearance: distance.optional(),
|
|
3796
3823
|
actual_clearance: distance.optional(),
|
|
3797
|
-
center:
|
|
3798
|
-
x:
|
|
3799
|
-
y:
|
|
3824
|
+
center: z178.object({
|
|
3825
|
+
x: z178.number().optional(),
|
|
3826
|
+
y: z178.number().optional()
|
|
3800
3827
|
}).optional(),
|
|
3801
|
-
subcircuit_id:
|
|
3828
|
+
subcircuit_id: z178.string().optional()
|
|
3802
3829
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3803
3830
|
expectTypesMatch(true);
|
|
3804
3831
|
|
|
3805
3832
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3806
|
-
import { z as
|
|
3833
|
+
import { z as z179 } from "zod";
|
|
3807
3834
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3808
|
-
type:
|
|
3835
|
+
type: z179.literal("pcb_pad_trace_clearance_error"),
|
|
3809
3836
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3810
3837
|
"pcb_pad_trace_clearance_error"
|
|
3811
3838
|
),
|
|
3812
|
-
error_type:
|
|
3813
|
-
pcb_pad_id:
|
|
3814
|
-
pcb_trace_id:
|
|
3839
|
+
error_type: z179.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3840
|
+
pcb_pad_id: z179.string(),
|
|
3841
|
+
pcb_trace_id: z179.string(),
|
|
3815
3842
|
minimum_clearance: distance.optional(),
|
|
3816
3843
|
actual_clearance: distance.optional(),
|
|
3817
|
-
center:
|
|
3818
|
-
x:
|
|
3819
|
-
y:
|
|
3844
|
+
center: z179.object({
|
|
3845
|
+
x: z179.number().optional(),
|
|
3846
|
+
y: z179.number().optional()
|
|
3820
3847
|
}).optional(),
|
|
3821
|
-
subcircuit_id:
|
|
3848
|
+
subcircuit_id: z179.string().optional()
|
|
3822
3849
|
}).describe(
|
|
3823
3850
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3824
3851
|
);
|
|
@@ -3827,89 +3854,89 @@ expectTypesMatch(
|
|
|
3827
3854
|
);
|
|
3828
3855
|
|
|
3829
3856
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3830
|
-
import { z as
|
|
3831
|
-
var pcb_courtyard_rect =
|
|
3832
|
-
type:
|
|
3857
|
+
import { z as z180 } from "zod";
|
|
3858
|
+
var pcb_courtyard_rect = z180.object({
|
|
3859
|
+
type: z180.literal("pcb_courtyard_rect"),
|
|
3833
3860
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3834
|
-
pcb_component_id:
|
|
3835
|
-
pcb_group_id:
|
|
3836
|
-
subcircuit_id:
|
|
3861
|
+
pcb_component_id: z180.string(),
|
|
3862
|
+
pcb_group_id: z180.string().optional(),
|
|
3863
|
+
subcircuit_id: z180.string().optional(),
|
|
3837
3864
|
center: point,
|
|
3838
3865
|
width: length,
|
|
3839
3866
|
height: length,
|
|
3840
3867
|
layer: visible_layer,
|
|
3841
3868
|
ccw_rotation: rotation.optional(),
|
|
3842
|
-
color:
|
|
3869
|
+
color: z180.string().optional()
|
|
3843
3870
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3844
3871
|
expectTypesMatch(true);
|
|
3845
3872
|
|
|
3846
3873
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3847
|
-
import { z as
|
|
3848
|
-
var pcb_courtyard_outline =
|
|
3849
|
-
type:
|
|
3874
|
+
import { z as z181 } from "zod";
|
|
3875
|
+
var pcb_courtyard_outline = z181.object({
|
|
3876
|
+
type: z181.literal("pcb_courtyard_outline"),
|
|
3850
3877
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3851
3878
|
"pcb_courtyard_outline"
|
|
3852
3879
|
),
|
|
3853
|
-
pcb_component_id:
|
|
3854
|
-
pcb_group_id:
|
|
3855
|
-
subcircuit_id:
|
|
3880
|
+
pcb_component_id: z181.string(),
|
|
3881
|
+
pcb_group_id: z181.string().optional(),
|
|
3882
|
+
subcircuit_id: z181.string().optional(),
|
|
3856
3883
|
layer: visible_layer,
|
|
3857
|
-
outline:
|
|
3884
|
+
outline: z181.array(point).min(2)
|
|
3858
3885
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3859
3886
|
expectTypesMatch(true);
|
|
3860
3887
|
|
|
3861
3888
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3862
|
-
import { z as
|
|
3863
|
-
var pcb_courtyard_polygon =
|
|
3864
|
-
type:
|
|
3889
|
+
import { z as z182 } from "zod";
|
|
3890
|
+
var pcb_courtyard_polygon = z182.object({
|
|
3891
|
+
type: z182.literal("pcb_courtyard_polygon"),
|
|
3865
3892
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3866
3893
|
"pcb_courtyard_polygon"
|
|
3867
3894
|
),
|
|
3868
|
-
pcb_component_id:
|
|
3869
|
-
pcb_group_id:
|
|
3870
|
-
subcircuit_id:
|
|
3895
|
+
pcb_component_id: z182.string(),
|
|
3896
|
+
pcb_group_id: z182.string().optional(),
|
|
3897
|
+
subcircuit_id: z182.string().optional(),
|
|
3871
3898
|
layer: visible_layer,
|
|
3872
|
-
points:
|
|
3873
|
-
color:
|
|
3899
|
+
points: z182.array(point).min(3),
|
|
3900
|
+
color: z182.string().optional()
|
|
3874
3901
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3875
3902
|
expectTypesMatch(true);
|
|
3876
3903
|
|
|
3877
3904
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3878
|
-
import { z as
|
|
3879
|
-
var pcb_courtyard_circle =
|
|
3880
|
-
type:
|
|
3905
|
+
import { z as z183 } from "zod";
|
|
3906
|
+
var pcb_courtyard_circle = z183.object({
|
|
3907
|
+
type: z183.literal("pcb_courtyard_circle"),
|
|
3881
3908
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3882
3909
|
"pcb_courtyard_circle"
|
|
3883
3910
|
),
|
|
3884
|
-
pcb_component_id:
|
|
3885
|
-
pcb_group_id:
|
|
3886
|
-
subcircuit_id:
|
|
3911
|
+
pcb_component_id: z183.string(),
|
|
3912
|
+
pcb_group_id: z183.string().optional(),
|
|
3913
|
+
subcircuit_id: z183.string().optional(),
|
|
3887
3914
|
center: point,
|
|
3888
3915
|
radius: length,
|
|
3889
3916
|
layer: visible_layer,
|
|
3890
|
-
color:
|
|
3917
|
+
color: z183.string().optional()
|
|
3891
3918
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3892
3919
|
expectTypesMatch(true);
|
|
3893
3920
|
|
|
3894
3921
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3895
|
-
import { z as
|
|
3896
|
-
var pcb_courtyard_pill =
|
|
3897
|
-
type:
|
|
3922
|
+
import { z as z184 } from "zod";
|
|
3923
|
+
var pcb_courtyard_pill = z184.object({
|
|
3924
|
+
type: z184.literal("pcb_courtyard_pill"),
|
|
3898
3925
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3899
|
-
pcb_component_id:
|
|
3900
|
-
pcb_group_id:
|
|
3901
|
-
subcircuit_id:
|
|
3926
|
+
pcb_component_id: z184.string(),
|
|
3927
|
+
pcb_group_id: z184.string().optional(),
|
|
3928
|
+
subcircuit_id: z184.string().optional(),
|
|
3902
3929
|
center: point,
|
|
3903
3930
|
width: length,
|
|
3904
3931
|
height: length,
|
|
3905
3932
|
radius: length,
|
|
3906
3933
|
layer: visible_layer,
|
|
3907
|
-
color:
|
|
3934
|
+
color: z184.string().optional()
|
|
3908
3935
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3909
3936
|
expectTypesMatch(true);
|
|
3910
3937
|
|
|
3911
3938
|
// src/cad/cad_component.ts
|
|
3912
|
-
import { z as
|
|
3939
|
+
import { z as z185 } from "zod";
|
|
3913
3940
|
|
|
3914
3941
|
// src/cad/cad_model_conventions.ts
|
|
3915
3942
|
var cad_model_formats = [
|
|
@@ -3940,50 +3967,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3940
3967
|
};
|
|
3941
3968
|
|
|
3942
3969
|
// src/cad/cad_component.ts
|
|
3943
|
-
var cad_component =
|
|
3944
|
-
type:
|
|
3945
|
-
cad_component_id:
|
|
3946
|
-
pcb_component_id:
|
|
3947
|
-
source_component_id:
|
|
3970
|
+
var cad_component = z185.object({
|
|
3971
|
+
type: z185.literal("cad_component"),
|
|
3972
|
+
cad_component_id: z185.string(),
|
|
3973
|
+
pcb_component_id: z185.string(),
|
|
3974
|
+
source_component_id: z185.string(),
|
|
3948
3975
|
position: point3,
|
|
3949
3976
|
rotation: point3.optional(),
|
|
3950
3977
|
size: point3.optional(),
|
|
3951
3978
|
layer: layer_ref.optional(),
|
|
3952
|
-
subcircuit_id:
|
|
3979
|
+
subcircuit_id: z185.string().optional(),
|
|
3953
3980
|
// These are all ways to generate/load the 3d model
|
|
3954
|
-
footprinter_string:
|
|
3955
|
-
model_obj_url:
|
|
3956
|
-
model_stl_url:
|
|
3957
|
-
model_3mf_url:
|
|
3958
|
-
model_gltf_url:
|
|
3959
|
-
model_glb_url:
|
|
3960
|
-
model_step_url:
|
|
3961
|
-
model_wrl_url:
|
|
3981
|
+
footprinter_string: z185.string().optional(),
|
|
3982
|
+
model_obj_url: z185.string().optional(),
|
|
3983
|
+
model_stl_url: z185.string().optional(),
|
|
3984
|
+
model_3mf_url: z185.string().optional(),
|
|
3985
|
+
model_gltf_url: z185.string().optional(),
|
|
3986
|
+
model_glb_url: z185.string().optional(),
|
|
3987
|
+
model_step_url: z185.string().optional(),
|
|
3988
|
+
model_wrl_url: z185.string().optional(),
|
|
3962
3989
|
model_asset: asset.optional(),
|
|
3963
|
-
model_unit_to_mm_scale_factor:
|
|
3964
|
-
model_board_normal_direction:
|
|
3990
|
+
model_unit_to_mm_scale_factor: z185.number().optional(),
|
|
3991
|
+
model_board_normal_direction: z185.enum(cad_model_axis_directions).optional().describe(
|
|
3965
3992
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3966
3993
|
),
|
|
3967
3994
|
model_origin_position: point3.optional(),
|
|
3968
|
-
model_origin_alignment:
|
|
3995
|
+
model_origin_alignment: z185.enum([
|
|
3969
3996
|
"unknown",
|
|
3970
3997
|
"center",
|
|
3971
3998
|
"center_of_component_on_board_surface",
|
|
3972
3999
|
"bottom_center_of_component"
|
|
3973
4000
|
]).optional(),
|
|
3974
|
-
model_object_fit:
|
|
3975
|
-
model_jscad:
|
|
3976
|
-
show_as_translucent_model:
|
|
3977
|
-
show_as_bounding_box:
|
|
3978
|
-
show_hidden_edges:
|
|
3979
|
-
anchor_alignment:
|
|
4001
|
+
model_object_fit: z185.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4002
|
+
model_jscad: z185.any().optional(),
|
|
4003
|
+
show_as_translucent_model: z185.boolean().optional(),
|
|
4004
|
+
show_as_bounding_box: z185.boolean().optional(),
|
|
4005
|
+
show_hidden_edges: z185.boolean().optional(),
|
|
4006
|
+
anchor_alignment: z185.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3980
4007
|
}).describe("Defines a component on the PCB");
|
|
3981
4008
|
expectTypesMatch(true);
|
|
3982
4009
|
|
|
3983
4010
|
// src/simulation/simulation_voltage_source.ts
|
|
3984
|
-
import { z as
|
|
3985
|
-
var wave_shape =
|
|
3986
|
-
var percentage =
|
|
4011
|
+
import { z as z186 } from "zod";
|
|
4012
|
+
var wave_shape = z186.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4013
|
+
var percentage = z186.union([z186.string(), z186.number()]).transform((val) => {
|
|
3987
4014
|
if (typeof val === "string") {
|
|
3988
4015
|
if (val.endsWith("%")) {
|
|
3989
4016
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3992,32 +4019,32 @@ var percentage = z185.union([z185.string(), z185.number()]).transform((val) => {
|
|
|
3992
4019
|
}
|
|
3993
4020
|
return val;
|
|
3994
4021
|
}).pipe(
|
|
3995
|
-
|
|
4022
|
+
z186.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3996
4023
|
);
|
|
3997
|
-
var simulation_dc_voltage_source =
|
|
3998
|
-
type:
|
|
4024
|
+
var simulation_dc_voltage_source = z186.object({
|
|
4025
|
+
type: z186.literal("simulation_voltage_source"),
|
|
3999
4026
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4000
4027
|
"simulation_voltage_source"
|
|
4001
4028
|
),
|
|
4002
|
-
is_dc_source:
|
|
4003
|
-
positive_source_port_id:
|
|
4004
|
-
negative_source_port_id:
|
|
4005
|
-
positive_source_net_id:
|
|
4006
|
-
negative_source_net_id:
|
|
4029
|
+
is_dc_source: z186.literal(true).optional().default(true),
|
|
4030
|
+
positive_source_port_id: z186.string().optional(),
|
|
4031
|
+
negative_source_port_id: z186.string().optional(),
|
|
4032
|
+
positive_source_net_id: z186.string().optional(),
|
|
4033
|
+
negative_source_net_id: z186.string().optional(),
|
|
4007
4034
|
voltage,
|
|
4008
4035
|
ac_magnitude: voltage.optional(),
|
|
4009
4036
|
ac_phase: rotation.optional()
|
|
4010
4037
|
}).describe("Defines a DC voltage source for simulation");
|
|
4011
|
-
var simulation_ac_voltage_source =
|
|
4012
|
-
type:
|
|
4038
|
+
var simulation_ac_voltage_source = z186.object({
|
|
4039
|
+
type: z186.literal("simulation_voltage_source"),
|
|
4013
4040
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4014
4041
|
"simulation_voltage_source"
|
|
4015
4042
|
),
|
|
4016
|
-
is_dc_source:
|
|
4017
|
-
terminal1_source_port_id:
|
|
4018
|
-
terminal2_source_port_id:
|
|
4019
|
-
terminal1_source_net_id:
|
|
4020
|
-
terminal2_source_net_id:
|
|
4043
|
+
is_dc_source: z186.literal(false),
|
|
4044
|
+
terminal1_source_port_id: z186.string().optional(),
|
|
4045
|
+
terminal2_source_port_id: z186.string().optional(),
|
|
4046
|
+
terminal1_source_net_id: z186.string().optional(),
|
|
4047
|
+
terminal2_source_net_id: z186.string().optional(),
|
|
4021
4048
|
voltage: voltage.optional(),
|
|
4022
4049
|
frequency: frequency.optional(),
|
|
4023
4050
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4032,14 +4059,14 @@ var simulation_ac_voltage_source = z185.object({
|
|
|
4032
4059
|
ac_magnitude: voltage.optional(),
|
|
4033
4060
|
ac_phase: rotation.optional()
|
|
4034
4061
|
}).describe("Defines an AC voltage source for simulation");
|
|
4035
|
-
var simulation_voltage_source =
|
|
4062
|
+
var simulation_voltage_source = z186.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4036
4063
|
expectTypesMatch(true);
|
|
4037
4064
|
expectTypesMatch(true);
|
|
4038
4065
|
expectTypesMatch(true);
|
|
4039
4066
|
|
|
4040
4067
|
// src/simulation/simulation_current_source.ts
|
|
4041
|
-
import { z as
|
|
4042
|
-
var percentage2 =
|
|
4068
|
+
import { z as z187 } from "zod";
|
|
4069
|
+
var percentage2 = z187.union([z187.string(), z187.number()]).transform((val) => {
|
|
4043
4070
|
if (typeof val === "string") {
|
|
4044
4071
|
if (val.endsWith("%")) {
|
|
4045
4072
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4048,32 +4075,32 @@ var percentage2 = z186.union([z186.string(), z186.number()]).transform((val) =>
|
|
|
4048
4075
|
}
|
|
4049
4076
|
return val;
|
|
4050
4077
|
}).pipe(
|
|
4051
|
-
|
|
4078
|
+
z187.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4052
4079
|
);
|
|
4053
|
-
var simulation_dc_current_source =
|
|
4054
|
-
type:
|
|
4080
|
+
var simulation_dc_current_source = z187.object({
|
|
4081
|
+
type: z187.literal("simulation_current_source"),
|
|
4055
4082
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4056
4083
|
"simulation_current_source"
|
|
4057
4084
|
),
|
|
4058
|
-
is_dc_source:
|
|
4059
|
-
positive_source_port_id:
|
|
4060
|
-
negative_source_port_id:
|
|
4061
|
-
positive_source_net_id:
|
|
4062
|
-
negative_source_net_id:
|
|
4085
|
+
is_dc_source: z187.literal(true).optional().default(true),
|
|
4086
|
+
positive_source_port_id: z187.string().optional(),
|
|
4087
|
+
negative_source_port_id: z187.string().optional(),
|
|
4088
|
+
positive_source_net_id: z187.string().optional(),
|
|
4089
|
+
negative_source_net_id: z187.string().optional(),
|
|
4063
4090
|
current,
|
|
4064
4091
|
ac_magnitude: current.optional(),
|
|
4065
4092
|
ac_phase: rotation.optional()
|
|
4066
4093
|
}).describe("Defines a DC current source for simulation");
|
|
4067
|
-
var simulation_ac_current_source =
|
|
4068
|
-
type:
|
|
4094
|
+
var simulation_ac_current_source = z187.object({
|
|
4095
|
+
type: z187.literal("simulation_current_source"),
|
|
4069
4096
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4070
4097
|
"simulation_current_source"
|
|
4071
4098
|
),
|
|
4072
|
-
is_dc_source:
|
|
4073
|
-
terminal1_source_port_id:
|
|
4074
|
-
terminal2_source_port_id:
|
|
4075
|
-
terminal1_source_net_id:
|
|
4076
|
-
terminal2_source_net_id:
|
|
4099
|
+
is_dc_source: z187.literal(false),
|
|
4100
|
+
terminal1_source_port_id: z187.string().optional(),
|
|
4101
|
+
terminal2_source_port_id: z187.string().optional(),
|
|
4102
|
+
terminal1_source_net_id: z187.string().optional(),
|
|
4103
|
+
terminal2_source_net_id: z187.string().optional(),
|
|
4077
4104
|
current: current.optional(),
|
|
4078
4105
|
frequency: frequency.optional(),
|
|
4079
4106
|
peak_to_peak_current: current.optional(),
|
|
@@ -4083,58 +4110,58 @@ var simulation_ac_current_source = z186.object({
|
|
|
4083
4110
|
ac_magnitude: current.optional(),
|
|
4084
4111
|
ac_phase: rotation.optional()
|
|
4085
4112
|
}).describe("Defines an AC current source for simulation");
|
|
4086
|
-
var simulation_current_source =
|
|
4113
|
+
var simulation_current_source = z187.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4087
4114
|
expectTypesMatch(true);
|
|
4088
4115
|
expectTypesMatch(true);
|
|
4089
4116
|
expectTypesMatch(true);
|
|
4090
4117
|
|
|
4091
4118
|
// src/simulation/simulation_experiment.ts
|
|
4092
|
-
import { z as
|
|
4119
|
+
import { z as z189 } from "zod";
|
|
4093
4120
|
|
|
4094
4121
|
// src/simulation/simulation_units.ts
|
|
4095
|
-
import { z as
|
|
4096
|
-
var simulation_dc_sweep_unit =
|
|
4122
|
+
import { z as z188 } from "zod";
|
|
4123
|
+
var simulation_dc_sweep_unit = z188.custom(
|
|
4097
4124
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4098
4125
|
);
|
|
4099
|
-
var simulation_parameter_unit =
|
|
4126
|
+
var simulation_parameter_unit = z188.custom(
|
|
4100
4127
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4101
4128
|
);
|
|
4102
4129
|
|
|
4103
4130
|
// src/simulation/simulation_experiment.ts
|
|
4104
|
-
var experiment_type =
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4131
|
+
var experiment_type = z189.union([
|
|
4132
|
+
z189.literal("spice_dc_sweep"),
|
|
4133
|
+
z189.literal("spice_dc_operating_point"),
|
|
4134
|
+
z189.literal("spice_transient_analysis"),
|
|
4135
|
+
z189.literal("spice_ac_analysis")
|
|
4109
4136
|
]);
|
|
4110
|
-
var spice_simulation_options =
|
|
4111
|
-
method:
|
|
4112
|
-
reltol:
|
|
4113
|
-
abstol:
|
|
4114
|
-
vntol:
|
|
4137
|
+
var spice_simulation_options = z189.object({
|
|
4138
|
+
method: z189.enum(["trap", "gear"]).optional(),
|
|
4139
|
+
reltol: z189.union([z189.number(), z189.string()]).optional(),
|
|
4140
|
+
abstol: z189.union([z189.number(), z189.string()]).optional(),
|
|
4141
|
+
vntol: z189.union([z189.number(), z189.string()]).optional()
|
|
4115
4142
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4116
|
-
var simulation_experiment =
|
|
4117
|
-
type:
|
|
4143
|
+
var simulation_experiment = z189.object({
|
|
4144
|
+
type: z189.literal("simulation_experiment"),
|
|
4118
4145
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4119
4146
|
"simulation_experiment"
|
|
4120
4147
|
),
|
|
4121
|
-
name:
|
|
4148
|
+
name: z189.string(),
|
|
4122
4149
|
experiment_type,
|
|
4123
4150
|
time_per_step: duration_ms.optional(),
|
|
4124
4151
|
start_time_ms: ms.optional(),
|
|
4125
4152
|
end_time_ms: ms.optional(),
|
|
4126
4153
|
spice_options: spice_simulation_options.optional(),
|
|
4127
|
-
dc_sweep_voltage_source_id:
|
|
4128
|
-
dc_sweep_current_source_id:
|
|
4129
|
-
dc_sweep_start:
|
|
4130
|
-
dc_sweep_stop:
|
|
4131
|
-
dc_sweep_step:
|
|
4154
|
+
dc_sweep_voltage_source_id: z189.string().optional(),
|
|
4155
|
+
dc_sweep_current_source_id: z189.string().optional(),
|
|
4156
|
+
dc_sweep_start: z189.number().optional(),
|
|
4157
|
+
dc_sweep_stop: z189.number().optional(),
|
|
4158
|
+
dc_sweep_step: z189.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4132
4159
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4133
|
-
ac_sweep_type:
|
|
4134
|
-
ac_samples_per_interval:
|
|
4135
|
-
ac_sample_count:
|
|
4136
|
-
ac_start_frequency_hz:
|
|
4137
|
-
ac_stop_frequency_hz:
|
|
4160
|
+
ac_sweep_type: z189.enum(["linear", "decade", "octave"]).optional(),
|
|
4161
|
+
ac_samples_per_interval: z189.number().int().positive().optional(),
|
|
4162
|
+
ac_sample_count: z189.number().int().positive().optional(),
|
|
4163
|
+
ac_start_frequency_hz: z189.number().positive().optional(),
|
|
4164
|
+
ac_stop_frequency_hz: z189.number().positive().optional()
|
|
4138
4165
|
}).superRefine((experiment, context) => {
|
|
4139
4166
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4140
4167
|
const requiredFields = [
|
|
@@ -4146,7 +4173,7 @@ var simulation_experiment = z188.object({
|
|
|
4146
4173
|
for (const field of requiredFields) {
|
|
4147
4174
|
if (experiment[field] === void 0) {
|
|
4148
4175
|
context.addIssue({
|
|
4149
|
-
code:
|
|
4176
|
+
code: z189.ZodIssueCode.custom,
|
|
4150
4177
|
path: [field],
|
|
4151
4178
|
message: `${field} is required for a DC sweep`
|
|
4152
4179
|
});
|
|
@@ -4156,7 +4183,7 @@ var simulation_experiment = z188.object({
|
|
|
4156
4183
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4157
4184
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4158
4185
|
context.addIssue({
|
|
4159
|
-
code:
|
|
4186
|
+
code: z189.ZodIssueCode.custom,
|
|
4160
4187
|
path: ["dc_sweep_voltage_source_id"],
|
|
4161
4188
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4162
4189
|
});
|
|
@@ -4165,35 +4192,35 @@ var simulation_experiment = z188.object({
|
|
|
4165
4192
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4166
4193
|
if (experiment.ac_sweep_type === void 0) {
|
|
4167
4194
|
context.addIssue({
|
|
4168
|
-
code:
|
|
4195
|
+
code: z189.ZodIssueCode.custom,
|
|
4169
4196
|
path: ["ac_sweep_type"],
|
|
4170
4197
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4171
4198
|
});
|
|
4172
4199
|
}
|
|
4173
4200
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4174
4201
|
context.addIssue({
|
|
4175
|
-
code:
|
|
4202
|
+
code: z189.ZodIssueCode.custom,
|
|
4176
4203
|
path: ["ac_start_frequency_hz"],
|
|
4177
4204
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4178
4205
|
});
|
|
4179
4206
|
}
|
|
4180
4207
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4181
4208
|
context.addIssue({
|
|
4182
|
-
code:
|
|
4209
|
+
code: z189.ZodIssueCode.custom,
|
|
4183
4210
|
path: ["ac_stop_frequency_hz"],
|
|
4184
4211
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4185
4212
|
});
|
|
4186
4213
|
}
|
|
4187
4214
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4188
4215
|
context.addIssue({
|
|
4189
|
-
code:
|
|
4216
|
+
code: z189.ZodIssueCode.custom,
|
|
4190
4217
|
path: ["ac_sample_count"],
|
|
4191
4218
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4192
4219
|
});
|
|
4193
4220
|
}
|
|
4194
4221
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4195
4222
|
context.addIssue({
|
|
4196
|
-
code:
|
|
4223
|
+
code: z189.ZodIssueCode.custom,
|
|
4197
4224
|
path: ["ac_samples_per_interval"],
|
|
4198
4225
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4199
4226
|
});
|
|
@@ -4203,87 +4230,87 @@ var simulation_experiment = z188.object({
|
|
|
4203
4230
|
expectTypesMatch(true);
|
|
4204
4231
|
|
|
4205
4232
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4206
|
-
import { z as
|
|
4233
|
+
import { z as z191 } from "zod";
|
|
4207
4234
|
|
|
4208
4235
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4209
|
-
import { z as
|
|
4210
|
-
var simulation_parameter_sweep_coordinate =
|
|
4211
|
-
simulation_parameter_sweep_id:
|
|
4212
|
-
sweep_index:
|
|
4213
|
-
parameter_value:
|
|
4236
|
+
import { z as z190 } from "zod";
|
|
4237
|
+
var simulation_parameter_sweep_coordinate = z190.object({
|
|
4238
|
+
simulation_parameter_sweep_id: z190.string(),
|
|
4239
|
+
sweep_index: z190.number().int().nonnegative(),
|
|
4240
|
+
parameter_value: z190.number(),
|
|
4214
4241
|
parameter_unit: simulation_parameter_unit
|
|
4215
4242
|
});
|
|
4216
4243
|
expectTypesMatch(true);
|
|
4217
4244
|
|
|
4218
4245
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4219
|
-
var simulation_transient_voltage_graph =
|
|
4220
|
-
type:
|
|
4246
|
+
var simulation_transient_voltage_graph = z191.object({
|
|
4247
|
+
type: z191.literal("simulation_transient_voltage_graph"),
|
|
4221
4248
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4222
4249
|
"simulation_transient_voltage_graph"
|
|
4223
4250
|
),
|
|
4224
|
-
simulation_experiment_id:
|
|
4251
|
+
simulation_experiment_id: z191.string(),
|
|
4225
4252
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4226
|
-
timestamps_ms:
|
|
4227
|
-
voltage_levels:
|
|
4228
|
-
source_component_id:
|
|
4229
|
-
subcircuit_connectivity_map_key:
|
|
4253
|
+
timestamps_ms: z191.array(z191.number()).optional(),
|
|
4254
|
+
voltage_levels: z191.array(z191.number()),
|
|
4255
|
+
source_component_id: z191.string().optional(),
|
|
4256
|
+
subcircuit_connectivity_map_key: z191.string().optional(),
|
|
4230
4257
|
time_per_step: duration_ms,
|
|
4231
4258
|
start_time_ms: ms,
|
|
4232
4259
|
end_time_ms: ms,
|
|
4233
|
-
name:
|
|
4234
|
-
color:
|
|
4260
|
+
name: z191.string().optional(),
|
|
4261
|
+
color: z191.string().optional()
|
|
4235
4262
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4236
4263
|
expectTypesMatch(true);
|
|
4237
4264
|
|
|
4238
4265
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4239
|
-
import { z as
|
|
4240
|
-
var simulation_transient_current_graph =
|
|
4241
|
-
type:
|
|
4266
|
+
import { z as z192 } from "zod";
|
|
4267
|
+
var simulation_transient_current_graph = z192.object({
|
|
4268
|
+
type: z192.literal("simulation_transient_current_graph"),
|
|
4242
4269
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4243
4270
|
"simulation_transient_current_graph"
|
|
4244
4271
|
),
|
|
4245
|
-
simulation_experiment_id:
|
|
4272
|
+
simulation_experiment_id: z192.string(),
|
|
4246
4273
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4247
|
-
timestamps_ms:
|
|
4248
|
-
current_levels:
|
|
4249
|
-
source_component_id:
|
|
4250
|
-
subcircuit_connectivity_map_key:
|
|
4274
|
+
timestamps_ms: z192.array(z192.number()).optional(),
|
|
4275
|
+
current_levels: z192.array(z192.number()),
|
|
4276
|
+
source_component_id: z192.string().optional(),
|
|
4277
|
+
subcircuit_connectivity_map_key: z192.string().optional(),
|
|
4251
4278
|
time_per_step: duration_ms,
|
|
4252
4279
|
start_time_ms: ms,
|
|
4253
4280
|
end_time_ms: ms,
|
|
4254
|
-
name:
|
|
4255
|
-
color:
|
|
4281
|
+
name: z192.string().optional(),
|
|
4282
|
+
color: z192.string().optional()
|
|
4256
4283
|
}).describe("Stores current measurements over time for a simulation");
|
|
4257
4284
|
expectTypesMatch(true);
|
|
4258
4285
|
|
|
4259
4286
|
// src/simulation/simulation_switch.ts
|
|
4260
|
-
import { z as
|
|
4261
|
-
var simulation_switch =
|
|
4262
|
-
type:
|
|
4287
|
+
import { z as z193 } from "zod";
|
|
4288
|
+
var simulation_switch = z193.object({
|
|
4289
|
+
type: z193.literal("simulation_switch"),
|
|
4263
4290
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4264
|
-
source_component_id:
|
|
4291
|
+
source_component_id: z193.string().optional(),
|
|
4265
4292
|
closes_at: ms.optional(),
|
|
4266
4293
|
opens_at: ms.optional(),
|
|
4267
|
-
starts_closed:
|
|
4294
|
+
starts_closed: z193.boolean().optional(),
|
|
4268
4295
|
switching_frequency: frequency.optional()
|
|
4269
4296
|
}).describe("Defines a switch for simulation timing control");
|
|
4270
4297
|
expectTypesMatch(true);
|
|
4271
4298
|
|
|
4272
4299
|
// src/simulation/simulation_voltage_probe.ts
|
|
4273
|
-
import { z as
|
|
4274
|
-
var simulation_voltage_probe =
|
|
4275
|
-
type:
|
|
4300
|
+
import { z as z194 } from "zod";
|
|
4301
|
+
var simulation_voltage_probe = z194.object({
|
|
4302
|
+
type: z194.literal("simulation_voltage_probe"),
|
|
4276
4303
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4277
4304
|
"simulation_voltage_probe"
|
|
4278
4305
|
),
|
|
4279
|
-
source_component_id:
|
|
4280
|
-
name:
|
|
4281
|
-
signal_input_source_port_id:
|
|
4282
|
-
signal_input_source_net_id:
|
|
4283
|
-
reference_input_source_port_id:
|
|
4284
|
-
reference_input_source_net_id:
|
|
4285
|
-
subcircuit_id:
|
|
4286
|
-
color:
|
|
4306
|
+
source_component_id: z194.string().optional(),
|
|
4307
|
+
name: z194.string().optional(),
|
|
4308
|
+
signal_input_source_port_id: z194.string().optional(),
|
|
4309
|
+
signal_input_source_net_id: z194.string().optional(),
|
|
4310
|
+
reference_input_source_port_id: z194.string().optional(),
|
|
4311
|
+
reference_input_source_net_id: z194.string().optional(),
|
|
4312
|
+
subcircuit_id: z194.string().optional(),
|
|
4313
|
+
color: z194.string().optional()
|
|
4287
4314
|
}).describe(
|
|
4288
4315
|
"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."
|
|
4289
4316
|
).superRefine((data, ctx) => {
|
|
@@ -4293,20 +4320,20 @@ var simulation_voltage_probe = z193.object({
|
|
|
4293
4320
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4294
4321
|
if (has_ports && has_nets) {
|
|
4295
4322
|
ctx.addIssue({
|
|
4296
|
-
code:
|
|
4323
|
+
code: z194.ZodIssueCode.custom,
|
|
4297
4324
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4298
4325
|
});
|
|
4299
4326
|
} else if (has_ports) {
|
|
4300
4327
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4301
4328
|
ctx.addIssue({
|
|
4302
|
-
code:
|
|
4329
|
+
code: z194.ZodIssueCode.custom,
|
|
4303
4330
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4304
4331
|
});
|
|
4305
4332
|
}
|
|
4306
4333
|
} else if (has_nets) {
|
|
4307
4334
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4308
4335
|
ctx.addIssue({
|
|
4309
|
-
code:
|
|
4336
|
+
code: z194.ZodIssueCode.custom,
|
|
4310
4337
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4311
4338
|
});
|
|
4312
4339
|
}
|
|
@@ -4314,7 +4341,7 @@ var simulation_voltage_probe = z193.object({
|
|
|
4314
4341
|
} else {
|
|
4315
4342
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4316
4343
|
ctx.addIssue({
|
|
4317
|
-
code:
|
|
4344
|
+
code: z194.ZodIssueCode.custom,
|
|
4318
4345
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4319
4346
|
});
|
|
4320
4347
|
}
|
|
@@ -4323,20 +4350,20 @@ var simulation_voltage_probe = z193.object({
|
|
|
4323
4350
|
expectTypesMatch(true);
|
|
4324
4351
|
|
|
4325
4352
|
// src/simulation/simulation_current_probe.ts
|
|
4326
|
-
import { z as
|
|
4327
|
-
var simulation_current_probe =
|
|
4328
|
-
type:
|
|
4353
|
+
import { z as z195 } from "zod";
|
|
4354
|
+
var simulation_current_probe = z195.object({
|
|
4355
|
+
type: z195.literal("simulation_current_probe"),
|
|
4329
4356
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4330
4357
|
"simulation_current_probe"
|
|
4331
4358
|
),
|
|
4332
|
-
source_component_id:
|
|
4333
|
-
name:
|
|
4334
|
-
positive_source_port_id:
|
|
4335
|
-
negative_source_port_id:
|
|
4336
|
-
positive_source_net_id:
|
|
4337
|
-
negative_source_net_id:
|
|
4338
|
-
subcircuit_id:
|
|
4339
|
-
color:
|
|
4359
|
+
source_component_id: z195.string().optional(),
|
|
4360
|
+
name: z195.string().optional(),
|
|
4361
|
+
positive_source_port_id: z195.string().optional(),
|
|
4362
|
+
negative_source_port_id: z195.string().optional(),
|
|
4363
|
+
positive_source_net_id: z195.string().optional(),
|
|
4364
|
+
negative_source_net_id: z195.string().optional(),
|
|
4365
|
+
subcircuit_id: z195.string().optional(),
|
|
4366
|
+
color: z195.string().optional()
|
|
4340
4367
|
}).describe(
|
|
4341
4368
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4342
4369
|
).superRefine((data, ctx) => {
|
|
@@ -4348,7 +4375,7 @@ var simulation_current_probe = z194.object({
|
|
|
4348
4375
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4349
4376
|
if (hasPorts && hasNets) {
|
|
4350
4377
|
ctx.addIssue({
|
|
4351
|
-
code:
|
|
4378
|
+
code: z195.ZodIssueCode.custom,
|
|
4352
4379
|
message: "Cannot mix port and net connections in a current probe."
|
|
4353
4380
|
});
|
|
4354
4381
|
return;
|
|
@@ -4356,7 +4383,7 @@ var simulation_current_probe = z194.object({
|
|
|
4356
4383
|
if (hasPorts) {
|
|
4357
4384
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4358
4385
|
ctx.addIssue({
|
|
4359
|
-
code:
|
|
4386
|
+
code: z195.ZodIssueCode.custom,
|
|
4360
4387
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4361
4388
|
});
|
|
4362
4389
|
}
|
|
@@ -4365,71 +4392,71 @@ var simulation_current_probe = z194.object({
|
|
|
4365
4392
|
if (hasNets) {
|
|
4366
4393
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4367
4394
|
ctx.addIssue({
|
|
4368
|
-
code:
|
|
4395
|
+
code: z195.ZodIssueCode.custom,
|
|
4369
4396
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4370
4397
|
});
|
|
4371
4398
|
}
|
|
4372
4399
|
return;
|
|
4373
4400
|
}
|
|
4374
4401
|
ctx.addIssue({
|
|
4375
|
-
code:
|
|
4402
|
+
code: z195.ZodIssueCode.custom,
|
|
4376
4403
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4377
4404
|
});
|
|
4378
4405
|
});
|
|
4379
4406
|
expectTypesMatch(true);
|
|
4380
4407
|
|
|
4381
4408
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4382
|
-
import { z as
|
|
4409
|
+
import { z as z196 } from "zod";
|
|
4383
4410
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4384
|
-
type:
|
|
4411
|
+
type: z196.literal("simulation_unknown_experiment_error"),
|
|
4385
4412
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4386
4413
|
"simulation_unknown_experiment_error"
|
|
4387
4414
|
),
|
|
4388
|
-
error_type:
|
|
4389
|
-
simulation_experiment_id:
|
|
4390
|
-
subcircuit_id:
|
|
4415
|
+
error_type: z196.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4416
|
+
simulation_experiment_id: z196.string().optional(),
|
|
4417
|
+
subcircuit_id: z196.string().optional()
|
|
4391
4418
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4392
4419
|
expectTypesMatch(true);
|
|
4393
4420
|
|
|
4394
4421
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4395
|
-
import { z as
|
|
4396
|
-
var simulation_parameter_type =
|
|
4422
|
+
import { z as z197 } from "zod";
|
|
4423
|
+
var simulation_parameter_type = z197.enum([
|
|
4397
4424
|
"resistance",
|
|
4398
4425
|
"capacitance",
|
|
4399
4426
|
"inductance",
|
|
4400
4427
|
"voltage",
|
|
4401
4428
|
"current"
|
|
4402
4429
|
]);
|
|
4403
|
-
var simulation_parameter_sweep_base =
|
|
4404
|
-
type:
|
|
4430
|
+
var simulation_parameter_sweep_base = z197.object({
|
|
4431
|
+
type: z197.literal("simulation_parameter_sweep"),
|
|
4405
4432
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4406
4433
|
"simulation_parameter_sweep"
|
|
4407
4434
|
),
|
|
4408
|
-
simulation_experiment_id:
|
|
4409
|
-
name:
|
|
4410
|
-
parameter_values:
|
|
4435
|
+
simulation_experiment_id: z197.string(),
|
|
4436
|
+
name: z197.string().optional(),
|
|
4437
|
+
parameter_values: z197.array(z197.number()).min(1),
|
|
4411
4438
|
parameter_unit: simulation_parameter_unit
|
|
4412
4439
|
});
|
|
4413
|
-
var simulation_parameter_sweep =
|
|
4440
|
+
var simulation_parameter_sweep = z197.discriminatedUnion("parameter_type", [
|
|
4414
4441
|
simulation_parameter_sweep_base.extend({
|
|
4415
|
-
parameter_type:
|
|
4416
|
-
resistor_source_component_id:
|
|
4442
|
+
parameter_type: z197.literal("resistance"),
|
|
4443
|
+
resistor_source_component_id: z197.string()
|
|
4417
4444
|
}),
|
|
4418
4445
|
simulation_parameter_sweep_base.extend({
|
|
4419
|
-
parameter_type:
|
|
4420
|
-
capacitor_source_component_id:
|
|
4446
|
+
parameter_type: z197.literal("capacitance"),
|
|
4447
|
+
capacitor_source_component_id: z197.string()
|
|
4421
4448
|
}),
|
|
4422
4449
|
simulation_parameter_sweep_base.extend({
|
|
4423
|
-
parameter_type:
|
|
4424
|
-
inductor_source_component_id:
|
|
4450
|
+
parameter_type: z197.literal("inductance"),
|
|
4451
|
+
inductor_source_component_id: z197.string()
|
|
4425
4452
|
}),
|
|
4426
4453
|
simulation_parameter_sweep_base.extend({
|
|
4427
|
-
parameter_type:
|
|
4428
|
-
source_net_id:
|
|
4454
|
+
parameter_type: z197.literal("voltage"),
|
|
4455
|
+
source_net_id: z197.string()
|
|
4429
4456
|
}),
|
|
4430
4457
|
simulation_parameter_sweep_base.extend({
|
|
4431
|
-
parameter_type:
|
|
4432
|
-
current_source_component_id:
|
|
4458
|
+
parameter_type: z197.literal("current"),
|
|
4459
|
+
current_source_component_id: z197.string()
|
|
4433
4460
|
})
|
|
4434
4461
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4435
4462
|
expectTypesMatch(
|
|
@@ -4437,52 +4464,52 @@ expectTypesMatch(
|
|
|
4437
4464
|
);
|
|
4438
4465
|
|
|
4439
4466
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4440
|
-
import { z as
|
|
4441
|
-
var simulation_dc_operating_point_voltage =
|
|
4442
|
-
type:
|
|
4467
|
+
import { z as z198 } from "zod";
|
|
4468
|
+
var simulation_dc_operating_point_voltage = z198.object({
|
|
4469
|
+
type: z198.literal("simulation_dc_operating_point_voltage"),
|
|
4443
4470
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4444
4471
|
"simulation_dc_operating_point_voltage"
|
|
4445
4472
|
),
|
|
4446
|
-
simulation_experiment_id:
|
|
4473
|
+
simulation_experiment_id: z198.string(),
|
|
4447
4474
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4448
|
-
simulation_voltage_probe_id:
|
|
4449
|
-
voltage:
|
|
4450
|
-
name:
|
|
4451
|
-
color:
|
|
4475
|
+
simulation_voltage_probe_id: z198.string(),
|
|
4476
|
+
voltage: z198.number(),
|
|
4477
|
+
name: z198.string().optional(),
|
|
4478
|
+
color: z198.string().optional()
|
|
4452
4479
|
});
|
|
4453
4480
|
expectTypesMatch(true);
|
|
4454
4481
|
|
|
4455
4482
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4456
|
-
import { z as
|
|
4457
|
-
var simulation_dc_operating_point_current =
|
|
4458
|
-
type:
|
|
4483
|
+
import { z as z199 } from "zod";
|
|
4484
|
+
var simulation_dc_operating_point_current = z199.object({
|
|
4485
|
+
type: z199.literal("simulation_dc_operating_point_current"),
|
|
4459
4486
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4460
4487
|
"simulation_dc_operating_point_current"
|
|
4461
4488
|
),
|
|
4462
|
-
simulation_experiment_id:
|
|
4489
|
+
simulation_experiment_id: z199.string(),
|
|
4463
4490
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4464
|
-
simulation_current_probe_id:
|
|
4465
|
-
current:
|
|
4466
|
-
name:
|
|
4467
|
-
color:
|
|
4491
|
+
simulation_current_probe_id: z199.string(),
|
|
4492
|
+
current: z199.number(),
|
|
4493
|
+
name: z199.string().optional(),
|
|
4494
|
+
color: z199.string().optional()
|
|
4468
4495
|
});
|
|
4469
4496
|
expectTypesMatch(true);
|
|
4470
4497
|
|
|
4471
4498
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4472
|
-
import { z as
|
|
4473
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4474
|
-
type:
|
|
4499
|
+
import { z as z200 } from "zod";
|
|
4500
|
+
var simulation_dc_sweep_voltage_graph = z200.object({
|
|
4501
|
+
type: z200.literal("simulation_dc_sweep_voltage_graph"),
|
|
4475
4502
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4476
4503
|
"simulation_dc_sweep_voltage_graph"
|
|
4477
4504
|
),
|
|
4478
|
-
simulation_experiment_id:
|
|
4505
|
+
simulation_experiment_id: z200.string(),
|
|
4479
4506
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4480
|
-
simulation_voltage_probe_id:
|
|
4481
|
-
sweep_values:
|
|
4507
|
+
simulation_voltage_probe_id: z200.string(),
|
|
4508
|
+
sweep_values: z200.array(z200.number()),
|
|
4482
4509
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4483
|
-
voltage_levels:
|
|
4484
|
-
name:
|
|
4485
|
-
color:
|
|
4510
|
+
voltage_levels: z200.array(z200.number()),
|
|
4511
|
+
name: z200.string().optional(),
|
|
4512
|
+
color: z200.string().optional()
|
|
4486
4513
|
}).refine(
|
|
4487
4514
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4488
4515
|
{
|
|
@@ -4492,20 +4519,20 @@ var simulation_dc_sweep_voltage_graph = z199.object({
|
|
|
4492
4519
|
expectTypesMatch(true);
|
|
4493
4520
|
|
|
4494
4521
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4495
|
-
import { z as
|
|
4496
|
-
var simulation_dc_sweep_current_graph =
|
|
4497
|
-
type:
|
|
4522
|
+
import { z as z201 } from "zod";
|
|
4523
|
+
var simulation_dc_sweep_current_graph = z201.object({
|
|
4524
|
+
type: z201.literal("simulation_dc_sweep_current_graph"),
|
|
4498
4525
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4499
4526
|
"simulation_dc_sweep_current_graph"
|
|
4500
4527
|
),
|
|
4501
|
-
simulation_experiment_id:
|
|
4528
|
+
simulation_experiment_id: z201.string(),
|
|
4502
4529
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4503
|
-
simulation_current_probe_id:
|
|
4504
|
-
sweep_values:
|
|
4530
|
+
simulation_current_probe_id: z201.string(),
|
|
4531
|
+
sweep_values: z201.array(z201.number()),
|
|
4505
4532
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4506
|
-
current_levels:
|
|
4507
|
-
name:
|
|
4508
|
-
color:
|
|
4533
|
+
current_levels: z201.array(z201.number()),
|
|
4534
|
+
name: z201.string().optional(),
|
|
4535
|
+
color: z201.string().optional()
|
|
4509
4536
|
}).refine(
|
|
4510
4537
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4511
4538
|
{
|
|
@@ -4515,29 +4542,29 @@ var simulation_dc_sweep_current_graph = z200.object({
|
|
|
4515
4542
|
expectTypesMatch(true);
|
|
4516
4543
|
|
|
4517
4544
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4518
|
-
import { z as
|
|
4545
|
+
import { z as z203 } from "zod";
|
|
4519
4546
|
|
|
4520
4547
|
// src/simulation/simulation_complex_sample.ts
|
|
4521
|
-
import { z as
|
|
4522
|
-
var simulation_complex_sample =
|
|
4523
|
-
re:
|
|
4524
|
-
im:
|
|
4548
|
+
import { z as z202 } from "zod";
|
|
4549
|
+
var simulation_complex_sample = z202.object({
|
|
4550
|
+
re: z202.number(),
|
|
4551
|
+
im: z202.number()
|
|
4525
4552
|
});
|
|
4526
4553
|
expectTypesMatch(true);
|
|
4527
4554
|
|
|
4528
4555
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4529
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4530
|
-
type:
|
|
4556
|
+
var simulation_ac_sweep_voltage_graph = z203.object({
|
|
4557
|
+
type: z203.literal("simulation_ac_sweep_voltage_graph"),
|
|
4531
4558
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4532
4559
|
"simulation_ac_sweep_voltage_graph"
|
|
4533
4560
|
),
|
|
4534
|
-
simulation_experiment_id:
|
|
4561
|
+
simulation_experiment_id: z203.string(),
|
|
4535
4562
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4536
|
-
simulation_voltage_probe_id:
|
|
4537
|
-
frequencies_hz:
|
|
4538
|
-
complex_voltages:
|
|
4539
|
-
name:
|
|
4540
|
-
color:
|
|
4563
|
+
simulation_voltage_probe_id: z203.string(),
|
|
4564
|
+
frequencies_hz: z203.array(z203.number()),
|
|
4565
|
+
complex_voltages: z203.array(simulation_complex_sample),
|
|
4566
|
+
name: z203.string().optional(),
|
|
4567
|
+
color: z203.string().optional()
|
|
4541
4568
|
}).refine(
|
|
4542
4569
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4543
4570
|
{
|
|
@@ -4547,19 +4574,19 @@ var simulation_ac_sweep_voltage_graph = z202.object({
|
|
|
4547
4574
|
expectTypesMatch(true);
|
|
4548
4575
|
|
|
4549
4576
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4550
|
-
import { z as
|
|
4551
|
-
var simulation_ac_sweep_current_graph =
|
|
4552
|
-
type:
|
|
4577
|
+
import { z as z204 } from "zod";
|
|
4578
|
+
var simulation_ac_sweep_current_graph = z204.object({
|
|
4579
|
+
type: z204.literal("simulation_ac_sweep_current_graph"),
|
|
4553
4580
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4554
4581
|
"simulation_ac_sweep_current_graph"
|
|
4555
4582
|
),
|
|
4556
|
-
simulation_experiment_id:
|
|
4583
|
+
simulation_experiment_id: z204.string(),
|
|
4557
4584
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4558
|
-
simulation_current_probe_id:
|
|
4559
|
-
frequencies_hz:
|
|
4560
|
-
complex_currents:
|
|
4561
|
-
name:
|
|
4562
|
-
color:
|
|
4585
|
+
simulation_current_probe_id: z204.string(),
|
|
4586
|
+
frequencies_hz: z204.array(z204.number()),
|
|
4587
|
+
complex_currents: z204.array(simulation_complex_sample),
|
|
4588
|
+
name: z204.string().optional(),
|
|
4589
|
+
color: z204.string().optional()
|
|
4563
4590
|
}).refine(
|
|
4564
4591
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4565
4592
|
{
|
|
@@ -4569,52 +4596,52 @@ var simulation_ac_sweep_current_graph = z203.object({
|
|
|
4569
4596
|
expectTypesMatch(true);
|
|
4570
4597
|
|
|
4571
4598
|
// src/simulation/simulation_op_amp.ts
|
|
4572
|
-
import { z as
|
|
4573
|
-
var simulation_op_amp =
|
|
4574
|
-
type:
|
|
4599
|
+
import { z as z205 } from "zod";
|
|
4600
|
+
var simulation_op_amp = z205.object({
|
|
4601
|
+
type: z205.literal("simulation_op_amp"),
|
|
4575
4602
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4576
|
-
source_component_id:
|
|
4577
|
-
inverting_input_source_port_id:
|
|
4578
|
-
non_inverting_input_source_port_id:
|
|
4579
|
-
output_source_port_id:
|
|
4580
|
-
positive_supply_source_port_id:
|
|
4581
|
-
negative_supply_source_port_id:
|
|
4603
|
+
source_component_id: z205.string().optional(),
|
|
4604
|
+
inverting_input_source_port_id: z205.string(),
|
|
4605
|
+
non_inverting_input_source_port_id: z205.string(),
|
|
4606
|
+
output_source_port_id: z205.string(),
|
|
4607
|
+
positive_supply_source_port_id: z205.string(),
|
|
4608
|
+
negative_supply_source_port_id: z205.string()
|
|
4582
4609
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4583
4610
|
expectTypesMatch(true);
|
|
4584
4611
|
|
|
4585
4612
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4586
|
-
import { z as
|
|
4587
|
-
var simulation_spice_subcircuit =
|
|
4588
|
-
type:
|
|
4613
|
+
import { z as z206 } from "zod";
|
|
4614
|
+
var simulation_spice_subcircuit = z206.object({
|
|
4615
|
+
type: z206.literal("simulation_spice_subcircuit"),
|
|
4589
4616
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4590
4617
|
"simulation_spice_subcircuit"
|
|
4591
4618
|
),
|
|
4592
|
-
source_component_id:
|
|
4593
|
-
spice_pin_to_source_port_map:
|
|
4594
|
-
subcircuit_source:
|
|
4619
|
+
source_component_id: z206.string(),
|
|
4620
|
+
spice_pin_to_source_port_map: z206.record(z206.string(), z206.string()),
|
|
4621
|
+
subcircuit_source: z206.string()
|
|
4595
4622
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4596
4623
|
expectTypesMatch(
|
|
4597
4624
|
true
|
|
4598
4625
|
);
|
|
4599
4626
|
|
|
4600
4627
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4601
|
-
import { z as
|
|
4628
|
+
import { z as z207 } from "zod";
|
|
4602
4629
|
var hasValue = (value) => value !== void 0;
|
|
4603
|
-
var simulation_oscilloscope_trace =
|
|
4604
|
-
type:
|
|
4630
|
+
var simulation_oscilloscope_trace = z207.object({
|
|
4631
|
+
type: z207.literal("simulation_oscilloscope_trace"),
|
|
4605
4632
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4606
4633
|
"simulation_oscilloscope_trace"
|
|
4607
4634
|
),
|
|
4608
|
-
simulation_transient_voltage_graph_id:
|
|
4609
|
-
simulation_transient_current_graph_id:
|
|
4610
|
-
simulation_voltage_probe_id:
|
|
4611
|
-
simulation_current_probe_id:
|
|
4612
|
-
display_name:
|
|
4613
|
-
color:
|
|
4614
|
-
display_center_value:
|
|
4615
|
-
display_center_offset_divs:
|
|
4616
|
-
volts_per_div:
|
|
4617
|
-
amps_per_div:
|
|
4635
|
+
simulation_transient_voltage_graph_id: z207.string().optional(),
|
|
4636
|
+
simulation_transient_current_graph_id: z207.string().optional(),
|
|
4637
|
+
simulation_voltage_probe_id: z207.string().optional(),
|
|
4638
|
+
simulation_current_probe_id: z207.string().optional(),
|
|
4639
|
+
display_name: z207.string().optional(),
|
|
4640
|
+
color: z207.string().optional(),
|
|
4641
|
+
display_center_value: z207.number().optional(),
|
|
4642
|
+
display_center_offset_divs: z207.number().optional(),
|
|
4643
|
+
volts_per_div: z207.number().positive().optional(),
|
|
4644
|
+
amps_per_div: z207.number().positive().optional()
|
|
4618
4645
|
}).describe(
|
|
4619
4646
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4620
4647
|
).superRefine((data, ctx) => {
|
|
@@ -4628,19 +4655,19 @@ var simulation_oscilloscope_trace = z206.object({
|
|
|
4628
4655
|
].filter(hasValue).length;
|
|
4629
4656
|
if (voltageReferences + currentReferences !== 1) {
|
|
4630
4657
|
ctx.addIssue({
|
|
4631
|
-
code:
|
|
4658
|
+
code: z207.ZodIssueCode.custom,
|
|
4632
4659
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4633
4660
|
});
|
|
4634
4661
|
}
|
|
4635
4662
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4636
4663
|
ctx.addIssue({
|
|
4637
|
-
code:
|
|
4664
|
+
code: z207.ZodIssueCode.custom,
|
|
4638
4665
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4639
4666
|
});
|
|
4640
4667
|
}
|
|
4641
4668
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4642
4669
|
ctx.addIssue({
|
|
4643
|
-
code:
|
|
4670
|
+
code: z207.ZodIssueCode.custom,
|
|
4644
4671
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4645
4672
|
});
|
|
4646
4673
|
}
|
|
@@ -4648,8 +4675,8 @@ var simulation_oscilloscope_trace = z206.object({
|
|
|
4648
4675
|
expectTypesMatch(true);
|
|
4649
4676
|
|
|
4650
4677
|
// src/any_circuit_element.ts
|
|
4651
|
-
import { z as
|
|
4652
|
-
var any_circuit_element =
|
|
4678
|
+
import { z as z208 } from "zod";
|
|
4679
|
+
var any_circuit_element = z208.union([
|
|
4653
4680
|
source_trace,
|
|
4654
4681
|
source_bus,
|
|
4655
4682
|
source_port,
|
|
@@ -4708,6 +4735,7 @@ var any_circuit_element = z207.union([
|
|
|
4708
4735
|
pcb_fabricator_extra_charge_warning,
|
|
4709
4736
|
pcb_plated_hole,
|
|
4710
4737
|
pcb_keepout,
|
|
4738
|
+
pcb_keepout_overlap_warning,
|
|
4711
4739
|
pcb_port,
|
|
4712
4740
|
pcb_net,
|
|
4713
4741
|
pcb_text,
|
|
@@ -4920,6 +4948,7 @@ export {
|
|
|
4920
4948
|
pcb_hole_rotated_pill_shape,
|
|
4921
4949
|
pcb_keepout,
|
|
4922
4950
|
pcb_keepout_outline,
|
|
4951
|
+
pcb_keepout_overlap_warning,
|
|
4923
4952
|
pcb_manual_edit_conflict_warning,
|
|
4924
4953
|
pcb_missing_footprint_error,
|
|
4925
4954
|
pcb_net,
|