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