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